@progress/kendo-angular-treelist 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 (272) hide show
  1. package/binding-directives/base-binding.directive.d.ts +1 -1
  2. package/column-menu/column-menu-item-base.d.ts +1 -1
  3. package/columns/column-base.d.ts +1 -1
  4. package/editing-directives/editing-directive-base.d.ts +1 -1
  5. package/editing-directives/row-editing-directive-base.d.ts +1 -1
  6. package/fesm2022/progress-kendo-angular-treelist.mjs +519 -519
  7. package/filtering/base-filter-cell.component.d.ts +1 -1
  8. package/filtering/boolean-filter.component.d.ts +1 -1
  9. package/filtering/date-filter.component.d.ts +1 -1
  10. package/filtering/filter-host.directive.d.ts +1 -1
  11. package/filtering/filter-input-wrapper.component.d.ts +1 -1
  12. package/filtering/numeric-filter.component.d.ts +1 -1
  13. package/filtering/operators/filter-operator.base.d.ts +1 -1
  14. package/filtering/string-filter.component.d.ts +1 -1
  15. package/localization/messages.d.ts +1 -1
  16. package/package.json +23 -31
  17. package/schematics/ngAdd/index.js +3 -3
  18. package/esm2022/binding-directives/base-binding.directive.mjs +0 -180
  19. package/esm2022/binding-directives/data-bound-tree-component.mjs +0 -18
  20. package/esm2022/binding-directives/flat-binding.directive.mjs +0 -130
  21. package/esm2022/binding-directives/hierarchy-binding.directive.mjs +0 -109
  22. package/esm2022/column-menu/column-chooser-item-checked.directive.mjs +0 -45
  23. package/esm2022/column-menu/column-chooser.component.mjs +0 -221
  24. package/esm2022/column-menu/column-list-kb-nav.service.mjs +0 -40
  25. package/esm2022/column-menu/column-list.component.mjs +0 -380
  26. package/esm2022/column-menu/column-locked-change-event.mjs +0 -21
  27. package/esm2022/column-menu/column-menu-autosize-all.component.mjs +0 -78
  28. package/esm2022/column-menu/column-menu-autosize.component.mjs +0 -86
  29. package/esm2022/column-menu/column-menu-chooser.component.mjs +0 -164
  30. package/esm2022/column-menu/column-menu-container.component.mjs +0 -58
  31. package/esm2022/column-menu/column-menu-expandable-item.interface.mjs +0 -5
  32. package/esm2022/column-menu/column-menu-filter.component.mjs +0 -141
  33. package/esm2022/column-menu/column-menu-item-base.mjs +0 -41
  34. package/esm2022/column-menu/column-menu-item-content-template.directive.mjs +0 -43
  35. package/esm2022/column-menu/column-menu-item.component.mjs +0 -329
  36. package/esm2022/column-menu/column-menu-item.directive.mjs +0 -147
  37. package/esm2022/column-menu/column-menu-lock.component.mjs +0 -112
  38. package/esm2022/column-menu/column-menu-settings.interface.mjs +0 -5
  39. package/esm2022/column-menu/column-menu-sort.component.mjs +0 -115
  40. package/esm2022/column-menu/column-menu-template.directive.mjs +0 -47
  41. package/esm2022/column-menu/column-menu.component.mjs +0 -470
  42. package/esm2022/column-menu/column-menu.service.mjs +0 -70
  43. package/esm2022/column-menu/column-visibility-change-event.mjs +0 -19
  44. package/esm2022/column-menu/utils.mjs +0 -44
  45. package/esm2022/column-resizing/column-handle.directive.mjs +0 -226
  46. package/esm2022/column-resizing/column-resize.interface.mjs +0 -5
  47. package/esm2022/column-resizing/column-resizing.service.mjs +0 -143
  48. package/esm2022/column-resizing/table.directive.mjs +0 -130
  49. package/esm2022/columns/checkbox-column.component.mjs +0 -88
  50. package/esm2022/columns/column-base.mjs +0 -319
  51. package/esm2022/columns/column-common.mjs +0 -73
  52. package/esm2022/columns/column-group.component.mjs +0 -115
  53. package/esm2022/columns/column-list.mjs +0 -94
  54. package/esm2022/columns/column.component.mjs +0 -165
  55. package/esm2022/columns/columns-container.mjs +0 -90
  56. package/esm2022/columns/command-column.component.mjs +0 -77
  57. package/esm2022/columns/rowreorder-column.component.mjs +0 -57
  58. package/esm2022/columns/sort-settings.mjs +0 -17
  59. package/esm2022/columns/span-column.component.mjs +0 -201
  60. package/esm2022/common/cell-click-event-args.interface.mjs +0 -5
  61. package/esm2022/common/column-info.service.mjs +0 -54
  62. package/esm2022/common/create-form-group.mjs +0 -5
  63. package/esm2022/common/default-track-by.mjs +0 -13
  64. package/esm2022/common/dom-events.service.mjs +0 -24
  65. package/esm2022/common/error-messages.mjs +0 -15
  66. package/esm2022/common/filter-descriptor-differ.mjs +0 -69
  67. package/esm2022/common/filter-operator.interface.mjs +0 -5
  68. package/esm2022/common/id.service.mjs +0 -34
  69. package/esm2022/common/option-changes.service.mjs +0 -24
  70. package/esm2022/common/pager-settings.mjs +0 -19
  71. package/esm2022/common/preventable-event.mjs +0 -28
  72. package/esm2022/common/provider.service.mjs +0 -34
  73. package/esm2022/common/remove-confirmation.mjs +0 -5
  74. package/esm2022/common/single-popup.service.mjs +0 -132
  75. package/esm2022/common/sort.service.mjs +0 -14
  76. package/esm2022/data/change-event-args.interface.mjs +0 -5
  77. package/esm2022/data/change-notification.service.mjs +0 -30
  78. package/esm2022/data/data-item.interface.mjs +0 -5
  79. package/esm2022/data/data.collection.mjs +0 -503
  80. package/esm2022/data/treelist-item.interface.mjs +0 -5
  81. package/esm2022/directives.mjs +0 -291
  82. package/esm2022/dragdrop/column-reorder-config.mjs +0 -5
  83. package/esm2022/dragdrop/column-reorder-event.mjs +0 -31
  84. package/esm2022/dragdrop/column-reorder.service.mjs +0 -20
  85. package/esm2022/dragdrop/common.mjs +0 -69
  86. package/esm2022/dragdrop/context-types.mjs +0 -5
  87. package/esm2022/dragdrop/drag-and-drop.service.mjs +0 -65
  88. package/esm2022/dragdrop/drag-hint.service.mjs +0 -137
  89. package/esm2022/dragdrop/draggable-column.directive.mjs +0 -141
  90. package/esm2022/dragdrop/drop-cue.service.mjs +0 -46
  91. package/esm2022/dragdrop/drop-target.directive.mjs +0 -71
  92. package/esm2022/editing/add-command-tool.directive.mjs +0 -60
  93. package/esm2022/editing/add-command.directive.mjs +0 -96
  94. package/esm2022/editing/add-event-args.interface.mjs +0 -5
  95. package/esm2022/editing/base-command.directive.mjs +0 -95
  96. package/esm2022/editing/cancel-command.directive.mjs +0 -97
  97. package/esm2022/editing/cancel-event-args.interface.mjs +0 -5
  98. package/esm2022/editing/cell-close-event.mjs +0 -34
  99. package/esm2022/editing/edit-command.directive.mjs +0 -96
  100. package/esm2022/editing/edit-event-args.interface.mjs +0 -5
  101. package/esm2022/editing/edit-template.directive.mjs +0 -45
  102. package/esm2022/editing/edit.service.mjs +0 -174
  103. package/esm2022/editing/remove-command.directive.mjs +0 -96
  104. package/esm2022/editing/remove-event-args.interface.mjs +0 -5
  105. package/esm2022/editing/save-command.directive.mjs +0 -96
  106. package/esm2022/editing/save-event-args.interface.mjs +0 -5
  107. package/esm2022/editing-directives/create-form-group-args.interface.mjs +0 -5
  108. package/esm2022/editing-directives/edit-service.interface.mjs +0 -5
  109. package/esm2022/editing-directives/editing-directive-base.mjs +0 -137
  110. package/esm2022/editing-directives/flat-edit.service.mjs +0 -52
  111. package/esm2022/editing-directives/hierarchy-edit.service.mjs +0 -48
  112. package/esm2022/editing-directives/in-cell-editing.directive.mjs +0 -89
  113. package/esm2022/editing-directives/local-edit.service.mjs +0 -28
  114. package/esm2022/editing-directives/reactive-editing.directive.mjs +0 -61
  115. package/esm2022/editing-directives/row-editing-directive-base.mjs +0 -39
  116. package/esm2022/editing-directives/template-editing.directive.mjs +0 -68
  117. package/esm2022/editing-directives/utils.mjs +0 -41
  118. package/esm2022/excel/excel-command-tool.directive.mjs +0 -64
  119. package/esm2022/excel/excel-command.directive.mjs +0 -97
  120. package/esm2022/excel/excel-export-data.interface.mjs +0 -5
  121. package/esm2022/excel/excel-export-event.mjs +0 -15
  122. package/esm2022/excel/excel.component.mjs +0 -277
  123. package/esm2022/excel/excel.module.mjs +0 -45
  124. package/esm2022/excel/excel.service.mjs +0 -34
  125. package/esm2022/expand-state/expand-event.mjs +0 -30
  126. package/esm2022/expand-state/expand-state.service.mjs +0 -38
  127. package/esm2022/expand-state/expandable-tree-component.mjs +0 -18
  128. package/esm2022/expand-state/expandable.directive.mjs +0 -119
  129. package/esm2022/filtering/base-filter-cell.component.mjs +0 -172
  130. package/esm2022/filtering/boolean-filter.component.mjs +0 -91
  131. package/esm2022/filtering/cell/autocomplete-filter-cell.component.mjs +0 -113
  132. package/esm2022/filtering/cell/boolean-filter-cell.component.mjs +0 -107
  133. package/esm2022/filtering/cell/date-filter-cell.component.mjs +0 -132
  134. package/esm2022/filtering/cell/filter-cell-component.factory.mjs +0 -19
  135. package/esm2022/filtering/cell/filter-cell-host.directive.mjs +0 -33
  136. package/esm2022/filtering/cell/filter-cell-operators.component.mjs +0 -235
  137. package/esm2022/filtering/cell/filter-cell-template.directive.mjs +0 -46
  138. package/esm2022/filtering/cell/filter-cell-wrapper.component.mjs +0 -74
  139. package/esm2022/filtering/cell/filter-cell.component.mjs +0 -91
  140. package/esm2022/filtering/cell/numeric-filter-cell.component.mjs +0 -143
  141. package/esm2022/filtering/cell/string-filter-cell.component.mjs +0 -115
  142. package/esm2022/filtering/date-filter.component.mjs +0 -176
  143. package/esm2022/filtering/filter-component.interface.mjs +0 -5
  144. package/esm2022/filtering/filter-host.directive.mjs +0 -56
  145. package/esm2022/filtering/filter-input-wrapper.component.mjs +0 -119
  146. package/esm2022/filtering/filter-input.directive.mjs +0 -114
  147. package/esm2022/filtering/filter-row.component.mjs +0 -79
  148. package/esm2022/filtering/filter.service.mjs +0 -42
  149. package/esm2022/filtering/filterable.mjs +0 -16
  150. package/esm2022/filtering/menu/boolean-filter-menu.component.mjs +0 -168
  151. package/esm2022/filtering/menu/date-filter-menu-input.component.mjs +0 -174
  152. package/esm2022/filtering/menu/date-filter-menu.component.mjs +0 -207
  153. package/esm2022/filtering/menu/filter-menu-component.factory.mjs +0 -19
  154. package/esm2022/filtering/menu/filter-menu-container.component.mjs +0 -299
  155. package/esm2022/filtering/menu/filter-menu-dropdownlist.directive.mjs +0 -44
  156. package/esm2022/filtering/menu/filter-menu-host.directive.mjs +0 -46
  157. package/esm2022/filtering/menu/filter-menu-input-wrapper.component.mjs +0 -136
  158. package/esm2022/filtering/menu/filter-menu-template.directive.mjs +0 -43
  159. package/esm2022/filtering/menu/filter-menu.component.mjs +0 -202
  160. package/esm2022/filtering/menu/filter-radio-button.directive.mjs +0 -34
  161. package/esm2022/filtering/menu/menu-tabbing.service.mjs +0 -22
  162. package/esm2022/filtering/menu/numeric-filter-menu-input.component.mjs +0 -152
  163. package/esm2022/filtering/menu/numeric-filter-menu.component.mjs +0 -224
  164. package/esm2022/filtering/menu/string-filter-menu-input.component.mjs +0 -105
  165. package/esm2022/filtering/menu/string-filter-menu.component.mjs +0 -183
  166. package/esm2022/filtering/numeric-filter.component.mjs +0 -144
  167. package/esm2022/filtering/operators/after-eq-filter-operator.component.mjs +0 -72
  168. package/esm2022/filtering/operators/after-filter-operator.component.mjs +0 -72
  169. package/esm2022/filtering/operators/before-eq-filter-operator.component.mjs +0 -72
  170. package/esm2022/filtering/operators/before-filter-operator.component.mjs +0 -72
  171. package/esm2022/filtering/operators/contains-filter-operator.component.mjs +0 -64
  172. package/esm2022/filtering/operators/ends-with-filter-operator.component.mjs +0 -64
  173. package/esm2022/filtering/operators/eq-filter-operator.component.mjs +0 -112
  174. package/esm2022/filtering/operators/filter-operator.base.mjs +0 -98
  175. package/esm2022/filtering/operators/gt-filter-operator.component.mjs +0 -63
  176. package/esm2022/filtering/operators/gte-filter-operator.component.mjs +0 -63
  177. package/esm2022/filtering/operators/is-empty-filter-operator.component.mjs +0 -64
  178. package/esm2022/filtering/operators/is-not-empty-filter-operator.component.mjs +0 -64
  179. package/esm2022/filtering/operators/is-not-null-filter-operator.component.mjs +0 -112
  180. package/esm2022/filtering/operators/isnull-filter-operator.component.mjs +0 -112
  181. package/esm2022/filtering/operators/lt-filter-operator.component.mjs +0 -63
  182. package/esm2022/filtering/operators/lte-filter-operator.component.mjs +0 -63
  183. package/esm2022/filtering/operators/neq-filter-operator.component.mjs +0 -112
  184. package/esm2022/filtering/operators/not-contains-filter-operator.component.mjs +0 -64
  185. package/esm2022/filtering/operators/starts-with-filter-operator.component.mjs +0 -64
  186. package/esm2022/filtering/string-filter.component.mjs +0 -89
  187. package/esm2022/index.mjs +0 -146
  188. package/esm2022/layout/browser-support.service.mjs +0 -85
  189. package/esm2022/layout/resizable.directive.mjs +0 -83
  190. package/esm2022/layout/resize.service.mjs +0 -29
  191. package/esm2022/layout/responsive.service.mjs +0 -34
  192. package/esm2022/layout/row-sync.mjs +0 -47
  193. package/esm2022/localization/custom-messages.component.mjs +0 -53
  194. package/esm2022/localization/localized-messages.directive.mjs +0 -39
  195. package/esm2022/localization/messages.mjs +0 -510
  196. package/esm2022/navigation/default-focusable-element.mjs +0 -47
  197. package/esm2022/navigation/focus-group.mjs +0 -105
  198. package/esm2022/navigation/focus-root.mjs +0 -50
  199. package/esm2022/navigation/focusable-element.interface.mjs +0 -5
  200. package/esm2022/navigation/focusable.directive.mjs +0 -174
  201. package/esm2022/navigation/item-map.mjs +0 -59
  202. package/esm2022/navigation/logical-cell.directive.mjs +0 -187
  203. package/esm2022/navigation/logical-cell.interface.mjs +0 -5
  204. package/esm2022/navigation/logical-row.directive.mjs +0 -135
  205. package/esm2022/navigation/logical-row.interface.mjs +0 -5
  206. package/esm2022/navigation/model-cell.mjs +0 -37
  207. package/esm2022/navigation/navigation-cell.interface.mjs +0 -5
  208. package/esm2022/navigation/navigation-change.interface.mjs +0 -5
  209. package/esm2022/navigation/navigation-cursor.mjs +0 -176
  210. package/esm2022/navigation/navigation-metadata.mjs +0 -31
  211. package/esm2022/navigation/navigation-mode.mjs +0 -5
  212. package/esm2022/navigation/navigation-model.mjs +0 -126
  213. package/esm2022/navigation/navigation-row.interface.mjs +0 -5
  214. package/esm2022/navigation/navigation.service.mjs +0 -695
  215. package/esm2022/navigation/treelist-focusable-element.mjs +0 -28
  216. package/esm2022/package-metadata.mjs +0 -16
  217. package/esm2022/pdf/export-element.mjs +0 -129
  218. package/esm2022/pdf/pdf-command-tool.directive.mjs +0 -68
  219. package/esm2022/pdf/pdf-command.directive.mjs +0 -101
  220. package/esm2022/pdf/pdf-export-event.mjs +0 -18
  221. package/esm2022/pdf/pdf-margin.component.mjs +0 -33
  222. package/esm2022/pdf/pdf-margin.interface.mjs +0 -5
  223. package/esm2022/pdf/pdf-template.directive.mjs +0 -45
  224. package/esm2022/pdf/pdf.component.mjs +0 -269
  225. package/esm2022/pdf/pdf.module.mjs +0 -48
  226. package/esm2022/pdf/pdf.service.mjs +0 -40
  227. package/esm2022/pdf/treelist-query.mjs +0 -45
  228. package/esm2022/progress-kendo-angular-treelist.mjs +0 -8
  229. package/esm2022/rendering/cell-template.directive.mjs +0 -49
  230. package/esm2022/rendering/cell.component.mjs +0 -383
  231. package/esm2022/rendering/common/col-group.component.mjs +0 -39
  232. package/esm2022/rendering/common/dom-queries.mjs +0 -158
  233. package/esm2022/rendering/common/field-accessor.pipe.mjs +0 -48
  234. package/esm2022/rendering/common/level-items.pipe.mjs +0 -30
  235. package/esm2022/rendering/common/loading.component.mjs +0 -42
  236. package/esm2022/rendering/common/row-class.mjs +0 -5
  237. package/esm2022/rendering/common/spacer.component.mjs +0 -61
  238. package/esm2022/rendering/constants.mjs +0 -28
  239. package/esm2022/rendering/footer-template.directive.mjs +0 -45
  240. package/esm2022/rendering/header/header-template.directive.mjs +0 -45
  241. package/esm2022/rendering/header/header.component.mjs +0 -978
  242. package/esm2022/rendering/header/select-all-checkbox.directive.mjs +0 -90
  243. package/esm2022/rendering/list.component.mjs +0 -850
  244. package/esm2022/rendering/no-records-template.directive.mjs +0 -40
  245. package/esm2022/rendering/table-body.component.mjs +0 -665
  246. package/esm2022/rendering/toolbar/toolbar-focusable.directive.mjs +0 -77
  247. package/esm2022/rendering/toolbar/toolbar-navigation.service.mjs +0 -54
  248. package/esm2022/rendering/toolbar/toolbar-template.directive.mjs +0 -58
  249. package/esm2022/rendering/toolbar/toolbar.component.mjs +0 -110
  250. package/esm2022/row-reordering/flat-reorder.service.mjs +0 -48
  251. package/esm2022/row-reordering/hierarchical-reorder.service.mjs +0 -55
  252. package/esm2022/row-reordering/row-reorder.service.mjs +0 -273
  253. package/esm2022/row-reordering/types.mjs +0 -5
  254. package/esm2022/row-reordering/utils.mjs +0 -128
  255. package/esm2022/scrolling/content-scroll-event.mjs +0 -5
  256. package/esm2022/scrolling/row-height.service.mjs +0 -30
  257. package/esm2022/scrolling/scroll-bottom-event.mjs +0 -5
  258. package/esm2022/scrolling/scroll-request.service.mjs +0 -21
  259. package/esm2022/scrolling/scroll-sync.service.mjs +0 -80
  260. package/esm2022/scrolling/scroller.service.mjs +0 -112
  261. package/esm2022/scrolling/scrollmode.mjs +0 -5
  262. package/esm2022/scrolling/suspend.service.mjs +0 -17
  263. package/esm2022/selection/is-selected.mjs +0 -5
  264. package/esm2022/selection/marquee.directive.mjs +0 -196
  265. package/esm2022/selection/selectable-settings.mjs +0 -5
  266. package/esm2022/selection/selectable.directive.mjs +0 -223
  267. package/esm2022/selection/selection-change-event.mjs +0 -28
  268. package/esm2022/selection/selection-state.mjs +0 -104
  269. package/esm2022/selection/selection.service.mjs +0 -264
  270. package/esm2022/treelist.component.mjs +0 -3111
  271. package/esm2022/treelist.module.mjs +0 -183
  272. package/esm2022/utils.mjs +0 -113
@@ -1,137 +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 { Input, Directive } from '@angular/core';
6
- import { Subscription, Observable, merge } from 'rxjs';
7
- import { take } from 'rxjs/operators';
8
- import { TreeListComponent } from '../treelist.component';
9
- import * as i0 from "@angular/core";
10
- import * as i1 from "../treelist.component";
11
- /**
12
- * @hidden
13
- */
14
- export class EditingDirectiveBase {
15
- treelist;
16
- /**
17
- * The edit service that handles the operations.
18
- */
19
- set editService(value) {
20
- this.userEditService = value;
21
- }
22
- get editService() {
23
- return this.userEditService || this.defaultEditService;
24
- }
25
- /**
26
- * Gets or sets a function that determines the unique identifier
27
- * for new items. The function receives the `item` and its `parent` as parameters
28
- * and must return an ID.
29
- */
30
- set newItemId(callback) {
31
- this.idCallback = callback;
32
- }
33
- get newItemId() {
34
- return this.idCallback;
35
- }
36
- /**
37
- * A function that confirms if the `dataItem` will be removed.
38
- */
39
- removeConfirmation;
40
- subscriptions = new Subscription();
41
- userEditService;
42
- isNew;
43
- parent;
44
- dataItem;
45
- idCallback;
46
- constructor(treelist) {
47
- this.treelist = treelist;
48
- }
49
- /**
50
- * @hidden
51
- */
52
- ngOnInit() {
53
- this.subscriptions.add(this.treelist.add.subscribe(this.addHandler.bind(this)));
54
- this.subscriptions.add(this.treelist.remove.subscribe(this.removeHandler.bind(this)));
55
- this.subscriptions.add(this.treelist.cancel.subscribe(this.cancelHandler.bind(this)));
56
- this.subscriptions.add(this.treelist.save.subscribe(this.saveHandler.bind(this)));
57
- this.subscriptions.add(merge(this.treelist.dataStateChange, this.treelist.pageChange).subscribe(this.onStateChange.bind(this)));
58
- }
59
- /**
60
- * @hidden
61
- */
62
- ngOnDestroy() {
63
- this.subscriptions.unsubscribe();
64
- }
65
- get defaultEditService() {
66
- return this.treelist.localEditService;
67
- }
68
- addHandler({ parent }) {
69
- this.parent = parent;
70
- this.isNew = true;
71
- if (parent) {
72
- this.treelist.expand(parent);
73
- }
74
- this.treelist.addRow(this.createModel({ isNew: true }), parent);
75
- }
76
- saveHandler(args) {
77
- const item = this.saveModel(args);
78
- if (item) {
79
- if (args.isNew) {
80
- this.editService.create(item, args.parent, this.idCallback ? this.idCallback(item, args.parent) : null);
81
- }
82
- else {
83
- this.editService.update(item);
84
- }
85
- }
86
- this.treelist.closeRow(args.dataItem, args.isNew);
87
- }
88
- cancelHandler(args) {
89
- this.closeEditor(args);
90
- }
91
- removeHandler({ dataItem, parent }) {
92
- const removeItem = (shouldRemove) => {
93
- if (shouldRemove) {
94
- this.editService.remove(dataItem, parent);
95
- }
96
- };
97
- if (this.removeConfirmation) {
98
- const result = this.removeConfirmation(dataItem, parent);
99
- if (result instanceof Promise) {
100
- result.then(removeItem);
101
- }
102
- else if (result instanceof Observable) {
103
- result.pipe(take(1)).subscribe(removeItem);
104
- }
105
- else {
106
- removeItem(result);
107
- }
108
- }
109
- else {
110
- removeItem(true);
111
- }
112
- }
113
- closeEditor(args = { dataItem: this.dataItem, isNew: this.isNew }) {
114
- this.treelist.closeRow(args.dataItem, args.isNew);
115
- this.clean();
116
- }
117
- clean() {
118
- this.isNew = false;
119
- this.dataItem = null;
120
- this.parent = null;
121
- }
122
- onStateChange() {
123
- this.closeEditor();
124
- }
125
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditingDirectiveBase, deps: [{ token: i1.TreeListComponent }], target: i0.ɵɵFactoryTarget.Directive });
126
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: EditingDirectiveBase, inputs: { editService: "editService", newItemId: "newItemId", removeConfirmation: "removeConfirmation" }, ngImport: i0 });
127
- }
128
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditingDirectiveBase, decorators: [{
129
- type: Directive,
130
- args: [{}]
131
- }], ctorParameters: () => [{ type: i1.TreeListComponent }], propDecorators: { editService: [{
132
- type: Input
133
- }], newItemId: [{
134
- type: Input
135
- }], removeConfirmation: [{
136
- type: Input
137
- }] } });
@@ -1,52 +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 { LocalEditService } from './local-edit.service';
6
- import { guid } from '@progress/kendo-angular-common';
7
- import { isPresent } from '../utils';
8
- import { insertNewItem } from './utils';
9
- /**
10
- * @hidden
11
- */
12
- export class FlatEditService extends LocalEditService {
13
- bindingDirective;
14
- constructor(bindingDirective) {
15
- super();
16
- this.bindingDirective = bindingDirective;
17
- }
18
- create(item, parent, id) {
19
- const { idGetter, idSetter, parentIdSetter, originalData, component } = this.bindingDirective;
20
- idSetter(item, isPresent(id) ? id : guid());
21
- if (parent) {
22
- parentIdSetter(item, idGetter(parent));
23
- }
24
- insertNewItem(item, originalData, component, parent);
25
- this.bindingDirective.rebind();
26
- }
27
- update(_item) {
28
- this.bindingDirective.rebind();
29
- }
30
- remove(item, _parent) {
31
- const { idGetter, parentIdGetter, originalData } = this.bindingDirective;
32
- const toRemove = [item];
33
- while (toRemove.length) {
34
- const current = toRemove.shift();
35
- const id = idGetter(current);
36
- let itemIndex = -1;
37
- for (let idx = 0; idx < originalData.length; idx++) {
38
- const dataItem = originalData[idx];
39
- if (itemIndex === -1 && idGetter(dataItem) === id) {
40
- itemIndex = idx;
41
- }
42
- if (parentIdGetter(dataItem) === id) {
43
- toRemove.push(dataItem);
44
- }
45
- }
46
- if (itemIndex >= 0) {
47
- originalData.splice(itemIndex, 1);
48
- }
49
- }
50
- this.bindingDirective.rebind();
51
- }
52
- }
@@ -1,48 +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 { LocalEditService } from './local-edit.service';
6
- import { insertNewItem } from './utils';
7
- /**
8
- * @hidden
9
- */
10
- export class HierarchyEditService extends LocalEditService {
11
- bindingDirective;
12
- constructor(bindingDirective) {
13
- super();
14
- this.bindingDirective = bindingDirective;
15
- }
16
- create(item, parent, _id) {
17
- const { childrenGetter, childrenSetter, originalData, component } = this.bindingDirective;
18
- if (parent) {
19
- const children = childrenGetter(parent);
20
- if (children) {
21
- children.unshift(item);
22
- }
23
- else {
24
- childrenSetter(parent, [item]);
25
- }
26
- }
27
- else {
28
- insertNewItem(item, originalData, component);
29
- }
30
- this.bindingDirective.rebind();
31
- }
32
- update(_item) {
33
- this.bindingDirective.rebind();
34
- }
35
- remove(item, parent) {
36
- const idGetter = this.bindingDirective.component.idGetter; // refactor provide idGetter via context service
37
- const { childrenGetter, originalData } = this.bindingDirective;
38
- const children = parent ? childrenGetter(parent) : originalData;
39
- if (children && children.length) {
40
- const id = idGetter(item);
41
- const index = children.findIndex(i => idGetter(i) === id);
42
- if (index >= 0) {
43
- children.splice(index, 1);
44
- this.bindingDirective.rebind();
45
- }
46
- }
47
- }
48
- }
@@ -1,89 +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, Input } from '@angular/core';
6
- import { EditingDirectiveBase } from './editing-directive-base';
7
- import { TreeListComponent } from '../treelist.component';
8
- import { markAllAsTouched } from './utils';
9
- import * as i0 from "@angular/core";
10
- import * as i1 from "../treelist.component";
11
- /**
12
- * A directive that encapsulates the editing operations of the TreeList when using the in-cell
13
- * editing with Reactive Forms. [See example](slug:editing_directives_treelist#toc-in-cell-editing-directive).
14
- *
15
- * @example
16
- * ```html
17
- * <kendo-treelist [kendoTreeListInCellEditing]="createFormGroup">
18
- * <kendo-treelist-column field="name" title="Name"></kendo-treelist-column>
19
- * <kendo-treelist-column field="age" title="Age"></kendo-treelist-column>
20
- * </kendo-treelist>
21
- * ```
22
- * @remarks
23
- * Applied to: {@link TreeListComponent}.
24
- */
25
- export class InCellEditingDirective extends EditingDirectiveBase {
26
- treelist;
27
- /**
28
- * The function that creates the `FormGroup` for the edited model.
29
- */
30
- createFormGroup;
31
- constructor(treelist) {
32
- super(treelist);
33
- this.treelist = treelist;
34
- }
35
- // Need mixin
36
- createModel(args) {
37
- return this.createFormGroup(args);
38
- }
39
- saveModel({ dataItem, formGroup, isNew }) {
40
- if (!formGroup.dirty && !isNew) {
41
- return;
42
- }
43
- if (formGroup.valid) {
44
- this.editService.assignValues(dataItem, formGroup.value);
45
- return dataItem;
46
- }
47
- markAllAsTouched(formGroup);
48
- }
49
- /**
50
- * @hidden
51
- */
52
- ngOnInit() {
53
- super.ngOnInit();
54
- this.subscriptions.add(this.treelist.cellClick.subscribe(this.cellClickHandler.bind(this)));
55
- this.subscriptions.add(this.treelist.cellClose.subscribe(this.cellCloseHandler.bind(this)));
56
- }
57
- removeHandler(args) {
58
- super.removeHandler(args);
59
- this.treelist.cancelCell();
60
- }
61
- cellClickHandler(args) {
62
- if (!args.isEdited && args.type === 'click') {
63
- this.treelist.editCell(args.dataItem, args.columnIndex, this.createFormGroup(args));
64
- }
65
- }
66
- cellCloseHandler(args) {
67
- const { formGroup, dataItem } = args;
68
- if (!formGroup.valid) {
69
- args.preventDefault();
70
- }
71
- else if (formGroup.dirty) {
72
- this.editService.assignValues(dataItem, formGroup.value);
73
- this.editService.update(dataItem);
74
- }
75
- }
76
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InCellEditingDirective, deps: [{ token: i1.TreeListComponent }], target: i0.ɵɵFactoryTarget.Directive });
77
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: InCellEditingDirective, isStandalone: true, selector: "[kendoTreeListInCellEditing]", inputs: { createFormGroup: ["kendoTreeListInCellEditing", "createFormGroup"] }, exportAs: ["kendoTreeListInCellEditing"], usesInheritance: true, ngImport: i0 });
78
- }
79
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: InCellEditingDirective, decorators: [{
80
- type: Directive,
81
- args: [{
82
- exportAs: 'kendoTreeListInCellEditing',
83
- selector: '[kendoTreeListInCellEditing]',
84
- standalone: true
85
- }]
86
- }], ctorParameters: () => [{ type: i1.TreeListComponent }], propDecorators: { createFormGroup: [{
87
- type: Input,
88
- args: ['kendoTreeListInCellEditing']
89
- }] } });
@@ -1,28 +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 { isDevMode } from '@angular/core';
6
- /**
7
- * @hidden
8
- */
9
- export class LocalEditService {
10
- create(_item, _parent, _id) {
11
- this.throwUnsupportedError();
12
- }
13
- update(_item) {
14
- // noop
15
- }
16
- remove(_item) {
17
- this.throwUnsupportedError();
18
- }
19
- assignValues(target, source) {
20
- Object.assign(target, source);
21
- }
22
- throwUnsupportedError() {
23
- if (isDevMode()) {
24
- throw new Error('The default edit service of the editing directives can only update the items.' +
25
- 'Please provide an editService.');
26
- }
27
- }
28
- }
@@ -1,61 +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, Input } from '@angular/core';
6
- import { RowEditingDirectiveBase } from './row-editing-directive-base';
7
- import { TreeListComponent } from '../treelist.component';
8
- import { markAllAsTouched } from './utils';
9
- import * as i0 from "@angular/core";
10
- import * as i1 from "../treelist.component";
11
- /**
12
- * A directive that encapsulates the editing operations of the TreeList when using the
13
- * Reactive Forms. [See example](slug:editing_directives_treelist#toc-reactive-editing-directive).
14
- *
15
- * @example
16
- * ```html
17
- * <kendo-treelist [kendoTreeListReactiveEditing]="createFormGroup">
18
- * <kendo-treelist-column field="name" title="Name"></kendo-treelist-column>
19
- * <kendo-treelist-column field="age" title="Age"></kendo-treelist-column>
20
- * </kendo-treelist>
21
- * ```
22
- * @remarks
23
- * Applied to: {@link TreeListComponent}.
24
- */
25
- export class ReactiveEditingDirective extends RowEditingDirectiveBase {
26
- treelist;
27
- /**
28
- * The function that creates the `FormGroup` for the edited model.
29
- */
30
- createFormGroup;
31
- constructor(treelist) {
32
- super(treelist);
33
- this.treelist = treelist;
34
- }
35
- createModel(args) {
36
- return this.createFormGroup(args);
37
- }
38
- saveModel({ dataItem, formGroup, isNew }) {
39
- if (!formGroup.dirty && !isNew) {
40
- return;
41
- }
42
- if (formGroup.valid) {
43
- this.editService.assignValues(dataItem, formGroup.value);
44
- return dataItem;
45
- }
46
- markAllAsTouched(formGroup);
47
- }
48
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ReactiveEditingDirective, deps: [{ token: i1.TreeListComponent }], target: i0.ɵɵFactoryTarget.Directive });
49
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ReactiveEditingDirective, isStandalone: true, selector: "[kendoTreeListReactiveEditing]", inputs: { createFormGroup: ["kendoTreeListReactiveEditing", "createFormGroup"] }, exportAs: ["kendoTreeListReactiveEditing"], usesInheritance: true, ngImport: i0 });
50
- }
51
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ReactiveEditingDirective, decorators: [{
52
- type: Directive,
53
- args: [{
54
- exportAs: 'kendoTreeListReactiveEditing',
55
- selector: '[kendoTreeListReactiveEditing]',
56
- standalone: true
57
- }]
58
- }], ctorParameters: () => [{ type: i1.TreeListComponent }], propDecorators: { createFormGroup: [{
59
- type: Input,
60
- args: ['kendoTreeListReactiveEditing']
61
- }] } });
@@ -1,39 +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 } from '@angular/core';
6
- import { EditingDirectiveBase } from './editing-directive-base';
7
- import * as i0 from "@angular/core";
8
- /**
9
- * @hidden
10
- */
11
- export class RowEditingDirectiveBase extends EditingDirectiveBase {
12
- /**
13
- * @hidden
14
- */
15
- ngOnInit() {
16
- super.ngOnInit();
17
- this.subscriptions
18
- .add(this.treelist.edit.subscribe(this.editHandler.bind(this)));
19
- }
20
- addHandler(args) {
21
- this.closeEditor();
22
- super.addHandler(args);
23
- }
24
- editHandler(args) {
25
- this.closeEditor();
26
- this.dataItem = args.dataItem;
27
- this.treelist.editRow(args.dataItem, this.createModel(args));
28
- }
29
- saveHandler(args) {
30
- super.saveHandler(args);
31
- this.clean();
32
- }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RowEditingDirectiveBase, deps: null, target: i0.ɵɵFactoryTarget.Directive });
34
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: RowEditingDirectiveBase, usesInheritance: true, ngImport: i0 });
35
- }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RowEditingDirectiveBase, decorators: [{
37
- type: Directive,
38
- args: [{}]
39
- }] });
@@ -1,68 +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, Input } from '@angular/core';
6
- import { RowEditingDirectiveBase } from './row-editing-directive-base';
7
- import { TreeListComponent } from '../treelist.component';
8
- import * as i0 from "@angular/core";
9
- import * as i1 from "../treelist.component";
10
- /**
11
- * A directive that encapsulates the editing operations of the TreeList when using
12
- * Template-Driven Angular Forms. [See example](slug:editing_directives_treelist#toc-template-editing-directive).
13
- *
14
- * @example
15
- * ```html
16
- * <kendo-treelist [kendoTreeListTemplateEditing]="createNewItem">
17
- * <kendo-treelist-column field="name" title="Name"></kendo-treelist-column>
18
- * <kendo-treelist-column field="age" title="Age"></kendo-treelist-column>
19
- * </kendo-treelist>
20
- * ```
21
- * @remarks
22
- * Applied to: {@link TreeListComponent}.
23
- */
24
- export class TemplateEditingDirective extends RowEditingDirectiveBase {
25
- treelist;
26
- /**
27
- * The function that creates the `dataItem` for new rows.
28
- */
29
- createNewItem;
30
- originalValues;
31
- constructor(treelist) {
32
- super(treelist);
33
- this.treelist = treelist;
34
- }
35
- editHandler(args) {
36
- super.editHandler(args);
37
- this.dataItem = args.dataItem;
38
- this.originalValues = {};
39
- this.editService.assignValues(this.originalValues, this.dataItem);
40
- }
41
- closeEditor(args) {
42
- if (this.dataItem) {
43
- this.editService.assignValues(this.dataItem, this.originalValues);
44
- }
45
- super.closeEditor(args);
46
- }
47
- createModel(args) {
48
- if (args.isNew) {
49
- return this.createNewItem();
50
- }
51
- }
52
- saveModel(args) {
53
- return args.dataItem;
54
- }
55
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TemplateEditingDirective, deps: [{ token: i1.TreeListComponent }], target: i0.ɵɵFactoryTarget.Directive });
56
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: TemplateEditingDirective, isStandalone: true, selector: "[kendoTreeListTemplateEditing]", inputs: { createNewItem: ["kendoTreeListTemplateEditing", "createNewItem"] }, exportAs: ["kendoTreeListTemplateEditing"], usesInheritance: true, ngImport: i0 });
57
- }
58
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TemplateEditingDirective, decorators: [{
59
- type: Directive,
60
- args: [{
61
- exportAs: 'kendoTreeListTemplateEditing',
62
- selector: '[kendoTreeListTemplateEditing]',
63
- standalone: true
64
- }]
65
- }], ctorParameters: () => [{ type: i1.TreeListComponent }], propDecorators: { createNewItem: [{
66
- type: Input,
67
- args: ['kendoTreeListTemplateEditing']
68
- }] } });
@@ -1,41 +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 markAllAsTouched = (control) => {
9
- control.markAsTouched();
10
- if (control.hasOwnProperty('controls')) {
11
- const controls = control.controls;
12
- for (const inner in controls) {
13
- if (controls.hasOwnProperty(inner)) {
14
- markAllAsTouched(controls[inner]);
15
- }
16
- }
17
- }
18
- };
19
- /**
20
- * @hidden
21
- */
22
- export const insertNewItem = (newItem, originalData, treelist, parent) => {
23
- let insertAt = 0;
24
- if (!parent && treelist.skip) {
25
- let firstItem = treelist.view.find(item => item.type === 'data' && !item.isNew);
26
- let firstRootItem = firstItem;
27
- let firstOffset = 0;
28
- if (firstItem.level > 0) {
29
- while (firstItem.level > 0) {
30
- firstItem = firstItem.parent;
31
- }
32
- firstRootItem = firstItem;
33
- firstOffset = 1;
34
- }
35
- const firstIndex = originalData.indexOf(firstRootItem.data);
36
- if (firstIndex > 0) {
37
- insertAt = firstIndex + firstOffset;
38
- }
39
- }
40
- originalData.splice(insertAt, 0, newItem);
41
- };
@@ -1,64 +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 } from '@angular/core';
6
- import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
7
- import { Subscription } from 'rxjs';
8
- import { fileExcelIcon } from '@progress/kendo-svg-icons';
9
- import { ExcelService } from './excel.service';
10
- import * as i0 from "@angular/core";
11
- import * as i1 from "./excel.service";
12
- import * as i2 from "@progress/kendo-angular-toolbar";
13
- /**
14
- * Represents the `export-to-Excel` toolbar tool of the TreeList. Apply this directive to any `kendo-toolbar-button` element inside a ToolbarComponent used in the TreeList.
15
- *
16
- * When the user clicks a button with this directive, the [excelExport]({% slug api_treelist_treelistcomponent %}#toc-excelexport) event fires ([see example]({% slug excelexport_treelist %})).
17
- *
18
- * @example
19
- * ```html
20
- * <kendo-treelist>
21
- * <kendo-toolbar>
22
- * <kendo-toolbar-button text="Excel Export" kendoTreeListExcelTool></kendo-toolbar-button>
23
- * </kendo-toolbar>
24
- * <kendo-treelist-excel fileName="TreeList.xlsx">
25
- * </kendo-treelist-excel>
26
- * </kendo-treelist>
27
- * ```
28
- * @remarks
29
- * Applied to: {@link ToolBarButtonComponent}
30
- */
31
- export class ExcelCommandToolbarDirective {
32
- excelService;
33
- host;
34
- clickSub = new Subscription();
35
- constructor(excelService, host) {
36
- this.excelService = excelService;
37
- this.host = host;
38
- }
39
- ngOnInit() {
40
- this.clickSub = this.host.click.subscribe(e => this.onClick(e));
41
- this.host.className = 'k-grid-excel';
42
- this.host.svgIcon = fileExcelIcon;
43
- this.host.icon = 'file-excel';
44
- }
45
- ngOnDestroy() {
46
- this.clickSub.unsubscribe();
47
- }
48
- /**
49
- * @hidden
50
- */
51
- onClick(e) {
52
- e.preventDefault();
53
- this.excelService.exportClick.emit();
54
- }
55
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ExcelCommandToolbarDirective, deps: [{ token: i1.ExcelService }, { token: i2.ToolBarButtonComponent }], target: i0.ɵɵFactoryTarget.Directive });
56
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ExcelCommandToolbarDirective, isStandalone: true, selector: "[kendoTreeListExcelTool]", ngImport: i0 });
57
- }
58
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ExcelCommandToolbarDirective, decorators: [{
59
- type: Directive,
60
- args: [{
61
- selector: '[kendoTreeListExcelTool]',
62
- standalone: true
63
- }]
64
- }], ctorParameters: () => [{ type: i1.ExcelService }, { type: i2.ToolBarButtonComponent }] });