@progress/kendo-angular-treeview 17.0.0-develop.4 → 17.0.0-develop.41

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.
Files changed (104) hide show
  1. package/README.md +30 -17
  2. package/check-mode.d.ts +1 -1
  3. package/check.directive.d.ts +1 -1
  4. package/checkbox/checked-state.d.ts +1 -1
  5. package/disable.directive.d.ts +1 -1
  6. package/drag-and-drop/drag-and-drop-editing.directive.d.ts +1 -1
  7. package/drag-and-drop/drag-and-drop.directive.d.ts +1 -1
  8. package/{esm2020 → esm2022}/check.directive.mjs +48 -27
  9. package/{esm2020 → esm2022}/data-bound-component.mjs +3 -3
  10. package/{esm2020 → esm2022}/data-change-notification.service.mjs +1 -3
  11. package/{esm2020 → esm2022}/disable.directive.mjs +18 -12
  12. package/{esm2020 → esm2022}/drag-and-drop/drag-and-drop-editing.directive.mjs +10 -9
  13. package/{esm2020 → esm2022}/drag-and-drop/drag-and-drop.directive.mjs +73 -52
  14. package/{esm2020 → esm2022}/drag-and-drop/drag-clue/drag-clue-template.directive.mjs +4 -3
  15. package/{esm2020 → esm2022}/drag-and-drop/drag-clue/drag-clue.component.mjs +30 -9
  16. package/{esm2020 → esm2022}/drag-and-drop/drag-clue/drag-clue.service.mjs +6 -3
  17. package/{esm2020 → esm2022}/drag-and-drop/drop-hint/drop-hint-template.directive.mjs +4 -3
  18. package/{esm2020 → esm2022}/drag-and-drop/drop-hint/drop-hint.component.mjs +24 -7
  19. package/{esm2020 → esm2022}/drag-and-drop/drop-hint/drop-hint.service.mjs +4 -3
  20. package/{esm2020 → esm2022}/drag-and-drop/editing-services/drag-and-drop-asset.service.mjs +4 -3
  21. package/{esm2020 → esm2022}/drag-and-drop/editing-services/flat-editing.service.mjs +2 -0
  22. package/{esm2020 → esm2022}/drag-and-drop/editing-services/hierarchy-editing.service.mjs +2 -0
  23. package/{esm2020 → esm2022}/drag-and-drop/models/preventable-event.mjs +1 -3
  24. package/{esm2020 → esm2022}/drag-and-drop/models/treeitem-drag-event.mjs +12 -0
  25. package/{esm2020 → esm2022}/drag-and-drop/models/treeitem-drag-start-event.mjs +8 -0
  26. package/{esm2020 → esm2022}/drag-and-drop/models/treeitem-drop-event.mjs +28 -4
  27. package/{esm2020 → esm2022}/expand-state.service.mjs +4 -6
  28. package/{esm2020 → esm2022}/expand.directive.mjs +67 -54
  29. package/{esm2020 → esm2022}/expandable-component.mjs +3 -3
  30. package/{esm2020 → esm2022}/filtering-base.mjs +13 -8
  31. package/{esm2020 → esm2022}/flat-binding.directive.mjs +26 -16
  32. package/{esm2020 → esm2022}/hierarchy-binding.directive.mjs +19 -15
  33. package/{esm2020 → esm2022}/index-builder.service.mjs +4 -6
  34. package/{esm2020 → esm2022}/load-more/load-more-button-template.directive.mjs +4 -3
  35. package/{esm2020 → esm2022}/load-more/load-more.directive.mjs +38 -20
  36. package/{esm2020 → esm2022}/loading-indicator.directive.mjs +14 -9
  37. package/{esm2020 → esm2022}/loading-notification.service.mjs +4 -6
  38. package/{esm2020 → esm2022}/localization/custom-messages.component.mjs +9 -8
  39. package/{esm2020 → esm2022}/localization/localized-messages.directive.mjs +9 -8
  40. package/{esm2020 → esm2022}/localization/messages.mjs +7 -3
  41. package/{esm2020 → esm2022}/navigation/navigation-model.mjs +2 -4
  42. package/{esm2020 → esm2022}/navigation/navigation.service.mjs +38 -36
  43. package/{esm2020 → esm2022}/node-children.service.mjs +4 -6
  44. package/{esm2020 → esm2022}/node-template.directive.mjs +4 -3
  45. package/{esm2020 → esm2022}/package-metadata.mjs +2 -2
  46. package/{esm2020 → esm2022}/selection/select.directive.mjs +45 -25
  47. package/{esm2020 → esm2022}/selection/selection.service.mjs +5 -6
  48. package/{esm2020 → esm2022}/treeview-group.component.mjs +86 -56
  49. package/{esm2020 → esm2022}/treeview-item-content.directive.mjs +12 -6
  50. package/{esm2020 → esm2022}/treeview-item.directive.mjs +37 -21
  51. package/{esm2020 → esm2022}/treeview-lookup.service.mjs +4 -6
  52. package/{esm2020 → esm2022}/treeview.component.mjs +253 -194
  53. package/{esm2020 → esm2022}/treeview.module.mjs +12 -12
  54. package/expand.directive.d.ts +1 -1
  55. package/{fesm2020 → fesm2022}/progress-kendo-angular-treeview.mjs +1015 -694
  56. package/filtering-base.d.ts +1 -1
  57. package/flat-binding.directive.d.ts +1 -1
  58. package/hierarchy-binding.directive.d.ts +1 -1
  59. package/load-more/load-more.directive.d.ts +1 -1
  60. package/loading-indicator.directive.d.ts +1 -1
  61. package/localization/messages.d.ts +1 -1
  62. package/package.json +15 -21
  63. package/schematics/ngAdd/index.js +4 -4
  64. package/selection/select.directive.d.ts +1 -1
  65. package/selection/selection-mode.d.ts +1 -1
  66. package/size.d.ts +1 -1
  67. package/treeview-filter-settings.d.ts +1 -1
  68. package/treeview-group.component.d.ts +1 -1
  69. package/treeview-item-content.directive.d.ts +1 -1
  70. package/treeview-item.directive.d.ts +1 -1
  71. package/treeview.component.d.ts +1 -1
  72. package/fesm2015/progress-kendo-angular-treeview.mjs +0 -5545
  73. /package/{esm2020 → esm2022}/check-mode.mjs +0 -0
  74. /package/{esm2020 → esm2022}/checkable-settings.mjs +0 -0
  75. /package/{esm2020 → esm2022}/checkbox/checked-state.mjs +0 -0
  76. /package/{esm2020 → esm2022}/default-callbacks.mjs +0 -0
  77. /package/{esm2020 → esm2022}/directives.mjs +0 -0
  78. /package/{esm2020 → esm2022}/drag-and-drop/drag-and-drop-utils.mjs +0 -0
  79. /package/{esm2020 → esm2022}/drag-and-drop/models/drop-action.mjs +0 -0
  80. /package/{esm2020 → esm2022}/drag-and-drop/models/drop-position.mjs +0 -0
  81. /package/{esm2020 → esm2022}/drag-and-drop/models/editing-service.mjs +0 -0
  82. /package/{esm2020 → esm2022}/drag-and-drop/models/scroll-direction.mjs +0 -0
  83. /package/{esm2020 → esm2022}/drag-and-drop/models/scroll-settings.mjs +0 -0
  84. /package/{esm2020 → esm2022}/drag-and-drop/models/tree-item-filter-state.mjs +0 -0
  85. /package/{esm2020 → esm2022}/drag-and-drop/models/treeitem-add-remove-args.mjs +0 -0
  86. /package/{esm2020 → esm2022}/drag-and-drop/models.mjs +0 -0
  87. /package/{esm2020 → esm2022}/filter-expand-settings.interface.mjs +0 -0
  88. /package/{esm2020 → esm2022}/filter-state.interface.mjs +0 -0
  89. /package/{esm2020 → esm2022}/funcs.mjs +0 -0
  90. /package/{esm2020 → esm2022}/index.mjs +0 -0
  91. /package/{esm2020 → esm2022}/load-more/load-more-request-args.mjs +0 -0
  92. /package/{esm2020 → esm2022}/load-more/load-more-utils.mjs +0 -0
  93. /package/{esm2020 → esm2022}/load-more/load-more.service.mjs +0 -0
  94. /package/{esm2020 → esm2022}/navigation/navigation-item.interface.mjs +0 -0
  95. /package/{esm2020 → esm2022}/navigation/navigation-state.interface.mjs +0 -0
  96. /package/{esm2020 → esm2022}/node-click-event.interface.mjs +0 -0
  97. /package/{esm2020 → esm2022}/progress-kendo-angular-treeview.mjs +0 -0
  98. /package/{esm2020 → esm2022}/selection/selectable-settings.mjs +0 -0
  99. /package/{esm2020 → esm2022}/selection/selection-mode.mjs +0 -0
  100. /package/{esm2020 → esm2022}/size.mjs +0 -0
  101. /package/{esm2020 → esm2022}/treeitem-lookup.interface.mjs +0 -0
  102. /package/{esm2020 → esm2022}/treeitem.interface.mjs +0 -0
  103. /package/{esm2020 → esm2022}/treeview-filter-settings.mjs +0 -0
  104. /package/{esm2020 → esm2022}/utils.mjs +0 -0
@@ -27,8 +27,8 @@ const packageMetadata = {
27
27
  name: '@progress/kendo-angular-treeview',
28
28
  productName: 'Kendo UI for Angular',
29
29
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
30
- publishDate: 1728985113,
31
- version: '17.0.0-develop.4',
30
+ publishDate: 1730818298,
31
+ version: '17.0.0-develop.41',
32
32
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
33
33
  };
34
34
 
@@ -36,9 +36,7 @@ const packageMetadata = {
36
36
  * @hidden
37
37
  */
38
38
  class DataChangeNotificationService {
39
- constructor() {
40
- this.changes = new EventEmitter();
41
- }
39
+ changes = new EventEmitter();
42
40
  notify() {
43
41
  this.changes.emit();
44
42
  }
@@ -81,19 +79,17 @@ const trackBy = (_, item) => item;
81
79
  * @hidden
82
80
  */
83
81
  class ExpandStateService {
84
- constructor() {
85
- this.changes = new Subject();
86
- }
82
+ changes = new Subject();
87
83
  expand(index, dataItem) {
88
84
  this.changes.next({ dataItem, index, expand: true });
89
85
  }
90
86
  collapse(index, dataItem) {
91
87
  this.changes.next({ dataItem, index, expand: false });
92
88
  }
89
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExpandStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
90
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExpandStateService });
93
91
  }
94
- ExpandStateService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ExpandStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
95
- ExpandStateService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ExpandStateService });
96
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ExpandStateService, decorators: [{
92
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExpandStateService, decorators: [{
97
93
  type: Injectable
98
94
  }] });
99
95
 
@@ -101,9 +97,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
101
97
  * @hidden
102
98
  */
103
99
  class IndexBuilderService {
104
- constructor() {
105
- this.INDEX_SEPARATOR = '_';
106
- }
100
+ INDEX_SEPARATOR = '_';
107
101
  nodeIndex(index = '', parentIndex = '') {
108
102
  return `${parentIndex}${parentIndex ? this.INDEX_SEPARATOR : ''}${index}`;
109
103
  }
@@ -120,10 +114,10 @@ class IndexBuilderService {
120
114
  level(index) {
121
115
  return index.split(this.INDEX_SEPARATOR).length;
122
116
  }
117
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IndexBuilderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
118
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IndexBuilderService });
123
119
  }
124
- IndexBuilderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IndexBuilderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
125
- IndexBuilderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IndexBuilderService });
126
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IndexBuilderService, decorators: [{
120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: IndexBuilderService, decorators: [{
127
121
  type: Injectable
128
122
  }] });
129
123
 
@@ -131,16 +125,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
131
125
  * @hidden
132
126
  */
133
127
  class LoadingNotificationService {
134
- constructor() {
135
- this.changes = new Subject();
136
- }
128
+ changes = new Subject();
137
129
  notifyLoaded(index) {
138
130
  this.changes.next(index);
139
131
  }
132
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LoadingNotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
133
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LoadingNotificationService });
140
134
  }
141
- LoadingNotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LoadingNotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
142
- LoadingNotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LoadingNotificationService });
143
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LoadingNotificationService, decorators: [{
135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LoadingNotificationService, decorators: [{
144
136
  type: Injectable
145
137
  }] });
146
138
 
@@ -460,10 +452,8 @@ const lastVisibleNode = (nodes) => {
460
452
  * @hidden
461
453
  */
462
454
  class NavigationModel {
463
- constructor() {
464
- this.ib = new IndexBuilderService();
465
- this.nodes = [];
466
- }
455
+ ib = new IndexBuilderService();
456
+ nodes = [];
467
457
  firstVisibleNode() {
468
458
  return (this.nodes || []).find(node => node.visible);
469
459
  }
@@ -593,45 +583,42 @@ class NavigationModel {
593
583
  * @hidden
594
584
  */
595
585
  class NavigationService {
596
- constructor(localization) {
597
- this.localization = localization;
598
- this.expands = new Subject();
599
- this.moves = new Subject();
600
- this.checks = new Subject();
601
- this.selects = new Subject();
602
- this.deselectAllButCurrentItem = new Subject();
603
- this.loadMore = new Subject();
604
- this.navigable = true;
605
- this.selection = 'single';
606
- this.isTreeViewActive = false;
607
- this.actions = {
608
- [Keys.ArrowUp]: () => this.activate(this.model.findVisiblePrev(this.focusableItem), true),
609
- [Keys.ArrowDown]: () => this.activate(this.model.findVisibleNext(this.focusableItem), true),
610
- [Keys.ArrowLeft]: () => !this.isLoadMoreButton && (this.expand({
611
- expand: this.localization.rtl,
612
- intercept: this.localization.rtl ? this.moveToFirstVisibleChild : this.moveToParent
613
- })),
614
- [Keys.ArrowRight]: () => !this.isLoadMoreButton && (this.expand({
615
- expand: !this.localization.rtl,
616
- intercept: this.localization.rtl ? this.moveToParent : this.moveToFirstVisibleChild
617
- })),
618
- [Keys.Home]: () => this.activate(this.model.firstVisibleNode(), true),
619
- [Keys.End]: () => this.activate(this.model.lastVisibleNode(), true),
620
- [Keys.Enter]: (e) => this.handleEnter(e),
621
- [Keys.Space]: () => this.handleSpace()
622
- };
623
- this.isFocused = false;
624
- this.shouldScroll = false;
625
- this._model = new NavigationModel();
626
- this.moveToFirstVisibleChild = this.moveToFirstVisibleChild.bind(this);
627
- this.moveToParent = this.moveToParent.bind(this);
628
- }
586
+ localization;
587
+ expands = new Subject();
588
+ moves = new Subject();
589
+ checks = new Subject();
590
+ selects = new Subject();
591
+ deselectAllButCurrentItem = new Subject();
592
+ loadMore = new Subject();
593
+ navigable = true;
594
+ selection = 'single';
595
+ isTreeViewActive = false;
629
596
  get model() {
630
597
  return this._model;
631
598
  }
632
599
  set model(model) {
633
600
  this._model = model;
634
601
  }
602
+ actions = {
603
+ [Keys.ArrowUp]: () => this.activate(this.model.findVisiblePrev(this.focusableItem), true),
604
+ [Keys.ArrowDown]: () => this.activate(this.model.findVisibleNext(this.focusableItem), true),
605
+ [Keys.ArrowLeft]: () => !this.isLoadMoreButton && (this.expand({
606
+ expand: this.localization.rtl,
607
+ intercept: this.localization.rtl ? this.moveToFirstVisibleChild : this.moveToParent
608
+ })),
609
+ [Keys.ArrowRight]: () => !this.isLoadMoreButton && (this.expand({
610
+ expand: !this.localization.rtl,
611
+ intercept: this.localization.rtl ? this.moveToParent : this.moveToFirstVisibleChild
612
+ })),
613
+ [Keys.Home]: () => this.activate(this.model.firstVisibleNode(), true),
614
+ [Keys.End]: () => this.activate(this.model.lastVisibleNode(), true),
615
+ [Keys.Enter]: (e) => this.handleEnter(e),
616
+ [Keys.Space]: () => this.handleSpace()
617
+ };
618
+ activeItem;
619
+ isFocused = false;
620
+ shouldScroll = false;
621
+ _model = new NavigationModel();
635
622
  get activeIndex() {
636
623
  return nodeIndex(this.activeItem) || null;
637
624
  }
@@ -644,6 +631,11 @@ class NavigationService {
644
631
  get focusableItem() {
645
632
  return this.activeItem || this.model.firstFocusableNode();
646
633
  }
634
+ constructor(localization) {
635
+ this.localization = localization;
636
+ this.moveToFirstVisibleChild = this.moveToFirstVisibleChild.bind(this);
637
+ this.moveToParent = this.moveToParent.bind(this);
638
+ }
647
639
  activate(item, shouldScroll = false) {
648
640
  if (!this.navigable || !item || this.isActive(nodeIndex(item))) {
649
641
  return;
@@ -814,10 +806,10 @@ class NavigationService {
814
806
  this.checkIndex(this.activeIndex);
815
807
  }
816
808
  }
809
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NavigationService, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
810
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NavigationService });
817
811
  }
818
- NavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NavigationService, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
819
- NavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NavigationService });
820
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NavigationService, decorators: [{
812
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NavigationService, decorators: [{
821
813
  type: Injectable
822
814
  }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
823
815
 
@@ -825,16 +817,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
825
817
  * @hidden
826
818
  */
827
819
  class NodeChildrenService {
828
- constructor() {
829
- this.changes = new Subject();
830
- }
820
+ changes = new Subject();
831
821
  childrenLoaded(item, children) {
832
822
  this.changes.next({ item, children });
833
823
  }
824
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NodeChildrenService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
825
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NodeChildrenService });
834
826
  }
835
- NodeChildrenService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NodeChildrenService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
836
- NodeChildrenService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NodeChildrenService });
837
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NodeChildrenService, decorators: [{
827
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NodeChildrenService, decorators: [{
838
828
  type: Injectable
839
829
  }] });
840
830
 
@@ -893,13 +883,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
893
883
  * ```
894
884
  */
895
885
  class NodeTemplateDirective {
886
+ templateRef;
896
887
  constructor(templateRef) {
897
888
  this.templateRef = templateRef;
898
889
  }
890
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NodeTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
891
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: NodeTemplateDirective, isStandalone: true, selector: "[kendoTreeViewNodeTemplate]", ngImport: i0 });
899
892
  }
900
- NodeTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NodeTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
901
- NodeTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: NodeTemplateDirective, isStandalone: true, selector: "[kendoTreeViewNodeTemplate]", ngImport: i0 });
902
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NodeTemplateDirective, decorators: [{
893
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NodeTemplateDirective, decorators: [{
903
894
  type: Directive,
904
895
  args: [{
905
896
  selector: '[kendoTreeViewNodeTemplate]',
@@ -920,13 +911,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
920
911
  * - `let-index="index"` (`string`)
921
912
  */
922
913
  class LoadMoreButtonTemplateDirective {
914
+ templateRef;
923
915
  constructor(templateRef) {
924
916
  this.templateRef = templateRef;
925
917
  }
918
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LoadMoreButtonTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
919
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: LoadMoreButtonTemplateDirective, isStandalone: true, selector: "[kendoTreeViewLoadMoreButtonTemplate]", ngImport: i0 });
926
920
  }
927
- LoadMoreButtonTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LoadMoreButtonTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
928
- LoadMoreButtonTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: LoadMoreButtonTemplateDirective, isStandalone: true, selector: "[kendoTreeViewLoadMoreButtonTemplate]", ngImport: i0 });
929
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LoadMoreButtonTemplateDirective, decorators: [{
921
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LoadMoreButtonTemplateDirective, decorators: [{
930
922
  type: Directive,
931
923
  args: [{
932
924
  selector: '[kendoTreeViewLoadMoreButtonTemplate]',
@@ -943,10 +935,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
943
935
  * the TreeView or the DropDownTree components.
944
936
  */
945
937
  class DataBoundComponent {
938
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataBoundComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
939
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataBoundComponent });
946
940
  }
947
- DataBoundComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DataBoundComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
948
- DataBoundComponent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DataBoundComponent });
949
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DataBoundComponent, decorators: [{
941
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataBoundComponent, decorators: [{
950
942
  type: Injectable
951
943
  }] });
952
944
 
@@ -957,10 +949,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
957
949
  * the TreeView or the DropDownTree components.
958
950
  */
959
951
  class ExpandableComponent {
952
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExpandableComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
953
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExpandableComponent });
960
954
  }
961
- ExpandableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ExpandableComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
962
- ExpandableComponent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ExpandableComponent });
963
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ExpandableComponent, decorators: [{
955
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExpandableComponent, decorators: [{
964
956
  type: Injectable
965
957
  }] });
966
958
 
@@ -968,9 +960,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
968
960
  * @hidden
969
961
  */
970
962
  class SelectionService {
971
- constructor() {
972
- this.changes = new Subject();
973
- }
963
+ changes = new Subject();
964
+ firstIndex;
974
965
  isFirstSelected(index) {
975
966
  return this.firstIndex === index;
976
967
  }
@@ -985,10 +976,10 @@ class SelectionService {
985
976
  select(index, dataItem) {
986
977
  this.changes.next({ dataItem, index });
987
978
  }
979
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
980
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectionService });
988
981
  }
989
- SelectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SelectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
990
- SelectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SelectionService });
991
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SelectionService, decorators: [{
982
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectionService, decorators: [{
992
983
  type: Injectable
993
984
  }] });
994
985
 
@@ -997,9 +988,7 @@ const INDEX_REGEX = /\d+$/;
997
988
  * @hidden
998
989
  */
999
990
  class TreeViewLookupService {
1000
- constructor() {
1001
- this.map = new Map();
1002
- }
991
+ map = new Map();
1003
992
  reset() {
1004
993
  this.map.clear();
1005
994
  }
@@ -1070,10 +1059,10 @@ class TreeViewLookupService {
1070
1059
  };
1071
1060
  });
1072
1061
  }
1062
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewLookupService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1063
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewLookupService });
1073
1064
  }
1074
- TreeViewLookupService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreeViewLookupService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1075
- TreeViewLookupService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreeViewLookupService });
1076
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreeViewLookupService, decorators: [{
1065
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewLookupService, decorators: [{
1077
1066
  type: Injectable
1078
1067
  }] });
1079
1068
 
@@ -1083,14 +1072,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
1083
1072
  * A directive which manages the expanded state of the TreeView.
1084
1073
  */
1085
1074
  class TreeViewItemContentDirective {
1075
+ element;
1076
+ navigationService;
1077
+ selectionService;
1078
+ renderer;
1079
+ dataItem;
1080
+ index;
1081
+ initialSelection = false;
1082
+ isSelected = isSelected;
1083
+ subscriptions = new Subscription();
1086
1084
  constructor(element, navigationService, selectionService, renderer) {
1087
1085
  this.element = element;
1088
1086
  this.navigationService = navigationService;
1089
1087
  this.selectionService = selectionService;
1090
1088
  this.renderer = renderer;
1091
- this.initialSelection = false;
1092
- this.isSelected = isSelected;
1093
- this.subscriptions = new Subscription();
1094
1089
  this.subscriptions.add(this.navigationService.moves
1095
1090
  .subscribe(this.updateFocusClass.bind(this)));
1096
1091
  this.subscriptions.add(this.navigationService.selects
@@ -1122,10 +1117,10 @@ class TreeViewItemContentDirective {
1122
1117
  const action = addClass ? 'addClass' : 'removeClass';
1123
1118
  this.renderer[action](this.element.nativeElement, className);
1124
1119
  }
1120
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewItemContentDirective, deps: [{ token: i0.ElementRef }, { token: NavigationService }, { token: SelectionService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
1121
+ 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 });
1125
1122
  }
1126
- TreeViewItemContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreeViewItemContentDirective, deps: [{ token: i0.ElementRef }, { token: NavigationService }, { token: SelectionService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
1127
- 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 });
1128
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreeViewItemContentDirective, decorators: [{
1123
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewItemContentDirective, decorators: [{
1129
1124
  type: Directive,
1130
1125
  args: [{
1131
1126
  selector: '[kendoTreeViewItemContent]',
@@ -1145,12 +1140,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
1145
1140
  * @hidden
1146
1141
  */
1147
1142
  class LoadingIndicatorDirective {
1148
- constructor(expandService, loadingService, cd) {
1149
- this.expandService = expandService;
1150
- this.loadingService = loadingService;
1151
- this.cd = cd;
1152
- this._loading = false;
1153
- }
1143
+ expandService;
1144
+ loadingService;
1145
+ cd;
1154
1146
  get loading() {
1155
1147
  return this._loading;
1156
1148
  }
@@ -1158,6 +1150,14 @@ class LoadingIndicatorDirective {
1158
1150
  this._loading = value;
1159
1151
  this.cd.markForCheck();
1160
1152
  }
1153
+ index;
1154
+ _loading = false;
1155
+ subscription;
1156
+ constructor(expandService, loadingService, cd) {
1157
+ this.expandService = expandService;
1158
+ this.loadingService = loadingService;
1159
+ this.cd = cd;
1160
+ }
1161
1161
  ngOnInit() {
1162
1162
  const loadingNotifications = this.loadingService
1163
1163
  .changes
@@ -1177,10 +1177,10 @@ class LoadingIndicatorDirective {
1177
1177
  this.subscription.unsubscribe();
1178
1178
  }
1179
1179
  }
1180
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LoadingIndicatorDirective, deps: [{ token: ExpandStateService }, { token: LoadingNotificationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
1181
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: LoadingIndicatorDirective, isStandalone: true, selector: "[kendoTreeViewLoading]", inputs: { index: ["kendoTreeViewLoading", "index"] }, host: { properties: { "class.k-i-loading": "this.loading" } }, ngImport: i0 });
1180
1182
  }
1181
- LoadingIndicatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LoadingIndicatorDirective, deps: [{ token: ExpandStateService }, { token: LoadingNotificationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
1182
- LoadingIndicatorDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: LoadingIndicatorDirective, isStandalone: true, selector: "[kendoTreeViewLoading]", inputs: { index: ["kendoTreeViewLoading", "index"] }, host: { properties: { "class.k-i-loading": "this.loading" } }, ngImport: i0 });
1183
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LoadingIndicatorDirective, decorators: [{
1183
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LoadingIndicatorDirective, decorators: [{
1184
1184
  type: Directive,
1185
1185
  args: [{
1186
1186
  selector: '[kendoTreeViewLoading]',
@@ -1204,24 +1204,22 @@ const BUTTON_ROLE = 'button';
1204
1204
  * A directive which manages the expanded state of the TreeView.
1205
1205
  */
1206
1206
  class TreeViewItemDirective {
1207
- constructor(element, expandService, navigationService, selectionService, lookupService, renderer, ib) {
1208
- this.element = element;
1209
- this.expandService = expandService;
1210
- this.navigationService = navigationService;
1211
- this.selectionService = selectionService;
1212
- this.lookupService = lookupService;
1213
- this.renderer = renderer;
1214
- this.ib = ib;
1215
- this.role = TREE_ITEM_ROLE;
1216
- this.loadOnDemand = true;
1217
- this.isDisabled = false;
1218
- this.isVisible = true;
1219
- this.ariaChecked = 'false';
1220
- this.id = id++;
1221
- this.isInitialized = false;
1222
- this.subscriptions = [];
1223
- this.subscribe();
1224
- }
1207
+ element;
1208
+ expandService;
1209
+ navigationService;
1210
+ selectionService;
1211
+ lookupService;
1212
+ renderer;
1213
+ ib;
1214
+ dataItem;
1215
+ index;
1216
+ parentDataItem;
1217
+ parentIndex;
1218
+ role = TREE_ITEM_ROLE;
1219
+ loadOnDemand = true;
1220
+ checkable;
1221
+ selectable;
1222
+ expandable;
1225
1223
  set isChecked(checked) {
1226
1224
  if (checked === 'checked') {
1227
1225
  this.ariaChecked = 'true';
@@ -1233,6 +1231,8 @@ class TreeViewItemDirective {
1233
1231
  this.ariaChecked = 'false';
1234
1232
  }
1235
1233
  }
1234
+ isDisabled = false;
1235
+ isVisible = true;
1236
1236
  get isExpanded() {
1237
1237
  return this._isExpanded || false;
1238
1238
  }
@@ -1254,6 +1254,22 @@ class TreeViewItemDirective {
1254
1254
  get parentTreeItem() {
1255
1255
  return this.parentDataItem ? buildItem(this.parentIndex, this.parentDataItem) : null;
1256
1256
  }
1257
+ ariaChecked = 'false';
1258
+ id = id++;
1259
+ _isExpanded;
1260
+ _isSelected;
1261
+ isInitialized = false;
1262
+ subscriptions = [];
1263
+ constructor(element, expandService, navigationService, selectionService, lookupService, renderer, ib) {
1264
+ this.element = element;
1265
+ this.expandService = expandService;
1266
+ this.navigationService = navigationService;
1267
+ this.selectionService = selectionService;
1268
+ this.lookupService = lookupService;
1269
+ this.renderer = renderer;
1270
+ this.ib = ib;
1271
+ this.subscribe();
1272
+ }
1257
1273
  ngOnInit() {
1258
1274
  if (this.loadOnDemand && !this.isButton) {
1259
1275
  this.lookupService.registerItem(this.treeItem, this.parentTreeItem);
@@ -1366,10 +1382,10 @@ class TreeViewItemDirective {
1366
1382
  }
1367
1383
  this.renderer.setAttribute(this.element.nativeElement, attr, value);
1368
1384
  }
1385
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewItemDirective, deps: [{ token: i0.ElementRef }, { token: ExpandStateService }, { token: NavigationService }, { token: SelectionService }, { token: TreeViewLookupService }, { token: i0.Renderer2 }, { token: IndexBuilderService }], target: i0.ɵɵFactoryTarget.Directive });
1386
+ 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 });
1369
1387
  }
1370
- TreeViewItemDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreeViewItemDirective, deps: [{ token: i0.ElementRef }, { token: ExpandStateService }, { token: NavigationService }, { token: SelectionService }, { token: TreeViewLookupService }, { token: i0.Renderer2 }, { token: IndexBuilderService }], target: i0.ɵɵFactoryTarget.Directive });
1371
- 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 });
1372
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreeViewItemDirective, decorators: [{
1388
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewItemDirective, decorators: [{
1373
1389
  type: Directive,
1374
1390
  args: [{
1375
1391
  selector: '[kendoTreeViewItem]',
@@ -1412,51 +1428,56 @@ const BOT_ITEM = 'k-treeview-bot';
1412
1428
  * @hidden
1413
1429
  */
1414
1430
  class TreeViewGroupComponent {
1415
- constructor(expandService, loadingService, indexBuilder, treeViewLookupService, navigationService, nodeChildrenService, dataChangeNotification, changeDetectorRef, localization, renderer) {
1416
- this.expandService = expandService;
1417
- this.loadingService = loadingService;
1418
- this.indexBuilder = indexBuilder;
1419
- this.treeViewLookupService = treeViewLookupService;
1420
- this.navigationService = navigationService;
1421
- this.nodeChildrenService = nodeChildrenService;
1422
- this.dataChangeNotification = dataChangeNotification;
1423
- this.changeDetectorRef = changeDetectorRef;
1424
- this.localization = localization;
1425
- this.renderer = renderer;
1426
- /**
1427
- * @hidden
1428
- */
1429
- this.caretAltDownIcon = caretAltDownIcon;
1430
- /**
1431
- * @hidden
1432
- */
1433
- this.caretAltRightIcon = caretAltRightIcon;
1434
- /**
1435
- * @hidden
1436
- */
1437
- this.caretAltLeftIcon = caretAltLeftIcon;
1438
- this.kGroupClass = true;
1439
- this.loadOnDemand = true;
1440
- this.textField = "";
1441
- this.size = 'medium';
1442
- this.initialNodesLoaded = false;
1443
- this.loadingMoreNodes = false;
1444
- this.isItemExpandable = (node, index) => this.expandDisabledNodes || !this.isItemDisabled(node, index);
1445
- this._data = [];
1446
- this.singleRecordSubscriptions = new Subscription();
1447
- this.localizationSubscriptions = new Subscription();
1448
- this.isChecked = () => 'none';
1449
- this.isDisabled = () => false;
1450
- this.hasCheckbox = () => true;
1451
- this.isExpanded = () => false;
1452
- this.isVisible = () => true;
1453
- this.isSelected = () => false;
1454
- this.children = () => of([]);
1455
- this.hasChildren = () => false;
1456
- }
1431
+ expandService;
1432
+ loadingService;
1433
+ indexBuilder;
1434
+ treeViewLookupService;
1435
+ navigationService;
1436
+ nodeChildrenService;
1437
+ dataChangeNotification;
1438
+ changeDetectorRef;
1439
+ localization;
1440
+ renderer;
1441
+ /**
1442
+ * @hidden
1443
+ */
1444
+ caretAltDownIcon = caretAltDownIcon;
1445
+ /**
1446
+ * @hidden
1447
+ */
1448
+ caretAltRightIcon = caretAltRightIcon;
1449
+ /**
1450
+ * @hidden
1451
+ */
1452
+ caretAltLeftIcon = caretAltLeftIcon;
1453
+ /**
1454
+ * @hidden
1455
+ */
1456
+ loadMoreTitle;
1457
+ kGroupClass = true;
1457
1458
  get role() {
1458
1459
  return this.parentIndex ? 'group' : 'tree';
1459
1460
  }
1461
+ checkboxes;
1462
+ expandIcons;
1463
+ disabled;
1464
+ selectable;
1465
+ touchActions;
1466
+ disableParentNodesOnly;
1467
+ loadOnDemand = true;
1468
+ trackBy;
1469
+ nodes;
1470
+ textField = "";
1471
+ parentDataItem;
1472
+ parentIndex;
1473
+ nodeTemplateRef;
1474
+ loadMoreButtonTemplateRef;
1475
+ loadMoreService;
1476
+ size = 'medium';
1477
+ expandDisabledNodes;
1478
+ initialNodesLoaded = false;
1479
+ loadingMoreNodes = false;
1480
+ isItemExpandable = (node, index) => this.expandDisabledNodes || !this.isItemDisabled(node, index);
1460
1481
  getFontIcon(node, index) {
1461
1482
  return this.isExpanded(node, index) ? 'caret-alt-down' : !this.localization.rtl ? 'caret-alt-right' : 'caret-alt-left';
1462
1483
  }
@@ -1504,6 +1525,31 @@ class TreeViewGroupComponent {
1504
1525
  }
1505
1526
  return this.loadMoreService.getTotalNodesCount(this.parentDataItem, this._data.length);
1506
1527
  }
1528
+ _data = [];
1529
+ nodesSubscription;
1530
+ loadMoreNodesSubscription;
1531
+ singleRecordSubscriptions = new Subscription();
1532
+ localizationSubscriptions = new Subscription();
1533
+ constructor(expandService, loadingService, indexBuilder, treeViewLookupService, navigationService, nodeChildrenService, dataChangeNotification, changeDetectorRef, localization, renderer) {
1534
+ this.expandService = expandService;
1535
+ this.loadingService = loadingService;
1536
+ this.indexBuilder = indexBuilder;
1537
+ this.treeViewLookupService = treeViewLookupService;
1538
+ this.navigationService = navigationService;
1539
+ this.nodeChildrenService = nodeChildrenService;
1540
+ this.dataChangeNotification = dataChangeNotification;
1541
+ this.changeDetectorRef = changeDetectorRef;
1542
+ this.localization = localization;
1543
+ this.renderer = renderer;
1544
+ }
1545
+ isChecked = () => 'none';
1546
+ isDisabled = () => false;
1547
+ hasCheckbox = () => true;
1548
+ isExpanded = () => false;
1549
+ isVisible = () => true;
1550
+ isSelected = () => false;
1551
+ children = () => of([]);
1552
+ hasChildren = () => false;
1507
1553
  get hasTemplate() {
1508
1554
  return isPresent(this.nodeTemplateRef);
1509
1555
  }
@@ -1694,9 +1740,8 @@ class TreeViewGroupComponent {
1694
1740
  }
1695
1741
  this.emitChildrenLoaded(mappedChildren);
1696
1742
  }
1697
- }
1698
- TreeViewGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreeViewGroupComponent, deps: [{ token: ExpandStateService }, { token: LoadingNotificationService }, { token: IndexBuilderService }, { token: TreeViewLookupService }, { token: NavigationService }, { token: NodeChildrenService }, { token: DataChangeNotificationService }, { token: i0.ChangeDetectorRef }, { token: i1.LocalizationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
1699
- 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: `
1743
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewGroupComponent, deps: [{ token: ExpandStateService }, { token: LoadingNotificationService }, { token: IndexBuilderService }, { token: TreeViewLookupService }, { token: NavigationService }, { token: NodeChildrenService }, { token: DataChangeNotificationService }, { token: i0.ChangeDetectorRef }, { token: i1.LocalizationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
1744
+ 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: `
1700
1745
  <li
1701
1746
  *ngFor="let node of data; let index = index; trackBy: trackBy"
1702
1747
  class="k-treeview-item"
@@ -1847,18 +1892,19 @@ TreeViewGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0",
1847
1892
  </div>
1848
1893
  </li>
1849
1894
  `, 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: [
1850
- trigger('toggle', [
1851
- transition('void => *', [
1852
- style({ height: 0 }),
1853
- animate('0.1s ease-in', style({ height: "*" }))
1854
- ]),
1855
- transition('* => void', [
1856
- style({ height: "*" }),
1857
- animate('0.1s ease-in', style({ height: 0 }))
1895
+ trigger('toggle', [
1896
+ transition('void => *', [
1897
+ style({ height: 0 }),
1898
+ animate('0.1s ease-in', style({ height: "*" }))
1899
+ ]),
1900
+ transition('* => void', [
1901
+ style({ height: "*" }),
1902
+ animate('0.1s ease-in', style({ height: 0 }))
1903
+ ])
1858
1904
  ])
1859
- ])
1860
- ] });
1861
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreeViewGroupComponent, decorators: [{
1905
+ ] });
1906
+ }
1907
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewGroupComponent, decorators: [{
1862
1908
  type: Component,
1863
1909
  args: [{
1864
1910
  animations: [
@@ -2091,10 +2137,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
2091
2137
  * @hidden
2092
2138
  */
2093
2139
  class TreeViewMessages extends ComponentMessages {
2140
+ /**
2141
+ * The text of the `Load More` button title.
2142
+ */
2143
+ loadMore;
2144
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
2145
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TreeViewMessages, selector: "kendo-treeview-messages-base", inputs: { loadMore: "loadMore" }, usesInheritance: true, ngImport: i0 });
2094
2146
  }
2095
- TreeViewMessages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreeViewMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
2096
- TreeViewMessages.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: TreeViewMessages, selector: "kendo-treeview-messages-base", inputs: { loadMore: "loadMore" }, usesInheritance: true, ngImport: i0 });
2097
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreeViewMessages, decorators: [{
2147
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewMessages, decorators: [{
2098
2148
  type: Directive,
2099
2149
  args: [{
2100
2150
  // eslint-disable-next-line @angular-eslint/directive-selector
@@ -2108,19 +2158,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
2108
2158
  * @hidden
2109
2159
  */
2110
2160
  class LocalizedMessagesDirective extends TreeViewMessages {
2161
+ service;
2111
2162
  constructor(service) {
2112
2163
  super();
2113
2164
  this.service = service;
2114
2165
  }
2166
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
2167
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: LocalizedMessagesDirective, isStandalone: true, selector: "[kendoTreeViewLocalizedMessages]", providers: [
2168
+ {
2169
+ provide: TreeViewMessages,
2170
+ useExisting: forwardRef(() => LocalizedMessagesDirective)
2171
+ }
2172
+ ], usesInheritance: true, ngImport: i0 });
2115
2173
  }
2116
- LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
2117
- LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: LocalizedMessagesDirective, isStandalone: true, selector: "[kendoTreeViewLocalizedMessages]", providers: [
2118
- {
2119
- provide: TreeViewMessages,
2120
- useExisting: forwardRef(() => LocalizedMessagesDirective)
2121
- }
2122
- ], usesInheritance: true, ngImport: i0 });
2123
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
2174
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
2124
2175
  type: Directive,
2125
2176
  args: [{
2126
2177
  providers: [
@@ -2164,200 +2215,43 @@ const providers = [
2164
2215
  *
2165
2216
  */
2166
2217
  class TreeViewComponent {
2167
- constructor(element, changeDetectorRef, expandService, navigationService, nodeChildrenService, selectionService, treeViewLookupService, ngZone, renderer, dataChangeNotification, localization) {
2168
- this.element = element;
2169
- this.changeDetectorRef = changeDetectorRef;
2170
- this.expandService = expandService;
2171
- this.navigationService = navigationService;
2172
- this.nodeChildrenService = nodeChildrenService;
2173
- this.selectionService = selectionService;
2174
- this.treeViewLookupService = treeViewLookupService;
2175
- this.ngZone = ngZone;
2176
- this.renderer = renderer;
2177
- this.dataChangeNotification = dataChangeNotification;
2178
- this.localization = localization;
2179
- /**
2180
- * @hidden
2181
- */
2182
- this.searchIcon = searchIcon;
2183
- this.classNames = true;
2184
- /**
2185
- * The hint which is displayed when the component is empty.
2186
- */
2187
- this.filterInputPlaceholder = "";
2188
- /** @hidden */
2189
- this.fetchNodes = () => this.data;
2190
- /**
2191
- * Fires when the children of the expanded node are loaded.
2192
- */
2193
- this.childrenLoaded = new EventEmitter();
2194
- /**
2195
- * Fires when the user blurs the component.
2196
- */
2197
- this.onBlur = new EventEmitter();
2198
- /**
2199
- * Fires when the user focuses the component.
2200
- */
2201
- this.onFocus = new EventEmitter();
2202
- /**
2203
- * Fires when the user expands a TreeView node.
2204
- */
2205
- this.expand = new EventEmitter();
2206
- /**
2207
- * Fires when the user collapses a TreeView node.
2208
- */
2209
- this.collapse = new EventEmitter();
2210
- /**
2211
- * Fires just before the dragging of the node starts ([see example]({% slug draganddrop_treeview %}#toc-setup)). This event is preventable.
2212
- * If you prevent the event default, no drag hint will be created and the subsequent drag-related events will not be fired.
2213
- */
2214
- this.nodeDragStart = new EventEmitter();
2215
- /**
2216
- * Fires when an item is being dragged ([see example]({% slug draganddrop_treeview %}#toc-setup)).
2217
- */
2218
- this.nodeDrag = new EventEmitter();
2219
- /**
2220
- * Emits when the built-in filtering mechanism in the data-binding directives updates the node's visibility.
2221
- * Used for the built-in auto-expand functionalities of the component and available for custom implementations.
2222
- */
2223
- this.filterStateChange = new EventEmitter();
2224
- /**
2225
- * Fires on the target TreeView when a dragged item is dropped ([see example]({% slug draganddrop_treeview %}#toc-setup)).
2226
- * This event is preventable. If you prevent the event default (`event.preventDefualt()`) or invalidate its state (`event.setValid(false)`),
2227
- * the `addItem` and `removeItem` events will not be triggered.
2228
- *
2229
- * Both operations cancel the default drop operation, but the indication to the user is different. `event.setValid(false)` indicates that the operation was
2230
- * unsuccessful by animating the drag clue to its original position. `event.preventDefault()` simply removes the clue, as if it has been dropped successfully.
2231
- * As a general rule, use `preventDefault` to manually handle the add and remove operations, and `setValid(false)` to indicate the operation was unsuccessful.
2232
- */
2233
- this.nodeDrop = new EventEmitter();
2234
- /**
2235
- * Fires on the source TreeView after the dragged item has been dropped ([see example]({% slug draganddrop_treeview %}#toc-setup)).
2236
- */
2237
- this.nodeDragEnd = new EventEmitter();
2238
- /**
2239
- * Fires after a dragged item is dropped ([see example]({% slug draganddrop_treeview %}#toc-setup)).
2240
- * Called on the TreeView where the item is dropped.
2241
- */
2242
- this.addItem = new EventEmitter();
2243
- /**
2244
- * Fires after a dragged item is dropped ([see example]({% slug draganddrop_treeview %}#toc-setup)).
2245
- * Called on the TreeView from where the item is dragged.
2246
- */
2247
- this.removeItem = new EventEmitter();
2248
- /**
2249
- * Fires when the user selects a TreeView node checkbox
2250
- * ([see example]({% slug checkboxes_treeview %}#toc-modifying-the-checked-state)).
2251
- */
2252
- this.checkedChange = new EventEmitter();
2253
- /**
2254
- * Fires when the user selects a TreeView node
2255
- * ([see example]({% slug selection_treeview %}#toc-modifying-the-selection)).
2256
- */
2257
- this.selectionChange = new EventEmitter();
2258
- /**
2259
- * Fires when the value of the built-in filter input element changes.
2260
- */
2261
- this.filterChange = new EventEmitter();
2262
- /**
2263
- * Fires when the user clicks a TreeView node.
2264
- */
2265
- this.nodeClick = new EventEmitter();
2266
- /**
2267
- * Fires when the user double clicks a TreeView node.
2268
- */
2269
- this.nodeDblClick = new EventEmitter();
2270
- /**
2271
- * A function that defines how to track node changes.
2272
- * By default, the TreeView tracks the nodes by data item object reference.
2273
- *
2274
- * @example
2275
- * ```ts
2276
- * @Component({
2277
- * selector: 'my-app',
2278
- * template: `
2279
- * <kendo-treeview
2280
- * [nodes]="data"
2281
- * textField="text"
2282
- * [trackBy]="trackBy"
2283
- * >
2284
- * </kendo-treeview>
2285
- * `
2286
- * })
2287
- * export class AppComponent {
2288
- * public data: any[] = [
2289
- * { text: "Furniture" },
2290
- * { text: "Decor" }
2291
- * ];
2292
- *
2293
- * public trackBy(index: number, item: any): any {
2294
- * return item.text;
2295
- * }
2296
- * }
2297
- * ```
2298
- */
2299
- this.trackBy = trackBy;
2300
- /**
2301
- * A function which determines if a specific node is disabled.
2302
- */
2303
- this.isDisabled = isDisabled;
2304
- /**
2305
- * A function which determines if a specific node has a checkbox.
2306
- *
2307
- * > If there is no checkbox for a node, then this node is not checkable and is excluded from any built-in check functionality.
2308
- */
2309
- this.hasCheckbox = hasCheckbox;
2310
- /**
2311
- * A callback which determines whether a TreeView node should be rendered as hidden. The utility .k-hidden class is used to hide the nodes.
2312
- * Useful for custom filtering implementations.
2313
- */
2314
- this.isVisible = isVisible;
2315
- /**
2316
- * Determines whether the TreeView keyboard navigable is enabled.
2317
- */
2318
- this.navigable = true;
2319
- /**
2320
- * A function which provides the child nodes for a given parent node
2321
- * ([see example]({% slug databinding_treeview %})).
2322
- */
2323
- this.children = () => of([]);
2324
- /**
2325
- * Indicates whether the child nodes will be fetched on node expand or will be initially prefetched.
2326
- * @default true
2327
- */
2328
- this.loadOnDemand = true;
2329
- /**
2330
- * Renders the built-in input element for filtering the TreeView.
2331
- * If set to `true`, the component emits the `filterChange` event, which can be used to [filter the TreeView manually]({% slug filtering_treeview %}#toc-manual-filtering).
2332
- * A built-in filtering implementation is available to use with the [`kendoTreeViewHierarchyBinding`]({% slug api_treeview_hierarchybindingdirective %}) and [`kendoTreeViewFlatDataBinding`]({% slug api_treeview_flatdatabindingdirective %}) directives.
2333
- */
2334
- this.filterable = false;
2335
- /**
2336
- * Sets an initial value of the built-in input element used for filtering.
2337
- */
2338
- this.filter = '';
2339
- /**
2340
- * Indicates whether only parent nodes should be disabled or their child nodes as well
2341
- * @default false
2342
- */
2343
- this.disableParentNodesOnly = false;
2344
- this.checkboxes = false;
2345
- this.expandIcons = false;
2346
- this.selectable = false;
2347
- this.touchActions = true;
2348
- this.data = new BehaviorSubject([]);
2349
- this._animate = true;
2350
- this._size = 'medium';
2351
- this.subscriptions = new Subscription();
2352
- this.domSubscriptions = [];
2353
- this._nextId = nextId;
2354
- validatePackage(packageMetadata);
2355
- nextId++;
2356
- }
2218
+ element;
2219
+ changeDetectorRef;
2220
+ expandService;
2221
+ navigationService;
2222
+ nodeChildrenService;
2223
+ selectionService;
2224
+ treeViewLookupService;
2225
+ ngZone;
2226
+ renderer;
2227
+ dataChangeNotification;
2228
+ localization;
2229
+ /**
2230
+ * @hidden
2231
+ */
2232
+ searchIcon = searchIcon;
2233
+ classNames = true;
2357
2234
  /** @hidden */
2358
2235
  get direction() {
2359
2236
  return this.localization.rtl ? 'rtl' : 'ltr';
2360
2237
  }
2238
+ /**
2239
+ * @hidden
2240
+ */
2241
+ assetsContainer;
2242
+ /**
2243
+ * @hidden
2244
+ */
2245
+ searchbox;
2246
+ /**
2247
+ * The hint which is displayed when the component is empty.
2248
+ */
2249
+ filterInputPlaceholder = "";
2250
+ /**
2251
+ * Determines whether to allow expanding disabled nodes.
2252
+ * @default false
2253
+ */
2254
+ expandDisabledNodes;
2361
2255
  /**
2362
2256
  * Determines whether the content animation is enabled.
2363
2257
  */
@@ -2367,6 +2261,95 @@ class TreeViewComponent {
2367
2261
  get animate() {
2368
2262
  return !this._animate;
2369
2263
  }
2264
+ /** @hidden */
2265
+ fetchNodes = () => this.data;
2266
+ /**
2267
+ * Fires when the children of the expanded node are loaded.
2268
+ */
2269
+ childrenLoaded = new EventEmitter();
2270
+ /**
2271
+ * Fires when the user blurs the component.
2272
+ */
2273
+ onBlur = new EventEmitter();
2274
+ /**
2275
+ * Fires when the user focuses the component.
2276
+ */
2277
+ onFocus = new EventEmitter();
2278
+ /**
2279
+ * Fires when the user expands a TreeView node.
2280
+ */
2281
+ expand = new EventEmitter();
2282
+ /**
2283
+ * Fires when the user collapses a TreeView node.
2284
+ */
2285
+ collapse = new EventEmitter();
2286
+ /**
2287
+ * Fires just before the dragging of the node starts ([see example]({% slug draganddrop_treeview %}#toc-setup)). This event is preventable.
2288
+ * If you prevent the event default, no drag hint will be created and the subsequent drag-related events will not be fired.
2289
+ */
2290
+ nodeDragStart = new EventEmitter();
2291
+ /**
2292
+ * Fires when an item is being dragged ([see example]({% slug draganddrop_treeview %}#toc-setup)).
2293
+ */
2294
+ nodeDrag = new EventEmitter();
2295
+ /**
2296
+ * Emits when the built-in filtering mechanism in the data-binding directives updates the node's visibility.
2297
+ * Used for the built-in auto-expand functionalities of the component and available for custom implementations.
2298
+ */
2299
+ filterStateChange = new EventEmitter();
2300
+ /**
2301
+ * Fires on the target TreeView when a dragged item is dropped ([see example]({% slug draganddrop_treeview %}#toc-setup)).
2302
+ * This event is preventable. If you prevent the event default (`event.preventDefualt()`) or invalidate its state (`event.setValid(false)`),
2303
+ * the `addItem` and `removeItem` events will not be triggered.
2304
+ *
2305
+ * Both operations cancel the default drop operation, but the indication to the user is different. `event.setValid(false)` indicates that the operation was
2306
+ * unsuccessful by animating the drag clue to its original position. `event.preventDefault()` simply removes the clue, as if it has been dropped successfully.
2307
+ * As a general rule, use `preventDefault` to manually handle the add and remove operations, and `setValid(false)` to indicate the operation was unsuccessful.
2308
+ */
2309
+ nodeDrop = new EventEmitter();
2310
+ /**
2311
+ * Fires on the source TreeView after the dragged item has been dropped ([see example]({% slug draganddrop_treeview %}#toc-setup)).
2312
+ */
2313
+ nodeDragEnd = new EventEmitter();
2314
+ /**
2315
+ * Fires after a dragged item is dropped ([see example]({% slug draganddrop_treeview %}#toc-setup)).
2316
+ * Called on the TreeView where the item is dropped.
2317
+ */
2318
+ addItem = new EventEmitter();
2319
+ /**
2320
+ * Fires after a dragged item is dropped ([see example]({% slug draganddrop_treeview %}#toc-setup)).
2321
+ * Called on the TreeView from where the item is dragged.
2322
+ */
2323
+ removeItem = new EventEmitter();
2324
+ /**
2325
+ * Fires when the user selects a TreeView node checkbox
2326
+ * ([see example]({% slug checkboxes_treeview %}#toc-modifying-the-checked-state)).
2327
+ */
2328
+ checkedChange = new EventEmitter();
2329
+ /**
2330
+ * Fires when the user selects a TreeView node
2331
+ * ([see example]({% slug selection_treeview %}#toc-modifying-the-selection)).
2332
+ */
2333
+ selectionChange = new EventEmitter();
2334
+ /**
2335
+ * Fires when the value of the built-in filter input element changes.
2336
+ */
2337
+ filterChange = new EventEmitter();
2338
+ /**
2339
+ * Fires when the user clicks a TreeView node.
2340
+ */
2341
+ nodeClick = new EventEmitter();
2342
+ /**
2343
+ * Fires when the user double clicks a TreeView node.
2344
+ */
2345
+ nodeDblClick = new EventEmitter();
2346
+ /**
2347
+ * @hidden
2348
+ *
2349
+ * Queries the template for a node template declaration.
2350
+ * Ignored if a `[nodeTemplate]` value is explicitly provided.
2351
+ */
2352
+ nodeTemplateQuery;
2370
2353
  /**
2371
2354
  * @hidden
2372
2355
  *
@@ -2379,6 +2362,13 @@ class TreeViewComponent {
2379
2362
  get nodeTemplateRef() {
2380
2363
  return this._nodeTemplateRef || this.nodeTemplateQuery;
2381
2364
  }
2365
+ /**
2366
+ * @hidden
2367
+ *
2368
+ * Queries the template for a load-more button template declaration.
2369
+ * Ignored if a `[loadMoreButtonTemplate]` value is explicitly provided.
2370
+ */
2371
+ loadMoreButtonTemplateQuery;
2382
2372
  /**
2383
2373
  * @hidden
2384
2374
  *
@@ -2391,6 +2381,36 @@ class TreeViewComponent {
2391
2381
  get loadMoreButtonTemplateRef() {
2392
2382
  return this._loadMoreButtonTemplateRef || this.loadMoreButtonTemplateQuery;
2393
2383
  }
2384
+ /**
2385
+ * A function that defines how to track node changes.
2386
+ * By default, the TreeView tracks the nodes by data item object reference.
2387
+ *
2388
+ * @example
2389
+ * ```ts
2390
+ * @Component({
2391
+ * selector: 'my-app',
2392
+ * template: `
2393
+ * <kendo-treeview
2394
+ * [nodes]="data"
2395
+ * textField="text"
2396
+ * [trackBy]="trackBy"
2397
+ * >
2398
+ * </kendo-treeview>
2399
+ * `
2400
+ * })
2401
+ * export class AppComponent {
2402
+ * public data: any[] = [
2403
+ * { text: "Furniture" },
2404
+ * { text: "Decor" }
2405
+ * ];
2406
+ *
2407
+ * public trackBy(index: number, item: any): any {
2408
+ * return item.text;
2409
+ * }
2410
+ * }
2411
+ * ```
2412
+ */
2413
+ trackBy = trackBy;
2394
2414
  /**
2395
2415
  * The nodes which will be displayed by the TreeView
2396
2416
  * ([see example]({% slug databinding_treeview %})).
@@ -2402,6 +2422,13 @@ class TreeViewComponent {
2402
2422
  get nodes() {
2403
2423
  return this.data.value;
2404
2424
  }
2425
+ /**
2426
+ * The fields of the data item that provide the text content of the nodes
2427
+ * ([see example]({% slug databinding_treeview %})). If the `textField` input is set
2428
+ * to an array, each hierarchical level uses the field that corresponds to the same
2429
+ * index in the array, or the last item in the array.
2430
+ */
2431
+ textField;
2405
2432
  /**
2406
2433
  * A function which determines if a specific node has child nodes
2407
2434
  * ([see example]({% slug databinding_treeview %})).
@@ -2424,6 +2451,16 @@ class TreeViewComponent {
2424
2451
  this._isChecked = callback;
2425
2452
  this.checkboxes = Boolean(this._isChecked);
2426
2453
  }
2454
+ /**
2455
+ * A function which determines if a specific node is disabled.
2456
+ */
2457
+ isDisabled = isDisabled;
2458
+ /**
2459
+ * A function which determines if a specific node has a checkbox.
2460
+ *
2461
+ * > If there is no checkbox for a node, then this node is not checkable and is excluded from any built-in check functionality.
2462
+ */
2463
+ hasCheckbox = hasCheckbox;
2427
2464
  /**
2428
2465
  * A function which determines if a specific node is expanded.
2429
2466
  */
@@ -2445,6 +2482,35 @@ class TreeViewComponent {
2445
2482
  this._isSelected = callback;
2446
2483
  this.selectable = Boolean(this._isSelected);
2447
2484
  }
2485
+ /**
2486
+ * A callback which determines whether a TreeView node should be rendered as hidden. The utility .k-hidden class is used to hide the nodes.
2487
+ * Useful for custom filtering implementations.
2488
+ */
2489
+ isVisible = isVisible;
2490
+ /**
2491
+ * Determines whether the TreeView keyboard navigable is enabled.
2492
+ */
2493
+ navigable = true;
2494
+ /**
2495
+ * A function which provides the child nodes for a given parent node
2496
+ * ([see example]({% slug databinding_treeview %})).
2497
+ */
2498
+ children = () => of([]);
2499
+ /**
2500
+ * Indicates whether the child nodes will be fetched on node expand or will be initially prefetched.
2501
+ * @default true
2502
+ */
2503
+ loadOnDemand = true;
2504
+ /**
2505
+ * Renders the built-in input element for filtering the TreeView.
2506
+ * If set to `true`, the component emits the `filterChange` event, which can be used to [filter the TreeView manually]({% slug filtering_treeview %}#toc-manual-filtering).
2507
+ * A built-in filtering implementation is available to use with the [`kendoTreeViewHierarchyBinding`]({% slug api_treeview_hierarchybindingdirective %}) and [`kendoTreeViewFlatDataBinding`]({% slug api_treeview_flatdatabindingdirective %}) directives.
2508
+ */
2509
+ filterable = false;
2510
+ /**
2511
+ * Sets an initial value of the built-in input element used for filtering.
2512
+ */
2513
+ filter = '';
2448
2514
  /**
2449
2515
  * Sets the size of the component.
2450
2516
  *
@@ -2474,6 +2540,50 @@ class TreeViewComponent {
2474
2540
  get treeviewId() {
2475
2541
  return `treeview_${this._nextId}`;
2476
2542
  }
2543
+ /**
2544
+ * Indicates whether only parent nodes should be disabled or their child nodes as well
2545
+ * @default false
2546
+ */
2547
+ disableParentNodesOnly = false;
2548
+ /**
2549
+ * @hidden
2550
+ */
2551
+ loadMoreService;
2552
+ /**
2553
+ * @hidden
2554
+ */
2555
+ editService;
2556
+ checkboxes = false;
2557
+ expandIcons = false;
2558
+ selectable = false;
2559
+ touchActions = true;
2560
+ data = new BehaviorSubject([]);
2561
+ _animate = true;
2562
+ _isChecked;
2563
+ _isExpanded;
2564
+ _isSelected;
2565
+ _hasChildren;
2566
+ _nodeTemplateRef;
2567
+ _loadMoreButtonTemplateRef;
2568
+ _size = 'medium';
2569
+ subscriptions = new Subscription();
2570
+ domSubscriptions = [];
2571
+ _nextId = nextId;
2572
+ constructor(element, changeDetectorRef, expandService, navigationService, nodeChildrenService, selectionService, treeViewLookupService, ngZone, renderer, dataChangeNotification, localization) {
2573
+ this.element = element;
2574
+ this.changeDetectorRef = changeDetectorRef;
2575
+ this.expandService = expandService;
2576
+ this.navigationService = navigationService;
2577
+ this.nodeChildrenService = nodeChildrenService;
2578
+ this.selectionService = selectionService;
2579
+ this.treeViewLookupService = treeViewLookupService;
2580
+ this.ngZone = ngZone;
2581
+ this.renderer = renderer;
2582
+ this.dataChangeNotification = dataChangeNotification;
2583
+ this.localization = localization;
2584
+ validatePackage(packageMetadata);
2585
+ nextId++;
2586
+ }
2477
2587
  ngOnChanges(changes) {
2478
2588
  this.navigationService.navigable = Boolean(this.navigable);
2479
2589
  // TODO: should react to changes.loadOnDemand as well - should preload the data or clear the already cached items
@@ -2732,9 +2842,8 @@ class TreeViewComponent {
2732
2842
  }
2733
2843
  });
2734
2844
  }
2735
- }
2736
- TreeViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreeViewComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: ExpandStateService }, { token: NavigationService }, { token: NodeChildrenService }, { token: SelectionService }, { token: TreeViewLookupService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: DataChangeNotificationService }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
2737
- TreeViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: TreeViewComponent, isStandalone: true, selector: "kendo-treeview", inputs: { filterInputPlaceholder: "filterInputPlaceholder", expandDisabledNodes: "expandDisabledNodes", animate: "animate", nodeTemplateRef: ["nodeTemplate", "nodeTemplateRef"], loadMoreButtonTemplateRef: ["loadMoreButtonTemplate", "loadMoreButtonTemplateRef"], trackBy: "trackBy", nodes: "nodes", textField: "textField", hasChildren: "hasChildren", isChecked: "isChecked", isDisabled: "isDisabled", hasCheckbox: "hasCheckbox", isExpanded: "isExpanded", isSelected: "isSelected", isVisible: "isVisible", navigable: "navigable", children: "children", loadOnDemand: "loadOnDemand", filterable: "filterable", filter: "filter", size: "size", disableParentNodesOnly: "disableParentNodesOnly" }, outputs: { childrenLoaded: "childrenLoaded", onBlur: "blur", onFocus: "focus", expand: "expand", collapse: "collapse", nodeDragStart: "nodeDragStart", nodeDrag: "nodeDrag", filterStateChange: "filterStateChange", nodeDrop: "nodeDrop", nodeDragEnd: "nodeDragEnd", addItem: "addItem", removeItem: "removeItem", checkedChange: "checkedChange", selectionChange: "selectionChange", filterChange: "filterChange", nodeClick: "nodeClick", nodeDblClick: "nodeDblClick" }, host: { properties: { "class.k-treeview": "this.classNames", "attr.dir": "this.direction", "@.disabled": "this.animate" } }, providers: providers, queries: [{ propertyName: "nodeTemplateQuery", first: true, predicate: NodeTemplateDirective, descendants: true }, { propertyName: "loadMoreButtonTemplateQuery", first: true, predicate: LoadMoreButtonTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "assetsContainer", first: true, predicate: ["assetsContainer"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "searchbox", first: true, predicate: ["searchbox"], descendants: true }], exportAs: ["kendoTreeView"], usesOnChanges: true, ngImport: i0, template: `
2845
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: ExpandStateService }, { token: NavigationService }, { token: NodeChildrenService }, { token: SelectionService }, { token: TreeViewLookupService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: DataChangeNotificationService }, { token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
2846
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TreeViewComponent, isStandalone: true, selector: "kendo-treeview", inputs: { filterInputPlaceholder: "filterInputPlaceholder", expandDisabledNodes: "expandDisabledNodes", animate: "animate", nodeTemplateRef: ["nodeTemplate", "nodeTemplateRef"], loadMoreButtonTemplateRef: ["loadMoreButtonTemplate", "loadMoreButtonTemplateRef"], trackBy: "trackBy", nodes: "nodes", textField: "textField", hasChildren: "hasChildren", isChecked: "isChecked", isDisabled: "isDisabled", hasCheckbox: "hasCheckbox", isExpanded: "isExpanded", isSelected: "isSelected", isVisible: "isVisible", navigable: "navigable", children: "children", loadOnDemand: "loadOnDemand", filterable: "filterable", filter: "filter", size: "size", disableParentNodesOnly: "disableParentNodesOnly" }, outputs: { childrenLoaded: "childrenLoaded", onBlur: "blur", onFocus: "focus", expand: "expand", collapse: "collapse", nodeDragStart: "nodeDragStart", nodeDrag: "nodeDrag", filterStateChange: "filterStateChange", nodeDrop: "nodeDrop", nodeDragEnd: "nodeDragEnd", addItem: "addItem", removeItem: "removeItem", checkedChange: "checkedChange", selectionChange: "selectionChange", filterChange: "filterChange", nodeClick: "nodeClick", nodeDblClick: "nodeDblClick" }, host: { properties: { "class.k-treeview": "this.classNames", "attr.dir": "this.direction", "@.disabled": "this.animate" } }, providers: providers, queries: [{ propertyName: "nodeTemplateQuery", first: true, predicate: NodeTemplateDirective, descendants: true }, { propertyName: "loadMoreButtonTemplateQuery", first: true, predicate: LoadMoreButtonTemplateDirective, descendants: true }], viewQueries: [{ propertyName: "assetsContainer", first: true, predicate: ["assetsContainer"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "searchbox", first: true, predicate: ["searchbox"], descendants: true }], exportAs: ["kendoTreeView"], usesOnChanges: true, ngImport: i0, template: `
2738
2847
  <ng-container kendoTreeViewLocalizedMessages
2739
2848
  i18n-loadMore="kendo.treeview.loadMore|The title of the Load More button"
2740
2849
  loadMore="Load more..."
@@ -2792,7 +2901,8 @@ TreeViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
2792
2901
  </ul>
2793
2902
  <ng-container #assetsContainer></ng-container>
2794
2903
  `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "[kendoTreeViewLocalizedMessages]" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TextBoxComponent, selector: "kendo-textbox", inputs: ["focusableId", "title", "type", "disabled", "readonly", "tabindex", "value", "selectOnFocus", "showSuccessIcon", "showErrorIcon", "clearButton", "successIcon", "successSvgIcon", "errorIcon", "errorSvgIcon", "clearButtonIcon", "clearButtonSvgIcon", "size", "rounded", "fillMode", "tabIndex", "placeholder", "maxlength", "inputAttributes"], outputs: ["valueChange", "inputFocus", "inputBlur", "focus", "blur"], exportAs: ["kendoTextBox"] }, { kind: "directive", type: TextBoxPrefixTemplateDirective, selector: "[kendoTextBoxPrefixTemplate]", inputs: ["showSeparator"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.Default });
2795
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreeViewComponent, decorators: [{
2904
+ }
2905
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewComponent, decorators: [{
2796
2906
  type: Component,
2797
2907
  args: [{
2798
2908
  changeDetection: ChangeDetectionStrategy.Default,
@@ -2987,36 +3097,33 @@ const matchKey = index => k => {
2987
3097
  * ([see example]({% slug checkboxes_treeview %})).
2988
3098
  */
2989
3099
  class CheckDirective {
2990
- constructor(treeView, zone) {
2991
- this.treeView = treeView;
2992
- this.zone = zone;
2993
- /**
2994
- * Fires when the `checkedKeys` collection was updated.
2995
- */
2996
- this.checkedKeysChange = new EventEmitter();
2997
- this.subscriptions = new Subscription();
2998
- this.checkActions = {
2999
- 'multiple': (e) => this.checkMultiple(e),
3000
- 'single': (e) => this.checkSingle(e)
3001
- };
3002
- /**
3003
- * Reflectes the internal `checkedKeys` state.
3004
- */
3005
- this.state = new Set();
3006
- this.subscriptions.add(this.treeView.checkedChange
3007
- .subscribe((e) => this.check(e)));
3008
- const expandedItems = [];
3009
- this.subscriptions.add(this.treeView.childrenLoaded
3010
- .pipe(filter(() => this.options.checkChildren && this.treeView.loadOnDemand), tap(item => expandedItems.push(item)), switchMap(() => this.zone.onStable.pipe(take(1))))
3011
- .subscribe(() => this.addCheckedItemsChildren(expandedItems)));
3012
- this.treeView.isChecked = this.isItemChecked.bind(this);
3013
- }
3100
+ treeView;
3101
+ zone;
3014
3102
  /**
3015
3103
  * @hidden
3016
3104
  */
3017
3105
  set isChecked(value) {
3018
3106
  this.treeView.isChecked = value;
3019
3107
  }
3108
+ /**
3109
+ * Defines the item key that will be stored in the `checkedKeys` collection.
3110
+ */
3111
+ checkKey;
3112
+ /**
3113
+ * Defines the collection that will store the checked keys
3114
+ * ([see example]({% slug checkboxes_treeview %})).
3115
+ */
3116
+ checkedKeys;
3117
+ /**
3118
+ * Defines the checkable settings ([see example]({% slug checkboxes_treeview %}#toc-setup)).
3119
+ * If no value is provided, the default [`CheckableSettings`]({% slug api_treeview_checkablesettings %}) are applied.
3120
+ */
3121
+ checkable;
3122
+ /**
3123
+ * Fires when the `checkedKeys` collection was updated.
3124
+ */
3125
+ checkedKeysChange = new EventEmitter();
3126
+ subscriptions = new Subscription();
3020
3127
  get options() {
3021
3128
  const defaultOptions = {
3022
3129
  checkChildren: true,
@@ -3033,14 +3140,38 @@ class CheckDirective {
3033
3140
  : this.checkable;
3034
3141
  return Object.assign(defaultOptions, checkSettings);
3035
3142
  }
3036
- ngOnChanges(changes) {
3037
- if (changes.checkable) {
3038
- this.treeView.checkboxes = this.options.enabled;
3039
- this.toggleCheckOnClick();
3040
- }
3041
- if (isChanged('checkedKeys', changes, false) && changes.checkedKeys.currentValue !== this.lastChange) {
3042
- this.state = new Set(changes.checkedKeys.currentValue);
3043
- }
3143
+ checkActions = {
3144
+ 'multiple': (e) => this.checkMultiple(e),
3145
+ 'single': (e) => this.checkSingle(e)
3146
+ };
3147
+ /**
3148
+ * Reflectes the internal `checkedKeys` state.
3149
+ */
3150
+ state = new Set();
3151
+ clickSubscription;
3152
+ /**
3153
+ * Holds the last emitted `checkedKeys` collection.
3154
+ */
3155
+ lastChange;
3156
+ constructor(treeView, zone) {
3157
+ this.treeView = treeView;
3158
+ this.zone = zone;
3159
+ this.subscriptions.add(this.treeView.checkedChange
3160
+ .subscribe((e) => this.check(e)));
3161
+ const expandedItems = [];
3162
+ this.subscriptions.add(this.treeView.childrenLoaded
3163
+ .pipe(filter(() => this.options.checkChildren && this.treeView.loadOnDemand), tap(item => expandedItems.push(item)), switchMap(() => this.zone.onStable.pipe(take(1))))
3164
+ .subscribe(() => this.addCheckedItemsChildren(expandedItems)));
3165
+ this.treeView.isChecked = this.isItemChecked.bind(this);
3166
+ }
3167
+ ngOnChanges(changes) {
3168
+ if (changes.checkable) {
3169
+ this.treeView.checkboxes = this.options.enabled;
3170
+ this.toggleCheckOnClick();
3171
+ }
3172
+ if (isChanged('checkedKeys', changes, false) && changes.checkedKeys.currentValue !== this.lastChange) {
3173
+ this.state = new Set(changes.checkedKeys.currentValue);
3174
+ }
3044
3175
  }
3045
3176
  ngOnDestroy() {
3046
3177
  this.subscriptions.unsubscribe();
@@ -3230,10 +3361,10 @@ class CheckDirective {
3230
3361
  this.zone.run(() => this.notify());
3231
3362
  }
3232
3363
  }
3364
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CheckDirective, deps: [{ token: TreeViewComponent }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
3365
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: CheckDirective, isStandalone: true, selector: "[kendoTreeViewCheckable]", inputs: { isChecked: "isChecked", checkKey: ["checkBy", "checkKey"], checkedKeys: "checkedKeys", checkable: ["kendoTreeViewCheckable", "checkable"] }, outputs: { checkedKeysChange: "checkedKeysChange" }, usesOnChanges: true, ngImport: i0 });
3233
3366
  }
3234
- CheckDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CheckDirective, deps: [{ token: TreeViewComponent }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
3235
- CheckDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: CheckDirective, isStandalone: true, selector: "[kendoTreeViewCheckable]", inputs: { isChecked: "isChecked", checkKey: ["checkBy", "checkKey"], checkedKeys: "checkedKeys", checkable: ["kendoTreeViewCheckable", "checkable"] }, outputs: { checkedKeysChange: "checkedKeysChange" }, usesOnChanges: true, ngImport: i0 });
3236
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CheckDirective, decorators: [{
3367
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CheckDirective, decorators: [{
3237
3368
  type: Directive,
3238
3369
  args: [{
3239
3370
  selector: '[kendoTreeViewCheckable]',
@@ -3258,21 +3389,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
3258
3389
  * ([see example]({% slug disabledstate_treeview %})).
3259
3390
  */
3260
3391
  class DisableDirective {
3261
- constructor(treeView, cdr) {
3262
- this.treeView = treeView;
3263
- this.cdr = cdr;
3264
- /**
3265
- * Defines the collection that will store the disabled keys.
3266
- */
3267
- this.disabledKeys = [];
3268
- this.treeView.isDisabled = (dataItem, index) => (this.disabledKeys.indexOf(this.itemKey({ dataItem, index })) > -1);
3269
- }
3392
+ treeView;
3393
+ cdr;
3270
3394
  /**
3271
3395
  * @hidden
3272
3396
  */
3273
3397
  set isDisabled(value) {
3274
3398
  this.treeView.isDisabled = value;
3275
3399
  }
3400
+ /**
3401
+ * Defines the item key that will be stored in the `disabledKeys` collection.
3402
+ */
3403
+ disableKey;
3404
+ /**
3405
+ * Defines the collection that will store the disabled keys.
3406
+ */
3407
+ disabledKeys = [];
3408
+ constructor(treeView, cdr) {
3409
+ this.treeView = treeView;
3410
+ this.cdr = cdr;
3411
+ this.treeView.isDisabled = (dataItem, index) => (this.disabledKeys.indexOf(this.itemKey({ dataItem, index })) > -1);
3412
+ }
3276
3413
  ngOnChanges(changes = {}) {
3277
3414
  const { disabledKeys } = changes;
3278
3415
  if (disabledKeys && !disabledKeys.firstChange) {
@@ -3290,10 +3427,10 @@ class DisableDirective {
3290
3427
  return this.disableKey(e);
3291
3428
  }
3292
3429
  }
3430
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DisableDirective, deps: [{ token: TreeViewComponent }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
3431
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DisableDirective, isStandalone: true, selector: "[kendoTreeViewDisable]", inputs: { isDisabled: "isDisabled", disableKey: ["kendoTreeViewDisable", "disableKey"], disabledKeys: "disabledKeys" }, usesOnChanges: true, ngImport: i0 });
3293
3432
  }
3294
- DisableDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DisableDirective, deps: [{ token: TreeViewComponent }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
3295
- DisableDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: DisableDirective, isStandalone: true, selector: "[kendoTreeViewDisable]", inputs: { isDisabled: "isDisabled", disableKey: ["kendoTreeViewDisable", "disableKey"], disabledKeys: "disabledKeys" }, usesOnChanges: true, ngImport: i0 });
3296
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DisableDirective, decorators: [{
3433
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DisableDirective, decorators: [{
3297
3434
  type: Directive,
3298
3435
  args: [{
3299
3436
  selector: '[kendoTreeViewDisable]',
@@ -3318,12 +3455,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
3318
3455
  * handlers when the corresponding events are triggered by the TreeView component.
3319
3456
  */
3320
3457
  class DragAndDropEditingDirective {
3321
- constructor(treeview) {
3322
- this.treeview = treeview;
3323
- this.subscriptions = new Subscription();
3324
- this.subscriptions.add(this.treeview.addItem.subscribe(this.handleAdd.bind(this)));
3325
- this.subscriptions.add(this.treeview.removeItem.subscribe(this.handleRemove.bind(this)));
3326
- }
3458
+ treeview;
3327
3459
  /**
3328
3460
  * Specifies the handlers called on drag-and-drop [`addItem`]({% slug api_treeview_treeviewcomponent %}#toc-additem)
3329
3461
  * and [`removeItem`]({% slug api_treeview_treeviewcomponent %}#toc-removeitem) events.
@@ -3331,6 +3463,12 @@ class DragAndDropEditingDirective {
3331
3463
  set editService(service) {
3332
3464
  this.treeview.editService = service;
3333
3465
  }
3466
+ subscriptions = new Subscription();
3467
+ constructor(treeview) {
3468
+ this.treeview = treeview;
3469
+ this.subscriptions.add(this.treeview.addItem.subscribe(this.handleAdd.bind(this)));
3470
+ this.subscriptions.add(this.treeview.removeItem.subscribe(this.handleRemove.bind(this)));
3471
+ }
3334
3472
  ngOnDestroy() {
3335
3473
  this.subscriptions.unsubscribe();
3336
3474
  }
@@ -3346,10 +3484,10 @@ class DragAndDropEditingDirective {
3346
3484
  }
3347
3485
  this.treeview.editService.remove(args);
3348
3486
  }
3487
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragAndDropEditingDirective, deps: [{ token: TreeViewComponent }], target: i0.ɵɵFactoryTarget.Directive });
3488
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DragAndDropEditingDirective, isStandalone: true, selector: "[kendoTreeViewDragAndDropEditing]", inputs: { editService: "editService" }, ngImport: i0 });
3349
3489
  }
3350
- DragAndDropEditingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragAndDropEditingDirective, deps: [{ token: TreeViewComponent }], target: i0.ɵɵFactoryTarget.Directive });
3351
- DragAndDropEditingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: DragAndDropEditingDirective, isStandalone: true, selector: "[kendoTreeViewDragAndDropEditing]", inputs: { editService: "editService" }, ngImport: i0 });
3352
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragAndDropEditingDirective, decorators: [{
3490
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragAndDropEditingDirective, decorators: [{
3353
3491
  type: Directive,
3354
3492
  args: [{
3355
3493
  selector: '[kendoTreeViewDragAndDropEditing]',
@@ -3396,9 +3534,7 @@ var ScrollDirection;
3396
3534
  * @hidden
3397
3535
  */
3398
3536
  class PreventableEvent {
3399
- constructor() {
3400
- this.prevented = false;
3401
- }
3537
+ prevented = false;
3402
3538
  /**
3403
3539
  * Prevents the default action for a specified event.
3404
3540
  * In this way, the source component suppresses the built-in behavior that follows the event.
@@ -3420,15 +3556,39 @@ class PreventableEvent {
3420
3556
  * Arguments for the TreeView [`nodeDrop`]({% slug api_treeview_treeviewcomponent %}#toc-nodedrop) event.
3421
3557
  */
3422
3558
  class TreeItemDropEvent extends PreventableEvent {
3559
+ /**
3560
+ * A reference of the TreeView from which the dragged item originates.
3561
+ */
3562
+ sourceTree;
3563
+ /**
3564
+ * A reference of the TreeView onto which the dragged item is dropped.
3565
+ */
3566
+ destinationTree;
3567
+ /**
3568
+ * The look-up info for the dragged item.
3569
+ */
3570
+ sourceItem;
3571
+ /**
3572
+ * The look-up info for the item onto which the dragged item is dropped.
3573
+ */
3574
+ destinationItem;
3575
+ /**
3576
+ * Describes where the dragged item is dropped relative to the drop target item.
3577
+ */
3578
+ dropPosition;
3579
+ /**
3580
+ * The original pointer event holding details about the current pointer position.
3581
+ */
3582
+ originalEvent;
3583
+ /**
3584
+ * @hidden
3585
+ */
3586
+ isValid = true;
3423
3587
  /**
3424
3588
  * @hidden
3425
3589
  */
3426
3590
  constructor(initializer, originalEvent) {
3427
3591
  super();
3428
- /**
3429
- * @hidden
3430
- */
3431
- this.isValid = true;
3432
3592
  Object.assign(this, initializer);
3433
3593
  this.originalEvent = originalEvent;
3434
3594
  }
@@ -3447,6 +3607,14 @@ class TreeItemDropEvent extends PreventableEvent {
3447
3607
  * Arguments for the TreeView [`nodeDragStart`]({% slug api_treeview_treeviewcomponent %}#toc-nodedragstart) event.
3448
3608
  */
3449
3609
  class TreeItemDragStartEvent extends PreventableEvent {
3610
+ /**
3611
+ * The look-up info for the dragged item.
3612
+ */
3613
+ sourceItem;
3614
+ /**
3615
+ * The original pointer event holding details about the current pointer position.
3616
+ */
3617
+ originalEvent;
3450
3618
  /**
3451
3619
  * @hidden
3452
3620
  */
@@ -3463,17 +3631,47 @@ class TreeItemDragStartEvent extends PreventableEvent {
3463
3631
  class TreeItemDragEvent {
3464
3632
  /** @hidden */
3465
3633
  constructor() { }
3634
+ /**
3635
+ * The look-up info for the dragged item.
3636
+ */
3637
+ sourceItem;
3638
+ /**
3639
+ * The look-up info for the item that the dragged node is placed over if there is such.
3640
+ */
3641
+ destinationItem;
3642
+ /**
3643
+ * The original pointer event holding details about the current pointer position.
3644
+ */
3645
+ originalEvent;
3466
3646
  }
3467
3647
 
3468
3648
  /**
3469
3649
  * @hidden
3470
3650
  */
3471
3651
  class DragClueComponent {
3472
- constructor(cdr) {
3473
- this.cdr = cdr;
3474
- this.hostClasses = true;
3475
- this.posistionStyle = 'fixed';
3476
- }
3652
+ cdr;
3653
+ hostClasses = true;
3654
+ /**
3655
+ * The text value of the dragged TreeView item.
3656
+ */
3657
+ text;
3658
+ /**
3659
+ * The attempted operation according to the current drop target.
3660
+ */
3661
+ action;
3662
+ /**
3663
+ * The look-up info for the currently dragged item.
3664
+ */
3665
+ sourceItem;
3666
+ /**
3667
+ * The look-up info for the destination item (if hovering a valid drop target).
3668
+ */
3669
+ destinationItem;
3670
+ /**
3671
+ * Defines the drag clue content template.
3672
+ */
3673
+ template;
3674
+ posistionStyle = 'fixed';
3477
3675
  get statusIconClass() {
3478
3676
  switch (this.action) {
3479
3677
  case DropAction.Add: return 'plus';
@@ -3494,13 +3692,15 @@ class DragClueComponent {
3494
3692
  default: return cancelIcon;
3495
3693
  }
3496
3694
  }
3695
+ constructor(cdr) {
3696
+ this.cdr = cdr;
3697
+ }
3497
3698
  // exposed as a public method that can be called from outside as the component uses `OnPush` strategy
3498
3699
  detectChanges() {
3499
3700
  this.cdr.detectChanges();
3500
3701
  }
3501
- }
3502
- DragClueComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragClueComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
3503
- DragClueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DragClueComponent, isStandalone: true, selector: "kendo-treeview-drag-clue", host: { properties: { "class.k-header": "this.hostClasses", "class.k-drag-clue": "this.hostClasses", "style.position": "this.posistionStyle" } }, ngImport: i0, template: `
3702
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragClueComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
3703
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DragClueComponent, isStandalone: true, selector: "kendo-treeview-drag-clue", host: { properties: { "class.k-header": "this.hostClasses", "class.k-drag-clue": "this.hostClasses", "style.position": "this.posistionStyle" } }, ngImport: i0, template: `
3504
3704
  <ng-container *ngIf="!template">
3505
3705
  <kendo-icon-wrapper
3506
3706
  innerCssClass="k-drag-status"
@@ -3523,7 +3723,8 @@ DragClueComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
3523
3723
  >
3524
3724
  </ng-template>
3525
3725
  `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3526
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragClueComponent, decorators: [{
3726
+ }
3727
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragClueComponent, decorators: [{
3527
3728
  type: Component,
3528
3729
  args: [{
3529
3730
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -3581,6 +3782,7 @@ class DragAndDropAssetService {
3581
3782
  get element() {
3582
3783
  return this.componentRef.location.nativeElement;
3583
3784
  }
3785
+ _componentRef;
3584
3786
  ngOnDestroy() {
3585
3787
  if (!isPresent(this._componentRef)) {
3586
3788
  return;
@@ -3599,10 +3801,10 @@ class DragAndDropAssetService {
3599
3801
  this.element.style.left = `${left + offset}px`;
3600
3802
  this.element.style.top = `${top + offset}px`;
3601
3803
  }
3804
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragAndDropAssetService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3805
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragAndDropAssetService });
3602
3806
  }
3603
- DragAndDropAssetService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragAndDropAssetService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3604
- DragAndDropAssetService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragAndDropAssetService });
3605
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragAndDropAssetService, decorators: [{
3807
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragAndDropAssetService, decorators: [{
3606
3808
  type: Injectable
3607
3809
  }] });
3608
3810
 
@@ -3882,6 +4084,9 @@ const RETURN_ANIMATION_DURATION = 200;
3882
4084
  * @hidden
3883
4085
  */
3884
4086
  class DragClueService extends DragAndDropAssetService {
4087
+ componentFactoryResolver;
4088
+ returnAnimation;
4089
+ scrollInterval;
3885
4090
  constructor(componentFactoryResolver) {
3886
4091
  super();
3887
4092
  this.componentFactoryResolver = componentFactoryResolver;
@@ -3976,10 +4181,10 @@ class DragClueService extends DragAndDropAssetService {
3976
4181
  this.scrollInterval = null;
3977
4182
  }
3978
4183
  }
4184
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragClueService, deps: [{ token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Injectable });
4185
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragClueService });
3979
4186
  }
3980
- DragClueService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragClueService, deps: [{ token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Injectable });
3981
- DragClueService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragClueService });
3982
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragClueService, decorators: [{
4187
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragClueService, decorators: [{
3983
4188
  type: Injectable
3984
4189
  }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }]; } });
3985
4190
 
@@ -3987,19 +4192,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
3987
4192
  * @hidden
3988
4193
  */
3989
4194
  class DropHintComponent {
4195
+ changeDetectorRef;
4196
+ hostClass = true;
4197
+ /**
4198
+ * Defines the drag hint content template.
4199
+ */
4200
+ template;
4201
+ position = 'fixed';
4202
+ pointerEvents = 'none';
4203
+ /**
4204
+ * The attempted operation according to the current drop target.
4205
+ */
4206
+ action;
4207
+ /**
4208
+ * The look-up info for the currently dragged item.
4209
+ */
4210
+ sourceItem;
4211
+ /**
4212
+ * The look-up info for the destination item.
4213
+ */
4214
+ destinationItem;
3990
4215
  constructor(changeDetectorRef) {
3991
4216
  this.changeDetectorRef = changeDetectorRef;
3992
- this.hostClass = true;
3993
- this.position = 'fixed';
3994
- this.pointerEvents = 'none';
3995
4217
  }
3996
4218
  // exposed as a public method that can be called from outside as the component uses `OnPush` strategy
3997
4219
  detectChanges() {
3998
4220
  this.changeDetectorRef.detectChanges();
3999
4221
  }
4000
- }
4001
- DropHintComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DropHintComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
4002
- DropHintComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DropHintComponent, isStandalone: true, selector: "kendo-treeview-drop-hint", host: { properties: { "class.k-drop-hint-container": "this.hostClass", "style.position": "this.position", "style.pointer-events": "this.pointerEvents" } }, ngImport: i0, template: `
4222
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropHintComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
4223
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DropHintComponent, isStandalone: true, selector: "kendo-treeview-drop-hint", host: { properties: { "class.k-drop-hint-container": "this.hostClass", "style.position": "this.position", "style.pointer-events": "this.pointerEvents" } }, ngImport: i0, template: `
4003
4224
  <div
4004
4225
  *ngIf="!template"
4005
4226
  class="k-drop-hint k-drop-hint-h"
@@ -4019,7 +4240,8 @@ DropHintComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", vers
4019
4240
  >
4020
4241
  <ng-template>
4021
4242
  `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
4022
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DropHintComponent, decorators: [{
4243
+ }
4244
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropHintComponent, decorators: [{
4023
4245
  type: Component,
4024
4246
  args: [{
4025
4247
  changeDetection: ChangeDetectionStrategy.OnPush,
@@ -4062,6 +4284,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4062
4284
  * @hidden
4063
4285
  */
4064
4286
  class DropHintService extends DragAndDropAssetService {
4287
+ componentFactoryResolver;
4065
4288
  constructor(componentFactoryResolver) {
4066
4289
  super();
4067
4290
  this.componentFactoryResolver = componentFactoryResolver;
@@ -4086,10 +4309,10 @@ class DropHintService extends DragAndDropAssetService {
4086
4309
  dropHint.destinationItem = destinationItem;
4087
4310
  dropHint.detectChanges();
4088
4311
  }
4312
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropHintService, deps: [{ token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Injectable });
4313
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropHintService });
4089
4314
  }
4090
- DropHintService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DropHintService, deps: [{ token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Injectable });
4091
- DropHintService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DropHintService });
4092
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DropHintService, decorators: [{
4315
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropHintService, decorators: [{
4093
4316
  type: Injectable
4094
4317
  }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }]; } });
4095
4318
 
@@ -4108,13 +4331,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4108
4331
  * - `let-destinationItem="destinationItem"` ([`TreeItemLookup`]({% slug api_treeview_treeitemlookup %}))
4109
4332
  */
4110
4333
  class DragClueTemplateDirective {
4334
+ templateRef;
4111
4335
  constructor(templateRef) {
4112
4336
  this.templateRef = templateRef;
4113
4337
  }
4338
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragClueTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
4339
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DragClueTemplateDirective, isStandalone: true, selector: "[kendoTreeViewDragClueTemplate]", ngImport: i0 });
4114
4340
  }
4115
- DragClueTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragClueTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
4116
- DragClueTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: DragClueTemplateDirective, isStandalone: true, selector: "[kendoTreeViewDragClueTemplate]", ngImport: i0 });
4117
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragClueTemplateDirective, decorators: [{
4341
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragClueTemplateDirective, decorators: [{
4118
4342
  type: Directive,
4119
4343
  args: [{
4120
4344
  selector: '[kendoTreeViewDragClueTemplate]',
@@ -4136,13 +4360,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
4136
4360
  * - `let-destinationItem="destinationItem"` ([`TreeItemLookup`]({% slug api_treeview_treeitemlookup %}))
4137
4361
  */
4138
4362
  class DropHintTemplateDirective {
4363
+ templateRef;
4139
4364
  constructor(templateRef) {
4140
4365
  this.templateRef = templateRef;
4141
4366
  }
4367
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropHintTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
4368
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DropHintTemplateDirective, isStandalone: true, selector: "[kendoTreeViewDropHintTemplate]", ngImport: i0 });
4142
4369
  }
4143
- DropHintTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DropHintTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
4144
- DropHintTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: DropHintTemplateDirective, isStandalone: true, selector: "[kendoTreeViewDropHintTemplate]", ngImport: i0 });
4145
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DropHintTemplateDirective, decorators: [{
4370
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropHintTemplateDirective, decorators: [{
4146
4371
  type: Directive,
4147
4372
  args: [{
4148
4373
  selector: '[kendoTreeViewDropHintTemplate]',
@@ -4170,60 +4395,81 @@ const DEFAULT_SCROLL_SETTINGS = {
4170
4395
  * events when the corresponding actions occur on the respective TreeView instance.
4171
4396
  */
4172
4397
  class DragAndDropDirective {
4398
+ element;
4399
+ zone;
4400
+ treeview;
4401
+ dragClueService;
4402
+ dropHintService;
4403
+ /**
4404
+ * Specifies whether the `removeItem` event will be fired after an item is dropped when the `ctrl` key is pressed.
4405
+ * If enabled, the `removeItem` event will not be fired on the source TreeView
4406
+ * ([see example]({% slug draganddrop_treeview %}#toc-multiple-treeviews)).
4407
+ *
4408
+ * @default false
4409
+ */
4410
+ allowCopy = false;
4411
+ /**
4412
+ * Specifes the TreeViewComponent instances into which dragged items from the current TreeViewComponent can be dropped
4413
+ * ([see example]({% slug draganddrop_treeview %}#toc-multiple-treeviews)).
4414
+ */
4415
+ dropZoneTreeViews = [];
4416
+ /**
4417
+ * Specifies the distance in pixels from the initial item pointerdown event, before the dragging is initiated.
4418
+ * The `nodeDragStart` and all consequent TreeView drag events will not be fired until the actual dragging begins.
4419
+ *
4420
+ * @default 5
4421
+ */
4422
+ startDragAfter = 5;
4423
+ /**
4424
+ * Controlls the auto-scrolling behavior during drag-and-drop ([see example]({% slug draganddrop_treeview %}#toc-auto-scrolling)).
4425
+ * Enbaled by default. To turn the auto-scrolling off, set this prop to `false`.
4426
+ *
4427
+ * By default, the scrolling will be performed by 1 pixel at every 1 millisecond, when the dragged item reaches the top or the bottom of the scrollable container.
4428
+ * The `step` and `interval` can be overridden by providing a `DragAndDropScrollSettings` object to this prop.
4429
+ *
4430
+ * @default true
4431
+ */
4432
+ autoScroll = true;
4433
+ /**
4434
+ * @hidden
4435
+ */
4436
+ dragClueTemplate;
4437
+ /**
4438
+ * @hidden
4439
+ */
4440
+ dropHintTemplate;
4441
+ /**
4442
+ * @hidden
4443
+ */
4444
+ userSelectStyle = 'none';
4445
+ draggable;
4446
+ draggedItem;
4447
+ /**
4448
+ * The pointer event of the last successful item pointerdown event (the draggable `press` event).
4449
+ * Used for determining whether the `startDragAfter` distance is covered and for the `nodeDragStart` event args.
4450
+ * Used also as a flag for whether a drag attempt is pending. Should be set to `null` once the dragging begins.
4451
+ */
4452
+ pendingDragStartEvent;
4453
+ get scrollSettings() {
4454
+ const userProvidedSettings = typeof this.autoScroll === 'boolean' ?
4455
+ { enabled: this.autoScroll } :
4456
+ this.autoScroll;
4457
+ return Object.assign({}, DEFAULT_SCROLL_SETTINGS, userProvidedSettings);
4458
+ }
4459
+ /**
4460
+ * Describes the offset of the parent element if the latter has the `transform` CSS prop applied.
4461
+ * Transformed parents create new stacking context and the fixed children must be position based on the transformed parent.
4462
+ * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context
4463
+ */
4464
+ containerOffset = { top: 0, left: 0 };
4173
4465
  constructor(element, zone, treeview, dragClueService, dropHintService) {
4174
4466
  this.element = element;
4175
4467
  this.zone = zone;
4176
4468
  this.treeview = treeview;
4177
4469
  this.dragClueService = dragClueService;
4178
4470
  this.dropHintService = dropHintService;
4179
- /**
4180
- * Specifies whether the `removeItem` event will be fired after an item is dropped when the `ctrl` key is pressed.
4181
- * If enabled, the `removeItem` event will not be fired on the source TreeView
4182
- * ([see example]({% slug draganddrop_treeview %}#toc-multiple-treeviews)).
4183
- *
4184
- * @default false
4185
- */
4186
- this.allowCopy = false;
4187
- /**
4188
- * Specifes the TreeViewComponent instances into which dragged items from the current TreeViewComponent can be dropped
4189
- * ([see example]({% slug draganddrop_treeview %}#toc-multiple-treeviews)).
4190
- */
4191
- this.dropZoneTreeViews = [];
4192
- /**
4193
- * Specifies the distance in pixels from the initial item pointerdown event, before the dragging is initiated.
4194
- * The `nodeDragStart` and all consequent TreeView drag events will not be fired until the actual dragging begins.
4195
- *
4196
- * @default 5
4197
- */
4198
- this.startDragAfter = 5;
4199
- /**
4200
- * Controlls the auto-scrolling behavior during drag-and-drop ([see example]({% slug draganddrop_treeview %}#toc-auto-scrolling)).
4201
- * Enbaled by default. To turn the auto-scrolling off, set this prop to `false`.
4202
- *
4203
- * By default, the scrolling will be performed by 1 pixel at every 1 millisecond, when the dragged item reaches the top or the bottom of the scrollable container.
4204
- * The `step` and `interval` can be overridden by providing a `DragAndDropScrollSettings` object to this prop.
4205
- *
4206
- * @default true
4207
- */
4208
- this.autoScroll = true;
4209
- /**
4210
- * @hidden
4211
- */
4212
- this.userSelectStyle = 'none';
4213
- /**
4214
- * Describes the offset of the parent element if the latter has the `transform` CSS prop applied.
4215
- * Transformed parents create new stacking context and the fixed children must be position based on the transformed parent.
4216
- * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context
4217
- */
4218
- this.containerOffset = { top: 0, left: 0 };
4219
4471
  this.treeview.touchActions = false;
4220
4472
  }
4221
- get scrollSettings() {
4222
- const userProvidedSettings = typeof this.autoScroll === 'boolean' ?
4223
- { enabled: this.autoScroll } :
4224
- this.autoScroll;
4225
- return Object.assign({}, DEFAULT_SCROLL_SETTINGS, userProvidedSettings);
4226
- }
4227
4473
  ngAfterContentInit() {
4228
4474
  this.initalizeDraggable();
4229
4475
  this.dragClueService.initialize(this.treeview.assetsContainer, this.dragClueTemplate && this.dragClueTemplate.templateRef);
@@ -4405,13 +4651,13 @@ class DragAndDropDirective {
4405
4651
  this.containerOffset = getContainerOffset(this.draggedItem);
4406
4652
  this.pendingDragStartEvent = null;
4407
4653
  }
4654
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragAndDropDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: TreeViewComponent }, { token: DragClueService }, { token: DropHintService }], target: i0.ɵɵFactoryTarget.Directive });
4655
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DragAndDropDirective, isStandalone: true, selector: "[kendoTreeViewDragAndDrop]", inputs: { allowCopy: "allowCopy", dropZoneTreeViews: "dropZoneTreeViews", startDragAfter: "startDragAfter", autoScroll: "autoScroll" }, host: { properties: { "style.user-select": "this.userSelectStyle", "style.-ms-user-select": "this.userSelectStyle", "style.-moz-user-select": "this.userSelectStyle", "style.-webkit-user-select": "this.userSelectStyle" } }, providers: [
4656
+ DragClueService,
4657
+ DropHintService
4658
+ ], queries: [{ propertyName: "dragClueTemplate", first: true, predicate: DragClueTemplateDirective, descendants: true }, { propertyName: "dropHintTemplate", first: true, predicate: DropHintTemplateDirective, descendants: true }], ngImport: i0 });
4408
4659
  }
4409
- DragAndDropDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragAndDropDirective, deps: [{ token: i0.ElementRef }, { token: i0.NgZone }, { token: TreeViewComponent }, { token: DragClueService }, { token: DropHintService }], target: i0.ɵɵFactoryTarget.Directive });
4410
- DragAndDropDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: DragAndDropDirective, isStandalone: true, selector: "[kendoTreeViewDragAndDrop]", inputs: { allowCopy: "allowCopy", dropZoneTreeViews: "dropZoneTreeViews", startDragAfter: "startDragAfter", autoScroll: "autoScroll" }, host: { properties: { "style.user-select": "this.userSelectStyle", "style.-ms-user-select": "this.userSelectStyle", "style.-moz-user-select": "this.userSelectStyle", "style.-webkit-user-select": "this.userSelectStyle" } }, providers: [
4411
- DragClueService,
4412
- DropHintService
4413
- ], queries: [{ propertyName: "dragClueTemplate", first: true, predicate: DragClueTemplateDirective, descendants: true }, { propertyName: "dropHintTemplate", first: true, predicate: DropHintTemplateDirective, descendants: true }], ngImport: i0 });
4414
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DragAndDropDirective, decorators: [{
4660
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DragAndDropDirective, decorators: [{
4415
4661
  type: Directive,
4416
4662
  args: [{
4417
4663
  selector: '[kendoTreeViewDragAndDrop]',
@@ -4459,67 +4705,54 @@ const DEFAULT_FILTER_EXPAND_SETTINGS = {
4459
4705
  * ([see example]({% slug expandedstate_treeview %})).
4460
4706
  */
4461
4707
  class ExpandDirective {
4462
- constructor(component) {
4463
- this.component = component;
4464
- /**
4465
- * Whether or not to auto-expand the nodes leading from the root node to each filter result.
4466
- * To fine-tune this behavior, pass a [`FilterExpandSettings`]({% slug api_treeview_filterexpandsettings %}) object to this input.
4467
- * @default false
4468
- */
4469
- this.expandOnFilter = false;
4470
- /**
4471
- * Fires when the `expandedKeys` collection was updated.
4472
- */
4473
- this.expandedKeysChange = new EventEmitter();
4474
- this.subscriptions = new Subscription();
4475
- /**
4476
- * Reflectes the internal `expandedKeys` state.
4477
- */
4478
- this.state = new Set();
4479
- this.originalExpandedKeys = new Set();
4480
- this.isFiltered = false;
4481
- /**
4482
- * Fills array with the correct expand keys according to wrapper metadata.
4483
- */
4484
- this.updateExpandedNodes = (collection, node, autoExpandMatches) => {
4485
- if (node.containsMatches || node.isMatch && autoExpandMatches && isArrayWithAtLeastOneItem(node.children)) {
4486
- collection.push(this.itemKey({ dataItem: node.dataItem, index: node.index }));
4487
- }
4488
- if (isArrayWithAtLeastOneItem(node.children)) {
4489
- node.children.forEach(child => {
4490
- this.updateExpandedNodes(collection, child, autoExpandMatches);
4491
- });
4492
- }
4493
- };
4494
- /**
4495
- * Fills array with the expand key of every node.
4496
- */
4497
- this.getEveryExpandKey = (collection, node) => {
4498
- if (isArrayWithAtLeastOneItem(node.children)) {
4499
- collection.push(this.itemKey({ dataItem: node.dataItem, index: node.index }));
4500
- }
4501
- if (isArrayWithAtLeastOneItem(node.children)) {
4502
- node.children.forEach(child => {
4503
- this.getEveryExpandKey(collection, child);
4504
- });
4505
- }
4506
- };
4507
- this.subscriptions.add(merge(this.component.expand.pipe(map(e => ({ expand: true, ...e }))), this.component.collapse.pipe(map(e => ({ expand: false, ...e })))).subscribe(this.toggleExpand.bind(this)));
4508
- if (this.component.filterStateChange) {
4509
- this.subscriptions.add(this.component.filterStateChange.subscribe(this.handleAutoExpand.bind(this)));
4510
- }
4511
- this.component.isExpanded = (dataItem, index) => this.state.has(this.itemKey({ dataItem, index }));
4512
- }
4708
+ component;
4513
4709
  /**
4514
4710
  * @hidden
4515
4711
  */
4516
4712
  set isExpanded(value) {
4517
4713
  this.component.isExpanded = value;
4518
4714
  }
4715
+ /**
4716
+ * Defines the item key that will be stored in the `expandedKeys` collection.
4717
+ */
4718
+ expandKey;
4719
+ /**
4720
+ * Whether or not to auto-expand the nodes leading from the root node to each filter result.
4721
+ * To fine-tune this behavior, pass a [`FilterExpandSettings`]({% slug api_treeview_filterexpandsettings %}) object to this input.
4722
+ * @default false
4723
+ */
4724
+ expandOnFilter = false;
4519
4725
  get filterExpandSettings() {
4520
4726
  const settings = isBoolean(this.expandOnFilter) ? { enabled: this.expandOnFilter } : { ...this.expandOnFilter, enabled: true };
4521
4727
  return Object.assign({}, DEFAULT_FILTER_EXPAND_SETTINGS, settings);
4522
4728
  }
4729
+ /**
4730
+ * Fires when the `expandedKeys` collection was updated.
4731
+ */
4732
+ expandedKeysChange = new EventEmitter();
4733
+ /**
4734
+ * Defines the collection that will store the expanded keys.
4735
+ */
4736
+ expandedKeys;
4737
+ subscriptions = new Subscription();
4738
+ /**
4739
+ * Reflectes the internal `expandedKeys` state.
4740
+ */
4741
+ state = new Set();
4742
+ originalExpandedKeys = new Set();
4743
+ isFiltered = false;
4744
+ /**
4745
+ * Holds the last emitted `expandedKeys` collection.
4746
+ */
4747
+ lastChange;
4748
+ constructor(component) {
4749
+ this.component = component;
4750
+ this.subscriptions.add(merge(this.component.expand.pipe(map(e => ({ expand: true, ...e }))), this.component.collapse.pipe(map(e => ({ expand: false, ...e })))).subscribe(this.toggleExpand.bind(this)));
4751
+ if (this.component.filterStateChange) {
4752
+ this.subscriptions.add(this.component.filterStateChange.subscribe(this.handleAutoExpand.bind(this)));
4753
+ }
4754
+ this.component.isExpanded = (dataItem, index) => this.state.has(this.itemKey({ dataItem, index }));
4755
+ }
4523
4756
  ngOnChanges(changes) {
4524
4757
  if (isChanged('expandedKeys', changes, false) && changes['expandedKeys'].currentValue !== this.lastChange) {
4525
4758
  this.state = new Set(changes['expandedKeys'].currentValue);
@@ -4611,14 +4844,40 @@ class ExpandDirective {
4611
4844
  }
4612
4845
  this.isFiltered = true;
4613
4846
  }
4847
+ /**
4848
+ * Fills array with the correct expand keys according to wrapper metadata.
4849
+ */
4850
+ updateExpandedNodes = (collection, node, autoExpandMatches) => {
4851
+ if (node.containsMatches || node.isMatch && autoExpandMatches && isArrayWithAtLeastOneItem(node.children)) {
4852
+ collection.push(this.itemKey({ dataItem: node.dataItem, index: node.index }));
4853
+ }
4854
+ if (isArrayWithAtLeastOneItem(node.children)) {
4855
+ node.children.forEach(child => {
4856
+ this.updateExpandedNodes(collection, child, autoExpandMatches);
4857
+ });
4858
+ }
4859
+ };
4860
+ /**
4861
+ * Fills array with the expand key of every node.
4862
+ */
4863
+ getEveryExpandKey = (collection, node) => {
4864
+ if (isArrayWithAtLeastOneItem(node.children)) {
4865
+ collection.push(this.itemKey({ dataItem: node.dataItem, index: node.index }));
4866
+ }
4867
+ if (isArrayWithAtLeastOneItem(node.children)) {
4868
+ node.children.forEach(child => {
4869
+ this.getEveryExpandKey(collection, child);
4870
+ });
4871
+ }
4872
+ };
4614
4873
  notify() {
4615
4874
  this.lastChange = Array.from(this.state);
4616
4875
  this.expandedKeysChange.emit(this.lastChange);
4617
4876
  }
4877
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExpandDirective, deps: [{ token: ExpandableComponent }], target: i0.ɵɵFactoryTarget.Directive });
4878
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ExpandDirective, isStandalone: true, selector: "[kendoTreeViewExpandable]", inputs: { isExpanded: "isExpanded", expandKey: ["expandBy", "expandKey"], expandOnFilter: "expandOnFilter", expandedKeys: "expandedKeys" }, outputs: { expandedKeysChange: "expandedKeysChange" }, usesOnChanges: true, ngImport: i0 });
4618
4879
  }
4619
- ExpandDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ExpandDirective, deps: [{ token: ExpandableComponent }], target: i0.ɵɵFactoryTarget.Directive });
4620
- ExpandDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: ExpandDirective, isStandalone: true, selector: "[kendoTreeViewExpandable]", inputs: { isExpanded: "isExpanded", expandKey: ["expandBy", "expandKey"], expandOnFilter: "expandOnFilter", expandedKeys: "expandedKeys" }, outputs: { expandedKeysChange: "expandedKeysChange" }, usesOnChanges: true, ngImport: i0 });
4621
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: ExpandDirective, decorators: [{
4880
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExpandDirective, decorators: [{
4622
4881
  type: Directive,
4623
4882
  args: [{
4624
4883
  selector: '[kendoTreeViewExpandable]',
@@ -4678,6 +4937,8 @@ const decrementPageSize = (treeview, dataItem) => {
4678
4937
  * @hidden
4679
4938
  */
4680
4939
  class FlatEditingService {
4940
+ flatBinding;
4941
+ movedItemNewIndex;
4681
4942
  constructor(flatBinding) {
4682
4943
  this.flatBinding = flatBinding;
4683
4944
  }
@@ -4817,11 +5078,12 @@ const DEFAULT_FILTER_SETTINGS = {
4817
5078
  * @hidden
4818
5079
  */
4819
5080
  class FilteringBase {
4820
- constructor(component) {
4821
- this.component = component;
4822
- this.visibleNodes = new Set();
4823
- this._filterSettings = DEFAULT_FILTER_SETTINGS;
4824
- }
5081
+ component;
5082
+ /**
5083
+ * Stores the unfiltered nodes
5084
+ */
5085
+ filterData;
5086
+ visibleNodes = new Set();
4825
5087
  /**
4826
5088
  * The settings which are applied when performing a filter on the component's data.
4827
5089
  */
@@ -4834,12 +5096,16 @@ class FilteringBase {
4834
5096
  get filterSettings() {
4835
5097
  return this._filterSettings;
4836
5098
  }
5099
+ _filterSettings = DEFAULT_FILTER_SETTINGS;
4837
5100
  /**
4838
5101
  * Applies a filter and changes the visibility of the component's nodes accordingly.
4839
5102
  */
4840
5103
  set filter(term) {
4841
5104
  this.handleFilterChange(term);
4842
5105
  }
5106
+ constructor(component) {
5107
+ this.component = component;
5108
+ }
4843
5109
  /**
4844
5110
  * @hidden
4845
5111
  */
@@ -4880,10 +5146,10 @@ class FilteringBase {
4880
5146
  }
4881
5147
  });
4882
5148
  }
5149
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FilteringBase, deps: [{ token: DataBoundComponent }], target: i0.ɵɵFactoryTarget.Directive });
5150
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: FilteringBase, inputs: { filterSettings: "filterSettings", filter: "filter" }, ngImport: i0 });
4883
5151
  }
4884
- FilteringBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FilteringBase, deps: [{ token: DataBoundComponent }], target: i0.ɵɵFactoryTarget.Directive });
4885
- FilteringBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: FilteringBase, inputs: { filterSettings: "filterSettings", filter: "filter" }, ngImport: i0 });
4886
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FilteringBase, decorators: [{
5152
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FilteringBase, decorators: [{
4887
5153
  type: Directive
4888
5154
  }], ctorParameters: function () { return [{ type: DataBoundComponent }]; }, propDecorators: { filterSettings: [{
4889
5155
  type: Input
@@ -4913,19 +5179,7 @@ const mapToTree = (currentLevelNodes, allNodes, parentIdField, idField, parent =
4913
5179
  * A directive which encapsulates the retrieval of the child nodes.
4914
5180
  */
4915
5181
  class FlatDataBindingDirective extends FilteringBase {
4916
- constructor(component) {
4917
- super(component);
4918
- this.component = component;
4919
- /**
4920
- * @hidden
4921
- */
4922
- this.loadOnDemand = true;
4923
- /**
4924
- * @hidden
4925
- */
4926
- this.originalData = [];
4927
- this.component.isVisible = (node) => this.visibleNodes.has(node);
4928
- }
5182
+ component;
4929
5183
  /**
4930
5184
  * The nodes which will be displayed by the TreeView.
4931
5185
  */
@@ -4936,6 +5190,19 @@ class FlatDataBindingDirective extends FilteringBase {
4936
5190
  get nodes() {
4937
5191
  return this._nodes;
4938
5192
  }
5193
+ _nodes;
5194
+ /**
5195
+ * Represents the parent field whose value will be matched with the parent node.
5196
+ */
5197
+ parentIdField;
5198
+ /**
5199
+ * Represents the unique field which identifies a node.
5200
+ */
5201
+ idField;
5202
+ /**
5203
+ * @hidden
5204
+ */
5205
+ loadOnDemand = true;
4939
5206
  /**
4940
5207
  * @hidden
4941
5208
  * A callback which determines whether a TreeView node should be rendered as hidden.
@@ -4943,6 +5210,15 @@ class FlatDataBindingDirective extends FilteringBase {
4943
5210
  set isVisible(fn) {
4944
5211
  this.component.isVisible = fn;
4945
5212
  }
5213
+ /**
5214
+ * @hidden
5215
+ */
5216
+ originalData = [];
5217
+ constructor(component) {
5218
+ super(component);
5219
+ this.component = component;
5220
+ this.component.isVisible = (node) => this.visibleNodes.has(node);
5221
+ }
4946
5222
  /**
4947
5223
  * @hidden
4948
5224
  */
@@ -4992,10 +5268,10 @@ class FlatDataBindingDirective extends FilteringBase {
4992
5268
  this.component.nodes = this.originalData.slice(0);
4993
5269
  }
4994
5270
  }
5271
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FlatDataBindingDirective, deps: [{ token: DataBoundComponent }], target: i0.ɵɵFactoryTarget.Directive });
5272
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: FlatDataBindingDirective, isStandalone: true, selector: "[kendoTreeViewFlatDataBinding]", inputs: { nodes: "nodes", parentIdField: "parentIdField", idField: "idField", loadOnDemand: "loadOnDemand", isVisible: "isVisible" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });
4995
5273
  }
4996
- FlatDataBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FlatDataBindingDirective, deps: [{ token: DataBoundComponent }], target: i0.ɵɵFactoryTarget.Directive });
4997
- FlatDataBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: FlatDataBindingDirective, isStandalone: true, selector: "[kendoTreeViewFlatDataBinding]", inputs: { nodes: "nodes", parentIdField: "parentIdField", idField: "idField", loadOnDemand: "loadOnDemand", isVisible: "isVisible" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });
4998
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: FlatDataBindingDirective, decorators: [{
5274
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FlatDataBindingDirective, decorators: [{
4999
5275
  type: Directive,
5000
5276
  args: [{
5001
5277
  selector: "[kendoTreeViewFlatDataBinding]",
@@ -5017,6 +5293,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
5017
5293
  * @hidden
5018
5294
  */
5019
5295
  class HierarchyEditingService {
5296
+ hierarchyBinding;
5297
+ movedItemNewIndex;
5020
5298
  constructor(hierarchyBinding) {
5021
5299
  this.hierarchyBinding = hierarchyBinding;
5022
5300
  }
@@ -5112,18 +5390,8 @@ const mapToWrappers = (currentLevelNodes, childrenField, parent = null, parentIn
5112
5390
  * A directive which encapsulates the retrieval of child nodes.
5113
5391
  */
5114
5392
  class HierarchyBindingDirective extends FilteringBase {
5115
- constructor(component, dragAndDropDirective) {
5116
- super(component);
5117
- this.component = component;
5118
- this.dragAndDropDirective = dragAndDropDirective;
5119
- /**
5120
- * @hidden
5121
- */
5122
- this.loadOnDemand = true;
5123
- this.originalData = [];
5124
- const shouldFilter = !isPresent(this.dragAndDropDirective);
5125
- this.component.isVisible = shouldFilter ? (node) => this.visibleNodes.has(node) : isVisible;
5126
- }
5393
+ component;
5394
+ dragAndDropDirective;
5127
5395
  /**
5128
5396
  * The field name which holds the data items of the child component.
5129
5397
  */
@@ -5149,6 +5417,7 @@ class HierarchyBindingDirective extends FilteringBase {
5149
5417
  get nodes() {
5150
5418
  return this._nodes;
5151
5419
  }
5420
+ _nodes;
5152
5421
  /**
5153
5422
  * @hidden
5154
5423
  * A callback which determines whether a TreeView node should be rendered as hidden.
@@ -5156,6 +5425,19 @@ class HierarchyBindingDirective extends FilteringBase {
5156
5425
  set isVisible(fn) {
5157
5426
  this.component.isVisible = fn;
5158
5427
  }
5428
+ /**
5429
+ * @hidden
5430
+ */
5431
+ loadOnDemand = true;
5432
+ _childrenField;
5433
+ originalData = [];
5434
+ constructor(component, dragAndDropDirective) {
5435
+ super(component);
5436
+ this.component = component;
5437
+ this.dragAndDropDirective = dragAndDropDirective;
5438
+ const shouldFilter = !isPresent(this.dragAndDropDirective);
5439
+ this.component.isVisible = shouldFilter ? (node) => this.visibleNodes.has(node) : isVisible;
5440
+ }
5159
5441
  ngOnInit() {
5160
5442
  if (isPresent(this.childrenField)) {
5161
5443
  this.component.children = item => of(getter(this.childrenField)(item));
@@ -5194,10 +5476,10 @@ class HierarchyBindingDirective extends FilteringBase {
5194
5476
  this.filterData = mapToWrappers(values, this.childrenField) || [];
5195
5477
  this.updateVisibleNodes(this.filterData);
5196
5478
  }
5479
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HierarchyBindingDirective, deps: [{ token: DataBoundComponent }, { token: DragAndDropDirective, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
5480
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: HierarchyBindingDirective, isStandalone: true, selector: "[kendoTreeViewHierarchyBinding]", inputs: { childrenField: "childrenField", nodes: "nodes", isVisible: "isVisible", loadOnDemand: "loadOnDemand" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });
5197
5481
  }
5198
- HierarchyBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HierarchyBindingDirective, deps: [{ token: DataBoundComponent }, { token: DragAndDropDirective, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
5199
- HierarchyBindingDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: HierarchyBindingDirective, isStandalone: true, selector: "[kendoTreeViewHierarchyBinding]", inputs: { childrenField: "childrenField", nodes: "nodes", isVisible: "isVisible", loadOnDemand: "loadOnDemand" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 });
5200
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HierarchyBindingDirective, decorators: [{
5482
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: HierarchyBindingDirective, decorators: [{
5201
5483
  type: Directive,
5202
5484
  args: [{
5203
5485
  selector: '[kendoTreeViewHierarchyBinding]',
@@ -5223,23 +5505,7 @@ const LOAD_MORE_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/
5223
5505
  * ([see example]({% slug loadmorebutton_treeview %})).
5224
5506
  */
5225
5507
  class LoadMoreDirective {
5226
- constructor(treeview) {
5227
- this.treeview = treeview;
5228
- /**
5229
- * Keeps track of the current page size of each node over expand/collapse cycles.
5230
- */
5231
- this.pageSizes = new Map();
5232
- /**
5233
- * Used as an identifier for the root page size as the root collection of nodes is not associated with a data item.
5234
- */
5235
- this.rootLevelId = guid();
5236
- this.treeview.loadMoreService = {
5237
- getInitialPageSize: this.getInitalPageSize.bind(this),
5238
- getGroupSize: this.getGroupSize.bind(this),
5239
- setGroupSize: this.setGroupSize.bind(this),
5240
- getTotalNodesCount: this.getTotalNodesCount.bind(this)
5241
- };
5242
- }
5508
+ treeview;
5243
5509
  /**
5244
5510
  * Specifies the callback that will be called when the load more button is clicked.
5245
5511
  * Providing a function is only required when additional nodes are fetched on demand
@@ -5251,6 +5517,40 @@ class LoadMoreDirective {
5251
5517
  }
5252
5518
  this.treeview.loadMoreService.loadMoreNodes = loadMoreNodes;
5253
5519
  }
5520
+ /**
5521
+ * Specifies the initial number of nodes that will be rendered on each level.
5522
+ * Every time the load more button is clicked, the data item page size will be incremented with this number.
5523
+ */
5524
+ pageSize;
5525
+ /**
5526
+ * Specifies the total number of root nodes.
5527
+ * Used when additional nodes are fetched on demand
5528
+ * ([see example]({% slug loadmorebutton_treeview %}#toc-remote-data)).
5529
+ */
5530
+ totalRootNodes;
5531
+ /**
5532
+ * Specifies which field holds information about the total number of child nodes of the data item.
5533
+ * Used when additional nodes are fetched on demand
5534
+ * ([see example]({% slug loadmorebutton_treeview %}#toc-remote-data)).
5535
+ */
5536
+ totalField;
5537
+ /**
5538
+ * Keeps track of the current page size of each node over expand/collapse cycles.
5539
+ */
5540
+ pageSizes = new Map();
5541
+ /**
5542
+ * Used as an identifier for the root page size as the root collection of nodes is not associated with a data item.
5543
+ */
5544
+ rootLevelId = guid();
5545
+ constructor(treeview) {
5546
+ this.treeview = treeview;
5547
+ this.treeview.loadMoreService = {
5548
+ getInitialPageSize: this.getInitalPageSize.bind(this),
5549
+ getGroupSize: this.getGroupSize.bind(this),
5550
+ setGroupSize: this.setGroupSize.bind(this),
5551
+ getTotalNodesCount: this.getTotalNodesCount.bind(this)
5552
+ };
5553
+ }
5254
5554
  ngOnChanges() {
5255
5555
  this.verifySettings();
5256
5556
  }
@@ -5292,10 +5592,10 @@ class LoadMoreDirective {
5292
5592
  getInitalPageSize() {
5293
5593
  return this.pageSize;
5294
5594
  }
5595
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LoadMoreDirective, deps: [{ token: TreeViewComponent }], target: i0.ɵɵFactoryTarget.Directive });
5596
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: LoadMoreDirective, isStandalone: true, selector: "[kendoTreeViewLoadMore]", inputs: { loadMoreNodes: ["kendoTreeViewLoadMore", "loadMoreNodes"], pageSize: "pageSize", totalRootNodes: "totalRootNodes", totalField: "totalField" }, usesOnChanges: true, ngImport: i0 });
5295
5597
  }
5296
- LoadMoreDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LoadMoreDirective, deps: [{ token: TreeViewComponent }], target: i0.ɵɵFactoryTarget.Directive });
5297
- LoadMoreDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: LoadMoreDirective, isStandalone: true, selector: "[kendoTreeViewLoadMore]", inputs: { loadMoreNodes: ["kendoTreeViewLoadMore", "loadMoreNodes"], pageSize: "pageSize", totalRootNodes: "totalRootNodes", totalField: "totalField" }, usesOnChanges: true, ngImport: i0 });
5298
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LoadMoreDirective, decorators: [{
5598
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LoadMoreDirective, decorators: [{
5299
5599
  type: Directive,
5300
5600
  args: [{
5301
5601
  selector: '[kendoTreeViewLoadMore]',
@@ -5316,6 +5616,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
5316
5616
  * Custom component messages override default component messages
5317
5617
  */
5318
5618
  class CustomMessagesComponent extends TreeViewMessages {
5619
+ service;
5319
5620
  constructor(service) {
5320
5621
  super();
5321
5622
  this.service = service;
@@ -5323,15 +5624,15 @@ class CustomMessagesComponent extends TreeViewMessages {
5323
5624
  get override() {
5324
5625
  return true;
5325
5626
  }
5627
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
5628
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CustomMessagesComponent, isStandalone: true, selector: "kendo-treeview-messages", providers: [
5629
+ {
5630
+ provide: TreeViewMessages,
5631
+ useExisting: forwardRef(() => CustomMessagesComponent)
5632
+ }
5633
+ ], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
5326
5634
  }
5327
- CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
5328
- CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CustomMessagesComponent, isStandalone: true, selector: "kendo-treeview-messages", providers: [
5329
- {
5330
- provide: TreeViewMessages,
5331
- useExisting: forwardRef(() => CustomMessagesComponent)
5332
- }
5333
- ], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
5334
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CustomMessagesComponent, decorators: [{
5635
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CustomMessagesComponent, decorators: [{
5335
5636
  type: Component,
5336
5637
  args: [{
5337
5638
  providers: [
@@ -5351,37 +5652,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
5351
5652
  * ([see example]({% slug selection_treeview %})).
5352
5653
  */
5353
5654
  class SelectDirective {
5354
- constructor(treeView, navigationService) {
5355
- this.treeView = treeView;
5356
- this.navigationService = navigationService;
5357
- /**
5358
- * Fires when the `selectedKeys` collection was updated.
5359
- */
5360
- this.selectedKeysChange = new EventEmitter();
5361
- this.subscriptions = new Subscription();
5362
- this.selectActions = {
5363
- 'multiple': (e) => this.selectMultiple(e),
5364
- 'single': (e) => this.selectSingle(e)
5365
- };
5366
- /**
5367
- * Reflectes the internal `selectedKeys` state.
5368
- */
5369
- this.state = new Set();
5370
- this.subscriptions.add(this.treeView.selectionChange.subscribe(this.select.bind(this)));
5371
- this.treeView.isSelected = (dataItem, index) => (this.state.has(this.itemKey({ dataItem, index })));
5372
- this.navigationService.deselectAllButCurrentItem.subscribe((node) => {
5373
- this.selectSingle(node);
5374
- });
5375
- }
5655
+ treeView;
5656
+ navigationService;
5376
5657
  /**
5377
5658
  * @hidden
5378
5659
  */
5379
5660
  set isSelected(value) {
5380
5661
  this.treeView.isSelected = value;
5381
5662
  }
5663
+ /**
5664
+ * Defines the item key that will be stored in the `selectedKeys` collection.
5665
+ */
5666
+ selectKey;
5667
+ /**
5668
+ * Defines the current selection mode
5669
+ * ([see example](slug:selection_treeview#toc-modes)).
5670
+ */
5671
+ selection;
5672
+ /**
5673
+ * Defines the collection that will store the selected keys
5674
+ * ([see example](slug:selection_treeview#toc-modes)).
5675
+ */
5676
+ selectedKeys;
5677
+ /**
5678
+ * Fires when the `selectedKeys` collection was updated.
5679
+ */
5680
+ selectedKeysChange = new EventEmitter();
5382
5681
  get getAriaMultiselectable() {
5383
5682
  return this.options.mode === 'multiple';
5384
5683
  }
5684
+ subscriptions = new Subscription();
5385
5685
  get options() {
5386
5686
  const defaultOptions = {
5387
5687
  enabled: true,
@@ -5393,6 +5693,27 @@ class SelectDirective {
5393
5693
  const selectionSettings = isBoolean(this.selection) ? { enabled: this.selection } : this.selection;
5394
5694
  return Object.assign(defaultOptions, selectionSettings);
5395
5695
  }
5696
+ selectActions = {
5697
+ 'multiple': (e) => this.selectMultiple(e),
5698
+ 'single': (e) => this.selectSingle(e)
5699
+ };
5700
+ /**
5701
+ * Reflectes the internal `selectedKeys` state.
5702
+ */
5703
+ state = new Set();
5704
+ /**
5705
+ * Holds the last emitted `selectedKeys` collection.
5706
+ */
5707
+ lastChange;
5708
+ constructor(treeView, navigationService) {
5709
+ this.treeView = treeView;
5710
+ this.navigationService = navigationService;
5711
+ this.subscriptions.add(this.treeView.selectionChange.subscribe(this.select.bind(this)));
5712
+ this.treeView.isSelected = (dataItem, index) => (this.state.has(this.itemKey({ dataItem, index })));
5713
+ this.navigationService.deselectAllButCurrentItem.subscribe((node) => {
5714
+ this.selectSingle(node);
5715
+ });
5716
+ }
5396
5717
  ngOnChanges(changes) {
5397
5718
  if (isChanged('selectedKeys', changes, false) && changes['selectedKeys'].currentValue !== this.lastChange) {
5398
5719
  this.state = new Set(changes['selectedKeys'].currentValue);
@@ -5448,10 +5769,10 @@ class SelectDirective {
5448
5769
  this.lastChange = Array.from(this.state);
5449
5770
  this.selectedKeysChange.emit(this.lastChange);
5450
5771
  }
5772
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectDirective, deps: [{ token: TreeViewComponent }, { token: NavigationService }], target: i0.ɵɵFactoryTarget.Directive });
5773
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: SelectDirective, isStandalone: true, selector: "[kendoTreeViewSelectable]", inputs: { isSelected: "isSelected", selectKey: ["selectBy", "selectKey"], selection: ["kendoTreeViewSelectable", "selection"], selectedKeys: "selectedKeys" }, outputs: { selectedKeysChange: "selectedKeysChange" }, host: { properties: { "attr.aria-multiselectable": "this.getAriaMultiselectable" } }, usesOnChanges: true, ngImport: i0 });
5451
5774
  }
5452
- SelectDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SelectDirective, deps: [{ token: TreeViewComponent }, { token: NavigationService }], target: i0.ɵɵFactoryTarget.Directive });
5453
- SelectDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: SelectDirective, isStandalone: true, selector: "[kendoTreeViewSelectable]", inputs: { isSelected: "isSelected", selectKey: ["selectBy", "selectKey"], selection: ["kendoTreeViewSelectable", "selection"], selectedKeys: "selectedKeys" }, outputs: { selectedKeysChange: "selectedKeysChange" }, host: { properties: { "attr.aria-multiselectable": "this.getAriaMultiselectable" } }, usesOnChanges: true, ngImport: i0 });
5454
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SelectDirective, decorators: [{
5775
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectDirective, decorators: [{
5455
5776
  type: Directive,
5456
5777
  args: [{
5457
5778
  selector: '[kendoTreeViewSelectable]',
@@ -5500,19 +5821,19 @@ const KENDO_TREEVIEW = [
5500
5821
  * Represents the [NgModule](link:site.data.urls.angular['ngmoduleapi']) definition for the TreeView component.
5501
5822
  */
5502
5823
  class TreeViewModule {
5824
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5825
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TreeViewModule, imports: [TreeViewComponent, NodeTemplateDirective, CheckDirective, DisableDirective, ExpandDirective, SelectDirective, HierarchyBindingDirective, FlatDataBindingDirective, DragAndDropDirective, DragClueTemplateDirective, DropHintTemplateDirective, DragAndDropEditingDirective, LoadMoreDirective, LoadMoreButtonTemplateDirective, CustomMessagesComponent], exports: [TreeViewComponent, NodeTemplateDirective, CheckDirective, DisableDirective, ExpandDirective, SelectDirective, HierarchyBindingDirective, FlatDataBindingDirective, DragAndDropDirective, DragClueTemplateDirective, DropHintTemplateDirective, DragAndDropEditingDirective, LoadMoreDirective, LoadMoreButtonTemplateDirective, CustomMessagesComponent] });
5826
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewModule, providers: [
5827
+ IconsService,
5828
+ PopupService,
5829
+ ResizeBatchService,
5830
+ DialogContainerService,
5831
+ DialogService,
5832
+ WindowService,
5833
+ WindowContainerService
5834
+ ], imports: [TreeViewComponent] });
5503
5835
  }
5504
- TreeViewModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreeViewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5505
- TreeViewModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: TreeViewModule, imports: [TreeViewComponent, NodeTemplateDirective, CheckDirective, DisableDirective, ExpandDirective, SelectDirective, HierarchyBindingDirective, FlatDataBindingDirective, DragAndDropDirective, DragClueTemplateDirective, DropHintTemplateDirective, DragAndDropEditingDirective, LoadMoreDirective, LoadMoreButtonTemplateDirective, CustomMessagesComponent], exports: [TreeViewComponent, NodeTemplateDirective, CheckDirective, DisableDirective, ExpandDirective, SelectDirective, HierarchyBindingDirective, FlatDataBindingDirective, DragAndDropDirective, DragClueTemplateDirective, DropHintTemplateDirective, DragAndDropEditingDirective, LoadMoreDirective, LoadMoreButtonTemplateDirective, CustomMessagesComponent] });
5506
- TreeViewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreeViewModule, providers: [
5507
- IconsService,
5508
- PopupService,
5509
- ResizeBatchService,
5510
- DialogContainerService,
5511
- DialogService,
5512
- WindowService,
5513
- WindowContainerService
5514
- ], imports: [TreeViewComponent, CustomMessagesComponent] });
5515
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreeViewModule, decorators: [{
5836
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewModule, decorators: [{
5516
5837
  type: NgModule,
5517
5838
  args: [{
5518
5839
  imports: [...KENDO_TREEVIEW],