@progress/kendo-angular-treeview 17.0.0-develop.9 → 17.0.1-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/README.md +30 -17
- package/check-mode.d.ts +1 -1
- package/check.directive.d.ts +1 -1
- package/checkbox/checked-state.d.ts +1 -1
- package/disable.directive.d.ts +1 -1
- package/drag-and-drop/drag-and-drop-editing.directive.d.ts +1 -1
- package/drag-and-drop/drag-and-drop.directive.d.ts +1 -1
- package/{esm2020 → esm2022}/check.directive.mjs +48 -27
- package/{esm2020 → esm2022}/data-bound-component.mjs +3 -3
- package/{esm2020 → esm2022}/data-change-notification.service.mjs +1 -3
- package/{esm2020 → esm2022}/disable.directive.mjs +18 -12
- package/{esm2020 → esm2022}/drag-and-drop/drag-and-drop-editing.directive.mjs +10 -9
- package/{esm2020 → esm2022}/drag-and-drop/drag-and-drop.directive.mjs +73 -52
- package/{esm2020 → esm2022}/drag-and-drop/drag-clue/drag-clue-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/drag-and-drop/drag-clue/drag-clue.component.mjs +30 -9
- package/{esm2020 → esm2022}/drag-and-drop/drag-clue/drag-clue.service.mjs +6 -3
- package/{esm2020 → esm2022}/drag-and-drop/drop-hint/drop-hint-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/drag-and-drop/drop-hint/drop-hint.component.mjs +24 -7
- package/{esm2020 → esm2022}/drag-and-drop/drop-hint/drop-hint.service.mjs +4 -3
- package/{esm2020 → esm2022}/drag-and-drop/editing-services/drag-and-drop-asset.service.mjs +4 -3
- package/{esm2020 → esm2022}/drag-and-drop/editing-services/flat-editing.service.mjs +2 -0
- package/{esm2020 → esm2022}/drag-and-drop/editing-services/hierarchy-editing.service.mjs +2 -0
- package/{esm2020 → esm2022}/drag-and-drop/models/preventable-event.mjs +1 -3
- package/{esm2020 → esm2022}/drag-and-drop/models/treeitem-drag-event.mjs +12 -0
- package/{esm2020 → esm2022}/drag-and-drop/models/treeitem-drag-start-event.mjs +8 -0
- package/{esm2020 → esm2022}/drag-and-drop/models/treeitem-drop-event.mjs +28 -4
- package/{esm2020 → esm2022}/expand-state.service.mjs +4 -6
- package/{esm2020 → esm2022}/expand.directive.mjs +67 -54
- package/{esm2020 → esm2022}/expandable-component.mjs +3 -3
- package/{esm2020 → esm2022}/filtering-base.mjs +13 -8
- package/{esm2020 → esm2022}/flat-binding.directive.mjs +26 -16
- package/{esm2020 → esm2022}/hierarchy-binding.directive.mjs +19 -15
- package/{esm2020 → esm2022}/index-builder.service.mjs +4 -6
- package/{esm2020 → esm2022}/load-more/load-more-button-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/load-more/load-more.directive.mjs +38 -20
- package/{esm2020 → esm2022}/loading-indicator.directive.mjs +14 -9
- package/{esm2020 → esm2022}/loading-notification.service.mjs +4 -6
- package/{esm2020 → esm2022}/localization/custom-messages.component.mjs +9 -8
- package/{esm2020 → esm2022}/localization/localized-messages.directive.mjs +9 -8
- package/{esm2020 → esm2022}/localization/messages.mjs +7 -3
- package/{esm2020 → esm2022}/navigation/navigation-model.mjs +2 -4
- package/{esm2020 → esm2022}/navigation/navigation.service.mjs +38 -36
- package/{esm2020 → esm2022}/node-children.service.mjs +4 -6
- package/{esm2020 → esm2022}/node-template.directive.mjs +4 -3
- package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
- package/{esm2020 → esm2022}/selection/select.directive.mjs +45 -25
- package/{esm2020 → esm2022}/selection/selection.service.mjs +5 -6
- package/{esm2020 → esm2022}/treeview-group.component.mjs +86 -56
- package/{esm2020 → esm2022}/treeview-item-content.directive.mjs +12 -6
- package/{esm2020 → esm2022}/treeview-item.directive.mjs +37 -21
- package/{esm2020 → esm2022}/treeview-lookup.service.mjs +4 -6
- package/{esm2020 → esm2022}/treeview.component.mjs +253 -194
- package/{esm2020 → esm2022}/treeview.module.mjs +12 -12
- package/expand.directive.d.ts +1 -1
- package/{fesm2020 → fesm2022}/progress-kendo-angular-treeview.mjs +1015 -694
- package/filtering-base.d.ts +1 -1
- package/flat-binding.directive.d.ts +1 -1
- package/hierarchy-binding.directive.d.ts +1 -1
- package/load-more/load-more.directive.d.ts +1 -1
- package/loading-indicator.directive.d.ts +1 -1
- package/localization/messages.d.ts +1 -1
- package/package.json +15 -21
- package/schematics/ngAdd/index.js +5 -5
- package/selection/select.directive.d.ts +1 -1
- package/selection/selection-mode.d.ts +1 -1
- package/size.d.ts +1 -1
- package/treeview-filter-settings.d.ts +1 -1
- package/treeview-group.component.d.ts +1 -1
- package/treeview-item-content.directive.d.ts +1 -1
- package/treeview-item.directive.d.ts +1 -1
- package/treeview.component.d.ts +1 -1
- package/fesm2015/progress-kendo-angular-treeview.mjs +0 -5545
- /package/{esm2020 → esm2022}/check-mode.mjs +0 -0
- /package/{esm2020 → esm2022}/checkable-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/checkbox/checked-state.mjs +0 -0
- /package/{esm2020 → esm2022}/default-callbacks.mjs +0 -0
- /package/{esm2020 → esm2022}/directives.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/drag-and-drop-utils.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/drop-action.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/drop-position.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/editing-service.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/scroll-direction.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/scroll-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/tree-item-filter-state.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models/treeitem-add-remove-args.mjs +0 -0
- /package/{esm2020 → esm2022}/drag-and-drop/models.mjs +0 -0
- /package/{esm2020 → esm2022}/filter-expand-settings.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/filter-state.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/funcs.mjs +0 -0
- /package/{esm2020 → esm2022}/index.mjs +0 -0
- /package/{esm2020 → esm2022}/load-more/load-more-request-args.mjs +0 -0
- /package/{esm2020 → esm2022}/load-more/load-more-utils.mjs +0 -0
- /package/{esm2020 → esm2022}/load-more/load-more.service.mjs +0 -0
- /package/{esm2020 → esm2022}/navigation/navigation-item.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/navigation/navigation-state.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/node-click-event.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/progress-kendo-angular-treeview.mjs +0 -0
- /package/{esm2020 → esm2022}/selection/selectable-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/selection/selection-mode.mjs +0 -0
- /package/{esm2020 → esm2022}/size.mjs +0 -0
- /package/{esm2020 → esm2022}/treeitem-lookup.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/treeitem.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/treeview-filter-settings.mjs +0 -0
- /package/{esm2020 → esm2022}/utils.mjs +0 -0
|
@@ -39,51 +39,56 @@ const BOT_ITEM = 'k-treeview-bot';
|
|
|
39
39
|
* @hidden
|
|
40
40
|
*/
|
|
41
41
|
export class TreeViewGroupComponent {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
this.initialNodesLoaded = false;
|
|
70
|
-
this.loadingMoreNodes = false;
|
|
71
|
-
this.isItemExpandable = (node, index) => this.expandDisabledNodes || !this.isItemDisabled(node, index);
|
|
72
|
-
this._data = [];
|
|
73
|
-
this.singleRecordSubscriptions = new Subscription();
|
|
74
|
-
this.localizationSubscriptions = new Subscription();
|
|
75
|
-
this.isChecked = () => 'none';
|
|
76
|
-
this.isDisabled = () => false;
|
|
77
|
-
this.hasCheckbox = () => true;
|
|
78
|
-
this.isExpanded = () => false;
|
|
79
|
-
this.isVisible = () => true;
|
|
80
|
-
this.isSelected = () => false;
|
|
81
|
-
this.children = () => of([]);
|
|
82
|
-
this.hasChildren = () => false;
|
|
83
|
-
}
|
|
42
|
+
expandService;
|
|
43
|
+
loadingService;
|
|
44
|
+
indexBuilder;
|
|
45
|
+
treeViewLookupService;
|
|
46
|
+
navigationService;
|
|
47
|
+
nodeChildrenService;
|
|
48
|
+
dataChangeNotification;
|
|
49
|
+
changeDetectorRef;
|
|
50
|
+
localization;
|
|
51
|
+
renderer;
|
|
52
|
+
/**
|
|
53
|
+
* @hidden
|
|
54
|
+
*/
|
|
55
|
+
caretAltDownIcon = caretAltDownIcon;
|
|
56
|
+
/**
|
|
57
|
+
* @hidden
|
|
58
|
+
*/
|
|
59
|
+
caretAltRightIcon = caretAltRightIcon;
|
|
60
|
+
/**
|
|
61
|
+
* @hidden
|
|
62
|
+
*/
|
|
63
|
+
caretAltLeftIcon = caretAltLeftIcon;
|
|
64
|
+
/**
|
|
65
|
+
* @hidden
|
|
66
|
+
*/
|
|
67
|
+
loadMoreTitle;
|
|
68
|
+
kGroupClass = true;
|
|
84
69
|
get role() {
|
|
85
70
|
return this.parentIndex ? 'group' : 'tree';
|
|
86
71
|
}
|
|
72
|
+
checkboxes;
|
|
73
|
+
expandIcons;
|
|
74
|
+
disabled;
|
|
75
|
+
selectable;
|
|
76
|
+
touchActions;
|
|
77
|
+
disableParentNodesOnly;
|
|
78
|
+
loadOnDemand = true;
|
|
79
|
+
trackBy;
|
|
80
|
+
nodes;
|
|
81
|
+
textField = "";
|
|
82
|
+
parentDataItem;
|
|
83
|
+
parentIndex;
|
|
84
|
+
nodeTemplateRef;
|
|
85
|
+
loadMoreButtonTemplateRef;
|
|
86
|
+
loadMoreService;
|
|
87
|
+
size = 'medium';
|
|
88
|
+
expandDisabledNodes;
|
|
89
|
+
initialNodesLoaded = false;
|
|
90
|
+
loadingMoreNodes = false;
|
|
91
|
+
isItemExpandable = (node, index) => this.expandDisabledNodes || !this.isItemDisabled(node, index);
|
|
87
92
|
getFontIcon(node, index) {
|
|
88
93
|
return this.isExpanded(node, index) ? 'caret-alt-down' : !this.localization.rtl ? 'caret-alt-right' : 'caret-alt-left';
|
|
89
94
|
}
|
|
@@ -131,6 +136,31 @@ export class TreeViewGroupComponent {
|
|
|
131
136
|
}
|
|
132
137
|
return this.loadMoreService.getTotalNodesCount(this.parentDataItem, this._data.length);
|
|
133
138
|
}
|
|
139
|
+
_data = [];
|
|
140
|
+
nodesSubscription;
|
|
141
|
+
loadMoreNodesSubscription;
|
|
142
|
+
singleRecordSubscriptions = new Subscription();
|
|
143
|
+
localizationSubscriptions = new Subscription();
|
|
144
|
+
constructor(expandService, loadingService, indexBuilder, treeViewLookupService, navigationService, nodeChildrenService, dataChangeNotification, changeDetectorRef, localization, renderer) {
|
|
145
|
+
this.expandService = expandService;
|
|
146
|
+
this.loadingService = loadingService;
|
|
147
|
+
this.indexBuilder = indexBuilder;
|
|
148
|
+
this.treeViewLookupService = treeViewLookupService;
|
|
149
|
+
this.navigationService = navigationService;
|
|
150
|
+
this.nodeChildrenService = nodeChildrenService;
|
|
151
|
+
this.dataChangeNotification = dataChangeNotification;
|
|
152
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
153
|
+
this.localization = localization;
|
|
154
|
+
this.renderer = renderer;
|
|
155
|
+
}
|
|
156
|
+
isChecked = () => 'none';
|
|
157
|
+
isDisabled = () => false;
|
|
158
|
+
hasCheckbox = () => true;
|
|
159
|
+
isExpanded = () => false;
|
|
160
|
+
isVisible = () => true;
|
|
161
|
+
isSelected = () => false;
|
|
162
|
+
children = () => of([]);
|
|
163
|
+
hasChildren = () => false;
|
|
134
164
|
get hasTemplate() {
|
|
135
165
|
return isPresent(this.nodeTemplateRef);
|
|
136
166
|
}
|
|
@@ -321,9 +351,8 @@ export class TreeViewGroupComponent {
|
|
|
321
351
|
}
|
|
322
352
|
this.emitChildrenLoaded(mappedChildren);
|
|
323
353
|
}
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
TreeViewGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: TreeViewGroupComponent, isStandalone: true, selector: "[kendoTreeViewGroup]", inputs: { checkboxes: "checkboxes", expandIcons: "expandIcons", disabled: "disabled", selectable: "selectable", touchActions: "touchActions", disableParentNodesOnly: "disableParentNodesOnly", loadOnDemand: "loadOnDemand", trackBy: "trackBy", nodes: "nodes", textField: "textField", parentDataItem: "parentDataItem", parentIndex: "parentIndex", nodeTemplateRef: "nodeTemplateRef", loadMoreButtonTemplateRef: "loadMoreButtonTemplateRef", loadMoreService: "loadMoreService", size: "size", expandDisabledNodes: "expandDisabledNodes", isChecked: "isChecked", isDisabled: "isDisabled", hasCheckbox: "hasCheckbox", isExpanded: "isExpanded", isVisible: "isVisible", isSelected: "isSelected", children: "children", hasChildren: "hasChildren" }, host: { properties: { "class.k-treeview-group": "this.kGroupClass", "attr.role": "this.role" } }, usesOnChanges: true, ngImport: i0, template: `
|
|
354
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewGroupComponent, deps: [{ token: i1.ExpandStateService }, { token: i2.LoadingNotificationService }, { token: i3.IndexBuilderService }, { token: i4.TreeViewLookupService }, { token: i5.NavigationService }, { token: i6.NodeChildrenService }, { token: i7.DataChangeNotificationService }, { token: i0.ChangeDetectorRef }, { token: i8.LocalizationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
355
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TreeViewGroupComponent, isStandalone: true, selector: "[kendoTreeViewGroup]", inputs: { checkboxes: "checkboxes", expandIcons: "expandIcons", disabled: "disabled", selectable: "selectable", touchActions: "touchActions", disableParentNodesOnly: "disableParentNodesOnly", loadOnDemand: "loadOnDemand", trackBy: "trackBy", nodes: "nodes", textField: "textField", parentDataItem: "parentDataItem", parentIndex: "parentIndex", nodeTemplateRef: "nodeTemplateRef", loadMoreButtonTemplateRef: "loadMoreButtonTemplateRef", loadMoreService: "loadMoreService", size: "size", expandDisabledNodes: "expandDisabledNodes", isChecked: "isChecked", isDisabled: "isDisabled", hasCheckbox: "hasCheckbox", isExpanded: "isExpanded", isVisible: "isVisible", isSelected: "isSelected", children: "children", hasChildren: "hasChildren" }, host: { properties: { "class.k-treeview-group": "this.kGroupClass", "attr.role": "this.role" } }, usesOnChanges: true, ngImport: i0, template: `
|
|
327
356
|
<li
|
|
328
357
|
*ngFor="let node of data; let index = index; trackBy: trackBy"
|
|
329
358
|
class="k-treeview-item"
|
|
@@ -474,18 +503,19 @@ TreeViewGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
|
|
|
474
503
|
</div>
|
|
475
504
|
</li>
|
|
476
505
|
`, 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: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: TreeViewItemDirective, selector: "[kendoTreeViewItem]", inputs: ["dataItem", "index", "parentDataItem", "parentIndex", "role", "loadOnDemand", "checkable", "selectable", "expandable", "isChecked", "isDisabled", "isVisible", "isExpanded", "isSelected"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: TreeViewItemContentDirective, selector: "[kendoTreeViewItemContent]", inputs: ["dataItem", "index", "initialSelection", "isSelected"] }, { kind: "directive", type: NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgSwitchDefault, selector: "[ngSwitchDefault]" }], animations: [
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
506
|
+
trigger('toggle', [
|
|
507
|
+
transition('void => *', [
|
|
508
|
+
style({ height: 0 }),
|
|
509
|
+
animate('0.1s ease-in', style({ height: "*" }))
|
|
510
|
+
]),
|
|
511
|
+
transition('* => void', [
|
|
512
|
+
style({ height: "*" }),
|
|
513
|
+
animate('0.1s ease-in', style({ height: 0 }))
|
|
514
|
+
])
|
|
485
515
|
])
|
|
486
|
-
])
|
|
487
|
-
|
|
488
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
516
|
+
] });
|
|
517
|
+
}
|
|
518
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewGroupComponent, decorators: [{
|
|
489
519
|
type: Component,
|
|
490
520
|
args: [{
|
|
491
521
|
animations: [
|
|
@@ -17,14 +17,20 @@ import * as i2 from "./selection/selection.service";
|
|
|
17
17
|
* A directive which manages the expanded state of the TreeView.
|
|
18
18
|
*/
|
|
19
19
|
export class TreeViewItemContentDirective {
|
|
20
|
+
element;
|
|
21
|
+
navigationService;
|
|
22
|
+
selectionService;
|
|
23
|
+
renderer;
|
|
24
|
+
dataItem;
|
|
25
|
+
index;
|
|
26
|
+
initialSelection = false;
|
|
27
|
+
isSelected = isSelected;
|
|
28
|
+
subscriptions = new Subscription();
|
|
20
29
|
constructor(element, navigationService, selectionService, renderer) {
|
|
21
30
|
this.element = element;
|
|
22
31
|
this.navigationService = navigationService;
|
|
23
32
|
this.selectionService = selectionService;
|
|
24
33
|
this.renderer = renderer;
|
|
25
|
-
this.initialSelection = false;
|
|
26
|
-
this.isSelected = isSelected;
|
|
27
|
-
this.subscriptions = new Subscription();
|
|
28
34
|
this.subscriptions.add(this.navigationService.moves
|
|
29
35
|
.subscribe(this.updateFocusClass.bind(this)));
|
|
30
36
|
this.subscriptions.add(this.navigationService.selects
|
|
@@ -56,10 +62,10 @@ export class TreeViewItemContentDirective {
|
|
|
56
62
|
const action = addClass ? 'addClass' : 'removeClass';
|
|
57
63
|
this.renderer[action](this.element.nativeElement, className);
|
|
58
64
|
}
|
|
65
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewItemContentDirective, deps: [{ token: i0.ElementRef }, { token: i1.NavigationService }, { token: i2.SelectionService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
66
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TreeViewItemContentDirective, isStandalone: true, selector: "[kendoTreeViewItemContent]", inputs: { dataItem: "dataItem", index: "index", initialSelection: "initialSelection", isSelected: "isSelected" }, usesOnChanges: true, ngImport: i0 });
|
|
59
67
|
}
|
|
60
|
-
|
|
61
|
-
TreeViewItemContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: TreeViewItemContentDirective, isStandalone: true, selector: "[kendoTreeViewItemContent]", inputs: { dataItem: "dataItem", index: "index", initialSelection: "initialSelection", isSelected: "isSelected" }, usesOnChanges: true, ngImport: i0 });
|
|
62
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreeViewItemContentDirective, decorators: [{
|
|
68
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewItemContentDirective, decorators: [{
|
|
63
69
|
type: Directive,
|
|
64
70
|
args: [{
|
|
65
71
|
selector: '[kendoTreeViewItemContent]',
|
|
@@ -27,24 +27,22 @@ const BUTTON_ROLE = 'button';
|
|
|
27
27
|
* A directive which manages the expanded state of the TreeView.
|
|
28
28
|
*/
|
|
29
29
|
export class TreeViewItemDirective {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
this.subscribe();
|
|
47
|
-
}
|
|
30
|
+
element;
|
|
31
|
+
expandService;
|
|
32
|
+
navigationService;
|
|
33
|
+
selectionService;
|
|
34
|
+
lookupService;
|
|
35
|
+
renderer;
|
|
36
|
+
ib;
|
|
37
|
+
dataItem;
|
|
38
|
+
index;
|
|
39
|
+
parentDataItem;
|
|
40
|
+
parentIndex;
|
|
41
|
+
role = TREE_ITEM_ROLE;
|
|
42
|
+
loadOnDemand = true;
|
|
43
|
+
checkable;
|
|
44
|
+
selectable;
|
|
45
|
+
expandable;
|
|
48
46
|
set isChecked(checked) {
|
|
49
47
|
if (checked === 'checked') {
|
|
50
48
|
this.ariaChecked = 'true';
|
|
@@ -56,6 +54,8 @@ export class TreeViewItemDirective {
|
|
|
56
54
|
this.ariaChecked = 'false';
|
|
57
55
|
}
|
|
58
56
|
}
|
|
57
|
+
isDisabled = false;
|
|
58
|
+
isVisible = true;
|
|
59
59
|
get isExpanded() {
|
|
60
60
|
return this._isExpanded || false;
|
|
61
61
|
}
|
|
@@ -77,6 +77,22 @@ export class TreeViewItemDirective {
|
|
|
77
77
|
get parentTreeItem() {
|
|
78
78
|
return this.parentDataItem ? buildItem(this.parentIndex, this.parentDataItem) : null;
|
|
79
79
|
}
|
|
80
|
+
ariaChecked = 'false';
|
|
81
|
+
id = id++;
|
|
82
|
+
_isExpanded;
|
|
83
|
+
_isSelected;
|
|
84
|
+
isInitialized = false;
|
|
85
|
+
subscriptions = [];
|
|
86
|
+
constructor(element, expandService, navigationService, selectionService, lookupService, renderer, ib) {
|
|
87
|
+
this.element = element;
|
|
88
|
+
this.expandService = expandService;
|
|
89
|
+
this.navigationService = navigationService;
|
|
90
|
+
this.selectionService = selectionService;
|
|
91
|
+
this.lookupService = lookupService;
|
|
92
|
+
this.renderer = renderer;
|
|
93
|
+
this.ib = ib;
|
|
94
|
+
this.subscribe();
|
|
95
|
+
}
|
|
80
96
|
ngOnInit() {
|
|
81
97
|
if (this.loadOnDemand && !this.isButton) {
|
|
82
98
|
this.lookupService.registerItem(this.treeItem, this.parentTreeItem);
|
|
@@ -189,10 +205,10 @@ export class TreeViewItemDirective {
|
|
|
189
205
|
}
|
|
190
206
|
this.renderer.setAttribute(this.element.nativeElement, attr, value);
|
|
191
207
|
}
|
|
208
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewItemDirective, deps: [{ token: i0.ElementRef }, { token: i1.ExpandStateService }, { token: i2.NavigationService }, { token: i3.SelectionService }, { token: i4.TreeViewLookupService }, { token: i0.Renderer2 }, { token: i5.IndexBuilderService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
209
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TreeViewItemDirective, isStandalone: true, selector: "[kendoTreeViewItem]", inputs: { dataItem: "dataItem", index: "index", parentDataItem: "parentDataItem", parentIndex: "parentIndex", role: "role", loadOnDemand: "loadOnDemand", checkable: "checkable", selectable: "selectable", expandable: "expandable", isChecked: "isChecked", isDisabled: "isDisabled", isVisible: "isVisible", isExpanded: "isExpanded", isSelected: "isSelected" }, usesOnChanges: true, ngImport: i0 });
|
|
192
210
|
}
|
|
193
|
-
|
|
194
|
-
TreeViewItemDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: TreeViewItemDirective, isStandalone: true, selector: "[kendoTreeViewItem]", inputs: { dataItem: "dataItem", index: "index", parentDataItem: "parentDataItem", parentIndex: "parentIndex", role: "role", loadOnDemand: "loadOnDemand", checkable: "checkable", selectable: "selectable", expandable: "expandable", isChecked: "isChecked", isDisabled: "isDisabled", isVisible: "isVisible", isExpanded: "isExpanded", isSelected: "isSelected" }, usesOnChanges: true, ngImport: i0 });
|
|
195
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreeViewItemDirective, decorators: [{
|
|
211
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewItemDirective, decorators: [{
|
|
196
212
|
type: Directive,
|
|
197
213
|
args: [{
|
|
198
214
|
selector: '[kendoTreeViewItem]',
|
|
@@ -10,9 +10,7 @@ const INDEX_REGEX = /\d+$/;
|
|
|
10
10
|
* @hidden
|
|
11
11
|
*/
|
|
12
12
|
export class TreeViewLookupService {
|
|
13
|
-
|
|
14
|
-
this.map = new Map();
|
|
15
|
-
}
|
|
13
|
+
map = new Map();
|
|
16
14
|
reset() {
|
|
17
15
|
this.map.clear();
|
|
18
16
|
}
|
|
@@ -83,9 +81,9 @@ export class TreeViewLookupService {
|
|
|
83
81
|
};
|
|
84
82
|
});
|
|
85
83
|
}
|
|
84
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewLookupService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
85
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewLookupService });
|
|
86
86
|
}
|
|
87
|
-
|
|
88
|
-
TreeViewLookupService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreeViewLookupService });
|
|
89
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreeViewLookupService, decorators: [{
|
|
87
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewLookupService, decorators: [{
|
|
90
88
|
type: Injectable
|
|
91
89
|
}] });
|