@syncfusion/ej2-treegrid 20.2.49 → 20.3.48

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.
Files changed (88) hide show
  1. package/CHANGELOG.md +3 -53
  2. package/dist/ej2-treegrid.min.js +10 -0
  3. package/dist/ej2-treegrid.umd.min.js +2 -2
  4. package/dist/ej2-treegrid.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-treegrid.es2015.js +376 -57
  6. package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
  7. package/dist/es6/ej2-treegrid.es5.js +405 -62
  8. package/dist/es6/ej2-treegrid.es5.js.map +1 -1
  9. package/dist/global/ej2-treegrid.min.js +2 -2
  10. package/dist/global/ej2-treegrid.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +10 -10
  13. package/src/treegrid/actions/clipboard.d.ts +3 -2
  14. package/src/treegrid/actions/clipboard.js +3 -2
  15. package/src/treegrid/actions/context-menu.js +1 -1
  16. package/src/treegrid/actions/crud-actions.js +4 -0
  17. package/src/treegrid/actions/edit.js +33 -6
  18. package/src/treegrid/actions/freeze-column.d.ts +1 -0
  19. package/src/treegrid/actions/freeze-column.js +39 -3
  20. package/src/treegrid/actions/rowdragdrop.js +8 -5
  21. package/src/treegrid/actions/selection.js +2 -2
  22. package/src/treegrid/actions/virtual-scroll.js +7 -4
  23. package/src/treegrid/base/constant.d.ts +28 -0
  24. package/src/treegrid/base/constant.js +28 -0
  25. package/src/treegrid/base/data.d.ts +1 -0
  26. package/src/treegrid/base/data.js +3 -2
  27. package/src/treegrid/base/treegrid-model.d.ts +1 -1
  28. package/src/treegrid/base/treegrid.d.ts +2 -0
  29. package/src/treegrid/base/treegrid.js +33 -9
  30. package/src/treegrid/renderer/virtual-row-model-generator.js +4 -0
  31. package/src/treegrid/renderer/virtual-tree-content-render.d.ts +3 -0
  32. package/src/treegrid/renderer/virtual-tree-content-render.js +68 -9
  33. package/src/treegrid/renderer/virtual-tree-freeze-render.d.ts +59 -0
  34. package/src/treegrid/renderer/virtual-tree-freeze-render.js +163 -0
  35. package/styles/bootstrap-dark.css +5 -1
  36. package/styles/bootstrap.css +5 -1
  37. package/styles/bootstrap4.css +5 -1
  38. package/styles/bootstrap5-dark.css +7 -2
  39. package/styles/bootstrap5.css +7 -2
  40. package/styles/fabric-dark.css +5 -1
  41. package/styles/fabric.css +5 -1
  42. package/styles/fluent-dark.css +6 -2
  43. package/styles/fluent.css +6 -2
  44. package/styles/highcontrast-light.css +5 -1
  45. package/styles/highcontrast.css +5 -1
  46. package/styles/material-dark.css +5 -1
  47. package/styles/material.css +5 -1
  48. package/styles/tailwind-dark.css +5 -1
  49. package/styles/tailwind.css +5 -1
  50. package/styles/treegrid/_all.scss +1 -1
  51. package/styles/treegrid/_bootstrap-dark-definition.scss +1 -1
  52. package/styles/treegrid/_bootstrap-definition.scss +1 -2
  53. package/styles/treegrid/_bootstrap4-definition.scss +0 -1
  54. package/styles/treegrid/_bootstrap5-definition.scss +0 -1
  55. package/styles/treegrid/_fabric-dark-definition.scss +1 -2
  56. package/styles/treegrid/_fabric-definition.scss +1 -2
  57. package/styles/treegrid/_fluent-definition.scss +0 -1
  58. package/styles/treegrid/_fusionnew-definition.scss +0 -1
  59. package/styles/treegrid/_highcontrast-definition.scss +0 -1
  60. package/styles/treegrid/_highcontrast-light-definition.scss +0 -2
  61. package/styles/treegrid/_icons.scss +1 -1
  62. package/styles/treegrid/_layout.scss +4 -4
  63. package/styles/treegrid/_material-definition.scss +0 -1
  64. package/styles/treegrid/_material3-definition.scss +0 -1
  65. package/styles/treegrid/_tailwind-definition.scss +0 -1
  66. package/styles/treegrid/_theme.scss +1 -0
  67. package/styles/treegrid/bootstrap-dark.css +5 -1
  68. package/styles/treegrid/bootstrap.css +5 -1
  69. package/styles/treegrid/bootstrap4.css +5 -1
  70. package/styles/treegrid/bootstrap5-dark.css +7 -2
  71. package/styles/treegrid/bootstrap5.css +7 -2
  72. package/styles/treegrid/fabric-dark.css +5 -1
  73. package/styles/treegrid/fabric.css +5 -1
  74. package/styles/treegrid/fluent-dark.css +6 -2
  75. package/styles/treegrid/fluent.css +6 -2
  76. package/styles/treegrid/highcontrast-light.css +5 -1
  77. package/styles/treegrid/highcontrast.css +5 -1
  78. package/styles/treegrid/icons/_bootstrap-dark.scss +1 -1
  79. package/styles/treegrid/icons/_bootstrap.scss +1 -1
  80. package/styles/treegrid/icons/_bootstrap4.scss +1 -1
  81. package/styles/treegrid/icons/_fabric-dark.scss +1 -1
  82. package/styles/treegrid/icons/_fabric.scss +1 -1
  83. package/styles/treegrid/icons/_highcontrast-light.scss +1 -1
  84. package/styles/treegrid/icons/_material-dark.scss +1 -1
  85. package/styles/treegrid/material-dark.css +5 -1
  86. package/styles/treegrid/material.css +5 -1
  87. package/styles/treegrid/tailwind-dark.css +5 -1
  88. package/styles/treegrid/tailwind.css +5 -1
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 20.2.49
3
+ * version : 20.3.48
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@20.2.46",
3
+ "_id": "@syncfusion/ej2-treegrid@20.3.47",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-0SyT77dBgVOM2dMvYAZTKTa1lbiUkc2eAQXOWT+BUE0AS5gJZu2W7kNchvvayJVtor/3u3SkoUVg8lOsDy3eUw==",
5
+ "_integrity": "sha512-h6rSxBpMoZDLav2suqY58wIzpy42bpTtxPL/2APnJc98TC6Nk2c7seEgn4iJkc2hJ7AzZ+BEaTpJU72+r+W7vg==",
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-20.2.46.tgz",
28
- "_shasum": "f7e5f74d66bffde32c3c7b995b213375cc3773c9",
27
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-20.3.47.tgz",
28
+ "_shasum": "1847003b673227740c5a591d0292fe16bc4615b8",
29
29
  "_spec": "@syncfusion/ej2-treegrid@*",
30
30
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
31
31
  "author": {
@@ -36,15 +36,15 @@
36
36
  },
37
37
  "bundleDependencies": false,
38
38
  "dependencies": {
39
- "@syncfusion/ej2-base": "~20.2.48",
40
- "@syncfusion/ej2-data": "~20.2.45",
41
- "@syncfusion/ej2-grids": "~20.2.49",
42
- "@syncfusion/ej2-popups": "~20.2.49"
39
+ "@syncfusion/ej2-base": "~20.3.48",
40
+ "@syncfusion/ej2-data": "~20.3.47",
41
+ "@syncfusion/ej2-grids": "~20.3.48",
42
+ "@syncfusion/ej2-popups": "~20.3.48"
43
43
  },
44
44
  "deprecated": false,
45
45
  "description": "Essential JS 2 TreeGrid Component",
46
46
  "devDependencies": {},
47
- "es2015": "./dist/es6/ej2-treegrid.es2015.js",
47
+ "es2015": "./dist/es6/ej2-treegrid.es5.js",
48
48
  "homepage": "https://github.com/syncfusion/ej2-treegrid#readme",
49
49
  "keywords": [
50
50
  "ej2",
@@ -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": "20.2.49",
63
+ "version": "20.3.48",
64
64
  "sideEffects": false
65
65
  }
@@ -2,7 +2,7 @@
2
2
  * clipboard.ts file
3
3
  */
4
4
  import { TreeGrid } from '../base/treegrid';
5
- import { Clipboard as GridClipboard } from '@syncfusion/ej2-grids';
5
+ import { Clipboard as GridClipboard, ServiceLocator } from '@syncfusion/ej2-grids';
6
6
  /**
7
7
  * The `Clipboard` module is used to handle clipboard copy action.
8
8
  *
@@ -12,7 +12,8 @@ export declare class TreeClipboard extends GridClipboard {
12
12
  private treeGridParent;
13
13
  private treeCopyContent;
14
14
  private copiedUniqueIdCollection;
15
- constructor(parent?: TreeGrid);
15
+ protected serviceLocator: ServiceLocator;
16
+ constructor(parent?: TreeGrid, serviceLocator?: ServiceLocator);
16
17
  protected setCopyData(withHeader?: boolean): void;
17
18
  private parentContentData;
18
19
  copy(withHeader?: boolean): void;
@@ -21,11 +21,12 @@ import { Clipboard as GridClipboard } from '@syncfusion/ej2-grids';
21
21
  */
22
22
  var TreeClipboard = /** @class */ (function (_super) {
23
23
  __extends(TreeClipboard, _super);
24
- function TreeClipboard(parent) {
25
- var _this = _super.call(this, parent.grid) || this;
24
+ function TreeClipboard(parent, serviceLocator) {
25
+ var _this = _super.call(this, parent.grid, serviceLocator) || this;
26
26
  _this.treeCopyContent = '';
27
27
  _this.copiedUniqueIdCollection = [];
28
28
  _this.treeGridParent = parent;
29
+ _this.serviceLocator = serviceLocator;
29
30
  return _this;
30
31
  }
31
32
  TreeClipboard.prototype.setCopyData = function (withHeader) {
@@ -36,7 +36,7 @@ var ContextMenu = /** @class */ (function () {
36
36
  var indent = select('#' + this.parent.element.id + '_gridcontrol_cmenu_Indent', args.element);
37
37
  var outdent = select('#' + this.parent.element.id + '_gridcontrol_cmenu_Outdent', args.element);
38
38
  if (addRow) {
39
- if (this.parent.grid.editSettings.allowAdding === false) {
39
+ if (this.parent.grid.editSettings.allowAdding === false || this.parent.grid.isEdit) {
40
40
  addRow.style.display = 'none';
41
41
  }
42
42
  else {
@@ -306,6 +306,10 @@ export function updateParentRow(key, record, action, control, isSelfReference, c
306
306
  index_1 = i;
307
307
  return;
308
308
  } });
309
+ if (control.enableVirtualization && isNullOrUndefined(index_1)) {
310
+ var updatedParent = getValue('uniqueIDCollection.' + child.parentUniqueID, control);
311
+ record = updatedParent;
312
+ }
309
313
  if (!isNullOrUndefined(index_1)) {
310
314
  record = currentRecords[index_1];
311
315
  }
@@ -241,6 +241,10 @@ var Edit = /** @class */ (function () {
241
241
  }
242
242
  this.updateGridEditMode('Batch');
243
243
  }
244
+ else if (this.parent.editSettings.mode === 'Cell' && (!column.allowEditing || column.isPrimaryKey)) {
245
+ this.isOnBatch = true;
246
+ this.updateGridEditMode('Batch');
247
+ }
244
248
  };
245
249
  Edit.prototype.updateGridEditMode = function (mode) {
246
250
  this.parent.grid.setProperties({ editSettings: { mode: mode } }, true);
@@ -313,6 +317,9 @@ var Edit = /** @class */ (function () {
313
317
  args.cancel = true;
314
318
  }
315
319
  }
320
+ if (this.parent.enableVirtualization) {
321
+ this.parent.grid.contentModule['editedRowIndex'] = this.parent.grid.editModule.editModule['index'];
322
+ }
316
323
  // if (this.isAdd && this.parent.editSettings.mode === 'Batch' && !args.cell.parentElement.classList.contains('e-insertedrow')) {
317
324
  // this.isAdd = false;
318
325
  // }
@@ -432,6 +439,9 @@ var Edit = /** @class */ (function () {
432
439
  this.parent.grid.isEdit = true;
433
440
  }
434
441
  }
442
+ if (this.parent.enableVirtualization) {
443
+ this.parent.grid.contentModule['virtualData'] = {};
444
+ }
435
445
  };
436
446
  Edit.prototype.afterCellSave = function (args, row, rowIndex) {
437
447
  var mRow;
@@ -681,7 +691,12 @@ var Edit = /** @class */ (function () {
681
691
  if (isVirtualization) {
682
692
  this.prevAriaRowIndex = '-1';
683
693
  }
684
- focussedElement.focus();
694
+ if (!this.parent.enableVirtualization || this.parent.enableVirtualization && !Object.keys(this.parent.grid.contentModule['emptyRowData']).length) {
695
+ focussedElement.focus();
696
+ }
697
+ if (this.parent.enableVirtualization && !Object.keys(this.parent.grid.contentModule['emptyRowData']).length) {
698
+ this.parent.grid.contentModule['createEmptyRowdata']();
699
+ }
685
700
  }
686
701
  }
687
702
  if (this.parent.editSettings.mode === 'Batch' && !isNullOrUndefined(this.addRowIndex) && this.addRowIndex !== -1 && this['isAddedRowByMethod'] && !this.isAddedRowByContextMenu) {
@@ -805,6 +820,9 @@ var Edit = /** @class */ (function () {
805
820
  }
806
821
  if (this.isAddedRowByMethod && (this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)) {
807
822
  this.addRowRecord = this.parent.flatData[this.parent.grid.selectedRowIndex];
823
+ if (this.parent.enableVirtualization && this.isAddedRowByContextMenu) {
824
+ this.addRowRecord = this.parent.getCurrentViewRecords()[this.addRowIndex];
825
+ }
808
826
  }
809
827
  else {
810
828
  this.addRowRecord = this.parent.getSelectedRecords()[0];
@@ -841,15 +859,18 @@ var Edit = /** @class */ (function () {
841
859
  var position = null;
842
860
  value.taskData = isNullOrUndefined(value.taskData) ? extend({}, args.data) : value.taskData;
843
861
  var currentData = void 0;
844
- if (this.parent.editSettings.mode === 'Batch' && this['isAddedRowByMethod'] && !isNullOrUndefined(this.addRowIndex)) {
862
+ if (this.parent.enableVirtualization && args.index !== 0) {
863
+ currentData = this.parent.flatData;
864
+ }
865
+ else if (this.parent.editSettings.mode === 'Batch' && this['isAddedRowByMethod'] && !isNullOrUndefined(this.addRowIndex)) {
845
866
  currentData = this.batchEditModule['batchRecords'];
846
867
  }
847
868
  else {
848
869
  currentData = this.parent.grid.getCurrentViewRecords();
849
870
  }
850
871
  if (this.parent.enableVirtualization && args.index !== 0) {
851
- this.addRowIndex = this.parent.grid.getCurrentViewRecords().indexOf(this.addRowRecord);
852
- this.selectedIndex = parseInt(this.parent.getRows()[this.addRowIndex].getAttribute('data-rowindex'), 10);
872
+ this.addRowIndex = this.parent.flatData.indexOf(this.addRowRecord);
873
+ this.selectedIndex = this.addRowIndex;
853
874
  }
854
875
  var index = this.addRowIndex;
855
876
  value.uniqueID = getUid(this.parent.element.id + '_data_');
@@ -863,7 +884,8 @@ var Edit = /** @class */ (function () {
863
884
  var rows = this.parent.getRows();
864
885
  var firstAriaIndex = rows.length ? currentData.indexOf(currentData[0]) : 0;
865
886
  var lastAriaIndex = rows.length ? +rows[rows.length - 1].getAttribute('data-rowindex') : 0;
866
- var withinRange = this.selectedIndex >= firstAriaIndex && this.selectedIndex <= lastAriaIndex;
887
+ var withinRange = this.parent.enableVirtualization && args.index !== 0 ? true :
888
+ this.selectedIndex >= firstAriaIndex && this.selectedIndex <= lastAriaIndex;
867
889
  if (currentData.length) {
868
890
  idMapping = currentData[this.addRowIndex][this.parent.idMapping];
869
891
  parentIdMapping = currentData[this.addRowIndex][this.parent.parentIdMapping];
@@ -899,7 +921,12 @@ var Edit = /** @class */ (function () {
899
921
  }
900
922
  index = (childRecordCount1 > 0) ? (currentDataIndex1 + childRecordCount1) : (currentDataIndex1);
901
923
  if (this.isSelfReference) {
902
- value.taskData[this.parent.parentIdMapping] = value[this.parent.parentIdMapping] = idMapping;
924
+ if (!this.parent.isLocalData && this.parent.editModule.selectedIndex === -1) {
925
+ value.taskData[this.parent.parentIdMapping] = value[this.parent.parentIdMapping] = null;
926
+ }
927
+ else {
928
+ value.taskData[this.parent.parentIdMapping] = value[this.parent.parentIdMapping] = idMapping;
929
+ }
903
930
  if (!isNullOrUndefined(value.parentItem)) {
904
931
  updateParentRow(key, value.parentItem, 'add', this.parent, this.isSelfReference, value);
905
932
  }
@@ -14,6 +14,7 @@ export declare class Freeze {
14
14
  constructor(parent?: TreeGrid);
15
15
  addEventListener(): void;
16
16
  removeEventListener(): void;
17
+ protected instantiateRenderer(): void;
17
18
  private rowExpandCollapse;
18
19
  private dblClickHandler;
19
20
  private dataBoundArg;
@@ -1,6 +1,7 @@
1
- import { parentsUntil } from '@syncfusion/ej2-grids';
1
+ import { ColumnFreezeContentRenderer, ColumnFreezeHeaderRenderer, FreezeContentRender, FreezeRender, parentsUntil, RenderType } from '@syncfusion/ej2-grids';
2
2
  import { Grid, Freeze as FreezeColumn } from '@syncfusion/ej2-grids';
3
- import { addClass } from '@syncfusion/ej2-base';
3
+ import { addClass, getValue } from '@syncfusion/ej2-base';
4
+ import { ColumnVirtualTreeFreezeRenderer, VirtualTreeFreezeRenderer, VirtualTreeFreezeHdrRenderer } from '../renderer/virtual-tree-freeze-render';
4
5
  /**
5
6
  * TreeGrid Freeze module
6
7
  *
@@ -21,6 +22,7 @@ var Freeze = /** @class */ (function () {
21
22
  this.parent.on('rowExpandCollapse', this.rowExpandCollapse, this);
22
23
  this.parent.on('dataBoundArg', this.dataBoundArg, this);
23
24
  this.parent.grid.on('dblclick', this.dblClickHandler, this);
25
+ this.parent.grid.on('initial-load', this.instantiateRenderer, this);
24
26
  };
25
27
  Freeze.prototype.removeEventListener = function () {
26
28
  if (this.parent.isDestroyed) {
@@ -29,6 +31,40 @@ var Freeze = /** @class */ (function () {
29
31
  this.parent.off('rowExpandCollapse', this.rowExpandCollapse);
30
32
  this.parent.off('dataBoundArg', this.dataBoundArg);
31
33
  this.parent.grid.off('dblclick', this.dblClickHandler);
34
+ this.parent.grid.off('initial-load', this.instantiateRenderer);
35
+ };
36
+ Freeze.prototype.instantiateRenderer = function () {
37
+ var renderer = getValue('serviceLocator', this.parent.grid).getService('rendererFactory');
38
+ if (this.parent.getFrozenColumns()) {
39
+ if (this.parent.enableColumnVirtualization) {
40
+ getValue('addRenderer', renderer)
41
+ .apply(renderer, [RenderType.Header, new VirtualTreeFreezeHdrRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
42
+ }
43
+ else {
44
+ getValue('addRenderer', renderer)
45
+ .apply(renderer, [RenderType.Header, new FreezeRender(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
46
+ }
47
+ if (this.parent.enableVirtualization) {
48
+ getValue('addRenderer', renderer)
49
+ .apply(renderer, [RenderType.Content, new VirtualTreeFreezeRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
50
+ }
51
+ else {
52
+ getValue('addRenderer', renderer)
53
+ .apply(renderer, [RenderType.Content, new FreezeContentRender(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
54
+ }
55
+ }
56
+ if (this.parent.getFrozenLeftColumnsCount() || this.parent.getFrozenRightColumnsCount()) {
57
+ getValue('addRenderer', renderer)
58
+ .apply(renderer, [RenderType.Header, new ColumnFreezeHeaderRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
59
+ if (this.parent.enableVirtualization) {
60
+ getValue('addRenderer', renderer)
61
+ .apply(renderer, [RenderType.Content, new ColumnVirtualTreeFreezeRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
62
+ }
63
+ else {
64
+ getValue('addRenderer', renderer)
65
+ .apply(renderer, [RenderType.Content, new ColumnFreezeContentRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
66
+ }
67
+ }
32
68
  };
33
69
  Freeze.prototype.rowExpandCollapse = function (args) {
34
70
  var movableRows = this.parent.getMovableDataRows();
@@ -73,7 +109,7 @@ var Freeze = /** @class */ (function () {
73
109
  };
74
110
  Freeze.prototype.dblClickHandler = function (e) {
75
111
  if (parentsUntil(e.target, 'e-rowcell') &&
76
- this.parent.grid.editSettings.allowEditOnDblClick && this.parent.editSettings.mode !== 'Cell') {
112
+ this.parent.grid.editSettings.allowEditOnDblClick && this.parent.editSettings.mode !== 'Cell' && (!e.target['classList'].contains('e-treegridcollapse') && !e.target['classList'].contains('e-treegridexpand'))) {
77
113
  this.parent.grid.editModule.startEdit(parentsUntil(e.target, 'e-row'));
78
114
  }
79
115
  };
@@ -183,13 +183,16 @@ var RowDD = /** @class */ (function () {
183
183
  for (var i = 0; i < tObj.getCurrentViewRecords().length; i++) {
184
184
  if (tObj.getCurrentViewRecords()[i].taskData === record_1.parentItem.taskData) {
185
185
  dropIndex = i;
186
+ if (tObj.enableVirtualization) {
187
+ dropIndex = parseInt(tObj.getRows()[i].getAttribute('data-rowindex'), 10);
188
+ }
186
189
  }
187
190
  }
188
191
  }
189
192
  else {
190
193
  dropIndex = this.selectedRow.rowIndex - 1;
191
194
  }
192
- if (this.parent.enableVirtualization && this.parent.allowRowDragAndDrop && this.selectedRecord) {
195
+ if (this.parent.enableVirtualization && this.selectedRecord && !(record_1.level > this.selectedRecord.level)) {
193
196
  dropIndex = parseInt(this.selectedRow.getAttribute('data-rowindex'), 10) - 1;
194
197
  }
195
198
  tObj[action] = 'indenting';
@@ -204,11 +207,11 @@ var RowDD = /** @class */ (function () {
204
207
  var dropIndex = void 0;
205
208
  var parentItem = this.selectedRecord.parentItem;
206
209
  for (var i = 0; i < tObj.getCurrentViewRecords().length; i++) {
207
- if (tObj.getCurrentViewRecords()[i].taskData === parentItem.taskData) {
210
+ if (tObj.getCurrentViewRecords()[i].uniqueID === parentItem.uniqueID) {
208
211
  dropIndex = i;
209
212
  }
210
213
  }
211
- if (this.parent.enableVirtualization && this.parent.allowRowDragAndDrop && this.selectedRecord) {
214
+ if (this.parent.enableVirtualization && this.selectedRecord) {
212
215
  dropIndex = parseInt(this.parent.getRows()[dropIndex].getAttribute('data-rowindex'), 10);
213
216
  }
214
217
  tObj[action] = 'outdenting';
@@ -228,7 +231,7 @@ var RowDD = /** @class */ (function () {
228
231
  this.parent.trigger(events.actionBegin, actionArgs, function (actionArgs) {
229
232
  if (!actionArgs.cancel) {
230
233
  if (actionArgs.action === 'indenting') {
231
- if (_this.parent.enableVirtualization && _this.parent.allowRowDragAndDrop) {
234
+ if (_this.parent.enableVirtualization) {
232
235
  _this.reorderRows([parseInt(_this.selectedRow.getAttribute('data-rowindex'), 10)], dropIndex, 'child');
233
236
  }
234
237
  else {
@@ -236,7 +239,7 @@ var RowDD = /** @class */ (function () {
236
239
  }
237
240
  }
238
241
  else if (actionArgs.action === 'outdenting') {
239
- if (_this.parent.enableVirtualization && _this.parent.allowRowDragAndDrop) {
242
+ if (_this.parent.enableVirtualization) {
240
243
  _this.reorderRows([parseInt(_this.selectedRow.getAttribute('data-rowindex'), 10)], dropIndex, 'below');
241
244
  }
242
245
  else {
@@ -449,8 +449,8 @@ var Selection = /** @class */ (function () {
449
449
  childData = (!isNullOrUndefined(this.parent.filterModule) && this.parent.filterModule.filteredResult.length > 0) ?
450
450
  this.parent.getCurrentViewRecords() : this.parent.flatData;
451
451
  childData.forEach(function (record) {
452
- if (_this.parent.enableVirtualization && record.childRecords.length > 0) {
453
- if (record.hasChildRecords) {
452
+ if (_this.parent.enableVirtualization) {
453
+ if (record.hasChildRecords && record.childRecords.length > 0) {
454
454
  _this.updateParentSelection(record);
455
455
  }
456
456
  else {
@@ -157,6 +157,7 @@ var VirtualScroll = /** @class */ (function () {
157
157
  }
158
158
  }
159
159
  this.expandCollapseRec = null;
160
+ startIndex = startIndex < 0 ? 0 : startIndex;
160
161
  pageingDetails.result = visualData.slice(startIndex, endIndex);
161
162
  this.prevstartIndex = startIndex;
162
163
  this.prevendIndex = endIndex;
@@ -190,12 +191,14 @@ var TreeVirtual = /** @class */ (function (_super) {
190
191
  var parentGrid = getValue('parent', this);
191
192
  getValue('parent', this).log(['limitation', 'virtual_height'], 'virtualization');
192
193
  var renderer = getValue('locator', this).getService('rendererFactory');
193
- if (parentGrid.enableColumnVirtualization) {
194
+ if (!parentGrid.isFrozenGrid()) {
195
+ if (parentGrid.enableColumnVirtualization) {
196
+ getValue('addRenderer', renderer)
197
+ .apply(renderer, [RenderType.Header, new VirtualHeaderRenderer(getValue('parent', this), getValue('locator', this))]);
198
+ }
194
199
  getValue('addRenderer', renderer)
195
- .apply(renderer, [RenderType.Header, new VirtualHeaderRenderer(getValue('parent', this), getValue('locator', this))]);
200
+ .apply(renderer, [RenderType.Content, new VirtualTreeContentRenderer(getValue('parent', this), getValue('locator', this))]);
196
201
  }
197
- getValue('addRenderer', renderer)
198
- .apply(renderer, [RenderType.Content, new VirtualTreeContentRenderer(getValue('parent', this), getValue('locator', this))]);
199
202
  //renderer.addRenderer(RenderType.Content, new VirtualTreeContentRenderer(getValue('parent', this), getValue('locator', this)));
200
203
  this.ensurePageSize();
201
204
  };
@@ -130,3 +130,31 @@ export declare const rowDropped: string;
130
130
  export declare const autoCol: string;
131
131
  /** @hidden */
132
132
  export declare const rowDeselecting: string;
133
+ /** @hidden */
134
+ export declare const headerContent: string;
135
+ /** @hidden */
136
+ export declare const movableContent: string;
137
+ /** @hidden */
138
+ export declare const movableHeader: string;
139
+ /** @hidden */
140
+ export declare const frozenContent: string;
141
+ /** @hidden */
142
+ export declare const frozenHeader: string;
143
+ /** @hidden */
144
+ export declare const content: string;
145
+ /** @hidden */
146
+ export declare const table: string;
147
+ /** @hidden */
148
+ export declare const leftRight: string;
149
+ /** @hidden */
150
+ export declare const frozenRight: string;
151
+ /** @hidden */
152
+ export declare const frozenLeft: string;
153
+ /** @hidden */
154
+ export declare const dataColIndex: string;
155
+ /** @hidden */
156
+ export declare const ariaColIndex: string;
157
+ /** @hidden */
158
+ export declare const dataRowIndex: string;
159
+ /** @hidden */
160
+ export declare const ariaRowIndex: string;
@@ -130,3 +130,31 @@ export var rowDropped = 'row-dropped';
130
130
  export var autoCol = 'auto-col';
131
131
  /** @hidden */
132
132
  export var rowDeselecting = 'rowDeselecting';
133
+ /** @hidden */
134
+ export var headerContent = 'e-headercontent';
135
+ /** @hidden */
136
+ export var movableContent = 'e-movablecontent';
137
+ /** @hidden */
138
+ export var movableHeader = 'e-movableheader';
139
+ /** @hidden */
140
+ export var frozenContent = 'e-frozencontent';
141
+ /** @hidden */
142
+ export var frozenHeader = 'e-frozenheader';
143
+ /** @hidden */
144
+ export var content = 'e-content';
145
+ /** @hidden */
146
+ export var table = 'e-table';
147
+ /** @hidden */
148
+ export var leftRight = 'Left-Right';
149
+ /** @hidden */
150
+ export var frozenRight = 'frozen-right';
151
+ /** @hidden */
152
+ export var frozenLeft = 'frozen-left';
153
+ /** @hidden */
154
+ export var dataColIndex = 'data-colindex';
155
+ /** @hidden */
156
+ export var ariaColIndex = 'aria-colindex';
157
+ /** @hidden */
158
+ export var dataRowIndex = 'data-rowindex';
159
+ /** @hidden */
160
+ export var ariaRowIndex = 'aria-rowindex';
@@ -18,6 +18,7 @@ export declare class DataManipulation {
18
18
  private hierarchyData;
19
19
  private isSelfReference;
20
20
  private isSortAction;
21
+ private infiniteScrollData;
21
22
  constructor(grid: TreeGrid);
22
23
  /**
23
24
  * @hidden
@@ -377,8 +377,8 @@ var DataManipulation = /** @class */ (function () {
377
377
  if (!Object.prototype.hasOwnProperty.call(currentData, 'index')) {
378
378
  currentData.index = this.storedIndex;
379
379
  }
380
- if ((!isNullOrUndefined(currentData[this.parent.childMapping]) && !isCountRequired(this.parent)) ||
381
- ((currentData[this.parent.hasChildMapping]) && isCountRequired(this.parent) && (this.parent.initialRender || isNullOrUndefined(this.parent['dataResults'].result)))) {
380
+ if ((!isNullOrUndefined(currentData[this.parent.childMapping]) && !isCountRequired(this.parent)) || ((currentData[this.parent.hasChildMapping]) &&
381
+ isCountRequired(this.parent) && (this.parent.initialRender || isNullOrUndefined(this.parent['dataResults'].result) || this.parent.enableInfiniteScrolling))) {
382
382
  currentData.hasChildRecords = true;
383
383
  if (this.parent.enableCollapseAll || !isNullOrUndefined(this.parent.dataStateChange)
384
384
  && isNullOrUndefined(currentData[this.parent.childMapping])) {
@@ -414,6 +414,7 @@ var DataManipulation = /** @class */ (function () {
414
414
  currentData.checkboxState = 'uncheck';
415
415
  if (isNullOrUndefined(currentData[this.parent.parentIdMapping]) || currentData.parentItem) {
416
416
  this.parent.flatData.push(currentData);
417
+ this.parent['infiniteScrollData'].push(currentData);
417
418
  }
418
419
  if (!this.isSelfReference && currentData.level === 0) {
419
420
  this.parent.parentData.push(currentData);
@@ -1,4 +1,4 @@
1
- import { Component, addClass, createElement, EventHandler, isNullOrUndefined, Ajax, ModuleDeclaration, extend, merge} from '@syncfusion/ej2-base';import { removeClass, EmitType, Complex, Collection, KeyboardEventArgs, getValue } from '@syncfusion/ej2-base';import {Event, Property, NotifyPropertyChanges, INotifyPropertyChanged, setValue, KeyboardEvents, L10n } from '@syncfusion/ej2-base';import { Column, ColumnModel } from '../models/column';import { BeforeBatchSaveArgs, BeforeBatchAddArgs, BatchDeleteArgs, BeforeBatchDeleteArgs } from '@syncfusion/ej2-grids';import { GridModel, ColumnQueryModeType, HeaderCellInfoEventArgs, EditSettingsModel as GridEditModel } from '@syncfusion/ej2-grids';import {RowDragEventArgs, RowDropEventArgs, RowDropSettingsModel, RowDropSettings, getUid } from '@syncfusion/ej2-grids';import { ActionEventArgs, TextAlign } from'@syncfusion/ej2-grids';import { DetailDataBoundEventArgs, ClipMode, ColumnChooser} from '@syncfusion/ej2-grids';import { SearchEventArgs, AddEventArgs, EditEventArgs, DeleteEventArgs} from '@syncfusion/ej2-grids';import { SaveEventArgs, CellSaveArgs, BatchAddArgs, BatchCancelArgs, BeginEditArgs, CellEditArgs} from '@syncfusion/ej2-grids';import { FilterSettings } from '../models/filter-settings';import { TextWrapSettings } from '../models/textwrap-settings';import { TextWrapSettingsModel } from '../models/textwrap-settings-model';import {Filter} from '../actions/filter';import { Logger as TreeLogger } from '../actions/logger';import { BeforeCopyEventArgs, BeforePasteEventArgs } from '@syncfusion/ej2-grids';import { TreeClipboard } from '../actions/clipboard';import {Aggregate} from '../actions/summary';import { Reorder } from '../actions/reorder';import { Resize } from '../actions/resize';import { Selection as TreeGridSelection } from '../actions/selection';import { ColumnMenu } from '../actions/column-menu';import { DetailRow } from '../actions/detail-row';import { Freeze } from '../actions/freeze-column';import { Print } from '../actions/print';import * as events from '../base/constant';import { FilterSettingsModel } from '../models/filter-settings-model';import { SearchSettings} from '../models/search-settings';import { SearchSettingsModel } from '../models/search-settings-model';import {RowInfo, RowDataBoundEventArgs, PageEventArgs, FilterEventArgs, FailureEventArgs, SortEventArgs } from '@syncfusion/ej2-grids';import { RowSelectingEventArgs, RowSelectEventArgs, RowDeselectEventArgs, IIndex, ISelectedCell } from '@syncfusion/ej2-grids';import {ColumnModel as GridColumnModel, Column as GridColumn, CellSelectEventArgs, CellDeselectEventArgs } from '@syncfusion/ej2-grids';import { SelectionSettings } from '../models/selection-settings';import { SelectionSettingsModel } from '../models/selection-settings-model';import {getActualProperties, SortDirection, getObject, ColumnDragEventArgs } from '@syncfusion/ej2-grids';import { PrintMode, Data, IGrid, ContextMenuItemModel } from '@syncfusion/ej2-grids';import { ColumnMenuItem, ColumnMenuItemModel, CheckBoxChangeEventArgs } from '@syncfusion/ej2-grids';import { ExcelExportCompleteArgs, ExcelHeaderQueryCellInfoEventArgs, ExcelQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { PdfExportCompleteArgs, PdfHeaderQueryCellInfoEventArgs, PdfQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { ExcelExportProperties, PdfExportProperties, CellSelectingEventArgs, PrintEventArgs } from '@syncfusion/ej2-grids';import { ColumnMenuOpenEventArgs } from '@syncfusion/ej2-grids';import {BeforeDataBoundArgs} from '@syncfusion/ej2-grids';import { DataManager, ReturnOption, RemoteSaveAdaptor, Query, JsonAdaptor, Deferred } from '@syncfusion/ej2-data';import { createSpinner, hideSpinner, showSpinner, Dialog } from '@syncfusion/ej2-popups';import { isRemoteData, isOffline, extendArray, isCountRequired, findChildrenRecords } from '../utils';import { Grid, QueryCellInfoEventArgs, Logger } from '@syncfusion/ej2-grids';import { Render } from '../renderer/render';import { VirtualTreeContentRenderer } from '../renderer/virtual-tree-content-render';import { DataManipulation } from './data';import { RowDD } from '../actions/rowdragdrop';import { Sort } from '../actions/sort';import { ITreeData, RowExpandedEventArgs, RowCollapsedEventArgs, RowCollapsingEventArgs, TreeGridExcelExportProperties } from './interface';import { CellSaveEventArgs, DataStateChangeEventArgs, RowExpandingEventArgs, TreeGridPdfExportProperties } from './interface';import { iterateArrayOrObject, GridLine } from '@syncfusion/ej2-grids';import { DataSourceChangedEventArgs, RecordDoubleClickEventArgs, ResizeArgs } from '@syncfusion/ej2-grids';import { ToolbarItems, ToolbarItem, ContextMenuItem, ContextMenuItems, RowPosition, CopyHierarchyType } from '../enum';import { ItemModel, ClickEventArgs, BeforeOpenCloseMenuEventArgs, MenuEventArgs } from '@syncfusion/ej2-navigations';import { PageSettings } from '../models/page-settings';import { PageSettingsModel } from '../models/page-settings-model';import { AggregateRow } from '../models/summary';import { AggregateRowModel } from '../models/summary-model';import { ExcelExport } from '../actions/excel-export';import { PdfExport } from '../actions/pdf-export';import { Toolbar } from '../actions/toolbar';import { Page } from '../actions/page';import { ContextMenu } from '../actions/context-menu';import { EditSettings } from '../models/edit-settings';import { EditSettingsModel } from '../models/edit-settings-model';import { Edit} from '../actions/edit';import { SortSettings } from '../models/sort-settings';import { SortSettingsModel } from '../models/sort-settings-model';import { isHidden, getExpandStatus } from '../utils';import { editAction } from '../actions/crud-actions';import { InfiniteScrollSettings } from '../models/infinite-scroll-settings';import { InfiniteScrollSettingsModel } from '../models/infinite-scroll-settings-model';import { TreeActionEventArgs } from '..';
1
+ import { Component, addClass, createElement, EventHandler, isNullOrUndefined, Ajax, ModuleDeclaration, extend, merge} from '@syncfusion/ej2-base';import { removeClass, EmitType, Complex, Collection, KeyboardEventArgs, getValue } from '@syncfusion/ej2-base';import {Event, Property, NotifyPropertyChanges, INotifyPropertyChanged, setValue, KeyboardEvents, L10n } from '@syncfusion/ej2-base';import { Column, ColumnModel } from '../models/column';import { BeforeBatchSaveArgs, BeforeBatchAddArgs, BatchDeleteArgs, BeforeBatchDeleteArgs, Row } from '@syncfusion/ej2-grids';import { GridModel, ColumnQueryModeType, HeaderCellInfoEventArgs, EditSettingsModel as GridEditModel } from '@syncfusion/ej2-grids';import {RowDragEventArgs, RowDropEventArgs, RowDropSettingsModel, RowDropSettings, getUid } from '@syncfusion/ej2-grids';import { ActionEventArgs, TextAlign } from'@syncfusion/ej2-grids';import { DetailDataBoundEventArgs, ClipMode, ColumnChooser} from '@syncfusion/ej2-grids';import { SearchEventArgs, AddEventArgs, EditEventArgs, DeleteEventArgs} from '@syncfusion/ej2-grids';import { SaveEventArgs, CellSaveArgs, BatchAddArgs, BatchCancelArgs, BeginEditArgs, CellEditArgs} from '@syncfusion/ej2-grids';import { FilterSettings } from '../models/filter-settings';import { TextWrapSettings } from '../models/textwrap-settings';import { TextWrapSettingsModel } from '../models/textwrap-settings-model';import {Filter} from '../actions/filter';import { Logger as TreeLogger } from '../actions/logger';import { BeforeCopyEventArgs, BeforePasteEventArgs } from '@syncfusion/ej2-grids';import { TreeClipboard } from '../actions/clipboard';import {Aggregate} from '../actions/summary';import { Reorder } from '../actions/reorder';import { Resize } from '../actions/resize';import { Selection as TreeGridSelection } from '../actions/selection';import { ColumnMenu } from '../actions/column-menu';import { DetailRow } from '../actions/detail-row';import { Freeze } from '../actions/freeze-column';import { Print } from '../actions/print';import * as events from '../base/constant';import { FilterSettingsModel } from '../models/filter-settings-model';import { SearchSettings} from '../models/search-settings';import { SearchSettingsModel } from '../models/search-settings-model';import {RowInfo, RowDataBoundEventArgs, PageEventArgs, FilterEventArgs, FailureEventArgs, SortEventArgs } from '@syncfusion/ej2-grids';import { RowSelectingEventArgs, RowSelectEventArgs, RowDeselectEventArgs, IIndex, ISelectedCell } from '@syncfusion/ej2-grids';import {ColumnModel as GridColumnModel, Column as GridColumn, CellSelectEventArgs, CellDeselectEventArgs } from '@syncfusion/ej2-grids';import { SelectionSettings } from '../models/selection-settings';import { SelectionSettingsModel } from '../models/selection-settings-model';import {getActualProperties, SortDirection, getObject, ColumnDragEventArgs } from '@syncfusion/ej2-grids';import { PrintMode, Data, IGrid, ContextMenuItemModel } from '@syncfusion/ej2-grids';import { ColumnMenuItem, ColumnMenuItemModel, CheckBoxChangeEventArgs } from '@syncfusion/ej2-grids';import { ExcelExportCompleteArgs, ExcelHeaderQueryCellInfoEventArgs, ExcelQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { PdfExportCompleteArgs, PdfHeaderQueryCellInfoEventArgs, PdfQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { ExcelExportProperties, PdfExportProperties, CellSelectingEventArgs, PrintEventArgs } from '@syncfusion/ej2-grids';import { ColumnMenuOpenEventArgs } from '@syncfusion/ej2-grids';import {BeforeDataBoundArgs} from '@syncfusion/ej2-grids';import { DataManager, ReturnOption, RemoteSaveAdaptor, Query, JsonAdaptor, Deferred } from '@syncfusion/ej2-data';import { createSpinner, hideSpinner, showSpinner, Dialog } from '@syncfusion/ej2-popups';import { isRemoteData, isOffline, extendArray, isCountRequired, findChildrenRecords } from '../utils';import { Grid, QueryCellInfoEventArgs, Logger } from '@syncfusion/ej2-grids';import { Render } from '../renderer/render';import { VirtualTreeContentRenderer } from '../renderer/virtual-tree-content-render';import { DataManipulation } from './data';import { RowDD } from '../actions/rowdragdrop';import { Sort } from '../actions/sort';import { ITreeData, RowExpandedEventArgs, RowCollapsedEventArgs, RowCollapsingEventArgs, TreeGridExcelExportProperties } from './interface';import { CellSaveEventArgs, DataStateChangeEventArgs, RowExpandingEventArgs, TreeGridPdfExportProperties } from './interface';import { iterateArrayOrObject, GridLine } from '@syncfusion/ej2-grids';import { DataSourceChangedEventArgs, RecordDoubleClickEventArgs, ResizeArgs } from '@syncfusion/ej2-grids';import { ToolbarItems, ToolbarItem, ContextMenuItem, ContextMenuItems, RowPosition, CopyHierarchyType } from '../enum';import { ItemModel, ClickEventArgs, BeforeOpenCloseMenuEventArgs, MenuEventArgs } from '@syncfusion/ej2-navigations';import { PageSettings } from '../models/page-settings';import { PageSettingsModel } from '../models/page-settings-model';import { AggregateRow } from '../models/summary';import { AggregateRowModel } from '../models/summary-model';import { ExcelExport } from '../actions/excel-export';import { PdfExport } from '../actions/pdf-export';import { Toolbar } from '../actions/toolbar';import { Page } from '../actions/page';import { ContextMenu } from '../actions/context-menu';import { EditSettings } from '../models/edit-settings';import { EditSettingsModel } from '../models/edit-settings-model';import { Edit} from '../actions/edit';import { SortSettings } from '../models/sort-settings';import { SortSettingsModel } from '../models/sort-settings-model';import { isHidden, getExpandStatus } from '../utils';import { editAction } from '../actions/crud-actions';import { InfiniteScrollSettings } from '../models/infinite-scroll-settings';import { InfiniteScrollSettingsModel } from '../models/infinite-scroll-settings-model';import { TreeActionEventArgs } from '..';import * as literals from '../base/constant';
2
2
  import {ComponentModel} from '@syncfusion/ej2-base';
3
3
 
4
4
  /**
@@ -110,6 +110,8 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
110
110
  /** @hidden */
111
111
  flatData: Object[];
112
112
  /** @hidden */
113
+ private infiniteScrollData;
114
+ /** @hidden */
113
115
  isLocalData: boolean;
114
116
  /** @hidden */
115
117
  parentData: Object[];