@progress/kendo-angular-treeview 21.4.1-develop.1 → 22.0.0-develop.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/fesm2022/progress-kendo-angular-treeview.mjs +115 -115
  2. package/filtering-base.d.ts +1 -1
  3. package/localization/messages.d.ts +1 -1
  4. package/package.json +11 -19
  5. package/schematics/ngAdd/index.js +4 -4
  6. package/esm2022/check-mode.mjs +0 -5
  7. package/esm2022/check.directive.mjs +0 -334
  8. package/esm2022/checkable-settings.mjs +0 -5
  9. package/esm2022/checkbox/checked-state.mjs +0 -5
  10. package/esm2022/data-bound-component.mjs +0 -19
  11. package/esm2022/data-change-notification.service.mjs +0 -14
  12. package/esm2022/default-callbacks.mjs +0 -36
  13. package/esm2022/directives.mjs +0 -53
  14. package/esm2022/disable.directive.mjs +0 -83
  15. package/esm2022/drag-and-drop/drag-and-drop-editing.directive.mjs +0 -76
  16. package/esm2022/drag-and-drop/drag-and-drop-utils.mjs +0 -270
  17. package/esm2022/drag-and-drop/drag-and-drop.directive.mjs +0 -348
  18. package/esm2022/drag-and-drop/drag-clue/drag-clue-template.directive.mjs +0 -44
  19. package/esm2022/drag-and-drop/drag-clue/drag-clue.component.mjs +0 -132
  20. package/esm2022/drag-and-drop/drag-clue/drag-clue.service.mjs +0 -123
  21. package/esm2022/drag-and-drop/drop-hint/drop-hint-template.directive.mjs +0 -43
  22. package/esm2022/drag-and-drop/drop-hint/drop-hint.component.mjs +0 -102
  23. package/esm2022/drag-and-drop/drop-hint/drop-hint.service.mjs +0 -41
  24. package/esm2022/drag-and-drop/editing-services/drag-and-drop-asset.service.mjs +0 -48
  25. package/esm2022/drag-and-drop/editing-services/flat-editing.service.mjs +0 -141
  26. package/esm2022/drag-and-drop/editing-services/hierarchy-editing.service.mjs +0 -88
  27. package/esm2022/drag-and-drop/models/drop-action.mjs +0 -32
  28. package/esm2022/drag-and-drop/models/drop-position.mjs +0 -22
  29. package/esm2022/drag-and-drop/models/editing-service.mjs +0 -5
  30. package/esm2022/drag-and-drop/models/preventable-event.mjs +0 -25
  31. package/esm2022/drag-and-drop/models/scroll-direction.mjs +0 -12
  32. package/esm2022/drag-and-drop/models/scroll-settings.mjs +0 -5
  33. package/esm2022/drag-and-drop/models/tree-item-filter-state.mjs +0 -5
  34. package/esm2022/drag-and-drop/models/treeitem-add-remove-args.mjs +0 -5
  35. package/esm2022/drag-and-drop/models/treeitem-drag-event.mjs +0 -24
  36. package/esm2022/drag-and-drop/models/treeitem-drag-start-event.mjs +0 -25
  37. package/esm2022/drag-and-drop/models/treeitem-drop-event.mjs +0 -54
  38. package/esm2022/drag-and-drop/models.mjs +0 -14
  39. package/esm2022/expand-state.service.mjs +0 -24
  40. package/esm2022/expand.directive.mjs +0 -226
  41. package/esm2022/expandable-component.mjs +0 -19
  42. package/esm2022/filter-expand-settings.interface.mjs +0 -5
  43. package/esm2022/filter-state.interface.mjs +0 -5
  44. package/esm2022/filtering-base.mjs +0 -92
  45. package/esm2022/flat-binding.directive.mjs +0 -165
  46. package/esm2022/funcs.mjs +0 -9
  47. package/esm2022/hierarchy-binding.directive.mjs +0 -164
  48. package/esm2022/index-builder.service.mjs +0 -33
  49. package/esm2022/index.mjs +0 -31
  50. package/esm2022/load-more/load-more-button-template.directive.mjs +0 -41
  51. package/esm2022/load-more/load-more-request-args.mjs +0 -5
  52. package/esm2022/load-more/load-more-utils.mjs +0 -35
  53. package/esm2022/load-more/load-more.directive.mjs +0 -137
  54. package/esm2022/load-more/load-more.service.mjs +0 -5
  55. package/esm2022/loading-indicator.directive.mjs +0 -69
  56. package/esm2022/loading-notification.service.mjs +0 -21
  57. package/esm2022/localization/custom-messages.component.mjs +0 -54
  58. package/esm2022/localization/localized-messages.directive.mjs +0 -39
  59. package/esm2022/localization/messages.mjs +0 -27
  60. package/esm2022/navigation/navigation-item.interface.mjs +0 -5
  61. package/esm2022/navigation/navigation-model.mjs +0 -152
  62. package/esm2022/navigation/navigation-state.interface.mjs +0 -5
  63. package/esm2022/navigation/navigation.service.mjs +0 -248
  64. package/esm2022/node-children.service.mjs +0 -21
  65. package/esm2022/node-click-event.interface.mjs +0 -5
  66. package/esm2022/node-template.directive.mjs +0 -45
  67. package/esm2022/package-metadata.mjs +0 -16
  68. package/esm2022/progress-kendo-angular-treeview.mjs +0 -8
  69. package/esm2022/selection/select.directive.mjs +0 -174
  70. package/esm2022/selection/selectable-settings.mjs +0 -5
  71. package/esm2022/selection/selection-mode.mjs +0 -5
  72. package/esm2022/selection/selection.service.mjs +0 -33
  73. package/esm2022/size.mjs +0 -5
  74. package/esm2022/treeitem-lookup.interface.mjs +0 -5
  75. package/esm2022/treeitem.interface.mjs +0 -5
  76. package/esm2022/treeview-filter-settings.mjs +0 -12
  77. package/esm2022/treeview-group.component.mjs +0 -759
  78. package/esm2022/treeview-item-content.directive.mjs +0 -82
  79. package/esm2022/treeview-item.directive.mjs +0 -245
  80. package/esm2022/treeview-lookup.service.mjs +0 -89
  81. package/esm2022/treeview.component.mjs +0 -874
  82. package/esm2022/treeview.module.mjs +0 -74
  83. package/esm2022/utils.mjs +0 -301
@@ -1,174 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Directive, EventEmitter, HostBinding, Input, Output } from '@angular/core';
6
- import { TreeViewComponent } from '../treeview.component';
7
- import { isBoolean, isPresent, noop } from '../utils';
8
- import { Subscription } from 'rxjs';
9
- import { isChanged } from '@progress/kendo-angular-common';
10
- import { NavigationService } from '../navigation/navigation.service';
11
- import * as i0 from "@angular/core";
12
- import * as i1 from "../treeview.component";
13
- import * as i2 from "../navigation/navigation.service";
14
- /**
15
- * Manages the in-memory selection state of TreeView nodes
16
- * ([see example](slug:selection_treeview)).
17
- *
18
- * @example
19
- * ```html
20
- * <kendo-treeview
21
- * ...
22
- * kendoTreeViewSelectable
23
- * selectBy="id"
24
- * [(selectedKeys)]="selectedKeys"
25
- * >
26
- * </kendo-treeview>
27
- * ```
28
- *
29
- * @remarks
30
- * Applied to: {@link TreeViewComponent}
31
- */
32
- export class SelectDirective {
33
- treeView;
34
- navigationService;
35
- /**
36
- * @hidden
37
- */
38
- set isSelected(value) {
39
- this.treeView.isSelected = value;
40
- }
41
- /**
42
- * Sets the item key stored in the `selectedKeys` collection.
43
- */
44
- selectKey;
45
- /**
46
- * Sets the current selection mode
47
- * ([see example](slug:selection_treeview)).
48
- */
49
- selection;
50
- /**
51
- * Defines the collection that stores the selected keys
52
- * ([see example](slug:selection_treeview)).
53
- */
54
- selectedKeys;
55
- /**
56
- * Emits when the `selectedKeys` collection updates.
57
- */
58
- selectedKeysChange = new EventEmitter();
59
- get getAriaMultiselectable() {
60
- return this.options.mode === 'multiple';
61
- }
62
- subscriptions = new Subscription();
63
- get options() {
64
- const defaultOptions = {
65
- enabled: true,
66
- mode: 'single'
67
- };
68
- if (!isPresent(this.selection) || typeof this.selection === 'string') {
69
- return defaultOptions;
70
- }
71
- const selectionSettings = isBoolean(this.selection) ? { enabled: this.selection } : this.selection;
72
- return Object.assign(defaultOptions, selectionSettings);
73
- }
74
- selectActions = {
75
- 'multiple': (e) => this.selectMultiple(e),
76
- 'single': (e) => this.selectSingle(e)
77
- };
78
- /**
79
- * Reflects the internal `selectedKeys` state.
80
- */
81
- state = new Set();
82
- /**
83
- * Holds the last emitted `selectedKeys` collection.
84
- */
85
- lastChange;
86
- constructor(treeView, navigationService) {
87
- this.treeView = treeView;
88
- this.navigationService = navigationService;
89
- this.subscriptions.add(this.treeView.selectionChange.subscribe(this.select.bind(this)));
90
- this.treeView.isSelected = (dataItem, index) => (this.state.has(this.itemKey({ dataItem, index })));
91
- this.navigationService.deselectAllButCurrentItem.subscribe((node) => {
92
- this.selectSingle(node);
93
- });
94
- }
95
- ngOnChanges(changes) {
96
- if (isChanged('selectedKeys', changes, false) && changes['selectedKeys'].currentValue !== this.lastChange) {
97
- this.state = new Set(changes['selectedKeys'].currentValue);
98
- }
99
- const isSelectionBooleanTrue = typeof this.selection === 'boolean' && this.selection;
100
- this.navigationService.selection = isSelectionBooleanTrue ? 'single' : this.selection?.mode;
101
- }
102
- ngOnDestroy() {
103
- this.subscriptions.unsubscribe();
104
- }
105
- itemKey(e) {
106
- if (!this.selectKey) {
107
- return e.index;
108
- }
109
- if (typeof this.selectKey === 'string') {
110
- return e.dataItem[this.selectKey];
111
- }
112
- if (typeof this.selectKey === 'function') {
113
- return this.selectKey(e);
114
- }
115
- }
116
- select(e) {
117
- const { enabled, mode } = this.options;
118
- const performSelection = this.selectActions[mode] || noop;
119
- if (!enabled) {
120
- return;
121
- }
122
- performSelection(e);
123
- }
124
- selectSingle(node) {
125
- const key = this.itemKey(node);
126
- if (!this.state.has(key)) {
127
- this.state.clear();
128
- this.state.add(key);
129
- this.notify();
130
- }
131
- }
132
- selectMultiple(node) {
133
- const key = this.itemKey(node);
134
- const isSelected = this.state.has(key);
135
- if (!isPresent(key)) {
136
- return;
137
- }
138
- if (isSelected) {
139
- this.state.delete(key);
140
- }
141
- else {
142
- this.state.add(key);
143
- }
144
- this.notify();
145
- }
146
- notify() {
147
- this.lastChange = Array.from(this.state);
148
- this.selectedKeysChange.emit(this.lastChange);
149
- }
150
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SelectDirective, deps: [{ token: i1.TreeViewComponent }, { token: i2.NavigationService }], target: i0.ɵɵFactoryTarget.Directive });
151
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", 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 });
152
- }
153
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SelectDirective, decorators: [{
154
- type: Directive,
155
- args: [{
156
- selector: '[kendoTreeViewSelectable]',
157
- standalone: true
158
- }]
159
- }], ctorParameters: () => [{ type: i1.TreeViewComponent }, { type: i2.NavigationService }], propDecorators: { isSelected: [{
160
- type: Input
161
- }], selectKey: [{
162
- type: Input,
163
- args: ['selectBy']
164
- }], selection: [{
165
- type: Input,
166
- args: ['kendoTreeViewSelectable']
167
- }], selectedKeys: [{
168
- type: Input
169
- }], selectedKeysChange: [{
170
- type: Output
171
- }], getAriaMultiselectable: [{
172
- type: HostBinding,
173
- args: ['attr.aria-multiselectable']
174
- }] } });
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,33 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Injectable } from '@angular/core';
6
- import { Subject } from "rxjs";
7
- import * as i0 from "@angular/core";
8
- /**
9
- * @hidden
10
- */
11
- export class SelectionService {
12
- changes = new Subject();
13
- firstIndex;
14
- isFirstSelected(index) {
15
- return this.firstIndex === index;
16
- }
17
- setFirstSelected(index, selected) {
18
- if (this.firstIndex === index && selected === false) {
19
- this.firstIndex = null;
20
- }
21
- else if (!this.firstIndex && selected) {
22
- this.firstIndex = index;
23
- }
24
- }
25
- select(index, dataItem) {
26
- this.changes.next({ dataItem, index });
27
- }
28
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SelectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
29
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SelectionService });
30
- }
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SelectionService, decorators: [{
32
- type: Injectable
33
- }] });
package/esm2022/size.mjs DELETED
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export {};
@@ -1,12 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- /**
6
- * @hidden
7
- */
8
- export const DEFAULT_FILTER_SETTINGS = {
9
- operator: 'contains',
10
- ignoreCase: true,
11
- mode: "lenient"
12
- };