@progress/kendo-angular-treelist 13.0.0-develop.2 → 13.0.0-develop.21

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 (196) hide show
  1. package/binding-directives/base-binding.directive.d.ts +5 -1
  2. package/binding-directives/data-bound-tree-component.d.ts +9 -0
  3. package/binding-directives/flat-binding.directive.d.ts +14 -3
  4. package/binding-directives/hierarchy-binding.directive.d.ts +12 -3
  5. package/column-menu/column-chooser.component.d.ts +10 -6
  6. package/column-menu/column-menu-chooser.component.d.ts +6 -10
  7. package/column-menu/column-menu-filter.component.d.ts +6 -10
  8. package/column-menu/column-menu-item-content-template.directive.d.ts +1 -1
  9. package/column-menu/column-menu-item.component.d.ts +8 -6
  10. package/column-menu/column-menu-lock.component.d.ts +5 -11
  11. package/column-menu/column-menu-settings.interface.d.ts +7 -10
  12. package/column-menu/column-menu-sort.component.d.ts +5 -11
  13. package/column-menu/column-menu.component.d.ts +1 -1
  14. package/column-menu/column-menu.service.d.ts +1 -1
  15. package/column-resizing/column-resize.interface.d.ts +1 -1
  16. package/columns/checkbox-column.component.d.ts +1 -1
  17. package/columns/column-base.d.ts +4 -0
  18. package/columns/column-group.component.d.ts +9 -6
  19. package/columns/column.component.d.ts +16 -66
  20. package/columns/command-column.component.d.ts +13 -15
  21. package/columns/rowreorder-column.component.d.ts +19 -0
  22. package/columns/span-column.component.d.ts +10 -81
  23. package/data/change-event-args.interface.d.ts +2 -2
  24. package/data/data.collection.d.ts +6 -0
  25. package/dragdrop/column-reorder-config.d.ts +1 -1
  26. package/editing/add-command.directive.d.ts +1 -1
  27. package/editing/cancel-command.directive.d.ts +1 -1
  28. package/editing/edit-command.directive.d.ts +1 -1
  29. package/editing/edit-event-args.interface.d.ts +1 -1
  30. package/editing/edit-template.directive.d.ts +11 -0
  31. package/editing/remove-command.directive.d.ts +1 -1
  32. package/editing/remove-event-args.interface.d.ts +1 -1
  33. package/editing/save-command.directive.d.ts +1 -1
  34. package/editing/save-event-args.interface.d.ts +1 -1
  35. package/esm2020/binding-directives/base-binding.directive.mjs +9 -3
  36. package/esm2020/binding-directives/flat-binding.directive.mjs +56 -6
  37. package/esm2020/binding-directives/hierarchy-binding.directive.mjs +46 -6
  38. package/esm2020/column-menu/column-chooser.component.mjs +10 -6
  39. package/esm2020/column-menu/column-menu-chooser.component.mjs +8 -12
  40. package/esm2020/column-menu/column-menu-filter.component.mjs +6 -10
  41. package/esm2020/column-menu/column-menu-item-content-template.directive.mjs +1 -1
  42. package/esm2020/column-menu/column-menu-item.component.mjs +9 -7
  43. package/esm2020/column-menu/column-menu-lock.component.mjs +5 -11
  44. package/esm2020/column-menu/column-menu-sort.component.mjs +5 -11
  45. package/esm2020/column-menu/column-menu.component.mjs +2 -2
  46. package/esm2020/column-menu/column-menu.service.mjs +1 -1
  47. package/esm2020/columns/checkbox-column.component.mjs +1 -1
  48. package/esm2020/columns/column-base.mjs +4 -0
  49. package/esm2020/columns/column-group.component.mjs +9 -6
  50. package/esm2020/columns/column.component.mjs +16 -39
  51. package/esm2020/columns/command-column.component.mjs +13 -15
  52. package/esm2020/columns/rowreorder-column.component.mjs +47 -0
  53. package/esm2020/columns/span-column.component.mjs +10 -81
  54. package/esm2020/data/data.collection.mjs +41 -28
  55. package/esm2020/editing/add-command.directive.mjs +2 -2
  56. package/esm2020/editing/base-command.directive.mjs +1 -1
  57. package/esm2020/editing/cancel-command.directive.mjs +2 -2
  58. package/esm2020/editing/edit-command.directive.mjs +2 -2
  59. package/esm2020/editing/edit-template.directive.mjs +11 -0
  60. package/esm2020/editing/remove-command.directive.mjs +2 -2
  61. package/esm2020/editing/save-command.directive.mjs +2 -2
  62. package/esm2020/excel/excel-command.directive.mjs +2 -2
  63. package/esm2020/filtering/cell/autocomplete-filter-cell.component.mjs +12 -1
  64. package/esm2020/filtering/cell/boolean-filter-cell.component.mjs +29 -12
  65. package/esm2020/filtering/cell/date-filter-cell.component.mjs +23 -12
  66. package/esm2020/filtering/cell/filter-cell-operators.component.mjs +36 -1
  67. package/esm2020/filtering/cell/filter-cell-wrapper.component.mjs +3 -1
  68. package/esm2020/filtering/cell/numeric-filter-cell.component.mjs +25 -13
  69. package/esm2020/filtering/cell/string-filter-cell.component.mjs +26 -14
  70. package/esm2020/filtering/date-filter.component.mjs +6 -1
  71. package/esm2020/filtering/filter-input.directive.mjs +29 -3
  72. package/esm2020/filtering/menu/boolean-filter-menu.component.mjs +33 -19
  73. package/esm2020/filtering/menu/date-filter-menu-input.component.mjs +1 -1
  74. package/esm2020/filtering/menu/date-filter-menu.component.mjs +12 -12
  75. package/esm2020/filtering/menu/filter-menu.component.mjs +1 -1
  76. package/esm2020/filtering/menu/numeric-filter-menu-input.component.mjs +1 -1
  77. package/esm2020/filtering/menu/numeric-filter-menu.component.mjs +12 -12
  78. package/esm2020/filtering/menu/string-filter-menu-input.component.mjs +19 -8
  79. package/esm2020/filtering/menu/string-filter-menu.component.mjs +15 -0
  80. package/esm2020/filtering/numeric-filter.component.mjs +4 -1
  81. package/esm2020/filtering/operators/after-eq-filter-operator.component.mjs +2 -5
  82. package/esm2020/filtering/operators/after-filter-operator.component.mjs +2 -5
  83. package/esm2020/filtering/operators/before-eq-filter-operator.component.mjs +2 -5
  84. package/esm2020/filtering/operators/before-filter-operator.component.mjs +3 -6
  85. package/esm2020/filtering/operators/contains-filter-operator.component.mjs +1 -4
  86. package/esm2020/filtering/operators/ends-with-filter-operator.component.mjs +1 -4
  87. package/esm2020/filtering/operators/eq-filter-operator.component.mjs +1 -4
  88. package/esm2020/filtering/operators/gt-filter-operator.component.mjs +1 -4
  89. package/esm2020/filtering/operators/gte-filter-operator.component.mjs +1 -4
  90. package/esm2020/filtering/operators/is-empty-filter-operator.component.mjs +1 -4
  91. package/esm2020/filtering/operators/is-not-empty-filter-operator.component.mjs +1 -4
  92. package/esm2020/filtering/operators/is-not-null-filter-operator.component.mjs +1 -4
  93. package/esm2020/filtering/operators/isnull-filter-operator.component.mjs +1 -4
  94. package/esm2020/filtering/operators/lt-filter-operator.component.mjs +2 -5
  95. package/esm2020/filtering/operators/lte-filter-operator.component.mjs +1 -4
  96. package/esm2020/filtering/operators/neq-filter-operator.component.mjs +1 -4
  97. package/esm2020/filtering/operators/not-contains-filter-operator.component.mjs +1 -4
  98. package/esm2020/filtering/operators/starts-with-filter-operator.component.mjs +1 -4
  99. package/esm2020/filtering/string-filter.component.mjs +2 -1
  100. package/esm2020/index.mjs +2 -0
  101. package/esm2020/localization/custom-messages.component.mjs +1 -1
  102. package/esm2020/localization/messages.mjs +13 -1
  103. package/esm2020/package-metadata.mjs +2 -2
  104. package/esm2020/pager/pager-element.component.mjs +17 -0
  105. package/esm2020/pager/pager-next-buttons.component.mjs +8 -11
  106. package/esm2020/pager/pager-numeric-buttons.component.mjs +1 -1
  107. package/esm2020/pager/pager-page-sizes.component.mjs +1 -1
  108. package/esm2020/pager/pager-prev-buttons.component.mjs +8 -11
  109. package/esm2020/pager/pager-template.directive.mjs +1 -1
  110. package/esm2020/pdf/pdf-command.directive.mjs +2 -2
  111. package/esm2020/pdf/pdf-margin.component.mjs +9 -0
  112. package/esm2020/rendering/cell-template.directive.mjs +1 -1
  113. package/esm2020/rendering/cell.component.mjs +73 -20
  114. package/esm2020/rendering/common/spacer.component.mjs +1 -1
  115. package/esm2020/rendering/constants.mjs +4 -0
  116. package/esm2020/rendering/header/header.component.mjs +6 -1
  117. package/esm2020/rendering/list.component.mjs +20 -18
  118. package/esm2020/rendering/table-body.component.mjs +5 -3
  119. package/esm2020/row-reordering/flat-reorder.service.mjs +48 -0
  120. package/esm2020/row-reordering/hierarchical-reorder.service.mjs +55 -0
  121. package/esm2020/row-reordering/row-reorder.service.mjs +220 -0
  122. package/esm2020/row-reordering/types.mjs +5 -0
  123. package/esm2020/row-reordering/utils.mjs +129 -0
  124. package/esm2020/shared.module.mjs +8 -3
  125. package/esm2020/treelist.component.mjs +229 -321
  126. package/esm2020/treelist.module.mjs +71 -66
  127. package/excel/excel-command.directive.d.ts +1 -1
  128. package/excel/excel-export-data.interface.d.ts +1 -1
  129. package/excel/excel.component.d.ts +9 -8
  130. package/fesm2015/progress-kendo-angular-treelist.mjs +1434 -832
  131. package/fesm2020/progress-kendo-angular-treelist.mjs +1426 -833
  132. package/filtering/cell/autocomplete-filter-cell.component.d.ts +4 -0
  133. package/filtering/cell/boolean-filter-cell.component.d.ts +19 -11
  134. package/filtering/cell/date-filter-cell.component.d.ts +15 -11
  135. package/filtering/cell/filter-cell-operators.component.d.ts +29 -1
  136. package/filtering/cell/numeric-filter-cell.component.d.ts +17 -12
  137. package/filtering/cell/string-filter-cell.component.d.ts +16 -11
  138. package/filtering/date-filter.component.d.ts +7 -11
  139. package/filtering/filter-input.directive.d.ts +7 -1
  140. package/filtering/menu/boolean-filter-menu.component.d.ts +19 -13
  141. package/filtering/menu/date-filter-menu.component.d.ts +12 -12
  142. package/filtering/menu/numeric-filter-menu.component.d.ts +12 -12
  143. package/filtering/menu/string-filter-menu-input.component.d.ts +4 -0
  144. package/filtering/menu/string-filter-menu.component.d.ts +15 -0
  145. package/filtering/numeric-filter.component.d.ts +4 -1
  146. package/filtering/operators/after-eq-filter-operator.component.d.ts +4 -0
  147. package/filtering/operators/after-filter-operator.component.d.ts +4 -0
  148. package/filtering/operators/before-eq-filter-operator.component.d.ts +4 -0
  149. package/filtering/operators/before-filter-operator.component.d.ts +4 -0
  150. package/filtering/operators/contains-filter-operator.component.d.ts +1 -4
  151. package/filtering/operators/ends-with-filter-operator.component.d.ts +1 -4
  152. package/filtering/operators/eq-filter-operator.component.d.ts +1 -4
  153. package/filtering/operators/gte-filter-operator.component.d.ts +1 -4
  154. package/filtering/operators/is-empty-filter-operator.component.d.ts +1 -4
  155. package/filtering/operators/is-not-empty-filter-operator.component.d.ts +1 -4
  156. package/filtering/operators/is-not-null-filter-operator.component.d.ts +1 -4
  157. package/filtering/operators/isnull-filter-operator.component.d.ts +1 -4
  158. package/filtering/operators/lt-filter-operator.component.d.ts +4 -0
  159. package/filtering/operators/neq-filter-operator.component.d.ts +1 -4
  160. package/filtering/operators/not-contains-filter-operator.component.d.ts +1 -4
  161. package/filtering/operators/starts-with-filter-operator.component.d.ts +1 -4
  162. package/filtering/string-filter.component.d.ts +2 -1
  163. package/index.d.ts +2 -0
  164. package/localization/custom-messages.component.d.ts +1 -1
  165. package/localization/messages.d.ts +42 -2
  166. package/navigation/navigation-cell.interface.d.ts +1 -4
  167. package/navigation/navigation-row.interface.d.ts +1 -4
  168. package/package.json +16 -15
  169. package/pager/pager-element.component.d.ts +9 -0
  170. package/pager/pager-next-buttons.component.d.ts +0 -3
  171. package/pager/pager-numeric-buttons.component.d.ts +1 -1
  172. package/pager/pager-prev-buttons.component.d.ts +0 -3
  173. package/pager/pager-settings.d.ts +1 -15
  174. package/pager/pager-template.directive.d.ts +1 -1
  175. package/pdf/pdf-command.directive.d.ts +1 -1
  176. package/pdf/pdf-margin.component.d.ts +9 -0
  177. package/rendering/cell-template.directive.d.ts +1 -1
  178. package/rendering/cell.component.d.ts +10 -1
  179. package/rendering/common/spacer.component.d.ts +1 -1
  180. package/rendering/constants.d.ts +4 -0
  181. package/rendering/header/header.component.d.ts +1 -0
  182. package/row-reordering/flat-reorder.service.d.ts +16 -0
  183. package/row-reordering/hierarchical-reorder.service.d.ts +16 -0
  184. package/row-reordering/row-reorder.service.d.ts +61 -0
  185. package/row-reordering/types.d.ts +39 -0
  186. package/row-reordering/utils.d.ts +85 -0
  187. package/schematics/ngAdd/index.js +3 -3
  188. package/scrolling/content-scroll-event.d.ts +1 -1
  189. package/scrolling/scroll-bottom-event.d.ts +1 -1
  190. package/scrolling/scroll-request.service.d.ts +6 -0
  191. package/selection/selectable-settings.d.ts +5 -15
  192. package/selection/selectable.directive.d.ts +1 -1
  193. package/selection/selection-change-event.d.ts +1 -1
  194. package/shared.module.d.ts +5 -4
  195. package/treelist.component.d.ts +66 -289
  196. package/treelist.module.d.ts +68 -66
@@ -4,34 +4,39 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { Component, HostBinding, Input } from '@angular/core';
6
6
  import { EditService } from '../editing/edit.service';
7
- import { isSpanColumn, isCheckboxColumn } from '../columns/column-base';
7
+ import { isSpanColumn, isCheckboxColumn, isRowReorderColumn } from '../columns/column-base';
8
8
  import { isColumnComponent } from '../columns/column.component';
9
9
  import { columnsToRender } from "../columns/column-common";
10
10
  import { isNullOrEmptyString, extractFormat, isColumnEditable } from '../utils';
11
11
  import { FocusGroup } from '../navigation/focus-group';
12
- import { caretAltDownIcon, caretAltRightIcon } from '@progress/kendo-svg-icons';
12
+ import { caretAltDownIcon, caretAltLeftIcon, caretAltRightIcon, reorderIcon } from '@progress/kendo-svg-icons';
13
+ import { LocalizationService } from "@progress/kendo-angular-l10n";
13
14
  import * as i0 from "@angular/core";
14
15
  import * as i1 from "../editing/edit.service";
15
- import * as i2 from "../navigation/focus-group";
16
- import * as i3 from "@progress/kendo-angular-icons";
17
- import * as i4 from "@progress/kendo-angular-inputs";
18
- import * as i5 from "@progress/kendo-angular-dateinputs";
19
- import * as i6 from "@angular/common";
20
- import * as i7 from "../navigation/focusable.directive";
21
- import * as i8 from "@angular/forms";
22
- import * as i9 from "./common/level-items.pipe";
23
- import * as i10 from "./common/field-accessor.pipe";
16
+ import * as i2 from "@progress/kendo-angular-l10n";
17
+ import * as i3 from "../navigation/focus-group";
18
+ import * as i4 from "@progress/kendo-angular-icons";
19
+ import * as i5 from "@progress/kendo-angular-inputs";
20
+ import * as i6 from "@progress/kendo-angular-dateinputs";
21
+ import * as i7 from "@angular/common";
22
+ import * as i8 from "../navigation/focusable.directive";
23
+ import * as i9 from "@angular/forms";
24
+ import * as i10 from "./common/level-items.pipe";
25
+ import * as i11 from "./common/field-accessor.pipe";
24
26
  /**
25
27
  * @hidden
26
28
  */
27
29
  export class CellComponent {
28
- constructor(editService, focusGroup) {
30
+ constructor(editService, localization, focusGroup) {
29
31
  this.editService = editService;
32
+ this.localization = localization;
30
33
  this.focusGroup = focusGroup;
31
34
  this.isNew = false;
32
35
  this.level = 0;
33
36
  this.caretAltDownIcon = caretAltDownIcon;
34
37
  this.caretAltRightIcon = caretAltRightIcon;
38
+ this.caretAltLeftIcon = caretAltLeftIcon;
39
+ this.reorderIcon = reorderIcon;
35
40
  this.cellContext = {};
36
41
  this._templateContext = {};
37
42
  this._editTemplateContext = {};
@@ -47,6 +52,12 @@ export class CellComponent {
47
52
  get textNoWrapClass() {
48
53
  return this.column.expandable;
49
54
  }
55
+ get dragHandleCellClass() {
56
+ return isRowReorderColumn(this.column);
57
+ }
58
+ get dragRowHandleLabel() {
59
+ return isRowReorderColumn(this.column) ? this.localization.get('dragRowHandleLabel') : undefined;
60
+ }
50
61
  set viewItem(value) {
51
62
  this._viewItem = value;
52
63
  this.cellContext.viewItem = this.viewItem;
@@ -113,9 +124,28 @@ export class CellComponent {
113
124
  context.loading = this.loading;
114
125
  context.rowIndex = this.viewItem.rowIndex;
115
126
  }
127
+ get arrowIcon() {
128
+ const icon = !this.isExpanded ?
129
+ !this.localization.rtl ?
130
+ 'caret-alt-right' :
131
+ 'caret-alt-left' :
132
+ 'caret-alt-down';
133
+ return icon;
134
+ }
135
+ get arrowSVGIcon() {
136
+ const icon = !this.isExpanded ?
137
+ !this.localization.rtl ?
138
+ this.caretAltRightIcon :
139
+ this.caretAltLeftIcon :
140
+ this.caretAltDownIcon;
141
+ return icon;
142
+ }
143
+ messageFor(token) {
144
+ return this.localization.get(token);
145
+ }
116
146
  }
117
- CellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CellComponent, deps: [{ token: i1.EditService }, { token: i2.FocusGroup }], target: i0.ɵɵFactoryTarget.Component });
118
- CellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: CellComponent, selector: "[kendoTreeListCell]", inputs: { column: "column", columnIndex: "columnIndex", isNew: "isNew", level: "level", hasChildren: "hasChildren", isExpanded: "isExpanded", loading: "loading", expandIcons: "expandIcons", selected: "selected", dataItem: "dataItem", viewItem: "viewItem" }, host: { properties: { "class.k-command-cell": "this.commandCellClass", "class.k-checkbox-cell": "this.isCheckboxColumn", "class.k-text-nowrap": "this.textNoWrapClass" } }, ngImport: i0, template: `
147
+ CellComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CellComponent, deps: [{ token: i1.EditService }, { token: i2.LocalizationService }, { token: i3.FocusGroup }], target: i0.ɵɵFactoryTarget.Component });
148
+ CellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: CellComponent, selector: "[kendoTreeListCell]", inputs: { column: "column", columnIndex: "columnIndex", isNew: "isNew", level: "level", hasChildren: "hasChildren", isExpanded: "isExpanded", loading: "loading", expandIcons: "expandIcons", selected: "selected", dataItem: "dataItem", viewItem: "viewItem" }, host: { properties: { "class.k-command-cell": "this.commandCellClass", "class.k-checkbox-cell": "this.isCheckboxColumn", "class.k-text-nowrap": "this.textNoWrapClass", "class.k-drag-cell": "this.dragHandleCellClass", "class.k-touch-action-none": "this.dragHandleCellClass", "attr.aria-label": "this.dragRowHandleLabel" } }, ngImport: i0, template: `
119
149
  <ng-container [ngSwitch]="isEdited">
120
150
  <ng-container *ngSwitchCase="false">
121
151
  <ng-container *ngIf="column.expandable">
@@ -123,8 +153,8 @@ CellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
123
153
  <kendo-icon-wrapper
124
154
  aria-hidden="true"
125
155
  *ngIf="hasChildren && expandIcons && !loading"
126
- [name]="isExpanded ? 'caret-alt-down' : 'caret-alt-right'"
127
- [svgIcon]="isExpanded ? caretAltDownIcon : caretAltRightIcon"></kendo-icon-wrapper>
156
+ [name]="arrowIcon"
157
+ [svgIcon]="arrowSVGIcon"></kendo-icon-wrapper>
128
158
  <span class="k-icon k-i-loading" *ngIf="hasChildren && expandIcons && loading"></span>
129
159
  </ng-container>
130
160
  <ng-container *ngIf="column.templateRef"
@@ -141,9 +171,16 @@ CellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
141
171
  <input
142
172
  type="checkbox"
143
173
  kendoTreeListFocusable
174
+ [attr.aria-label]="messageFor('selectRowCheckboxLabel')"
144
175
  class="k-checkbox k-checkbox-md k-rounded-md"
145
176
  [checked]="selected" />
146
177
  </ng-template>
178
+ <ng-container *ngIf="column.isRowReorderColumn && !isNew">
179
+ <kendo-icon-wrapper
180
+ name="reorder"
181
+ [svgIcon]="reorderIcon">
182
+ </kendo-icon-wrapper>
183
+ </ng-container>
147
184
  </ng-container>
148
185
  <ng-container *ngSwitchCase="true">
149
186
  <ng-container
@@ -184,7 +221,7 @@ CellComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
184
221
  </ng-container>
185
222
  </ng-container>
186
223
  </ng-container>
187
- `, isInline: true, components: [{ type: i3.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }, { type: i4.NumericTextBoxComponent, selector: "kendo-numerictextbox", inputs: ["focusableId", "disabled", "readonly", "title", "autoCorrect", "format", "max", "min", "decimals", "placeholder", "step", "spinners", "rangeValidation", "tabindex", "tabIndex", "changeValueOnScroll", "selectOnFocus", "value", "maxlength", "size", "rounded", "fillMode"], outputs: ["valueChange", "focus", "blur"], exportAs: ["kendoNumericTextBox"] }, { type: i5.DatePickerComponent, selector: "kendo-datepicker", inputs: ["focusableId", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "navigationItemTemplate", "activeView", "bottomView", "topView", "calendarType", "animateCalendarNavigation", "disabled", "readonly", "readOnlyInput", "popupSettings", "navigation", "min", "max", "incompleteDateValidation", "focusedDate", "value", "format", "twoDigitYearMax", "formatPlaceholder", "placeholder", "tabindex", "tabIndex", "disabledDates", "title", "subtitle", "rangeValidation", "disabledDatesValidation", "weekNumber", "size", "rounded", "fillMode", "adaptiveMode"], outputs: ["valueChange", "focus", "blur", "open", "close"], exportAs: ["kendo-datepicker"] }], directives: [{ type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i6.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i7.FocusableDirective, selector: "[kendoTreeListFocusable],\n [kendoTreeListAddCommand],\n [kendoTreeListEditCommand],\n [kendoTreeListRemoveCommand],\n [kendoTreeListSaveCommand],\n [kendoTreeListCancelCommand]\n ", inputs: ["kendoTreeListFocusable", "enabled", "kendoTreeListAddCommand", "kendoTreeListEditCommand", "kendoTreeListRemoveCommand", "kendoTreeListSaveCommand", "kendoTreeListCancelCommand"] }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i8.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i6.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i8.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }], pipes: { "levelItems": i9.LevelItemsPipe, "valueOf": i10.FieldAccessorPipe } });
224
+ `, isInline: true, components: [{ type: i4.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: i5.NumericTextBoxComponent, selector: "kendo-numerictextbox", inputs: ["focusableId", "disabled", "readonly", "title", "autoCorrect", "format", "max", "min", "decimals", "placeholder", "step", "spinners", "rangeValidation", "tabindex", "tabIndex", "changeValueOnScroll", "selectOnFocus", "value", "maxlength", "size", "rounded", "fillMode"], outputs: ["valueChange", "focus", "blur"], exportAs: ["kendoNumericTextBox"] }, { type: i6.DatePickerComponent, selector: "kendo-datepicker", inputs: ["focusableId", "cellTemplate", "monthCellTemplate", "yearCellTemplate", "decadeCellTemplate", "centuryCellTemplate", "weekNumberTemplate", "headerTitleTemplate", "navigationItemTemplate", "activeView", "bottomView", "topView", "calendarType", "animateCalendarNavigation", "disabled", "readonly", "readOnlyInput", "popupSettings", "navigation", "min", "max", "incompleteDateValidation", "focusedDate", "value", "format", "twoDigitYearMax", "formatPlaceholder", "placeholder", "tabindex", "tabIndex", "disabledDates", "title", "subtitle", "rangeValidation", "disabledDatesValidation", "weekNumber", "size", "rounded", "fillMode", "adaptiveMode"], outputs: ["valueChange", "focus", "blur", "open", "close"], exportAs: ["kendo-datepicker"] }], directives: [{ type: i7.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i7.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i8.FocusableDirective, selector: "[kendoTreeListFocusable],\n [kendoTreeListAddCommand],\n [kendoTreeListEditCommand],\n [kendoTreeListRemoveCommand],\n [kendoTreeListSaveCommand],\n [kendoTreeListCancelCommand]\n ", inputs: ["kendoTreeListFocusable", "enabled", "kendoTreeListAddCommand", "kendoTreeListEditCommand", "kendoTreeListRemoveCommand", "kendoTreeListSaveCommand", "kendoTreeListCancelCommand"] }, { type: i9.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i9.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i9.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { type: i7.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i9.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }], pipes: { "levelItems": i10.LevelItemsPipe, "valueOf": i11.FieldAccessorPipe } });
188
225
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: CellComponent, decorators: [{
189
226
  type: Component,
190
227
  args: [{
@@ -197,8 +234,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
197
234
  <kendo-icon-wrapper
198
235
  aria-hidden="true"
199
236
  *ngIf="hasChildren && expandIcons && !loading"
200
- [name]="isExpanded ? 'caret-alt-down' : 'caret-alt-right'"
201
- [svgIcon]="isExpanded ? caretAltDownIcon : caretAltRightIcon"></kendo-icon-wrapper>
237
+ [name]="arrowIcon"
238
+ [svgIcon]="arrowSVGIcon"></kendo-icon-wrapper>
202
239
  <span class="k-icon k-i-loading" *ngIf="hasChildren && expandIcons && loading"></span>
203
240
  </ng-container>
204
241
  <ng-container *ngIf="column.templateRef"
@@ -215,9 +252,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
215
252
  <input
216
253
  type="checkbox"
217
254
  kendoTreeListFocusable
255
+ [attr.aria-label]="messageFor('selectRowCheckboxLabel')"
218
256
  class="k-checkbox k-checkbox-md k-rounded-md"
219
257
  [checked]="selected" />
220
258
  </ng-template>
259
+ <ng-container *ngIf="column.isRowReorderColumn && !isNew">
260
+ <kendo-icon-wrapper
261
+ name="reorder"
262
+ [svgIcon]="reorderIcon">
263
+ </kendo-icon-wrapper>
264
+ </ng-container>
221
265
  </ng-container>
222
266
  <ng-container *ngSwitchCase="true">
223
267
  <ng-container
@@ -260,7 +304,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
260
304
  </ng-container>
261
305
  `
262
306
  }]
263
- }], ctorParameters: function () { return [{ type: i1.EditService }, { type: i2.FocusGroup }]; }, propDecorators: { commandCellClass: [{
307
+ }], ctorParameters: function () { return [{ type: i1.EditService }, { type: i2.LocalizationService }, { type: i3.FocusGroup }]; }, propDecorators: { commandCellClass: [{
264
308
  type: HostBinding,
265
309
  args: ['class.k-command-cell']
266
310
  }], isCheckboxColumn: [{
@@ -269,6 +313,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
269
313
  }], textNoWrapClass: [{
270
314
  type: HostBinding,
271
315
  args: ['class.k-text-nowrap']
316
+ }], dragHandleCellClass: [{
317
+ type: HostBinding,
318
+ args: ['class.k-drag-cell']
319
+ }, {
320
+ type: HostBinding,
321
+ args: ['class.k-touch-action-none']
322
+ }], dragRowHandleLabel: [{
323
+ type: HostBinding,
324
+ args: ['attr.aria-label']
272
325
  }], column: [{
273
326
  type: Input
274
327
  }], columnIndex: [{
@@ -9,7 +9,7 @@ import * as i0 from "@angular/core";
9
9
  * Represents the Kendo UI TreeListSpacer component for Angular.
10
10
  * Used to give additional white space between the Pager inner elements,
11
11
  * and provides a way for customizing the spacer width.
12
- * It can also be used in any flex container within the TreeList.
12
+ * It can also be used in any flex container within the TreeList. [See example](slug:toolbartemplate_treelist#toc-define-spacing-between-the-toolbar-elements).
13
13
  */
14
14
  export class TreeListSpacerComponent {
15
15
  constructor() {
@@ -22,3 +22,7 @@ export const ICON_CLASS = 'k-icon k-svg-icon';
22
22
  * @hidden
23
23
  */
24
24
  export const IGNORE_CONTAINER_CLASSES = 'k-treelist-ignore-click';
25
+ /**
26
+ * @hidden
27
+ */
28
+ export const DRAG_HANDLE_CLASS = 'k-drag-cell';
@@ -277,6 +277,9 @@ export class HeaderComponent {
277
277
  get leafColumns() {
278
278
  return this._leafColumns;
279
279
  }
280
+ messageFor(token) {
281
+ return this.localization.get(token);
282
+ }
280
283
  attachTargets() {
281
284
  if (this.targetSubscription) {
282
285
  this.targetSubscription.unsubscribe();
@@ -467,6 +470,7 @@ HeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
467
470
  <input
468
471
  type="checkbox"
469
472
  class="k-checkbox k-checkbox-md k-rounded-md"
473
+ [attr.aria-label]="messageFor('selectAllRowsCheckboxLabel')"
470
474
  kendoTreeListFocusable
471
475
  (click)="selectAllClick($event)" />
472
476
  </ng-template>
@@ -540,7 +544,7 @@ HeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", versio
540
544
  [logicalSlaveCellsCount]="unlockedColumnsCount"
541
545
  >
542
546
  </tr>
543
- `, isInline: true, components: [{ type: i8.FilterMenuComponent, selector: "kendo-treelist-filter-menu", inputs: ["column", "filter"] }, { type: i9.ColumnMenuComponent, selector: "kendo-treelist-column-menu", inputs: ["standalone", "column", "settings", "sort", "filter", "sortable", "columnMenuTemplate"] }, { type: i10.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }, { type: i11.FilterRowComponent, selector: "[kendoTreeListFilterRow]", inputs: ["columns", "filter", "logicalRowIndex", "lockedColumnsCount"] }], directives: [{ type: i12.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i13.LogicalRowDirective, selector: "[kendoTreeListLogicalRow]", inputs: ["logicalRowIndex", "logicalSlaveRow", "logicalCellsCount", "logicalSlaveCellsCount", "dataRowIndex", "dataItem", "isNew"] }, { type: i12.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i14.LogicalCellDirective, selector: "[kendoTreeListLogicalCell]", inputs: ["logicalColIndex", "logicalRowIndex", "logicalSlaveCell", "column", "colIndex", "colSpan", "rowSpan", "dataRowIndex", "dataItem", "expandable"] }, { type: i15.DropTargetDirective, selector: "[kendoDropTarget]", inputs: ["context"], outputs: ["enter", "leave", "drop"] }, { type: i16.DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { type: i17.DraggableColumnDirective, selector: "[kendoDraggableColumn]", inputs: ["context", "enableDrag"], outputs: ["drag"] }, { type: i12.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i12.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i18.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { type: i19.FocusableDirective, selector: "[kendoTreeListFocusable],\n [kendoTreeListAddCommand],\n [kendoTreeListEditCommand],\n [kendoTreeListRemoveCommand],\n [kendoTreeListSaveCommand],\n [kendoTreeListCancelCommand]\n ", inputs: ["kendoTreeListFocusable", "enabled", "kendoTreeListAddCommand", "kendoTreeListEditCommand", "kendoTreeListRemoveCommand", "kendoTreeListSaveCommand", "kendoTreeListCancelCommand"] }, { type: i20.ColumnHandleDirective, selector: "[kendoTreeListColumnHandle]", inputs: ["columns", "column"] }] });
547
+ `, isInline: true, components: [{ type: i8.FilterMenuComponent, selector: "kendo-treelist-filter-menu", inputs: ["column", "filter"] }, { type: i9.ColumnMenuComponent, selector: "kendo-treelist-column-menu", inputs: ["standalone", "column", "settings", "sort", "filter", "sortable", "columnMenuTemplate"] }, { type: i10.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: i11.FilterRowComponent, selector: "[kendoTreeListFilterRow]", inputs: ["columns", "filter", "logicalRowIndex", "lockedColumnsCount"] }], directives: [{ type: i12.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i13.LogicalRowDirective, selector: "[kendoTreeListLogicalRow]", inputs: ["logicalRowIndex", "logicalSlaveRow", "logicalCellsCount", "logicalSlaveCellsCount", "dataRowIndex", "dataItem", "isNew"] }, { type: i12.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i14.LogicalCellDirective, selector: "[kendoTreeListLogicalCell]", inputs: ["logicalColIndex", "logicalRowIndex", "logicalSlaveCell", "column", "colIndex", "colSpan", "rowSpan", "dataRowIndex", "dataItem", "expandable"] }, { type: i15.DropTargetDirective, selector: "[kendoDropTarget]", inputs: ["context"], outputs: ["enter", "leave", "drop"] }, { type: i16.DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { type: i17.DraggableColumnDirective, selector: "[kendoDraggableColumn]", inputs: ["context", "enableDrag"], outputs: ["drag"] }, { type: i12.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i12.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i18.TemplateContextDirective, selector: "[templateContext]", inputs: ["templateContext"] }, { type: i19.FocusableDirective, selector: "[kendoTreeListFocusable],\n [kendoTreeListAddCommand],\n [kendoTreeListEditCommand],\n [kendoTreeListRemoveCommand],\n [kendoTreeListSaveCommand],\n [kendoTreeListCancelCommand]\n ", inputs: ["kendoTreeListFocusable", "enabled", "kendoTreeListAddCommand", "kendoTreeListEditCommand", "kendoTreeListRemoveCommand", "kendoTreeListSaveCommand", "kendoTreeListCancelCommand"] }, { type: i20.ColumnHandleDirective, selector: "[kendoTreeListColumnHandle]", inputs: ["columns", "column"] }] });
544
548
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: HeaderComponent, decorators: [{
545
549
  type: Component,
546
550
  args: [{
@@ -656,6 +660,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
656
660
  <input
657
661
  type="checkbox"
658
662
  class="k-checkbox k-checkbox-md k-rounded-md"
663
+ [attr.aria-label]="messageFor('selectAllRowsCheckboxLabel')"
659
664
  kendoTreeListFocusable
660
665
  (click)="selectAllClick($event)" />
661
666
  </ng-template>
@@ -524,8 +524,8 @@ ListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
524
524
  class="k-table k-grid-table k-table-md"
525
525
  role="presentation"
526
526
  [style.width.px]="lockedWidth">
527
- <colgroup kendoTreeListColGroup
528
- role="presentation"
527
+ <colgroup
528
+ kendoTreeListColGroup
529
529
  [columns]="$any(lockedLeafColumns)">
530
530
  </colgroup>
531
531
  <tbody kendoTreeListTableBody
@@ -548,16 +548,17 @@ ListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version:
548
548
  <div [style.height.px]="totalHeight"></div>
549
549
  </div>
550
550
  </div>
551
- <div #container
552
- class="k-grid-content k-virtual-content"
553
- role="presentation" tabindex="-1"
554
- [kendoTreeListResizableContainer]="lockedLeafColumns.length > 0"
555
- [lockedWidth]="lockedWidth + 1">
551
+ <div
552
+ #container
553
+ class="k-grid-content k-virtual-content"
554
+ [kendoTreeListResizableContainer]="lockedLeafColumns.length > 0"
555
+ [lockedWidth]="lockedWidth + 1"
556
+ >
556
557
  <div role="presentation" class="k-grid-table-wrap">
557
558
  <table [style.width.px]="nonLockedWidth" #table [virtualColumns]="virtualColumns"
558
559
  class="k-table k-grid-table k-table-md" role="presentation">
559
- <colgroup kendoTreeListColGroup
560
- role="presentation"
560
+ <colgroup
561
+ kendoTreeListColGroup
561
562
  [columns]="$any(nonLockedColumnsToRender)">
562
563
  </colgroup>
563
564
  <tbody kendoTreeListTableBody
@@ -609,8 +610,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
609
610
  class="k-table k-grid-table k-table-md"
610
611
  role="presentation"
611
612
  [style.width.px]="lockedWidth">
612
- <colgroup kendoTreeListColGroup
613
- role="presentation"
613
+ <colgroup
614
+ kendoTreeListColGroup
614
615
  [columns]="$any(lockedLeafColumns)">
615
616
  </colgroup>
616
617
  <tbody kendoTreeListTableBody
@@ -633,16 +634,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
633
634
  <div [style.height.px]="totalHeight"></div>
634
635
  </div>
635
636
  </div>
636
- <div #container
637
- class="k-grid-content k-virtual-content"
638
- role="presentation" tabindex="-1"
639
- [kendoTreeListResizableContainer]="lockedLeafColumns.length > 0"
640
- [lockedWidth]="lockedWidth + 1">
637
+ <div
638
+ #container
639
+ class="k-grid-content k-virtual-content"
640
+ [kendoTreeListResizableContainer]="lockedLeafColumns.length > 0"
641
+ [lockedWidth]="lockedWidth + 1"
642
+ >
641
643
  <div role="presentation" class="k-grid-table-wrap">
642
644
  <table [style.width.px]="nonLockedWidth" #table [virtualColumns]="virtualColumns"
643
645
  class="k-table k-grid-table k-table-md" role="presentation">
644
- <colgroup kendoTreeListColGroup
645
- role="presentation"
646
+ <colgroup
647
+ kendoTreeListColGroup
646
648
  [columns]="$any(nonLockedColumnsToRender)">
647
649
  </colgroup>
648
650
  <tbody kendoTreeListTableBody
@@ -18,7 +18,7 @@ import { Keys } from '@progress/kendo-angular-common';
18
18
  import { defaultTrackBy } from '../common/default-track-by';
19
19
  import { ExpandStateService } from '../expand-state/expand-state.service';
20
20
  import { SelectionService } from '../selection/selection.service';
21
- import { NON_DATA_CELL_CLASSES, NON_DATA_ROW_CLASSES, IGNORE_CONTAINER_CLASSES, ICON_CLASS, EMPTY_ICON_CLASS } from './constants';
21
+ import { NON_DATA_CELL_CLASSES, NON_DATA_ROW_CLASSES, IGNORE_CONTAINER_CLASSES, ICON_CLASS, EMPTY_ICON_CLASS, DRAG_HANDLE_CLASS } from './constants';
22
22
  import * as i0 from "@angular/core";
23
23
  import * as i1 from "../data/change-notification.service";
24
24
  import * as i2 from "../editing/edit.service";
@@ -213,8 +213,10 @@ export class TableBodyComponent {
213
213
  clickHandler(eventArg) {
214
214
  const target = eventArg.target;
215
215
  const { cell, row } = this.targetElements(target);
216
- if (cell && !hasClasses(cell, NON_DATA_CELL_CLASSES) &&
217
- !hasClasses(row, NON_DATA_ROW_CLASSES)) {
216
+ const forbiddenCellClasses = NON_DATA_CELL_CLASSES.concat(` ${DRAG_HANDLE_CLASS}`);
217
+ const isValidCell = cell ? !hasClasses(cell, forbiddenCellClasses) : false;
218
+ const isValidRow = row ? !hasClasses(row, NON_DATA_ROW_CLASSES) : false;
219
+ if (isValidRow && isValidCell) {
218
220
  if (this.expandClick(eventArg, row) || this.checkboxClick(cell, row, eventArg)) {
219
221
  return;
220
222
  }
@@ -0,0 +1,48 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Injectable } from "@angular/core";
6
+ import { RowReorderService } from './row-reorder.service';
7
+ import { isPresent } from "../utils";
8
+ import * as i0 from "@angular/core";
9
+ /**
10
+ * @hidden
11
+ */
12
+ export class FlatRowReorderService extends RowReorderService {
13
+ isOverChild(targetItem) {
14
+ const { draggedRows } = this.rowReorderArgs(this.dragTarget, this.dropTarget, this.view);
15
+ const draggedItem = draggedRows[0].dataItem;
16
+ const hasParent = isPresent(targetItem[this.parentIdField]);
17
+ const sameParents = draggedItem[this.parentIdField] === targetItem[this.parentIdField];
18
+ if (!hasParent || sameParents) {
19
+ return false;
20
+ }
21
+ if (targetItem && targetItem.hasOwnProperty(this.parentIdField)) {
22
+ if (draggedItem[this.idField] === targetItem[this.parentIdField]) {
23
+ return true;
24
+ }
25
+ const parent = this.data.find(i => i[this.idField] === targetItem[this.parentIdField]);
26
+ if (parent) {
27
+ return this.isOverChild(parent);
28
+ }
29
+ }
30
+ }
31
+ reorderRows(ev, collection) {
32
+ const { draggedRows, dropTargetRow } = ev;
33
+ const draggedDataItem = draggedRows[0].dataItem;
34
+ const dropTargetDataItem = dropTargetRow.dataItem;
35
+ let dropTargetIdx = collection.indexOf(dropTargetDataItem);
36
+ const draggedItemIdx = collection.indexOf(draggedDataItem);
37
+ collection.splice(draggedItemIdx, 1);
38
+ if (ev.dropPosition === 'after' && dropTargetIdx < draggedItemIdx) {
39
+ dropTargetIdx++;
40
+ }
41
+ collection.splice(dropTargetIdx, 0, draggedDataItem);
42
+ }
43
+ }
44
+ FlatRowReorderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FlatRowReorderService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
45
+ FlatRowReorderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FlatRowReorderService });
46
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: FlatRowReorderService, decorators: [{
47
+ type: Injectable
48
+ }] });
@@ -0,0 +1,55 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { Injectable } from "@angular/core";
6
+ import { RowReorderService } from './row-reorder.service';
7
+ import { isPresent } from "../utils";
8
+ import { dropPosition, findParent } from "./utils";
9
+ import * as i0 from "@angular/core";
10
+ /**
11
+ * @hidden
12
+ */
13
+ export class HierarchicalRowReorderService extends RowReorderService {
14
+ isOverChild(targetItem) {
15
+ const { draggedRows } = this.rowReorderArgs(this.dragTarget, this.dropTarget, this.view);
16
+ const draggedItem = draggedRows[0].dataItem;
17
+ const hasChildren = isPresent(draggedItem[this.childrenField]) && draggedItem[this.childrenField].length > 0;
18
+ if (!hasChildren) {
19
+ return false;
20
+ }
21
+ if (targetItem && draggedItem.hasOwnProperty(this.childrenField)) {
22
+ if (draggedItem[this.childrenField].includes(targetItem)) {
23
+ return true;
24
+ }
25
+ const parent = findParent(this.data, targetItem, this.childrenField);
26
+ if (parent) {
27
+ return this.isOverChild(parent);
28
+ }
29
+ }
30
+ return false;
31
+ }
32
+ reorderRows(ev, collection, field) {
33
+ const draggedItem = ev.draggedRows[0].dataItem;
34
+ const dropTargetItem = ev.dropTargetRow.dataItem;
35
+ const draggedItemParent = findParent(collection, draggedItem, field);
36
+ const dropTargetParent = findParent(collection, dropTargetItem, field);
37
+ const draggedItemIdx = draggedItemParent ? draggedItemParent[field].indexOf(draggedItem) : collection.indexOf(draggedItem);
38
+ let dropTargetItemIdx = dropTargetParent ? dropTargetParent[field].indexOf(dropTargetItem) : collection.indexOf(dropTargetItem);
39
+ if (ev.dropPosition === dropPosition.after && dropTargetItemIdx < draggedItemIdx) {
40
+ dropTargetItemIdx++;
41
+ }
42
+ draggedItemParent ? draggedItemParent[field].splice(draggedItemIdx, 1) : collection.splice(draggedItemIdx, 1);
43
+ if (ev.dropPosition !== dropPosition.over) {
44
+ dropTargetParent ? dropTargetParent[field].splice(dropTargetItemIdx, 0, draggedItem) : collection.splice(dropTargetItemIdx, 0, draggedItem);
45
+ }
46
+ else {
47
+ dropTargetItem[field].unshift(draggedItem);
48
+ }
49
+ }
50
+ }
51
+ HierarchicalRowReorderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: HierarchicalRowReorderService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
52
+ HierarchicalRowReorderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: HierarchicalRowReorderService });
53
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: HierarchicalRowReorderService, decorators: [{
54
+ type: Injectable
55
+ }] });