@syncfusion/ej2-treegrid 21.2.6 → 21.2.9
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/CHANGELOG.md +22 -0
- package/dist/ej2-treegrid.min.js +2 -2
- package/dist/ej2-treegrid.umd.min.js +2 -2
- package/dist/ej2-treegrid.umd.min.js.map +1 -1
- package/dist/es6/ej2-treegrid.es2015.js +170 -100
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +232 -139
- package/dist/es6/ej2-treegrid.es5.js.map +1 -1
- package/dist/global/ej2-treegrid.min.js +2 -2
- package/dist/global/ej2-treegrid.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +8 -8
- package/src/treegrid/actions/edit.js +7 -2
- package/src/treegrid/actions/rowdragdrop.js +4 -5
- package/src/treegrid/actions/virtual-scroll.js +7 -4
- package/src/treegrid/base/data.js +17 -1
- package/src/treegrid/base/treegrid-model.d.ts +3 -0
- package/src/treegrid/base/treegrid.d.ts +3 -0
- package/src/treegrid/base/treegrid.js +20 -3
- package/src/treegrid/enum.d.ts +2 -0
- package/src/treegrid/models/column-model.d.ts +30 -0
- package/src/treegrid/models/column.d.ts +32 -0
- package/src/treegrid/models/column.js +45 -1
- package/src/treegrid/models/filter-settings-model.d.ts +1 -0
- package/src/treegrid/models/filter-settings.d.ts +1 -0
- package/src/treegrid/models/selection-settings-model.d.ts +2 -0
- package/src/treegrid/models/selection-settings.d.ts +2 -0
- package/src/treegrid/renderer/render.js +2 -1
- package/src/treegrid/renderer/virtual-tree-content-render.js +12 -2
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 21.2.
|
|
3
|
+
* version : 21.2.9
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-treegrid@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-treegrid@21.2.
|
|
3
|
+
"_id": "@syncfusion/ej2-treegrid@21.2.8",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512
|
|
5
|
+
"_integrity": "sha512-YiqZ/KpWwbgUoxWXdQt7oXZEaAcc+ZvW4Jf22/wOVt64lGs3Qg+LrJk0rC0Z+XT1t+L7GJjvzVrq9nd1Niwsew==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-treegrid",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"/@syncfusion/ej2-react-treegrid",
|
|
25
25
|
"/@syncfusion/ej2-vue-treegrid"
|
|
26
26
|
],
|
|
27
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-21.2.
|
|
28
|
-
"_shasum": "
|
|
27
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-21.2.8.tgz",
|
|
28
|
+
"_shasum": "33c37b706fce617fed0f97a2fcf9cde1814a8dcd",
|
|
29
29
|
"_spec": "@syncfusion/ej2-treegrid@*",
|
|
30
30
|
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
31
31
|
"author": {
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
},
|
|
37
37
|
"bundleDependencies": false,
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@syncfusion/ej2-base": "~21.2.
|
|
40
|
-
"@syncfusion/ej2-data": "~21.2.
|
|
41
|
-
"@syncfusion/ej2-grids": "~21.2.
|
|
39
|
+
"@syncfusion/ej2-base": "~21.2.9",
|
|
40
|
+
"@syncfusion/ej2-data": "~21.2.9",
|
|
41
|
+
"@syncfusion/ej2-grids": "~21.2.9",
|
|
42
42
|
"@syncfusion/ej2-popups": "~21.2.4"
|
|
43
43
|
},
|
|
44
44
|
"deprecated": false,
|
|
@@ -66,6 +66,6 @@
|
|
|
66
66
|
"url": "git+https://github.com/syncfusion/ej2-treegrid.git"
|
|
67
67
|
},
|
|
68
68
|
"typings": "index.d.ts",
|
|
69
|
-
"version": "21.2.
|
|
69
|
+
"version": "21.2.9",
|
|
70
70
|
"sideEffects": false
|
|
71
71
|
}
|
|
@@ -68,6 +68,9 @@ var Edit = /** @class */ (function () {
|
|
|
68
68
|
};
|
|
69
69
|
Edit.prototype.gridDblClick = function (e) {
|
|
70
70
|
this.doubleClickTarget = e.target;
|
|
71
|
+
if (e.target.classList.contains('e-frame') && this.parent.getCurrentViewRecords().length === 0) {
|
|
72
|
+
this.doubleClickTarget = null;
|
|
73
|
+
}
|
|
71
74
|
};
|
|
72
75
|
Edit.prototype.getRowPosition = function (addArgs) {
|
|
73
76
|
addArgs.newRowPosition = this.parent.editSettings.newRowPosition;
|
|
@@ -75,7 +78,9 @@ var Edit = /** @class */ (function () {
|
|
|
75
78
|
addArgs.dataRowIndex = +this.prevAriaRowIndex;
|
|
76
79
|
};
|
|
77
80
|
Edit.prototype.beforeStartEdit = function (args) {
|
|
78
|
-
this.parent.
|
|
81
|
+
if (this.parent.editSettings.mode === 'Cell') {
|
|
82
|
+
this.parent.trigger(events.actionBegin, args);
|
|
83
|
+
}
|
|
79
84
|
};
|
|
80
85
|
Edit.prototype.beforeBatchCancel = function (args) {
|
|
81
86
|
if (this.parent.editSettings.mode === 'Cell') {
|
|
@@ -644,7 +649,7 @@ var Edit = /** @class */ (function () {
|
|
|
644
649
|
index = index + batchChildCount;
|
|
645
650
|
}
|
|
646
651
|
}
|
|
647
|
-
else {
|
|
652
|
+
else if (!this.parent.enableVirtualization) {
|
|
648
653
|
index += findChildrenRecords(records[parseInt(index.toString(), 10)]).length;
|
|
649
654
|
}
|
|
650
655
|
}
|
|
@@ -996,14 +996,13 @@ var RowDD = /** @class */ (function () {
|
|
|
996
996
|
var childRecords = rec[0].childRecords;
|
|
997
997
|
var droppedRecordIndex = childRecords.indexOf(droppedRecord) + 1;
|
|
998
998
|
childRecords.splice(droppedRecordIndex, 0, draggedRecord_2);
|
|
999
|
-
|
|
1000
|
-
draggedRecord_2.parentItem = droppedRecord.parentItem;
|
|
1001
|
-
draggedRecord_2.level = droppedRecord.level;
|
|
1002
|
-
}
|
|
999
|
+
draggedRecord_2.parentItem = droppedRecord.parentItem;
|
|
1003
1000
|
draggedRecord_2.parentUniqueID = droppedRecord.parentUniqueID;
|
|
1001
|
+
draggedRecord_2.level = droppedRecord.level;
|
|
1004
1002
|
if (this_1.parent.parentIdMapping) {
|
|
1005
1003
|
draggedRecord_2[this_1.parent.parentIdMapping] = droppedRecord[this_1.parent.parentIdMapping];
|
|
1006
|
-
draggedRecord_2.
|
|
1004
|
+
draggedRecord_2.parentItem = droppedRecord.parentItem;
|
|
1005
|
+
draggedRecord_2.level = droppedRecord.level;
|
|
1007
1006
|
}
|
|
1008
1007
|
}
|
|
1009
1008
|
if (draggedRecord_2.hasChildRecords) {
|
|
@@ -18,7 +18,7 @@ import * as events from '../base/constant';
|
|
|
18
18
|
import { DataManager, Predicate, Query } from '@syncfusion/ej2-data';
|
|
19
19
|
import { getExpandStatus } from '../utils';
|
|
20
20
|
import { VirtualTreeContentRenderer } from '../renderer/virtual-tree-content-render';
|
|
21
|
-
import { VirtualHeaderRenderer } from '@syncfusion/ej2-grids';
|
|
21
|
+
import { VirtualHeaderRenderer, getTransformValues } from '@syncfusion/ej2-grids';
|
|
22
22
|
/**
|
|
23
23
|
* TreeGrid Virtual Scroll module will handle Virtualization
|
|
24
24
|
*
|
|
@@ -124,14 +124,17 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
124
124
|
this.parent.grid.getContent().firstElementChild.scrollTop = 0;
|
|
125
125
|
this.parent.grid.notify(events.virtualActionArgs, { setTop: true });
|
|
126
126
|
}
|
|
127
|
-
if (requestType === 'save'
|
|
127
|
+
if (requestType === 'save') {
|
|
128
|
+
startIndex = counts.startIndex + (counts.count - counts.endIndex);
|
|
128
129
|
endIndex = counts.count;
|
|
129
130
|
}
|
|
130
131
|
//if ((this.prevendIndex !== -1 && this.prevstartIndex !== -1) &&
|
|
131
132
|
//this.prevendIndex === endIndex && this.prevstartIndex === startIndex) {
|
|
133
|
+
var virtualWrapperElement = this.parent.grid.contentModule.virtualEle.wrapper;
|
|
134
|
+
var translateY = getTransformValues(virtualWrapperElement).height;
|
|
132
135
|
if (!isNullOrUndefined(this.expandCollapseRec) && (pageingDetails.actionArgs.requestType === 'virtualscroll' ||
|
|
133
136
|
(pageingDetails.actionArgs.requestType === 'refresh' && startIndex !== this.prevstartIndex)) &&
|
|
134
|
-
(startIndex < this.parent.getRows().length && endIndex <= startIndex + this.parent.getRows().length)) {
|
|
137
|
+
(startIndex < this.parent.getRows().length && endIndex <= startIndex + this.parent.getRows().length) && translateY === 0) {
|
|
135
138
|
startIndex = 0;
|
|
136
139
|
}
|
|
137
140
|
if (!isNullOrUndefined(this.expandCollapseRec)) {
|
|
@@ -211,7 +214,7 @@ var TreeVirtual = /** @class */ (function (_super) {
|
|
|
211
214
|
if (!isNullOrUndefined(parentGrid.height) && typeof (parentGrid.height) === 'string' && parentGrid.height.indexOf('%') !== -1) {
|
|
212
215
|
parentGrid.element.style.height = parentGrid.height;
|
|
213
216
|
}
|
|
214
|
-
var vHeight = parentGrid.height.toString().indexOf('%') < 0 ? parentGrid.height :
|
|
217
|
+
var vHeight = parentGrid.height.toString().indexOf('%') < 0 ? parseInt(parentGrid.height.toString(), 10) :
|
|
215
218
|
parentGrid.element.getBoundingClientRect().height;
|
|
216
219
|
var blockSize = ~~(vHeight / rowHeight);
|
|
217
220
|
var height = blockSize * 2;
|
|
@@ -396,7 +396,18 @@ var DataManipulation = /** @class */ (function () {
|
|
|
396
396
|
}
|
|
397
397
|
result = resultChildData;
|
|
398
398
|
}
|
|
399
|
-
|
|
399
|
+
if (_this.parent.enableVirtualization && rowDetails.action === 'remoteExpand') {
|
|
400
|
+
rowDetails.record.childRecords = [];
|
|
401
|
+
for (var i = 0; i < result.length; i++) {
|
|
402
|
+
if (rowDetails.record['' + _this.parent.idMapping] !== result[parseInt(i.toString(), 10)]['' + _this.parent.idMapping] &&
|
|
403
|
+
rowDetails.record['' + _this.parent.idMapping] === result[parseInt(i.toString(), 10)]['' + _this.parent.parentIdMapping] && Object.prototype.hasOwnProperty.call(result, i)) {
|
|
404
|
+
rowDetails.record.childRecords.push(result[parseInt(i.toString(), 10)]);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
else {
|
|
409
|
+
rowDetails.record.childRecords = result;
|
|
410
|
+
}
|
|
400
411
|
for (var r = 0; r < result.length; r++) {
|
|
401
412
|
if (_this.parent.enableVirtualization && result[parseInt(r.toString(), 10)]["" + _this.parent.idMapping] === rowDetails.record["" + _this.parent.idMapping] && rowDetails.action === 'remoteExpand') {
|
|
402
413
|
_this.parent["" + remoteExpandedData].push(rowDetails.record);
|
|
@@ -414,6 +425,7 @@ var DataManipulation = /** @class */ (function () {
|
|
|
414
425
|
if (result[parseInt(r.toString(), 10)]["" + _this.parent.parentIdMapping] === _this.parent["" + remoteExpandedData][parseInt(i.toString(), 10)]["" + _this.parent.idMapping]) {
|
|
415
426
|
result[parseInt(r.toString(), 10)].level = _this.parent["" + remoteExpandedData][parseInt(i.toString(), 10)]["" + level] + 1;
|
|
416
427
|
var parentData = _this.parent["" + remoteExpandedData][parseInt(i.toString(), 10)];
|
|
428
|
+
delete parentData.childRecords;
|
|
417
429
|
result[parseInt(r.toString(), 10)].parentItem = parentData;
|
|
418
430
|
result[parseInt(r.toString(), 10)].parentUniqueID = rowDetails.record.uniqueID;
|
|
419
431
|
}
|
|
@@ -425,6 +437,10 @@ var DataManipulation = /** @class */ (function () {
|
|
|
425
437
|
&& !(haveChild && !haveChild[parseInt(r.toString(), 10)])) {
|
|
426
438
|
if (isNullOrUndefined(result[parseInt(r.toString(), 10)]["" + _this.parent.parentIdMapping])) {
|
|
427
439
|
result[parseInt(r.toString(), 10)].level = 0;
|
|
440
|
+
if (rowDetails.action === 'remoteExpand') {
|
|
441
|
+
result[parseInt(r.toString(), 10)].childRecords = [];
|
|
442
|
+
result[parseInt(r.toString(), 10)].childRecords = rowDetails.record.childRecords;
|
|
443
|
+
}
|
|
428
444
|
}
|
|
429
445
|
else {
|
|
430
446
|
result[parseInt(r.toString(), 10)].level = rowDetails.record.level;
|
|
@@ -28,6 +28,7 @@ export interface TreeGridModel extends ComponentModel{
|
|
|
28
28
|
* * EllipsisWithTooltip :- Displays ellipsis when the cell content overflows its area,
|
|
29
29
|
* ```
|
|
30
30
|
* also it will display the tooltip while hover on ellipsis is applied.
|
|
31
|
+
*
|
|
31
32
|
* @default Syncfusion.EJ2.Grids.ClipMode.Ellipsis
|
|
32
33
|
* @aspType Syncfusion.EJ2.Grids.ClipMode
|
|
33
34
|
* @isEnumeration true
|
|
@@ -131,6 +132,7 @@ export interface TreeGridModel extends ComponentModel{
|
|
|
131
132
|
* * AllPages :- Prints all pages of the TreeGrid.
|
|
132
133
|
* * CurrentPage :- Prints the current page of the TreeGrid.
|
|
133
134
|
* ```
|
|
135
|
+
*
|
|
134
136
|
* @default Syncfusion.EJ2.Grids.PrintMode.AllPages
|
|
135
137
|
* @isEnumeration true
|
|
136
138
|
* @aspType Syncfusion.EJ2.Grids.PrintMode
|
|
@@ -329,6 +331,7 @@ export interface TreeGridModel extends ComponentModel{
|
|
|
329
331
|
* * Vertical :- Displays the vertical TreeGrid lines only.
|
|
330
332
|
* * Default :- Displays TreeGrid lines based on the theme.
|
|
331
333
|
* ```
|
|
334
|
+
*
|
|
332
335
|
* @default Syncfusion.EJ2.Grids.GridLine.Default
|
|
333
336
|
* @isEnumeration true
|
|
334
337
|
* @aspType Syncfusion.EJ2.Grids.GridLine
|
|
@@ -174,6 +174,7 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
|
|
|
174
174
|
* * EllipsisWithTooltip :- Displays ellipsis when the cell content overflows its area,
|
|
175
175
|
* ```
|
|
176
176
|
* also it will display the tooltip while hover on ellipsis is applied.
|
|
177
|
+
*
|
|
177
178
|
* @default Syncfusion.EJ2.Grids.ClipMode.Ellipsis
|
|
178
179
|
* @aspType Syncfusion.EJ2.Grids.ClipMode
|
|
179
180
|
* @isEnumeration true
|
|
@@ -291,6 +292,7 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
|
|
|
291
292
|
* * AllPages :- Prints all pages of the TreeGrid.
|
|
292
293
|
* * CurrentPage :- Prints the current page of the TreeGrid.
|
|
293
294
|
* ```
|
|
295
|
+
*
|
|
294
296
|
* @default Syncfusion.EJ2.Grids.PrintMode.AllPages
|
|
295
297
|
* @isEnumeration true
|
|
296
298
|
* @aspType Syncfusion.EJ2.Grids.PrintMode
|
|
@@ -465,6 +467,7 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
|
|
|
465
467
|
* * Vertical :- Displays the vertical TreeGrid lines only.
|
|
466
468
|
* * Default :- Displays TreeGrid lines based on the theme.
|
|
467
469
|
* ```
|
|
470
|
+
*
|
|
468
471
|
* @default Syncfusion.EJ2.Grids.GridLine.Default
|
|
469
472
|
* @isEnumeration true
|
|
470
473
|
* @aspType Syncfusion.EJ2.Grids.GridLine
|
|
@@ -2657,7 +2657,17 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2657
2657
|
record = this.grid.getCurrentViewRecords()[row.getAttribute('data-rowindex')];
|
|
2658
2658
|
}
|
|
2659
2659
|
else {
|
|
2660
|
-
|
|
2660
|
+
if (this.enableVirtualization && this.isCollapseAll) {
|
|
2661
|
+
if (this.isExpandAll && row.rowIndex === -1) {
|
|
2662
|
+
record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('data-rowindex'), 10)];
|
|
2663
|
+
}
|
|
2664
|
+
else {
|
|
2665
|
+
record = this.grid.getCurrentViewRecords()[row.rowIndex];
|
|
2666
|
+
}
|
|
2667
|
+
}
|
|
2668
|
+
else {
|
|
2669
|
+
record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('data-rowindex'), 10)];
|
|
2670
|
+
}
|
|
2661
2671
|
}
|
|
2662
2672
|
}
|
|
2663
2673
|
return record;
|
|
@@ -2887,10 +2897,17 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2887
2897
|
if (rows.length) {
|
|
2888
2898
|
for (var i = 0; i < rows.length; i++) {
|
|
2889
2899
|
if (action === 'collapse') {
|
|
2890
|
-
this.
|
|
2900
|
+
if (!isNullOrUndefined(this.getCurrentViewRecords()[rows[parseInt(i.toString(), 10)].rowIndex])) {
|
|
2901
|
+
this.collapseRow(rows[parseInt(i.toString(), 10)]);
|
|
2902
|
+
}
|
|
2891
2903
|
}
|
|
2892
2904
|
else {
|
|
2893
|
-
this.
|
|
2905
|
+
if (!this.enableVirtualization) {
|
|
2906
|
+
this.expandRow(rows[parseInt(i.toString(), 10)]);
|
|
2907
|
+
}
|
|
2908
|
+
else if (rows[0].getAttribute('aria-expanded') !== 'true') {
|
|
2909
|
+
this.expandRow(rows[0]);
|
|
2910
|
+
}
|
|
2894
2911
|
}
|
|
2895
2912
|
}
|
|
2896
2913
|
}
|
package/src/treegrid/enum.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export declare type FilterHierarchyMode = 'Parent' | 'Child' | 'Both' | 'None';
|
|
|
24
24
|
* * CsvExport :- Export the TreeGrid to Csv.
|
|
25
25
|
* * Print :- Print the TreeGrid.
|
|
26
26
|
* ```
|
|
27
|
+
*
|
|
27
28
|
* @hidden
|
|
28
29
|
*/
|
|
29
30
|
export declare type ToolbarItems = 'Add' | 'Delete' | 'Update' | 'Cancel' | 'Edit' | 'Search' | 'ExpandAll' | 'CollapseAll' | 'ExcelExport' | 'PdfExport' | 'CsvExport' | 'Print';
|
|
@@ -75,6 +76,7 @@ export declare type PageSizeMode = 'All' | 'Root';
|
|
|
75
76
|
* * LastPage :- Go to the last page.
|
|
76
77
|
* * NextPage :- Go to the next page.
|
|
77
78
|
* ```
|
|
79
|
+
*
|
|
78
80
|
* @hidden
|
|
79
81
|
*/
|
|
80
82
|
export declare type ContextMenuItem = 'AutoFitAll' | 'AutoFit' | 'SortAscending' | 'SortDescending' | 'Edit' | 'Delete' | 'Save' | 'Cancel' | 'PdfExport' | 'ExcelExport' | 'CsvExport' | 'FirstPage' | 'PrevPage' | 'LastPage' | 'NextPage' | 'AddRow' | 'Indent' | 'Outdent';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { TextAlign, ClipMode, ValueAccessor, IFilter, IFilterUI, IEditCell, CommandModel, freezeDirection } from '@syncfusion/ej2-grids';import { NumberFormatOptions, DateFormatOptions, merge, Property } from '@syncfusion/ej2-base';import { ITreeGridCellFormatter } from '../base/interface';import { SortComparer} from '@syncfusion/ej2-grids';import { TreeGrid } from '..';
|
|
2
|
+
import {ColumnModel} from "./column";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Interface for a class Column
|
|
6
|
+
*/
|
|
7
|
+
export interface ColumnModel {
|
|
8
|
+
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Interface for a class TreeGridColumn
|
|
13
|
+
*/
|
|
14
|
+
export interface TreeGridColumnModel extends ColumnModel{
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Defines stacked columns
|
|
18
|
+
*
|
|
19
|
+
* @default null
|
|
20
|
+
*/
|
|
21
|
+
columns?: string[] | ColumnModel[];
|
|
22
|
+
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Interface for a class StackedColumn
|
|
27
|
+
*/
|
|
28
|
+
export interface StackedColumnModel extends TreeGridColumnModel{
|
|
29
|
+
|
|
30
|
+
}
|
|
@@ -709,3 +709,35 @@ export interface ColumnModel {
|
|
|
709
709
|
*/
|
|
710
710
|
freeze?: freezeDirection;
|
|
711
711
|
}
|
|
712
|
+
/**
|
|
713
|
+
* Defines TreeGrid column
|
|
714
|
+
*/
|
|
715
|
+
export declare class TreeGridColumn extends Column {
|
|
716
|
+
/**
|
|
717
|
+
* Defines stacked columns
|
|
718
|
+
*
|
|
719
|
+
* @default null
|
|
720
|
+
*/
|
|
721
|
+
columns: string[] | ColumnModel[];
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* Interface for a class TreeGridColumn
|
|
725
|
+
*/
|
|
726
|
+
export interface TreeGridColumnModel extends ColumnModel {
|
|
727
|
+
/**
|
|
728
|
+
* Defines stacked columns
|
|
729
|
+
*
|
|
730
|
+
* @default null
|
|
731
|
+
*/
|
|
732
|
+
columns?: string[] | ColumnModel[];
|
|
733
|
+
}
|
|
734
|
+
/**
|
|
735
|
+
* Defines stacked tree grid column
|
|
736
|
+
*/
|
|
737
|
+
export declare class StackedColumn extends TreeGridColumn {
|
|
738
|
+
}
|
|
739
|
+
/**
|
|
740
|
+
* Interface for a class stacked tree grid column
|
|
741
|
+
*/
|
|
742
|
+
export interface StackedColumnModel extends TreeGridColumnModel {
|
|
743
|
+
}
|
|
@@ -1,4 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
extendStatics(d, b);
|
|
10
|
+
function __() { this.constructor = d; }
|
|
11
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
+
};
|
|
13
|
+
})();
|
|
14
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
17
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
18
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
19
|
+
};
|
|
20
|
+
import { merge, Property } from '@syncfusion/ej2-base';
|
|
2
21
|
/**
|
|
3
22
|
* Represents TreeGrid `Column` model class.
|
|
4
23
|
*/
|
|
@@ -93,3 +112,28 @@ var Column = /** @class */ (function () {
|
|
|
93
112
|
return Column;
|
|
94
113
|
}());
|
|
95
114
|
export { Column };
|
|
115
|
+
/**
|
|
116
|
+
* Defines TreeGrid column
|
|
117
|
+
*/
|
|
118
|
+
var TreeGridColumn = /** @class */ (function (_super) {
|
|
119
|
+
__extends(TreeGridColumn, _super);
|
|
120
|
+
function TreeGridColumn() {
|
|
121
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
122
|
+
}
|
|
123
|
+
__decorate([
|
|
124
|
+
Property(null)
|
|
125
|
+
], TreeGridColumn.prototype, "columns", void 0);
|
|
126
|
+
return TreeGridColumn;
|
|
127
|
+
}(Column));
|
|
128
|
+
export { TreeGridColumn };
|
|
129
|
+
/**
|
|
130
|
+
* Defines stacked tree grid column
|
|
131
|
+
*/
|
|
132
|
+
var StackedColumn = /** @class */ (function (_super) {
|
|
133
|
+
__extends(StackedColumn, _super);
|
|
134
|
+
function StackedColumn() {
|
|
135
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
136
|
+
}
|
|
137
|
+
return StackedColumn;
|
|
138
|
+
}(TreeGridColumn));
|
|
139
|
+
export { StackedColumn };
|
|
@@ -165,6 +165,7 @@ export interface FilterSettingsModel {
|
|
|
165
165
|
* * OnEnter :- Initiates filter operation after Enter key is pressed.
|
|
166
166
|
* * Immediate :- Initiates filter operation after a certain time interval. By default, time interval is 1500 ms.
|
|
167
167
|
* ```
|
|
168
|
+
*
|
|
168
169
|
* @default Syncfusion.EJ2.Grids.FilterBarMode.OnEnter
|
|
169
170
|
* @isEnumeration true
|
|
170
171
|
* @aspType Syncfusion.EJ2.Grids.FilterBarMode
|
|
@@ -150,6 +150,7 @@ export declare class FilterSettings extends ChildProperty<FilterSettings> {
|
|
|
150
150
|
* * OnEnter :- Initiates filter operation after Enter key is pressed.
|
|
151
151
|
* * Immediate :- Initiates filter operation after a certain time interval. By default, time interval is 1500 ms.
|
|
152
152
|
* ```
|
|
153
|
+
*
|
|
153
154
|
* @default Syncfusion.EJ2.Grids.FilterBarMode.OnEnter
|
|
154
155
|
* @isEnumeration true
|
|
155
156
|
* @aspType Syncfusion.EJ2.Grids.FilterBarMode
|
|
@@ -26,6 +26,7 @@ export interface SelectionSettingsModel {
|
|
|
26
26
|
* * Flow :- Selects the range of cells between start index and end index that also includes the other cells of the selected rows.
|
|
27
27
|
* * Box :- Selects the range of cells within the start and end column indexes that includes in between cells of rows within the range.
|
|
28
28
|
* ```
|
|
29
|
+
*
|
|
29
30
|
* @default Syncfusion.EJ2.Grids.CellSelectionMode.Flow
|
|
30
31
|
* @isEnumeration true
|
|
31
32
|
* @aspType Syncfusion.EJ2.Grids.CellSelectionMode
|
|
@@ -38,6 +39,7 @@ export interface SelectionSettingsModel {
|
|
|
38
39
|
* * Single :- Allows selection of only a row or a cell.
|
|
39
40
|
* * Multiple :- Allows selection of multiple rows or cells.
|
|
40
41
|
* ```
|
|
42
|
+
*
|
|
41
43
|
* @default Syncfusion.EJ2.Grids.SelectionType.Single
|
|
42
44
|
* @isEnumeration true
|
|
43
45
|
* @aspType Syncfusion.EJ2.Grids.SelectionType
|
|
@@ -24,6 +24,7 @@ export declare class SelectionSettings extends ChildProperty<SelectionSettings>
|
|
|
24
24
|
* * Flow :- Selects the range of cells between start index and end index that also includes the other cells of the selected rows.
|
|
25
25
|
* * Box :- Selects the range of cells within the start and end column indexes that includes in between cells of rows within the range.
|
|
26
26
|
* ```
|
|
27
|
+
*
|
|
27
28
|
* @default Syncfusion.EJ2.Grids.CellSelectionMode.Flow
|
|
28
29
|
* @isEnumeration true
|
|
29
30
|
* @aspType Syncfusion.EJ2.Grids.CellSelectionMode
|
|
@@ -35,6 +36,7 @@ export declare class SelectionSettings extends ChildProperty<SelectionSettings>
|
|
|
35
36
|
* * Single :- Allows selection of only a row or a cell.
|
|
36
37
|
* * Multiple :- Allows selection of multiple rows or cells.
|
|
37
38
|
* ```
|
|
39
|
+
*
|
|
38
40
|
* @default Syncfusion.EJ2.Grids.SelectionType.Single
|
|
39
41
|
* @isEnumeration true
|
|
40
42
|
* @aspType Syncfusion.EJ2.Grids.SelectionType
|
|
@@ -41,7 +41,7 @@ var Render = /** @class */ (function () {
|
|
|
41
41
|
if (collapsed && !isNullOrUndefined(args.row)) {
|
|
42
42
|
args.row.style.display = 'none';
|
|
43
43
|
var rowsObj = this.parent.grid.getRowsObject();
|
|
44
|
-
if (!isNullOrUndefined(args.row.getAttribute('data-uid'))) {
|
|
44
|
+
if (!this.parent.grid.isFrozenGrid() && !isNullOrUndefined(args.row.getAttribute('data-uid'))) {
|
|
45
45
|
rowsObj.filter(function (e) { return e.uid === args.row.getAttribute('data-uid'); })[0].visible = false;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
@@ -227,6 +227,7 @@ var Render = /** @class */ (function () {
|
|
|
227
227
|
if (summaryRow) {
|
|
228
228
|
addClass([args.cell], 'e-summarycell');
|
|
229
229
|
var summaryData = getObject(args.column.field, args.data);
|
|
230
|
+
summaryData = isNullOrUndefined(summaryData) ? null : summaryData;
|
|
230
231
|
if (args.cell.querySelector('.e-treecell') != null) {
|
|
231
232
|
args.cell.querySelector('.e-treecell').innerHTML = summaryData;
|
|
232
233
|
}
|
|
@@ -384,7 +384,7 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
|
|
|
384
384
|
var currentViewData = this.parent.currentViewData;
|
|
385
385
|
var indexValue = 'index';
|
|
386
386
|
if (upScroll && (scrollArgs.direction !== 'right' && scrollArgs.direction !== 'left')) {
|
|
387
|
-
var vHeight = +(this.parent.height.toString().indexOf('%') < 0 ? this.parent.height :
|
|
387
|
+
var vHeight = +(this.parent.height.toString().indexOf('%') < 0 ? parseInt(this.parent.height.toString(), 10) :
|
|
388
388
|
this.parent.element.getBoundingClientRect().height);
|
|
389
389
|
var index = (~~(content.scrollTop / rowHeight)
|
|
390
390
|
+ Math.ceil(vHeight / rowHeight))
|
|
@@ -443,6 +443,11 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
|
|
|
443
443
|
}
|
|
444
444
|
this.startIndex = !isLastBlock ? lastIndex - this.parent.pageSettings.pageSize : nextSetResIndex;
|
|
445
445
|
this.endIndex = lastIndex;
|
|
446
|
+
if ((nextSetResIndex + this.parent.pageSettings.pageSize) > this.totalRecords &&
|
|
447
|
+
(this.endIndex - this.startIndex) < (this.parent.pageSettings.pageSize / 2) &&
|
|
448
|
+
(this.endIndex - nextSetResIndex) < (this.parent.pageSettings.pageSize / 2)) {
|
|
449
|
+
this.startIndex = lastIndex - (this.parent.pageSettings.pageSize / 2);
|
|
450
|
+
}
|
|
446
451
|
if (currentViewData.length && this.startIndex > currentViewData[0]["" + indexValue] &&
|
|
447
452
|
((this.startIndex - currentViewData[0]["" + indexValue]) < (this.parent.pageSettings.pageSize / 2)) && this.parent.selectionModule.isRowSelected) {
|
|
448
453
|
this.startIndex = currentViewData[0]["" + indexValue] + (this.parent.pageSettings.pageSize / 2);
|
|
@@ -455,7 +460,12 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
|
|
|
455
460
|
this.translateY = scrollArgs.offset.top - rowHeight * 2;
|
|
456
461
|
}
|
|
457
462
|
else {
|
|
458
|
-
this.
|
|
463
|
+
if (this.totalRecords == this.endIndex) {
|
|
464
|
+
this.translateY = scrollArgs.offset.top - (rowHeight - outBuffer);
|
|
465
|
+
}
|
|
466
|
+
else {
|
|
467
|
+
this.translateY = scrollArgs.offset.top;
|
|
468
|
+
}
|
|
459
469
|
}
|
|
460
470
|
}
|
|
461
471
|
}
|