@progress/kendo-angular-dropdowns 5.5.0 → 6.0.0-dev.202201171002
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 +97 -5
- package/dist/es/common/models/fillmode.js +4 -0
- package/dist/es/common/models/list-type.js +4 -0
- package/dist/es/common/models/rounded.js +4 -0
- package/dist/es/common/models/size.js +4 -0
- package/dist/es/common/searchbar.component.js +1 -1
- package/dist/es/common/selection/selectable.directive.js +2 -2
- package/dist/es/common/taglist.component.js +58 -5
- package/dist/es/common/util.js +37 -0
- package/dist/es/dropdownlist/dropdownlist.component.js +338 -46
- package/dist/es/dropdowntrees/dropdowntree.component.js +276 -42
- package/dist/es/dropdowntrees/multiselecttree.component.js +307 -46
- package/dist/es/multiselect/multiselect.component.js +162 -35
- package/dist/es/package-metadata.js +1 -1
- package/dist/es2015/autocomplete/autocomplete.component.d.ts +42 -0
- package/dist/es2015/autocomplete/autocomplete.component.js +109 -7
- package/dist/es2015/comboboxes/combobox.component.d.ts +49 -4
- package/dist/es2015/comboboxes/combobox.component.js +207 -106
- package/dist/es2015/comboboxes/multicolumncombobox.component.d.ts +9 -1
- package/dist/es2015/comboboxes/multicolumncombobox.component.js +185 -166
- package/dist/es2015/common/list.component.d.ts +26 -1
- package/dist/es2015/common/list.component.js +129 -37
- package/dist/es2015/common/models/fillmode.d.ts +14 -0
- package/dist/es2015/common/models/fillmode.js +4 -0
- package/dist/es2015/common/models/list-type.d.ts +8 -0
- package/dist/es2015/common/models/list-type.js +4 -0
- package/dist/es2015/common/models/rounded.d.ts +15 -0
- package/dist/es2015/common/models/rounded.js +4 -0
- package/dist/es2015/common/models/size.d.ts +14 -0
- package/dist/es2015/common/models/size.js +4 -0
- package/dist/es2015/common/searchbar.component.js +1 -1
- package/dist/es2015/common/selection/selectable.directive.js +2 -2
- package/dist/es2015/common/taglist.component.d.ts +13 -1
- package/dist/es2015/common/taglist.component.js +102 -47
- package/dist/es2015/common/util.d.ts +17 -0
- package/dist/es2015/common/util.js +37 -0
- package/dist/es2015/dropdownlist/dropdownlist.component.d.ts +77 -13
- package/dist/es2015/dropdownlist/dropdownlist.component.js +390 -159
- package/dist/es2015/dropdowntrees/dropdowntree.component.d.ts +71 -13
- package/dist/es2015/dropdowntrees/dropdowntree.component.js +287 -99
- package/dist/es2015/dropdowntrees/multiselecttree.component.d.ts +72 -12
- package/dist/es2015/dropdowntrees/multiselecttree.component.js +319 -117
- package/dist/es2015/index.metadata.json +1 -1
- package/dist/es2015/multiselect/multiselect.component.d.ts +53 -8
- package/dist/es2015/multiselect/multiselect.component.js +183 -70
- package/dist/es2015/package-metadata.js +1 -1
- package/dist/fesm2015/index.js +1974 -834
- package/dist/fesm5/index.js +1577 -225
- 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 +96 -4
- package/dist/npm/common/models/fillmode.js +6 -0
- package/dist/npm/common/models/list-type.js +6 -0
- package/dist/npm/common/models/rounded.js +6 -0
- package/dist/npm/common/models/size.js +6 -0
- package/dist/npm/common/searchbar.component.js +1 -1
- package/dist/npm/common/selection/selectable.directive.js +2 -2
- package/dist/npm/common/taglist.component.js +56 -3
- package/dist/npm/common/util.js +37 -0
- package/dist/npm/dropdownlist/dropdownlist.component.js +336 -44
- package/dist/npm/dropdowntrees/dropdowntree.component.js +274 -40
- package/dist/npm/dropdowntrees/multiselecttree.component.js +304 -43
- package/dist/npm/multiselect/multiselect.component.js +160 -33
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-angular-dropdowns.js +1 -1
- package/package.json +18 -14
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: 1642413450,
|
|
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,20 +1439,35 @@ 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) {
|
|
1393
1451
|
this.lastLoaded = this.data.length - 1;
|
|
1394
1452
|
this.scrollToFocused = !changes.data.isFirstChange();
|
|
1395
1453
|
}
|
|
1454
|
+
this.setOverflow();
|
|
1455
|
+
}
|
|
1456
|
+
if (isChanged('virtual', changes, false)) {
|
|
1457
|
+
this.setOverflow();
|
|
1458
|
+
}
|
|
1459
|
+
if (isChanged('type', changes, false)) {
|
|
1460
|
+
this.prepareClasses();
|
|
1396
1461
|
}
|
|
1397
1462
|
}
|
|
1398
1463
|
ngAfterViewInit() {
|
|
1464
|
+
this.setComponentClasses();
|
|
1399
1465
|
this.zone.runOutsideAngular(() => {
|
|
1400
1466
|
this.scrollSubscription = fromEvent(this.content.nativeElement, "scroll").pipe(auditTime(100), tap(this.prefetchData.bind(this)), tap(this.findCurrentGroup.bind(this))).subscribe(() => {
|
|
1401
1467
|
this.lastScrollTop = this.content.nativeElement.scrollTop;
|
|
1402
1468
|
});
|
|
1403
1469
|
});
|
|
1470
|
+
this.setOverflow();
|
|
1404
1471
|
}
|
|
1405
1472
|
ngAfterViewChecked() {
|
|
1406
1473
|
if (this.virtual) {
|
|
@@ -1430,6 +1497,28 @@ let ListComponent = class ListComponent {
|
|
|
1430
1497
|
this.selectionService.unselect(index);
|
|
1431
1498
|
}
|
|
1432
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
|
+
}
|
|
1433
1522
|
isChecked(index) {
|
|
1434
1523
|
const normalizedIndex = this.virtual ? index + this.virtual.skip : index;
|
|
1435
1524
|
return this.selectionService.isSelected(normalizedIndex);
|
|
@@ -1438,7 +1527,7 @@ let ListComponent = class ListComponent {
|
|
|
1438
1527
|
const content = this.content.nativeElement;
|
|
1439
1528
|
const rect = content.getBoundingClientRect();
|
|
1440
1529
|
// IE9 hack
|
|
1441
|
-
const disabled = Array.prototype.slice.call(content.querySelectorAll(".k-
|
|
1530
|
+
const disabled = Array.prototype.slice.call(content.querySelectorAll(".k-disabled"));
|
|
1442
1531
|
// This is a workaround for finding elements with pointer-events: none;
|
|
1443
1532
|
disabled.forEach((el) => this.renderer.setStyle(el, "pointer-events", "auto"));
|
|
1444
1533
|
const item = document.elementFromPoint(rect.left + 1, rect.top + 1);
|
|
@@ -1516,6 +1605,9 @@ let ListComponent = class ListComponent {
|
|
|
1516
1605
|
}
|
|
1517
1606
|
return this.disabledItemsService.isIndexDisabled(index);
|
|
1518
1607
|
}
|
|
1608
|
+
isAltRow(index) {
|
|
1609
|
+
return this.type === 'dropdowngrid' && index % 2 !== 0;
|
|
1610
|
+
}
|
|
1519
1611
|
scrollToItem(index) {
|
|
1520
1612
|
let flatIndex = index;
|
|
1521
1613
|
if (this.dataService.grouped) {
|
|
@@ -1574,6 +1666,15 @@ let ListComponent = class ListComponent {
|
|
|
1574
1666
|
const hasVirtualScroll = isPresent(this.virtual) && this.hasVirtualScrollbar();
|
|
1575
1667
|
return hasVirtualScroll || this.list.nativeElement.scrollHeight > this.content.nativeElement.offsetHeight;
|
|
1576
1668
|
}
|
|
1669
|
+
/**
|
|
1670
|
+
* Sets the list's content overflow (hides/shows scrollbar)
|
|
1671
|
+
*/
|
|
1672
|
+
setOverflow() {
|
|
1673
|
+
if (this.virtual) {
|
|
1674
|
+
const overflow = this.hasVirtualScrollbar() ? 'scroll' : 'hidden';
|
|
1675
|
+
this.renderer.setStyle(this.content.nativeElement, 'overflow-y', overflow);
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1577
1678
|
/**
|
|
1578
1679
|
* Indicates whether the scrollbar should be visible in virtual mode.
|
|
1579
1680
|
*/
|
|
@@ -1597,6 +1698,17 @@ let ListComponent = class ListComponent {
|
|
|
1597
1698
|
}
|
|
1598
1699
|
return this.virtual.skip === 0 && (this.virtual.pageSize > itemIndex);
|
|
1599
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
|
+
}
|
|
1600
1712
|
};
|
|
1601
1713
|
__decorate([
|
|
1602
1714
|
Input(),
|
|
@@ -1653,7 +1765,7 @@ __decorate([
|
|
|
1653
1765
|
__decorate([
|
|
1654
1766
|
Input(),
|
|
1655
1767
|
__metadata("design:type", String)
|
|
1656
|
-
], ListComponent.prototype, "
|
|
1768
|
+
], ListComponent.prototype, "type", void 0);
|
|
1657
1769
|
__decorate([
|
|
1658
1770
|
Input(),
|
|
1659
1771
|
__metadata("design:type", Object)
|
|
@@ -1663,6 +1775,15 @@ __decorate([
|
|
|
1663
1775
|
__metadata("design:type", Array),
|
|
1664
1776
|
__metadata("design:paramtypes", [Array])
|
|
1665
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);
|
|
1666
1787
|
__decorate([
|
|
1667
1788
|
Output(),
|
|
1668
1789
|
__metadata("design:type", EventEmitter)
|
|
@@ -1696,8 +1817,7 @@ ListComponent = __decorate([
|
|
|
1696
1817
|
selector: 'kendo-list',
|
|
1697
1818
|
template: `
|
|
1698
1819
|
<div *ngIf="dataService.grouped"
|
|
1699
|
-
class=
|
|
1700
|
-
[ngClass]="{'k-virtual-item': virtual}"
|
|
1820
|
+
[class]="listGroupStickyHeaderClass"
|
|
1701
1821
|
[ngStyle]="{
|
|
1702
1822
|
'height.px': virtual?.itemHeight,
|
|
1703
1823
|
'minHeight.px' : virtual?.itemHeight,
|
|
@@ -1709,17 +1829,16 @@ ListComponent = __decorate([
|
|
|
1709
1829
|
$implicit: currentGroup
|
|
1710
1830
|
}">
|
|
1711
1831
|
</ng-template>
|
|
1712
|
-
<ng-template [ngIf]="!fixedGroupTemplate"><
|
|
1832
|
+
<ng-template [ngIf]="!fixedGroupTemplate"><span [class]="listGroupStickyHeaderTextClass">{{ currentGroup }}</span></ng-template>
|
|
1713
1833
|
</div>
|
|
1714
1834
|
<div #content
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1835
|
+
[class]="listContentClass"
|
|
1836
|
+
[style.overscrollBehavior]="'none'"
|
|
1837
|
+
[style.maxHeight.px]="height"
|
|
1838
|
+
unselectable="on">
|
|
1719
1839
|
<ul #list
|
|
1720
1840
|
role="listbox"
|
|
1721
1841
|
[class]="listClass"
|
|
1722
|
-
[ngClass]="{ 'k-virtual-list': virtual }"
|
|
1723
1842
|
[attr.id]="id"
|
|
1724
1843
|
[attr.aria-hidden]="!show">
|
|
1725
1844
|
<ng-template *ngIf="!dataService.grouped && show" ngFor let-dataItem let-itemIndex="index" [ngForOf]="data">
|
|
@@ -1732,31 +1851,35 @@ ListComponent = __decorate([
|
|
|
1732
1851
|
[multipleSelection]="multipleSelection"
|
|
1733
1852
|
[attr.id]="optionPrefix + '-' + getValue(dataItem)"
|
|
1734
1853
|
[attr.tabIndex]="-1"
|
|
1735
|
-
class="
|
|
1736
|
-
[ngClass]="{
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
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
|
+
/>
|
|
1745
1868
|
<ng-template *ngIf="template"
|
|
1746
1869
|
[templateContext]="{
|
|
1747
1870
|
templateRef: template.templateRef,
|
|
1748
1871
|
$implicit: dataItem
|
|
1749
1872
|
}">
|
|
1750
1873
|
</ng-template>
|
|
1751
|
-
<ng-template [ngIf]="!template">{{ getText(dataItem) }}</ng-template>
|
|
1874
|
+
<ng-template [ngIf]="!template"><span class="k-list-item-text">{{ getText(dataItem) }}</span></ng-template>
|
|
1752
1875
|
</li>
|
|
1753
1876
|
</ng-template>
|
|
1754
1877
|
<ng-template *ngIf="dataService.grouped" ngFor let-dataItem let-itemIndex="index" [ngForOf]="data">
|
|
1755
1878
|
<li
|
|
1756
1879
|
*ngIf="dataItem.header && dataItem.index > 0"
|
|
1757
1880
|
role="group"
|
|
1758
|
-
class=
|
|
1759
|
-
[
|
|
1881
|
+
[class]="listGroupItemClass"
|
|
1882
|
+
[class.k-table-alt-row]="isAltRow(itemIndex - 1)"
|
|
1760
1883
|
[ngStyle]="{
|
|
1761
1884
|
'height.px': virtual?.itemHeight,
|
|
1762
1885
|
'minHeight.px' : virtual?.itemHeight,
|
|
@@ -1764,15 +1887,17 @@ ListComponent = __decorate([
|
|
|
1764
1887
|
[attr.group-index]="dataItem.index"
|
|
1765
1888
|
[attr.id]="optionPrefix + '-' + getValue(dataItem.value)"
|
|
1766
1889
|
[attr.tabIndex]="-1">
|
|
1767
|
-
<
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
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
|
|
1776
1901
|
*ngIf="!dataItem.header"
|
|
1777
1902
|
role="option"
|
|
1778
1903
|
kendoDropDownsSelectable
|
|
@@ -1782,15 +1907,19 @@ ListComponent = __decorate([
|
|
|
1782
1907
|
[attr.absolute-index]="dataItem.index"
|
|
1783
1908
|
[attr.id]="optionPrefix + '-' + getValue(dataItem.value)"
|
|
1784
1909
|
[attr.tabIndex]="-1"
|
|
1785
|
-
class="
|
|
1786
|
-
[ngClass]="{
|
|
1910
|
+
[class]="listItemClass"
|
|
1911
|
+
[ngClass]="{
|
|
1912
|
+
'k-disabled': isDisabled(dataItem.offsetIndex),
|
|
1913
|
+
'k-table-alt-row': isAltRow(itemIndex - 1)
|
|
1914
|
+
}"
|
|
1915
|
+
>
|
|
1787
1916
|
<ng-template *ngIf="template"
|
|
1788
1917
|
[templateContext]="{
|
|
1789
1918
|
templateRef: template.templateRef,
|
|
1790
1919
|
$implicit: dataItem.value
|
|
1791
1920
|
}">
|
|
1792
1921
|
</ng-template>
|
|
1793
|
-
<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>
|
|
1794
1923
|
</li>
|
|
1795
1924
|
</ng-template>
|
|
1796
1925
|
<kendo-resize-sensor
|
|
@@ -1982,6 +2111,9 @@ let AutoCompleteComponent = AutoCompleteComponent_1 = class AutoCompleteComponen
|
|
|
1982
2111
|
this._value = "";
|
|
1983
2112
|
this.valueChangeSubject = new Subject();
|
|
1984
2113
|
this._isFocused = false;
|
|
2114
|
+
this._size = 'medium';
|
|
2115
|
+
this._rounded = 'medium';
|
|
2116
|
+
this._fillMode = 'solid';
|
|
1985
2117
|
validatePackage(packageMetadata);
|
|
1986
2118
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
1987
2119
|
this.wrapper = this.hostElement.nativeElement;
|
|
@@ -2166,16 +2298,80 @@ let AutoCompleteComponent = AutoCompleteComponent_1 = class AutoCompleteComponen
|
|
|
2166
2298
|
get virtual() {
|
|
2167
2299
|
return this._virtualSettings;
|
|
2168
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
|
+
}
|
|
2169
2362
|
get isFocused() {
|
|
2170
2363
|
return this._isFocused;
|
|
2171
2364
|
}
|
|
2172
2365
|
set isFocused(isFocused) {
|
|
2173
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper, "k-
|
|
2366
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper, "k-focus");
|
|
2174
2367
|
this._isFocused = isFocused;
|
|
2175
2368
|
}
|
|
2176
2369
|
get isDisabled() {
|
|
2177
2370
|
return this.disabled;
|
|
2178
2371
|
}
|
|
2372
|
+
get isLoading() {
|
|
2373
|
+
return this.loading;
|
|
2374
|
+
}
|
|
2179
2375
|
get dir() {
|
|
2180
2376
|
return this.direction;
|
|
2181
2377
|
}
|
|
@@ -2188,6 +2384,7 @@ let AutoCompleteComponent = AutoCompleteComponent_1 = class AutoCompleteComponen
|
|
|
2188
2384
|
this.setMessages();
|
|
2189
2385
|
});
|
|
2190
2386
|
this.setMessages();
|
|
2387
|
+
this.setComponentClasses();
|
|
2191
2388
|
}
|
|
2192
2389
|
ngOnDestroy() {
|
|
2193
2390
|
this.destroyPopup();
|
|
@@ -2615,6 +2812,17 @@ let AutoCompleteComponent = AutoCompleteComponent_1 = class AutoCompleteComponen
|
|
|
2615
2812
|
});
|
|
2616
2813
|
});
|
|
2617
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
|
+
}
|
|
2618
2826
|
};
|
|
2619
2827
|
__decorate([
|
|
2620
2828
|
Input(),
|
|
@@ -2694,6 +2902,21 @@ __decorate([
|
|
|
2694
2902
|
__metadata("design:type", Object),
|
|
2695
2903
|
__metadata("design:paramtypes", [Object])
|
|
2696
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);
|
|
2697
2920
|
__decorate([
|
|
2698
2921
|
Output(),
|
|
2699
2922
|
__metadata("design:type", EventEmitter)
|
|
@@ -2767,15 +2990,20 @@ __decorate([
|
|
|
2767
2990
|
__metadata("design:type", ListComponent)
|
|
2768
2991
|
], AutoCompleteComponent.prototype, "optionsList", void 0);
|
|
2769
2992
|
__decorate([
|
|
2770
|
-
HostBinding('class.k-widget'),
|
|
2771
2993
|
HostBinding('class.k-autocomplete'),
|
|
2994
|
+
HostBinding('class.k-input'),
|
|
2772
2995
|
__metadata("design:type", Boolean)
|
|
2773
2996
|
], AutoCompleteComponent.prototype, "widgetClasses", void 0);
|
|
2774
2997
|
__decorate([
|
|
2775
|
-
HostBinding('class.k-
|
|
2998
|
+
HostBinding('class.k-disabled'),
|
|
2776
2999
|
__metadata("design:type", Boolean),
|
|
2777
3000
|
__metadata("design:paramtypes", [])
|
|
2778
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);
|
|
2779
3007
|
__decorate([
|
|
2780
3008
|
HostBinding('attr.dir'),
|
|
2781
3009
|
__metadata("design:type", Object),
|
|
@@ -2834,7 +3062,7 @@ AutoCompleteComponent = AutoCompleteComponent_1 = __decorate([
|
|
|
2834
3062
|
></kendo-searchbar>
|
|
2835
3063
|
<span
|
|
2836
3064
|
*ngIf="!loading && !readonly && (clearButton && text?.length)"
|
|
2837
|
-
class="k-
|
|
3065
|
+
class="k-clear-value"
|
|
2838
3066
|
[style.visibility]="clearButtonVisiblity"
|
|
2839
3067
|
[attr.title]="clearTitle"
|
|
2840
3068
|
role="button"
|
|
@@ -2842,7 +3070,8 @@ AutoCompleteComponent = AutoCompleteComponent_1 = __decorate([
|
|
|
2842
3070
|
(click)="clearValue($event)"
|
|
2843
3071
|
(mousedown)="$event.preventDefault()"
|
|
2844
3072
|
>
|
|
2845
|
-
|
|
3073
|
+
<span class="k-icon k-i-x"></span>
|
|
3074
|
+
</span>
|
|
2846
3075
|
<span *ngIf="loading" class="k-icon k-i-loading"></span>
|
|
2847
3076
|
<ng-template #popupTemplate>
|
|
2848
3077
|
<!--header template-->
|
|
@@ -2854,6 +3083,8 @@ AutoCompleteComponent = AutoCompleteComponent_1 = __decorate([
|
|
|
2854
3083
|
<!--list-->
|
|
2855
3084
|
<kendo-list
|
|
2856
3085
|
#optionsList
|
|
3086
|
+
[size]="size"
|
|
3087
|
+
[rounded]="rounded"
|
|
2857
3088
|
[id]="listBoxId"
|
|
2858
3089
|
[optionPrefix]="optionPrefix"
|
|
2859
3090
|
[data]="data"
|
|
@@ -2869,7 +3100,7 @@ AutoCompleteComponent = AutoCompleteComponent_1 = __decorate([
|
|
|
2869
3100
|
>
|
|
2870
3101
|
</kendo-list>
|
|
2871
3102
|
<!--no-data template-->
|
|
2872
|
-
<div class="k-
|
|
3103
|
+
<div class="k-no-data" *ngIf="data.length === 0">
|
|
2873
3104
|
<ng-template [ngIf]="noDataTemplate"
|
|
2874
3105
|
[templateContext]="{
|
|
2875
3106
|
templateRef: noDataTemplate?.templateRef
|
|
@@ -2992,7 +3223,8 @@ const COMBOBOX_VALUE_ACCESSOR = {
|
|
|
2992
3223
|
* ```
|
|
2993
3224
|
*/
|
|
2994
3225
|
let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
2995
|
-
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;
|
|
2996
3228
|
this.localization = localization;
|
|
2997
3229
|
this.popupService = popupService;
|
|
2998
3230
|
this.selectionService = selectionService;
|
|
@@ -3002,7 +3234,6 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
3002
3234
|
this.zone = zone;
|
|
3003
3235
|
this.cdr = cdr;
|
|
3004
3236
|
this.renderer = renderer;
|
|
3005
|
-
this.hostElement = hostElement;
|
|
3006
3237
|
this.touchEnabled = touchEnabled$$1;
|
|
3007
3238
|
this.selected = [];
|
|
3008
3239
|
/**
|
|
@@ -3167,6 +3398,9 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
3167
3398
|
this.valueSubject = new Subject();
|
|
3168
3399
|
this.clearValueSubject = new Subject();
|
|
3169
3400
|
this.subs = new Subscription();
|
|
3401
|
+
this._size = 'medium';
|
|
3402
|
+
this._rounded = 'medium';
|
|
3403
|
+
this._fillMode = 'solid';
|
|
3170
3404
|
validatePackage(packageMetadata);
|
|
3171
3405
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
3172
3406
|
this.data = [];
|
|
@@ -3321,8 +3555,72 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
3321
3555
|
get virtual() {
|
|
3322
3556
|
return this._virtualSettings;
|
|
3323
3557
|
}
|
|
3324
|
-
|
|
3325
|
-
|
|
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;
|
|
3326
3624
|
}
|
|
3327
3625
|
get dir() {
|
|
3328
3626
|
return this.direction;
|
|
@@ -3331,7 +3629,7 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
3331
3629
|
return this._isFocused;
|
|
3332
3630
|
}
|
|
3333
3631
|
set isFocused(value) {
|
|
3334
|
-
this.renderer[value ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, "k-
|
|
3632
|
+
this.renderer[value ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, "k-focus");
|
|
3335
3633
|
this._isFocused = value;
|
|
3336
3634
|
}
|
|
3337
3635
|
get clearButtonVisiblity() {
|
|
@@ -3354,12 +3652,13 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
3354
3652
|
return isPresent(popupHeight) ? `${popupHeight}px` : 'auto';
|
|
3355
3653
|
}
|
|
3356
3654
|
ngOnInit() {
|
|
3357
|
-
this.renderer.removeAttribute(this.
|
|
3655
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
3358
3656
|
this.attachStreams();
|
|
3359
3657
|
this.createValueStream();
|
|
3360
3658
|
this.subscribeTouchEvents();
|
|
3361
3659
|
this.attachSelectClickHandler();
|
|
3362
3660
|
this.setMessages();
|
|
3661
|
+
this.setComponentClasses();
|
|
3363
3662
|
}
|
|
3364
3663
|
createValueStream() {
|
|
3365
3664
|
const valueStream = this.valueSubject.pipe(filter((candidate) => {
|
|
@@ -3637,6 +3936,13 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
3637
3936
|
get buttonClasses() {
|
|
3638
3937
|
return this.loading ? 'k-i-loading' : this.iconClass || 'k-i-arrow-s';
|
|
3639
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
|
+
}
|
|
3640
3946
|
/**
|
|
3641
3947
|
* @hidden
|
|
3642
3948
|
*/
|
|
@@ -3862,7 +4168,7 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
3862
4168
|
const currentText = this.searchbar.value;
|
|
3863
4169
|
const textHasChanged = currentText !== (getter$1(this.dataItem, this.textField) || '');
|
|
3864
4170
|
const valueHasChanged = unresolvedSelection || textHasChanged;
|
|
3865
|
-
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);
|
|
3866
4172
|
if (runInZone) {
|
|
3867
4173
|
this.zone.run(() => {
|
|
3868
4174
|
if (valueHasChanged) {
|
|
@@ -4087,7 +4393,7 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
4087
4393
|
// Roll up ComboBox on iOS when tapped outside
|
|
4088
4394
|
this.touchstartDisposeHandler = this.renderer.listen(document, 'touchstart', (e) => {
|
|
4089
4395
|
const target = e.target;
|
|
4090
|
-
const isInDropDown = inDropDown(this.
|
|
4396
|
+
const isInDropDown = inDropDown(this.wrapper, target, this.popupRef);
|
|
4091
4397
|
if (this.isFocused && !isInDropDown) {
|
|
4092
4398
|
// Close popup and mobile keyboard if searchbar is focused
|
|
4093
4399
|
this.zone.run(() => this.blur());
|
|
@@ -4103,6 +4409,17 @@ let ComboBoxComponent = ComboBoxComponent_1 = class ComboBoxComponent {
|
|
|
4103
4409
|
const event = pointers ? 'pointerdown' : 'click';
|
|
4104
4410
|
this.selectClickDisposeHandler = this.renderer.listen(selectElement, event, this.selectClick.bind(this));
|
|
4105
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
|
+
}
|
|
4106
4423
|
};
|
|
4107
4424
|
__decorate([
|
|
4108
4425
|
Input(),
|
|
@@ -4199,6 +4516,21 @@ __decorate([
|
|
|
4199
4516
|
__metadata("design:type", Object),
|
|
4200
4517
|
__metadata("design:paramtypes", [Object])
|
|
4201
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);
|
|
4202
4534
|
__decorate([
|
|
4203
4535
|
Output(),
|
|
4204
4536
|
__metadata("design:type", EventEmitter)
|
|
@@ -4275,24 +4607,25 @@ __decorate([
|
|
|
4275
4607
|
ViewChild('optionsList', { static: false }),
|
|
4276
4608
|
__metadata("design:type", ListComponent)
|
|
4277
4609
|
], ComboBoxComponent.prototype, "optionsList", void 0);
|
|
4278
|
-
__decorate([
|
|
4279
|
-
ViewChild('wrapper', { static: true }),
|
|
4280
|
-
__metadata("design:type", ElementRef)
|
|
4281
|
-
], ComboBoxComponent.prototype, "wrapper", void 0);
|
|
4282
4610
|
__decorate([
|
|
4283
4611
|
ViewChild('select', { static: true }),
|
|
4284
4612
|
__metadata("design:type", ElementRef)
|
|
4285
4613
|
], ComboBoxComponent.prototype, "select", void 0);
|
|
4286
4614
|
__decorate([
|
|
4287
|
-
HostBinding('class.k-widget'),
|
|
4288
4615
|
HostBinding('class.k-combobox'),
|
|
4616
|
+
HostBinding('class.k-input'),
|
|
4289
4617
|
__metadata("design:type", Boolean)
|
|
4290
4618
|
], ComboBoxComponent.prototype, "widgetClasses", void 0);
|
|
4291
4619
|
__decorate([
|
|
4292
|
-
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'),
|
|
4293
4626
|
__metadata("design:type", Boolean),
|
|
4294
4627
|
__metadata("design:paramtypes", [])
|
|
4295
|
-
], ComboBoxComponent.prototype, "
|
|
4628
|
+
], ComboBoxComponent.prototype, "isLoading", null);
|
|
4296
4629
|
__decorate([
|
|
4297
4630
|
HostBinding('attr.dir'),
|
|
4298
4631
|
__metadata("design:type", Object),
|
|
@@ -4329,95 +4662,94 @@ ComboBoxComponent = ComboBoxComponent_1 = __decorate([
|
|
|
4329
4662
|
clearTitle="clear"
|
|
4330
4663
|
>
|
|
4331
4664
|
</ng-container>
|
|
4332
|
-
<
|
|
4333
|
-
|
|
4334
|
-
[
|
|
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
|
+
}"
|
|
4335
4693
|
>
|
|
4336
|
-
|
|
4337
|
-
[role]="'combobox'"
|
|
4338
|
-
[id]="focusableId"
|
|
4339
|
-
[listId]="listBoxId"
|
|
4340
|
-
[activeDescendant]="activeDescendant"
|
|
4341
|
-
[noDataLabel]="noDataLabel"
|
|
4342
|
-
[userInput]="text"
|
|
4343
|
-
[suggestedText]="getSuggestion()"
|
|
4344
|
-
[disabled]="disabled"
|
|
4345
|
-
[readonly]="readonly"
|
|
4346
|
-
[tabIndex]="tabIndex"
|
|
4347
|
-
[popupOpen]="isOpen"
|
|
4348
|
-
[placeholder]="placeholder"
|
|
4349
|
-
(onNavigate)="handleNavigate($event)"
|
|
4350
|
-
(valueChange)="searchBarChange($event)"
|
|
4351
|
-
(onBlur)="handleBlur()"
|
|
4352
|
-
(onFocus)="handleFocus()"
|
|
4353
|
-
></kendo-searchbar>
|
|
4354
|
-
<span
|
|
4355
|
-
*ngIf="clearButton && !loading && !disabled && !readonly && text?.length"
|
|
4356
|
-
class="k-icon k-clear-value k-i-close"
|
|
4357
|
-
[style.visibility]="clearButtonVisiblity"
|
|
4358
|
-
aria-hidden="true"
|
|
4359
|
-
[attr.title]="clearTitle"
|
|
4360
|
-
(click)="clearValue($event)"
|
|
4361
|
-
[kendoEventsOutsideAngular]="{
|
|
4362
|
-
mousedown: preventEventDefault
|
|
4363
|
-
}"
|
|
4364
|
-
>
|
|
4365
|
-
</span>
|
|
4366
|
-
<span
|
|
4367
|
-
#select
|
|
4368
|
-
aria-hidden="true"
|
|
4369
|
-
unselectable="on"
|
|
4370
|
-
class="k-select"
|
|
4371
|
-
[kendoEventsOutsideAngular]="{
|
|
4372
|
-
mousedown: preventEventDefault
|
|
4373
|
-
}"
|
|
4374
|
-
>
|
|
4375
|
-
<span class="k-icon" [ngClass]="buttonClasses">
|
|
4376
|
-
</span>
|
|
4377
|
-
</span>
|
|
4378
|
-
<ng-template #popupTemplate>
|
|
4379
|
-
<!--header template-->
|
|
4380
|
-
<ng-template *ngIf="headerTemplate"
|
|
4381
|
-
[templateContext]="{
|
|
4382
|
-
templateRef: headerTemplate.templateRef
|
|
4383
|
-
}">
|
|
4384
|
-
</ng-template>
|
|
4385
|
-
<!--list-->
|
|
4386
|
-
<kendo-list
|
|
4387
|
-
#optionsList
|
|
4388
|
-
[id]="listBoxId"
|
|
4389
|
-
[optionPrefix]="optionPrefix"
|
|
4390
|
-
[data]="data"
|
|
4391
|
-
[textField]="textField"
|
|
4392
|
-
[valueField]="valueField"
|
|
4393
|
-
[template]="template"
|
|
4394
|
-
[groupTemplate]="groupTemplate"
|
|
4395
|
-
[fixedGroupTemplate]="fixedGroupTemplate"
|
|
4396
|
-
[height]="listHeight"
|
|
4397
|
-
[show]="isOpen"
|
|
4398
|
-
[virtual]="virtual"
|
|
4399
|
-
(pageChange)="pageChange($event)"
|
|
4400
|
-
>
|
|
4401
|
-
</kendo-list>
|
|
4402
|
-
<!--no-data template-->
|
|
4403
|
-
<div class="k-nodata" *ngIf="data.length === 0">
|
|
4404
|
-
<ng-template [ngIf]="noDataTemplate"
|
|
4405
|
-
[templateContext]="{
|
|
4406
|
-
templateRef: noDataTemplate ? noDataTemplate.templateRef : undefined
|
|
4407
|
-
}">
|
|
4408
|
-
</ng-template>
|
|
4409
|
-
<ng-template [ngIf]="!noDataTemplate">
|
|
4410
|
-
<div>{{ noDataText }}</div>
|
|
4411
|
-
</ng-template>
|
|
4412
|
-
</div>
|
|
4413
|
-
<!--footer template-->
|
|
4414
|
-
<ng-template *ngIf="footerTemplate"
|
|
4415
|
-
[templateContext]="{
|
|
4416
|
-
templateRef: footerTemplate.templateRef
|
|
4417
|
-
}">
|
|
4418
|
-
</ng-template>
|
|
4419
|
-
</ng-template>
|
|
4694
|
+
<span class="k-icon k-i-x"></span>
|
|
4420
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>
|
|
4421
4753
|
<ng-template [ngIf]="isOpen">
|
|
4422
4754
|
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
4423
4755
|
</ng-template>
|
|
@@ -4425,7 +4757,8 @@ ComboBoxComponent = ComboBoxComponent_1 = __decorate([
|
|
|
4425
4757
|
`
|
|
4426
4758
|
}),
|
|
4427
4759
|
__param(10, Optional()), __param(10, Inject(TOUCH_ENABLED)),
|
|
4428
|
-
__metadata("design:paramtypes", [
|
|
4760
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
4761
|
+
LocalizationService,
|
|
4429
4762
|
PopupService,
|
|
4430
4763
|
SelectionService,
|
|
4431
4764
|
NavigationService,
|
|
@@ -4433,8 +4766,7 @@ ComboBoxComponent = ComboBoxComponent_1 = __decorate([
|
|
|
4433
4766
|
DataService,
|
|
4434
4767
|
NgZone,
|
|
4435
4768
|
ChangeDetectorRef,
|
|
4436
|
-
Renderer2,
|
|
4437
|
-
ElementRef, Boolean])
|
|
4769
|
+
Renderer2, Boolean])
|
|
4438
4770
|
], ComboBoxComponent);
|
|
4439
4771
|
|
|
4440
4772
|
/**
|
|
@@ -4506,7 +4838,8 @@ const DROPDOWNLIST_VALUE_ACCESSOR = {
|
|
|
4506
4838
|
* ```
|
|
4507
4839
|
*/
|
|
4508
4840
|
let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponent {
|
|
4509
|
-
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;
|
|
4510
4843
|
this.localization = localization;
|
|
4511
4844
|
this.popupService = popupService;
|
|
4512
4845
|
this.selectionService = selectionService;
|
|
@@ -4515,7 +4848,6 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
4515
4848
|
this.dataService = dataService;
|
|
4516
4849
|
this._zone = _zone;
|
|
4517
4850
|
this.renderer = renderer;
|
|
4518
|
-
this.hostElement = hostElement;
|
|
4519
4851
|
this.cdr = cdr;
|
|
4520
4852
|
this.touchEnabled = touchEnabled$$1;
|
|
4521
4853
|
/**
|
|
@@ -4599,7 +4931,8 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
4599
4931
|
* Fires each time the DropDownList gets blurred.
|
|
4600
4932
|
*/
|
|
4601
4933
|
this.onBlur = new EventEmitter();
|
|
4602
|
-
this.
|
|
4934
|
+
this.hostClasses = true;
|
|
4935
|
+
this.role = 'listbox';
|
|
4603
4936
|
this.groupIndices = [];
|
|
4604
4937
|
this.listBoxId = guid$1();
|
|
4605
4938
|
this.optionPrefix = guid$1();
|
|
@@ -4611,16 +4944,20 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
4611
4944
|
this.last = "";
|
|
4612
4945
|
this.filterFocused = new EventEmitter();
|
|
4613
4946
|
this.filterBlurred = new EventEmitter();
|
|
4614
|
-
this.
|
|
4615
|
-
this.
|
|
4947
|
+
this.hostElementFocused = new EventEmitter();
|
|
4948
|
+
this.hostElementBlurred = new EventEmitter();
|
|
4616
4949
|
this.selectionSubscription = new Subscription();
|
|
4617
4950
|
this._open = false;
|
|
4618
4951
|
this._popupSettings = { animate: true };
|
|
4952
|
+
this._size = 'medium';
|
|
4953
|
+
this._rounded = 'medium';
|
|
4954
|
+
this._fillMode = 'solid';
|
|
4619
4955
|
validatePackage(packageMetadata);
|
|
4620
4956
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
4621
4957
|
this.data = [];
|
|
4622
4958
|
this.subscribeEvents();
|
|
4623
4959
|
this.subscribeTouchEvents();
|
|
4960
|
+
this.subscribeFocusEvents();
|
|
4624
4961
|
this.popupMouseDownHandler = this.onMouseDown.bind(this);
|
|
4625
4962
|
}
|
|
4626
4963
|
get width() {
|
|
@@ -4769,30 +5106,140 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
4769
5106
|
return this.tabindex;
|
|
4770
5107
|
}
|
|
4771
5108
|
/**
|
|
4772
|
-
*
|
|
5109
|
+
* Sets the size of the component.
|
|
5110
|
+
*
|
|
5111
|
+
* The possible values are:
|
|
5112
|
+
* * `'small'`
|
|
5113
|
+
* * `'medium'` (default)
|
|
5114
|
+
* * `'large'`
|
|
5115
|
+
* * `null`
|
|
5116
|
+
*
|
|
4773
5117
|
*/
|
|
4774
|
-
|
|
4775
|
-
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;
|
|
5124
|
+
}
|
|
5125
|
+
get size() {
|
|
5126
|
+
return this._size;
|
|
4776
5127
|
}
|
|
4777
5128
|
/**
|
|
4778
|
-
*
|
|
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
|
+
*
|
|
4779
5138
|
*/
|
|
4780
|
-
|
|
4781
|
-
this.
|
|
5139
|
+
set rounded(rounded) {
|
|
5140
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
5141
|
+
if (rounded) {
|
|
5142
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
5143
|
+
}
|
|
5144
|
+
this._rounded = rounded;
|
|
5145
|
+
}
|
|
5146
|
+
get rounded() {
|
|
5147
|
+
return this._rounded;
|
|
4782
5148
|
}
|
|
4783
5149
|
/**
|
|
4784
|
-
*
|
|
5150
|
+
* Sets the fillMode of the component.
|
|
5151
|
+
*
|
|
5152
|
+
* The possible values are:
|
|
5153
|
+
* * `'flat'`
|
|
5154
|
+
* * `'solid'` (default)
|
|
5155
|
+
* * `'outline'`
|
|
5156
|
+
* * `null`
|
|
5157
|
+
*
|
|
4785
5158
|
*/
|
|
4786
|
-
|
|
4787
|
-
this.
|
|
4788
|
-
if (
|
|
4789
|
-
this.
|
|
4790
|
-
if (hasObservers(this.onFocus)) {
|
|
4791
|
-
this._zone.run(() => {
|
|
4792
|
-
this.onFocus.emit();
|
|
4793
|
-
});
|
|
4794
|
-
}
|
|
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));
|
|
4795
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 id() {
|
|
5221
|
+
return this.focusableId;
|
|
5222
|
+
}
|
|
5223
|
+
get dir() {
|
|
5224
|
+
return this.direction;
|
|
5225
|
+
}
|
|
5226
|
+
get hostTabIndex() {
|
|
5227
|
+
return this.widgetTabIndex;
|
|
5228
|
+
}
|
|
5229
|
+
get isReadonly() {
|
|
5230
|
+
return this.readonly;
|
|
5231
|
+
}
|
|
5232
|
+
get isAriaExpanded() {
|
|
5233
|
+
return this.ariaExpanded;
|
|
5234
|
+
}
|
|
5235
|
+
get hostAriaOwns() {
|
|
5236
|
+
return this.ariaOwns;
|
|
5237
|
+
}
|
|
5238
|
+
get hostAriaActivedescendant() {
|
|
5239
|
+
return this.ariaActivedescendant;
|
|
5240
|
+
}
|
|
5241
|
+
get hostNoDataLabel() {
|
|
5242
|
+
return this.noDataLabel;
|
|
4796
5243
|
}
|
|
4797
5244
|
/**
|
|
4798
5245
|
* @hidden
|
|
@@ -4854,29 +5301,15 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
4854
5301
|
this.focus();
|
|
4855
5302
|
this.togglePopup(!this.isOpen);
|
|
4856
5303
|
}
|
|
4857
|
-
/**
|
|
4858
|
-
* @hidden
|
|
4859
|
-
*/
|
|
4860
|
-
onResize() {
|
|
4861
|
-
if (this._open) {
|
|
4862
|
-
const popupWrapper = this.popupRef.popupElement;
|
|
4863
|
-
const { min, max } = this.width;
|
|
4864
|
-
popupWrapper.style.minWidth = min;
|
|
4865
|
-
popupWrapper.style.width = max;
|
|
4866
|
-
}
|
|
4867
|
-
}
|
|
4868
|
-
get dir() {
|
|
4869
|
-
return this.direction;
|
|
4870
|
-
}
|
|
4871
5304
|
set isFocused(isFocused) {
|
|
4872
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-
|
|
5305
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
4873
5306
|
this._isFocused = isFocused;
|
|
4874
5307
|
}
|
|
4875
5308
|
get isFocused() {
|
|
4876
5309
|
return this._isFocused;
|
|
4877
5310
|
}
|
|
4878
5311
|
ngOnInit() {
|
|
4879
|
-
this.renderer.removeAttribute(this.
|
|
5312
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, "tabindex");
|
|
4880
5313
|
this.localizationChangesSubscription = this.localization
|
|
4881
5314
|
.changes.subscribe(({ rtl }) => {
|
|
4882
5315
|
this.direction = rtl ? 'rtl' : 'ltr';
|
|
@@ -4884,6 +5317,7 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
4884
5317
|
});
|
|
4885
5318
|
this.setMessages();
|
|
4886
5319
|
this.assignAriaDescribedBy();
|
|
5320
|
+
this.setComponentClasses();
|
|
4887
5321
|
}
|
|
4888
5322
|
/**
|
|
4889
5323
|
* @hidden
|
|
@@ -5056,6 +5490,24 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
5056
5490
|
get buttonClasses() {
|
|
5057
5491
|
return this.loading ? 'k-i-loading' : this.iconClass || 'k-i-arrow-s';
|
|
5058
5492
|
}
|
|
5493
|
+
/**
|
|
5494
|
+
* @hidden
|
|
5495
|
+
*/
|
|
5496
|
+
get selectButtonClasses() {
|
|
5497
|
+
return `${this.size ? getSizeClass('button', this.size) : ''} ${this.fillMode ? 'k-button-' + this.fillMode : ''} ${this.fillMode ? 'k-button-' + this.fillMode + '-base' : ''}`;
|
|
5498
|
+
}
|
|
5499
|
+
/**
|
|
5500
|
+
* @hidden
|
|
5501
|
+
*/
|
|
5502
|
+
get filterInputClasses() {
|
|
5503
|
+
return `${this.size ? getSizeClass('input', this.size) : ''} ${this.fillMode ? 'k-input-' + this.fillMode : ''} ${this.rounded ? getRoundedClass(this.rounded) : ''}`;
|
|
5504
|
+
}
|
|
5505
|
+
/**
|
|
5506
|
+
* @hidden
|
|
5507
|
+
*/
|
|
5508
|
+
get optionLabelSizeClass() {
|
|
5509
|
+
return `${this.size ? getSizeClass('list', this.size) : ''}`;
|
|
5510
|
+
}
|
|
5059
5511
|
/**
|
|
5060
5512
|
* @hidden
|
|
5061
5513
|
*/
|
|
@@ -5190,13 +5642,13 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
5190
5642
|
.subscribe(this.handleEnter.bind(this));
|
|
5191
5643
|
this.escSubscription = this.navigationService.esc
|
|
5192
5644
|
.subscribe(this.handleEscape.bind(this));
|
|
5193
|
-
this.filterBlurredSubscription = this.filterBlurred.pipe(concatMap(() => interval(10).pipe(take(1), takeUntil(this.
|
|
5645
|
+
this.filterBlurredSubscription = this.filterBlurred.pipe(concatMap(() => interval(10).pipe(take(1), takeUntil(this.hostElementFocused))))
|
|
5194
5646
|
.subscribe(() => {
|
|
5195
|
-
this.
|
|
5647
|
+
this.hostElementBlurred.emit();
|
|
5196
5648
|
});
|
|
5197
5649
|
this._zone.runOutsideAngular(() => {
|
|
5198
5650
|
this.componentBlurredSubscription =
|
|
5199
|
-
merge(this.
|
|
5651
|
+
merge(this.hostElementBlurred.pipe(concatMap(() => interval(10).pipe(take(1), takeUntil(this.filterFocused)))), this.navigationService.tab).pipe(tap(event => event instanceof NavigationEvent && this.focus()), filter(() => this.isFocused))
|
|
5200
5652
|
.subscribe(() => this.componentBlur());
|
|
5201
5653
|
});
|
|
5202
5654
|
}
|
|
@@ -5208,7 +5660,7 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
5208
5660
|
// Roll up DropDownList on iOS when tapped outside
|
|
5209
5661
|
this.touchstartDisposeHandler = this.renderer.listen(document, 'touchstart', (e) => {
|
|
5210
5662
|
const target = e.target;
|
|
5211
|
-
if (this.isFocused && !inDropDown(this.
|
|
5663
|
+
if (this.isFocused && !inDropDown(this.wrapper, target, this.popupRef)) {
|
|
5212
5664
|
this._zone.run(() => {
|
|
5213
5665
|
if (this.filterFocused) {
|
|
5214
5666
|
// Close popup if filter is focused
|
|
@@ -5219,6 +5671,24 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
5219
5671
|
}
|
|
5220
5672
|
}));
|
|
5221
5673
|
}
|
|
5674
|
+
subscribeFocusEvents() {
|
|
5675
|
+
if (isDocumentAvailable()) {
|
|
5676
|
+
this.focusComponent = this.focusComponent.bind(this);
|
|
5677
|
+
this.blurComponent = this.blurComponent.bind(this);
|
|
5678
|
+
this._zone.runOutsideAngular(() => {
|
|
5679
|
+
const useCapture = true;
|
|
5680
|
+
document.addEventListener('focus', this.focusComponent, useCapture);
|
|
5681
|
+
document.addEventListener('blur', this.blurComponent, useCapture);
|
|
5682
|
+
});
|
|
5683
|
+
}
|
|
5684
|
+
}
|
|
5685
|
+
unSubscribeFocusEvents() {
|
|
5686
|
+
if (isDocumentAvailable()) {
|
|
5687
|
+
const useCapture = true;
|
|
5688
|
+
document.removeEventListener('focus', this.focusComponent, useCapture);
|
|
5689
|
+
document.removeEventListener('blur', this.blurComponent, useCapture);
|
|
5690
|
+
}
|
|
5691
|
+
}
|
|
5222
5692
|
unsubscribeEvents() {
|
|
5223
5693
|
if (!isDocumentAvailable()) {
|
|
5224
5694
|
return;
|
|
@@ -5230,6 +5700,7 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
5230
5700
|
this.escSubscription.unsubscribe();
|
|
5231
5701
|
this.componentBlurredSubscription.unsubscribe();
|
|
5232
5702
|
this.filterBlurredSubscription.unsubscribe();
|
|
5703
|
+
this.unSubscribeFocusEvents();
|
|
5233
5704
|
if (this.touchstartDisposeHandler) {
|
|
5234
5705
|
this.touchstartDisposeHandler();
|
|
5235
5706
|
}
|
|
@@ -5321,7 +5792,7 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
5321
5792
|
hasObservers(this.close) ||
|
|
5322
5793
|
hasObservers(this.onBlur) ||
|
|
5323
5794
|
hasObservers(this.filterChange) ||
|
|
5324
|
-
isUntouched(this.
|
|
5795
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
5325
5796
|
this._zone.run(() => {
|
|
5326
5797
|
if (valueHasChanged) {
|
|
5327
5798
|
this.selectionService.change(this.selectionService.selected[0]);
|
|
@@ -5501,6 +5972,17 @@ let DropDownListComponent = DropDownListComponent_1 = class DropDownListComponen
|
|
|
5501
5972
|
const newValue = `${this.valueLabelId} ${trimmed}`.trim();
|
|
5502
5973
|
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-describedby', newValue);
|
|
5503
5974
|
}
|
|
5975
|
+
setComponentClasses() {
|
|
5976
|
+
if (this.size) {
|
|
5977
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker', this.size));
|
|
5978
|
+
}
|
|
5979
|
+
if (this.rounded) {
|
|
5980
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
5981
|
+
}
|
|
5982
|
+
if (this.fillMode) {
|
|
5983
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker', this.fillMode));
|
|
5984
|
+
}
|
|
5985
|
+
}
|
|
5504
5986
|
};
|
|
5505
5987
|
__decorate([
|
|
5506
5988
|
Input(),
|
|
@@ -5589,6 +6071,21 @@ __decorate([
|
|
|
5589
6071
|
__metadata("design:type", Number),
|
|
5590
6072
|
__metadata("design:paramtypes", [Number])
|
|
5591
6073
|
], DropDownListComponent.prototype, "tabIndex", null);
|
|
6074
|
+
__decorate([
|
|
6075
|
+
Input(),
|
|
6076
|
+
__metadata("design:type", String),
|
|
6077
|
+
__metadata("design:paramtypes", [String])
|
|
6078
|
+
], DropDownListComponent.prototype, "size", null);
|
|
6079
|
+
__decorate([
|
|
6080
|
+
Input(),
|
|
6081
|
+
__metadata("design:type", String),
|
|
6082
|
+
__metadata("design:paramtypes", [String])
|
|
6083
|
+
], DropDownListComponent.prototype, "rounded", null);
|
|
6084
|
+
__decorate([
|
|
6085
|
+
Input(),
|
|
6086
|
+
__metadata("design:type", String),
|
|
6087
|
+
__metadata("design:paramtypes", [String])
|
|
6088
|
+
], DropDownListComponent.prototype, "fillMode", null);
|
|
5592
6089
|
__decorate([
|
|
5593
6090
|
Output(),
|
|
5594
6091
|
__metadata("design:type", EventEmitter)
|
|
@@ -5661,24 +6158,90 @@ __decorate([
|
|
|
5661
6158
|
ViewChild('popupTemplate', { static: true }),
|
|
5662
6159
|
__metadata("design:type", TemplateRef)
|
|
5663
6160
|
], DropDownListComponent.prototype, "popupTemplate", void 0);
|
|
5664
|
-
__decorate([
|
|
5665
|
-
ViewChild('wrapper', { static: true }),
|
|
5666
|
-
__metadata("design:type", ElementRef)
|
|
5667
|
-
], DropDownListComponent.prototype, "wrapper", void 0);
|
|
5668
6161
|
__decorate([
|
|
5669
6162
|
ViewChild('optionsList', { static: false }),
|
|
5670
6163
|
__metadata("design:type", ListComponent)
|
|
5671
6164
|
], DropDownListComponent.prototype, "optionsList", void 0);
|
|
5672
6165
|
__decorate([
|
|
5673
|
-
HostBinding('class.k-
|
|
5674
|
-
HostBinding('class.k-
|
|
6166
|
+
HostBinding('class.k-dropdownlist'),
|
|
6167
|
+
HostBinding('class.k-picker'),
|
|
5675
6168
|
__metadata("design:type", Boolean)
|
|
5676
|
-
], DropDownListComponent.prototype, "
|
|
6169
|
+
], DropDownListComponent.prototype, "hostClasses", void 0);
|
|
6170
|
+
__decorate([
|
|
6171
|
+
HostBinding('class.k-disabled'),
|
|
6172
|
+
HostBinding('attr.aria-disabled'),
|
|
6173
|
+
__metadata("design:type", Boolean),
|
|
6174
|
+
__metadata("design:paramtypes", [])
|
|
6175
|
+
], DropDownListComponent.prototype, "isDisabled", null);
|
|
6176
|
+
__decorate([
|
|
6177
|
+
HostBinding('class.k-loading'),
|
|
6178
|
+
__metadata("design:type", Boolean),
|
|
6179
|
+
__metadata("design:paramtypes", [])
|
|
6180
|
+
], DropDownListComponent.prototype, "isLoading", null);
|
|
6181
|
+
__decorate([
|
|
6182
|
+
HostBinding('attr.id'),
|
|
6183
|
+
__metadata("design:type", String),
|
|
6184
|
+
__metadata("design:paramtypes", [])
|
|
6185
|
+
], DropDownListComponent.prototype, "id", null);
|
|
5677
6186
|
__decorate([
|
|
5678
6187
|
HostBinding('attr.dir'),
|
|
5679
6188
|
__metadata("design:type", String),
|
|
5680
6189
|
__metadata("design:paramtypes", [])
|
|
5681
6190
|
], DropDownListComponent.prototype, "dir", null);
|
|
6191
|
+
__decorate([
|
|
6192
|
+
HostBinding('attr.tabindex'),
|
|
6193
|
+
__metadata("design:type", Number),
|
|
6194
|
+
__metadata("design:paramtypes", [])
|
|
6195
|
+
], DropDownListComponent.prototype, "hostTabIndex", null);
|
|
6196
|
+
__decorate([
|
|
6197
|
+
HostBinding('attr.readonly'),
|
|
6198
|
+
HostBinding('attr.aria-readonly'),
|
|
6199
|
+
__metadata("design:type", Boolean),
|
|
6200
|
+
__metadata("design:paramtypes", [])
|
|
6201
|
+
], DropDownListComponent.prototype, "isReadonly", null);
|
|
6202
|
+
__decorate([
|
|
6203
|
+
HostBinding('attr.role'),
|
|
6204
|
+
HostBinding('attr.aria-haspopup'),
|
|
6205
|
+
__metadata("design:type", String)
|
|
6206
|
+
], DropDownListComponent.prototype, "role", void 0);
|
|
6207
|
+
__decorate([
|
|
6208
|
+
HostBinding('attr.aria-expanded'),
|
|
6209
|
+
__metadata("design:type", Boolean),
|
|
6210
|
+
__metadata("design:paramtypes", [])
|
|
6211
|
+
], DropDownListComponent.prototype, "isAriaExpanded", null);
|
|
6212
|
+
__decorate([
|
|
6213
|
+
HostBinding('attr.aria-owns'),
|
|
6214
|
+
__metadata("design:type", String),
|
|
6215
|
+
__metadata("design:paramtypes", [])
|
|
6216
|
+
], DropDownListComponent.prototype, "hostAriaOwns", null);
|
|
6217
|
+
__decorate([
|
|
6218
|
+
HostBinding('attr.aria-activedescendant'),
|
|
6219
|
+
__metadata("design:type", String),
|
|
6220
|
+
__metadata("design:paramtypes", [])
|
|
6221
|
+
], DropDownListComponent.prototype, "hostAriaActivedescendant", null);
|
|
6222
|
+
__decorate([
|
|
6223
|
+
HostBinding('attr.aria-label'),
|
|
6224
|
+
__metadata("design:type", String),
|
|
6225
|
+
__metadata("design:paramtypes", [])
|
|
6226
|
+
], DropDownListComponent.prototype, "hostNoDataLabel", null);
|
|
6227
|
+
__decorate([
|
|
6228
|
+
HostListener('keydown', ['$event']),
|
|
6229
|
+
__metadata("design:type", Function),
|
|
6230
|
+
__metadata("design:paramtypes", [Object]),
|
|
6231
|
+
__metadata("design:returntype", void 0)
|
|
6232
|
+
], DropDownListComponent.prototype, "keydown", null);
|
|
6233
|
+
__decorate([
|
|
6234
|
+
HostListener('keypress', ['$event']),
|
|
6235
|
+
__metadata("design:type", Function),
|
|
6236
|
+
__metadata("design:paramtypes", [Object]),
|
|
6237
|
+
__metadata("design:returntype", void 0)
|
|
6238
|
+
], DropDownListComponent.prototype, "keypress", null);
|
|
6239
|
+
__decorate([
|
|
6240
|
+
HostListener('click', ['$event']),
|
|
6241
|
+
__metadata("design:type", Function),
|
|
6242
|
+
__metadata("design:paramtypes", [MouseEvent]),
|
|
6243
|
+
__metadata("design:returntype", void 0)
|
|
6244
|
+
], DropDownListComponent.prototype, "click", null);
|
|
5682
6245
|
DropDownListComponent = DropDownListComponent_1 = __decorate([
|
|
5683
6246
|
Component({
|
|
5684
6247
|
exportAs: 'kendoDropDownList',
|
|
@@ -5707,128 +6270,128 @@ DropDownListComponent = DropDownListComponent_1 = __decorate([
|
|
|
5707
6270
|
noDataText="NO DATA FOUND"
|
|
5708
6271
|
>
|
|
5709
6272
|
</ng-container>
|
|
5710
|
-
<span
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
(click)="click($event)"
|
|
5730
|
-
[kendoEventsOutsideAngular]="{
|
|
5731
|
-
focus: focusComponent,
|
|
5732
|
-
blur: blurComponent
|
|
6273
|
+
<span class="k-input-inner" unselectable="on" [id]="valueLabelId">
|
|
6274
|
+
<span class="k-input-value-text">
|
|
6275
|
+
<ng-template *ngIf="valueTemplate"
|
|
6276
|
+
[templateContext]="{
|
|
6277
|
+
templateRef: valueTemplate.templateRef,
|
|
6278
|
+
$implicit: dataItem
|
|
6279
|
+
}">
|
|
6280
|
+
</ng-template>
|
|
6281
|
+
<ng-template [ngIf]="!valueTemplate">{{ getText() }}</ng-template>
|
|
6282
|
+
</span>
|
|
6283
|
+
</span>
|
|
6284
|
+
<button
|
|
6285
|
+
tabindex="-1"
|
|
6286
|
+
unselectable="on"
|
|
6287
|
+
type="button"
|
|
6288
|
+
class="k-input-button k-button k-icon-button"
|
|
6289
|
+
[ngClass]="selectButtonClasses"
|
|
6290
|
+
[kendoEventsOutsideAngular]="{
|
|
6291
|
+
mousedown: onMouseDown
|
|
5733
6292
|
}"
|
|
5734
|
-
[scope]="this"
|
|
5735
6293
|
>
|
|
5736
|
-
<span
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
</span>
|
|
5745
|
-
<span class="k-select" unselectable="on">
|
|
5746
|
-
<span
|
|
5747
|
-
class="k-icon"
|
|
5748
|
-
unselectable="on"
|
|
5749
|
-
[ngClass]="buttonClasses"
|
|
5750
|
-
>
|
|
5751
|
-
</span>
|
|
5752
|
-
</span>
|
|
5753
|
-
<ng-template #popupTemplate>
|
|
5754
|
-
<!--filterable-->
|
|
6294
|
+
<span
|
|
6295
|
+
class="k-button-icon k-icon"
|
|
6296
|
+
unselectable="on"
|
|
6297
|
+
[ngClass]="buttonClasses"
|
|
6298
|
+
></span>
|
|
6299
|
+
</button>
|
|
6300
|
+
<ng-template #popupTemplate>
|
|
6301
|
+
<!--filterable-->
|
|
5755
6302
|
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
</div>
|
|
5779
|
-
</ng-template>
|
|
5780
|
-
<ng-template [ngIf]="defaultItem && itemTemplate">
|
|
5781
|
-
<div class="k-list-optionlabel" [ngClass]="{ 'k-state-disabled': isDisabledDefaultItem }" kendoDropDownsSelectable [index]="-1">
|
|
5782
|
-
<ng-template
|
|
5783
|
-
[templateContext]="{
|
|
5784
|
-
templateRef: itemTemplate.templateRef,
|
|
5785
|
-
$implicit: defaultItem
|
|
5786
|
-
}">
|
|
5787
|
-
</ng-template>
|
|
5788
|
-
</div>
|
|
5789
|
-
</ng-template>
|
|
5790
|
-
<!--header template-->
|
|
5791
|
-
<ng-template *ngIf="headerTemplate"
|
|
5792
|
-
[templateContext]="{
|
|
5793
|
-
templateRef: headerTemplate.templateRef
|
|
5794
|
-
}">
|
|
5795
|
-
</ng-template>
|
|
5796
|
-
<!--list-->
|
|
5797
|
-
<kendo-list
|
|
5798
|
-
#optionsList
|
|
5799
|
-
[id]="listBoxId"
|
|
5800
|
-
[optionPrefix]="optionPrefix"
|
|
5801
|
-
[data]="data"
|
|
5802
|
-
[textField]="textField"
|
|
5803
|
-
[valueField]="valueField"
|
|
5804
|
-
[template]="itemTemplate"
|
|
5805
|
-
[groupTemplate]="groupTemplate"
|
|
5806
|
-
[fixedGroupTemplate]="fixedGroupTemplate"
|
|
5807
|
-
[height]="listHeight"
|
|
5808
|
-
[show]="isOpen"
|
|
5809
|
-
[virtual]="virtual"
|
|
5810
|
-
(pageChange)="pageChange($event)"
|
|
5811
|
-
>
|
|
5812
|
-
</kendo-list>
|
|
5813
|
-
<!--no-data template-->
|
|
5814
|
-
<div class="k-nodata" *ngIf="data.length === 0">
|
|
5815
|
-
<ng-template [ngIf]="noDataTemplate"
|
|
5816
|
-
[templateContext]="{
|
|
5817
|
-
templateRef: noDataTemplate ? noDataTemplate.templateRef : undefined
|
|
5818
|
-
}">
|
|
5819
|
-
</ng-template>
|
|
5820
|
-
<ng-template [ngIf]="!noDataTemplate">
|
|
5821
|
-
<div>{{ noDataText }}</div>
|
|
5822
|
-
</ng-template>
|
|
5823
|
-
</div>
|
|
5824
|
-
<!--footer template-->
|
|
5825
|
-
<ng-template *ngIf="footerTemplate"
|
|
5826
|
-
[templateContext]="{
|
|
5827
|
-
templateRef: footerTemplate.templateRef
|
|
5828
|
-
}">
|
|
5829
|
-
</ng-template>
|
|
6303
|
+
<ng-template [ngIf]="filterable">
|
|
6304
|
+
<div class="k-list-filter" (click)="$event.stopImmediatePropagation()">
|
|
6305
|
+
<span
|
|
6306
|
+
class="k-searchbox k-input"
|
|
6307
|
+
[ngClass]="filterInputClasses"
|
|
6308
|
+
>
|
|
6309
|
+
<span class="k-input-icon k-icon k-i-search" unselectable="on"></span>
|
|
6310
|
+
<input
|
|
6311
|
+
[attr.aria-owns]="ariaOwns"
|
|
6312
|
+
[attr.aria-activedescendant]="ariaActivedescendant"
|
|
6313
|
+
[attr.aria-label]="noDataLabel"
|
|
6314
|
+
tabindex="-1"
|
|
6315
|
+
[filterInput]="isFocused && !touchEnabled"
|
|
6316
|
+
[dir]="direction"
|
|
6317
|
+
[(ngModel)]="filterText"
|
|
6318
|
+
class="k-input-inner"
|
|
6319
|
+
(keydown)="keydown($event)"
|
|
6320
|
+
(input)="handleFilter($event)"
|
|
6321
|
+
(focus)="onFilterFocus()"
|
|
6322
|
+
(blur)="blurFilterInput()" />
|
|
6323
|
+
</span>
|
|
6324
|
+
</div>
|
|
5830
6325
|
</ng-template>
|
|
5831
|
-
|
|
6326
|
+
<!--default item-->
|
|
6327
|
+
<ng-template [ngIf]="defaultItem && !itemTemplate">
|
|
6328
|
+
<div
|
|
6329
|
+
class="k-list"
|
|
6330
|
+
[ngClass]="optionLabelSizeClass"
|
|
6331
|
+
>
|
|
6332
|
+
<div class="k-list-optionlabel k-list-item" [ngClass]="{ 'k-disabled': isDisabledDefaultItem }" kendoDropDownsSelectable [index]="-1">
|
|
6333
|
+
{{ getDefaultItemText() }}
|
|
6334
|
+
</div>
|
|
6335
|
+
</div>
|
|
6336
|
+
</ng-template>
|
|
6337
|
+
<ng-template [ngIf]="defaultItem && itemTemplate">
|
|
6338
|
+
<div
|
|
6339
|
+
class="k-list"
|
|
6340
|
+
[ngClass]="optionLabelSizeClass"
|
|
6341
|
+
>
|
|
6342
|
+
<div class="k-list-optionlabel k-list-item" [ngClass]="{ 'k-disabled': isDisabledDefaultItem }" kendoDropDownsSelectable [index]="-1">
|
|
6343
|
+
<ng-template
|
|
6344
|
+
[templateContext]="{
|
|
6345
|
+
templateRef: itemTemplate.templateRef,
|
|
6346
|
+
$implicit: defaultItem
|
|
6347
|
+
}">
|
|
6348
|
+
</ng-template>
|
|
6349
|
+
</div>
|
|
6350
|
+
</div>
|
|
6351
|
+
</ng-template>
|
|
6352
|
+
<!--header template-->
|
|
6353
|
+
<ng-template *ngIf="headerTemplate"
|
|
6354
|
+
[templateContext]="{
|
|
6355
|
+
templateRef: headerTemplate.templateRef
|
|
6356
|
+
}">
|
|
6357
|
+
</ng-template>
|
|
6358
|
+
<!--list-->
|
|
6359
|
+
<kendo-list
|
|
6360
|
+
#optionsList
|
|
6361
|
+
[size]="size"
|
|
6362
|
+
[rounded]="rounded"
|
|
6363
|
+
[id]="listBoxId"
|
|
6364
|
+
[optionPrefix]="optionPrefix"
|
|
6365
|
+
[data]="data"
|
|
6366
|
+
[textField]="textField"
|
|
6367
|
+
[valueField]="valueField"
|
|
6368
|
+
[template]="itemTemplate"
|
|
6369
|
+
[groupTemplate]="groupTemplate"
|
|
6370
|
+
[fixedGroupTemplate]="fixedGroupTemplate"
|
|
6371
|
+
[height]="listHeight"
|
|
6372
|
+
[show]="isOpen"
|
|
6373
|
+
[virtual]="virtual"
|
|
6374
|
+
(pageChange)="pageChange($event)"
|
|
6375
|
+
>
|
|
6376
|
+
</kendo-list>
|
|
6377
|
+
<!--no-data template-->
|
|
6378
|
+
<div class="k-no-data" *ngIf="data.length === 0">
|
|
6379
|
+
<ng-template [ngIf]="noDataTemplate"
|
|
6380
|
+
[templateContext]="{
|
|
6381
|
+
templateRef: noDataTemplate ? noDataTemplate.templateRef : undefined
|
|
6382
|
+
}">
|
|
6383
|
+
</ng-template>
|
|
6384
|
+
<ng-template [ngIf]="!noDataTemplate">
|
|
6385
|
+
<div>{{ noDataText }}</div>
|
|
6386
|
+
</ng-template>
|
|
6387
|
+
</div>
|
|
6388
|
+
<!--footer template-->
|
|
6389
|
+
<ng-template *ngIf="footerTemplate"
|
|
6390
|
+
[templateContext]="{
|
|
6391
|
+
templateRef: footerTemplate.templateRef
|
|
6392
|
+
}">
|
|
6393
|
+
</ng-template>
|
|
6394
|
+
</ng-template>
|
|
5832
6395
|
<ng-template [ngIf]="isOpen">
|
|
5833
6396
|
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
5834
6397
|
</ng-template>
|
|
@@ -5836,7 +6399,8 @@ DropDownListComponent = DropDownListComponent_1 = __decorate([
|
|
|
5836
6399
|
`
|
|
5837
6400
|
}),
|
|
5838
6401
|
__param(10, Optional()), __param(10, Inject(TOUCH_ENABLED)),
|
|
5839
|
-
__metadata("design:paramtypes", [
|
|
6402
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
6403
|
+
LocalizationService,
|
|
5840
6404
|
PopupService,
|
|
5841
6405
|
SelectionService,
|
|
5842
6406
|
NavigationService,
|
|
@@ -5844,7 +6408,6 @@ DropDownListComponent = DropDownListComponent_1 = __decorate([
|
|
|
5844
6408
|
DataService,
|
|
5845
6409
|
NgZone,
|
|
5846
6410
|
Renderer2,
|
|
5847
|
-
ElementRef,
|
|
5848
6411
|
ChangeDetectorRef, Boolean])
|
|
5849
6412
|
], DropDownListComponent);
|
|
5850
6413
|
|
|
@@ -6014,7 +6577,8 @@ const MULTISELECT_VALUE_ACCESSOR = {
|
|
|
6014
6577
|
* ```
|
|
6015
6578
|
*/
|
|
6016
6579
|
let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
6017
|
-
constructor(localization, popupService, dataService, selectionService, navigationService, disabledItemsService, cdr, differs, renderer,
|
|
6580
|
+
constructor(wrapper, localization, popupService, dataService, selectionService, navigationService, disabledItemsService, cdr, differs, renderer, _zone, touchEnabled$$1) {
|
|
6581
|
+
this.wrapper = wrapper;
|
|
6018
6582
|
this.localization = localization;
|
|
6019
6583
|
this.popupService = popupService;
|
|
6020
6584
|
this.dataService = dataService;
|
|
@@ -6024,7 +6588,6 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6024
6588
|
this.cdr = cdr;
|
|
6025
6589
|
this.differs = differs;
|
|
6026
6590
|
this.renderer = renderer;
|
|
6027
|
-
this.hostElement = hostElement;
|
|
6028
6591
|
this._zone = _zone;
|
|
6029
6592
|
this.touchEnabled = touchEnabled$$1;
|
|
6030
6593
|
this.listBoxId = guid$1();
|
|
@@ -6185,8 +6748,11 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6185
6748
|
* This event is preventable. If you cancel it, the tag will not be removed.
|
|
6186
6749
|
*/
|
|
6187
6750
|
this.removeTag = new EventEmitter();
|
|
6188
|
-
this.
|
|
6751
|
+
this.hostClasses = true;
|
|
6189
6752
|
this.initialized = false;
|
|
6753
|
+
this._size = 'medium';
|
|
6754
|
+
this._rounded = 'medium';
|
|
6755
|
+
this._fillMode = 'solid';
|
|
6190
6756
|
this.onChangeCallback = (_) => { };
|
|
6191
6757
|
this.onTouchedCallback = (_) => { };
|
|
6192
6758
|
this._placeholder = '';
|
|
@@ -6260,7 +6826,7 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6260
6826
|
if (hasObservers(this.onBlur) ||
|
|
6261
6827
|
hasObservers(this.filterChange) ||
|
|
6262
6828
|
hasObservers(this.close) ||
|
|
6263
|
-
isUntouched(this.
|
|
6829
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
6264
6830
|
this._zone.run(() => {
|
|
6265
6831
|
this.closePopup();
|
|
6266
6832
|
if (!(this.isOpen && this.allowCustom)) {
|
|
@@ -6277,22 +6843,6 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6277
6843
|
this.closePopup();
|
|
6278
6844
|
}
|
|
6279
6845
|
}
|
|
6280
|
-
/**
|
|
6281
|
-
* @hidden
|
|
6282
|
-
*/
|
|
6283
|
-
wrapperMousedown(event) {
|
|
6284
|
-
const inputElement = this.searchbar.input.nativeElement;
|
|
6285
|
-
if (event.button === 0) {
|
|
6286
|
-
if (this.isFocused && this.isOpen && event.target === inputElement) {
|
|
6287
|
-
return;
|
|
6288
|
-
}
|
|
6289
|
-
if (!this.touchEnabled || (this.touchEnabled && event.target.tagName !== 'SPAN')) {
|
|
6290
|
-
this.searchbar.focus();
|
|
6291
|
-
}
|
|
6292
|
-
this.togglePopup(!this.isOpen);
|
|
6293
|
-
event.preventDefault();
|
|
6294
|
-
}
|
|
6295
|
-
}
|
|
6296
6846
|
/**
|
|
6297
6847
|
* @hidden
|
|
6298
6848
|
*/
|
|
@@ -6371,22 +6921,83 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6371
6921
|
return this.tabindex;
|
|
6372
6922
|
}
|
|
6373
6923
|
/**
|
|
6374
|
-
*
|
|
6375
|
-
*
|
|
6924
|
+
* Sets the size of the component.
|
|
6925
|
+
*
|
|
6926
|
+
* The possible values are:
|
|
6927
|
+
* * `'small'`
|
|
6928
|
+
* * `'medium'` (default)
|
|
6929
|
+
* * `'large'`
|
|
6930
|
+
* * `null`
|
|
6931
|
+
*
|
|
6376
6932
|
*/
|
|
6377
|
-
set
|
|
6378
|
-
this.
|
|
6933
|
+
set size(size) {
|
|
6934
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
6935
|
+
if (size) {
|
|
6936
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
6937
|
+
}
|
|
6938
|
+
this._size = size;
|
|
6379
6939
|
}
|
|
6380
|
-
get
|
|
6381
|
-
return this.
|
|
6940
|
+
get size() {
|
|
6941
|
+
return this._size;
|
|
6382
6942
|
}
|
|
6383
6943
|
/**
|
|
6384
|
-
*
|
|
6385
|
-
*
|
|
6944
|
+
* Sets the border radius of the component.
|
|
6945
|
+
*
|
|
6946
|
+
* The possible values are:
|
|
6947
|
+
* * `'small'`
|
|
6948
|
+
* * `'medium'` (default)
|
|
6949
|
+
* * `'large'`
|
|
6950
|
+
* * `'full'`
|
|
6951
|
+
* * `null`
|
|
6952
|
+
*
|
|
6386
6953
|
*/
|
|
6387
|
-
set
|
|
6388
|
-
|
|
6389
|
-
|
|
6954
|
+
set rounded(rounded) {
|
|
6955
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
6956
|
+
if (rounded) {
|
|
6957
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
6958
|
+
}
|
|
6959
|
+
this._rounded = rounded;
|
|
6960
|
+
}
|
|
6961
|
+
get rounded() {
|
|
6962
|
+
return this._rounded;
|
|
6963
|
+
}
|
|
6964
|
+
/**
|
|
6965
|
+
* Sets the fillMode of the component.
|
|
6966
|
+
*
|
|
6967
|
+
* The possible values are:
|
|
6968
|
+
* * `'flat'`
|
|
6969
|
+
* * `'solid'` (default)
|
|
6970
|
+
* * `'outline'`
|
|
6971
|
+
* * `null`
|
|
6972
|
+
*
|
|
6973
|
+
*/
|
|
6974
|
+
set fillMode(fillMode) {
|
|
6975
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
6976
|
+
if (fillMode) {
|
|
6977
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
6978
|
+
}
|
|
6979
|
+
this._fillMode = fillMode;
|
|
6980
|
+
}
|
|
6981
|
+
get fillMode() {
|
|
6982
|
+
return this._fillMode;
|
|
6983
|
+
}
|
|
6984
|
+
/**
|
|
6985
|
+
* The hint which is displayed when the component is empty.
|
|
6986
|
+
* When the values are selected, it disappears.
|
|
6987
|
+
*/
|
|
6988
|
+
set placeholder(text) {
|
|
6989
|
+
this._placeholder = text || '';
|
|
6990
|
+
}
|
|
6991
|
+
get placeholder() {
|
|
6992
|
+
return this.selectedDataItems.length ? '' : this._placeholder;
|
|
6993
|
+
}
|
|
6994
|
+
/**
|
|
6995
|
+
* Defines a Boolean function that is executed for each data item in the component
|
|
6996
|
+
* ([see examples]({% slug disableditems_multiselect %})). Determines whether the item will be disabled.
|
|
6997
|
+
*/
|
|
6998
|
+
set itemDisabled(fn) {
|
|
6999
|
+
if (typeof fn !== 'function') {
|
|
7000
|
+
throw new Error(`itemDisabled must be a function, but received ${JSON.stringify(fn)}.`);
|
|
6390
7001
|
}
|
|
6391
7002
|
this.disabledItemsService.itemDisabled = fn;
|
|
6392
7003
|
}
|
|
@@ -6444,6 +7055,25 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6444
7055
|
get disabledClass() {
|
|
6445
7056
|
return this.disabled;
|
|
6446
7057
|
}
|
|
7058
|
+
get isLoading() {
|
|
7059
|
+
return this.loading;
|
|
7060
|
+
}
|
|
7061
|
+
/**
|
|
7062
|
+
* @hidden
|
|
7063
|
+
*/
|
|
7064
|
+
hostMousedown(event) {
|
|
7065
|
+
const inputElement = this.searchbar.input.nativeElement;
|
|
7066
|
+
if (event.button === 0) {
|
|
7067
|
+
if (this.isFocused && this.isOpen && event.target === inputElement) {
|
|
7068
|
+
return;
|
|
7069
|
+
}
|
|
7070
|
+
if (!this.touchEnabled || (this.touchEnabled && event.target.tagName !== 'SPAN')) {
|
|
7071
|
+
this.searchbar.focus();
|
|
7072
|
+
}
|
|
7073
|
+
this.togglePopup(!this.isOpen);
|
|
7074
|
+
event.preventDefault();
|
|
7075
|
+
}
|
|
7076
|
+
}
|
|
6447
7077
|
get listContainerClasses() {
|
|
6448
7078
|
const containerClasses = ['k-list-container', 'k-reset'];
|
|
6449
7079
|
if (this.popupSettings.popupClass) {
|
|
@@ -6451,6 +7081,12 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6451
7081
|
}
|
|
6452
7082
|
return containerClasses;
|
|
6453
7083
|
}
|
|
7084
|
+
/**
|
|
7085
|
+
* @hidden
|
|
7086
|
+
*/
|
|
7087
|
+
get customItemSizeClass() {
|
|
7088
|
+
return `${this.size ? getSizeClass('list', this.size) : ''}`;
|
|
7089
|
+
}
|
|
6454
7090
|
get width() {
|
|
6455
7091
|
let wrapperOffsetWidth = 0;
|
|
6456
7092
|
if (isDocumentAvailable()) {
|
|
@@ -6695,7 +7331,7 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6695
7331
|
this.valueChangeDetected = false;
|
|
6696
7332
|
}
|
|
6697
7333
|
ngOnInit() {
|
|
6698
|
-
this.renderer.removeAttribute(this.
|
|
7334
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, "tabindex");
|
|
6699
7335
|
this.createCustomValueStream();
|
|
6700
7336
|
this.localizationChangeSubscription = this.localization
|
|
6701
7337
|
.changes.subscribe(({ rtl }) => {
|
|
@@ -6704,6 +7340,7 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6704
7340
|
});
|
|
6705
7341
|
this.setMessages();
|
|
6706
7342
|
this.setState(this.value);
|
|
7343
|
+
this.setComponentClasses();
|
|
6707
7344
|
this.initialized = true;
|
|
6708
7345
|
}
|
|
6709
7346
|
ngOnChanges(changes) {
|
|
@@ -6791,7 +7428,7 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6791
7428
|
this.cdr.markForCheck();
|
|
6792
7429
|
}
|
|
6793
7430
|
set isFocused(isFocused) {
|
|
6794
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.
|
|
7431
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
6795
7432
|
this._isFocused = isFocused;
|
|
6796
7433
|
}
|
|
6797
7434
|
get isFocused() {
|
|
@@ -6828,7 +7465,7 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
6828
7465
|
// Roll up MultiSelect on iOS when tapped outside
|
|
6829
7466
|
this.touchstartDisposeHandler = this.renderer.listen(document, 'touchstart', (e) => {
|
|
6830
7467
|
const target = e.target;
|
|
6831
|
-
if ((this.isFocused || this.isOpen) && !inDropDown(this.
|
|
7468
|
+
if ((this.isFocused || this.isOpen) && !inDropDown(this.wrapper, target, this.popupRef)) {
|
|
6832
7469
|
this._zone.run(() => {
|
|
6833
7470
|
this.blur();
|
|
6834
7471
|
if (this.isOpen) {
|
|
@@ -7195,6 +7832,17 @@ let MultiSelectComponent = MultiSelectComponent_1 = class MultiSelectComponent {
|
|
|
7195
7832
|
});
|
|
7196
7833
|
});
|
|
7197
7834
|
}
|
|
7835
|
+
setComponentClasses() {
|
|
7836
|
+
if (this.size) {
|
|
7837
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
7838
|
+
}
|
|
7839
|
+
if (this.rounded) {
|
|
7840
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
7841
|
+
}
|
|
7842
|
+
if (this.fillMode) {
|
|
7843
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
7844
|
+
}
|
|
7845
|
+
}
|
|
7198
7846
|
};
|
|
7199
7847
|
__decorate([
|
|
7200
7848
|
Input(),
|
|
@@ -7235,6 +7883,21 @@ __decorate([
|
|
|
7235
7883
|
__metadata("design:type", Number),
|
|
7236
7884
|
__metadata("design:paramtypes", [Number])
|
|
7237
7885
|
], MultiSelectComponent.prototype, "tabIndex", null);
|
|
7886
|
+
__decorate([
|
|
7887
|
+
Input(),
|
|
7888
|
+
__metadata("design:type", String),
|
|
7889
|
+
__metadata("design:paramtypes", [String])
|
|
7890
|
+
], MultiSelectComponent.prototype, "size", null);
|
|
7891
|
+
__decorate([
|
|
7892
|
+
Input(),
|
|
7893
|
+
__metadata("design:type", String),
|
|
7894
|
+
__metadata("design:paramtypes", [String])
|
|
7895
|
+
], MultiSelectComponent.prototype, "rounded", null);
|
|
7896
|
+
__decorate([
|
|
7897
|
+
Input(),
|
|
7898
|
+
__metadata("design:type", String),
|
|
7899
|
+
__metadata("design:paramtypes", [String])
|
|
7900
|
+
], MultiSelectComponent.prototype, "fillMode", null);
|
|
7238
7901
|
__decorate([
|
|
7239
7902
|
Input(),
|
|
7240
7903
|
__metadata("design:type", String),
|
|
@@ -7345,10 +8008,6 @@ __decorate([
|
|
|
7345
8008
|
ViewChild('popupTemplate', { static: true }),
|
|
7346
8009
|
__metadata("design:type", TemplateRef)
|
|
7347
8010
|
], MultiSelectComponent.prototype, "popupTemplate", void 0);
|
|
7348
|
-
__decorate([
|
|
7349
|
-
ViewChild('wrapper', { static: true }),
|
|
7350
|
-
__metadata("design:type", ElementRef)
|
|
7351
|
-
], MultiSelectComponent.prototype, "wrapper", void 0);
|
|
7352
8011
|
__decorate([
|
|
7353
8012
|
ViewChild('optionsList', { static: false }),
|
|
7354
8013
|
__metadata("design:type", ListComponent)
|
|
@@ -7390,20 +8049,31 @@ __decorate([
|
|
|
7390
8049
|
__metadata("design:type", NoDataTemplateDirective)
|
|
7391
8050
|
], MultiSelectComponent.prototype, "noDataTemplate", void 0);
|
|
7392
8051
|
__decorate([
|
|
7393
|
-
HostBinding('class.k-widget'),
|
|
7394
8052
|
HostBinding('class.k-multiselect'),
|
|
8053
|
+
HostBinding('class.k-input'),
|
|
7395
8054
|
__metadata("design:type", Boolean)
|
|
7396
|
-
], MultiSelectComponent.prototype, "
|
|
8055
|
+
], MultiSelectComponent.prototype, "hostClasses", void 0);
|
|
7397
8056
|
__decorate([
|
|
7398
8057
|
HostBinding('attr.dir'),
|
|
7399
8058
|
__metadata("design:type", String),
|
|
7400
8059
|
__metadata("design:paramtypes", [])
|
|
7401
8060
|
], MultiSelectComponent.prototype, "dir", null);
|
|
7402
8061
|
__decorate([
|
|
7403
|
-
HostBinding('class.k-
|
|
8062
|
+
HostBinding('class.k-disabled'),
|
|
7404
8063
|
__metadata("design:type", Boolean),
|
|
7405
8064
|
__metadata("design:paramtypes", [])
|
|
7406
8065
|
], MultiSelectComponent.prototype, "disabledClass", null);
|
|
8066
|
+
__decorate([
|
|
8067
|
+
HostBinding('class.k-loading'),
|
|
8068
|
+
__metadata("design:type", Boolean),
|
|
8069
|
+
__metadata("design:paramtypes", [])
|
|
8070
|
+
], MultiSelectComponent.prototype, "isLoading", null);
|
|
8071
|
+
__decorate([
|
|
8072
|
+
HostListener('mousedown', ['$event']),
|
|
8073
|
+
__metadata("design:type", Function),
|
|
8074
|
+
__metadata("design:paramtypes", [Object]),
|
|
8075
|
+
__metadata("design:returntype", void 0)
|
|
8076
|
+
], MultiSelectComponent.prototype, "hostMousedown", null);
|
|
7407
8077
|
MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
7408
8078
|
Component({
|
|
7409
8079
|
exportAs: 'kendoMultiSelect',
|
|
@@ -7435,24 +8105,22 @@ MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
|
7435
8105
|
clearTitle="clear"
|
|
7436
8106
|
>
|
|
7437
8107
|
</ng-container>
|
|
7438
|
-
<
|
|
7439
|
-
|
|
7440
|
-
|
|
8108
|
+
<kendo-taglist
|
|
8109
|
+
[size]="size"
|
|
8110
|
+
[rounded]="rounded"
|
|
8111
|
+
[fillMode]="fillMode"
|
|
8112
|
+
[id]="tagListId"
|
|
8113
|
+
[tags]="tags"
|
|
8114
|
+
[textField]="textField"
|
|
8115
|
+
[valueField]="valueField"
|
|
8116
|
+
[focused]="focusedTagIndex"
|
|
8117
|
+
[disabled]="disabled"
|
|
8118
|
+
[template]="tagTemplate"
|
|
8119
|
+
[groupTemplate]="groupTagTemplate"
|
|
8120
|
+
[tagPrefix]="tagPrefix"
|
|
8121
|
+
[disabledIndices]="disabledIndices"
|
|
8122
|
+
(removeTag)="handleRemoveTag($event)"
|
|
7441
8123
|
>
|
|
7442
|
-
<kendo-taglist
|
|
7443
|
-
[id]="tagListId"
|
|
7444
|
-
[tags]="tags"
|
|
7445
|
-
[textField]="textField"
|
|
7446
|
-
[valueField]="valueField"
|
|
7447
|
-
[focused]="focusedTagIndex"
|
|
7448
|
-
[disabled]="disabled"
|
|
7449
|
-
[template]="tagTemplate"
|
|
7450
|
-
[groupTemplate]="groupTagTemplate"
|
|
7451
|
-
[tagPrefix]="tagPrefix"
|
|
7452
|
-
[disabledIndices]="disabledIndices"
|
|
7453
|
-
(removeTag)="handleRemoveTag($event)"
|
|
7454
|
-
>
|
|
7455
|
-
</kendo-taglist>
|
|
7456
8124
|
<kendo-searchbar
|
|
7457
8125
|
#searchbar
|
|
7458
8126
|
[id]="focusableId"
|
|
@@ -7472,22 +8140,24 @@ MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
|
7472
8140
|
(onFocus)="onSearchBarFocus()"
|
|
7473
8141
|
>
|
|
7474
8142
|
</kendo-searchbar>
|
|
7475
|
-
|
|
7476
|
-
|
|
7477
|
-
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
|
|
8143
|
+
</kendo-taglist>
|
|
8144
|
+
|
|
8145
|
+
<span
|
|
8146
|
+
*ngIf="!loading && !readonly && clearButton && (tags?.length || text?.length)"
|
|
8147
|
+
class="k-clear-value"
|
|
8148
|
+
[style.visibility]="clearButtonVisiblity"
|
|
8149
|
+
[attr.title]="clearTitle"
|
|
8150
|
+
role="button"
|
|
8151
|
+
tabindex="-1"
|
|
8152
|
+
(mousedown)="clearAll($event)"
|
|
8153
|
+
>
|
|
8154
|
+
<span class="k-icon k-i-x"></span>
|
|
8155
|
+
</span>
|
|
8156
|
+
<span
|
|
8157
|
+
*ngIf="loading"
|
|
8158
|
+
class="k-icon k-i-loading"
|
|
8159
|
+
>
|
|
8160
|
+
</span>
|
|
7491
8161
|
<ng-template #popupTemplate>
|
|
7492
8162
|
<!--header template-->
|
|
7493
8163
|
<ng-template *ngIf="headerTemplate"
|
|
@@ -7496,8 +8166,12 @@ MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
|
7496
8166
|
}">
|
|
7497
8167
|
</ng-template>
|
|
7498
8168
|
<!--custom item template-->
|
|
7499
|
-
<div
|
|
7500
|
-
|
|
8169
|
+
<div
|
|
8170
|
+
*ngIf="allowCustom && text"
|
|
8171
|
+
class="k-list"
|
|
8172
|
+
[ngClass]="customItemSizeClass"
|
|
8173
|
+
>
|
|
8174
|
+
<div class="k-list-item k-custom-item" kendoDropDownsSelectable [multipleSelection]="true" [index]="-1">
|
|
7501
8175
|
<ng-template *ngIf="customItemTemplate;else default_custom_item_template"
|
|
7502
8176
|
[templateContext]="{
|
|
7503
8177
|
templateRef: customItemTemplate.templateRef,
|
|
@@ -7511,6 +8185,8 @@ MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
|
7511
8185
|
<!--list-->
|
|
7512
8186
|
<kendo-list
|
|
7513
8187
|
#optionsList
|
|
8188
|
+
[size]="size"
|
|
8189
|
+
[rounded]="rounded"
|
|
7514
8190
|
[id]="listBoxId"
|
|
7515
8191
|
[optionPrefix]="optionPrefix"
|
|
7516
8192
|
[data]="data"
|
|
@@ -7528,7 +8204,7 @@ MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
|
7528
8204
|
>
|
|
7529
8205
|
</kendo-list>
|
|
7530
8206
|
<!--no data template-->
|
|
7531
|
-
<div class="k-
|
|
8207
|
+
<div class="k-no-data" *ngIf="data.length === 0">
|
|
7532
8208
|
<ng-template [ngIf]="noDataTemplate"
|
|
7533
8209
|
[templateContext]="{
|
|
7534
8210
|
templateRef: noDataTemplate ? noDataTemplate.templateRef : undefined
|
|
@@ -7552,7 +8228,8 @@ MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
|
7552
8228
|
`
|
|
7553
8229
|
}),
|
|
7554
8230
|
__param(11, Optional()), __param(11, Inject(TOUCH_ENABLED)),
|
|
7555
|
-
__metadata("design:paramtypes", [
|
|
8231
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
8232
|
+
LocalizationService,
|
|
7556
8233
|
PopupService,
|
|
7557
8234
|
DataService,
|
|
7558
8235
|
SelectionService,
|
|
@@ -7561,7 +8238,6 @@ MultiSelectComponent = MultiSelectComponent_1 = __decorate([
|
|
|
7561
8238
|
ChangeDetectorRef,
|
|
7562
8239
|
KeyValueDiffers,
|
|
7563
8240
|
Renderer2,
|
|
7564
|
-
ElementRef,
|
|
7565
8241
|
NgZone, Boolean])
|
|
7566
8242
|
], MultiSelectComponent);
|
|
7567
8243
|
|
|
@@ -7735,8 +8411,8 @@ var MultiColumnComboBoxComponent_1;
|
|
|
7735
8411
|
* Represents the [Kendo UI MultiColumnComboBox component for Angular]({% slug overview_multicolumncombobox %}).
|
|
7736
8412
|
*/
|
|
7737
8413
|
let MultiColumnComboBoxComponent = MultiColumnComboBoxComponent_1 = class MultiColumnComboBoxComponent extends ComboBoxComponent {
|
|
7738
|
-
constructor(localization, popupService, selectionService, navigationService, disabledItemsService, dataService, zone, changeDetector, renderer,
|
|
7739
|
-
super(localization, popupService, selectionService, navigationService, disabledItemsService, dataService, zone, changeDetector, renderer,
|
|
8414
|
+
constructor(localization, popupService, selectionService, navigationService, disabledItemsService, dataService, zone, changeDetector, renderer, wrapper, touchEnabled$$1) {
|
|
8415
|
+
super(wrapper, localization, popupService, selectionService, navigationService, disabledItemsService, dataService, zone, changeDetector, renderer, touchEnabled$$1);
|
|
7740
8416
|
/**
|
|
7741
8417
|
* @hidden
|
|
7742
8418
|
*/
|
|
@@ -7747,6 +8423,12 @@ let MultiColumnComboBoxComponent = MultiColumnComboBoxComponent_1 = class MultiC
|
|
|
7747
8423
|
// use a smaller virtual page size as columns with multiple cells can cause poor performance
|
|
7748
8424
|
this.defaultVirtualPageSize = 30;
|
|
7749
8425
|
}
|
|
8426
|
+
/**
|
|
8427
|
+
* @hidden
|
|
8428
|
+
*/
|
|
8429
|
+
get isDisabled() {
|
|
8430
|
+
return this.disabled;
|
|
8431
|
+
}
|
|
7750
8432
|
/**
|
|
7751
8433
|
* @hidden
|
|
7752
8434
|
*/
|
|
@@ -7761,18 +8443,19 @@ let MultiColumnComboBoxComponent = MultiColumnComboBoxComponent_1 = class MultiC
|
|
|
7761
8443
|
const max = isNaN(width) ? width : `${width}px`;
|
|
7762
8444
|
return { min, max };
|
|
7763
8445
|
}
|
|
8446
|
+
/**
|
|
8447
|
+
* @hidden
|
|
8448
|
+
*/
|
|
8449
|
+
get tableSizeClass() {
|
|
8450
|
+
return `${this.size ? getSizeClass('table', this.size) : ''}`;
|
|
8451
|
+
}
|
|
7764
8452
|
/**
|
|
7765
8453
|
* @hidden
|
|
7766
8454
|
*/
|
|
7767
8455
|
get listContainerClasses() {
|
|
7768
8456
|
return [
|
|
7769
|
-
'k-list-container',
|
|
7770
8457
|
'k-popup',
|
|
7771
|
-
'k-
|
|
7772
|
-
'k-group',
|
|
7773
|
-
'k-dropdowngrid-popup',
|
|
7774
|
-
'k-popup-flush',
|
|
7775
|
-
'k-state-border-up'
|
|
8458
|
+
'k-dropdowngrid-popup'
|
|
7776
8459
|
].concat(this.popupSettings.popupClass || []);
|
|
7777
8460
|
}
|
|
7778
8461
|
ngAfterViewInit() {
|
|
@@ -7848,6 +8531,11 @@ __decorate([
|
|
|
7848
8531
|
HostBinding('class.k-dropdowngrid'),
|
|
7849
8532
|
__metadata("design:type", Boolean)
|
|
7850
8533
|
], MultiColumnComboBoxComponent.prototype, "hostClasses", void 0);
|
|
8534
|
+
__decorate([
|
|
8535
|
+
HostBinding('class.k-disabled'),
|
|
8536
|
+
__metadata("design:type", Boolean),
|
|
8537
|
+
__metadata("design:paramtypes", [])
|
|
8538
|
+
], MultiColumnComboBoxComponent.prototype, "isDisabled", null);
|
|
7851
8539
|
__decorate([
|
|
7852
8540
|
ContentChildren(ComboBoxColumnComponent),
|
|
7853
8541
|
__metadata("design:type", QueryList)
|
|
@@ -7895,63 +8583,56 @@ MultiColumnComboBoxComponent = MultiColumnComboBoxComponent_1 = __decorate([
|
|
|
7895
8583
|
clearTitle="clear"
|
|
7896
8584
|
>
|
|
7897
8585
|
</ng-container>
|
|
7898
|
-
<
|
|
7899
|
-
#
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
[
|
|
8586
|
+
<kendo-searchbar
|
|
8587
|
+
#searchbar
|
|
8588
|
+
[role]="'combobox'"
|
|
8589
|
+
[id]="focusableId"
|
|
8590
|
+
[listId]="listBoxId"
|
|
8591
|
+
[activeDescendant]="activeDescendant"
|
|
8592
|
+
[noDataLabel]="noDataLabel"
|
|
8593
|
+
[userInput]="text"
|
|
8594
|
+
[suggestedText]="getSuggestion()"
|
|
8595
|
+
[disabled]="disabled"
|
|
8596
|
+
[readonly]="readonly"
|
|
8597
|
+
[tabIndex]="tabIndex"
|
|
8598
|
+
[popupOpen]="isOpen"
|
|
8599
|
+
[placeholder]="placeholder"
|
|
8600
|
+
(onNavigate)="handleNavigate($event)"
|
|
8601
|
+
(valueChange)="searchBarChange($event)"
|
|
8602
|
+
(onBlur)="handleBlur()"
|
|
8603
|
+
(onFocus)="handleFocus()"
|
|
7903
8604
|
>
|
|
7904
|
-
|
|
7905
|
-
#searchbar
|
|
7906
|
-
[role]="'combobox'"
|
|
7907
|
-
[id]="focusableId"
|
|
7908
|
-
[listId]="listBoxId"
|
|
7909
|
-
[activeDescendant]="activeDescendant"
|
|
7910
|
-
[noDataLabel]="noDataLabel"
|
|
7911
|
-
[userInput]="text"
|
|
7912
|
-
[suggestedText]="getSuggestion()"
|
|
7913
|
-
[disabled]="disabled"
|
|
7914
|
-
[readonly]="readonly"
|
|
7915
|
-
[tabIndex]="tabIndex"
|
|
7916
|
-
[popupOpen]="isOpen"
|
|
7917
|
-
[placeholder]="placeholder"
|
|
7918
|
-
(onNavigate)="handleNavigate($event)"
|
|
7919
|
-
(valueChange)="searchBarChange($event)"
|
|
7920
|
-
(onBlur)="handleBlur()"
|
|
7921
|
-
(onFocus)="handleFocus()"
|
|
7922
|
-
>
|
|
7923
|
-
</kendo-searchbar>
|
|
7924
|
-
|
|
7925
|
-
<span
|
|
7926
|
-
*ngIf="clearButton && !loading && !disabled && !readonly && text?.length"
|
|
7927
|
-
class="k-icon k-clear-value k-i-close"
|
|
7928
|
-
[style.visibility]="clearButtonVisiblity"
|
|
7929
|
-
aria-hidden="true"
|
|
7930
|
-
[attr.title]="clearTitle"
|
|
7931
|
-
(click)="clearValue($event)"
|
|
7932
|
-
[kendoEventsOutsideAngular]="{
|
|
7933
|
-
mousedown: preventEventDefault
|
|
7934
|
-
}"
|
|
7935
|
-
>
|
|
7936
|
-
</span>
|
|
8605
|
+
</kendo-searchbar>
|
|
7937
8606
|
|
|
7938
|
-
|
|
7939
|
-
|
|
7940
|
-
|
|
7941
|
-
|
|
7942
|
-
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
|
|
7947
|
-
|
|
7948
|
-
|
|
7949
|
-
|
|
7950
|
-
>
|
|
7951
|
-
</span>
|
|
7952
|
-
</span>
|
|
8607
|
+
<span
|
|
8608
|
+
*ngIf="clearButton && !loading && !disabled && !readonly && text?.length"
|
|
8609
|
+
class="k-clear-value"
|
|
8610
|
+
[style.visibility]="clearButtonVisiblity"
|
|
8611
|
+
aria-hidden="true"
|
|
8612
|
+
[attr.title]="clearTitle"
|
|
8613
|
+
(click)="clearValue($event)"
|
|
8614
|
+
[kendoEventsOutsideAngular]="{
|
|
8615
|
+
mousedown: preventEventDefault
|
|
8616
|
+
}"
|
|
8617
|
+
>
|
|
8618
|
+
<span class="k-icon k-i-x"></span>
|
|
7953
8619
|
</span>
|
|
7954
8620
|
|
|
8621
|
+
<button
|
|
8622
|
+
#select
|
|
8623
|
+
tabindex="-1"
|
|
8624
|
+
aria-hidden="true"
|
|
8625
|
+
unselectable="on"
|
|
8626
|
+
type="button"
|
|
8627
|
+
class="k-input-button k-button k-icon-button"
|
|
8628
|
+
[ngClass]="selectButtonClasses"
|
|
8629
|
+
[kendoEventsOutsideAngular]="{
|
|
8630
|
+
mousedown: preventEventDefault
|
|
8631
|
+
}"
|
|
8632
|
+
>
|
|
8633
|
+
<span class="k-button-icon k-icon" [ngClass]="buttonClasses"></span>
|
|
8634
|
+
</button>
|
|
8635
|
+
|
|
7955
8636
|
<ng-template #popupTemplate>
|
|
7956
8637
|
<!--user-defined header template -->
|
|
7957
8638
|
<ng-template
|
|
@@ -7962,125 +8643,139 @@ MultiColumnComboBoxComponent = MultiColumnComboBoxComponent_1 = __decorate([
|
|
|
7962
8643
|
>
|
|
7963
8644
|
</ng-template>
|
|
7964
8645
|
|
|
7965
|
-
<!--
|
|
7966
|
-
<div
|
|
7967
|
-
|
|
7968
|
-
|
|
7969
|
-
|
|
7970
|
-
|
|
7971
|
-
|
|
7972
|
-
|
|
7973
|
-
|
|
7974
|
-
|
|
7975
|
-
|
|
7976
|
-
[style.width.px]="column.width"
|
|
7977
|
-
/>
|
|
7978
|
-
</ng-container>
|
|
7979
|
-
</colgroup>
|
|
7980
|
-
<tbody>
|
|
7981
|
-
<tr>
|
|
8646
|
+
<!--data table-->
|
|
8647
|
+
<div class="k-data-table" [ngClass]="tableSizeClass">
|
|
8648
|
+
|
|
8649
|
+
<!--grid header-->
|
|
8650
|
+
<div
|
|
8651
|
+
#header
|
|
8652
|
+
class="k-table-header"
|
|
8653
|
+
>
|
|
8654
|
+
<div class="k-table-header-wrap">
|
|
8655
|
+
<table class="k-table" role="presentation">
|
|
8656
|
+
<colgroup>
|
|
7982
8657
|
<ng-container *ngFor="let column of columns">
|
|
7983
|
-
<
|
|
8658
|
+
<col
|
|
7984
8659
|
*ngIf="!column.hidden && column.matchesMedia"
|
|
7985
|
-
|
|
7986
|
-
|
|
7987
|
-
[ngClass]="column.headerClass"
|
|
7988
|
-
>
|
|
7989
|
-
<ng-container *ngIf="!column.headerTemplate">
|
|
7990
|
-
{{ column.title || column.field }}
|
|
7991
|
-
</ng-container>
|
|
7992
|
-
<ng-template
|
|
7993
|
-
*ngIf="column.headerTemplate"
|
|
7994
|
-
[templateContext]="{
|
|
7995
|
-
templateRef: column.headerTemplate?.templateRef,
|
|
7996
|
-
$implicit: column,
|
|
7997
|
-
column: column
|
|
7998
|
-
}"
|
|
7999
|
-
>
|
|
8000
|
-
</ng-template>
|
|
8001
|
-
</th>
|
|
8660
|
+
[style.width.px]="column.width"
|
|
8661
|
+
/>
|
|
8002
8662
|
</ng-container>
|
|
8003
|
-
</
|
|
8004
|
-
|
|
8005
|
-
|
|
8663
|
+
</colgroup>
|
|
8664
|
+
<thead class="k-table-thead">
|
|
8665
|
+
<tr class="k-table-row">
|
|
8666
|
+
<ng-container *ngFor="let column of columns">
|
|
8667
|
+
<th
|
|
8668
|
+
*ngIf="!column.hidden && column.matchesMedia"
|
|
8669
|
+
class="k-table-th"
|
|
8670
|
+
[ngStyle]="column.headerStyle"
|
|
8671
|
+
[ngClass]="column.headerClass"
|
|
8672
|
+
>
|
|
8673
|
+
<ng-container *ngIf="!column.headerTemplate">
|
|
8674
|
+
{{ column.title || column.field }}
|
|
8675
|
+
</ng-container>
|
|
8676
|
+
<ng-template
|
|
8677
|
+
*ngIf="column.headerTemplate"
|
|
8678
|
+
[templateContext]="{
|
|
8679
|
+
templateRef: column.headerTemplate?.templateRef,
|
|
8680
|
+
$implicit: column,
|
|
8681
|
+
column: column
|
|
8682
|
+
}"
|
|
8683
|
+
>
|
|
8684
|
+
</ng-template>
|
|
8685
|
+
</th>
|
|
8686
|
+
</ng-container>
|
|
8687
|
+
</tr>
|
|
8688
|
+
</thead>
|
|
8689
|
+
</table>
|
|
8690
|
+
</div>
|
|
8006
8691
|
</div>
|
|
8007
|
-
</div>
|
|
8008
8692
|
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
>
|
|
8019
|
-
<ng-container *ngIf="!column.cellTemplate">
|
|
8020
|
-
{{ textFrom(dataItem, column.field) }}
|
|
8021
|
-
</ng-container>
|
|
8022
|
-
<ng-template
|
|
8023
|
-
*ngIf="column.cellTemplate"
|
|
8024
|
-
[templateContext]="{
|
|
8025
|
-
templateRef: column.cellTemplate?.templateRef,
|
|
8026
|
-
$implicit: dataItem,
|
|
8027
|
-
dataItem: dataItem,
|
|
8028
|
-
column: column
|
|
8029
|
-
}"
|
|
8693
|
+
<!-- item template -->
|
|
8694
|
+
<ng-template #rowTemplate let-dataItem>
|
|
8695
|
+
<ng-container *ngFor="let column of columns">
|
|
8696
|
+
<span
|
|
8697
|
+
*ngIf="!column.hidden && column.matchesMedia"
|
|
8698
|
+
class="k-table-td"
|
|
8699
|
+
[ngClass]="column.class"
|
|
8700
|
+
[style.width.px]="column.width"
|
|
8701
|
+
[ngStyle]="column.style"
|
|
8030
8702
|
>
|
|
8031
|
-
|
|
8032
|
-
|
|
8033
|
-
|
|
8034
|
-
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
|
|
8039
|
-
|
|
8040
|
-
|
|
8041
|
-
|
|
8042
|
-
|
|
8043
|
-
|
|
8044
|
-
|
|
8045
|
-
|
|
8046
|
-
|
|
8047
|
-
[height]="listHeight"
|
|
8048
|
-
[show]="isOpen"
|
|
8049
|
-
[virtual]="virtual"
|
|
8050
|
-
[listClass]="'k-reset k-grid-list'"
|
|
8051
|
-
(pageChange)="pageChange($event)"
|
|
8052
|
-
(listResize)="updateHeaderPadding(header)"
|
|
8053
|
-
>
|
|
8054
|
-
</kendo-list>
|
|
8703
|
+
<ng-container *ngIf="!column.cellTemplate">
|
|
8704
|
+
{{ textFrom(dataItem, column.field) }}
|
|
8705
|
+
</ng-container>
|
|
8706
|
+
<ng-template
|
|
8707
|
+
*ngIf="column.cellTemplate"
|
|
8708
|
+
[templateContext]="{
|
|
8709
|
+
templateRef: column.cellTemplate?.templateRef,
|
|
8710
|
+
$implicit: dataItem,
|
|
8711
|
+
dataItem: dataItem,
|
|
8712
|
+
column: column
|
|
8713
|
+
}"
|
|
8714
|
+
>
|
|
8715
|
+
</ng-template>
|
|
8716
|
+
</span>
|
|
8717
|
+
</ng-container>
|
|
8718
|
+
</ng-template>
|
|
8055
8719
|
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
|
|
8062
|
-
[
|
|
8063
|
-
[
|
|
8064
|
-
|
|
8065
|
-
|
|
8720
|
+
<!--list-->
|
|
8721
|
+
<kendo-list
|
|
8722
|
+
#optionsList
|
|
8723
|
+
[id]="listBoxId"
|
|
8724
|
+
[optionPrefix]="optionPrefix"
|
|
8725
|
+
[data]="data"
|
|
8726
|
+
[textField]="textField"
|
|
8727
|
+
[valueField]="valueField"
|
|
8728
|
+
[template]="{ templateRef: rowTemplate }"
|
|
8729
|
+
[groupTemplate]="groupTemplate"
|
|
8730
|
+
[fixedGroupTemplate]="fixedGroupTemplate"
|
|
8731
|
+
[height]="listHeight"
|
|
8732
|
+
[show]="isOpen"
|
|
8733
|
+
[virtual]="virtual"
|
|
8734
|
+
[type]="'dropdowngrid'"
|
|
8735
|
+
(pageChange)="pageChange($event)"
|
|
8736
|
+
(listResize)="updateHeaderPadding(header)"
|
|
8066
8737
|
>
|
|
8067
|
-
</
|
|
8068
|
-
<ng-template [ngIf]="!noDataTemplate">
|
|
8069
|
-
<div>{{ noDataText }}</div>
|
|
8070
|
-
</ng-template>
|
|
8071
|
-
</div>
|
|
8738
|
+
</kendo-list>
|
|
8072
8739
|
|
|
8073
|
-
|
|
8074
|
-
|
|
8075
|
-
|
|
8740
|
+
<!--no-data template-->
|
|
8741
|
+
<div
|
|
8742
|
+
class="k-no-data"
|
|
8743
|
+
*ngIf="data.length === 0"
|
|
8744
|
+
>
|
|
8076
8745
|
<ng-template
|
|
8746
|
+
[ngIf]="noDataTemplate"
|
|
8077
8747
|
[templateContext]="{
|
|
8078
|
-
templateRef:
|
|
8748
|
+
templateRef: noDataTemplate?.templateRef
|
|
8079
8749
|
}"
|
|
8080
8750
|
>
|
|
8081
8751
|
</ng-template>
|
|
8752
|
+
<ng-template [ngIf]="!noDataTemplate">
|
|
8753
|
+
<div>{{ noDataText }}</div>
|
|
8754
|
+
</ng-template>
|
|
8082
8755
|
</div>
|
|
8083
|
-
|
|
8756
|
+
|
|
8757
|
+
<!--user-defined footer template-->
|
|
8758
|
+
<ng-container *ngIf="footerTemplate">
|
|
8759
|
+
<div class="k-table-footer">
|
|
8760
|
+
<table class="k-table">
|
|
8761
|
+
<tfoot class="k-table-tfoot">
|
|
8762
|
+
<tr class="k-table-row">
|
|
8763
|
+
<td class="k-table-td">
|
|
8764
|
+
<ng-template
|
|
8765
|
+
[templateContext]="{
|
|
8766
|
+
templateRef: footerTemplate.templateRef
|
|
8767
|
+
}"
|
|
8768
|
+
>
|
|
8769
|
+
</ng-template>
|
|
8770
|
+
</td>
|
|
8771
|
+
</tr>
|
|
8772
|
+
</tfoot>
|
|
8773
|
+
</table>
|
|
8774
|
+
</div>
|
|
8775
|
+
</ng-container>
|
|
8776
|
+
|
|
8777
|
+
</div>
|
|
8778
|
+
|
|
8084
8779
|
</ng-template>
|
|
8085
8780
|
|
|
8086
8781
|
<kendo-resize-sensor
|
|
@@ -8138,16 +8833,18 @@ const isNodeVisible = () => true;
|
|
|
8138
8833
|
* Represents the [Kendo UI DropDownTree component for Angular]({% slug overview_ddt %}).
|
|
8139
8834
|
*/
|
|
8140
8835
|
let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponent {
|
|
8141
|
-
constructor(popupService, navigationService, renderer,
|
|
8836
|
+
constructor(wrapper, popupService, navigationService, renderer, _zone, cdr, localization, touchEnabled$$1) {
|
|
8837
|
+
this.wrapper = wrapper;
|
|
8142
8838
|
this.popupService = popupService;
|
|
8143
8839
|
this.navigationService = navigationService;
|
|
8144
8840
|
this.renderer = renderer;
|
|
8145
|
-
this.hostElement = hostElement;
|
|
8146
8841
|
this._zone = _zone;
|
|
8147
8842
|
this.cdr = cdr;
|
|
8148
8843
|
this.localization = localization;
|
|
8149
8844
|
this.touchEnabled = touchEnabled$$1;
|
|
8150
8845
|
this.hostClasses = true;
|
|
8846
|
+
this.role = 'listbox';
|
|
8847
|
+
this.ariaHasPopup = 'tree';
|
|
8151
8848
|
/**
|
|
8152
8849
|
* Fires each time the popup is about to open
|
|
8153
8850
|
* ([see example]({% slug openstate_ddt %})).
|
|
@@ -8282,31 +8979,68 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8282
8979
|
this._popupSettings = DEFAULT_POPUP_SETTINGS;
|
|
8283
8980
|
this._tabindex = 0;
|
|
8284
8981
|
this._isFocused = false;
|
|
8982
|
+
this._size = 'medium';
|
|
8983
|
+
this._rounded = 'medium';
|
|
8984
|
+
this._fillMode = 'solid';
|
|
8285
8985
|
this.subscriptions = [];
|
|
8286
8986
|
this.onTouchedCallback = noop;
|
|
8287
8987
|
this.onChangeCallback = noop;
|
|
8288
8988
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
8289
8989
|
this.subscribeEvents();
|
|
8290
8990
|
this.subscribeTouchEvents();
|
|
8991
|
+
this.subscribeFocusEvents();
|
|
8291
8992
|
}
|
|
8292
|
-
get
|
|
8293
|
-
return this.
|
|
8993
|
+
get isDisabled() {
|
|
8994
|
+
return this.disabled;
|
|
8294
8995
|
}
|
|
8295
|
-
|
|
8296
|
-
|
|
8297
|
-
if (this.isFocused && !this.filterable || this.touchEnabled) {
|
|
8298
|
-
treeview.focus();
|
|
8299
|
-
}
|
|
8300
|
-
// the treeview animations are initially disabled (we don't want expand animations during popup opening)
|
|
8301
|
-
// re-enables the animations for user interaction
|
|
8302
|
-
treeview.animate = true;
|
|
8303
|
-
this._treeview = treeview;
|
|
8304
|
-
}
|
|
8996
|
+
get isLoading() {
|
|
8997
|
+
return this.loading;
|
|
8305
8998
|
}
|
|
8306
|
-
get
|
|
8307
|
-
return this.
|
|
8999
|
+
get id() {
|
|
9000
|
+
return this.focusableId;
|
|
8308
9001
|
}
|
|
8309
|
-
|
|
9002
|
+
get hostTabIndex() {
|
|
9003
|
+
return this.tabindex;
|
|
9004
|
+
}
|
|
9005
|
+
get isAriaExpanded() {
|
|
9006
|
+
return this.isOpen;
|
|
9007
|
+
}
|
|
9008
|
+
get isReadonly() {
|
|
9009
|
+
return this.readonly;
|
|
9010
|
+
}
|
|
9011
|
+
/**
|
|
9012
|
+
* @hidden
|
|
9013
|
+
*/
|
|
9014
|
+
handleClick() {
|
|
9015
|
+
this.togglePopup(!this.isOpen);
|
|
9016
|
+
}
|
|
9017
|
+
/**
|
|
9018
|
+
* @hidden
|
|
9019
|
+
*/
|
|
9020
|
+
handleKeydown(event) {
|
|
9021
|
+
if (this.disabled || this.readonly) {
|
|
9022
|
+
return;
|
|
9023
|
+
}
|
|
9024
|
+
const eventData = event;
|
|
9025
|
+
this.navigationService.process({
|
|
9026
|
+
originalEvent: eventData
|
|
9027
|
+
});
|
|
9028
|
+
}
|
|
9029
|
+
set treeview(treeview) {
|
|
9030
|
+
if (treeview) {
|
|
9031
|
+
if (this.isFocused && !this.filterable || this.touchEnabled) {
|
|
9032
|
+
treeview.focus();
|
|
9033
|
+
}
|
|
9034
|
+
// the treeview animations are initially disabled (we don't want expand animations during popup opening)
|
|
9035
|
+
// re-enables the animations for user interaction
|
|
9036
|
+
treeview.animate = true;
|
|
9037
|
+
this._treeview = treeview;
|
|
9038
|
+
}
|
|
9039
|
+
}
|
|
9040
|
+
get treeview() {
|
|
9041
|
+
return this._treeview;
|
|
9042
|
+
}
|
|
9043
|
+
/**
|
|
8310
9044
|
* Sets the data of the DropDownTree.
|
|
8311
9045
|
*
|
|
8312
9046
|
* > The data has to be provided in an array-like list with objects.
|
|
@@ -8369,8 +9103,69 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8369
9103
|
get tabindex() {
|
|
8370
9104
|
return this.disabled ? -1 : this._tabindex;
|
|
8371
9105
|
}
|
|
9106
|
+
/**
|
|
9107
|
+
* Sets the size of the component.
|
|
9108
|
+
*
|
|
9109
|
+
* The possible values are:
|
|
9110
|
+
* * `'small'`
|
|
9111
|
+
* * `'medium'` (default)
|
|
9112
|
+
* * `'large'`
|
|
9113
|
+
* * `null`
|
|
9114
|
+
*
|
|
9115
|
+
*/
|
|
9116
|
+
set size(size) {
|
|
9117
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('picker', this.size));
|
|
9118
|
+
if (size) {
|
|
9119
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker', size));
|
|
9120
|
+
}
|
|
9121
|
+
this._size = size;
|
|
9122
|
+
}
|
|
9123
|
+
get size() {
|
|
9124
|
+
return this._size;
|
|
9125
|
+
}
|
|
9126
|
+
/**
|
|
9127
|
+
* Sets the border radius of the component.
|
|
9128
|
+
*
|
|
9129
|
+
* The possible values are:
|
|
9130
|
+
* * `'small'`
|
|
9131
|
+
* * `'medium'` (default)
|
|
9132
|
+
* * `'large'`
|
|
9133
|
+
* * `'full'`
|
|
9134
|
+
* * `null`
|
|
9135
|
+
*
|
|
9136
|
+
*/
|
|
9137
|
+
set rounded(rounded) {
|
|
9138
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
9139
|
+
if (rounded) {
|
|
9140
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
9141
|
+
}
|
|
9142
|
+
this._rounded = rounded;
|
|
9143
|
+
}
|
|
9144
|
+
get rounded() {
|
|
9145
|
+
return this._rounded;
|
|
9146
|
+
}
|
|
9147
|
+
/**
|
|
9148
|
+
* Sets the fillMode of the component.
|
|
9149
|
+
*
|
|
9150
|
+
* The possible values are:
|
|
9151
|
+
* * `'flat'`
|
|
9152
|
+
* * `'solid'` (default)
|
|
9153
|
+
* * `'outline'`
|
|
9154
|
+
* * `null`
|
|
9155
|
+
*
|
|
9156
|
+
*/
|
|
9157
|
+
set fillMode(fillMode) {
|
|
9158
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('picker', this.fillMode));
|
|
9159
|
+
if (fillMode) {
|
|
9160
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker', fillMode));
|
|
9161
|
+
}
|
|
9162
|
+
this._fillMode = fillMode;
|
|
9163
|
+
}
|
|
9164
|
+
get fillMode() {
|
|
9165
|
+
return this._fillMode;
|
|
9166
|
+
}
|
|
8372
9167
|
set isFocused(isFocused) {
|
|
8373
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-
|
|
9168
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
8374
9169
|
this._isFocused = isFocused;
|
|
8375
9170
|
}
|
|
8376
9171
|
get isFocused() {
|
|
@@ -8465,13 +9260,14 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8465
9260
|
return this.isNodeVisible;
|
|
8466
9261
|
}
|
|
8467
9262
|
ngOnInit() {
|
|
8468
|
-
this.renderer.removeAttribute(this.
|
|
9263
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
8469
9264
|
this.assignAriaDescribedBy();
|
|
8470
9265
|
this.subscriptions.push(this.localization
|
|
8471
9266
|
.changes.subscribe(({ rtl }) => {
|
|
8472
9267
|
this.direction = rtl ? 'rtl' : 'ltr';
|
|
8473
9268
|
this.cdr.markForCheck();
|
|
8474
9269
|
}));
|
|
9270
|
+
this.setComponentClasses();
|
|
8475
9271
|
}
|
|
8476
9272
|
/**
|
|
8477
9273
|
* @hidden
|
|
@@ -8522,7 +9318,11 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8522
9318
|
/**
|
|
8523
9319
|
* @hidden
|
|
8524
9320
|
*/
|
|
8525
|
-
handleFocus() {
|
|
9321
|
+
handleFocus(event) {
|
|
9322
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
9323
|
+
return;
|
|
9324
|
+
}
|
|
9325
|
+
event.stopImmediatePropagation();
|
|
8526
9326
|
if (!this.isFocused) {
|
|
8527
9327
|
this.isFocused = true;
|
|
8528
9328
|
if (hasObservers(this.onFocus)) {
|
|
@@ -8537,13 +9337,13 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8537
9337
|
*/
|
|
8538
9338
|
handleBlur(e) {
|
|
8539
9339
|
const relatedTarget = e && e.relatedTarget;
|
|
8540
|
-
if (this.
|
|
9340
|
+
if (this.wrapper.nativeElement.contains(relatedTarget) ||
|
|
8541
9341
|
(this.isOpen && this.popupRef.popupElement.contains(relatedTarget))) {
|
|
8542
9342
|
return;
|
|
8543
9343
|
}
|
|
8544
9344
|
this.isFocused = false;
|
|
8545
9345
|
if (hasObservers(this.onBlur) ||
|
|
8546
|
-
isUntouched(this.
|
|
9346
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
8547
9347
|
this._zone.run(() => {
|
|
8548
9348
|
this.togglePopup(false);
|
|
8549
9349
|
this.onBlur.emit();
|
|
@@ -8554,24 +9354,6 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8554
9354
|
this.togglePopup(false);
|
|
8555
9355
|
}
|
|
8556
9356
|
}
|
|
8557
|
-
/**
|
|
8558
|
-
* @hidden
|
|
8559
|
-
*/
|
|
8560
|
-
handleKeydown(event) {
|
|
8561
|
-
if (this.disabled || this.readonly) {
|
|
8562
|
-
return;
|
|
8563
|
-
}
|
|
8564
|
-
const eventData = event;
|
|
8565
|
-
this.navigationService.process({
|
|
8566
|
-
originalEvent: eventData
|
|
8567
|
-
});
|
|
8568
|
-
}
|
|
8569
|
-
/**
|
|
8570
|
-
* @hidden
|
|
8571
|
-
*/
|
|
8572
|
-
handleClick() {
|
|
8573
|
-
this.togglePopup(!this.isOpen);
|
|
8574
|
-
}
|
|
8575
9357
|
/**
|
|
8576
9358
|
* Focuses a specific item of the DropDownTree based on a provided index in the format of `1_1`.
|
|
8577
9359
|
* The targeted item should be expanded in order for it to be focused.
|
|
@@ -8633,7 +9415,7 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8633
9415
|
* @hidden
|
|
8634
9416
|
*/
|
|
8635
9417
|
get popupContainerClasses() {
|
|
8636
|
-
const containerClasses = ['k-popup-dropdowntree'
|
|
9418
|
+
const containerClasses = ['k-popup-dropdowntree'];
|
|
8637
9419
|
if (this.popupSettings.popupClass) {
|
|
8638
9420
|
containerClasses.push(this.popupSettings.popupClass);
|
|
8639
9421
|
}
|
|
@@ -8733,6 +9515,18 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8733
9515
|
get buttonClasses() {
|
|
8734
9516
|
return this.loading ? 'k-i-loading' : 'k-i-arrow-s';
|
|
8735
9517
|
}
|
|
9518
|
+
/**
|
|
9519
|
+
* @hidden
|
|
9520
|
+
*/
|
|
9521
|
+
get selectButtonClasses() {
|
|
9522
|
+
return `${this.size ? getSizeClass('button', this.size) : ''} ${this.fillMode ? 'k-button-' + this.fillMode : ''} ${this.fillMode ? 'k-button-' + this.fillMode + '-base' : ''}`;
|
|
9523
|
+
}
|
|
9524
|
+
/**
|
|
9525
|
+
* @hidden
|
|
9526
|
+
*/
|
|
9527
|
+
get filterInputClasses() {
|
|
9528
|
+
return `${this.size ? getSizeClass('input', this.size) : ''} ${this.fillMode ? 'k-input-' + this.fillMode : ''} ${this.rounded ? getRoundedClass(this.rounded) : ''}`;
|
|
9529
|
+
}
|
|
8736
9530
|
verifySettings() {
|
|
8737
9531
|
if (!isDevMode()) {
|
|
8738
9532
|
return;
|
|
@@ -8892,7 +9686,7 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8892
9686
|
// Roll up DropDownTree on iOS when tapped outside
|
|
8893
9687
|
this.touchstartDisposeHandler = this.renderer.listen(document, 'touchstart', (e) => {
|
|
8894
9688
|
const target = e.target;
|
|
8895
|
-
if (this.isFocused && !inDropDown(this.
|
|
9689
|
+
if (this.isFocused && !inDropDown(this.wrapper, target, this.popupRef)) {
|
|
8896
9690
|
this._zone.run(() => {
|
|
8897
9691
|
if (this.isOpen) {
|
|
8898
9692
|
this.treeview.blur();
|
|
@@ -8902,34 +9696,117 @@ let DropDownTreeComponent = DropDownTreeComponent_1 = class DropDownTreeComponen
|
|
|
8902
9696
|
}
|
|
8903
9697
|
}));
|
|
8904
9698
|
}
|
|
9699
|
+
subscribeFocusEvents() {
|
|
9700
|
+
if (isDocumentAvailable()) {
|
|
9701
|
+
this.handleFocus = this.handleFocus.bind(this);
|
|
9702
|
+
this.handleDocumentBlur = this.handleDocumentBlur.bind(this);
|
|
9703
|
+
this._zone.runOutsideAngular(() => {
|
|
9704
|
+
const useCapture = true;
|
|
9705
|
+
document.addEventListener('focus', this.handleFocus, useCapture);
|
|
9706
|
+
document.addEventListener('blur', this.handleDocumentBlur, useCapture);
|
|
9707
|
+
});
|
|
9708
|
+
}
|
|
9709
|
+
}
|
|
9710
|
+
unSubscribeFocusEvents() {
|
|
9711
|
+
if (isDocumentAvailable()) {
|
|
9712
|
+
const useCapture = true;
|
|
9713
|
+
document.removeEventListener('focus', this.handleFocus, useCapture);
|
|
9714
|
+
document.removeEventListener('blur', this.handleDocumentBlur, useCapture);
|
|
9715
|
+
}
|
|
9716
|
+
}
|
|
8905
9717
|
unsubscribeEvents() {
|
|
8906
9718
|
this.subscriptions.forEach(sub => sub.unsubscribe());
|
|
9719
|
+
this.unSubscribeFocusEvents();
|
|
8907
9720
|
if (this.touchstartDisposeHandler) {
|
|
8908
9721
|
this.touchstartDisposeHandler();
|
|
8909
9722
|
}
|
|
8910
9723
|
}
|
|
9724
|
+
handleDocumentBlur(event) {
|
|
9725
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
9726
|
+
return;
|
|
9727
|
+
}
|
|
9728
|
+
event.stopImmediatePropagation();
|
|
9729
|
+
this.handleBlur(event);
|
|
9730
|
+
}
|
|
8911
9731
|
assignAriaDescribedBy() {
|
|
8912
9732
|
const currentValue = this.wrapper.nativeElement.getAttribute('aria-describedby') || '';
|
|
8913
9733
|
// add to the current value - don't replace it (the aria-describedby is used by the FormField component as well)
|
|
8914
9734
|
const newValue = `${this.valueLabelId} ${currentValue.trim()}`.trim();
|
|
8915
9735
|
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-describedby', newValue);
|
|
8916
9736
|
}
|
|
9737
|
+
setComponentClasses() {
|
|
9738
|
+
if (this.size) {
|
|
9739
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('picker', this.size));
|
|
9740
|
+
}
|
|
9741
|
+
if (this.rounded) {
|
|
9742
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
9743
|
+
}
|
|
9744
|
+
if (this.fillMode) {
|
|
9745
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('picker', this.fillMode));
|
|
9746
|
+
}
|
|
9747
|
+
}
|
|
8917
9748
|
};
|
|
8918
9749
|
__decorate([
|
|
8919
|
-
HostBinding('class.k-widget'),
|
|
8920
9750
|
HostBinding('class.k-dropdowntree'),
|
|
8921
|
-
HostBinding('class.k-
|
|
9751
|
+
HostBinding('class.k-picker'),
|
|
8922
9752
|
__metadata("design:type", Boolean)
|
|
8923
9753
|
], DropDownTreeComponent.prototype, "hostClasses", void 0);
|
|
9754
|
+
__decorate([
|
|
9755
|
+
HostBinding('class.k-disabled'),
|
|
9756
|
+
HostBinding('attr.aria-disabled'),
|
|
9757
|
+
__metadata("design:type", Boolean),
|
|
9758
|
+
__metadata("design:paramtypes", [])
|
|
9759
|
+
], DropDownTreeComponent.prototype, "isDisabled", null);
|
|
9760
|
+
__decorate([
|
|
9761
|
+
HostBinding('class.k-loading'),
|
|
9762
|
+
__metadata("design:type", Boolean),
|
|
9763
|
+
__metadata("design:paramtypes", [])
|
|
9764
|
+
], DropDownTreeComponent.prototype, "isLoading", null);
|
|
9765
|
+
__decorate([
|
|
9766
|
+
HostBinding('attr.id'),
|
|
9767
|
+
__metadata("design:type", String),
|
|
9768
|
+
__metadata("design:paramtypes", [])
|
|
9769
|
+
], DropDownTreeComponent.prototype, "id", null);
|
|
8924
9770
|
__decorate([
|
|
8925
9771
|
HostBinding('attr.dir'),
|
|
8926
9772
|
__metadata("design:type", String)
|
|
8927
9773
|
], DropDownTreeComponent.prototype, "direction", void 0);
|
|
8928
9774
|
__decorate([
|
|
8929
|
-
HostBinding('
|
|
9775
|
+
HostBinding('attr.tabindex'),
|
|
9776
|
+
__metadata("design:type", Number),
|
|
9777
|
+
__metadata("design:paramtypes", [])
|
|
9778
|
+
], DropDownTreeComponent.prototype, "hostTabIndex", null);
|
|
9779
|
+
__decorate([
|
|
9780
|
+
HostBinding('attr.role'),
|
|
9781
|
+
__metadata("design:type", String)
|
|
9782
|
+
], DropDownTreeComponent.prototype, "role", void 0);
|
|
9783
|
+
__decorate([
|
|
9784
|
+
HostBinding('attr.aria-haspopup'),
|
|
9785
|
+
__metadata("design:type", String)
|
|
9786
|
+
], DropDownTreeComponent.prototype, "ariaHasPopup", void 0);
|
|
9787
|
+
__decorate([
|
|
9788
|
+
HostBinding('attr.aria-expanded'),
|
|
8930
9789
|
__metadata("design:type", Boolean),
|
|
8931
9790
|
__metadata("design:paramtypes", [])
|
|
8932
|
-
], DropDownTreeComponent.prototype, "
|
|
9791
|
+
], DropDownTreeComponent.prototype, "isAriaExpanded", null);
|
|
9792
|
+
__decorate([
|
|
9793
|
+
HostBinding('attr.readonly'),
|
|
9794
|
+
HostBinding('attr.aria-readonly'),
|
|
9795
|
+
__metadata("design:type", Boolean),
|
|
9796
|
+
__metadata("design:paramtypes", [])
|
|
9797
|
+
], DropDownTreeComponent.prototype, "isReadonly", null);
|
|
9798
|
+
__decorate([
|
|
9799
|
+
HostListener('click'),
|
|
9800
|
+
__metadata("design:type", Function),
|
|
9801
|
+
__metadata("design:paramtypes", []),
|
|
9802
|
+
__metadata("design:returntype", void 0)
|
|
9803
|
+
], DropDownTreeComponent.prototype, "handleClick", null);
|
|
9804
|
+
__decorate([
|
|
9805
|
+
HostListener('keydown', ['$event']),
|
|
9806
|
+
__metadata("design:type", Function),
|
|
9807
|
+
__metadata("design:paramtypes", [Object]),
|
|
9808
|
+
__metadata("design:returntype", void 0)
|
|
9809
|
+
], DropDownTreeComponent.prototype, "handleKeydown", null);
|
|
8933
9810
|
__decorate([
|
|
8934
9811
|
ContentChild(NoDataTemplateDirective, { static: false }),
|
|
8935
9812
|
__metadata("design:type", NoDataTemplateDirective)
|
|
@@ -8954,10 +9831,6 @@ __decorate([
|
|
|
8954
9831
|
ViewChild('popupTemplate', { static: true }),
|
|
8955
9832
|
__metadata("design:type", TemplateRef)
|
|
8956
9833
|
], DropDownTreeComponent.prototype, "popupTemplate", void 0);
|
|
8957
|
-
__decorate([
|
|
8958
|
-
ViewChild('wrapper', { static: true }),
|
|
8959
|
-
__metadata("design:type", ElementRef)
|
|
8960
|
-
], DropDownTreeComponent.prototype, "wrapper", void 0);
|
|
8961
9834
|
__decorate([
|
|
8962
9835
|
ViewChild('container', { read: ViewContainerRef, static: true }),
|
|
8963
9836
|
__metadata("design:type", ViewContainerRef)
|
|
@@ -9084,6 +9957,21 @@ __decorate([
|
|
|
9084
9957
|
__metadata("design:type", Number),
|
|
9085
9958
|
__metadata("design:paramtypes", [Number])
|
|
9086
9959
|
], DropDownTreeComponent.prototype, "tabindex", null);
|
|
9960
|
+
__decorate([
|
|
9961
|
+
Input(),
|
|
9962
|
+
__metadata("design:type", String),
|
|
9963
|
+
__metadata("design:paramtypes", [String])
|
|
9964
|
+
], DropDownTreeComponent.prototype, "size", null);
|
|
9965
|
+
__decorate([
|
|
9966
|
+
Input(),
|
|
9967
|
+
__metadata("design:type", String),
|
|
9968
|
+
__metadata("design:paramtypes", [String])
|
|
9969
|
+
], DropDownTreeComponent.prototype, "rounded", null);
|
|
9970
|
+
__decorate([
|
|
9971
|
+
Input(),
|
|
9972
|
+
__metadata("design:type", String),
|
|
9973
|
+
__metadata("design:paramtypes", [String])
|
|
9974
|
+
], DropDownTreeComponent.prototype, "fillMode", null);
|
|
9087
9975
|
__decorate([
|
|
9088
9976
|
Input(),
|
|
9089
9977
|
__metadata("design:type", Function)
|
|
@@ -9154,30 +10042,10 @@ DropDownTreeComponent = DropDownTreeComponent_1 = __decorate([
|
|
|
9154
10042
|
>
|
|
9155
10043
|
</ng-container>
|
|
9156
10044
|
<span
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
'k-dropdown-wrap': true,
|
|
9160
|
-
'k-state-disabled': this.disabled
|
|
9161
|
-
}"
|
|
9162
|
-
[attr.id]="focusableId"
|
|
9163
|
-
role="listbox"
|
|
9164
|
-
aria-haspopup="tree"
|
|
9165
|
-
[attr.aria-expanded]="isOpen"
|
|
9166
|
-
[attr.aria-readonly]="readonly"
|
|
9167
|
-
[attr.tabindex]="tabindex"
|
|
9168
|
-
[attr.dir]="direction"
|
|
9169
|
-
(click)="handleClick()"
|
|
9170
|
-
(keydown)="handleKeydown($event)"
|
|
9171
|
-
[kendoEventsOutsideAngular]="{
|
|
9172
|
-
focus: handleFocus,
|
|
9173
|
-
blur: handleBlur
|
|
9174
|
-
}"
|
|
9175
|
-
[scope]="this"
|
|
10045
|
+
[attr.id]="valueLabelId"
|
|
10046
|
+
class="k-input-inner"
|
|
9176
10047
|
>
|
|
9177
|
-
<span
|
|
9178
|
-
[attr.id]="valueLabelId"
|
|
9179
|
-
class="k-input"
|
|
9180
|
-
>
|
|
10048
|
+
<span class="k-input-value-text">
|
|
9181
10049
|
<ng-template *ngIf="valueTemplate"
|
|
9182
10050
|
[templateContext]="{
|
|
9183
10051
|
templateRef: valueTemplate.templateRef,
|
|
@@ -9186,47 +10054,61 @@ DropDownTreeComponent = DropDownTreeComponent_1 = __decorate([
|
|
|
9186
10054
|
</ng-template>
|
|
9187
10055
|
<ng-template [ngIf]="!valueTemplate"> {{ text || placeholder }} </ng-template>
|
|
9188
10056
|
</span>
|
|
9189
|
-
<span
|
|
9190
|
-
*ngIf="!loading && !readonly && clearButton && text?.length && !disabled"
|
|
9191
|
-
class="k-icon k-clear-value k-i-close"
|
|
9192
|
-
[style.visibility]="clearButtonVisiblity"
|
|
9193
|
-
aria-hidden="true"
|
|
9194
|
-
[attr.title]="messageFor('clearTitle')"
|
|
9195
|
-
(click)="clearValue($event)"
|
|
9196
|
-
>
|
|
9197
|
-
</span>
|
|
9198
|
-
<span class="k-select" aria-hidden="true">
|
|
9199
|
-
<span
|
|
9200
|
-
class="k-icon k-i-arrow-60-down"
|
|
9201
|
-
[ngClass]="buttonClasses"
|
|
9202
|
-
></span>
|
|
9203
|
-
</span>
|
|
9204
10057
|
</span>
|
|
10058
|
+
<span
|
|
10059
|
+
*ngIf="!loading && !readonly && clearButton && text?.length && !disabled"
|
|
10060
|
+
class="k-clear-value"
|
|
10061
|
+
[style.visibility]="clearButtonVisiblity"
|
|
10062
|
+
aria-hidden="true"
|
|
10063
|
+
[attr.title]="messageFor('clearTitle')"
|
|
10064
|
+
(click)="clearValue($event)"
|
|
10065
|
+
>
|
|
10066
|
+
<span class="k-icon k-i-x"></span>
|
|
10067
|
+
</span>
|
|
10068
|
+
<button
|
|
10069
|
+
tabindex="-1"
|
|
10070
|
+
type="button"
|
|
10071
|
+
aria-hidden="true"
|
|
10072
|
+
class="k-input-button k-button k-icon-button"
|
|
10073
|
+
[ngClass]="selectButtonClasses"
|
|
10074
|
+
>
|
|
10075
|
+
<span
|
|
10076
|
+
class="k-button-icon k-icon"
|
|
10077
|
+
[ngClass]="buttonClasses"
|
|
10078
|
+
></span>
|
|
10079
|
+
</button>
|
|
9205
10080
|
<ng-template #popupTemplate>
|
|
9206
10081
|
<span
|
|
9207
10082
|
*ngIf="filterable"
|
|
9208
10083
|
class="k-list-filter"
|
|
9209
10084
|
>
|
|
9210
|
-
<
|
|
9211
|
-
|
|
9212
|
-
|
|
9213
|
-
[filterInput]="filterable && !touchEnabled"
|
|
9214
|
-
(keydown.arrowdown)="handleKeydown($event)"
|
|
9215
|
-
(keydown.alt.arrowup)="handleKeydown($event)"
|
|
9216
|
-
[(ngModel)]="filter"
|
|
9217
|
-
class="k-textbox"
|
|
9218
|
-
role="textbox"
|
|
9219
|
-
aria-haspopup="true"
|
|
9220
|
-
aria-expanded="false"
|
|
9221
|
-
tabindex="0"
|
|
9222
|
-
aria-disabled="false"
|
|
9223
|
-
aria-readonly="false"
|
|
9224
|
-
[kendoEventsOutsideAngular]="{
|
|
9225
|
-
blur: handleBlur
|
|
9226
|
-
}"
|
|
9227
|
-
[scope]="this"
|
|
10085
|
+
<span
|
|
10086
|
+
class="k-textbox k-input"
|
|
10087
|
+
[ngClass]="filterInputClasses"
|
|
9228
10088
|
>
|
|
9229
|
-
|
|
10089
|
+
<span class="k-input-prefix">
|
|
10090
|
+
<span class="k-input-icon k-icon k-i-search"></span>
|
|
10091
|
+
</span>
|
|
10092
|
+
<input
|
|
10093
|
+
#filterInput
|
|
10094
|
+
(input)="handleFilterInputChange($event.target.value)"
|
|
10095
|
+
[filterInput]="filterable && !touchEnabled"
|
|
10096
|
+
(keydown.arrowdown)="handleKeydown($event)"
|
|
10097
|
+
(keydown.alt.arrowup)="handleKeydown($event)"
|
|
10098
|
+
[(ngModel)]="filter"
|
|
10099
|
+
class="k-input-inner"
|
|
10100
|
+
role="textbox"
|
|
10101
|
+
aria-haspopup="true"
|
|
10102
|
+
aria-expanded="false"
|
|
10103
|
+
tabindex="0"
|
|
10104
|
+
aria-disabled="false"
|
|
10105
|
+
aria-readonly="false"
|
|
10106
|
+
[kendoEventsOutsideAngular]="{
|
|
10107
|
+
blur: handleBlur
|
|
10108
|
+
}"
|
|
10109
|
+
[scope]="this"
|
|
10110
|
+
>
|
|
10111
|
+
</span>
|
|
9230
10112
|
</span>
|
|
9231
10113
|
<!--header template-->
|
|
9232
10114
|
<ng-template
|
|
@@ -9238,6 +10120,7 @@ DropDownTreeComponent = DropDownTreeComponent_1 = __decorate([
|
|
|
9238
10120
|
<kendo-treeview
|
|
9239
10121
|
#treeview
|
|
9240
10122
|
*ngIf="data.length !== 0 && !allNodesHidden"
|
|
10123
|
+
[size]="size"
|
|
9241
10124
|
[nodes]="data"
|
|
9242
10125
|
[style.maxHeight.px]="listHeight"
|
|
9243
10126
|
[animate]="false"
|
|
@@ -9268,7 +10151,7 @@ DropDownTreeComponent = DropDownTreeComponent_1 = __decorate([
|
|
|
9268
10151
|
}">
|
|
9269
10152
|
</ng-template>
|
|
9270
10153
|
<!--no-data template-->
|
|
9271
|
-
<div class="k-
|
|
10154
|
+
<div class="k-no-data" *ngIf="data.length === 0 || allNodesHidden">
|
|
9272
10155
|
<ng-template [ngIf]="noDataTemplate"
|
|
9273
10156
|
[templateContext]="{
|
|
9274
10157
|
templateRef: noDataTemplate?.templateRef
|
|
@@ -9284,10 +10167,10 @@ DropDownTreeComponent = DropDownTreeComponent_1 = __decorate([
|
|
|
9284
10167
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
9285
10168
|
}),
|
|
9286
10169
|
__param(7, Optional()), __param(7, Inject(TOUCH_ENABLED)),
|
|
9287
|
-
__metadata("design:paramtypes", [
|
|
10170
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
10171
|
+
PopupService,
|
|
9288
10172
|
NavigationService,
|
|
9289
10173
|
Renderer2,
|
|
9290
|
-
ElementRef,
|
|
9291
10174
|
NgZone,
|
|
9292
10175
|
ChangeDetectorRef,
|
|
9293
10176
|
LocalizationService, Boolean])
|
|
@@ -9305,16 +10188,18 @@ const isNodeVisible$1 = () => true;
|
|
|
9305
10188
|
* Represents the [Kendo UI MultiSelectTree component for Angular]({% slug overview_multiselecttree %}).
|
|
9306
10189
|
*/
|
|
9307
10190
|
let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTreeComponent {
|
|
9308
|
-
constructor(popupService, renderer,
|
|
10191
|
+
constructor(wrapper, popupService, renderer, navigationService, _zone, localization, cdr, touchEnabled$$1) {
|
|
10192
|
+
this.wrapper = wrapper;
|
|
9309
10193
|
this.popupService = popupService;
|
|
9310
10194
|
this.renderer = renderer;
|
|
9311
|
-
this.hostElement = hostElement;
|
|
9312
10195
|
this.navigationService = navigationService;
|
|
9313
10196
|
this._zone = _zone;
|
|
9314
10197
|
this.localization = localization;
|
|
9315
10198
|
this.cdr = cdr;
|
|
9316
10199
|
this.touchEnabled = touchEnabled$$1;
|
|
9317
10200
|
this.hostClasses = true;
|
|
10201
|
+
this.role = 'listbox';
|
|
10202
|
+
this.ariaHasPopup = 'tree';
|
|
9318
10203
|
/**
|
|
9319
10204
|
* Sets the levels in the data set where the values can be found when `valueField` is an Array.
|
|
9320
10205
|
* The field serves to correctly allocate a data item used when the MultiSelectTree is initialized with a value.
|
|
@@ -9477,12 +10362,63 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
9477
10362
|
this._popupSettings = DEFAULT_POPUP_SETTINGS$1;
|
|
9478
10363
|
this._checkableSettings = DEFAULT_CHECKABLE_SETTINGS;
|
|
9479
10364
|
this._isFocused = false;
|
|
10365
|
+
this._size = 'medium';
|
|
10366
|
+
this._rounded = 'medium';
|
|
10367
|
+
this._fillMode = 'solid';
|
|
9480
10368
|
this.subscriptions = [];
|
|
9481
10369
|
this.lastAction = 'check';
|
|
9482
10370
|
this.onTouchedCallback = noop;
|
|
9483
10371
|
this.onChangeCallback = noop;
|
|
9484
10372
|
this.direction = localization.rtl ? 'rtl' : 'ltr';
|
|
9485
10373
|
this.subscribeEvents();
|
|
10374
|
+
this.subscribeFocusEvents();
|
|
10375
|
+
}
|
|
10376
|
+
get isDisabled() {
|
|
10377
|
+
return this.disabled;
|
|
10378
|
+
}
|
|
10379
|
+
get isLoading() {
|
|
10380
|
+
return this.loading;
|
|
10381
|
+
}
|
|
10382
|
+
get id() {
|
|
10383
|
+
return this.focusableId;
|
|
10384
|
+
}
|
|
10385
|
+
get hostTabIndex() {
|
|
10386
|
+
return this.tabindex;
|
|
10387
|
+
}
|
|
10388
|
+
get isReadonly() {
|
|
10389
|
+
return this.readonly;
|
|
10390
|
+
}
|
|
10391
|
+
get ariaDescribedBy() {
|
|
10392
|
+
return this.tagListId;
|
|
10393
|
+
}
|
|
10394
|
+
get ariaActiveDescendant() {
|
|
10395
|
+
return this.focusedTagId;
|
|
10396
|
+
}
|
|
10397
|
+
/**
|
|
10398
|
+
* @hidden
|
|
10399
|
+
*/
|
|
10400
|
+
handleClick() {
|
|
10401
|
+
this.togglePopup(!this.isOpen);
|
|
10402
|
+
}
|
|
10403
|
+
/**
|
|
10404
|
+
* @hidden
|
|
10405
|
+
*/
|
|
10406
|
+
handleKeydown(event) {
|
|
10407
|
+
const deleteTag = this.isWrapperActive && event.keyCode === Keys.Backspace && this.tags.length > 0;
|
|
10408
|
+
if (deleteTag) {
|
|
10409
|
+
this.handleBackspace();
|
|
10410
|
+
return;
|
|
10411
|
+
}
|
|
10412
|
+
if (this.disabled || this.readonly) {
|
|
10413
|
+
return;
|
|
10414
|
+
}
|
|
10415
|
+
const eventData = event;
|
|
10416
|
+
const action = this.navigationService.process({
|
|
10417
|
+
originalEvent: eventData
|
|
10418
|
+
});
|
|
10419
|
+
if (action === NavigationAction.Open) {
|
|
10420
|
+
eventData.preventDefault();
|
|
10421
|
+
}
|
|
9486
10422
|
}
|
|
9487
10423
|
set treeview(treeview) {
|
|
9488
10424
|
this._treeview = treeview;
|
|
@@ -9515,6 +10451,67 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
9515
10451
|
get tabindex() {
|
|
9516
10452
|
return this.disabled ? -1 : this._tabindex;
|
|
9517
10453
|
}
|
|
10454
|
+
/**
|
|
10455
|
+
* Sets the size of the component.
|
|
10456
|
+
*
|
|
10457
|
+
* The possible values are:
|
|
10458
|
+
* * `'small'`
|
|
10459
|
+
* * `'medium'` (default)
|
|
10460
|
+
* * `'large'`
|
|
10461
|
+
* * `null`
|
|
10462
|
+
*
|
|
10463
|
+
*/
|
|
10464
|
+
set size(size) {
|
|
10465
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
10466
|
+
if (size) {
|
|
10467
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', size));
|
|
10468
|
+
}
|
|
10469
|
+
this._size = size;
|
|
10470
|
+
}
|
|
10471
|
+
get size() {
|
|
10472
|
+
return this._size;
|
|
10473
|
+
}
|
|
10474
|
+
/**
|
|
10475
|
+
* Sets the border radius of the component.
|
|
10476
|
+
*
|
|
10477
|
+
* The possible values are:
|
|
10478
|
+
* * `'small'`
|
|
10479
|
+
* * `'medium'` (default)
|
|
10480
|
+
* * `'large'`
|
|
10481
|
+
* * `'full'`
|
|
10482
|
+
* * `null`
|
|
10483
|
+
*
|
|
10484
|
+
*/
|
|
10485
|
+
set rounded(rounded) {
|
|
10486
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
10487
|
+
if (rounded) {
|
|
10488
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(rounded));
|
|
10489
|
+
}
|
|
10490
|
+
this._rounded = rounded;
|
|
10491
|
+
}
|
|
10492
|
+
get rounded() {
|
|
10493
|
+
return this._rounded;
|
|
10494
|
+
}
|
|
10495
|
+
/**
|
|
10496
|
+
* Sets the fillMode of the component.
|
|
10497
|
+
*
|
|
10498
|
+
* The possible values are:
|
|
10499
|
+
* * `'flat'`
|
|
10500
|
+
* * `'solid'` (default)
|
|
10501
|
+
* * `'outline'`
|
|
10502
|
+
* * `null`
|
|
10503
|
+
*
|
|
10504
|
+
*/
|
|
10505
|
+
set fillMode(fillMode) {
|
|
10506
|
+
this.renderer.removeClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
10507
|
+
if (fillMode) {
|
|
10508
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', fillMode));
|
|
10509
|
+
}
|
|
10510
|
+
this._fillMode = fillMode;
|
|
10511
|
+
}
|
|
10512
|
+
get fillMode() {
|
|
10513
|
+
return this._fillMode;
|
|
10514
|
+
}
|
|
9518
10515
|
/**
|
|
9519
10516
|
* Configures the popup of the MultiSelectTree.
|
|
9520
10517
|
*
|
|
@@ -9604,7 +10601,7 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
9604
10601
|
return `${this.tagPrefix}-${valueFrom({ dataItem }, this.valueField)}`;
|
|
9605
10602
|
}
|
|
9606
10603
|
set isFocused(isFocused) {
|
|
9607
|
-
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.
|
|
10604
|
+
this.renderer[isFocused ? 'addClass' : 'removeClass'](this.wrapper.nativeElement, 'k-focus');
|
|
9608
10605
|
this._isFocused = isFocused;
|
|
9609
10606
|
}
|
|
9610
10607
|
get isFocused() {
|
|
@@ -9638,7 +10635,7 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
9638
10635
|
* @hidden
|
|
9639
10636
|
*/
|
|
9640
10637
|
get popupContainerClasses() {
|
|
9641
|
-
const containerClasses = ['k-popup-dropdowntree'
|
|
10638
|
+
const containerClasses = ['k-popup-dropdowntree'];
|
|
9642
10639
|
if (this.popupSettings.popupClass) {
|
|
9643
10640
|
containerClasses.push(this.popupSettings.popupClass);
|
|
9644
10641
|
}
|
|
@@ -9726,13 +10723,14 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
9726
10723
|
return this.checkAllInput && document.activeElement === this.checkAllInput.nativeElement;
|
|
9727
10724
|
}
|
|
9728
10725
|
ngOnInit() {
|
|
9729
|
-
this.renderer.removeAttribute(this.
|
|
10726
|
+
this.renderer.removeAttribute(this.wrapper.nativeElement, 'tabindex');
|
|
9730
10727
|
this.renderer.setAttribute(this.wrapper.nativeElement, 'aria-expanded', String(this.isOpen));
|
|
9731
10728
|
this.subscriptions.push(this.localization
|
|
9732
10729
|
.changes.subscribe(({ rtl }) => {
|
|
9733
10730
|
this.direction = rtl ? 'rtl' : 'ltr';
|
|
9734
10731
|
this.cdr.markForCheck();
|
|
9735
10732
|
}));
|
|
10733
|
+
this.setComponentClasses();
|
|
9736
10734
|
}
|
|
9737
10735
|
/**
|
|
9738
10736
|
* @hidden
|
|
@@ -9836,7 +10834,11 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
9836
10834
|
/**
|
|
9837
10835
|
* @hidden
|
|
9838
10836
|
*/
|
|
9839
|
-
handleFocus() {
|
|
10837
|
+
handleFocus(event) {
|
|
10838
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
10839
|
+
return;
|
|
10840
|
+
}
|
|
10841
|
+
event.stopImmediatePropagation();
|
|
9840
10842
|
if (!this.isFocused) {
|
|
9841
10843
|
this.isFocused = true;
|
|
9842
10844
|
if (hasObservers(this.onFocus)) {
|
|
@@ -9846,7 +10848,9 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
9846
10848
|
}
|
|
9847
10849
|
// Re-focus the treeview if `close` is prevented
|
|
9848
10850
|
if (this.isOpen && this.treeview) {
|
|
9849
|
-
this.lastNodeOnFocus
|
|
10851
|
+
if (this.lastNodeOnFocus) {
|
|
10852
|
+
this.lastNodeOnFocus.setAttribute('tabindex', '0');
|
|
10853
|
+
}
|
|
9850
10854
|
this.treeview.focus();
|
|
9851
10855
|
}
|
|
9852
10856
|
}
|
|
@@ -9856,46 +10860,20 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
9856
10860
|
*/
|
|
9857
10861
|
handleBlur(e) {
|
|
9858
10862
|
const relatedTarget = e && e.relatedTarget;
|
|
9859
|
-
if (this.
|
|
10863
|
+
if (this.wrapper.nativeElement.contains(relatedTarget) ||
|
|
9860
10864
|
(this.isOpen && this.popupRef.popupElement.contains(relatedTarget))) {
|
|
9861
10865
|
return;
|
|
9862
10866
|
}
|
|
9863
10867
|
this.isFocused = false;
|
|
9864
10868
|
this.togglePopup(false);
|
|
9865
10869
|
if (hasObservers(this.onBlur) ||
|
|
9866
|
-
isUntouched(this.
|
|
10870
|
+
isUntouched(this.wrapper.nativeElement)) {
|
|
9867
10871
|
this._zone.run(() => {
|
|
9868
10872
|
this.onBlur.emit();
|
|
9869
10873
|
this.onTouchedCallback();
|
|
9870
10874
|
});
|
|
9871
10875
|
}
|
|
9872
10876
|
}
|
|
9873
|
-
/**
|
|
9874
|
-
* @hidden
|
|
9875
|
-
*/
|
|
9876
|
-
handleClick() {
|
|
9877
|
-
this.togglePopup(!this.isOpen);
|
|
9878
|
-
}
|
|
9879
|
-
/**
|
|
9880
|
-
* @hidden
|
|
9881
|
-
*/
|
|
9882
|
-
handleKeydown(event) {
|
|
9883
|
-
const deleteTag = this.isWrapperActive && event.keyCode === Keys.Backspace && this.tags.length > 0;
|
|
9884
|
-
if (deleteTag) {
|
|
9885
|
-
this.handleBackspace();
|
|
9886
|
-
return;
|
|
9887
|
-
}
|
|
9888
|
-
if (this.disabled || this.readonly) {
|
|
9889
|
-
return;
|
|
9890
|
-
}
|
|
9891
|
-
const eventData = event;
|
|
9892
|
-
const action = this.navigationService.process({
|
|
9893
|
-
originalEvent: eventData
|
|
9894
|
-
});
|
|
9895
|
-
if (action === NavigationAction.Open) {
|
|
9896
|
-
eventData.preventDefault();
|
|
9897
|
-
}
|
|
9898
|
-
}
|
|
9899
10877
|
/**
|
|
9900
10878
|
* @hidden
|
|
9901
10879
|
*/
|
|
@@ -10030,6 +11008,18 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
10030
11008
|
this.filterChange.next(term);
|
|
10031
11009
|
this.allNodesHidden = this.nodes.every((node, index) => !this.isVisible(node, String(index)));
|
|
10032
11010
|
}
|
|
11011
|
+
/**
|
|
11012
|
+
* @hidden
|
|
11013
|
+
*/
|
|
11014
|
+
get filterInputClasses() {
|
|
11015
|
+
return `${this.size ? getSizeClass('input', this.size) : ''} ${this.fillMode ? 'k-input-' + this.fillMode : ''} ${this.rounded ? getRoundedClass(this.rounded) : ''}`;
|
|
11016
|
+
}
|
|
11017
|
+
/**
|
|
11018
|
+
* @hidden
|
|
11019
|
+
*/
|
|
11020
|
+
get checkAllCheckboxClasses() {
|
|
11021
|
+
return `${this.size ? getSizeClass('checkbox', this.size) : ''}`;
|
|
11022
|
+
}
|
|
10033
11023
|
/**
|
|
10034
11024
|
* @hidden
|
|
10035
11025
|
*/
|
|
@@ -10142,6 +11132,31 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
10142
11132
|
.pipe(filter(() => !this.isTreeViewActive))
|
|
10143
11133
|
.subscribe(this.direction === 'rtl' ? this.handleLeftKey.bind(this) : this.handleRightKey.bind(this)), this.navigationService.home.pipe(filter(() => !this.isOpen)).subscribe(this.handleHome.bind(this)), this.navigationService.end.pipe(filter(() => !this.isOpen)).subscribe(this.handleEnd.bind(this)), this.navigationService.backspace.pipe(filter(() => this.isTagFocused)).subscribe(this.handleBackspace.bind(this)), this.navigationService.delete.pipe(filter(() => this.isTagFocused)).subscribe(this.handleDelete.bind(this)));
|
|
10144
11134
|
}
|
|
11135
|
+
subscribeFocusEvents() {
|
|
11136
|
+
if (isDocumentAvailable()) {
|
|
11137
|
+
this.handleFocus = this.handleFocus.bind(this);
|
|
11138
|
+
this.handleDocumentBlur = this.handleDocumentBlur.bind(this);
|
|
11139
|
+
this._zone.runOutsideAngular(() => {
|
|
11140
|
+
const useCapture = true;
|
|
11141
|
+
document.addEventListener('focus', this.handleFocus, useCapture);
|
|
11142
|
+
document.addEventListener('blur', this.handleDocumentBlur, useCapture);
|
|
11143
|
+
});
|
|
11144
|
+
}
|
|
11145
|
+
}
|
|
11146
|
+
unSubscribeFocusEvents() {
|
|
11147
|
+
if (isDocumentAvailable()) {
|
|
11148
|
+
const useCapture = true;
|
|
11149
|
+
document.removeEventListener('focus', this.handleFocus, useCapture);
|
|
11150
|
+
document.removeEventListener('blur', this.handleDocumentBlur, useCapture);
|
|
11151
|
+
}
|
|
11152
|
+
}
|
|
11153
|
+
handleDocumentBlur(event) {
|
|
11154
|
+
if (event.target !== this.wrapper.nativeElement) {
|
|
11155
|
+
return;
|
|
11156
|
+
}
|
|
11157
|
+
event.stopImmediatePropagation();
|
|
11158
|
+
this.handleBlur(event);
|
|
11159
|
+
}
|
|
10145
11160
|
handleTabKey() {
|
|
10146
11161
|
this.focus();
|
|
10147
11162
|
if (this.isOpen) {
|
|
@@ -10244,6 +11259,7 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
10244
11259
|
}
|
|
10245
11260
|
unsubscribeEvents() {
|
|
10246
11261
|
this.subscriptions.forEach(sub => sub.unsubscribe());
|
|
11262
|
+
this.unSubscribeFocusEvents();
|
|
10247
11263
|
}
|
|
10248
11264
|
/**
|
|
10249
11265
|
* Remove the `TreeView` from the tab order, otherwise a focus loop between the page elements will occur
|
|
@@ -10290,16 +11306,84 @@ let MultiSelectTreeComponent = MultiSelectTreeComponent_1 = class MultiSelectTre
|
|
|
10290
11306
|
return indices;
|
|
10291
11307
|
}, []));
|
|
10292
11308
|
}
|
|
11309
|
+
setComponentClasses() {
|
|
11310
|
+
if (this.size) {
|
|
11311
|
+
this.renderer.addClass(this.wrapper.nativeElement, getSizeClass('input', this.size));
|
|
11312
|
+
}
|
|
11313
|
+
if (this.rounded) {
|
|
11314
|
+
this.renderer.addClass(this.wrapper.nativeElement, getRoundedClass(this.rounded));
|
|
11315
|
+
}
|
|
11316
|
+
if (this.fillMode) {
|
|
11317
|
+
this.renderer.addClass(this.wrapper.nativeElement, getFillModeClass('input', this.fillMode));
|
|
11318
|
+
}
|
|
11319
|
+
}
|
|
10293
11320
|
};
|
|
10294
11321
|
__decorate([
|
|
10295
|
-
HostBinding('class.k-widget'),
|
|
10296
11322
|
HostBinding('class.k-dropdowntree'),
|
|
11323
|
+
HostBinding('class.k-input'),
|
|
10297
11324
|
__metadata("design:type", Boolean)
|
|
10298
11325
|
], MultiSelectTreeComponent.prototype, "hostClasses", void 0);
|
|
11326
|
+
__decorate([
|
|
11327
|
+
HostBinding('class.k-disabled'),
|
|
11328
|
+
HostBinding('attr.aria-disabled'),
|
|
11329
|
+
__metadata("design:type", Boolean),
|
|
11330
|
+
__metadata("design:paramtypes", [])
|
|
11331
|
+
], MultiSelectTreeComponent.prototype, "isDisabled", null);
|
|
11332
|
+
__decorate([
|
|
11333
|
+
HostBinding('class.k-loading'),
|
|
11334
|
+
__metadata("design:type", Boolean),
|
|
11335
|
+
__metadata("design:paramtypes", [])
|
|
11336
|
+
], MultiSelectTreeComponent.prototype, "isLoading", null);
|
|
11337
|
+
__decorate([
|
|
11338
|
+
HostBinding('attr.id'),
|
|
11339
|
+
__metadata("design:type", String),
|
|
11340
|
+
__metadata("design:paramtypes", [])
|
|
11341
|
+
], MultiSelectTreeComponent.prototype, "id", null);
|
|
10299
11342
|
__decorate([
|
|
10300
11343
|
HostBinding('attr.dir'),
|
|
10301
11344
|
__metadata("design:type", String)
|
|
10302
11345
|
], MultiSelectTreeComponent.prototype, "direction", void 0);
|
|
11346
|
+
__decorate([
|
|
11347
|
+
HostBinding('attr.tabindex'),
|
|
11348
|
+
__metadata("design:type", Number),
|
|
11349
|
+
__metadata("design:paramtypes", [])
|
|
11350
|
+
], MultiSelectTreeComponent.prototype, "hostTabIndex", null);
|
|
11351
|
+
__decorate([
|
|
11352
|
+
HostBinding('attr.role'),
|
|
11353
|
+
__metadata("design:type", String)
|
|
11354
|
+
], MultiSelectTreeComponent.prototype, "role", void 0);
|
|
11355
|
+
__decorate([
|
|
11356
|
+
HostBinding('attr.aria-haspopup'),
|
|
11357
|
+
__metadata("design:type", String)
|
|
11358
|
+
], MultiSelectTreeComponent.prototype, "ariaHasPopup", void 0);
|
|
11359
|
+
__decorate([
|
|
11360
|
+
HostBinding('attr.readonly'),
|
|
11361
|
+
HostBinding('attr.aria-readonly'),
|
|
11362
|
+
__metadata("design:type", Boolean),
|
|
11363
|
+
__metadata("design:paramtypes", [])
|
|
11364
|
+
], MultiSelectTreeComponent.prototype, "isReadonly", null);
|
|
11365
|
+
__decorate([
|
|
11366
|
+
HostBinding('attr.aria-describedby'),
|
|
11367
|
+
__metadata("design:type", String),
|
|
11368
|
+
__metadata("design:paramtypes", [])
|
|
11369
|
+
], MultiSelectTreeComponent.prototype, "ariaDescribedBy", null);
|
|
11370
|
+
__decorate([
|
|
11371
|
+
HostBinding('attr.aria-activedescendant'),
|
|
11372
|
+
__metadata("design:type", String),
|
|
11373
|
+
__metadata("design:paramtypes", [])
|
|
11374
|
+
], MultiSelectTreeComponent.prototype, "ariaActiveDescendant", null);
|
|
11375
|
+
__decorate([
|
|
11376
|
+
HostListener('click'),
|
|
11377
|
+
__metadata("design:type", Function),
|
|
11378
|
+
__metadata("design:paramtypes", []),
|
|
11379
|
+
__metadata("design:returntype", void 0)
|
|
11380
|
+
], MultiSelectTreeComponent.prototype, "handleClick", null);
|
|
11381
|
+
__decorate([
|
|
11382
|
+
HostListener('keydown', ['$event']),
|
|
11383
|
+
__metadata("design:type", Function),
|
|
11384
|
+
__metadata("design:paramtypes", [Object]),
|
|
11385
|
+
__metadata("design:returntype", void 0)
|
|
11386
|
+
], MultiSelectTreeComponent.prototype, "handleKeydown", null);
|
|
10303
11387
|
__decorate([
|
|
10304
11388
|
ContentChild(HeaderTemplateDirective, { static: false }),
|
|
10305
11389
|
__metadata("design:type", HeaderTemplateDirective)
|
|
@@ -10328,10 +11412,6 @@ __decorate([
|
|
|
10328
11412
|
ViewChild('popupTemplate', { static: true }),
|
|
10329
11413
|
__metadata("design:type", TemplateRef)
|
|
10330
11414
|
], MultiSelectTreeComponent.prototype, "popupTemplate", void 0);
|
|
10331
|
-
__decorate([
|
|
10332
|
-
ViewChild('wrapper', { static: true }),
|
|
10333
|
-
__metadata("design:type", ElementRef)
|
|
10334
|
-
], MultiSelectTreeComponent.prototype, "wrapper", void 0);
|
|
10335
11415
|
__decorate([
|
|
10336
11416
|
ViewChild('container', { read: ViewContainerRef, static: true }),
|
|
10337
11417
|
__metadata("design:type", ViewContainerRef)
|
|
@@ -10354,6 +11434,21 @@ __decorate([
|
|
|
10354
11434
|
__metadata("design:type", Number),
|
|
10355
11435
|
__metadata("design:paramtypes", [Number])
|
|
10356
11436
|
], MultiSelectTreeComponent.prototype, "tabindex", null);
|
|
11437
|
+
__decorate([
|
|
11438
|
+
Input(),
|
|
11439
|
+
__metadata("design:type", String),
|
|
11440
|
+
__metadata("design:paramtypes", [String])
|
|
11441
|
+
], MultiSelectTreeComponent.prototype, "size", null);
|
|
11442
|
+
__decorate([
|
|
11443
|
+
Input(),
|
|
11444
|
+
__metadata("design:type", String),
|
|
11445
|
+
__metadata("design:paramtypes", [String])
|
|
11446
|
+
], MultiSelectTreeComponent.prototype, "rounded", null);
|
|
11447
|
+
__decorate([
|
|
11448
|
+
Input(),
|
|
11449
|
+
__metadata("design:type", String),
|
|
11450
|
+
__metadata("design:paramtypes", [String])
|
|
11451
|
+
], MultiSelectTreeComponent.prototype, "fillMode", null);
|
|
10357
11452
|
__decorate([
|
|
10358
11453
|
Input(),
|
|
10359
11454
|
__metadata("design:type", Object),
|
|
@@ -10547,87 +11642,75 @@ MultiSelectTreeComponent = MultiSelectTreeComponent_1 = __decorate([
|
|
|
10547
11642
|
checkAllText="Check all"
|
|
10548
11643
|
>
|
|
10549
11644
|
</ng-container>
|
|
10550
|
-
<
|
|
10551
|
-
[
|
|
10552
|
-
|
|
10553
|
-
|
|
10554
|
-
|
|
10555
|
-
|
|
10556
|
-
|
|
10557
|
-
|
|
10558
|
-
[
|
|
10559
|
-
[
|
|
10560
|
-
[
|
|
10561
|
-
[
|
|
10562
|
-
[
|
|
10563
|
-
[
|
|
10564
|
-
|
|
10565
|
-
(
|
|
10566
|
-
[kendoEventsOutsideAngular]="{
|
|
10567
|
-
focus: handleFocus,
|
|
10568
|
-
blur: handleBlur
|
|
10569
|
-
}"
|
|
10570
|
-
[scope]="this"
|
|
11645
|
+
<kendo-taglist
|
|
11646
|
+
[size]="size"
|
|
11647
|
+
[rounded]="rounded"
|
|
11648
|
+
[fillMode]="fillMode"
|
|
11649
|
+
[id]="tagListId"
|
|
11650
|
+
[tags]="tags"
|
|
11651
|
+
[focused]="focusedTagIndex"
|
|
11652
|
+
[textField]="textField"
|
|
11653
|
+
[valueField]="valueField"
|
|
11654
|
+
[valueDepth]="valueDepth"
|
|
11655
|
+
[disabled]="disabled"
|
|
11656
|
+
[tagPrefix]="tagPrefix"
|
|
11657
|
+
[template]="tagTemplate"
|
|
11658
|
+
[groupTemplate]="groupTagTemplate"
|
|
11659
|
+
[disabledIndices]="disabledIndices"
|
|
11660
|
+
(removeTag)="handleRemoveTag($event)"
|
|
10571
11661
|
>
|
|
10572
|
-
<kendo-taglist
|
|
10573
|
-
[id]="tagListId"
|
|
10574
|
-
[tags]="tags"
|
|
10575
|
-
[focused]="focusedTagIndex"
|
|
10576
|
-
[textField]="textField"
|
|
10577
|
-
[valueField]="valueField"
|
|
10578
|
-
[valueDepth]="valueDepth"
|
|
10579
|
-
[disabled]="disabled"
|
|
10580
|
-
[tagPrefix]="tagPrefix"
|
|
10581
|
-
[template]="tagTemplate"
|
|
10582
|
-
[groupTemplate]="groupTagTemplate"
|
|
10583
|
-
[disabledIndices]="disabledIndices"
|
|
10584
|
-
(removeTag)="handleRemoveTag($event)"
|
|
10585
|
-
>
|
|
10586
|
-
</kendo-taglist>
|
|
10587
11662
|
<span *ngIf="!tags || !tags.length"
|
|
10588
|
-
class="k-input k-readonly"
|
|
10589
|
-
>
|
|
10590
|
-
{{ placeholder }}
|
|
10591
|
-
</span>
|
|
10592
|
-
<span
|
|
10593
|
-
*ngIf="!disabled && !loading && !readonly && clearButton && tags?.length"
|
|
10594
|
-
class="k-icon k-clear-value k-i-close"
|
|
10595
|
-
[attr.title]="messageFor('clearTitle')"
|
|
10596
|
-
role="button"
|
|
10597
|
-
tabindex="-1"
|
|
10598
|
-
(click)="clearAll($event)"
|
|
10599
|
-
>
|
|
10600
|
-
</span>
|
|
10601
|
-
<span
|
|
10602
|
-
*ngIf="loading"
|
|
10603
|
-
class="k-icon k-i-loading"
|
|
11663
|
+
class="k-input-inner k-readonly"
|
|
10604
11664
|
>
|
|
11665
|
+
<span class="k-input-value-text">{{ placeholder }}</span>
|
|
10605
11666
|
</span>
|
|
10606
|
-
</
|
|
11667
|
+
</kendo-taglist>
|
|
11668
|
+
<span
|
|
11669
|
+
*ngIf="!disabled && !loading && !readonly && clearButton && tags?.length"
|
|
11670
|
+
class="k-clear-value"
|
|
11671
|
+
[attr.title]="messageFor('clearTitle')"
|
|
11672
|
+
role="button"
|
|
11673
|
+
tabindex="-1"
|
|
11674
|
+
(click)="clearAll($event)"
|
|
11675
|
+
>
|
|
11676
|
+
<span class="k-icon k-i-x"></span>
|
|
11677
|
+
</span>
|
|
11678
|
+
<span
|
|
11679
|
+
*ngIf="loading"
|
|
11680
|
+
class="k-icon k-i-loading"
|
|
11681
|
+
>
|
|
11682
|
+
</span>
|
|
10607
11683
|
<ng-template #popupTemplate>
|
|
10608
11684
|
<span
|
|
10609
11685
|
*ngIf="filterable"
|
|
10610
11686
|
class="k-list-filter"
|
|
10611
11687
|
>
|
|
10612
|
-
<
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
[filterInput]="filterable && !touchEnabled"
|
|
10616
|
-
(keydown)="handleKeydown($event)"
|
|
10617
|
-
[(ngModel)]="filter"
|
|
10618
|
-
class="k-textbox"
|
|
10619
|
-
role="textbox"
|
|
10620
|
-
aria-haspopup="true"
|
|
10621
|
-
aria-expanded="false"
|
|
10622
|
-
tabindex="0"
|
|
10623
|
-
aria-disabled="false"
|
|
10624
|
-
aria-readonly="false"
|
|
10625
|
-
[kendoEventsOutsideAngular]="{
|
|
10626
|
-
blur: handleBlur
|
|
10627
|
-
}"
|
|
10628
|
-
[scope]="this"
|
|
11688
|
+
<span
|
|
11689
|
+
class="k-textbox k-input"
|
|
11690
|
+
[ngClass]="filterInputClasses"
|
|
10629
11691
|
>
|
|
10630
|
-
|
|
11692
|
+
<span class="k-input-prefix">
|
|
11693
|
+
<span class="k-input-icon k-icon k-i-search"></span>
|
|
11694
|
+
</span>
|
|
11695
|
+
<input
|
|
11696
|
+
#filterInput
|
|
11697
|
+
(input)="handleFilterInputChange($event.target.value)"
|
|
11698
|
+
[filterInput]="filterable && !touchEnabled"
|
|
11699
|
+
(keydown)="handleKeydown($event)"
|
|
11700
|
+
[(ngModel)]="filter"
|
|
11701
|
+
class="k-input-inner"
|
|
11702
|
+
role="textbox"
|
|
11703
|
+
aria-haspopup="true"
|
|
11704
|
+
aria-expanded="false"
|
|
11705
|
+
tabindex="0"
|
|
11706
|
+
aria-disabled="false"
|
|
11707
|
+
aria-readonly="false"
|
|
11708
|
+
[kendoEventsOutsideAngular]="{
|
|
11709
|
+
blur: handleBlur
|
|
11710
|
+
}"
|
|
11711
|
+
[scope]="this"
|
|
11712
|
+
>
|
|
11713
|
+
</span>
|
|
10631
11714
|
</span>
|
|
10632
11715
|
<!--header template-->
|
|
10633
11716
|
<ng-template
|
|
@@ -10642,6 +11725,7 @@ MultiSelectTreeComponent = MultiSelectTreeComponent_1 = __decorate([
|
|
|
10642
11725
|
[checkAll]="!filterable && !touchEnabled"
|
|
10643
11726
|
type="checkbox"
|
|
10644
11727
|
class="k-checkbox"
|
|
11728
|
+
[ngClass]="checkAllCheckboxClasses"
|
|
10645
11729
|
role="checkbox"
|
|
10646
11730
|
tabindex="0"
|
|
10647
11731
|
aria-disabled="false"
|
|
@@ -10667,6 +11751,7 @@ MultiSelectTreeComponent = MultiSelectTreeComponent_1 = __decorate([
|
|
|
10667
11751
|
</div>
|
|
10668
11752
|
<kendo-treeview
|
|
10669
11753
|
#treeview
|
|
11754
|
+
[size]="size"
|
|
10670
11755
|
[nodes]="data"
|
|
10671
11756
|
[style.maxHeight.px]="listHeight"
|
|
10672
11757
|
[animate]="false"
|
|
@@ -10702,7 +11787,7 @@ MultiSelectTreeComponent = MultiSelectTreeComponent_1 = __decorate([
|
|
|
10702
11787
|
}">
|
|
10703
11788
|
</ng-template>
|
|
10704
11789
|
<!--no-data template-->
|
|
10705
|
-
<div class="k-
|
|
11790
|
+
<div class="k-no-data" *ngIf="data?.length === 0 || allNodesHidden">
|
|
10706
11791
|
<ng-template [ngIf]="noDataTemplate"
|
|
10707
11792
|
[templateContext]="{
|
|
10708
11793
|
templateRef: noDataTemplate?.templateRef
|
|
@@ -10717,9 +11802,9 @@ MultiSelectTreeComponent = MultiSelectTreeComponent_1 = __decorate([
|
|
|
10717
11802
|
`
|
|
10718
11803
|
}),
|
|
10719
11804
|
__param(7, Optional()), __param(7, Inject(TOUCH_ENABLED)),
|
|
10720
|
-
__metadata("design:paramtypes", [
|
|
11805
|
+
__metadata("design:paramtypes", [ElementRef,
|
|
11806
|
+
PopupService,
|
|
10721
11807
|
Renderer2,
|
|
10722
|
-
ElementRef,
|
|
10723
11808
|
NavigationService,
|
|
10724
11809
|
NgZone,
|
|
10725
11810
|
LocalizationService,
|
|
@@ -10851,15 +11936,31 @@ DropDownTreesExpandDirective = __decorate([
|
|
|
10851
11936
|
* @hidden
|
|
10852
11937
|
*/
|
|
10853
11938
|
let TagListComponent = class TagListComponent {
|
|
10854
|
-
|
|
10855
|
-
|
|
10856
|
-
|
|
10857
|
-
|
|
11939
|
+
constructor(renderer, hostElement) {
|
|
11940
|
+
this.renderer = renderer;
|
|
11941
|
+
this.hostElement = hostElement;
|
|
11942
|
+
this.rounded = 'medium';
|
|
11943
|
+
this.fillMode = 'solid';
|
|
10858
11944
|
/**
|
|
10859
11945
|
* A collection with the disabled tags' indices.
|
|
10860
11946
|
*/
|
|
10861
11947
|
this.disabledIndices = new Set();
|
|
10862
11948
|
this.removeTag = new EventEmitter();
|
|
11949
|
+
this.hostClasses = true;
|
|
11950
|
+
this._size = 'medium';
|
|
11951
|
+
}
|
|
11952
|
+
set size(size) {
|
|
11953
|
+
this.renderer.removeClass(this.hostElement.nativeElement, getSizeClass('chip-list', this.size));
|
|
11954
|
+
if (size) {
|
|
11955
|
+
this.renderer.addClass(this.hostElement.nativeElement, getSizeClass('chip-list', size));
|
|
11956
|
+
}
|
|
11957
|
+
this._size = size;
|
|
11958
|
+
}
|
|
11959
|
+
get size() {
|
|
11960
|
+
return this._size;
|
|
11961
|
+
}
|
|
11962
|
+
get hostId() {
|
|
11963
|
+
return this.id;
|
|
10863
11964
|
}
|
|
10864
11965
|
tagProp(tag, prop, index) {
|
|
10865
11966
|
const propField = prop && this.getPropField(tag, prop, index);
|
|
@@ -10950,6 +12051,19 @@ __decorate([
|
|
|
10950
12051
|
Input(),
|
|
10951
12052
|
__metadata("design:type", String)
|
|
10952
12053
|
], TagListComponent.prototype, "id", void 0);
|
|
12054
|
+
__decorate([
|
|
12055
|
+
Input(),
|
|
12056
|
+
__metadata("design:type", String),
|
|
12057
|
+
__metadata("design:paramtypes", [String])
|
|
12058
|
+
], TagListComponent.prototype, "size", null);
|
|
12059
|
+
__decorate([
|
|
12060
|
+
Input(),
|
|
12061
|
+
__metadata("design:type", String)
|
|
12062
|
+
], TagListComponent.prototype, "rounded", void 0);
|
|
12063
|
+
__decorate([
|
|
12064
|
+
Input(),
|
|
12065
|
+
__metadata("design:type", String)
|
|
12066
|
+
], TagListComponent.prototype, "fillMode", void 0);
|
|
10953
12067
|
__decorate([
|
|
10954
12068
|
Input(),
|
|
10955
12069
|
__metadata("design:type", Set)
|
|
@@ -10958,56 +12072,82 @@ __decorate([
|
|
|
10958
12072
|
Output(),
|
|
10959
12073
|
__metadata("design:type", EventEmitter)
|
|
10960
12074
|
], TagListComponent.prototype, "removeTag", void 0);
|
|
12075
|
+
__decorate([
|
|
12076
|
+
HostBinding('class.k-input-values'),
|
|
12077
|
+
HostBinding('class.k-chip-list'),
|
|
12078
|
+
HostBinding('class.k-selection-multiple'),
|
|
12079
|
+
__metadata("design:type", Boolean)
|
|
12080
|
+
], TagListComponent.prototype, "hostClasses", void 0);
|
|
12081
|
+
__decorate([
|
|
12082
|
+
HostBinding('attr.id'),
|
|
12083
|
+
__metadata("design:type", String),
|
|
12084
|
+
__metadata("design:paramtypes", [])
|
|
12085
|
+
], TagListComponent.prototype, "hostId", null);
|
|
10961
12086
|
TagListComponent = __decorate([
|
|
10962
12087
|
Component({
|
|
10963
12088
|
selector: 'kendo-taglist',
|
|
10964
12089
|
template: `
|
|
10965
|
-
<
|
|
10966
|
-
|
|
10967
|
-
|
|
10968
|
-
|
|
10969
|
-
|
|
10970
|
-
|
|
10971
|
-
|
|
10972
|
-
|
|
10973
|
-
|
|
10974
|
-
|
|
10975
|
-
|
|
10976
|
-
|
|
10977
|
-
|
|
10978
|
-
|
|
12090
|
+
<div
|
|
12091
|
+
*ngFor="let tag of tags; let index = index;"
|
|
12092
|
+
role="option"
|
|
12093
|
+
[attr.id]="itemId(tag, index)"
|
|
12094
|
+
[attr.aria-hidden]="tagAriaHidden(index)"
|
|
12095
|
+
aria-selected="true"
|
|
12096
|
+
[attr.aria-setsize]="tags?.length"
|
|
12097
|
+
class="k-chip"
|
|
12098
|
+
[ngClass]="{
|
|
12099
|
+
'k-focus': index === focused,
|
|
12100
|
+
'k-disabled': isTagDisabled(tag, index),
|
|
12101
|
+
'k-chip-sm': size === 'small',
|
|
12102
|
+
'k-chip-md': size === 'medium',
|
|
12103
|
+
'k-chip-lg': size === 'large',
|
|
12104
|
+
'k-rounded-sm': rounded === 'small',
|
|
12105
|
+
'k-rounded-md': rounded === 'medium',
|
|
12106
|
+
'k-rounded-lg': rounded === 'large',
|
|
12107
|
+
'k-rounded-full': rounded === 'full',
|
|
12108
|
+
'k-chip-solid k-chip-solid-base': fillMode === 'solid',
|
|
12109
|
+
'k-chip-flat k-chip-flat-base': fillMode === 'flat',
|
|
12110
|
+
'k-chip-outline k-chip-outline-base': fillMode === 'outline'
|
|
12111
|
+
}"
|
|
12112
|
+
>
|
|
12113
|
+
<span class="k-chip-content">
|
|
10979
12114
|
<ng-template *ngIf="isGroupTag(tag); then groupTag else singleTag"></ng-template>
|
|
10980
|
-
|
|
10981
|
-
|
|
10982
|
-
|
|
10983
|
-
|
|
10984
|
-
|
|
10985
|
-
|
|
10986
|
-
|
|
10987
|
-
|
|
10988
|
-
|
|
10989
|
-
|
|
10990
|
-
|
|
10991
|
-
|
|
10992
|
-
|
|
10993
|
-
|
|
10994
|
-
|
|
10995
|
-
|
|
10996
|
-
|
|
10997
|
-
|
|
10998
|
-
|
|
10999
|
-
|
|
11000
|
-
|
|
11001
|
-
|
|
12115
|
+
<ng-template #groupTag>
|
|
12116
|
+
<span class="k-chip-label k-text-ellipsis">
|
|
12117
|
+
<ng-template *ngIf="groupTemplate"
|
|
12118
|
+
[templateContext]="{
|
|
12119
|
+
templateRef: groupTemplate.templateRef,
|
|
12120
|
+
$implicit: tag
|
|
12121
|
+
}">
|
|
12122
|
+
</ng-template>
|
|
12123
|
+
<ng-template [ngIf]="!groupTemplate">{{ tag.length }} {{ tag.length === 1 ? 'item' : 'items' }} selected</ng-template>
|
|
12124
|
+
</span>
|
|
12125
|
+
</ng-template>
|
|
12126
|
+
<ng-template #singleTag>
|
|
12127
|
+
<span class="k-chip-label k-text-ellipsis">
|
|
12128
|
+
<ng-template *ngIf="template"
|
|
12129
|
+
[templateContext]="{
|
|
12130
|
+
templateRef: template.templateRef,
|
|
12131
|
+
$implicit: tag
|
|
12132
|
+
}">
|
|
12133
|
+
</ng-template>
|
|
12134
|
+
<ng-template [ngIf]="!template">{{ tagProp(tag, textField, index) }}</ng-template>
|
|
12135
|
+
</span>
|
|
12136
|
+
</ng-template>
|
|
12137
|
+
</span>
|
|
11002
12138
|
|
|
11003
|
-
|
|
11004
|
-
|
|
12139
|
+
<span class="k-chip-actions">
|
|
12140
|
+
<span aria-label="delete" [attr.aria-hidden]="index !== focused" class="k-chip-action k-chip-remove-action">
|
|
12141
|
+
<span class="k-icon k-i-x-circle" (mousedown)="deleteTag($event, tag, index)">
|
|
11005
12142
|
</span>
|
|
11006
12143
|
</span>
|
|
11007
|
-
</
|
|
11008
|
-
</
|
|
12144
|
+
</span>
|
|
12145
|
+
</div>
|
|
12146
|
+
<ng-content></ng-content>
|
|
11009
12147
|
`
|
|
11010
|
-
})
|
|
12148
|
+
}),
|
|
12149
|
+
__metadata("design:paramtypes", [Renderer2,
|
|
12150
|
+
ElementRef])
|
|
11011
12151
|
], TagListComponent);
|
|
11012
12152
|
|
|
11013
12153
|
/**
|
|
@@ -11331,12 +12471,12 @@ __decorate([
|
|
|
11331
12471
|
__metadata("design:type", Boolean)
|
|
11332
12472
|
], SelectableDirective.prototype, "multipleSelection", void 0);
|
|
11333
12473
|
__decorate([
|
|
11334
|
-
HostBinding('class.k-
|
|
12474
|
+
HostBinding('class.k-focus'),
|
|
11335
12475
|
__metadata("design:type", Boolean),
|
|
11336
12476
|
__metadata("design:paramtypes", [])
|
|
11337
12477
|
], SelectableDirective.prototype, "focusedClassName", null);
|
|
11338
12478
|
__decorate([
|
|
11339
|
-
HostBinding('class.k-
|
|
12479
|
+
HostBinding('class.k-selected'),
|
|
11340
12480
|
__metadata("design:type", Boolean),
|
|
11341
12481
|
__metadata("design:paramtypes", [])
|
|
11342
12482
|
], SelectableDirective.prototype, "selectedClassName", null);
|