@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
@@ -12,12 +12,14 @@ import * as i2 from "@angular/common";
12
12
  * Represents an item that can be placed inside a
13
13
  * [`ColumnMenuTemplate`]({% slug api_treelist_columnmenutemplatedirective %}) directive.
14
14
  *
15
- * {% meta height:500 %}
16
- * {% embed_file column-menu/template-item/app.component.ts preview %}
17
- * {% embed_file column-menu/template-item/app.module.ts %}
18
- * {% embed_file shared/main.ts %}
19
- * {% embed_file shared/employees.ts %}
20
- * {% endmeta %}
15
+ * * @example
16
+ * ```html
17
+ * <kendo-treelist ...>
18
+ * <ng-template kendoTreeListColumnMenuTemplate let-service="service" let-column="column">
19
+ * <kendo-treelist-columnmenu-item text="Fit column"></kendo-treelist-columnmenu-item>
20
+ * </ng-template>
21
+ * </kendo-treelist>
22
+ * ```
21
23
  */
22
24
  export class ColumnMenuItemComponent {
23
25
  constructor() {
@@ -72,7 +74,7 @@ ColumnMenuItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0"
72
74
  <ng-container [ngTemplateOutlet]="contentTemplate.templateRef">
73
75
  </ng-container>
74
76
  <div>
75
- `, isInline: true, components: [{ type: i1.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], animations: [
77
+ `, isInline: true, components: [{ type: i1.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], animations: [
76
78
  trigger('state', [
77
79
  state('collapsed', style({ display: 'none' })),
78
80
  state('expanded', style({ display: 'block' })),
@@ -12,19 +12,13 @@ import * as i1 from "@progress/kendo-angular-l10n";
12
12
  import * as i2 from "../common/column-info.service";
13
13
  import * as i3 from "./column-menu-item.component";
14
14
  /**
15
- * Represents a column-menu item that can be placed inside a
16
- * [`ColumnMenuTemplate`]({% slug api_treelist_columnmenutemplatedirective %}) directive.
17
- * Allows the user to lock or unlock the columns.
15
+ * Represents the column-menu item that allows the user to lock or unlock columns.
18
16
  *
19
- * > You have to set the [ColumnMenuService]({% slug api_treelist_columnmenuservice %}) that is passed by
20
- * > the template to the service input of the `kendo-treelist-columnmenu-lock` component.
17
+ * The componnt can be placed inside a [`ColumnMenuTemplate`]({% slug api_treelist_columnmenutemplatedirective %}) directive.
18
+ *
19
+ * To register the component as a known column menu item, set the [`ColumnMenuService`]({% slug api_treelist_columnmenuservice %})
20
+ * that is passed by the template to the service input of the `kendo-treelist-columnmenu-lock` component.
21
21
  *
22
- * {% meta height:500 %}
23
- * {% embed_file column-menu/template-lock/app.component.ts preview %}
24
- * {% embed_file column-menu/template-lock/app.module.ts %}
25
- * {% embed_file shared/main.ts %}
26
- * {% embed_file shared/employees.ts %}
27
- * {% endmeta %}
28
22
  */
29
23
  export class ColumnMenuLockComponent extends ColumnMenuItemBase {
30
24
  constructor(localization, columnInfoService, changeDetector) {
@@ -13,19 +13,13 @@ import * as i1 from "@progress/kendo-angular-l10n";
13
13
  import * as i2 from "../common/sort.service";
14
14
  import * as i3 from "./column-menu-item.component";
15
15
  /**
16
- * Represents a column-menu item for sorting TreeList columns that can be placed inside a
17
- * [`ColumnMenuTemplate`]({% slug api_treelist_columnmenutemplatedirective %}) directive.
18
- * Allows the user to sort the column.
16
+ * Represents the column-menu item for sorting TreeList columns.
19
17
  *
20
- * > You have to set the [ColumnMenuService]({% slug api_treelist_columnmenuservice %}) that is passed by
21
- * > the template to the service input of the `kendo-treelist-columnmenu-sort` component.
18
+ * The component can be placed inside a [`ColumnMenuTemplate`]({% slug api_treelist_columnmenutemplatedirective %}) directive.
19
+ *
20
+ * To register the component as a known column menu item, set the [`ColumnMenuService`]({% slug api_treelist_columnmenuservice %})
21
+ * that is passed by the template to the service input of the `kendo-treelist-columnmenu-sort` component.
22
22
  *
23
- * {% meta height:500 %}
24
- * {% embed_file column-menu/template-sort/app.component.ts preview %}
25
- * {% embed_file column-menu/template-sort/app.module.ts %}
26
- * {% embed_file shared/main.ts %}
27
- * {% embed_file shared/employees.ts %}
28
- * {% endmeta %}
29
23
  */
30
24
  export class ColumnMenuSortComponent extends ColumnMenuItemBase {
31
25
  constructor(localization, sortService) {
@@ -21,7 +21,7 @@ import * as i8 from "./column-menu-filter.component";
21
21
  import * as i9 from "@angular/common";
22
22
  const POPUP_CLASS = 'k-grid-columnmenu-popup';
23
23
  /**
24
- * Represents the [column menu]({% slug columnmenu_treelist %}) component.
24
+ * Represents the [column menu]({% slug columnmenu_treelist %}) component of the TreeList.
25
25
  */
26
26
  export class ColumnMenuComponent {
27
27
  constructor(popupService, localization, service) {
@@ -153,7 +153,7 @@ ColumnMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ve
153
153
  [expanded]="expandedFilter" (expand)="onFilterExpand()">
154
154
  </kendo-treelist-columnmenu-filter>
155
155
  </ng-template>
156
- `, isInline: true, components: [{ type: i4.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass"], exportAs: ["kendoIconWrapper"] }, { type: i5.ColumnMenuSortComponent, selector: "kendo-treelist-columnmenu-sort" }, { type: i6.ColumnMenuLockComponent, selector: "kendo-treelist-columnmenu-lock" }, { type: i7.ColumnMenuChooserComponent, selector: "kendo-treelist-columnmenu-chooser", inputs: ["expanded"], outputs: ["expand", "collapse"] }, { type: i8.ColumnMenuFilterComponent, selector: "kendo-treelist-columnmenu-filter", inputs: ["expanded"], outputs: ["expand", "collapse"] }], directives: [{ type: i9.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i9.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
156
+ `, isInline: true, components: [{ type: i4.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { type: i5.ColumnMenuSortComponent, selector: "kendo-treelist-columnmenu-sort" }, { type: i6.ColumnMenuLockComponent, selector: "kendo-treelist-columnmenu-lock" }, { type: i7.ColumnMenuChooserComponent, selector: "kendo-treelist-columnmenu-chooser", inputs: ["expanded"], outputs: ["expand", "collapse"] }, { type: i8.ColumnMenuFilterComponent, selector: "kendo-treelist-columnmenu-filter", inputs: ["expanded"], outputs: ["expand", "collapse"] }], directives: [{ type: i9.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i9.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i9.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
157
157
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ColumnMenuComponent, decorators: [{
158
158
  type: Component,
159
159
  args: [{
@@ -10,7 +10,7 @@ import * as i0 from "@angular/core";
10
10
  *
11
11
  * @example
12
12
  * ```html
13
- * <kendo-treelist>
13
+ * <kendo-treelist ...>
14
14
  * <ng-template
15
15
  * kendoTreeListColumnMenuTemplate
16
16
  * let-service="service"
@@ -8,7 +8,7 @@ import { CellTemplateDirective } from '../rendering/cell-template.directive';
8
8
  import * as i0 from "@angular/core";
9
9
  import * as i1 from "./column-base";
10
10
  /**
11
- * Represents the checkbox for selecting rows in the TreeList.
11
+ * Represents the checkbox for selecting rows in the TreeList. [See example](slug:selection_treelist#toc-select-all-checkbox).
12
12
  */
13
13
  export class CheckboxColumnComponent extends ColumnBase {
14
14
  constructor(parent) {
@@ -17,6 +17,10 @@ export const isSpanColumn = column => column.isSpanColumn;
17
17
  * @hidden
18
18
  */
19
19
  export const isCheckboxColumn = column => column.isCheckboxColumn;
20
+ /**
21
+ * @hidden
22
+ */
23
+ export const isRowReorderColumn = column => column.isRowReorderColumn;
20
24
  const isColumnContainer = column => column.isColumnGroup || isSpanColumn(column);
21
25
  /**
22
26
  * The base class for the column components of the TreeList.
@@ -19,12 +19,15 @@ export function isColumnGroupComponent(column) {
19
19
  * Represents the column group header of the TreeList
20
20
  * ([more information and examples]({% slug multicolumnheaders_columns_treelist %})).
21
21
  *
22
- * {% meta height:533 %}
23
- * {% embed_file configuration/multi-column-headers/app.component.ts preview %}
24
- * {% embed_file configuration/multi-column-headers/app.module.ts %}
25
- * {% embed_file shared/main.ts %}
26
- * {% embed_file shared/filesystem.ts %}
27
- * {% endmeta %}
22
+ * @example
23
+ * ```html
24
+ * <kendo-treelist ...>
25
+ * <kendo-treelist-column-group title="File Info">
26
+ * <kendo-treelist-column field="type" title="Type"> </kendo-treelist-column>
27
+ * <kendo-treelist-column field="size" title="Size"> </kendo-treelist-column>
28
+ * </kendo-treelist-column-group>
29
+ * </kendo-treelist>
30
+ * ```
28
31
  */
29
32
  export class ColumnGroupComponent extends ColumnBase {
30
33
  constructor(parent, optionChanges) {
@@ -20,14 +20,15 @@ export function isColumnComponent(column) {
20
20
  return isPresent(column.field);
21
21
  }
22
22
  /**
23
- * Represents the columns of the [Angular TreeList]({% slug getstarted_treelist %}).
23
+ * Represents the columns of the TreeList.
24
24
  *
25
- * {% meta height:470 %}
26
- * {% embed_file basic-usage/app.component.ts preview %}
27
- * {% embed_file basic-usage/app.module.ts %}
28
- * {% embed_file shared/main.ts %}
29
- * {% embed_file shared/employees.ts %}
30
- * {% endmeta %}
25
+ * @example
26
+ * ```html
27
+ * <kendo-treelist [kendoTreeListFlatBinding]="data" ...>
28
+ * <kendo-treelist-column field="name" title="Name"></kendo-treelist-column>
29
+ * <kendo-treelist-column field="title"title="Title"></kendo-treelist-column>
30
+ * </kendo-treelist>
31
+ * ```
31
32
  */
32
33
  export class ColumnComponent extends ColumnBase {
33
34
  constructor(parent, optionChanges) {
@@ -39,51 +40,27 @@ export class ColumnComponent extends ColumnBase {
39
40
  this.sortable = true;
40
41
  /**
41
42
  * Defines the editor type ([see example]({% slug editing_reactive_forms_treelist %}#toc-setup)).
42
- * Used when the column enters the edit mode. The default value is `text`.
43
+ * Used when the column enters the edit mode. [See example](slug:editing_reactive_forms_treelist).
43
44
  *
44
- * @example
45
- * ```html-no-run
46
- * <kendo-treelist>
47
- * <kendo-treelist-column field="UnitPrice" editor="numeric">
48
- * </kendo-treelist-column>
49
- * </kendo-treelist>
50
- * ```
45
+ * @default 'text'
51
46
  */
52
47
  this.editor = 'text';
53
48
  /**
54
- * Defines the filter type that is displayed inside the filter row. The default value is `text`.
49
+ * Defines the filter type that is displayed inside the filter row.
55
50
  *
56
- * @example
57
- * ```html-no-run
58
- * <kendo-treelist>
59
- * <kendo-treelist-column field="UnitPrice" filter="numeric">
60
- * </kendo-treelist-column>
61
- * </kendo-treelist>
62
- * ```
51
+ * @default 'text'
63
52
  */
64
53
  this.filter = 'text';
65
54
  /**
66
- * Defines if a filter UI will be displayed for this column. The default value is `true`.
55
+ * Defines if a filter UI will be displayed for this column.
67
56
  *
68
- * @example
69
- * ```html-no-run
70
- * <kendo-treelist>
71
- * <kendo-treelist-column field="UnitPrice" [filterable]="false">
72
- * </kendo-treelist-column>
73
- * </kendo-treelist>
74
- * ```
57
+ * @default true
75
58
  */
76
59
  this.filterable = true;
77
60
  /**
78
- * Defines whether the column is editable. The default value is `true`.
61
+ * Defines whether the column is editable.
79
62
  *
80
- * @example
81
- * ```html-no-run
82
- * <kendo-treelist>
83
- * <kendo-treelist-column field="UnitPrice" [editable]="false">
84
- * </kendo-treelist-column>
85
- * </kendo-treelist>
86
- * ```
63
+ * @default true
87
64
  */
88
65
  this.editable = true;
89
66
  }
@@ -11,30 +11,28 @@ import * as i1 from "./column-base";
11
11
  import * as i2 from "../common/option-changes.service";
12
12
  /**
13
13
  * Represents the command columns of the TreeList. You have to define the content of the
14
- * column inside an `<ng-template>` tag. The template context is set to the current
15
- * data item. For more information and examples on using the passed fields
14
+ * column inside an `<ng-template>` tag. For more information and examples on using the passed fields
16
15
  * and the command directives, refer to the article on
17
16
  * [editing the TreeList in Angular Reactive Forms]({% slug editing_reactive_forms_treelist %}).
18
17
  *
19
- * The following additional fields are passed:
20
- * - `columnIndex`&mdash;The current column index.
21
- * - `rowIndex`&mdash;The current data row index. If inside a new item row, `rowIndex`is `-1`.
22
- * - `dataItem`&mdash;The current data item.
23
- * - `column`&mdash;The current column instance.
24
- * - `isNew`&mdash;The state of the current item.
25
- *
26
18
  * Usually, the template contains CRUD command directives such as:
27
19
  * - [`EditCommandDirective`]({% slug api_treelist_editcommanddirective %})
28
20
  * - [`RemoveCommandDirective`]({% slug api_treelist_removecommanddirective %})
29
21
  * - [`CancelCommandDirective`]({% slug api_treelist_cancelcommanddirective %})
30
22
  * - [`SaveCommandDirective`]({% slug api_treelist_savecommanddirective %})
31
23
  *
32
- * {% meta height:590 %}
33
- * {% embed_file editing/editing-directives/reactive-editing/app.component.ts preview %}
34
- * {% embed_file shared/employees.ts %}
35
- * {% embed_file editing/editing-directives/reactive-editing/app.module.ts %}
36
- * {% embed_file shared/main.ts %}
37
- * {% endmeta %}
24
+ * @example
25
+ * ```html
26
+ * <kendo-treelist ...>
27
+ * <kendo-treelist-column field="ProductID"></kendo-treelist-column>
28
+ * <kendo-treelist-command-column title="command" >
29
+ * <ng-template kendoTreeListCellTemplate>
30
+ * <button kendoTreeListEditCommand class="k-primary">Edit</button>
31
+ * <button kendoTreeListRemoveCommand>Remove</button>
32
+ * </ng-template>
33
+ * </kendo-treelist-command-column>
34
+ * </kendo-treelist>
35
+ * ```
38
36
  */
39
37
  export class CommandColumnComponent extends ColumnBase {
40
38
  constructor(parent, optionChanges) {
@@ -0,0 +1,47 @@
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 { Component, forwardRef, SkipSelf, Host, Optional } from '@angular/core';
6
+ import { ColumnBase } from './column-base';
7
+ import * as i0 from "@angular/core";
8
+ import * as i1 from "./column-base";
9
+ /**
10
+ * Represents the drag handle for reordering rows in the TreeList.
11
+ */
12
+ export class RowReorderColumnComponent extends ColumnBase {
13
+ constructor(parent) {
14
+ super(parent);
15
+ this.parent = parent;
16
+ /**
17
+ * @hidden
18
+ */
19
+ this.isRowReorderColumn = true;
20
+ }
21
+ }
22
+ RowReorderColumnComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: RowReorderColumnComponent, deps: [{ token: i1.ColumnBase, host: true, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Component });
23
+ RowReorderColumnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: RowReorderColumnComponent, selector: "kendo-treelist-rowreorder-column", providers: [
24
+ {
25
+ provide: ColumnBase,
26
+ useExisting: forwardRef(() => RowReorderColumnComponent)
27
+ }
28
+ ], usesInheritance: true, ngImport: i0, template: ``, isInline: true });
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: RowReorderColumnComponent, decorators: [{
30
+ type: Component,
31
+ args: [{
32
+ providers: [
33
+ {
34
+ provide: ColumnBase,
35
+ useExisting: forwardRef(() => RowReorderColumnComponent)
36
+ }
37
+ ],
38
+ selector: 'kendo-treelist-rowreorder-column',
39
+ template: ``
40
+ }]
41
+ }], ctorParameters: function () { return [{ type: i1.ColumnBase, decorators: [{
42
+ type: SkipSelf
43
+ }, {
44
+ type: Host
45
+ }, {
46
+ type: Optional
47
+ }] }]; } });
@@ -25,25 +25,15 @@ export function isSpanColumnComponent(column) {
25
25
  * [sorting]({% slug sorting_treelist %}) and [filtering]({% slug filtering_treelist %}). Wrap the columns that will be
26
26
  * merged inside the `<kendo-treelist-span-column>` tag.
27
27
  *
28
- * {% meta height:570 %}
29
- * {% embed_file configuration/span-column/app.component.ts preview %}
30
- * {% embed_file configuration/span-column/app.module.ts %}
31
- * {% embed_file shared/main.ts %}
32
- * {% embed_file shared/employees.ts %}
33
- * {% endmeta %}
34
- *
35
- * By default, the data cell displays the data for the specified fields. To further customize
36
- * the span-column functionality, use a [cell template]({% slug api_treelist_celltemplatedirective %}).
37
- *
38
- * ```html-no-run
28
+ * ```html
39
29
  * <kendo-treelist-span-column>
40
- * <kendo-treelist-column field="field1" title="Field 1"></kendo-treelist-column>
41
- * <kendo-treelist-column field="field2" title="Field 2"></kendo-treelist-column>
42
- * <ng-template kendoTreeListCellTemplate let-dataItem>
43
- * <h5>{{ dataItem.field1 }}</h5>
44
- * <p>{{ dataItem.field2 }}</p>
45
- * </ng-template>
46
- * </kendo-treelist-span-column>
30
+ * <kendo-treelist-column field="field1" ></kendo-treelist-column>
31
+ * <kendo-treelist-column field="field2" ></kendo-treelist-column>
32
+ * <ng-template kendoTreeListCellTemplate let-dataItem>
33
+ * <h5>{{ dataItem.field1 }}</h5>
34
+ * <p>{{ dataItem.field2 }}</p>
35
+ * </ng-template>
36
+ * </kendo-treelist-span-column>
47
37
  * ```
48
38
  */
49
39
  export class SpanColumnComponent extends ColumnBase {
@@ -71,22 +61,8 @@ export class SpanColumnComponent extends ColumnBase {
71
61
  /**
72
62
  * Defines whether the edit template of the column will be rendered. The default value is `false`.
73
63
  *
74
- * > To enable the editing functionality for a spanned column, set an edit template for it.
64
+ * To enable the editing functionality for a spanned column, set an edit template for it.
75
65
  *
76
- * @example
77
- * ```html-no-run
78
- * <kendo-treelist>
79
- * <kendo-treelist-span-column [editable]="false">
80
- * <kendo-treelist-column field="UnitPrice">
81
- * </kendo-treelist-column>
82
- * <kendo-treelist-column field="ProductName">
83
- * </kendo-treelist-column>
84
- * <ng-template kendoTreeListEditTemplate>
85
- * .....
86
- * </ng-template>
87
- * </kendo-treelist-span-column>
88
- * </kendo-treelist>
89
- * ```
90
66
  */
91
67
  set editable(value) {
92
68
  this._editable = value;
@@ -131,56 +107,9 @@ export class SpanColumnComponent extends ColumnBase {
131
107
  }
132
108
  /**
133
109
  * Toggles the locked (frozen) state of the columns. Locked columns are visible
134
- * at all times during the horizontal scrolling of the TreeList.
135
- *
136
- * For the option to work properly, make sure that:
137
- * - Scrolling is enabled.
138
- * - The `height` option of the TreeList is set.
139
- * - The widths of all TreeList columns are explicitly set in pixels. In this way,
140
- * the TreeList adjusts the layout of the locked and unlocked columns.
110
+ * at all times during the horizontal scrolling of the TreeList. [See example](slug:locked_columns_treelist).
141
111
  *
142
112
  * @default false
143
- *
144
- * @example
145
- * ```ts
146
- * _@Component({
147
- * selector: 'my-app',
148
- * template: `
149
- * <kendo-treelist [data]="treelistData" [scrollable]="scrollable" style="height: 200px">
150
- * <kendo-treelist-span-column [locked]="true">
151
- * <kendo-treelist-column field="ProductID" title="Product ID" [width]="120">
152
- * </kendo-treelist-column>
153
- * <kendo-treelist-column field="ProductName" title="Product Name" [width]="200">
154
- * </kendo-treelist-column>
155
- * </kendo-treelist-span-column>
156
- * <kendo-treelist-column field="UnitPrice" title="Unit Price" [width]="230">
157
- * </kendo-treelist-column>
158
- * </kendo-treelist>
159
- * `
160
- * })
161
- *
162
- * class AppComponent {
163
- * public treelistData: any[];
164
- *
165
- * constructor() {
166
- * this.treelistData = products;
167
- * }
168
- * }
169
- *
170
- * const products = [{
171
- * "ProductID": 1,
172
- * "ProductName": "Chai",
173
- * "UnitPrice": 18.0000,
174
- * "Discontinued": true
175
- * }, {
176
- * "ProductID": 2,
177
- * "ProductName": "Chang",
178
- * "UnitPrice": 19.0000,
179
- * "Discontinued": false
180
- * }
181
- * ];
182
- *
183
- * ```
184
113
  */
185
114
  set locked(value) {
186
115
  this._locked = value;
@@ -9,22 +9,22 @@ import { EventEmitter } from '@angular/core';
9
9
  * @hidden
10
10
  */
11
11
  export const EXPANDED_STATE = {
12
- isExpanded: () => true
12
+ isExpanded: () => true,
13
13
  };
14
14
  /**
15
15
  * @hidden
16
16
  */
17
17
  export const UNSELECTED_STATE = {
18
- isRowSelected: () => false
18
+ isRowSelected: () => false,
19
19
  };
20
20
  /**
21
21
  * @hidden
22
22
  */
23
23
  export const NOT_EDITED_STATE = {
24
24
  hasNew: () => false,
25
- context: () => null
25
+ context: () => null,
26
26
  };
27
- const identity = item => item;
27
+ const identity = (item) => item;
28
28
  function loadView(view, subject) {
29
29
  view.loadData();
30
30
  if (view.loading) {
@@ -69,10 +69,11 @@ class ViewRange {
69
69
  return true;
70
70
  }
71
71
  includeParents(_children) {
72
+ // eslint-disable-next-line no-empty
72
73
  }
73
74
  }
74
75
  function isPagerSettings(pageable) {
75
- return typeof pageable === "object";
76
+ return typeof pageable === 'object';
76
77
  }
77
78
  class PagerRange extends ViewRange {
78
79
  constructor(skip, pageSize, pageable) {
@@ -86,8 +87,8 @@ class PagerRange extends ViewRange {
86
87
  return this.skip <= index && index < this.skip + this.pageSize;
87
88
  }
88
89
  levelInRange(parent, items, _rowIndex) {
89
- return parent.level === -1 ||
90
- (this.skip <= parent.index + items.length && parent.index + 1 < this.skip + this.pageSize);
90
+ return (parent.level === -1 ||
91
+ (this.skip <= parent.index + items.length && parent.index + 1 < this.skip + this.pageSize));
91
92
  }
92
93
  includeParents(children) {
93
94
  let parentLevel = children.parentLevel;
@@ -130,7 +131,7 @@ export class ViewItemFactory {
130
131
  this.rootLevel = this.dataLevel({
131
132
  level: -1,
132
133
  id: null,
133
- expanded: true
134
+ expanded: true,
134
135
  }, options.data);
135
136
  }
136
137
  }
@@ -145,7 +146,8 @@ export class ViewItemFactory {
145
146
  while (dataLevels[0] && dataLevels[0].idx >= dataLevels[0].items.length) {
146
147
  const dataLevel = dataLevels.shift();
147
148
  if (this.hasFooter && dataLevel.expanded && dataLevel.items.length) {
148
- if (dataLevel.inRange || this.viewRange.levelInRange(dataLevel.parent, dataLevel.items, this.rowIndex)) {
149
+ if (dataLevel.inRange ||
150
+ this.viewRange.levelInRange(dataLevel.parent, dataLevel.items, this.rowIndex)) {
149
151
  result.push({
150
152
  type: 'footer',
151
153
  items: dataLevel.items,
@@ -153,7 +155,7 @@ export class ViewItemFactory {
153
155
  level: dataLevel.level,
154
156
  parentItem: dataLevel.parent.data,
155
157
  parentIndex: dataLevel.parentIndex,
156
- rowIndex: this.rowIndex
158
+ rowIndex: this.rowIndex,
157
159
  });
158
160
  this.viewRange.includeParents(dataLevel);
159
161
  }
@@ -173,7 +175,7 @@ export class ViewItemFactory {
173
175
  index: itemIndex,
174
176
  level: currentLevel.level,
175
177
  hasChildren: this.hasChildren(dataItem),
176
- parent: currentLevel.parent
178
+ parent: currentLevel.parent,
177
179
  };
178
180
  if (currentLevel.expanded) {
179
181
  this.rowIndex++;
@@ -206,7 +208,7 @@ export class ViewItemFactory {
206
208
  observables: this.observables,
207
209
  total: itemCount,
208
210
  totalVisible: itemIndex,
209
- totalRows: this.rowIndex
211
+ totalRows: this.rowIndex,
210
212
  };
211
213
  }
212
214
  loadChildren(parent) {
@@ -225,7 +227,7 @@ export class ViewItemFactory {
225
227
  if (isObservable(children)) {
226
228
  this.observables.push({
227
229
  observable: children,
228
- parentId: parentId
230
+ parentId: parentId,
229
231
  });
230
232
  parent.loading = true;
231
233
  }
@@ -246,7 +248,7 @@ export class ViewItemFactory {
246
248
  aggregates: children.aggregates,
247
249
  expanded: parent.expanded,
248
250
  parentIndex: parent.index,
249
- parent: parent
251
+ parent: parent,
250
252
  };
251
253
  }
252
254
  addNew(result, parent) {
@@ -259,7 +261,7 @@ export class ViewItemFactory {
259
261
  type: 'data',
260
262
  data: this.editState.newItem.dataItem,
261
263
  editContext: this.editState.newItem,
262
- rowIndex: rowIndex
264
+ rowIndex: rowIndex,
263
265
  });
264
266
  if (parent || inRange) {
265
267
  this.rowIndex++;
@@ -295,7 +297,7 @@ export class ViewCollection {
295
297
  idGetter: identity,
296
298
  pageable: false,
297
299
  isVirtual: false,
298
- skip: 0
300
+ skip: 0,
299
301
  }, options.fields);
300
302
  const childrenView = new ViewCollection(viewFields, options.expandState || EXPANDED_STATE, options.editState || NOT_EDITED_STATE, options.selectionState || UNSELECTED_STATE);
301
303
  if (options.loaded) {
@@ -316,20 +318,28 @@ export class ViewCollection {
316
318
  }
317
319
  return this._data;
318
320
  }
319
- get length() { return this.data.length; }
320
- get first() { return this.data[0]; }
321
+ get length() {
322
+ return this.data.length;
323
+ }
324
+ get first() {
325
+ return this.data[0];
326
+ }
321
327
  get firstItem() {
322
- return this.find(item => item.type === 'data');
328
+ return this.find((item) => item.type === 'data');
329
+ }
330
+ get last() {
331
+ return this.data[this.data.length - 1];
323
332
  }
324
- get last() { return this.data[this.data.length - 1]; }
325
333
  at(index) {
326
334
  return this.data[index];
327
335
  }
328
336
  itemIndex(item) {
329
337
  const idGetter = this.fieldAccessor().idGetter;
330
- return this.data.findIndex(i => i.id === idGetter(item));
338
+ return this.data.findIndex((i) => i.id === idGetter(item));
339
+ }
340
+ map(fn) {
341
+ return this.data.map(fn);
331
342
  }
332
- map(fn) { return this.data.map(fn); }
333
343
  filter(fn) {
334
344
  return this.data.filter(fn);
335
345
  }
@@ -348,16 +358,18 @@ export class ViewCollection {
348
358
  find(fn) {
349
359
  return this.data.find(fn);
350
360
  }
351
- toString() { return this.data.toString(); }
361
+ toString() {
362
+ return this.data.toString();
363
+ }
352
364
  updateSelectedState() {
353
- this.forEach(item => {
365
+ this.forEach((item) => {
354
366
  if (item.type === 'data') {
355
367
  item.selected = this.selectionState.isRowSelected(item.data);
356
368
  }
357
369
  });
358
370
  }
359
371
  updateEditedState() {
360
- this.forEach(item => {
372
+ this.forEach((item) => {
361
373
  if (item.type === 'data') {
362
374
  item.editContext = this.editState.context(item.data);
363
375
  }
@@ -390,7 +402,7 @@ export class ViewCollection {
390
402
  loadData() {
391
403
  const itemFactory = new ViewItemFactory(this.expandState, this.editState, this.selectionState, this.loaded, this.fieldAccessor);
392
404
  let result = itemFactory.generate();
393
- if (!result.loading && result.total && (!result.items.length || !result.items.some(i => i.type === 'data'))) {
405
+ if (!result.loading && result.total && (!result.items.length || !result.items.some((i) => i.type === 'data'))) {
394
406
  this.resetPage.emit();
395
407
  result = new ViewItemFactory(this.expandState, this.editState, this.selectionState, this.loaded, this.fieldAccessor).generate();
396
408
  }
@@ -404,9 +416,10 @@ export class ViewCollection {
404
416
  if (!this.childrenSubscription) {
405
417
  this.childrenSubscription = new Subscription();
406
418
  }
407
- result.observables.forEach(o => {
419
+ result.observables.forEach((o) => {
408
420
  this.loaded.set(o.parentId, LOADING);
409
- this.childrenSubscription.add(o.observable.subscribe(children => {
421
+ this.childrenSubscription.add(o.observable.subscribe((children) => {
422
+ // handle error, might show reload icon
410
423
  this.clear();
411
424
  this.loaded.set(o.parentId, children);
412
425
  this.childrenLoaded.emit();