@syncfusion/ej2-treegrid 23.2.7 → 24.1.41
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 +16 -57
- 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 +42 -14
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +41 -13
- 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 +10 -10
- package/src/treegrid/actions/clipboard.js +3 -3
- package/src/treegrid/actions/excel-export.js +2 -1
- package/src/treegrid/actions/pdf-export.js +2 -1
- package/src/treegrid/actions/summary.js +7 -1
- package/src/treegrid/actions/virtual-scroll.js +2 -1
- package/src/treegrid/base/treegrid.js +1 -1
- package/src/treegrid/renderer/render.js +25 -5
|
@@ -649,7 +649,7 @@ var TreeClipboard = /** @__PURE__ @class */ (function (_super) {
|
|
|
649
649
|
this.treeCopyContent += '\n';
|
|
650
650
|
}
|
|
651
651
|
if (!rows[selectedIndexes[parseInt(i.toString(), 10)]].classList.contains('e-summaryrow')) {
|
|
652
|
-
var cells = [].slice.call(rows[selectedIndexes[parseInt(i.toString(), 10)]].querySelectorAll('.e-rowcell
|
|
652
|
+
var cells = [].slice.call(rows[selectedIndexes[parseInt(i.toString(), 10)]].querySelectorAll('.e-rowcell'));
|
|
653
653
|
var uniqueid = this.treeGridParent.getSelectedRecords()[parseInt(i.toString(), 10)]["" + uniqueID];
|
|
654
654
|
if (this.copiedUniqueIdCollection.indexOf(uniqueid) === -1) {
|
|
655
655
|
if (this.treeGridParent.copyHierarchyMode === 'Parent' || this.treeGridParent.copyHierarchyMode === 'Both') {
|
|
@@ -711,7 +711,7 @@ var TreeClipboard = /** @__PURE__ @class */ (function (_super) {
|
|
|
711
711
|
if (!isNullOrUndefined(currentRecords[parseInt(selectedIndex.toString(), 10)]["" + parentItem]) &&
|
|
712
712
|
currentRecords[parseInt(j.toString(), 10)]["" + uniqueID] === currentRecords[parseInt(selectedIndex.toString(), 10)]["" + parentItem]["" + uniqueID]) {
|
|
713
713
|
selectedIndex = j;
|
|
714
|
-
var cells = [].slice.call(rows[parseInt(selectedIndex.toString(), 10)].querySelectorAll('.e-rowcell
|
|
714
|
+
var cells = [].slice.call(rows[parseInt(selectedIndex.toString(), 10)].querySelectorAll('.e-rowcell'));
|
|
715
715
|
var uniqueid = currentRecords[parseInt(j.toString(), 10)]["" + uniqueID];
|
|
716
716
|
if (this.copiedUniqueIdCollection.indexOf(uniqueid) === -1) {
|
|
717
717
|
this["" + getCopyData](cells, false, '\t', withHeader);
|
|
@@ -766,7 +766,7 @@ var TreeClipboard = /** @__PURE__ @class */ (function (_super) {
|
|
|
766
766
|
for (var j = 0; j < currentRecords.length; j++) {
|
|
767
767
|
if (!isNullOrUndefined(childData[parseInt(i.toString(), 10)]["" + uniqueID]) && currentRecords[parseInt(j.toString(), 10)]["" + uniqueID] === childData[parseInt(i.toString(), 10)]["" + uniqueID]) {
|
|
768
768
|
if ((!isNullOrUndefined(rows[parseInt(j.toString(), 10)])) && !rows[parseInt(j.toString(), 10)].classList.contains('e-summaryrow')) {
|
|
769
|
-
var cells = [].slice.call(rows[parseInt(j.toString(), 10)].querySelectorAll('.e-rowcell
|
|
769
|
+
var cells = [].slice.call(rows[parseInt(j.toString(), 10)].querySelectorAll('.e-rowcell'));
|
|
770
770
|
var uniqueid = currentRecords[parseInt(j.toString(), 10)]["" + uniqueID];
|
|
771
771
|
if (this.copiedUniqueIdCollection.indexOf(uniqueid) === -1) {
|
|
772
772
|
this["" + getCopyData](cells, false, '\t', withHeader);
|
|
@@ -1723,7 +1723,18 @@ var Render = /** @__PURE__ @class */ (function () {
|
|
|
1723
1723
|
this.parent["" + lastRowBorder](args.row, true);
|
|
1724
1724
|
}
|
|
1725
1725
|
}
|
|
1726
|
-
this.parent.
|
|
1726
|
+
if (this.parent.isReact) {
|
|
1727
|
+
var renderReactTemplates = 'renderReactTemplates';
|
|
1728
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
1729
|
+
var thisRef_1 = this;
|
|
1730
|
+
// tslint:disable-next-line:typedef
|
|
1731
|
+
thisRef_1.parent["" + renderReactTemplates](function () {
|
|
1732
|
+
thisRef_1.parent.trigger(rowDataBound, args);
|
|
1733
|
+
});
|
|
1734
|
+
}
|
|
1735
|
+
else {
|
|
1736
|
+
this.parent.trigger(rowDataBound, args);
|
|
1737
|
+
}
|
|
1727
1738
|
};
|
|
1728
1739
|
/**
|
|
1729
1740
|
* cell renderer for tree column index cell
|
|
@@ -1884,7 +1895,10 @@ var Render = /** @__PURE__ @class */ (function () {
|
|
|
1884
1895
|
}
|
|
1885
1896
|
}
|
|
1886
1897
|
}
|
|
1887
|
-
|
|
1898
|
+
this.parent['args'] = args;
|
|
1899
|
+
if ((isNullOrUndefined(this.parent.rowTemplate) && !(this.parent.isReact))
|
|
1900
|
+
|| ((this.parent.isReact) &&
|
|
1901
|
+
!args.column['template'])) {
|
|
1888
1902
|
this.parent.trigger(queryCellInfo, args);
|
|
1889
1903
|
}
|
|
1890
1904
|
};
|
|
@@ -1921,7 +1935,12 @@ var Render = /** @__PURE__ @class */ (function () {
|
|
|
1921
1935
|
this.parent.grid["" + portals] = this.parent["" + portals];
|
|
1922
1936
|
}
|
|
1923
1937
|
this.parent.notify('renderReactTemplate', this.parent["" + portals]);
|
|
1924
|
-
|
|
1938
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
1939
|
+
var thisRef_2 = this;
|
|
1940
|
+
// tslint:disable-next-line:typedef
|
|
1941
|
+
thisRef_2.parent["" + renderReactTemplates](function () {
|
|
1942
|
+
thisRef_2.parent.trigger(queryCellInfo, args);
|
|
1943
|
+
});
|
|
1925
1944
|
}
|
|
1926
1945
|
else {
|
|
1927
1946
|
var str = 'isStringTemplate';
|
|
@@ -1975,12 +1994,13 @@ var Render = /** @__PURE__ @class */ (function () {
|
|
|
1975
1994
|
Render.prototype.columnTemplateResult = function (args) {
|
|
1976
1995
|
this.templateResult = args.template;
|
|
1977
1996
|
};
|
|
1978
|
-
|
|
1997
|
+
// eslint-disable-next-line
|
|
1998
|
+
Render.prototype.reactTemplateRender = function (args, callBack) {
|
|
1979
1999
|
var renderReactTemplates = 'renderReactTemplates';
|
|
1980
2000
|
var portals = 'portals';
|
|
1981
2001
|
this.parent["" + portals] = args;
|
|
1982
2002
|
this.parent.notify('renderReactTemplate', this.parent["" + portals]);
|
|
1983
|
-
this.parent["" + renderReactTemplates]();
|
|
2003
|
+
this.parent["" + renderReactTemplates](callBack);
|
|
1984
2004
|
};
|
|
1985
2005
|
Render.prototype.destroy = function () {
|
|
1986
2006
|
this.parent.grid.off('template-result', this.columnTemplateResult);
|
|
@@ -7096,7 +7116,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
7096
7116
|
var rcell = this.grid.getContentTable().rows[parseInt(i.toString(), 10)]
|
|
7097
7117
|
.cells[this.treeColumnIndex];
|
|
7098
7118
|
var row = rows[parseInt(i.toString(), 10)];
|
|
7099
|
-
var rowData = rowsObject.length
|
|
7119
|
+
var rowData = rowsObject.length !== 0 ? rowsObject[parseInt(i.toString(), 10)].data : new Object();
|
|
7100
7120
|
var arg = { data: rowData, row: row, cell: rcell, column: this.getColumns()[this.treeColumnIndex] };
|
|
7101
7121
|
this.renderModule.cellRender(arg);
|
|
7102
7122
|
}
|
|
@@ -10005,7 +10025,7 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
|
|
|
10005
10025
|
if (!this.isLocal()) {
|
|
10006
10026
|
this.parent.flatData = [];
|
|
10007
10027
|
}
|
|
10008
|
-
if (property && property.dataSource) {
|
|
10028
|
+
if (property && property.dataSource && this.isLocal()) {
|
|
10009
10029
|
var flatsData = this.parent.flatData;
|
|
10010
10030
|
var dataSrc = property.dataSource instanceof DataManager ? property.dataSource.dataSource.json : property.dataSource;
|
|
10011
10031
|
this.parent.dataModule.convertToFlatData(dataSrc);
|
|
@@ -10014,6 +10034,7 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
|
|
|
10014
10034
|
}
|
|
10015
10035
|
property = isNullOrUndefined(property) ? Object() : property;
|
|
10016
10036
|
property.dataSource = new DataManager({ json: dtSrc });
|
|
10037
|
+
property.query = args['query'];
|
|
10017
10038
|
return property;
|
|
10018
10039
|
};
|
|
10019
10040
|
/**
|
|
@@ -10199,7 +10220,7 @@ var PdfExport$1 = /** @__PURE__ @class */ (function () {
|
|
|
10199
10220
|
if (!isLocal) {
|
|
10200
10221
|
this.parent.flatData = [];
|
|
10201
10222
|
}
|
|
10202
|
-
if (prop && prop.dataSource) {
|
|
10223
|
+
if (prop && prop.dataSource && isLocal) {
|
|
10203
10224
|
var flatDatas = this.parent.flatData;
|
|
10204
10225
|
var dataSrc = prop.dataSource instanceof DataManager ? prop.dataSource.dataSource.json : prop.dataSource;
|
|
10205
10226
|
this.parent.dataModule.convertToFlatData(dataSrc);
|
|
@@ -10208,6 +10229,7 @@ var PdfExport$1 = /** @__PURE__ @class */ (function () {
|
|
|
10208
10229
|
}
|
|
10209
10230
|
prop = isNullOrUndefined(prop) ? {} : prop;
|
|
10210
10231
|
prop.dataSource = new DataManager({ json: dtSrc });
|
|
10232
|
+
prop.query = args['query'];
|
|
10211
10233
|
return prop;
|
|
10212
10234
|
};
|
|
10213
10235
|
/**
|
|
@@ -10789,7 +10811,12 @@ var Aggregate$1 = /** @__PURE__ @class */ (function () {
|
|
|
10789
10811
|
if (this.parent.isReact) {
|
|
10790
10812
|
var renderReactTemplates = 'renderReactTemplates';
|
|
10791
10813
|
tempObj.fn(single[summaryColumn.columnName], this.parent, tempObj.property, '', null, null, cellElement);
|
|
10792
|
-
|
|
10814
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
10815
|
+
var thisRef_1 = this;
|
|
10816
|
+
// tslint:disable-next-line:typedef
|
|
10817
|
+
thisRef_1.parent["" + renderReactTemplates](function () {
|
|
10818
|
+
thisRef_1.parent.trigger(queryCellInfo, thisRef_1.parent['args']);
|
|
10819
|
+
});
|
|
10793
10820
|
}
|
|
10794
10821
|
else {
|
|
10795
10822
|
appendChildren(cellElement, tempObj.fn(single[summaryColumn.columnName], this.parent, tempObj.property));
|
|
@@ -13725,7 +13752,8 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
|
|
|
13725
13752
|
this.parent.grid.getContent().firstElementChild.scrollTop = 0;
|
|
13726
13753
|
this.parent.grid.notify(virtualActionArgs, { setTop: true });
|
|
13727
13754
|
}
|
|
13728
|
-
if ((requestType === 'save' && pageingDetails.actionArgs.index >= (counts.count - this.parent.grid.pageSettings.pageSize)) || (requestType === 'refresh' && this.parent['isGantt'] && this.parent['isAddedFromGantt']
|
|
13755
|
+
if ((requestType === 'save' && pageingDetails.actionArgs.index >= (counts.count - this.parent.grid.pageSettings.pageSize)) || (requestType === 'refresh' && this.parent['isGantt'] && this.parent['isAddedFromGantt']
|
|
13756
|
+
&& this.parent.grid.pageSettings.currentPage === this.parent.grid.contentModule['maxPage'])) {
|
|
13729
13757
|
startIndex = counts.startIndex + (counts.count - counts.endIndex);
|
|
13730
13758
|
endIndex = counts.count;
|
|
13731
13759
|
this.parent['isAddedFromGantt'] = false;
|