@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
|
@@ -534,7 +534,7 @@ class TreeClipboard extends Clipboard {
|
|
|
534
534
|
this.treeCopyContent += '\n';
|
|
535
535
|
}
|
|
536
536
|
if (!rows[selectedIndexes[parseInt(i.toString(), 10)]].classList.contains('e-summaryrow')) {
|
|
537
|
-
const cells = [].slice.call(rows[selectedIndexes[parseInt(i.toString(), 10)]].querySelectorAll('.e-rowcell
|
|
537
|
+
const cells = [].slice.call(rows[selectedIndexes[parseInt(i.toString(), 10)]].querySelectorAll('.e-rowcell'));
|
|
538
538
|
const uniqueid = this.treeGridParent.getSelectedRecords()[parseInt(i.toString(), 10)][`${uniqueID}`];
|
|
539
539
|
if (this.copiedUniqueIdCollection.indexOf(uniqueid) === -1) {
|
|
540
540
|
if (this.treeGridParent.copyHierarchyMode === 'Parent' || this.treeGridParent.copyHierarchyMode === 'Both') {
|
|
@@ -596,7 +596,7 @@ class TreeClipboard extends Clipboard {
|
|
|
596
596
|
if (!isNullOrUndefined(currentRecords[parseInt(selectedIndex.toString(), 10)][`${parentItem}`]) &&
|
|
597
597
|
currentRecords[parseInt(j.toString(), 10)][`${uniqueID}`] === currentRecords[parseInt(selectedIndex.toString(), 10)][`${parentItem}`][`${uniqueID}`]) {
|
|
598
598
|
selectedIndex = j;
|
|
599
|
-
const cells = [].slice.call(rows[parseInt(selectedIndex.toString(), 10)].querySelectorAll('.e-rowcell
|
|
599
|
+
const cells = [].slice.call(rows[parseInt(selectedIndex.toString(), 10)].querySelectorAll('.e-rowcell'));
|
|
600
600
|
const uniqueid = currentRecords[parseInt(j.toString(), 10)][`${uniqueID}`];
|
|
601
601
|
if (this.copiedUniqueIdCollection.indexOf(uniqueid) === -1) {
|
|
602
602
|
this[`${getCopyData}`](cells, false, '\t', withHeader);
|
|
@@ -651,7 +651,7 @@ class TreeClipboard extends Clipboard {
|
|
|
651
651
|
for (let j = 0; j < currentRecords.length; j++) {
|
|
652
652
|
if (!isNullOrUndefined(childData[parseInt(i.toString(), 10)][`${uniqueID}`]) && currentRecords[parseInt(j.toString(), 10)][`${uniqueID}`] === childData[parseInt(i.toString(), 10)][`${uniqueID}`]) {
|
|
653
653
|
if ((!isNullOrUndefined(rows[parseInt(j.toString(), 10)])) && !rows[parseInt(j.toString(), 10)].classList.contains('e-summaryrow')) {
|
|
654
|
-
const cells = [].slice.call(rows[parseInt(j.toString(), 10)].querySelectorAll('.e-rowcell
|
|
654
|
+
const cells = [].slice.call(rows[parseInt(j.toString(), 10)].querySelectorAll('.e-rowcell'));
|
|
655
655
|
const uniqueid = currentRecords[parseInt(j.toString(), 10)][`${uniqueID}`];
|
|
656
656
|
if (this.copiedUniqueIdCollection.indexOf(uniqueid) === -1) {
|
|
657
657
|
this[`${getCopyData}`](cells, false, '\t', withHeader);
|
|
@@ -1566,7 +1566,18 @@ class Render {
|
|
|
1566
1566
|
this.parent[`${lastRowBorder}`](args.row, true);
|
|
1567
1567
|
}
|
|
1568
1568
|
}
|
|
1569
|
-
this.parent.
|
|
1569
|
+
if (this.parent.isReact) {
|
|
1570
|
+
const renderReactTemplates = 'renderReactTemplates';
|
|
1571
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
1572
|
+
const thisRef = this;
|
|
1573
|
+
// tslint:disable-next-line:typedef
|
|
1574
|
+
thisRef.parent[`${renderReactTemplates}`](function () {
|
|
1575
|
+
thisRef.parent.trigger(rowDataBound, args);
|
|
1576
|
+
});
|
|
1577
|
+
}
|
|
1578
|
+
else {
|
|
1579
|
+
this.parent.trigger(rowDataBound, args);
|
|
1580
|
+
}
|
|
1570
1581
|
}
|
|
1571
1582
|
/**
|
|
1572
1583
|
* cell renderer for tree column index cell
|
|
@@ -1727,7 +1738,10 @@ class Render {
|
|
|
1727
1738
|
}
|
|
1728
1739
|
}
|
|
1729
1740
|
}
|
|
1730
|
-
|
|
1741
|
+
this.parent['args'] = args;
|
|
1742
|
+
if ((isNullOrUndefined(this.parent.rowTemplate) && !(this.parent.isReact))
|
|
1743
|
+
|| ((this.parent.isReact) &&
|
|
1744
|
+
!args.column['template'])) {
|
|
1731
1745
|
this.parent.trigger(queryCellInfo, args);
|
|
1732
1746
|
}
|
|
1733
1747
|
}
|
|
@@ -1764,7 +1778,12 @@ class Render {
|
|
|
1764
1778
|
this.parent.grid[`${portals}`] = this.parent[`${portals}`];
|
|
1765
1779
|
}
|
|
1766
1780
|
this.parent.notify('renderReactTemplate', this.parent[`${portals}`]);
|
|
1767
|
-
this
|
|
1781
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
1782
|
+
const thisRef = this;
|
|
1783
|
+
// tslint:disable-next-line:typedef
|
|
1784
|
+
thisRef.parent[`${renderReactTemplates}`](function () {
|
|
1785
|
+
thisRef.parent.trigger(queryCellInfo, args);
|
|
1786
|
+
});
|
|
1768
1787
|
}
|
|
1769
1788
|
else {
|
|
1770
1789
|
const str = 'isStringTemplate';
|
|
@@ -1817,12 +1836,13 @@ class Render {
|
|
|
1817
1836
|
columnTemplateResult(args) {
|
|
1818
1837
|
this.templateResult = args.template;
|
|
1819
1838
|
}
|
|
1820
|
-
|
|
1839
|
+
// eslint-disable-next-line
|
|
1840
|
+
reactTemplateRender(args, callBack) {
|
|
1821
1841
|
const renderReactTemplates = 'renderReactTemplates';
|
|
1822
1842
|
const portals = 'portals';
|
|
1823
1843
|
this.parent[`${portals}`] = args;
|
|
1824
1844
|
this.parent.notify('renderReactTemplate', this.parent[`${portals}`]);
|
|
1825
|
-
this.parent[`${renderReactTemplates}`]();
|
|
1845
|
+
this.parent[`${renderReactTemplates}`](callBack);
|
|
1826
1846
|
}
|
|
1827
1847
|
destroy() {
|
|
1828
1848
|
this.parent.grid.off('template-result', this.columnTemplateResult);
|
|
@@ -6762,12 +6782,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6762
6782
|
treeColumnRowTemplate() {
|
|
6763
6783
|
let rows = this.getContentTable().rows;
|
|
6764
6784
|
rows = [].slice.call(rows);
|
|
6765
|
-
|
|
6785
|
+
const rowsObject = this.grid.getRowsObject();
|
|
6766
6786
|
for (let i = 0; i < rows.length; i++) {
|
|
6767
6787
|
const rcell = this.grid.getContentTable().rows[parseInt(i.toString(), 10)]
|
|
6768
6788
|
.cells[this.treeColumnIndex];
|
|
6769
6789
|
const row = rows[parseInt(i.toString(), 10)];
|
|
6770
|
-
const rowData = rowsObject.length
|
|
6790
|
+
const rowData = rowsObject.length !== 0 ? rowsObject[parseInt(i.toString(), 10)].data : new Object();
|
|
6771
6791
|
const arg = { data: rowData, row: row, cell: rcell, column: this.getColumns()[this.treeColumnIndex] };
|
|
6772
6792
|
this.renderModule.cellRender(arg);
|
|
6773
6793
|
}
|
|
@@ -9625,7 +9645,7 @@ class ExcelExport$1 {
|
|
|
9625
9645
|
if (!this.isLocal()) {
|
|
9626
9646
|
this.parent.flatData = [];
|
|
9627
9647
|
}
|
|
9628
|
-
if (property && property.dataSource) {
|
|
9648
|
+
if (property && property.dataSource && this.isLocal()) {
|
|
9629
9649
|
const flatsData = this.parent.flatData;
|
|
9630
9650
|
const dataSrc = property.dataSource instanceof DataManager ? property.dataSource.dataSource.json : property.dataSource;
|
|
9631
9651
|
this.parent.dataModule.convertToFlatData(dataSrc);
|
|
@@ -9634,6 +9654,7 @@ class ExcelExport$1 {
|
|
|
9634
9654
|
}
|
|
9635
9655
|
property = isNullOrUndefined(property) ? Object() : property;
|
|
9636
9656
|
property.dataSource = new DataManager({ json: dtSrc });
|
|
9657
|
+
property.query = args['query'];
|
|
9637
9658
|
return property;
|
|
9638
9659
|
}
|
|
9639
9660
|
/**
|
|
@@ -9817,7 +9838,7 @@ class PdfExport$1 {
|
|
|
9817
9838
|
if (!isLocal) {
|
|
9818
9839
|
this.parent.flatData = [];
|
|
9819
9840
|
}
|
|
9820
|
-
if (prop && prop.dataSource) {
|
|
9841
|
+
if (prop && prop.dataSource && isLocal) {
|
|
9821
9842
|
const flatDatas = this.parent.flatData;
|
|
9822
9843
|
const dataSrc = prop.dataSource instanceof DataManager ? prop.dataSource.dataSource.json : prop.dataSource;
|
|
9823
9844
|
this.parent.dataModule.convertToFlatData(dataSrc);
|
|
@@ -9826,6 +9847,7 @@ class PdfExport$1 {
|
|
|
9826
9847
|
}
|
|
9827
9848
|
prop = isNullOrUndefined(prop) ? {} : prop;
|
|
9828
9849
|
prop.dataSource = new DataManager({ json: dtSrc });
|
|
9850
|
+
prop.query = args['query'];
|
|
9829
9851
|
return prop;
|
|
9830
9852
|
}
|
|
9831
9853
|
/**
|
|
@@ -10394,7 +10416,12 @@ class Aggregate$1 {
|
|
|
10394
10416
|
if (this.parent.isReact) {
|
|
10395
10417
|
const renderReactTemplates = 'renderReactTemplates';
|
|
10396
10418
|
tempObj.fn(single[summaryColumn.columnName], this.parent, tempObj.property, '', null, null, cellElement);
|
|
10397
|
-
this
|
|
10419
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
10420
|
+
const thisRef = this;
|
|
10421
|
+
// tslint:disable-next-line:typedef
|
|
10422
|
+
thisRef.parent[`${renderReactTemplates}`](function () {
|
|
10423
|
+
thisRef.parent.trigger(queryCellInfo, thisRef.parent['args']);
|
|
10424
|
+
});
|
|
10398
10425
|
}
|
|
10399
10426
|
else {
|
|
10400
10427
|
appendChildren(cellElement, tempObj.fn(single[summaryColumn.columnName], this.parent, tempObj.property));
|
|
@@ -13279,7 +13306,8 @@ class VirtualScroll$1 {
|
|
|
13279
13306
|
this.parent.grid.getContent().firstElementChild.scrollTop = 0;
|
|
13280
13307
|
this.parent.grid.notify(virtualActionArgs, { setTop: true });
|
|
13281
13308
|
}
|
|
13282
|
-
if ((requestType === 'save' && pageingDetails.actionArgs.index >= (counts.count - this.parent.grid.pageSettings.pageSize)) || (requestType === 'refresh' && this.parent['isGantt'] && this.parent['isAddedFromGantt']
|
|
13309
|
+
if ((requestType === 'save' && pageingDetails.actionArgs.index >= (counts.count - this.parent.grid.pageSettings.pageSize)) || (requestType === 'refresh' && this.parent['isGantt'] && this.parent['isAddedFromGantt']
|
|
13310
|
+
&& this.parent.grid.pageSettings.currentPage === this.parent.grid.contentModule['maxPage'])) {
|
|
13283
13311
|
startIndex = counts.startIndex + (counts.count - counts.endIndex);
|
|
13284
13312
|
endIndex = counts.count;
|
|
13285
13313
|
this.parent['isAddedFromGantt'] = false;
|