@syncfusion/ej2-treegrid 25.2.3 → 25.2.4
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 +13 -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 +55 -36
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +55 -36
- 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 +6 -6
- package/src/treegrid/actions/edit.js +1 -0
- package/src/treegrid/actions/excel-export.js +5 -0
- package/src/treegrid/actions/virtual-scroll.js +3 -7
- package/src/treegrid/base/treegrid-model.d.ts +1 -1
- package/src/treegrid/base/treegrid.js +38 -28
- package/src/treegrid/renderer/virtual-tree-content-render.js +9 -1
|
@@ -3446,6 +3446,11 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3446
3446
|
if (!isNullOrUndefined(this.injectedModules[`${logger}`])) {
|
|
3447
3447
|
Grid.Inject(Logger);
|
|
3448
3448
|
}
|
|
3449
|
+
const freezeModulePresent = this.injectedModules.filter((e) => {
|
|
3450
|
+
if (e.prototype.getModuleName() === 'freeze') {
|
|
3451
|
+
Grid.Inject(Freeze);
|
|
3452
|
+
}
|
|
3453
|
+
});
|
|
3449
3454
|
this.grid = new Grid();
|
|
3450
3455
|
}
|
|
3451
3456
|
/**
|
|
@@ -3760,19 +3765,21 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3760
3765
|
if (!this.enableVirtualization) {
|
|
3761
3766
|
target = e.target;
|
|
3762
3767
|
parentTarget = target.parentElement;
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3768
|
+
if (!isNullOrUndefined(parentTarget)) {
|
|
3769
|
+
const cellIndex = parentTarget.cellIndex;
|
|
3770
|
+
if (this.grid.getColumnByIndex(cellIndex).editType === 'dropdownedit' && isNullOrUndefined(this.grid.getColumnByIndex(cellIndex).edit['obj'])) {
|
|
3771
|
+
parentTarget = target;
|
|
3772
|
+
}
|
|
3773
|
+
summaryElement = this.findnextRowElement(parentTarget);
|
|
3774
|
+
if (summaryElement !== null) {
|
|
3775
|
+
const cellIndex = e.target.cellIndex;
|
|
3776
|
+
const row = summaryElement.children[parseInt(cellIndex.toString(), 10)];
|
|
3777
|
+
addClass([row], 'e-focused');
|
|
3778
|
+
addClass([row], 'e-focus');
|
|
3779
|
+
}
|
|
3780
|
+
else {
|
|
3781
|
+
this.clearSelection();
|
|
3782
|
+
}
|
|
3776
3783
|
}
|
|
3777
3784
|
}
|
|
3778
3785
|
break;
|
|
@@ -3780,19 +3787,21 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3780
3787
|
if (!this.enableVirtualization) {
|
|
3781
3788
|
target = e.target;
|
|
3782
3789
|
parentTarget = target.parentElement;
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3790
|
+
if (!isNullOrUndefined(parentTarget)) {
|
|
3791
|
+
const cellIndex = parentTarget.cellIndex;
|
|
3792
|
+
if (this.grid.getColumnByIndex(cellIndex).editType === 'dropdownedit' && isNullOrUndefined(this.grid.getColumnByIndex(cellIndex).edit['obj'])) {
|
|
3793
|
+
parentTarget = target;
|
|
3794
|
+
}
|
|
3795
|
+
summaryElement = this.findPreviousRowElement(parentTarget);
|
|
3796
|
+
if (summaryElement !== null) {
|
|
3797
|
+
const cIndex = e.target.cellIndex;
|
|
3798
|
+
const rows = summaryElement.children[parseInt(cIndex.toString(), 10)];
|
|
3799
|
+
addClass([rows], 'e-focused');
|
|
3800
|
+
addClass([rows], 'e-focus');
|
|
3801
|
+
}
|
|
3802
|
+
else {
|
|
3803
|
+
this.clearSelection();
|
|
3804
|
+
}
|
|
3796
3805
|
}
|
|
3797
3806
|
}
|
|
3798
3807
|
}
|
|
@@ -6128,7 +6137,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6128
6137
|
if (!this.isExpandingEventTriggered) {
|
|
6129
6138
|
this.trigger(expanding, args, (expandingArgs) => {
|
|
6130
6139
|
this.expandAllPrevent = expandingArgs.cancel;
|
|
6131
|
-
if (!expandingArgs.cancel) {
|
|
6140
|
+
if (!expandingArgs.cancel && !isNullOrUndefined(record)) {
|
|
6132
6141
|
if (expandingArgs.expandAll) {
|
|
6133
6142
|
this.expandCollapseAllChildren(record, 'expand', key, level);
|
|
6134
6143
|
}
|
|
@@ -6253,7 +6262,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6253
6262
|
else if (!this.isCollapseAll || (this.isCollapseAll && isRemoteData(this))) {
|
|
6254
6263
|
const args = { data: record, row: row, cancel: false };
|
|
6255
6264
|
this.trigger(collapsing, args, (collapsingArgs) => {
|
|
6256
|
-
if (!collapsingArgs.cancel) {
|
|
6265
|
+
if (!collapsingArgs.cancel && !isNullOrUndefined(record)) {
|
|
6257
6266
|
this.collapseRows(row, record, parentRec, key);
|
|
6258
6267
|
}
|
|
6259
6268
|
});
|
|
@@ -9658,12 +9667,17 @@ class ExcelExport$1 {
|
|
|
9658
9667
|
if (!isNullOrUndefined(excelExportProperties)) {
|
|
9659
9668
|
this.isCollapsedStatePersist = excelExportProperties.isCollapsedStatePersist;
|
|
9660
9669
|
}
|
|
9670
|
+
if (!isNullOrUndefined(excelExportProperties) && !isNullOrUndefined(excelExportProperties.dataSource)
|
|
9671
|
+
&& !isNullOrUndefined(excelExportProperties.dataSource instanceof DataManager)) {
|
|
9672
|
+
return this.parent.grid.excelExportModule.Map(this.parent.grid, excelExportProperties, isMultipleExport, workbook, isCsv, isBlob);
|
|
9673
|
+
}
|
|
9661
9674
|
return new Promise((resolve) => {
|
|
9662
9675
|
const dm = this.isLocal() && !(dataSource instanceof DataManager) ? new DataManager(dataSource)
|
|
9663
9676
|
: this.parent.dataSource;
|
|
9664
9677
|
let query = new Query();
|
|
9665
9678
|
if (!this.isLocal()) {
|
|
9666
9679
|
query = this.generateQuery(query);
|
|
9680
|
+
query.queries = this.parent.grid.getDataModule().generateQuery().queries;
|
|
9667
9681
|
setValue('query', query, property);
|
|
9668
9682
|
}
|
|
9669
9683
|
this.parent.trigger(beforeExcelExport, extend(property, excelExportProperties));
|
|
@@ -12360,6 +12374,7 @@ class Edit$1 {
|
|
|
12360
12374
|
args.index = position === 'before' ? index : index + 1;
|
|
12361
12375
|
}
|
|
12362
12376
|
if (this.parent.editSettings.newRowPosition === 'Bottom') {
|
|
12377
|
+
level = 0;
|
|
12363
12378
|
const dataSource = (this.parent.grid.dataSource instanceof DataManager ?
|
|
12364
12379
|
this.parent.grid.dataSource.dataSource.json : this.parent.grid.dataSource);
|
|
12365
12380
|
args.index = dataSource.length;
|
|
@@ -13028,7 +13043,12 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13028
13043
|
}
|
|
13029
13044
|
if (firsttdinx === 0) {
|
|
13030
13045
|
this.translateY = (scrollArgs.offset.top - (outBuffer * rowHeight) > 0) ?
|
|
13031
|
-
scrollArgs.offset.top - (outBuffer * this.parent.getRowHeight()) +
|
|
13046
|
+
scrollArgs.offset.top - (outBuffer * this.parent.getRowHeight()) + rowHeight : 0;
|
|
13047
|
+
}
|
|
13048
|
+
else if (this.parent.getFrozenColumns() > 0) {
|
|
13049
|
+
scrollArgs.offset.top = scrollArgs.offset.top + 80;
|
|
13050
|
+
this.translateY = (scrollArgs.offset.top - (outBuffer * rowHeight) > 0) ?
|
|
13051
|
+
scrollArgs.offset.top - (outBuffer * rowHeight) + 10 : 0;
|
|
13032
13052
|
}
|
|
13033
13053
|
else {
|
|
13034
13054
|
this.translateY = (scrollArgs.offset.top - (outBuffer * rowHeight) > 0) ?
|
|
@@ -13068,6 +13088,9 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13068
13088
|
if (this.parent.allowRowDragAndDrop) {
|
|
13069
13089
|
this.translateY = scrollArgs.offset.top - rowHeight * 2;
|
|
13070
13090
|
}
|
|
13091
|
+
else if (this.parent.getFrozenColumns() > 0) {
|
|
13092
|
+
this.translateY = scrollArgs.offset.top - ((rowHeight * 2) + this.parent.pageSettings.pageSize);
|
|
13093
|
+
}
|
|
13071
13094
|
else {
|
|
13072
13095
|
this.translateY = scrollArgs.offset.top;
|
|
13073
13096
|
}
|
|
@@ -13385,15 +13408,11 @@ class VirtualScroll$1 {
|
|
|
13385
13408
|
this.parent.grid.notify(virtualActionArgs, { setTop: true });
|
|
13386
13409
|
}
|
|
13387
13410
|
if ((requestType === 'save' && pageingDetails.actionArgs.index >= (counts.count - this.parent.grid.pageSettings.pageSize)) || (requestType === 'refresh' && this.parent['isGantt'] && this.parent['isAddedFromGantt'])) {
|
|
13388
|
-
|
|
13389
|
-
|
|
13390
|
-
startIndex =
|
|
13411
|
+
if ((counts.endIndex + this.parent.pageSettings.pageSize >= counts.count && (this.parent.root && counts.count - counts.endIndex === this.visualData.length - this.parent.root['previousFlatData'].length))
|
|
13412
|
+
|| !(this.parent['isGantt'] && this.parent['isAddedFromGantt'])) {
|
|
13413
|
+
startIndex = counts.startIndex + (counts.count - counts.endIndex);
|
|
13391
13414
|
endIndex = counts.count;
|
|
13392
13415
|
}
|
|
13393
|
-
else {
|
|
13394
|
-
startIndex = counts.startIndex;
|
|
13395
|
-
endIndex = counts.endIndex;
|
|
13396
|
-
}
|
|
13397
13416
|
this.parent['isAddedFromGantt'] = false;
|
|
13398
13417
|
}
|
|
13399
13418
|
//if ((this.prevendIndex !== -1 && this.prevstartIndex !== -1) &&
|