@progress/kendo-angular-treeview 22.1.0-develop.8 → 23.0.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/check-mode.d.ts +1 -1
- package/check.directive.d.ts +4 -4
- package/checkable-settings.d.ts +2 -2
- package/data-bound-component.d.ts +1 -1
- package/disable.directive.d.ts +1 -1
- package/drag-and-drop/drag-and-drop-editing.directive.d.ts +6 -6
- package/drag-and-drop/drag-and-drop.directive.d.ts +10 -10
- package/drag-and-drop/drag-clue/drag-clue-template.directive.d.ts +4 -4
- package/drag-and-drop/drop-hint/drop-hint-template.directive.d.ts +4 -4
- package/drag-and-drop/models/drop-action.d.ts +1 -1
- package/drag-and-drop/models/editing-service.d.ts +4 -4
- package/drag-and-drop/models/tree-item-filter-state.d.ts +1 -1
- package/drag-and-drop/models/treeitem-add-remove-args.d.ts +2 -2
- package/drag-and-drop/models/treeitem-drag-event.d.ts +2 -2
- package/drag-and-drop/models/treeitem-drag-start-event.d.ts +1 -1
- package/drag-and-drop/models/treeitem-drop-event.d.ts +1 -1
- package/expand.directive.d.ts +2 -2
- package/fesm2022/progress-kendo-angular-treeview.mjs +141 -134
- package/filter-state.interface.d.ts +1 -1
- package/load-more/load-more-button-template.directive.d.ts +1 -1
- package/load-more/load-more-request-args.d.ts +3 -3
- package/load-more/load-more.directive.d.ts +4 -4
- package/node-template.directive.d.ts +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +8 -8
- package/schematics/ngAdd/index.js +4 -4
- package/selection/select.directive.d.ts +3 -3
- package/size.d.ts +1 -1
- package/treeitem-lookup.interface.d.ts +2 -2
- package/treeitem.interface.d.ts +2 -2
- package/treeview-group.component.d.ts +4 -7
- package/{treeview-item-content.directive.d.ts → treeview-item-content-wrapper.directive.d.ts} +4 -4
- package/treeview.component.d.ts +21 -21
|
@@ -10,11 +10,11 @@ import { ComponentMessages, LocalizationService, L10N_PREFIX } from '@progress/k
|
|
|
10
10
|
import { Subject, Subscription, of, EMPTY, BehaviorSubject, merge } from 'rxjs';
|
|
11
11
|
import { validatePackage } from '@progress/kendo-licensing';
|
|
12
12
|
import { getter, setter } from '@progress/kendo-common';
|
|
13
|
-
import {
|
|
13
|
+
import { chevronDownIcon, chevronRightIcon, chevronLeftIcon, searchIcon, cancelIcon, insertMiddleIcon, insertBottomIcon, insertTopIcon, plusIcon } from '@progress/kendo-svg-icons';
|
|
14
14
|
import { CheckBoxComponent, TextBoxComponent, TextBoxPrefixTemplateDirective } from '@progress/kendo-angular-inputs';
|
|
15
15
|
import { trigger, transition, style, animate } from '@angular/animations';
|
|
16
16
|
import { filter, tap, switchMap, delay, takeUntil, catchError, finalize, take, map } from 'rxjs/operators';
|
|
17
|
-
import {
|
|
17
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
18
18
|
import { IconWrapperComponent, IconsService } from '@progress/kendo-angular-icons';
|
|
19
19
|
import { Draggable } from '@progress/kendo-draggable';
|
|
20
20
|
import { DialogContainerService, DialogService, WindowService, WindowContainerService } from '@progress/kendo-angular-dialog';
|
|
@@ -29,7 +29,7 @@ const packageMetadata = {
|
|
|
29
29
|
productCode: 'KENDOUIANGULAR',
|
|
30
30
|
productCodes: ['KENDOUIANGULAR'],
|
|
31
31
|
publishDate: 0,
|
|
32
|
-
version: '
|
|
32
|
+
version: '23.0.0-develop.1',
|
|
33
33
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -223,16 +223,25 @@ const isFocusable = (element) => {
|
|
|
223
223
|
* @hidden
|
|
224
224
|
*/
|
|
225
225
|
const isContent = (element) => {
|
|
226
|
-
const scopeSelector = '.k-treeview-leaf:not(.k-treeview-load-more-button),.k-treeview-item,.k-treeview';
|
|
226
|
+
const scopeSelector = '.k-treeview-leaf:not(.k-treeview-load-more-button),.k-treeview-item-content,.k-treeview-item,.k-treeview';
|
|
227
227
|
if (!isDocumentAvailable()) {
|
|
228
228
|
return null;
|
|
229
229
|
}
|
|
230
|
+
if (closestWithMatch(element, '.k-treeview-toggle')) {
|
|
231
|
+
return false;
|
|
232
|
+
}
|
|
233
|
+
if (closestWithMatch(element, 'kendo-checkbox') || (element.tagName?.toLowerCase() === 'input' && element.type === 'checkbox')) {
|
|
234
|
+
return false;
|
|
235
|
+
}
|
|
230
236
|
let node = element;
|
|
231
237
|
while (node && !match(node, scopeSelector)) {
|
|
232
238
|
node = node.parentNode;
|
|
233
239
|
}
|
|
234
240
|
if (node) {
|
|
235
|
-
|
|
241
|
+
if (isLoadMoreButton(element)) {
|
|
242
|
+
return false;
|
|
243
|
+
}
|
|
244
|
+
return match(node, '.k-treeview-leaf:not(.k-treeview-load-more-button)') || match(node, '.k-treeview-item-content');
|
|
236
245
|
}
|
|
237
246
|
};
|
|
238
247
|
/**
|
|
@@ -833,7 +842,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
833
842
|
}] });
|
|
834
843
|
|
|
835
844
|
/**
|
|
836
|
-
* Represents the template for TreeView nodes ([more information and example](
|
|
845
|
+
* Represents the template for TreeView nodes ([more information and example](https://www.telerik.com/kendo-angular-ui/components/treeview/node-template)).
|
|
837
846
|
*
|
|
838
847
|
* Use this template to customize the content of the nodes. To define the node template, nest an `<ng-template>`
|
|
839
848
|
* tag with the `kendoTreeViewNodeTemplate` directive inside a `<kendo-treeview>` tag.
|
|
@@ -876,7 +885,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
876
885
|
* Represents a directive for customizing the load more button in the TreeView.
|
|
877
886
|
*
|
|
878
887
|
* To define the template, nest an `<ng-template>` tag with the `kendoTreeViewLoadMoreButtonTemplate` directive inside a `<kendo-treeview>` tag
|
|
879
|
-
* ([see example](
|
|
888
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button#button-template)).
|
|
880
889
|
*
|
|
881
890
|
* The template context provides the following variable:
|
|
882
891
|
* - `let-index="index"`—The hierarchical index of the load more button node.
|
|
@@ -1049,9 +1058,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
1049
1058
|
/**
|
|
1050
1059
|
* @hidden
|
|
1051
1060
|
*
|
|
1052
|
-
* A directive which manages the
|
|
1061
|
+
* A directive which manages the states of the TreeView items.
|
|
1053
1062
|
*/
|
|
1054
|
-
class
|
|
1063
|
+
class TreeViewItemContentWrapperDirective {
|
|
1055
1064
|
element;
|
|
1056
1065
|
navigationService;
|
|
1057
1066
|
selectionService;
|
|
@@ -1097,13 +1106,13 @@ class TreeViewItemContentDirective {
|
|
|
1097
1106
|
const action = addClass ? 'addClass' : 'removeClass';
|
|
1098
1107
|
this.renderer[action](this.element.nativeElement, className);
|
|
1099
1108
|
}
|
|
1100
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type:
|
|
1101
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.18", type:
|
|
1109
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TreeViewItemContentWrapperDirective, deps: [{ token: i0.ElementRef }, { token: NavigationService }, { token: SelectionService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1110
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.18", type: TreeViewItemContentWrapperDirective, isStandalone: true, selector: "[kendoTreeViewItemContentWrapper]", inputs: { dataItem: "dataItem", index: "index", initialSelection: "initialSelection", isSelected: "isSelected" }, usesOnChanges: true, ngImport: i0 });
|
|
1102
1111
|
}
|
|
1103
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type:
|
|
1112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: TreeViewItemContentWrapperDirective, decorators: [{
|
|
1104
1113
|
type: Directive,
|
|
1105
1114
|
args: [{
|
|
1106
|
-
selector: '[
|
|
1115
|
+
selector: '[kendoTreeViewItemContentWrapper]',
|
|
1107
1116
|
standalone: true
|
|
1108
1117
|
}]
|
|
1109
1118
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: NavigationService }, { type: SelectionService }, { type: i0.Renderer2 }], propDecorators: { dataItem: [{
|
|
@@ -1346,6 +1355,8 @@ class TreeViewItemDirective {
|
|
|
1346
1355
|
service.updateItem(this.index, this.isDisabled, this.isVisible);
|
|
1347
1356
|
}
|
|
1348
1357
|
setAriaAttributes() {
|
|
1358
|
+
// using renderer.setStyle is not suitable here as it does not add custom styles such as --kendo-treeview-level
|
|
1359
|
+
this.element.nativeElement.style?.setProperty('--kendo-treeview-level', this.ib.level(this.index).toString());
|
|
1349
1360
|
this.setAttribute('aria-level', this.ib.level(this.index).toString());
|
|
1350
1361
|
// don't render attributes when the component configuration doesn't allow the specified state
|
|
1351
1362
|
this.setAttribute('aria-expanded', this.expandable ? this.isExpanded.toString() : null);
|
|
@@ -1401,9 +1412,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
1401
1412
|
type: Input
|
|
1402
1413
|
}] } });
|
|
1403
1414
|
|
|
1404
|
-
const TOP_ITEM = 'k-treeview-top';
|
|
1405
|
-
const MID_ITEM = 'k-treeview-mid';
|
|
1406
|
-
const BOT_ITEM = 'k-treeview-bot';
|
|
1407
1415
|
/**
|
|
1408
1416
|
* @hidden
|
|
1409
1417
|
*/
|
|
@@ -1421,15 +1429,15 @@ class TreeViewGroupComponent {
|
|
|
1421
1429
|
/**
|
|
1422
1430
|
* @hidden
|
|
1423
1431
|
*/
|
|
1424
|
-
|
|
1432
|
+
chevronDownIcon = chevronDownIcon;
|
|
1425
1433
|
/**
|
|
1426
1434
|
* @hidden
|
|
1427
1435
|
*/
|
|
1428
|
-
|
|
1436
|
+
chevronRightIcon = chevronRightIcon;
|
|
1429
1437
|
/**
|
|
1430
1438
|
* @hidden
|
|
1431
1439
|
*/
|
|
1432
|
-
|
|
1440
|
+
chevronLeftIcon = chevronLeftIcon;
|
|
1433
1441
|
/**
|
|
1434
1442
|
* @hidden
|
|
1435
1443
|
*/
|
|
@@ -1453,16 +1461,25 @@ class TreeViewGroupComponent {
|
|
|
1453
1461
|
nodeTemplateRef;
|
|
1454
1462
|
loadMoreButtonTemplateRef;
|
|
1455
1463
|
loadMoreService;
|
|
1456
|
-
size =
|
|
1464
|
+
size = undefined;
|
|
1457
1465
|
expandDisabledNodes;
|
|
1458
1466
|
initialNodesLoaded = false;
|
|
1459
1467
|
loadingMoreNodes = false;
|
|
1460
1468
|
isItemExpandable = (node, index) => this.expandDisabledNodes || !this.isItemDisabled(node, index);
|
|
1469
|
+
isContentDisabled(node, index) {
|
|
1470
|
+
return this.expandIcons && this.hasChildren(node) ? !this.isItemExpandable(node, index) : this.isItemDisabled(node, index);
|
|
1471
|
+
}
|
|
1461
1472
|
getFontIcon(node, index) {
|
|
1462
|
-
|
|
1473
|
+
if (this.isExpanded(node, index)) {
|
|
1474
|
+
return 'chevron-down';
|
|
1475
|
+
}
|
|
1476
|
+
return this.localization.rtl ? 'chevron-left' : 'chevron-right';
|
|
1463
1477
|
}
|
|
1464
1478
|
getSvgIcon(node, index) {
|
|
1465
|
-
|
|
1479
|
+
if (this.isExpanded(node, index)) {
|
|
1480
|
+
return chevronDownIcon;
|
|
1481
|
+
}
|
|
1482
|
+
return this.localization.rtl ? chevronLeftIcon : chevronRightIcon;
|
|
1466
1483
|
}
|
|
1467
1484
|
get moreNodesAvailable() {
|
|
1468
1485
|
if (!isPresent(this.loadMoreService) || this.data.length === 0) {
|
|
@@ -1626,21 +1643,6 @@ class TreeViewGroupComponent {
|
|
|
1626
1643
|
isItemDisabled(node, index) {
|
|
1627
1644
|
return (this.disabled && !this.disableParentNodesOnly) || this.isDisabled(node, this.nodeIndex(index));
|
|
1628
1645
|
}
|
|
1629
|
-
/**
|
|
1630
|
-
* @hidden
|
|
1631
|
-
*/
|
|
1632
|
-
setItemClasses(dataLength, index) {
|
|
1633
|
-
if (dataLength === 1) {
|
|
1634
|
-
return this.parentIndex ? BOT_ITEM : `${TOP_ITEM} ${BOT_ITEM}`;
|
|
1635
|
-
}
|
|
1636
|
-
if (index === 0) {
|
|
1637
|
-
return TOP_ITEM;
|
|
1638
|
-
}
|
|
1639
|
-
if (index > 0 && index < dataLength - 1) {
|
|
1640
|
-
return MID_ITEM;
|
|
1641
|
-
}
|
|
1642
|
-
return index === this.totalNodesCount - 1 ? BOT_ITEM : MID_ITEM;
|
|
1643
|
-
}
|
|
1644
1646
|
loadMoreLocalNodes() {
|
|
1645
1647
|
const initialLoadMoreButtonIndex = this.loadMoreButtonIndex;
|
|
1646
1648
|
this.pageSize += this.loadMoreService.getInitialPageSize(this.parentDataItem);
|
|
@@ -1743,10 +1745,16 @@ class TreeViewGroupComponent {
|
|
|
1743
1745
|
[isSelected]="isSelected(node, nodeIndex(index))"
|
|
1744
1746
|
[attr.data-treeindex]="nodeIndex(index)"
|
|
1745
1747
|
>
|
|
1746
|
-
|
|
1748
|
+
|
|
1749
|
+
<div kendoTreeViewItemContentWrapper
|
|
1750
|
+
[dataItem]="node"
|
|
1751
|
+
[index]="nodeIndex(index)"
|
|
1752
|
+
[initialSelection]="isSelected(node, nodeIndex(index))"
|
|
1753
|
+
[isSelected]="isSelected"
|
|
1754
|
+
class="k-treeview-item-content"
|
|
1755
|
+
[class.k-disabled]="isContentDisabled(node, index)">
|
|
1747
1756
|
@if (expandIcons && hasChildren(node)) {
|
|
1748
1757
|
<span
|
|
1749
|
-
[class.k-disabled]="!isItemExpandable(node, index)"
|
|
1750
1758
|
class="k-treeview-toggle"
|
|
1751
1759
|
[kendoTreeViewLoading]="nodeIndex(index)"
|
|
1752
1760
|
(click)="expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))"
|
|
@@ -1768,16 +1776,11 @@ class TreeViewGroupComponent {
|
|
|
1768
1776
|
[inputAttributes]="getCheckboxAttributes(index)"
|
|
1769
1777
|
></kendo-checkbox>
|
|
1770
1778
|
}
|
|
1771
|
-
<span
|
|
1779
|
+
<span
|
|
1772
1780
|
[id]="nodeIndex(index)"
|
|
1773
1781
|
[attr.data-treeindex]="nodeIndex(index)"
|
|
1774
|
-
[dataItem]="node"
|
|
1775
|
-
[index]="nodeIndex(index)"
|
|
1776
|
-
[initialSelection]="isSelected(node, nodeIndex(index))"
|
|
1777
|
-
[isSelected]="isSelected"
|
|
1778
1782
|
class="k-treeview-leaf"
|
|
1779
1783
|
[style.touch-action]="touchActions ? '' : 'none'"
|
|
1780
|
-
[class.k-disabled]="isItemDisabled(node, index)"
|
|
1781
1784
|
>
|
|
1782
1785
|
<span class="k-treeview-leaf-text">
|
|
1783
1786
|
@switch (hasTemplate) {
|
|
@@ -1847,7 +1850,10 @@ class TreeViewGroupComponent {
|
|
|
1847
1850
|
[parentIndex]="parentIndex"
|
|
1848
1851
|
[attr.data-treeindex]="loadMoreButtonIndex"
|
|
1849
1852
|
>
|
|
1850
|
-
<div
|
|
1853
|
+
<div
|
|
1854
|
+
kendoTreeViewItemContentWrapper
|
|
1855
|
+
[index]="loadMoreButtonIndex"
|
|
1856
|
+
class="k-treeview-item-content">
|
|
1851
1857
|
@if (loadingMoreNodes) {
|
|
1852
1858
|
<span
|
|
1853
1859
|
class="k-icon k-i-loading"
|
|
@@ -1857,8 +1863,6 @@ class TreeViewGroupComponent {
|
|
|
1857
1863
|
<span
|
|
1858
1864
|
class="k-treeview-leaf k-treeview-load-more-button"
|
|
1859
1865
|
[attr.data-treeindex]="loadMoreButtonIndex"
|
|
1860
|
-
kendoTreeViewItemContent
|
|
1861
|
-
[index]="loadMoreButtonIndex"
|
|
1862
1866
|
>
|
|
1863
1867
|
<span class="k-treeview-leaf-text">
|
|
1864
1868
|
@if (loadMoreButtonTemplateRef) {
|
|
@@ -1878,7 +1882,7 @@ class TreeViewGroupComponent {
|
|
|
1878
1882
|
</div>
|
|
1879
1883
|
</li>
|
|
1880
1884
|
}
|
|
1881
|
-
`, isInline: true, dependencies: [{ kind: "component", type: TreeViewGroupComponent, selector: "[kendoTreeViewGroup]", inputs: ["checkboxes", "expandIcons", "disabled", "selectable", "touchActions", "disableParentNodesOnly", "loadOnDemand", "trackBy", "nodes", "textField", "parentDataItem", "parentIndex", "nodeTemplateRef", "loadMoreButtonTemplateRef", "loadMoreService", "size", "expandDisabledNodes", "isChecked", "isDisabled", "hasCheckbox", "isExpanded", "isVisible", "isSelected", "children", "hasChildren"] }, { kind: "directive", type: TreeViewItemDirective, selector: "[kendoTreeViewItem]", inputs: ["dataItem", "index", "parentDataItem", "parentIndex", "role", "loadOnDemand", "checkable", "selectable", "expandable", "isChecked", "isDisabled", "isVisible", "isExpanded", "isSelected"] }, { kind: "directive", type:
|
|
1885
|
+
`, isInline: true, dependencies: [{ kind: "component", type: TreeViewGroupComponent, selector: "[kendoTreeViewGroup]", inputs: ["checkboxes", "expandIcons", "disabled", "selectable", "touchActions", "disableParentNodesOnly", "loadOnDemand", "trackBy", "nodes", "textField", "parentDataItem", "parentIndex", "nodeTemplateRef", "loadMoreButtonTemplateRef", "loadMoreService", "size", "expandDisabledNodes", "isChecked", "isDisabled", "hasCheckbox", "isExpanded", "isVisible", "isSelected", "children", "hasChildren"] }, { kind: "directive", type: TreeViewItemDirective, selector: "[kendoTreeViewItem]", inputs: ["dataItem", "index", "parentDataItem", "parentIndex", "role", "loadOnDemand", "checkable", "selectable", "expandable", "isChecked", "isDisabled", "isVisible", "isExpanded", "isSelected"] }, { kind: "directive", type: LoadingIndicatorDirective, selector: "[kendoTreeViewLoading]", inputs: ["kendoTreeViewLoading"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "component", type: CheckBoxComponent, selector: "kendo-checkbox", inputs: ["checkedState", "rounded"], outputs: ["checkedStateChange"], exportAs: ["kendoCheckBox"] }, { kind: "directive", type: TreeViewItemContentWrapperDirective, selector: "[kendoTreeViewItemContentWrapper]", inputs: ["dataItem", "index", "initialSelection", "isSelected"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [
|
|
1882
1886
|
trigger('toggle', [
|
|
1883
1887
|
transition('void => *', [
|
|
1884
1888
|
style({ height: 0 }),
|
|
@@ -1930,10 +1934,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
1930
1934
|
[isSelected]="isSelected(node, nodeIndex(index))"
|
|
1931
1935
|
[attr.data-treeindex]="nodeIndex(index)"
|
|
1932
1936
|
>
|
|
1933
|
-
|
|
1937
|
+
|
|
1938
|
+
<div kendoTreeViewItemContentWrapper
|
|
1939
|
+
[dataItem]="node"
|
|
1940
|
+
[index]="nodeIndex(index)"
|
|
1941
|
+
[initialSelection]="isSelected(node, nodeIndex(index))"
|
|
1942
|
+
[isSelected]="isSelected"
|
|
1943
|
+
class="k-treeview-item-content"
|
|
1944
|
+
[class.k-disabled]="isContentDisabled(node, index)">
|
|
1934
1945
|
@if (expandIcons && hasChildren(node)) {
|
|
1935
1946
|
<span
|
|
1936
|
-
[class.k-disabled]="!isItemExpandable(node, index)"
|
|
1937
1947
|
class="k-treeview-toggle"
|
|
1938
1948
|
[kendoTreeViewLoading]="nodeIndex(index)"
|
|
1939
1949
|
(click)="expandNode(nodeIndex(index), node, !isExpanded(node, nodeIndex(index)))"
|
|
@@ -1955,16 +1965,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
1955
1965
|
[inputAttributes]="getCheckboxAttributes(index)"
|
|
1956
1966
|
></kendo-checkbox>
|
|
1957
1967
|
}
|
|
1958
|
-
<span
|
|
1968
|
+
<span
|
|
1959
1969
|
[id]="nodeIndex(index)"
|
|
1960
1970
|
[attr.data-treeindex]="nodeIndex(index)"
|
|
1961
|
-
[dataItem]="node"
|
|
1962
|
-
[index]="nodeIndex(index)"
|
|
1963
|
-
[initialSelection]="isSelected(node, nodeIndex(index))"
|
|
1964
|
-
[isSelected]="isSelected"
|
|
1965
1971
|
class="k-treeview-leaf"
|
|
1966
1972
|
[style.touch-action]="touchActions ? '' : 'none'"
|
|
1967
|
-
[class.k-disabled]="isItemDisabled(node, index)"
|
|
1968
1973
|
>
|
|
1969
1974
|
<span class="k-treeview-leaf-text">
|
|
1970
1975
|
@switch (hasTemplate) {
|
|
@@ -2034,7 +2039,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
2034
2039
|
[parentIndex]="parentIndex"
|
|
2035
2040
|
[attr.data-treeindex]="loadMoreButtonIndex"
|
|
2036
2041
|
>
|
|
2037
|
-
<div
|
|
2042
|
+
<div
|
|
2043
|
+
kendoTreeViewItemContentWrapper
|
|
2044
|
+
[index]="loadMoreButtonIndex"
|
|
2045
|
+
class="k-treeview-item-content">
|
|
2038
2046
|
@if (loadingMoreNodes) {
|
|
2039
2047
|
<span
|
|
2040
2048
|
class="k-icon k-i-loading"
|
|
@@ -2044,8 +2052,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
2044
2052
|
<span
|
|
2045
2053
|
class="k-treeview-leaf k-treeview-load-more-button"
|
|
2046
2054
|
[attr.data-treeindex]="loadMoreButtonIndex"
|
|
2047
|
-
kendoTreeViewItemContent
|
|
2048
|
-
[index]="loadMoreButtonIndex"
|
|
2049
2055
|
>
|
|
2050
2056
|
<span class="k-treeview-leaf-text">
|
|
2051
2057
|
@if (loadMoreButtonTemplateRef) {
|
|
@@ -2067,7 +2073,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
2067
2073
|
}
|
|
2068
2074
|
`,
|
|
2069
2075
|
standalone: true,
|
|
2070
|
-
imports: [TreeViewItemDirective,
|
|
2076
|
+
imports: [TreeViewItemDirective, LoadingIndicatorDirective, IconWrapperComponent, CheckBoxComponent, TreeViewItemContentWrapperDirective, NgTemplateOutlet]
|
|
2071
2077
|
}]
|
|
2072
2078
|
}], ctorParameters: () => [{ type: ExpandStateService }, { type: LoadingNotificationService }, { type: IndexBuilderService }, { type: TreeViewLookupService }, { type: NavigationService }, { type: NodeChildrenService }, { type: DataChangeNotificationService }, { type: i0.ChangeDetectorRef }, { type: i1.LocalizationService }, { type: i0.Renderer2 }], propDecorators: { kGroupClass: [{
|
|
2073
2079
|
type: HostBinding,
|
|
@@ -2180,7 +2186,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
2180
2186
|
}], ctorParameters: () => [{ type: i1.LocalizationService }] });
|
|
2181
2187
|
|
|
2182
2188
|
let nextId = 0;
|
|
2183
|
-
const LOAD_MORE_DOC_LINK$1 = 'https://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button
|
|
2189
|
+
const LOAD_MORE_DOC_LINK$1 = 'https://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button';
|
|
2184
2190
|
const providers = [
|
|
2185
2191
|
ExpandStateService,
|
|
2186
2192
|
IndexBuilderService,
|
|
@@ -2205,7 +2211,7 @@ const providers = [
|
|
|
2205
2211
|
}
|
|
2206
2212
|
];
|
|
2207
2213
|
/**
|
|
2208
|
-
* Represents the [Kendo UI TreeView component for Angular](
|
|
2214
|
+
* Represents the [Kendo UI TreeView component for Angular](https://www.telerik.com/kendo-angular-ui/components/treeview).
|
|
2209
2215
|
*
|
|
2210
2216
|
* @example
|
|
2211
2217
|
* ```html
|
|
@@ -2292,12 +2298,12 @@ class TreeViewComponent {
|
|
|
2292
2298
|
*/
|
|
2293
2299
|
collapse = new EventEmitter();
|
|
2294
2300
|
/**
|
|
2295
|
-
* Fires just before node dragging starts ([see example](
|
|
2301
|
+
* Fires just before node dragging starts ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#setup)). This event is preventable.
|
|
2296
2302
|
* Prevent the default event to stop drag hint creation and further drag events.
|
|
2297
2303
|
*/
|
|
2298
2304
|
nodeDragStart = new EventEmitter();
|
|
2299
2305
|
/**
|
|
2300
|
-
* Fires when an item is being dragged ([see example](
|
|
2306
|
+
* Fires when an item is being dragged ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#setup)).
|
|
2301
2307
|
*/
|
|
2302
2308
|
nodeDrag = new EventEmitter();
|
|
2303
2309
|
/**
|
|
@@ -2306,7 +2312,7 @@ class TreeViewComponent {
|
|
|
2306
2312
|
*/
|
|
2307
2313
|
filterStateChange = new EventEmitter();
|
|
2308
2314
|
/**
|
|
2309
|
-
* Fires on the target TreeView when a dragged item is dropped ([see example](
|
|
2315
|
+
* Fires on the target TreeView when a dragged item is dropped ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#setup)).
|
|
2310
2316
|
*
|
|
2311
2317
|
* Prevent the default event (`event.preventDefault()`) or set the event as invalid (`event.setValid(false)`) to stop the `addItem` and `removeItem` events from triggering.
|
|
2312
2318
|
*
|
|
@@ -2314,23 +2320,23 @@ class TreeViewComponent {
|
|
|
2314
2320
|
*/
|
|
2315
2321
|
nodeDrop = new EventEmitter();
|
|
2316
2322
|
/**
|
|
2317
|
-
* Fires on the source TreeView after the dragged item is dropped ([see example](
|
|
2323
|
+
* Fires on the source TreeView after the dragged item is dropped ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#setup)).
|
|
2318
2324
|
*/
|
|
2319
2325
|
nodeDragEnd = new EventEmitter();
|
|
2320
2326
|
/**
|
|
2321
|
-
* Fires after a dragged item is dropped ([see example](
|
|
2327
|
+
* Fires after a dragged item is dropped ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#setup)). Called on the TreeView where the item is dropped.
|
|
2322
2328
|
*/
|
|
2323
2329
|
addItem = new EventEmitter();
|
|
2324
2330
|
/**
|
|
2325
|
-
* Fires after a dragged item is dropped ([see example](
|
|
2331
|
+
* Fires after a dragged item is dropped ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#setup)). Called on the TreeView from where the item is dragged.
|
|
2326
2332
|
*/
|
|
2327
2333
|
removeItem = new EventEmitter();
|
|
2328
2334
|
/**
|
|
2329
|
-
* Fires when a TreeView node checkbox is selected ([see example](
|
|
2335
|
+
* Fires when a TreeView node checkbox is selected ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/checkboxes#modifying-the-checked-state)).
|
|
2330
2336
|
*/
|
|
2331
2337
|
checkedChange = new EventEmitter();
|
|
2332
2338
|
/**
|
|
2333
|
-
* Fires when a TreeView node is selected ([see example](
|
|
2339
|
+
* Fires when a TreeView node is selected ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/selection#modifying-the-selection-behavior)).
|
|
2334
2340
|
*/
|
|
2335
2341
|
selectionChange = new EventEmitter();
|
|
2336
2342
|
/**
|
|
@@ -2389,7 +2395,7 @@ class TreeViewComponent {
|
|
|
2389
2395
|
*/
|
|
2390
2396
|
trackBy = trackBy;
|
|
2391
2397
|
/**
|
|
2392
|
-
* The nodes displayed by the TreeView ([see example](
|
|
2398
|
+
* The nodes displayed by the TreeView ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/data-binding)).
|
|
2393
2399
|
*/
|
|
2394
2400
|
set nodes(value) {
|
|
2395
2401
|
this.data.next(value || []);
|
|
@@ -2399,12 +2405,12 @@ class TreeViewComponent {
|
|
|
2399
2405
|
return this.data.value;
|
|
2400
2406
|
}
|
|
2401
2407
|
/**
|
|
2402
|
-
* The fields of the data item that provide the text content of the nodes ([see example](
|
|
2408
|
+
* The fields of the data item that provide the text content of the nodes ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/data-binding)).
|
|
2403
2409
|
* If set to an array, each level uses the field at the same index or the last item in the array.
|
|
2404
2410
|
*/
|
|
2405
2411
|
textField;
|
|
2406
2412
|
/**
|
|
2407
|
-
* A function that determines if a node has child nodes ([see example](
|
|
2413
|
+
* A function that determines if a node has child nodes ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/data-binding)).
|
|
2408
2414
|
*/
|
|
2409
2415
|
get hasChildren() {
|
|
2410
2416
|
return this._hasChildren || hasChildren;
|
|
@@ -2414,7 +2420,7 @@ class TreeViewComponent {
|
|
|
2414
2420
|
this.expandIcons = Boolean(this._isExpanded && this._hasChildren);
|
|
2415
2421
|
}
|
|
2416
2422
|
/**
|
|
2417
|
-
* A function that determines if a node is checked ([see example](
|
|
2423
|
+
* A function that determines if a node is checked ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/checkboxes#modifying-the-checked-state)).
|
|
2418
2424
|
*/
|
|
2419
2425
|
get isChecked() {
|
|
2420
2426
|
return this._isChecked || isChecked;
|
|
@@ -2442,7 +2448,7 @@ class TreeViewComponent {
|
|
|
2442
2448
|
this.expandIcons = Boolean(this._isExpanded && this._hasChildren);
|
|
2443
2449
|
}
|
|
2444
2450
|
/**
|
|
2445
|
-
* A function that determines if a node is selected ([see example](
|
|
2451
|
+
* A function that determines if a node is selected ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/selection#modifying-the-selection-behavior)).
|
|
2446
2452
|
*/
|
|
2447
2453
|
get isSelected() {
|
|
2448
2454
|
return this._isSelected || isSelected;
|
|
@@ -2463,7 +2469,7 @@ class TreeViewComponent {
|
|
|
2463
2469
|
*/
|
|
2464
2470
|
navigable = true;
|
|
2465
2471
|
/**
|
|
2466
|
-
* A function that provides the child nodes for a given parent node ([see example](
|
|
2472
|
+
* A function that provides the child nodes for a given parent node ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/data-binding)).
|
|
2467
2473
|
*/
|
|
2468
2474
|
children = () => of([]);
|
|
2469
2475
|
/**
|
|
@@ -2473,8 +2479,8 @@ class TreeViewComponent {
|
|
|
2473
2479
|
*/
|
|
2474
2480
|
loadOnDemand = true;
|
|
2475
2481
|
/**
|
|
2476
|
-
* Renders the built-in input element for filtering. If `true`, emits the `filterChange` event that can be handled for [manual filtering](
|
|
2477
|
-
* Built-in filtering is available with [`kendoTreeViewHierarchyBinding`](
|
|
2482
|
+
* Renders the built-in input element for filtering. If `true`, emits the `filterChange` event that can be handled for [manual filtering](https://www.telerik.com/kendo-angular-ui/components/treeview/filtering#manual-filtering).
|
|
2483
|
+
* Built-in filtering is available with [`kendoTreeViewHierarchyBinding`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/hierarchybindingdirective) and [`kendoTreeViewFlatDataBinding`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/flatdatabindingdirective) directives.
|
|
2478
2484
|
*
|
|
2479
2485
|
* @default false
|
|
2480
2486
|
*/
|
|
@@ -2486,14 +2492,15 @@ class TreeViewComponent {
|
|
|
2486
2492
|
/**
|
|
2487
2493
|
* Sets the size of the component.
|
|
2488
2494
|
*
|
|
2489
|
-
* @default
|
|
2495
|
+
* @default undefined
|
|
2490
2496
|
*/
|
|
2491
2497
|
set size(size) {
|
|
2492
|
-
|
|
2493
|
-
if (this.size !== 'none') {
|
|
2498
|
+
if (isPresent(this.size)) {
|
|
2494
2499
|
this.renderer.removeClass(this.element.nativeElement, getSizeClass('treeview', this.size));
|
|
2495
2500
|
}
|
|
2496
|
-
|
|
2501
|
+
if (isPresent(size)) {
|
|
2502
|
+
this.renderer.addClass(this.element.nativeElement, getSizeClass('treeview', size));
|
|
2503
|
+
}
|
|
2497
2504
|
this._size = size;
|
|
2498
2505
|
}
|
|
2499
2506
|
get size() {
|
|
@@ -2534,7 +2541,7 @@ class TreeViewComponent {
|
|
|
2534
2541
|
_hasChildren;
|
|
2535
2542
|
_nodeTemplateRef;
|
|
2536
2543
|
_loadMoreButtonTemplateRef;
|
|
2537
|
-
_size =
|
|
2544
|
+
_size = undefined;
|
|
2538
2545
|
subscriptions = new Subscription();
|
|
2539
2546
|
domSubscriptions = [];
|
|
2540
2547
|
_nextId = nextId;
|
|
@@ -2631,7 +2638,7 @@ class TreeViewComponent {
|
|
|
2631
2638
|
return this.treeViewLookupService.itemLookup(index);
|
|
2632
2639
|
}
|
|
2633
2640
|
/**
|
|
2634
|
-
* Calls the [`children`](
|
|
2641
|
+
* Calls the [`children`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#children) function for every expanded node and fetches all rendered child nodes again.
|
|
2635
2642
|
*/
|
|
2636
2643
|
rebindChildren() {
|
|
2637
2644
|
this.dataChangeNotification.notify();
|
|
@@ -2649,7 +2656,7 @@ class TreeViewComponent {
|
|
|
2649
2656
|
this.expandService.collapse(index, item);
|
|
2650
2657
|
}
|
|
2651
2658
|
/**
|
|
2652
|
-
* Gets the current page size of the data item's children collection ([see example](
|
|
2659
|
+
* Gets the current page size of the data item's children collection ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button#managing-page-sizes)).
|
|
2653
2660
|
* Pass `null` as `dataItem` to get the root collection's page size.
|
|
2654
2661
|
*
|
|
2655
2662
|
* @param dataItem {any} - The parent data item of the targeted collection.
|
|
@@ -2660,7 +2667,7 @@ class TreeViewComponent {
|
|
|
2660
2667
|
return this.loadMoreService.getGroupSize(dataItem);
|
|
2661
2668
|
}
|
|
2662
2669
|
/**
|
|
2663
|
-
* Sets the page size of the data item's children collection ([see example](
|
|
2670
|
+
* Sets the page size of the data item's children collection ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button#managing-page-sizes)).
|
|
2664
2671
|
* Pass `null` as `dataItem` to set the root collection's page size.
|
|
2665
2672
|
*
|
|
2666
2673
|
* @param dataItem {any} - The parent data item of the targeted collection.
|
|
@@ -3036,7 +3043,7 @@ const matchKey = index => k => {
|
|
|
3036
3043
|
};
|
|
3037
3044
|
/**
|
|
3038
3045
|
* Represents a directive that manages the in-memory checked state of the TreeView node
|
|
3039
|
-
* ([see example](
|
|
3046
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/checkboxes)).
|
|
3040
3047
|
*
|
|
3041
3048
|
* @example
|
|
3042
3049
|
* ```html
|
|
@@ -3066,13 +3073,13 @@ class CheckDirective {
|
|
|
3066
3073
|
checkKey;
|
|
3067
3074
|
/**
|
|
3068
3075
|
* Defines the collection that stores the checked keys
|
|
3069
|
-
* ([see example](
|
|
3076
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/checkboxes)).
|
|
3070
3077
|
*/
|
|
3071
3078
|
checkedKeys;
|
|
3072
3079
|
/**
|
|
3073
3080
|
* Defines the checkable settings
|
|
3074
|
-
* ([see example](
|
|
3075
|
-
* If you do not provide a value, the default [`CheckableSettings`](
|
|
3081
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/checkboxes#setup)).
|
|
3082
|
+
* If you do not provide a value, the default [`CheckableSettings`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/checkablesettings) apply.
|
|
3076
3083
|
*/
|
|
3077
3084
|
checkable;
|
|
3078
3085
|
/**
|
|
@@ -3342,7 +3349,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
3342
3349
|
|
|
3343
3350
|
/**
|
|
3344
3351
|
* Represents a directive which manages the disabled in-memory state of the TreeView node
|
|
3345
|
-
* ([see example](
|
|
3352
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/disabled-state)).
|
|
3346
3353
|
*
|
|
3347
3354
|
* @example
|
|
3348
3355
|
* ```html
|
|
@@ -3419,12 +3426,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
3419
3426
|
/**
|
|
3420
3427
|
* Represents the directive that enables you to update the initially provided data array during drag-and-drop.
|
|
3421
3428
|
*
|
|
3422
|
-
* Use this directive with one of the data-binding directives ([`kendoTreeViewHierarchyBinding`](
|
|
3423
|
-
* or [`kendoTreeViewFlatDataBinding`](
|
|
3424
|
-
* your own [`editService`](
|
|
3429
|
+
* Use this directive with one of the data-binding directives ([`kendoTreeViewHierarchyBinding`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/hierarchybindingdirective)
|
|
3430
|
+
* or [`kendoTreeViewFlatDataBinding`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/flatdatabindingdirective)), which set their own edit handlers, or provide
|
|
3431
|
+
* your own [`editService`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/editservice) to this directive.
|
|
3425
3432
|
*
|
|
3426
3433
|
* Providing a custom `editService` allows you to handle the
|
|
3427
|
-
* [`addItem`](
|
|
3434
|
+
* [`addItem`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#additem) and [`removeItem`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#removeitem)
|
|
3428
3435
|
* events when they are triggered by the TreeView component.
|
|
3429
3436
|
*
|
|
3430
3437
|
* @example
|
|
@@ -3443,8 +3450,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
3443
3450
|
class DragAndDropEditingDirective {
|
|
3444
3451
|
treeview;
|
|
3445
3452
|
/**
|
|
3446
|
-
* Specifies the handlers called on drag-and-drop [`addItem`](
|
|
3447
|
-
* and [`removeItem`](
|
|
3453
|
+
* Specifies the handlers called on drag-and-drop [`addItem`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#additem)
|
|
3454
|
+
* and [`removeItem`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#removeitem) events.
|
|
3448
3455
|
*/
|
|
3449
3456
|
set editService(service) {
|
|
3450
3457
|
this.treeview.editService = service;
|
|
@@ -3485,7 +3492,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
3485
3492
|
|
|
3486
3493
|
/**
|
|
3487
3494
|
* Represents the attempted drop action during dragging.
|
|
3488
|
-
* Passed as `action` value to the [`kendoTreeViewDragClueTemplate`](
|
|
3495
|
+
* Passed as `action` value to the [`kendoTreeViewDragClueTemplate`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/dragcluetemplatedirective) directive.
|
|
3489
3496
|
* By default, this value defines the rendered icon in the drag clue.
|
|
3490
3497
|
*/
|
|
3491
3498
|
var DropAction;
|
|
@@ -3563,7 +3570,7 @@ class PreventableEvent {
|
|
|
3563
3570
|
}
|
|
3564
3571
|
|
|
3565
3572
|
/**
|
|
3566
|
-
* Arguments for the TreeView [`nodeDrop`](
|
|
3573
|
+
* Arguments for the TreeView [`nodeDrop`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#nodedrop) event.
|
|
3567
3574
|
*/
|
|
3568
3575
|
class TreeItemDropEvent extends PreventableEvent {
|
|
3569
3576
|
/**
|
|
@@ -3613,7 +3620,7 @@ class TreeItemDropEvent extends PreventableEvent {
|
|
|
3613
3620
|
}
|
|
3614
3621
|
|
|
3615
3622
|
/**
|
|
3616
|
-
* Arguments for the TreeView [`nodeDragStart`](
|
|
3623
|
+
* Arguments for the TreeView [`nodeDragStart`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#nodedragstart) event.
|
|
3617
3624
|
*/
|
|
3618
3625
|
class TreeItemDragStartEvent extends PreventableEvent {
|
|
3619
3626
|
/**
|
|
@@ -3634,8 +3641,8 @@ class TreeItemDragStartEvent extends PreventableEvent {
|
|
|
3634
3641
|
}
|
|
3635
3642
|
|
|
3636
3643
|
/**
|
|
3637
|
-
* Arguments for the TreeView [`nodeDrag`](
|
|
3638
|
-
* [`nodeDragEnd`](
|
|
3644
|
+
* Arguments for the TreeView [`nodeDrag`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#nodedrag) and
|
|
3645
|
+
* [`nodeDragEnd`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#nodedragend) events.
|
|
3639
3646
|
*/
|
|
3640
3647
|
class TreeItemDragEvent {
|
|
3641
3648
|
/** @hidden */
|
|
@@ -3910,7 +3917,7 @@ const getDropPosition = (draggedItem, target, clientY, targetTreeView, container
|
|
|
3910
3917
|
return;
|
|
3911
3918
|
}
|
|
3912
3919
|
// the .k-treeview-mid element starts just after the checkbox/expand arrow and stretches till the end of the treeview on the right
|
|
3913
|
-
const item = closestWithMatch(target, '.k-treeview-
|
|
3920
|
+
const item = closestWithMatch(target, '.k-treeview-item-content');
|
|
3914
3921
|
if (!isPresent(item)) {
|
|
3915
3922
|
return;
|
|
3916
3923
|
}
|
|
@@ -4329,13 +4336,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
4329
4336
|
* Represents the template for the TreeView drag clue when you drag an item.
|
|
4330
4337
|
*
|
|
4331
4338
|
* To define the drag clue template, nest an `<ng-template>` tag with the `kendoTreeViewDragClueTemplate` directive inside a `<kendo-treeview>` tag
|
|
4332
|
-
* ([see example](
|
|
4339
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#templates)).
|
|
4333
4340
|
*
|
|
4334
4341
|
* The template context provides the following variables:
|
|
4335
4342
|
* - `let-text="text"` (`string`)—The display text of the item being dragged.
|
|
4336
|
-
* - `let-action="action"` ([`DropAction`](
|
|
4337
|
-
* - `let-sourceItem="sourceItem"` ([`TreeItemLookup`](
|
|
4338
|
-
* - `let-destinationItem="destinationItem"` ([`TreeItemLookup`](
|
|
4343
|
+
* - `let-action="action"` ([`DropAction`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/dropaction))—The type of drop action that will occur.
|
|
4344
|
+
* - `let-sourceItem="sourceItem"` ([`TreeItemLookup`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeitemlookup))—The TreeView item that is being dragged from its original position.
|
|
4345
|
+
* - `let-destinationItem="destinationItem"` ([`TreeItemLookup`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeitemlookup))—The TreeView item that serves as the target for the drop operation.
|
|
4339
4346
|
*
|
|
4340
4347
|
* @example
|
|
4341
4348
|
* ```html
|
|
@@ -4368,12 +4375,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
4368
4375
|
* Represents the template for the TreeView drop hint when you drag an item.
|
|
4369
4376
|
*
|
|
4370
4377
|
* To define the hint template, nest an `<ng-template>` tag with the `kendoTreeViewDropHintTemplate` directive inside a `<kendo-treeview>` tag
|
|
4371
|
-
* ([see example](
|
|
4378
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#templates)).
|
|
4372
4379
|
*
|
|
4373
4380
|
* The template context provides the following variables:
|
|
4374
|
-
* - `let-action="action"` ([`DropAction`](
|
|
4375
|
-
* - `let-sourceItem="sourceItem"` ([`TreeItemLookup`](
|
|
4376
|
-
* - `let-destinationItem="destinationItem"` ([`TreeItemLookup`](
|
|
4381
|
+
* - `let-action="action"` ([`DropAction`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/dropaction))—The drop action being performed.
|
|
4382
|
+
* - `let-sourceItem="sourceItem"` ([`TreeItemLookup`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeitemlookup))—The item being dragged.
|
|
4383
|
+
* - `let-destinationItem="destinationItem"` ([`TreeItemLookup`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeitemlookup))—The target item for the drop operation.
|
|
4377
4384
|
*
|
|
4378
4385
|
* @example
|
|
4379
4386
|
* ```html
|
|
@@ -4409,14 +4416,14 @@ const DEFAULT_SCROLL_SETTINGS = {
|
|
|
4409
4416
|
};
|
|
4410
4417
|
/**
|
|
4411
4418
|
* Represents the directive that enables you to drag and drop items inside the current TreeView or between multiple linked TreeView component instances
|
|
4412
|
-
* ([see example](
|
|
4419
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop)).
|
|
4413
4420
|
*
|
|
4414
|
-
* Triggers the [`nodeDragStart`](
|
|
4415
|
-
* [`nodeDrag`](
|
|
4416
|
-
* [`nodeDrop`](
|
|
4417
|
-
* [`nodeDragEnd`](
|
|
4418
|
-
* [`addItem`](
|
|
4419
|
-
* [`removeItem`](
|
|
4421
|
+
* Triggers the [`nodeDragStart`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#nodedragstart),
|
|
4422
|
+
* [`nodeDrag`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#nodedrag),
|
|
4423
|
+
* [`nodeDrop`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#nodedrop),
|
|
4424
|
+
* [`nodeDragEnd`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#nodedragend),
|
|
4425
|
+
* [`addItem`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#additem) and
|
|
4426
|
+
* [`removeItem`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/treeviewcomponent#removeitem)
|
|
4420
4427
|
* events when you perform the corresponding actions.
|
|
4421
4428
|
*
|
|
4422
4429
|
* @example
|
|
@@ -4440,14 +4447,14 @@ class DragAndDropDirective {
|
|
|
4440
4447
|
/**
|
|
4441
4448
|
* Specifies whether the `removeItem` event fires after the user drops an item while pressing the `ctrl` key.
|
|
4442
4449
|
* If enabled, the `removeItem` event does not fire on the source TreeView
|
|
4443
|
-
* ([see example](
|
|
4450
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#multiple-treeviews)).
|
|
4444
4451
|
*
|
|
4445
4452
|
* @default false
|
|
4446
4453
|
*/
|
|
4447
4454
|
allowCopy = false;
|
|
4448
4455
|
/**
|
|
4449
4456
|
* Specifies the `TreeViewComponent` instances into which the user can drop dragged items from the current `TreeViewComponent`
|
|
4450
|
-
* ([see example](
|
|
4457
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#multiple-treeviews)).
|
|
4451
4458
|
*/
|
|
4452
4459
|
dropZoneTreeViews = [];
|
|
4453
4460
|
/**
|
|
@@ -4458,7 +4465,7 @@ class DragAndDropDirective {
|
|
|
4458
4465
|
*/
|
|
4459
4466
|
startDragAfter = 5;
|
|
4460
4467
|
/**
|
|
4461
|
-
* Controls the auto-scrolling behavior during drag-and-drop ([see example](
|
|
4468
|
+
* Controls the auto-scrolling behavior during drag-and-drop ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/drag-and-drop#auto-scrolling)).
|
|
4462
4469
|
* Enabled by default. To turn off auto-scrolling, set this property to `false`.
|
|
4463
4470
|
*
|
|
4464
4471
|
* By default, scrolling occurs by 1 pixel every 1 millisecond when the dragged item reaches the top or bottom of the scrollable container.
|
|
@@ -4523,7 +4530,7 @@ class DragAndDropDirective {
|
|
|
4523
4530
|
return;
|
|
4524
4531
|
}
|
|
4525
4532
|
// store the drag target on press, show it only when it's actually dragged
|
|
4526
|
-
this.draggedItem = closestWithMatch(originalEvent.target, '.k-treeview-
|
|
4533
|
+
this.draggedItem = closestWithMatch(originalEvent.target, '.k-treeview-item-content');
|
|
4527
4534
|
// record the current pointer down coords - copared to the `startDragAfter` value to calculate whether to initiate dragging
|
|
4528
4535
|
this.pendingDragStartEvent = originalEvent;
|
|
4529
4536
|
}
|
|
@@ -4543,7 +4550,7 @@ class DragAndDropDirective {
|
|
|
4543
4550
|
}
|
|
4544
4551
|
const targetTreeView = this.getTargetTreeView(dropTarget);
|
|
4545
4552
|
const dropPosition = getDropPosition(this.draggedItem, dropTarget, clientY, targetTreeView, this.containerOffset);
|
|
4546
|
-
const dropHintAnchor = closestWithMatch(dropTarget, '.k-treeview-
|
|
4553
|
+
const dropHintAnchor = closestWithMatch(dropTarget, '.k-treeview-item-content');
|
|
4547
4554
|
const dropAction = getDropAction(dropPosition, dropTarget);
|
|
4548
4555
|
const sourceItem = treeItemFromEventTarget(this.treeview, this.draggedItem);
|
|
4549
4556
|
const destinationItem = treeItemFromEventTarget(targetTreeView, dropTarget);
|
|
@@ -4739,7 +4746,7 @@ const DEFAULT_FILTER_EXPAND_SETTINGS = {
|
|
|
4739
4746
|
};
|
|
4740
4747
|
/**
|
|
4741
4748
|
* Represents a directive that manages the expanded state of the TreeView
|
|
4742
|
-
* ([see example](
|
|
4749
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treelist/expanded-state)).
|
|
4743
4750
|
*
|
|
4744
4751
|
* @example
|
|
4745
4752
|
* ```html
|
|
@@ -4769,7 +4776,7 @@ class ExpandDirective {
|
|
|
4769
4776
|
expandKey;
|
|
4770
4777
|
/**
|
|
4771
4778
|
* Specifies whether to auto-expand the nodes leading from the root node to each filter result.
|
|
4772
|
-
* To fine-tune this behavior, pass a [`FilterExpandSettings`](
|
|
4779
|
+
* To fine-tune this behavior, pass a [`FilterExpandSettings`](https://www.telerik.com/kendo-angular-ui/components/treeview/api/filterexpandsettings) object to this input.
|
|
4773
4780
|
* @default false
|
|
4774
4781
|
*/
|
|
4775
4782
|
expandOnFilter = false;
|
|
@@ -5585,10 +5592,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
5585
5592
|
type: Input
|
|
5586
5593
|
}] } });
|
|
5587
5594
|
|
|
5588
|
-
const LOAD_MORE_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button
|
|
5595
|
+
const LOAD_MORE_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button';
|
|
5589
5596
|
/**
|
|
5590
5597
|
* Represents the directive that enables you to display only a limited number of nodes per level
|
|
5591
|
-
* ([see example](
|
|
5598
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button)).
|
|
5592
5599
|
*
|
|
5593
5600
|
* @example
|
|
5594
5601
|
* ```html
|
|
@@ -5609,7 +5616,7 @@ class LoadMoreDirective {
|
|
|
5609
5616
|
/**
|
|
5610
5617
|
* Sets the callback function that runs when the load more button is clicked.
|
|
5611
5618
|
* Provide a function when you fetch additional nodes on demand
|
|
5612
|
-
* ([see example](
|
|
5619
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button#remote-data)).
|
|
5613
5620
|
*
|
|
5614
5621
|
*/
|
|
5615
5622
|
set loadMoreNodes(loadMoreNodes) {
|
|
@@ -5626,13 +5633,13 @@ class LoadMoreDirective {
|
|
|
5626
5633
|
/**
|
|
5627
5634
|
* Sets the total number of root nodes.
|
|
5628
5635
|
* Use this property when you fetch additional nodes on demand
|
|
5629
|
-
* ([see example](
|
|
5636
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button#remote-data)).
|
|
5630
5637
|
*/
|
|
5631
5638
|
totalRootNodes;
|
|
5632
5639
|
/**
|
|
5633
5640
|
* Sets the field that contains the total number of child nodes for the data item.
|
|
5634
5641
|
* Use this property when you fetch additional nodes on demand
|
|
5635
|
-
* ([see example](
|
|
5642
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/load-more-button#remote-data)).
|
|
5636
5643
|
*/
|
|
5637
5644
|
totalField;
|
|
5638
5645
|
/**
|
|
@@ -5761,7 +5768,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
|
|
|
5761
5768
|
|
|
5762
5769
|
/**
|
|
5763
5770
|
* Manages the in-memory selection state of TreeView nodes
|
|
5764
|
-
* ([see example](
|
|
5771
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/selection)).
|
|
5765
5772
|
*
|
|
5766
5773
|
* @example
|
|
5767
5774
|
* ```html
|
|
@@ -5792,12 +5799,12 @@ class SelectDirective {
|
|
|
5792
5799
|
selectKey;
|
|
5793
5800
|
/**
|
|
5794
5801
|
* Sets the current selection mode
|
|
5795
|
-
* ([see example](
|
|
5802
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/selection)).
|
|
5796
5803
|
*/
|
|
5797
5804
|
selection;
|
|
5798
5805
|
/**
|
|
5799
5806
|
* Defines the collection that stores the selected keys
|
|
5800
|
-
* ([see example](
|
|
5807
|
+
* ([see example](https://www.telerik.com/kendo-angular-ui/components/treeview/selection)).
|
|
5801
5808
|
*/
|
|
5802
5809
|
selectedKeys;
|
|
5803
5810
|
/**
|