@syncfusion/ej2-treegrid 19.4.41 → 19.4.50

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 : 19.4.41
3
+ * version : 19.4.50
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
@@ -47,19 +47,16 @@ class TreeGridHelper extends e2e_1.TestHelper {
47
47
  return this.selector('#' + this.id + ' .e-treegridcollapsed');
48
48
  }
49
49
  setModel(property, value) {
50
- let cy;
51
50
  return cy.get('#' + this.id).then((ele) => {
52
51
  return ele[0].ej2_instances[0][property] = value;
53
52
  });
54
53
  }
55
54
  getModel(property) {
56
- let cy;
57
55
  return cy.get('#' + this.id).then((ele) => {
58
56
  return ele[0].ej2_instances[0][property];
59
57
  });
60
58
  }
61
59
  invoke(fName, args = []) {
62
- let cy;
63
60
  return cy.get('#' + this.id).then((ele) => {
64
61
  var inst = ele[0].ej2_instances[0];
65
62
  return inst[fName].apply(inst, args);
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-treegrid@*",
3
- "_id": "@syncfusion/ej2-treegrid@19.4.38",
3
+ "_id": "@syncfusion/ej2-treegrid@19.4.47",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-NwDwtzhLP8hC/gjz6VcKbRdeMwAhQTOgXsLPqwNOBrpn4GLKk5BTqejDBL7mXEMy1NUJO/uJayEaV10xFh+mLA==",
5
+ "_integrity": "sha512-NYd8SKzN2/DomW0bAokurt48AiowfuQs3axS71x4rSgOBj+Gy+Ermmw5wa7in5HvIWPnpB8nGk61RacvnWTO8A==",
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": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-19.4.38.tgz",
28
- "_shasum": "e86288528d767c8bdb8b1653b00b2651d1cabacf",
27
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-19.4.47.tgz",
28
+ "_shasum": "817b480038e0c8b944692130dda7f7cddc0efee7",
29
29
  "_spec": "@syncfusion/ej2-treegrid@*",
30
30
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
31
31
  "author": {
@@ -36,10 +36,10 @@
36
36
  },
37
37
  "bundleDependencies": false,
38
38
  "dependencies": {
39
- "@syncfusion/ej2-base": "~19.4.38",
40
- "@syncfusion/ej2-data": "~19.4.38",
41
- "@syncfusion/ej2-grids": "~19.4.41",
42
- "@syncfusion/ej2-popups": "~19.4.41"
39
+ "@syncfusion/ej2-base": "~19.4.48",
40
+ "@syncfusion/ej2-data": "~19.4.50",
41
+ "@syncfusion/ej2-grids": "~19.4.50",
42
+ "@syncfusion/ej2-popups": "~19.4.50"
43
43
  },
44
44
  "deprecated": false,
45
45
  "description": "Essential JS 2 TreeGrid Component",
@@ -60,6 +60,6 @@
60
60
  "url": "git+https://github.com/syncfusion/ej2-treegrid.git"
61
61
  },
62
62
  "typings": "index.d.ts",
63
- "version": "19.4.41",
63
+ "version": "19.4.50",
64
64
  "sideEffects": false
65
65
  }
@@ -170,9 +170,9 @@ var ExcelExport = /** @class */ (function () {
170
170
  if (excelRow.type === 'excel') {
171
171
  var excelrowobj = excelRow.rowObj.data;
172
172
  var filtercolumnlength = this.parent.grid.filterSettings.columns.length;
173
+ var rowlength = excelRow.excelRows.length;
174
+ var rowlevel = excelrowobj.level;
173
175
  if (excelrowobj.parentItem && getParentData(this.parent, excelrowobj.parentItem.uniqueID, Boolean(filtercolumnlength))) {
174
- var rowlength = excelRow.excelRows.length;
175
- var rowlevel = excelrowobj.level;
176
176
  var expandedStatus = false;
177
177
  var sublevelState = false;
178
178
  var state = getExpandStatus(this.parent, excelrowobj, this.parent.parentData);
@@ -183,6 +183,9 @@ var ExcelExport = /** @class */ (function () {
183
183
  excelRow.excelRows[rowlength - 1].grouping = { outlineLevel: rowlevel, isCollapsed: sublevelState,
184
184
  isHidden: expandedStatus };
185
185
  }
186
+ else if (excelrowobj.hasChildRecords && isNullOrUndefined(excelrowobj.parentItem)) {
187
+ excelRow.excelRows[rowlength - 1].grouping = { outlineLevel: rowlevel };
188
+ }
186
189
  }
187
190
  };
188
191
  /* eslint-disable-next-line */
@@ -84,7 +84,10 @@ var VirtualScroll = /** @class */ (function () {
84
84
  record: row.record,
85
85
  count: this.parent.flatData.length
86
86
  };
87
- this.parent.grid.clearSelection();
87
+ if (this.parent.enableVirtualization && this.parent.selectionSettings.mode === 'Cell' ||
88
+ this.parent.selectionSettings.mode === 'Row' && !this.parent.selectionSettings.persistSelection) {
89
+ this.parent.grid.clearSelection();
90
+ }
88
91
  var requestType = getValue('isCollapseAll', this.parent) ? 'collapseAll' : 'refresh';
89
92
  getValue('grid.renderModule', this.parent).dataManagerSuccess(ret, { requestType: requestType });
90
93
  };
@@ -149,7 +152,7 @@ var VirtualScroll = /** @class */ (function () {
149
152
  if (pageingDetails.count < this.parent.getRows()[0].getBoundingClientRect().height) {
150
153
  startIndex = 0;
151
154
  }
152
- else {
155
+ else if (!this.parent['isExpandAll']) {
153
156
  startIndex = this.prevstartIndex === -1 ? 0 : this.prevstartIndex;
154
157
  }
155
158
  }
@@ -180,7 +180,9 @@ var TreeGrid = /** @class */ (function (_super) {
180
180
  * @returns {void}
181
181
  */
182
182
  TreeGrid.prototype.sortByColumn = function (columnName, direction, isMultiSort) {
183
- this.sortModule.sortColumn(columnName, direction, isMultiSort);
183
+ if (this.sortModule) {
184
+ this.sortModule.sortColumn(columnName, direction, isMultiSort);
185
+ }
184
186
  };
185
187
  /**
186
188
  * Clears all the sorted columns of the TreeGrid.
@@ -200,7 +202,9 @@ var TreeGrid = /** @class */ (function (_super) {
200
202
  * @hidden
201
203
  */
202
204
  TreeGrid.prototype.removeSortColumn = function (field) {
203
- this.sortModule.removeSortColumn(field);
205
+ if (this.sortModule) {
206
+ this.sortModule.removeSortColumn(field);
207
+ }
204
208
  };
205
209
  /**
206
210
  * Searches TreeGrid records using the given key.
@@ -559,6 +563,9 @@ var TreeGrid = /** @class */ (function (_super) {
559
563
  this.grid.isReact = true;
560
564
  this.grid.portals = [];
561
565
  }
566
+ if (this.isVue) {
567
+ this.grid.isVue = true;
568
+ }
562
569
  createSpinner({ target: this.element }, this.createElement);
563
570
  this.log(['mapping_fields_missing']);
564
571
  this.renderModule = new Render(this);
@@ -840,6 +847,16 @@ var TreeGrid = /** @class */ (function (_super) {
840
847
  }
841
848
  }
842
849
  }
850
+ var action = 'action';
851
+ if (_this.enableVirtualization && _this.selectionSettings.persistSelection && (_this.dataResults[action] === 'expand' || _this.dataResults[action] === 'collapse')) {
852
+ var refreshPersistSelection = 'refreshPersistSelection';
853
+ _this.grid.selectionModule[refreshPersistSelection]();
854
+ if (_this.grid.selectionSettings.type === 'Single') {
855
+ var updateRowSelection = 'updateRowSelection';
856
+ var index = _this.getCurrentViewRecords().indexOf(_this.grid.selectionModule['data']);
857
+ _this.grid.selectionModule[updateRowSelection](_this.getRows()[index], index);
858
+ }
859
+ }
843
860
  _this.trigger(events.dataBound, args);
844
861
  _this.initialRender = false;
845
862
  };
@@ -2074,7 +2091,7 @@ var TreeGrid = /** @class */ (function (_super) {
2074
2091
  gridColumn[prop] = gridColumns[i][prop];
2075
2092
  }
2076
2093
  this.columnModel.push(new Column(gridColumn));
2077
- if (field === this.columnModel[i].field && (!isNullOrUndefined(temp) && temp !== '')) {
2094
+ if (field === this.columnModel[i].field && this.columnModel[i].type !== 'checkbox' && (!isNullOrUndefined(temp) && temp !== '')) {
2078
2095
  this.columnModel[i].template = temp;
2079
2096
  }
2080
2097
  }
@@ -2438,7 +2455,12 @@ var TreeGrid = /** @class */ (function (_super) {
2438
2455
  });
2439
2456
  }
2440
2457
  else if (isNullOrUndefined(record)) {
2441
- record = this.grid.getCurrentViewRecords()[row.rowIndex];
2458
+ if (this.detailTemplate) {
2459
+ record = this.grid.getCurrentViewRecords()[row.getAttribute('aria-rowindex')];
2460
+ }
2461
+ else {
2462
+ record = this.grid.getCurrentViewRecords()[row.rowIndex];
2463
+ }
2442
2464
  }
2443
2465
  return record;
2444
2466
  };
@@ -38,10 +38,12 @@ var TreeVirtualRowModelGenerator = /** @class */ (function (_super) {
38
38
  return _super.prototype.getData.call(this);
39
39
  };
40
40
  TreeVirtualRowModelGenerator.prototype.generateRows = function (data, notifyArgs) {
41
- if (!isNullOrUndefined(notifyArgs.virtualInfo) && notifyArgs.virtualInfo.loadNext && notifyArgs.virtualInfo.nextInfo.page !== this.parent.pageSettings.currentPage) {
41
+ if (!isNullOrUndefined(notifyArgs.virtualInfo) && notifyArgs.virtualInfo.loadNext &&
42
+ notifyArgs.virtualInfo.nextInfo.page !== this.parent.pageSettings.currentPage) {
42
43
  this.parent.setProperties({ pageSettings: { currentPage: notifyArgs.virtualInfo.nextInfo.page } }, true);
43
44
  }
44
- else if (!isNullOrUndefined(notifyArgs.virtualInfo) && !notifyArgs.virtualInfo.loadNext && notifyArgs.virtualInfo.page !== this.parent.pageSettings.currentPage) {
45
+ else if (!isNullOrUndefined(notifyArgs.virtualInfo) && !notifyArgs.virtualInfo.loadNext &&
46
+ notifyArgs.virtualInfo.page !== this.parent.pageSettings.currentPage) {
45
47
  this.parent.setProperties({ pageSettings: { currentPage: notifyArgs.virtualInfo.page } }, true);
46
48
  }
47
49
  var info = this.getDataInfo();
@@ -425,6 +425,7 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
425
425
  var replace = 'replaceWith';
426
426
  this.getTable().querySelector('tbody')[replace](target);
427
427
  if (!this.isExpandCollapse || this.translateY === 0) {
428
+ this.translateY = this.translateY < 0 ? 0 : this.translateY;
428
429
  getValue('virtualEle', this).adjustTable(cOffset, this.translateY);
429
430
  }
430
431
  else {
@@ -63,7 +63,6 @@
63
63
  .e-input-group.e-control-wrapper.e-ddl .e-input[readonly],
64
64
  .e-float-input.e-control-wrapper.e-ddl input[readonly] {
65
65
  background: transparent;
66
- color: inherit;
67
66
  }
68
67
 
69
68
  .e-input-group.e-control-wrapper.e-ddl.e-readonly .e-input[readonly],
@@ -165,6 +164,7 @@
165
164
  }
166
165
  }
167
166
 
167
+ /*! Toolbar's bootstrap5 theme wise override definitions and variables */
168
168
  .e-treegrid .e-treegridexpand::before,
169
169
  .e-treegrid .e-treegridcollapse::before {
170
170
  content: '\e75c';
@@ -63,7 +63,6 @@
63
63
  .e-input-group.e-control-wrapper.e-ddl .e-input[readonly],
64
64
  .e-float-input.e-control-wrapper.e-ddl input[readonly] {
65
65
  background: transparent;
66
- color: inherit;
67
66
  }
68
67
 
69
68
  .e-input-group.e-control-wrapper.e-ddl.e-readonly .e-input[readonly],
@@ -165,6 +164,7 @@
165
164
  }
166
165
  }
167
166
 
167
+ /*! Toolbar's bootstrap5 theme wise override definitions and variables */
168
168
  .e-treegrid .e-treegridexpand::before,
169
169
  .e-treegrid .e-treegridcollapse::before {
170
170
  content: '\e75c';
@@ -63,7 +63,6 @@
63
63
  .e-input-group.e-control-wrapper.e-ddl .e-input[readonly],
64
64
  .e-float-input.e-control-wrapper.e-ddl input[readonly] {
65
65
  background: transparent;
66
- color: inherit;
67
66
  }
68
67
 
69
68
  .e-input-group.e-control-wrapper.e-ddl.e-readonly .e-input[readonly],
@@ -165,6 +164,7 @@
165
164
  }
166
165
  }
167
166
 
167
+ /*! Toolbar's bootstrap5 theme wise override definitions and variables */
168
168
  .e-treegrid .e-treegridexpand::before,
169
169
  .e-treegrid .e-treegridcollapse::before {
170
170
  content: '\e75c';
@@ -63,7 +63,6 @@
63
63
  .e-input-group.e-control-wrapper.e-ddl .e-input[readonly],
64
64
  .e-float-input.e-control-wrapper.e-ddl input[readonly] {
65
65
  background: transparent;
66
- color: inherit;
67
66
  }
68
67
 
69
68
  .e-input-group.e-control-wrapper.e-ddl.e-readonly .e-input[readonly],
@@ -165,6 +164,7 @@
165
164
  }
166
165
  }
167
166
 
167
+ /*! Toolbar's bootstrap5 theme wise override definitions and variables */
168
168
  .e-treegrid .e-treegridexpand::before,
169
169
  .e-treegrid .e-treegridcollapse::before {
170
170
  content: '\e75c';