@progress/kendo-angular-treeview 17.0.0-develop.9 → 17.0.1-develop.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +5 -5
  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
@@ -14,23 +14,7 @@ const LOAD_MORE_DOC_LINK = 'https://www.telerik.com/kendo-angular-ui/components/
14
14
  * ([see example]({% slug loadmorebutton_treeview %})).
15
15
  */
16
16
  export class LoadMoreDirective {
17
- constructor(treeview) {
18
- this.treeview = treeview;
19
- /**
20
- * Keeps track of the current page size of each node over expand/collapse cycles.
21
- */
22
- this.pageSizes = new Map();
23
- /**
24
- * Used as an identifier for the root page size as the root collection of nodes is not associated with a data item.
25
- */
26
- this.rootLevelId = guid();
27
- this.treeview.loadMoreService = {
28
- getInitialPageSize: this.getInitalPageSize.bind(this),
29
- getGroupSize: this.getGroupSize.bind(this),
30
- setGroupSize: this.setGroupSize.bind(this),
31
- getTotalNodesCount: this.getTotalNodesCount.bind(this)
32
- };
33
- }
17
+ treeview;
34
18
  /**
35
19
  * Specifies the callback that will be called when the load more button is clicked.
36
20
  * Providing a function is only required when additional nodes are fetched on demand
@@ -42,6 +26,40 @@ export class LoadMoreDirective {
42
26
  }
43
27
  this.treeview.loadMoreService.loadMoreNodes = loadMoreNodes;
44
28
  }
29
+ /**
30
+ * Specifies the initial number of nodes that will be rendered on each level.
31
+ * Every time the load more button is clicked, the data item page size will be incremented with this number.
32
+ */
33
+ pageSize;
34
+ /**
35
+ * Specifies the total number of root nodes.
36
+ * Used when additional nodes are fetched on demand
37
+ * ([see example]({% slug loadmorebutton_treeview %}#toc-remote-data)).
38
+ */
39
+ totalRootNodes;
40
+ /**
41
+ * Specifies which field holds information about the total number of child nodes of the data item.
42
+ * Used when additional nodes are fetched on demand
43
+ * ([see example]({% slug loadmorebutton_treeview %}#toc-remote-data)).
44
+ */
45
+ totalField;
46
+ /**
47
+ * Keeps track of the current page size of each node over expand/collapse cycles.
48
+ */
49
+ pageSizes = new Map();
50
+ /**
51
+ * Used as an identifier for the root page size as the root collection of nodes is not associated with a data item.
52
+ */
53
+ rootLevelId = guid();
54
+ constructor(treeview) {
55
+ this.treeview = treeview;
56
+ this.treeview.loadMoreService = {
57
+ getInitialPageSize: this.getInitalPageSize.bind(this),
58
+ getGroupSize: this.getGroupSize.bind(this),
59
+ setGroupSize: this.setGroupSize.bind(this),
60
+ getTotalNodesCount: this.getTotalNodesCount.bind(this)
61
+ };
62
+ }
45
63
  ngOnChanges() {
46
64
  this.verifySettings();
47
65
  }
@@ -83,10 +101,10 @@ export class LoadMoreDirective {
83
101
  getInitalPageSize() {
84
102
  return this.pageSize;
85
103
  }
104
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LoadMoreDirective, deps: [{ token: i1.TreeViewComponent }], target: i0.ɵɵFactoryTarget.Directive });
105
+ 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 });
86
106
  }
87
- LoadMoreDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LoadMoreDirective, deps: [{ token: i1.TreeViewComponent }], target: i0.ɵɵFactoryTarget.Directive });
88
- 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 });
89
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LoadMoreDirective, decorators: [{
107
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LoadMoreDirective, decorators: [{
90
108
  type: Directive,
91
109
  args: [{
92
110
  selector: '[kendoTreeViewLoadMore]',
@@ -14,12 +14,9 @@ import * as i2 from "./loading-notification.service";
14
14
  * @hidden
15
15
  */
16
16
  export class LoadingIndicatorDirective {
17
- constructor(expandService, loadingService, cd) {
18
- this.expandService = expandService;
19
- this.loadingService = loadingService;
20
- this.cd = cd;
21
- this._loading = false;
22
- }
17
+ expandService;
18
+ loadingService;
19
+ cd;
23
20
  get loading() {
24
21
  return this._loading;
25
22
  }
@@ -27,6 +24,14 @@ export class LoadingIndicatorDirective {
27
24
  this._loading = value;
28
25
  this.cd.markForCheck();
29
26
  }
27
+ index;
28
+ _loading = false;
29
+ subscription;
30
+ constructor(expandService, loadingService, cd) {
31
+ this.expandService = expandService;
32
+ this.loadingService = loadingService;
33
+ this.cd = cd;
34
+ }
30
35
  ngOnInit() {
31
36
  const loadingNotifications = this.loadingService
32
37
  .changes
@@ -46,10 +51,10 @@ export class LoadingIndicatorDirective {
46
51
  this.subscription.unsubscribe();
47
52
  }
48
53
  }
54
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LoadingIndicatorDirective, deps: [{ token: i1.ExpandStateService }, { token: i2.LoadingNotificationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
55
+ 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 });
49
56
  }
50
- LoadingIndicatorDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LoadingIndicatorDirective, deps: [{ token: i1.ExpandStateService }, { token: i2.LoadingNotificationService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
51
- 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 });
52
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LoadingIndicatorDirective, decorators: [{
57
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LoadingIndicatorDirective, decorators: [{
53
58
  type: Directive,
54
59
  args: [{
55
60
  selector: '[kendoTreeViewLoading]',
@@ -9,15 +9,13 @@ import * as i0 from "@angular/core";
9
9
  * @hidden
10
10
  */
11
11
  export class LoadingNotificationService {
12
- constructor() {
13
- this.changes = new Subject();
14
- }
12
+ changes = new Subject();
15
13
  notifyLoaded(index) {
16
14
  this.changes.next(index);
17
15
  }
16
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LoadingNotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
17
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LoadingNotificationService });
18
18
  }
19
- LoadingNotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LoadingNotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
20
- LoadingNotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LoadingNotificationService });
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LoadingNotificationService, decorators: [{
19
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LoadingNotificationService, decorators: [{
22
20
  type: Injectable
23
21
  }] });
@@ -11,6 +11,7 @@ import * as i1 from "@progress/kendo-angular-l10n";
11
11
  * Custom component messages override default component messages
12
12
  */
13
13
  export class CustomMessagesComponent extends TreeViewMessages {
14
+ service;
14
15
  constructor(service) {
15
16
  super();
16
17
  this.service = service;
@@ -18,15 +19,15 @@ export class CustomMessagesComponent extends TreeViewMessages {
18
19
  get override() {
19
20
  return true;
20
21
  }
22
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
23
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CustomMessagesComponent, isStandalone: true, selector: "kendo-treeview-messages", providers: [
24
+ {
25
+ provide: TreeViewMessages,
26
+ useExisting: forwardRef(() => CustomMessagesComponent)
27
+ }
28
+ ], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
21
29
  }
22
- CustomMessagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CustomMessagesComponent, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
23
- CustomMessagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: CustomMessagesComponent, isStandalone: true, selector: "kendo-treeview-messages", providers: [
24
- {
25
- provide: TreeViewMessages,
26
- useExisting: forwardRef(() => CustomMessagesComponent)
27
- }
28
- ], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
29
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: CustomMessagesComponent, decorators: [{
30
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CustomMessagesComponent, decorators: [{
30
31
  type: Component,
31
32
  args: [{
32
33
  providers: [
@@ -11,19 +11,20 @@ import * as i1 from "@progress/kendo-angular-l10n";
11
11
  * @hidden
12
12
  */
13
13
  export class LocalizedMessagesDirective extends TreeViewMessages {
14
+ service;
14
15
  constructor(service) {
15
16
  super();
16
17
  this.service = service;
17
18
  }
19
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
20
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: LocalizedMessagesDirective, isStandalone: true, selector: "[kendoTreeViewLocalizedMessages]", providers: [
21
+ {
22
+ provide: TreeViewMessages,
23
+ useExisting: forwardRef(() => LocalizedMessagesDirective)
24
+ }
25
+ ], usesInheritance: true, ngImport: i0 });
18
26
  }
19
- LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
20
- LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: LocalizedMessagesDirective, isStandalone: true, selector: "[kendoTreeViewLocalizedMessages]", providers: [
21
- {
22
- provide: TreeViewMessages,
23
- useExisting: forwardRef(() => LocalizedMessagesDirective)
24
- }
25
- ], usesInheritance: true, ngImport: i0 });
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
27
28
  type: Directive,
28
29
  args: [{
29
30
  providers: [
@@ -9,10 +9,14 @@ import * as i0 from "@angular/core";
9
9
  * @hidden
10
10
  */
11
11
  export class TreeViewMessages extends ComponentMessages {
12
+ /**
13
+ * The text of the `Load More` button title.
14
+ */
15
+ loadMore;
16
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
17
+ 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 });
12
18
  }
13
- TreeViewMessages.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreeViewMessages, deps: null, target: i0.ɵɵFactoryTarget.Directive });
14
- 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 });
15
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: TreeViewMessages, decorators: [{
19
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeViewMessages, decorators: [{
16
20
  type: Directive,
17
21
  args: [{
18
22
  // eslint-disable-next-line @angular-eslint/directive-selector
@@ -24,10 +24,8 @@ const lastVisibleNode = (nodes) => {
24
24
  * @hidden
25
25
  */
26
26
  export class NavigationModel {
27
- constructor() {
28
- this.ib = new IndexBuilderService();
29
- this.nodes = [];
30
- }
27
+ ib = new IndexBuilderService();
28
+ nodes = [];
31
29
  firstVisibleNode() {
32
30
  return (this.nodes || []).find(node => node.visible);
33
31
  }
@@ -14,45 +14,42 @@ import * as i1 from "@progress/kendo-angular-l10n";
14
14
  * @hidden
15
15
  */
16
16
  export class NavigationService {
17
- constructor(localization) {
18
- this.localization = localization;
19
- this.expands = new Subject();
20
- this.moves = new Subject();
21
- this.checks = new Subject();
22
- this.selects = new Subject();
23
- this.deselectAllButCurrentItem = new Subject();
24
- this.loadMore = new Subject();
25
- this.navigable = true;
26
- this.selection = 'single';
27
- this.isTreeViewActive = false;
28
- this.actions = {
29
- [Keys.ArrowUp]: () => this.activate(this.model.findVisiblePrev(this.focusableItem), true),
30
- [Keys.ArrowDown]: () => this.activate(this.model.findVisibleNext(this.focusableItem), true),
31
- [Keys.ArrowLeft]: () => !this.isLoadMoreButton && (this.expand({
32
- expand: this.localization.rtl,
33
- intercept: this.localization.rtl ? this.moveToFirstVisibleChild : this.moveToParent
34
- })),
35
- [Keys.ArrowRight]: () => !this.isLoadMoreButton && (this.expand({
36
- expand: !this.localization.rtl,
37
- intercept: this.localization.rtl ? this.moveToParent : this.moveToFirstVisibleChild
38
- })),
39
- [Keys.Home]: () => this.activate(this.model.firstVisibleNode(), true),
40
- [Keys.End]: () => this.activate(this.model.lastVisibleNode(), true),
41
- [Keys.Enter]: (e) => this.handleEnter(e),
42
- [Keys.Space]: () => this.handleSpace()
43
- };
44
- this.isFocused = false;
45
- this.shouldScroll = false;
46
- this._model = new NavigationModel();
47
- this.moveToFirstVisibleChild = this.moveToFirstVisibleChild.bind(this);
48
- this.moveToParent = this.moveToParent.bind(this);
49
- }
17
+ localization;
18
+ expands = new Subject();
19
+ moves = new Subject();
20
+ checks = new Subject();
21
+ selects = new Subject();
22
+ deselectAllButCurrentItem = new Subject();
23
+ loadMore = new Subject();
24
+ navigable = true;
25
+ selection = 'single';
26
+ isTreeViewActive = false;
50
27
  get model() {
51
28
  return this._model;
52
29
  }
53
30
  set model(model) {
54
31
  this._model = model;
55
32
  }
33
+ actions = {
34
+ [Keys.ArrowUp]: () => this.activate(this.model.findVisiblePrev(this.focusableItem), true),
35
+ [Keys.ArrowDown]: () => this.activate(this.model.findVisibleNext(this.focusableItem), true),
36
+ [Keys.ArrowLeft]: () => !this.isLoadMoreButton && (this.expand({
37
+ expand: this.localization.rtl,
38
+ intercept: this.localization.rtl ? this.moveToFirstVisibleChild : this.moveToParent
39
+ })),
40
+ [Keys.ArrowRight]: () => !this.isLoadMoreButton && (this.expand({
41
+ expand: !this.localization.rtl,
42
+ intercept: this.localization.rtl ? this.moveToParent : this.moveToFirstVisibleChild
43
+ })),
44
+ [Keys.Home]: () => this.activate(this.model.firstVisibleNode(), true),
45
+ [Keys.End]: () => this.activate(this.model.lastVisibleNode(), true),
46
+ [Keys.Enter]: (e) => this.handleEnter(e),
47
+ [Keys.Space]: () => this.handleSpace()
48
+ };
49
+ activeItem;
50
+ isFocused = false;
51
+ shouldScroll = false;
52
+ _model = new NavigationModel();
56
53
  get activeIndex() {
57
54
  return nodeIndex(this.activeItem) || null;
58
55
  }
@@ -65,6 +62,11 @@ export class NavigationService {
65
62
  get focusableItem() {
66
63
  return this.activeItem || this.model.firstFocusableNode();
67
64
  }
65
+ constructor(localization) {
66
+ this.localization = localization;
67
+ this.moveToFirstVisibleChild = this.moveToFirstVisibleChild.bind(this);
68
+ this.moveToParent = this.moveToParent.bind(this);
69
+ }
68
70
  activate(item, shouldScroll = false) {
69
71
  if (!this.navigable || !item || this.isActive(nodeIndex(item))) {
70
72
  return;
@@ -235,9 +237,9 @@ export class NavigationService {
235
237
  this.checkIndex(this.activeIndex);
236
238
  }
237
239
  }
240
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NavigationService, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
241
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NavigationService });
238
242
  }
239
- NavigationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NavigationService, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Injectable });
240
- NavigationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NavigationService });
241
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NavigationService, decorators: [{
243
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NavigationService, decorators: [{
242
244
  type: Injectable
243
245
  }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; } });
@@ -9,15 +9,13 @@ import * as i0 from "@angular/core";
9
9
  * @hidden
10
10
  */
11
11
  export class NodeChildrenService {
12
- constructor() {
13
- this.changes = new Subject();
14
- }
12
+ changes = new Subject();
15
13
  childrenLoaded(item, children) {
16
14
  this.changes.next({ item, children });
17
15
  }
16
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NodeChildrenService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
17
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NodeChildrenService });
18
18
  }
19
- NodeChildrenService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NodeChildrenService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
20
- NodeChildrenService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NodeChildrenService });
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NodeChildrenService, decorators: [{
19
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NodeChildrenService, decorators: [{
22
20
  type: Injectable
23
21
  }] });
@@ -59,13 +59,14 @@ import * as i0 from "@angular/core";
59
59
  * ```
60
60
  */
61
61
  export class NodeTemplateDirective {
62
+ templateRef;
62
63
  constructor(templateRef) {
63
64
  this.templateRef = templateRef;
64
65
  }
66
+ 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 });
67
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: NodeTemplateDirective, isStandalone: true, selector: "[kendoTreeViewNodeTemplate]", ngImport: i0 });
65
68
  }
66
- 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 });
67
- NodeTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: NodeTemplateDirective, isStandalone: true, selector: "[kendoTreeViewNodeTemplate]", ngImport: i0 });
68
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: NodeTemplateDirective, decorators: [{
69
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NodeTemplateDirective, decorators: [{
69
70
  type: Directive,
70
71
  args: [{
71
72
  selector: '[kendoTreeViewNodeTemplate]',
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-treeview',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1729174460,
13
- version: '17.0.0-develop.9',
12
+ publishDate: 1731429728,
13
+ version: '17.0.1-develop.1',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
15
15
  };
@@ -16,37 +16,36 @@ import * as i2 from "../navigation/navigation.service";
16
16
  * ([see example]({% slug selection_treeview %})).
17
17
  */
18
18
  export class SelectDirective {
19
- constructor(treeView, navigationService) {
20
- this.treeView = treeView;
21
- this.navigationService = navigationService;
22
- /**
23
- * Fires when the `selectedKeys` collection was updated.
24
- */
25
- this.selectedKeysChange = new EventEmitter();
26
- this.subscriptions = new Subscription();
27
- this.selectActions = {
28
- 'multiple': (e) => this.selectMultiple(e),
29
- 'single': (e) => this.selectSingle(e)
30
- };
31
- /**
32
- * Reflectes the internal `selectedKeys` state.
33
- */
34
- this.state = new Set();
35
- this.subscriptions.add(this.treeView.selectionChange.subscribe(this.select.bind(this)));
36
- this.treeView.isSelected = (dataItem, index) => (this.state.has(this.itemKey({ dataItem, index })));
37
- this.navigationService.deselectAllButCurrentItem.subscribe((node) => {
38
- this.selectSingle(node);
39
- });
40
- }
19
+ treeView;
20
+ navigationService;
41
21
  /**
42
22
  * @hidden
43
23
  */
44
24
  set isSelected(value) {
45
25
  this.treeView.isSelected = value;
46
26
  }
27
+ /**
28
+ * Defines the item key that will be stored in the `selectedKeys` collection.
29
+ */
30
+ selectKey;
31
+ /**
32
+ * Defines the current selection mode
33
+ * ([see example](slug:selection_treeview#toc-modes)).
34
+ */
35
+ selection;
36
+ /**
37
+ * Defines the collection that will store the selected keys
38
+ * ([see example](slug:selection_treeview#toc-modes)).
39
+ */
40
+ selectedKeys;
41
+ /**
42
+ * Fires when the `selectedKeys` collection was updated.
43
+ */
44
+ selectedKeysChange = new EventEmitter();
47
45
  get getAriaMultiselectable() {
48
46
  return this.options.mode === 'multiple';
49
47
  }
48
+ subscriptions = new Subscription();
50
49
  get options() {
51
50
  const defaultOptions = {
52
51
  enabled: true,
@@ -58,6 +57,27 @@ export class SelectDirective {
58
57
  const selectionSettings = isBoolean(this.selection) ? { enabled: this.selection } : this.selection;
59
58
  return Object.assign(defaultOptions, selectionSettings);
60
59
  }
60
+ selectActions = {
61
+ 'multiple': (e) => this.selectMultiple(e),
62
+ 'single': (e) => this.selectSingle(e)
63
+ };
64
+ /**
65
+ * Reflectes the internal `selectedKeys` state.
66
+ */
67
+ state = new Set();
68
+ /**
69
+ * Holds the last emitted `selectedKeys` collection.
70
+ */
71
+ lastChange;
72
+ constructor(treeView, navigationService) {
73
+ this.treeView = treeView;
74
+ this.navigationService = navigationService;
75
+ this.subscriptions.add(this.treeView.selectionChange.subscribe(this.select.bind(this)));
76
+ this.treeView.isSelected = (dataItem, index) => (this.state.has(this.itemKey({ dataItem, index })));
77
+ this.navigationService.deselectAllButCurrentItem.subscribe((node) => {
78
+ this.selectSingle(node);
79
+ });
80
+ }
61
81
  ngOnChanges(changes) {
62
82
  if (isChanged('selectedKeys', changes, false) && changes['selectedKeys'].currentValue !== this.lastChange) {
63
83
  this.state = new Set(changes['selectedKeys'].currentValue);
@@ -113,10 +133,10 @@ export class SelectDirective {
113
133
  this.lastChange = Array.from(this.state);
114
134
  this.selectedKeysChange.emit(this.lastChange);
115
135
  }
136
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectDirective, deps: [{ token: i1.TreeViewComponent }, { token: i2.NavigationService }], target: i0.ɵɵFactoryTarget.Directive });
137
+ 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 });
116
138
  }
117
- SelectDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SelectDirective, deps: [{ token: i1.TreeViewComponent }, { token: i2.NavigationService }], target: i0.ɵɵFactoryTarget.Directive });
118
- 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 });
119
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SelectDirective, decorators: [{
139
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectDirective, decorators: [{
120
140
  type: Directive,
121
141
  args: [{
122
142
  selector: '[kendoTreeViewSelectable]',
@@ -9,9 +9,8 @@ import * as i0 from "@angular/core";
9
9
  * @hidden
10
10
  */
11
11
  export class SelectionService {
12
- constructor() {
13
- this.changes = new Subject();
14
- }
12
+ changes = new Subject();
13
+ firstIndex;
15
14
  isFirstSelected(index) {
16
15
  return this.firstIndex === index;
17
16
  }
@@ -26,9 +25,9 @@ export class SelectionService {
26
25
  select(index, dataItem) {
27
26
  this.changes.next({ dataItem, index });
28
27
  }
28
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
29
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectionService });
29
30
  }
30
- SelectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SelectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
31
- SelectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SelectionService });
32
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SelectionService, decorators: [{
31
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectionService, decorators: [{
33
32
  type: Injectable
34
33
  }] });