@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,978 +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, ChangeDetectorRef, HostBinding, Input, QueryList, ViewChildren, TemplateRef } from '@angular/core';
7
- import { NgClass, NgStyle } from '@angular/common';
8
- import { Subscription, of, merge } from "rxjs";
9
- import { filter, map, switchMap, tap, takeUntil } from 'rxjs/operators';
10
- import { LocalizationService } from '@progress/kendo-angular-l10n';
11
- import { Keys, DraggableDirective, TemplateContextDirective, normalizeKeys } from '@progress/kendo-angular-common';
12
- import { IconWrapperComponent } from '@progress/kendo-angular-icons';
13
- import { sortAscSmallIcon, sortDescSmallIcon } from '@progress/kendo-svg-icons';
14
- import { isColumnComponent } from '../../columns/column.component';
15
- import { isColumnGroupComponent } from '../../columns/column-group.component';
16
- import { isCheckboxColumn } from '../../columns/column-base';
17
- import { normalize } from '../../columns/sort-settings';
18
- import { and, isNullOrEmptyString, isPresent, isTruthy, not, observe } from '../../utils';
19
- import { columnsToRender, sortColumns, isInSpanColumn } from "../../columns/column-common";
20
- import { SinglePopupService } from '../../common/single-popup.service';
21
- import { hasFilterMenu, hasFilterRow } from '../../filtering/filterable';
22
- import { DropTargetDirective } from '../../dragdrop/drop-target.directive';
23
- import { DraggableColumnDirective } from '../../dragdrop/draggable-column.directive';
24
- import { DragHintService } from '../../dragdrop/drag-hint.service';
25
- import { DropCueService } from '../../dragdrop/drop-cue.service';
26
- import { ColumnReorderService } from '../../dragdrop/column-reorder.service';
27
- import { position, isTargetBefore, offset } from '../../dragdrop/common';
28
- import { SortService } from '../../common/sort.service';
29
- import { hasItems } from '../../column-menu/utils';
30
- import { closestInScope, isFocusable } from '../common/dom-queries';
31
- import { SelectionService } from '../../selection/selection.service';
32
- import { ColumnsContainer } from '../../columns/columns-container';
33
- import { FilterRowComponent } from '../../filtering/filter-row.component';
34
- import { ColumnHandleDirective } from '../../column-resizing/column-handle.directive';
35
- import { FocusableDirective } from '../../navigation/focusable.directive';
36
- import { ColumnMenuComponent } from '../../column-menu/column-menu.component';
37
- import { FilterMenuComponent } from '../../filtering/menu/filter-menu.component';
38
- import { LogicalCellDirective } from '../../navigation/logical-cell.directive';
39
- import { LogicalRowDirective } from '../../navigation/logical-row.directive';
40
- import { CheckBoxComponent } from '@progress/kendo-angular-inputs';
41
- import { TreeListSelectAllCheckboxDirective } from './select-all-checkbox.directive';
42
- import { ColumnInfoService } from '../../common/column-info.service';
43
- import { ContextService } from '../../common/provider.service';
44
- import { NavigationService } from '../../navigation/navigation.service';
45
- import { IdService } from '../../common/id.service';
46
- import { ColumnReorderEvent } from '../../dragdrop/column-reorder-event';
47
- import * as i0 from "@angular/core";
48
- import * as i1 from "../../common/single-popup.service";
49
- import * as i2 from "../../dragdrop/drag-hint.service";
50
- import * as i3 from "../../dragdrop/drop-cue.service";
51
- import * as i4 from "../../dragdrop/column-reorder.service";
52
- import * as i5 from "../../common/id.service";
53
- import * as i6 from "../../common/sort.service";
54
- import * as i7 from "../../selection/selection.service";
55
- import * as i8 from "@progress/kendo-angular-l10n";
56
- import * as i9 from "../../common/column-info.service";
57
- import * as i10 from "../../common/provider.service";
58
- import * as i11 from "../../navigation/navigation.service";
59
- const mergeObjects = (...args) => Object.assign.apply(null, [{}].concat(args));
60
- const directions = initialDirection => initialDirection === "asc" ? ["asc", "desc"] : ["desc", "asc"];
61
- /**
62
- * @hidden
63
- */
64
- const isRootLevel = ({ parent }) => !isTruthy(parent);
65
- const ofColumnType = ({ draggable }) => ['column', 'columnGroup']
66
- .indexOf(draggable.context.type) >= 0;
67
- const notSameElement = ({ draggable, target }) => draggable.element.nativeElement !== target.element.nativeElement;
68
- const inSameParent = (x, y) => x.parent === y.parent ||
69
- (isInSpanColumn(y) && inSameParent(x, y.parent));
70
- const sameParent = ({ draggable, target }) => inSameParent(draggable.context.column, target.context.column);
71
- const lastNonLocked = ({ draggable }) => !isTruthy(draggable.context.column.locked) &&
72
- isRootLevel(draggable.context.column) &&
73
- draggable.context.lastColumn;
74
- const notInSpanColumn = ({ draggable }) => !isInSpanColumn(draggable.context.column);
75
- const reorderable = ({ draggable }) => draggable.context.column.reorderable;
76
- const lockable = ({ draggable, target }) => draggable.context.column.lockable !== false ||
77
- draggable.context.column.isLocked === target.context.column.isLocked;
78
- const rules = and(ofColumnType, reorderable, notInSpanColumn, notSameElement, sameParent, not(lastNonLocked), lockable);
79
- const modifierKeys = ['alt', 'ctrl', 'shift', 'meta'];
80
- /**
81
- * @hidden
82
- */
83
- export class HeaderComponent {
84
- popupService;
85
- hint;
86
- cue;
87
- reorderService;
88
- idService;
89
- sortService;
90
- selectionService;
91
- localization;
92
- cd;
93
- columnInfoService;
94
- contextService;
95
- navigationService;
96
- /**
97
- * @hidden
98
- */
99
- totalColumnLevels;
100
- columns = [];
101
- scrollable;
102
- filterable;
103
- sort = new Array();
104
- filter;
105
- sortable = false;
106
- lockedColumnsCount = 0;
107
- resizable = false;
108
- reorderable = false;
109
- columnMenu = false;
110
- columnMenuTemplate;
111
- totalColumnsCount = 0;
112
- totalColumns;
113
- tabIndex;
114
- get isNavigable() {
115
- return this.navigationService.enabled;
116
- }
117
- sortedFields = {};
118
- get headerClass() {
119
- return !this.scrollable;
120
- }
121
- hostClass = true;
122
- get sortableLabel() {
123
- return this.localization.get('sortable');
124
- }
125
- get columnMenuSettings() {
126
- return this.columnMenu;
127
- }
128
- dropTargets = new QueryList();
129
- filterMenus;
130
- columnMenus;
131
- // Number of unlocked columns in the next table, if any
132
- get unlockedColumnsCount() {
133
- return this.totalColumnsCount - this.lockedColumnsCount - this.columns.length;
134
- }
135
- sortAscSmallIcon = sortAscSmallIcon;
136
- sortDescSmallIcon = sortDescSmallIcon;
137
- subscription = new Subscription();
138
- targetSubscription;
139
- stopSorting = false;
140
- _leafColumns;
141
- constructor(popupService, hint, cue, reorderService, idService, sortService, selectionService, localization, cd, columnInfoService, contextService, navigationService) {
142
- this.popupService = popupService;
143
- this.hint = hint;
144
- this.cue = cue;
145
- this.reorderService = reorderService;
146
- this.idService = idService;
147
- this.sortService = sortService;
148
- this.selectionService = selectionService;
149
- this.localization = localization;
150
- this.cd = cd;
151
- this.columnInfoService = columnInfoService;
152
- this.contextService = contextService;
153
- this.navigationService = navigationService;
154
- }
155
- ngAfterViewInit() {
156
- this.subscription.add(observe(this.dropTargets)
157
- .subscribe(this.attachTargets.bind(this)));
158
- }
159
- ngDoCheck() {
160
- this._leafColumns = columnsToRender(this.columns || []).filter(x => !isColumnGroupComponent(x));
161
- }
162
- ngOnChanges(changes) {
163
- const sortChange = changes.sort;
164
- if (sortChange && !sortChange.isFirstChange()) {
165
- sortChange.currentValue.forEach(change => {
166
- this.sortedFields[change.field] = true;
167
- });
168
- }
169
- }
170
- ngOnInit() {
171
- this.subscription.add(this.localization.changes
172
- .subscribe(() => this.cd.markForCheck()));
173
- }
174
- ngOnDestroy() {
175
- if (this.targetSubscription) {
176
- this.targetSubscription.unsubscribe();
177
- }
178
- if (this.popupService) {
179
- this.popupService.destroy();
180
- }
181
- this.subscription.unsubscribe();
182
- }
183
- getColumnComponent(column) {
184
- return column;
185
- }
186
- onSortClick(column, event, link) {
187
- if (this.stopSorting) {
188
- this.stopSorting = false;
189
- return;
190
- }
191
- const target = event.target;
192
- if (column.headerTemplateRef && target !== link) {
193
- const hasFocusableParent = Boolean(closestInScope(target, isFocusable, link));
194
- if (hasFocusableParent) {
195
- // Do not sort when clicking focusable template elements.
196
- return;
197
- }
198
- }
199
- const modifier = this.matchModifier(event);
200
- const toggledColumn = this.toggleSort(column, modifier);
201
- this.sortColumn(toggledColumn);
202
- }
203
- selectAllCheckboxId() {
204
- return this.idService.selectAllCheckboxId();
205
- }
206
- get selectAllCheckboxLabel() {
207
- return this.contextService.localization.get('selectAllRowsCheckboxLabel');
208
- }
209
- sortColumn(descriptor) {
210
- this.sortService.sort(descriptor);
211
- }
212
- /**
213
- *
214
- * Determines whether the modifier key (if any) passed
215
- * with a click/keyboard event matches the user-defined multiSortKey.
216
- */
217
- matchModifier(event) {
218
- const { multiSortKey } = normalize(this.sortable);
219
- if (multiSortKey === 'none') {
220
- return modifierKeys.every(key => !event[`${key}Key`]);
221
- }
222
- return multiSortKey === 'ctrl'
223
- ? event.ctrlKey || event.metaKey
224
- : event[`${multiSortKey}Key`];
225
- }
226
- onHeaderKeydown(column, args) {
227
- const code = normalizeKeys(args);
228
- if (code === Keys.ArrowDown && args.altKey && this.showFilterMenu && this.isFilterable(column)) {
229
- args.preventDefault();
230
- args.stopImmediatePropagation();
231
- const filterMenu = this.filterMenus.find(fm => fm.column === column);
232
- filterMenu.toggle(filterMenu.anchor.nativeElement, filterMenu.template);
233
- return;
234
- }
235
- if (code === Keys.ArrowDown && args.altKey && this.showColumnMenu(column)) {
236
- args.preventDefault();
237
- args.stopImmediatePropagation();
238
- const columnMenu = this.columnMenus.find(cm => cm.column === column);
239
- columnMenu.toggle(null, columnMenu.anchor.nativeElement, columnMenu.template);
240
- return;
241
- }
242
- const isCtrlOrMeta = args.ctrlKey || args.metaKey;
243
- const isLeftOrRightArrow = code === Keys.ArrowLeft || code === Keys.ArrowRight;
244
- const isReorderingKeyShortcut = isLeftOrRightArrow && isCtrlOrMeta;
245
- if (isReorderingKeyShortcut && this.isReorderable(column)) {
246
- args.preventDefault();
247
- const columnsCount = this.columnInfoService.leafNamedColumns.length;
248
- const reorderDirection = code === Keys.ArrowLeft ? -1 : 1;
249
- const rtlMultiplier = this.contextService.localization.rtl ? -1 : 1;
250
- const reorderDirectionOffset = reorderDirection * rtlMultiplier;
251
- const newIndex = column.leafIndex + reorderDirectionOffset;
252
- const normalizedNewIndex = Math.min(Math.max(0, newIndex), columnsCount - 1);
253
- const treelistInstance = this.contextService.treelist;
254
- treelistInstance.reorderColumn(column, normalizedNewIndex, { before: reorderDirectionOffset < 0 });
255
- treelistInstance.columnReorder.emit(new ColumnReorderEvent({
256
- column,
257
- newIndex: normalizedNewIndex,
258
- oldIndex: column.leafIndex
259
- }));
260
- return;
261
- }
262
- if (!this.sortable || args.defaultPrevented || column.sortable === false) {
263
- return;
264
- }
265
- if (code === Keys.Enter && isPresent(column.field)) {
266
- const modifier = this.matchModifier(args);
267
- this.sortService.sort(this.toggleSort(column, modifier));
268
- }
269
- }
270
- showSortNumbering(column) {
271
- const { showIndexes } = normalize(this.sortable);
272
- return showIndexes
273
- && this.sort
274
- && this.sort.filter(({ dir }) => isPresent(dir)).length > 1
275
- && this.sortOrder(column.field) > 0;
276
- }
277
- sortOrder(field) {
278
- return this.sort
279
- .filter(({ dir }) => isPresent(dir))
280
- .findIndex(x => x.field === field)
281
- + 1;
282
- }
283
- sortState(column) {
284
- if (!this.isSortable(column)) {
285
- return;
286
- }
287
- const state = this.sortDescriptor(column.field);
288
- if (state.dir === 'asc') {
289
- return 'ascending';
290
- }
291
- if (state.dir === 'desc') {
292
- return 'descending';
293
- }
294
- }
295
- /**
296
- *
297
- * @param column
298
- * @param modifier - Indicates whether the client-defined `multiSortKey` modifier is met. Defaults to `true`.
299
- * @returns - SortDescriptor[]
300
- */
301
- toggleSort(column, modifier = true) {
302
- const { allowUnsort, mode, initialDirection } = normalize(this.sortable, column.sortable);
303
- const descriptor = this.toggleDirection(column.field, allowUnsort, initialDirection);
304
- if (mode === 'single' || !modifier) {
305
- return [descriptor];
306
- }
307
- return [...this.sort.filter(desc => desc.field !== column.field), descriptor];
308
- }
309
- isFirstOnRow(column, index) {
310
- const isTailing = (c) => c &&
311
- (this.columnsForLevel(c.level).indexOf(c) > 0 || isTailing(c.parent));
312
- return index === 0 && isTailing(column.parent);
313
- }
314
- logicalColumnIndex(column) {
315
- const index = column.leafIndex;
316
- if (isPresent(index)) {
317
- return index;
318
- }
319
- return -1;
320
- }
321
- get showFilterMenu() {
322
- return !this.columnMenu && hasFilterMenu(this.filterable);
323
- }
324
- get showFilterRow() {
325
- return hasFilterRow(this.filterable);
326
- }
327
- showColumnMenu(column) {
328
- return this.columnMenu && !isCheckboxColumn(column) && column.columnMenu &&
329
- (this.columnMenuTemplate || column.columnMenuTemplates.length || hasItems(this.columnMenu, column));
330
- }
331
- isFilterable(column) {
332
- return !isNullOrEmptyString(column.field) && column.filterable === true;
333
- }
334
- canDrop(draggable, target) {
335
- return this.reorderable && rules({ draggable, target });
336
- }
337
- isSortable(column) {
338
- return !isNullOrEmptyString(column.field)
339
- && isTruthy(this.sortable) && isTruthy(column.sortable);
340
- }
341
- trackByIndex(index, _item) {
342
- return index;
343
- }
344
- shouldActivate(column) {
345
- const canReorder = this.isReorderable(column);
346
- if (!canReorder && !isColumnComponent(column)) {
347
- return false;
348
- }
349
- return canReorder;
350
- }
351
- isInteractive(column, prop) {
352
- return !isNullOrEmptyString(column.field)
353
- && isTruthy(this[prop]) && isTruthy(column[prop]);
354
- }
355
- isCheckboxColumn(column) {
356
- return isCheckboxColumn(column) && !column.templateRef;
357
- }
358
- isReorderable(column) {
359
- return this.reorderable && column.reorderable;
360
- }
361
- toggleDirection(field, allowUnsort, initialDirection) {
362
- const descriptor = this.sortDescriptor(field);
363
- const [first, second] = directions(initialDirection);
364
- let dir = first;
365
- if (descriptor.dir === first) {
366
- dir = second;
367
- }
368
- else if (descriptor.dir === second && allowUnsort) {
369
- dir = undefined;
370
- }
371
- return { dir, field };
372
- }
373
- columnsForLevel(level) {
374
- const columns = this.columns ? this.columns.filter(column => column.level === level) : [];
375
- return sortColumns(columnsToRender(columns));
376
- }
377
- isColumnGroupComponent(column) {
378
- return isColumnGroupComponent(column);
379
- }
380
- get columnLevels() {
381
- return new Array((this.totalColumnLevels || 0) + 1);
382
- }
383
- renderSelectAll(column) {
384
- return column.isCheckboxColumn && column.showSelectAll && !column.headerTemplateRef &&
385
- this.selectionService.enableMultiple;
386
- }
387
- selectAllChange(state) {
388
- this.selectionService.toggleAll(state);
389
- }
390
- sortDescriptor(field) {
391
- return this.sort.find(item => item.field === field) || { field };
392
- }
393
- get leafColumns() {
394
- return this._leafColumns;
395
- }
396
- messageFor(token) {
397
- return this.localization.get(token);
398
- }
399
- attachTargets() {
400
- if (this.targetSubscription) {
401
- this.targetSubscription.unsubscribe();
402
- }
403
- this.targetSubscription = new Subscription();
404
- const enterStream = merge(...this.dropTargets.map(target => target.enter));
405
- const leaveStream = merge(...this.dropTargets.map(target => target.leave));
406
- const dropStream = merge(...this.dropTargets.map(target => target.drop));
407
- this.targetSubscription.add(enterStream.pipe(tap(({ target, draggable }) => {
408
- const targetLocked = isTruthy(target.context.column.isLocked);
409
- const draggableLocked = isTruthy(draggable.context.column.isLocked);
410
- if (this.lockedColumnsCount > 0 || targetLocked || draggableLocked) {
411
- this.hint.toggleLock(targetLocked);
412
- }
413
- }), filter(({ draggable, target }) => this.canDrop(draggable, target)), switchMap(this.trackMove.bind(this, leaveStream, dropStream)), map((e) => mergeObjects(e, { before: this.calculateBefore(e), changeContainer: e.changeContainer })), map(this.normalizeTarget.bind(this)), tap(this.enter.bind(this)), switchMap((args) => dropStream.pipe(map(() => args), takeUntil(leaveStream.pipe(tap(this.leave.bind(this)))))))
414
- .subscribe(this.drop.bind(this)));
415
- }
416
- normalizeTarget(e) {
417
- let target = e.target;
418
- const parent = target.context.column.parent;
419
- if (parent && parent.isSpanColumn) {
420
- const arr = this.dropTargets.toArray();
421
- const firstSpan = arr.find(t => t.context.column.parent === parent);
422
- const index = arr.indexOf(firstSpan);
423
- const adjust = e.before ? 0 : parent.childColumns.length - 1;
424
- target = arr[index + adjust];
425
- }
426
- return mergeObjects(e, { target });
427
- }
428
- trackMove(leaveStream, dropStream, e) {
429
- const column = e.target.context.column;
430
- const levelColumns = this.columnsForLevel(column.level);
431
- const index = levelColumns.indexOf(column);
432
- const isFirst = (column.locked ? index === levelColumns.length - 1 : index === 0);
433
- const changed = e.draggable.context.column.isLocked !== column.isLocked;
434
- if (changed && isFirst) {
435
- return e.draggable.drag
436
- .pipe(takeUntil(leaveStream), takeUntil(dropStream), map(({ mouseEvent }) => mergeObjects({ changeContainer: true }, e, { mouseEvent })));
437
- }
438
- return of(mergeObjects({ changeContainer: changed }, e));
439
- }
440
- calculateBefore({ draggable, target, mouseEvent, changeContainer = false }) {
441
- const targetElement = target.element.nativeElement;
442
- let before = false;
443
- if (changeContainer) {
444
- const { left } = offset(targetElement);
445
- const halfWidth = targetElement.offsetWidth / 2;
446
- const middle = left + halfWidth;
447
- before = middle > mouseEvent.pageX;
448
- if (this.localization.rtl) {
449
- before = !before;
450
- }
451
- }
452
- else {
453
- before = isTargetBefore(draggable.element.nativeElement, targetElement);
454
- }
455
- return before;
456
- }
457
- enter({ target, before }) {
458
- this.hint.enable();
459
- if (this.localization.rtl) {
460
- before = !before;
461
- }
462
- this.cue.position(position(target.element.nativeElement, before));
463
- }
464
- leave() {
465
- this.hint.disable();
466
- this.cue.hide();
467
- }
468
- drop({ draggable, target, before, changeContainer }) {
469
- this.reorderService.reorder({
470
- before,
471
- changeContainer,
472
- source: draggable.context.column,
473
- target: target.context.column
474
- });
475
- }
476
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: HeaderComponent, deps: [{ token: i1.SinglePopupService }, { token: i2.DragHintService }, { token: i3.DropCueService }, { token: i4.ColumnReorderService }, { token: i5.IdService }, { token: i6.SortService }, { token: i7.SelectionService }, { token: i8.LocalizationService }, { token: i0.ChangeDetectorRef }, { token: i9.ColumnInfoService }, { token: i10.ContextService }, { token: i11.NavigationService }], target: i0.ɵɵFactoryTarget.Component });
477
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: HeaderComponent, isStandalone: true, selector: "[kendoTreeListHeader]", inputs: { totalColumnLevels: "totalColumnLevels", columns: "columns", scrollable: "scrollable", filterable: "filterable", sort: "sort", filter: "filter", sortable: "sortable", lockedColumnsCount: "lockedColumnsCount", resizable: "resizable", reorderable: "reorderable", columnMenu: "columnMenu", columnMenuTemplate: "columnMenuTemplate", totalColumnsCount: "totalColumnsCount", totalColumns: "totalColumns", tabIndex: "tabIndex" }, host: { properties: { "class.k-grid-header": "this.headerClass", "class.k-table-thead": "this.hostClass" } }, viewQueries: [{ propertyName: "dropTargets", predicate: DropTargetDirective, descendants: true }, { propertyName: "filterMenus", predicate: FilterMenuComponent, descendants: true }, { propertyName: "columnMenus", predicate: ColumnMenuComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: `
478
- @for (i of columnLevels; track $index; let levelIndex = $index) {
479
- <tr role="row"
480
- kendoTreeListLogicalRow
481
- [logicalRowIndex]="levelIndex"
482
- [logicalSlaveRow]="lockedColumnsCount > 0"
483
- [logicalCellsCount]="columns.length"
484
- [totalColumns]="totalColumns"
485
- [logicalSlaveCellsCount]="unlockedColumnsCount">
486
- @for (column of columnsForLevel(levelIndex); track $index; let columnIndex = $index; let last = $last) {
487
- @if (!isColumnGroupComponent(column)) {
488
- <th
489
- kendoTreeListLogicalCell
490
- [logicalRowIndex]="levelIndex"
491
- [logicalColIndex]="logicalColumnIndex(column)"
492
- [headerLabelText]="column.title || getColumnComponent(column).field"
493
- [colSpan]="column.colspan"
494
- [rowSpan]="column.rowspan(totalColumnLevels)"
495
- role="columnheader"
496
- aria-selected="false"
497
- [attr.aria-sort]="sortState(getColumnComponent(column))"
498
- [class.k-sorted]="sortState(getColumnComponent(column))"
499
- (keydown)="onHeaderKeydown(getColumnComponent(column), $event)"
500
- kendoDropTarget
501
- kendoDraggable
502
- kendoDraggableColumn
503
- [enableDrag]="shouldActivate(column)"
504
- [context]="{
505
- field: getColumnComponent(column).field,
506
- type: 'column',
507
- column: column,
508
- hint: column.title || getColumnComponent(column).field,
509
- lastColumn: last && columnIndex === 0
510
- }"
511
- class="k-header k-table-th"
512
- [class.k-filterable]="(showFilterMenu && isFilterable(getColumnComponent(column))) || showColumnMenu(column)"
513
- [class.k-first]="isFirstOnRow(getColumnComponent(column), columnIndex)"
514
- [ngClass]="column.headerClass"
515
- [ngStyle]="column.headerStyle"
516
- [attr.rowspan]="column.rowspan(totalColumnLevels)"
517
- [attr.colspan]="column.colspan"
518
- [attr.aria-haspopup]="isNavigable && (showFilterMenu || showColumnMenu(column)) ? 'dialog' : undefined"
519
- [attr.aria-expanded]="isNavigable && (showFilterMenu || showColumnMenu(column)) ? false : undefined"
520
- [attr.aria-keyshortcuts]="isNavigable && (showFilterMenu || showColumnMenu(column)) ? 'Alt + ArrowDown' : undefined">
521
- @if (!isInteractive(getColumnComponent(column), 'sortable')) {
522
- <span class="k-cell-inner">
523
- <span class="k-link" [class.!k-cursor-default]="!isInteractive(getColumnComponent(column), 'reorderable')">
524
- <ng-template
525
- [templateContext]="{
526
- templateRef: column.headerTemplateRef,
527
- columnIndex: column.leafIndex,
528
- column: column,
529
- $implicit: column
530
- }">
531
- </ng-template>
532
- @if (!column.headerTemplateRef) {
533
- <span class="k-column-title">{{column.displayTitle}}</span>
534
- }
535
- </span>
536
- @if (showFilterMenu && isFilterable(getColumnComponent(column))) {
537
- <kendo-treelist-filter-menu
538
- [column]="getColumnComponent(column)"
539
- [filter]="filter"
540
- [tabIndex]="tabIndex">
541
- </kendo-treelist-filter-menu>
542
- }
543
- @if (showColumnMenu(column)) {
544
- <kendo-treelist-column-menu
545
- [standalone]="false"
546
- [settings]="columnMenuSettings"
547
- [column]="column"
548
- [columnMenuTemplate]="columnMenuTemplate"
549
- [sort]="sort"
550
- [filter]="filter"
551
- [sortable]="sortable"
552
- [tabIndex]="tabIndex">
553
- </kendo-treelist-column-menu>
554
- }
555
- </span>
556
- }
557
- @if (isInteractive(getColumnComponent(column), 'sortable')) {
558
- <span class="k-cell-inner">
559
- <span #link class="k-link" (click)="onSortClick(getColumnComponent(column), $event, link)">
560
- <ng-template
561
- [templateContext]="{
562
- templateRef: column.headerTemplateRef,
563
- columnIndex: column.leafIndex,
564
- column: column,
565
- $implicit: column
566
- }">
567
- </ng-template>
568
- @if (!column.headerTemplateRef) {
569
- <span class="k-column-title">{{column.displayTitle}}</span>
570
- }
571
- <span [class.k-sort-icon]="sortDescriptor(getColumnComponent(column).field).dir">
572
- @if (sortDescriptor(getColumnComponent(column).field).dir) {
573
- <kendo-icon-wrapper
574
- role="note" [attr.aria-label]="sortableLabel"
575
- name="sort-{{sortDescriptor(getColumnComponent(column).field).dir}}-small"
576
- [svgIcon]="sortDescriptor(getColumnComponent(column).field).dir === 'asc' ? sortAscSmallIcon : sortDescSmallIcon"
577
- ></kendo-icon-wrapper>
578
- }
579
- </span>
580
- @if (showSortNumbering(getColumnComponent(column))) {
581
- <span class="k-sort-order">{{sortOrder(getColumnComponent(column).field)}}</span>
582
- }
583
- </span>
584
- @if (showFilterMenu && isFilterable(getColumnComponent(column))) {
585
- <kendo-treelist-filter-menu
586
- [column]="getColumnComponent(column)"
587
- [filter]="filter"
588
- [tabIndex]="tabIndex">
589
- </kendo-treelist-filter-menu>
590
- }
591
- @if (showColumnMenu(column)) {
592
- <kendo-treelist-column-menu
593
- [standalone]="false"
594
- [settings]="columnMenuSettings"
595
- [column]="column"
596
- [columnMenuTemplate]="columnMenuTemplate"
597
- [sort]="sort"
598
- [filter]="filter"
599
- [sortable]="sortable"
600
- [tabIndex]="tabIndex">
601
- </kendo-treelist-column-menu>
602
- }
603
- </span>
604
- }
605
- @if (isCheckboxColumn(column) && !column.headerTemplateRef && $any(column).showSelectAll) {
606
- <kendo-checkbox
607
- [attr.id]="selectAllCheckboxId()"
608
- [inputAttributes]="{'aria-label': selectAllCheckboxLabel}"
609
- kendoTreeListSelectAllCheckbox
610
- kendoTreeListFocusable
611
- (checkedStateChange)="selectAllChange($event)"
612
- ></kendo-checkbox>
613
- }
614
- @if (resizable) {
615
- <span kendoTreeListColumnHandle
616
- kendoDraggable
617
- class="k-column-resizer"
618
- [column]="column"
619
- [columns]="columns">
620
- </span>
621
- }
622
- </th>
623
- }
624
- @if (isColumnGroupComponent(column)) {
625
- <th
626
- kendoTreeListLogicalCell
627
- [logicalRowIndex]="levelIndex"
628
- [logicalColIndex]="logicalColumnIndex(column)"
629
- [rowSpan]="column.rowspan(totalColumnLevels)"
630
- [colSpan]="column.colspan"
631
- [headerLabelText]="column.title || getColumnComponent(column).field"
632
- kendoDropTarget
633
- kendoDraggable
634
- kendoDraggableColumn
635
- [enableDrag]="shouldActivate(column)"
636
- [context]="{
637
- type: 'columnGroup',
638
- column: column,
639
- hint: column.title,
640
- lastColumn: last && columnIndex === 0
641
- }"
642
- class="k-header k-table-th"
643
- [class.k-first]="isFirstOnRow(getColumnComponent(column), columnIndex)"
644
- [attr.aria-haspopup]="(isNavigable && showColumnMenu(column)) ? 'dialog' : undefined"
645
- [attr.aria-expanded]="(isNavigable && showColumnMenu(column)) ? false : undefined"
646
- [attr.aria-keyshortcuts]="isNavigable && showColumnMenu(column) ? 'Alt + ArrowDown' : undefined"
647
- [ngClass]="column.headerClass"
648
- [ngStyle]="column.headerStyle"
649
- [attr.rowspan]="column.rowspan(totalColumnLevels)"
650
- [attr.colspan]="column.colspan">
651
- <span class="k-cell-inner">
652
- <span class="k-link" [class.!k-cursor-default]="!isInteractive(getColumnComponent(column), 'reorderable')">
653
- <ng-template
654
- [templateContext]="{
655
- templateRef: column.headerTemplateRef,
656
- columnIndex: lockedColumnsCount + columnIndex,
657
- column: column,
658
- $implicit: column
659
- }">
660
- </ng-template>
661
- @if (!column.headerTemplateRef) {
662
- <span class="k-column-title">{{column.displayTitle}}</span>
663
- }
664
- </span>
665
- @if (showColumnMenu(column)) {
666
- <kendo-treelist-column-menu
667
- [standalone]="false"
668
- [settings]="columnMenuSettings"
669
- [column]="column"
670
- [columnMenuTemplate]="columnMenuTemplate">
671
- </kendo-treelist-column-menu>
672
- }
673
- </span>
674
- @if (resizable) {
675
- <span kendoTreeListColumnHandle
676
- kendoDraggable
677
- class="k-column-resizer"
678
- [column]="column"
679
- [columns]="columns">
680
- </span>
681
- }
682
- </th>
683
- }
684
- }
685
- </tr>
686
- }
687
- @if (showFilterRow) {
688
- <tr
689
- kendoTreeListFilterRow
690
- [columns]="leafColumns"
691
- [filter]="filter"
692
- [lockedColumnsCount]="lockedColumnsCount"
693
- kendoTreeListLogicalRow
694
- [totalColumns]="totalColumns"
695
- [logicalRowIndex]="totalColumnLevels + 1"
696
- [logicalSlaveRow]="lockedColumnsCount > 0"
697
- [logicalCellsCount]="columns.length"
698
- [logicalSlaveCellsCount]="unlockedColumnsCount"></tr>
699
- }
700
- `, isInline: true, dependencies: [{ kind: "directive", type: LogicalRowDirective, selector: "[kendoTreeListLogicalRow]", inputs: ["logicalRowIndex", "logicalSlaveRow", "logicalCellsCount", "logicalSlaveCellsCount", "dataRowIndex", "dataItem", "isNew", "totalColumns"] }, { kind: "directive", type: LogicalCellDirective, selector: "[kendoTreeListLogicalCell]", inputs: ["logicalColIndex", "logicalRowIndex", "logicalSlaveCell", "column", "colIndex", "colSpan", "rowSpan", "dataRowIndex", "dataItem", "expandable", "headerLabelText"] }, { kind: "directive", type: DropTargetDirective, selector: "[kendoDropTarget]", inputs: ["context"], outputs: ["enter", "leave", "drop"] }, { kind: "directive", type: DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { kind: "directive", type: DraggableColumnDirective, selector: "[kendoDraggableColumn]", inputs: ["context", "enableDrag"], outputs: ["drag"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: FilterMenuComponent, selector: "kendo-treelist-filter-menu", inputs: ["column", "filter", "tabIndex"] }, { kind: "component", type: ColumnMenuComponent, selector: "kendo-treelist-column-menu", inputs: ["standalone", "column", "settings", "sort", "filter", "sortable", "columnMenuTemplate", "tabIndex"] }, { kind: "directive", type: TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: FocusableDirective, selector: "[kendoTreeListFocusable],\n [kendoTreeListAddCommand],\n [kendoTreeListEditCommand],\n [kendoTreeListRemoveCommand],\n [kendoTreeListSaveCommand],\n [kendoTreeListCancelCommand]\n ", inputs: ["kendoTreeListFocusable", "enabled", "kendoTreeListAddCommand", "kendoTreeListEditCommand", "kendoTreeListRemoveCommand", "kendoTreeListSaveCommand", "kendoTreeListCancelCommand"] }, { kind: "directive", type: ColumnHandleDirective, selector: "[kendoTreeListColumnHandle]", inputs: ["columns", "column"] }, { kind: "component", type: FilterRowComponent, selector: "[kendoTreeListFilterRow]", inputs: ["columns", "filter", "logicalRowIndex", "lockedColumnsCount"] }, { kind: "component", type: CheckBoxComponent, selector: "kendo-checkbox", inputs: ["checkedState", "rounded"], outputs: ["checkedStateChange"], exportAs: ["kendoCheckBox"] }, { kind: "directive", type: TreeListSelectAllCheckboxDirective, selector: "[kendoTreeListSelectAllCheckbox]" }] });
701
- }
702
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: HeaderComponent, decorators: [{
703
- type: Component,
704
- args: [{
705
- selector: '[kendoTreeListHeader]',
706
- template: `
707
- @for (i of columnLevels; track $index; let levelIndex = $index) {
708
- <tr role="row"
709
- kendoTreeListLogicalRow
710
- [logicalRowIndex]="levelIndex"
711
- [logicalSlaveRow]="lockedColumnsCount > 0"
712
- [logicalCellsCount]="columns.length"
713
- [totalColumns]="totalColumns"
714
- [logicalSlaveCellsCount]="unlockedColumnsCount">
715
- @for (column of columnsForLevel(levelIndex); track $index; let columnIndex = $index; let last = $last) {
716
- @if (!isColumnGroupComponent(column)) {
717
- <th
718
- kendoTreeListLogicalCell
719
- [logicalRowIndex]="levelIndex"
720
- [logicalColIndex]="logicalColumnIndex(column)"
721
- [headerLabelText]="column.title || getColumnComponent(column).field"
722
- [colSpan]="column.colspan"
723
- [rowSpan]="column.rowspan(totalColumnLevels)"
724
- role="columnheader"
725
- aria-selected="false"
726
- [attr.aria-sort]="sortState(getColumnComponent(column))"
727
- [class.k-sorted]="sortState(getColumnComponent(column))"
728
- (keydown)="onHeaderKeydown(getColumnComponent(column), $event)"
729
- kendoDropTarget
730
- kendoDraggable
731
- kendoDraggableColumn
732
- [enableDrag]="shouldActivate(column)"
733
- [context]="{
734
- field: getColumnComponent(column).field,
735
- type: 'column',
736
- column: column,
737
- hint: column.title || getColumnComponent(column).field,
738
- lastColumn: last && columnIndex === 0
739
- }"
740
- class="k-header k-table-th"
741
- [class.k-filterable]="(showFilterMenu && isFilterable(getColumnComponent(column))) || showColumnMenu(column)"
742
- [class.k-first]="isFirstOnRow(getColumnComponent(column), columnIndex)"
743
- [ngClass]="column.headerClass"
744
- [ngStyle]="column.headerStyle"
745
- [attr.rowspan]="column.rowspan(totalColumnLevels)"
746
- [attr.colspan]="column.colspan"
747
- [attr.aria-haspopup]="isNavigable && (showFilterMenu || showColumnMenu(column)) ? 'dialog' : undefined"
748
- [attr.aria-expanded]="isNavigable && (showFilterMenu || showColumnMenu(column)) ? false : undefined"
749
- [attr.aria-keyshortcuts]="isNavigable && (showFilterMenu || showColumnMenu(column)) ? 'Alt + ArrowDown' : undefined">
750
- @if (!isInteractive(getColumnComponent(column), 'sortable')) {
751
- <span class="k-cell-inner">
752
- <span class="k-link" [class.!k-cursor-default]="!isInteractive(getColumnComponent(column), 'reorderable')">
753
- <ng-template
754
- [templateContext]="{
755
- templateRef: column.headerTemplateRef,
756
- columnIndex: column.leafIndex,
757
- column: column,
758
- $implicit: column
759
- }">
760
- </ng-template>
761
- @if (!column.headerTemplateRef) {
762
- <span class="k-column-title">{{column.displayTitle}}</span>
763
- }
764
- </span>
765
- @if (showFilterMenu && isFilterable(getColumnComponent(column))) {
766
- <kendo-treelist-filter-menu
767
- [column]="getColumnComponent(column)"
768
- [filter]="filter"
769
- [tabIndex]="tabIndex">
770
- </kendo-treelist-filter-menu>
771
- }
772
- @if (showColumnMenu(column)) {
773
- <kendo-treelist-column-menu
774
- [standalone]="false"
775
- [settings]="columnMenuSettings"
776
- [column]="column"
777
- [columnMenuTemplate]="columnMenuTemplate"
778
- [sort]="sort"
779
- [filter]="filter"
780
- [sortable]="sortable"
781
- [tabIndex]="tabIndex">
782
- </kendo-treelist-column-menu>
783
- }
784
- </span>
785
- }
786
- @if (isInteractive(getColumnComponent(column), 'sortable')) {
787
- <span class="k-cell-inner">
788
- <span #link class="k-link" (click)="onSortClick(getColumnComponent(column), $event, link)">
789
- <ng-template
790
- [templateContext]="{
791
- templateRef: column.headerTemplateRef,
792
- columnIndex: column.leafIndex,
793
- column: column,
794
- $implicit: column
795
- }">
796
- </ng-template>
797
- @if (!column.headerTemplateRef) {
798
- <span class="k-column-title">{{column.displayTitle}}</span>
799
- }
800
- <span [class.k-sort-icon]="sortDescriptor(getColumnComponent(column).field).dir">
801
- @if (sortDescriptor(getColumnComponent(column).field).dir) {
802
- <kendo-icon-wrapper
803
- role="note" [attr.aria-label]="sortableLabel"
804
- name="sort-{{sortDescriptor(getColumnComponent(column).field).dir}}-small"
805
- [svgIcon]="sortDescriptor(getColumnComponent(column).field).dir === 'asc' ? sortAscSmallIcon : sortDescSmallIcon"
806
- ></kendo-icon-wrapper>
807
- }
808
- </span>
809
- @if (showSortNumbering(getColumnComponent(column))) {
810
- <span class="k-sort-order">{{sortOrder(getColumnComponent(column).field)}}</span>
811
- }
812
- </span>
813
- @if (showFilterMenu && isFilterable(getColumnComponent(column))) {
814
- <kendo-treelist-filter-menu
815
- [column]="getColumnComponent(column)"
816
- [filter]="filter"
817
- [tabIndex]="tabIndex">
818
- </kendo-treelist-filter-menu>
819
- }
820
- @if (showColumnMenu(column)) {
821
- <kendo-treelist-column-menu
822
- [standalone]="false"
823
- [settings]="columnMenuSettings"
824
- [column]="column"
825
- [columnMenuTemplate]="columnMenuTemplate"
826
- [sort]="sort"
827
- [filter]="filter"
828
- [sortable]="sortable"
829
- [tabIndex]="tabIndex">
830
- </kendo-treelist-column-menu>
831
- }
832
- </span>
833
- }
834
- @if (isCheckboxColumn(column) && !column.headerTemplateRef && $any(column).showSelectAll) {
835
- <kendo-checkbox
836
- [attr.id]="selectAllCheckboxId()"
837
- [inputAttributes]="{'aria-label': selectAllCheckboxLabel}"
838
- kendoTreeListSelectAllCheckbox
839
- kendoTreeListFocusable
840
- (checkedStateChange)="selectAllChange($event)"
841
- ></kendo-checkbox>
842
- }
843
- @if (resizable) {
844
- <span kendoTreeListColumnHandle
845
- kendoDraggable
846
- class="k-column-resizer"
847
- [column]="column"
848
- [columns]="columns">
849
- </span>
850
- }
851
- </th>
852
- }
853
- @if (isColumnGroupComponent(column)) {
854
- <th
855
- kendoTreeListLogicalCell
856
- [logicalRowIndex]="levelIndex"
857
- [logicalColIndex]="logicalColumnIndex(column)"
858
- [rowSpan]="column.rowspan(totalColumnLevels)"
859
- [colSpan]="column.colspan"
860
- [headerLabelText]="column.title || getColumnComponent(column).field"
861
- kendoDropTarget
862
- kendoDraggable
863
- kendoDraggableColumn
864
- [enableDrag]="shouldActivate(column)"
865
- [context]="{
866
- type: 'columnGroup',
867
- column: column,
868
- hint: column.title,
869
- lastColumn: last && columnIndex === 0
870
- }"
871
- class="k-header k-table-th"
872
- [class.k-first]="isFirstOnRow(getColumnComponent(column), columnIndex)"
873
- [attr.aria-haspopup]="(isNavigable && showColumnMenu(column)) ? 'dialog' : undefined"
874
- [attr.aria-expanded]="(isNavigable && showColumnMenu(column)) ? false : undefined"
875
- [attr.aria-keyshortcuts]="isNavigable && showColumnMenu(column) ? 'Alt + ArrowDown' : undefined"
876
- [ngClass]="column.headerClass"
877
- [ngStyle]="column.headerStyle"
878
- [attr.rowspan]="column.rowspan(totalColumnLevels)"
879
- [attr.colspan]="column.colspan">
880
- <span class="k-cell-inner">
881
- <span class="k-link" [class.!k-cursor-default]="!isInteractive(getColumnComponent(column), 'reorderable')">
882
- <ng-template
883
- [templateContext]="{
884
- templateRef: column.headerTemplateRef,
885
- columnIndex: lockedColumnsCount + columnIndex,
886
- column: column,
887
- $implicit: column
888
- }">
889
- </ng-template>
890
- @if (!column.headerTemplateRef) {
891
- <span class="k-column-title">{{column.displayTitle}}</span>
892
- }
893
- </span>
894
- @if (showColumnMenu(column)) {
895
- <kendo-treelist-column-menu
896
- [standalone]="false"
897
- [settings]="columnMenuSettings"
898
- [column]="column"
899
- [columnMenuTemplate]="columnMenuTemplate">
900
- </kendo-treelist-column-menu>
901
- }
902
- </span>
903
- @if (resizable) {
904
- <span kendoTreeListColumnHandle
905
- kendoDraggable
906
- class="k-column-resizer"
907
- [column]="column"
908
- [columns]="columns">
909
- </span>
910
- }
911
- </th>
912
- }
913
- }
914
- </tr>
915
- }
916
- @if (showFilterRow) {
917
- <tr
918
- kendoTreeListFilterRow
919
- [columns]="leafColumns"
920
- [filter]="filter"
921
- [lockedColumnsCount]="lockedColumnsCount"
922
- kendoTreeListLogicalRow
923
- [totalColumns]="totalColumns"
924
- [logicalRowIndex]="totalColumnLevels + 1"
925
- [logicalSlaveRow]="lockedColumnsCount > 0"
926
- [logicalCellsCount]="columns.length"
927
- [logicalSlaveCellsCount]="unlockedColumnsCount"></tr>
928
- }
929
- `,
930
- standalone: true,
931
- imports: [LogicalRowDirective, LogicalCellDirective, DropTargetDirective, DraggableDirective, DraggableColumnDirective, NgClass, NgStyle, FilterMenuComponent, ColumnMenuComponent, TemplateContextDirective, IconWrapperComponent, FocusableDirective, ColumnHandleDirective, FilterRowComponent, CheckBoxComponent, TreeListSelectAllCheckboxDirective]
932
- }]
933
- }], ctorParameters: () => [{ type: i1.SinglePopupService }, { type: i2.DragHintService }, { type: i3.DropCueService }, { type: i4.ColumnReorderService }, { type: i5.IdService }, { type: i6.SortService }, { type: i7.SelectionService }, { type: i8.LocalizationService }, { type: i0.ChangeDetectorRef }, { type: i9.ColumnInfoService }, { type: i10.ContextService }, { type: i11.NavigationService }], propDecorators: { totalColumnLevels: [{
934
- type: Input
935
- }], columns: [{
936
- type: Input
937
- }], scrollable: [{
938
- type: Input
939
- }], filterable: [{
940
- type: Input
941
- }], sort: [{
942
- type: Input
943
- }], filter: [{
944
- type: Input
945
- }], sortable: [{
946
- type: Input
947
- }], lockedColumnsCount: [{
948
- type: Input
949
- }], resizable: [{
950
- type: Input
951
- }], reorderable: [{
952
- type: Input
953
- }], columnMenu: [{
954
- type: Input
955
- }], columnMenuTemplate: [{
956
- type: Input
957
- }], totalColumnsCount: [{
958
- type: Input
959
- }], totalColumns: [{
960
- type: Input
961
- }], tabIndex: [{
962
- type: Input
963
- }], headerClass: [{
964
- type: HostBinding,
965
- args: ['class.k-grid-header']
966
- }], hostClass: [{
967
- type: HostBinding,
968
- args: ['class.k-table-thead']
969
- }], dropTargets: [{
970
- type: ViewChildren,
971
- args: [DropTargetDirective]
972
- }], filterMenus: [{
973
- type: ViewChildren,
974
- args: [FilterMenuComponent]
975
- }], columnMenus: [{
976
- type: ViewChildren,
977
- args: [ColumnMenuComponent]
978
- }] } });