@progress/kendo-angular-dropdowns 21.1.1-develop.2 → 21.2.0-develop.1
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/esm2022/autocomplete/autocomplete.component.mjs +259 -217
- package/esm2022/comboboxes/combobox.component.mjs +295 -253
- package/esm2022/comboboxes/multicolumncombobox.component.mjs +429 -383
- package/esm2022/common/adaptive-renderer.component.mjs +123 -107
- package/esm2022/common/list.component.mjs +295 -217
- package/esm2022/common/taglist.component.mjs +73 -59
- package/esm2022/dropdownlist/dropdownlist.component.mjs +259 -231
- package/esm2022/dropdowntrees/dropdowntree.component.mjs +298 -258
- package/esm2022/dropdowntrees/multiselecttree.component.mjs +359 -331
- package/esm2022/multiselect/multiselect.component.mjs +321 -281
- package/esm2022/package-metadata.mjs +2 -2
- package/fesm2022/progress-kendo-angular-dropdowns.mjs +2705 -2331
- package/package.json +10 -10
- package/schematics/ngAdd/index.js +2 -2
|
@@ -27,7 +27,7 @@ import { ValueTemplateDirective } from '../common/templates/value-template.direc
|
|
|
27
27
|
import { caretAltDownIcon, searchIcon, xIcon } from '@progress/kendo-svg-icons';
|
|
28
28
|
import { AdaptiveRendererComponent } from '../common/adaptive-renderer.component';
|
|
29
29
|
import { FilterInputDirective } from '../common/filter-input.directive';
|
|
30
|
-
import {
|
|
30
|
+
import { NgClass, NgTemplateOutlet } from '@angular/common';
|
|
31
31
|
import { LocalizedMessagesDirective } from '../common/localization/localized-messages.directive';
|
|
32
32
|
import { IconWrapperComponent } from '@progress/kendo-angular-icons';
|
|
33
33
|
import * as i0 from "@angular/core";
|
|
@@ -125,7 +125,7 @@ export class DropDownTreeComponent {
|
|
|
125
125
|
return this.loading ? 'true' : null;
|
|
126
126
|
}
|
|
127
127
|
get hostAriaControls() {
|
|
128
|
-
return this.isOpen ? this.treeViewId :
|
|
128
|
+
return this.isOpen ? this.treeViewId : null;
|
|
129
129
|
}
|
|
130
130
|
get id() {
|
|
131
131
|
return this.focusableId;
|
|
@@ -1128,6 +1128,8 @@ export class DropDownTreeComponent {
|
|
|
1128
1128
|
this.popupRef.close();
|
|
1129
1129
|
this.popupRef = null;
|
|
1130
1130
|
this.clearFilter();
|
|
1131
|
+
// Trigger change detection to update aria-controls attribute
|
|
1132
|
+
this.cdr.markForCheck();
|
|
1131
1133
|
}
|
|
1132
1134
|
}
|
|
1133
1135
|
clearFilter() {
|
|
@@ -1332,7 +1334,7 @@ export class DropDownTreeComponent {
|
|
|
1332
1334
|
this.removeTreeViewFromTabOrder();
|
|
1333
1335
|
}
|
|
1334
1336
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DropDownTreeComponent, deps: [{ token: i0.Injector }, { token: i0.ElementRef }, { token: i1.PopupService }, { token: i2.NavigationService }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i3.LocalizationService }, { token: i4.AdaptiveService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1335
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1337
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: DropDownTreeComponent, isStandalone: true, selector: "kendo-dropdowntree", inputs: { icon: "icon", svgIcon: "svgIcon", loading: "loading", clearButton: "clearButton", data: "data", value: "value", textField: "textField", valueField: "valueField", valueDepth: "valueDepth", hasChildren: "hasChildren", fetchChildren: "fetchChildren", placeholder: "placeholder", popupSettings: "popupSettings", dataItem: "dataItem", listHeight: "listHeight", disabled: "disabled", readonly: "readonly", valuePrimitive: "valuePrimitive", tabindex: "tabindex", size: "size", rounded: "rounded", fillMode: "fillMode", itemDisabled: "itemDisabled", isNodeExpanded: "isNodeExpanded", isNodeVisible: "isNodeVisible", loadOnDemand: "loadOnDemand", filterable: "filterable", filter: "filter", focusableId: "focusableId", adaptiveMode: "adaptiveMode", adaptiveTitle: "adaptiveTitle", adaptiveSubtitle: "adaptiveSubtitle" }, outputs: { open: "open", opened: "opened", close: "close", closed: "closed", nodeExpand: "nodeExpand", nodeCollapse: "nodeCollapse", onFocus: "focus", onBlur: "blur", valueChange: "valueChange", filterChange: "filterChange" }, host: { properties: { "class.k-dropdowntree": "this.hostClasses", "class.k-picker": "this.hostClasses", "attr.readonly": "this.isReadonly", "attr.aria-invalid": "this.hostAriaInvalid", "class.k-disabled": "this.isDisabled", "attr.aria-disabled": "this.isDisabled", "class.k-loading": "this.isLoading", "attr.aria-busy": "this.isBusy", "attr.aria-controls": "this.hostAriaControls", "attr.id": "this.id", "attr.dir": "this.direction", "attr.tabindex": "this.hostTabIndex", "attr.role": "this.role", "attr.aria-haspopup": "this.ariaHasPopup", "attr.aria-expanded": "this.isAriaExpanded", "attr.aria-autocomplete": "this.hostAriaAutocomplete", "class.k-readonly": "this.readonly" } }, providers: [
|
|
1336
1338
|
DataService,
|
|
1337
1339
|
SelectionService,
|
|
1338
1340
|
NavigationService,
|
|
@@ -1361,182 +1363,201 @@ export class DropDownTreeComponent {
|
|
|
1361
1363
|
}
|
|
1362
1364
|
], queries: [{ propertyName: "noDataTemplate", first: true, predicate: NoDataTemplateDirective, descendants: true }, { propertyName: "headerTemplate", first: true, predicate: HeaderTemplateDirective, descendants: true }, { propertyName: "footerTemplate", first: true, predicate: FooterTemplateDirective, descendants: true }, { propertyName: "nodeTemplate", first: true, predicate: NodeTemplateDirective, descendants: true }, { propertyName: "valueTemplate", first: true, predicate: ValueTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "adaptiveRendererComponent", first: true, predicate: AdaptiveRendererComponent, descendants: true }, { propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, static: true }, { propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "treeview", first: true, predicate: ["treeview"], descendants: true }, { propertyName: "filterInput", first: true, predicate: ["filterInput"], descendants: true }], exportAs: ["kendoDropDownTree"], usesOnChanges: true, ngImport: i0, template: `
|
|
1363
1365
|
<ng-container kendoDropDownTreeLocalizedMessages
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1366
|
+
i18n-noDataText="kendo.dropdowntree.noDataText|The text displayed in the popup when there are no items"
|
|
1367
|
+
noDataText="NO DATA FOUND"
|
|
1368
|
+
|
|
1369
|
+
i18n-clearTitle="kendo.dropdowntree.clearTitle|The title of the clear button"
|
|
1370
|
+
clearTitle="clear"
|
|
1371
|
+
|
|
1372
|
+
i18n-selectButtonText="kendo.dropdowntree.selectButtonText|The text set as aria-label on the select button"
|
|
1373
|
+
selectButtonText="Select"
|
|
1374
|
+
|
|
1375
|
+
i18n-filterInputLabel="kendo.dropdowntree.filterInputLabel|The text set as aria-label on the filter input"
|
|
1376
|
+
filterInputLabel="Filter"
|
|
1377
|
+
|
|
1378
|
+
i18n-popupLabel="kendo.dropdowntree.popupLabel|The label of the popup element that contains the list of options when its role is 'region'"
|
|
1379
|
+
popupLabel="Options list"
|
|
1380
|
+
|
|
1381
|
+
i18n-adaptiveCloseButtonTitle="kendo.dropdowntree.adaptiveCloseButtonTitle|The title of the Close button of the ActionSheet that is rendered instead of the Popup when using small screen devices in adaptive mode"
|
|
1382
|
+
adaptiveCloseButtonTitle="Close"
|
|
1383
|
+
|
|
1384
|
+
i18n-filterInputPlaceholder="kendo.dropdowntree.filterInputPlaceholder|The text for the input's placeholder when filtering is enabled"
|
|
1385
|
+
filterInputPlaceholder="Filter"
|
|
1386
|
+
>
|
|
1385
1387
|
</ng-container>
|
|
1386
1388
|
<span
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1389
|
+
[attr.id]="valueLabelId"
|
|
1390
|
+
class="k-input-inner"
|
|
1391
|
+
(click)="$event.preventDefault()"
|
|
1392
|
+
>
|
|
1393
|
+
@if (valueTemplate || text || placeholder) {
|
|
1394
|
+
<span class="k-input-value-text">
|
|
1395
|
+
@if (valueTemplate) {
|
|
1396
|
+
<ng-template
|
|
1393
1397
|
[templateContext]="{
|
|
1394
1398
|
templateRef: valueTemplate.templateRef,
|
|
1395
1399
|
$implicit: dataItem
|
|
1396
1400
|
}">
|
|
1397
1401
|
</ng-template>
|
|
1398
|
-
|
|
1402
|
+
}
|
|
1403
|
+
@if (!valueTemplate) {
|
|
1404
|
+
{{ text || placeholder }}
|
|
1405
|
+
}
|
|
1399
1406
|
</span>
|
|
1407
|
+
}
|
|
1400
1408
|
</span>
|
|
1401
|
-
|
|
1402
|
-
|
|
1409
|
+
@if (!loading && !readonly && clearButton && text?.length && !disabled) {
|
|
1410
|
+
<span
|
|
1403
1411
|
class="k-clear-value"
|
|
1404
1412
|
[style.visibility]="clearButtonVisibility"
|
|
1405
1413
|
[attr.title]="messageFor('clearTitle')"
|
|
1406
1414
|
aria-hidden="true"
|
|
1407
1415
|
(click)="clearValue($event)"
|
|
1408
|
-
>
|
|
1409
|
-
<kendo-icon-wrapper
|
|
1410
|
-
name="x"
|
|
1411
|
-
[svgIcon]="xIcon"
|
|
1412
1416
|
>
|
|
1417
|
+
<kendo-icon-wrapper
|
|
1418
|
+
name="x"
|
|
1419
|
+
[svgIcon]="xIcon"
|
|
1420
|
+
>
|
|
1413
1421
|
</kendo-icon-wrapper>
|
|
1414
|
-
|
|
1415
|
-
|
|
1422
|
+
</span>
|
|
1423
|
+
}
|
|
1424
|
+
@if (loading) {
|
|
1425
|
+
<span class="k-i-loading k-input-loading-icon k-icon"></span>
|
|
1426
|
+
}
|
|
1416
1427
|
<button
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
+
tabindex="-1"
|
|
1429
|
+
type="button"
|
|
1430
|
+
class="k-input-button k-button k-icon-button"
|
|
1431
|
+
[ngClass]="selectButtonClasses"
|
|
1432
|
+
[attr.aria-label]="messageFor('selectButtonText')"
|
|
1433
|
+
[attr.disabled]="disabled ? '' : null"
|
|
1434
|
+
>
|
|
1435
|
+
<kendo-icon-wrapper
|
|
1436
|
+
[name]="icon || 'caret-alt-down'"
|
|
1437
|
+
innerCssClass="k-button-icon"
|
|
1438
|
+
[svgIcon]="svgIcon || caretAltDownIcon"
|
|
1428
1439
|
>
|
|
1429
|
-
|
|
1440
|
+
</kendo-icon-wrapper>
|
|
1430
1441
|
</button>
|
|
1431
1442
|
<ng-template #popupTemplate>
|
|
1432
|
-
|
|
1443
|
+
<ng-container *ngTemplateOutlet="sharedPopupActionSheetTemplate"></ng-container>
|
|
1433
1444
|
</ng-template>
|
|
1434
1445
|
<ng-container #container></ng-container>
|
|
1435
|
-
|
|
1446
|
+
|
|
1436
1447
|
<kendo-adaptive-renderer
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1448
|
+
[sharedPopupActionSheetTemplate]="sharedPopupActionSheetTemplate"
|
|
1449
|
+
[title]="adaptiveTitle"
|
|
1450
|
+
[showTextInput]="filterable"
|
|
1451
|
+
[subtitle]="adaptiveSubtitle"
|
|
1452
|
+
(closePopup)="togglePopup(false)"
|
|
1453
|
+
(textInputChange)="handleFilterInputChange($event)"
|
|
1454
|
+
[placeholder]="placeholder"
|
|
1455
|
+
[searchBarValue]="filter"
|
|
1456
|
+
[filterable]="filterable">
|
|
1446
1457
|
</kendo-adaptive-renderer>
|
|
1447
|
-
|
|
1458
|
+
|
|
1448
1459
|
<ng-template #sharedPopupActionSheetTemplate>
|
|
1460
|
+
@if (filterable && !isActionSheetExpanded) {
|
|
1449
1461
|
<span
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
[ngClass]="filterInputClasses"
|
|
1462
|
+
class="k-list-filter"
|
|
1463
|
+
>
|
|
1464
|
+
<span
|
|
1465
|
+
class="k-textbox k-input"
|
|
1466
|
+
[ngClass]="filterInputClasses"
|
|
1456
1467
|
>
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1468
|
+
<span class="k-input-prefix">
|
|
1469
|
+
<kendo-icon-wrapper
|
|
1470
|
+
class="k-icon"
|
|
1471
|
+
name="search"
|
|
1472
|
+
[svgIcon]="searchIcon"
|
|
1473
|
+
>
|
|
1474
|
+
</kendo-icon-wrapper>
|
|
1475
|
+
</span>
|
|
1476
|
+
<input
|
|
1477
|
+
#filterInput
|
|
1478
|
+
(input)="handleFilterInputChange($event.target)"
|
|
1479
|
+
[filterInput]="filterable && !touchEnabled"
|
|
1480
|
+
(keydown.arrowdown)="handleKeydown($event, filterInput)"
|
|
1481
|
+
(keydown.alt.arrowup)="handleKeydown($event, filterInput)"
|
|
1482
|
+
(keydown.escape)="handleKeydown($event, filterInput)"
|
|
1483
|
+
[attr.aria-label]="messageFor('filterInputLabel')"
|
|
1484
|
+
[value]="filter"
|
|
1485
|
+
class="k-input-inner"
|
|
1486
|
+
role="textbox"
|
|
1476
1487
|
[kendoEventsOutsideAngular]="{
|
|
1477
1488
|
blur: handleBlur
|
|
1478
1489
|
}"
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1490
|
+
[scope]="this"
|
|
1491
|
+
>
|
|
1492
|
+
</span>
|
|
1482
1493
|
</span>
|
|
1483
|
-
|
|
1494
|
+
}
|
|
1495
|
+
<!--header template-->
|
|
1496
|
+
@if (headerTemplate) {
|
|
1484
1497
|
<ng-template
|
|
1485
|
-
*ngIf="headerTemplate"
|
|
1486
1498
|
[templateContext]="{
|
|
1487
1499
|
templateRef: headerTemplate?.templateRef
|
|
1488
1500
|
}">
|
|
1489
1501
|
</ng-template>
|
|
1502
|
+
}
|
|
1503
|
+
@if (data.length !== 0 && !allNodesHidden) {
|
|
1490
1504
|
<kendo-treeview
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
>
|
|
1505
|
+
#treeview
|
|
1506
|
+
[attr.id]="treeViewId"
|
|
1507
|
+
[size]="windowSize !== 'large' ? 'large' : size"
|
|
1508
|
+
[nodes]="data"
|
|
1509
|
+
[style.maxHeight.px]="listHeight"
|
|
1510
|
+
[animate]="false"
|
|
1511
|
+
[(selectedKeys)]="selectedKeys"
|
|
1512
|
+
[selectBy]="selectBy"
|
|
1513
|
+
[textField]="textField"
|
|
1514
|
+
kendoTreeViewSelectable
|
|
1515
|
+
[children]="children"
|
|
1516
|
+
[hasChildren]="hasChildren"
|
|
1517
|
+
[loadOnDemand]="loadOnDemand"
|
|
1518
|
+
[isExpanded]="isNodeExpanded"
|
|
1519
|
+
[isDisabled]="itemDisabled"
|
|
1520
|
+
[nodeTemplate]="nodeTemplate"
|
|
1521
|
+
[filter]="filter"
|
|
1522
|
+
[isVisible]="isNodeVisible"
|
|
1523
|
+
(focusout)="handleBlur($event)"
|
|
1524
|
+
(keydown)="handleKeydown($event)"
|
|
1525
|
+
(selectionChange)="onSelectionChange($event)"
|
|
1526
|
+
(expand)="nodeExpand.emit($event)"
|
|
1527
|
+
(collapse)="nodeCollapse.emit($event)"
|
|
1528
|
+
(childrenLoaded)="onChildrenLoaded()"
|
|
1529
|
+
>
|
|
1517
1530
|
</kendo-treeview>
|
|
1518
|
-
|
|
1531
|
+
}
|
|
1532
|
+
<!--footer template-->
|
|
1533
|
+
@if (footerTemplate) {
|
|
1519
1534
|
<ng-template
|
|
1520
|
-
*ngIf="footerTemplate"
|
|
1521
1535
|
[templateContext]="{
|
|
1522
1536
|
templateRef: footerTemplate?.templateRef
|
|
1523
1537
|
}">
|
|
1524
1538
|
</ng-template>
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1539
|
+
}
|
|
1540
|
+
<!--no-data template-->
|
|
1541
|
+
@if (data.length === 0 || allNodesHidden) {
|
|
1542
|
+
<div class="k-no-data">
|
|
1543
|
+
@if (noDataTemplate) {
|
|
1544
|
+
<ng-template
|
|
1528
1545
|
[templateContext]="{
|
|
1529
1546
|
templateRef: noDataTemplate?.templateRef
|
|
1530
1547
|
}">
|
|
1531
1548
|
</ng-template>
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
</
|
|
1549
|
+
}
|
|
1550
|
+
@if (!noDataTemplate) {
|
|
1551
|
+
<div>{{ messageFor('noDataText') }}</div>
|
|
1552
|
+
}
|
|
1535
1553
|
</div>
|
|
1554
|
+
}
|
|
1536
1555
|
</ng-template>
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1556
|
+
|
|
1557
|
+
@if (isOpen || isAdaptiveModeEnabled) {
|
|
1558
|
+
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
1559
|
+
}
|
|
1560
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "\n [kendoDropDownListLocalizedMessages],\n [kendoDropDownTreeLocalizedMessages],\n [kendoComboBoxLocalizedMessages],\n [kendoMultiColumnComboBoxLocalizedMessages],\n [kendoAutoCompleteLocalizedMessages],\n [kendoMultiSelectLocalizedMessages],\n [kendoMultiSelectTreeLocalizedMessages]\n " }, { kind: "directive", type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AdaptiveRendererComponent, selector: "kendo-adaptive-renderer", inputs: ["title", "subtitle", "showTextInput", "sharedPopupActionSheetTemplate", "text", "placeholder", "searchBarValue", "filterable"], outputs: ["closePopup", "textInputChange", "navigate", "onExpand"] }, { kind: "directive", type: FilterInputDirective, selector: "[filterInput]", inputs: ["filterInput"] }, { kind: "directive", type: EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }, { kind: "component", type: TreeViewComponent, selector: "kendo-treeview", inputs: ["filterInputPlaceholder", "expandDisabledNodes", "animate", "nodeTemplate", "loadMoreButtonTemplate", "trackBy", "nodes", "textField", "hasChildren", "isChecked", "isDisabled", "hasCheckbox", "isExpanded", "isSelected", "isVisible", "navigable", "children", "loadOnDemand", "filterable", "filter", "size", "disableParentNodesOnly"], outputs: ["childrenLoaded", "blur", "focus", "expand", "collapse", "nodeDragStart", "nodeDrag", "filterStateChange", "nodeDrop", "nodeDragEnd", "addItem", "removeItem", "checkedChange", "selectionChange", "filterChange", "nodeClick", "nodeDblClick"], exportAs: ["kendoTreeView"] }, { kind: "directive", type: SelectDirective, selector: "[kendoTreeViewSelectable]", inputs: ["isSelected", "selectBy", "kendoTreeViewSelectable", "selectedKeys"], outputs: ["selectedKeysChange"] }, { kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1540
1561
|
}
|
|
1541
1562
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: DropDownTreeComponent, decorators: [{
|
|
1542
1563
|
type: Component,
|
|
@@ -1573,185 +1594,204 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
1573
1594
|
selector: 'kendo-dropdowntree',
|
|
1574
1595
|
template: `
|
|
1575
1596
|
<ng-container kendoDropDownTreeLocalizedMessages
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
+
i18n-noDataText="kendo.dropdowntree.noDataText|The text displayed in the popup when there are no items"
|
|
1598
|
+
noDataText="NO DATA FOUND"
|
|
1599
|
+
|
|
1600
|
+
i18n-clearTitle="kendo.dropdowntree.clearTitle|The title of the clear button"
|
|
1601
|
+
clearTitle="clear"
|
|
1602
|
+
|
|
1603
|
+
i18n-selectButtonText="kendo.dropdowntree.selectButtonText|The text set as aria-label on the select button"
|
|
1604
|
+
selectButtonText="Select"
|
|
1605
|
+
|
|
1606
|
+
i18n-filterInputLabel="kendo.dropdowntree.filterInputLabel|The text set as aria-label on the filter input"
|
|
1607
|
+
filterInputLabel="Filter"
|
|
1608
|
+
|
|
1609
|
+
i18n-popupLabel="kendo.dropdowntree.popupLabel|The label of the popup element that contains the list of options when its role is 'region'"
|
|
1610
|
+
popupLabel="Options list"
|
|
1611
|
+
|
|
1612
|
+
i18n-adaptiveCloseButtonTitle="kendo.dropdowntree.adaptiveCloseButtonTitle|The title of the Close button of the ActionSheet that is rendered instead of the Popup when using small screen devices in adaptive mode"
|
|
1613
|
+
adaptiveCloseButtonTitle="Close"
|
|
1614
|
+
|
|
1615
|
+
i18n-filterInputPlaceholder="kendo.dropdowntree.filterInputPlaceholder|The text for the input's placeholder when filtering is enabled"
|
|
1616
|
+
filterInputPlaceholder="Filter"
|
|
1617
|
+
>
|
|
1597
1618
|
</ng-container>
|
|
1598
1619
|
<span
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1620
|
+
[attr.id]="valueLabelId"
|
|
1621
|
+
class="k-input-inner"
|
|
1622
|
+
(click)="$event.preventDefault()"
|
|
1623
|
+
>
|
|
1624
|
+
@if (valueTemplate || text || placeholder) {
|
|
1625
|
+
<span class="k-input-value-text">
|
|
1626
|
+
@if (valueTemplate) {
|
|
1627
|
+
<ng-template
|
|
1605
1628
|
[templateContext]="{
|
|
1606
1629
|
templateRef: valueTemplate.templateRef,
|
|
1607
1630
|
$implicit: dataItem
|
|
1608
1631
|
}">
|
|
1609
1632
|
</ng-template>
|
|
1610
|
-
|
|
1633
|
+
}
|
|
1634
|
+
@if (!valueTemplate) {
|
|
1635
|
+
{{ text || placeholder }}
|
|
1636
|
+
}
|
|
1611
1637
|
</span>
|
|
1638
|
+
}
|
|
1612
1639
|
</span>
|
|
1613
|
-
|
|
1614
|
-
|
|
1640
|
+
@if (!loading && !readonly && clearButton && text?.length && !disabled) {
|
|
1641
|
+
<span
|
|
1615
1642
|
class="k-clear-value"
|
|
1616
1643
|
[style.visibility]="clearButtonVisibility"
|
|
1617
1644
|
[attr.title]="messageFor('clearTitle')"
|
|
1618
1645
|
aria-hidden="true"
|
|
1619
1646
|
(click)="clearValue($event)"
|
|
1620
|
-
>
|
|
1621
|
-
<kendo-icon-wrapper
|
|
1622
|
-
name="x"
|
|
1623
|
-
[svgIcon]="xIcon"
|
|
1624
1647
|
>
|
|
1648
|
+
<kendo-icon-wrapper
|
|
1649
|
+
name="x"
|
|
1650
|
+
[svgIcon]="xIcon"
|
|
1651
|
+
>
|
|
1625
1652
|
</kendo-icon-wrapper>
|
|
1626
|
-
|
|
1627
|
-
|
|
1653
|
+
</span>
|
|
1654
|
+
}
|
|
1655
|
+
@if (loading) {
|
|
1656
|
+
<span class="k-i-loading k-input-loading-icon k-icon"></span>
|
|
1657
|
+
}
|
|
1628
1658
|
<button
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1659
|
+
tabindex="-1"
|
|
1660
|
+
type="button"
|
|
1661
|
+
class="k-input-button k-button k-icon-button"
|
|
1662
|
+
[ngClass]="selectButtonClasses"
|
|
1663
|
+
[attr.aria-label]="messageFor('selectButtonText')"
|
|
1664
|
+
[attr.disabled]="disabled ? '' : null"
|
|
1665
|
+
>
|
|
1666
|
+
<kendo-icon-wrapper
|
|
1667
|
+
[name]="icon || 'caret-alt-down'"
|
|
1668
|
+
innerCssClass="k-button-icon"
|
|
1669
|
+
[svgIcon]="svgIcon || caretAltDownIcon"
|
|
1640
1670
|
>
|
|
1641
|
-
|
|
1671
|
+
</kendo-icon-wrapper>
|
|
1642
1672
|
</button>
|
|
1643
1673
|
<ng-template #popupTemplate>
|
|
1644
|
-
|
|
1674
|
+
<ng-container *ngTemplateOutlet="sharedPopupActionSheetTemplate"></ng-container>
|
|
1645
1675
|
</ng-template>
|
|
1646
1676
|
<ng-container #container></ng-container>
|
|
1647
|
-
|
|
1677
|
+
|
|
1648
1678
|
<kendo-adaptive-renderer
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1679
|
+
[sharedPopupActionSheetTemplate]="sharedPopupActionSheetTemplate"
|
|
1680
|
+
[title]="adaptiveTitle"
|
|
1681
|
+
[showTextInput]="filterable"
|
|
1682
|
+
[subtitle]="adaptiveSubtitle"
|
|
1683
|
+
(closePopup)="togglePopup(false)"
|
|
1684
|
+
(textInputChange)="handleFilterInputChange($event)"
|
|
1685
|
+
[placeholder]="placeholder"
|
|
1686
|
+
[searchBarValue]="filter"
|
|
1687
|
+
[filterable]="filterable">
|
|
1658
1688
|
</kendo-adaptive-renderer>
|
|
1659
|
-
|
|
1689
|
+
|
|
1660
1690
|
<ng-template #sharedPopupActionSheetTemplate>
|
|
1691
|
+
@if (filterable && !isActionSheetExpanded) {
|
|
1661
1692
|
<span
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
[ngClass]="filterInputClasses"
|
|
1693
|
+
class="k-list-filter"
|
|
1694
|
+
>
|
|
1695
|
+
<span
|
|
1696
|
+
class="k-textbox k-input"
|
|
1697
|
+
[ngClass]="filterInputClasses"
|
|
1668
1698
|
>
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1699
|
+
<span class="k-input-prefix">
|
|
1700
|
+
<kendo-icon-wrapper
|
|
1701
|
+
class="k-icon"
|
|
1702
|
+
name="search"
|
|
1703
|
+
[svgIcon]="searchIcon"
|
|
1704
|
+
>
|
|
1705
|
+
</kendo-icon-wrapper>
|
|
1706
|
+
</span>
|
|
1707
|
+
<input
|
|
1708
|
+
#filterInput
|
|
1709
|
+
(input)="handleFilterInputChange($event.target)"
|
|
1710
|
+
[filterInput]="filterable && !touchEnabled"
|
|
1711
|
+
(keydown.arrowdown)="handleKeydown($event, filterInput)"
|
|
1712
|
+
(keydown.alt.arrowup)="handleKeydown($event, filterInput)"
|
|
1713
|
+
(keydown.escape)="handleKeydown($event, filterInput)"
|
|
1714
|
+
[attr.aria-label]="messageFor('filterInputLabel')"
|
|
1715
|
+
[value]="filter"
|
|
1716
|
+
class="k-input-inner"
|
|
1717
|
+
role="textbox"
|
|
1688
1718
|
[kendoEventsOutsideAngular]="{
|
|
1689
1719
|
blur: handleBlur
|
|
1690
1720
|
}"
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1721
|
+
[scope]="this"
|
|
1722
|
+
>
|
|
1723
|
+
</span>
|
|
1694
1724
|
</span>
|
|
1695
|
-
|
|
1725
|
+
}
|
|
1726
|
+
<!--header template-->
|
|
1727
|
+
@if (headerTemplate) {
|
|
1696
1728
|
<ng-template
|
|
1697
|
-
*ngIf="headerTemplate"
|
|
1698
1729
|
[templateContext]="{
|
|
1699
1730
|
templateRef: headerTemplate?.templateRef
|
|
1700
1731
|
}">
|
|
1701
1732
|
</ng-template>
|
|
1733
|
+
}
|
|
1734
|
+
@if (data.length !== 0 && !allNodesHidden) {
|
|
1702
1735
|
<kendo-treeview
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
>
|
|
1736
|
+
#treeview
|
|
1737
|
+
[attr.id]="treeViewId"
|
|
1738
|
+
[size]="windowSize !== 'large' ? 'large' : size"
|
|
1739
|
+
[nodes]="data"
|
|
1740
|
+
[style.maxHeight.px]="listHeight"
|
|
1741
|
+
[animate]="false"
|
|
1742
|
+
[(selectedKeys)]="selectedKeys"
|
|
1743
|
+
[selectBy]="selectBy"
|
|
1744
|
+
[textField]="textField"
|
|
1745
|
+
kendoTreeViewSelectable
|
|
1746
|
+
[children]="children"
|
|
1747
|
+
[hasChildren]="hasChildren"
|
|
1748
|
+
[loadOnDemand]="loadOnDemand"
|
|
1749
|
+
[isExpanded]="isNodeExpanded"
|
|
1750
|
+
[isDisabled]="itemDisabled"
|
|
1751
|
+
[nodeTemplate]="nodeTemplate"
|
|
1752
|
+
[filter]="filter"
|
|
1753
|
+
[isVisible]="isNodeVisible"
|
|
1754
|
+
(focusout)="handleBlur($event)"
|
|
1755
|
+
(keydown)="handleKeydown($event)"
|
|
1756
|
+
(selectionChange)="onSelectionChange($event)"
|
|
1757
|
+
(expand)="nodeExpand.emit($event)"
|
|
1758
|
+
(collapse)="nodeCollapse.emit($event)"
|
|
1759
|
+
(childrenLoaded)="onChildrenLoaded()"
|
|
1760
|
+
>
|
|
1729
1761
|
</kendo-treeview>
|
|
1730
|
-
|
|
1762
|
+
}
|
|
1763
|
+
<!--footer template-->
|
|
1764
|
+
@if (footerTemplate) {
|
|
1731
1765
|
<ng-template
|
|
1732
|
-
*ngIf="footerTemplate"
|
|
1733
1766
|
[templateContext]="{
|
|
1734
1767
|
templateRef: footerTemplate?.templateRef
|
|
1735
1768
|
}">
|
|
1736
1769
|
</ng-template>
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1770
|
+
}
|
|
1771
|
+
<!--no-data template-->
|
|
1772
|
+
@if (data.length === 0 || allNodesHidden) {
|
|
1773
|
+
<div class="k-no-data">
|
|
1774
|
+
@if (noDataTemplate) {
|
|
1775
|
+
<ng-template
|
|
1740
1776
|
[templateContext]="{
|
|
1741
1777
|
templateRef: noDataTemplate?.templateRef
|
|
1742
1778
|
}">
|
|
1743
1779
|
</ng-template>
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
</
|
|
1780
|
+
}
|
|
1781
|
+
@if (!noDataTemplate) {
|
|
1782
|
+
<div>{{ messageFor('noDataText') }}</div>
|
|
1783
|
+
}
|
|
1747
1784
|
</div>
|
|
1785
|
+
}
|
|
1748
1786
|
</ng-template>
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1787
|
+
|
|
1788
|
+
@if (isOpen || isAdaptiveModeEnabled) {
|
|
1789
|
+
<kendo-resize-sensor (resize)="onResize()"></kendo-resize-sensor>
|
|
1790
|
+
}
|
|
1791
|
+
`,
|
|
1752
1792
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1753
1793
|
standalone: true,
|
|
1754
|
-
imports: [LocalizedMessagesDirective,
|
|
1794
|
+
imports: [LocalizedMessagesDirective, TemplateContextDirective, IconWrapperComponent, NgClass, NgTemplateOutlet, AdaptiveRendererComponent, FilterInputDirective, EventsOutsideAngularDirective, TreeViewComponent, SelectDirective, ResizeSensorComponent]
|
|
1755
1795
|
}]
|
|
1756
1796
|
}], ctorParameters: () => [{ type: i0.Injector }, { type: i0.ElementRef }, { type: i1.PopupService }, { type: i2.NavigationService }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i3.LocalizationService }, { type: i4.AdaptiveService }], propDecorators: { icon: [{
|
|
1757
1797
|
type: Input
|