@syncfusion/ej2-treegrid 21.1.41 → 21.2.3
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 +15 -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 +43 -40
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +44 -43
- 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 -13
- package/src/treegrid/base/treegrid.js +28 -31
- package/src/treegrid/renderer/render.js +16 -12
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 21.
|
|
3
|
+
* version : 21.2.3
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. 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@21.1.
|
|
3
|
+
"_id": "@syncfusion/ej2-treegrid@21.1.41",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-AYO8w6DXiNenGnuNIxGQZUYcFQ73fOKYGi3LAogDdUJltrCYKenVR8eSJktB8bUf34mFwzAtZktha4gPumOYbw==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-treegrid",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -19,13 +19,10 @@
|
|
|
19
19
|
"_requiredBy": [
|
|
20
20
|
"/",
|
|
21
21
|
"/@syncfusion/ej2",
|
|
22
|
-
"/@syncfusion/ej2-
|
|
23
|
-
"/@syncfusion/ej2-gantt",
|
|
24
|
-
"/@syncfusion/ej2-react-treegrid",
|
|
25
|
-
"/@syncfusion/ej2-vue-treegrid"
|
|
22
|
+
"/@syncfusion/ej2-gantt"
|
|
26
23
|
],
|
|
27
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-21.1.
|
|
28
|
-
"_shasum": "
|
|
24
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-21.1.41.tgz",
|
|
25
|
+
"_shasum": "461656857601f4d69e6cd346e1010957f6ba5e79",
|
|
29
26
|
"_spec": "@syncfusion/ej2-treegrid@*",
|
|
30
27
|
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
31
28
|
"author": {
|
|
@@ -36,10 +33,10 @@
|
|
|
36
33
|
},
|
|
37
34
|
"bundleDependencies": false,
|
|
38
35
|
"dependencies": {
|
|
39
|
-
"@syncfusion/ej2-base": "~21.
|
|
40
|
-
"@syncfusion/ej2-data": "~21.
|
|
41
|
-
"@syncfusion/ej2-grids": "~21.
|
|
42
|
-
"@syncfusion/ej2-popups": "~21.
|
|
36
|
+
"@syncfusion/ej2-base": "~21.2.3",
|
|
37
|
+
"@syncfusion/ej2-data": "~21.2.3",
|
|
38
|
+
"@syncfusion/ej2-grids": "~21.2.3",
|
|
39
|
+
"@syncfusion/ej2-popups": "~21.2.3"
|
|
43
40
|
},
|
|
44
41
|
"deprecated": false,
|
|
45
42
|
"description": "Essential JS 2 TreeGrid Component",
|
|
@@ -66,6 +63,6 @@
|
|
|
66
63
|
"url": "git+https://github.com/syncfusion/ej2-treegrid.git"
|
|
67
64
|
},
|
|
68
65
|
"typings": "index.d.ts",
|
|
69
|
-
"version": "21.
|
|
66
|
+
"version": "21.2.3",
|
|
70
67
|
"sideEffects": false
|
|
71
68
|
}
|
|
@@ -1067,7 +1067,25 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
1067
1067
|
};
|
|
1068
1068
|
};
|
|
1069
1069
|
TreeGrid.prototype.updateRowTemplate = function () {
|
|
1070
|
-
this
|
|
1070
|
+
var _this = this;
|
|
1071
|
+
if (this.rowTemplate) {
|
|
1072
|
+
if (this.isReact && this.getContentTable().rows.length === 0) {
|
|
1073
|
+
setTimeout(function () {
|
|
1074
|
+
_this.treeColumnRowTemplate();
|
|
1075
|
+
if (_this.enableCollapseAll) {
|
|
1076
|
+
var currentData = _this.getCurrentViewRecords();
|
|
1077
|
+
var rows = _this.getContentTable().rows;
|
|
1078
|
+
for (var i = 0; i < rows.length; i++) {
|
|
1079
|
+
var args = { data: currentData[parseInt(i.toString(), 10)], row: rows[parseInt(i.toString(), 10)] };
|
|
1080
|
+
_this.renderModule.RowModifier(args);
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
}, 0);
|
|
1084
|
+
}
|
|
1085
|
+
else {
|
|
1086
|
+
this.treeColumnRowTemplate();
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1071
1089
|
};
|
|
1072
1090
|
TreeGrid.prototype.bindedDataSource = function () {
|
|
1073
1091
|
var dataSource = 'dataSource';
|
|
@@ -1110,25 +1128,6 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
1110
1128
|
if (requestType === 'reorder') {
|
|
1111
1129
|
_this.notify('getColumnIndex', {});
|
|
1112
1130
|
}
|
|
1113
|
-
if (requestType === 'filterbeforeopen' && args.columnName && _this.filterSettings.hierarchyMode !== 'None') {
|
|
1114
|
-
for (var j = 0; j < _this.columns.length; j++) {
|
|
1115
|
-
var fields = 'field';
|
|
1116
|
-
if (_this.columns[parseInt(j.toString(), 10)]["" + fields] === args.columnName) {
|
|
1117
|
-
var taskFields = [];
|
|
1118
|
-
for (var i = 0; i < _this.grid.currentViewData.length; i++) {
|
|
1119
|
-
var fieldValue = _this.grid.currentViewData[parseInt(i.toString(), 10)][args.columnName];
|
|
1120
|
-
if (taskFields.indexOf(fieldValue) === -1) {
|
|
1121
|
-
taskFields.push(fieldValue);
|
|
1122
|
-
}
|
|
1123
|
-
}
|
|
1124
|
-
args['filterModel'].options.dataSource = taskFields.map(function (name) {
|
|
1125
|
-
var _a;
|
|
1126
|
-
return (_a = {}, _a[args.columnName] = name, _a);
|
|
1127
|
-
});
|
|
1128
|
-
args['filterModel'].options.filteredColumns = args['filterModel'].options.filteredColumns.filter(function (col) { return col.field === args.columnName; });
|
|
1129
|
-
}
|
|
1130
|
-
}
|
|
1131
|
-
}
|
|
1132
1131
|
if (isRemoteData(_this) && _this.enableVirtualization) {
|
|
1133
1132
|
if (args.requestType === 'virtualscroll') {
|
|
1134
1133
|
_this.query.expand('VirtualScrollingAction');
|
|
@@ -3259,17 +3258,15 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3259
3258
|
}
|
|
3260
3259
|
};
|
|
3261
3260
|
TreeGrid.prototype.treeColumnRowTemplate = function () {
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
this.renderModule.cellRender(arg);
|
|
3272
|
-
}
|
|
3261
|
+
var rows = this.getContentTable().rows;
|
|
3262
|
+
rows = [].slice.call(rows);
|
|
3263
|
+
for (var i = 0; i < rows.length; i++) {
|
|
3264
|
+
var rcell = this.grid.getContentTable().rows[parseInt(i.toString(), 10)]
|
|
3265
|
+
.cells[this.treeColumnIndex];
|
|
3266
|
+
var row = rows[parseInt(i.toString(), 10)];
|
|
3267
|
+
var rowData = this.grid.getRowsObject()[parseInt(i.toString(), 10)].data;
|
|
3268
|
+
var arg = { data: rowData, row: row, cell: rcell, column: this.getColumns()[this.treeColumnIndex] };
|
|
3269
|
+
this.renderModule.cellRender(arg);
|
|
3273
3270
|
}
|
|
3274
3271
|
};
|
|
3275
3272
|
TreeGrid.prototype.collapseRemoteChild = function (rowDetails, isChild) {
|
|
@@ -38,10 +38,12 @@ var Render = /** @class */ (function () {
|
|
|
38
38
|
var collapsed = (this.parent.initialRender && (!(isNullOrUndefined(parentData[this.parent.expandStateMapping]) ||
|
|
39
39
|
parentData[this.parent.expandStateMapping]) || this.parent.enableCollapseAll)) ||
|
|
40
40
|
!getExpandStatus(this.parent, args.data, this.parent.grid.getCurrentViewRecords());
|
|
41
|
-
if (collapsed) {
|
|
41
|
+
if (collapsed && !isNullOrUndefined(args.row)) {
|
|
42
42
|
args.row.style.display = 'none';
|
|
43
43
|
var rowsObj = this.parent.grid.getRowsObject();
|
|
44
|
-
|
|
44
|
+
if (!isNullOrUndefined(args.row.getAttribute('data-uid'))) {
|
|
45
|
+
rowsObj.filter(function (e) { return e.uid === args.row.getAttribute('data-uid'); })[0].visible = false;
|
|
46
|
+
}
|
|
45
47
|
}
|
|
46
48
|
}
|
|
47
49
|
if (isRemoteData(this.parent) && !isOffline(this.parent)) {
|
|
@@ -49,7 +51,7 @@ var Render = /** @class */ (function () {
|
|
|
49
51
|
var parentrec = this.parent.getCurrentViewRecords().filter(function (rec) {
|
|
50
52
|
return getValue(proxy_1.idMapping, rec) === getValue(proxy_1.parentIdMapping, data);
|
|
51
53
|
});
|
|
52
|
-
if (parentrec.length > 0 && !parentrec[0].isSummaryRow) {
|
|
54
|
+
if (parentrec.length > 0 && !parentrec[0].isSummaryRow && !isNullOrUndefined(args.row)) {
|
|
53
55
|
var display = parentrec[0].expanded ? 'table-row' : 'none';
|
|
54
56
|
args.row.setAttribute('style', 'display: ' + display + ';');
|
|
55
57
|
}
|
|
@@ -59,15 +61,17 @@ var Render = /** @class */ (function () {
|
|
|
59
61
|
if (summaryRow) {
|
|
60
62
|
addClass([args.row], 'e-summaryrow');
|
|
61
63
|
}
|
|
62
|
-
if (args.row
|
|
63
|
-
args.row.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
args.row.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
if (
|
|
70
|
-
|
|
64
|
+
if (!isNullOrUndefined(args.row)) {
|
|
65
|
+
if (args.row.querySelector('.e-treegridexpand')) {
|
|
66
|
+
args.row.setAttribute('aria-expanded', 'true');
|
|
67
|
+
}
|
|
68
|
+
else if (args.row.querySelector('.e-treegridcollapse')) {
|
|
69
|
+
args.row.setAttribute('aria-expanded', 'false');
|
|
70
|
+
}
|
|
71
|
+
if (this.parent.enableCollapseAll && this.parent.initialRender) {
|
|
72
|
+
if (!isNullOrUndefined(data.parentItem)) {
|
|
73
|
+
args.row.style.display = 'none';
|
|
74
|
+
}
|
|
71
75
|
}
|
|
72
76
|
}
|
|
73
77
|
var dragStartData = 'dragStartData';
|