@syncfusion/ej2-treegrid 21.1.38 → 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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 21.1.38
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.37",
3
+ "_id": "@syncfusion/ej2-treegrid@21.1.41",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-KcFFYzCZtqS5yaixGRtSjaScyvmUZY/3fg3cPrBbHEDte8vAGk+qrGY1PNYS29TDZFeu5aIhYt95HNR/VGOO8Q==",
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-angular-treegrid",
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.37.tgz",
28
- "_shasum": "d761d0f0b6ef1c633daafc06f62d46416a8ce26f",
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.1.38",
40
- "@syncfusion/ej2-data": "~21.1.38",
41
- "@syncfusion/ej2-grids": "~21.1.38",
42
- "@syncfusion/ej2-popups": "~21.1.37"
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.1.38",
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.treeColumnRowTemplate();
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';
@@ -3240,17 +3258,15 @@ var TreeGrid = /** @class */ (function (_super) {
3240
3258
  }
3241
3259
  };
3242
3260
  TreeGrid.prototype.treeColumnRowTemplate = function () {
3243
- if (this.rowTemplate) {
3244
- var rows = this.getContentTable().rows;
3245
- rows = [].slice.call(rows);
3246
- for (var i = 0; i < rows.length; i++) {
3247
- var rcell = this.grid.getContentTable().rows[parseInt(i.toString(), 10)]
3248
- .cells[this.treeColumnIndex];
3249
- var row = rows[parseInt(i.toString(), 10)];
3250
- var rowData = this.grid.getRowsObject()[parseInt(i.toString(), 10)].data;
3251
- var arg = { data: rowData, row: row, cell: rcell, column: this.getColumns()[this.treeColumnIndex] };
3252
- this.renderModule.cellRender(arg);
3253
- }
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);
3254
3270
  }
3255
3271
  };
3256
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
- rowsObj.filter(function (e) { return e.uid === args.row.getAttribute('data-uid'); })[0].visible = false;
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,20 +61,23 @@ var Render = /** @class */ (function () {
59
61
  if (summaryRow) {
60
62
  addClass([args.row], 'e-summaryrow');
61
63
  }
62
- if (args.row.querySelector('.e-treegridexpand')) {
63
- args.row.setAttribute('aria-expanded', 'true');
64
- }
65
- else if (args.row.querySelector('.e-treegridcollapse')) {
66
- args.row.setAttribute('aria-expanded', 'false');
67
- }
68
- if (this.parent.enableCollapseAll && this.parent.initialRender) {
69
- if (!isNullOrUndefined(data.parentItem)) {
70
- args.row.style.display = 'none';
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
  }
77
+ var dragStartData = 'dragStartData';
73
78
  var draggedRecord = 'draggedRecord';
74
- if (!isNullOrUndefined(this.parent.rowDragAndDropModule) && !isNullOrUndefined(this.parent.rowDragAndDropModule["" + draggedRecord])
75
- && this.parent.getContentTable().scrollHeight <= this.parent.getContent().clientHeight) {
79
+ if (this.parent.rowDragAndDropModule && this.parent.grid.rowDragAndDropModule && (this.parent.grid.rowDragAndDropModule["" + dragStartData] ||
80
+ this.parent.rowDragAndDropModule["" + draggedRecord]) && this.parent.getContentTable().scrollHeight <= this.parent.getContent().clientHeight) {
76
81
  var lastRowBorder = 'lastRowBorder';
77
82
  var lastVisualData = this.parent.getVisibleRecords()[this.parent.getVisibleRecords().length - 1];
78
83
  if (lastVisualData.uniqueID === args.data.uniqueID && !isNullOrUndefined(args.row) && !args.row.cells[0].classList.contains('e-lastrowcell')) {