@syncfusion/ej2-treegrid 25.1.42 → 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 +21 -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 +57 -38
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +57 -38
- 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 +9 -9
- 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 +40 -30
- package/src/treegrid/renderer/virtual-tree-content-render.js +9 -1
|
@@ -3733,6 +3733,11 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
3733
3733
|
if (!isNullOrUndefined(_this.injectedModules["" + logger])) {
|
|
3734
3734
|
Grid.Inject(Logger);
|
|
3735
3735
|
}
|
|
3736
|
+
var freezeModulePresent = _this.injectedModules.filter(function (e) {
|
|
3737
|
+
if (e.prototype.getModuleName() === 'freeze') {
|
|
3738
|
+
Grid.Inject(Freeze);
|
|
3739
|
+
}
|
|
3740
|
+
});
|
|
3736
3741
|
_this.grid = new Grid();
|
|
3737
3742
|
return _this;
|
|
3738
3743
|
}
|
|
@@ -4049,19 +4054,21 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
4049
4054
|
if (!this.enableVirtualization) {
|
|
4050
4055
|
target = e.target;
|
|
4051
4056
|
parentTarget = target.parentElement;
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4057
|
+
if (!isNullOrUndefined(parentTarget)) {
|
|
4058
|
+
var cellIndex = parentTarget.cellIndex;
|
|
4059
|
+
if (this.grid.getColumnByIndex(cellIndex).editType === 'dropdownedit' && isNullOrUndefined(this.grid.getColumnByIndex(cellIndex).edit['obj'])) {
|
|
4060
|
+
parentTarget = target;
|
|
4061
|
+
}
|
|
4062
|
+
summaryElement = this.findnextRowElement(parentTarget);
|
|
4063
|
+
if (summaryElement !== null) {
|
|
4064
|
+
var cellIndex_1 = e.target.cellIndex;
|
|
4065
|
+
var row_1 = summaryElement.children[parseInt(cellIndex_1.toString(), 10)];
|
|
4066
|
+
addClass([row_1], 'e-focused');
|
|
4067
|
+
addClass([row_1], 'e-focus');
|
|
4068
|
+
}
|
|
4069
|
+
else {
|
|
4070
|
+
this.clearSelection();
|
|
4071
|
+
}
|
|
4065
4072
|
}
|
|
4066
4073
|
}
|
|
4067
4074
|
break;
|
|
@@ -4069,19 +4076,21 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
4069
4076
|
if (!this.enableVirtualization) {
|
|
4070
4077
|
target = e.target;
|
|
4071
4078
|
parentTarget = target.parentElement;
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4079
|
+
if (!isNullOrUndefined(parentTarget)) {
|
|
4080
|
+
var cellIndex = parentTarget.cellIndex;
|
|
4081
|
+
if (this.grid.getColumnByIndex(cellIndex).editType === 'dropdownedit' && isNullOrUndefined(this.grid.getColumnByIndex(cellIndex).edit['obj'])) {
|
|
4082
|
+
parentTarget = target;
|
|
4083
|
+
}
|
|
4084
|
+
summaryElement = this.findPreviousRowElement(parentTarget);
|
|
4085
|
+
if (summaryElement !== null) {
|
|
4086
|
+
var cIndex = e.target.cellIndex;
|
|
4087
|
+
var rows = summaryElement.children[parseInt(cIndex.toString(), 10)];
|
|
4088
|
+
addClass([rows], 'e-focused');
|
|
4089
|
+
addClass([rows], 'e-focus');
|
|
4090
|
+
}
|
|
4091
|
+
else {
|
|
4092
|
+
this.clearSelection();
|
|
4093
|
+
}
|
|
4085
4094
|
}
|
|
4086
4095
|
}
|
|
4087
4096
|
}
|
|
@@ -6138,11 +6147,11 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6138
6147
|
};
|
|
6139
6148
|
TreeGrid.prototype.setFrozenCount = function () {
|
|
6140
6149
|
var persist3 = 'setFrozenCount';
|
|
6141
|
-
this.grid["" + persist3].apply(this);
|
|
6150
|
+
this.grid["" + persist3].apply(this.grid);
|
|
6142
6151
|
};
|
|
6143
6152
|
TreeGrid.prototype.splitFrozenCount = function (columns) {
|
|
6144
6153
|
var persist4 = 'splitFrozenCount';
|
|
6145
|
-
this.grid["" + persist4].apply(this, [columns]);
|
|
6154
|
+
this.grid["" + persist4].apply(this.grid, [columns]);
|
|
6146
6155
|
};
|
|
6147
6156
|
TreeGrid.prototype.isFrozenGrid = function () {
|
|
6148
6157
|
return this.grid.isFrozenGrid();
|
|
@@ -6436,7 +6445,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6436
6445
|
if (!this.isExpandingEventTriggered) {
|
|
6437
6446
|
this.trigger(expanding, args, function (expandingArgs) {
|
|
6438
6447
|
_this.expandAllPrevent = expandingArgs.cancel;
|
|
6439
|
-
if (!expandingArgs.cancel) {
|
|
6448
|
+
if (!expandingArgs.cancel && !isNullOrUndefined(record)) {
|
|
6440
6449
|
if (expandingArgs.expandAll) {
|
|
6441
6450
|
_this.expandCollapseAllChildren(record, 'expand', key, level);
|
|
6442
6451
|
}
|
|
@@ -6562,7 +6571,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6562
6571
|
else if (!this.isCollapseAll || (this.isCollapseAll && isRemoteData(this))) {
|
|
6563
6572
|
var args = { data: record, row: row, cancel: false };
|
|
6564
6573
|
this.trigger(collapsing, args, function (collapsingArgs) {
|
|
6565
|
-
if (!collapsingArgs.cancel) {
|
|
6574
|
+
if (!collapsingArgs.cancel && !isNullOrUndefined(record)) {
|
|
6566
6575
|
_this.collapseRows(row, record, parentRec, key);
|
|
6567
6576
|
}
|
|
6568
6577
|
});
|
|
@@ -10038,12 +10047,17 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
|
|
|
10038
10047
|
if (!isNullOrUndefined(excelExportProperties)) {
|
|
10039
10048
|
this.isCollapsedStatePersist = excelExportProperties.isCollapsedStatePersist;
|
|
10040
10049
|
}
|
|
10050
|
+
if (!isNullOrUndefined(excelExportProperties) && !isNullOrUndefined(excelExportProperties.dataSource)
|
|
10051
|
+
&& !isNullOrUndefined(excelExportProperties.dataSource instanceof DataManager)) {
|
|
10052
|
+
return this.parent.grid.excelExportModule.Map(this.parent.grid, excelExportProperties, isMultipleExport, workbook, isCsv, isBlob);
|
|
10053
|
+
}
|
|
10041
10054
|
return new Promise(function (resolve) {
|
|
10042
10055
|
var dm = _this.isLocal() && !(dataSource instanceof DataManager) ? new DataManager(dataSource)
|
|
10043
10056
|
: _this.parent.dataSource;
|
|
10044
10057
|
var query = new Query();
|
|
10045
10058
|
if (!_this.isLocal()) {
|
|
10046
10059
|
query = _this.generateQuery(query);
|
|
10060
|
+
query.queries = _this.parent.grid.getDataModule().generateQuery().queries;
|
|
10047
10061
|
setValue('query', query, property);
|
|
10048
10062
|
}
|
|
10049
10063
|
_this.parent.trigger(beforeExcelExport, extend(property, excelExportProperties));
|
|
@@ -12769,6 +12783,7 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
12769
12783
|
args.index = position === 'before' ? index : index + 1;
|
|
12770
12784
|
}
|
|
12771
12785
|
if (this.parent.editSettings.newRowPosition === 'Bottom') {
|
|
12786
|
+
level = 0;
|
|
12772
12787
|
var dataSource = (this.parent.grid.dataSource instanceof DataManager ?
|
|
12773
12788
|
this.parent.grid.dataSource.dataSource.json : this.parent.grid.dataSource);
|
|
12774
12789
|
args.index = dataSource.length;
|
|
@@ -13457,7 +13472,12 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
13457
13472
|
}
|
|
13458
13473
|
if (firsttdinx === 0) {
|
|
13459
13474
|
this.translateY = (scrollArgs.offset.top - (outBuffer * rowHeight) > 0) ?
|
|
13460
|
-
scrollArgs.offset.top - (outBuffer * this.parent.getRowHeight()) +
|
|
13475
|
+
scrollArgs.offset.top - (outBuffer * this.parent.getRowHeight()) + rowHeight : 0;
|
|
13476
|
+
}
|
|
13477
|
+
else if (this.parent.getFrozenColumns() > 0) {
|
|
13478
|
+
scrollArgs.offset.top = scrollArgs.offset.top + 80;
|
|
13479
|
+
this.translateY = (scrollArgs.offset.top - (outBuffer * rowHeight) > 0) ?
|
|
13480
|
+
scrollArgs.offset.top - (outBuffer * rowHeight) + 10 : 0;
|
|
13461
13481
|
}
|
|
13462
13482
|
else {
|
|
13463
13483
|
this.translateY = (scrollArgs.offset.top - (outBuffer * rowHeight) > 0) ?
|
|
@@ -13497,6 +13517,9 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
13497
13517
|
if (this.parent.allowRowDragAndDrop) {
|
|
13498
13518
|
this.translateY = scrollArgs.offset.top - rowHeight * 2;
|
|
13499
13519
|
}
|
|
13520
|
+
else if (this.parent.getFrozenColumns() > 0) {
|
|
13521
|
+
this.translateY = scrollArgs.offset.top - ((rowHeight * 2) + this.parent.pageSettings.pageSize);
|
|
13522
|
+
}
|
|
13500
13523
|
else {
|
|
13501
13524
|
this.translateY = scrollArgs.offset.top;
|
|
13502
13525
|
}
|
|
@@ -13833,15 +13856,11 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
|
|
|
13833
13856
|
this.parent.grid.notify(virtualActionArgs, { setTop: true });
|
|
13834
13857
|
}
|
|
13835
13858
|
if ((requestType === 'save' && pageingDetails.actionArgs.index >= (counts.count - this.parent.grid.pageSettings.pageSize)) || (requestType === 'refresh' && this.parent['isGantt'] && this.parent['isAddedFromGantt'])) {
|
|
13836
|
-
|
|
13837
|
-
|
|
13838
|
-
startIndex =
|
|
13859
|
+
if ((counts.endIndex + this.parent.pageSettings.pageSize >= counts.count && (this.parent.root && counts.count - counts.endIndex === this.visualData.length - this.parent.root['previousFlatData'].length))
|
|
13860
|
+
|| !(this.parent['isGantt'] && this.parent['isAddedFromGantt'])) {
|
|
13861
|
+
startIndex = counts.startIndex + (counts.count - counts.endIndex);
|
|
13839
13862
|
endIndex = counts.count;
|
|
13840
13863
|
}
|
|
13841
|
-
else {
|
|
13842
|
-
startIndex = counts.startIndex;
|
|
13843
|
-
endIndex = counts.endIndex;
|
|
13844
|
-
}
|
|
13845
13864
|
this.parent['isAddedFromGantt'] = false;
|
|
13846
13865
|
}
|
|
13847
13866
|
//if ((this.prevendIndex !== -1 && this.prevstartIndex !== -1) &&
|