@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,3111 +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
- /* eslint-disable @typescript-eslint/no-explicit-any */
6
- import { Component, ContentChildren, ElementRef, EventEmitter, HostBinding, Input, Output, Renderer2, QueryList, ViewChild, isDevMode, NgZone, ViewChildren, ChangeDetectorRef, ViewEncapsulation, ChangeDetectionStrategy, forwardRef } from '@angular/core';
7
- import { NgTemplateOutlet } from '@angular/common';
8
- import { FormControl, FormGroup } from '@angular/forms';
9
- import { Subscription, merge, isObservable } from 'rxjs';
10
- import { map, tap, take, filter, switchMap, takeUntil } from 'rxjs/operators';
11
- import { validatePackage } from '@progress/kendo-licensing';
12
- import { L10N_PREFIX, LocalizationService } from '@progress/kendo-angular-l10n';
13
- import { guid, DraggableDirective } from '@progress/kendo-angular-common';
14
- import { DragTargetContainerDirective, DropTargetContainerDirective } from '@progress/kendo-angular-utils';
15
- import { IconWrapperComponent } from '@progress/kendo-angular-icons';
16
- import { packageMetadata } from './package-metadata';
17
- import { ColumnComponent, isColumnComponent } from './columns/column.component';
18
- import { isSpanColumnComponent } from './columns/span-column.component';
19
- import { isColumnGroupComponent, ColumnGroupComponent } from './columns/column-group.component';
20
- import { isArray, anyChanged, isChanged, isPresent, isUniversal, observe, isTruthy, createPromise, hasObservers } from './utils';
21
- import { BrowserSupportService } from './layout/browser-support.service';
22
- import { ViewCollection } from './data/data.collection';
23
- import { EditService } from './editing/edit.service';
24
- import { ColumnsContainer } from './columns/columns-container';
25
- import { ChangeNotificationService } from './data/change-notification.service';
26
- import { NoRecordsTemplateDirective } from './rendering/no-records-template.directive';
27
- import { ColumnBase } from './columns/column-base';
28
- import { syncRowsHeight } from './layout/row-sync';
29
- import { FilterService } from './filtering/filter.service';
30
- import { PDFService } from './pdf/pdf.service';
31
- import { PDFExportEvent } from './pdf/pdf-export-event';
32
- import { SuspendService } from './scrolling/suspend.service';
33
- import { ResponsiveService } from "./layout/responsive.service";
34
- import { ExcelService } from './excel/excel.service';
35
- import { ColumnList } from './columns/column-list';
36
- import { ToolbarTemplateDirective } from "./rendering/toolbar/toolbar-template.directive";
37
- import { expandColumns, expandColumnsWithSpan, isValidFieldName } from "./columns/column-common";
38
- import { ScrollSyncService } from "./scrolling/scroll-sync.service";
39
- import { ResizeService } from "./layout/resize.service";
40
- import { closest, matchesClasses, matchesNodeName } from './rendering/common/dom-queries';
41
- import { DomEventsService } from './common/dom-events.service';
42
- import { ColumnResizingService } from "./column-resizing/column-resizing.service";
43
- import { hasFilterRow } from './filtering/filterable';
44
- import { SinglePopupService } from './common/single-popup.service';
45
- import { DragAndDropService } from './dragdrop/drag-and-drop.service';
46
- import { DragHintService } from './dragdrop/drag-hint.service';
47
- import { DropCueService } from './dragdrop/drop-cue.service';
48
- import { ColumnReorderService } from './dragdrop/column-reorder.service';
49
- import { ColumnReorderEvent } from './dragdrop/column-reorder-event';
50
- import { FocusRoot } from './navigation/focus-root';
51
- import { NavigationService } from './navigation/navigation.service';
52
- import { NavigationMetadata } from './navigation/navigation-metadata';
53
- import { IdService } from './common/id.service';
54
- import { ColumnInfoService } from "./common/column-info.service";
55
- import { ScrollRequestService } from './scrolling/scroll-request.service';
56
- import { SortService } from './common/sort.service';
57
- import { ColumnMenuTemplateDirective } from './column-menu/column-menu-template.directive';
58
- import { ColumnVisibilityChangeEvent } from './column-menu/column-visibility-change-event';
59
- import { ColumnLockedChangeEvent } from './column-menu/column-locked-change-event';
60
- import { sortColumns } from './columns/column-common';
61
- import { defaultTrackBy } from './common/default-track-by';
62
- import { ExpandStateService, defaultExpanded } from './expand-state/expand-state.service';
63
- import { getter } from '@progress/kendo-common';
64
- import { LocalEditService } from './editing-directives/local-edit.service';
65
- import { OptionChangesService } from "./common/option-changes.service";
66
- import { SelectionService } from './selection/selection.service';
67
- import { DataBoundTreeComponent } from './binding-directives/data-bound-tree-component';
68
- import { ExpandableTreeComponent } from './expand-state/expandable-tree-component';
69
- import { ContextService } from './common/provider.service';
70
- import { RowReorderService } from './row-reordering/row-reorder.service';
71
- import { LoadingComponent } from './rendering/common/loading.component';
72
- import { TableBodyComponent } from './rendering/table-body.component';
73
- import { MarqueeDirective } from './selection/marquee.directive';
74
- import { ListComponent } from './rendering/list.component';
75
- import { ResizableContainerDirective } from './layout/resizable.directive';
76
- import { HeaderComponent } from './rendering/header/header.component';
77
- import { ColGroupComponent } from './rendering/common/col-group.component';
78
- import { TableDirective } from './column-resizing/table.directive';
79
- import { ToolbarComponent } from './rendering/toolbar/toolbar.component';
80
- import { LocalizedMessagesDirective } from './localization/localized-messages.directive';
81
- import { KENDO_PAGER, PagerContextService, PagerNavigationService, PagerTemplateDirective } from '@progress/kendo-angular-pager';
82
- import { normalize } from './common/pager-settings';
83
- import * as i0 from "@angular/core";
84
- import * as i1 from "./layout/browser-support.service";
85
- import * as i2 from "./data/change-notification.service";
86
- import * as i3 from "./editing/edit.service";
87
- import * as i4 from "./filtering/filter.service";
88
- import * as i5 from "./pdf/pdf.service";
89
- import * as i6 from "./layout/responsive.service";
90
- import * as i7 from "./excel/excel.service";
91
- import * as i8 from "./scrolling/scroll-sync.service";
92
- import * as i9 from "./common/dom-events.service";
93
- import * as i10 from "./column-resizing/column-resizing.service";
94
- import * as i11 from "./dragdrop/column-reorder.service";
95
- import * as i12 from "./common/column-info.service";
96
- import * as i13 from "./navigation/navigation.service";
97
- import * as i14 from "./common/sort.service";
98
- import * as i15 from "./scrolling/scroll-request.service";
99
- import * as i16 from "./expand-state/expand-state.service";
100
- import * as i17 from "./common/option-changes.service";
101
- import * as i18 from "./selection/selection.service";
102
- import * as i19 from "@progress/kendo-angular-l10n";
103
- import * as i20 from "./common/provider.service";
104
- import * as i21 from "./row-reordering/row-reorder.service";
105
- import * as i22 from "@progress/kendo-angular-pager";
106
- const createControl = (source) => (acc, key) => {
107
- acc[key] = new FormControl(source[key]);
108
- return acc;
109
- };
110
- const validateColumnsField = (columns) => expandColumns(columns.toArray())
111
- .filter(isColumnComponent)
112
- .filter(({ field }) => !isValidFieldName(field))
113
- .forEach(({ field }) => console.warn(`
114
- TreeList column field name '${field}' does not look like a valid JavaScript identifier.
115
- Identifiers can contain only alphanumeric characters (including "$" or "_"), and may not start with a digit.
116
- Please use only valid identifier names to ensure error-free operation.
117
- `));
118
- const isInEditedCell = (element, treelistElement) => closest(element, matchesClasses('k-grid-edit-cell')) &&
119
- closest(element, matchesNodeName('kendo-treelist')) === treelistElement;
120
- /**
121
- * Represents the Kendo UI TreeList component for Angular.
122
- * Use this component to display and manage hierarchical data in a tabular format.
123
- *
124
- * @example
125
- * ```html
126
- * <kendo-treelist
127
- * [kendoTreeListFlatBinding]="data"
128
- * [pageSize]="10"
129
- * [pageable]="true">
130
- * </kendo-treelist>
131
- * ```
132
- *
133
- * @remarks
134
- * Supported children components are:
135
- * {@link CheckboxColumnComponent},
136
- * {@link ColumnChooserComponent},
137
- * {@link ColumnComponent},
138
- * {@link ColumnGroupComponent},
139
- * {@link ColumnMenuAutoSizeAllColumnsComponent},
140
- * {@link ColumnMenuAutoSizeColumnComponent},
141
- * {@link ColumnMenuChooserComponent},
142
- * {@link ColumnMenuComponent},
143
- * {@link ColumnMenuFilterComponent},
144
- * {@link ColumnMenuItemComponent},
145
- * {@link ColumnMenuLockComponent},
146
- * {@link ColumnMenuSortComponent},
147
- * {@link CommandColumnComponent},
148
- * {@link CustomMessagesComponent},
149
- * {@link ExcelComponent},
150
- * {@link TreeListSpacerComponent},
151
- * {@link PDFComponent},
152
- * {@link RowReorderColumnComponent},
153
- * {@link SpanColumnComponent},
154
- * {@link ToolBarComponent}.
155
- */
156
- export class TreeListComponent {
157
- supportService;
158
- wrapper;
159
- changeNotification;
160
- editService;
161
- filterService;
162
- pdfService;
163
- responsiveService;
164
- renderer;
165
- excelService;
166
- ngZone;
167
- scrollSyncService;
168
- domEvents;
169
- columnResizingService;
170
- changeDetectorRef;
171
- columnReorderService;
172
- columnInfoService;
173
- navigationService;
174
- sortService;
175
- scrollRequestService;
176
- expandStateService;
177
- optionChanges;
178
- selectionService;
179
- localization;
180
- ctx;
181
- rowReorderService;
182
- /**
183
- * Provides an accessible description of the component.
184
- */
185
- ariaLabel;
186
- /**
187
- * Sets the data for the TreeList. When you provide an array, the TreeList gets the total count automatically
188
- * ([more information and example]({% slug databinding_treelist %})).
189
- */
190
- set data(value) {
191
- this.view.reset();
192
- this._data = value;
193
- this.loadedData = null;
194
- this.unsubscribeDataLoaded();
195
- if (isObservable(value)) {
196
- this.dataLoadedSubscription = value.subscribe(this.dataLoaded); // handle error
197
- }
198
- else {
199
- this.dataLoaded(value);
200
- }
201
- }
202
- get data() {
203
- return this.loadedData;
204
- }
205
- /**
206
- * Sets the page size for the TreeList when [paging]({% slug paging_treelist %}) is enabled.
207
- *
208
- * @default 10
209
- */
210
- pageSize = 10;
211
- /**
212
- * Sets the height in pixels for the TreeList when you set the `scrollable` option.
213
- * You can also use `style.height` to set the height. The `style.height`
214
- * option supports units such as `px`, `%`, `em`, `rem`, and others.
215
- */
216
- height;
217
- /**
218
- * Sets the actual height of each TreeList row (`tr`) element in the DOM.
219
- * The [virtual scrolling functionality]({% slug scrollmmodes_treelist %}) requires this setting.
220
- * Set the `rowHeight` option to match the exact pixel height of the `tr` element in the DOM.
221
- */
222
- rowHeight;
223
- /**
224
- * Sets the number of records that the pager skips.
225
- * The [paging]({% slug paging_treelist %}) functionality requires this setting.
226
- */
227
- get skip() {
228
- return this._skip;
229
- }
230
- set skip(value) {
231
- if (typeof value === 'number' && value >= 0) {
232
- this._skip = value;
233
- this.view.clear();
234
- }
235
- }
236
- /**
237
- * Sets the scroll mode for the TreeList.
238
- *
239
- * @default 'scrollable'
240
- */
241
- scrollable = 'scrollable';
242
- /**
243
- * Sets the descriptors for sorting the data ([see example]({% slug sorting_treelist %})).
244
- */
245
- set sort(value) {
246
- if (isArray(value)) {
247
- this._sort = value;
248
- }
249
- }
250
- get sort() {
251
- return this._sort;
252
- }
253
- /**
254
- * Sets a function that defines how to track changes for the data rows.
255
- *
256
- * By default, the TreeList tracks changes by the index of the data item.
257
- * The TreeList tracks edited rows by reference.
258
- */
259
- trackBy = defaultTrackBy;
260
- /**
261
- * Sets the descriptor for filtering the data ([see examples]({% slug filtering_treelist %})).
262
- */
263
- filter;
264
- /**
265
- * When set to `true`, the TreeList renders only the columns in the current viewport.
266
- *
267
- * @default false
268
- */
269
- virtualColumns = false;
270
- /**
271
- * @hidden
272
- */
273
- get showTopToolbar() {
274
- return this.toolbarTemplate && ['top', 'both'].indexOf(this.toolbarTemplate.position) > -1;
275
- }
276
- /**
277
- * @hidden
278
- */
279
- get showBottomToolbar() {
280
- return this.toolbarTemplate && ['bottom', 'both'].indexOf(this.toolbarTemplate.position) > -1;
281
- }
282
- /**
283
- * @hidden
284
- */
285
- get isLocked() {
286
- return this.lockedLeafColumns.length > 0;
287
- }
288
- /**
289
- * @hidden
290
- */
291
- get showPager() {
292
- return !this.isVirtual && this.pageable !== false;
293
- }
294
- get showPagerInput() {
295
- return this._showPagerInput;
296
- }
297
- set showPagerInput(value) {
298
- if (this._showPagerInput === value) {
299
- return;
300
- }
301
- this._showPagerInput = value;
302
- }
303
- get showPagerPageText() {
304
- return this._showPagerPageText;
305
- }
306
- set showPagerPageText(value) {
307
- if (!this.normalizedPageableSettings?.responsive) {
308
- this._showPagerPageText = true;
309
- }
310
- if (this._showPagerPageText === value) {
311
- return;
312
- }
313
- this._showPagerPageText = value;
314
- }
315
- get showPagerItemsText() {
316
- return this._showPagerItemsText;
317
- }
318
- set showPagerItemsText(value) {
319
- if (!this.normalizedPageableSettings?.responsive) {
320
- this._showPagerItemsText = true;
321
- }
322
- if (this._showPagerItemsText === value) {
323
- return;
324
- }
325
- this._showPagerItemsText = value;
326
- }
327
- get marqueeSelection() {
328
- return this.selectionService.enableMarquee;
329
- }
330
- /**
331
- * Enables the [filtering]({% slug filtering_treelist %}) of TreeList columns that have their `field` option set.
332
- *
333
- * @default false
334
- */
335
- filterable = false;
336
- /**
337
- * Enables the [sorting]({% slug sorting_treelist %}) of TreeList columns that have their `field` option set.
338
- *
339
- * @default false
340
- */
341
- sortable = false;
342
- /**
343
- * Configures the pager for the TreeList ([see example]({% slug paging_treelist %})).
344
- *
345
- * @default false
346
- */
347
- pageable = false;
348
- get normalizedPageableSettings() {
349
- return normalize(this.pageable);
350
- }
351
- /**
352
- * When keyboard navigation is enabled, you can use dedicated shortcuts to interact with the TreeList.
353
- * By default, navigation is enabled. To disable it and include the TreeList content in the normal tab sequence, set this property to `false`.
354
- *
355
- * @default true
356
- */
357
- navigable = true;
358
- /**
359
- * Determines whether TreeList columns resize during initialization to fit their headers and row content.
360
- * Columns with `autoSize` set to `false` are excluded.
361
- * To dynamically update the column width to match new content,
362
- * refer to [this example]({% slug resizing_columns_treelist %}).
363
- *
364
- * @default false
365
- */
366
- autoSize = false;
367
- /**
368
- * A function executed for every data row in the component. It should return a string that will be used as a CSS class for the row.
369
- */
370
- set rowClass(fn) {
371
- if (typeof fn !== 'function') {
372
- throw new Error(`rowClass must be a function, but received ${JSON.stringify(fn)}.`);
373
- }
374
- this._rowClass = fn;
375
- }
376
- get rowClass() {
377
- return this._rowClass;
378
- }
379
- /**
380
- * Returns the currently focused cell (if any).
381
- */
382
- get activeCell() {
383
- return this.navigationService.activeCell;
384
- }
385
- /**
386
- * Gets the currently focused row (if any).
387
- */
388
- get activeRow() {
389
- return this.navigationService.activeRow;
390
- }
391
- /**
392
- * When set to `true`, you can resize columns by dragging the edges (resize handles) of their header cells
393
- * ([see example]({% slug resizing_columns_treelist %})).
394
- *
395
- * @default false
396
- */
397
- resizable = false;
398
- /**
399
- * When set to `true`, you can reorder columns by dragging their header cells
400
- * ([see example]({% slug reordering_columns_treelist %})).
401
- *
402
- * @default false
403
- */
404
- reorderable = false;
405
- /**
406
- * Determines whether the TreeList displays the loading indicator ([see example]({% slug databinding_treelist %})).
407
- *
408
- * @default false
409
- */
410
- loading = false;
411
- /**
412
- * Determines whether the column menu of the columns displays ([see example]({% slug columnmenu_treelist %})).
413
- *
414
- * @default false
415
- */
416
- columnMenu = false;
417
- /**
418
- * Determines whether the TreeList hides the header. The header is visible by default.
419
- *
420
- * The header includes column headers and the [filter row](slug:filter_row_treelist).
421
- *
422
- * @default false
423
- */
424
- hideHeader = false;
425
- /**
426
- * Sets the name of the field that contains the unique identifier of the node.
427
- *
428
- * @default "id"
429
- */
430
- set idField(value) {
431
- if (typeof value === "function") {
432
- this.idGetter = value;
433
- }
434
- else {
435
- this.idGetter = getter(value);
436
- }
437
- this.editService.idGetter = this.idGetter;
438
- }
439
- /**
440
- * Sets the TreeList selection settings.
441
- */
442
- set selectable(value) {
443
- this.selectionService.settings = value;
444
- }
445
- /**
446
- * Sets a callback that determines if the given row or cell is selected.
447
- */
448
- set isSelected(value) {
449
- if (typeof value !== 'function' && isDevMode()) {
450
- throw new Error(`isSelected must be a function, but received "${JSON.stringify(value)}".`);
451
- }
452
- this.selectionService.isSelected = value;
453
- }
454
- /**
455
- * Enables the [row reordering]({% slug treelist_row_reordering %}) of the TreeList.
456
- *
457
- * @default false
458
- */
459
- set rowReorderable(value) {
460
- this._rowReorderable = value;
461
- if (value) {
462
- this.rowReorderSubscription = this.rowReorderService.rowReorder.subscribe(args => {
463
- hasObservers(this.rowReorder) && this.ngZone.run(() => {
464
- this.rowReorder.emit(args);
465
- });
466
- });
467
- this.subscriptions.add(this.rowReorderSubscription);
468
- }
469
- else {
470
- this.rowReorderSubscription?.unsubscribe();
471
- }
472
- }
473
- get rowReorderable() {
474
- return this._rowReorderable;
475
- }
476
- /**
477
- * Fires when the TreeList selection changes.
478
- */
479
- selectionChange = new EventEmitter();
480
- /**
481
- * Fires when you modify the TreeList filter through the UI.
482
- * You have to handle the event and filter the data.
483
- */
484
- filterChange = new EventEmitter();
485
- /**
486
- * Fires when the page of the TreeList changes ([see example]({% slug paging_treelist %})).
487
- * You have to handle the event and page the data.
488
- */
489
- pageChange = new EventEmitter();
490
- /**
491
- * Fires when the sorting of the TreeList changes ([see example]({% slug sorting_treelist %})).
492
- * You have to handle the event and sort the data.
493
- */
494
- sortChange = new EventEmitter();
495
- /**
496
- * Fires when the data state of the TreeList changes.
497
- */
498
- dataStateChange = new EventEmitter();
499
- /**
500
- * Fires when you click the **Edit** command button to edit a row
501
- * ([see example]({% slug editing_template_forms_treelist %}#toc-editing-records)).
502
- */
503
- edit = new EventEmitter();
504
- /**
505
- * Fires when you click the **Cancel** command button to close a row
506
- * ([see example]({% slug editing_template_forms_treelist %}#toc-cancelling-editing)).
507
- */
508
- cancel = new EventEmitter();
509
- /**
510
- * Fires when you click the **Save** command button to save changes in a row
511
- * ([see example]({% slug editing_template_forms_treelist %}#toc-saving-records)).
512
- */
513
- save = new EventEmitter();
514
- /**
515
- * Fires when you click the **Remove** command button to remove a row
516
- * ([see example]({% slug editing_template_forms_treelist %}#toc-removing-records)).
517
- */
518
- remove = new EventEmitter();
519
- /**
520
- * Fires when you click the **Add** command button to add a new row
521
- * ([see example]({% slug editing_template_forms_treelist %}#toc-adding-records)).
522
- */
523
- add = new EventEmitter();
524
- /**
525
- * Fires when you leave an edited cell ([see example]({% slug editing_incell_treelist %}#toc-basic-concepts)).
526
- */
527
- cellClose = new EventEmitter();
528
- /**
529
- * Fires when you click a cell ([see example]({% slug editing_incell_treelist %}#toc-basic-concepts)).
530
- */
531
- cellClick = new EventEmitter();
532
- /**
533
- * Fires when you click the **Export to PDF** command button.
534
- */
535
- pdfExport = new EventEmitter();
536
- /**
537
- * Fires when you click the **Export to Excel** command button.
538
- */
539
- excelExport = new EventEmitter();
540
- /**
541
- * Fires when you complete the resizing of the column.
542
- */
543
- columnResize = new EventEmitter();
544
- /**
545
- * Fires when you complete the reordering of the column.
546
- */
547
- columnReorder = new EventEmitter();
548
- /**
549
- * Fires when you change the visibility of the columns from the column menu or column chooser.
550
- */
551
- columnVisibilityChange = new EventEmitter();
552
- /**
553
- * Fires when you change the locked state of the columns from the column menu or by reordering the columns.
554
- */
555
- columnLockedChange = new EventEmitter();
556
- /**
557
- * Fires when you scroll to the last record on the page and enables endless scrolling
558
- * ([see example]({% slug scrollmmodes_treelist %}#toc-endless-scrolling)).
559
- * You have to handle the event and page the data.
560
- */
561
- scrollBottom = new EventEmitter();
562
- /**
563
- * Fires when the TreeList content scrolls.
564
- * For performance reasons, the event triggers outside the Angular zone. Enter the Angular zone if you make any changes that require change detection.
565
- */
566
- contentScroll = new EventEmitter();
567
- /**
568
- * Fires when an item expands.
569
- */
570
- expandEvent = new EventEmitter();
571
- /**
572
- * Fires when an item collapses.
573
- */
574
- collapseEvent = new EventEmitter();
575
- /**
576
- * @hidden
577
- *
578
- * Emits when the expand or collapse events are fired.
579
- * Used by the expand directive and the Gantt component.
580
- */
581
- expandStateChange = new EventEmitter();
582
- /**
583
- * Fires when you drop the dragged row and reordering occurs.
584
- * Emits the [RowReorderEvent]({% slug api_treelist_rowreorderevent %}).
585
- */
586
- rowReorder = new EventEmitter();
587
- /**
588
- * @hidden
589
- */
590
- columnOrderChange = new EventEmitter();
591
- /**
592
- * @hidden
593
- */
594
- set columnsRef(columns) {
595
- this._columnsRef = columns;
596
- // load the new columns list only if a valid query list is provided
597
- if (isPresent(columns)) {
598
- this.loadColumns(columns);
599
- }
600
- }
601
- get columnsRef() {
602
- return this._columnsRef;
603
- }
604
- /**
605
- * A query list of all declared columns.
606
- */
607
- columns = new QueryList();
608
- get dir() {
609
- return this.direction;
610
- }
611
- hostClasses = true;
612
- get lockedClasses() {
613
- return this.lockedLeafColumns.length > 0;
614
- }
615
- get virtualClasses() {
616
- return this.isVirtual;
617
- }
618
- get noScrollbarClass() {
619
- return this.scrollbarWidth === 0;
620
- }
621
- noRecordsTemplateChildren;
622
- get noRecordsTemplate() {
623
- if (this._customNoRecordsTemplate) {
624
- return this._customNoRecordsTemplate;
625
- }
626
- return this.noRecordsTemplateChildren ? this.noRecordsTemplateChildren.first : undefined;
627
- }
628
- set noRecordsTemplate(customNoRecordsTemplate) {
629
- this._customNoRecordsTemplate = customNoRecordsTemplate;
630
- }
631
- pagerTemplateChildren;
632
- get pagerTemplate() {
633
- if (this._customPagerTemplate) {
634
- return this._customPagerTemplate;
635
- }
636
- return this.pagerTemplateChildren ? this.pagerTemplateChildren.first : undefined;
637
- }
638
- set pagerTemplate(customPagerTemplate) {
639
- this._customPagerTemplate = customPagerTemplate;
640
- }
641
- toolbarTemplateChildren;
642
- get toolbarTemplate() {
643
- if (this._customToolbarTemplate) {
644
- return this._customToolbarTemplate;
645
- }
646
- return this.toolbarTemplateChildren ? this.toolbarTemplateChildren.first : undefined;
647
- }
648
- set toolbarTemplate(customToolbarTemplate) {
649
- this._customToolbarTemplate = customToolbarTemplate;
650
- }
651
- columnMenuTemplates;
652
- lockedHeader;
653
- header;
654
- footer = new QueryList();
655
- ariaRoot;
656
- dragTargetContainer;
657
- dropTargetContainer;
658
- listComponent;
659
- get scrollbarWidth() {
660
- return this.supportService.scrollbarWidth;
661
- }
662
- get headerPadding() {
663
- if (isUniversal()) {
664
- return '';
665
- }
666
- const padding = Math.max(0, this.scrollbarWidth) + 'px';
667
- const right = this.rtl ? 0 : padding;
668
- const left = this.rtl ? padding : 0;
669
- return `0 ${right} 0 ${left}`;
670
- }
671
- columnMenuOptions;
672
- columnList;
673
- columnsContainer = new ColumnsContainer(() => this.columnList.filterHierarchy(column => {
674
- if (!isUniversal()) {
675
- column.matchesMedia = this.matchesMedia(column);
676
- }
677
- return column.isVisible;
678
- }));
679
- get showLoading() {
680
- return this.loading || (isObservable(this._data) && !this.loadedData) || this.excelService.loading;
681
- }
682
- get showFooter() {
683
- return this.columnsContainer.hasFooter;
684
- }
685
- get ariaRowCount() {
686
- return this.totalColumnLevels + 1 + this.totalCount;
687
- }
688
- get ariaColCount() {
689
- return this.columnsContainer.leafColumnsToRender.length;
690
- }
691
- get ariaMultiselectable() {
692
- if (this.selectionService.enabled) {
693
- return this.selectionService.enableMultiple;
694
- }
695
- }
696
- get navigation() {
697
- return this.navigationService;
698
- }
699
- get isVirtual() {
700
- return this.scrollable === 'virtual';
701
- }
702
- get isScrollable() {
703
- return this.scrollable !== 'none';
704
- }
705
- get visibleColumns() {
706
- return this.columnsContainer.allColumns;
707
- }
708
- get lockedColumns() {
709
- return this.columnsContainer.lockedColumns;
710
- }
711
- get nonLockedColumns() {
712
- return this.columnsContainer.nonLockedColumns;
713
- }
714
- get lockedLeafColumns() {
715
- return this.columnsContainer.lockedLeafColumns;
716
- }
717
- get nonLockedLeafColumns() {
718
- return this.columnsContainer.nonLockedLeafColumns;
719
- }
720
- get leafColumns() {
721
- return this.columnsContainer.leafColumns;
722
- }
723
- get totalColumnLevels() {
724
- return this.columnsContainer.totalLevels;
725
- }
726
- get headerColumns() {
727
- if (this.virtualColumns && !this.pdfService.exporting) {
728
- return this.viewportColumns;
729
- }
730
- return this.nonLockedColumns;
731
- }
732
- get headerLeafColumns() {
733
- if (this.virtualColumns && !this.pdfService.exporting) {
734
- return this.leafViewportColumns;
735
- }
736
- return this.nonLockedLeafColumns;
737
- }
738
- get lockedWidth() {
739
- return expandColumns(this.lockedLeafColumns.toArray()).reduce((prev, curr) => prev + (curr.width || 0), 0);
740
- }
741
- get nonLockedWidth() {
742
- if ((!this.rtl && this.lockedLeafColumns.length) || this.virtualColumns) {
743
- return !this.virtualColumns ? this.columnsContainer.unlockedWidth :
744
- this.leafViewportColumns.reduce((acc, column) => acc + (column.width || 0), 0);
745
- }
746
- return undefined;
747
- }
748
- get columnMenuTemplate() {
749
- const template = this.columnMenuTemplates.first;
750
- return template ? template.templateRef : null;
751
- }
752
- get totalCount() {
753
- return this.view.totalRows;
754
- }
755
- /**
756
- * Sets or gets the callback function that retrieves the child nodes for a particular node.
757
- */
758
- set fetchChildren(value) {
759
- this._fetchChildren = value;
760
- }
761
- get fetchChildren() {
762
- return this._fetchChildren;
763
- }
764
- /**
765
- * Sets or gets the callback function that determines if a particular node has child nodes.
766
- */
767
- set hasChildren(value) {
768
- this._hasChildren = value;
769
- }
770
- get hasChildren() {
771
- return this._hasChildren;
772
- }
773
- /**
774
- * Sets the callback function that determines if a particular item is expanded.
775
- */
776
- set isExpanded(value) {
777
- this.expandStateService.isExpanded = value || defaultExpanded;
778
- this.expandIcons = Boolean(value);
779
- }
780
- idGetter = getter(undefined);
781
- localEditService = new LocalEditService();
782
- view;
783
- expandIcons;
784
- ariaRootId = `k-${guid()}`;
785
- dataChanged = false;
786
- loadedData;
787
- _fetchChildren;
788
- _hasChildren = (() => false);
789
- subscriptions = new Subscription();
790
- dataLoadedSubscription;
791
- focusElementSubscription;
792
- rowReorderSubscription;
793
- detachElementEventHandlers;
794
- rtl = false;
795
- shouldGenerateColumns = true;
796
- direction;
797
- _data = [];
798
- _sort = new Array();
799
- _skip = 0;
800
- _columnsRef;
801
- cachedWindowWidth = 0;
802
- _customNoRecordsTemplate;
803
- _customPagerTemplate;
804
- _customToolbarTemplate;
805
- leafViewportColumns;
806
- viewportColumns;
807
- pageChangeTimeout;
808
- _rowReorderable = false;
809
- _showPagerInput = true;
810
- _showPagerPageText = true;
811
- _showPagerItemsText = true;
812
- constructor(supportService, wrapper, changeNotification, editService, filterService, pdfService, responsiveService, renderer, excelService, ngZone, scrollSyncService, domEvents, columnResizingService, changeDetectorRef, columnReorderService, columnInfoService, navigationService, sortService, scrollRequestService, expandStateService, optionChanges, selectionService, localization, ctx, rowReorderService) {
813
- this.supportService = supportService;
814
- this.wrapper = wrapper;
815
- this.changeNotification = changeNotification;
816
- this.editService = editService;
817
- this.filterService = filterService;
818
- this.pdfService = pdfService;
819
- this.responsiveService = responsiveService;
820
- this.renderer = renderer;
821
- this.excelService = excelService;
822
- this.ngZone = ngZone;
823
- this.scrollSyncService = scrollSyncService;
824
- this.domEvents = domEvents;
825
- this.columnResizingService = columnResizingService;
826
- this.changeDetectorRef = changeDetectorRef;
827
- this.columnReorderService = columnReorderService;
828
- this.columnInfoService = columnInfoService;
829
- this.navigationService = navigationService;
830
- this.sortService = sortService;
831
- this.scrollRequestService = scrollRequestService;
832
- this.expandStateService = expandStateService;
833
- this.optionChanges = optionChanges;
834
- this.selectionService = selectionService;
835
- this.localization = localization;
836
- this.ctx = ctx;
837
- this.rowReorderService = rowReorderService;
838
- validatePackage(packageMetadata);
839
- this.subscriptions.add(localization.changes.subscribe(({ rtl }) => {
840
- this.rtl = rtl;
841
- this.direction = this.rtl ? 'rtl' : 'ltr';
842
- }));
843
- this.view = new ViewCollection(this.viewFieldAccessor.bind(this), this.expandStateService, this.editService, this.selectionService);
844
- this.selectionService.init(this);
845
- this.ctx.treelist = this;
846
- this.subscriptions.add(this.selectionService.changes.subscribe((args) => {
847
- if (hasObservers(this.selectionChange)) {
848
- this.ngZone.run(() => {
849
- args.sender = this;
850
- this.selectionChange.emit(args);
851
- this.selectionService.updateSelectedState();
852
- this.changeDetectorRef.markForCheck();
853
- });
854
- }
855
- }));
856
- this.columnInfoService.init(this.columnsContainer, () => this.columnList);
857
- this.subscriptions.add(this.columnInfoService.visibilityChange.subscribe((changed) => {
858
- this.columnVisibilityChange.emit(new ColumnVisibilityChangeEvent(changed));
859
- this.changeDetectorRef.markForCheck();
860
- }));
861
- this.subscriptions.add(this.columnInfoService.lockedChange.subscribe((changed) => {
862
- this.columnLockedChange.emit(new ColumnLockedChangeEvent(changed));
863
- this.changeDetectorRef.markForCheck();
864
- }));
865
- this.subscriptions.add(merge(this.optionChanges.columns, this.optionChanges.options).subscribe(() => {
866
- this.changeDetectorRef.markForCheck();
867
- }));
868
- this.subscriptions.add(this.filterService.changes.subscribe(x => {
869
- this.filterChange.emit(x);
870
- }));
871
- this.subscriptions.add(this.sortService.changes.subscribe(x => {
872
- this.sortChange.emit(x);
873
- }));
874
- this.attachStateChangesEmitter();
875
- this.attachEditHandlers();
876
- this.attachDomEventHandlers();
877
- this.subscriptions.add(this.pdfService.exportClick.subscribe(this.emitPDFExportEvent.bind(this)));
878
- this.subscriptions.add(this.excelService.exportClick.subscribe(this.saveAsExcel.bind(this)));
879
- this.subscriptions.add(this.excelService.loadingChange.subscribe(() => {
880
- this.changeDetectorRef.detectChanges();
881
- }));
882
- this.columnsContainerChange();
883
- this.handleColumnResize();
884
- this.columnList = new ColumnList(this.columns);
885
- this.subscriptions.add(this.columnReorderService
886
- .changes.subscribe(this.reorder.bind(this)));
887
- this.subscriptions.add(this.columnInfoService.columnRangeChange.subscribe(this.onColumnRangeChange.bind(this)));
888
- this.subscriptions.add(this.expandStateService.changes.subscribe((args) => {
889
- if (args.expand) {
890
- this.expandEvent.emit(args);
891
- }
892
- else {
893
- this.collapseEvent.emit(args);
894
- }
895
- if (!args.isDefaultPrevented()) {
896
- this.changeDetectorRef.markForCheck();
897
- this.view.clear();
898
- if (this.lockedLeafColumns.length) {
899
- this.ngZone.onStable.pipe(take(1)).subscribe(() => this.changeNotification.notify());
900
- }
901
- this.expandStateChange.emit(args);
902
- }
903
- if (this.rowReorderable) {
904
- this.ngZone.onStable.pipe(take(1)).subscribe(() => {
905
- this.notifyReorderContainers();
906
- });
907
- }
908
- }));
909
- this.subscriptions.add(this.view.childrenLoaded.subscribe(() => {
910
- this.changeDetectorRef.detectChanges();
911
- }));
912
- this.subscriptions.add(this.view.resetPage.subscribe(() => {
913
- if (this.skip > 0 && hasObservers(this.pageChange)) {
914
- // don't think there is a way to avoid this
915
- // every callback in which the view can be computed is already passed the change detection
916
- // computing the current page in advance also does not seem feasible for such a rare case
917
- this.pageChangeTimeout = setTimeout(() => {
918
- this.pageChange.emit({ skip: 0, take: this.pageSize });
919
- }, 0);
920
- }
921
- this.skip = 0;
922
- }));
923
- this.dataLoaded = this.dataLoaded.bind(this);
924
- this.editService.idGetter = this.idGetter;
925
- }
926
- /**
927
- * @hidden
928
- */
929
- viewFieldAccessor() {
930
- return {
931
- fetchChildren: this.fetchChildren,
932
- hasChildren: this.hasChildren,
933
- idGetter: this.idGetter,
934
- skip: this.skip,
935
- pageSize: this.pageSize,
936
- pageable: this.pageable,
937
- isVirtual: this.isVirtual,
938
- data: this.loadedData,
939
- hasFooter: this.columnsContainer.hasFooter
940
- };
941
- }
942
- /**
943
- * @hidden
944
- */
945
- onDataChange() {
946
- this.autoGenerateColumns();
947
- this.changeNotification.notify();
948
- this.pdfService.dataChanged.emit();
949
- this.updateNavigationMetadata();
950
- }
951
- ngOnChanges(changes) {
952
- if (this.lockedLeafColumns.length && anyChanged(["pageSize", "skip", "sort"], changes)) {
953
- this.changeNotification.notify();
954
- }
955
- if (anyChanged(["pageSize", "scrollable", 'virtualColumns'], changes)) {
956
- this.updateNavigationMetadata();
957
- }
958
- if (isChanged("virtualColumns", changes)) {
959
- this.viewportColumns = this.leafViewportColumns = null;
960
- }
961
- if (isChanged("height", changes, false)) {
962
- this.renderer.setStyle(this.wrapper.nativeElement, 'height', `${this.height}px`);
963
- }
964
- if (isChanged("filterable", changes) && this.lockedColumns.length) {
965
- this.syncHeaderHeight(this.ngZone.onStable.asObservable().pipe(take(1)));
966
- }
967
- if (anyChanged(["columnMenu", "sortable", "filterable"], changes, false)) {
968
- this.columnMenuOptions = this.columnMenu && Object.assign({
969
- filter: Boolean(this.filterable),
970
- sort: Boolean(this.sortable)
971
- }, this.columnMenu);
972
- }
973
- if (isChanged("scrollable", changes) && this.isScrollable) {
974
- this.ngZone.onStable.pipe(take(1)).subscribe(() => this.attachScrollSync());
975
- }
976
- }
977
- ngAfterViewInit() {
978
- this.attachScrollSync();
979
- this.attachElementEventHandlers();
980
- this.updateNavigationMetadata();
981
- this.applyAutoSize();
982
- this.subscriptions.add(this.pagerTemplateChildren.changes.subscribe(() => this.changeDetectorRef.markForCheck()));
983
- const toolbarComponentWrapper = this.wrapper?.nativeElement?.querySelector('kendo-toolbar');
984
- if (toolbarComponentWrapper) {
985
- this.renderer.addClass(toolbarComponentWrapper, 'k-grid-toolbar');
986
- }
987
- }
988
- ngAfterContentChecked() {
989
- if (this.dataChanged) {
990
- this.dataChanged = false;
991
- this.onDataChange();
992
- }
993
- this.columnsContainer.refresh();
994
- this.verifySettings();
995
- }
996
- ngAfterContentInit() {
997
- // initially passed columns though the input prop are overwritten by ContentChildren-queried ones
998
- if (isPresent(this.columnsRef)) {
999
- this.loadColumns(this.columnsRef);
1000
- }
1001
- this.shouldGenerateColumns = !this.columns.length;
1002
- this.autoGenerateColumns();
1003
- this.columnList = new ColumnList(this.columns);
1004
- // is this needed? after content checked already does this
1005
- this.subscriptions.add(this.columns.changes.subscribe(() => {
1006
- this.verifySettings();
1007
- this.optionChanges.columnChanged();
1008
- }));
1009
- }
1010
- ngOnInit() {
1011
- if (this.navigable) {
1012
- this.navigationService.init(this.navigationMetadata());
1013
- }
1014
- }
1015
- ngOnDestroy() {
1016
- this.subscriptions.unsubscribe();
1017
- if (this.detachElementEventHandlers) {
1018
- this.detachElementEventHandlers();
1019
- }
1020
- if (this.focusElementSubscription) {
1021
- this.focusElementSubscription.unsubscribe();
1022
- }
1023
- this.unsubscribeDataLoaded();
1024
- this.ngZone = null;
1025
- clearTimeout(this.pageChangeTimeout);
1026
- }
1027
- /**
1028
- * @hidden
1029
- */
1030
- handleReorderEvents(ev, evType) {
1031
- this.rowReorderService[evType](ev);
1032
- }
1033
- /**
1034
- * @hidden
1035
- */
1036
- getDefaultSelectors(type) {
1037
- return this.rowReorderService.defaultSelectors[type];
1038
- }
1039
- /**
1040
- * @hidden
1041
- */
1042
- treeListData = () => { return this.view; };
1043
- /**
1044
- * @hidden
1045
- */
1046
- getHintSettings(setting) {
1047
- return this.rowReorderService[setting];
1048
- }
1049
- /**
1050
- * @hidden
1051
- */
1052
- get hintText() {
1053
- return this.rowReorderService.getDefaultHintText(this.columnList, this.view);
1054
- }
1055
- /**
1056
- * @hidden
1057
- */
1058
- attachScrollSync() {
1059
- if (isUniversal()) {
1060
- return;
1061
- }
1062
- if (this.header) {
1063
- this.scrollSyncService.registerEmitter(this.header.nativeElement, "header");
1064
- }
1065
- if (this.footer) {
1066
- this.subscriptions.add(observe(this.footer)
1067
- .subscribe(footers => footers
1068
- .map(footer => footer.nativeElement)
1069
- .filter(isPresent)
1070
- .forEach(element => this.scrollSyncService.registerEmitter(element, "footer"))));
1071
- }
1072
- }
1073
- /**
1074
- * Switches the specified table row to edit mode ([see example]({% slug editing_template_forms_treelist %}#toc-editing-records)).
1075
- *
1076
- * @param dataItem The data item that you will edit.
1077
- * @param group - The [`FormGroup`](link:site.data.urls.angular['formgroupapi'])
1078
- * that describes the edit form.
1079
- * @param options Additional options. Use `skipFocus` to determine if the edit element of the row should receive focus.
1080
- *
1081
- * @default false
1082
- */
1083
- editRow(dataItem, group, options) {
1084
- this.editService.editRow(dataItem, group);
1085
- this.view.updateEditedState();
1086
- this.changeDetectorRef.markForCheck();
1087
- if (options && options['skipFocus']) {
1088
- return;
1089
- }
1090
- this.focusEditElement(() => {
1091
- return `tr[data-treelist-view-index="${this.view.itemIndex(dataItem)}"]`;
1092
- });
1093
- }
1094
- /**
1095
- * Closes the editor for a given row ([see example]({% slug editing_template_forms_treelist %}#toc-cancelling-editing)).
1096
- *
1097
- * @param dataItem The data item that you will switch out of edit mode.
1098
- * @param isNew Determines whether the data item is new.
1099
- */
1100
- closeRow(dataItem, isNew) {
1101
- this.editService.close(dataItem, isNew);
1102
- this.changeDetectorRef.markForCheck();
1103
- if (isNew) {
1104
- this.view.clear();
1105
- }
1106
- else {
1107
- this.view.updateEditedState();
1108
- }
1109
- }
1110
- /**
1111
- * Creates a new row editor ([see example]({% slug editing_template_forms_treelist %}#toc-adding-records)).
1112
- *
1113
- * @param group The [`FormGroup`](link:site.data.urls.angular['formgroupapi']) that describes
1114
- * the edit form. If called with a data item, it builds the `FormGroup` from the data item fields.
1115
- */
1116
- addRow(group, parent) {
1117
- const isFormGroup = group instanceof FormGroup;
1118
- if (!isFormGroup) {
1119
- const fields = Object.keys(group).reduce(createControl(group), {}); // FormBuilder?
1120
- group = new FormGroup(fields);
1121
- }
1122
- if (this.isVirtual && !parent && this.skip) {
1123
- const firstVisible = this.navigationService.viewport.firstItemIndex;
1124
- if (firstVisible !== this.skip) {
1125
- this.skip = firstVisible;
1126
- this.pageChange.emit({
1127
- skip: this.skip,
1128
- take: this.pageSize
1129
- });
1130
- }
1131
- }
1132
- this.editService.addRow(parent, group);
1133
- this.changeDetectorRef.markForCheck();
1134
- this.view.clear();
1135
- this.focusEditElement(() => {
1136
- return parent ? `tr[data-treelist-view-index="${this.view.itemIndex(parent) + 1}"]` : '.k-grid-add-row';
1137
- });
1138
- }
1139
- /**
1140
- * Puts the cell that you specify by the table row and column in edit mode.
1141
- *
1142
- * @param dataItem The data item that you will edit.
1143
- * @param column The leaf column index, or the field name or the column instance that should be edited.
1144
- * @param group The [`FormGroup`](link:site.data.urls.angular['formgroupapi'])
1145
- * that describes the edit form.
1146
- */
1147
- editCell(dataItem, column, group) {
1148
- const instance = this.columnInstance(column);
1149
- this.editService.editCell(dataItem, instance, group);
1150
- this.changeDetectorRef.markForCheck();
1151
- this.view.updateEditedState();
1152
- this.focusEditElement(() => '.k-grid-edit-cell');
1153
- }
1154
- /**
1155
- * Closes the current cell in edit mode and fires
1156
- * the [`cellClose`]({% slug api_treelist_treelistcomponent %}#toc-cellclose) event.
1157
- *
1158
- * @return {boolean} A Boolean value that indicates whether the edited cell closed.
1159
- * A `false` value indicates that the [`cellClose`]({% slug api_treelist_treelistcomponent %}#toc-cellclose) event was prevented.
1160
- */
1161
- closeCell() {
1162
- return !this.editService.closeCell();
1163
- }
1164
- /**
1165
- * Closes the current cell in edit mode.
1166
- */
1167
- cancelCell() {
1168
- this.editService.cancelCell();
1169
- this.view.updateEditedState();
1170
- }
1171
- /**
1172
- * Gets a flag that indicates if a row or a cell is currently edited.
1173
- *
1174
- * @return {boolean} A Boolean flag that indicates if a row or a cell is currently edited.
1175
- */
1176
- isEditing() {
1177
- return this.editService.isEditing();
1178
- }
1179
- /**
1180
- * Gets a flag that indicates if a cell is currently edited.
1181
- *
1182
- * @return {boolean} A Boolean flag that indicates if a cell is currently being edited.
1183
- */
1184
- isEditingCell() {
1185
- return this.editService.isEditing() && this.editService.isEditingCell();
1186
- }
1187
- /**
1188
- * Starts the PDF export ([see example]({% slug pdfexport_treelist %})).
1189
- */
1190
- saveAsPDF() {
1191
- this.pdfService.save(this);
1192
- }
1193
- /**
1194
- * Exports the TreeList element to a Drawing [`Group`]({% slug api_kendo-drawing_group %}) by using the `kendo-treelist-pdf` component options.
1195
- * ([see example]({% slug pdfexport_treelist %}#toc-exporting-multiple-treelists-to-the-same-pdf)).
1196
- *
1197
- * @return {Promise} A promise that resolves with the Drawing `Group`.
1198
- */
1199
- drawPDF() {
1200
- const promise = createPromise();
1201
- this.pdfService.draw(this, promise);
1202
- return promise;
1203
- }
1204
- /**
1205
- * Starts the Excel export ([see example]({% slug excelexport_treelist %})).
1206
- */
1207
- saveAsExcel() {
1208
- this.excelService.save(this);
1209
- }
1210
- /**
1211
- * Applies the minimum possible width for the specified column,
1212
- * so that the whole text fits without wrapping. This method expects the TreeList
1213
- * to be resizable (set `resizable` to `true`).
1214
- * Execute this method only
1215
- * after the TreeList is already populated with data. [See example](slug:resizing_columns_treelist#toc-auto-fitting-the-content).
1216
- */
1217
- autoFitColumn(column) {
1218
- this.columnResizingService.autoFit(column);
1219
- }
1220
- /**
1221
- * Adjusts the width of the specified columns to fit the entire content, including headers, without wrapping.
1222
- * If you do not specify columns, `autoFitColumns` applies to all columns.
1223
- *
1224
- * This method requires the TreeList to be resizable (set `resizable` to `true`).
1225
- * [See example](slug:resizing_columns_treelist#toc-auto-fitting-the-content).
1226
- */
1227
- autoFitColumns(columns = this.columns) {
1228
- let cols;
1229
- if (columns instanceof QueryList) {
1230
- cols = columns.toArray();
1231
- }
1232
- else {
1233
- cols = columns;
1234
- }
1235
- this.columnResizingService.autoFit(...cols);
1236
- }
1237
- /**
1238
- * @hidden
1239
- */
1240
- notifyPageChange(source, event) {
1241
- if (source === "list" && !this.isVirtual) {
1242
- return;
1243
- }
1244
- this.skip = event.skip;
1245
- this.pageSize = event.take;
1246
- this.closeCell();
1247
- this.cancelCell();
1248
- this.changeDetectorRef.markForCheck();
1249
- this.pageChange.emit(event);
1250
- }
1251
- /**
1252
- * @hidden
1253
- */
1254
- handlePagerVisibilityChange(prop, ev) {
1255
- this[prop] = ev;
1256
- }
1257
- /**
1258
- * @hidden
1259
- */
1260
- messageFor(token) {
1261
- return this.localization.get(token);
1262
- }
1263
- /**
1264
- * @hidden
1265
- */
1266
- notifyScrollBottom() {
1267
- if (this.scrollable === 'none') {
1268
- return;
1269
- }
1270
- if (hasObservers(this.scrollBottom)) {
1271
- this.ngZone.run(() => this.scrollBottom.emit({ sender: this }));
1272
- }
1273
- }
1274
- /**
1275
- * @hidden
1276
- */
1277
- focusEditElement(containerSelector) {
1278
- if (this.focusElementSubscription) {
1279
- this.focusElementSubscription.unsubscribe();
1280
- }
1281
- this.ngZone.runOutsideAngular(() => {
1282
- this.focusElementSubscription = this.ngZone.onStable.asObservable().pipe(take(1)).subscribe(() => {
1283
- const wrapper = this.wrapper.nativeElement;
1284
- const selector = containerSelector();
1285
- if (!this.setEditFocus(wrapper.querySelector(selector)) && this.isLocked) {
1286
- this.setEditFocus(wrapper.querySelector(`.k-grid-content ${selector}`));
1287
- }
1288
- this.focusElementSubscription = null;
1289
- });
1290
- });
1291
- }
1292
- /**
1293
- * Focuses the last active or the first cell of the TreeList.
1294
- *
1295
- * @returns {NavigationCell} The focused cell.
1296
- */
1297
- focus() {
1298
- this.assertNavigable();
1299
- return this.navigationService.focusCell();
1300
- }
1301
- /**
1302
- * Focuses the cell with the specified row and column index.
1303
- *
1304
- * The row index is based on the logical structure of the TreeList and does not correspond to the data item index.
1305
- * The row indexing is absolute and does not change with paging.
1306
- * Header rows are included, starting at index 0.
1307
- *
1308
- * If the TreeList is configured for scrolling, including virtual scrolling, the scroll position updates.
1309
- * If the row is not present on the current page, the method has no effect.
1310
- *
1311
- * @param rowIndex - The logical row index to focus. The top header row has an index 0.
1312
- * @param colIndex - The column index to focus.
1313
- * @returns {NavigationCell} The focused cell.
1314
- *
1315
- */
1316
- focusCell(rowIndex, colIndex) {
1317
- this.assertNavigable();
1318
- return this.navigationService.focusCell(rowIndex, colIndex);
1319
- }
1320
- /**
1321
- * Focuses the next cell, optionally wrapping to the next row.
1322
- *
1323
- * @param wrap A Boolean value that indicates if the focus moves to the next row.
1324
- * @return {NavigationCell} The focused cell. If the focus is already on the last cell, returns `null`.
1325
- *
1326
- * @default true
1327
- */
1328
- focusNextCell(wrap = true) {
1329
- this.assertNavigable();
1330
- return this.navigationService.focusNextCell(wrap);
1331
- }
1332
- /**
1333
- * Focuses the previous cell. Optionally wraps to the previous row.
1334
- *
1335
- * @param wrap A Boolean value that indicates if the focus moves to the next row.
1336
- * @return {NavigationCell} The focused cell. If the focus is already on the first cell, returns `null`.
1337
- *
1338
- * @default true
1339
- */
1340
- focusPrevCell(wrap = true) {
1341
- this.assertNavigable();
1342
- return this.navigationService.focusPrevCell(wrap);
1343
- }
1344
- /**
1345
- * Scrolls to the specified row and column.
1346
- */
1347
- scrollTo(request) {
1348
- this.scrollRequestService.scrollTo(request);
1349
- }
1350
- /**
1351
- * Changes the position of the specified column.
1352
- * The reordering of columns operates only on the level
1353
- * that the source column infers.
1354
- * For the `reorderColumn` method to work properly,
1355
- * the `source` column has to be visible.
1356
- *
1357
- * @param source The column whose position you will change.
1358
- * @param destIndex The new position of the column.
1359
- * @param options Additional options.
1360
- */
1361
- reorderColumn(source, destIndex, options = { before: false }) {
1362
- const columnsForLevel = sortColumns(this.allColumnsForLevel(source.level));
1363
- let target = columnsForLevel[destIndex];
1364
- if (!target) {
1365
- return;
1366
- }
1367
- const lastNonLocked = target.isLocked &&
1368
- !source.isLocked &&
1369
- this.columnsContainer.nonLockedColumns.length === 1;
1370
- if (lastNonLocked) {
1371
- return;
1372
- }
1373
- if (isSpanColumnComponent(target) && !options.before) {
1374
- target = target.childColumns.last;
1375
- }
1376
- this.reorder({
1377
- before: options.before,
1378
- source: source,
1379
- target: target
1380
- });
1381
- }
1382
- /**
1383
- * Clears the already loaded children for the data item so that the TreeList fetches them again the next time it renders.
1384
- */
1385
- reload(dataItem, reloadChildren) {
1386
- if (dataItem) {
1387
- this.view.resetItem(dataItem, reloadChildren);
1388
- this.changeDetectorRef.markForCheck();
1389
- }
1390
- }
1391
- /**
1392
- * Updates the state of the current view without reloading the data.
1393
- *
1394
- * Checks all currently rendered items for changes and
1395
- * triggers re-evaluation of the [isExpanded](#toc-isexpanded) and
1396
- * [isSelected](#toc-isSelected) callbacks.
1397
- */
1398
- updateView() {
1399
- if (this.rowReorderable) {
1400
- this.ngZone.onStable.pipe(take(1)).subscribe(() => {
1401
- this.notifyReorderContainers();
1402
- });
1403
- }
1404
- this.view.clear();
1405
- this.changeDetectorRef.markForCheck();
1406
- }
1407
- /**
1408
- * Expands the row for the specified data item.
1409
- */
1410
- expand(dataItem) {
1411
- this.expandStateService.expand(dataItem);
1412
- this.changeDetectorRef.markForCheck();
1413
- }
1414
- /**
1415
- * Collapses the row for the specified data item.
1416
- */
1417
- collapse(dataItem) {
1418
- this.expandStateService.collapse(dataItem);
1419
- this.changeDetectorRef.markForCheck();
1420
- }
1421
- /**
1422
- * @hidden
1423
- */
1424
- reorder({ target, source, before, changeContainer }) {
1425
- this.ngZone.run(() => {
1426
- const columnsForLevel = sortColumns(this.allColumnsForLevel(source.level));
1427
- let newIndex = columnsForLevel.indexOf(target);
1428
- if (target.parent && target.parent.isSpanColumn) {
1429
- newIndex = columnsForLevel.indexOf(target.parent);
1430
- if (before) {
1431
- target = target.parent;
1432
- }
1433
- }
1434
- const oldIndex = columnsForLevel.indexOf(source);
1435
- if (changeContainer) {
1436
- if (before && 0 < newIndex && oldIndex < newIndex) { // dropped before the first not locked column
1437
- newIndex--;
1438
- }
1439
- else if (!before && oldIndex > newIndex) { // dropped after the last locked column
1440
- newIndex++;
1441
- }
1442
- }
1443
- const args = new ColumnReorderEvent({
1444
- column: source,
1445
- oldIndex: oldIndex,
1446
- newIndex: newIndex
1447
- });
1448
- this.columnReorder.emit(args);
1449
- if (args.isDefaultPrevented()) {
1450
- return;
1451
- }
1452
- if (changeContainer) {
1453
- this.columnLockedChange.emit(new ColumnLockedChangeEvent([source]));
1454
- }
1455
- this.updateColumnIndices({ columnsForLevel, source, target, before });
1456
- if (source.locked !== target.locked) {
1457
- source.locked = target.locked;
1458
- }
1459
- this.columnOrderChange.emit(args);
1460
- this.columnsContainer.refresh();
1461
- if (this.virtualColumns) {
1462
- this.listComponent.updateViewportColumns();
1463
- }
1464
- this.changeDetectorRef.markForCheck();
1465
- });
1466
- }
1467
- updateColumnIndices({ columnsForLevel, source, target, before }) {
1468
- const expandedColumns = expandColumnsWithSpan(columnsForLevel);
1469
- const sourceColumnIndex = expandedColumns.indexOf(source);
1470
- let nextSourceIndex = 0;
1471
- let nextIndex = 0;
1472
- let toSkip = 1;
1473
- // Possible only when called from the API.
1474
- if (source.isSpanColumn) {
1475
- toSkip += source.childColumns.length;
1476
- }
1477
- let i = 0;
1478
- while (i < expandedColumns.length) {
1479
- const column = expandedColumns[i];
1480
- if (column === target) {
1481
- nextSourceIndex = before ? nextIndex : nextIndex + 1;
1482
- nextIndex = before ? nextIndex + toSkip : nextIndex;
1483
- column.orderIndex = nextIndex;
1484
- if (nextSourceIndex === nextIndex + 1) {
1485
- nextIndex += toSkip;
1486
- }
1487
- }
1488
- else if (column === source) {
1489
- i += toSkip;
1490
- continue;
1491
- }
1492
- else {
1493
- column.orderIndex = nextIndex;
1494
- }
1495
- nextIndex++;
1496
- i++;
1497
- }
1498
- for (i = sourceColumnIndex; i < sourceColumnIndex + toSkip; i++) {
1499
- expandedColumns[i].orderIndex = nextSourceIndex++;
1500
- }
1501
- this.updateIndicesForLevel(source.level + 1);
1502
- }
1503
- updateIndicesForLevel(level) {
1504
- const colsForParentLevel = this.allColumnsForLevel(level - 1);
1505
- const colsForLevel = [];
1506
- sortColumns(colsForParentLevel).forEach((c) => {
1507
- if (c.isColumnGroup) {
1508
- colsForLevel.push(...c.childrenArray.sort((a, b) => a.orderIndex - b.orderIndex));
1509
- }
1510
- });
1511
- expandColumnsWithSpan(colsForLevel).forEach((c, i) => c.orderIndex = i);
1512
- if (level < this.columnList.totalColumnLevels()) {
1513
- this.updateIndicesForLevel(level + 1);
1514
- }
1515
- }
1516
- allColumnsForLevel(level) {
1517
- return this.columnList.toArray().filter(column => column.level === level);
1518
- }
1519
- setEditFocus(element) {
1520
- if (element) {
1521
- return this.navigationService.tryFocus(element);
1522
- }
1523
- }
1524
- columnInstance(column) {
1525
- let instance;
1526
- if (typeof column === 'number') {
1527
- instance = this.columnsContainer.lockedLeafColumns.toArray()
1528
- .concat(this.columnsContainer.nonLockedLeafColumns.toArray())[column];
1529
- }
1530
- else if (typeof column === 'string') {
1531
- instance = this.columnList.filter((item) => item.field === column)[0];
1532
- }
1533
- else {
1534
- instance = column;
1535
- }
1536
- if (!instance && isDevMode()) {
1537
- throw new Error(`Invalid column ${column}`);
1538
- }
1539
- return instance;
1540
- }
1541
- verifySettings() {
1542
- if (isDevMode()) {
1543
- const locked = this.lockedLeafColumns.length || (this.columnMenu && this.columnMenu.lock);
1544
- if (this.lockedLeafColumns.length && !this.nonLockedLeafColumns.length) {
1545
- throw new Error('There should be at least one non-locked column');
1546
- }
1547
- if ((locked || this.virtualColumns) && expandColumns(this.columnList.toArray()).filter(column => !column.width && !isColumnGroupComponent(column)).length) {
1548
- throw new Error((locked ? 'Locked' : 'Virtual') + ' columns feature requires all columns to have set width.');
1549
- }
1550
- if (locked && !this.isScrollable) {
1551
- throw new Error('Locked columns are only supported when scrolling is enabled.');
1552
- }
1553
- if (this.columnList.filter(isColumnGroupComponent).filter((x) => !x.hasChildren).length) {
1554
- throw new Error('ColumnGroupComponent should contain ColumnComponent or CommandColumnComponent.');
1555
- }
1556
- if (this.columnList.filter(x => x.locked && x.parent && !x.parent.isLocked).length) {
1557
- throw new Error('Locked child columns require their parent columns to be locked.');
1558
- }
1559
- if ((this.rowHeight) && !this.isVirtual) {
1560
- throw new Error('Row height setting requires virtual scrolling mode to be enabled.');
1561
- }
1562
- if (this.wrapper?.nativeElement?.querySelector('kendo-toolbar') && this.toolbarTemplate) {
1563
- console.warn(`Defining both a toolbar template and a ToolBarComponent within the TreeList is not supported.
1564
- Please use either the ToolBarComponent or a custom template.`);
1565
- }
1566
- validateColumnsField(this.columnList);
1567
- }
1568
- }
1569
- autoGenerateColumns() {
1570
- if (this.shouldGenerateColumns && !this.columns.length && this.view.length) {
1571
- const columns = Object.keys(this.view.at(0).data).map(field => {
1572
- const column = new ColumnComponent();
1573
- column.field = field;
1574
- return column;
1575
- });
1576
- columns[0].expandable = true;
1577
- this.columns.reset(columns);
1578
- }
1579
- }
1580
- attachStateChangesEmitter() {
1581
- this.subscriptions.add(merge(this.sortChange.pipe(map(sort => ({ filter: this.filter, skip: this.skip, sort: sort, take: this.pageSize }))), this.filterChange.pipe(map(filter => ({
1582
- filter: filter, skip: 0, sort: this.sort, take: this.pageSize
1583
- }))))
1584
- .subscribe(x => {
1585
- this.closeCell();
1586
- this.cancelCell();
1587
- this.dataStateChange.emit(x);
1588
- this.rowReorderable && this.notifyReorderContainers();
1589
- }));
1590
- }
1591
- attachEditHandlers() {
1592
- if (!this.editService) {
1593
- return;
1594
- }
1595
- this.subscriptions.add(this.editService
1596
- .changes.subscribe(this.emitCRUDEvent.bind(this)));
1597
- }
1598
- emitCRUDEvent(args) {
1599
- // eslint-disable-next-line prefer-const
1600
- let { action, formGroup, dataItem } = args;
1601
- if (action !== 'add' && !dataItem) {
1602
- dataItem = formGroup.value;
1603
- }
1604
- this.view.clear();
1605
- this.changeDetectorRef.markForCheck();
1606
- this.closeCell();
1607
- Object.assign(args, {
1608
- dataItem: dataItem,
1609
- sender: this
1610
- });
1611
- switch (action) {
1612
- case 'add':
1613
- this.add.emit(args);
1614
- break;
1615
- case 'cancel':
1616
- this.cancel.emit(args);
1617
- break;
1618
- case 'edit':
1619
- this.edit.emit(args);
1620
- break;
1621
- case 'remove':
1622
- this.remove.emit(args);
1623
- break;
1624
- case 'save':
1625
- this.save.emit(args);
1626
- break;
1627
- case 'cellClose':
1628
- this.cellClose.emit(args);
1629
- break;
1630
- default: break;
1631
- }
1632
- }
1633
- attachDomEventHandlers() {
1634
- this.subscriptions.add(this.domEvents.cellClick.subscribe((args) => {
1635
- if (hasObservers(this.cellClick) || this.selectionService.enabled) {
1636
- this.ngZone.run(() => {
1637
- this.cellClick.emit(Object.assign({ sender: this }, args));
1638
- this.selectionService.click(args);
1639
- });
1640
- }
1641
- }));
1642
- }
1643
- attachElementEventHandlers() {
1644
- if (isUniversal()) {
1645
- return;
1646
- }
1647
- const wrapper = this.wrapper.nativeElement;
1648
- const ariaRoot = this.ariaRoot.nativeElement;
1649
- this.ngZone.runOutsideAngular(() => {
1650
- const resizeCheck = this.resizeCheck.bind(this);
1651
- const resizeSubscription = this.renderer.listen('window', 'resize', resizeCheck);
1652
- const orientationSubscription = this.renderer.listen('window', 'orientationchange', resizeCheck);
1653
- const documentClickSubscription = this.renderer.listen('document', 'click', (args) => {
1654
- const activeElement = document.activeElement;
1655
- if (this.editService.shouldCloseCell() &&
1656
- !closest(args.target, matchesClasses('k-animation-container k-treelist-ignore-click')) &&
1657
- !(activeElement &&
1658
- (closest(activeElement, matchesClasses('k-animation-container')) ||
1659
- isInEditedCell(activeElement, this.wrapper.nativeElement)))) {
1660
- this.editService.closeCell(args);
1661
- }
1662
- });
1663
- const windowBlurSubscription = this.renderer.listen('window', 'blur', (args) => {
1664
- const activeElement = document.activeElement;
1665
- if (activeElement && !(matchesNodeName('input')(activeElement) && activeElement.type === 'file' &&
1666
- isInEditedCell(activeElement, this.wrapper.nativeElement))) {
1667
- this.editService.closeCell(args);
1668
- }
1669
- this.domEvents.windowBlur.emit(args);
1670
- });
1671
- const clickSubscription = this.renderer.listen(wrapper, 'click', (args) => {
1672
- this.domEvents.click.emit(args);
1673
- });
1674
- const keydownSubscription = this.renderer.listen(wrapper, 'keydown', (args) => {
1675
- this.domEvents.keydown.emit(args);
1676
- });
1677
- // focusIn and focusOut are relative to the element with ARIA role "treegrid"
1678
- let focused = false;
1679
- const focusInSubscription = this.renderer.listen(ariaRoot, 'focusin', (args) => {
1680
- this.domEvents.focus.emit(args);
1681
- if (!focused) {
1682
- this.domEvents.focusIn.emit(args);
1683
- focused = true;
1684
- }
1685
- });
1686
- const focusOutSubscription = this.renderer.listen(ariaRoot, 'focusout', (args) => {
1687
- const next = args.relatedTarget || document.activeElement;
1688
- const outside = !closest(next, (node) => node === ariaRoot);
1689
- if (outside) {
1690
- this.domEvents.focusOut.emit(args);
1691
- focused = false;
1692
- }
1693
- });
1694
- this.detachElementEventHandlers = () => {
1695
- resizeSubscription();
1696
- orientationSubscription();
1697
- documentClickSubscription();
1698
- windowBlurSubscription();
1699
- clickSubscription();
1700
- keydownSubscription();
1701
- focusInSubscription();
1702
- focusOutSubscription();
1703
- };
1704
- });
1705
- }
1706
- matchesMedia(c) {
1707
- return this.responsiveService.matchesMedia(c.media);
1708
- }
1709
- resizeCheck() {
1710
- if (window.innerWidth !== this.cachedWindowWidth) {
1711
- this.cachedWindowWidth = window.innerWidth;
1712
- let hasChanges = false;
1713
- this.columnList.filterHierarchy(column => {
1714
- const matchesMedia = this.matchesMedia(column);
1715
- if (column.matchesMedia !== matchesMedia) {
1716
- hasChanges = true;
1717
- column.matchesMedia = matchesMedia;
1718
- }
1719
- return column.isVisible;
1720
- });
1721
- if (hasChanges) {
1722
- this.ngZone.run(() => {
1723
- this.changeDetectorRef.markForCheck();
1724
- });
1725
- }
1726
- }
1727
- }
1728
- emitPDFExportEvent() {
1729
- const args = new PDFExportEvent();
1730
- this.pdfExport.emit(args);
1731
- if (!args.isDefaultPrevented()) {
1732
- this.saveAsPDF();
1733
- }
1734
- }
1735
- syncHeaderHeight(observable) {
1736
- return observable
1737
- .pipe(filter(() => isPresent(this.lockedHeader)))
1738
- .subscribe(() => syncRowsHeight(this.lockedHeader.nativeElement.children[0], this.header.nativeElement.children[0]));
1739
- }
1740
- columnsContainerChange() {
1741
- this.subscriptions.add(this.syncHeaderHeight(this.columnsContainer.changes.pipe(filter(() => this.lockedColumns.length > 0), switchMap(() => this.ngZone.onStable.asObservable().pipe(take(1))))));
1742
- }
1743
- handleColumnResize() {
1744
- const resizes = this.columnResizingService.changes;
1745
- this.subscriptions.add(resizes.pipe(tap(e => {
1746
- if (e.type === 'start') {
1747
- this.renderer.addClass(this.wrapper.nativeElement, 'k-grid-column-resizing');
1748
- }
1749
- else if (e.type === 'end') {
1750
- this.renderer.removeClass(this.wrapper.nativeElement, 'k-grid-column-resizing');
1751
- }
1752
- }), filter(e => e.type === 'start'), switchMap(() => resizes.pipe(takeUntil(resizes.pipe(filter(e => e.type === 'triggerAutoFit'))), filter(e => e.type === 'end'))))
1753
- .subscribe(this.notifyResize.bind(this)));
1754
- }
1755
- notifyResize(e) {
1756
- const args = e.resizedColumns
1757
- .filter(item => isTruthy(item.column.resizable) && !item.column.isColumnGroup)
1758
- .map(item => ({
1759
- column: item.column,
1760
- newWidth: item.column.width,
1761
- oldWidth: item.oldWidth
1762
- }));
1763
- if (hasObservers(this.columnResize)) {
1764
- this.ngZone.run(() => {
1765
- this.columnResize.emit(args);
1766
- });
1767
- }
1768
- }
1769
- assertNavigable() {
1770
- if (isDevMode() && !this.navigable) {
1771
- throw new Error('The TreeList should be navigable to control focus');
1772
- }
1773
- }
1774
- _rowClass = () => null;
1775
- navigationMetadata() {
1776
- const isVirtual = this.isVirtual;
1777
- const filterRowOffset = hasFilterRow(this.filterable) ? 1 : 0;
1778
- const headerRows = this.totalColumnLevels + 1 + filterRowOffset;
1779
- return new NavigationMetadata(this.view, headerRows, isVirtual, this.showPager, this.wrapper, this.virtualColumns, this.columnsContainer);
1780
- }
1781
- updateNavigationMetadata() {
1782
- this.navigationService.metadata = this.navigationMetadata();
1783
- }
1784
- applyAutoSize() {
1785
- const cols = this.columns.filter((c) => this.autoSize ? c.autoSize !== false : c.autoSize);
1786
- if (cols.length > 0) {
1787
- this.ngZone.onStable.pipe(take(1)).subscribe(_ => this.autoFitColumns(cols));
1788
- }
1789
- }
1790
- onColumnRangeChange(range) {
1791
- const viewportColumns = this.viewportColumns = [];
1792
- const columnsArray = this.columnsContainer.nonLockedLeafColumns.toArray();
1793
- const leafViewportColumns = columnsArray.slice(range.start, range.end + 1);
1794
- for (let idx = 0; idx < leafViewportColumns.length; idx++) {
1795
- let column = leafViewportColumns[idx];
1796
- while (column.parent) {
1797
- column = column.parent;
1798
- }
1799
- const toAdd = [column];
1800
- while (toAdd.length) {
1801
- column = toAdd.shift();
1802
- viewportColumns.push(column);
1803
- if (column.isColumnGroup) {
1804
- const children = columnsArray.filter(c => c.parent && c.parent.id === column.id);
1805
- toAdd.unshift(...children);
1806
- }
1807
- }
1808
- const lastFromGroup = viewportColumns[viewportColumns.length - 1];
1809
- column = leafViewportColumns[idx];
1810
- while (column !== lastFromGroup && idx < leafViewportColumns.length) {
1811
- idx++;
1812
- column = leafViewportColumns[idx];
1813
- }
1814
- }
1815
- if (range.start > 0) {
1816
- const first = leafViewportColumns[0];
1817
- let offset = range.offset;
1818
- let current = viewportColumns[0];
1819
- let index = 0;
1820
- while (current !== first) {
1821
- offset -= current.isColumnGroup ? 0 : current.width;
1822
- index++;
1823
- current = viewportColumns[index];
1824
- }
1825
- if (offset > 0) {
1826
- const totalLevels = this.columnsContainer.totalLevels;
1827
- let previous;
1828
- for (let idx = 0; idx <= totalLevels; idx++) {
1829
- const offsetColumn = idx < totalLevels ? new ColumnGroupComponent(previous) : new ColumnBase(previous);
1830
- previous = offsetColumn;
1831
- offsetColumn.title = "\u00A0";
1832
- offsetColumn.width = offset;
1833
- viewportColumns.unshift(offsetColumn);
1834
- }
1835
- }
1836
- }
1837
- this.leafViewportColumns = viewportColumns.filter(c => !c.isColumnGroup);
1838
- }
1839
- dataLoaded(result) {
1840
- this.loadedData = result || [];
1841
- this.view.reset();
1842
- this.dataChanged = true;
1843
- this.changeDetectorRef.markForCheck();
1844
- }
1845
- unsubscribeDataLoaded() {
1846
- if (this.dataLoadedSubscription) {
1847
- this.dataLoadedSubscription.unsubscribe();
1848
- this.dataLoadedSubscription = null;
1849
- }
1850
- }
1851
- loadColumns(columns) {
1852
- this.columns.reset(columns.toArray());
1853
- this.columns.notifyOnChanges();
1854
- }
1855
- notifyReorderContainers() {
1856
- this.dragTargetContainer?.notify();
1857
- this.dropTargetContainer?.notify();
1858
- }
1859
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TreeListComponent, deps: [{ token: i1.BrowserSupportService }, { token: i0.ElementRef }, { token: i2.ChangeNotificationService }, { token: i3.EditService }, { token: i4.FilterService }, { token: i5.PDFService }, { token: i6.ResponsiveService }, { token: i0.Renderer2 }, { token: i7.ExcelService }, { token: i0.NgZone }, { token: i8.ScrollSyncService }, { token: i9.DomEventsService }, { token: i10.ColumnResizingService }, { token: i0.ChangeDetectorRef }, { token: i11.ColumnReorderService }, { token: i12.ColumnInfoService }, { token: i13.NavigationService }, { token: i14.SortService }, { token: i15.ScrollRequestService }, { token: i16.ExpandStateService }, { token: i17.OptionChangesService }, { token: i18.SelectionService }, { token: i19.LocalizationService }, { token: i20.ContextService }, { token: i21.RowReorderService }], target: i0.ɵɵFactoryTarget.Component });
1860
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TreeListComponent, isStandalone: true, selector: "kendo-treelist", inputs: { ariaLabel: ["aria-label", "ariaLabel"], data: "data", pageSize: "pageSize", height: "height", rowHeight: "rowHeight", skip: "skip", scrollable: "scrollable", sort: "sort", trackBy: "trackBy", filter: "filter", virtualColumns: "virtualColumns", filterable: "filterable", sortable: "sortable", pageable: "pageable", navigable: "navigable", autoSize: "autoSize", rowClass: "rowClass", resizable: "resizable", reorderable: "reorderable", loading: "loading", columnMenu: "columnMenu", hideHeader: "hideHeader", idField: "idField", selectable: "selectable", isSelected: "isSelected", rowReorderable: "rowReorderable", columnsRef: ["columns", "columnsRef"], fetchChildren: "fetchChildren", hasChildren: "hasChildren", isExpanded: "isExpanded" }, outputs: { selectionChange: "selectionChange", filterChange: "filterChange", pageChange: "pageChange", sortChange: "sortChange", dataStateChange: "dataStateChange", edit: "edit", cancel: "cancel", save: "save", remove: "remove", add: "add", cellClose: "cellClose", cellClick: "cellClick", pdfExport: "pdfExport", excelExport: "excelExport", columnResize: "columnResize", columnReorder: "columnReorder", columnVisibilityChange: "columnVisibilityChange", columnLockedChange: "columnLockedChange", scrollBottom: "scrollBottom", contentScroll: "contentScroll", expandEvent: "expand", collapseEvent: "collapse", expandStateChange: "expandStateChange", rowReorder: "rowReorder" }, host: { properties: { "attr.dir": "this.dir", "class.k-grid": "this.hostClasses", "class.k-grid-md": "this.hostClasses", "class.k-treelist": "this.hostClasses", "class.k-grid-lockedcolumns": "this.lockedClasses", "class.k-grid-virtual": "this.virtualClasses", "class.k-grid-no-scrollbar": "this.noScrollbarClass" } }, providers: [
1861
- BrowserSupportService,
1862
- LocalizationService,
1863
- ColumnInfoService,
1864
- ChangeNotificationService,
1865
- EditService,
1866
- PDFService,
1867
- SuspendService,
1868
- {
1869
- provide: L10N_PREFIX,
1870
- useValue: 'kendo.treelist'
1871
- },
1872
- FilterService,
1873
- ResponsiveService,
1874
- PagerContextService,
1875
- PagerNavigationService,
1876
- ExcelService,
1877
- ScrollSyncService,
1878
- ResizeService,
1879
- DomEventsService,
1880
- ColumnResizingService,
1881
- SinglePopupService,
1882
- DragAndDropService,
1883
- DragHintService,
1884
- DropCueService,
1885
- ColumnReorderService,
1886
- NavigationService,
1887
- FocusRoot,
1888
- IdService,
1889
- ScrollRequestService,
1890
- SortService,
1891
- ExpandStateService,
1892
- OptionChangesService,
1893
- SelectionService,
1894
- {
1895
- provide: DataBoundTreeComponent,
1896
- useExisting: forwardRef(() => TreeListComponent)
1897
- },
1898
- {
1899
- provide: ExpandableTreeComponent,
1900
- useExisting: forwardRef(() => TreeListComponent)
1901
- },
1902
- ContextService,
1903
- RowReorderService
1904
- ], queries: [{ propertyName: "columns", predicate: ColumnBase }, { propertyName: "noRecordsTemplateChildren", predicate: NoRecordsTemplateDirective }, { propertyName: "pagerTemplateChildren", predicate: PagerTemplateDirective }, { propertyName: "toolbarTemplateChildren", predicate: ToolbarTemplateDirective }, { propertyName: "columnMenuTemplates", predicate: ColumnMenuTemplateDirective }], viewQueries: [{ propertyName: "lockedHeader", first: true, predicate: ["lockedHeader"], descendants: true }, { propertyName: "header", first: true, predicate: ["header"], descendants: true }, { propertyName: "ariaRoot", first: true, predicate: ["ariaRoot"], descendants: true, static: true }, { propertyName: "dragTargetContainer", first: true, predicate: DragTargetContainerDirective, descendants: true }, { propertyName: "dropTargetContainer", first: true, predicate: DropTargetContainerDirective, descendants: true }, { propertyName: "listComponent", first: true, predicate: ListComponent, descendants: true }, { propertyName: "footer", predicate: ["footer"], descendants: true }], exportAs: ["kendoTreeList"], usesOnChanges: true, ngImport: i0, template: `
1905
- <ng-container kendoTreeListLocalizedMessages
1906
- i18n-noRecords="kendo.treelist.noRecords|The label visible in the TreeList when there are no records"
1907
- noRecords="No records available."
1908
-
1909
- i18n-pagerLabel="kendo.treelist.pagerLabel|The label for the TreeList pager"
1910
- pagerLabel="{{ 'Page navigation, page {currentPage} of {totalPages}' }}"
1911
-
1912
- i18n-pagerFirstPage="kendo.treelist.pagerFirstPage|The label for the first page button in TreeList pager"
1913
- pagerFirstPage="Go to the first page"
1914
-
1915
- i18n-pagerPreviousPage="kendo.treelist.pagerPreviousPage|The label for the previous page button in TreeList pager"
1916
- pagerPreviousPage="Go to the previous page"
1917
-
1918
- i18n-pagerNextPage="kendo.treelist.pagerNextPage|The label for the next page button in TreeList pager"
1919
- pagerNextPage="Go to the next page"
1920
-
1921
- i18n-pagerLastPage="kendo.treelist.pagerLastPage|The label for the last page button in TreeList pager"
1922
- pagerLastPage="Go to the last page"
1923
-
1924
- i18n-pagerPage="kendo.treelist.pagerPage|The label before the current page number in the TreeList pager"
1925
- pagerPage="Page"
1926
-
1927
- i18n-pagerOf="kendo.treelist.pagerOf|The label before the total pages number in the TreeList pager"
1928
- pagerOf="of"
1929
-
1930
- i18n-pagerPageNumberInputTitle="kendo.treelist.pagerPageNumberInputTitle|The label for the pager input in the Treelist pager"
1931
- pagerPageNumberInputTitle="Page Number"
1932
-
1933
- i18n-pagerItemsPerPage="kendo.treelist.pagerItemsPerPage|The label for the page size chooser in the TreeList pager"
1934
- pagerItemsPerPage="items per page"
1935
-
1936
- i18n-pagerItemsTotal="kendo.treelist.pagerItemsTotal|The label after the total items count in the TreeList pager"
1937
- pagerItemsTotal="items total"
1938
-
1939
- i18n-pagerInputLabel="kendo.treelist.pagerInputLabel|The text of the aria-label attribute applied to the input element for entering the page number"
1940
- pagerInputLabel="Type a page number"
1941
-
1942
- i18n-filterCellOperatorLabel="kendo.treelist.filterCellOperatorLabel|The label of the filter cell operators dropdown"
1943
- filterCellOperatorLabel="{{ 'Filter cell operators for {columnName}' }}"
1944
-
1945
- i18n-booleanFilterCellLabel="kendo.treelist.booleanFilterCellLabel|The label of the boolean filter cell dropdown"
1946
- booleanFilterCellLabel="{{ 'Boolean filter cell for {columnName}' }}"
1947
-
1948
- i18n-filter="kendo.treelist.filter|The label of the filter cell or icon"
1949
- filter="Filter"
1950
-
1951
- i18n-filterEqOperator="kendo.treelist.filterEqOperator|The text of the equal filter operator"
1952
- filterEqOperator="Is equal to"
1953
-
1954
- i18n-filterNotEqOperator="kendo.treelist.filterNotEqOperator|The text of the not equal filter operator"
1955
- filterNotEqOperator="Is not equal to"
1956
-
1957
- i18n-filterIsNullOperator="kendo.treelist.filterIsNullOperator|The text of the is null filter operator"
1958
- filterIsNullOperator="Is null"
1959
-
1960
- i18n-filterIsNotNullOperator="kendo.treelist.filterIsNotNullOperator|The text of the is not null filter operator"
1961
- filterIsNotNullOperator="Is not null"
1962
-
1963
- i18n-filterIsEmptyOperator="kendo.treelist.filterIsEmptyOperator|The text of the is empty filter operator"
1964
- filterIsEmptyOperator="Is empty"
1965
-
1966
- i18n-filterIsNotEmptyOperator="kendo.treelist.filterIsNotEmptyOperator|The text of the is not empty filter operator"
1967
- filterIsNotEmptyOperator="Is not empty"
1968
-
1969
- i18n-filterStartsWithOperator="kendo.treelist.filterStartsWithOperator|The text of the starts with filter operator"
1970
- filterStartsWithOperator="Starts with"
1971
-
1972
- i18n-filterContainsOperator="kendo.treelist.filterContainsOperator|The text of the contains filter operator"
1973
- filterContainsOperator="Contains"
1974
-
1975
- i18n-filterNotContainsOperator="kendo.treelist.filterNotContainsOperator|The text of the does not contain filter operator"
1976
- filterNotContainsOperator="Does not contain"
1977
-
1978
- i18n-filterEndsWithOperator="kendo.treelist.filterEndsWithOperator|The text of the ends with filter operator"
1979
- filterEndsWithOperator="Ends with"
1980
-
1981
- i18n-filterGteOperator="kendo.treelist.filterGteOperator|The text of the greater than or equal filter operator"
1982
- filterGteOperator="Is greater than or equal to"
1983
-
1984
- i18n-filterGtOperator="kendo.treelist.filterGtOperator|The text of the greater than filter operator"
1985
- filterGtOperator="Is greater than"
1986
-
1987
- i18n-filterLteOperator="kendo.treelist.filterLteOperator|The text of the less than or equal filter operator"
1988
- filterLteOperator="Is less than or equal to"
1989
-
1990
- i18n-filterLtOperator="kendo.treelist.filterLtOperator|The text of the less than filter operator"
1991
- filterLtOperator="Is less than"
1992
-
1993
- i18n-filterIsTrue="kendo.treelist.filterIsTrue|The text of the IsTrue boolean filter option"
1994
- filterIsTrue="Is True"
1995
-
1996
- i18n-filterIsFalse="kendo.treelist.filterIsFalse|The text of the IsFalse boolean filter option"
1997
- filterIsFalse="Is False"
1998
-
1999
- i18n-filterBooleanAll="kendo.treelist.filterBooleanAll|The text of the (All) boolean filter option"
2000
- filterBooleanAll="(All)"
2001
-
2002
- i18n-filterAfterOrEqualOperator="kendo.treelist.filterAfterOrEqualOperator|The text of the after or equal date filter operator"
2003
- filterAfterOrEqualOperator="Is after or equal to"
2004
-
2005
- i18n-filterAfterOperator="kendo.treelist.filterAfterOperator|The text of the after date filter operator"
2006
- filterAfterOperator="Is after"
2007
-
2008
- i18n-filterBeforeOperator="kendo.treelist.filterBeforeOperator|The text of the before date filter operator"
2009
- filterBeforeOperator="Is before"
2010
-
2011
- i18n-filterBeforeOrEqualOperator="kendo.treelist.filterBeforeOrEqualOperator|The text of the before or equal date filter operator"
2012
- filterBeforeOrEqualOperator="Is before or equal to"
2013
-
2014
- i18n-filterFilterButton="kendo.treelist.filterFilterButton|The text of the filter button"
2015
- filterFilterButton="Filter"
2016
-
2017
- i18n-filterClearButton="kendo.treelist.filterClearButton|The text of the clear filter button"
2018
- filterClearButton="Clear"
2019
-
2020
- i18n-filterAndLogic="kendo.treelist.filterAndLogic|The text of the And filter logic"
2021
- filterAndLogic="And"
2022
-
2023
- i18n-filterOrLogic="kendo.treelist.filterOrLogic|The text of the Or filter logic"
2024
- filterOrLogic="Or"
2025
-
2026
- i18n-filterDateToday="kendo.treelist.filterDateToday|The text of the Today button of the Date filter."
2027
- filterDateToday="TODAY"
2028
-
2029
- i18n-filterDateToggle="kendo.treelist.filterDateToggle|The title of the Toggle button of the Date filter."
2030
- filterDateToggle="Toggle Calendar"
2031
-
2032
- i18n-filterNumericDecrement="kendo.treelist.filterNumericDecrement|The title of the Decrement button of the Numeric filter."
2033
- filterNumericDecrement="Decrement"
2034
-
2035
- i18n-filterNumericIncrement="kendo.treelist.filterNumericIncrement|The title of the Increment button of the Numeric filter."
2036
- filterNumericIncrement="Increment"
2037
-
2038
- i18n-loading="kendo.treelist.loading|The loading text"
2039
- loading="Loading"
2040
-
2041
- i18n-filterInputLabel="kendo.treelist.filterInputLabel|The label of the filter row and menu inputs"
2042
- filterInputLabel="{{ '{columnName} Filter' }}"
2043
-
2044
- i18n-filterMenuLogicDropDownLabel="kendo.treelist.filterMenuLogicDropDownLabel|The label of the filter menu logic dropdown"
2045
- filterMenuLogicDropDownLabel="{{ '{columnName} Filter Logic' }}"
2046
-
2047
- i18n-filterMenuOperatorsDropDownLabel="kendo.treelist.filterMenuOperatorsDropDownLabel|The label of the filter menu operators dropdown"
2048
- filterMenuOperatorsDropDownLabel="{{ '{columnName} Filter Operators' }}"
2049
-
2050
- i18n-filterMenuTitle="kendo.treelist.filterMenuTitle|The title of the filter menu icon"
2051
- filterMenuTitle="{{ '{columnName} Filter Menu' }}"
2052
-
2053
- i18n-columnMenu="kendo.treelist.columnMenu|The title of the column menu icon"
2054
- columnMenu="{{ '{columnName} Column Menu' }}"
2055
-
2056
- i18n-columns="kendo.treelist.columns|The text shown in the column menu for the columns item"
2057
- columns="Columns"
2058
-
2059
- i18n-lock="kendo.treelist.lock|The text shown in the column menu for the lock item"
2060
- lock="Lock"
2061
-
2062
- i18n-unlock="kendo.treelist.unlock|The text shown in the column menu for the unlock item"
2063
- unlock="Unlock"
2064
-
2065
- i18n-sortable="kendo.treelist.sortable|The label of the sort icon"
2066
- sortable="Sortable"
2067
-
2068
- i18n-sortAscending="kendo.treelist.sortAscending|The text shown in the column menu for the sort ascending item"
2069
- sortAscending="Sort Ascending"
2070
-
2071
- i18n-sortDescending="kendo.treelist.sortDescending|The text shown in the column menu for the sort descending item"
2072
- sortDescending="Sort Descending"
2073
-
2074
- i18n-sortedDefault="kendo.treelist.sortedDefault|The status announcement when a column is no longer sorted"
2075
- sortedDefault="Not Sorted"
2076
-
2077
- i18n-columnsApply="kendo.treelist.columnsApply|The text shown in the column menu or column chooser for the columns apply button"
2078
- columnsApply="Apply"
2079
-
2080
- i18n-columnsReset="kendo.treelist.columnsReset|The text shown in the column menu or column chooser for the columns reset button"
2081
- columnsReset="Reset"
2082
-
2083
- i18n-pagerSelectPage="kendo.treelist.pagerSelectPage|The text of the title and aria-label attributes applied to the page chooser in the TreeList Pager"
2084
- pagerSelectPage="Select page"
2085
-
2086
- i18n-topToolbarLabel="kendo.treelist.topToolbarLabel|The label of the TreeList top toolbar"
2087
- topToolbarLabel="Top toolbar"
2088
-
2089
- i18n-bottomToolbarLabel="kendo.treelist.bottomToolbarLabel|The label of the TreeList bottom toolbar"
2090
- bottomToolbarLabel="Bottom toolbar"
2091
-
2092
- i18n-dragRowHandleLabel="kendo.treelist.dragRowHandleLabel|The label for the TreeList drag row handle"
2093
- dragRowHandleLabel="Drag row"
2094
-
2095
- i18n-selectRowCheckboxLabel="kendo.treelist.selectRowCheckboxLabel|The label for the select row checkbox"
2096
- selectRowCheckboxLabel="Select row"
2097
-
2098
- i18n-selectAllRowsCheckboxLabel="kendo.treelist.selectAllRowsCheckboxLabel|The label for the select all rows checkbox"
2099
- selectAllRowsCheckboxLabel="Select all rows"
2100
-
2101
- i18n-autosizeAllColumns="kendo.treelist.autosizeAllColumns|The text shown in the column menu for the autosize all columns item"
2102
- autosizeAllColumns="Autosize All Columns"
2103
-
2104
- i18n-autosizeThisColumn="kendo.treelist.autosizeThisColumn|The text shown in the column menu for the autosize this column item"
2105
- autosizeThisColumn="Autosize This Column"
2106
- >
2107
- </ng-container>
2108
- @if (showTopToolbar) {
2109
- <kendo-treelist-toolbar
2110
- position="top"
2111
- [navigable]="navigable"
2112
- [attr.aria-label]="messageFor('topToolbarLabel')"
2113
- [attr.aria-controls]="ariaRootId"></kendo-treelist-toolbar>
2114
- }
2115
- <ng-content select="kendo-toolbar"></ng-content>
2116
- <div #ariaRoot
2117
- class="k-grid-aria-root"
2118
- role="treegrid"
2119
- [id]="ariaRootId"
2120
- [attr.aria-rowcount]="ariaRowCount"
2121
- [attr.aria-colcount]="ariaColCount"
2122
- [attr.aria-multiselectable]="ariaMultiselectable"
2123
- [attr.aria-label]="ariaLabel"
2124
- kendoDragTargetContainer
2125
- kendoDropTargetContainer
2126
- mode="manual"
2127
- [dragDisabled]="!rowReorderable"
2128
- [dropDisabled]="!rowReorderable"
2129
- [dragTargetFilter]="getDefaultSelectors('dragTarget')"
2130
- [dropTargetFilter]="getDefaultSelectors('dropTarget')"
2131
- [dragHandle]="getDefaultSelectors('handle')"
2132
- [hint]="{hintTemplate: defaultHint}"
2133
- (onPress)="handleReorderEvents($event, 'press')"
2134
- (onDragStart)="handleReorderEvents($event, 'dragStart')"
2135
- (onDrag)="handleReorderEvents($event, 'drag')"
2136
- (onDragEnter)="handleReorderEvents($event, 'dragEnter')"
2137
- (onDragLeave)="handleReorderEvents($event, 'dragLeave')"
2138
- (onDragEnd)="handleReorderEvents($event, 'dragEnd')"
2139
- (onDrop)="handleReorderEvents($event, 'drop')"
2140
- [dragData]="treeListData">
2141
- @if (isScrollable) {
2142
- @if (!hideHeader) {
2143
- <div
2144
- class="k-grid-header"
2145
- role="presentation"
2146
- [style.padding]="headerPadding">
2147
- @if (isLocked) {
2148
- <div
2149
- #lockedHeader
2150
- role="presentation"
2151
- class="k-grid-header-locked"
2152
- [style.width.px]="lockedWidth">
2153
- <table
2154
- kendoTreeListResizableTable
2155
- [locked]="true"
2156
- role="presentation"
2157
- [style.width.px]="lockedWidth"
2158
- class="k-grid-header-table k-table k-table-md">
2159
- <colgroup
2160
- kendoTreeListColGroup
2161
- [columns]="$any(lockedLeafColumns)">
2162
- </colgroup>
2163
- <thead kendoTreeListHeader
2164
- role="rowgroup"
2165
- [resizable]="resizable"
2166
- [scrollable]="true"
2167
- [columns]="$any(lockedColumns)"
2168
- [totalColumnLevels]="totalColumnLevels"
2169
- [sort]="sort"
2170
- [filter]="filter"
2171
- [filterable]="filterable"
2172
- [reorderable]="reorderable"
2173
- [sortable]="sortable"
2174
- [columnMenu]="columnMenuOptions"
2175
- [columnMenuTemplate]="columnMenuTemplate"
2176
- [totalColumnsCount]="leafColumns.length"
2177
- [totalColumns]="columnsContainer"
2178
- [tabIndex]="navigation.enabled ? '-1' : '0'">
2179
- </thead>
2180
- </table>
2181
- </div>
2182
- }
2183
- <div #header class="k-grid-header-wrap" role="presentation" data-scrollable
2184
- [kendoTreeListResizableContainer]="lockedLeafColumns.length > 0"
2185
- [lockedWidth]="lockedWidth + scrollbarWidth + 2">
2186
- <table
2187
- role="presentation"
2188
- [style.width.px]="nonLockedWidth"
2189
- kendoTreeListResizableTable
2190
- [virtualColumns]="virtualColumns"
2191
- class="k-grid-header-table k-table k-table-md">
2192
- <colgroup
2193
- kendoTreeListColGroup
2194
- [columns]="headerLeafColumns">
2195
- </colgroup>
2196
- <thead kendoTreeListHeader
2197
- [resizable]="resizable"
2198
- role="rowgroup"
2199
- [scrollable]="true"
2200
- [columns]="headerColumns"
2201
- [totalColumnLevels]="totalColumnLevels"
2202
- [sort]="sort"
2203
- [filter]="filter"
2204
- [filterable]="filterable"
2205
- [reorderable]="reorderable"
2206
- [sortable]="sortable"
2207
- [columnMenu]="columnMenuOptions"
2208
- [columnMenuTemplate]="columnMenuTemplate"
2209
- [lockedColumnsCount]="lockedLeafColumns.length"
2210
- [totalColumnsCount]="leafColumns.length"
2211
- [totalColumns]="columnsContainer"
2212
- [tabIndex]="navigation.enabled ? '-1' : '0'">
2213
- </thead>
2214
- </table>
2215
- @if (virtualColumns) {
2216
- <div class="k-width-container" role="presentation">
2217
- <div [style.width.px]="columnsContainer.unlockedWidth"></div>
2218
- </div>
2219
- }
2220
- </div>
2221
- </div>
2222
- }
2223
- <kendo-treelist-list
2224
- [view]="view"
2225
- [loading]="showLoading"
2226
- [rowHeight]="rowHeight"
2227
- [total]="totalCount"
2228
- [take]="pageSize"
2229
- [skip]="skip"
2230
- [trackBy]="trackBy"
2231
- [columns]="columnsContainer"
2232
- [filterable]="filterable"
2233
- [noRecordsTemplate]="noRecordsTemplate"
2234
- (pageChange)="notifyPageChange('list', $event)"
2235
- [rowClass]="rowClass"
2236
- [isVirtual]="isVirtual"
2237
- [virtualColumns]="virtualColumns"
2238
- [expandIcons]="expandIcons"
2239
- (scrollBottom)="notifyScrollBottom()"
2240
- (contentScroll)="contentScroll.emit($event)"
2241
- kendoDraggable
2242
- kendoTreeListSelectionMarquee
2243
- [enableDrag]="marqueeSelection">
2244
- </kendo-treelist-list>
2245
- }
2246
- @if (!isScrollable) {
2247
- <table
2248
- class="k-table k-table-md k-grid-header-table"
2249
- role="presentation"
2250
- [style.table-layout]="resizable ? 'fixed' : null"
2251
- kendoTreeListResizableTable>
2252
- <colgroup
2253
- kendoTreeListColGroup
2254
- [columns]="$any(leafColumns)">
2255
- </colgroup>
2256
- @if (!hideHeader) {
2257
- <thead kendoTreeListHeader
2258
- role="rowgroup"
2259
- [resizable]="resizable"
2260
- [scrollable]="false"
2261
- [columns]="$any(visibleColumns)"
2262
- [totalColumnLevels]="totalColumnLevels"
2263
- [reorderable]="reorderable"
2264
- [sort]="sort"
2265
- [sortable]="sortable"
2266
- [filter]="filter"
2267
- [filterable]="filterable"
2268
- [columnMenu]="columnMenuOptions"
2269
- [columnMenuTemplate]="columnMenuTemplate"
2270
- [totalColumns]="columnsContainer"
2271
- [tabIndex]="navigation.enabled ? '-1' : '0'">
2272
- </thead>
2273
- }
2274
- <tbody kendoTreeListTableBody
2275
- [view]="view"
2276
- [skip]="skip"
2277
- [columns]="$any(leafColumns)"
2278
- [filterable]="filterable"
2279
- [noRecordsTemplate]="noRecordsTemplate"
2280
- [trackBy]="trackBy"
2281
- [rowClass]="rowClass"
2282
- [expandIcons]="expandIcons"
2283
- kendoDraggable
2284
- kendoTreeListSelectionMarquee
2285
- [enableDrag]="marqueeSelection">
2286
- </tbody>
2287
- </table>
2288
- @if (showLoading) {
2289
- <div kendoTreeListLoading>
2290
- </div>
2291
- }
2292
- }
2293
- </div>
2294
- @if (showPager) {
2295
- <kendo-pager
2296
- #pager
2297
- class="k-grid-pager"
2298
- [navigable]="navigable"
2299
- [pageSize]="pageSize"
2300
- [total]="view.totalVisible"
2301
- [skip]="skip"
2302
- [responsive]="normalizedPageableSettings.responsive && !pagerTemplate"
2303
- [buttonCount]="normalizedPageableSettings.buttonCount"
2304
- [info]="normalizedPageableSettings.info"
2305
- [pageSizeValues]="normalizedPageableSettings.pageSizes"
2306
- [previousNext]="normalizedPageableSettings.previousNext"
2307
- [type]="normalizedPageableSettings.type"
2308
- (pageChange)="notifyPageChange('pager', $event)"
2309
- (pagerInputVisibilityChange)="handlePagerVisibilityChange('showPagerInput', $event)"
2310
- (pageTextVisibilityChange)="handlePagerVisibilityChange('showPagerPageText', $event)"
2311
- (itemsTextVisibilityChange)="handlePagerVisibilityChange('showPagerItemsText', $event)">
2312
- <ng-template kendoPagerTemplate>
2313
- <ng-container
2314
- [ngTemplateOutlet]="pagerTemplate ? pagerTemplate?.templateRef : defaultPager"
2315
- [ngTemplateOutletContext]="pager.templateContext"></ng-container>
2316
- </ng-template>
2317
- <kendo-pager-messages
2318
- [ariaLabel]="messageFor('pagerLabel')"
2319
- [firstPage]="messageFor('pagerFirstPage')"
2320
- [inputLabel]="messageFor('pagerInputLabel')"
2321
- [previousPage]="messageFor('pagerPreviousPage')"
2322
- [nextPage]="messageFor('pagerNextPage')"
2323
- [lastPage]="messageFor('pagerLastPage')"
2324
- [selectPage]="messageFor('pagerSelectPage')"
2325
- [page]="messageFor('pagerPage')"
2326
- [itemsPerPage]="messageFor('pagerItemsPerPage')"
2327
- [items]="messageFor('pagerItems')"
2328
- [of]="messageFor('pagerOf')"
2329
- [pageNumberInputTitle]="messageFor('pagerPageNumberInputTitle')">
2330
- </kendo-pager-messages>
2331
- </kendo-pager>
2332
- }
2333
- @if (showBottomToolbar) {
2334
- <kendo-treelist-toolbar
2335
- class="k-grid-toolbar-bottom"
2336
- position="bottom"
2337
- [navigable]="navigable"
2338
- [attr.aria-label]="messageFor('bottomToolbarLabel')"
2339
- [attr.aria-controls]="ariaRootId">
2340
- </kendo-treelist-toolbar>
2341
- }
2342
-
2343
- <ng-template #defaultHint>
2344
- <kendo-icon-wrapper
2345
- [name]="getHintSettings('hintIcon')"
2346
- [svgIcon]="getHintSettings('hintSVGIcon')"
2347
- innerCssClass="k-drag-status">
2348
- </kendo-icon-wrapper>
2349
- {{hintText}}
2350
- </ng-template>
2351
-
2352
- <ng-template #defaultPager>
2353
- <div class="k-pager-numbers-wrap">
2354
- @if (normalizedPageableSettings.previousNext) {
2355
- <kendo-pager-prev-buttons></kendo-pager-prev-buttons>
2356
- }
2357
- @if (normalizedPageableSettings.type === 'numeric' && normalizedPageableSettings.buttonCount > 0) {
2358
- <kendo-pager-numeric-buttons
2359
- [buttonCount]="normalizedPageableSettings.buttonCount">
2360
- </kendo-pager-numeric-buttons>
2361
- }
2362
- @if (normalizedPageableSettings.type === 'input' || showPagerInput) {
2363
- <kendo-pager-input [showPageText]="showPagerPageText"></kendo-pager-input>
2364
- }
2365
- @if (normalizedPageableSettings.previousNext) {
2366
- <kendo-pager-next-buttons></kendo-pager-next-buttons>
2367
- }
2368
- </div>
2369
- @if (normalizedPageableSettings.pageSizes) {
2370
- <kendo-pager-page-sizes
2371
- [pageSizes]="normalizedPageableSettings.pageSizes"
2372
- [showItemsText]="showPagerItemsText">
2373
- </kendo-pager-page-sizes>
2374
- }
2375
- @if (normalizedPageableSettings.info) {
2376
- <kendo-pager-info>
2377
- </kendo-pager-info>
2378
- }
2379
- <kendo-pager-messages
2380
- [ariaLabel]="messageFor('pagerLabel')"
2381
- [firstPage]="messageFor('pagerFirstPage')"
2382
- [inputLabel]="messageFor('pagerInputLabel')"
2383
- [previousPage]="messageFor('pagerPreviousPage')"
2384
- [nextPage]="messageFor('pagerNextPage')"
2385
- [lastPage]="messageFor('pagerLastPage')"
2386
- [selectPage]="messageFor('pagerSelectPage')"
2387
- [page]="messageFor('pagerPage')"
2388
- [itemsPerPage]="messageFor('pagerItemsPerPage')"
2389
- [items]="messageFor('pagerItems')"
2390
- [of]="messageFor('pagerOf')"
2391
- [pageNumberInputTitle]="messageFor('pagerPageNumberInputTitle')">
2392
- </kendo-pager-messages>
2393
- </ng-template>
2394
- `, isInline: true, dependencies: [{ kind: "directive", type: LocalizedMessagesDirective, selector: "[kendoTreeListLocalizedMessages]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ToolbarComponent, selector: "kendo-treelist-toolbar", inputs: ["position", "navigable"] }, { kind: "directive", type: DragTargetContainerDirective, selector: "[kendoDragTargetContainer]", inputs: ["hint", "dragTargetFilter", "dragHandle", "dragDelay", "threshold", "dragTargetId", "dragData", "dragDisabled", "mode", "cursorStyle", "hintContext"], outputs: ["onDragReady", "onPress", "onDragStart", "onDrag", "onRelease", "onDragEnd"], exportAs: ["kendoDragTargetContainer"] }, { kind: "directive", type: DropTargetContainerDirective, selector: "[kendoDropTargetContainer]", inputs: ["dropTargetFilter", "dropDisabled"], outputs: ["onDragEnter", "onDragOver", "onDragLeave", "onDrop"], exportAs: ["kendoDropTargetContainer"] }, { kind: "directive", type: TableDirective, selector: "[kendoTreeListResizableTable]", inputs: ["locked", "virtualColumns"] }, { kind: "component", type: ColGroupComponent, selector: "[kendoTreeListColGroup]", inputs: ["columns"] }, { kind: "component", type: HeaderComponent, selector: "[kendoTreeListHeader]", inputs: ["totalColumnLevels", "columns", "scrollable", "filterable", "sort", "filter", "sortable", "lockedColumnsCount", "resizable", "reorderable", "columnMenu", "columnMenuTemplate", "totalColumnsCount", "totalColumns", "tabIndex"] }, { kind: "directive", type: ResizableContainerDirective, selector: "[kendoTreeListResizableContainer]", inputs: ["lockedWidth", "kendoTreeListResizableContainer"] }, { kind: "component", type: ListComponent, selector: "kendo-treelist-list", inputs: ["view", "total", "rowHeight", "take", "skip", "columns", "noRecordsTemplate", "filterable", "rowClass", "loading", "trackBy", "virtualColumns", "isVirtual", "expandIcons"], outputs: ["contentScroll", "pageChange", "scrollBottom"] }, { kind: "directive", type: DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { kind: "directive", type: MarqueeDirective, selector: "[kendoTreeListSelectionMarquee]" }, { kind: "component", type: TableBodyComponent, selector: "[kendoTreeListTableBody]", inputs: ["columns", "allColumns", "noRecordsTemplate", "view", "skip", "filterable", "noRecordsText", "isLocked", "lockedColumnsCount", "totalColumnsCount", "virtualColumns", "expandIcons", "trackBy", "totalColumns", "rowClass"] }, { kind: "component", type: LoadingComponent, selector: "[kendoTreeListLoading]" }, { kind: "component", type: i22.CustomMessagesComponent, selector: "kendo-datapager-messages, kendo-pager-messages" }, { kind: "component", type: i22.PagerInfoComponent, selector: "kendo-datapager-info, kendo-pager-info" }, { kind: "component", type: i22.PagerInputComponent, selector: "kendo-datapager-input, kendo-pager-input", inputs: ["showPageText", "size"] }, { kind: "component", type: i22.PagerNextButtonsComponent, selector: "kendo-datapager-next-buttons, kendo-pager-next-buttons", inputs: ["size"] }, { kind: "component", type: i22.PagerNumericButtonsComponent, selector: "kendo-datapager-numeric-buttons, kendo-pager-numeric-buttons", inputs: ["buttonCount", "size"] }, { kind: "component", type: i22.PagerPageSizesComponent, selector: "kendo-datapager-page-sizes, kendo-pager-page-sizes", inputs: ["showItemsText", "pageSizes", "size", "adaptiveMode"] }, { kind: "component", type: i22.PagerPrevButtonsComponent, selector: "kendo-datapager-prev-buttons, kendo-pager-prev-buttons", inputs: ["size"] }, { kind: "directive", type: i22.PagerTemplateDirective, selector: "[kendoDataPagerTemplate], [kendoPagerTemplate]" }, { kind: "component", type: i22.PagerComponent, selector: "kendo-datapager, kendo-pager", inputs: ["externalTemplate", "total", "skip", "pageSize", "buttonCount", "info", "type", "pageSizeValues", "previousNext", "navigable", "size", "responsive", "adaptiveMode"], outputs: ["pageChange", "pageSizeChange", "pagerInputVisibilityChange", "pageTextVisibilityChange", "itemsTextVisibilityChange"], exportAs: ["kendoDataPager", "kendoPager"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
2395
- }
2396
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TreeListComponent, decorators: [{
2397
- type: Component,
2398
- args: [{
2399
- changeDetection: ChangeDetectionStrategy.OnPush,
2400
- encapsulation: ViewEncapsulation.None,
2401
- exportAs: 'kendoTreeList',
2402
- providers: [
2403
- BrowserSupportService,
2404
- LocalizationService,
2405
- ColumnInfoService,
2406
- ChangeNotificationService,
2407
- EditService,
2408
- PDFService,
2409
- SuspendService,
2410
- {
2411
- provide: L10N_PREFIX,
2412
- useValue: 'kendo.treelist'
2413
- },
2414
- FilterService,
2415
- ResponsiveService,
2416
- PagerContextService,
2417
- PagerNavigationService,
2418
- ExcelService,
2419
- ScrollSyncService,
2420
- ResizeService,
2421
- DomEventsService,
2422
- ColumnResizingService,
2423
- SinglePopupService,
2424
- DragAndDropService,
2425
- DragHintService,
2426
- DropCueService,
2427
- ColumnReorderService,
2428
- NavigationService,
2429
- FocusRoot,
2430
- IdService,
2431
- ScrollRequestService,
2432
- SortService,
2433
- ExpandStateService,
2434
- OptionChangesService,
2435
- SelectionService,
2436
- {
2437
- provide: DataBoundTreeComponent,
2438
- useExisting: forwardRef(() => TreeListComponent)
2439
- },
2440
- {
2441
- provide: ExpandableTreeComponent,
2442
- useExisting: forwardRef(() => TreeListComponent)
2443
- },
2444
- ContextService,
2445
- RowReorderService
2446
- ],
2447
- selector: 'kendo-treelist',
2448
- template: `
2449
- <ng-container kendoTreeListLocalizedMessages
2450
- i18n-noRecords="kendo.treelist.noRecords|The label visible in the TreeList when there are no records"
2451
- noRecords="No records available."
2452
-
2453
- i18n-pagerLabel="kendo.treelist.pagerLabel|The label for the TreeList pager"
2454
- pagerLabel="{{ 'Page navigation, page {currentPage} of {totalPages}' }}"
2455
-
2456
- i18n-pagerFirstPage="kendo.treelist.pagerFirstPage|The label for the first page button in TreeList pager"
2457
- pagerFirstPage="Go to the first page"
2458
-
2459
- i18n-pagerPreviousPage="kendo.treelist.pagerPreviousPage|The label for the previous page button in TreeList pager"
2460
- pagerPreviousPage="Go to the previous page"
2461
-
2462
- i18n-pagerNextPage="kendo.treelist.pagerNextPage|The label for the next page button in TreeList pager"
2463
- pagerNextPage="Go to the next page"
2464
-
2465
- i18n-pagerLastPage="kendo.treelist.pagerLastPage|The label for the last page button in TreeList pager"
2466
- pagerLastPage="Go to the last page"
2467
-
2468
- i18n-pagerPage="kendo.treelist.pagerPage|The label before the current page number in the TreeList pager"
2469
- pagerPage="Page"
2470
-
2471
- i18n-pagerOf="kendo.treelist.pagerOf|The label before the total pages number in the TreeList pager"
2472
- pagerOf="of"
2473
-
2474
- i18n-pagerPageNumberInputTitle="kendo.treelist.pagerPageNumberInputTitle|The label for the pager input in the Treelist pager"
2475
- pagerPageNumberInputTitle="Page Number"
2476
-
2477
- i18n-pagerItemsPerPage="kendo.treelist.pagerItemsPerPage|The label for the page size chooser in the TreeList pager"
2478
- pagerItemsPerPage="items per page"
2479
-
2480
- i18n-pagerItemsTotal="kendo.treelist.pagerItemsTotal|The label after the total items count in the TreeList pager"
2481
- pagerItemsTotal="items total"
2482
-
2483
- i18n-pagerInputLabel="kendo.treelist.pagerInputLabel|The text of the aria-label attribute applied to the input element for entering the page number"
2484
- pagerInputLabel="Type a page number"
2485
-
2486
- i18n-filterCellOperatorLabel="kendo.treelist.filterCellOperatorLabel|The label of the filter cell operators dropdown"
2487
- filterCellOperatorLabel="{{ 'Filter cell operators for {columnName}' }}"
2488
-
2489
- i18n-booleanFilterCellLabel="kendo.treelist.booleanFilterCellLabel|The label of the boolean filter cell dropdown"
2490
- booleanFilterCellLabel="{{ 'Boolean filter cell for {columnName}' }}"
2491
-
2492
- i18n-filter="kendo.treelist.filter|The label of the filter cell or icon"
2493
- filter="Filter"
2494
-
2495
- i18n-filterEqOperator="kendo.treelist.filterEqOperator|The text of the equal filter operator"
2496
- filterEqOperator="Is equal to"
2497
-
2498
- i18n-filterNotEqOperator="kendo.treelist.filterNotEqOperator|The text of the not equal filter operator"
2499
- filterNotEqOperator="Is not equal to"
2500
-
2501
- i18n-filterIsNullOperator="kendo.treelist.filterIsNullOperator|The text of the is null filter operator"
2502
- filterIsNullOperator="Is null"
2503
-
2504
- i18n-filterIsNotNullOperator="kendo.treelist.filterIsNotNullOperator|The text of the is not null filter operator"
2505
- filterIsNotNullOperator="Is not null"
2506
-
2507
- i18n-filterIsEmptyOperator="kendo.treelist.filterIsEmptyOperator|The text of the is empty filter operator"
2508
- filterIsEmptyOperator="Is empty"
2509
-
2510
- i18n-filterIsNotEmptyOperator="kendo.treelist.filterIsNotEmptyOperator|The text of the is not empty filter operator"
2511
- filterIsNotEmptyOperator="Is not empty"
2512
-
2513
- i18n-filterStartsWithOperator="kendo.treelist.filterStartsWithOperator|The text of the starts with filter operator"
2514
- filterStartsWithOperator="Starts with"
2515
-
2516
- i18n-filterContainsOperator="kendo.treelist.filterContainsOperator|The text of the contains filter operator"
2517
- filterContainsOperator="Contains"
2518
-
2519
- i18n-filterNotContainsOperator="kendo.treelist.filterNotContainsOperator|The text of the does not contain filter operator"
2520
- filterNotContainsOperator="Does not contain"
2521
-
2522
- i18n-filterEndsWithOperator="kendo.treelist.filterEndsWithOperator|The text of the ends with filter operator"
2523
- filterEndsWithOperator="Ends with"
2524
-
2525
- i18n-filterGteOperator="kendo.treelist.filterGteOperator|The text of the greater than or equal filter operator"
2526
- filterGteOperator="Is greater than or equal to"
2527
-
2528
- i18n-filterGtOperator="kendo.treelist.filterGtOperator|The text of the greater than filter operator"
2529
- filterGtOperator="Is greater than"
2530
-
2531
- i18n-filterLteOperator="kendo.treelist.filterLteOperator|The text of the less than or equal filter operator"
2532
- filterLteOperator="Is less than or equal to"
2533
-
2534
- i18n-filterLtOperator="kendo.treelist.filterLtOperator|The text of the less than filter operator"
2535
- filterLtOperator="Is less than"
2536
-
2537
- i18n-filterIsTrue="kendo.treelist.filterIsTrue|The text of the IsTrue boolean filter option"
2538
- filterIsTrue="Is True"
2539
-
2540
- i18n-filterIsFalse="kendo.treelist.filterIsFalse|The text of the IsFalse boolean filter option"
2541
- filterIsFalse="Is False"
2542
-
2543
- i18n-filterBooleanAll="kendo.treelist.filterBooleanAll|The text of the (All) boolean filter option"
2544
- filterBooleanAll="(All)"
2545
-
2546
- i18n-filterAfterOrEqualOperator="kendo.treelist.filterAfterOrEqualOperator|The text of the after or equal date filter operator"
2547
- filterAfterOrEqualOperator="Is after or equal to"
2548
-
2549
- i18n-filterAfterOperator="kendo.treelist.filterAfterOperator|The text of the after date filter operator"
2550
- filterAfterOperator="Is after"
2551
-
2552
- i18n-filterBeforeOperator="kendo.treelist.filterBeforeOperator|The text of the before date filter operator"
2553
- filterBeforeOperator="Is before"
2554
-
2555
- i18n-filterBeforeOrEqualOperator="kendo.treelist.filterBeforeOrEqualOperator|The text of the before or equal date filter operator"
2556
- filterBeforeOrEqualOperator="Is before or equal to"
2557
-
2558
- i18n-filterFilterButton="kendo.treelist.filterFilterButton|The text of the filter button"
2559
- filterFilterButton="Filter"
2560
-
2561
- i18n-filterClearButton="kendo.treelist.filterClearButton|The text of the clear filter button"
2562
- filterClearButton="Clear"
2563
-
2564
- i18n-filterAndLogic="kendo.treelist.filterAndLogic|The text of the And filter logic"
2565
- filterAndLogic="And"
2566
-
2567
- i18n-filterOrLogic="kendo.treelist.filterOrLogic|The text of the Or filter logic"
2568
- filterOrLogic="Or"
2569
-
2570
- i18n-filterDateToday="kendo.treelist.filterDateToday|The text of the Today button of the Date filter."
2571
- filterDateToday="TODAY"
2572
-
2573
- i18n-filterDateToggle="kendo.treelist.filterDateToggle|The title of the Toggle button of the Date filter."
2574
- filterDateToggle="Toggle Calendar"
2575
-
2576
- i18n-filterNumericDecrement="kendo.treelist.filterNumericDecrement|The title of the Decrement button of the Numeric filter."
2577
- filterNumericDecrement="Decrement"
2578
-
2579
- i18n-filterNumericIncrement="kendo.treelist.filterNumericIncrement|The title of the Increment button of the Numeric filter."
2580
- filterNumericIncrement="Increment"
2581
-
2582
- i18n-loading="kendo.treelist.loading|The loading text"
2583
- loading="Loading"
2584
-
2585
- i18n-filterInputLabel="kendo.treelist.filterInputLabel|The label of the filter row and menu inputs"
2586
- filterInputLabel="{{ '{columnName} Filter' }}"
2587
-
2588
- i18n-filterMenuLogicDropDownLabel="kendo.treelist.filterMenuLogicDropDownLabel|The label of the filter menu logic dropdown"
2589
- filterMenuLogicDropDownLabel="{{ '{columnName} Filter Logic' }}"
2590
-
2591
- i18n-filterMenuOperatorsDropDownLabel="kendo.treelist.filterMenuOperatorsDropDownLabel|The label of the filter menu operators dropdown"
2592
- filterMenuOperatorsDropDownLabel="{{ '{columnName} Filter Operators' }}"
2593
-
2594
- i18n-filterMenuTitle="kendo.treelist.filterMenuTitle|The title of the filter menu icon"
2595
- filterMenuTitle="{{ '{columnName} Filter Menu' }}"
2596
-
2597
- i18n-columnMenu="kendo.treelist.columnMenu|The title of the column menu icon"
2598
- columnMenu="{{ '{columnName} Column Menu' }}"
2599
-
2600
- i18n-columns="kendo.treelist.columns|The text shown in the column menu for the columns item"
2601
- columns="Columns"
2602
-
2603
- i18n-lock="kendo.treelist.lock|The text shown in the column menu for the lock item"
2604
- lock="Lock"
2605
-
2606
- i18n-unlock="kendo.treelist.unlock|The text shown in the column menu for the unlock item"
2607
- unlock="Unlock"
2608
-
2609
- i18n-sortable="kendo.treelist.sortable|The label of the sort icon"
2610
- sortable="Sortable"
2611
-
2612
- i18n-sortAscending="kendo.treelist.sortAscending|The text shown in the column menu for the sort ascending item"
2613
- sortAscending="Sort Ascending"
2614
-
2615
- i18n-sortDescending="kendo.treelist.sortDescending|The text shown in the column menu for the sort descending item"
2616
- sortDescending="Sort Descending"
2617
-
2618
- i18n-sortedDefault="kendo.treelist.sortedDefault|The status announcement when a column is no longer sorted"
2619
- sortedDefault="Not Sorted"
2620
-
2621
- i18n-columnsApply="kendo.treelist.columnsApply|The text shown in the column menu or column chooser for the columns apply button"
2622
- columnsApply="Apply"
2623
-
2624
- i18n-columnsReset="kendo.treelist.columnsReset|The text shown in the column menu or column chooser for the columns reset button"
2625
- columnsReset="Reset"
2626
-
2627
- i18n-pagerSelectPage="kendo.treelist.pagerSelectPage|The text of the title and aria-label attributes applied to the page chooser in the TreeList Pager"
2628
- pagerSelectPage="Select page"
2629
-
2630
- i18n-topToolbarLabel="kendo.treelist.topToolbarLabel|The label of the TreeList top toolbar"
2631
- topToolbarLabel="Top toolbar"
2632
-
2633
- i18n-bottomToolbarLabel="kendo.treelist.bottomToolbarLabel|The label of the TreeList bottom toolbar"
2634
- bottomToolbarLabel="Bottom toolbar"
2635
-
2636
- i18n-dragRowHandleLabel="kendo.treelist.dragRowHandleLabel|The label for the TreeList drag row handle"
2637
- dragRowHandleLabel="Drag row"
2638
-
2639
- i18n-selectRowCheckboxLabel="kendo.treelist.selectRowCheckboxLabel|The label for the select row checkbox"
2640
- selectRowCheckboxLabel="Select row"
2641
-
2642
- i18n-selectAllRowsCheckboxLabel="kendo.treelist.selectAllRowsCheckboxLabel|The label for the select all rows checkbox"
2643
- selectAllRowsCheckboxLabel="Select all rows"
2644
-
2645
- i18n-autosizeAllColumns="kendo.treelist.autosizeAllColumns|The text shown in the column menu for the autosize all columns item"
2646
- autosizeAllColumns="Autosize All Columns"
2647
-
2648
- i18n-autosizeThisColumn="kendo.treelist.autosizeThisColumn|The text shown in the column menu for the autosize this column item"
2649
- autosizeThisColumn="Autosize This Column"
2650
- >
2651
- </ng-container>
2652
- @if (showTopToolbar) {
2653
- <kendo-treelist-toolbar
2654
- position="top"
2655
- [navigable]="navigable"
2656
- [attr.aria-label]="messageFor('topToolbarLabel')"
2657
- [attr.aria-controls]="ariaRootId"></kendo-treelist-toolbar>
2658
- }
2659
- <ng-content select="kendo-toolbar"></ng-content>
2660
- <div #ariaRoot
2661
- class="k-grid-aria-root"
2662
- role="treegrid"
2663
- [id]="ariaRootId"
2664
- [attr.aria-rowcount]="ariaRowCount"
2665
- [attr.aria-colcount]="ariaColCount"
2666
- [attr.aria-multiselectable]="ariaMultiselectable"
2667
- [attr.aria-label]="ariaLabel"
2668
- kendoDragTargetContainer
2669
- kendoDropTargetContainer
2670
- mode="manual"
2671
- [dragDisabled]="!rowReorderable"
2672
- [dropDisabled]="!rowReorderable"
2673
- [dragTargetFilter]="getDefaultSelectors('dragTarget')"
2674
- [dropTargetFilter]="getDefaultSelectors('dropTarget')"
2675
- [dragHandle]="getDefaultSelectors('handle')"
2676
- [hint]="{hintTemplate: defaultHint}"
2677
- (onPress)="handleReorderEvents($event, 'press')"
2678
- (onDragStart)="handleReorderEvents($event, 'dragStart')"
2679
- (onDrag)="handleReorderEvents($event, 'drag')"
2680
- (onDragEnter)="handleReorderEvents($event, 'dragEnter')"
2681
- (onDragLeave)="handleReorderEvents($event, 'dragLeave')"
2682
- (onDragEnd)="handleReorderEvents($event, 'dragEnd')"
2683
- (onDrop)="handleReorderEvents($event, 'drop')"
2684
- [dragData]="treeListData">
2685
- @if (isScrollable) {
2686
- @if (!hideHeader) {
2687
- <div
2688
- class="k-grid-header"
2689
- role="presentation"
2690
- [style.padding]="headerPadding">
2691
- @if (isLocked) {
2692
- <div
2693
- #lockedHeader
2694
- role="presentation"
2695
- class="k-grid-header-locked"
2696
- [style.width.px]="lockedWidth">
2697
- <table
2698
- kendoTreeListResizableTable
2699
- [locked]="true"
2700
- role="presentation"
2701
- [style.width.px]="lockedWidth"
2702
- class="k-grid-header-table k-table k-table-md">
2703
- <colgroup
2704
- kendoTreeListColGroup
2705
- [columns]="$any(lockedLeafColumns)">
2706
- </colgroup>
2707
- <thead kendoTreeListHeader
2708
- role="rowgroup"
2709
- [resizable]="resizable"
2710
- [scrollable]="true"
2711
- [columns]="$any(lockedColumns)"
2712
- [totalColumnLevels]="totalColumnLevels"
2713
- [sort]="sort"
2714
- [filter]="filter"
2715
- [filterable]="filterable"
2716
- [reorderable]="reorderable"
2717
- [sortable]="sortable"
2718
- [columnMenu]="columnMenuOptions"
2719
- [columnMenuTemplate]="columnMenuTemplate"
2720
- [totalColumnsCount]="leafColumns.length"
2721
- [totalColumns]="columnsContainer"
2722
- [tabIndex]="navigation.enabled ? '-1' : '0'">
2723
- </thead>
2724
- </table>
2725
- </div>
2726
- }
2727
- <div #header class="k-grid-header-wrap" role="presentation" data-scrollable
2728
- [kendoTreeListResizableContainer]="lockedLeafColumns.length > 0"
2729
- [lockedWidth]="lockedWidth + scrollbarWidth + 2">
2730
- <table
2731
- role="presentation"
2732
- [style.width.px]="nonLockedWidth"
2733
- kendoTreeListResizableTable
2734
- [virtualColumns]="virtualColumns"
2735
- class="k-grid-header-table k-table k-table-md">
2736
- <colgroup
2737
- kendoTreeListColGroup
2738
- [columns]="headerLeafColumns">
2739
- </colgroup>
2740
- <thead kendoTreeListHeader
2741
- [resizable]="resizable"
2742
- role="rowgroup"
2743
- [scrollable]="true"
2744
- [columns]="headerColumns"
2745
- [totalColumnLevels]="totalColumnLevels"
2746
- [sort]="sort"
2747
- [filter]="filter"
2748
- [filterable]="filterable"
2749
- [reorderable]="reorderable"
2750
- [sortable]="sortable"
2751
- [columnMenu]="columnMenuOptions"
2752
- [columnMenuTemplate]="columnMenuTemplate"
2753
- [lockedColumnsCount]="lockedLeafColumns.length"
2754
- [totalColumnsCount]="leafColumns.length"
2755
- [totalColumns]="columnsContainer"
2756
- [tabIndex]="navigation.enabled ? '-1' : '0'">
2757
- </thead>
2758
- </table>
2759
- @if (virtualColumns) {
2760
- <div class="k-width-container" role="presentation">
2761
- <div [style.width.px]="columnsContainer.unlockedWidth"></div>
2762
- </div>
2763
- }
2764
- </div>
2765
- </div>
2766
- }
2767
- <kendo-treelist-list
2768
- [view]="view"
2769
- [loading]="showLoading"
2770
- [rowHeight]="rowHeight"
2771
- [total]="totalCount"
2772
- [take]="pageSize"
2773
- [skip]="skip"
2774
- [trackBy]="trackBy"
2775
- [columns]="columnsContainer"
2776
- [filterable]="filterable"
2777
- [noRecordsTemplate]="noRecordsTemplate"
2778
- (pageChange)="notifyPageChange('list', $event)"
2779
- [rowClass]="rowClass"
2780
- [isVirtual]="isVirtual"
2781
- [virtualColumns]="virtualColumns"
2782
- [expandIcons]="expandIcons"
2783
- (scrollBottom)="notifyScrollBottom()"
2784
- (contentScroll)="contentScroll.emit($event)"
2785
- kendoDraggable
2786
- kendoTreeListSelectionMarquee
2787
- [enableDrag]="marqueeSelection">
2788
- </kendo-treelist-list>
2789
- }
2790
- @if (!isScrollable) {
2791
- <table
2792
- class="k-table k-table-md k-grid-header-table"
2793
- role="presentation"
2794
- [style.table-layout]="resizable ? 'fixed' : null"
2795
- kendoTreeListResizableTable>
2796
- <colgroup
2797
- kendoTreeListColGroup
2798
- [columns]="$any(leafColumns)">
2799
- </colgroup>
2800
- @if (!hideHeader) {
2801
- <thead kendoTreeListHeader
2802
- role="rowgroup"
2803
- [resizable]="resizable"
2804
- [scrollable]="false"
2805
- [columns]="$any(visibleColumns)"
2806
- [totalColumnLevels]="totalColumnLevels"
2807
- [reorderable]="reorderable"
2808
- [sort]="sort"
2809
- [sortable]="sortable"
2810
- [filter]="filter"
2811
- [filterable]="filterable"
2812
- [columnMenu]="columnMenuOptions"
2813
- [columnMenuTemplate]="columnMenuTemplate"
2814
- [totalColumns]="columnsContainer"
2815
- [tabIndex]="navigation.enabled ? '-1' : '0'">
2816
- </thead>
2817
- }
2818
- <tbody kendoTreeListTableBody
2819
- [view]="view"
2820
- [skip]="skip"
2821
- [columns]="$any(leafColumns)"
2822
- [filterable]="filterable"
2823
- [noRecordsTemplate]="noRecordsTemplate"
2824
- [trackBy]="trackBy"
2825
- [rowClass]="rowClass"
2826
- [expandIcons]="expandIcons"
2827
- kendoDraggable
2828
- kendoTreeListSelectionMarquee
2829
- [enableDrag]="marqueeSelection">
2830
- </tbody>
2831
- </table>
2832
- @if (showLoading) {
2833
- <div kendoTreeListLoading>
2834
- </div>
2835
- }
2836
- }
2837
- </div>
2838
- @if (showPager) {
2839
- <kendo-pager
2840
- #pager
2841
- class="k-grid-pager"
2842
- [navigable]="navigable"
2843
- [pageSize]="pageSize"
2844
- [total]="view.totalVisible"
2845
- [skip]="skip"
2846
- [responsive]="normalizedPageableSettings.responsive && !pagerTemplate"
2847
- [buttonCount]="normalizedPageableSettings.buttonCount"
2848
- [info]="normalizedPageableSettings.info"
2849
- [pageSizeValues]="normalizedPageableSettings.pageSizes"
2850
- [previousNext]="normalizedPageableSettings.previousNext"
2851
- [type]="normalizedPageableSettings.type"
2852
- (pageChange)="notifyPageChange('pager', $event)"
2853
- (pagerInputVisibilityChange)="handlePagerVisibilityChange('showPagerInput', $event)"
2854
- (pageTextVisibilityChange)="handlePagerVisibilityChange('showPagerPageText', $event)"
2855
- (itemsTextVisibilityChange)="handlePagerVisibilityChange('showPagerItemsText', $event)">
2856
- <ng-template kendoPagerTemplate>
2857
- <ng-container
2858
- [ngTemplateOutlet]="pagerTemplate ? pagerTemplate?.templateRef : defaultPager"
2859
- [ngTemplateOutletContext]="pager.templateContext"></ng-container>
2860
- </ng-template>
2861
- <kendo-pager-messages
2862
- [ariaLabel]="messageFor('pagerLabel')"
2863
- [firstPage]="messageFor('pagerFirstPage')"
2864
- [inputLabel]="messageFor('pagerInputLabel')"
2865
- [previousPage]="messageFor('pagerPreviousPage')"
2866
- [nextPage]="messageFor('pagerNextPage')"
2867
- [lastPage]="messageFor('pagerLastPage')"
2868
- [selectPage]="messageFor('pagerSelectPage')"
2869
- [page]="messageFor('pagerPage')"
2870
- [itemsPerPage]="messageFor('pagerItemsPerPage')"
2871
- [items]="messageFor('pagerItems')"
2872
- [of]="messageFor('pagerOf')"
2873
- [pageNumberInputTitle]="messageFor('pagerPageNumberInputTitle')">
2874
- </kendo-pager-messages>
2875
- </kendo-pager>
2876
- }
2877
- @if (showBottomToolbar) {
2878
- <kendo-treelist-toolbar
2879
- class="k-grid-toolbar-bottom"
2880
- position="bottom"
2881
- [navigable]="navigable"
2882
- [attr.aria-label]="messageFor('bottomToolbarLabel')"
2883
- [attr.aria-controls]="ariaRootId">
2884
- </kendo-treelist-toolbar>
2885
- }
2886
-
2887
- <ng-template #defaultHint>
2888
- <kendo-icon-wrapper
2889
- [name]="getHintSettings('hintIcon')"
2890
- [svgIcon]="getHintSettings('hintSVGIcon')"
2891
- innerCssClass="k-drag-status">
2892
- </kendo-icon-wrapper>
2893
- {{hintText}}
2894
- </ng-template>
2895
-
2896
- <ng-template #defaultPager>
2897
- <div class="k-pager-numbers-wrap">
2898
- @if (normalizedPageableSettings.previousNext) {
2899
- <kendo-pager-prev-buttons></kendo-pager-prev-buttons>
2900
- }
2901
- @if (normalizedPageableSettings.type === 'numeric' && normalizedPageableSettings.buttonCount > 0) {
2902
- <kendo-pager-numeric-buttons
2903
- [buttonCount]="normalizedPageableSettings.buttonCount">
2904
- </kendo-pager-numeric-buttons>
2905
- }
2906
- @if (normalizedPageableSettings.type === 'input' || showPagerInput) {
2907
- <kendo-pager-input [showPageText]="showPagerPageText"></kendo-pager-input>
2908
- }
2909
- @if (normalizedPageableSettings.previousNext) {
2910
- <kendo-pager-next-buttons></kendo-pager-next-buttons>
2911
- }
2912
- </div>
2913
- @if (normalizedPageableSettings.pageSizes) {
2914
- <kendo-pager-page-sizes
2915
- [pageSizes]="normalizedPageableSettings.pageSizes"
2916
- [showItemsText]="showPagerItemsText">
2917
- </kendo-pager-page-sizes>
2918
- }
2919
- @if (normalizedPageableSettings.info) {
2920
- <kendo-pager-info>
2921
- </kendo-pager-info>
2922
- }
2923
- <kendo-pager-messages
2924
- [ariaLabel]="messageFor('pagerLabel')"
2925
- [firstPage]="messageFor('pagerFirstPage')"
2926
- [inputLabel]="messageFor('pagerInputLabel')"
2927
- [previousPage]="messageFor('pagerPreviousPage')"
2928
- [nextPage]="messageFor('pagerNextPage')"
2929
- [lastPage]="messageFor('pagerLastPage')"
2930
- [selectPage]="messageFor('pagerSelectPage')"
2931
- [page]="messageFor('pagerPage')"
2932
- [itemsPerPage]="messageFor('pagerItemsPerPage')"
2933
- [items]="messageFor('pagerItems')"
2934
- [of]="messageFor('pagerOf')"
2935
- [pageNumberInputTitle]="messageFor('pagerPageNumberInputTitle')">
2936
- </kendo-pager-messages>
2937
- </ng-template>
2938
- `,
2939
- standalone: true,
2940
- imports: [LocalizedMessagesDirective, NgTemplateOutlet, ToolbarComponent, DragTargetContainerDirective, DropTargetContainerDirective, TableDirective, ColGroupComponent, HeaderComponent, ResizableContainerDirective, ListComponent, DraggableDirective, MarqueeDirective, TableBodyComponent, LoadingComponent, ...KENDO_PAGER, IconWrapperComponent]
2941
- }]
2942
- }], ctorParameters: () => [{ type: i1.BrowserSupportService }, { type: i0.ElementRef }, { type: i2.ChangeNotificationService }, { type: i3.EditService }, { type: i4.FilterService }, { type: i5.PDFService }, { type: i6.ResponsiveService }, { type: i0.Renderer2 }, { type: i7.ExcelService }, { type: i0.NgZone }, { type: i8.ScrollSyncService }, { type: i9.DomEventsService }, { type: i10.ColumnResizingService }, { type: i0.ChangeDetectorRef }, { type: i11.ColumnReorderService }, { type: i12.ColumnInfoService }, { type: i13.NavigationService }, { type: i14.SortService }, { type: i15.ScrollRequestService }, { type: i16.ExpandStateService }, { type: i17.OptionChangesService }, { type: i18.SelectionService }, { type: i19.LocalizationService }, { type: i20.ContextService }, { type: i21.RowReorderService }], propDecorators: { ariaLabel: [{
2943
- type: Input,
2944
- args: ['aria-label']
2945
- }], data: [{
2946
- type: Input
2947
- }], pageSize: [{
2948
- type: Input
2949
- }], height: [{
2950
- type: Input
2951
- }], rowHeight: [{
2952
- type: Input
2953
- }], skip: [{
2954
- type: Input
2955
- }], scrollable: [{
2956
- type: Input
2957
- }], sort: [{
2958
- type: Input
2959
- }], trackBy: [{
2960
- type: Input
2961
- }], filter: [{
2962
- type: Input
2963
- }], virtualColumns: [{
2964
- type: Input
2965
- }], filterable: [{
2966
- type: Input
2967
- }], sortable: [{
2968
- type: Input
2969
- }], pageable: [{
2970
- type: Input
2971
- }], navigable: [{
2972
- type: Input
2973
- }], autoSize: [{
2974
- type: Input
2975
- }], rowClass: [{
2976
- type: Input
2977
- }], resizable: [{
2978
- type: Input
2979
- }], reorderable: [{
2980
- type: Input
2981
- }], loading: [{
2982
- type: Input
2983
- }], columnMenu: [{
2984
- type: Input
2985
- }], hideHeader: [{
2986
- type: Input
2987
- }], idField: [{
2988
- type: Input
2989
- }], selectable: [{
2990
- type: Input
2991
- }], isSelected: [{
2992
- type: Input
2993
- }], rowReorderable: [{
2994
- type: Input
2995
- }], selectionChange: [{
2996
- type: Output
2997
- }], filterChange: [{
2998
- type: Output
2999
- }], pageChange: [{
3000
- type: Output
3001
- }], sortChange: [{
3002
- type: Output
3003
- }], dataStateChange: [{
3004
- type: Output
3005
- }], edit: [{
3006
- type: Output
3007
- }], cancel: [{
3008
- type: Output
3009
- }], save: [{
3010
- type: Output
3011
- }], remove: [{
3012
- type: Output
3013
- }], add: [{
3014
- type: Output
3015
- }], cellClose: [{
3016
- type: Output
3017
- }], cellClick: [{
3018
- type: Output
3019
- }], pdfExport: [{
3020
- type: Output
3021
- }], excelExport: [{
3022
- type: Output
3023
- }], columnResize: [{
3024
- type: Output
3025
- }], columnReorder: [{
3026
- type: Output
3027
- }], columnVisibilityChange: [{
3028
- type: Output
3029
- }], columnLockedChange: [{
3030
- type: Output
3031
- }], scrollBottom: [{
3032
- type: Output
3033
- }], contentScroll: [{
3034
- type: Output
3035
- }], expandEvent: [{
3036
- type: Output,
3037
- args: ['expand']
3038
- }], collapseEvent: [{
3039
- type: Output,
3040
- args: ['collapse']
3041
- }], expandStateChange: [{
3042
- type: Output
3043
- }], rowReorder: [{
3044
- type: Output
3045
- }], columnsRef: [{
3046
- type: Input,
3047
- args: ['columns']
3048
- }], columns: [{
3049
- type: ContentChildren,
3050
- args: [ColumnBase]
3051
- }], dir: [{
3052
- type: HostBinding,
3053
- args: ['attr.dir']
3054
- }], hostClasses: [{
3055
- type: HostBinding,
3056
- args: ['class.k-grid']
3057
- }, {
3058
- type: HostBinding,
3059
- args: ['class.k-grid-md']
3060
- }, {
3061
- type: HostBinding,
3062
- args: ['class.k-treelist']
3063
- }], lockedClasses: [{
3064
- type: HostBinding,
3065
- args: ['class.k-grid-lockedcolumns']
3066
- }], virtualClasses: [{
3067
- type: HostBinding,
3068
- args: ['class.k-grid-virtual']
3069
- }], noScrollbarClass: [{
3070
- type: HostBinding,
3071
- args: ['class.k-grid-no-scrollbar']
3072
- }], noRecordsTemplateChildren: [{
3073
- type: ContentChildren,
3074
- args: [NoRecordsTemplateDirective]
3075
- }], pagerTemplateChildren: [{
3076
- type: ContentChildren,
3077
- args: [PagerTemplateDirective]
3078
- }], toolbarTemplateChildren: [{
3079
- type: ContentChildren,
3080
- args: [ToolbarTemplateDirective]
3081
- }], columnMenuTemplates: [{
3082
- type: ContentChildren,
3083
- args: [ColumnMenuTemplateDirective]
3084
- }], lockedHeader: [{
3085
- type: ViewChild,
3086
- args: ['lockedHeader']
3087
- }], header: [{
3088
- type: ViewChild,
3089
- args: ['header']
3090
- }], footer: [{
3091
- type: ViewChildren,
3092
- args: ['footer']
3093
- }], ariaRoot: [{
3094
- type: ViewChild,
3095
- args: ['ariaRoot', { static: true }]
3096
- }], dragTargetContainer: [{
3097
- type: ViewChild,
3098
- args: [DragTargetContainerDirective]
3099
- }], dropTargetContainer: [{
3100
- type: ViewChild,
3101
- args: [DropTargetContainerDirective]
3102
- }], listComponent: [{
3103
- type: ViewChild,
3104
- args: [ListComponent]
3105
- }], fetchChildren: [{
3106
- type: Input
3107
- }], hasChildren: [{
3108
- type: Input
3109
- }], isExpanded: [{
3110
- type: Input
3111
- }] } });