@progress/kendo-angular-treelist 13.0.0-develop.1 → 13.0.0-develop.11
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.
- package/binding-directives/base-binding.directive.d.ts +5 -1
- package/binding-directives/data-bound-tree-component.d.ts +9 -0
- package/binding-directives/flat-binding.directive.d.ts +14 -3
- package/binding-directives/hierarchy-binding.directive.d.ts +12 -3
- package/column-menu/column-chooser.component.d.ts +10 -6
- package/column-menu/column-menu-chooser.component.d.ts +6 -10
- package/column-menu/column-menu-filter.component.d.ts +6 -10
- package/column-menu/column-menu-item-content-template.directive.d.ts +1 -1
- package/column-menu/column-menu-item.component.d.ts +8 -6
- package/column-menu/column-menu-lock.component.d.ts +5 -11
- package/column-menu/column-menu-settings.interface.d.ts +7 -10
- package/column-menu/column-menu-sort.component.d.ts +5 -11
- package/column-menu/column-menu.component.d.ts +1 -1
- package/column-menu/column-menu.service.d.ts +1 -1
- package/column-resizing/column-resize.interface.d.ts +1 -1
- package/columns/checkbox-column.component.d.ts +1 -1
- package/columns/column-base.d.ts +4 -0
- package/columns/column-group.component.d.ts +9 -6
- package/columns/column.component.d.ts +16 -66
- package/columns/command-column.component.d.ts +13 -15
- package/columns/rowreorder-column.component.d.ts +19 -0
- package/columns/span-column.component.d.ts +10 -81
- package/data/change-event-args.interface.d.ts +2 -2
- package/data/data.collection.d.ts +6 -0
- package/dragdrop/column-reorder-config.d.ts +1 -1
- package/editing/add-command.directive.d.ts +1 -1
- package/editing/cancel-command.directive.d.ts +1 -1
- package/editing/edit-command.directive.d.ts +1 -1
- package/editing/edit-event-args.interface.d.ts +1 -1
- package/editing/edit-template.directive.d.ts +11 -0
- package/editing/remove-command.directive.d.ts +1 -1
- package/editing/remove-event-args.interface.d.ts +1 -1
- package/editing/save-command.directive.d.ts +1 -1
- package/editing/save-event-args.interface.d.ts +1 -1
- package/esm2020/binding-directives/base-binding.directive.mjs +9 -3
- package/esm2020/binding-directives/flat-binding.directive.mjs +56 -6
- package/esm2020/binding-directives/hierarchy-binding.directive.mjs +46 -6
- package/esm2020/column-menu/column-chooser.component.mjs +10 -6
- package/esm2020/column-menu/column-menu-chooser.component.mjs +8 -12
- package/esm2020/column-menu/column-menu-filter.component.mjs +6 -10
- package/esm2020/column-menu/column-menu-item-content-template.directive.mjs +1 -1
- package/esm2020/column-menu/column-menu-item.component.mjs +9 -7
- package/esm2020/column-menu/column-menu-lock.component.mjs +5 -11
- package/esm2020/column-menu/column-menu-sort.component.mjs +5 -11
- package/esm2020/column-menu/column-menu.component.mjs +2 -2
- package/esm2020/column-menu/column-menu.service.mjs +1 -1
- package/esm2020/columns/checkbox-column.component.mjs +1 -1
- package/esm2020/columns/column-base.mjs +4 -0
- package/esm2020/columns/column-group.component.mjs +9 -6
- package/esm2020/columns/column.component.mjs +16 -39
- package/esm2020/columns/command-column.component.mjs +13 -15
- package/esm2020/columns/rowreorder-column.component.mjs +47 -0
- package/esm2020/columns/span-column.component.mjs +10 -81
- package/esm2020/data/data.collection.mjs +41 -28
- package/esm2020/editing/add-command.directive.mjs +2 -2
- package/esm2020/editing/base-command.directive.mjs +1 -1
- package/esm2020/editing/cancel-command.directive.mjs +2 -2
- package/esm2020/editing/edit-command.directive.mjs +2 -2
- package/esm2020/editing/edit-template.directive.mjs +11 -0
- package/esm2020/editing/remove-command.directive.mjs +2 -2
- package/esm2020/editing/save-command.directive.mjs +2 -2
- package/esm2020/excel/excel-command.directive.mjs +2 -2
- package/esm2020/filtering/cell/boolean-filter-cell.component.mjs +11 -11
- package/esm2020/filtering/cell/date-filter-cell.component.mjs +11 -11
- package/esm2020/filtering/cell/filter-cell-operators.component.mjs +15 -0
- package/esm2020/filtering/cell/numeric-filter-cell.component.mjs +13 -12
- package/esm2020/filtering/cell/string-filter-cell.component.mjs +14 -13
- package/esm2020/filtering/date-filter.component.mjs +6 -1
- package/esm2020/filtering/menu/boolean-filter-menu.component.mjs +11 -12
- package/esm2020/filtering/menu/date-filter-menu.component.mjs +12 -12
- package/esm2020/filtering/menu/filter-menu.component.mjs +1 -1
- package/esm2020/filtering/menu/numeric-filter-menu.component.mjs +12 -12
- package/esm2020/filtering/menu/string-filter-menu.component.mjs +15 -0
- package/esm2020/filtering/numeric-filter.component.mjs +4 -1
- package/esm2020/filtering/operators/after-eq-filter-operator.component.mjs +2 -5
- package/esm2020/filtering/operators/after-filter-operator.component.mjs +2 -5
- package/esm2020/filtering/operators/before-eq-filter-operator.component.mjs +2 -5
- package/esm2020/filtering/operators/before-filter-operator.component.mjs +3 -6
- package/esm2020/filtering/operators/contains-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/operators/ends-with-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/operators/eq-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/operators/gt-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/operators/gte-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/operators/is-empty-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/operators/is-not-empty-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/operators/is-not-null-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/operators/isnull-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/operators/lt-filter-operator.component.mjs +2 -5
- package/esm2020/filtering/operators/lte-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/operators/neq-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/operators/not-contains-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/operators/starts-with-filter-operator.component.mjs +1 -4
- package/esm2020/filtering/string-filter.component.mjs +2 -1
- package/esm2020/index.mjs +2 -0
- package/esm2020/localization/custom-messages.component.mjs +1 -1
- package/esm2020/localization/messages.mjs +3 -1
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/pager/pager-element.component.mjs +17 -0
- package/esm2020/pager/pager-next-buttons.component.mjs +8 -11
- package/esm2020/pager/pager-numeric-buttons.component.mjs +1 -1
- package/esm2020/pager/pager-page-sizes.component.mjs +1 -1
- package/esm2020/pager/pager-prev-buttons.component.mjs +8 -11
- package/esm2020/pager/pager-template.directive.mjs +1 -1
- package/esm2020/pdf/pdf-command.directive.mjs +2 -2
- package/esm2020/pdf/pdf-margin.component.mjs +9 -0
- package/esm2020/rendering/cell-template.directive.mjs +1 -1
- package/esm2020/rendering/cell.component.mjs +68 -20
- package/esm2020/rendering/common/spacer.component.mjs +1 -1
- package/esm2020/rendering/constants.mjs +4 -0
- package/esm2020/rendering/header/header.component.mjs +1 -1
- package/esm2020/rendering/table-body.component.mjs +5 -3
- package/esm2020/row-reordering/flat-reorder.service.mjs +48 -0
- package/esm2020/row-reordering/hierarchical-reorder.service.mjs +55 -0
- package/esm2020/row-reordering/row-reorder.service.mjs +220 -0
- package/esm2020/row-reordering/types.mjs +5 -0
- package/esm2020/row-reordering/utils.mjs +129 -0
- package/esm2020/shared.module.mjs +8 -3
- package/esm2020/treelist.component.mjs +185 -311
- package/esm2020/treelist.module.mjs +71 -66
- package/excel/excel-command.directive.d.ts +1 -1
- package/excel/excel-export-data.interface.d.ts +1 -1
- package/excel/excel.component.d.ts +9 -8
- package/fesm2015/progress-kendo-angular-treelist.mjs +1215 -792
- package/fesm2020/progress-kendo-angular-treelist.mjs +1205 -791
- package/filtering/cell/boolean-filter-cell.component.d.ts +11 -11
- package/filtering/cell/date-filter-cell.component.d.ts +11 -11
- package/filtering/cell/filter-cell-operators.component.d.ts +15 -0
- package/filtering/cell/numeric-filter-cell.component.d.ts +13 -12
- package/filtering/cell/string-filter-cell.component.d.ts +12 -11
- package/filtering/date-filter.component.d.ts +7 -11
- package/filtering/menu/boolean-filter-menu.component.d.ts +11 -12
- package/filtering/menu/date-filter-menu.component.d.ts +12 -12
- package/filtering/menu/numeric-filter-menu.component.d.ts +12 -12
- package/filtering/menu/string-filter-menu.component.d.ts +15 -0
- package/filtering/numeric-filter.component.d.ts +4 -1
- package/filtering/operators/after-eq-filter-operator.component.d.ts +4 -0
- package/filtering/operators/after-filter-operator.component.d.ts +4 -0
- package/filtering/operators/before-eq-filter-operator.component.d.ts +4 -0
- package/filtering/operators/before-filter-operator.component.d.ts +4 -0
- package/filtering/operators/contains-filter-operator.component.d.ts +1 -4
- package/filtering/operators/ends-with-filter-operator.component.d.ts +1 -4
- package/filtering/operators/eq-filter-operator.component.d.ts +1 -4
- package/filtering/operators/gte-filter-operator.component.d.ts +1 -4
- package/filtering/operators/is-empty-filter-operator.component.d.ts +1 -4
- package/filtering/operators/is-not-empty-filter-operator.component.d.ts +1 -4
- package/filtering/operators/is-not-null-filter-operator.component.d.ts +1 -4
- package/filtering/operators/isnull-filter-operator.component.d.ts +1 -4
- package/filtering/operators/lt-filter-operator.component.d.ts +4 -0
- package/filtering/operators/neq-filter-operator.component.d.ts +1 -4
- package/filtering/operators/not-contains-filter-operator.component.d.ts +1 -4
- package/filtering/operators/starts-with-filter-operator.component.d.ts +1 -4
- package/filtering/string-filter.component.d.ts +2 -1
- package/index.d.ts +2 -0
- package/localization/custom-messages.component.d.ts +1 -1
- package/localization/messages.d.ts +6 -2
- package/navigation/navigation-cell.interface.d.ts +1 -4
- package/navigation/navigation-row.interface.d.ts +1 -4
- package/package.json +16 -15
- package/pager/pager-element.component.d.ts +9 -0
- package/pager/pager-next-buttons.component.d.ts +0 -3
- package/pager/pager-numeric-buttons.component.d.ts +1 -1
- package/pager/pager-prev-buttons.component.d.ts +0 -3
- package/pager/pager-settings.d.ts +1 -15
- package/pager/pager-template.directive.d.ts +1 -1
- package/pdf/pdf-command.directive.d.ts +1 -1
- package/pdf/pdf-margin.component.d.ts +9 -0
- package/rendering/cell-template.directive.d.ts +1 -1
- package/rendering/cell.component.d.ts +9 -1
- package/rendering/common/spacer.component.d.ts +1 -1
- package/rendering/constants.d.ts +4 -0
- package/row-reordering/flat-reorder.service.d.ts +16 -0
- package/row-reordering/hierarchical-reorder.service.d.ts +16 -0
- package/row-reordering/row-reorder.service.d.ts +61 -0
- package/row-reordering/types.d.ts +39 -0
- package/row-reordering/utils.d.ts +85 -0
- package/schematics/ngAdd/index.js +3 -3
- package/scrolling/content-scroll-event.d.ts +1 -1
- package/scrolling/scroll-bottom-event.d.ts +1 -1
- package/scrolling/scroll-request.service.d.ts +6 -0
- package/selection/selectable-settings.d.ts +5 -15
- package/selection/selectable.directive.d.ts +1 -1
- package/selection/selection-change-event.d.ts +1 -1
- package/shared.module.d.ts +5 -4
- package/treelist.component.d.ts +66 -289
- package/treelist.module.d.ts +68 -66
|
@@ -66,6 +66,8 @@ import { DataBoundTreeComponent } from './binding-directives/data-bound-tree-com
|
|
|
66
66
|
import { ExpandableTreeComponent } from './expand-state/expandable-tree-component';
|
|
67
67
|
import { ContextService } from './common/provider.service';
|
|
68
68
|
import { guid } from '@progress/kendo-angular-common';
|
|
69
|
+
import { RowReorderService } from './row-reordering/row-reorder.service';
|
|
70
|
+
import { DragTargetContainerDirective, DropTargetContainerDirective } from '@progress/kendo-angular-utils';
|
|
69
71
|
import * as i0 from "@angular/core";
|
|
70
72
|
import * as i1 from "./layout/browser-support.service";
|
|
71
73
|
import * as i2 from "./data/change-notification.service";
|
|
@@ -87,19 +89,22 @@ import * as i17 from "./common/option-changes.service";
|
|
|
87
89
|
import * as i18 from "./selection/selection.service";
|
|
88
90
|
import * as i19 from "@progress/kendo-angular-l10n";
|
|
89
91
|
import * as i20 from "./common/provider.service";
|
|
90
|
-
import * as i21 from "./
|
|
91
|
-
import * as i22 from "./rendering/
|
|
92
|
-
import * as i23 from "./rendering/
|
|
93
|
-
import * as i24 from "./rendering/
|
|
94
|
-
import * as i25 from "./rendering/
|
|
95
|
-
import * as i26 from "./rendering/
|
|
96
|
-
import * as i27 from "./
|
|
97
|
-
import * as i28 from "./
|
|
98
|
-
import * as i29 from "@angular
|
|
99
|
-
import * as i30 from "./
|
|
100
|
-
import * as i31 from "
|
|
101
|
-
import * as i32 from "@progress/kendo-angular-
|
|
102
|
-
import * as i33 from "./
|
|
92
|
+
import * as i21 from "./row-reordering/row-reorder.service";
|
|
93
|
+
import * as i22 from "./rendering/toolbar/toolbar.component";
|
|
94
|
+
import * as i23 from "./rendering/common/col-group.component";
|
|
95
|
+
import * as i24 from "./rendering/header/header.component";
|
|
96
|
+
import * as i25 from "./rendering/list.component";
|
|
97
|
+
import * as i26 from "./rendering/table-body.component";
|
|
98
|
+
import * as i27 from "./rendering/common/loading.component";
|
|
99
|
+
import * as i28 from "./pager/pager.component";
|
|
100
|
+
import * as i29 from "@progress/kendo-angular-icons";
|
|
101
|
+
import * as i30 from "./localization/localized-messages.directive";
|
|
102
|
+
import * as i31 from "@angular/common";
|
|
103
|
+
import * as i32 from "@progress/kendo-angular-utils";
|
|
104
|
+
import * as i33 from "./column-resizing/table.directive";
|
|
105
|
+
import * as i34 from "./layout/resizable.directive";
|
|
106
|
+
import * as i35 from "@progress/kendo-angular-common";
|
|
107
|
+
import * as i36 from "./selection/marquee.directive";
|
|
103
108
|
const createControl = (source) => (acc, key) => {
|
|
104
109
|
acc[key] = new FormControl(source[key]);
|
|
105
110
|
return acc;
|
|
@@ -117,15 +122,14 @@ const isInEditedCell = (element, treelistElement) => closest(element, matchesCla
|
|
|
117
122
|
/**
|
|
118
123
|
* Represents the Kendo UI TreeList component for Angular.
|
|
119
124
|
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
* {% endmeta %}
|
|
125
|
+
* @example
|
|
126
|
+
* ```html
|
|
127
|
+
* <kendo-treelist [kendoTreeListFlatBinding]="data" ...></kendo-treelist>
|
|
128
|
+
* ```
|
|
129
|
+
*
|
|
126
130
|
*/
|
|
127
131
|
export class TreeListComponent {
|
|
128
|
-
constructor(supportService, wrapper, changeNotification, editService, filterService, pdfService, responsiveService, renderer, excelService, ngZone, scrollSyncService, domEvents, columnResizingService, changeDetectorRef, columnReorderService, columnInfoService, navigationService, sortService, scrollRequestService, expandStateService, optionChanges, selectionService, localization, ctx) {
|
|
132
|
+
constructor(supportService, wrapper, changeNotification, editService, filterService, pdfService, responsiveService, renderer, excelService, ngZone, scrollSyncService, domEvents, columnResizingService, changeDetectorRef, columnReorderService, columnInfoService, navigationService, sortService, scrollRequestService, expandStateService, optionChanges, selectionService, localization, ctx, rowReorderService) {
|
|
129
133
|
this.supportService = supportService;
|
|
130
134
|
this.wrapper = wrapper;
|
|
131
135
|
this.changeNotification = changeNotification;
|
|
@@ -150,6 +154,7 @@ export class TreeListComponent {
|
|
|
150
154
|
this.selectionService = selectionService;
|
|
151
155
|
this.localization = localization;
|
|
152
156
|
this.ctx = ctx;
|
|
157
|
+
this.rowReorderService = rowReorderService;
|
|
153
158
|
/**
|
|
154
159
|
* Defines the page size used by the TreeList when [paging]({% slug paging_treelist %}) is enabled.
|
|
155
160
|
*
|
|
@@ -158,10 +163,7 @@ export class TreeListComponent {
|
|
|
158
163
|
this.pageSize = 10;
|
|
159
164
|
/**
|
|
160
165
|
* Defines the scroll mode used by the TreeList.
|
|
161
|
-
*
|
|
162
|
-
* The available options are:
|
|
163
|
-
* - `none`—Renders no scrollbar.
|
|
164
|
-
* - `scrollable`—The default scroll mode. It requires the setting of the `height` option.
|
|
166
|
+
* @default 'scrollable'
|
|
165
167
|
*/
|
|
166
168
|
this.scrollable = 'scrollable';
|
|
167
169
|
/**
|
|
@@ -169,49 +171,12 @@ export class TreeListComponent {
|
|
|
169
171
|
*
|
|
170
172
|
* By default, the TreeList tracks changes by the index of the data item.
|
|
171
173
|
* Edited rows are tracked by reference.
|
|
172
|
-
* In some cases, you might need to override the default behavior,
|
|
173
|
-
* for example, when you implement editing with immutable data items.
|
|
174
|
-
*
|
|
175
|
-
* The following example demonstrates how to track items only by index.
|
|
176
|
-
*
|
|
177
|
-
* @example
|
|
178
|
-
* ```ts
|
|
179
|
-
* import { Component } from '@angular/core';
|
|
180
|
-
* import { TreeListItem } from '@progress/kendo-angular-treelist';
|
|
181
|
-
*
|
|
182
|
-
* _@Component({
|
|
183
|
-
* selector: 'my-app',
|
|
184
|
-
* template: `
|
|
185
|
-
* <kendo-treelist [data]="treelistData" [trackBy]="trackBy">
|
|
186
|
-
* </kendo-treelist>
|
|
187
|
-
* `
|
|
188
|
-
* })
|
|
189
|
-
* class AppComponent {
|
|
190
|
-
* public treelistData: any[] = products;
|
|
191
174
|
*
|
|
192
|
-
* public trackBy(index: number, item: TreeListItem): any {
|
|
193
|
-
* console.log(item);
|
|
194
|
-
* return index;
|
|
195
|
-
* }
|
|
196
|
-
* }
|
|
197
|
-
*
|
|
198
|
-
* const products = [{
|
|
199
|
-
* "ProductID": 1,
|
|
200
|
-
* "ProductName": "Chai",
|
|
201
|
-
* "UnitPrice": 18.0000,
|
|
202
|
-
* "Discontinued": true
|
|
203
|
-
* }, {
|
|
204
|
-
* "ProductID": 2,
|
|
205
|
-
* "ProductName": "Chang",
|
|
206
|
-
* "UnitPrice": 19.0000,
|
|
207
|
-
* "Discontinued": false
|
|
208
|
-
* }
|
|
209
|
-
* ];
|
|
210
|
-
* ```
|
|
211
175
|
*/
|
|
212
176
|
this.trackBy = defaultTrackBy;
|
|
213
177
|
/**
|
|
214
178
|
* If set to `true`, the treelist will render only the columns in the current viewport.
|
|
179
|
+
* @default false
|
|
215
180
|
*/
|
|
216
181
|
this.virtualColumns = false;
|
|
217
182
|
/**
|
|
@@ -225,18 +190,12 @@ export class TreeListComponent {
|
|
|
225
190
|
/**
|
|
226
191
|
* Configures the pager of the TreeList ([see example]({% slug paging_treelist %})).
|
|
227
192
|
*
|
|
228
|
-
* The available options are:
|
|
229
|
-
* - `buttonCount: Number`—Sets the maximum numeric buttons count before the buttons are collapsed. Defaults to `10`.
|
|
230
|
-
* - `info: Boolean`—Toggles the information about the current page and the total number of records. Defaults to `true`.
|
|
231
|
-
* - `type: PagerType`—Accepts the `numeric` (buttons with numbers) and `input` (input for typing the page number) values. Defaults to `'numeric'`.
|
|
232
|
-
* - `pageSizes: Boolean` or `Array<number>`—Shows a menu for selecting the page size. Defaults to `false`.
|
|
233
|
-
* - `previousNext: Boolean`—Toggles the **Previous** and **Next** buttons. Defaults to `true`.
|
|
234
|
-
* - `responsive: Boolean`—Toggles the built-in responsive behavior of the Pager. Defaults to `true`.
|
|
235
193
|
*/
|
|
236
194
|
this.pageable = false;
|
|
237
195
|
/**
|
|
238
196
|
* If set to `true`, the user can use dedicated shortcuts to interact with the TreeList.
|
|
239
197
|
* By default, navigation is disabled and the TreeList content is accessible in the normal tab sequence.
|
|
198
|
+
* @default false
|
|
240
199
|
*/
|
|
241
200
|
this.navigable = false;
|
|
242
201
|
/**
|
|
@@ -245,6 +204,8 @@ export class TreeListComponent {
|
|
|
245
204
|
* Columns with `autoSize` set to `false` are excluded.
|
|
246
205
|
* To dynamically update the column width to match the new content,
|
|
247
206
|
* refer to [this example]({% slug resizing_columns_treelist %}).
|
|
207
|
+
*
|
|
208
|
+
* @default false
|
|
248
209
|
*/
|
|
249
210
|
this.autoSize = false;
|
|
250
211
|
/**
|
|
@@ -276,7 +237,9 @@ export class TreeListComponent {
|
|
|
276
237
|
/**
|
|
277
238
|
* Specifies if the header of the treelist will be hidden. The header is visible by default.
|
|
278
239
|
*
|
|
279
|
-
*
|
|
240
|
+
* The header includes column headers and the [filter row]({% slug filtering_treelist %}#toc-filter-row).
|
|
241
|
+
*
|
|
242
|
+
* @default false
|
|
280
243
|
*/
|
|
281
244
|
this.hideHeader = false;
|
|
282
245
|
/**
|
|
@@ -385,6 +348,11 @@ export class TreeListComponent {
|
|
|
385
348
|
* Used by the expand directive and the Gantt component.
|
|
386
349
|
*/
|
|
387
350
|
this.expandStateChange = new EventEmitter();
|
|
351
|
+
/**
|
|
352
|
+
* Fires when the user drops the dragged row and reordering is performed.
|
|
353
|
+
* Emits the [RowReorderEvent]({% slug api_treelist_rowreorderevent %}).
|
|
354
|
+
*/
|
|
355
|
+
this.rowReorder = new EventEmitter();
|
|
388
356
|
/**
|
|
389
357
|
* @hidden
|
|
390
358
|
*/
|
|
@@ -414,6 +382,11 @@ export class TreeListComponent {
|
|
|
414
382
|
this._sort = new Array();
|
|
415
383
|
this._skip = 0;
|
|
416
384
|
this.cachedWindowWidth = 0;
|
|
385
|
+
this._rowReorderable = false;
|
|
386
|
+
/**
|
|
387
|
+
* @hidden
|
|
388
|
+
*/
|
|
389
|
+
this.treeListData = () => { return this.view; };
|
|
417
390
|
this._rowClass = () => null;
|
|
418
391
|
validatePackage(packageMetadata);
|
|
419
392
|
this.subscriptions.add(localization.changes.subscribe(({ rtl }) => {
|
|
@@ -476,6 +449,11 @@ export class TreeListComponent {
|
|
|
476
449
|
this.view.clear();
|
|
477
450
|
this.expandStateChange.emit(args);
|
|
478
451
|
}
|
|
452
|
+
if (this.rowReorderable) {
|
|
453
|
+
this.ngZone.onStable.pipe(take(2)).subscribe(() => {
|
|
454
|
+
this.notifyReorderContainers();
|
|
455
|
+
});
|
|
456
|
+
}
|
|
479
457
|
}));
|
|
480
458
|
this.subscriptions.add(this.view.childrenLoaded.subscribe(() => {
|
|
481
459
|
this.changeDetectorRef.detectChanges();
|
|
@@ -581,48 +559,6 @@ export class TreeListComponent {
|
|
|
581
559
|
/**
|
|
582
560
|
* Defines a function that is executed for every data row in the component.
|
|
583
561
|
*
|
|
584
|
-
* @example
|
|
585
|
-
* ```ts
|
|
586
|
-
* import { Component, ViewEncapsulation } from '@angular/core';
|
|
587
|
-
* import { RowClassArgs } from '@progress/kendo-angular-treelist';
|
|
588
|
-
*
|
|
589
|
-
* _@Component({
|
|
590
|
-
* selector: 'my-app',
|
|
591
|
-
* encapsulation: ViewEncapsulation.None,
|
|
592
|
-
* styles: [`
|
|
593
|
-
* .k-treelist tr.even { background-color: #f45c42; }
|
|
594
|
-
* .k-treelist tr.odd { background-color: #41f4df; }
|
|
595
|
-
* `],
|
|
596
|
-
* template: `
|
|
597
|
-
* <kendo-treelist [data]="treelistData" [rowClass]="rowCallback">
|
|
598
|
-
* </kendo-treelist>
|
|
599
|
-
* `
|
|
600
|
-
* })
|
|
601
|
-
* class AppComponent {
|
|
602
|
-
* public treelistData: any[] = products;
|
|
603
|
-
*
|
|
604
|
-
* public rowCallback(context: RowClassArgs) {
|
|
605
|
-
* const isEven = context.index % 2 === 0;
|
|
606
|
-
* return {
|
|
607
|
-
* even: isEven,
|
|
608
|
-
* odd: !isEven
|
|
609
|
-
* };
|
|
610
|
-
* }
|
|
611
|
-
* }
|
|
612
|
-
*
|
|
613
|
-
* const products = [{
|
|
614
|
-
* "ProductID": 1,
|
|
615
|
-
* "ProductName": "Chai",
|
|
616
|
-
* "UnitPrice": 18.0000,
|
|
617
|
-
* "Discontinued": true
|
|
618
|
-
* }, {
|
|
619
|
-
* "ProductID": 2,
|
|
620
|
-
* "ProductName": "Chang",
|
|
621
|
-
* "UnitPrice": 19.0000,
|
|
622
|
-
* "Discontinued": false
|
|
623
|
-
* }
|
|
624
|
-
* ];
|
|
625
|
-
* ```
|
|
626
562
|
*/
|
|
627
563
|
set rowClass(fn) {
|
|
628
564
|
if (typeof fn !== 'function') {
|
|
@@ -666,7 +602,7 @@ export class TreeListComponent {
|
|
|
666
602
|
this.selectionService.settings = value;
|
|
667
603
|
}
|
|
668
604
|
/**
|
|
669
|
-
* Provides a callback that determines if the given row
|
|
605
|
+
* Provides a callback that determines if the given row or cell is selected.
|
|
670
606
|
*/
|
|
671
607
|
set isSelected(value) {
|
|
672
608
|
if (typeof value !== 'function' && isDevMode()) {
|
|
@@ -674,6 +610,26 @@ export class TreeListComponent {
|
|
|
674
610
|
}
|
|
675
611
|
this.selectionService.isSelected = value;
|
|
676
612
|
}
|
|
613
|
+
/**
|
|
614
|
+
* Enables the [row reordering]({% slug treelist_row_reordering %}) of the TreeList.
|
|
615
|
+
* @default false
|
|
616
|
+
*/
|
|
617
|
+
set rowReorderable(value) {
|
|
618
|
+
this._rowReorderable = value;
|
|
619
|
+
if (value) {
|
|
620
|
+
this.rowReorderSubscription = this.rowReorderService.rowReorder.subscribe(args => {
|
|
621
|
+
hasObservers(this.rowReorder) && this.ngZone.run(() => {
|
|
622
|
+
this.rowReorder.emit(args);
|
|
623
|
+
});
|
|
624
|
+
});
|
|
625
|
+
}
|
|
626
|
+
else {
|
|
627
|
+
this.rowReorderSubscription?.unsubscribe();
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
get rowReorderable() {
|
|
631
|
+
return this._rowReorderable;
|
|
632
|
+
}
|
|
677
633
|
/**
|
|
678
634
|
* @hidden
|
|
679
635
|
*/
|
|
@@ -935,6 +891,30 @@ export class TreeListComponent {
|
|
|
935
891
|
this.ngZone = null;
|
|
936
892
|
clearTimeout(this.pageChangeTimeout);
|
|
937
893
|
}
|
|
894
|
+
/**
|
|
895
|
+
* @hidden
|
|
896
|
+
*/
|
|
897
|
+
handleReorderEvents(ev, evType) {
|
|
898
|
+
this.rowReorderService[evType](ev);
|
|
899
|
+
}
|
|
900
|
+
/**
|
|
901
|
+
* @hidden
|
|
902
|
+
*/
|
|
903
|
+
getDefaultSelectors(type) {
|
|
904
|
+
return this.rowReorderService.defaultSelectors[type];
|
|
905
|
+
}
|
|
906
|
+
/**
|
|
907
|
+
* @hidden
|
|
908
|
+
*/
|
|
909
|
+
getHintSettings(setting) {
|
|
910
|
+
return this.rowReorderService[setting];
|
|
911
|
+
}
|
|
912
|
+
/**
|
|
913
|
+
* @hidden
|
|
914
|
+
*/
|
|
915
|
+
get hintText() {
|
|
916
|
+
return this.rowReorderService.getDefaultHintText(this.columnList, this.view);
|
|
917
|
+
}
|
|
938
918
|
/**
|
|
939
919
|
* @hidden
|
|
940
920
|
*/
|
|
@@ -1076,7 +1056,7 @@ export class TreeListComponent {
|
|
|
1076
1056
|
* Exports the TreeList element to a Drawing [`Group`]({% slug api_kendo-drawing_group %}) by using the `kendo-treelist-pdf` component options.
|
|
1077
1057
|
* ([see example]({% slug pdfexport_treelist %}#toc-exporting-multiple-treelists-to-the-same-pdf)).
|
|
1078
1058
|
*
|
|
1079
|
-
* @return {Promise}
|
|
1059
|
+
* @return {Promise} A promise that will be resolved with the Drawing `Group`.
|
|
1080
1060
|
*/
|
|
1081
1061
|
drawPDF() {
|
|
1082
1062
|
const promise = createPromise();
|
|
@@ -1094,64 +1074,8 @@ export class TreeListComponent {
|
|
|
1094
1074
|
* so that the whole text fits without wrapping. This method expects the TreeList
|
|
1095
1075
|
* to be resizable (set `resizable` to `true`).
|
|
1096
1076
|
* Makes sense to execute this method only
|
|
1097
|
-
* after the TreeList is already populated with data.
|
|
1098
|
-
*
|
|
1099
|
-
* @example
|
|
1100
|
-
* ```ts
|
|
1101
|
-
* _@Component({
|
|
1102
|
-
* selector: 'my-app',
|
|
1103
|
-
* template: `
|
|
1104
|
-
* <kendo-treelist
|
|
1105
|
-
* #treelist
|
|
1106
|
-
* [data]="treelistData"
|
|
1107
|
-
* [resizable]="true"
|
|
1108
|
-
* style="height: 300px">
|
|
1109
|
-
* <ng-template kendoTreeListToolbarTemplate>
|
|
1110
|
-
* <button kendoButton (click)="treelist.autoFitColumn(groupColumn)">
|
|
1111
|
-
* Auto-fit the group column
|
|
1112
|
-
* </button>
|
|
1113
|
-
* </ng-template>
|
|
1114
|
-
* <kendo-treelist-column-group #groupColumn title="Product Info">
|
|
1115
|
-
* <kendo-treelist-column
|
|
1116
|
-
* field="ProductID"
|
|
1117
|
-
* [width]="50"
|
|
1118
|
-
* [minResizableWidth]="30"
|
|
1119
|
-
* title="ID">
|
|
1120
|
-
* </kendo-treelist-column>
|
|
1121
|
-
*
|
|
1122
|
-
* <kendo-treelist-column
|
|
1123
|
-
* field="ProductName"
|
|
1124
|
-
* title="Product Name">
|
|
1125
|
-
* </kendo-treelist-column>
|
|
1126
|
-
* </kendo-treelist-column-group>
|
|
1077
|
+
* after the TreeList is already populated with data. [See example](slug:resizing_columns_treelist#toc-auto-fitting-the-content).
|
|
1127
1078
|
*
|
|
1128
|
-
* <kendo-treelist-column
|
|
1129
|
-
* field="UnitPrice"
|
|
1130
|
-
* title="Unit Price"
|
|
1131
|
-
* [width]="180"
|
|
1132
|
-
* filter="numeric"
|
|
1133
|
-
* format="{0:c}">
|
|
1134
|
-
* </kendo-treelist-column>
|
|
1135
|
-
* </kendo-treelist>
|
|
1136
|
-
* `
|
|
1137
|
-
* })
|
|
1138
|
-
* class AppComponent {
|
|
1139
|
-
* public treelistData: any[] = products;
|
|
1140
|
-
* }
|
|
1141
|
-
*
|
|
1142
|
-
* const products = [{
|
|
1143
|
-
* "ProductID": 1,
|
|
1144
|
-
* "ProductName": "Chai",
|
|
1145
|
-
* "UnitPrice": 18.0000,
|
|
1146
|
-
* "Discontinued": true
|
|
1147
|
-
* }, {
|
|
1148
|
-
* "ProductID": 2,
|
|
1149
|
-
* "ProductName": "Chang",
|
|
1150
|
-
* "UnitPrice": 19.0000,
|
|
1151
|
-
* "Discontinued": false
|
|
1152
|
-
* }
|
|
1153
|
-
* ];
|
|
1154
|
-
* ```
|
|
1155
1079
|
*/
|
|
1156
1080
|
autoFitColumn(column) {
|
|
1157
1081
|
this.columnResizingService.autoFit(column);
|
|
@@ -1161,69 +1085,7 @@ export class TreeListComponent {
|
|
|
1161
1085
|
* If no columns are specified, `autoFitColumns` is applied to all columns.
|
|
1162
1086
|
*
|
|
1163
1087
|
* This method requires the TreeList to be resizable (set `resizable` to `true`).
|
|
1164
|
-
*
|
|
1165
|
-
* @example
|
|
1166
|
-
* ```ts
|
|
1167
|
-
* _@Component({
|
|
1168
|
-
* selector: 'my-app',
|
|
1169
|
-
* template: `
|
|
1170
|
-
* <kendo-treelist
|
|
1171
|
-
* #treelist
|
|
1172
|
-
* [data]="treelistData"
|
|
1173
|
-
* [resizable]="true"
|
|
1174
|
-
* style="height: 300px">
|
|
1175
|
-
* <ng-template kendoTreeListToolbarTemplate>
|
|
1176
|
-
* <button kendoButton (click)="treelist.autoFitColumns([firstColumn, lastColumn])">
|
|
1177
|
-
* Auto-fit the first and last column
|
|
1178
|
-
* </button>
|
|
1179
|
-
* <button kendoButton (click)="treelist.autoFitColumns()">
|
|
1180
|
-
* Auto-fit all columns
|
|
1181
|
-
* </button>
|
|
1182
|
-
* </ng-template>
|
|
1183
|
-
* <kendo-treelist-column-group title="Product Info">
|
|
1184
|
-
* <kendo-treelist-column
|
|
1185
|
-
* #firstColumn
|
|
1186
|
-
* field="ProductID"
|
|
1187
|
-
* [width]="50"
|
|
1188
|
-
* [minResizableWidth]="30"
|
|
1189
|
-
* title="ID">
|
|
1190
|
-
* </kendo-treelist-column>
|
|
1191
|
-
*
|
|
1192
|
-
* <kendo-treelist-column
|
|
1193
|
-
* field="ProductName"
|
|
1194
|
-
* title="Product Name"
|
|
1195
|
-
* >
|
|
1196
|
-
* </kendo-treelist-column>
|
|
1197
|
-
* </kendo-treelist-column-group>
|
|
1198
|
-
*
|
|
1199
|
-
* <kendo-treelist-column
|
|
1200
|
-
* #lastColumn
|
|
1201
|
-
* field="UnitPrice"
|
|
1202
|
-
* title="Unit Price"
|
|
1203
|
-
* [width]="180"
|
|
1204
|
-
* filter="numeric"
|
|
1205
|
-
* format="{0:c}">
|
|
1206
|
-
* </kendo-treelist-column>
|
|
1207
|
-
* </kendo-treelist>
|
|
1208
|
-
* `
|
|
1209
|
-
* })
|
|
1210
|
-
* class AppComponent {
|
|
1211
|
-
* public treelistData: any[] = products;
|
|
1212
|
-
* }
|
|
1213
|
-
*
|
|
1214
|
-
* const products = [{
|
|
1215
|
-
* "ProductID": 1,
|
|
1216
|
-
* "ProductName": "Chai",
|
|
1217
|
-
* "UnitPrice": 18.0000,
|
|
1218
|
-
* "Discontinued": true
|
|
1219
|
-
* }, {
|
|
1220
|
-
* "ProductID": 2,
|
|
1221
|
-
* "ProductName": "Chang",
|
|
1222
|
-
* "UnitPrice": 19.0000,
|
|
1223
|
-
* "Discontinued": false
|
|
1224
|
-
* }
|
|
1225
|
-
* ];
|
|
1226
|
-
* ```
|
|
1088
|
+
* [See example](slug:resizing_columns_treelist#toc-auto-fitting-the-content).
|
|
1227
1089
|
*/
|
|
1228
1090
|
autoFitColumns(columns = this.columns) {
|
|
1229
1091
|
let cols;
|
|
@@ -1296,9 +1158,9 @@ export class TreeListComponent {
|
|
|
1296
1158
|
/**
|
|
1297
1159
|
* Focuses the cell with the specified row and column index.
|
|
1298
1160
|
*
|
|
1299
|
-
* The row index is based on the logical structure of the TreeList and does not correspond to the data item index
|
|
1300
|
-
*
|
|
1301
|
-
*
|
|
1161
|
+
* The row index is based on the logical structure of the TreeList and does not correspond to the data item index.
|
|
1162
|
+
* The row indexing is absolute and does not change with paging.
|
|
1163
|
+
* Header rows are included, starting at index 0.
|
|
1302
1164
|
*
|
|
1303
1165
|
* If the TreeList is configured for scrolling, including virtual scrolling, the scroll position will be updated.
|
|
1304
1166
|
* If the row is not present on the current page, the method will have no effect.
|
|
@@ -1349,67 +1211,6 @@ export class TreeListComponent {
|
|
|
1349
1211
|
* @param {number} destIndex - The new position of the column.
|
|
1350
1212
|
* @param {ColumnReorderConfig} options - Additional options.
|
|
1351
1213
|
*
|
|
1352
|
-
* @example
|
|
1353
|
-
* ```ts
|
|
1354
|
-
* _@Component({
|
|
1355
|
-
* selector: 'my-app',
|
|
1356
|
-
* template: `
|
|
1357
|
-
* <kendo-treelist
|
|
1358
|
-
* #treelist
|
|
1359
|
-
* [data]="treelistData"
|
|
1360
|
-
* [reorderable]="true"
|
|
1361
|
-
* style="height: 300px">
|
|
1362
|
-
* <ng-template kendoTreeListToolbarTemplate>
|
|
1363
|
-
* <button kendoButton
|
|
1364
|
-
* (click)="treelist.reorderColumn(groupColumn, 2, { before: true })">
|
|
1365
|
-
* Move the group column before the last one.
|
|
1366
|
-
* </button>
|
|
1367
|
-
* </ng-template>
|
|
1368
|
-
* <kendo-treelist-column-group #groupColumn title="Product Info">
|
|
1369
|
-
* <kendo-treelist-column
|
|
1370
|
-
* field="ProductID"
|
|
1371
|
-
* [width]="50"
|
|
1372
|
-
* title="ID">
|
|
1373
|
-
* </kendo-treelist-column>
|
|
1374
|
-
*
|
|
1375
|
-
* <kendo-treelist-column
|
|
1376
|
-
* field="ProductName"
|
|
1377
|
-
* title="Product Name">
|
|
1378
|
-
* </kendo-treelist-column>
|
|
1379
|
-
* </kendo-treelist-column-group>
|
|
1380
|
-
*
|
|
1381
|
-
* <kendo-treelist-column
|
|
1382
|
-
* field="UnitPrice"
|
|
1383
|
-
* title="Unit Price"
|
|
1384
|
-
* [width]="180"
|
|
1385
|
-
* format="{0:c}">
|
|
1386
|
-
* </kendo-treelist-column>
|
|
1387
|
-
*
|
|
1388
|
-
* <kendo-treelist-column
|
|
1389
|
-
* field="Discontinued"
|
|
1390
|
-
* title="Discontinued"
|
|
1391
|
-
* [width]="100">
|
|
1392
|
-
* </kendo-treelist-column>
|
|
1393
|
-
* </kendo-treelist>
|
|
1394
|
-
* `
|
|
1395
|
-
* })
|
|
1396
|
-
* class AppComponent {
|
|
1397
|
-
* public treelistData: any[] = products;
|
|
1398
|
-
* }
|
|
1399
|
-
*
|
|
1400
|
-
* const products = [{
|
|
1401
|
-
* "ProductID": 1,
|
|
1402
|
-
* "ProductName": "Chai",
|
|
1403
|
-
* "UnitPrice": 18.0000,
|
|
1404
|
-
* "Discontinued": true
|
|
1405
|
-
* }, {
|
|
1406
|
-
* "ProductID": 2,
|
|
1407
|
-
* "ProductName": "Chang",
|
|
1408
|
-
* "UnitPrice": 19.0000,
|
|
1409
|
-
* "Discontinued": false
|
|
1410
|
-
* }
|
|
1411
|
-
* ];
|
|
1412
|
-
* ```
|
|
1413
1214
|
*/
|
|
1414
1215
|
reorderColumn(source, destIndex, options = { before: false }) {
|
|
1415
1216
|
const columnsForLevel = sortColumns(this.allColumnsForLevel(source.level));
|
|
@@ -1626,6 +1427,7 @@ export class TreeListComponent {
|
|
|
1626
1427
|
this.closeCell();
|
|
1627
1428
|
this.cancelCell();
|
|
1628
1429
|
this.dataStateChange.emit(x);
|
|
1430
|
+
this.rowReorderable && this.notifyReorderContainers();
|
|
1629
1431
|
}));
|
|
1630
1432
|
}
|
|
1631
1433
|
attachEditHandlers() {
|
|
@@ -1890,9 +1692,13 @@ export class TreeListComponent {
|
|
|
1890
1692
|
this.columns.reset(columns.toArray());
|
|
1891
1693
|
this.columns.notifyOnChanges();
|
|
1892
1694
|
}
|
|
1695
|
+
notifyReorderContainers() {
|
|
1696
|
+
this.dragTargetContainer?.notify();
|
|
1697
|
+
this.dropTargetContainer?.notify();
|
|
1698
|
+
}
|
|
1893
1699
|
}
|
|
1894
|
-
TreeListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeListComponent, deps: [{ token: i1.BrowserSupportService }, { token: i0.ElementRef }, { token: i2.ChangeNotificationService }, { token: i3.EditService }, { token: i4.FilterService }, { token: i5.PDFService }, { token: i6.ResponsiveService }, { token: i0.Renderer2 }, { token: i7.ExcelService }, { token: i0.NgZone }, { token: i8.ScrollSyncService }, { token: i9.DomEventsService }, { token: i10.ColumnResizingService }, { token: i0.ChangeDetectorRef }, { token: i11.ColumnReorderService }, { token: i12.ColumnInfoService }, { token: i13.NavigationService }, { token: i14.SortService }, { token: i15.ScrollRequestService }, { token: i16.ExpandStateService }, { token: i17.OptionChangesService }, { token: i18.SelectionService }, { token: i19.LocalizationService }, { token: i20.ContextService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1895
|
-
TreeListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TreeListComponent, selector: "kendo-treelist", inputs: { ariaLabel: ["aria-label", "ariaLabel"], data: "data", pageSize: "pageSize", height: "height", rowHeight: "rowHeight", skip: "skip", scrollable: "scrollable", sort: "sort", trackBy: "trackBy", filter: "filter", virtualColumns: "virtualColumns", filterable: "filterable", sortable: "sortable", pageable: "pageable", navigable: "navigable", navigatable: "navigatable", autoSize: "autoSize", rowClass: "rowClass", resizable: "resizable", reorderable: "reorderable", loading: "loading", columnMenu: "columnMenu", hideHeader: "hideHeader", idField: "idField", selectable: "selectable", isSelected: "isSelected", columnsRef: ["columns", "columnsRef"], fetchChildren: "fetchChildren", hasChildren: "hasChildren", isExpanded: "isExpanded" }, outputs: { selectionChange: "selectionChange", filterChange: "filterChange", pageChange: "pageChange", sortChange: "sortChange", dataStateChange: "dataStateChange", edit: "edit", cancel: "cancel", save: "save", remove: "remove", add: "add", cellClose: "cellClose", cellClick: "cellClick", pdfExport: "pdfExport", excelExport: "excelExport", columnResize: "columnResize", columnReorder: "columnReorder", columnVisibilityChange: "columnVisibilityChange", columnLockedChange: "columnLockedChange", scrollBottom: "scrollBottom", contentScroll: "contentScroll", expandEvent: "expand", collapseEvent: "collapse", expandStateChange: "expandStateChange" }, host: { properties: { "attr.dir": "this.dir", "class.k-grid": "this.hostClasses", "class.k-grid-md": "this.hostClasses", "class.k-treelist": "this.hostClasses", "class.k-grid-lockedcolumns": "this.lockedClasses", "class.k-grid-virtual": "this.virtualClasses", "class.k-grid-no-scrollbar": "this.noScrollbarClass" } }, providers: [
|
|
1700
|
+
TreeListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeListComponent, deps: [{ token: i1.BrowserSupportService }, { token: i0.ElementRef }, { token: i2.ChangeNotificationService }, { token: i3.EditService }, { token: i4.FilterService }, { token: i5.PDFService }, { token: i6.ResponsiveService }, { token: i0.Renderer2 }, { token: i7.ExcelService }, { token: i0.NgZone }, { token: i8.ScrollSyncService }, { token: i9.DomEventsService }, { token: i10.ColumnResizingService }, { token: i0.ChangeDetectorRef }, { token: i11.ColumnReorderService }, { token: i12.ColumnInfoService }, { token: i13.NavigationService }, { token: i14.SortService }, { token: i15.ScrollRequestService }, { token: i16.ExpandStateService }, { token: i17.OptionChangesService }, { token: i18.SelectionService }, { token: i19.LocalizationService }, { token: i20.ContextService }, { token: i21.RowReorderService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1701
|
+
TreeListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: TreeListComponent, selector: "kendo-treelist", inputs: { ariaLabel: ["aria-label", "ariaLabel"], data: "data", pageSize: "pageSize", height: "height", rowHeight: "rowHeight", skip: "skip", scrollable: "scrollable", sort: "sort", trackBy: "trackBy", filter: "filter", virtualColumns: "virtualColumns", filterable: "filterable", sortable: "sortable", pageable: "pageable", navigable: "navigable", navigatable: "navigatable", autoSize: "autoSize", rowClass: "rowClass", resizable: "resizable", reorderable: "reorderable", loading: "loading", columnMenu: "columnMenu", hideHeader: "hideHeader", idField: "idField", selectable: "selectable", isSelected: "isSelected", rowReorderable: "rowReorderable", columnsRef: ["columns", "columnsRef"], fetchChildren: "fetchChildren", hasChildren: "hasChildren", isExpanded: "isExpanded" }, outputs: { selectionChange: "selectionChange", filterChange: "filterChange", pageChange: "pageChange", sortChange: "sortChange", dataStateChange: "dataStateChange", edit: "edit", cancel: "cancel", save: "save", remove: "remove", add: "add", cellClose: "cellClose", cellClick: "cellClick", pdfExport: "pdfExport", excelExport: "excelExport", columnResize: "columnResize", columnReorder: "columnReorder", columnVisibilityChange: "columnVisibilityChange", columnLockedChange: "columnLockedChange", scrollBottom: "scrollBottom", contentScroll: "contentScroll", expandEvent: "expand", collapseEvent: "collapse", expandStateChange: "expandStateChange", rowReorder: "rowReorder" }, host: { properties: { "attr.dir": "this.dir", "class.k-grid": "this.hostClasses", "class.k-grid-md": "this.hostClasses", "class.k-treelist": "this.hostClasses", "class.k-grid-lockedcolumns": "this.lockedClasses", "class.k-grid-virtual": "this.virtualClasses", "class.k-grid-no-scrollbar": "this.noScrollbarClass" } }, providers: [
|
|
1896
1702
|
BrowserSupportService,
|
|
1897
1703
|
LocalizationService,
|
|
1898
1704
|
ColumnInfoService,
|
|
@@ -1933,8 +1739,9 @@ TreeListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
1933
1739
|
provide: ExpandableTreeComponent,
|
|
1934
1740
|
useExisting: forwardRef(() => TreeListComponent)
|
|
1935
1741
|
},
|
|
1936
|
-
ContextService
|
|
1937
|
-
|
|
1742
|
+
ContextService,
|
|
1743
|
+
RowReorderService
|
|
1744
|
+
], queries: [{ propertyName: "columns", predicate: ColumnBase }, { propertyName: "noRecordsTemplateChildren", predicate: NoRecordsTemplateDirective }, { propertyName: "pagerTemplateChildren", predicate: PagerTemplateDirective }, { propertyName: "toolbarTemplateChildren", predicate: ToolbarTemplateDirective }, { propertyName: "columnMenuTemplates", predicate: ColumnMenuTemplateDirective }], viewQueries: [{ propertyName: "lockedHeader", first: true, predicate: ["lockedHeader"], descendants: true }, { propertyName: "header", first: true, predicate: ["header"], descendants: true }, { propertyName: "ariaRoot", first: true, predicate: ["ariaRoot"], descendants: true, static: true }, { propertyName: "dragTargetContainer", first: true, predicate: DragTargetContainerDirective, descendants: true }, { propertyName: "dropTargetContainer", first: true, predicate: DropTargetContainerDirective, descendants: true }, { propertyName: "footer", predicate: ["footer"], descendants: true }], exportAs: ["kendoTreeList"], usesOnChanges: true, ngImport: i0, template: `
|
|
1938
1745
|
<ng-container kendoTreeListLocalizedMessages
|
|
1939
1746
|
|
|
1940
1747
|
i18n-noRecords="kendo.treelist.noRecords|The label visible in the TreeList when there are no records"
|
|
@@ -2095,6 +1902,8 @@ TreeListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
2095
1902
|
|
|
2096
1903
|
i18n-bottomToolbarLabel="kendo.treelist.bottomToolbarLabel|The label of the TreeList bottom toolbar"
|
|
2097
1904
|
bottomToolbarLabel="Bottom toolbar"
|
|
1905
|
+
i18n-dragRowHandleLabel="kendo.treelist.dragRowHandleLabel|The label for the TreeList drag row handle"
|
|
1906
|
+
dragRowHandleLabel="Drag row"
|
|
2098
1907
|
>
|
|
2099
1908
|
</ng-container>
|
|
2100
1909
|
<kendo-treelist-toolbar
|
|
@@ -2112,7 +1921,24 @@ TreeListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
2112
1921
|
[attr.aria-rowcount]="ariaRowCount"
|
|
2113
1922
|
[attr.aria-colcount]="ariaColCount"
|
|
2114
1923
|
[attr.aria-multiselectable]="ariaMultiselectable"
|
|
2115
|
-
[attr.aria-label]="ariaLabel"
|
|
1924
|
+
[attr.aria-label]="ariaLabel"
|
|
1925
|
+
kendoDragTargetContainer
|
|
1926
|
+
kendoDropTargetContainer
|
|
1927
|
+
mode="manual"
|
|
1928
|
+
[dragDisabled]="!rowReorderable"
|
|
1929
|
+
[dropDisabled]="!rowReorderable"
|
|
1930
|
+
[dragTargetFilter]="getDefaultSelectors('dragTarget')"
|
|
1931
|
+
[dropTargetFilter]="getDefaultSelectors('dropTarget')"
|
|
1932
|
+
[dragHandle]="getDefaultSelectors('handle')"
|
|
1933
|
+
[hint]="{hintTemplate: defaultHint}"
|
|
1934
|
+
(onPress)="handleReorderEvents($event, 'press')"
|
|
1935
|
+
(onDragStart)="handleReorderEvents($event, 'dragStart')"
|
|
1936
|
+
(onDrag)="handleReorderEvents($event, 'drag')"
|
|
1937
|
+
(onDragEnter)="handleReorderEvents($event, 'dragEnter')"
|
|
1938
|
+
(onDragLeave)="handleReorderEvents($event, 'dragLeave')"
|
|
1939
|
+
(onDragEnd)="handleReorderEvents($event, 'dragEnd')"
|
|
1940
|
+
(onDrop)="handleReorderEvents($event, 'drop')"
|
|
1941
|
+
[dragData]="treeListData">
|
|
2116
1942
|
<ng-template [ngIf]="isScrollable">
|
|
2117
1943
|
<div *ngIf="!hideHeader"
|
|
2118
1944
|
class="k-grid-header"
|
|
@@ -2199,14 +2025,14 @@ TreeListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
2199
2025
|
[virtualColumns]="virtualColumns"
|
|
2200
2026
|
[expandIcons]="expandIcons"
|
|
2201
2027
|
(scrollBottom)="notifyScrollBottom()"
|
|
2202
|
-
(contentScroll)="contentScroll.emit($event)"
|
|
2028
|
+
(contentScroll)="contentScroll.emit($event)"
|
|
2203
2029
|
kendoDraggable
|
|
2204
2030
|
kendoTreeListSelectionMarquee
|
|
2205
2031
|
[enableDrag]="marqueeSelection">
|
|
2206
2032
|
</kendo-treelist-list>
|
|
2207
2033
|
</ng-template>
|
|
2208
2034
|
<ng-template [ngIf]="!isScrollable">
|
|
2209
|
-
<table
|
|
2035
|
+
<table
|
|
2210
2036
|
class="k-table k-table-md k-grid-header-table"
|
|
2211
2037
|
[style.table-layout]="resizable ? 'fixed' : null">
|
|
2212
2038
|
<colgroup kendoTreeListColGroup
|
|
@@ -2264,7 +2090,16 @@ TreeListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
2264
2090
|
[attr.aria-label]="messageFor('bottomToolbarLabel')"
|
|
2265
2091
|
[attr.aria-controls]="ariaRootId">
|
|
2266
2092
|
</kendo-treelist-toolbar>
|
|
2267
|
-
|
|
2093
|
+
|
|
2094
|
+
<ng-template #defaultHint>
|
|
2095
|
+
<kendo-icon-wrapper
|
|
2096
|
+
[name]="getHintSettings('hintIcon')"
|
|
2097
|
+
[svgIcon]="getHintSettings('hintSVGIcon')"
|
|
2098
|
+
innerCssClass="k-drag-status">
|
|
2099
|
+
</kendo-icon-wrapper>
|
|
2100
|
+
{{hintText}}
|
|
2101
|
+
</ng-template>
|
|
2102
|
+
`, isInline: true, components: [{ type: i22.ToolbarComponent, selector: "kendo-treelist-toolbar", inputs: ["position", "navigable"] }, { type: i23.ColGroupComponent, selector: "[kendoTreeListColGroup]", inputs: ["columns"] }, { type: i24.HeaderComponent, selector: "[kendoTreeListHeader]", inputs: ["totalColumnLevels", "columns", "scrollable", "filterable", "sort", "filter", "sortable", "lockedColumnsCount", "resizable", "reorderable", "columnMenu", "columnMenuTemplate", "totalColumnsCount"] }, { type: i25.ListComponent, selector: "kendo-treelist-list", inputs: ["view", "total", "rowHeight", "take", "skip", "columns", "noRecordsTemplate", "filterable", "rowClass", "loading", "trackBy", "virtualColumns", "isVirtual", "expandIcons"], outputs: ["contentScroll", "pageChange", "scrollBottom"] }, { type: i26.TableBodyComponent, selector: "[kendoTreeListTableBody]", inputs: ["columns", "allColumns", "noRecordsTemplate", "view", "skip", "filterable", "noRecordsText", "isLocked", "lockedColumnsCount", "totalColumnsCount", "virtualColumns", "expandIcons", "trackBy", "rowClass"] }, { type: i27.LoadingComponent, selector: "[kendoTreeListLoading]" }, { type: i28.PagerComponent, selector: "kendo-treelist-pager", inputs: ["allCount", "total", "skip", "navigable", "pageSize", "options", "template"], outputs: ["pageChange"] }, { type: i29.IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }], directives: [{ type: i30.LocalizedMessagesDirective, selector: "[kendoTreeListLocalizedMessages]" }, { type: i31.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i32.DragTargetContainerDirective, selector: "[kendoDragTargetContainer]", inputs: ["hint", "dragTargetFilter", "dragHandle", "dragDelay", "threshold", "dragTargetId", "dragData", "dragDisabled", "mode"], outputs: ["onDragReady", "onPress", "onDragStart", "onDrag", "onRelease", "onDragEnd"], exportAs: ["kendoDragTargetContainer"] }, { type: i32.DropTargetContainerDirective, selector: "[kendoDropTargetContainer]", inputs: ["dropTargetFilter", "dropDisabled"], outputs: ["onDragEnter", "onDragOver", "onDragLeave", "onDrop"], exportAs: ["kendoDropTargetContainer"] }, { type: i33.TableDirective, selector: "table", inputs: ["locked", "virtualColumns"] }, { type: i34.ResizableContainerDirective, selector: "[kendoTreeListResizableContainer]", inputs: ["lockedWidth", "kendoTreeListResizableContainer"] }, { type: i35.DraggableDirective, selector: "[kendoDraggable]", inputs: ["enableDrag"], outputs: ["kendoPress", "kendoDrag", "kendoRelease"] }, { type: i36.MarqueeDirective, selector: "[kendoTreeListSelectionMarquee]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2268
2103
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: TreeListComponent, decorators: [{
|
|
2269
2104
|
type: Component,
|
|
2270
2105
|
args: [{
|
|
@@ -2312,7 +2147,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2312
2147
|
provide: ExpandableTreeComponent,
|
|
2313
2148
|
useExisting: forwardRef(() => TreeListComponent)
|
|
2314
2149
|
},
|
|
2315
|
-
ContextService
|
|
2150
|
+
ContextService,
|
|
2151
|
+
RowReorderService
|
|
2316
2152
|
],
|
|
2317
2153
|
selector: 'kendo-treelist',
|
|
2318
2154
|
template: `
|
|
@@ -2476,6 +2312,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2476
2312
|
|
|
2477
2313
|
i18n-bottomToolbarLabel="kendo.treelist.bottomToolbarLabel|The label of the TreeList bottom toolbar"
|
|
2478
2314
|
bottomToolbarLabel="Bottom toolbar"
|
|
2315
|
+
i18n-dragRowHandleLabel="kendo.treelist.dragRowHandleLabel|The label for the TreeList drag row handle"
|
|
2316
|
+
dragRowHandleLabel="Drag row"
|
|
2479
2317
|
>
|
|
2480
2318
|
</ng-container>
|
|
2481
2319
|
<kendo-treelist-toolbar
|
|
@@ -2493,7 +2331,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2493
2331
|
[attr.aria-rowcount]="ariaRowCount"
|
|
2494
2332
|
[attr.aria-colcount]="ariaColCount"
|
|
2495
2333
|
[attr.aria-multiselectable]="ariaMultiselectable"
|
|
2496
|
-
[attr.aria-label]="ariaLabel"
|
|
2334
|
+
[attr.aria-label]="ariaLabel"
|
|
2335
|
+
kendoDragTargetContainer
|
|
2336
|
+
kendoDropTargetContainer
|
|
2337
|
+
mode="manual"
|
|
2338
|
+
[dragDisabled]="!rowReorderable"
|
|
2339
|
+
[dropDisabled]="!rowReorderable"
|
|
2340
|
+
[dragTargetFilter]="getDefaultSelectors('dragTarget')"
|
|
2341
|
+
[dropTargetFilter]="getDefaultSelectors('dropTarget')"
|
|
2342
|
+
[dragHandle]="getDefaultSelectors('handle')"
|
|
2343
|
+
[hint]="{hintTemplate: defaultHint}"
|
|
2344
|
+
(onPress)="handleReorderEvents($event, 'press')"
|
|
2345
|
+
(onDragStart)="handleReorderEvents($event, 'dragStart')"
|
|
2346
|
+
(onDrag)="handleReorderEvents($event, 'drag')"
|
|
2347
|
+
(onDragEnter)="handleReorderEvents($event, 'dragEnter')"
|
|
2348
|
+
(onDragLeave)="handleReorderEvents($event, 'dragLeave')"
|
|
2349
|
+
(onDragEnd)="handleReorderEvents($event, 'dragEnd')"
|
|
2350
|
+
(onDrop)="handleReorderEvents($event, 'drop')"
|
|
2351
|
+
[dragData]="treeListData">
|
|
2497
2352
|
<ng-template [ngIf]="isScrollable">
|
|
2498
2353
|
<div *ngIf="!hideHeader"
|
|
2499
2354
|
class="k-grid-header"
|
|
@@ -2580,14 +2435,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2580
2435
|
[virtualColumns]="virtualColumns"
|
|
2581
2436
|
[expandIcons]="expandIcons"
|
|
2582
2437
|
(scrollBottom)="notifyScrollBottom()"
|
|
2583
|
-
(contentScroll)="contentScroll.emit($event)"
|
|
2438
|
+
(contentScroll)="contentScroll.emit($event)"
|
|
2584
2439
|
kendoDraggable
|
|
2585
2440
|
kendoTreeListSelectionMarquee
|
|
2586
2441
|
[enableDrag]="marqueeSelection">
|
|
2587
2442
|
</kendo-treelist-list>
|
|
2588
2443
|
</ng-template>
|
|
2589
2444
|
<ng-template [ngIf]="!isScrollable">
|
|
2590
|
-
<table
|
|
2445
|
+
<table
|
|
2591
2446
|
class="k-table k-table-md k-grid-header-table"
|
|
2592
2447
|
[style.table-layout]="resizable ? 'fixed' : null">
|
|
2593
2448
|
<colgroup kendoTreeListColGroup
|
|
@@ -2645,9 +2500,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2645
2500
|
[attr.aria-label]="messageFor('bottomToolbarLabel')"
|
|
2646
2501
|
[attr.aria-controls]="ariaRootId">
|
|
2647
2502
|
</kendo-treelist-toolbar>
|
|
2503
|
+
|
|
2504
|
+
<ng-template #defaultHint>
|
|
2505
|
+
<kendo-icon-wrapper
|
|
2506
|
+
[name]="getHintSettings('hintIcon')"
|
|
2507
|
+
[svgIcon]="getHintSettings('hintSVGIcon')"
|
|
2508
|
+
innerCssClass="k-drag-status">
|
|
2509
|
+
</kendo-icon-wrapper>
|
|
2510
|
+
{{hintText}}
|
|
2511
|
+
</ng-template>
|
|
2648
2512
|
`
|
|
2649
2513
|
}]
|
|
2650
|
-
}], ctorParameters: function () { return [{ type: i1.BrowserSupportService }, { type: i0.ElementRef }, { type: i2.ChangeNotificationService }, { type: i3.EditService }, { type: i4.FilterService }, { type: i5.PDFService }, { type: i6.ResponsiveService }, { type: i0.Renderer2 }, { type: i7.ExcelService }, { type: i0.NgZone }, { type: i8.ScrollSyncService }, { type: i9.DomEventsService }, { type: i10.ColumnResizingService }, { type: i0.ChangeDetectorRef }, { type: i11.ColumnReorderService }, { type: i12.ColumnInfoService }, { type: i13.NavigationService }, { type: i14.SortService }, { type: i15.ScrollRequestService }, { type: i16.ExpandStateService }, { type: i17.OptionChangesService }, { type: i18.SelectionService }, { type: i19.LocalizationService }, { type: i20.ContextService }]; }, propDecorators: { ariaLabel: [{
|
|
2514
|
+
}], ctorParameters: function () { return [{ type: i1.BrowserSupportService }, { type: i0.ElementRef }, { type: i2.ChangeNotificationService }, { type: i3.EditService }, { type: i4.FilterService }, { type: i5.PDFService }, { type: i6.ResponsiveService }, { type: i0.Renderer2 }, { type: i7.ExcelService }, { type: i0.NgZone }, { type: i8.ScrollSyncService }, { type: i9.DomEventsService }, { type: i10.ColumnResizingService }, { type: i0.ChangeDetectorRef }, { type: i11.ColumnReorderService }, { type: i12.ColumnInfoService }, { type: i13.NavigationService }, { type: i14.SortService }, { type: i15.ScrollRequestService }, { type: i16.ExpandStateService }, { type: i17.OptionChangesService }, { type: i18.SelectionService }, { type: i19.LocalizationService }, { type: i20.ContextService }, { type: i21.RowReorderService }]; }, propDecorators: { ariaLabel: [{
|
|
2651
2515
|
type: Input,
|
|
2652
2516
|
args: ['aria-label']
|
|
2653
2517
|
}], data: [{
|
|
@@ -2700,6 +2564,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2700
2564
|
type: Input
|
|
2701
2565
|
}], isSelected: [{
|
|
2702
2566
|
type: Input
|
|
2567
|
+
}], rowReorderable: [{
|
|
2568
|
+
type: Input
|
|
2703
2569
|
}], selectionChange: [{
|
|
2704
2570
|
type: Output
|
|
2705
2571
|
}], filterChange: [{
|
|
@@ -2748,6 +2614,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2748
2614
|
args: ['collapse']
|
|
2749
2615
|
}], expandStateChange: [{
|
|
2750
2616
|
type: Output
|
|
2617
|
+
}], rowReorder: [{
|
|
2618
|
+
type: Output
|
|
2751
2619
|
}], columnsRef: [{
|
|
2752
2620
|
type: Input,
|
|
2753
2621
|
args: ['columns']
|
|
@@ -2799,6 +2667,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2799
2667
|
}], ariaRoot: [{
|
|
2800
2668
|
type: ViewChild,
|
|
2801
2669
|
args: ['ariaRoot', { static: true }]
|
|
2670
|
+
}], dragTargetContainer: [{
|
|
2671
|
+
type: ViewChild,
|
|
2672
|
+
args: [DragTargetContainerDirective]
|
|
2673
|
+
}], dropTargetContainer: [{
|
|
2674
|
+
type: ViewChild,
|
|
2675
|
+
args: [DropTargetContainerDirective]
|
|
2802
2676
|
}], fetchChildren: [{
|
|
2803
2677
|
type: Input
|
|
2804
2678
|
}], hasChildren: [{
|