@syncfusion/ej2-treegrid 23.2.6 → 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 -48
- 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 -13
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +42 -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 +2 -1
- package/src/treegrid/renderer/render.js +25 -5
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version :
|
|
3
|
+
* version : 24.1.41
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. 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@
|
|
3
|
+
"_id": "@syncfusion/ej2-treegrid@20.12.1",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512
|
|
5
|
+
"_integrity": "sha512-+a7WJVnNqouKq7IejrhXkmPVTplJpKojPadr9qmfA4xUIo/tQNMLkIz8d3+7bhETFRnFkN/4gpbwLYry8eOGeg==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-treegrid",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"/@syncfusion/ej2-react-treegrid",
|
|
25
25
|
"/@syncfusion/ej2-vue-treegrid"
|
|
26
26
|
],
|
|
27
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-
|
|
28
|
-
"_shasum": "
|
|
27
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-treegrid/-/ej2-treegrid-20.12.1.tgz",
|
|
28
|
+
"_shasum": "79ae28a20dfd73806aaa9342d0bdce23650bf84e",
|
|
29
29
|
"_spec": "@syncfusion/ej2-treegrid@*",
|
|
30
|
-
"_where": "/jenkins/workspace/elease-
|
|
30
|
+
"_where": "/jenkins/workspace/elease-automation_release_24.1.1/packages/included",
|
|
31
31
|
"author": {
|
|
32
32
|
"name": "Syncfusion Inc."
|
|
33
33
|
},
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
},
|
|
37
37
|
"bundleDependencies": false,
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@syncfusion/ej2-base": "~
|
|
40
|
-
"@syncfusion/ej2-data": "~
|
|
41
|
-
"@syncfusion/ej2-grids": "~
|
|
42
|
-
"@syncfusion/ej2-popups": "~
|
|
39
|
+
"@syncfusion/ej2-base": "~24.1.41",
|
|
40
|
+
"@syncfusion/ej2-data": "~24.1.41",
|
|
41
|
+
"@syncfusion/ej2-grids": "~24.1.41",
|
|
42
|
+
"@syncfusion/ej2-popups": "~24.1.41"
|
|
43
43
|
},
|
|
44
44
|
"deprecated": false,
|
|
45
45
|
"description": "Essential JS 2 TreeGrid Component",
|
|
@@ -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": "
|
|
69
|
+
"version": "24.1.41",
|
|
70
70
|
"sideEffects": false
|
|
71
71
|
}
|
|
@@ -47,7 +47,7 @@ var TreeClipboard = /** @class */ (function (_super) {
|
|
|
47
47
|
this.treeCopyContent += '\n';
|
|
48
48
|
}
|
|
49
49
|
if (!rows[selectedIndexes[parseInt(i.toString(), 10)]].classList.contains('e-summaryrow')) {
|
|
50
|
-
var cells = [].slice.call(rows[selectedIndexes[parseInt(i.toString(), 10)]].querySelectorAll('.e-rowcell
|
|
50
|
+
var cells = [].slice.call(rows[selectedIndexes[parseInt(i.toString(), 10)]].querySelectorAll('.e-rowcell'));
|
|
51
51
|
var uniqueid = this.treeGridParent.getSelectedRecords()[parseInt(i.toString(), 10)]["" + uniqueID];
|
|
52
52
|
if (this.copiedUniqueIdCollection.indexOf(uniqueid) === -1) {
|
|
53
53
|
if (this.treeGridParent.copyHierarchyMode === 'Parent' || this.treeGridParent.copyHierarchyMode === 'Both') {
|
|
@@ -109,7 +109,7 @@ var TreeClipboard = /** @class */ (function (_super) {
|
|
|
109
109
|
if (!isNullOrUndefined(currentRecords[parseInt(selectedIndex.toString(), 10)]["" + parentItem]) &&
|
|
110
110
|
currentRecords[parseInt(j.toString(), 10)]["" + uniqueID] === currentRecords[parseInt(selectedIndex.toString(), 10)]["" + parentItem]["" + uniqueID]) {
|
|
111
111
|
selectedIndex = j;
|
|
112
|
-
var cells = [].slice.call(rows[parseInt(selectedIndex.toString(), 10)].querySelectorAll('.e-rowcell
|
|
112
|
+
var cells = [].slice.call(rows[parseInt(selectedIndex.toString(), 10)].querySelectorAll('.e-rowcell'));
|
|
113
113
|
var uniqueid = currentRecords[parseInt(j.toString(), 10)]["" + uniqueID];
|
|
114
114
|
if (this.copiedUniqueIdCollection.indexOf(uniqueid) === -1) {
|
|
115
115
|
this["" + getCopyData](cells, false, '\t', withHeader);
|
|
@@ -164,7 +164,7 @@ var TreeClipboard = /** @class */ (function (_super) {
|
|
|
164
164
|
for (var j = 0; j < currentRecords.length; j++) {
|
|
165
165
|
if (!isNullOrUndefined(childData[parseInt(i.toString(), 10)]["" + uniqueID]) && currentRecords[parseInt(j.toString(), 10)]["" + uniqueID] === childData[parseInt(i.toString(), 10)]["" + uniqueID]) {
|
|
166
166
|
if ((!isNullOrUndefined(rows[parseInt(j.toString(), 10)])) && !rows[parseInt(j.toString(), 10)].classList.contains('e-summaryrow')) {
|
|
167
|
-
var cells = [].slice.call(rows[parseInt(j.toString(), 10)].querySelectorAll('.e-rowcell
|
|
167
|
+
var cells = [].slice.call(rows[parseInt(j.toString(), 10)].querySelectorAll('.e-rowcell'));
|
|
168
168
|
var uniqueid = currentRecords[parseInt(j.toString(), 10)]["" + uniqueID];
|
|
169
169
|
if (this.copiedUniqueIdCollection.indexOf(uniqueid) === -1) {
|
|
170
170
|
this["" + getCopyData](cells, false, '\t', withHeader);
|
|
@@ -136,7 +136,7 @@ var ExcelExport = /** @class */ (function () {
|
|
|
136
136
|
if (!this.isLocal()) {
|
|
137
137
|
this.parent.flatData = [];
|
|
138
138
|
}
|
|
139
|
-
if (property && property.dataSource) {
|
|
139
|
+
if (property && property.dataSource && this.isLocal()) {
|
|
140
140
|
var flatsData = this.parent.flatData;
|
|
141
141
|
var dataSrc = property.dataSource instanceof DataManager ? property.dataSource.dataSource.json : property.dataSource;
|
|
142
142
|
this.parent.dataModule.convertToFlatData(dataSrc);
|
|
@@ -145,6 +145,7 @@ var ExcelExport = /** @class */ (function () {
|
|
|
145
145
|
}
|
|
146
146
|
property = isNullOrUndefined(property) ? Object() : property;
|
|
147
147
|
property.dataSource = new DataManager({ json: dtSrc });
|
|
148
|
+
property.query = args['query'];
|
|
148
149
|
return property;
|
|
149
150
|
};
|
|
150
151
|
/**
|
|
@@ -131,7 +131,7 @@ var PdfExport = /** @class */ (function () {
|
|
|
131
131
|
if (!isLocal) {
|
|
132
132
|
this.parent.flatData = [];
|
|
133
133
|
}
|
|
134
|
-
if (prop && prop.dataSource) {
|
|
134
|
+
if (prop && prop.dataSource && isLocal) {
|
|
135
135
|
var flatDatas = this.parent.flatData;
|
|
136
136
|
var dataSrc = prop.dataSource instanceof DataManager ? prop.dataSource.dataSource.json : prop.dataSource;
|
|
137
137
|
this.parent.dataModule.convertToFlatData(dataSrc);
|
|
@@ -140,6 +140,7 @@ var PdfExport = /** @class */ (function () {
|
|
|
140
140
|
}
|
|
141
141
|
prop = isNullOrUndefined(prop) ? {} : prop;
|
|
142
142
|
prop.dataSource = new DataManager({ json: dtSrc });
|
|
143
|
+
prop.query = args['query'];
|
|
143
144
|
return prop;
|
|
144
145
|
};
|
|
145
146
|
/**
|
|
@@ -2,6 +2,7 @@ import { Query, DataManager } from '@syncfusion/ej2-data';
|
|
|
2
2
|
import { getObject, calculateAggregate, Aggregate as GridAggregate, Grid, appendChildren } from '@syncfusion/ej2-grids';
|
|
3
3
|
import { findParentRecords } from '../utils';
|
|
4
4
|
import { isNullOrUndefined, setValue, createElement, extend } from '@syncfusion/ej2-base';
|
|
5
|
+
import * as events from '../base/constant';
|
|
5
6
|
/**
|
|
6
7
|
* TreeGrid Aggregate module
|
|
7
8
|
*
|
|
@@ -204,7 +205,12 @@ var Aggregate = /** @class */ (function () {
|
|
|
204
205
|
if (this.parent.isReact) {
|
|
205
206
|
var renderReactTemplates = 'renderReactTemplates';
|
|
206
207
|
tempObj.fn(single[summaryColumn.columnName], this.parent, tempObj.property, '', null, null, cellElement);
|
|
207
|
-
|
|
208
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
209
|
+
var thisRef_1 = this;
|
|
210
|
+
// tslint:disable-next-line:typedef
|
|
211
|
+
thisRef_1.parent["" + renderReactTemplates](function () {
|
|
212
|
+
thisRef_1.parent.trigger(events.queryCellInfo, thisRef_1.parent['args']);
|
|
213
|
+
});
|
|
208
214
|
}
|
|
209
215
|
else {
|
|
210
216
|
appendChildren(cellElement, tempObj.fn(single[summaryColumn.columnName], this.parent, tempObj.property));
|
|
@@ -125,7 +125,8 @@ var VirtualScroll = /** @class */ (function () {
|
|
|
125
125
|
this.parent.grid.getContent().firstElementChild.scrollTop = 0;
|
|
126
126
|
this.parent.grid.notify(events.virtualActionArgs, { setTop: true });
|
|
127
127
|
}
|
|
128
|
-
if ((requestType === 'save' && pageingDetails.actionArgs.index >= (counts.count - this.parent.grid.pageSettings.pageSize)) || (requestType === 'refresh' && this.parent['isGantt'] && this.parent['isAddedFromGantt']
|
|
128
|
+
if ((requestType === 'save' && pageingDetails.actionArgs.index >= (counts.count - this.parent.grid.pageSettings.pageSize)) || (requestType === 'refresh' && this.parent['isGantt'] && this.parent['isAddedFromGantt']
|
|
129
|
+
&& this.parent.grid.pageSettings.currentPage === this.parent.grid.contentModule['maxPage'])) {
|
|
129
130
|
startIndex = counts.startIndex + (counts.count - counts.endIndex);
|
|
130
131
|
endIndex = counts.count;
|
|
131
132
|
this.parent['isAddedFromGantt'] = false;
|
|
@@ -3496,11 +3496,12 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3496
3496
|
TreeGrid.prototype.treeColumnRowTemplate = function () {
|
|
3497
3497
|
var rows = this.getContentTable().rows;
|
|
3498
3498
|
rows = [].slice.call(rows);
|
|
3499
|
+
var rowsObject = this.grid.getRowsObject();
|
|
3499
3500
|
for (var i = 0; i < rows.length; i++) {
|
|
3500
3501
|
var rcell = this.grid.getContentTable().rows[parseInt(i.toString(), 10)]
|
|
3501
3502
|
.cells[this.treeColumnIndex];
|
|
3502
3503
|
var row = rows[parseInt(i.toString(), 10)];
|
|
3503
|
-
var rowData =
|
|
3504
|
+
var rowData = rowsObject.length !== 0 ? rowsObject[parseInt(i.toString(), 10)].data : new Object();
|
|
3504
3505
|
var arg = { data: rowData, row: row, cell: rcell, column: this.getColumns()[this.treeColumnIndex] };
|
|
3505
3506
|
this.renderModule.cellRender(arg);
|
|
3506
3507
|
}
|
|
@@ -84,7 +84,18 @@ var Render = /** @class */ (function () {
|
|
|
84
84
|
this.parent["" + lastRowBorder](args.row, true);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
this.parent.
|
|
87
|
+
if (this.parent.isReact) {
|
|
88
|
+
var renderReactTemplates = 'renderReactTemplates';
|
|
89
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
90
|
+
var thisRef_1 = this;
|
|
91
|
+
// tslint:disable-next-line:typedef
|
|
92
|
+
thisRef_1.parent["" + renderReactTemplates](function () {
|
|
93
|
+
thisRef_1.parent.trigger(events.rowDataBound, args);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
this.parent.trigger(events.rowDataBound, args);
|
|
98
|
+
}
|
|
88
99
|
};
|
|
89
100
|
/**
|
|
90
101
|
* cell renderer for tree column index cell
|
|
@@ -245,7 +256,10 @@ var Render = /** @class */ (function () {
|
|
|
245
256
|
}
|
|
246
257
|
}
|
|
247
258
|
}
|
|
248
|
-
|
|
259
|
+
this.parent['args'] = args;
|
|
260
|
+
if ((isNullOrUndefined(this.parent.rowTemplate) && !(this.parent.isReact))
|
|
261
|
+
|| ((this.parent.isReact) &&
|
|
262
|
+
!args.column['template'])) {
|
|
249
263
|
this.parent.trigger(events.queryCellInfo, args);
|
|
250
264
|
}
|
|
251
265
|
};
|
|
@@ -282,7 +296,12 @@ var Render = /** @class */ (function () {
|
|
|
282
296
|
this.parent.grid["" + portals] = this.parent["" + portals];
|
|
283
297
|
}
|
|
284
298
|
this.parent.notify('renderReactTemplate', this.parent["" + portals]);
|
|
285
|
-
|
|
299
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
300
|
+
var thisRef_2 = this;
|
|
301
|
+
// tslint:disable-next-line:typedef
|
|
302
|
+
thisRef_2.parent["" + renderReactTemplates](function () {
|
|
303
|
+
thisRef_2.parent.trigger(events.queryCellInfo, args);
|
|
304
|
+
});
|
|
286
305
|
}
|
|
287
306
|
else {
|
|
288
307
|
var str = 'isStringTemplate';
|
|
@@ -336,12 +355,13 @@ var Render = /** @class */ (function () {
|
|
|
336
355
|
Render.prototype.columnTemplateResult = function (args) {
|
|
337
356
|
this.templateResult = args.template;
|
|
338
357
|
};
|
|
339
|
-
|
|
358
|
+
// eslint-disable-next-line
|
|
359
|
+
Render.prototype.reactTemplateRender = function (args, callBack) {
|
|
340
360
|
var renderReactTemplates = 'renderReactTemplates';
|
|
341
361
|
var portals = 'portals';
|
|
342
362
|
this.parent["" + portals] = args;
|
|
343
363
|
this.parent.notify('renderReactTemplate', this.parent["" + portals]);
|
|
344
|
-
this.parent["" + renderReactTemplates]();
|
|
364
|
+
this.parent["" + renderReactTemplates](callBack);
|
|
345
365
|
};
|
|
346
366
|
Render.prototype.destroy = function () {
|
|
347
367
|
this.parent.grid.off('template-result', this.columnTemplateResult);
|