@syncfusion/ej2-treegrid 21.1.41 → 21.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 +24 -1
- 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 +55 -42
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +58 -47
- 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/base/treegrid.js +42 -35
- 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.4
|
|
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.
|
|
3
|
+
"_id": "@syncfusion/ej2-treegrid@21.2.3",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-pnNlc+xmVp2HSWThhMjSVX88ro8KbjBqpDmXOBTdzSHrnm+ndxCq7ZXGdgkCe7S5iXL5KA3bgJhUKNSOVdd55g==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-treegrid",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"/@syncfusion/ej2-react-treegrid",
|
|
25
25
|
"/@syncfusion/ej2-vue-treegrid"
|
|
26
26
|
],
|
|
27
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-21.
|
|
28
|
-
"_shasum": "
|
|
27
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-21.2.3.tgz",
|
|
28
|
+
"_shasum": "bd3a3fc2dbc73a3eebc6fec6d55827feacec0da2",
|
|
29
29
|
"_spec": "@syncfusion/ej2-treegrid@*",
|
|
30
30
|
"_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
|
|
31
31
|
"author": {
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
},
|
|
37
37
|
"bundleDependencies": false,
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@syncfusion/ej2-base": "~21.
|
|
40
|
-
"@syncfusion/ej2-data": "~21.
|
|
41
|
-
"@syncfusion/ej2-grids": "~21.
|
|
42
|
-
"@syncfusion/ej2-popups": "~21.
|
|
39
|
+
"@syncfusion/ej2-base": "~21.2.3",
|
|
40
|
+
"@syncfusion/ej2-data": "~21.2.4",
|
|
41
|
+
"@syncfusion/ej2-grids": "~21.2.4",
|
|
42
|
+
"@syncfusion/ej2-popups": "~21.2.4"
|
|
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": "21.
|
|
69
|
+
"version": "21.2.4",
|
|
70
70
|
"sideEffects": false
|
|
71
71
|
}
|
|
@@ -309,13 +309,18 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
309
309
|
break;
|
|
310
310
|
case 'downArrow':
|
|
311
311
|
if (!this.enableVirtualization) {
|
|
312
|
-
|
|
312
|
+
target = e.target;
|
|
313
|
+
parentTarget = target.parentElement;
|
|
314
|
+
var cellIndex = parentTarget.cellIndex;
|
|
315
|
+
if (this.grid.getColumnByIndex(cellIndex).editType === 'dropdownedit' && isNullOrUndefined(this.grid.getColumnByIndex(cellIndex).edit["obj"])) {
|
|
316
|
+
parentTarget = target;
|
|
317
|
+
}
|
|
313
318
|
summaryElement = this.findnextRowElement(parentTarget);
|
|
314
319
|
if (summaryElement !== null) {
|
|
315
320
|
var rowIndex = summaryElement.rowIndex;
|
|
316
321
|
this.selectRow(rowIndex);
|
|
317
|
-
var
|
|
318
|
-
var row_1 = summaryElement.children[parseInt(
|
|
322
|
+
var cellIndex_1 = e.target.cellIndex;
|
|
323
|
+
var row_1 = summaryElement.children[parseInt(cellIndex_1.toString(), 10)];
|
|
319
324
|
addClass([row_1], 'e-focused');
|
|
320
325
|
addClass([row_1], 'e-focus');
|
|
321
326
|
}
|
|
@@ -326,7 +331,12 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
326
331
|
break;
|
|
327
332
|
case 'upArrow':
|
|
328
333
|
if (!this.enableVirtualization) {
|
|
329
|
-
|
|
334
|
+
target = e.target;
|
|
335
|
+
parentTarget = target.parentElement;
|
|
336
|
+
var cellIndex = parentTarget.cellIndex;
|
|
337
|
+
if (this.grid.getColumnByIndex(cellIndex).editType === 'dropdownedit' && isNullOrUndefined(this.grid.getColumnByIndex(cellIndex).edit["obj"])) {
|
|
338
|
+
parentTarget = target;
|
|
339
|
+
}
|
|
330
340
|
summaryElement = this.findPreviousRowElement(parentTarget);
|
|
331
341
|
if (summaryElement !== null) {
|
|
332
342
|
var rIndex = summaryElement.rowIndex;
|
|
@@ -1067,7 +1077,25 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
1067
1077
|
};
|
|
1068
1078
|
};
|
|
1069
1079
|
TreeGrid.prototype.updateRowTemplate = function () {
|
|
1070
|
-
this
|
|
1080
|
+
var _this = this;
|
|
1081
|
+
if (this.rowTemplate) {
|
|
1082
|
+
if (this.isReact && this.getContentTable().rows.length === 0) {
|
|
1083
|
+
setTimeout(function () {
|
|
1084
|
+
_this.treeColumnRowTemplate();
|
|
1085
|
+
if (_this.enableCollapseAll) {
|
|
1086
|
+
var currentData = _this.getCurrentViewRecords();
|
|
1087
|
+
var rows = _this.getContentTable().rows;
|
|
1088
|
+
for (var i = 0; i < rows.length; i++) {
|
|
1089
|
+
var args = { data: currentData[parseInt(i.toString(), 10)], row: rows[parseInt(i.toString(), 10)] };
|
|
1090
|
+
_this.renderModule.RowModifier(args);
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
}, 0);
|
|
1094
|
+
}
|
|
1095
|
+
else {
|
|
1096
|
+
this.treeColumnRowTemplate();
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1071
1099
|
};
|
|
1072
1100
|
TreeGrid.prototype.bindedDataSource = function () {
|
|
1073
1101
|
var dataSource = 'dataSource';
|
|
@@ -1110,25 +1138,6 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
1110
1138
|
if (requestType === 'reorder') {
|
|
1111
1139
|
_this.notify('getColumnIndex', {});
|
|
1112
1140
|
}
|
|
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
1141
|
if (isRemoteData(_this) && _this.enableVirtualization) {
|
|
1133
1142
|
if (args.requestType === 'virtualscroll') {
|
|
1134
1143
|
_this.query.expand('VirtualScrollingAction');
|
|
@@ -3259,17 +3268,15 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3259
3268
|
}
|
|
3260
3269
|
};
|
|
3261
3270
|
TreeGrid.prototype.treeColumnRowTemplate = function () {
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
this.renderModule.cellRender(arg);
|
|
3272
|
-
}
|
|
3271
|
+
var rows = this.getContentTable().rows;
|
|
3272
|
+
rows = [].slice.call(rows);
|
|
3273
|
+
for (var i = 0; i < rows.length; i++) {
|
|
3274
|
+
var rcell = this.grid.getContentTable().rows[parseInt(i.toString(), 10)]
|
|
3275
|
+
.cells[this.treeColumnIndex];
|
|
3276
|
+
var row = rows[parseInt(i.toString(), 10)];
|
|
3277
|
+
var rowData = this.grid.getRowsObject()[parseInt(i.toString(), 10)].data;
|
|
3278
|
+
var arg = { data: rowData, row: row, cell: rcell, column: this.getColumns()[this.treeColumnIndex] };
|
|
3279
|
+
this.renderModule.cellRender(arg);
|
|
3273
3280
|
}
|
|
3274
3281
|
};
|
|
3275
3282
|
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';
|