@syncfusion/ej2-treegrid 28.2.6 → 29.1.37

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 (84) hide show
  1. package/README.md +2 -2
  2. package/dist/ej2-treegrid.min.js +2 -2
  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 +1281 -519
  6. package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
  7. package/dist/es6/ej2-treegrid.es5.js +1283 -519
  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/batch-edit.js +12 -5
  14. package/src/treegrid/actions/edit.js +12 -12
  15. package/src/treegrid/actions/page.js +1 -1
  16. package/src/treegrid/actions/rowdragdrop.d.ts +21 -1
  17. package/src/treegrid/actions/rowdragdrop.js +252 -48
  18. package/src/treegrid/actions/summary.js +1 -1
  19. package/src/treegrid/actions/virtual-scroll.d.ts +34 -1
  20. package/src/treegrid/actions/virtual-scroll.js +58 -11
  21. package/src/treegrid/base/constant.d.ts +0 -4
  22. package/src/treegrid/base/constant.js +0 -4
  23. package/src/treegrid/base/data.js +47 -46
  24. package/src/treegrid/base/treegrid-model.d.ts +195 -208
  25. package/src/treegrid/base/treegrid.d.ts +598 -411
  26. package/src/treegrid/base/treegrid.js +526 -307
  27. package/src/treegrid/enum.d.ts +77 -80
  28. package/src/treegrid/enum.js +2 -2
  29. package/src/treegrid/models/column.d.ts +122 -177
  30. package/src/treegrid/models/column.js +14 -26
  31. package/src/treegrid/models/edit-settings-model.d.ts +24 -25
  32. package/src/treegrid/models/edit-settings.d.ts +25 -26
  33. package/src/treegrid/models/edit-settings.js +1 -1
  34. package/src/treegrid/models/filter-settings-model.d.ts +41 -49
  35. package/src/treegrid/models/filter-settings.d.ts +43 -51
  36. package/src/treegrid/models/filter-settings.js +2 -2
  37. package/src/treegrid/models/infinite-scroll-settings-model.d.ts +4 -4
  38. package/src/treegrid/models/infinite-scroll-settings.d.ts +4 -4
  39. package/src/treegrid/models/infinite-scroll-settings.js +1 -1
  40. package/src/treegrid/models/loading-indicator-model.d.ts +3 -4
  41. package/src/treegrid/models/loading-indicator.d.ts +4 -4
  42. package/src/treegrid/models/loading-indicator.js +1 -1
  43. package/src/treegrid/models/page-settings-model.d.ts +10 -13
  44. package/src/treegrid/models/page-settings.d.ts +11 -14
  45. package/src/treegrid/models/page-settings.js +1 -1
  46. package/src/treegrid/models/rowdrop-settings-model.d.ts +1 -1
  47. package/src/treegrid/models/rowdrop-settings.d.ts +13 -6
  48. package/src/treegrid/models/rowdrop-settings.js +1 -1
  49. package/src/treegrid/models/search-settings-model.d.ts +13 -11
  50. package/src/treegrid/models/search-settings.d.ts +14 -12
  51. package/src/treegrid/models/search-settings.js +1 -1
  52. package/src/treegrid/models/selection-settings-model.d.ts +18 -29
  53. package/src/treegrid/models/selection-settings.d.ts +18 -29
  54. package/src/treegrid/models/sort-settings-model.d.ts +8 -5
  55. package/src/treegrid/models/sort-settings.d.ts +10 -7
  56. package/src/treegrid/models/sort-settings.js +2 -2
  57. package/src/treegrid/models/summary-model.d.ts +28 -29
  58. package/src/treegrid/models/summary.d.ts +32 -30
  59. package/src/treegrid/models/summary.js +4 -1
  60. package/src/treegrid/models/textwrap-settings-model.d.ts +7 -4
  61. package/src/treegrid/models/textwrap-settings.d.ts +8 -5
  62. package/src/treegrid/models/textwrap-settings.js +1 -1
  63. package/src/treegrid/renderer/render.js +11 -5
  64. package/src/treegrid/renderer/virtual-row-model-generator.js +5 -4
  65. package/src/treegrid/renderer/virtual-tree-content-render.d.ts +277 -0
  66. package/src/treegrid/renderer/virtual-tree-content-render.js +328 -35
  67. package/src/treegrid/utils.d.ts +1 -1
  68. package/styles/bootstrap-lite.css +0 -12
  69. package/styles/bootstrap.css +0 -12
  70. package/styles/bootstrap5-dark-lite.css +1 -1
  71. package/styles/bootstrap5-dark.css +1 -1
  72. package/styles/treegrid/_layout.scss +0 -1
  73. package/styles/treegrid/_material-dark-definition.scss +2 -2
  74. package/styles/treegrid/_material-definition.scss +2 -2
  75. package/styles/treegrid/bootstrap.css +0 -12
  76. package/styles/treegrid/bootstrap5-dark.css +1 -1
  77. package/styles/treegrid/icons/_bootstrap.scss +0 -17
  78. package/styles/treegrid/icons/_bootstrap5.scss +1 -1
  79. package/styles/treegrid/icons/_fabric-dark.scss +1 -1
  80. package/styles/treegrid/icons/_fabric.scss +1 -1
  81. package/styles/treegrid/icons/_fluent2.scss +1 -1
  82. package/styles/treegrid/icons/_fusionnew.scss +1 -0
  83. package/styles/treegrid/icons/_highcontrast-light.scss +1 -1
  84. package/styles/treegrid/icons/_tailwind-dark.scss +2 -2
@@ -24,90 +24,78 @@ var __decorate = (undefined && undefined.__decorate) || function (decorators, ta
24
24
  return c > 3 && r && Object.defineProperty(target, key, r), r;
25
25
  };
26
26
  /**
27
- * Represents TreeGrid `Column` model class.
27
+ * Represents the "Column" model class for TreeGrid, defining essential properties and functionalities of a column.
28
28
  */
29
29
  var Column = /** @__PURE__ @class */ (function () {
30
30
  function Column(options) {
31
31
  /**
32
- * If `allowEditing` set to false, then it disables editing of a particular column.
33
- * By default all columns are editable.
32
+ * Allows or disallows editing of the column. Set to `false` to make a column non-editable.
33
+ * By default, all columns are editable.
34
34
  *
35
35
  * @default true
36
36
  */
37
37
  this.allowEditing = true;
38
38
  /**
39
- * Defines the `IEditCell` object to customize default edit cell.
39
+ * Customization options for the edit cell.
40
40
  *
41
41
  * @default {}
42
42
  */
43
43
  this.edit = {};
44
44
  /**
45
- * If `disableHtmlEncode` is set to true, it encodes the HTML of the header and content cells.
45
+ * When set to `true`, encodes HTML content in headers and cells to prevent HTML injection.
46
46
  *
47
47
  * @default true
48
48
  */
49
49
  this.disableHtmlEncode = true;
50
50
  /**
51
- * If `allowReordering` set to false, then it disables reorder of a particular column.
52
- * By default all columns can be reorder.
51
+ * Disables column reordering if set to `false`. By default, columns can be reordered.
53
52
  *
54
53
  * @default true
55
54
  */
56
55
  this.allowReordering = true;
57
56
  /**
58
- * If `showColumnMenu` set to false, then it disable the column menu of a particular column.
59
- * By default column menu will show for all columns
57
+ * Disables column menu for the column if set to `false`. By default, column menus are enabled for all columns.
60
58
  *
61
59
  * @default true
62
60
  */
63
61
  this.showColumnMenu = true;
64
62
  /**
65
- * If `allowFiltering` set to false, then it disables filtering option and filter bar element of a particular column.
66
- * By default all columns are filterable.
63
+ * Disables filtering for the column if set to `false`. By default, columns are filterable.
67
64
  *
68
65
  * @default true
69
66
  */
70
67
  this.allowFiltering = true;
71
68
  /**
72
- * If `allowSorting` set to false, then it disables sorting option of a particular column.
73
- * By default all columns are sortable.
69
+ * Disables sorting for the column if set to `false`. By default, columns are sortable.
74
70
  *
75
71
  * @default true
76
72
  */
77
73
  this.allowSorting = true;
78
74
  /**
79
- * If `allowResizing` is set to false, it disables resize option of a particular column.
80
- * By default all the columns can be resized.
75
+ * Disables resizing for the column if set to `false`. By default, columns can be resized.
81
76
  *
82
77
  * @default true
83
78
  */
84
79
  this.allowResizing = true;
85
80
  /**
86
- * It is used to customize the default filter options for a specific columns.
87
- * * type - Specifies the filter type as menu.
88
- * * ui - to render custom component for specific column it has following functions.
89
- * * ui.create – It is used for creating custom components.
90
- * * ui.read - It is used for read the value from the component.
91
- * * ui.write - It is used to apply component model as dynamically.
81
+ * Customize default filter options for a specific column, providing types and UI definitions for custom components.
92
82
  *
93
- * @default null
83
+ * @default null
94
84
  */
95
85
  this.filter = {};
96
86
  merge(this, options);
97
87
  }
98
88
  /**
99
- * Update the State changes reflected for TreeGrid columndirective in react platform.
89
+ * Reflects state changes for TreeGrid column directives, particularly in React.
100
90
  *
101
- * @param {Column} column - specifies the column
91
+ * @param {Column} column - The column to update.
102
92
  * @returns {void}
103
93
  * @hidden
104
94
  */
105
95
  Column.prototype.setProperties = function (column) {
106
- //Angular two way binding
107
96
  var keys = Object.keys(column);
108
97
  for (var i = 0; i < keys.length; i++) {
109
98
  this[keys[parseInt(i.toString(), 10)]] = column[keys[parseInt(i.toString(), 10)]];
110
- //Refresh the react columnTemplates on state change
111
99
  if (this.parent && this.parent['isReact'] && keys[parseInt(i.toString(), 10)] === 'template') {
112
100
  var refreshReactColumnTemplateByUid = 'refreshReactColumnTemplateByUid';
113
101
  this.parent.clipboardModule['treeGridParent'].renderModule["" + refreshReactColumnTemplateByUid](this.uid);
@@ -160,7 +148,7 @@ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators,
160
148
  return c > 3 && r && Object.defineProperty(target, key, r), r;
161
149
  };
162
150
  /**
163
- * Configures the Loading Indicator of the Tree Grid.
151
+ * Configures the loading indicator for the Tree Grid, allowing you to display a visual indicator during data loading operations to enhance user experience.
164
152
  */
165
153
  var LoadingIndicator = /** @__PURE__ @class */ (function (_super) {
166
154
  __extends$1(LoadingIndicator, _super);
@@ -193,7 +181,7 @@ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators,
193
181
  return c > 3 && r && Object.defineProperty(target, key, r), r;
194
182
  };
195
183
  /**
196
- * Represents the Tree Grid predicate for the filter column.
184
+ * Represents the filter configuration for a column in the TreeGrid.
197
185
  */
198
186
  var Predicate = /** @__PURE__ @class */ (function (_super) {
199
187
  __extends$2(Predicate, _super);
@@ -239,7 +227,7 @@ var Predicate = /** @__PURE__ @class */ (function (_super) {
239
227
  return Predicate;
240
228
  }(ChildProperty));
241
229
  /**
242
- * Configures the filtering behavior of the TreeGrid.
230
+ * Configures the filtering behavior of the TreeGrid, enabling complex data filtering capabilities.
243
231
  */
244
232
  var FilterSettings = /** @__PURE__ @class */ (function (_super) {
245
233
  __extends$2(FilterSettings, _super);
@@ -293,7 +281,7 @@ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators,
293
281
  return c > 3 && r && Object.defineProperty(target, key, r), r;
294
282
  };
295
283
  /**
296
- * Configures the textwrap behavior of the TreeGrid.
284
+ * Configures the text wrapping behavior of the TreeGrid.
297
285
  */
298
286
  var TextWrapSettings = /** @__PURE__ @class */ (function (_super) {
299
287
  __extends$3(TextWrapSettings, _super);
@@ -595,12 +583,8 @@ var frozenRight = 'frozen-right';
595
583
  /** @hidden */
596
584
  var frozenLeft = 'frozen-left';
597
585
  /** @hidden */
598
- var dataColIndex = 'data-colindex';
599
- /** @hidden */
600
586
  var ariaColIndex = 'aria-colindex';
601
587
  /** @hidden */
602
- var dataRowIndex = 'data-rowindex';
603
- /** @hidden */
604
588
  var ariaRowIndex = 'aria-rowindex';
605
589
  /** @hidden */
606
590
  var actionFailure = 'actionFailure';
@@ -1581,7 +1565,7 @@ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators,
1581
1565
  return c > 3 && r && Object.defineProperty(target, key, r), r;
1582
1566
  };
1583
1567
  /**
1584
- * Configures the filtering behavior of the TreeGrid.
1568
+ * Configures the searching behavior of the TreeGrid.
1585
1569
  */
1586
1570
  var SearchSettings = /** @__PURE__ @class */ (function (_super) {
1587
1571
  __extends$6(SearchSettings, _super);
@@ -1788,10 +1772,9 @@ var Render = /** @__PURE__ @class */ (function () {
1788
1772
  if (columnIndex === this.parent.treeColumnIndex && (args.requestType === 'add' || args.requestType
1789
1773
  === 'rowDragAndDrop' || args.requestType === 'delete' || isNullOrUndefined(args.cell.querySelector('.e-treecell')))) {
1790
1774
  var container = createElement('div', { className: 'e-treecolumn-container' });
1791
- var emptyExpandIcon = createElement('span', {
1792
- className: 'e-icons e-none',
1793
- styles: 'width: 10px; display: inline-block'
1794
- });
1775
+ var emptyExpandIcon = createElement('span', { className: 'e-icons e-none' });
1776
+ emptyExpandIcon.style.width = '10px';
1777
+ emptyExpandIcon.style.display = 'inline-block';
1795
1778
  for (var n = 0; n < pad; n++) {
1796
1779
  totalIconsWidth += 10;
1797
1780
  container.appendChild(emptyExpandIcon.cloneNode());
@@ -1818,6 +1801,13 @@ var Render = /** @__PURE__ @class */ (function () {
1818
1801
  }
1819
1802
  else {
1820
1803
  expand = !(!data.expanded || !getExpandStatus(this.parent, data, this.parent.grid.getCurrentViewRecords()));
1804
+ // TicketsID 43483: While Modify Data Expand and Collapse Icon Behavior Changed
1805
+ if (this.parent.editSettings.mode === 'Cell' && !isRemoteData(this.parent)) {
1806
+ var selectedRow = this.parent.flatData.find(function (item) { return item.uniqueID === data.uniqueID; });
1807
+ if (!isNullOrUndefined(selectedRow)) {
1808
+ expand = data.expanded !== selectedRow.expanded ? selectedRow.expanded : data.expanded;
1809
+ }
1810
+ }
1821
1811
  }
1822
1812
  addClass([expandIcon], (expand) ? 'e-treegridexpand' : 'e-treegridcollapse');
1823
1813
  totalIconsWidth += 18;
@@ -1935,7 +1925,7 @@ var Render = /** @__PURE__ @class */ (function () {
1935
1925
  var templateFn = 'templateFn';
1936
1926
  var colindex = args.column.index;
1937
1927
  if (isNullOrUndefined(treeColumn.field)) {
1938
- args.cell.setAttribute('data-colindex', colindex + '');
1928
+ args.cell.setAttribute('aria-colindex', (colindex + 1) + '');
1939
1929
  }
1940
1930
  if (treeColumn.field === args.column.field && !isNullOrUndefined(treeColumn.template)) {
1941
1931
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
@@ -2476,115 +2466,116 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
2476
2466
  rowDetails.record.childRecords = result;
2477
2467
  }
2478
2468
  for (var r = 0; r < result.length; r++) {
2479
- if (_this.parent.enableVirtualization && result[parseInt(r.toString(), 10)]["" + _this.parent.idMapping] === rowDetails.record["" + _this.parent.idMapping] && rowDetails.action === 'remoteExpand') {
2469
+ var record = result[parseInt(r.toString(), 10)];
2470
+ if (_this.parent.enableVirtualization && record["" + _this.parent.idMapping] === rowDetails.record["" + _this.parent.idMapping] && rowDetails.action === 'remoteExpand') {
2480
2471
  _this.parent["" + remoteExpandedData].push(rowDetails.record);
2481
2472
  }
2482
- else if (_this.parent.enableVirtualization && result[parseInt(r.toString(), 10)]["" + _this.parent.idMapping] === rowDetails.record["" + _this.parent.idMapping] && rowDetails.action === 'collapse') {
2473
+ else if (_this.parent.enableVirtualization && record["" + _this.parent.idMapping] === rowDetails.record["" + _this.parent.idMapping] && rowDetails.action === 'collapse') {
2483
2474
  for (var i = 0; i < _this.parent["" + remoteExpandedData].length; i++) {
2484
2475
  if (rowDetails.record["" + _this.parent.idMapping] === _this.parent["" + remoteExpandedData][parseInt(i.toString(), 10)]["" + _this.parent.idMapping]) {
2485
2476
  _this.parent["" + remoteExpandedData].splice(i, 1);
2486
2477
  }
2487
2478
  }
2488
2479
  }
2489
- result[parseInt(r.toString(), 10)].taskData = extend$1({}, result[parseInt(r.toString(), 10)]);
2490
- if (result[parseInt(r.toString(), 10)]["" + _this.parent.parentIdMapping] && _this.parent.enableVirtualization && _this.parent["" + remoteExpandedData].length) {
2480
+ record.taskData = extend$1({}, record);
2481
+ if (record["" + _this.parent.parentIdMapping] && _this.parent.enableVirtualization && _this.parent["" + remoteExpandedData].length) {
2491
2482
  for (var i = 0; i < _this.parent["" + remoteExpandedData].length; i++) {
2492
- if (result[parseInt(r.toString(), 10)]["" + _this.parent.parentIdMapping] === _this.parent["" + remoteExpandedData][parseInt(i.toString(), 10)]["" + _this.parent.idMapping]) {
2493
- result[parseInt(r.toString(), 10)].level = _this.parent["" + remoteExpandedData][parseInt(i.toString(), 10)]["" + level] + 1;
2483
+ if (record["" + _this.parent.parentIdMapping] === _this.parent["" + remoteExpandedData][parseInt(i.toString(), 10)]["" + _this.parent.idMapping]) {
2484
+ record.level = _this.parent["" + remoteExpandedData][parseInt(i.toString(), 10)]["" + level] + 1;
2494
2485
  var parentData = _this.parent["" + remoteExpandedData][parseInt(i.toString(), 10)];
2495
2486
  delete parentData.childRecords;
2496
- result[parseInt(r.toString(), 10)].parentItem = parentData;
2497
- result[parseInt(r.toString(), 10)].parentUniqueID = parentData.uniqueID;
2487
+ record.parentItem = parentData;
2488
+ record.parentUniqueID = parentData.uniqueID;
2498
2489
  }
2499
2490
  }
2500
2491
  }
2501
2492
  else if (_this.parent.enableVirtualization) {
2502
- if ((result[parseInt(r.toString(), 10)]["" + _this.parent.hasChildMapping] ||
2503
- _this.parentItems.indexOf(result[parseInt(r.toString(), 10)]["" + _this.parent.idMapping]) !== -1)
2493
+ if ((record["" + _this.parent.hasChildMapping] ||
2494
+ _this.parentItems.indexOf(record["" + _this.parent.idMapping]) !== -1)
2504
2495
  && !(haveChild && !haveChild[parseInt(r.toString(), 10)])) {
2505
- if (isNullOrUndefined(result[parseInt(r.toString(), 10)]["" + _this.parent.parentIdMapping])) {
2506
- result[parseInt(r.toString(), 10)].level = 0;
2496
+ if (isNullOrUndefined(record["" + _this.parent.parentIdMapping])) {
2497
+ record.level = 0;
2507
2498
  if (rowDetails.action === 'remoteExpand') {
2508
- result[parseInt(r.toString(), 10)].childRecords = [];
2509
- result[parseInt(r.toString(), 10)].childRecords = rowDetails.record.childRecords;
2499
+ record.childRecords = [];
2500
+ record.childRecords = rowDetails.record.childRecords;
2510
2501
  }
2511
2502
  }
2512
2503
  else {
2513
- result[parseInt(r.toString(), 10)].level = rowDetails.record.level;
2504
+ record.level = rowDetails.record.level;
2514
2505
  }
2515
2506
  }
2516
2507
  else {
2517
2508
  var parentData = extend$1({}, rowDetails.record);
2518
2509
  delete parentData.childRecords;
2519
- result[parseInt(r.toString(), 10)].parentItem = parentData;
2520
- result[parseInt(r.toString(), 10)].parentUniqueID = rowDetails.record.uniqueID;
2510
+ record.parentItem = parentData;
2511
+ record.parentUniqueID = rowDetails.record.uniqueID;
2521
2512
  }
2522
2513
  }
2523
2514
  else {
2524
- result[parseInt(r.toString(), 10)].level = rowDetails.record.level + 1;
2515
+ record.level = rowDetails.record.level + 1;
2525
2516
  var parentData = extend$1({}, rowDetails.record);
2526
2517
  delete parentData.childRecords;
2527
- result[parseInt(r.toString(), 10)].parentItem = parentData;
2528
- result[parseInt(r.toString(), 10)].parentUniqueID = rowDetails.record.uniqueID;
2518
+ record.parentItem = parentData;
2519
+ record.parentUniqueID = rowDetails.record.uniqueID;
2529
2520
  }
2530
- result[parseInt(r.toString(), 10)].index = Math.ceil(Math.random() * 1000);
2531
- result[parseInt(r.toString(), 10)].uniqueID = getUid(_this.parent.element.id + '_data_');
2532
- if (rowDetails.record["" + _this.parent.idMapping] === result[parseInt(r.toString(), 10)]["" + _this.parent.idMapping]) {
2533
- rowDetails.record.uniqueID = result[parseInt(r.toString(), 10)].uniqueID;
2521
+ record.index = Math.ceil(Math.random() * 1000);
2522
+ record.uniqueID = getUid(_this.parent.element.id + '_data_');
2523
+ if (rowDetails.record["" + _this.parent.idMapping] === record["" + _this.parent.idMapping]) {
2524
+ rowDetails.record.uniqueID = record.uniqueID;
2534
2525
  }
2535
- result[parseInt(r.toString(), 10)].checkboxState = 'uncheck';
2536
- if (_this.parent.enableVirtualization && isNullOrUndefined(result[parseInt(r.toString(), 10)].level)) {
2526
+ record.checkboxState = 'uncheck';
2527
+ if (_this.parent.enableVirtualization && isNullOrUndefined(record.level)) {
2537
2528
  for (var p = 0; p < _this.parent.grid.currentViewData.length; p++) {
2538
- if (_this.parent.grid.currentViewData[parseInt(p.toString(), 10)]["" + _this.parent.idMapping] === result[parseInt(r.toString(), 10)]["" + _this.parent.parentIdMapping]) {
2539
- result[parseInt(r.toString(), 10)].level = _this.parent.grid.currentViewData[parseInt(p.toString(), 10)]['level'] + 1;
2529
+ if (_this.parent.grid.currentViewData[parseInt(p.toString(), 10)]["" + _this.parent.idMapping] === record["" + _this.parent.parentIdMapping]) {
2530
+ record.level = _this.parent.grid.currentViewData[parseInt(p.toString(), 10)]['level'] + 1;
2540
2531
  }
2541
2532
  }
2542
2533
  }
2543
- setValue('uniqueIDCollection.' + result[parseInt(r.toString(), 10)].uniqueID, result[parseInt(r.toString(), 10)], _this.parent);
2534
+ setValue('uniqueIDCollection.' + record.uniqueID, record, _this.parent);
2544
2535
  // delete result[r].parentItem.childRecords;
2545
- if ((result[parseInt(r.toString(), 10)]["" + _this.parent.hasChildMapping] ||
2546
- _this.parentItems.indexOf(result[parseInt(r.toString(), 10)]["" + _this.parent.idMapping]) !== -1)
2536
+ if ((record["" + _this.parent.hasChildMapping] ||
2537
+ _this.parentItems.indexOf(record["" + _this.parent.idMapping]) !== -1)
2547
2538
  && !(haveChild && !haveChild[parseInt(r.toString(), 10)])) {
2548
- result[parseInt(r.toString(), 10)].hasChildRecords = true;
2539
+ record.hasChildRecords = true;
2549
2540
  if (_this.parent.enableVirtualization && !_this.parent.loadChildOnDemand) {
2550
2541
  for (var i = 0; i < _this.parent["" + remoteCollapsedData].length; i++) {
2551
- if (result[parseInt(r.toString(), 10)]["" + _this.parent.idMapping] === _this.parent["" + remoteCollapsedData][parseInt(i.toString(), 10)]["" + _this.parent.idMapping]) {
2552
- result[parseInt(r.toString(), 10)].expanded = _this.parent["" + remoteCollapsedData][parseInt(i.toString(), 10)]['expanded'];
2542
+ if (record["" + _this.parent.idMapping] === _this.parent["" + remoteCollapsedData][parseInt(i.toString(), 10)]["" + _this.parent.idMapping]) {
2543
+ record.expanded = _this.parent["" + remoteCollapsedData][parseInt(i.toString(), 10)]['expanded'];
2553
2544
  }
2554
2545
  }
2555
- if (rowDetails.action === 'collapse' && result[parseInt(r.toString(), 10)]["" + _this.parent.idMapping] !== rowDetails.record["" + _this.parent.idMapping] && result[parseInt(r.toString(), 10)].expanded !== false) {
2556
- result[parseInt(r.toString(), 10)].expanded = true;
2546
+ if (rowDetails.action === 'collapse' && record["" + _this.parent.idMapping] !== rowDetails.record["" + _this.parent.idMapping] && record.expanded !== false) {
2547
+ record.expanded = true;
2557
2548
  }
2558
- else if (rowDetails.action === 'collapse' && result[parseInt(r.toString(), 10)]["" + _this.parent.idMapping] === rowDetails.record["" + _this.parent.idMapping]) {
2559
- result[parseInt(r.toString(), 10)].expanded = false;
2549
+ else if (rowDetails.action === 'collapse' && record["" + _this.parent.idMapping] === rowDetails.record["" + _this.parent.idMapping]) {
2550
+ record.expanded = false;
2560
2551
  _this.parent["" + remoteCollapsedData].push(rowDetails.record);
2561
2552
  }
2562
2553
  else if (rowDetails.action === 'remoteExpand') {
2563
2554
  for (var i = 0; i < _this.parent.grid.currentViewData.length; i++) {
2564
- if (_this.parent.grid.currentViewData[parseInt(i.toString(), 10)]["" + _this.parent.idMapping] === result[parseInt(r.toString(), 10)]["" + _this.parent.idMapping]) {
2555
+ if (_this.parent.grid.currentViewData[parseInt(i.toString(), 10)]["" + _this.parent.idMapping] === record["" + _this.parent.idMapping]) {
2565
2556
  result.splice(r, 1, _this.parent.grid.currentViewData[parseInt(i.toString(), 10)]);
2566
2557
  }
2567
2558
  }
2568
- if (result[parseInt(r.toString(), 10)][_this.parent.idMapping] === rowDetails.record["" + _this.parent.idMapping]) {
2559
+ if (record[_this.parent.idMapping] === rowDetails.record["" + _this.parent.idMapping]) {
2569
2560
  for (var i = 0; i < _this.parent["" + remoteCollapsedData].length; i++) {
2570
2561
  if (rowDetails.record["" + _this.parent.idMapping] === _this.parent["" + remoteCollapsedData][parseInt(i.toString(), 10)]["" + _this.parent.idMapping]) {
2571
2562
  _this.parent["" + remoteCollapsedData].splice(i, 1);
2572
2563
  }
2573
2564
  }
2574
2565
  }
2575
- if (result[parseInt(r.toString(), 10)].expanded !== false) {
2576
- result[parseInt(r.toString(), 10)].expanded = true;
2566
+ if (record.expanded !== false) {
2567
+ record.expanded = true;
2577
2568
  }
2578
2569
  }
2579
2570
  }
2580
- else if (_this.parent.enableVirtualization && result[parseInt(r.toString(), 10)]["" + _this.parent.idMapping] === rowDetails.record["" + _this.parent.idMapping] && rowDetails.action !== 'collapse') {
2581
- result[parseInt(r.toString(), 10)].expanded = true;
2571
+ else if (_this.parent.enableVirtualization && record["" + _this.parent.idMapping] === rowDetails.record["" + _this.parent.idMapping] && rowDetails.action !== 'collapse') {
2572
+ record.expanded = true;
2582
2573
  }
2583
2574
  else if (!(_this.parent.enableVirtualization && !_this.parent.loadChildOnDemand)) {
2584
- result[parseInt(r.toString(), 10)].expanded = false;
2575
+ record.expanded = false;
2585
2576
  }
2586
2577
  }
2587
- datas.splice(inx + r + 1, 0, result[parseInt(r.toString(), 10)]);
2578
+ datas.splice(inx + r + 1, 0, record);
2588
2579
  }
2589
2580
  setValue('result', datas, e);
2590
2581
  setValue('action', 'beforecontentrender', e);
@@ -2926,7 +2917,7 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
2926
2917
  }());
2927
2918
 
2928
2919
  /**
2929
- * Defines Predefined toolbar items.
2920
+ * Defines enumerable toolbar items for programmatic access.
2930
2921
  *
2931
2922
  * @hidden
2932
2923
  */
@@ -2948,7 +2939,7 @@ var ToolbarItem;
2948
2939
  ToolbarItem[ToolbarItem["RowOutdent"] = 13] = "RowOutdent";
2949
2940
  })(ToolbarItem || (ToolbarItem = {}));
2950
2941
  /**
2951
- * Defines predefined contextmenu items.
2942
+ * Enumerates detailed context menu items used for menu configurations.
2952
2943
  *
2953
2944
  * @hidden
2954
2945
  */
@@ -2994,7 +2985,7 @@ var __decorate$6 = (undefined && undefined.__decorate) || function (decorators,
2994
2985
  return c > 3 && r && Object.defineProperty(target, key, r), r;
2995
2986
  };
2996
2987
  /**
2997
- * Configures the paging behavior of the TreeGrid.
2988
+ * Configures the paging behavior of the TreeGrid, enabling you to manage and display data efficiently across multiple pages.
2998
2989
  */
2999
2990
  var PageSettings = /** @__PURE__ @class */ (function (_super) {
3000
2991
  __extends$8(PageSettings, _super);
@@ -3048,7 +3039,7 @@ var __decorate$7 = (undefined && undefined.__decorate) || function (decorators,
3048
3039
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3049
3040
  };
3050
3041
  /**
3051
- * Configures the TreeGrid's aggregate column.
3042
+ * Configures the aggregate column for the TreeGrid.
3052
3043
  */
3053
3044
  var AggregateColumn = /** @__PURE__ @class */ (function (_super) {
3054
3045
  __extends$9(AggregateColumn, _super);
@@ -3139,6 +3130,9 @@ var AggregateColumn = /** @__PURE__ @class */ (function (_super) {
3139
3130
  ], AggregateColumn.prototype, "customAggregate", void 0);
3140
3131
  return AggregateColumn;
3141
3132
  }(ChildProperty));
3133
+ /**
3134
+ * Configures the aggregate rows in the TreeGrid.
3135
+ */
3142
3136
  var AggregateRow = /** @__PURE__ @class */ (function (_super) {
3143
3137
  __extends$9(AggregateRow, _super);
3144
3138
  function AggregateRow() {
@@ -3173,7 +3167,7 @@ var __decorate$8 = (undefined && undefined.__decorate) || function (decorators,
3173
3167
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3174
3168
  };
3175
3169
  /**
3176
- * Configures the edit behavior of the TreeGrid.
3170
+ * Configures the edit behavior of the TreeGrid, defining how records can be added, modified, or deleted.
3177
3171
  */
3178
3172
  var EditSettings = /** @__PURE__ @class */ (function (_super) {
3179
3173
  __extends$a(EditSettings, _super);
@@ -3236,7 +3230,7 @@ var __decorate$9 = (undefined && undefined.__decorate) || function (decorators,
3236
3230
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3237
3231
  };
3238
3232
  /**
3239
- * Represents the field name and direction of sort column.
3233
+ * Represents the field name and direction of a sort column in the TreeGrid.
3240
3234
  */
3241
3235
  var SortDescriptor = /** @__PURE__ @class */ (function (_super) {
3242
3236
  __extends$b(SortDescriptor, _super);
@@ -3252,7 +3246,7 @@ var SortDescriptor = /** @__PURE__ @class */ (function (_super) {
3252
3246
  return SortDescriptor;
3253
3247
  }(ChildProperty));
3254
3248
  /**
3255
- * Configures the sorting behavior of TreeGrid.
3249
+ * Configures the sorting behavior of the TreeGrid.
3256
3250
  */
3257
3251
  var SortSettings = /** @__PURE__ @class */ (function (_super) {
3258
3252
  __extends$b(SortSettings, _super);
@@ -3695,7 +3689,7 @@ var __decorate$a = (undefined && undefined.__decorate) || function (decorators,
3695
3689
  return c > 3 && r && Object.defineProperty(target, key, r), r;
3696
3690
  };
3697
3691
  /**
3698
- * Configures the infinite scroll behavior of Tree Grid.
3692
+ * Configures the infinite scroll behavior of the Tree Grid.
3699
3693
  */
3700
3694
  var InfiniteScrollSettings = /** @__PURE__ @class */ (function (_super) {
3701
3695
  __extends$c(InfiniteScrollSettings, _super);
@@ -3796,13 +3790,13 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
3796
3790
  }
3797
3791
  TreeGrid_1 = TreeGrid;
3798
3792
  /**
3799
- * Export TreeGrid data to Excel file(.xlsx).
3793
+ * Exports the TreeGrid data to an Excel file (.xlsx).
3800
3794
  *
3801
- * @param {ExcelExportProperties | TreeGridExcelExportProperties} excelExportProperties - Defines the export properties of the Tree Grid.
3802
- * @param {boolean} isMultipleExport - Define to enable multiple export.
3803
- * @param {workbook} workbook - Defines the Workbook if multiple export is enabled.
3804
- * @param {boolean} isBlob - If 'isBlob' set to true, then it will be returned as blob data.
3805
- * @returns {Promise<any>} - Returns promise object of export action
3795
+ * @param {ExcelExportProperties | TreeGridExcelExportProperties} excelExportProperties - The properties used to configure the Excel export.
3796
+ * @param {boolean} isMultipleExport - Indicates whether multiple exporting is enabled.
3797
+ * @param {workbook} workbook - The workbook instance used for multiple exports.
3798
+ * @param {boolean} isBlob - If set to true, the result will be returned as blob data.
3799
+ * @returns {Promise<any>} - Returns a promise that resolves with the result of the export action.
3806
3800
  */
3807
3801
  /* eslint-disable */
3808
3802
  TreeGrid.prototype.excelExport = function (excelExportProperties, isMultipleExport, workbook, isBlob) {
@@ -3810,13 +3804,13 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
3810
3804
  return this.excelExportModule.Map(excelExportProperties, isMultipleExport, workbook, isBlob, false);
3811
3805
  };
3812
3806
  /**
3813
- * Export TreeGrid data to CSV file.
3807
+ * Exports the TreeGrid data to a CSV file.
3814
3808
  *
3815
- * @param {ExcelExportProperties} excelExportProperties - Defines the export properties of the TreeGrid.
3816
- * @param {boolean} isMultipleExport - Define to enable multiple export.
3817
- * @param {workbook} workbook - Defines the Workbook if multiple export is enabled.
3818
- * @param {boolean} isBlob - If 'isBlob' set to true, then it will be returned as blob data.
3819
- * @returns {Promise<any>} - Returns promise object of export action
3809
+ * @param {ExcelExportProperties} excelExportProperties - The properties used to configure the CSV export.
3810
+ * @param {boolean} isMultipleExport - Indicates whether multiple exporting is enabled.
3811
+ * @param {workbook} workbook - The workbook instance used for multiple exports.
3812
+ * @param {boolean} isBlob - If set to true, the result will be returned as blob data.
3813
+ * @returns {Promise<any>} - Returns a promise that resolves with the result of the export action.
3820
3814
  */
3821
3815
  /* eslint-disable */
3822
3816
  TreeGrid.prototype.csvExport = function (excelExportProperties, isMultipleExport, workbook, isBlob) {
@@ -3824,21 +3818,21 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
3824
3818
  return this.excelExportModule.Map(excelExportProperties, isMultipleExport, workbook, isBlob, true);
3825
3819
  };
3826
3820
  /**
3827
- * Export TreeGrid data to PDF document.
3821
+ * Exports the TreeGrid data to a PDF document.
3828
3822
  *
3829
- * @param {PdfExportProperties | TreeGridPdfExportProperties} pdfExportProperties - Defines the export properties of the Tree Grid.
3830
- * @param {boolean} isMultipleExport - Define to enable multiple export.
3831
- * @param {Object} pdfDoc - Defined the Pdf Document if multiple export is enabled.
3832
- * @param {boolean} isBlob - If 'isBlob' set to true, then it will be returned as blob data.
3833
- * @returns {Promise<any>} - Returns promise object of export action
3823
+ * @param {PdfExportProperties | TreeGridPdfExportProperties} pdfExportProperties - The properties used to configure the PDF export.
3824
+ * @param {boolean} isMultipleExport - Indicates whether multiple exporting is enabled.
3825
+ * @param {Object} pdfDoc - The PDF document instance used for multiple exports.
3826
+ * @param {boolean} isBlob - If set to true, the result will be returned as blob data.
3827
+ * @returns {Promise<any>} - Returns a promise that resolves with the result of the export action.
3834
3828
  */
3835
3829
  TreeGrid.prototype.pdfExport = function (pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
3836
3830
  return this.pdfExportModule.Map(pdfExportProperties, isMultipleExport, pdfDoc, isBlob);
3837
3831
  };
3838
3832
  /**
3839
- * Sends a post request to export tree grid to excel file in server side.
3833
+ * Sends a POST request to export the TreeGrid to an Excel file on the server side.
3840
3834
  *
3841
- * @param {string} url - Pass URL for server side excel export action.
3835
+ * @param {string} url - The URL for the server-side Excel export action.
3842
3836
  * @returns {void}
3843
3837
  */
3844
3838
  TreeGrid.prototype.serverExcelExport = function (url) {
@@ -3846,9 +3840,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
3846
3840
  this.exportTreeGrid(url);
3847
3841
  };
3848
3842
  /**
3849
- * Sends a post request to export tree grid to pdf file in server side.
3843
+ * Sends a POST request to export the TreeGrid to a PDF document on the server side.
3850
3844
  *
3851
- * @param {string} url - Pass URL for server-side pdf export action.
3845
+ * @param {string} url - The URL for the server-side PDF export action.
3852
3846
  * @returns {void}
3853
3847
  */
3854
3848
  TreeGrid.prototype.serverPdfExport = function (url) {
@@ -3856,9 +3850,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
3856
3850
  this.exportTreeGrid(url);
3857
3851
  };
3858
3852
  /**
3859
- * Sends a Post request to export Tree Grid to CSV file in server side.
3853
+ * Sends a POST request to export the TreeGrid to a CSV file on the server side.
3860
3854
  *
3861
- * @param {string} url - Pass URL for server-side csv export action.
3855
+ * @param {string} url - The URL for the server-side CSV export action.
3862
3856
  * @returns {void}
3863
3857
  */
3864
3858
  TreeGrid.prototype.serverCsvExport = function (url) {
@@ -3886,7 +3880,8 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
3886
3880
  treeGridModel.searchSettings.fields = queries.search && queries.search[0]['fields'] || [];
3887
3881
  treeGridModel.sortSettings.columns = queries.sorted;
3888
3882
  treeGridModel.columns = this.setHeaderText(treeGridModel.columns, include);
3889
- var form = this.createElement('form', { id: 'ExportForm', styles: 'display:none;' });
3883
+ var form = this.createElement('form', { id: 'ExportForm' });
3884
+ form.style.display = 'none';
3890
3885
  var treeGridInput = this.createElement('input', { id: 'treeGridInput', attrs: { name: 'treeGridModel' } });
3891
3886
  treeGridInput.value = JSON.stringify(treeGridModel);
3892
3887
  form.method = 'POST';
@@ -3977,11 +3972,11 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
3977
3972
  }
3978
3973
  };
3979
3974
  /**
3980
- * Sorts a column with the given options.
3975
+ * Sorts a column with the specified options.
3981
3976
  *
3982
- * @param {string} columnName - Defines the column name to be sorted.
3983
- * @param {SortDirection} direction - Defines the direction of sorting field.
3984
- * @param {boolean} isMultiSort - Specifies whether the previous sorted columns are to be maintained.
3977
+ * @param {string} columnName - The name of the column to be sorted.
3978
+ * @param {SortDirection} direction - The direction of the sorting operation.
3979
+ * @param {boolean} isMultiSort - Specifies whether previous sorted columns should be maintained during sorting.
3985
3980
  * @returns {void}
3986
3981
  */
3987
3982
  TreeGrid.prototype.sortByColumn = function (columnName, direction, isMultiSort) {
@@ -3990,7 +3985,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
3990
3985
  }
3991
3986
  };
3992
3987
  /**
3993
- * Clears all the sorted columns of the TreeGrid.
3988
+ * Clears all the sorted columns in the TreeGrid.
3994
3989
  *
3995
3990
  * @returns {void}
3996
3991
  */
@@ -4000,9 +3995,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4000
3995
  }
4001
3996
  };
4002
3997
  /**
4003
- * Remove sorted column by field name.
3998
+ * Removes the sorted state from a column specified by the field name.
4004
3999
  *
4005
- * @param {string} field - Defines the column field name to remove sort.
4000
+ * @param {string} field - The field name of the column from which the sort state should be removed.
4006
4001
  * @returns {void}
4007
4002
  * @hidden
4008
4003
  */
@@ -4012,36 +4007,32 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4012
4007
  }
4013
4008
  };
4014
4009
  /**
4015
- * Searches TreeGrid records using the given key.
4016
- * You can customize the default search option by using the
4017
- * [`searchSettings`](./#searchsettings/).
4010
+ * Searches for TreeGrid records using a specified search string.
4011
+ * Customize the search behavior through the [searchSettings](./#searchsettings/).
4018
4012
  *
4019
- * @param {string} searchString - Defines the key.
4013
+ * @param {string} searchString - The string used as the search key.
4020
4014
  * @returns {void}
4021
4015
  */
4022
4016
  TreeGrid.prototype.search = function (searchString) {
4023
4017
  this.grid.search(searchString);
4024
4018
  };
4025
4019
  /**
4026
- * Changes the column width to automatically fit its content to ensure that the width shows the content without wrapping/hiding.
4027
- * > * This method ignores the hidden columns.
4028
- * > * Uses the `autoFitColumns` method in the `dataBound` event to resize at initial rendering.
4020
+ * Adjusts column widths to fit their content, ensuring content is displayed without wrapping or truncation.
4021
+ * - Hidden columns are ignored by this method.
4022
+ * - Use the `autoFitColumns` method during the `dataBound` event for initial rendering.
4029
4023
  *
4030
- * @param {string |string[]} fieldNames - Defines the column names.
4024
+ * @param {string | string[]} fieldNames - The name(s) of the column(s) to be auto-fitted.
4031
4025
  * @returns {void}
4032
- *
4033
- *
4034
- *
4035
4026
  */
4036
4027
  TreeGrid.prototype.autoFitColumns = function (fieldNames) {
4037
4028
  this.resizeModule.autoFitColumns(fieldNames);
4038
4029
  this.updateColumnModel();
4039
4030
  };
4040
4031
  /**
4041
- * Changes the TreeGrid column positions by field names.
4032
+ * Reorders TreeGrid columns by specifying their field names.
4042
4033
  *
4043
- * @param {string} fromFName - Defines the origin field name.
4044
- * @param {string} toFName - Defines the destination field name.
4034
+ * @param {string | string[]} fromFName - The field name(s) of the column(s) to be moved.
4035
+ * @param {string} toFName - The destination field name to place the moved columns.
4045
4036
  * @returns {void}
4046
4037
  */
4047
4038
  TreeGrid.prototype.reorderColumns = function (fromFName, toFName) {
@@ -4064,9 +4055,8 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4064
4055
  }
4065
4056
  };
4066
4057
  /**
4067
- * By default, prints all the pages of the TreeGrid and hides the pager.
4068
- * > You can customize print options using the
4069
- * [`printMode`](./#printmode).
4058
+ * Prints all the pages of the TreeGrid and hides the pager by default.
4059
+ * Customize print options using the [printMode](./#printmode).
4070
4060
  *
4071
4061
  * @returns {void}
4072
4062
  */
@@ -4210,7 +4200,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4210
4200
  this.isSelfReference = !isNullOrUndefined(this.parentIdMapping);
4211
4201
  };
4212
4202
  /**
4213
- * Binding events to the element while component creation.
4203
+ * Attaches event handlers to the necessary elements during the component's initialization.
4214
4204
  *
4215
4205
  * @hidden
4216
4206
  * @returns {void}
@@ -4228,9 +4218,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4228
4218
  }
4229
4219
  };
4230
4220
  /**
4231
- * To provide the array of modules needed for component rendering
4221
+ * Provides a list of the modules that are required for rendering the TreeGrid component.
4232
4222
  *
4233
- * @returns {ModuleDeclaration[]} - Returns TreeGrid modules collection
4223
+ * This method is essential for ensuring that all dependent modules are loaded and available
4224
+ * during the component's lifecycle, enabling full functionality.
4225
+ *
4226
+ * @returns {ModuleDeclaration[]} - Returns an array of the required TreeGrid module declarations.
4234
4227
  * @hidden
4235
4228
  */
4236
4229
  TreeGrid.prototype.requiredModules = function () {
@@ -4547,7 +4540,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4547
4540
  if (this.enableVirtualization && !isNullOrUndefined(this.detailTemplate)) {
4548
4541
  failureCases.push('Virtual scrolling is not compatible with the detail template');
4549
4542
  }
4550
- if ((this.frozenColumns > 0 || this.columnModel.filter(function (col) { return col.isFrozen; }) || this.frozenRows > 0)
4543
+ if ((this.frozenColumns > 0 || this.frozenRows > 0 || this.columnModel.filter(function (col) { return col.isFrozen; }))
4551
4544
  && (!isNullOrUndefined(this.detailTemplate) || !isNullOrUndefined(this.rowTemplate))) {
4552
4545
  failureCases.push('Frozen rows and columns are not supported with the Detail template and row template.');
4553
4546
  }
@@ -4557,9 +4550,6 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4557
4550
  if (this.allowSelection && !isNullOrUndefined(this.rowTemplate)) {
4558
4551
  failureCases.push('Selection is not supported in RowTemplate');
4559
4552
  }
4560
- if (this.treeColumnIndex < 0) {
4561
- failureCases.push('For showing tree structure it is must to set the TreeColumnIndex value.');
4562
- }
4563
4553
  if (this.treeColumnIndex >= this.columns.length) {
4564
4554
  failureCases.push('TreeColumnIndex value should not exceed the total column count.');
4565
4555
  }
@@ -4585,9 +4575,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4585
4575
  failureCases.push('Only one column can have the ShowCheckbox option enabled.');
4586
4576
  }
4587
4577
  }
4588
- var alignColumn = this.columnModel.filter(function (col) { return col.textAlign === 'Right' && col.field === _this.columnModel[_this.treeColumnIndex].field; });
4589
- if (alignColumn.length !== 0) {
4590
- failureCases.push('TextAlign right for the tree column is not applicable.');
4578
+ var alignColumn;
4579
+ if (this.treeColumnIndex !== null && this.treeColumnIndex !== -1) {
4580
+ alignColumn = this.columnModel.filter(function (col) { return col.textAlign === 'Right' && col.field === _this.columnModel[_this.treeColumnIndex].field; });
4581
+ if (alignColumn.length !== 0) {
4582
+ failureCases.push('TextAlign right for the tree column is not applicable.');
4583
+ }
4591
4584
  }
4592
4585
  if (failureCases.length > 0) {
4593
4586
  var failureEventArgs_1 = {
@@ -4623,7 +4616,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4623
4616
  this.flatData = data;
4624
4617
  this.flatData.filter(function (e) {
4625
4618
  setValue('uniqueIDCollection.' + e.uniqueID, e, _this);
4626
- if (e.level === 0) {
4619
+ if (e.level === 0 && !_this.parentData.some(function (record) { return record.uniqueID === e.uniqueID; })) {
4627
4620
  _this.parentData.push(e);
4628
4621
  }
4629
4622
  });
@@ -4757,14 +4750,8 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4757
4750
  _this.trigger(rowDeselecting, args);
4758
4751
  };
4759
4752
  this.grid.rowSelected = function (args) {
4760
- if (_this.enableVirtualization && args.isHeaderCheckboxClicked &&
4761
- _this.grid.currentViewData.length !== _this.grid.selectionModule.selectedRowIndexes.length) {
4762
- var updateRowSelection = 'updateRowSelection';
4763
- for (var i = 0; i < _this.getRows().length; i++) {
4764
- if (_this.getRows()[parseInt(i.toString(), 10)].getElementsByClassName('e-frame e-icons e-uncheck').length) {
4765
- _this.grid.selectionModule["" + updateRowSelection](_this.getRows()[parseInt(i.toString(), 10)], _this.getCurrentViewRecords()[parseInt(i.toString(), 10)].index);
4766
- }
4767
- }
4753
+ if (_this.enableVirtualization) {
4754
+ _this.virtualScrollModule.updateSelection(args);
4768
4755
  }
4769
4756
  _this.selectedRowIndex = _this.grid.selectedRowIndex;
4770
4757
  _this.notify(rowSelected, args);
@@ -5506,6 +5493,14 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5506
5493
  }
5507
5494
  return gridColumnCollection;
5508
5495
  };
5496
+ TreeGrid.prototype.lastRowCellBorderUpdated = function () {
5497
+ var rows = this.getContentTable().querySelectorAll('tr.e-row');
5498
+ var visibleRows = Array.from(rows).filter(function (row) { return !row.classList.contains('e-childrow-hidden'); });
5499
+ if (visibleRows.length > 0) {
5500
+ var lastVisibleRow = visibleRows[visibleRows.length - 1];
5501
+ this.lastRowBorder(lastVisibleRow, true);
5502
+ }
5503
+ };
5509
5504
  /**
5510
5505
  * Called internally if any of the property value changed.
5511
5506
  *
@@ -5731,7 +5726,11 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5731
5726
  this.grid.refreshColumns();
5732
5727
  };
5733
5728
  /**
5734
- * Destroys the component (detaches/removes all event handlers, attributes, classes, and empties the component element).
5729
+ * Destroys the TreeGrid component by detaching event handlers,
5730
+ * removing attributes and classes, and clearing the component's DOM elements.
5731
+ *
5732
+ * This method ensures that all resources used by the TreeGrid are properly released
5733
+ * and the component is cleaned up from the DOM to prevent memory leaks.
5735
5734
  *
5736
5735
  * @method destroy
5737
5736
  * @returns {void}
@@ -5769,7 +5768,8 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5769
5768
  this.grid = null;
5770
5769
  };
5771
5770
  /**
5772
- * Update the TreeGrid model
5771
+ * Updates the TreeGrid model and ensures that the underlying Grid's data model is in sync with TreeGrid.
5772
+ * This method binds current data and settings to the TreeGrid.
5773
5773
  *
5774
5774
  * @method dataBind
5775
5775
  * @returns {void}
@@ -5788,7 +5788,10 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5788
5788
  this.grid.dataBind();
5789
5789
  };
5790
5790
  /**
5791
- * Get the properties to be maintained in the persisted state.
5791
+ * Retrieves the properties of the TreeGrid that should be retained and persisted between sessions.
5792
+ *
5793
+ * The method ensures that user preferences and important settings like paging, sorting, filtering,
5794
+ * column configurations, etc., are preserved and can be restored when the component is re-initialized.
5792
5795
  *
5793
5796
  * @returns {string} - Returns persist properties details
5794
5797
  * @hidden
@@ -5880,7 +5883,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5880
5883
  }
5881
5884
  };
5882
5885
  /**
5883
- * Returns TreeGrid rows
5886
+ * Retrieves all the TreeGrid row elements.
5887
+ *
5888
+ * This method is useful for accessing the HTML representation of the rows for further manipulation or inspection.
5884
5889
  *
5885
5890
  * @returns {HTMLTableRowElement[]} - Returns row elements collection
5886
5891
  */
@@ -5888,7 +5893,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5888
5893
  return this.grid.getRows();
5889
5894
  };
5890
5895
  /**
5891
- * Gets the pager of the TreeGrid.
5896
+ * Obtains the pager element of the TreeGrid.
5897
+ *
5898
+ * The pager enables navigation between pages when the TreeGrid displays paginated data.
5892
5899
  *
5893
5900
  * @returns {Element} - Returns pager element
5894
5901
  */
@@ -5896,12 +5903,14 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5896
5903
  return this.grid.getPager(); //get element from pager
5897
5904
  };
5898
5905
  /**
5899
- * Adds a new record to the TreeGrid. Without passing parameters, it adds empty rows.
5900
- * > `editSettings.allowEditing` should be true.
5906
+ * Adds a new record to the TreeGrid at the specified position or default location.
5907
+ *
5908
+ * @param {Object} data - Object containing the data for the new record. If omitted, an empty row is added.
5909
+ * @param {number} index - The index at which the new row should be added.
5910
+ * @param {RowPosition} position - Specifies the position of the new row (e.g., before, after or child).
5911
+ *
5912
+ * > Requires `editSettings.allowAdding` to be true.
5901
5913
  *
5902
- * @param {Object} data - Defines the new add record data.
5903
- * @param {number} index - Defines the row index to be added.
5904
- * @param {RowPosition} position - Defines the new row position to be added.
5905
5914
  * @returns {void}
5906
5915
  */
5907
5916
  TreeGrid.prototype.addRecord = function (data, index, position) {
@@ -5912,7 +5921,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5912
5921
  }
5913
5922
  };
5914
5923
  /**
5915
- * Cancels edited state.
5924
+ * Cancels the current edit operation on the TreeGrid.
5925
+ *
5926
+ * This method discards changes made to the row and exits the edit mode without saving.
5916
5927
  *
5917
5928
  * @returns {void}
5918
5929
  */
@@ -5922,7 +5933,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5922
5933
  }
5923
5934
  };
5924
5935
  /**
5925
- * Saves the cell that is currently edited. It does not save the value to the DataSource.
5936
+ * Saves the current cell value changes without committing to the data source.
5937
+ *
5938
+ * This operation persists the changes in the UI but not in the underlying data model.
5926
5939
  *
5927
5940
  * @returns {void}
5928
5941
  */
@@ -5932,7 +5945,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5932
5945
  }
5933
5946
  };
5934
5947
  /**
5935
- * To update the specified cell by given value without changing into edited state.
5948
+ * Updates the value of a specific cell directly, bypassing the edit mode.
5949
+ *
5950
+ * This method provides a quick way to update the UI and data without user interaction.
5936
5951
  *
5937
5952
  * @param {number} rowIndex Defines the row index.
5938
5953
  * @param {string} field Defines the column field.
@@ -5945,10 +5960,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5945
5960
  }
5946
5961
  };
5947
5962
  /**
5948
- * To update the specified row by given values without changing into edited state.
5963
+ * Updates a specific row with given values directly, skipping the edit state.
5949
5964
  *
5950
- * @param {number} index Defines the row index.
5951
- * @param {Object} data Defines the data object to be updated.
5965
+ * This method allows for bulk updates of row data programmatically.
5966
+ *
5967
+ * @param {number} index - The index of the row to update.
5968
+ * @param {Object} data - The data object containing updated field values.
5952
5969
  * @returns {void}
5953
5970
  */
5954
5971
  TreeGrid.prototype.updateRow = function (index, data) {
@@ -5964,12 +5981,13 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5964
5981
  }
5965
5982
  };
5966
5983
  /**
5967
- * Delete a record with Given options. If fieldName and data is not given then TreeGrid will delete the selected record.
5968
- * > `editSettings.allowDeleting` should be true.
5984
+ * Deletes a record based on specified criteria or the selected record if none specified.
5969
5985
  *
5970
- * @param {string} fieldName - Defines the primary key field, 'Name of the column'.
5971
- * @param {Object} data - Defines the JSON data of the record to be deleted.
5986
+ * @param {string} fieldName - The name of the primary key field.
5987
+ * @param {Object} data - The data object representing the record to delete.
5972
5988
  * @returns {void}
5989
+ *
5990
+ * > Requires `editSettings.allowDeleting` to be true.
5973
5991
  */
5974
5992
  TreeGrid.prototype.deleteRecord = function (fieldName, data) {
5975
5993
  if ((isNullOrUndefined(fieldName) && (isNullOrUndefined(data)) || (this.getSelectedRecords().length <= 0))) {
@@ -5981,9 +5999,11 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5981
5999
  }
5982
6000
  };
5983
6001
  /**
5984
- * To edit any particular row by TR element.
6002
+ * Initiates editing for a specific row using its HTML element.
5985
6003
  *
5986
- * @param {HTMLTableRowElement} row - Defines the table row to be edited.
6004
+ * This allows for manual control of which row enters edit mode through the UI.
6005
+ *
6006
+ * @param {HTMLTableRowElement} row - The table row element to enter into edit mode.
5987
6007
  * @returns {void}
5988
6008
  */
5989
6009
  TreeGrid.prototype.startEdit = function (row) {
@@ -5992,10 +6012,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5992
6012
  }
5993
6013
  };
5994
6014
  /**
5995
- * To edit any particular cell using row index and cell index.
6015
+ * Begins editing of a specific cell using row and field indices.
6016
+ *
6017
+ * Customers can programmatically specify which cell to edit without user input.
5996
6018
  *
5997
- * @param {number} rowIndex - Defines row index to edit a particular cell.
5998
- * @param {string} field - Defines the field name of the column to perform cell edit.
6019
+ * @param {number} rowIndex - The index of the row containing the cell.
6020
+ * @param {string} field - The field name of the cell to edit.
5999
6021
  * @returns {void}
6000
6022
  */
6001
6023
  TreeGrid.prototype.editCell = function (rowIndex, field) {
@@ -6004,10 +6026,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6004
6026
  }
6005
6027
  };
6006
6028
  /**
6007
- * Enables or disables ToolBar items.
6029
+ * Enables or disables specified ToolBar items within the TreeGrid.
6008
6030
  *
6009
- * @param {string[]} items - Defines the collection of itemID of ToolBar items.
6010
- * @param {boolean} isEnable - Defines the items to be enabled or disabled.
6031
+ * This facilitates dynamic control of toolbar actions based on application logic.
6032
+ *
6033
+ * @param {string[]} items - Array of ToolBar item IDs to enable or disable.
6034
+ * @param {boolean} isEnable - Boolean flag to determine whether to enable (true) or disable (false) items.
6011
6035
  * @returns {void}
6012
6036
  */
6013
6037
  TreeGrid.prototype.enableToolbarItems = function (items, isEnable) {
@@ -6016,7 +6040,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6016
6040
  }
6017
6041
  };
6018
6042
  /**
6019
- * If TreeGrid is in editable state, you can save a record by invoking endEdit.
6043
+ * Commits the edits made to a record in edit mode, updating the data source.
6044
+ *
6045
+ * Use this method to finalize changes for rows in edit mode, ensuring persistence.
6020
6046
  *
6021
6047
  * @returns {void}
6022
6048
  */
@@ -6026,10 +6052,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6026
6052
  }
6027
6053
  };
6028
6054
  /**
6029
- * Column chooser can be displayed on screen by given position(X and Y axis).
6055
+ * Displays the column chooser at a specified screen position.
6030
6056
  *
6031
- * @param {number} x - Defines the X axis.
6032
- * @param {number} y - Defines the Y axis.
6057
+ * Useful for customizing the visibility of columns interactively via the UI.
6058
+ *
6059
+ * @param {number} x - The X-axis position of the column chooser.
6060
+ * @param {number} y - The Y-axis position of the column chooser.
6033
6061
  * @returns {void}
6034
6062
  */
6035
6063
  TreeGrid.prototype.openColumnChooser = function (x, y) {
@@ -6038,9 +6066,11 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6038
6066
  }
6039
6067
  };
6040
6068
  /**
6041
- * Delete any visible row by TR element.
6069
+ * Deletes a visible row from the TreeGrid using its HTML element.
6070
+ *
6071
+ * Apply this method when handling row deletions through DOM manipulations.
6042
6072
  *
6043
- * @param {HTMLTableRowElement} tr - Defines the table row element.
6073
+ * @param {HTMLTableRowElement} tr - The table row element to remove.
6044
6074
  * @returns {void}
6045
6075
  */
6046
6076
  TreeGrid.prototype.deleteRow = function (tr) {
@@ -6049,20 +6079,23 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6049
6079
  }
6050
6080
  };
6051
6081
  /**
6052
- * Get the names of the primary key columns of the TreeGrid.
6082
+ * Retrieves the primary key field names used in the TreeGrid.
6083
+ *
6084
+ * This information is crucial for identifying and manipulating unique rows.
6053
6085
  *
6054
- * @returns {string[]} - Returns primary key collection
6086
+ * @returns {string[]} - Returns an array of primary key field names.
6055
6087
  */
6056
6088
  TreeGrid.prototype.getPrimaryKeyFieldNames = function () {
6057
6089
  return this.grid.getPrimaryKeyFieldNames();
6058
6090
  };
6059
6091
  /**
6060
- * Updates particular cell value based on the given primary key value.
6061
- * > Primary key column must be specified using `columns.isPrimaryKey` property.
6092
+ * Updates the value of a specific cell using its primary key for identification.
6062
6093
  *
6063
- * @param {string| number} key - Specifies the PrimaryKey value of dataSource.
6064
- * @param {string } field - Specifies the field name which you want to update.
6065
- * @param {string | number | boolean | Date} value - To update new value for the particular cell.
6094
+ * Useful for targeted updates that leverage unique identifiers to ensure accuracy.
6095
+ *
6096
+ * @param {string| number} key - The primary key value of the row containing the cell.
6097
+ * @param {string} field - The field name of the cell to update.
6098
+ * @param {string | number | boolean | Date} value - The new value to assign to the specified cell.
6066
6099
  * @returns {void}
6067
6100
  */
6068
6101
  TreeGrid.prototype.setCellValue = function (key, field, value) {
@@ -6072,11 +6105,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6072
6105
  editAction({ value: record, action: 'edit' }, this, this.isSelfReference, record.index, this.grid.selectedRowIndex, field);
6073
6106
  };
6074
6107
  /**
6075
- * Updates and refresh the particular row values based on the given primary key value.
6076
- * > Primary key column must be specified using `columns.isPrimaryKey` property.
6108
+ * Updates the data for a specific row identified by its primary key and refreshes the display.
6109
+ *
6110
+ * Important for keeping the displayed data consistent with the source database or dataset.
6077
6111
  *
6078
- * @param {string| number} key - Specifies the PrimaryKey value of dataSource.
6079
- * @param {Object} rowData - To update new data for the particular row.
6112
+ * @param {string| number} key - The primary key value of the row to update.
6113
+ * @param {Object} rowData - The new data to apply to the row.
6080
6114
  * @returns {void}
6081
6115
  */
6082
6116
  TreeGrid.prototype.setRowData = function (key, rowData) {
@@ -6114,9 +6148,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6114
6148
  }
6115
6149
  };
6116
6150
  /**
6117
- * Navigates to the specified target page.
6151
+ * Navigates to a specified page number within the TreeGrid pagination.
6118
6152
  *
6119
- * @param {number} pageNo - Defines the page number to navigate.
6153
+ * This can be used to programmatically change the page being viewed,
6154
+ * allowing for scripted navigation through data.
6155
+ *
6156
+ * @param {number} pageNo - The page number to navigate to. Must be within valid page range.
6120
6157
  * @returns {void}
6121
6158
  */
6122
6159
  TreeGrid.prototype.goToPage = function (pageNo) {
@@ -6125,9 +6162,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6125
6162
  }
6126
6163
  };
6127
6164
  /**
6128
- * Defines the text of external message.
6165
+ * Updates the external message displayed within the pager component.
6129
6166
  *
6130
- * @param {string} message - Defines the message to update.
6167
+ * This is useful for showing custom messages or additional information
6168
+ * related to the data set or pagination status.
6169
+ *
6170
+ * @param {string} message - The custom message to display in the pager.
6131
6171
  * @returns {void}
6132
6172
  */
6133
6173
  TreeGrid.prototype.updateExternalMessage = function (message) {
@@ -6136,20 +6176,26 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6136
6176
  }
6137
6177
  };
6138
6178
  /**
6139
- * Gets a cell by row and column index.
6179
+ * Retrieves a cell element based on its row and column indices in the TreeGrid.
6140
6180
  *
6141
- * @param {number} rowIndex - Specifies the row index.
6142
- * @param {number} columnIndex - Specifies the column index.
6143
- * @returns {Element} - Returns cell element in grid content
6181
+ * This method is helpful for accessing cell-level elements for custom
6182
+ * operations or styling.
6183
+ *
6184
+ * @param {number} rowIndex - The index of the row containing the cell.
6185
+ * @param {number} columnIndex - The index of the column containing the cell.
6186
+ * @returns {Element} - Returns the HTML element of the specified cell.
6144
6187
  */
6145
6188
  TreeGrid.prototype.getCellFromIndex = function (rowIndex, columnIndex) {
6146
6189
  return this.grid.getCellFromIndex(rowIndex, columnIndex);
6147
6190
  };
6148
6191
  /**
6149
- * Gets a Column by column name.
6192
+ * Retrieves a column object by the column's field name.
6193
+ *
6194
+ * This is typically used for obtaining the details of a column for
6195
+ * configuration or data manipulation purposes.
6150
6196
  *
6151
- * @param {string} field - Specifies the column name.
6152
- * @returns {Column} - Returns tree grid column
6197
+ * @param {string} field - The field name of the column.
6198
+ * @returns {Column} - Returns the column object corresponding to the field.
6153
6199
  */
6154
6200
  TreeGrid.prototype.getColumnByField = function (field) {
6155
6201
  return iterateArrayOrObject(this.columnModel, function (item) {
@@ -6160,10 +6206,13 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6160
6206
  })[0];
6161
6207
  };
6162
6208
  /**
6163
- * Gets a column by UID.
6209
+ * Fetches a column object using the column's unique identifier (UID).
6164
6210
  *
6165
- * @param {string} uid - Specifies the column UID.
6166
- * @returns {Column} - Returns tree grid column
6211
+ * Useful in scenarios where columns do not have unique field names but
6212
+ * are uniquely identifiable via UID.
6213
+ *
6214
+ * @param {string} uid - The unique identifier for the column.
6215
+ * @returns {Column} - Returns the column object for the given UID.
6167
6216
  */
6168
6217
  TreeGrid.prototype.getColumnByUid = function (uid) {
6169
6218
  var Columns = this.initialRender ? this.grid.columns : this.columns;
@@ -6179,34 +6228,45 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6179
6228
  })[0];
6180
6229
  };
6181
6230
  /**
6182
- * Gets the collection of column fields.
6231
+ * Retrieves the names of all column fields in the TreeGrid.
6232
+ *
6233
+ * This method provides a list of field names useful for dynamic operations
6234
+ * or configuration where fields need to be enumerated or manipulated.
6183
6235
  *
6184
- * @returns {string[]} - Returns column field name as collection
6236
+ * @returns {string[]} - Returns an array of column field names.
6185
6237
  */
6186
6238
  TreeGrid.prototype.getColumnFieldNames = function () {
6187
6239
  return this.grid.getColumnFieldNames();
6188
6240
  };
6189
6241
  /**
6190
- * Gets the footer div of the TreeGrid.
6242
+ * Retrieves the footer content element of the TreeGrid, usually for styling or custom manipulation.
6191
6243
  *
6192
- * @returns {Element} - Returns footer content div element
6244
+ * This can be used to access the footer for adding custom functionality
6245
+ * or styling purposes to enhance user interaction at the bottom of the grid.
6246
+ *
6247
+ * @returns {Element} - Returns the footer content HTML element.
6193
6248
  */
6194
6249
  TreeGrid.prototype.getFooterContent = function () {
6195
6250
  return this.grid.getFooterContent();
6196
6251
  };
6197
6252
  /**
6198
- * Gets the footer table element of the TreeGrid.
6253
+ * Acquires the footer table element of the TreeGrid for layout management.
6254
+ *
6255
+ * Useful for manipulating the table's structure or style beneath the grid content.
6199
6256
  *
6200
- * @returns {Element} - Returns footer content table element
6257
+ * @returns {Element} - Returns the footer table HTML element.
6201
6258
  */
6202
6259
  TreeGrid.prototype.getFooterContentTable = function () {
6203
6260
  return this.grid.getFooterContentTable();
6204
6261
  };
6205
6262
  /**
6206
- * Shows a column by its column name.
6263
+ * Shows one or more columns based on the specified column names.
6264
+ *
6265
+ * This is useful for dynamically adjusting the visibility of columns
6266
+ * based on user actions or application logic.
6207
6267
  *
6208
- * @param {string|string[]} keys - Defines a single or collection of column names.
6209
- * @param {string} showBy - Defines the column key either as field name or header text.
6268
+ * @param {string|string[]} keys - A single column name or an array of column names to show.
6269
+ * @param {string} showBy - Key to determine visibility either as field name or header text.
6210
6270
  * @returns {void}
6211
6271
  */
6212
6272
  TreeGrid.prototype.showColumns = function (keys, showBy) {
@@ -6214,10 +6274,13 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6214
6274
  this.updateColumnModel();
6215
6275
  };
6216
6276
  /**
6217
- * Hides a column by column name.
6277
+ * Hides one or more columns based on the specified column names.
6218
6278
  *
6219
- * @param {string|string[]} keys - Defines a single or collection of column names.
6220
- * @param {string} hideBy - Defines the column key either as field name or header text.
6279
+ * Utilized to dynamically reduce the visibility of columns based on
6280
+ * user roles or preferences.
6281
+ *
6282
+ * @param {string|string[]} keys - A single column name or an array of column names to hide.
6283
+ * @param {string} hideBy - Key to evaluate columns either as field name or header text.
6221
6284
  * @returns {void}
6222
6285
  */
6223
6286
  TreeGrid.prototype.hideColumns = function (keys, hideBy) {
@@ -6225,37 +6288,48 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6225
6288
  this.updateColumnModel();
6226
6289
  };
6227
6290
  /**
6228
- * Gets a column header by column name.
6291
+ * Retrieves a column header element based on the field name of the column.
6292
+ *
6293
+ * This method helps to directly manipulate headers, such as applying custom styles.
6229
6294
  *
6230
- * @param {string} field - Specifies the column name.
6231
- * @returns {Element} - Returns column header element
6295
+ * @param {string} field - The field name of the desired column.
6296
+ * @returns {Element} - Returns the HTML element of the column header.
6232
6297
  */
6233
6298
  TreeGrid.prototype.getColumnHeaderByField = function (field) {
6234
6299
  return this.grid.getColumnHeaderByField(field);
6235
6300
  };
6236
6301
  /**
6237
- * Gets a column header by column index.
6302
+ * Acquires the column header element using the column's index.
6238
6303
  *
6239
- * @param {number} index - Specifies the column index.
6240
- * @returns {Element} - Returns column header element
6304
+ * Suitable for situations where direct column index is available
6305
+ * and header access is needed for operations.
6306
+ *
6307
+ * @param {number} index - The index of the column.
6308
+ * @returns {Element} - Returns the HTML element of the specified column header.
6241
6309
  */
6242
6310
  TreeGrid.prototype.getColumnHeaderByIndex = function (index) {
6243
6311
  return this.grid.getColumnHeaderByIndex(index);
6244
6312
  };
6245
6313
  /**
6246
- * Gets a column header by UID.
6314
+ * Retrieves a column header element utilizing the column's UID.
6247
6315
  *
6248
- * @param {string} uid - Specifies the column uid.
6249
- * @returns {Element} - Returns column header element
6316
+ * Useful for precision access to header elements when UIDs are used
6317
+ * uniquely to manage column identities.
6318
+ *
6319
+ * @param {string} uid - The UID of the column.
6320
+ * @returns {Element} - Returns the HTML element of the column header.
6250
6321
  */
6251
6322
  TreeGrid.prototype.getColumnHeaderByUid = function (uid) {
6252
6323
  return this.grid.getColumnHeaderByUid(uid);
6253
6324
  };
6254
6325
  /**
6255
- * Gets a column index by column name.
6326
+ * Determines the column index by the specified field name.
6327
+ *
6328
+ * Helpful in converting field names to indices for operations that require
6329
+ * numeric input for array or collection indexing.
6256
6330
  *
6257
- * @param {string} field - Specifies the column name.
6258
- * @returns {number} - Returns column index
6331
+ * @param {string} field - The field name of the column.
6332
+ * @returns {number} - Returns the index of the column.
6259
6333
  */
6260
6334
  TreeGrid.prototype.getColumnIndexByField = function (field) {
6261
6335
  return this.grid.getColumnIndexByField(field);
@@ -6271,19 +6345,25 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6271
6345
  return !isNullOrUndefined(index) ? index : -1;
6272
6346
  };
6273
6347
  /**
6274
- * Gets a column index by UID.
6348
+ * Determines the column index based on the unique identifier (UID).
6275
6349
  *
6276
- * @param {string} uid - Specifies the column UID.
6277
- * @returns {number} - Returns column index
6350
+ * This can be crucial in scenarios that involve dynamic column management
6351
+ * where UID provides an accurate reference.
6352
+ *
6353
+ * @param {string} uid - The UID of the column.
6354
+ * @returns {number} - Returns the column index.
6278
6355
  */
6279
6356
  TreeGrid.prototype.getColumnIndexByUid = function (uid) {
6280
6357
  return this.grid.getColumnIndexByUid(uid);
6281
6358
  };
6282
6359
  /**
6283
- * Gets the columns from the TreeGrid.
6360
+ * Fetches a collection of columns from the TreeGrid optionally refreshing the column model.
6361
+ *
6362
+ * Use this method to retrieve and optionally refresh the list of columns
6363
+ * to ensure up-to-date configurations and settings.
6284
6364
  *
6285
- * @param {boolean} isRefresh - Defined whether to update DOM
6286
- * @returns {Column[]} - Returns treegrid columns collection
6365
+ * @param {boolean} isRefresh - Determines whether to refresh the grid's column model.
6366
+ * @returns {Column[]} - Returns an array of TreeGrid column objects.
6287
6367
  */
6288
6368
  TreeGrid.prototype.getColumns = function (isRefresh) {
6289
6369
  this.updateColumnModel(this.grid.getColumns(isRefresh));
@@ -6346,9 +6426,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6346
6426
  });
6347
6427
  };
6348
6428
  /**
6349
- * Gets the content div of the TreeGrid.
6429
+ * Retrieves the main content area of the TreeGrid.
6350
6430
  *
6351
- * @returns {Element} - Return tree grid content element
6431
+ * This method allows access to the main content DIV, which can
6432
+ * be used for layout adjustments or adding custom elements.
6433
+ *
6434
+ * @returns {Element} - Returns the TreeGrid content HTML element.
6352
6435
  */
6353
6436
  TreeGrid.prototype.getContent = function () {
6354
6437
  return this.grid.getContent();
@@ -6359,7 +6442,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6359
6442
  };
6360
6443
  TreeGrid.prototype.mergeColumns = function (storedColumn, columns) {
6361
6444
  var persist2 = 'mergeColumns';
6445
+ var mergedColumns = 'mergedColumns';
6362
6446
  this.grid["" + persist2].apply(this, [storedColumn, columns]);
6447
+ this.grid["" + mergedColumns] = true;
6363
6448
  };
6364
6449
  TreeGrid.prototype.setFrozenCount = function () {
6365
6450
  var persist3 = 'setFrozenCount';
@@ -6370,7 +6455,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6370
6455
  this.grid["" + persist4].apply(this.grid, [columns]);
6371
6456
  };
6372
6457
  TreeGrid.prototype.isFrozenGrid = function () {
6373
- return this.grid.isFrozenGrid();
6458
+ return this.grid.isFrozenGrid.apply(this);
6374
6459
  };
6375
6460
  TreeGrid.prototype.updateTreeGridModel = function () {
6376
6461
  this.setProperties({ filterSettings: getObject('properties', this.grid.filterSettings) }, true);
@@ -6379,17 +6464,23 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6379
6464
  this.setProperties({ sortSettings: getObject('properties', this.grid.sortSettings) }, true);
6380
6465
  };
6381
6466
  /**
6382
- * Gets the content table of the TreeGrid.
6467
+ * Retrieves the content table element of the TreeGrid.
6468
+ *
6469
+ * This table contains the main data display area, allowing for
6470
+ * interaction and data manipulation directly within the TreeGrid.
6383
6471
  *
6384
- * @returns {Element} - Returns content table element
6472
+ * @returns {Element} - Returns the HTML element representing the content table.
6385
6473
  */
6386
6474
  TreeGrid.prototype.getContentTable = function () {
6387
6475
  return this.grid.getContentTable();
6388
6476
  };
6389
6477
  /**
6390
- * Gets all the TreeGrid's data rows.
6478
+ * Obtains all data row elements from the TreeGrid, excluding summary rows.
6391
6479
  *
6392
- * @returns {Element[]} - Returns row elements
6480
+ * Provides a way to access the visual representation of data for purposes
6481
+ * like custom formatting or event binding.
6482
+ *
6483
+ * @returns {Element[]} - Returns an array of data row elements.
6393
6484
  */
6394
6485
  TreeGrid.prototype.getDataRows = function () {
6395
6486
  var dRows = [];
@@ -6402,9 +6493,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6402
6493
  return dRows;
6403
6494
  };
6404
6495
  /**
6405
- * Get current visible data of TreeGrid.
6496
+ * Retrieves the current set of records that are visible in the TreeGrid view.
6497
+ *
6498
+ * This method excludes any summary rows to focus on the main data set
6499
+ * currently being viewed by the user.
6406
6500
  *
6407
- * @returns {Object[]} - Returns current view records
6501
+ * @returns {Object[]} - Returns an array of the current view records.
6408
6502
  * @isGenericType true
6409
6503
  */
6410
6504
  TreeGrid.prototype.getCurrentViewRecords = function () {
@@ -6412,60 +6506,78 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6412
6506
  return this.grid.currentViewData.filter(function (e) { return isNullOrUndefined(e["" + isSummaryRow]); });
6413
6507
  };
6414
6508
  /**
6415
- * Gets the added, edited,and deleted data before bulk save to the DataSource in batch mode.
6509
+ * Collects data changes (added, edited, and deleted) that have not been saved in batch mode.
6416
6510
  *
6417
- * @returns {Object} - Returns batch changes
6511
+ * This allows you to view pending changes awaiting a commit to the data source.
6512
+ *
6513
+ * @returns {Object} - Returns an object detailing batch changes.
6418
6514
  */
6419
6515
  TreeGrid.prototype.getBatchChanges = function () {
6420
6516
  return this.grid.editModule.getBatchChanges();
6421
6517
  };
6422
6518
  /**
6423
- * Gets the header div of the TreeGrid.
6519
+ * Retrieves the header content element of the TreeGrid.
6520
+ *
6521
+ * Mainly used for interacting with the header section, which includes
6522
+ * column headers and any applied header styling or events.
6424
6523
  *
6425
- * @returns {Element} - Returns Header content element
6524
+ * @returns {Element} - Returns the HTML element for header content.
6426
6525
  */
6427
6526
  TreeGrid.prototype.getHeaderContent = function () {
6428
6527
  return this.grid.getHeaderContent();
6429
6528
  };
6430
6529
  /**
6431
- * Gets the header table element of the TreeGrid.
6530
+ * Retrieves the header table element of the TreeGrid.
6531
+ *
6532
+ * This method is useful for direct access to the table structure
6533
+ * where column headers are defined.
6432
6534
  *
6433
- * @returns {Element} - Return header table element
6535
+ * @returns {Element} - Returns the HTML element for the header table.
6434
6536
  */
6435
6537
  TreeGrid.prototype.getHeaderTable = function () {
6436
6538
  return this.grid.getHeaderTable();
6437
6539
  };
6438
6540
  /**
6439
- * Gets a row by index.
6541
+ * Fetches a specific row element based on its index in the TreeGrid.
6440
6542
  *
6441
- * @param {number} index - Specifies the row index.
6442
- * @returns {Element} - Returns row element
6543
+ * This provides a way to directly access and manipulate a row using its index.
6544
+ *
6545
+ * @param {number} index - The index of the desired row.
6546
+ * @returns {Element} - Returns the HTML element of the specified row.
6443
6547
  */
6444
6548
  TreeGrid.prototype.getRowByIndex = function (index) {
6445
6549
  return this.grid.getRowByIndex(index);
6446
6550
  };
6447
6551
  /**
6448
- * Get a row information based on cell
6552
+ * Provides detailed information about a row based on a specified target element.
6449
6553
  *
6450
- * @param {Element | EventTarget} target - Target row element
6451
- * @returns {RowInfo} - Returns row information in a JSON object
6554
+ * Integral for retrieving metadata such as row index or data object
6555
+ * when working with events or complex tree structures.
6556
+ *
6557
+ * @param {Element | EventTarget} target - The target element or event triggering the request.
6558
+ * @returns {RowInfo} - Returns an object containing row information.
6452
6559
  */
6453
6560
  TreeGrid.prototype.getRowInfo = function (target) {
6454
6561
  return this.grid.getRowInfo(target);
6455
6562
  };
6456
6563
  /**
6457
- * Gets UID by column name.
6564
+ * Finds the unique identifier (UID) for a column based on its field name.
6565
+ *
6566
+ * UIDs are essential for precise identification and manipulation within complex grids.
6458
6567
  *
6459
- * @param {string} field - Specifies the column name.
6460
- * @returns {string} - Returns unique id based on column field name given
6568
+ * @param {string} field - The field name of the column.
6569
+ * @returns {string} - Returns the unique identifier for the specified column.
6461
6570
  */
6462
6571
  TreeGrid.prototype.getUidByColumnField = function (field) {
6463
6572
  return this.grid.getUidByColumnField(field);
6464
6573
  };
6465
6574
  /**
6466
- * Gets the visible columns from the TreeGrid.
6575
+ * Retrieves all the columns that are currently set to be visible within the TreeGrid.
6467
6576
  *
6468
- * @returns {Column[]} - Returns visible columns collection
6577
+ * Helps in understanding the user's current view and can be used to dynamically
6578
+ * adjust the visible columns.
6579
+ *
6580
+ * @returns {Column[]} - Returns an array of visible column objects.
6469
6581
  */
6470
6582
  TreeGrid.prototype.getVisibleColumns = function () {
6471
6583
  var cols = [];
@@ -6478,7 +6590,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6478
6590
  return cols;
6479
6591
  };
6480
6592
  /**
6481
- * By default, TreeGrid shows the spinner for all its actions. You can use this method to show spinner at your needed time.
6593
+ * Displays a loading spinner overlay across the TreeGrid for any data action or long-running process.
6594
+ *
6595
+ * This can be manually invoked to indicate processing, enhancing user experience by providing feedback.
6482
6596
  *
6483
6597
  * @returns {void}
6484
6598
  */
@@ -6486,7 +6600,10 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6486
6600
  showSpinner(this.element);
6487
6601
  };
6488
6602
  /**
6489
- * Manually shown spinner needs to hide by `hideSpinnner`.
6603
+ * Hides a manually shown loading spinner overlay from the TreeGrid.
6604
+ *
6605
+ * Ensures that any long-running process indication is removed after completion
6606
+ * to manage user interface aesthetics.
6490
6607
  *
6491
6608
  * @returns {void}
6492
6609
  */
@@ -6494,7 +6611,10 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6494
6611
  hideSpinner(this.element);
6495
6612
  };
6496
6613
  /**
6497
- * Refreshes the TreeGrid header and content.
6614
+ * Refreshes the visual appearance and data of the TreeGrid, updating header and content.
6615
+ *
6616
+ * This is crucial for synchronizing the displayed data with the underlying data source,
6617
+ * ensuring the view reflects current data.
6498
6618
  *
6499
6619
  * @returns {void}
6500
6620
  */
@@ -6514,18 +6634,24 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6514
6634
  this.grid.refresh();
6515
6635
  };
6516
6636
  /**
6517
- * Get the records of checked rows.
6637
+ * Retrieves the records associated with rows that have their checkboxes checked.
6518
6638
  *
6519
- * @returns {Object[]} - Returns records that has been checked
6639
+ * Facilitates operations that require information about specifically selected or
6640
+ * interacted rows within the grid.
6641
+ *
6642
+ * @returns {Object[]} - Returns an array of checked row data objects.
6520
6643
  * @isGenericType true
6521
6644
  */
6522
6645
  TreeGrid.prototype.getCheckedRecords = function () {
6523
6646
  return this.selectionModule.getCheckedrecords();
6524
6647
  };
6525
6648
  /**
6526
- * Get the visible records corresponding to rows visually displayed.
6649
+ * Retrieves currently visible records according to the TreeGrid's visual state.
6650
+ *
6651
+ * It considers row expansion and collapse states to return only those records
6652
+ * that a user can currently interact with.
6527
6653
  *
6528
- * @returns {Object[]} - Returns visible records based on collapse state of rows
6654
+ * @returns {Object[]} - Returns visible records reflecting the TreeGrid's current view.
6529
6655
  * @isGenericType true
6530
6656
  */
6531
6657
  TreeGrid.prototype.getVisibleRecords = function () {
@@ -6545,26 +6671,35 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6545
6671
  return visibleRecords;
6546
6672
  };
6547
6673
  /**
6548
- * Get the indexes of checked rows.
6674
+ * Retrieves the indices of rows that have their checkboxes checked.
6549
6675
  *
6550
- * @returns {number[]} - Returns checked row indexes
6676
+ * This can assist in programatically assessing which rows have been selected
6677
+ * by checkbox interaction for further processing.
6678
+ *
6679
+ * @returns {number[]} - Returns an array of indices corresponding to checked rows.
6551
6680
  */
6552
6681
  TreeGrid.prototype.getCheckedRowIndexes = function () {
6553
6682
  return this.selectionModule.getCheckedRowIndexes();
6554
6683
  };
6555
6684
  /**
6556
- * Checked the checkboxes using rowIndexes.
6685
+ * Selects rows in the TreeGrid using row indices, checking their associated checkboxes.
6686
+ *
6687
+ * This method provides automation for selecting or highlighting specific rows,
6688
+ * useful in scenarios needing pre-selection or default selections.
6557
6689
  *
6558
- * @param {number[]} indexes - row indexes
6690
+ * @param {number[]} indexes - An array of row indices to be marked as selected.
6559
6691
  * @returns {void}
6560
6692
  */
6561
6693
  TreeGrid.prototype.selectCheckboxes = function (indexes) {
6562
6694
  this.selectionModule.selectCheckboxes(indexes);
6563
6695
  };
6564
6696
  /**
6565
- * Refreshes the TreeGrid column changes.
6697
+ * Updates and refreshes the TreeGrid's column definitions and layout.
6566
6698
  *
6567
- * @param {boolean} refreshUI - Defined whether to refresh the DOM
6699
+ * Ensures that the latest column settings are displayed, either refreshing the UI
6700
+ * or adjusting internal configurations to match current data or configuration updates.
6701
+ *
6702
+ * @param {boolean} refreshUI - A flag indicating whether the DOM should be updated.
6568
6703
  * @returns {void}
6569
6704
  */
6570
6705
  TreeGrid.prototype.refreshColumns = function (refreshUI) {
@@ -6593,7 +6728,10 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6593
6728
  this.setProperties({ treeColumnIndex: treeIndex }, true);
6594
6729
  };
6595
6730
  /**
6596
- * Refreshes the TreeGrid header.
6731
+ * Refreshes the header section of the TreeGrid to reflect any structural or data changes.
6732
+ *
6733
+ * This method is useful when there are dynamic updates or layout adjustments
6734
+ * needed in the header portion to ensure it aligns with current grid data or settings.
6597
6735
  *
6598
6736
  * @returns {void}
6599
6737
  */
@@ -6648,12 +6786,15 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6648
6786
  }
6649
6787
  };
6650
6788
  /**
6651
- * Expands child rows
6789
+ * Expands the specified parent row within the TreeGrid to reveal its nested data.
6790
+ *
6791
+ * This method is useful for programmatically expanding rows to display their
6792
+ * hierarchical children, providing detailed views for nested data structures.
6652
6793
  *
6653
- * @param {HTMLTableRowElement} row - Expands the given row
6654
- * @param {Object} record - Expands the given record
6655
- * @param {Object} key - Primary key value
6656
- * @param {number} level - Specifies the hierarchical level of the record
6794
+ * @param {HTMLTableRowElement} row - The table row element that should be expanded.
6795
+ * @param {Object} record - Optional. Represents the data record associated with the row to be expanded.
6796
+ * @param {Object} key - Optional. The primary key value that uniquely identifies the record.
6797
+ * @param {number} level - Optional. Indicates the hierarchical level of the record within the TreeGrid.
6657
6798
  * @returns {void}
6658
6799
  */
6659
6800
  TreeGrid.prototype.expandRow = function (row, record, key, level) {
@@ -6669,7 +6810,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6669
6810
  if (isNullOrUndefined(row) && isNullOrUndefined(record)) {
6670
6811
  return;
6671
6812
  }
6672
- if (!isNullOrUndefined(row) && row.cells[0].classList.contains('e-lastrowcell')) {
6813
+ if (!isNullOrUndefined(row) && row.cells && row.cells[0].classList.contains('e-lastrowcell')) {
6673
6814
  this.lastRowBorder(row, false);
6674
6815
  }
6675
6816
  if (this.isExpandAll && !isRemoteData(this)) {
@@ -6709,7 +6850,6 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6709
6850
  };
6710
6851
  // Internal method to handle the rows expand
6711
6852
  TreeGrid.prototype.expandRows = function (row, record, parentRec) {
6712
- var initialTotalRecordsCount = this.grid.totalDataRecordsCount;
6713
6853
  this.expandCollapse('expand', row, record);
6714
6854
  var children = 'Children';
6715
6855
  if (!(isRemoteData(this) && !isOffline(this)) && (!isCountRequired(this) || !isNullOrUndefined(record["" + children]))) {
@@ -6753,12 +6893,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6753
6893
  }
6754
6894
  else if (isNullOrUndefined(record) && !isNullOrUndefined(row)) {
6755
6895
  if (this.detailTemplate) {
6756
- record = this.grid.getCurrentViewRecords()[row.getAttribute('data-rowindex')];
6896
+ record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('aria-rowindex'), 10) - 1];
6757
6897
  }
6758
6898
  else {
6759
6899
  if (this.enableVirtualization && (this.isCollapseAll || this.isExpandAll)) {
6760
6900
  if (row.rowIndex === -1) {
6761
- record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('data-rowindex'), 10)];
6901
+ record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('aria-rowindex'), 10) - 1];
6762
6902
  }
6763
6903
  else {
6764
6904
  record = this.grid.getCurrentViewRecords()[row.rowIndex];
@@ -6768,18 +6908,27 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6768
6908
  record = this.grid.getCurrentViewRecords()[row.rowIndex];
6769
6909
  }
6770
6910
  else {
6771
- record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('data-rowindex'), 10)];
6911
+ record = this.grid.getCurrentViewRecords()[parseInt(row.getAttribute('aria-rowindex'), 10) - 1];
6772
6912
  }
6773
6913
  }
6774
6914
  }
6775
6915
  return record;
6776
6916
  };
6777
6917
  /**
6778
- * Collapses child rows
6918
+ * Collapses the specified parent row in the TreeGrid.
6779
6919
  *
6780
- * @param {HTMLTableRowElement} row - Collapse the given row
6781
- * @param {Object} record - Collapse the given record
6782
- * @param {Object} key - Primary key value
6920
+ * This method collapses the row associated with the provided HTMLTableRowElement,
6921
+ * hiding any of its displayed child rows. It is typically used to manage the
6922
+ * visibility of hierarchical data within a tree structure.
6923
+ *
6924
+ * @param {HTMLTableRowElement} row - The HTMLTableRowElement representing the parent row
6925
+ * whose child rows are to be collapsed.
6926
+ * @param {Object} record - (Optional) The data record associated with the row being collapsed.
6927
+ * This can be used to access or manipulate the underlying data
6928
+ * when collapsing the row.
6929
+ * @param {Object} key - (Optional) The primary key value of the record. It can be used to identify
6930
+ * the target record uniquely when collapsing the row, especially in cases
6931
+ * where the row or record data needs to be referenced or logged.
6783
6932
  * @returns {void}
6784
6933
  */
6785
6934
  TreeGrid.prototype.collapseRow = function (row, record, key) {
@@ -6861,9 +7010,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6861
7010
  }
6862
7011
  };
6863
7012
  /**
6864
- * Expands the records at specific hierarchical level
7013
+ * Expands all the records at the specified hierarchical level within the TreeGrid.
7014
+ *
7015
+ * This method is useful for visually expanding data at a certain depth, making
7016
+ * all parent rows visible at the given level and their child rows accessible.
6865
7017
  *
6866
- * @param {number} level - Expands the parent rows at given level
7018
+ * @param {number} level - The hierarchical level at which parent rows should be expanded.
6867
7019
  * @returns {void}
6868
7020
  */
6869
7021
  TreeGrid.prototype.expandAtLevel = function (level) {
@@ -6883,9 +7035,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6883
7035
  }
6884
7036
  };
6885
7037
  /**
6886
- * Expands the records by given primary key value
7038
+ * Expands a specific record identified by the provided primary key value.
6887
7039
  *
6888
- * @param {Object} key - Expands the parent rows with given primary key value
7040
+ * This method is useful for expanding particular node in the TreeGrid when
7041
+ * the parent rows need to be targeted individually by their unique key.
7042
+ *
7043
+ * @param {Object} key - The primary key value of the record to be expanded.
6889
7044
  * @returns {void}
6890
7045
  */
6891
7046
  TreeGrid.prototype.expandByKey = function (key) {
@@ -6940,9 +7095,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6940
7095
  return obj;
6941
7096
  };
6942
7097
  /**
6943
- * Collapses the records at specific hierarchical level
7098
+ * Collapses all the records at the specified hierarchical level within the TreeGrid.
7099
+ *
7100
+ * This function helps in hiding child rows for all parent nodes at a given level,
7101
+ * effectively reducing the visible depth of the hierarchical structure.
6944
7102
  *
6945
- * @param {number} level - Define the parent row level which needs to be collapsed
7103
+ * @param {number} level - The hierarchical level at which parent rows should be collapsed.
6946
7104
  * @returns {void}
6947
7105
  */
6948
7106
  TreeGrid.prototype.collapseAtLevel = function (level) {
@@ -6962,9 +7120,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6962
7120
  }
6963
7121
  };
6964
7122
  /**
6965
- * Collapses the records by given primary key value
7123
+ * Collapses a specific record identified by the provided primary key value.
6966
7124
  *
6967
- * @param {Object} key - Collapses the parent rows with given primary key value
7125
+ * This method is useful for collapsing particular node in the TreeGrid when
7126
+ * the parent rows need to be targeted individually by their unique key.
7127
+ *
7128
+ * @param {Object} key - The primary key value of the record to be collapsed.
6968
7129
  * @returns {void}
6969
7130
  */
6970
7131
  TreeGrid.prototype.collapseByKey = function (key) {
@@ -7003,7 +7164,10 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
7003
7164
  }
7004
7165
  };
7005
7166
  /**
7006
- * Expands All the rows
7167
+ * Expands all rows in the TreeGrid, making the full hierarchy visible.
7168
+ *
7169
+ * This method should be used with caution on large datasets, as it makes
7170
+ * all nodes and their child rows visible, which might affect performance.
7007
7171
  *
7008
7172
  * @returns {void}
7009
7173
  */
@@ -7014,10 +7178,23 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
7014
7178
  }
7015
7179
  this.isExpandedEventTriggered = false;
7016
7180
  this.isExpandingEventTriggered = false;
7181
+ if (this.editSettings.mode === 'Batch') {
7182
+ var obj = 'dialogObj';
7183
+ var showDialog = 'showDialog';
7184
+ if ((this.getBatchChanges()[this.changedRecords].length || this.getBatchChanges()[this.deletedRecords].length ||
7185
+ this.getBatchChanges()[this.addedRecords].length) && this.editSettings.showConfirmDialog) {
7186
+ var dialogObj = this.grid.editModule["" + obj];
7187
+ this.grid.editModule["" + showDialog]('CancelEdit', dialogObj);
7188
+ return;
7189
+ }
7190
+ }
7017
7191
  this.expandCollapseAll('expand');
7018
7192
  };
7019
7193
  /**
7020
- * Collapses All the rows
7194
+ * Collapses all rows in the TreeGrid, hiding all child rows and leaving only parent nodes visible.
7195
+ *
7196
+ * This method can be used to quickly minimize the view to only top-level data,
7197
+ * which is helpful for summarizing or performing broad overviews of the dataset.
7021
7198
  *
7022
7199
  * @returns {void}
7023
7200
  */
@@ -7028,6 +7205,16 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
7028
7205
  }
7029
7206
  this.isCollapsedEventTriggered = false;
7030
7207
  this.isCollapsingEventTriggered = false;
7208
+ if (this.editSettings.mode === 'Batch') {
7209
+ var obj = 'dialogObj';
7210
+ var showDialog = 'showDialog';
7211
+ if ((this.getBatchChanges()[this.changedRecords].length || this.getBatchChanges()[this.deletedRecords].length ||
7212
+ this.getBatchChanges()[this.addedRecords].length) && this.editSettings.showConfirmDialog) {
7213
+ var dialogObj = this.grid.editModule["" + obj];
7214
+ this.grid.editModule["" + showDialog]('CancelEdit', dialogObj);
7215
+ return;
7216
+ }
7217
+ }
7031
7218
  this.expandCollapseAll('collapse');
7032
7219
  };
7033
7220
  TreeGrid.prototype.expandCollapseAll = function (action) {
@@ -7047,7 +7234,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
7047
7234
  }
7048
7235
  this.isExpandAll = true;
7049
7236
  this.isCollapseAll = true;
7050
- if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization || this.enableInfiniteScrolling) && !isRemoteData(this)) {
7237
+ if (((this.allowPaging && (this.pageSettings.pageSizeMode === 'All' || this.pageSettings.pageSizeMode === 'Root')) || this.enableVirtualization || this.enableInfiniteScrolling) && !isRemoteData(this)) {
7051
7238
  this.flatData.filter(function (e) {
7052
7239
  if (e.hasChildRecords) {
7053
7240
  e.expanded = action === 'collapse' ? false : true;
@@ -7111,12 +7298,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
7111
7298
  row = gridRows[parseInt(rowIndex.toString(), 10)];
7112
7299
  }
7113
7300
  else {
7114
- rowIndex = +row.getAttribute('data-rowindex');
7301
+ rowIndex = +row.getAttribute('aria-rowindex') - 1;
7115
7302
  }
7116
7303
  if (!isNullOrUndefined(row)) {
7117
7304
  row.setAttribute('aria-expanded', action === 'expand' ? 'true' : 'false');
7118
7305
  }
7119
- if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization) && !isRemoteData(this)
7306
+ if (((this.allowPaging && (this.pageSettings.pageSizeMode === 'All' || this.pageSettings.pageSizeMode === 'Root')) || this.enableVirtualization) && !isRemoteData(this)
7120
7307
  && !isCountRequired(this)) {
7121
7308
  this.notify(localPagedExpandCollapse, { action: action, row: row, record: record });
7122
7309
  }
@@ -7126,6 +7313,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
7126
7313
  displayAction = 'e-childrow-visible';
7127
7314
  if (!isChild) {
7128
7315
  record.expanded = true;
7316
+ this.flatData.forEach(function (e) {
7317
+ e.expanded = e.uniqueID === record.uniqueID && e.expanded !== record.expanded ? record.expanded : e.expanded;
7318
+ });
7129
7319
  this.uniqueIDCollection[record.uniqueID].expanded = record.expanded;
7130
7320
  }
7131
7321
  if (!isNullOrUndefined(row)) {
@@ -7147,6 +7337,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
7147
7337
  displayAction = 'e-childrow-hidden';
7148
7338
  if (!isChild || isCountRequired(this)) {
7149
7339
  record.expanded = false;
7340
+ this.flatData.forEach(function (e) {
7341
+ e.expanded = e.uniqueID === record.uniqueID && e.expanded !== record.expanded ? record.expanded : e.expanded;
7342
+ });
7150
7343
  this.uniqueIDCollection[record.uniqueID].expanded = record.expanded;
7151
7344
  }
7152
7345
  if (!isNullOrUndefined(row)) {
@@ -7389,7 +7582,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
7389
7582
  }
7390
7583
  if (!isNullOrUndefined(rows[parseInt(i.toString(), 10)]) && !this.allowPaging && !(this.enableVirtualization
7391
7584
  || this.enableInfiniteScrolling || isRemoteData(this) || isCountRequired(this))) {
7392
- gridRowsObject[rows[parseInt(i.toString(), 10)].rowIndex].visible = displayAction !== 'e-childrow-hidden' ? true : false;
7585
+ if (!isNullOrUndefined(gridRowsObject[rows[parseInt(i.toString(), 10)].rowIndex])) {
7586
+ gridRowsObject[rows[parseInt(i.toString(), 10)].rowIndex].visible = displayAction !== 'e-childrow-hidden' ? true : false;
7587
+ }
7393
7588
  var parentRecord = currentViewData.filter(function (e) {
7394
7589
  return e.uniqueID === currentRecord[0].parentUniqueID;
7395
7590
  });
@@ -7535,28 +7730,6 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
7535
7730
  }
7536
7731
  return value;
7537
7732
  };
7538
- /**
7539
- * Updates the rows and cells
7540
- *
7541
- * @param {Object[]} records - Updates the given records
7542
- * @param {HTMLTableRowElement[]} rows - Updates the given rows
7543
- * @param {number} index - Updates the given cell index
7544
- * @returns {void}
7545
- */
7546
- TreeGrid.prototype.updateRowAndCellElements = function (records, rows, index) {
7547
- for (var i = 0; i < records.length; i++) {
7548
- this.renderModule.cellRender({
7549
- data: records[parseInt(i.toString(), 10)], cell: rows[parseInt(i.toString(), 10)].cells[parseInt(index.toString(), 10)],
7550
- column: this.grid.getColumns()[this.treeColumnIndex],
7551
- requestType: 'rowDragAndDrop'
7552
- });
7553
- if (this['action'] === 'indenting' || this['action'] === 'outdenting') {
7554
- this.renderModule.RowModifier({
7555
- data: records[parseInt(i.toString(), 10)], row: rows[parseInt(i.toString(), 10)]
7556
- });
7557
- }
7558
- }
7559
- };
7560
7733
  /**
7561
7734
  * @hidden
7562
7735
  * @returns {void}
@@ -7564,6 +7737,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
7564
7737
  TreeGrid.prototype.addListener = function () {
7565
7738
  this.on('updateResults', this.updateResultModel, this);
7566
7739
  this.grid.on('initial-end', this.afterGridRender, this);
7740
+ this.grid.on('last-rowcell-border-updated', this.lastRowCellBorderUpdated, this);
7567
7741
  };
7568
7742
  TreeGrid.prototype.updateResultModel = function (returnResult) {
7569
7743
  this.dataResults = returnResult;
@@ -7578,27 +7752,31 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
7578
7752
  }
7579
7753
  this.off('updateResults', this.updateResultModel);
7580
7754
  this.grid.off('initial-end', this.afterGridRender);
7755
+ this.grid.off('last-rowcell-border-updated', this.lastRowCellBorderUpdated);
7581
7756
  };
7582
7757
  /**
7583
- * Filters TreeGrid row by column name with the given options.
7758
+ * Filters the TreeGrid rows based on a specified column and filter criteria.
7584
7759
  *
7585
- * @param {string} fieldName - Defines the field name of the column.
7586
- * @param {string} filterOperator - Defines the operator to filter records.
7587
- * @param {string | number | Date | boolean} filterValue - Defines the value used to filter records.
7588
- * @param {string} predicate - Defines the relationship between one filter query and another by using AND or OR predicate.
7589
- * @param {boolean} matchCase - If match case is set to true, the TreeGrid filters the records with exact match. if false, it filters
7590
- * case insensitive records (uppercase and lowercase letters are treated the same).
7591
- * @param {boolean} ignoreAccent - If ignoreAccent is set to true,
7592
- * then filter ignores diacritic characters or accents while filtering.
7593
- * @param {string} actualFilterValue - Defines the actual filter value for filter column.
7594
- * @param {string} actualOperator - Defines the actual filter operator for filter column.
7760
+ * This method allows for dynamic filtering against column data using various
7761
+ * operators and values, supporting case-sensitive filtering and accent sensitivity.
7762
+ *
7763
+ * @param {string} fieldName - The name of the column to apply the filter on.
7764
+ * @param {string} filterOperator - The operator used to perform the filter (e.g., 'equals', 'startswith').
7765
+ * @param {string | number | Date | boolean } filterValue - The value to filter against.
7766
+ * @param {string} predicate - The logical operator ('AND'/'OR') to combine this filter with others.
7767
+ * @param {boolean} matchCase - If true, the filter performs a case-sensitive match.
7768
+ * @param {boolean} ignoreAccent - If true, the filter ignores diacritical marks.
7769
+ * @param {string} actualFilterValue - The original value used for filtering, useful for distinguishing displayed and actual values.
7770
+ * @param {string} actualOperator - The actual operator that is applied when different from the displayed operator.
7595
7771
  * @returns {void}
7596
7772
  */
7597
7773
  TreeGrid.prototype.filterByColumn = function (fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator) {
7598
7774
  this.grid.filterByColumn(fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator);
7599
7775
  };
7600
7776
  /**
7601
- * Clears all the filtered rows of the TreeGrid.
7777
+ * Clears all filters applied to the TreeGrid, restoring the view to show all records.
7778
+ *
7779
+ * This method is useful for resetting the grid to its unfiltered state.
7602
7780
  *
7603
7781
  * @returns {void}
7604
7782
  */
@@ -7617,26 +7795,32 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
7617
7795
  this.grid.removeFilteredColsByField(field, isClearFilterBar);
7618
7796
  };
7619
7797
  /**
7620
- * Selects a row by given index.
7798
+ * Selects a row in the TreeGrid by its index.
7621
7799
  *
7622
- * @param {number} index - Defines the row index.
7623
- * @param {boolean} isToggle - If set to true, then it toggles the selection.
7800
+ * Use this method to highlight a specific row; useful for programmatically navigating data.
7801
+ *
7802
+ * @param {number} index - Index of the row to select.
7803
+ * @param {boolean} isToggle - If true, toggles the selection state of the row.
7624
7804
  * @returns {void}
7625
7805
  */
7626
7806
  TreeGrid.prototype.selectRow = function (index, isToggle) {
7627
7807
  this.grid.selectRow(index, isToggle);
7628
7808
  };
7629
7809
  /**
7630
- * Selects a collection of rows by indexes.
7810
+ * Selects multiple rows in the TreeGrid given an array of row indexes.
7811
+ *
7812
+ * Useful for batch operations where multiple row selections are necessary.
7631
7813
  *
7632
- * @param {number[]} rowIndexes - Specifies the row indexes.
7814
+ * @param {number[]} rowIndexes - Array of row index numbers to select.
7633
7815
  * @returns {void}
7634
7816
  */
7635
7817
  TreeGrid.prototype.selectRows = function (rowIndexes) {
7636
7818
  this.grid.selectRows(rowIndexes);
7637
7819
  };
7638
7820
  /**
7639
- * Deselects the current selected rows and cells.
7821
+ * Deselects all selected rows and cells within the TreeGrid.
7822
+ *
7823
+ * Resets the selection state of the grid, which is useful after bulk operations.
7640
7824
  *
7641
7825
  * @returns {void}
7642
7826
  */
@@ -7647,39 +7831,47 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
7647
7831
  this.grid.clearSelection();
7648
7832
  };
7649
7833
  /**
7650
- * Copy the selected rows or cells data into clipboard.
7834
+ * Copies the data of selected rows or cells to the clipboard.
7835
+ *
7836
+ * This method supports including headers for better context when pasting elsewhere.
7651
7837
  *
7652
- * @param {boolean} withHeader - Specifies whether the column header text needs to be copied along with rows or cells.
7838
+ * @param {boolean} withHeader - (Optional) If true, includes column headers in the copied data.
7653
7839
  * @returns {void}
7654
7840
  */
7655
7841
  TreeGrid.prototype.copy = function (withHeader) {
7656
7842
  this.clipboardModule.copy(withHeader);
7657
7843
  };
7658
7844
  /**
7659
- * Paste data from clipboard to selected cells.
7845
+ * Pastes data into the selected cells from the clipboard.
7660
7846
  *
7661
- * @param {boolean} data - Specifies the date for paste.
7662
- * @param {boolean} rowIndex - Specifies the row index.
7663
- * @param {boolean} colIndex - Specifies the column index.
7847
+ * Automatically places the pasted data starting from the specified indices.
7848
+ *
7849
+ * @param {string} data - The clipboard data to paste.
7850
+ * @param {number} rowIndex - The starting row index for pasting.
7851
+ * @param {number} colIndex - The starting column index for pasting.
7664
7852
  * @returns {void}
7665
7853
  */
7666
7854
  TreeGrid.prototype.paste = function (data, rowIndex, colIndex) {
7667
7855
  this.clipboardModule.paste(data, rowIndex, colIndex);
7668
7856
  };
7669
7857
  /**
7670
- * Selects a cell by the given index.
7858
+ * Selects a cell by its index position in the TreeGrid.
7859
+ *
7860
+ * Useful for navigating or highlighting specific data cells within the grid.
7671
7861
  *
7672
- * @param {IIndex} cellIndex - Defines the row and column indexes.
7673
- * @param {boolean} isToggle - If set to true, then it toggles the selection.
7862
+ * @param {IIndex} cellIndex - An object specifying the row and column indexes.
7863
+ * @param {boolean} isToggle - (Optional) If true, toggles the selection state of the cell.
7674
7864
  * @returns {void}
7675
7865
  */
7676
7866
  TreeGrid.prototype.selectCell = function (cellIndex, isToggle) {
7677
7867
  this.grid.selectCell(cellIndex, isToggle);
7678
7868
  };
7679
7869
  /**
7680
- * Gets the collection of selected rows.
7870
+ * Retrieves the currently selected rows.
7681
7871
  *
7682
- * @returns {Element[]} - Returns selected row elements collection
7872
+ * Useful for obtaining the selected data elements for downstream processing.
7873
+ *
7874
+ * @returns {Element[]} - An array of Element objects representing the selected rows.
7683
7875
  */
7684
7876
  TreeGrid.prototype.getSelectedRows = function () {
7685
7877
  return this.grid.getSelectedRows();
@@ -7891,44 +8083,59 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
7891
8083
  return cnt;
7892
8084
  };
7893
8085
  /**
7894
- * Gets the collection of selected row indexes.
8086
+ * Retrieves the indexes of the currently selected rows in the TreeGrid.
8087
+ *
8088
+ * This method is useful when you need to perform actions based on the selected rows,
8089
+ * such as retrieving data or changing the selection.
7895
8090
  *
7896
- * @returns {number[]} - Returns selected rows index collection
8091
+ * @returns {number[]} - An array of numbers representing the indexes of selected rows.
7897
8092
  */
7898
8093
  TreeGrid.prototype.getSelectedRowIndexes = function () {
7899
8094
  return this.grid.getSelectedRowIndexes();
7900
8095
  };
7901
8096
  /**
7902
- * Gets the collection of selected row and cell indexes.
8097
+ * Retrieves the indexes of the selected cells within the selected rows.
7903
8098
  *
7904
- * @returns {ISelectedCell[]} - Returns selected cell's index details
8099
+ * This can be useful for handling cell-specific operations, such as
8100
+ * applying styles or editing values programmatically.
8101
+ *
8102
+ * @returns {ISelectedCell[]} - An array of objects representing the selected cells' indexes.
7905
8103
  */
7906
8104
  TreeGrid.prototype.getSelectedRowCellIndexes = function () {
7907
8105
  return this.grid.getSelectedRowCellIndexes();
7908
8106
  };
7909
8107
  /**
7910
- * Gets the collection of selected records.
8108
+ * Retrieves the data records corresponding to the currently selected rows.
8109
+ *
8110
+ * This method provides the full record data for the selected rows,
8111
+ * which is useful for data manipulation or extraction operations.
7911
8112
  *
7912
8113
  * @isGenericType true
7913
- * @returns {Object[]} - Returns selected records collection
8114
+ * @returns {Object[]} - An array of data objects representing the selected records.
7914
8115
  */
7915
8116
  TreeGrid.prototype.getSelectedRecords = function () {
7916
8117
  return this.grid.getSelectedRecords();
7917
8118
  };
7918
8119
  /**
7919
- * Gets the data module.
8120
+ * Obtains the data handling modules used by the TreeGrid.
8121
+ *
8122
+ * This includes both the base data module for standard grid operations and the tree module
8123
+ * for handling hierarchical data, giving complete access to data management capabilities.
7920
8124
  *
7921
- * @returns {{baseModule: Data, treeModule: DataManipulation}}: Returns grid and treegrid data module
8125
+ * @returns {{baseModule: Data, treeModule: DataManipulation}} - An object containing both grid and tree data modules.
7922
8126
  */
7923
8127
  TreeGrid.prototype.getDataModule = function () {
7924
8128
  return { baseModule: this.grid.getDataModule(), treeModule: this.dataModule };
7925
8129
  };
7926
8130
  /**
7927
- * Reorder the rows based on given indexes and position
8131
+ * Reorders rows in the TreeGrid based on specified source indexes and a target position.
8132
+ *
8133
+ * This functionality allows for dynamic rearrangement of rows, such as moving selected
8134
+ * rows to a new position as siblings or children.
7928
8135
  *
7929
- * @param {number[]} fromIndexes - Source indexes of rows
7930
- * @param {number} toIndex - Destination index of row
7931
- * @param {string} position - Defines drop position as above or below or child
8136
+ * @param {number[]} fromIndexes - An array indicating the source indexes of the rows to be moved.
8137
+ * @param {number} toIndex - The target index where the rows should be moved.
8138
+ * @param {string} position - The position relative to the target index ('above', 'below', 'child').
7932
8139
  * @returns {void}
7933
8140
  */
7934
8141
  TreeGrid.prototype.reorderRows = function (fromIndexes, toIndex, position) {
@@ -7937,9 +8144,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
7937
8144
  }
7938
8145
  };
7939
8146
  /**
7940
- * Indents the record to one level of hierarchy. Moves the selected row as the last child of its previous row.
8147
+ * Indents a specified record, promoting it to one level deeper in the hierarchy.
7941
8148
  *
7942
- * @param {Object} record specifies the record to do indented
8149
+ * This function moves the selected row to become the last child of its preceding row,
8150
+ * altering the visual and hierarchical data structure.
8151
+ *
8152
+ * @param {Object} record - (Optional) The record to be indented. If omitted, the currently selected row is used.
7943
8153
  * @returns {void}
7944
8154
  */
7945
8155
  TreeGrid.prototype.indent = function (record) {
@@ -7949,9 +8159,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
7949
8159
  }
7950
8160
  };
7951
8161
  /**
7952
- * Outdent the record to one level of hierarchy. Moves the selected row as sibling to its parent row.
8162
+ * Outdents a specified record, moving it one level up in the hierarchy.
8163
+ *
8164
+ * This method repositions the selected row to be a sibling of its parent, impacting
8165
+ * its display and the hierarchical relationships within the TreeGrid.
7953
8166
  *
7954
- * @param {Object} record specifies the record to do outdented
8167
+ * @param {Object} record - (Optional) The record to be outdented. If omitted, the currently selected row is used.
7955
8168
  * @returns {void}
7956
8169
  */
7957
8170
  TreeGrid.prototype.outdent = function (record) {
@@ -8147,6 +8360,21 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
8147
8360
  __decorate$b([
8148
8361
  Property('All')
8149
8362
  ], TreeGrid.prototype, "columnQueryMode", void 0);
8363
+ __decorate$b([
8364
+ Property(true)
8365
+ ], TreeGrid.prototype, "allowSelection", void 0);
8366
+ __decorate$b([
8367
+ Property(-1)
8368
+ ], TreeGrid.prototype, "selectedRowIndex", void 0);
8369
+ __decorate$b([
8370
+ Complex({}, SelectionSettings)
8371
+ ], TreeGrid.prototype, "selectionSettings", void 0);
8372
+ __decorate$b([
8373
+ Property(false)
8374
+ ], TreeGrid.prototype, "allowExcelExport", void 0);
8375
+ __decorate$b([
8376
+ Property(false)
8377
+ ], TreeGrid.prototype, "allowPdfExport", void 0);
8150
8378
  __decorate$b([
8151
8379
  Event()
8152
8380
  ], TreeGrid.prototype, "created", void 0);
@@ -8225,9 +8453,6 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
8225
8453
  __decorate$b([
8226
8454
  Event()
8227
8455
  ], TreeGrid.prototype, "queryCellInfo", void 0);
8228
- __decorate$b([
8229
- Property(true)
8230
- ], TreeGrid.prototype, "allowSelection", void 0);
8231
8456
  __decorate$b([
8232
8457
  Event()
8233
8458
  ], TreeGrid.prototype, "rowSelecting", void 0);
@@ -8318,18 +8543,6 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
8318
8543
  __decorate$b([
8319
8544
  Event()
8320
8545
  ], TreeGrid.prototype, "rowDrop", void 0);
8321
- __decorate$b([
8322
- Property(-1)
8323
- ], TreeGrid.prototype, "selectedRowIndex", void 0);
8324
- __decorate$b([
8325
- Complex({}, SelectionSettings)
8326
- ], TreeGrid.prototype, "selectionSettings", void 0);
8327
- __decorate$b([
8328
- Property(false)
8329
- ], TreeGrid.prototype, "allowExcelExport", void 0);
8330
- __decorate$b([
8331
- Property(false)
8332
- ], TreeGrid.prototype, "allowPdfExport", void 0);
8333
8546
  __decorate$b([
8334
8547
  Event()
8335
8548
  ], TreeGrid.prototype, "pdfQueryCellInfo", void 0);
@@ -8549,7 +8762,6 @@ var RowDD = /** @__PURE__ @class */ (function () {
8549
8762
  }
8550
8763
  var action = 'action';
8551
8764
  var dropPosition = 'dropPosition';
8552
- var updateRowAndCellElements = 'updateRowAndCellElements';
8553
8765
  if (fromIndexes[0] !== toIndex && ['above', 'below', 'child'].indexOf(position) !== -1) {
8554
8766
  if (position === 'above') {
8555
8767
  this.dropPosition = 'topSegment';
@@ -8599,7 +8811,7 @@ var RowDD = /** @__PURE__ @class */ (function () {
8599
8811
  var parentrow = this.parent.getRows()[parseInt(toIndex.toString(), 10)];
8600
8812
  totalRecord.push(parentData);
8601
8813
  rows.push(parentrow);
8602
- this.parent["" + updateRowAndCellElements](totalRecord, rows, index);
8814
+ this.updateRowAndCellElements(totalRecord, rows, index);
8603
8815
  }
8604
8816
  if (this.parent.enableImmutableMode && this.parent["" + action] === 'outdenting') {
8605
8817
  var index = this.parent.allowRowDragAndDrop
@@ -8611,7 +8823,29 @@ var RowDD = /** @__PURE__ @class */ (function () {
8611
8823
  var rows = [];
8612
8824
  totalRecord.push(record);
8613
8825
  rows.push(row);
8614
- this.parent["" + updateRowAndCellElements](totalRecord, rows, index);
8826
+ this.updateRowAndCellElements(totalRecord, rows, index);
8827
+ }
8828
+ }
8829
+ };
8830
+ /**
8831
+ * Updates the rows and cells
8832
+ *
8833
+ * @param {Object[]} records - Updates the given records
8834
+ * @param {HTMLTableRowElement[]} rows - Updates the given rows
8835
+ * @param {number} index - Updates the given cell index
8836
+ * @returns {void}
8837
+ */
8838
+ RowDD.prototype.updateRowAndCellElements = function (records, rows, index) {
8839
+ for (var i = 0; i < records.length; i++) {
8840
+ this.parent.renderModule.cellRender({
8841
+ data: records[parseInt(i.toString(), 10)], cell: rows[parseInt(i.toString(), 10)].cells[parseInt(index.toString(), 10)],
8842
+ column: this.parent.grid.getColumns()[this.parent.treeColumnIndex],
8843
+ requestType: 'rowDragAndDrop'
8844
+ });
8845
+ if (this.parent['action'] === 'indenting' || this.parent['action'] === 'outdenting') {
8846
+ this.parent.renderModule.RowModifier({
8847
+ data: records[parseInt(i.toString(), 10)], row: rows[parseInt(i.toString(), 10)]
8848
+ });
8615
8849
  }
8616
8850
  }
8617
8851
  };
@@ -8660,7 +8894,7 @@ var RowDD = /** @__PURE__ @class */ (function () {
8660
8894
  record_1.parentItem.taskData) {
8661
8895
  dropIndex = i;
8662
8896
  if (tObj.enableVirtualization) {
8663
- dropIndex = parseInt(tObj.getRows()[parseInt(i.toString(), 10)].getAttribute('data-rowindex'), 10);
8897
+ dropIndex = parseInt(tObj.getRows()[parseInt(i.toString(), 10)].getAttribute('aria-rowindex'), 10) - 1;
8664
8898
  }
8665
8899
  }
8666
8900
  }
@@ -8669,26 +8903,27 @@ var RowDD = /** @__PURE__ @class */ (function () {
8669
8903
  dropIndex = this.selectedRow.rowIndex - 1;
8670
8904
  }
8671
8905
  if (this.parent.enableVirtualization && this.selectedRecord && !(record_1.level > this.selectedRecord.level)) {
8672
- dropIndex = parseInt(this.selectedRow.getAttribute('data-rowindex'), 10) - 1;
8906
+ dropIndex = parseInt(this.selectedRow.getAttribute('aria-rowindex'), 10) - 2;
8673
8907
  }
8674
8908
  tObj["" + action] = 'indenting';
8675
8909
  tObj["" + droppedIndex] = dropIndex;
8676
8910
  this.eventTrigger('indenting', dropIndex);
8677
8911
  }
8678
8912
  else if (request === 'outdent') {
8679
- if (this.selectedRow.rowIndex === -1 || this.selectedRow.rowIndex === 0 ||
8680
- tObj.getCurrentViewRecords()[this.selectedRow.rowIndex].level === 0) {
8913
+ var isInvalidSelection = this.selectedRow.rowIndex === -1 || this.selectedRow.rowIndex === 0;
8914
+ var isRootLevel = tObj.getCurrentViewRecords()[this.selectedRow.rowIndex].level === 0;
8915
+ if (isInvalidSelection || isRootLevel) {
8681
8916
  return;
8682
8917
  }
8683
- var dropIndex = void 0;
8684
- var parentItem = this.selectedRecord.parentItem;
8685
- for (var i = 0; i < tObj.getCurrentViewRecords().length; i++) {
8686
- if (tObj.getCurrentViewRecords()[parseInt(i.toString(), 10)].uniqueID === parentItem.uniqueID) {
8687
- dropIndex = i;
8688
- }
8918
+ var parentItem_1 = this.selectedRecord.parentItem;
8919
+ var records = tObj.getCurrentViewRecords();
8920
+ var dropIndex = records.findIndex(function (record) { return record.uniqueID === parentItem_1.uniqueID; });
8921
+ if (dropIndex === -1) {
8922
+ return;
8689
8923
  }
8690
8924
  if (this.parent.enableVirtualization && this.selectedRecord) {
8691
- dropIndex = parseInt(this.parent.getRows()[parseInt(dropIndex.toString(), 10)].getAttribute('data-rowindex'), 10);
8925
+ var ariaRowIndex = this.parent.getRows()[parseInt(dropIndex.toString(), 10)].getAttribute('aria-rowindex');
8926
+ dropIndex = parseInt(ariaRowIndex, 10) - 1;
8692
8927
  }
8693
8928
  tObj["" + action] = 'outdenting';
8694
8929
  tObj["" + droppedIndex] = dropIndex;
@@ -8715,7 +8950,7 @@ var RowDD = /** @__PURE__ @class */ (function () {
8715
8950
  if (!actionArgs.cancel) {
8716
8951
  if (actionArgs.action === 'indenting') {
8717
8952
  if (_this.parent.enableVirtualization) {
8718
- _this.reorderRows([parseInt(_this.selectedRow.getAttribute('data-rowindex'), 10)], dropIndex, 'child');
8953
+ _this.reorderRows([parseInt(_this.selectedRow.getAttribute('aria-rowindex'), 10) - 1], dropIndex, 'child');
8719
8954
  }
8720
8955
  else {
8721
8956
  _this.reorderRows([_this.selectedRow.rowIndex], dropIndex, 'child');
@@ -8723,7 +8958,7 @@ var RowDD = /** @__PURE__ @class */ (function () {
8723
8958
  }
8724
8959
  else if (actionArgs.action === 'outdenting') {
8725
8960
  if (_this.parent.enableVirtualization) {
8726
- _this.reorderRows([parseInt(_this.selectedRow.getAttribute('data-rowindex'), 10)], dropIndex, 'below');
8961
+ _this.reorderRows([parseInt(_this.selectedRow.getAttribute('aria-rowindex'), 10) - 1], dropIndex, 'below');
8727
8962
  }
8728
8963
  else {
8729
8964
  _this.reorderRows([_this.selectedRow.rowIndex], dropIndex, 'below');
@@ -9026,7 +9261,8 @@ var RowDD = /** @__PURE__ @class */ (function () {
9026
9261
  else {
9027
9262
  rowTop = rowPositionHeight + contentHeight + roundOff;
9028
9263
  }
9029
- var rowBottom = rowTop + row[0].offsetHeight;
9264
+ var rowBottom = row[0].offsetHeight !== 0 && isNullOrUndefined(rowEle) ?
9265
+ rowTop + row[0].offsetHeight : rowTop + rowEle.offsetHeight;
9030
9266
  var difference = rowBottom - rowTop;
9031
9267
  var divide = difference / 3;
9032
9268
  var topRowSegment = rowTop + divide;
@@ -9043,6 +9279,7 @@ var RowDD = /** @__PURE__ @class */ (function () {
9043
9279
  var isTopSegment = posy <= topRowSegment;
9044
9280
  var isMiddleRowSegment = (posy > topRowSegment && posy <= middleRowSegment);
9045
9281
  var isBottomRowSegment = (posy > middleRowSegment && posy <= bottomRowSegment);
9282
+ var isBorderNeed = true;
9046
9283
  if (isTopSegment || isMiddleRowSegment || isBottomRowSegment) {
9047
9284
  if (isTopSegment && this.dropPosition !== 'Invalid') {
9048
9285
  this.removeChildBorder();
@@ -9051,19 +9288,12 @@ var RowDD = /** @__PURE__ @class */ (function () {
9051
9288
  this.addFirstrowBorder(rowEle);
9052
9289
  this.removeErrorElem();
9053
9290
  this.removeLastrowBorder(rowEle);
9054
- this.topOrBottomBorder(args.target);
9055
9291
  }
9056
9292
  if (isMiddleRowSegment && this.dropPosition !== 'Invalid') {
9057
9293
  this.removetopOrBottomBorder();
9058
- var rowElement = [];
9059
- var element = closest(args.target, 'tr');
9060
- rowElement = [].slice.call(element.querySelectorAll('.e-rowcell,.e-rowdragdrop,.e-detailrowcollapse'));
9061
- if (rowElement.length > 0) {
9062
- this.addRemoveClasses(rowElement, true, 'e-childborder');
9063
- }
9294
+ this.dropPosition = 'middleSegment';
9064
9295
  this.addLastRowborder(rowEle);
9065
9296
  this.addFirstrowBorder(rowEle);
9066
- this.dropPosition = 'middleSegment';
9067
9297
  }
9068
9298
  if (isBottomRowSegment && this.dropPosition !== 'Invalid') {
9069
9299
  this.removeErrorElem();
@@ -9072,11 +9302,165 @@ var RowDD = /** @__PURE__ @class */ (function () {
9072
9302
  this.dropPosition = 'bottomSegment';
9073
9303
  this.addLastRowborder(rowEle);
9074
9304
  this.removeFirstrowBorder(rowEle);
9075
- this.topOrBottomBorder(args.target);
9305
+ }
9306
+ if ((isTopSegment || isBottomRowSegment) && this.dropPosition !== 'Invalid') {
9307
+ isBorderNeed = this.updateBorderStatus(row, index);
9308
+ this.topOrBottomBorder(args.target, isBorderNeed);
9309
+ }
9310
+ else if (isMiddleRowSegment && this.dropPosition !== 'Invalid') {
9311
+ var rowElement = [];
9312
+ var element = closest(args.target, 'tr');
9313
+ rowElement = [].slice.call(element.querySelectorAll('.e-rowcell,.e-rowdragdrop,.e-detailrowcollapse'));
9314
+ isBorderNeed = this.updateBorderStatus(row, index);
9315
+ if (rowElement.length > 0 && isBorderNeed) {
9316
+ this.addRemoveClasses(rowElement, true, 'e-childborder');
9317
+ }
9076
9318
  }
9077
9319
  }
9078
9320
  return this.dropPosition;
9079
9321
  };
9322
+ /**
9323
+ * Updates the border status for a specified row and index.
9324
+ *
9325
+ * @private
9326
+ * @param {Element[]} row - The array of row elements to be updated.
9327
+ * @param {number} index - The index of the row element for which the border status is to be updated.
9328
+ * @returns {boolean} - Returns true if the border status was successfully updated, otherwise false.
9329
+ */
9330
+ RowDD.prototype.updateBorderStatus = function (row, index) {
9331
+ var _this = this;
9332
+ var isBorderNeed = true;
9333
+ var rows = this.parent.grid.getRows();
9334
+ var childRows = [];
9335
+ var hasDetailTemplate = false;
9336
+ if (!isNullOrUndefined(this.parent.detailTemplate)) {
9337
+ rows = this.parent.getDataRows();
9338
+ hasDetailTemplate = true;
9339
+ }
9340
+ var treegridColumnIndex = this.parent.treeColumnIndex;
9341
+ var treeColIndex = this.parent.allowRowDragAndDrop ?
9342
+ (hasDetailTemplate ? treegridColumnIndex + 2 : treegridColumnIndex + 1) :
9343
+ (hasDetailTemplate ? treegridColumnIndex + 1 : treegridColumnIndex);
9344
+ if (!isNullOrUndefined(this.parent.rowDropSettings.targetID)) {
9345
+ treeColIndex = treegridColumnIndex;
9346
+ }
9347
+ var dragRows = row;
9348
+ var targetRow = [rows["" + index]];
9349
+ if (this.dropPosition === 'topSegment') {
9350
+ row.filter(function (e) {
9351
+ if (isNullOrUndefined(e) || isNullOrUndefined(e.cells) || isNullOrUndefined(targetRow[0]) ||
9352
+ isNullOrUndefined(targetRow[0].cells)) {
9353
+ return true;
9354
+ }
9355
+ var regex = /index(\d+)|level(\d+)/g;
9356
+ var parentIndexLevel = e === null || e === undefined ? undefined : e.cells["" + treeColIndex].className.match(regex);
9357
+ var dropIndexLevel = targetRow[0].cells["" + treeColIndex].className.match(regex);
9358
+ if (isNullOrUndefined(dropIndexLevel) || isNullOrUndefined(dropIndexLevel) || isNullOrUndefined(parentIndexLevel)) {
9359
+ return true;
9360
+ }
9361
+ var parentLevel = +parentIndexLevel[1].match(/\d+/)[0];
9362
+ var dropParentLevel = +dropIndexLevel[1].match(/\d+/)[0];
9363
+ var InDraggedRowIndex = false;
9364
+ if (parentLevel !== 0 && parentLevel !== dropParentLevel) {
9365
+ return true;
9366
+ }
9367
+ for (var i = 0; i < rows.length; i++) {
9368
+ if (rows[parseInt(i.toString(), 10)] === dragRows[0]) {
9369
+ InDraggedRowIndex = true;
9370
+ }
9371
+ if (InDraggedRowIndex && rows[parseInt(i.toString(), 10)] !== dragRows[0]) {
9372
+ var parentIndexLevelInRow = rows[parseInt(i.toString(), 10)].cells["" + treeColIndex].className.match(regex);
9373
+ var parentLevelInRow = +parentIndexLevelInRow[1].match(/\d+/)[0];
9374
+ if (parentLevelInRow !== parentLevel && parentLevelInRow > parentLevel) {
9375
+ childRows.push(rows[parseInt(i.toString(), 10)]);
9376
+ }
9377
+ else {
9378
+ break;
9379
+ }
9380
+ }
9381
+ }
9382
+ if (parentLevel === dropParentLevel && ((childRows.length > 0 && parseInt(row[0].getAttribute('aria-rowindex'), 10) - 1 === index - (childRows.length + 1)) || (childRows.length === 0 && parseInt(row[0].getAttribute('aria-rowindex'), 10) - 1 === index - 1))) {
9383
+ isBorderNeed = false;
9384
+ }
9385
+ return true;
9386
+ });
9387
+ isBorderNeed = (!isNullOrUndefined(row) && childRows.length === 0 && !isNullOrUndefined(row[0].getAttribute('aria-rowindex')) && parseInt(row[0].getAttribute('aria-rowindex'), 10) - 1 === index - 1) && isNullOrUndefined(row[0]) ? false : isBorderNeed;
9388
+ }
9389
+ if (this.dropPosition === 'bottomSegment') {
9390
+ targetRow.filter(function (e) {
9391
+ if (isNullOrUndefined(e) || isNullOrUndefined(e.cells) || isNullOrUndefined(dragRows[0]) ||
9392
+ isNullOrUndefined(dragRows[0].cells)) {
9393
+ return true;
9394
+ }
9395
+ var regex = /index(\d+)|level(\d+)/g;
9396
+ var parentIndexLevel = e === null || e === undefined ? undefined : e.cells["" + treeColIndex].className.match(regex);
9397
+ var dragIndexLevel = dragRows[0].cells["" + treeColIndex].className.match(regex);
9398
+ if (isNullOrUndefined(dragIndexLevel) || isNullOrUndefined(parentIndexLevel)) {
9399
+ return true;
9400
+ }
9401
+ var parentLevel = +parentIndexLevel[1].match(/\d+/)[0];
9402
+ var dragParentLevel = +dragIndexLevel[1].match(/\d+/)[0];
9403
+ var InDraggedRowIndex = false;
9404
+ if (parentLevel !== 0 && parentLevel !== dragParentLevel) {
9405
+ return true;
9406
+ }
9407
+ for (var i = 0; i < rows.length; i++) {
9408
+ if (rows[parseInt(i.toString(), 10)] === targetRow[0]) {
9409
+ InDraggedRowIndex = true;
9410
+ }
9411
+ if (InDraggedRowIndex && rows[parseInt(i.toString(), 10)] !== targetRow[0]) {
9412
+ var parentIndexLevelInRow = rows[parseInt(i.toString(), 10)].cells["" + treeColIndex].className.match(regex);
9413
+ var parentLevelInRow = +parentIndexLevelInRow[1].match(/\d+/)[0];
9414
+ if (parentLevelInRow !== parentLevel && parentLevelInRow > parentLevel) {
9415
+ childRows.push(rows[parseInt(i.toString(), 10)]);
9416
+ }
9417
+ else {
9418
+ break;
9419
+ }
9420
+ }
9421
+ }
9422
+ if (!isNullOrUndefined(row) && parentLevel === dragParentLevel && ((childRows.length > 0 && !isNullOrUndefined(row[0].getAttribute('aria-rowindex')) && parseInt(row[0].getAttribute('aria-rowindex'), 10) - 1 === index + (childRows.length + 1)) || (childRows.length === 0 && !isNullOrUndefined(row[0].getAttribute('aria-rowindex')) && parseInt(row[0].getAttribute('aria-rowindex'), 10) - 1 === index + 1))) {
9423
+ isBorderNeed = false;
9424
+ }
9425
+ return true;
9426
+ });
9427
+ isBorderNeed = (!isNullOrUndefined(row) && childRows.length === 0 && !isNullOrUndefined(row[0].getAttribute('aria-rowindex')) && parseInt(row[0].getAttribute('aria-rowindex'), 10) - 1 === index + 1) && isNullOrUndefined(row[0]) ? false : isBorderNeed;
9428
+ }
9429
+ if (this.dropPosition === 'middleSegment') {
9430
+ targetRow.filter(function (e) {
9431
+ if (isNullOrUndefined(e) || isNullOrUndefined(e.cells) || isNullOrUndefined(dragRows[0]) ||
9432
+ isNullOrUndefined(dragRows[0].cells)) {
9433
+ return true;
9434
+ }
9435
+ for (var i = 0; i < dragRows.length; i++) {
9436
+ var regex = /index(\d+)|level(\d+)/g;
9437
+ var dropActualIndex = targetRow[0].rowIndex;
9438
+ var dragIndexLevel = dragRows[parseInt(i.toString(), 10)].cells["" + treeColIndex].className.match(regex);
9439
+ if (!dragIndexLevel) {
9440
+ return true;
9441
+ }
9442
+ var dragIndex = parseInt(dragIndexLevel.find(function (item) { return item.includes('index'); }).match(/\d+/)[0] || '0', 10);
9443
+ if (hasDetailTemplate) {
9444
+ dropActualIndex = dropActualIndex / 2;
9445
+ }
9446
+ if (dragIndex === dropActualIndex && !_this.parent.rowDropSettings.targetID) {
9447
+ isBorderNeed = false;
9448
+ }
9449
+ else {
9450
+ isBorderNeed = true;
9451
+ break;
9452
+ }
9453
+ }
9454
+ if (!isBorderNeed) {
9455
+ _this.dropPosition = 'Invalid';
9456
+ _this.addErrorElem();
9457
+ }
9458
+ return isBorderNeed;
9459
+ });
9460
+ }
9461
+ this.canDrop = isBorderNeed;
9462
+ return isBorderNeed;
9463
+ };
9080
9464
  /**
9081
9465
  * Removes the visual border from all child rows within the TreeGrid.
9082
9466
  *
@@ -9217,23 +9601,28 @@ var RowDD = /** @__PURE__ @class */ (function () {
9217
9601
  * Applies drop border styles to row elements based on the current drop position ('topSegment' or 'bottomSegment').
9218
9602
  *
9219
9603
  * @param {Element} target - The target element where the drop action is taking place.
9604
+ * @param {boolean} [isBorderNeed=true] - Indicates whether a border is needed during the drop action. Defaults to `true`.
9220
9605
  * @returns {void} No return value.
9221
9606
  */
9222
- RowDD.prototype.topOrBottomBorder = function (target) {
9223
- var rowElement = [];
9607
+ RowDD.prototype.topOrBottomBorder = function (target, isBorderNeed) {
9608
+ if (isBorderNeed === void 0) { isBorderNeed = true; }
9224
9609
  var element = closest(target, 'tr');
9225
- rowElement = element ? [].slice.call(element.querySelectorAll('.e-rowcell,.e-rowdragdrop,.e-detailrowcollapse')) : [];
9226
- if (rowElement.length) {
9227
- if (this.dropPosition === 'topSegment') {
9228
- this.addRemoveClasses(rowElement, true, 'e-droptop');
9229
- if (this.parent.element.getElementsByClassName('e-lastrow-dragborder').length > 0) {
9230
- this.parent.element.getElementsByClassName('e-lastrow-dragborder')[0].remove();
9231
- }
9232
- }
9233
- if (this.dropPosition === 'bottomSegment') {
9234
- this.addRemoveClasses(rowElement, true, 'e-dropbottom');
9610
+ var rowElements = element ?
9611
+ Array.from(element.querySelectorAll('.e-rowcell, .e-rowdragdrop, .e-detailrowcollapse')) : [];
9612
+ if (!rowElements.length) {
9613
+ return;
9614
+ }
9615
+ var classAction = isBorderNeed ? this.addRemoveClasses.bind(this, rowElements, true) : this.addRemoveClasses.bind(this, rowElements, false, 'e-dragborder');
9616
+ if (this.dropPosition === 'topSegment') {
9617
+ classAction('e-droptop');
9618
+ var lastRowDragBorder = this.parent.element.querySelector('.e-lastrow-dragborder');
9619
+ if (lastRowDragBorder) {
9620
+ lastRowDragBorder.remove();
9235
9621
  }
9236
9622
  }
9623
+ if (this.dropPosition === 'bottomSegment') {
9624
+ classAction('e-dropbottom');
9625
+ }
9237
9626
  };
9238
9627
  /**
9239
9628
  * Removes the drop border classes ('e-dropbottom' and 'e-droptop') from the parent element if present.
@@ -9243,6 +9632,9 @@ var RowDD = /** @__PURE__ @class */ (function () {
9243
9632
  RowDD.prototype.removetopOrBottomBorder = function () {
9244
9633
  var border = [];
9245
9634
  border = [].slice.call(this.parent.element.querySelectorAll('.e-dropbottom, .e-droptop'));
9635
+ if (this.parent.rowDropSettings.targetID) {
9636
+ border = [].slice.call(document.querySelectorAll('.e-dropbottom, .e-droptop'));
9637
+ }
9246
9638
  if (border.length) {
9247
9639
  this.addRemoveClasses(border, false, 'e-dropbottom');
9248
9640
  this.addRemoveClasses(border, false, 'e-droptop');
@@ -9298,18 +9690,29 @@ var RowDD = /** @__PURE__ @class */ (function () {
9298
9690
  }
9299
9691
  cloneElement.style.cursor = '';
9300
9692
  var rowEle = args.target ? closest(args.target, 'tr') : null;
9301
- var rowIdx = rowEle ? rowEle.rowIndex : -1;
9693
+ var rowIdx = -1;
9694
+ if (!isNullOrUndefined(this.parent.detailTemplate)) {
9695
+ rowIdx = rowEle ? this.parent.getDataRows().indexOf(rowEle) : -1;
9696
+ }
9697
+ else {
9698
+ rowIdx = rowEle ? rowEle.rowIndex : -1;
9699
+ }
9302
9700
  if (rowIdx === -1) {
9303
9701
  this.canDrop = false;
9304
9702
  this.addErrorElem();
9305
- if (isNullOrUndefined(tObj.rowDropSettings.targetID)) {
9306
- this.removetopOrBottomBorder();
9307
- this.removeChildBorder();
9308
- }
9703
+ this.removetopOrBottomBorder();
9704
+ this.removeChildBorder();
9309
9705
  return;
9310
9706
  }
9311
9707
  var dragRecords = Array.isArray(args.data) ? args.data : [args.data];
9312
9708
  var droppedRecord = tObj.getCurrentViewRecords()[parseInt(rowIdx.toString(), 10)];
9709
+ if (tObj.rowDropSettings.targetID) {
9710
+ var dropElement = parentsUntil(args.target, 'e-treegrid');
9711
+ if (dropElement && dropElement.id === this.parent.rowDropSettings.targetID) {
9712
+ var srcControl = dropElement.ej2_instances[0];
9713
+ droppedRecord = srcControl.getCurrentViewRecords()[parseInt(rowIdx.toString(), 10)];
9714
+ }
9715
+ }
9313
9716
  this.removeErrorElem();
9314
9717
  this.canDrop = true;
9315
9718
  this.ensuredropPosition(dragRecords, droppedRecord);
@@ -9321,6 +9724,7 @@ var RowDD = /** @__PURE__ @class */ (function () {
9321
9724
  if (dropElement && dropElement.id === this.parent.rowDropSettings.targetID) {
9322
9725
  var srcControl = dropElement.ej2_instances[0];
9323
9726
  srcControl.rowDragAndDropModule.updateIcon(args.rows, rowIdx, args);
9727
+ this.dropPosition = srcControl.rowDragAndDropModule.dropPosition;
9324
9728
  }
9325
9729
  }
9326
9730
  if (args.target && closest(args.target, '#' + tObj.rowDropSettings.targetID)) {
@@ -9341,13 +9745,13 @@ var RowDD = /** @__PURE__ @class */ (function () {
9341
9745
  var parentItem = 'parentItem';
9342
9746
  if (!tObj.rowDropSettings.targetID) {
9343
9747
  if (parentsUntil(args.target, 'e-content') || (this.dropPosition === 'Invalid' || !this.canDrop)) {
9344
- if (this.parent.element.querySelector('.e-errorelem')) {
9748
+ if (this.parent.element.querySelector('.e-errorelem') || !this.canDrop) {
9345
9749
  this.dropPosition = 'Invalid';
9346
9750
  }
9347
9751
  setValue('dropPosition', this.dropPosition, args);
9348
9752
  tObj.trigger(rowDrop, args);
9349
9753
  if (!args.cancel) {
9350
- if (!isCountRequired(this.parent) && this.dropPosition === 'Invalid') {
9754
+ if (!isCountRequired(this.parent) && (this.dropPosition === 'Invalid' && !this.canDrop)) {
9351
9755
  return;
9352
9756
  }
9353
9757
  if (!isCountRequired(this.parent)) {
@@ -9364,9 +9768,15 @@ var RowDD = /** @__PURE__ @class */ (function () {
9364
9768
  else {
9365
9769
  if (args.target && closest(args.target, '#' + tObj.rowDropSettings.targetID) || parentsUntil(args.target, 'e-treegrid') &&
9366
9770
  parentsUntil(args.target, 'e-treegrid').id === tObj.rowDropSettings.targetID || args.target && document.getElementById(tObj.rowDropSettings.targetID)) {
9771
+ if (this.parent.element.querySelector('.e-errorelem') || !this.canDrop) {
9772
+ this.dropPosition = 'Invalid';
9773
+ }
9367
9774
  setValue('dropPosition', this.dropPosition, args);
9368
9775
  tObj.trigger(rowDrop, args);
9369
9776
  if (!args.cancel && tObj.rowDropSettings.targetID) {
9777
+ if (this.dropPosition === 'Invalid' && !this.canDrop) {
9778
+ return;
9779
+ }
9370
9780
  this.dragDropGrid(args);
9371
9781
  if (tObj.isLocalData) {
9372
9782
  tObj.flatData = this.orderToIndex(tObj.flatData);
@@ -9499,13 +9909,13 @@ var RowDD = /** @__PURE__ @class */ (function () {
9499
9909
  }
9500
9910
  };
9501
9911
  /**
9502
- * Retrieves the index of the target row based on its 'data-rowindex' attribute.
9912
+ * Retrieves the index of the target row based on its 'aria-rowindex' attribute.
9503
9913
  *
9504
9914
  * @param {Element} targetRow - The target row element from which to retrieve the index.
9505
9915
  * @returns {number} - The index of the target row, or 0 if the targetRow is null or undefined.
9506
9916
  */
9507
9917
  RowDD.prototype.getTargetIdx = function (targetRow) {
9508
- return targetRow ? parseInt(targetRow.getAttribute('data-rowindex'), 10) : 0;
9918
+ return targetRow ? parseInt(targetRow.getAttribute('aria-rowindex'), 10) - 1 : 0;
9509
9919
  };
9510
9920
  /**
9511
9921
  * Retrieves the parent data of a given record during a row drag-and-drop operation.
@@ -9568,7 +9978,13 @@ var RowDD = /** @__PURE__ @class */ (function () {
9568
9978
  this.droppedRecord = tObj.getCurrentViewRecords()[parseInt(index.toString(), 10)];
9569
9979
  }
9570
9980
  else {
9571
- this.droppedRecord = tObj.getCurrentViewRecords()[args.dropIndex];
9981
+ if (!isNullOrUndefined(this.parent.rowDropSettings.targetID)) {
9982
+ var rowsObject = this.parent.grid.getRowsObject();
9983
+ this.droppedRecord = rowsObject.length > 0 ? rowsObject[args.dropIndex].data : undefined;
9984
+ }
9985
+ else {
9986
+ this.droppedRecord = tObj.getCurrentViewRecords()[args.dropIndex];
9987
+ }
9572
9988
  }
9573
9989
  }
9574
9990
  var dragRecords = [];
@@ -10106,6 +10522,7 @@ var RowDD = /** @__PURE__ @class */ (function () {
10106
10522
  };
10107
10523
  /**
10108
10524
  * Cleans up resources, event listeners, and DOM elements when the TreeGrid component is destroyed.
10525
+ *
10109
10526
  * @returns {void}
10110
10527
  */
10111
10528
  RowDD.prototype.destroy = function () {
@@ -10159,7 +10576,7 @@ var __decorate$c = (undefined && undefined.__decorate) || function (decorators,
10159
10576
  return c > 3 && r && Object.defineProperty(target, key, r), r;
10160
10577
  };
10161
10578
  /**
10162
- * Configures the row drop settings of the TreeGrid.
10579
+ * Configures the settings for row dragging and dropping within the TreeGrid, allowing for enhanced user interaction and data manipulation capabilities.
10163
10580
  */
10164
10581
  var RowDropSettings = /** @__PURE__ @class */ (function (_super) {
10165
10582
  __extends$e(RowDropSettings, _super);
@@ -10219,7 +10636,8 @@ var TreeVirtualRowModelGenerator = /** @__PURE__ @class */ (function (_super) {
10219
10636
  if (!isNullOrUndefined(notifyArgs.virtualInfo)) {
10220
10637
  if (notifyArgs.virtualInfo.direction !== 'right' && notifyArgs.virtualInfo.direction !== 'left') {
10221
10638
  if (!((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
10222
- && !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent) || isRemoteData(this.parent))) {
10639
+ && !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent))
10640
+ || notifyArgs.virtualInfo.blockIndexes.length === 1) {
10223
10641
  notifyArgs.virtualInfo.blockIndexes = info.blockIndexes;
10224
10642
  }
10225
10643
  }
@@ -10228,7 +10646,7 @@ var TreeVirtualRowModelGenerator = /** @__PURE__ @class */ (function (_super) {
10228
10646
  }
10229
10647
  }
10230
10648
  if ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
10231
- && !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent) || isRemoteData(this.parent)) {
10649
+ && !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)) {
10232
10650
  return _super.prototype.generateRows.call(this, data, notifyArgs);
10233
10651
  }
10234
10652
  else {
@@ -10249,7 +10667,7 @@ var TreeVirtualRowModelGenerator = /** @__PURE__ @class */ (function (_super) {
10249
10667
  var clear = ['paging', 'refresh', 'sorting', 'filtering', 'searching', 'reorder',
10250
10668
  'save', 'delete'].some(function (value) { return action === value; });
10251
10669
  if ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
10252
- && !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent) || isRemoteData(this.parent)) {
10670
+ && !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)) {
10253
10671
  var model = 'model';
10254
10672
  var currentPage = this["" + model].currentPage;
10255
10673
  if (clear) {
@@ -11038,7 +11456,7 @@ var Page = /** @__PURE__ @class */ (function () {
11038
11456
  return newResults;
11039
11457
  };
11040
11458
  Page.prototype.updatePageSize = function (pageingDetails) {
11041
- var updateSize = pageingDetails.result.length;
11459
+ var updateSize = pageingDetails.count;
11042
11460
  var gridPagerModule = this.parent.grid.pagerModule;
11043
11461
  if (this.parent.pageSettings.pageSizes === true) {
11044
11462
  if (gridPagerModule.pagerObj.pagerdropdownModule['dropDownListObject'].value === gridPagerModule.pagerObj.getLocalizedLabel('All')) {
@@ -11449,7 +11867,7 @@ var Aggregate = /** @__PURE__ @class */ (function () {
11449
11867
  var cellElement = createElement('td', {
11450
11868
  className: 'e-summary'
11451
11869
  });
11452
- if (this.parent.isReact) {
11870
+ if (this.parent.isReact && typeof (summaryColumn.footerTemplate) !== 'string') {
11453
11871
  var renderReactTemplates = 'renderReactTemplates';
11454
11872
  tempObj.fn(single[summaryColumn.columnName], this.parent, tempObj.property, '', null, null, cellElement);
11455
11873
  this.parent["" + renderReactTemplates]();
@@ -12071,7 +12489,7 @@ var BatchEdit = /** @__PURE__ @class */ (function () {
12071
12489
  focusModule.getContent().matrix.current = [actualIndex, focusModule.getContent().matrix.current[1]];
12072
12490
  if (this.parent.editModule['isAddedRowByMethod'] && !isNullOrUndefined(this.parent.editModule['addRowIndex']) && !this.parent.editModule['isAddedRowByContextMenu']) {
12073
12491
  var newlyAddedRecords = this.parent.getBatchChanges()['addedRecords'];
12074
- var index = parseInt(this.parent.getContentTable().getElementsByClassName('e-insertedrow')[newlyAddedRecords.length - 1].getAttribute('data-rowindex'), 10);
12492
+ var index = parseInt(this.parent.getContentTable().getElementsByClassName('e-insertedrow')[newlyAddedRecords.length - 1].getAttribute('aria-rowindex'), 10) - 1;
12075
12493
  this.batchRecords.splice(index, 0, newlyAddedRecords[newlyAddedRecords.length - 1]);
12076
12494
  }
12077
12495
  }
@@ -12100,7 +12518,7 @@ var BatchEdit = /** @__PURE__ @class */ (function () {
12100
12518
  childs = findChildrenRecords(data);
12101
12519
  uid = this.parent.getSelectedRows()[0].getAttribute('data-uid');
12102
12520
  }
12103
- var parentRowIndex = parseInt(this.parent.grid.getRowElementByUID(uid).getAttribute('data-rowindex'), 10);
12521
+ var parentRowIndex = parseInt(this.parent.grid.getRowElementByUID(uid).getAttribute('aria-rowindex'), 10) - 1;
12104
12522
  if (childs.length) {
12105
12523
  var totalCount = parentRowIndex + childs.length;
12106
12524
  var firstChildIndex = parentRowIndex + 1;
@@ -12137,7 +12555,7 @@ var BatchEdit = /** @__PURE__ @class */ (function () {
12137
12555
  BatchEdit.prototype.updateRowIndex = function () {
12138
12556
  var rows = this.parent.grid.getDataRows();
12139
12557
  for (var i = 0; i < rows.length; i++) {
12140
- rows[parseInt(i.toString(), 10)].setAttribute('data-rowindex', i.toString());
12558
+ rows[parseInt(i.toString(), 10)].setAttribute('aria-rowindex', (i + 1).toString());
12141
12559
  }
12142
12560
  };
12143
12561
  BatchEdit.prototype.updateChildCount = function (records) {
@@ -12266,7 +12684,7 @@ var BatchEdit = /** @__PURE__ @class */ (function () {
12266
12684
  if (this.parent.editModule['isAddedRowByMethod'] && addRecords.length && !isNullOrUndefined(this.parent.editModule['addRowIndex']) && !this.parent.editModule['isAddedRowByContextMenu']) {
12267
12685
  addRecords.reverse();
12268
12686
  for (var i_1 = 0; i_1 < addRecords.length; i_1++) {
12269
- var index_1 = parseInt(this.parent.getContentTable().getElementsByClassName('e-insertedrow')[parseInt(i_1.toString(), 10)].getAttribute('data-rowindex'), 10);
12687
+ var index_1 = parseInt(this.parent.getContentTable().getElementsByClassName('e-insertedrow')[parseInt(i_1.toString(), 10)].getAttribute('aria-rowindex'), 10) - 1;
12270
12688
  data.splice(index_1, 0, addRecords[parseInt(i_1.toString(), 10)]);
12271
12689
  }
12272
12690
  }
@@ -12406,8 +12824,15 @@ var BatchEdit = /** @__PURE__ @class */ (function () {
12406
12824
  BatchEdit.prototype.nextCellIndex = function (args) {
12407
12825
  var index = 'index';
12408
12826
  var rowIndex = 'rowIndex';
12827
+ var batchChanges = this.parent.getBatchChanges();
12828
+ var deletedRecords = batchChanges.deletedRecords;
12409
12829
  if (this.parent.getSelectedRows().length) {
12410
- args["" + index] = this.parent.getSelectedRows()[0]["" + rowIndex];
12830
+ if (this.isAdd && deletedRecords.length > 0) {
12831
+ args["" + index] = this.parent.getSelectedRecords()[0]["" + index];
12832
+ }
12833
+ else {
12834
+ args["" + index] = this.parent.getSelectedRows()[0]["" + rowIndex];
12835
+ }
12411
12836
  }
12412
12837
  else {
12413
12838
  args["" + index] = this.batchIndex;
@@ -12483,7 +12908,7 @@ var Edit = /** @__PURE__ @class */ (function () {
12483
12908
  }
12484
12909
  if (e.target.classList.contains('e-treegridcollapse') || e.target.classList.contains('e-treegridexpand')) {
12485
12910
  var tr = parentsUntil(e.target, 'e-row');
12486
- var rowIndex = tr && parseInt(tr.getAttribute('data-rowindex'), 10);
12911
+ var rowIndex = tr && parseInt(tr.getAttribute('aria-rowindex'), 10) - 1;
12487
12912
  if (!isNullOrUndefined(rowIndex) && rowIndex >= 0 && this.parent.allowPaging) {
12488
12913
  /* eslint-disable-next-line */
12489
12914
  this.parent.grid.getDataRows()[rowIndex].dataset.uid = this.parent.grid.contentModule.getRows()[rowIndex].uid;
@@ -12653,7 +13078,7 @@ var Edit = /** @__PURE__ @class */ (function () {
12653
13078
  if (!(this.parent.grid.editSettings.allowEditing) || this.parent.grid.isEdit) {
12654
13079
  return;
12655
13080
  }
12656
- var column = this.parent.grid.getColumnByIndex(+target.closest('td.e-rowcell').getAttribute('data-colindex'));
13081
+ var column = this.parent.grid.getColumnByIndex(+target.closest('td.e-rowcell').getAttribute('aria-colindex') - 1);
12657
13082
  if (this.parent.editSettings.mode === 'Cell' && !this.isOnBatch && column && !column.isPrimaryKey &&
12658
13083
  this.parent.editSettings.allowEditing && column.allowEditing && !(target.classList.contains('e-treegridexpand') ||
12659
13084
  target.classList.contains('e-treegridcollapse')) && this.parent.editSettings.allowEditOnDblClick) {
@@ -12661,8 +13086,8 @@ var Edit = /** @__PURE__ @class */ (function () {
12661
13086
  this.parent.grid.setProperties({ selectedRowIndex: args.rowIndex }, true);
12662
13087
  if (this.parent.enableVirtualization) {
12663
13088
  var tr = parentsUntil(args.target, 'e-row');
12664
- this.prevAriaRowIndex = tr.getAttribute('data-rowindex');
12665
- tr.setAttribute('data-rowindex', tr.rowIndex + '');
13089
+ this.prevAriaRowIndex = tr.getAttribute('aria-rowindex');
13090
+ tr.setAttribute('aria-rowindex', (tr.rowIndex + 1) + '');
12666
13091
  }
12667
13092
  this.updateGridEditMode('Batch');
12668
13093
  }
@@ -12706,7 +13131,7 @@ var Edit = /** @__PURE__ @class */ (function () {
12706
13131
  var prom = args["" + promise];
12707
13132
  delete args["" + promise];
12708
13133
  if (this.parent.enableVirtualization && !isNullOrUndefined(this.prevAriaRowIndex) && this.prevAriaRowIndex !== '-1') {
12709
- args.row.setAttribute('data-rowindex', this.prevAriaRowIndex);
13134
+ args.row.setAttribute('aria-rowindex', this.prevAriaRowIndex);
12710
13135
  this.prevAriaRowIndex = undefined;
12711
13136
  }
12712
13137
  if (this.keyPress !== 'enter') {
@@ -13030,8 +13455,8 @@ var Edit = /** @__PURE__ @class */ (function () {
13030
13455
  }
13031
13456
  }
13032
13457
  var rows = this.parent.grid.getDataRows();
13033
- var firstAriaIndex = rows.length ? +rows[0].getAttribute('data-rowindex') : 0;
13034
- var lastAriaIndex = rows.length ? +rows[rows.length - 1].getAttribute('data-rowindex') : 0;
13458
+ var firstAriaIndex = rows.length ? +rows[0].getAttribute('aria-rowindex') - 1 : 0;
13459
+ var lastAriaIndex = rows.length ? +rows[rows.length - 1].getAttribute('aria-rowindex') - 1 : 0;
13035
13460
  var withinRange = this.selectedIndex >= firstAriaIndex && this.selectedIndex <= lastAriaIndex;
13036
13461
  var isVirtualization = this.parent.enableVirtualization && this.addRowIndex > -1 && this.prevAriaRowIndex !== '-1';
13037
13462
  if (this.parent.editSettings.mode !== 'Dialog') {
@@ -13082,7 +13507,7 @@ var Edit = /** @__PURE__ @class */ (function () {
13082
13507
  if (isVirtualization) {
13083
13508
  this.prevAriaRowIndex = '-1';
13084
13509
  }
13085
- if (!this.parent.enableVirtualization || this.parent.enableVirtualization && !Object.keys(this.parent.grid.contentModule['emptyRowData']).length) {
13510
+ if (!this.parent.enableVirtualization || this.parent.enableVirtualization) {
13086
13511
  this.isScrollByFocus = true;
13087
13512
  focussedElement.focus();
13088
13513
  }
@@ -13178,7 +13603,7 @@ var Edit = /** @__PURE__ @class */ (function () {
13178
13603
  this.selectedIndex = this.parent.grid.selectedRowIndex;
13179
13604
  }
13180
13605
  if (this.parent.enableVirtualization) {
13181
- var selector = '.e-row[data-rowindex="' + this.selectedIndex + '"]';
13606
+ var selector = '.e-row[aria-rowindex="' + (this.selectedIndex + 1) + '"]';
13182
13607
  var row = void 0;
13183
13608
  if (this.selectedIndex > -1 && this.parent.editSettings.newRowPosition !== 'Top' &&
13184
13609
  this.parent.editSettings.newRowPosition !== 'Bottom') {
@@ -13188,7 +13613,7 @@ var Edit = /** @__PURE__ @class */ (function () {
13188
13613
  }
13189
13614
  else {
13190
13615
  if (this.prevAriaRowIndex && this.prevAriaRowIndex !== '-1') {
13191
- selector = '.e-row[data-rowindex="' + this.prevAriaRowIndex + '"]';
13616
+ selector = '.e-row[aria-rowindex="' + (this.prevAriaRowIndex + 1) + '"]';
13192
13617
  row = this.parent.getContent().querySelector(selector);
13193
13618
  this.addRowIndex = row ? row.rowIndex : 0;
13194
13619
  }
@@ -13281,7 +13706,7 @@ var Edit = /** @__PURE__ @class */ (function () {
13281
13706
  var isVirtualization = this.parent.enableVirtualization && this.addRowIndex > -1 && this.prevAriaRowIndex !== '-1';
13282
13707
  var rows = this.parent.getRows();
13283
13708
  var firstAriaIndex = rows.length ? currentData.indexOf(currentData[0]) : 0;
13284
- var lastAriaIndex = rows.length ? +rows[rows.length - 1].getAttribute('data-rowindex') : 0;
13709
+ var lastAriaIndex = rows.length ? +rows[rows.length - 1].getAttribute('aria-rowindex') - 1 : 0;
13285
13710
  var withinRange = this.parent.enableVirtualization && args.index !== 0 ? true :
13286
13711
  this.selectedIndex >= firstAriaIndex && this.selectedIndex <= lastAriaIndex;
13287
13712
  if (currentData.length) {
@@ -13475,7 +13900,7 @@ var Edit = /** @__PURE__ @class */ (function () {
13475
13900
  Edit.prototype.closeEdit = function () {
13476
13901
  if (this.parent.enableVirtualization && this.parent.grid.editSettings.mode === 'Batch' && this.parent.grid.pageSettings.currentPage > 1) {
13477
13902
  this.editedRowIndex = this.parent.grid.editModule.editModule['cellDetails'].rowIndex;
13478
- this.parent.grid.editModule.editModule['cellDetails'].rowIndex = parseInt(this.parent.getRows()[this.parent.grid.editModule.editModule['cellDetails'].rowIndex].getAttribute('data-rowIndex'), 10);
13903
+ this.parent.grid.editModule.editModule['cellDetails'].rowIndex = parseInt(this.parent.getRows()[this.parent.grid.editModule.editModule['cellDetails'].rowIndex].getAttribute('aria-rowIndex'), 10) - 1;
13479
13904
  }
13480
13905
  this.parent.grid.editModule.closeEdit();
13481
13906
  };
@@ -13643,6 +14068,11 @@ var __extends$g = (undefined && undefined.__extends) || (function () {
13643
14068
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13644
14069
  };
13645
14070
  })();
14071
+ /**
14072
+ * VirtualTreeContentRenderer
14073
+ *
14074
+ * @hidden
14075
+ */
13646
14076
  var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13647
14077
  __extends$g(VirtualTreeContentRenderer, _super);
13648
14078
  function VirtualTreeContentRenderer(parent, locator) {
@@ -13664,23 +14094,45 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13664
14094
  VirtualTreeContentRenderer.prototype.getModelGenerator = function () {
13665
14095
  return new TreeVirtualRowModelGenerator(this.parent);
13666
14096
  };
14097
+ /**
14098
+ * Retrieves the row element for a given row index.
14099
+ *
14100
+ * @param {number} index - The index of the row to retrieve.
14101
+ * @returns {Element} The row element at the specified index.
14102
+ */
13667
14103
  VirtualTreeContentRenderer.prototype.getRowByIndex = function (index) {
13668
14104
  if (this.parent.enableVirtualization && this.parent.isFrozenGrid()) {
13669
14105
  return this.getRowCollection(index, true);
13670
14106
  }
13671
14107
  var dataRows = this.parent.getDataRows();
13672
- var targetRow = dataRows.find(function (e) { return parseInt(e.getAttribute('data-rowindex'), 10) === index; });
14108
+ var targetRow = dataRows.find(function (e) { return parseInt(e.getAttribute('aria-rowindex'), 10) - 1 === index; });
13673
14109
  if (!targetRow && this.parent.isEdit && this.parent.editSettings.mode === 'Batch') {
13674
14110
  return index != null ? this.parent.getRows()[parseInt(index.toString(), 10)] : undefined;
13675
14111
  }
13676
14112
  return targetRow;
13677
14113
  };
14114
+ /**
14115
+ * Retrieves the frozen right virtual row element by its index.
14116
+ *
14117
+ * @param {number} index - The index of the row to be retrieved.
14118
+ * @returns {Element} The DOM element representing the frozen right virtual row.
14119
+ */
13678
14120
  VirtualTreeContentRenderer.prototype.getFrozenRightVirtualRowByIndex = function (index) {
13679
14121
  return this.getRowCollection(index, false, false, true);
13680
14122
  };
14123
+ /**
14124
+ * Retrieves the row or record from the virtual tree grid based on the provided index.
14125
+ * Considers conditions such as frozen rows and pagination for accurate retrieval.
14126
+ *
14127
+ * @param {number} index - The index of the desired row or record.
14128
+ * @param {boolean} isMovable - Specifies if the content is movable.
14129
+ * @param {boolean} [isRowObject] - Optional. Determines if the return value should be a row object.
14130
+ * @param {boolean} [isFrozenRight] - Optional. Used for determining frozen right rows.
14131
+ * @returns {Element | Object} - The HTML element or row object.
14132
+ */
13681
14133
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
13682
14134
  VirtualTreeContentRenderer.prototype.getRowCollection = function (index, isMovable, isRowObject, isFrozenRight) {
13683
- var startIdx = parseInt(this.parent.getRows()[0].getAttribute(dataRowIndex), 10);
14135
+ var startIdx = parseInt(this.parent.getRows()[0].getAttribute(ariaRowIndex), 10) - 1;
13684
14136
  var rowCollection = this.parent.getDataRows();
13685
14137
  var collection = isRowObject ? this.parent.getCurrentViewRecords() : rowCollection;
13686
14138
  var selectedRow = collection[index - startIdx];
@@ -13694,12 +14146,27 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13694
14146
  this.parent.getRowsObject()[parseInt(index.toString(), 10)].data : selectedRow;
13695
14147
  }
13696
14148
  }
14149
+ if (selectedRow == null && index != null && this.parent.editSettings.mode === 'Batch' && this.parent.isEdit && isMovable) {
14150
+ selectedRow = rowCollection[parseInt(index.toString(), 10)];
14151
+ }
13697
14152
  return selectedRow;
13698
14153
  };
14154
+ /**
14155
+ * @hidden
14156
+ * @returns {void}
14157
+ */
13699
14158
  VirtualTreeContentRenderer.prototype.addEventListener = function () {
13700
14159
  this.parent.on(virtualActionArgs, this.virtualOtherAction, this);
13701
14160
  this.parent.on(indexModifier, this.indexModifier, this);
13702
14161
  };
14162
+ /**
14163
+ * Handles virtual scrolling actions based on the provided arguments.
14164
+ *
14165
+ * @param {Object} args - The argument object.
14166
+ * @param {boolean} args.setTop - Determines if the virtual scroll position should reset to top.
14167
+ * @param {boolean} args.isExpandCollapse - Determines if the action is part of an expand/collapse operation.
14168
+ * @returns {void}
14169
+ */
13703
14170
  VirtualTreeContentRenderer.prototype.virtualOtherAction = function (args) {
13704
14171
  if (args.setTop) {
13705
14172
  this.translateY = 0;
@@ -13710,10 +14177,22 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13710
14177
  this.isExpandCollapse = true;
13711
14178
  }
13712
14179
  };
14180
+ /**
14181
+ * Modifies the index based on various conditions such as record addition, deletion, or data source changes.
14182
+ *
14183
+ * @private
14184
+ * @param {Object} args - Contains parameters for the current operation.
14185
+ * @param {number} args.startIndex - The starting index for the modification.
14186
+ * @param {number} args.endIndex - The ending index for the modification.
14187
+ * @param {number} args.count - The number of items affected in the operation.
14188
+ * @param {string} args.requestType - The type of request, such as 'insert', 'delete', or 'update'.
14189
+ * @returns {void}
14190
+ */
13713
14191
  VirtualTreeContentRenderer.prototype.indexModifier = function (args) {
13714
14192
  var content = this.parent.getContent().querySelector('.e-content');
14193
+ var pageSize = this.parent.pageSettings.pageSize;
13715
14194
  if ((this.recordAdded || args.requestType === 'delete' && this.endIndex > args.count - this.parent.pageSettings.pageSize) && this.startIndex > -1 && this.endIndex > -1) {
13716
- if (this.endIndex > args.count - this.parent.pageSettings.pageSize) {
14195
+ if (this.endIndex > args.count - pageSize) {
13717
14196
  var nextSetResIndex = ~~(content.scrollTop / this.parent.getRowHeight());
13718
14197
  var lastIndex = nextSetResIndex + this.parent.getRows().length;
13719
14198
  if (lastIndex > args.count) {
@@ -13731,12 +14210,12 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13731
14210
  }
13732
14211
  if (this.isDataSourceChanged) {
13733
14212
  this.startIndex = 0;
13734
- this.endIndex = this.parent.pageSettings.pageSize - 1;
14213
+ this.endIndex = pageSize - 1;
13735
14214
  }
13736
- if ((this.endIndex - this.startIndex !== this.parent.pageSettings.pageSize) &&
13737
- (this.totalRecords > this.parent.pageSettings.pageSize)
14215
+ if ((this.endIndex - this.startIndex !== pageSize) &&
14216
+ (this.totalRecords > pageSize)
13738
14217
  && (this.endIndex === this.totalRecords)) {
13739
- args.startIndex = this.endIndex - this.parent.pageSettings.pageSize;
14218
+ args.startIndex = this.endIndex - pageSize;
13740
14219
  args.endIndex = this.endIndex;
13741
14220
  }
13742
14221
  else {
@@ -13744,6 +14223,12 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13744
14223
  args.endIndex = this.endIndex;
13745
14224
  }
13746
14225
  };
14226
+ /**
14227
+ * Handles the addition or removal of event listeners for virtual scrolling in a TreeGrid.
14228
+ *
14229
+ * @param {string} action - The action to perform, either 'on' or 'off'.
14230
+ * @returns {void}
14231
+ */
13747
14232
  VirtualTreeContentRenderer.prototype.eventListener = function (action) {
13748
14233
  var _this = this;
13749
14234
  if (!(this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
@@ -13770,6 +14255,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13770
14255
  this.parent.addEventListener('rowSelected', this.rowSelectedEvent.bind(this));
13771
14256
  this.parent["" + action]('select-virtual-Row', this.toSelectVirtualRow, this);
13772
14257
  this.parent.on('content-ready', this.fn, this);
14258
+ this.parent.addEventListener(actionBegin, this.handleActionBegin.bind(this));
13773
14259
  this.parent.addEventListener(actionComplete, this.onActionComplete.bind(this));
13774
14260
  this.parent["" + action]('virtual-scroll-edit-action-begin', this.beginEdit, this);
13775
14261
  this.parent["" + action]('virtual-scroll-add-action-begin', this.beginAdd, this);
@@ -13780,15 +14266,30 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13780
14266
  this.parent["" + action]('select-row-on-context-open', this.toSelectRowOnContextOpen, this);
13781
14267
  this.parent["" + action]('refresh-virtual-editform-cells', this.refreshCell, this);
13782
14268
  this.parent["" + action]('virtaul-cell-focus', this.cellFocus, this);
14269
+ this.parent["" + action]('virtual-scroll-edit', this.restoreEditState, this);
13783
14270
  }
13784
14271
  else {
13785
14272
  _super.prototype.eventListener.call(this, 'on');
13786
14273
  }
13787
14274
  };
14275
+ /**
14276
+ * Handles cell focus transitions in a virtualized tree grid component
14277
+ * when a keyboard event is triggered.
14278
+ *
14279
+ * @param {KeyboardEventArgs} e - The keyboard event arguments that contain
14280
+ * information about the key action.
14281
+ * @returns {void}
14282
+ */
13788
14283
  VirtualTreeContentRenderer.prototype.cellFocus = function (e) {
13789
14284
  var virtualCellFocus = 'virtualCellFocus';
13790
14285
  _super.prototype["" + virtualCellFocus].call(this, e);
13791
14286
  };
14287
+ /**
14288
+ * Handles the data ready event for the virtual tree grid content renderer.
14289
+ *
14290
+ * @param {NotifyArgs} [e] - The notification arguments that contain information about the data.
14291
+ * @returns {void}
14292
+ */
13792
14293
  VirtualTreeContentRenderer.prototype.onDataReady = function (e) {
13793
14294
  _super.prototype.onDataReady.call(this, e);
13794
14295
  if (!(this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
@@ -13813,6 +14314,12 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13813
14314
  }
13814
14315
  }
13815
14316
  };
14317
+ /**
14318
+ * Renders the table for the virtual tree content. It sets up a new `TreeInterSectionObserver`
14319
+ * based on certain conditions regarding the data source and counting requirements.
14320
+ *
14321
+ * @returns {void}
14322
+ */
13816
14323
  VirtualTreeContentRenderer.prototype.renderTable = function () {
13817
14324
  _super.prototype.renderTable.call(this);
13818
14325
  if (!(this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
@@ -13822,6 +14329,17 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13822
14329
  this.contents = this.getPanel().firstChild;
13823
14330
  }
13824
14331
  };
14332
+ /**
14333
+ * Calculates the translateY value for a virtual tree grid based on the scroll top, container height,
14334
+ * and additional virtual scrolling information. This method specifically handles logic for remote
14335
+ * data sources and ensures smooth scrolling with respect to expansion states.
14336
+ *
14337
+ * @param {number} sTop - The scroll top position.
14338
+ * @param {number} cHeight - The height of the container.
14339
+ * @param {VirtualInfo} [info] - Optional virtual scrolling information.
14340
+ * @param {boolean} [isOnenter] - Flag indicating if the scroll event is on enter.
14341
+ * @returns {number} The calculated translateY value.
14342
+ */
13825
14343
  VirtualTreeContentRenderer.prototype.getTranslateY = function (sTop, cHeight, info, isOnenter) {
13826
14344
  if ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
13827
14345
  && !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)) {
@@ -13829,15 +14347,15 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13829
14347
  this.isRemoteExpand = false;
13830
14348
  return this.preTranslate;
13831
14349
  }
13832
- else {
13833
- this.preTranslate = _super.prototype.getTranslateY.call(this, sTop, cHeight, info, isOnenter);
13834
- return _super.prototype.getTranslateY.call(this, sTop, cHeight, info, isOnenter);
13835
- }
13836
- }
13837
- else {
13838
- return _super.prototype.getTranslateY.call(this, sTop, cHeight, info, isOnenter);
14350
+ this.preTranslate = _super.prototype.getTranslateY.call(this, sTop, cHeight, info, isOnenter);
13839
14351
  }
14352
+ return _super.prototype.getTranslateY.call(this, sTop, cHeight, info, isOnenter);
13840
14353
  };
14354
+ /**
14355
+ * Handles the dataBound event to calculate and set the initial row top position for the grid.
14356
+ *
14357
+ * @returns {void}
14358
+ */
13841
14359
  VirtualTreeContentRenderer.prototype.dataBoundEvent = function () {
13842
14360
  var dataBoundEve = 'dataBound';
13843
14361
  var initialRowTop = 'initialRowTop';
@@ -13854,11 +14372,27 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13854
14372
  }
13855
14373
  _super.prototype["" + dataBoundEve].call(this);
13856
14374
  };
14375
+ /**
14376
+ * Handles the row selection event for virtual tree grid rows.
14377
+ * It invokes the base class's rowSelected method and notifies
14378
+ * the parent component about a virtual transformation change.
14379
+ *
14380
+ * @param {RowSelectEventArgs} args - The arguments related to the row selection event.
14381
+ * @returns {void} This method does not return a value.
14382
+ */
13857
14383
  VirtualTreeContentRenderer.prototype.rowSelectedEvent = function (args) {
13858
14384
  var rowSelected = 'rowSelected';
13859
14385
  _super.prototype["" + rowSelected].call(this, args);
13860
14386
  this.parent.notify('virtualTransform', { requestType: 'transformChange' });
13861
14387
  };
14388
+ /**
14389
+ * Handles virtual row selection in TreeGrid.
14390
+ *
14391
+ * @param {Object} args - The argument object containing the selected index.
14392
+ * @param {number} args.selectedIndex - The index of the row to be selected.
14393
+ *
14394
+ * @returns {void}
14395
+ */
13862
14396
  VirtualTreeContentRenderer.prototype.toSelectVirtualRow = function (args) {
13863
14397
  if (this.parent.isEdit) {
13864
14398
  return;
@@ -13881,9 +14415,20 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13881
14415
  _super.prototype["" + selectVirtualRow].call(this, args);
13882
14416
  }
13883
14417
  };
14418
+ /**
14419
+ * Refreshes the cells for the given row object by regenerating them.
14420
+ *
14421
+ * @param {Row<Column>} rowObj - The row object for which the cells need to be refreshed.
14422
+ * @returns {void} This method does not return any value.
14423
+ */
13884
14424
  VirtualTreeContentRenderer.prototype.refreshCell = function (rowObj) {
13885
14425
  rowObj.cells = this.generateCells();
13886
14426
  };
14427
+ /**
14428
+ * Generates an array of cells for each column in the parent.
14429
+ *
14430
+ * @returns {Cell<Column>[]} An array of cells for the corresponding columns.
14431
+ */
13887
14432
  VirtualTreeContentRenderer.prototype.generateCells = function () {
13888
14433
  var cells = [];
13889
14434
  for (var i = 0; i < this.parent.columns.length; i++) {
@@ -13891,6 +14436,18 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13891
14436
  }
13892
14437
  return cells;
13893
14438
  };
14439
+ /**
14440
+ * Generates a cell object with provided column and row configurations.
14441
+ *
14442
+ * @param {Column} col - The Column object which holds the column configuration.
14443
+ * @param {string} [rowId] - An optional string that represents the row ID.
14444
+ * @param {CellType} [cellType] - An optional CellType enum to specify the type of the cell.
14445
+ * @param {number} [colSpan] - An optional number to specify the column span of the cell.
14446
+ * @param {number} [oIndex] - An optional number for the order index of the cell.
14447
+ * @param {Object} [foreignKeyData] - An optional object for foreign key data associated with the column.
14448
+ *
14449
+ * @returns {Cell<Column>} Returns a newly created Cell object of type Column.
14450
+ */
13894
14451
  VirtualTreeContentRenderer.prototype.generateCell = function (col, rowId, cellType, colSpan, oIndex, foreignKeyData) {
13895
14452
  var opt = {
13896
14453
  'visible': col.visible,
@@ -13909,13 +14466,29 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13909
14466
  }
13910
14467
  return new Cell(opt);
13911
14468
  };
14469
+ /**
14470
+ * Begins the edit operation for a specified row in the grid.
14471
+ * Updates the `editedRowIndex` and assigns row data to the event data.
14472
+ *
14473
+ * @param {{ data: Object, index: number }} e - An object containing the row data and index.
14474
+ * @param {Object} e.data - The data of the row to be edited.
14475
+ * @param {number} e.index - The index of the row to be edited.
14476
+ * @returns {void}
14477
+ */
13912
14478
  VirtualTreeContentRenderer.prototype.beginEdit = function (e) {
13913
14479
  this['editedRowIndex'] = e.index;
13914
- var selector = '.e-row[data-rowindex="' + e.index + '"]';
14480
+ var selector = '.e-row[aria-rowindex="' + (e.index + 1) + '"]';
13915
14481
  var index = this.parent.getContent().querySelector(selector).rowIndex;
13916
14482
  var rowData = this.parent.getCurrentViewRecords()[parseInt(index.toString(), 10)];
13917
14483
  e.data = rowData;
13918
14484
  };
14485
+ /**
14486
+ * Begins the process of adding a new row in the tree grid.
14487
+ *
14488
+ * @param {Object} args - The arguments for adding a new row.
14489
+ * @param {boolean} args.startEdit - A flag indicating whether to start editing.
14490
+ * @returns {void}
14491
+ */
13919
14492
  VirtualTreeContentRenderer.prototype.beginAdd = function (args) {
13920
14493
  var addAction = 'addActionBegin';
13921
14494
  var isAdd = 'isAdd';
@@ -13925,8 +14498,8 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13925
14498
  this.addRowIndex = addArgs.addRowIndex;
13926
14499
  this.dataRowIndex = addArgs.dataRowIndex;
13927
14500
  var rows = this.parent.getRows();
13928
- var firstAriaIndex = rows.length ? +rows[0].getAttribute('data-rowindex') : 0;
13929
- var lastAriaIndex = rows.length ? +rows[rows.length - 1].getAttribute('data-rowindex') : 0;
14501
+ var firstAriaIndex = rows.length ? +rows[0].getAttribute('aria-rowindex') - 1 : 0;
14502
+ var lastAriaIndex = rows.length ? +rows[rows.length - 1].getAttribute('aria-rowindex') - 1 : 0;
13930
14503
  var withInRange = this.parent.selectedRowIndex >= firstAriaIndex && this.parent.selectedRowIndex <= lastAriaIndex;
13931
14504
  if (!(this.rowPosition === 'Top' || this.rowPosition === 'Bottom')) {
13932
14505
  this["" + isAdd] = true;
@@ -13936,10 +14509,21 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13936
14509
  _super.prototype["" + addAction].call(this, args);
13937
14510
  }
13938
14511
  };
14512
+ /**
14513
+ * Restores the edit state of the tree grid content. This method calls the
14514
+ * base class method to handle the restoration logic.
14515
+ *
14516
+ * @returns {void} This method does not return any value.
14517
+ */
13939
14518
  VirtualTreeContentRenderer.prototype.restoreEditState = function () {
13940
14519
  var restoreEdit = 'restoreEdit';
13941
14520
  _super.prototype["" + restoreEdit].call(this);
13942
14521
  };
14522
+ /**
14523
+ * Resets the edit state if certain conditions are met.
14524
+ *
14525
+ * @returns {void}
14526
+ */
13943
14527
  VirtualTreeContentRenderer.prototype.resetIseditValue = function () {
13944
14528
  var resetIsEdit = 'resetIsedit';
13945
14529
  var isAdd = 'isAdd';
@@ -13948,6 +14532,12 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13948
14532
  _super.prototype["" + resetIsEdit].call(this);
13949
14533
  }
13950
14534
  };
14535
+ /**
14536
+ * Handles the successful editing operation when virtual scrolling is enabled.
14537
+ * Checks if a row has been added to the tree grid and sets the `recordAdded` flag accordingly.
14538
+ *
14539
+ * @returns {void}
14540
+ */
13951
14541
  VirtualTreeContentRenderer.prototype.virtualEditSuccess = function () {
13952
14542
  var isAdd = 'isAdd';
13953
14543
  var content = this.parent.getContent().querySelector('.e-content');
@@ -13955,14 +14545,33 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13955
14545
  this.recordAdded = true;
13956
14546
  }
13957
14547
  };
14548
+ /**
14549
+ * Cancels the edit operation for the provided data.
14550
+ *
14551
+ * @param {Object} args - The arguments containing the data to cancel edit for.
14552
+ * @param {Object} args.data - The specific data object for which the edit operation needs to be canceled.
14553
+ * @returns {void}
14554
+ */
13958
14555
  VirtualTreeContentRenderer.prototype.cancelEdit = function (args) {
13959
14556
  var editCancel = 'editCancel';
13960
14557
  _super.prototype["" + editCancel].call(this, args);
13961
14558
  };
14559
+ /**
14560
+ * Handles the action of selecting a row when the context menu is opened.
14561
+ *
14562
+ * @param {Object} args - An object containing related parameters.
14563
+ * @param {boolean} args.isOpen - A flag indicating whether the context menu is open.
14564
+ * @returns {void} This method does not return any value.
14565
+ */
13962
14566
  VirtualTreeContentRenderer.prototype.toSelectRowOnContextOpen = function (args) {
13963
14567
  var selectRowOnContextOpen = 'selectRowOnContextOpen';
13964
14568
  _super.prototype["" + selectRowOnContextOpen].call(this, args);
13965
14569
  };
14570
+ /**
14571
+ * Restores a new row in the grid when necessary by adding it back to the content.
14572
+ *
14573
+ * @returns {void} This method does not return any value.
14574
+ */
13966
14575
  VirtualTreeContentRenderer.prototype.restoreNewRow = function () {
13967
14576
  var isAdd = 'isAdd';
13968
14577
  var content = this.parent.getContent().querySelector('.e-content');
@@ -13971,10 +14580,41 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13971
14580
  this.parent.editModule.addRecord(null, this.parent.root.editModule.selectedIndex);
13972
14581
  }
13973
14582
  };
14583
+ /**
14584
+ * Retrieves virtual data for operations like adding or canceling rows in the grid.
14585
+ *
14586
+ * @param {Object} data - An object containing properties to determine the virtual data processing.
14587
+ * @param {Object} data.virtualData - The virtual data object to be processed.
14588
+ * @param {boolean} data.isAdd - A boolean indicating if the operation is an addition.
14589
+ * @param {boolean} data.isCancel - A boolean indicating if the operation is a cancellation.
14590
+ * @returns {void} This method does not return any value.
14591
+ */
13974
14592
  VirtualTreeContentRenderer.prototype.getData = function (data) {
13975
14593
  var getVirtualData = 'getVirtualData';
13976
14594
  _super.prototype["" + getVirtualData].call(this, data);
13977
14595
  };
14596
+ /**
14597
+ * Initiates the beginning of an action within the tree grid component.
14598
+ * This method is invoked before any action is performed, allowing for
14599
+ * any necessary modifications or cancellations of the upcoming action.
14600
+ *
14601
+ * @param {NotifyArgs} args - The arguments associated with the action,
14602
+ * providing context and specifics about what is being commenced.
14603
+ * @returns {void}
14604
+ */
14605
+ VirtualTreeContentRenderer.prototype.handleActionBegin = function (args) {
14606
+ var actionBegin = 'actionBegin';
14607
+ _super.prototype["" + actionBegin].call(this, args);
14608
+ };
14609
+ /**
14610
+ * Handles the completion of various actions, such as adding a new row.
14611
+ * Updates row positions and indexes based on the action completed.
14612
+ *
14613
+ * @param {NotifyArgs} args - An object containing the details of the completed action.
14614
+ * Specifically, it includes the `requestType` which determines the type
14615
+ * of action that was completed.
14616
+ * @returns {void} This method does not return any value.
14617
+ */
13978
14618
  VirtualTreeContentRenderer.prototype.onActionComplete = function (args) {
13979
14619
  if (args.requestType === 'add') {
13980
14620
  var addArgs = { newRowPosition: this.rowPosition, addRowIndex: this.addRowIndex, dataRowIndex: this.dataRowIndex };
@@ -13986,6 +14626,19 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13986
14626
  var actionComplete = 'actionComplete';
13987
14627
  _super.prototype["" + actionComplete].call(this, args);
13988
14628
  };
14629
+ /**
14630
+ * Creates a callback function to be executed during virtual scrolling actions.
14631
+ * This function handles the adjustment of virtual elements and rendering logic,
14632
+ * particularly optimizing for non-IE browsers, wheel events, and virtual masks.
14633
+ *
14634
+ * @returns {Function} A function that handles scrolling and adjusts table rendering.
14635
+ * @param {HTMLElement} element - The HTML element involved in the action.
14636
+ * @param {SentinelType} current - The type of sentinel indicating the scroll.
14637
+ * @param {string} direction - The scroll direction.
14638
+ * @param {Offsets} e - The offset values indicating the current scroll position.
14639
+ * @param {boolean} isWheel - Indicates if the scrolling was initiated by a mouse wheel.
14640
+ * @param {boolean} check - A boolean flag for additional control logic.
14641
+ */
13989
14642
  VirtualTreeContentRenderer.prototype.onEnteredAction = function () {
13990
14643
  var _this = this;
13991
14644
  return function (element, current, direction, e, isWheel, check) {
@@ -14028,8 +14681,17 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
14028
14681
  }
14029
14682
  };
14030
14683
  };
14684
+ /**
14685
+ * Handles scroll events to manage virtual scrolling and row rendering.
14686
+ * Adjusts view information, row indexes, and translates viewport positioning
14687
+ * based on the given scroll arguments.
14688
+ *
14689
+ * @param {ScrollArg} scrollArgs - Contains the scroll offsets, sentinel information, direction of scroll, and other related details.
14690
+ * @returns {void} - No return value. It adjusts scrolling state internally.
14691
+ */
14031
14692
  VirtualTreeContentRenderer.prototype.scrollListeners = function (scrollArgs) {
14032
14693
  this['scrollAfterEdit']();
14694
+ this.shouldPreventScrolling(scrollArgs);
14033
14695
  if (this.parent.root.enablePersistence) {
14034
14696
  this.parent.root.scrollPosition = scrollArgs.offset;
14035
14697
  }
@@ -14049,9 +14711,11 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
14049
14711
  if (upScroll && (scrollArgs.direction !== 'right' && scrollArgs.direction !== 'left') && !isNullOrUndefined(content)) {
14050
14712
  var vHeight = +(this.parent.height.toString().indexOf('%') < 0 ? parseInt(this.parent.height.toString(), 10) :
14051
14713
  this.parent.element.getBoundingClientRect().height);
14052
- var index = (~~(content.scrollTop / rowHeight)
14053
- + Math.ceil(vHeight / rowHeight))
14054
- - this.parent.pageSettings.pageSize;
14714
+ // Calculate the integer number of rows that are scrolled past plus the number of rows that fit within the visible height
14715
+ var scrolledRows = Math.floor(content.scrollTop / rowHeight);
14716
+ var visibleRows = Math.ceil(vHeight / rowHeight);
14717
+ // Calculate the index by subtracting the page size from the total rows taken into account
14718
+ var index = scrolledRows + visibleRows - this.parent.pageSettings.pageSize;
14055
14719
  index = (index > 0) ? index : 0;
14056
14720
  if (!isNullOrUndefined(this["" + selectedRowIndex]) && this["" + selectedRowIndex] !== -1 && index !== this["" + selectedRowIndex] &&
14057
14721
  ((this.parent.rowHeight * this.parent.pageSettings.pageSize) < content.scrollTop) && !this.parent.allowRowDragAndDrop) {
@@ -14128,20 +14792,19 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
14128
14792
  this.parent.selectionModule && this.parent.selectionModule.isRowSelected) {
14129
14793
  this.startIndex = currentViewData[0]["" + indexValue] + (this.parent.pageSettings.pageSize / 2);
14130
14794
  }
14131
- if (this.parent.root.isSelfReference) {
14132
- var selectedIndex = this.parent.root.selectedRowIndex;
14133
- this.startIndex = selectedIndex !== -1 && selectedIndex !== this.startIndex ? this.startIndex - 1 : this.startIndex;
14134
- }
14135
14795
  if (scrollArgs.offset.top > (rowHeight * this.totalRecords)) {
14136
14796
  this.translateY = this.getTranslateY(scrollArgs.offset.top, content.getBoundingClientRect().height);
14137
14797
  }
14138
14798
  else {
14139
14799
  if (this.totalRecords === this.endIndex) {
14140
- if (isLastBlock) {
14141
- this.translateY = (this.totalRecords * rowHeight) - (this.parent.pageSettings.pageSize * rowHeight);
14142
- }
14143
- else {
14144
- this.translateY = (this.totalRecords * rowHeight) - ((this.endIndex - this.startIndex) * rowHeight);
14800
+ if (this.totalRecords === this.endIndex) {
14801
+ if (this.parent.isEdit) {
14802
+ this.translateY = ((this.totalRecords * rowHeight) - (this.parent.pageSettings.pageSize * rowHeight))
14803
+ + rowHeight;
14804
+ }
14805
+ else {
14806
+ this.translateY = (this.totalRecords * rowHeight) - (this.parent.pageSettings.pageSize * rowHeight);
14807
+ }
14145
14808
  }
14146
14809
  }
14147
14810
  else {
@@ -14154,24 +14817,23 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
14154
14817
  }
14155
14818
  }
14156
14819
  }
14157
- if (isRemoteData(this.parent) || ((downScroll && (scrollArgs.offset.top < (rowHeight * this.totalRecords)))
14820
+ if (((downScroll && scrollArgs.direction !== 'up' && (scrollArgs.offset.top < (rowHeight * this.totalRecords)))
14158
14821
  || (upScroll)) || (scrollArgs.direction === 'right' || scrollArgs.direction === 'left') ||
14159
14822
  ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
14160
14823
  && !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') && (downScroll || upScroll) || isCountRequired(this.parent))) {
14161
14824
  var viewInfo = this.currentInfo = getValue('getInfoFromView', this).apply(this, [scrollArgs.direction, info, scrollArgs.offset]);
14162
14825
  this.previousInfo = viewInfo;
14163
- if (this.prevInfo && ((info.axis === 'Y' && this.prevInfo.blockIndexes.toString() === viewInfo.blockIndexes.toString())
14826
+ if (this.prevInfo && viewInfo.event !== 'refresh-virtual-block' && ((info.axis === 'Y' && this.prevInfo.blockIndexes.toString() === viewInfo.blockIndexes.toString())
14164
14827
  || ((info.axis === 'X' && this.prevInfo.columnIndexes.toString() === viewInfo.columnIndexes.toString())
14165
14828
  || (this.parent.isFrozenGrid() && this.parent.getVisibleFrozenLeftCount() >= viewInfo.columnIndexes[0]
14166
14829
  && this.prevInfo.columnIndexes.toString().includes(viewInfo.columnIndexes.toString()))))) {
14167
14830
  this.parent.removeMaskRow();
14168
- this.parent.notify('removeGanttShimmer', { requestType: 'hideShimmer' });
14169
14831
  if (Browser.isIE) {
14170
14832
  this.parent.hideSpinner();
14171
14833
  }
14172
14834
  this.requestType = this.requestType === 'virtualscroll' ? this['empty'] : this.requestType;
14173
14835
  if (info.axis === 'Y') {
14174
- this['restoreEdit']();
14836
+ this.restoreEditState();
14175
14837
  }
14176
14838
  return;
14177
14839
  }
@@ -14199,9 +14861,32 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
14199
14861
  }
14200
14862
  }
14201
14863
  };
14864
+ /**
14865
+ * Prevents scrolling under specific conditions related to adding a new row.
14866
+ *
14867
+ * @param {ScrollArg} scrollArgs - The scroll event arguments containing offset details.
14868
+ * @returns {void}
14869
+ */
14870
+ VirtualTreeContentRenderer.prototype.shouldPreventScrolling = function (scrollArgs) {
14871
+ var addedRow = this.parent.element.querySelector('.e-addedrow');
14872
+ if (addedRow && this.rowPosition !== 'Top' && this.rowPosition !== 'Bottom' && scrollArgs.offset.top !== 0) {
14873
+ this.parent.closeEdit();
14874
+ return;
14875
+ }
14876
+ };
14877
+ /**
14878
+ * Appends content to the target element. Handles dynamic adjustments for remote data sources,
14879
+ * frozen columns, and virtual scrolling.
14880
+ *
14881
+ * @param {HTMLElement} target - The target HTML element where content is to be appended.
14882
+ * @param {DocumentFragment} newChild - The new content as a DocumentFragment to append.
14883
+ * @param {NotifyArgs} e - Object containing information about the operation.
14884
+ * @returns {void}
14885
+ */
14202
14886
  VirtualTreeContentRenderer.prototype.appendContent = function (target, newChild, e) {
14203
14887
  if ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
14204
- && !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent) || isRemoteData(this.parent)) {
14888
+ && !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)
14889
+ || (this.parent.isFrozenGrid() && (e.requestType === undefined || !isNullOrUndefined(e.virtualInfo) && (e.virtualInfo.direction === 'right' || e.virtualInfo.direction === 'left')))) {
14205
14890
  if (getValue('isExpandCollapse', e)) {
14206
14891
  this.isRemoteExpand = true;
14207
14892
  }
@@ -14229,6 +14914,9 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
14229
14914
  target.appendChild(newChild);
14230
14915
  var replace = 'replaceWith';
14231
14916
  this.getTable().querySelector('tbody')["" + replace](target);
14917
+ if (e.requestType === 'virtualscroll' && e.virtualInfo.sentinelInfo.axis === 'Y') {
14918
+ this.isExpandCollapse = false;
14919
+ }
14232
14920
  if (!this.isExpandCollapse || this.translateY === 0) {
14233
14921
  this.translateY = this.translateY < 0 ? 0 : this.translateY;
14234
14922
  getValue('virtualEle', this).adjustTable(cOffset, this.translateY);
@@ -14261,6 +14949,12 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
14261
14949
  _super.prototype["" + ensureSelectedRowPosition].call(this);
14262
14950
  }
14263
14951
  };
14952
+ /**
14953
+ * Unsubscribes all event listeners to prevent memory leaks.
14954
+ * This method is called when the component is being destroyed or when event listeners need to be cleaned up.
14955
+ *
14956
+ * @returns {void}
14957
+ */
14264
14958
  VirtualTreeContentRenderer.prototype.removeEventListener = function () {
14265
14959
  if (this.parent.isDestroyed) {
14266
14960
  return;
@@ -14281,6 +14975,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
14281
14975
  this.parent.off('select-row-on-context-open', this.toSelectRowOnContextOpen);
14282
14976
  this.parent.off('refresh-virtual-editform-cells', this.refreshCell);
14283
14977
  this.parent.off('virtaul-cell-focus', this.cellFocus);
14978
+ this.parent.off('virtual-scroll-edit', this.restoreEditState);
14284
14979
  };
14285
14980
  return VirtualTreeContentRenderer;
14286
14981
  }(VirtualContentRenderer));
@@ -14294,6 +14989,15 @@ var TreeInterSectionObserver = /** @__PURE__ @class */ (function (_super) {
14294
14989
  _this.timer = 0;
14295
14990
  return _this;
14296
14991
  }
14992
+ /**
14993
+ * Sets up observers to monitor scroll events on a given container
14994
+ * and its movable companion within a virtual grid setup.
14995
+ *
14996
+ * @param {Function} callback - Function to call when a scroll event is detected.
14997
+ * @param {Function} onEnterCallback - Function to call when a specific event, like entering a region, is detected.
14998
+ * @param {IGrid} instance - The grid instance that requires observation.
14999
+ * @returns {void}
15000
+ */
14297
15001
  TreeInterSectionObserver.prototype.observes = function (callback, onEnterCallback, instance) {
14298
15002
  var containerRect = 'containerRect';
14299
15003
  _super.prototype["" + containerRect] = getValue('options', this).container.getBoundingClientRect();
@@ -14304,9 +15008,23 @@ var TreeInterSectionObserver = /** @__PURE__ @class */ (function (_super) {
14304
15008
  EventHandler.add(getValue('options', this).movableContainer, 'scroll', this.virtualScrollHandlers(callback, onEnterCallback, instance), this);
14305
15009
  }
14306
15010
  };
15011
+ /**
15012
+ * Clears the last known position.
15013
+ *
15014
+ * @returns {void} No value is returned from this function.
15015
+ */
14307
15016
  TreeInterSectionObserver.prototype.clear = function () {
14308
15017
  this.lastPos = null;
14309
15018
  };
15019
+ /**
15020
+ * Handles virtual scrolling events and manages scroll direction and debouncing for rendering updates.
15021
+ *
15022
+ * @private
15023
+ * @param {Function} callback - Function to call on scroll end.
15024
+ * @param {Function} onEnterCallback - Function to call on entering a virtual scrolling area.
15025
+ * @param {IGrid} instance - The grid instance on which virtual scrolling is being implemented.
15026
+ * @returns {Function} - A function that processes scroll events.
15027
+ */
14310
15028
  TreeInterSectionObserver.prototype.virtualScrollHandlers = function (callback, onEnterCallback, instance) {
14311
15029
  var _this = this;
14312
15030
  var delay = Browser.info.name === 'chrome' ? 200 : 100;
@@ -14417,9 +15135,6 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
14417
15135
  Grid.Inject(TreeVirtual);
14418
15136
  this.addEventListener();
14419
15137
  }
14420
- VirtualScroll.prototype.returnVisualData = function (args) {
14421
- args.data = this.visualData;
14422
- };
14423
15138
  /**
14424
15139
  * For internal use only - Get the module name.
14425
15140
  *
@@ -14453,28 +15168,58 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
14453
15168
  this.parent.off(pagingActions, this.virtualPageAction);
14454
15169
  this.parent.off(destroy, this.destroy);
14455
15170
  };
15171
+ /**
15172
+ * Handles the virtual child collapse or expand action in a tree grid.
15173
+ *
15174
+ * @param {object} row - Object containing information about the collapse/expand action.
15175
+ * @param {string} row.action - The type of action, either "collapse" or "expand".
15176
+ * @param {HTMLTableRowElement} row.row - The HTML row element that is affected by the action.
15177
+ * @param {ITreeData} row.record - The tree data record associated with the row.
15178
+ * @param {RowCollapsedEventArgs} row.args - Additional event arguments related to the row collapse or expand.
15179
+ *
15180
+ * @returns {void} No return value as the function executes a procedure.
15181
+ */
14456
15182
  VirtualScroll.prototype.collapseExpandVirtualchilds = function (row) {
14457
15183
  this.parent.grid.notify(virtualActionArgs, { isExpandCollapse: true });
14458
15184
  this.expandCollapseRec = row.record;
14459
15185
  row.record.expanded = row.action === 'collapse' ? false : true;
14460
- var ret = {
15186
+ this.parent.flatData.map(function (e) { return e.expanded = e.uniqueID === row.record.uniqueID &&
15187
+ e.expanded !== row.record.expanded ? row.record.expanded : e.expanded; });
15188
+ var actionDetails = {
14461
15189
  result: this.parent.flatData,
14462
15190
  row: row.row,
14463
15191
  action: row.action,
14464
15192
  record: row.record,
14465
15193
  count: this.parent.flatData.length
14466
15194
  };
14467
- if (this.parent.enableVirtualization && this.parent.selectionSettings.mode === 'Cell' ||
14468
- this.parent.selectionSettings.mode === 'Row' && !this.parent.selectionSettings.persistSelection) {
15195
+ this.handleSelection();
15196
+ var requestType = getValue('isCollapseAll', this.parent) ? 'collapseAll' : 'refresh';
15197
+ getValue('grid.renderModule', this.parent).dataManagerSuccess(actionDetails, { requestType: requestType });
15198
+ };
15199
+ /**
15200
+ * Handles selection logic for the TreeGrid component.
15201
+ *
15202
+ * @returns {void}
15203
+ */
15204
+ VirtualScroll.prototype.handleSelection = function () {
15205
+ if ((this.parent.selectionSettings.mode === 'Cell' ||
15206
+ (this.parent.selectionSettings.mode === 'Row' && !this.parent.selectionSettings.persistSelection))) {
14469
15207
  this.parent.grid.clearSelection();
14470
15208
  }
14471
15209
  if (getValue('isCollapseAll', this.parent) && this.parent.selectionSettings.persistSelection && this.parent.getSelectedRecords().length > 0) {
14472
15210
  this.prevSelectedRecord = this.parent.getSelectedRecords();
14473
15211
  this.parent.grid.clearSelection();
14474
15212
  }
14475
- var requestType = getValue('isCollapseAll', this.parent) ? 'collapseAll' : 'refresh';
14476
- getValue('grid.renderModule', this.parent).dataManagerSuccess(ret, { requestType: requestType });
14477
15213
  };
15214
+ /**
15215
+ * Handles the action related to virtual scrolling with paging details.
15216
+ *
15217
+ * @param {Object} pageingDetails - Contains the result data, count of results, and action arguments.
15218
+ * @param {ITreeData[]} pageingDetails.result - The result data to be handled.
15219
+ * @param {number} pageingDetails.count - The count of results.
15220
+ * @param {ActionEventArgs} pageingDetails.actionArgs - The action arguments related to the virtual page action.
15221
+ * @returns {void}
15222
+ */
14478
15223
  VirtualScroll.prototype.virtualPageAction = function (pageingDetails) {
14479
15224
  var _this = this;
14480
15225
  var dm = new DataManager(pageingDetails.result);
@@ -14505,7 +15250,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
14505
15250
  if (requestType === 'filtering' || requestType === 'collapseAll' || requestType === 'searching' || (requestType === 'refresh' && getValue('isExpandAll', this.parent)) ||
14506
15251
  (requestType === 'refresh' && this.parent.enableCollapseAll && endIndex > visualData.length && isNullOrUndefined(this.expandCollapseRec))) {
14507
15252
  startIndex = 0;
14508
- endIndex = this.parent.grid.pageSettings.pageSize - 1;
15253
+ endIndex = this.parent.grid.pageSettings.pageSize;
14509
15254
  this.parent.grid.getContent().firstElementChild.scrollTop = 0;
14510
15255
  this.parent.grid.notify(virtualActionArgs, { setTop: true });
14511
15256
  }
@@ -14545,10 +15290,9 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
14545
15290
  sIndex = sIndex > 0 ? sIndex : 0;
14546
15291
  endIndex = visualData.length;
14547
15292
  if (endIndex - startIndex < resourceCount) {
14548
- var newRowsCount = sIndex - startIndex;
14549
15293
  startIndex = sIndex;
14550
15294
  if (visualData.indexOf(this.expandCollapseRec) > visualData.length - resourceCount / 2) {
14551
- var newTranslateY = translateY + (newRowsCount * this.parent.grid.getRowHeight());
15295
+ var newTranslateY = startIndex * this.parent.grid.getRowHeight();
14552
15296
  this.parent.grid.contentModule['translateY'] = newTranslateY;
14553
15297
  this.parent.grid.contentModule.virtualEle.adjustTable(0, newTranslateY);
14554
15298
  }
@@ -14571,7 +15315,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
14571
15315
  if (pageingDetails.count < this.parent.getRows()[0].getBoundingClientRect().height) {
14572
15316
  startIndex = 0;
14573
15317
  }
14574
- else if (!this.parent['isExpandAll']) {
15318
+ else if (!this.parent['isExpandAll'] && this.parent.grid.contentModule['translateY'] === 0) {
14575
15319
  startIndex = this.prevstartIndex === -1 ? 0 : this.prevstartIndex;
14576
15320
  }
14577
15321
  }
@@ -14598,6 +15342,26 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
14598
15342
  VirtualScroll.prototype.destroy = function () {
14599
15343
  this.removeEventListener();
14600
15344
  };
15345
+ /**
15346
+ * Updates the row selection when the header checkbox is clicked and the number of selected rows
15347
+ * does not match the current view data length.
15348
+ *
15349
+ * @param {RowDeselectEventArgs} args - The arguments containing details of the row deselection event.
15350
+ * @returns {void} - This method does not return a value.
15351
+ */
15352
+ VirtualScroll.prototype.updateSelection = function (args) {
15353
+ if (args.isHeaderCheckboxClicked &&
15354
+ this.parent.grid.currentViewData.length !== this.parent.grid.selectionModule.selectedRowIndexes.length) {
15355
+ var updateRowSelection = 'updateRowSelection';
15356
+ for (var i = 0; i < this.parent.getRows().length; i++) {
15357
+ if (this.parent.getRows()[parseInt(i.toString(), 10)].getElementsByClassName('e-frame e-icons e-uncheck').length) {
15358
+ this.parent.grid.selectionModule["" + updateRowSelection](this.parent.getRows()[parseInt(i.toString(), 10)],
15359
+ // eslint-disable-next-line max-len
15360
+ this.parent.getCurrentViewRecords()[parseInt(i.toString(), 10)].index);
15361
+ }
15362
+ }
15363
+ }
15364
+ };
14601
15365
  return VirtualScroll;
14602
15366
  }());
14603
15367
  var TreeVirtual = /** @__PURE__ @class */ (function (_super) {
@@ -15096,5 +15860,5 @@ var InfiniteScroll = /** @__PURE__ @class */ (function () {
15096
15860
  return InfiniteScroll;
15097
15861
  }());
15098
15862
 
15099
- export { Aggregate, AggregateColumn, AggregateRow, Column, ColumnChooser, ColumnMenu, CommandColumn, ContextMenu, ContextMenuItems, DataManipulation, DetailRow, Edit, EditSettings, ExcelExport, Filter, FilterSettings, Freeze, InfiniteScroll, InfiniteScrollSettings, LoadingIndicator, Logger, Page, PageSettings, PdfExport, Predicate, Render, Reorder, Resize, RowDD, RowDropSettings, SearchSettings, Selection, SelectionSettings, Sort, SortDescriptor, SortSettings, StackedColumn, Toolbar, ToolbarItem, TreeClipboard, TreeGrid, TreeGridColumn, TreeVirtual, TreeVirtualRowModelGenerator, VirtualScroll, actionBegin, actionComplete, actionFailure, ariaColIndex, ariaRowIndex, autoCol, batchAdd, batchCancel, batchDelete, batchEditFormRendered, batchSave, beforeBatchAdd, beforeBatchCancel, beforeBatchDelete, beforeBatchSave, beforeCopy, beforeDataBound, beforeExcelExport, beforePaste, beforePdfExport, beforeStartEdit, beginAdd, beginEdit, cellEdit, cellSave, cellSaved, checkboxChange, collapsed, collapsing, content, contextMenuClick, contextMenuOpen, crudAction, dataBound, dataColIndex, dataListener, dataRowIndex, dataStateChange, destroy, detailDataBound, doubleTap, expanded, expanding, extendArray, findChildrenRecords, findParentRecords, frozenContent, frozenHeader, frozenLeft, frozenRight, getExpandStatus, getParentData, getPlainData, headerContent, indexModifier, isCheckboxcolumn, isCountRequired, isFilterChildHierarchy, isHidden, isOffline, isRemoteData, keyPressed, leftRight, load, localPagedExpandCollapse, movableContent, movableHeader, pagingActions, printGridInit, queryCellInfo, recordDoubleClick, remoteExpand, resizeStop, rowDataBound, rowDeselected, rowDeselecting, rowDrag, rowDragStart, rowDragStartHelper, rowDrop, rowDropped, rowSelected, rowSelecting, rowdraging, rowsAdd, rowsRemove, savePreviousRowPosition, table, toolbarClick, treeGridDetails, updateData, virtualActionArgs, virtualColumnIndex };
15863
+ export { Aggregate, AggregateColumn, AggregateRow, Column, ColumnChooser, ColumnMenu, CommandColumn, ContextMenu, ContextMenuItems, DataManipulation, DetailRow, Edit, EditSettings, ExcelExport, Filter, FilterSettings, Freeze, InfiniteScroll, InfiniteScrollSettings, LoadingIndicator, Logger, Page, PageSettings, PdfExport, Predicate, Render, Reorder, Resize, RowDD, RowDropSettings, SearchSettings, Selection, SelectionSettings, Sort, SortDescriptor, SortSettings, StackedColumn, Toolbar, ToolbarItem, TreeClipboard, TreeGrid, TreeGridColumn, TreeVirtual, TreeVirtualRowModelGenerator, VirtualScroll, actionBegin, actionComplete, actionFailure, ariaColIndex, ariaRowIndex, autoCol, batchAdd, batchCancel, batchDelete, batchEditFormRendered, batchSave, beforeBatchAdd, beforeBatchCancel, beforeBatchDelete, beforeBatchSave, beforeCopy, beforeDataBound, beforeExcelExport, beforePaste, beforePdfExport, beforeStartEdit, beginAdd, beginEdit, cellEdit, cellSave, cellSaved, checkboxChange, collapsed, collapsing, content, contextMenuClick, contextMenuOpen, crudAction, dataBound, dataListener, dataStateChange, destroy, detailDataBound, doubleTap, expanded, expanding, extendArray, findChildrenRecords, findParentRecords, frozenContent, frozenHeader, frozenLeft, frozenRight, getExpandStatus, getParentData, getPlainData, headerContent, indexModifier, isCheckboxcolumn, isCountRequired, isFilterChildHierarchy, isHidden, isOffline, isRemoteData, keyPressed, leftRight, load, localPagedExpandCollapse, movableContent, movableHeader, pagingActions, printGridInit, queryCellInfo, recordDoubleClick, remoteExpand, resizeStop, rowDataBound, rowDeselected, rowDeselecting, rowDrag, rowDragStart, rowDragStartHelper, rowDrop, rowDropped, rowSelected, rowSelecting, rowdraging, rowsAdd, rowsRemove, savePreviousRowPosition, table, toolbarClick, treeGridDetails, updateData, virtualActionArgs, virtualColumnIndex };
15100
15864
  //# sourceMappingURL=ej2-treegrid.es5.js.map