@syncfusion/ej2-treegrid 27.2.2 → 28.1.33

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 (96) hide show
  1. package/README.md +2 -2
  2. package/dist/ej2-treegrid.min.js +3 -3
  3. package/dist/ej2-treegrid.umd.min.js +3 -3
  4. package/dist/ej2-treegrid.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-treegrid.es2015.js +576 -256
  6. package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
  7. package/dist/es6/ej2-treegrid.es5.js +580 -256
  8. package/dist/es6/ej2-treegrid.es5.js.map +1 -1
  9. package/dist/global/ej2-treegrid.min.js +3 -3
  10. package/dist/global/ej2-treegrid.min.js.map +1 -1
  11. package/dist/global/index.d.ts +2 -2
  12. package/package.json +10 -10
  13. package/src/treegrid/actions/batch-edit.js +58 -56
  14. package/src/treegrid/actions/context-menu.js +3 -1
  15. package/src/treegrid/actions/reorder.d.ts +1 -1
  16. package/src/treegrid/actions/reorder.js +5 -17
  17. package/src/treegrid/actions/rowdragdrop.d.ts +286 -14
  18. package/src/treegrid/actions/rowdragdrop.js +447 -161
  19. package/src/treegrid/actions/virtual-scroll.js +5 -0
  20. package/src/treegrid/base/data.js +22 -5
  21. package/src/treegrid/base/treegrid.d.ts +1 -0
  22. package/src/treegrid/base/treegrid.js +27 -10
  23. package/src/treegrid/renderer/virtual-tree-content-render.js +14 -7
  24. package/styles/bds-lite.css +703 -0
  25. package/styles/bds-lite.scss +18 -0
  26. package/styles/bds.css +723 -0
  27. package/styles/bds.scss +19 -0
  28. package/styles/bootstrap-dark-lite.css +20 -0
  29. package/styles/bootstrap-dark.css +26 -6
  30. package/styles/bootstrap-lite.css +20 -0
  31. package/styles/bootstrap.css +26 -6
  32. package/styles/bootstrap4-lite.css +20 -0
  33. package/styles/bootstrap4.css +26 -6
  34. package/styles/bootstrap5-dark-lite.css +20 -0
  35. package/styles/bootstrap5-dark.css +26 -6
  36. package/styles/bootstrap5-lite.css +20 -0
  37. package/styles/bootstrap5.3-lite.css +20 -0
  38. package/styles/bootstrap5.3.css +26 -6
  39. package/styles/bootstrap5.css +26 -6
  40. package/styles/fabric-dark-lite.css +20 -0
  41. package/styles/fabric-dark.css +26 -6
  42. package/styles/fabric-lite.css +20 -0
  43. package/styles/fabric.css +26 -6
  44. package/styles/fluent-dark-lite.css +20 -0
  45. package/styles/fluent-dark.css +27 -7
  46. package/styles/fluent-lite.css +20 -0
  47. package/styles/fluent.css +27 -7
  48. package/styles/fluent2-lite.css +20 -0
  49. package/styles/fluent2.css +28 -8
  50. package/styles/highcontrast-light-lite.css +20 -0
  51. package/styles/highcontrast-light.css +26 -6
  52. package/styles/highcontrast-lite.css +21 -1
  53. package/styles/highcontrast.css +28 -8
  54. package/styles/material-dark-lite.css +20 -0
  55. package/styles/material-dark.css +26 -6
  56. package/styles/material-lite.css +20 -0
  57. package/styles/material.css +26 -6
  58. package/styles/material3-dark-lite.css +20 -0
  59. package/styles/material3-dark.css +26 -6
  60. package/styles/material3-lite.css +20 -0
  61. package/styles/material3.css +26 -6
  62. package/styles/tailwind-dark-lite.css +20 -0
  63. package/styles/tailwind-dark.css +26 -6
  64. package/styles/tailwind-lite.css +20 -0
  65. package/styles/tailwind.css +26 -6
  66. package/styles/tailwind3-lite.css +511 -0
  67. package/styles/tailwind3-lite.scss +18 -0
  68. package/styles/tailwind3.css +531 -0
  69. package/styles/tailwind3.scss +19 -0
  70. package/styles/treegrid/_bigger.scss +45 -41
  71. package/styles/treegrid/_layout.scss +23 -2
  72. package/styles/treegrid/_tailwind3-definition.scss +24 -0
  73. package/styles/treegrid/bds.css +723 -0
  74. package/styles/treegrid/bds.scss +19 -0
  75. package/styles/treegrid/bootstrap-dark.css +26 -6
  76. package/styles/treegrid/bootstrap.css +26 -6
  77. package/styles/treegrid/bootstrap4.css +26 -6
  78. package/styles/treegrid/bootstrap5-dark.css +26 -6
  79. package/styles/treegrid/bootstrap5.3.css +26 -6
  80. package/styles/treegrid/bootstrap5.css +26 -6
  81. package/styles/treegrid/fabric-dark.css +26 -6
  82. package/styles/treegrid/fabric.css +26 -6
  83. package/styles/treegrid/fluent-dark.css +27 -7
  84. package/styles/treegrid/fluent.css +27 -7
  85. package/styles/treegrid/fluent2.css +28 -8
  86. package/styles/treegrid/highcontrast-light.css +26 -6
  87. package/styles/treegrid/highcontrast.css +28 -8
  88. package/styles/treegrid/icons/_tailwind3.scss +37 -0
  89. package/styles/treegrid/material-dark.css +26 -6
  90. package/styles/treegrid/material.css +26 -6
  91. package/styles/treegrid/material3-dark.css +26 -6
  92. package/styles/treegrid/material3.css +26 -6
  93. package/styles/treegrid/tailwind-dark.css +26 -6
  94. package/styles/treegrid/tailwind.css +26 -6
  95. package/styles/treegrid/tailwind3.css +531 -0
  96. package/styles/treegrid/tailwind3.scss +19 -0
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 27.2.2
4
- * Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
3
+ * version : 28.1.33
4
+ * Copyright Syncfusion Inc. 2001 - 2024. 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
7
7
  * licensing@syncfusion.com. Any infringement will be prosecuted under
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-treegrid@*",
3
- "_id": "@syncfusion/ej2-treegrid@27.1.57",
3
+ "_id": "@syncfusion/ej2-treegrid@20.12.1",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-MFAGgIaAJHu1K/QMwDlqJporeiGSTHRBMpis6lWmyHAKT6k7qsrwOBvZj9j4fC93tHscVXtOadPpm5ThdQ0Z7g==",
5
+ "_integrity": "sha512-KuMGwYg2ZSNKoZwF2X8qdYvm9pIVGZV4byzVF/NBbkRBUolsR00VM0Te+qZpPd1aeYzYtLeloywSY4AET2zrzA==",
6
6
  "_location": "/@syncfusion/ej2-treegrid",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -24,10 +24,10 @@
24
24
  "/@syncfusion/ej2-react-treegrid",
25
25
  "/@syncfusion/ej2-vue-treegrid"
26
26
  ],
27
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-27.1.57.tgz",
28
- "_shasum": "ebed313f3536546820413ffb30bb5f278d699632",
27
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-release/@syncfusion/ej2-treegrid/-/ej2-treegrid-20.12.1.tgz",
28
+ "_shasum": "7d69a4b448497f60c93177b3a215f11ad0fb7bea",
29
29
  "_spec": "@syncfusion/ej2-treegrid@*",
30
- "_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included",
30
+ "_where": "/jenkins/workspace/elease-automation_release_28.1.1/packages/included",
31
31
  "author": {
32
32
  "name": "Syncfusion Inc."
33
33
  },
@@ -36,10 +36,10 @@
36
36
  },
37
37
  "bundleDependencies": false,
38
38
  "dependencies": {
39
- "@syncfusion/ej2-base": "~27.2.2",
40
- "@syncfusion/ej2-data": "~27.2.2",
41
- "@syncfusion/ej2-grids": "~27.2.2",
42
- "@syncfusion/ej2-popups": "~27.2.2"
39
+ "@syncfusion/ej2-base": "~28.1.33",
40
+ "@syncfusion/ej2-data": "~28.1.33",
41
+ "@syncfusion/ej2-grids": "~28.1.33",
42
+ "@syncfusion/ej2-popups": "~28.1.33"
43
43
  },
44
44
  "deprecated": false,
45
45
  "description": "Essential JS 2 TreeGrid Component",
@@ -76,6 +76,6 @@
76
76
  "url": "git+https://github.com/syncfusion/ej2-treegrid.git"
77
77
  },
78
78
  "typings": "index.d.ts",
79
- "version": "27.2.2",
79
+ "version": "28.1.33",
80
80
  "sideEffects": false
81
81
  }
@@ -143,69 +143,71 @@ var BatchEdit = /** @class */ (function () {
143
143
  this.batchAddRowRecord = extendArray(this.batchAddRowRecord);
144
144
  this.batchAddRowRecord.push(this.batchRecords[this.addRowIndex]);
145
145
  added = this.parent.grid.getRowsObject()[parseInt(rowObjectIndex.toString(), 10)].changes;
146
- added.uniqueID = getUid(this.parent.element.id + '_data_');
147
- setValue('uniqueIDCollection.' + added.uniqueID, added, this.parent);
148
- if (!Object.prototype.hasOwnProperty.call(added, 'level')) {
149
- this.batchIndex = this.selectedIndex === -1 ? 0 : this.batchIndex;
150
- if (this.parent.editSettings.newRowPosition === 'Child') {
151
- added.primaryParent = parentRecord;
152
- if (this.selectedIndex > -1) {
153
- added.parentItem = extend({}, this.batchRecords[this.addRowIndex]);
154
- added.parentUniqueID = added.parentItem.uniqueID;
155
- delete added.parentItem.childRecords;
156
- delete added.parentItem[this.parent.childMapping];
157
- added.level = added.parentItem.level + 1;
158
- added.index = this.batchIndex;
159
- var childRecordCount = findChildrenRecords(this.batchRecords[this.addRowIndex]).length;
160
- var record = findChildrenRecords(this.batchRecords[this.addRowIndex])[childRecordCount - 1];
161
- record = isNullOrUndefined(record) ? this.batchRecords[this.addRowIndex] : record;
162
- currentDataIndex = data.map(function (e) { return e["" + primaryKey_1]; }).indexOf(record["" + primaryKey_1]);
163
- if (this.isSelfReference) {
164
- added[this.parent.parentIdMapping] = idMapping;
146
+ if (!isNullOrUndefined(added)) {
147
+ added.uniqueID = getUid(this.parent.element.id + '_data_');
148
+ setValue('uniqueIDCollection.' + added.uniqueID, added, this.parent);
149
+ if (!Object.prototype.hasOwnProperty.call(added, 'level')) {
150
+ this.batchIndex = this.selectedIndex === -1 ? 0 : this.batchIndex;
151
+ if (this.parent.editSettings.newRowPosition === 'Child') {
152
+ added.primaryParent = parentRecord;
153
+ if (this.selectedIndex > -1) {
154
+ added.parentItem = extend({}, this.batchRecords[this.addRowIndex]);
155
+ added.parentUniqueID = added.parentItem.uniqueID;
156
+ delete added.parentItem.childRecords;
157
+ delete added.parentItem[this.parent.childMapping];
158
+ added.level = added.parentItem.level + 1;
159
+ added.index = this.batchIndex;
160
+ var childRecordCount = findChildrenRecords(this.batchRecords[this.addRowIndex]).length;
161
+ var record = findChildrenRecords(this.batchRecords[this.addRowIndex])[childRecordCount - 1];
162
+ record = isNullOrUndefined(record) ? this.batchRecords[this.addRowIndex] : record;
163
+ currentDataIndex = data.map(function (e) { return e["" + primaryKey_1]; }).indexOf(record["" + primaryKey_1]);
164
+ if (this.isSelfReference) {
165
+ added[this.parent.parentIdMapping] = idMapping;
166
+ }
167
+ updateParentRow(primaryKey_1, added.parentItem, 'add', this.parent, this.isSelfReference, added);
165
168
  }
166
- updateParentRow(primaryKey_1, added.parentItem, 'add', this.parent, this.isSelfReference, added);
167
169
  }
168
- }
169
- else if ((this.parent.editSettings.newRowPosition === 'Above' || this.parent.editSettings.newRowPosition === 'Below')
170
- && !isNullOrUndefined(this.batchRecords[this.addRowIndex])) {
171
- added.level = this.batchRecords[parseInt(this.addRowIndex.toString(), 10)]["" + level];
172
- if (added.level && this.selectedIndex > -1) {
173
- added.parentItem = parentRecord;
174
- added.parentUniqueID = parentUniqueID;
175
- delete added.parentItem.childRecords;
176
- delete added.parentItem[this.parent.childMapping];
170
+ else if ((this.parent.editSettings.newRowPosition === 'Above' || this.parent.editSettings.newRowPosition === 'Below')
171
+ && !isNullOrUndefined(this.batchRecords[this.addRowIndex])) {
172
+ added.level = this.batchRecords[parseInt(this.addRowIndex.toString(), 10)]["" + level];
173
+ if (added.level && this.selectedIndex > -1) {
174
+ added.parentItem = parentRecord;
175
+ added.parentUniqueID = parentUniqueID;
176
+ delete added.parentItem.childRecords;
177
+ delete added.parentItem[this.parent.childMapping];
178
+ }
179
+ added.index = this.parent.editSettings.newRowPosition === 'Below' ? this.batchIndex : this.batchIndex - 1;
180
+ if (this.parent.editSettings.newRowPosition === 'Below' && this.selectedIndex > -1) {
181
+ var childRecordCount = findChildrenRecords(this.batchRecords[this.addRowIndex]).length;
182
+ var record = findChildrenRecords(this.batchRecords[this.addRowIndex])[childRecordCount - 1];
183
+ record = isNullOrUndefined(record) ? this.batchRecords[this.addRowIndex] : record;
184
+ currentDataIndex = data.map(function (e) { return e["" + primaryKey_1]; }).indexOf(record["" + primaryKey_1]);
185
+ }
186
+ if (this.parent.editSettings.newRowPosition === 'Above' && this.selectedIndex > -1) {
187
+ var record = this.batchRecords[this.addRowIndex];
188
+ currentDataIndex = data.map(function (e) { return e["" + primaryKey_1]; }).indexOf(record["" + primaryKey_1]);
189
+ }
190
+ if (this.isSelfReference) {
191
+ added[this.parent.parentIdMapping] = parentIdMapping;
192
+ }
177
193
  }
178
- added.index = this.parent.editSettings.newRowPosition === 'Below' ? this.batchIndex : this.batchIndex - 1;
179
- if (this.parent.editSettings.newRowPosition === 'Below' && this.selectedIndex > -1) {
180
- var childRecordCount = findChildrenRecords(this.batchRecords[this.addRowIndex]).length;
181
- var record = findChildrenRecords(this.batchRecords[this.addRowIndex])[childRecordCount - 1];
182
- record = isNullOrUndefined(record) ? this.batchRecords[this.addRowIndex] : record;
183
- currentDataIndex = data.map(function (e) { return e["" + primaryKey_1]; }).indexOf(record["" + primaryKey_1]);
194
+ added.index = added.index === -1 ? 0 : added.index;
195
+ added.hasChildRecords = false;
196
+ added.childRecords = [];
197
+ this.batchRecords.splice(added.index, 0, added);
198
+ this.currentViewRecords.splice(added.index, 0, added);
199
+ if (currentDataIndex) {
200
+ indexvalue = currentDataIndex;
184
201
  }
185
- if (this.parent.editSettings.newRowPosition === 'Above' && this.selectedIndex > -1) {
186
- var record = this.batchRecords[this.addRowIndex];
187
- currentDataIndex = data.map(function (e) { return e["" + primaryKey_1]; }).indexOf(record["" + primaryKey_1]);
202
+ else {
203
+ indexvalue = added.index;
188
204
  }
189
- if (this.isSelfReference) {
190
- added[this.parent.parentIdMapping] = parentIdMapping;
205
+ if (this.parent.editSettings.newRowPosition !== 'Above') {
206
+ indexvalue = added.index === 0 ? indexvalue : indexvalue + 1;
191
207
  }
208
+ data.splice(indexvalue, 0, added);
209
+ this.batchAddedRecords.push(added);
192
210
  }
193
- added.index = added.index === -1 ? 0 : added.index;
194
- added.hasChildRecords = false;
195
- added.childRecords = [];
196
- this.batchRecords.splice(added.index, 0, added);
197
- this.currentViewRecords.splice(added.index, 0, added);
198
- if (currentDataIndex) {
199
- indexvalue = currentDataIndex;
200
- }
201
- else {
202
- indexvalue = added.index;
203
- }
204
- if (this.parent.editSettings.newRowPosition !== 'Above') {
205
- indexvalue = added.index === 0 ? indexvalue : indexvalue + 1;
206
- }
207
- data.splice(indexvalue, 0, added);
208
- this.batchAddedRecords.push(added);
209
211
  }
210
212
  this.parent.grid.getRowsObject()[parseInt(rowObjectIndex.toString(), 10)].data = added;
211
213
  this.newBatchRowAdded = false;
@@ -93,7 +93,9 @@ var ContextMenu = /** @class */ (function () {
93
93
  for (var _b = 0, _c = args.items; _b < _c.length; _b++) {
94
94
  var items = _c[_b];
95
95
  if (items.text === 'Outdent' || items.text === 'Indent') {
96
- tObj.grid.contextMenuModule['hiddenItems'].push(items.text);
96
+ if (!tObj.grid.contextMenuModule['hiddenItems'].includes(items.text)) {
97
+ tObj.grid.contextMenuModule['hiddenItems'].push(items.text);
98
+ }
97
99
  }
98
100
  }
99
101
  tObj.grid.contextMenuModule.contextMenu.hideItems(tObj.grid.contextMenuModule['hiddenItems']);
@@ -32,5 +32,5 @@ export declare class Reorder {
32
32
  * @hidden
33
33
  */
34
34
  destroy(): void;
35
- private getTreeColumn;
35
+ private updateTreeColumn;
36
36
  }
@@ -1,4 +1,4 @@
1
- import { getObject, Grid, Reorder as GridReorder } from '@syncfusion/ej2-grids';
1
+ import { Grid, Reorder as GridReorder } from '@syncfusion/ej2-grids';
2
2
  /**
3
3
  * TreeGrid Reorder module
4
4
  *
@@ -29,13 +29,13 @@ var Reorder = /** @class */ (function () {
29
29
  * @returns {void}
30
30
  */
31
31
  Reorder.prototype.addEventListener = function () {
32
- this.parent.on('getColumnIndex', this.getTreeColumn, this);
32
+ this.parent.on('getColumnIndex', this.updateTreeColumn, this);
33
33
  };
34
34
  Reorder.prototype.removeEventListener = function () {
35
35
  if (this.parent.isDestroyed) {
36
36
  return;
37
37
  }
38
- this.parent.off('getColumnIndex', this.getTreeColumn);
38
+ this.parent.off('getColumnIndex', this.updateTreeColumn);
39
39
  };
40
40
  /**
41
41
  * To destroy the Reorder
@@ -46,20 +46,8 @@ var Reorder = /** @class */ (function () {
46
46
  Reorder.prototype.destroy = function () {
47
47
  this.removeEventListener();
48
48
  };
49
- Reorder.prototype.getTreeColumn = function () {
50
- var columnModel = 'columnModel';
51
- var treeColumn = this.parent["" + columnModel][this.parent.treeColumnIndex];
52
- var treeIndex;
53
- var updatedCols = this.parent.getColumns();
54
- for (var f = 0; f < updatedCols.length; f++) {
55
- var treeColumnfield = getObject('field', treeColumn);
56
- var parentColumnfield = getObject('field', updatedCols[parseInt(f.toString(), 10)]);
57
- if (treeColumnfield === parentColumnfield) {
58
- treeIndex = f;
59
- break;
60
- }
61
- }
62
- this.parent.setProperties({ treeColumnIndex: treeIndex }, true);
49
+ Reorder.prototype.updateTreeColumn = function () {
50
+ this.parent['getTreeColumn']();
63
51
  };
64
52
  return Reorder;
65
53
  }());
@@ -7,33 +7,61 @@ import { ITreeData } from '../base';
7
7
  */
8
8
  export declare class RowDD {
9
9
  private parent;
10
- /** @hidden */
10
+ /** @hidden
11
+ * Represents the position where a row can be dropped within the TreeGrid.
12
+ */
11
13
  private dropPosition;
12
- /** @hidden */
14
+ /** @hidden
15
+ * Represents the record that is currently being dragged in the TreeGrid.
16
+ */
13
17
  private draggedRecord;
14
- /** @hidden */
18
+ /** @hidden
19
+ * Represents the record that the currently dragged item is being dropped onto in the TreeGrid.
20
+ */
15
21
  private droppedRecord;
16
- /** @hidden */
22
+ /** @hidden
23
+ * Stores the data representation of the TreeGrid, including hierarchical structures.
24
+ */
17
25
  treeGridData: ITreeData[];
18
- /** @hidden */
26
+ /** @hidden
27
+ * Represents the underlying hierarchical data of the TreeGrid.
28
+ */
19
29
  private treeData;
20
- /** @hidden */
30
+ /** @hidden
31
+ * Indicates whether a row can be dropped into the current target position during a drag-and-drop operation.
32
+ */
21
33
  private canDrop;
22
- /** @hidden */
34
+ /** @hidden
35
+ * Indicates whether the current drag operation includes child records of the dragged item.
36
+ */
23
37
  private isDraggedWithChild;
24
- /** @hidden */
38
+ /** @hidden
39
+ *
40
+ */
25
41
  isMultipleGrid: string;
26
- /** @hidden */
42
+ /** @hidden
43
+ * Indicates whether multiple TreeGrid instances are being managed or displayed.
44
+ */
27
45
  private modifiedRecords;
28
- /** @hidden */
46
+ /** @hidden
47
+ * Represents the currently selected item in the TreeGrid.
48
+ */
29
49
  private selectedItem;
30
- /** @hidden */
50
+ /** @hidden
51
+ * Represents the currently selected item in the TreeGrid.
52
+ */
31
53
  private selectedRecords;
32
- /** @hidden */
54
+ /** @hidden
55
+ * Holds an array of currently selected records in the TreeGrid.
56
+ */
33
57
  private selectedRows;
34
- /** @hidden */
58
+ /** @hidden
59
+ * Indicates whether there is a droppable item in the TreeGrid.
60
+ */
35
61
  private hasDropItem;
36
- /** @hidden */
62
+ /** @hidden
63
+ * Indicates whether the item is being added to the bottom of the TreeGrid.
64
+ */
37
65
  isaddtoBottom: boolean;
38
66
  private selectedRecord;
39
67
  private selectedRow;
@@ -43,6 +71,12 @@ export declare class RowDD {
43
71
  * @param {TreeGrid} parent - Tree Grid instance
44
72
  */
45
73
  constructor(parent?: TreeGrid);
74
+ /**
75
+ * Retrieves child records for a specified parent ID in the TreeGrid.
76
+ *
77
+ * @param {string} id - The unique ID of the parent record for which to retrieve child records.
78
+ * @returns {ITreeData[]} An array of child records corresponding to the specified parent ID.
79
+ */
46
80
  private getChildrecordsByParentID;
47
81
  /**
48
82
  * @hidden
@@ -58,42 +92,280 @@ export declare class RowDD {
58
92
  * @param {string} position - Drop position as above or below or child
59
93
  */
60
94
  reorderRows(fromIndexes: number[], toIndex: number, position: string): void;
95
+ /**
96
+ * Performs indent or outdent actions on selected records in the TreeGrid.
97
+ *
98
+ * @param {ITreeData} [record] - The record to be indented or outdented. If undefined, the method operates on the currently selected record.
99
+ * @param {string} [request] - The action to perform, either 'indent' or 'outdent'.
100
+ * @returns {void}
101
+ */
61
102
  private indentOutdentAction;
103
+ /**
104
+ * Triggers a specified event for the TreeGrid, notifying subscribers about the event occurrence.
105
+ *
106
+ * @param {string} action - The action to be triggered, either 'indenting' or 'outdenting'.
107
+ * @param {number} dropIndex - The index at which the row should be dropped.
108
+ * @returns {void}
109
+ */
62
110
  private eventTrigger;
111
+ /**
112
+ * Reorders the flat data array of the TreeGrid and updates the index of each record.
113
+ *
114
+ * @param {ITreeData[]} currentData - The array of tree data records to reorder.
115
+ * @returns {ITreeData[]} The updated array of tree data records with indices set.
116
+ */
63
117
  private orderToIndex;
118
+ /**
119
+ * Handles the addition of new rows to the TreeGrid.
120
+ *
121
+ * @param {Object} e - The event object containing information about the rows being added.
122
+ * @param {number} e.toIndex - The index at which the new rows should be added in the TreeGrid.
123
+ * @param {Object[]} e.records - An array of the records to be added to the TreeGrid.
124
+ *
125
+ * @returns {void} This function does not return any value.
126
+ */
64
127
  private rowsAdded;
128
+ /**
129
+ * Handles the removal of specified rows from the TreeGrid.
130
+ *
131
+ * @param {Object} e - The event object containing information about the removed rows.
132
+ * @param {number[]} e.indexes - An array of indexes of the rows that were removed.
133
+ * @param {Object[]} e.records - An array of the records corresponding to the removed rows.
134
+ *
135
+ * @returns {void} This function does not return any value.
136
+ */
65
137
  private rowsRemoved;
138
+ /**
139
+ * Refreshes the data source of the TreeGrid.
140
+ *
141
+ * @returns {void} This function does not return any value.
142
+ */
66
143
  private refreshGridDataSource;
144
+ /**
145
+ * Removes the border from the first row of the TreeGrid.
146
+ *
147
+ * @param {HTMLTableRowElement} element - The table row element from which to remove the border.
148
+ * @returns {void} This function does not return any value.
149
+ */
67
150
  private removeFirstrowBorder;
151
+ /**
152
+ * Removes the border from the last row of the TreeGrid.
153
+ *
154
+ * @param {HTMLTableRowElement} element - The row element from which to remove the last row border.
155
+ * @returns {void}
156
+ */
68
157
  private removeLastrowBorder;
158
+ /**
159
+ * Updates the icons associated with the specified rows in the TreeGrid.
160
+ *
161
+ * @param {Element[]} row - The array of row elements to update the icons for.
162
+ * @param {number} index - The index of the row being updated.
163
+ * @param {RowDragEventArgs} args - The event arguments associated with the row drag operation.
164
+ * @returns {string} The drop position ('topSegment', 'middleSegment', 'bottomSegment', or 'Invalid').
165
+ */
69
166
  private updateIcon;
167
+ /**
168
+ * Removes the visual border from all child rows within the TreeGrid.
169
+ *
170
+ * @returns {void} No return value.
171
+ */
70
172
  private removeChildBorder;
173
+ /**
174
+ * Adds a visual border to the first row of the TreeGrid.
175
+ *
176
+ * @param {HTMLTableRowElement} targetRow - The target row element to which the border will be added, if it is the first row.
177
+ * @returns {void} No return value.
178
+ */
71
179
  private addFirstrowBorder;
180
+ /**
181
+ * Adds a visual border to the last row of the TreeGrid.
182
+ *
183
+ * @param {HTMLTableRowElement} trElement - The table row element to which the border will be added, if it is the last row.
184
+ * @returns {void} No return value.
185
+ */
72
186
  private addLastRowborder;
187
+ /**
188
+ * Retrieves the total scroll width of the TreeGrid content area.
189
+ *
190
+ * @returns {number} The width of the scrollbar if content overflows, otherwise 0.
191
+ */
73
192
  private getScrollWidth;
193
+ /**
194
+ * Adds an error element to the dragged row element during a row drag-and-drop operation.
195
+ *
196
+ * @returns {void} No return value.
197
+ */
74
198
  private addErrorElem;
199
+ /**
200
+ * Removes the error element from the DOM and adjusts the position of the drop item count if necessary.
201
+ *
202
+ * @returns {void} No return value.
203
+ */
75
204
  private removeErrorElem;
205
+ /**
206
+ * Applies drop border styles to row elements based on the current drop position ('topSegment' or 'bottomSegment').
207
+ *
208
+ * @param {Element} target - The target element where the drop action is taking place.
209
+ * @returns {void} No return value.
210
+ */
76
211
  private topOrBottomBorder;
212
+ /**
213
+ * Removes the drop border classes ('e-dropbottom' and 'e-droptop') from the parent element if present.
214
+ *
215
+ * @returns {void} No return value.
216
+ */
77
217
  private removetopOrBottomBorder;
218
+ /**
219
+ * Adds or removes a specified class from a list of HTML elements.
220
+ *
221
+ * @param {Element[]} cells - The list of HTML elements to which the class will be added or removed.
222
+ * @param {boolean} add - A flag indicating whether to add (`true`) or remove (`false`) the class.
223
+ * @param {string} className - The class name to be added or removed from each element in `cells`.
224
+ * @returns {void} No return value.
225
+ */
78
226
  private addRemoveClasses;
227
+ /**
228
+ * Calculates the offset position of the specified HTML element relative to the document.
229
+ *
230
+ * @param {Element} element - The HTML element for which the offset position is calculated.
231
+ * @returns {PositionOffSet} The offset position containing `top` and `left` values.
232
+ */
79
233
  private getOffset;
234
+ /**
235
+ * Handles the dragging of rows in the TreeGrid.
236
+ *
237
+ * @param {RowDragEventArgs} args - The event arguments for the row drag action.
238
+ * @returns {void} This function does not return a value.
239
+ */
80
240
  private Rowdraging;
241
+ /**
242
+ * Handles the row drop event for the TreeGrid.
243
+ *
244
+ * @param {RowDropEventArgs} args - The event arguments for the row drop action.
245
+ * @returns {void} This function does not return a value.
246
+ */
81
247
  private rowDropped;
248
+ /**
249
+ * Removes the border elements for the first and last rows of the TreeGrid.
250
+ *
251
+ * @returns {void} This function does not return a value.
252
+ */
253
+ private removeRowBorders;
254
+ /**
255
+ * Handles the drag-and-drop operation between TreeGrids, updating the source and target grids.
256
+ *
257
+ * @param {RowDropEventArgs} args - The arguments related to the row drop event, including target information and data being dropped.
258
+ * @returns {void} - This function does not return any value.
259
+ */
82
260
  private dragDropGrid;
261
+ /**
262
+ * Retrieves the index of the target row based on its 'data-rowindex' attribute.
263
+ *
264
+ * @param {Element} targetRow - The target row element from which to retrieve the index.
265
+ * @returns {number} - The index of the target row, or 0 if the targetRow is null or undefined.
266
+ */
83
267
  private getTargetIdx;
268
+ /**
269
+ * Retrieves the parent data of a given record during a row drag-and-drop operation.
270
+ *
271
+ * @param {ITreeData} record - The record for which to retrieve the parent data.
272
+ * @param {Object[]} [data] - Optional data array containing additional information related to the drop operation.
273
+ * @returns {void} - This function does not return any value.
274
+ */
84
275
  private getParentData;
276
+ /**
277
+ * Handles the row drop operation for the tree grid.
278
+ *
279
+ * @param {RowDropEventArgs} args - The event arguments containing details about the drop operation, including the target index and data.
280
+ * @param {boolean} [isByMethod=false] - Optional flag indicating if the drop operation is triggered by a method.
281
+ * @returns {void} - This function does not return any value.
282
+ */
85
283
  private dropRows;
284
+ /**
285
+ * Handles the logic for inserting a dragged record into the middle of a parent record's child records.
286
+ *
287
+ * @param {number} recordIndex - The index at which to insert the dragged record relative to the parent record's child records.
288
+ * @returns {void} - This function does not return any value.
289
+ */
86
290
  private dropMiddle;
291
+ /**
292
+ * Handles the logic for inserting a dragged record at the top of a parent record's child records.
293
+ *
294
+ * @param {number} recordIndex1 - The index at which to insert the dragged record in the tree grid data.
295
+ * @returns {void} - This function does not return any value.
296
+ */
87
297
  private dropAtTop;
298
+ /**
299
+ * Updates the level and hierarchy of the dragged record based on the drop position.
300
+ *
301
+ * @returns {void} - This function does not return any value.
302
+ */
88
303
  private recordLevel;
304
+ /**
305
+ * Deletes the currently dragged row from the TreeGrid.
306
+ *
307
+ * @returns {void} - This function does not return any value.
308
+ */
89
309
  private deleteDragRow;
310
+ /**
311
+ * Updates the child records of a specified parent record in the TreeGrid.
312
+ *
313
+ * @param {ITreeData} record - The parent record whose child records will be updated.
314
+ * @param {number} count - The initial count to keep track of record positioning.
315
+ * @returns {number} - The updated count after processing all child records.
316
+ */
90
317
  private updateChildRecord;
318
+ /**
319
+ * Updates the level of child records for a specified parent record in the TreeGrid.
320
+ *
321
+ * @param {ITreeData} record - The parent record whose child records' levels will be updated.
322
+ * @param {number} level - The current level of the parent record.
323
+ * @returns {number} - The updated level after processing all child records.
324
+ */
91
325
  private updateChildRecordLevel;
326
+ /**
327
+ * Removes specified records from the TreeGrid data source.
328
+ *
329
+ * @param {ITreeData} record - The record to be removed, including any child records if applicable.
330
+ * @returns {void} - This method does not return a value.
331
+ */
92
332
  private removeRecords;
333
+ /**
334
+ * Updates the records in the TreeGrid data source that have been modified.
335
+ *
336
+ * @param {ITreeData} record - The record to update, along with its parent records if applicable.
337
+ * @returns {void} - This method does not return a value.
338
+ */
93
339
  private updateModifiedRecords;
340
+ /**
341
+ * Recursively removes child records from the specified record and updates the data source.
342
+ *
343
+ * @param {ITreeData} record - The parent record whose child records are to be removed.
344
+ * @returns {void} - This method does not return a value.
345
+ */
94
346
  private removeChildItem;
347
+ /**
348
+ * Retrieves the count of child records associated with the specified parent record.
349
+ *
350
+ * @param {ITreeData} record - The parent record for which child count is to be calculated.
351
+ * @param {number} count - The initial count to start with, usually passed as 0.
352
+ * @returns {number} - The total count of child records.
353
+ */
95
354
  private getChildCount;
355
+ /**
356
+ * Ensures the validity of the drop position for the dragged records by verifying the hierarchy and position constraints.
357
+ * If the current record is found in the dragged records' children, sets the drop position to 'Invalid'.
358
+ *
359
+ * @param {ITreeData[]} draggedRecords - The array of dragged records being verified.
360
+ * @param {ITreeData} currentRecord - The current record to check against dragged records.
361
+ * @returns {void} - This function does not return a value.
362
+ */
96
363
  private ensuredropPosition;
364
+ private isDuplicateData;
365
+ /**
366
+ * Cleans up resources, event listeners, and DOM elements when the TreeGrid component is destroyed.
367
+ * @returns {void}
368
+ */
97
369
  destroy(): void;
98
370
  /**
99
371
  * @hidden