@progress/kendo-angular-treelist 13.0.0-develop.7 → 13.0.0-develop.8
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/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-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/columns/checkbox-column.component.d.ts +1 -1
- 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/span-column.component.d.ts +10 -81
- 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-template.directive.d.ts +11 -0
- package/editing/remove-command.directive.d.ts +1 -1
- package/editing/save-command.directive.d.ts +1 -1
- 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 +8 -6
- 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 +1 -1
- package/esm2020/column-menu/column-menu.service.mjs +1 -1
- package/esm2020/columns/checkbox-column.component.mjs +1 -1
- 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/span-column.component.mjs +10 -81
- package/esm2020/editing/add-command.directive.mjs +1 -1
- package/esm2020/editing/cancel-command.directive.mjs +1 -1
- package/esm2020/editing/edit-command.directive.mjs +1 -1
- package/esm2020/editing/edit-template.directive.mjs +11 -0
- package/esm2020/editing/remove-command.directive.mjs +1 -1
- package/esm2020/editing/save-command.directive.mjs +1 -1
- package/esm2020/excel/excel-command.directive.mjs +1 -1
- 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/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/localization/custom-messages.component.mjs +1 -1
- package/esm2020/package-metadata.mjs +2 -2
- package/esm2020/pager/pager-numeric-buttons.component.mjs +1 -1
- package/esm2020/pager/pager-template.directive.mjs +1 -1
- package/esm2020/pdf/pdf-command.directive.mjs +1 -1
- package/esm2020/pdf/pdf-margin.component.mjs +9 -0
- package/esm2020/rendering/cell-template.directive.mjs +1 -1
- package/esm2020/rendering/common/spacer.component.mjs +1 -1
- package/esm2020/treelist.component.mjs +24 -288
- package/excel/excel-command.directive.d.ts +1 -1
- package/excel/excel.component.d.ts +9 -8
- package/fesm2015/progress-kendo-angular-treelist.mjs +302 -667
- package/fesm2020/progress-kendo-angular-treelist.mjs +302 -667
- 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/localization/custom-messages.component.d.ts +1 -1
- package/localization/messages.d.ts +1 -1
- package/package.json +16 -16
- package/pager/pager-numeric-buttons.component.d.ts +1 -1
- 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/common/spacer.component.d.ts +1 -1
- package/schematics/ngAdd/index.js +3 -3
- package/treelist.component.d.ts +24 -287
|
@@ -5,6 +5,15 @@
|
|
|
5
5
|
import { Component } from '@angular/core';
|
|
6
6
|
import { PDFExportMarginComponent } from '@progress/kendo-angular-pdf-export';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* Represents the Kendo UI PDFMargin component for Angular.
|
|
10
|
+
* The supported units are:
|
|
11
|
+
* `"mm"`
|
|
12
|
+
* `"cm"`
|
|
13
|
+
* `"in"`
|
|
14
|
+
* `"pt"` (default).
|
|
15
|
+
* Numbers are considered to be points (`"pt"`).
|
|
16
|
+
*/
|
|
8
17
|
export class PDFMarginComponent extends PDFExportMarginComponent {
|
|
9
18
|
}
|
|
10
19
|
PDFMarginComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: PDFMarginComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -20,7 +20,7 @@ import * as i0 from "@angular/core";
|
|
|
20
20
|
* - `loading`—Specifies if the item children are currently loading.
|
|
21
21
|
* - `rowIndex`—The current row index. Use it as an alias for a template variable by utilizing the `let-rowIndex="rowIndex"` syntax.
|
|
22
22
|
*
|
|
23
|
-
*
|
|
23
|
+
* @example
|
|
24
24
|
* ```html
|
|
25
25
|
* <kendo-treelist ...>
|
|
26
26
|
* <kendo-treelist-column field="ProductName">
|
|
@@ -9,7 +9,7 @@ import * as i0 from "@angular/core";
|
|
|
9
9
|
* Represents the Kendo UI TreeListSpacer component for Angular.
|
|
10
10
|
* Used to give additional white space between the Pager inner elements,
|
|
11
11
|
* and provides a way for customizing the spacer width.
|
|
12
|
-
* It can also be used in any flex container within the TreeList.
|
|
12
|
+
* It can also be used in any flex container within the TreeList. [See example](slug:toolbartemplate_treelist#toc-define-spacing-between-the-toolbar-elements).
|
|
13
13
|
*/
|
|
14
14
|
export class TreeListSpacerComponent {
|
|
15
15
|
constructor() {
|
|
@@ -122,12 +122,11 @@ const isInEditedCell = (element, treelistElement) => closest(element, matchesCla
|
|
|
122
122
|
/**
|
|
123
123
|
* Represents the Kendo UI TreeList component for Angular.
|
|
124
124
|
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
* {% endmeta %}
|
|
125
|
+
* @example
|
|
126
|
+
* ```html
|
|
127
|
+
* <kendo-treelist [kendoTreeListFlatBinding]="data" ...></kendo-treelist>
|
|
128
|
+
* ```
|
|
129
|
+
*
|
|
131
130
|
*/
|
|
132
131
|
export class TreeListComponent {
|
|
133
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) {
|
|
@@ -164,10 +163,7 @@ export class TreeListComponent {
|
|
|
164
163
|
this.pageSize = 10;
|
|
165
164
|
/**
|
|
166
165
|
* Defines the scroll mode used by the TreeList.
|
|
167
|
-
*
|
|
168
|
-
* The available options are:
|
|
169
|
-
* - `none`—Renders no scrollbar.
|
|
170
|
-
* - `scrollable`—The default scroll mode. It requires the setting of the `height` option.
|
|
166
|
+
* @default 'scrollable'
|
|
171
167
|
*/
|
|
172
168
|
this.scrollable = 'scrollable';
|
|
173
169
|
/**
|
|
@@ -175,49 +171,12 @@ export class TreeListComponent {
|
|
|
175
171
|
*
|
|
176
172
|
* By default, the TreeList tracks changes by the index of the data item.
|
|
177
173
|
* Edited rows are tracked by reference.
|
|
178
|
-
* In some cases, you might need to override the default behavior,
|
|
179
|
-
* for example, when you implement editing with immutable data items.
|
|
180
|
-
*
|
|
181
|
-
* The following example demonstrates how to track items only by index.
|
|
182
|
-
*
|
|
183
|
-
* @example
|
|
184
|
-
* ```ts
|
|
185
|
-
* import { Component } from '@angular/core';
|
|
186
|
-
* import { TreeListItem } from '@progress/kendo-angular-treelist';
|
|
187
174
|
*
|
|
188
|
-
* _@Component({
|
|
189
|
-
* selector: 'my-app',
|
|
190
|
-
* template: `
|
|
191
|
-
* <kendo-treelist [data]="treelistData" [trackBy]="trackBy">
|
|
192
|
-
* </kendo-treelist>
|
|
193
|
-
* `
|
|
194
|
-
* })
|
|
195
|
-
* class AppComponent {
|
|
196
|
-
* public treelistData: any[] = products;
|
|
197
|
-
*
|
|
198
|
-
* public trackBy(index: number, item: TreeListItem): any {
|
|
199
|
-
* console.log(item);
|
|
200
|
-
* return index;
|
|
201
|
-
* }
|
|
202
|
-
* }
|
|
203
|
-
*
|
|
204
|
-
* const products = [{
|
|
205
|
-
* "ProductID": 1,
|
|
206
|
-
* "ProductName": "Chai",
|
|
207
|
-
* "UnitPrice": 18.0000,
|
|
208
|
-
* "Discontinued": true
|
|
209
|
-
* }, {
|
|
210
|
-
* "ProductID": 2,
|
|
211
|
-
* "ProductName": "Chang",
|
|
212
|
-
* "UnitPrice": 19.0000,
|
|
213
|
-
* "Discontinued": false
|
|
214
|
-
* }
|
|
215
|
-
* ];
|
|
216
|
-
* ```
|
|
217
175
|
*/
|
|
218
176
|
this.trackBy = defaultTrackBy;
|
|
219
177
|
/**
|
|
220
178
|
* If set to `true`, the treelist will render only the columns in the current viewport.
|
|
179
|
+
* @default false
|
|
221
180
|
*/
|
|
222
181
|
this.virtualColumns = false;
|
|
223
182
|
/**
|
|
@@ -231,18 +190,12 @@ export class TreeListComponent {
|
|
|
231
190
|
/**
|
|
232
191
|
* Configures the pager of the TreeList ([see example]({% slug paging_treelist %})).
|
|
233
192
|
*
|
|
234
|
-
* The available options are:
|
|
235
|
-
* - `buttonCount: Number`—Sets the maximum numeric buttons count before the buttons are collapsed. Defaults to `10`.
|
|
236
|
-
* - `info: Boolean`—Toggles the information about the current page and the total number of records. Defaults to `true`.
|
|
237
|
-
* - `type: PagerType`—Accepts the `numeric` (buttons with numbers) and `input` (input for typing the page number) values. Defaults to `'numeric'`.
|
|
238
|
-
* - `pageSizes: Boolean` or `Array<number>`—Shows a menu for selecting the page size. Defaults to `false`.
|
|
239
|
-
* - `previousNext: Boolean`—Toggles the **Previous** and **Next** buttons. Defaults to `true`.
|
|
240
|
-
* - `responsive: Boolean`—Toggles the built-in responsive behavior of the Pager. Defaults to `true`.
|
|
241
193
|
*/
|
|
242
194
|
this.pageable = false;
|
|
243
195
|
/**
|
|
244
196
|
* If set to `true`, the user can use dedicated shortcuts to interact with the TreeList.
|
|
245
197
|
* By default, navigation is disabled and the TreeList content is accessible in the normal tab sequence.
|
|
198
|
+
* @default false
|
|
246
199
|
*/
|
|
247
200
|
this.navigable = false;
|
|
248
201
|
/**
|
|
@@ -251,6 +204,8 @@ export class TreeListComponent {
|
|
|
251
204
|
* Columns with `autoSize` set to `false` are excluded.
|
|
252
205
|
* To dynamically update the column width to match the new content,
|
|
253
206
|
* refer to [this example]({% slug resizing_columns_treelist %}).
|
|
207
|
+
*
|
|
208
|
+
* @default false
|
|
254
209
|
*/
|
|
255
210
|
this.autoSize = false;
|
|
256
211
|
/**
|
|
@@ -282,7 +237,9 @@ export class TreeListComponent {
|
|
|
282
237
|
/**
|
|
283
238
|
* Specifies if the header of the treelist will be hidden. The header is visible by default.
|
|
284
239
|
*
|
|
285
|
-
*
|
|
240
|
+
* The header includes column headers and the [filter row]({% slug filtering_treelist %}#toc-filter-row).
|
|
241
|
+
*
|
|
242
|
+
* @default false
|
|
286
243
|
*/
|
|
287
244
|
this.hideHeader = false;
|
|
288
245
|
/**
|
|
@@ -602,48 +559,6 @@ export class TreeListComponent {
|
|
|
602
559
|
/**
|
|
603
560
|
* Defines a function that is executed for every data row in the component.
|
|
604
561
|
*
|
|
605
|
-
* @example
|
|
606
|
-
* ```ts
|
|
607
|
-
* import { Component, ViewEncapsulation } from '@angular/core';
|
|
608
|
-
* import { RowClassArgs } from '@progress/kendo-angular-treelist';
|
|
609
|
-
*
|
|
610
|
-
* _@Component({
|
|
611
|
-
* selector: 'my-app',
|
|
612
|
-
* encapsulation: ViewEncapsulation.None,
|
|
613
|
-
* styles: [`
|
|
614
|
-
* .k-treelist tr.even { background-color: #f45c42; }
|
|
615
|
-
* .k-treelist tr.odd { background-color: #41f4df; }
|
|
616
|
-
* `],
|
|
617
|
-
* template: `
|
|
618
|
-
* <kendo-treelist [data]="treelistData" [rowClass]="rowCallback">
|
|
619
|
-
* </kendo-treelist>
|
|
620
|
-
* `
|
|
621
|
-
* })
|
|
622
|
-
* class AppComponent {
|
|
623
|
-
* public treelistData: any[] = products;
|
|
624
|
-
*
|
|
625
|
-
* public rowCallback(context: RowClassArgs) {
|
|
626
|
-
* const isEven = context.index % 2 === 0;
|
|
627
|
-
* return {
|
|
628
|
-
* even: isEven,
|
|
629
|
-
* odd: !isEven
|
|
630
|
-
* };
|
|
631
|
-
* }
|
|
632
|
-
* }
|
|
633
|
-
*
|
|
634
|
-
* const products = [{
|
|
635
|
-
* "ProductID": 1,
|
|
636
|
-
* "ProductName": "Chai",
|
|
637
|
-
* "UnitPrice": 18.0000,
|
|
638
|
-
* "Discontinued": true
|
|
639
|
-
* }, {
|
|
640
|
-
* "ProductID": 2,
|
|
641
|
-
* "ProductName": "Chang",
|
|
642
|
-
* "UnitPrice": 19.0000,
|
|
643
|
-
* "Discontinued": false
|
|
644
|
-
* }
|
|
645
|
-
* ];
|
|
646
|
-
* ```
|
|
647
562
|
*/
|
|
648
563
|
set rowClass(fn) {
|
|
649
564
|
if (typeof fn !== 'function') {
|
|
@@ -687,7 +602,7 @@ export class TreeListComponent {
|
|
|
687
602
|
this.selectionService.settings = value;
|
|
688
603
|
}
|
|
689
604
|
/**
|
|
690
|
-
* Provides a callback that determines if the given row
|
|
605
|
+
* Provides a callback that determines if the given row or cell is selected.
|
|
691
606
|
*/
|
|
692
607
|
set isSelected(value) {
|
|
693
608
|
if (typeof value !== 'function' && isDevMode()) {
|
|
@@ -1141,7 +1056,7 @@ export class TreeListComponent {
|
|
|
1141
1056
|
* Exports the TreeList element to a Drawing [`Group`]({% slug api_kendo-drawing_group %}) by using the `kendo-treelist-pdf` component options.
|
|
1142
1057
|
* ([see example]({% slug pdfexport_treelist %}#toc-exporting-multiple-treelists-to-the-same-pdf)).
|
|
1143
1058
|
*
|
|
1144
|
-
* @return {Promise}
|
|
1059
|
+
* @return {Promise} A promise that will be resolved with the Drawing `Group`.
|
|
1145
1060
|
*/
|
|
1146
1061
|
drawPDF() {
|
|
1147
1062
|
const promise = createPromise();
|
|
@@ -1159,64 +1074,8 @@ export class TreeListComponent {
|
|
|
1159
1074
|
* so that the whole text fits without wrapping. This method expects the TreeList
|
|
1160
1075
|
* to be resizable (set `resizable` to `true`).
|
|
1161
1076
|
* Makes sense to execute this method only
|
|
1162
|
-
* after the TreeList is already populated with data.
|
|
1163
|
-
*
|
|
1164
|
-
* @example
|
|
1165
|
-
* ```ts
|
|
1166
|
-
* _@Component({
|
|
1167
|
-
* selector: 'my-app',
|
|
1168
|
-
* template: `
|
|
1169
|
-
* <kendo-treelist
|
|
1170
|
-
* #treelist
|
|
1171
|
-
* [data]="treelistData"
|
|
1172
|
-
* [resizable]="true"
|
|
1173
|
-
* style="height: 300px">
|
|
1174
|
-
* <ng-template kendoTreeListToolbarTemplate>
|
|
1175
|
-
* <button kendoButton (click)="treelist.autoFitColumn(groupColumn)">
|
|
1176
|
-
* Auto-fit the group column
|
|
1177
|
-
* </button>
|
|
1178
|
-
* </ng-template>
|
|
1179
|
-
* <kendo-treelist-column-group #groupColumn title="Product Info">
|
|
1180
|
-
* <kendo-treelist-column
|
|
1181
|
-
* field="ProductID"
|
|
1182
|
-
* [width]="50"
|
|
1183
|
-
* [minResizableWidth]="30"
|
|
1184
|
-
* title="ID">
|
|
1185
|
-
* </kendo-treelist-column>
|
|
1186
|
-
*
|
|
1187
|
-
* <kendo-treelist-column
|
|
1188
|
-
* field="ProductName"
|
|
1189
|
-
* title="Product Name">
|
|
1190
|
-
* </kendo-treelist-column>
|
|
1191
|
-
* </kendo-treelist-column-group>
|
|
1077
|
+
* after the TreeList is already populated with data. [See example](slug:resizing_columns_treelist#toc-auto-fitting-the-content).
|
|
1192
1078
|
*
|
|
1193
|
-
* <kendo-treelist-column
|
|
1194
|
-
* field="UnitPrice"
|
|
1195
|
-
* title="Unit Price"
|
|
1196
|
-
* [width]="180"
|
|
1197
|
-
* filter="numeric"
|
|
1198
|
-
* format="{0:c}">
|
|
1199
|
-
* </kendo-treelist-column>
|
|
1200
|
-
* </kendo-treelist>
|
|
1201
|
-
* `
|
|
1202
|
-
* })
|
|
1203
|
-
* class AppComponent {
|
|
1204
|
-
* public treelistData: any[] = products;
|
|
1205
|
-
* }
|
|
1206
|
-
*
|
|
1207
|
-
* const products = [{
|
|
1208
|
-
* "ProductID": 1,
|
|
1209
|
-
* "ProductName": "Chai",
|
|
1210
|
-
* "UnitPrice": 18.0000,
|
|
1211
|
-
* "Discontinued": true
|
|
1212
|
-
* }, {
|
|
1213
|
-
* "ProductID": 2,
|
|
1214
|
-
* "ProductName": "Chang",
|
|
1215
|
-
* "UnitPrice": 19.0000,
|
|
1216
|
-
* "Discontinued": false
|
|
1217
|
-
* }
|
|
1218
|
-
* ];
|
|
1219
|
-
* ```
|
|
1220
1079
|
*/
|
|
1221
1080
|
autoFitColumn(column) {
|
|
1222
1081
|
this.columnResizingService.autoFit(column);
|
|
@@ -1226,69 +1085,7 @@ export class TreeListComponent {
|
|
|
1226
1085
|
* If no columns are specified, `autoFitColumns` is applied to all columns.
|
|
1227
1086
|
*
|
|
1228
1087
|
* This method requires the TreeList to be resizable (set `resizable` to `true`).
|
|
1229
|
-
*
|
|
1230
|
-
* @example
|
|
1231
|
-
* ```ts
|
|
1232
|
-
* _@Component({
|
|
1233
|
-
* selector: 'my-app',
|
|
1234
|
-
* template: `
|
|
1235
|
-
* <kendo-treelist
|
|
1236
|
-
* #treelist
|
|
1237
|
-
* [data]="treelistData"
|
|
1238
|
-
* [resizable]="true"
|
|
1239
|
-
* style="height: 300px">
|
|
1240
|
-
* <ng-template kendoTreeListToolbarTemplate>
|
|
1241
|
-
* <button kendoButton (click)="treelist.autoFitColumns([firstColumn, lastColumn])">
|
|
1242
|
-
* Auto-fit the first and last column
|
|
1243
|
-
* </button>
|
|
1244
|
-
* <button kendoButton (click)="treelist.autoFitColumns()">
|
|
1245
|
-
* Auto-fit all columns
|
|
1246
|
-
* </button>
|
|
1247
|
-
* </ng-template>
|
|
1248
|
-
* <kendo-treelist-column-group title="Product Info">
|
|
1249
|
-
* <kendo-treelist-column
|
|
1250
|
-
* #firstColumn
|
|
1251
|
-
* field="ProductID"
|
|
1252
|
-
* [width]="50"
|
|
1253
|
-
* [minResizableWidth]="30"
|
|
1254
|
-
* title="ID">
|
|
1255
|
-
* </kendo-treelist-column>
|
|
1256
|
-
*
|
|
1257
|
-
* <kendo-treelist-column
|
|
1258
|
-
* field="ProductName"
|
|
1259
|
-
* title="Product Name"
|
|
1260
|
-
* >
|
|
1261
|
-
* </kendo-treelist-column>
|
|
1262
|
-
* </kendo-treelist-column-group>
|
|
1263
|
-
*
|
|
1264
|
-
* <kendo-treelist-column
|
|
1265
|
-
* #lastColumn
|
|
1266
|
-
* field="UnitPrice"
|
|
1267
|
-
* title="Unit Price"
|
|
1268
|
-
* [width]="180"
|
|
1269
|
-
* filter="numeric"
|
|
1270
|
-
* format="{0:c}">
|
|
1271
|
-
* </kendo-treelist-column>
|
|
1272
|
-
* </kendo-treelist>
|
|
1273
|
-
* `
|
|
1274
|
-
* })
|
|
1275
|
-
* class AppComponent {
|
|
1276
|
-
* public treelistData: any[] = products;
|
|
1277
|
-
* }
|
|
1278
|
-
*
|
|
1279
|
-
* const products = [{
|
|
1280
|
-
* "ProductID": 1,
|
|
1281
|
-
* "ProductName": "Chai",
|
|
1282
|
-
* "UnitPrice": 18.0000,
|
|
1283
|
-
* "Discontinued": true
|
|
1284
|
-
* }, {
|
|
1285
|
-
* "ProductID": 2,
|
|
1286
|
-
* "ProductName": "Chang",
|
|
1287
|
-
* "UnitPrice": 19.0000,
|
|
1288
|
-
* "Discontinued": false
|
|
1289
|
-
* }
|
|
1290
|
-
* ];
|
|
1291
|
-
* ```
|
|
1088
|
+
* [See example](slug:resizing_columns_treelist#toc-auto-fitting-the-content).
|
|
1292
1089
|
*/
|
|
1293
1090
|
autoFitColumns(columns = this.columns) {
|
|
1294
1091
|
let cols;
|
|
@@ -1361,9 +1158,9 @@ export class TreeListComponent {
|
|
|
1361
1158
|
/**
|
|
1362
1159
|
* Focuses the cell with the specified row and column index.
|
|
1363
1160
|
*
|
|
1364
|
-
* The row index is based on the logical structure of the TreeList and does not correspond to the data item index
|
|
1365
|
-
*
|
|
1366
|
-
*
|
|
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.
|
|
1367
1164
|
*
|
|
1368
1165
|
* If the TreeList is configured for scrolling, including virtual scrolling, the scroll position will be updated.
|
|
1369
1166
|
* If the row is not present on the current page, the method will have no effect.
|
|
@@ -1414,67 +1211,6 @@ export class TreeListComponent {
|
|
|
1414
1211
|
* @param {number} destIndex - The new position of the column.
|
|
1415
1212
|
* @param {ColumnReorderConfig} options - Additional options.
|
|
1416
1213
|
*
|
|
1417
|
-
* @example
|
|
1418
|
-
* ```ts
|
|
1419
|
-
* _@Component({
|
|
1420
|
-
* selector: 'my-app',
|
|
1421
|
-
* template: `
|
|
1422
|
-
* <kendo-treelist
|
|
1423
|
-
* #treelist
|
|
1424
|
-
* [data]="treelistData"
|
|
1425
|
-
* [reorderable]="true"
|
|
1426
|
-
* style="height: 300px">
|
|
1427
|
-
* <ng-template kendoTreeListToolbarTemplate>
|
|
1428
|
-
* <button kendoButton
|
|
1429
|
-
* (click)="treelist.reorderColumn(groupColumn, 2, { before: true })">
|
|
1430
|
-
* Move the group column before the last one.
|
|
1431
|
-
* </button>
|
|
1432
|
-
* </ng-template>
|
|
1433
|
-
* <kendo-treelist-column-group #groupColumn title="Product Info">
|
|
1434
|
-
* <kendo-treelist-column
|
|
1435
|
-
* field="ProductID"
|
|
1436
|
-
* [width]="50"
|
|
1437
|
-
* title="ID">
|
|
1438
|
-
* </kendo-treelist-column>
|
|
1439
|
-
*
|
|
1440
|
-
* <kendo-treelist-column
|
|
1441
|
-
* field="ProductName"
|
|
1442
|
-
* title="Product Name">
|
|
1443
|
-
* </kendo-treelist-column>
|
|
1444
|
-
* </kendo-treelist-column-group>
|
|
1445
|
-
*
|
|
1446
|
-
* <kendo-treelist-column
|
|
1447
|
-
* field="UnitPrice"
|
|
1448
|
-
* title="Unit Price"
|
|
1449
|
-
* [width]="180"
|
|
1450
|
-
* format="{0:c}">
|
|
1451
|
-
* </kendo-treelist-column>
|
|
1452
|
-
*
|
|
1453
|
-
* <kendo-treelist-column
|
|
1454
|
-
* field="Discontinued"
|
|
1455
|
-
* title="Discontinued"
|
|
1456
|
-
* [width]="100">
|
|
1457
|
-
* </kendo-treelist-column>
|
|
1458
|
-
* </kendo-treelist>
|
|
1459
|
-
* `
|
|
1460
|
-
* })
|
|
1461
|
-
* class AppComponent {
|
|
1462
|
-
* public treelistData: any[] = products;
|
|
1463
|
-
* }
|
|
1464
|
-
*
|
|
1465
|
-
* const products = [{
|
|
1466
|
-
* "ProductID": 1,
|
|
1467
|
-
* "ProductName": "Chai",
|
|
1468
|
-
* "UnitPrice": 18.0000,
|
|
1469
|
-
* "Discontinued": true
|
|
1470
|
-
* }, {
|
|
1471
|
-
* "ProductID": 2,
|
|
1472
|
-
* "ProductName": "Chang",
|
|
1473
|
-
* "UnitPrice": 19.0000,
|
|
1474
|
-
* "Discontinued": false
|
|
1475
|
-
* }
|
|
1476
|
-
* ];
|
|
1477
|
-
* ```
|
|
1478
1214
|
*/
|
|
1479
1215
|
reorderColumn(source, destIndex, options = { before: false }) {
|
|
1480
1216
|
const columnsForLevel = sortColumns(this.allColumnsForLevel(source.level));
|
|
@@ -2289,14 +2025,14 @@ TreeListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", vers
|
|
|
2289
2025
|
[virtualColumns]="virtualColumns"
|
|
2290
2026
|
[expandIcons]="expandIcons"
|
|
2291
2027
|
(scrollBottom)="notifyScrollBottom()"
|
|
2292
|
-
(contentScroll)="contentScroll.emit($event)"
|
|
2028
|
+
(contentScroll)="contentScroll.emit($event)"
|
|
2293
2029
|
kendoDraggable
|
|
2294
2030
|
kendoTreeListSelectionMarquee
|
|
2295
2031
|
[enableDrag]="marqueeSelection">
|
|
2296
2032
|
</kendo-treelist-list>
|
|
2297
2033
|
</ng-template>
|
|
2298
2034
|
<ng-template [ngIf]="!isScrollable">
|
|
2299
|
-
<table
|
|
2035
|
+
<table
|
|
2300
2036
|
class="k-table k-table-md k-grid-header-table"
|
|
2301
2037
|
[style.table-layout]="resizable ? 'fixed' : null">
|
|
2302
2038
|
<colgroup kendoTreeListColGroup
|
|
@@ -2699,14 +2435,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
|
|
|
2699
2435
|
[virtualColumns]="virtualColumns"
|
|
2700
2436
|
[expandIcons]="expandIcons"
|
|
2701
2437
|
(scrollBottom)="notifyScrollBottom()"
|
|
2702
|
-
(contentScroll)="contentScroll.emit($event)"
|
|
2438
|
+
(contentScroll)="contentScroll.emit($event)"
|
|
2703
2439
|
kendoDraggable
|
|
2704
2440
|
kendoTreeListSelectionMarquee
|
|
2705
2441
|
[enableDrag]="marqueeSelection">
|
|
2706
2442
|
</kendo-treelist-list>
|
|
2707
2443
|
</ng-template>
|
|
2708
2444
|
<ng-template [ngIf]="!isScrollable">
|
|
2709
|
-
<table
|
|
2445
|
+
<table
|
|
2710
2446
|
class="k-table k-table-md k-grid-header-table"
|
|
2711
2447
|
[style.table-layout]="resizable ? 'fixed' : null">
|
|
2712
2448
|
<colgroup kendoTreeListColGroup
|
|
@@ -39,15 +39,17 @@ export declare class ExcelComponent implements OnDestroy {
|
|
|
39
39
|
forceProxy: boolean;
|
|
40
40
|
/**
|
|
41
41
|
* The URL of the server-side proxy which streams the file to the end user.
|
|
42
|
-
*
|
|
43
|
-
* Internet Explorer 9 and Safari. The responsibility for implementing the server-side proxy is yours.
|
|
42
|
+
* Using a proxy is required if the browser is not capable of saving files locally.
|
|
44
43
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* - `fileName`—The file name, as requested by the caller.
|
|
44
|
+
* Optionally, set up a proxy to reduce memory usage. This avoids copying the file contents into memory,
|
|
45
|
+
* but transmits it over the network instead. For this use case, set [forceProxy](#toc-forceproxy) to `true`
|
|
46
|
+
* to skip client-side saving even in browsers that support it.
|
|
49
47
|
*
|
|
48
|
+
* In the request body, the proxy receives a POST request with the specific parameters. [See example](slug:server_proxy#toc-implementations).
|
|
50
49
|
* The proxy returns the decoded file with the `"Content-Disposition"` header set to `attachment; filename="<fileName.xslx>"`.
|
|
50
|
+
*
|
|
51
|
+
* For details on the server-side proxy usage and implementation, see the [File Saver]({% slug overview_filesaver %}) documentation.
|
|
52
|
+
*
|
|
51
53
|
*/
|
|
52
54
|
proxyURL: string;
|
|
53
55
|
/**
|
|
@@ -56,8 +58,7 @@ export declare class ExcelComponent implements OnDestroy {
|
|
|
56
58
|
*/
|
|
57
59
|
fetchData: (component: TreeListComponent) => ExcelExportData;
|
|
58
60
|
/**
|
|
59
|
-
* Specifies if the item levels in the Excel file are collapsible.
|
|
60
|
-
* > Applicable only if the treelist has footers.
|
|
61
|
+
* Specifies if the item levels in the Excel file are collapsible. Applicable only if the treelist has footers.
|
|
61
62
|
*/
|
|
62
63
|
collapsible: boolean;
|
|
63
64
|
/**
|