@syncfusion/ej2-treegrid 34.2.8 → 35.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 (228) hide show
  1. package/README.md +16 -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 +1028 -588
  6. package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
  7. package/dist/es6/ej2-treegrid.es5.js +1120 -608
  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 +5 -5
  13. package/src/global.js +1 -1
  14. package/src/treegrid/actions/crud-actions.js +4 -9
  15. package/src/treegrid/actions/dom-virtualization.d.ts +66 -0
  16. package/src/treegrid/actions/dom-virtualization.js +240 -0
  17. package/src/treegrid/actions/edit.d.ts +1 -4
  18. package/src/treegrid/actions/edit.js +23 -191
  19. package/src/treegrid/actions/filter.js +1 -1
  20. package/src/treegrid/actions/index.d.ts +1 -0
  21. package/src/treegrid/actions/index.js +1 -0
  22. package/src/treegrid/actions/page.js +12 -6
  23. package/src/treegrid/actions/rowdragdrop.js +20 -1
  24. package/src/treegrid/actions/selection.d.ts +21 -0
  25. package/src/treegrid/actions/selection.js +197 -31
  26. package/src/treegrid/actions/toolbar.js +8 -5
  27. package/src/treegrid/base/constant.d.ts +4 -0
  28. package/src/treegrid/base/constant.js +4 -0
  29. package/src/treegrid/base/data.d.ts +17 -0
  30. package/src/treegrid/base/data.js +189 -132
  31. package/src/treegrid/base/treegrid-model.d.ts +35 -4
  32. package/src/treegrid/base/treegrid.d.ts +43 -7
  33. package/src/treegrid/base/treegrid.js +181 -73
  34. package/src/treegrid/enum.d.ts +12 -0
  35. package/src/treegrid/models/column.d.ts +2 -2
  36. package/src/treegrid/models/dom-virtualization-settings-model.d.ts +50 -0
  37. package/src/treegrid/models/dom-virtualization-settings.d.ts +43 -0
  38. package/src/treegrid/models/dom-virtualization-settings.js +47 -0
  39. package/src/treegrid/models/index.d.ts +2 -0
  40. package/src/treegrid/models/index.js +1 -0
  41. package/src/treegrid/models/summary-model.d.ts +1 -1
  42. package/src/treegrid/models/summary.d.ts +1 -1
  43. package/src/treegrid/renderer/dom-virtual-tree-content-renderer.d.ts +20 -0
  44. package/src/treegrid/renderer/dom-virtual-tree-content-renderer.js +49 -0
  45. package/src/treegrid/renderer/index.d.ts +1 -0
  46. package/src/treegrid/renderer/index.js +1 -0
  47. package/src/treegrid/renderer/render.js +4 -3
  48. package/src/treegrid/renderer/virtual-tree-content-render.js +1 -2
  49. package/helpers/e2e/index.d.ts +0 -1
  50. package/helpers/e2e/index.js +0 -8
  51. package/helpers/e2e/treegridhelper.d.ts +0 -21
  52. package/helpers/e2e/treegridhelper.js +0 -83
  53. package/styles/bds-lite.css +0 -402
  54. package/styles/bds-lite.scss +0 -3
  55. package/styles/bds.css +0 -422
  56. package/styles/bds.scss +0 -4
  57. package/styles/bootstrap-dark-lite.css +0 -406
  58. package/styles/bootstrap-dark-lite.scss +0 -3
  59. package/styles/bootstrap-dark.css +0 -426
  60. package/styles/bootstrap-dark.scss +0 -4
  61. package/styles/bootstrap-lite.css +0 -409
  62. package/styles/bootstrap-lite.scss +0 -3
  63. package/styles/bootstrap.css +0 -432
  64. package/styles/bootstrap.scss +0 -4
  65. package/styles/bootstrap4-lite.css +0 -406
  66. package/styles/bootstrap4-lite.scss +0 -3
  67. package/styles/bootstrap4.css +0 -426
  68. package/styles/bootstrap4.scss +0 -4
  69. package/styles/bootstrap5-dark-lite.css +0 -406
  70. package/styles/bootstrap5-dark-lite.scss +0 -3
  71. package/styles/bootstrap5-dark.css +0 -426
  72. package/styles/bootstrap5-dark.scss +0 -4
  73. package/styles/bootstrap5-lite.css +0 -406
  74. package/styles/bootstrap5-lite.scss +0 -3
  75. package/styles/bootstrap5.3-lite.css +0 -490
  76. package/styles/bootstrap5.3-lite.scss +0 -3
  77. package/styles/bootstrap5.3.css +0 -510
  78. package/styles/bootstrap5.3.scss +0 -4
  79. package/styles/bootstrap5.css +0 -426
  80. package/styles/bootstrap5.scss +0 -4
  81. package/styles/fabric-dark-lite.css +0 -409
  82. package/styles/fabric-dark-lite.scss +0 -3
  83. package/styles/fabric-dark.css +0 -432
  84. package/styles/fabric-dark.scss +0 -4
  85. package/styles/fabric-lite.css +0 -409
  86. package/styles/fabric-lite.scss +0 -3
  87. package/styles/fabric.css +0 -432
  88. package/styles/fabric.scss +0 -4
  89. package/styles/fluent-dark-lite.css +0 -417
  90. package/styles/fluent-dark-lite.scss +0 -3
  91. package/styles/fluent-dark.css +0 -444
  92. package/styles/fluent-dark.scss +0 -4
  93. package/styles/fluent-lite.css +0 -417
  94. package/styles/fluent-lite.scss +0 -3
  95. package/styles/fluent.css +0 -444
  96. package/styles/fluent.scss +0 -4
  97. package/styles/fluent2-lite.css +0 -507
  98. package/styles/fluent2-lite.scss +0 -3
  99. package/styles/fluent2.css +0 -531
  100. package/styles/fluent2.scss +0 -4
  101. package/styles/highcontrast-light-lite.css +0 -406
  102. package/styles/highcontrast-light-lite.scss +0 -3
  103. package/styles/highcontrast-light.css +0 -426
  104. package/styles/highcontrast-light.scss +0 -4
  105. package/styles/highcontrast-lite.css +0 -413
  106. package/styles/highcontrast-lite.scss +0 -3
  107. package/styles/highcontrast.css +0 -439
  108. package/styles/highcontrast.scss +0 -4
  109. package/styles/material-dark-lite.css +0 -406
  110. package/styles/material-dark-lite.scss +0 -3
  111. package/styles/material-dark.css +0 -426
  112. package/styles/material-dark.scss +0 -4
  113. package/styles/material-lite.css +0 -406
  114. package/styles/material-lite.scss +0 -3
  115. package/styles/material.css +0 -426
  116. package/styles/material.scss +0 -4
  117. package/styles/material3-dark-lite.css +0 -488
  118. package/styles/material3-dark-lite.scss +0 -3
  119. package/styles/material3-dark.css +0 -508
  120. package/styles/material3-dark.scss +0 -4
  121. package/styles/material3-lite.css +0 -490
  122. package/styles/material3-lite.scss +0 -3
  123. package/styles/material3.css +0 -510
  124. package/styles/material3.scss +0 -4
  125. package/styles/tailwind-dark-lite.css +0 -406
  126. package/styles/tailwind-dark-lite.scss +0 -3
  127. package/styles/tailwind-dark.css +0 -426
  128. package/styles/tailwind-dark.scss +0 -4
  129. package/styles/tailwind-lite.css +0 -406
  130. package/styles/tailwind-lite.scss +0 -3
  131. package/styles/tailwind.css +0 -426
  132. package/styles/tailwind.scss +0 -4
  133. package/styles/tailwind3-lite.css +0 -480
  134. package/styles/tailwind3-lite.scss +0 -3
  135. package/styles/tailwind3.css +0 -500
  136. package/styles/tailwind3.scss +0 -4
  137. package/styles/treegrid/_all.scss +0 -2
  138. package/styles/treegrid/_bds-definition.scss +0 -28
  139. package/styles/treegrid/_bigger.scss +0 -70
  140. package/styles/treegrid/_bootstrap-dark-definition.scss +0 -33
  141. package/styles/treegrid/_bootstrap-definition.scss +0 -33
  142. package/styles/treegrid/_bootstrap4-definition.scss +0 -33
  143. package/styles/treegrid/_bootstrap5-dark-definition.scss +0 -28
  144. package/styles/treegrid/_bootstrap5-definition.scss +0 -28
  145. package/styles/treegrid/_bootstrap5.3-definition.scss +0 -28
  146. package/styles/treegrid/_fabric-dark-definition.scss +0 -33
  147. package/styles/treegrid/_fabric-definition.scss +0 -33
  148. package/styles/treegrid/_fluent-dark-definition.scss +0 -29
  149. package/styles/treegrid/_fluent-definition.scss +0 -29
  150. package/styles/treegrid/_fluent2-definition.scss +0 -28
  151. package/styles/treegrid/_fusionnew-definition.scss +0 -26
  152. package/styles/treegrid/_highcontrast-definition.scss +0 -33
  153. package/styles/treegrid/_highcontrast-light-definition.scss +0 -33
  154. package/styles/treegrid/_icons.scss +0 -47
  155. package/styles/treegrid/_layout.scss +0 -531
  156. package/styles/treegrid/_material-dark-definition.scss +0 -33
  157. package/styles/treegrid/_material-definition.scss +0 -33
  158. package/styles/treegrid/_material3-dark-definition.scss +0 -28
  159. package/styles/treegrid/_material3-definition.scss +0 -28
  160. package/styles/treegrid/_tailwind-dark-definition.scss +0 -28
  161. package/styles/treegrid/_tailwind-definition.scss +0 -28
  162. package/styles/treegrid/_tailwind3-definition.scss +0 -28
  163. package/styles/treegrid/_theme.scss +0 -1
  164. package/styles/treegrid/_variables.scss +0 -2
  165. package/styles/treegrid/bds.css +0 -422
  166. package/styles/treegrid/bds.scss +0 -4
  167. package/styles/treegrid/bootstrap-dark.css +0 -426
  168. package/styles/treegrid/bootstrap-dark.scss +0 -4
  169. package/styles/treegrid/bootstrap.css +0 -432
  170. package/styles/treegrid/bootstrap.scss +0 -4
  171. package/styles/treegrid/bootstrap4.css +0 -426
  172. package/styles/treegrid/bootstrap4.scss +0 -4
  173. package/styles/treegrid/bootstrap5-dark.css +0 -426
  174. package/styles/treegrid/bootstrap5-dark.scss +0 -4
  175. package/styles/treegrid/bootstrap5.3.css +0 -510
  176. package/styles/treegrid/bootstrap5.3.scss +0 -4
  177. package/styles/treegrid/bootstrap5.css +0 -426
  178. package/styles/treegrid/bootstrap5.scss +0 -4
  179. package/styles/treegrid/fabric-dark.css +0 -432
  180. package/styles/treegrid/fabric-dark.scss +0 -4
  181. package/styles/treegrid/fabric.css +0 -432
  182. package/styles/treegrid/fabric.scss +0 -4
  183. package/styles/treegrid/fluent-dark.css +0 -444
  184. package/styles/treegrid/fluent-dark.scss +0 -4
  185. package/styles/treegrid/fluent.css +0 -444
  186. package/styles/treegrid/fluent.scss +0 -4
  187. package/styles/treegrid/fluent2.css +0 -531
  188. package/styles/treegrid/fluent2.scss +0 -4
  189. package/styles/treegrid/highcontrast-light.css +0 -426
  190. package/styles/treegrid/highcontrast-light.scss +0 -4
  191. package/styles/treegrid/highcontrast.css +0 -439
  192. package/styles/treegrid/highcontrast.scss +0 -4
  193. package/styles/treegrid/icons/_bds.scss +0 -38
  194. package/styles/treegrid/icons/_bootstrap-dark.scss +0 -48
  195. package/styles/treegrid/icons/_bootstrap.scss +0 -48
  196. package/styles/treegrid/icons/_bootstrap4.scss +0 -48
  197. package/styles/treegrid/icons/_bootstrap5-dark.scss +0 -1
  198. package/styles/treegrid/icons/_bootstrap5.3.scss +0 -48
  199. package/styles/treegrid/icons/_bootstrap5.scss +0 -48
  200. package/styles/treegrid/icons/_fabric-dark.scss +0 -48
  201. package/styles/treegrid/icons/_fabric.scss +0 -48
  202. package/styles/treegrid/icons/_fluent-dark.scss +0 -1
  203. package/styles/treegrid/icons/_fluent.scss +0 -48
  204. package/styles/treegrid/icons/_fluent2.scss +0 -48
  205. package/styles/treegrid/icons/_fusionnew.scss +0 -31
  206. package/styles/treegrid/icons/_highcontrast-light.scss +0 -48
  207. package/styles/treegrid/icons/_highcontrast.scss +0 -48
  208. package/styles/treegrid/icons/_material-dark.scss +0 -48
  209. package/styles/treegrid/icons/_material.scss +0 -48
  210. package/styles/treegrid/icons/_material3-dark.scss +0 -1
  211. package/styles/treegrid/icons/_material3.scss +0 -48
  212. package/styles/treegrid/icons/_tailwind-dark.scss +0 -48
  213. package/styles/treegrid/icons/_tailwind.scss +0 -48
  214. package/styles/treegrid/icons/_tailwind3.scss +0 -48
  215. package/styles/treegrid/material-dark.css +0 -426
  216. package/styles/treegrid/material-dark.scss +0 -4
  217. package/styles/treegrid/material.css +0 -426
  218. package/styles/treegrid/material.scss +0 -4
  219. package/styles/treegrid/material3-dark.css +0 -508
  220. package/styles/treegrid/material3-dark.scss +0 -4
  221. package/styles/treegrid/material3.css +0 -510
  222. package/styles/treegrid/material3.scss +0 -4
  223. package/styles/treegrid/tailwind-dark.css +0 -426
  224. package/styles/treegrid/tailwind-dark.scss +0 -4
  225. package/styles/treegrid/tailwind.css +0 -426
  226. package/styles/treegrid/tailwind.scss +0 -4
  227. package/styles/treegrid/tailwind3.css +0 -500
  228. package/styles/treegrid/tailwind3.scss +0 -4
@@ -1,5 +1,5 @@
1
1
  import { Property, merge, ChildProperty, Collection, isNullOrUndefined, Browser, removeClass, initializeTelemetryFeature, addClass, getValue, createElement, setValue, extend as extend$1, Internationalization, getEnumValue, compile, Component, initializeTelemetry, L10n, EventHandler, KeyboardEvents, SanitizeHtmlHelper, Complex, Event, NotifyPropertyChanges, closest, setStyleAttribute, select, classList, debounce, remove } from '@syncfusion/ej2-base';
2
- import { Grid, Logger as Logger$1, detailLists, Clipboard, getObject, parentsUntil, Print as Print$1, templateCompiler, appendChildren, extend, CellRenderer, getUid, CellType, Freeze as Freeze$1, getNumberFormat, setEnableSeamlessScrolling, getActualProperties, iterateArrayOrObject, RowDropSettings as RowDropSettings$1, Reorder as Reorder$1, Resize as Resize$1, Scroll, RowDD as RowDD$1, VirtualRowModelGenerator, Filter as Filter$1, Data, ExportHelper, ExcelExport as ExcelExport$1, PdfExport as PdfExport$1, Page as Page$1, Toolbar as Toolbar$1, calculateAggregate, Aggregate as Aggregate$1, Sort as Sort$1, ColumnMenu as ColumnMenu$1, ContextMenu as ContextMenu$1, resetRowIndex, Edit as Edit$1, CommandColumn as CommandColumn$1, DetailRow as DetailRow$1, Cell, getVisiblePage, VirtualContentRenderer, InterSectionObserver, getTransformValues, RenderType, VirtualHeaderRenderer, VirtualScroll as VirtualScroll$1, ColumnChooser as ColumnChooser$1, getRowIndexFromElement, RowRenderer, InfiniteScroll as InfiniteScroll$1 } from '@syncfusion/ej2-grids';
2
+ import { Grid, Logger as Logger$1, detailLists, Clipboard, getObject, parentsUntil, Print as Print$1, templateCompiler, appendChildren, extend, CellRenderer, getUid, CellType, Freeze as Freeze$1, getNumberFormat, setEnableSeamlessScrolling, getActualProperties, iterateArrayOrObject, RowDropSettings as RowDropSettings$1, Reorder as Reorder$1, Resize as Resize$1, Scroll, RowDD as RowDD$1, VirtualRowModelGenerator, DomVirtualContentRenderer, Filter as Filter$1, Data, ExportHelper, ExcelExport as ExcelExport$1, PdfExport as PdfExport$1, Page as Page$1, Toolbar as Toolbar$1, calculateAggregate, Aggregate as Aggregate$1, Sort as Sort$1, ColumnMenu as ColumnMenu$1, ContextMenu as ContextMenu$1, resetRowIndex, Edit as Edit$1, CommandColumn as CommandColumn$1, DetailRow as DetailRow$1, Cell, getVisiblePage, VirtualContentRenderer, InterSectionObserver, getTransformValues, RenderType, VirtualHeaderRenderer, VirtualScroll as VirtualScroll$1, ColumnChooser as ColumnChooser$1, getRowIndexFromElement, RowRenderer, InfiniteScroll as InfiniteScroll$1, destroy as destroy$1, initialLoad, DomVirtualization as DomVirtualization$1 } from '@syncfusion/ej2-grids';
3
3
  import { createCheckBox } from '@syncfusion/ej2-buttons';
4
4
  import { DataManager, ODataAdaptor, WebApiAdaptor, WebMethodAdaptor, CacheAdaptor, UrlAdaptor, Query, DataUtil, RemoteSaveAdaptor, Deferred, JsonAdaptor, Predicate as Predicate$1 } from '@syncfusion/ej2-data';
5
5
  import { showSpinner, hideSpinner, createSpinner } from '@syncfusion/ej2-popups';
@@ -489,6 +489,8 @@ var remoteExpand = 'remoteExpand';
489
489
  /** @hidden */
490
490
  var localPagedExpandCollapse = 'localPagedExpandCollapse';
491
491
  /** @hidden */
492
+ var virtualExpandCollapse = 'virtualExpandCollapse';
493
+ /** @hidden */
492
494
  var pagingActions = 'pagingActions';
493
495
  /** @hidden */
494
496
  var printGridInit = 'printGrid-Init';
@@ -602,6 +604,8 @@ var ariaRowIndex = 'aria-rowindex';
602
604
  var actionFailure = 'actionFailure';
603
605
  /** @hidden */
604
606
  var collapseActionComplete = 'collapseActionComplete';
607
+ /** @hidden */
608
+ var hierarchyCheckstateUpdate = 'hierarchy-checkstate-update';
605
609
 
606
610
  var __extends$5 = (undefined && undefined.__extends) || (function () {
607
611
  var extendStatics = function (d, b) {
@@ -1062,6 +1066,7 @@ var Selection = /** @__PURE__ @class */ (function () {
1062
1066
  this.parent.on('updateGridActions', this.updateGridActions, this);
1063
1067
  this.parent.grid.on('colgroup-refresh', this.headerCheckbox, this);
1064
1068
  this.parent.on('checkboxSelection', this.checkboxSelection, this);
1069
+ this.parent.on(hierarchyCheckstateUpdate, this.rowDropCompleteSelection, this);
1065
1070
  };
1066
1071
  /**
1067
1072
  * Removes previously added event listeners.
@@ -1077,6 +1082,7 @@ var Selection = /** @__PURE__ @class */ (function () {
1077
1082
  this.parent.grid.off('colgroup-refresh', this.headerCheckbox);
1078
1083
  this.parent.off('checkboxSelection', this.checkboxSelection);
1079
1084
  this.parent.off('updateGridActions', this.updateGridActions);
1085
+ this.parent.off(hierarchyCheckstateUpdate, this.rowDropCompleteSelection);
1080
1086
  };
1081
1087
  /**
1082
1088
  * Destroys the selection module and clears internal caches.
@@ -1124,8 +1130,9 @@ var Selection = /** @__PURE__ @class */ (function () {
1124
1130
  this.selectCheckboxes(rowIndex);
1125
1131
  var newCheckState = checkBox.nextElementSibling.classList.contains('e-check');
1126
1132
  this.triggerChkChangeEvent(checkBox, newCheckState, target.closest('tr'));
1133
+ this.updateHeaderCheckboxState();
1127
1134
  }
1128
- else if (checkWrap && checkWrap.querySelectorAll('.e-treeselectall').length > 0 && this.parent.autoCheckHierarchy) {
1135
+ else if (checkWrap && checkWrap.querySelectorAll('.e-treeselectall').length > 0) {
1129
1136
  var frame = checkWrap.querySelector('.e-frame');
1130
1137
  var targetState = frame.classList.contains('e-uncheck') || frame.classList.contains('e-stop');
1131
1138
  this.headerSelection(targetState);
@@ -1204,6 +1211,7 @@ var Selection = /** @__PURE__ @class */ (function () {
1204
1211
  var value = false; // Initial state can be false.
1205
1212
  var rowChkBox = this.parent.createElement('input', { className: 'e-treeselectall', attrs: { 'type': 'checkbox' } });
1206
1213
  var checkWrap = createCheckBox(this.parent.createElement, false, { checked: value, label: ' ' });
1214
+ headerElement.classList.add('e-headerchkcelldiv');
1207
1215
  checkWrap.classList.add('e-hierarchycheckbox');
1208
1216
  checkWrap.insertBefore(rowChkBox.cloneNode(), checkWrap.firstChild);
1209
1217
  if (!isNullOrUndefined(headerElement)) {
@@ -1220,6 +1228,7 @@ var Selection = /** @__PURE__ @class */ (function () {
1220
1228
  this.headerSelection();
1221
1229
  } // Update status based on current selections
1222
1230
  }
1231
+ this.updateHeaderCheckboxState();
1223
1232
  }
1224
1233
  };
1225
1234
  /**
@@ -1292,7 +1301,16 @@ var Selection = /** @__PURE__ @class */ (function () {
1292
1301
  for (var i = 0; i < rowIndexes.length; i++) {
1293
1302
  var viewRec = this.parent.getCurrentViewRecords()[rowIndexes[parseInt(i.toString(), 10)]];
1294
1303
  var flatRec = getParentData(this.parent, viewRec.uniqueID);
1295
- var nextState = (flatRec.checkboxState === 'check') ? 'uncheck' : 'check';
1304
+ var nextState = void 0;
1305
+ if (flatRec.checkboxState === 'check') {
1306
+ nextState = 'uncheck';
1307
+ }
1308
+ else if (flatRec.checkboxState === 'indeterminate') {
1309
+ nextState = this.shouldConsiderAllChildren() ? 'uncheck' : 'check';
1310
+ }
1311
+ else {
1312
+ nextState = 'check';
1313
+ }
1296
1314
  flatRec.checkboxState = nextState;
1297
1315
  viewRec.checkboxState = nextState;
1298
1316
  this.traverSelection(flatRec, nextState, false);
@@ -1315,7 +1333,7 @@ var Selection = /** @__PURE__ @class */ (function () {
1315
1333
  if ((!effectiveChildren || effectiveChildren.length === 0) && this.parent.autoCheckHierarchy) {
1316
1334
  effectiveChildren = this.getChildrenFromFlat(record);
1317
1335
  }
1318
- if (this.parent.filterModule && this.parent.filterModule.filteredResult.length > 0
1336
+ if (this.parent.hierarchyCheckboxMode === 'filteredHierarchy' && this.parent.filterModule && this.parent.filterModule.filteredResult.length > 0
1319
1337
  && effectiveChildren && effectiveChildren.length) {
1320
1338
  effectiveChildren = this.getFilteredChildRecords(effectiveChildren);
1321
1339
  }
@@ -1362,8 +1380,15 @@ var Selection = /** @__PURE__ @class */ (function () {
1362
1380
  };
1363
1381
  }
1364
1382
  var summary = this.parentSelectionCounters[record.uniqueID];
1383
+ if (this.shouldConsiderAllChildren()) {
1384
+ summary = this.buildSelectionSummary(record, true, true);
1385
+ if (record.uniqueID) {
1386
+ this.parentSelectionCounters[record.uniqueID] = summary;
1387
+ }
1388
+ }
1365
1389
  var finalState = this.deriveParentState(record, summary);
1366
- if (checkboxState === 'check' && summary.total > 0 && summary.checked === summary.total && summary.indeterminate === 0) {
1390
+ if (checkboxState === 'check' && summary.total > 0 && summary.checked === summary.total && summary.indeterminate === 0
1391
+ && !this.shouldConsiderAllChildren()) {
1367
1392
  finalState = 'check';
1368
1393
  }
1369
1394
  this.updateSelectedItems(record, finalState);
@@ -1429,7 +1454,9 @@ var Selection = /** @__PURE__ @class */ (function () {
1429
1454
  if (!parent) {
1430
1455
  return;
1431
1456
  }
1432
- var summary = this.buildSelectionSummary(parent);
1457
+ var ignoreFilter = this.parent.hierarchyCheckboxMode === 'filteredHierarchy';
1458
+ var useFullChildList = this.shouldConsiderAllChildren();
1459
+ var summary = this.buildSelectionSummary(parent, !ignoreFilter, useFullChildList);
1433
1460
  if (previousChildState) {
1434
1461
  this.applySummaryDelta(summary, previousChildState, -1);
1435
1462
  }
@@ -1443,11 +1470,10 @@ var Selection = /** @__PURE__ @class */ (function () {
1443
1470
  if (parent.checkboxState === desiredState) {
1444
1471
  return;
1445
1472
  }
1446
- var parentPrev = parent.checkboxState;
1447
1473
  parent.checkboxState = desiredState;
1448
1474
  this.updateSelectedItems(parent, desiredState);
1449
1475
  if (parent.parentItem) {
1450
- this.updateParentSelection(parent.parentItem, parentPrev, desiredState);
1476
+ this.updateParentSelection(parent.parentItem);
1451
1477
  }
1452
1478
  };
1453
1479
  /**
@@ -1455,9 +1481,11 @@ var Selection = /** @__PURE__ @class */ (function () {
1455
1481
  *
1456
1482
  * @param {Object} record - The record whose children should be summarized.
1457
1483
  * @param {boolean} [ignoreFilter] - If true, ignore current filter when computing summary.
1484
+ * @param {boolean} [useFullChildList] - If true, skip the `getFilteredChildRecords` narrowing
1485
+ * step even when a filter is active.
1458
1486
  * @returns {{ total: number, checked: number, indeterminate: number }} The computed summary.
1459
1487
  */
1460
- Selection.prototype.buildSelectionSummary = function (record, ignoreFilter) {
1488
+ Selection.prototype.buildSelectionSummary = function (record, ignoreFilter, useFullChildList) {
1461
1489
  var summary = { total: 0, checked: 0, indeterminate: 0 };
1462
1490
  var children = [];
1463
1491
  if (record && Array.isArray(record.childRecords) && record.childRecords.length) {
@@ -1466,7 +1494,8 @@ var Selection = /** @__PURE__ @class */ (function () {
1466
1494
  else {
1467
1495
  children = this.getChildrenFromFlat(record);
1468
1496
  }
1469
- if (!ignoreFilter && this.parent.filterModule && this.parent.filterModule.filteredResult.length > 0) {
1497
+ var filterActive = !!(this.parent.filterModule && this.parent.filterModule.filteredResult.length > 0);
1498
+ if (!ignoreFilter && !useFullChildList && filterActive) {
1470
1499
  children = this.getFilteredChildRecords(children);
1471
1500
  }
1472
1501
  for (var i = 0; i < children.length; i++) {
@@ -1485,6 +1514,22 @@ var Selection = /** @__PURE__ @class */ (function () {
1485
1514
  }
1486
1515
  return summary;
1487
1516
  };
1517
+ /**
1518
+ * Decides whether the parent `checkboxState` derivation should consider the full original
1519
+ * child set instead of the filtered subset.
1520
+ *
1521
+ * @returns {boolean} `true` when derivation should use the full child list.
1522
+ */
1523
+ Selection.prototype.shouldConsiderAllChildren = function () {
1524
+ if (this.parent.hierarchyCheckboxMode !== 'filteredHierarchy') {
1525
+ return false;
1526
+ }
1527
+ var filterActive = !!(this.parent.filterModule && this.parent.filterModule.filteredResult &&
1528
+ this.parent.filterModule.filteredResult.length > 0);
1529
+ var searchActive = !!(this.parent.grid && this.parent.grid.searchSettings && this.parent.grid.searchSettings.key &&
1530
+ this.parent.grid.searchSettings.key.length);
1531
+ return filterActive || searchActive;
1532
+ };
1488
1533
  /**
1489
1534
  * Applies a delta to a selection summary based on a state change.
1490
1535
  *
@@ -1550,6 +1595,13 @@ var Selection = /** @__PURE__ @class */ (function () {
1550
1595
  this.filteredList = [];
1551
1596
  }
1552
1597
  var records = this.resolveHeaderSelectionList(true);
1598
+ if (!isNullOrUndefined(checkAll)
1599
+ && (this.parent.hierarchyCheckboxMode === 'hierarchy' ||
1600
+ (this.parent.hierarchyCheckboxMode === 'filteredHierarchy' && checkAll))
1601
+ && !isRemoteData(this.parent)
1602
+ && this.parent.flatData.length > records.length) {
1603
+ records = this.parent.flatData;
1604
+ }
1553
1605
  if (!isNullOrUndefined(checkAll)) {
1554
1606
  this.resetSelectionCaches();
1555
1607
  var targetState = checkAll ? 'check' : 'uncheck';
@@ -1573,16 +1625,18 @@ var Selection = /** @__PURE__ @class */ (function () {
1573
1625
  */
1574
1626
  Selection.prototype.finalizeParentsAfterBulk = function (records) {
1575
1627
  var all = records;
1628
+ var useFullChildList = this.shouldConsiderAllChildren();
1576
1629
  for (var i = 0; i < all.length; i++) {
1577
1630
  var rec = all[parseInt(i.toString(), 10)];
1578
1631
  if (!rec || !rec.hasChildRecords) {
1579
1632
  continue;
1580
1633
  }
1581
- var summary = this.buildSelectionSummary(rec, true);
1634
+ var summary = this.buildSelectionSummary(rec, true, useFullChildList);
1582
1635
  this.parentSelectionCounters[rec.uniqueID] = summary;
1583
1636
  var finalState = this.deriveParentState(rec, summary);
1584
1637
  if (this.headerSelectionState === 'check' &&
1585
- summary.total > 0 && summary.checked === summary.total && summary.indeterminate === 0) {
1638
+ summary.total > 0 && summary.checked === summary.total && summary.indeterminate === 0 &&
1639
+ !useFullChildList) {
1586
1640
  finalState = 'check';
1587
1641
  }
1588
1642
  else if (this.headerSelectionState === 'uncheck') {
@@ -1632,15 +1686,32 @@ var Selection = /** @__PURE__ @class */ (function () {
1632
1686
  var hasSearch = !!(this.parent.grid && this.parent.grid.searchSettings &&
1633
1687
  this.parent.grid.searchSettings.key && this.parent.grid.searchSettings.key.length);
1634
1688
  var isFilterOrSearch = hasFilter || hasSearch || requestType === 'refresh' || requestType === 'searching';
1689
+ var isSortOrPageRequest = requestType === 'sorting' || requestType === 'paging';
1690
+ var isFilterCleared = (requestType === 'filtering' || requestType === 'searching' ||
1691
+ requestType === 'refresh') && !isFilterOrSearch;
1692
+ var shouldUpdateParents = isSortOrPageRequest || isFilterCleared;
1635
1693
  var currentlySelectedItemsInOrder = isFilterOrSearch ? records : this.selectedItems.slice();
1694
+ var parentsToUpdate = shouldUpdateParents && this.parent.flatData ?
1695
+ this.parent.flatData : currentlySelectedItemsInOrder;
1636
1696
  var newSelectedItems = [];
1637
1697
  var newSelectedUidMap = new Map();
1638
1698
  var newSelectedIndexes = [];
1639
- for (var _i = 0, currentlySelectedItemsInOrder_1 = currentlySelectedItemsInOrder; _i < currentlySelectedItemsInOrder_1.length; _i++) {
1640
- var item = currentlySelectedItemsInOrder_1[_i];
1641
- if (item.hasChildRecords && isFilterOrSearch && item.level === 0 && this.parent.autoCheckHierarchy) {
1642
- this.updateParentSelection(item);
1699
+ for (var _i = 0, parentsToUpdate_1 = parentsToUpdate; _i < parentsToUpdate_1.length; _i++) {
1700
+ var item = parentsToUpdate_1[_i];
1701
+ if (shouldUpdateParents && item.hasChildRecords && item.level === 0 && this.parent.autoCheckHierarchy) {
1702
+ var actualRecord = this.getRecordFromUidCollection(item);
1703
+ var isFilteredHierarchyMode = this.parent.hierarchyCheckboxMode === 'filteredHierarchy';
1704
+ if (isFilterCleared && isFilteredHierarchyMode && actualRecord &&
1705
+ (actualRecord.checkboxState === 'check' || actualRecord.checkboxState === 'uncheck')) {
1706
+ this.traverSelection(actualRecord, actualRecord.checkboxState, false);
1707
+ }
1708
+ else {
1709
+ this.updateParentSelection(item);
1710
+ }
1643
1711
  }
1712
+ }
1713
+ for (var _a = 0, currentlySelectedItemsInOrder_1 = currentlySelectedItemsInOrder; _a < currentlySelectedItemsInOrder_1.length; _a++) {
1714
+ var item = currentlySelectedItemsInOrder_1[_a];
1644
1715
  var actualItem = this.getRecordFromUidCollection(item);
1645
1716
  if (actualItem.uniqueID && actualItem.checkboxState === 'check') {
1646
1717
  newSelectedItems.push(actualItem);
@@ -1650,8 +1721,8 @@ var Selection = /** @__PURE__ @class */ (function () {
1650
1721
  if (!isFilterOrSearch) {
1651
1722
  var allFlatData = this.parent.flatData;
1652
1723
  if (allFlatData) {
1653
- for (var _a = 0, allFlatData_1 = allFlatData; _a < allFlatData_1.length; _a++) {
1654
- var record = allFlatData_1[_a];
1724
+ for (var _b = 0, allFlatData_1 = allFlatData; _b < allFlatData_1.length; _b++) {
1725
+ var record = allFlatData_1[_b];
1655
1726
  if (!record || record.isSummaryRow) {
1656
1727
  continue;
1657
1728
  }
@@ -1665,8 +1736,8 @@ var Selection = /** @__PURE__ @class */ (function () {
1665
1736
  this.selectedItems = newSelectedItems;
1666
1737
  this.selectedUidMap = newSelectedUidMap;
1667
1738
  this.buildVisibleUidMap();
1668
- for (var _b = 0, _c = this.selectedItems; _b < _c.length; _b++) {
1669
- var item = _c[_b];
1739
+ for (var _c = 0, _d = this.selectedItems; _c < _d.length; _c++) {
1740
+ var item = _d[_c];
1670
1741
  var visibleIdx = this.visibleUidIndex[item.uniqueID];
1671
1742
  if (visibleIdx !== undefined) {
1672
1743
  newSelectedIndexes.push(visibleIdx);
@@ -1960,7 +2031,8 @@ var Selection = /** @__PURE__ @class */ (function () {
1960
2031
  else if (args.requestType === 'add' && this.parent.autoCheckHierarchy) {
1961
2032
  args.data.checkboxState = 'uncheck';
1962
2033
  }
1963
- else if (requestType === 'filtering' || requestType === 'searching' || requestType === 'refresh') {
2034
+ else if (requestType === 'filtering' || requestType === 'searching' || requestType === 'refresh' ||
2035
+ requestType === 'save' || requestType === 'cancel') {
1964
2036
  this.updateSelectedCollectionsAfterBulk(this.resolveHeaderSelectionList(), requestType);
1965
2037
  this.refreshVisibleCheckboxes();
1966
2038
  if (this.parent.autoCheckHierarchy) {
@@ -1972,21 +2044,108 @@ var Selection = /** @__PURE__ @class */ (function () {
1972
2044
  if ((requestType === 'filtering' || requestType === 'searching' || requestType === 'refresh' ||
1973
2045
  requestType === 'sorting' || requestType === 'paging' || requestType === 'expanding' ||
1974
2046
  requestType === 'expand' || requestType === 'collapsing' || requestType === 'collapse') && !isRemoteData(this.parent)) {
1975
- if (!(isCheckboxcolumn(this.parent) && (requestType === 'refresh' && this.parent['isVirtualExpandCollapse']))) {
1976
- this.selectedItems = [];
1977
- this.selectedUidMap = new Map();
1978
- this.selectedIndexes = [];
1979
- }
1980
- if (requestType === 'filtering' || requestType === 'searching' || requestType === 'sorting') {
1981
- this.headerSelection(false);
1982
- }
2047
+ this.updateSelectedCollectionsAfterBulk(this.resolveHeaderSelectionList(), requestType);
1983
2048
  this.refreshVisibleCheckboxes();
1984
- if (this.parent.autoCheckHierarchy) {
1985
- this.updateHeaderCheckboxState();
1986
- }
2049
+ this.updateHeaderCheckboxState();
2050
+ }
2051
+ }
2052
+ }
2053
+ };
2054
+ /**
2055
+ *
2056
+ * @param {Object} args - The notification payload from `rowDragdrop.dropRows`.
2057
+ * @returns {void}
2058
+ */
2059
+ Selection.prototype.rowDropCompleteSelection = function (args) {
2060
+ var _this = this;
2061
+ var dragged = args.draggedRecords;
2062
+ var draggedUids = new Set();
2063
+ for (var dragIndex = 0; dragIndex < dragged.length; dragIndex++) {
2064
+ var draggedRecord = dragged[parseInt(dragIndex.toString(), 10)];
2065
+ var draggedUid = draggedRecord.uniqueID;
2066
+ if (draggedUid) {
2067
+ draggedUids.add(draggedUid);
2068
+ }
2069
+ }
2070
+ var walked = new Set();
2071
+ var deriveState = function (startingRecord) {
2072
+ if (!startingRecord) {
2073
+ return;
2074
+ }
2075
+ var recordUid = startingRecord.uniqueID;
2076
+ if (!recordUid || walked.has(recordUid) || draggedUids.has(recordUid)) {
2077
+ return;
2078
+ }
2079
+ var liveRecord = _this.parent.uniqueIDCollection[String(recordUid)] || startingRecord;
2080
+ walked.add(recordUid);
2081
+ var childRecords = _this.getChildrenFromFlat(liveRecord);
2082
+ var totalChildren = 0;
2083
+ var checkedChildren = 0;
2084
+ var indeterminateChildren = 0;
2085
+ for (var childIndex = 0; childIndex < childRecords.length; childIndex++) {
2086
+ var childRecord = childRecords[parseInt(childIndex.toString(), 10)];
2087
+ if (!childRecord || childRecord.isSummaryRow) {
2088
+ continue;
2089
+ }
2090
+ if (childRecord.hasChildRecords) {
2091
+ deriveState(childRecord);
2092
+ }
2093
+ totalChildren++;
2094
+ if (childRecord.checkboxState === 'check') {
2095
+ checkedChildren++;
2096
+ }
2097
+ else if (childRecord.checkboxState === 'indeterminate') {
2098
+ indeterminateChildren++;
2099
+ }
2100
+ }
2101
+ var summary = {
2102
+ total: totalChildren,
2103
+ checked: checkedChildren,
2104
+ indeterminate: indeterminateChildren
2105
+ };
2106
+ _this.parentSelectionCounters["" + recordUid] = summary;
2107
+ var desiredState = _this.deriveParentState(liveRecord, { total: totalChildren, checked: checkedChildren, indeterminate: indeterminateChildren });
2108
+ if (liveRecord.checkboxState !== desiredState) {
2109
+ _this.updateSelectedItems(liveRecord, desiredState);
2110
+ }
2111
+ };
2112
+ var startingAncestors = [];
2113
+ var startingAncestorUids = new Set();
2114
+ var collectAncestorChain = function (record) {
2115
+ var currentRecord = record;
2116
+ while (currentRecord) {
2117
+ var currentUid = currentRecord.uniqueID;
2118
+ if (currentUid && !startingAncestorUids.has(currentUid)) {
2119
+ startingAncestors.push(currentRecord);
2120
+ startingAncestorUids.add(currentUid);
2121
+ }
2122
+ currentRecord = currentRecord.parentItem;
2123
+ }
2124
+ };
2125
+ if (args && args.oldParents) {
2126
+ for (var oldIndex = 0; oldIndex < args.oldParents.length; oldIndex++) {
2127
+ var oldParent = args.oldParents[parseInt(oldIndex.toString(), 10)];
2128
+ if (oldParent) {
2129
+ collectAncestorChain(oldParent);
1987
2130
  }
1988
2131
  }
1989
2132
  }
2133
+ for (var dragIndex = 0; dragIndex < dragged.length; dragIndex++) {
2134
+ var draggedRecord = dragged[parseInt(dragIndex.toString(), 10)];
2135
+ var newParent = draggedRecord && draggedRecord.parentItem;
2136
+ if (newParent) {
2137
+ collectAncestorChain(newParent);
2138
+ }
2139
+ }
2140
+ if (args && args.droppedRecord && args.dropPosition === 'middleSegment') {
2141
+ collectAncestorChain(args.droppedRecord);
2142
+ }
2143
+ for (var startIndex = 0; startIndex < startingAncestors.length; startIndex++) {
2144
+ deriveState(startingAncestors[parseInt(startIndex.toString(), 10)]);
2145
+ }
2146
+ this.updateSelectedCollectionsAfterBulk(this.resolveHeaderSelectionList(true), '');
2147
+ this.refreshVisibleCheckboxes();
2148
+ this.updateHeaderCheckboxState();
1990
2149
  };
1991
2150
  /**
1992
2151
  * Retrieves checked record objects.
@@ -2014,6 +2173,17 @@ var Selection = /** @__PURE__ @class */ (function () {
2014
2173
  }
2015
2174
  return orderedVisibleIndexes;
2016
2175
  };
2176
+ /**
2177
+ * Deletes all currently checked records in the TreeGrid.
2178
+ *
2179
+ * @returns {void}
2180
+ */
2181
+ Selection.prototype.deleteCheckedRecords = function () {
2182
+ if (!isNullOrUndefined(this.parent.editModule) && !isNullOrUndefined(this.parent.editSettings)
2183
+ && this.parent.editSettings.allowDeleting) {
2184
+ this.parent.deleteRecord(this.parent.getPrimaryKeyFieldNames()[0], this.getCheckedrecords());
2185
+ }
2186
+ };
2017
2187
  return Selection;
2018
2188
  }());
2019
2189
 
@@ -2206,7 +2376,7 @@ var Render = /** @__PURE__ @class */ (function () {
2206
2376
  var collapsed = (this.parent.initialRender && (!(isNullOrUndefined(parentData[this.parent.expandStateMapping]) ||
2207
2377
  parentData[this.parent.expandStateMapping]) || this.parent.enableCollapseAll)) ||
2208
2378
  !getExpandStatus(this.parent, args.data, this.parent.grid.getCurrentViewRecords());
2209
- if (collapsed && !isNullOrUndefined(args.row)) {
2379
+ if (collapsed && !isNullOrUndefined(args.row) && !this.parent.enableDomVirtualization) {
2210
2380
  this.parent['toggleRowVisibility'](args.row, 'e-childrow-hidden');
2211
2381
  var rowsObj = this.parent.grid.getRowsObject();
2212
2382
  if (!this.parent.grid.isFrozenGrid() && !isNullOrUndefined(args.row.getAttribute('data-uid'))) {
@@ -2219,7 +2389,8 @@ var Render = /** @__PURE__ @class */ (function () {
2219
2389
  var parentrec = this.parent.getCurrentViewRecords().filter(function (rec) {
2220
2390
  return getValue(proxy_1.idMapping, rec) === getValue(proxy_1.parentIdMapping, data);
2221
2391
  });
2222
- if (parentrec.length > 0 && !parentrec[0].isSummaryRow && !isNullOrUndefined(args.row)) {
2392
+ if (parentrec.length > 0 && !parentrec[0].isSummaryRow && !isNullOrUndefined(args.row) &&
2393
+ !this.parent.enableDomVirtualization) {
2223
2394
  var display = parentrec[0].expanded ? 'e-childrow-visible' : 'e-childrow-hidden';
2224
2395
  this.parent['toggleRowVisibility'](args.row, display);
2225
2396
  }
@@ -2241,7 +2412,7 @@ var Render = /** @__PURE__ @class */ (function () {
2241
2412
  else if (args.row.querySelector('.e-treegridcollapse')) {
2242
2413
  args.row.setAttribute('aria-expanded', 'false');
2243
2414
  }
2244
- if (this.parent.enableCollapseAll && this.parent.initialRender) {
2415
+ if (this.parent.enableCollapseAll && this.parent.initialRender && !this.parent.enableDomVirtualization) {
2245
2416
  if (!isNullOrUndefined(data.parentItem)) {
2246
2417
  this.parent['toggleRowVisibility'](args.row, 'e-childrow-hidden');
2247
2418
  }
@@ -2567,6 +2738,17 @@ var Render = /** @__PURE__ @class */ (function () {
2567
2738
  return Render;
2568
2739
  }());
2569
2740
 
2741
+ var __assign = (undefined && undefined.__assign) || function () {
2742
+ __assign = Object.assign || function(t) {
2743
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
2744
+ s = arguments[i];
2745
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
2746
+ t[p] = s[p];
2747
+ }
2748
+ return t;
2749
+ };
2750
+ return __assign.apply(this, arguments);
2751
+ };
2570
2752
  /**
2571
2753
  * Internal dataoperations for tree grid
2572
2754
  *
@@ -2585,6 +2767,8 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
2585
2767
  this.addEventListener();
2586
2768
  this.dataResults = {};
2587
2769
  this.isSelfReference = !isNullOrUndefined(this.parent.parentIdMapping);
2770
+ this.enableCollapseAll = this.parent.enableCollapseAll;
2771
+ this.uniqueIDCollection = this.parent.uniqueIDCollection;
2588
2772
  }
2589
2773
  /**
2590
2774
  * @hidden
@@ -2694,17 +2878,19 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
2694
2878
  this.hierarchyData = data;
2695
2879
  }
2696
2880
  else {
2881
+ var idMapping = this.parent.idMapping;
2697
2882
  var keys = Object.keys(data);
2698
2883
  for (var i = 0; i < keys.length; i++) {
2699
2884
  var tempData = data[parseInt(i.toString(), 10)];
2700
2885
  this.hierarchyData.push(extend$1({}, tempData));
2701
- if (!isNullOrUndefined(tempData[this.parent.idMapping])) {
2702
- this.taskIds.push(tempData[this.parent.idMapping]);
2886
+ if (!isNullOrUndefined(tempData["" + idMapping])) {
2887
+ this.taskIds.push(tempData["" + idMapping]);
2703
2888
  }
2704
2889
  }
2705
2890
  }
2706
2891
  if (this.isSelfReference) {
2707
2892
  var selfData = [];
2893
+ var childMapping = this.parent.childMapping;
2708
2894
  var mappingData = new DataManager(this.hierarchyData).executeLocal(new Query()
2709
2895
  .group(this.parent.parentIdMapping));
2710
2896
  for (var i = 0; i < mappingData.length; i++) {
@@ -2713,7 +2899,7 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
2713
2899
  if (!isNullOrUndefined(groupData.key)) {
2714
2900
  if (index > -1) {
2715
2901
  var childData = (groupData.items);
2716
- this.hierarchyData[parseInt(index.toString(), 10)][this.parent.childMapping] = childData;
2902
+ this.hierarchyData[parseInt(index.toString(), 10)]["" + childMapping] = childData;
2717
2903
  continue;
2718
2904
  }
2719
2905
  }
@@ -2760,7 +2946,6 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
2760
2946
  * @returns {void}
2761
2947
  */
2762
2948
  DataManipulation.prototype.updateParentRemoteData = function (args) {
2763
- var _this = this;
2764
2949
  var actionArgs = 'actionArgs';
2765
2950
  if (isRemoteData(this.parent) && this.parent.enableVirtualization && args["" + actionArgs].requestType === 'virtualscroll') {
2766
2951
  this.parent.hideSpinner();
@@ -2776,16 +2961,20 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
2776
2961
  }
2777
2962
  else {
2778
2963
  if (this.parent.loadChildOnDemand) {
2964
+ var isRemote = isRemoteData(this.parent);
2965
+ var enableVirtualization = this.parent.enableVirtualization;
2966
+ var getUidval = getUid(this.parent.element.id + '_data_');
2967
+ var parentIdMapping_1 = this.parent.parentIdMapping;
2968
+ var idMapping_1 = this.parent.idMapping;
2779
2969
  var _loop_1 = function (rec) {
2780
2970
  if (isCountRequired(this_1.parent) && records[parseInt(rec.toString(), 10)].hasChildRecords &&
2781
2971
  this_1.parent.initialRender) {
2782
2972
  records[parseInt(rec.toString(), 10)].expanded = false;
2783
2973
  }
2784
- if (isRemoteData(this_1.parent) && this_1.parent.enableVirtualization) {
2974
+ if (isRemote && enableVirtualization) {
2785
2975
  var childRecords_1 = [];
2786
- var parent_1 = this_1.parent;
2787
2976
  records.filter(function (e) {
2788
- if (e["" + parent_1.parentIdMapping] === records[parseInt(rec.toString(), 10)]["" + parent_1.idMapping]) {
2977
+ if (e["" + parentIdMapping_1] === records[parseInt(rec.toString(), 10)]["" + idMapping_1]) {
2789
2978
  childRecords_1.push(e);
2790
2979
  }
2791
2980
  });
@@ -2798,17 +2987,17 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
2798
2987
  }
2799
2988
  if (isNullOrUndefined(records[parseInt(rec.toString(), 10)].index)) {
2800
2989
  records[parseInt(rec.toString(), 10)].taskData = extend$1({}, records[parseInt(rec.toString(), 10)]);
2801
- records[parseInt(rec.toString(), 10)].uniqueID = getUid(this_1.parent.element.id + '_data_');
2990
+ records[parseInt(rec.toString(), 10)].uniqueID = getUidval;
2802
2991
  setValue('uniqueIDCollection.' + records[parseInt(rec.toString(), 10)].uniqueID, records[parseInt(rec.toString(), 10)], this_1.parent);
2803
- if (isRemoteData(this_1.parent) && this_1.parent.enableVirtualization && records[parseInt(rec.toString(), 10)]["" + this_1.parent.parentIdMapping] && (isNullOrUndefined(records[parseInt(rec.toString(), 10)].level) || records[parseInt(rec.toString(), 10)].level === 0)) {
2804
- var parentID_1 = records[parseInt(rec.toString(), 10)]["" + this_1.parent.parentIdMapping];
2805
- var parentRec = records.find(function (record) { return record["" + _this.parent.idMapping] === parentID_1; });
2992
+ if (isRemote && enableVirtualization && records[parseInt(rec.toString(), 10)]["" + parentIdMapping_1] && (isNullOrUndefined(records[parseInt(rec.toString(), 10)].level) || records[parseInt(rec.toString(), 10)].level === 0)) {
2993
+ var parentID_1 = records[parseInt(rec.toString(), 10)]["" + parentIdMapping_1];
2994
+ var parentRec = records.find(function (record) { return record["" + idMapping_1] === parentID_1; });
2806
2995
  if (parentRec) {
2807
2996
  records[parseInt(rec.toString(), 10)].level = parentRec.level + 1;
2808
2997
  }
2809
2998
  else {
2810
- var parentRec_1 = args.actual.flatData.find(function (record) { return record["" + _this.parent.idMapping] === parentID_1; });
2811
- if (isNullOrUndefined(parentRec_1["" + this_1.parent.parentIdMapping])) {
2999
+ var parentRec_1 = args.actual.flatData.find(function (record) { return record["" + idMapping_1] === parentID_1; });
3000
+ if (isNullOrUndefined(parentRec_1["" + parentIdMapping_1])) {
2812
3001
  records[parseInt(rec.toString(), 10)].level = 1;
2813
3002
  }
2814
3003
  else {
@@ -2821,7 +3010,7 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
2821
3010
  }
2822
3011
  records[parseInt(rec.toString(), 10)].index = Math.ceil(Math.random() * 1000);
2823
3012
  if ((records[parseInt(rec.toString(), 10)][this_1.parent.hasChildMapping] ||
2824
- this_1.parentItems.indexOf(records[parseInt(rec.toString(), 10)][this_1.parent.idMapping]) !== -1)) {
3013
+ this_1.parentItems.indexOf(records[parseInt(rec.toString(), 10)]["" + idMapping_1]) !== -1)) {
2825
3014
  records[parseInt(rec.toString(), 10)].hasChildRecords = true;
2826
3015
  }
2827
3016
  records[parseInt(rec.toString(), 10)].checkboxState = 'uncheck';
@@ -2878,35 +3067,44 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
2878
3067
  gridRows = [].slice.call(rows);
2879
3068
  }
2880
3069
  var childRecord;
2881
- if (rowDetails.rows.length > 0) {
2882
- if (!isChild) {
2883
- rowDetails.record.expanded = true;
2884
- }
2885
- for (var i = 0; i < rowDetails.rows.length; i++) {
2886
- this.parent['toggleRowVisibility'](rowDetails.rows[parseInt(i.toString(), 10)], 'e-childrow-visible');
2887
- if (!this.parent.loadChildOnDemand) {
2888
- var targetEle = rowDetails.rows[parseInt(i.toString(), 10)].getElementsByClassName('e-treegridcollapse')[0];
2889
- childRecord = this.parent.rowTemplate ?
2890
- this.parent.grid.getCurrentViewRecords()[rowDetails.rows[parseInt(i.toString(), 10)].rowIndex] :
2891
- this.parent.grid.getRowObjectFromUID(rowDetails.rows[parseInt(i.toString(), 10)].getAttribute('data-uid')).data;
2892
- if (!isNullOrUndefined(targetEle) && childRecord.expanded) {
2893
- addClass([targetEle], 'e-treegridexpand');
2894
- removeClass([targetEle], 'e-treegridcollapse');
3070
+ if (rowDetails.rows.length > 0 || (this.parent.enableDomVirtualization &&
3071
+ this.parent.uniqueIDCollpaseCollection[rowDetails.record.uniqueID])) {
3072
+ if (this.parent.enableDomVirtualization) {
3073
+ this.parent.notify(virtualExpandCollapse, { action: 'expand', row: rowDetails.parentRow, record: rowDetails.record });
3074
+ this.parent.notify(localPagedExpandCollapse, { action: 'expand', row: rowDetails.parentRow, record: rowDetails.record });
3075
+ }
3076
+ else {
3077
+ if (!isChild) {
3078
+ rowDetails.record.expanded = true;
3079
+ }
3080
+ var rowTemplate = this.parent.rowTemplate;
3081
+ var loadChildOnDemand = this.parent.loadChildOnDemand;
3082
+ for (var i = 0; i < rowDetails.rows.length; i++) {
3083
+ this.parent['toggleRowVisibility'](rowDetails.rows[parseInt(i.toString(), 10)], 'e-childrow-visible');
3084
+ if (!loadChildOnDemand) {
3085
+ var targetEle = rowDetails.rows[parseInt(i.toString(), 10)].getElementsByClassName('e-treegridcollapse')[0];
3086
+ childRecord = rowTemplate ?
3087
+ this.parent.grid.getCurrentViewRecords()[rowDetails.rows[parseInt(i.toString(), 10)].rowIndex] :
3088
+ this.parent.grid.getRowObjectFromUID(rowDetails.rows[parseInt(i.toString(), 10)].getAttribute('data-uid')).data;
3089
+ if (!isNullOrUndefined(targetEle) && childRecord.expanded) {
3090
+ addClass([targetEle], 'e-treegridexpand');
3091
+ removeClass([targetEle], 'e-treegridcollapse');
3092
+ }
3093
+ var childRows = [];
3094
+ childRows = gridRows.filter(function (r) {
3095
+ return r.querySelector('.e-gridrowindex' + childRecord.index + 'level' + (childRecord.level + 1));
3096
+ });
3097
+ if (childRows.length && childRecord.expanded) {
3098
+ this.collectExpandingRecs({ record: childRecord, rows: childRows, parentRow: rowDetails.parentRow }, true);
3099
+ }
2895
3100
  }
2896
- var childRows = [];
2897
- childRows = gridRows.filter(function (r) {
2898
- return r.querySelector('.e-gridrowindex' + childRecord.index + 'level' + (childRecord.level + 1));
2899
- });
2900
- if (childRows.length && childRecord.expanded) {
2901
- this.collectExpandingRecs({ record: childRecord, rows: childRows, parentRow: rowDetails.parentRow }, true);
3101
+ var expandingTd = rowDetails.rows[parseInt(i.toString(), 10)].querySelector('.e-detailrowcollapse');
3102
+ if (!isNullOrUndefined(expandingTd)) {
3103
+ this.parent.grid.detailRowModule.expand(expandingTd);
2902
3104
  }
2903
3105
  }
2904
- var expandingTd = rowDetails.rows[parseInt(i.toString(), 10)].querySelector('.e-detailrowcollapse');
2905
- if (!isNullOrUndefined(expandingTd)) {
2906
- this.parent.grid.detailRowModule.expand(expandingTd);
2907
- }
3106
+ this.parent.grid.pageSettings.totalRecordsCount += rowDetails.rows.length;
2908
3107
  }
2909
- this.parent.grid.pageSettings.totalRecordsCount += rowDetails.rows.length;
2910
3108
  }
2911
3109
  else {
2912
3110
  this.fetchRemoteChildData({ action: rowDetails["" + name], record: rowDetails.record, rows: rowDetails.rows, parentRow: rowDetails.parentRow });
@@ -2946,12 +3144,14 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
2946
3144
  var remoteExpandedData = 'remoteExpandedData';
2947
3145
  var remoteCollapsedData = 'remoteCollapsedData';
2948
3146
  var level = 'level';
2949
- var datas = _this.parent.grid.currentViewData.slice();
3147
+ var currentViewData = _this.parent.grid.currentViewData;
3148
+ var datas = currentViewData.slice();
2950
3149
  var inx;
2951
3150
  var idMapping = _this.parent.idMapping;
3151
+ var parentIdMapping = _this.parent.parentIdMapping;
2952
3152
  if (_this.parent['isGantt'] && _this.parent.loadChildOnDemand && _this.parent.hasChildMapping) {
2953
- for (var i = 0; i < _this.parent.grid.currentViewData.length; i++) {
2954
- if (rowDetails.record[idMapping] === _this.parent.grid.currentViewData[i][idMapping]) {
3153
+ for (var i = 0; i < currentViewData.length; i++) {
3154
+ if (rowDetails.record[idMapping] === currentViewData[i][idMapping]) {
2955
3155
  inx = i;
2956
3156
  break;
2957
3157
  }
@@ -2963,7 +3163,7 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
2963
3163
  if (_this.parent.enableVirtualization && (rowDetails.action === 'collapse' || rowDetails.action === 'remoteExpand')) {
2964
3164
  datas = [];
2965
3165
  for (var i = 0; i < inx; i++) {
2966
- datas.push(_this.parent.grid.currentViewData[parseInt(i.toString(), 10)]);
3166
+ datas.push(currentViewData[parseInt(i.toString(), 10)]);
2967
3167
  }
2968
3168
  }
2969
3169
  if (inx === -1) {
@@ -2978,14 +3178,14 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
2978
3178
  var resultChildData = [];
2979
3179
  if (rowDetails.action === 'remoteExpand' && _this.parent.grid.filterModule && _this.parent.grid.filterModule['value']) {
2980
3180
  for (var i = 0; i < datas.length; i++) {
2981
- if (Object.prototype.hasOwnProperty.call(datas[parseInt(i.toString(), 10)], _this.parent.parentIdMapping) && datas[parseInt(i.toString(), 10)]['' + _this.parent.parentIdMapping] !== null && datas[parseInt(i.toString(), 10)].level === 0) {
3181
+ if (Object.prototype.hasOwnProperty.call(datas[parseInt(i.toString(), 10)], parentIdMapping) && datas[parseInt(i.toString(), 10)]['' + parentIdMapping] !== null && datas[parseInt(i.toString(), 10)].level === 0) {
2982
3182
  datas.splice(i, 1);
2983
3183
  i--;
2984
3184
  }
2985
3185
  }
2986
3186
  for (var i = 0; i < result.length; i++) {
2987
- if (rowDetails.record['' + _this.parent.idMapping] !== result[parseInt(i.toString(), 10)]['' + _this.parent.idMapping] &&
2988
- rowDetails.record['' + _this.parent.idMapping] === result[parseInt(i.toString(), 10)]['' + _this.parent.parentIdMapping]) {
3187
+ if (rowDetails.record['' + idMapping] !== result[parseInt(i.toString(), 10)]['' + idMapping] &&
3188
+ rowDetails.record['' + idMapping] === result[parseInt(i.toString(), 10)]['' + parentIdMapping]) {
2989
3189
  if (Object.prototype.hasOwnProperty.call(result, i)) {
2990
3190
  resultChildData.push(result[parseInt(i.toString(), 10)]);
2991
3191
  }
@@ -2996,8 +3196,8 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
2996
3196
  if (_this.parent.enableVirtualization && rowDetails.action === 'remoteExpand') {
2997
3197
  rowDetails.record.childRecords = [];
2998
3198
  for (var i = 0; i < result.length; i++) {
2999
- if (rowDetails.record['' + _this.parent.idMapping] !== result[parseInt(i.toString(), 10)]['' + _this.parent.idMapping] &&
3000
- rowDetails.record['' + _this.parent.idMapping] === result[parseInt(i.toString(), 10)]['' + _this.parent.parentIdMapping] && Object.prototype.hasOwnProperty.call(result, i)) {
3199
+ if (rowDetails.record['' + idMapping] !== result[parseInt(i.toString(), 10)]['' + idMapping] &&
3200
+ rowDetails.record['' + idMapping] === result[parseInt(i.toString(), 10)]['' + parentIdMapping] && Object.prototype.hasOwnProperty.call(result, i)) {
3001
3201
  rowDetails.record.childRecords.push(result[parseInt(i.toString(), 10)]);
3002
3202
  }
3003
3203
  }
@@ -3007,20 +3207,20 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
3007
3207
  }
3008
3208
  var _loop_2 = function (r) {
3009
3209
  var record = result[parseInt(r.toString(), 10)];
3010
- if (_this.parent.enableVirtualization && record["" + _this.parent.idMapping] === rowDetails.record["" + _this.parent.idMapping] && rowDetails.action === 'remoteExpand') {
3210
+ if (_this.parent.enableVirtualization && record["" + idMapping] === rowDetails.record["" + idMapping] && rowDetails.action === 'remoteExpand') {
3011
3211
  _this.parent["" + remoteExpandedData].push(rowDetails.record);
3012
3212
  }
3013
- else if (_this.parent.enableVirtualization && record["" + _this.parent.idMapping] === rowDetails.record["" + _this.parent.idMapping] && rowDetails.action === 'collapse') {
3213
+ else if (_this.parent.enableVirtualization && record["" + idMapping] === rowDetails.record["" + idMapping] && rowDetails.action === 'collapse') {
3014
3214
  for (var i = 0; i < _this.parent["" + remoteExpandedData].length; i++) {
3015
- if (rowDetails.record["" + _this.parent.idMapping] === _this.parent["" + remoteExpandedData][parseInt(i.toString(), 10)]["" + _this.parent.idMapping]) {
3215
+ if (rowDetails.record["" + idMapping] === _this.parent["" + remoteExpandedData][parseInt(i.toString(), 10)]["" + idMapping]) {
3016
3216
  _this.parent["" + remoteExpandedData].splice(i, 1);
3017
3217
  }
3018
3218
  }
3019
3219
  }
3020
3220
  record.taskData = extend$1({}, record);
3021
- if (record["" + _this.parent.parentIdMapping] && _this.parent.enableVirtualization && _this.parent["" + remoteExpandedData].length) {
3221
+ if (record["" + parentIdMapping] && _this.parent.enableVirtualization && _this.parent["" + remoteExpandedData].length) {
3022
3222
  for (var i = 0; i < _this.parent["" + remoteExpandedData].length; i++) {
3023
- if (record["" + _this.parent.parentIdMapping] === _this.parent["" + remoteExpandedData][parseInt(i.toString(), 10)]["" + _this.parent.idMapping]) {
3223
+ if (record["" + parentIdMapping] === _this.parent["" + remoteExpandedData][parseInt(i.toString(), 10)]["" + idMapping]) {
3024
3224
  record.level = _this.parent["" + remoteExpandedData][parseInt(i.toString(), 10)]["" + level] + 1;
3025
3225
  var parentData = _this.parent["" + remoteExpandedData][parseInt(i.toString(), 10)];
3026
3226
  delete parentData.childRecords;
@@ -3031,9 +3231,9 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
3031
3231
  }
3032
3232
  else if (_this.parent.enableVirtualization) {
3033
3233
  if ((record["" + _this.parent.hasChildMapping] ||
3034
- _this.parentItems.indexOf(record["" + _this.parent.idMapping]) !== -1)
3234
+ _this.parentItems.indexOf(record["" + idMapping]) !== -1)
3035
3235
  && !(haveChild && !haveChild[parseInt(r.toString(), 10)])) {
3036
- if (isNullOrUndefined(record["" + _this.parent.parentIdMapping])) {
3236
+ if (isNullOrUndefined(record["" + parentIdMapping])) {
3037
3237
  record.level = 0;
3038
3238
  if (rowDetails.action === 'remoteExpand') {
3039
3239
  record.childRecords = [];
@@ -3060,45 +3260,45 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
3060
3260
  }
3061
3261
  record.index = Math.ceil(Math.random() * 1000);
3062
3262
  record.uniqueID = getUid(_this.parent.element.id + '_data_');
3063
- if (rowDetails.record["" + _this.parent.idMapping] === record["" + _this.parent.idMapping]) {
3263
+ if (rowDetails.record["" + idMapping] === record["" + idMapping]) {
3064
3264
  rowDetails.record.uniqueID = record.uniqueID;
3065
3265
  }
3066
3266
  record.checkboxState = 'uncheck';
3067
3267
  if (_this.parent.enableVirtualization && isNullOrUndefined(record.level)) {
3068
- for (var p = 0; p < _this.parent.grid.currentViewData.length; p++) {
3069
- if (_this.parent.grid.currentViewData[parseInt(p.toString(), 10)]["" + _this.parent.idMapping] === record["" + _this.parent.parentIdMapping]) {
3070
- record.level = _this.parent.grid.currentViewData[parseInt(p.toString(), 10)]['level'] + 1;
3268
+ for (var p = 0; p < currentViewData.length; p++) {
3269
+ if (currentViewData[parseInt(p.toString(), 10)]["" + idMapping] === record["" + parentIdMapping]) {
3270
+ record.level = currentViewData[parseInt(p.toString(), 10)]['level'] + 1;
3071
3271
  }
3072
3272
  }
3073
3273
  }
3074
3274
  setValue('uniqueIDCollection.' + record.uniqueID, record, _this.parent);
3075
3275
  // delete result[r].parentItem.childRecords;
3076
3276
  if ((record["" + _this.parent.hasChildMapping] ||
3077
- _this.parentItems.indexOf(record["" + _this.parent.idMapping]) !== -1)
3277
+ _this.parentItems.indexOf(record["" + idMapping]) !== -1)
3078
3278
  && !(haveChild && !haveChild[parseInt(r.toString(), 10)])) {
3079
3279
  record.hasChildRecords = true;
3080
3280
  if (_this.parent.enableVirtualization && !_this.parent.loadChildOnDemand) {
3081
3281
  for (var i = 0; i < _this.parent["" + remoteCollapsedData].length; i++) {
3082
- if (record["" + _this.parent.idMapping] === _this.parent["" + remoteCollapsedData][parseInt(i.toString(), 10)]["" + _this.parent.idMapping]) {
3282
+ if (record["" + idMapping] === _this.parent["" + remoteCollapsedData][parseInt(i.toString(), 10)]["" + idMapping]) {
3083
3283
  record.expanded = _this.parent["" + remoteCollapsedData][parseInt(i.toString(), 10)]['expanded'];
3084
3284
  }
3085
3285
  }
3086
- if (rowDetails.action === 'collapse' && record["" + _this.parent.idMapping] !== rowDetails.record["" + _this.parent.idMapping] && record.expanded !== false) {
3286
+ if (rowDetails.action === 'collapse' && record["" + idMapping] !== rowDetails.record["" + idMapping] && record.expanded !== false) {
3087
3287
  record.expanded = true;
3088
3288
  }
3089
- else if (rowDetails.action === 'collapse' && record["" + _this.parent.idMapping] === rowDetails.record["" + _this.parent.idMapping]) {
3289
+ else if (rowDetails.action === 'collapse' && record["" + idMapping] === rowDetails.record["" + idMapping]) {
3090
3290
  record.expanded = false;
3091
3291
  _this.parent["" + remoteCollapsedData].push(rowDetails.record);
3092
3292
  }
3093
3293
  else if (rowDetails.action === 'remoteExpand') {
3094
- for (var i = 0; i < _this.parent.grid.currentViewData.length; i++) {
3095
- if (_this.parent.grid.currentViewData[parseInt(i.toString(), 10)]["" + _this.parent.idMapping] === record["" + _this.parent.idMapping]) {
3096
- result.splice(r, 1, _this.parent.grid.currentViewData[parseInt(i.toString(), 10)]);
3294
+ for (var i = 0; i < currentViewData.length; i++) {
3295
+ if (currentViewData[parseInt(i.toString(), 10)]["" + _this.parent.idMapping] === record["" + _this.parent.idMapping]) {
3296
+ result.splice(r, 1, currentViewData[parseInt(i.toString(), 10)]);
3097
3297
  }
3098
3298
  }
3099
3299
  if (record[_this.parent.idMapping] === rowDetails.record["" + _this.parent.idMapping]) {
3100
3300
  for (var i = 0; i < _this.parent["" + remoteCollapsedData].length; i++) {
3101
- if (rowDetails.record["" + _this.parent.idMapping] === _this.parent["" + remoteCollapsedData][parseInt(i.toString(), 10)]["" + _this.parent.idMapping]) {
3301
+ if (rowDetails.record["" + idMapping] === _this.parent["" + remoteCollapsedData][parseInt(i.toString(), 10)]["" + _this.parent.idMapping]) {
3102
3302
  _this.parent["" + remoteCollapsedData].splice(i, 1);
3103
3303
  }
3104
3304
  }
@@ -3108,14 +3308,14 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
3108
3308
  }
3109
3309
  }
3110
3310
  }
3111
- else if (_this.parent.enableVirtualization && record["" + _this.parent.idMapping] === rowDetails.record["" + _this.parent.idMapping] && rowDetails.action !== 'collapse') {
3311
+ else if (_this.parent.enableVirtualization && record["" + idMapping] === rowDetails.record["" + idMapping] && rowDetails.action !== 'collapse') {
3112
3312
  record.expanded = true;
3113
3313
  }
3114
3314
  else if (!(_this.parent.enableVirtualization && !_this.parent.loadChildOnDemand)) {
3115
3315
  record.expanded = false;
3116
3316
  }
3117
3317
  }
3118
- var exists = datas.some(function (data) { return data["" + _this.parent.idMapping] === record[_this.parent.idMapping]; });
3318
+ var exists = datas.some(function (data) { return data["" + idMapping] === record["" + idMapping]; });
3119
3319
  if (!exists) {
3120
3320
  datas.splice(inx + r + 1, 0, record);
3121
3321
  }
@@ -3123,7 +3323,7 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
3123
3323
  for (var r = 0; r < result.length; r++) {
3124
3324
  _loop_2(r);
3125
3325
  }
3126
- var localIdMapping = _this.parent.idMapping;
3326
+ var localIdMapping = idMapping;
3127
3327
  if (_this.parent.enableVirtualization && _this.parent.loadChildOnDemand) {
3128
3328
  datas.sort(function (firstRecord, secondRecord) {
3129
3329
  return firstRecord["" + localIdMapping] - secondRecord["" + localIdMapping];
@@ -3160,6 +3360,7 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
3160
3360
  _this.parent.notify('infinite-remote-expand', notifyArgs);
3161
3361
  }
3162
3362
  else {
3363
+ virtualArgs = _this.parent.enableDomVirtualization ? { requestType: 'refresh' } : virtualArgs;
3163
3364
  getValue('grid.renderModule', _this.parent).dataManagerSuccess(e, virtualArgs);
3164
3365
  }
3165
3366
  _this.parent.trigger(expanded, args);
@@ -3191,100 +3392,123 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
3191
3392
  }
3192
3393
  }
3193
3394
  };
3194
- DataManipulation.prototype.createRecords = function (data, parentRecords) {
3395
+ DataManipulation.prototype.createConvertRecords = function (data, parentRecords) {
3195
3396
  var treeGridData = [];
3397
+ var flatData = this.parent.flatData;
3398
+ var parentData = this.parent.parentData;
3196
3399
  var keys = Object.keys(data);
3197
- for (var i = 0, len = keys.length; i < len; i++) {
3198
- var currentData = extend$1({}, data[parseInt(i.toString(), 10)]);
3400
+ var levelBase = 0;
3401
+ var parentItem = null;
3402
+ var parentUniqueID = null;
3403
+ if (!isNullOrUndefined(parentRecords)) {
3404
+ parentItem = __assign({}, parentRecords);
3405
+ delete parentItem.childRecords;
3406
+ delete parentItem[this.childMapping];
3407
+ if (this.isSelfReference) {
3408
+ delete parentItem.taskData[this.childMapping];
3409
+ }
3410
+ levelBase = (parentItem.level || 0) + 1;
3411
+ parentUniqueID = parentItem.uniqueID;
3412
+ }
3413
+ for (var i = 0; i < keys.length; i++) {
3414
+ var currentData = __assign({}, data[parseInt(i.toString(), 10)]);
3199
3415
  currentData.taskData = data[parseInt(i.toString(), 10)];
3200
- var level = 0;
3201
- this.storedIndex++;
3202
- if (!Object.prototype.hasOwnProperty.call(currentData, 'index')) {
3416
+ if (!currentData.index) {
3417
+ this.storedIndex++;
3203
3418
  currentData.index = this.storedIndex;
3204
3419
  }
3205
- var childMapping = currentData[this.parent.childMapping];
3206
- var hasChildren = !isNullOrUndefined(childMapping) && childMapping.length > 0;
3207
- var shouldCount = isCountRequired(this.parent);
3208
- var hasChildMapping = currentData[this.parent.hasChildMapping];
3209
- if ((hasChildren && !shouldCount) || (hasChildMapping && shouldCount)) {
3210
- currentData.hasChildRecords = true;
3211
- }
3212
3420
  else {
3213
- currentData.hasChildRecords = false;
3421
+ this.storedIndex++;
3214
3422
  }
3215
- if ((!isNullOrUndefined(childMapping) && !shouldCount) ||
3216
- (hasChildMapping) && shouldCount) {
3217
- if (this.parent.enableCollapseAll || !isNullOrUndefined(this.parent.dataStateChange)
3218
- && isNullOrUndefined(childMapping)) {
3423
+ var childMapping = currentData[this.childMapping];
3424
+ var hasChildren = childMapping && childMapping.length > 0;
3425
+ var hasChildMapping = currentData[this.hasChildMapping];
3426
+ currentData.hasChildRecords = ((hasChildren && !this.isCountRequired) ||
3427
+ (hasChildMapping && this.isCountRequired)) ? true : false;
3428
+ if (currentData.hasChildRecords) {
3429
+ if (this.enableCollapseAll || (!isNullOrUndefined(this.parent.dataStateChange) && !childMapping)) {
3219
3430
  currentData.expanded = false;
3220
3431
  }
3221
3432
  else {
3222
- currentData.expanded = !isNullOrUndefined(currentData[this.parent.expandStateMapping])
3223
- ? currentData[this.parent.expandStateMapping] : true;
3433
+ currentData.expanded = !isNullOrUndefined(currentData["" + this.expandStateMapping]) ? currentData["" + this.expandStateMapping] : true;
3224
3434
  }
3225
3435
  }
3226
- if (this.isSelfReference && isNullOrUndefined(currentData[this.parent.parentIdMapping])) {
3227
- this.parent.parentData.push(currentData);
3436
+ if (this.isSelfReference && !currentData["" + this.parentIdMapping]) {
3437
+ parentData.push(currentData);
3228
3438
  }
3229
- currentData.uniqueID = getUid(this.parent.element.id + '_data_');
3230
- this.parent.uniqueIDCollection[currentData.uniqueID] = currentData;
3231
- if (!isNullOrUndefined(parentRecords)) {
3232
- var parentData = extend$1({}, parentRecords);
3233
- delete parentData.childRecords;
3234
- delete parentData[this.parent.childMapping];
3235
- if (this.isSelfReference) {
3236
- delete parentData.taskData[this.parent.childMapping];
3237
- }
3238
- currentData.parentItem = parentData;
3239
- currentData.parentUniqueID = parentData.uniqueID;
3240
- level = parentRecords.level + 1;
3439
+ currentData.uniqueID = getUid(this.cachedElementId);
3440
+ this.uniqueIDCollection[currentData.uniqueID] = currentData;
3441
+ if (parentItem) {
3442
+ currentData.parentItem = parentItem;
3443
+ currentData.parentUniqueID = parentUniqueID;
3444
+ currentData.level = levelBase;
3241
3445
  }
3242
- if (!Object.prototype.hasOwnProperty.call(currentData, 'level')) {
3243
- currentData.level = level;
3446
+ else {
3447
+ currentData.level = 0;
3244
3448
  }
3245
3449
  currentData.checkboxState = 'uncheck';
3246
- var remoteCollapsedData = 'remoteCollapsedData';
3247
- if (this.parent.enableVirtualization && !this.parent.loadChildOnDemand && isRemoteData(this.parent)
3248
- && !this.parent.initialRender) {
3249
- if (!currentData.hasChildRecords && isNullOrUndefined(currentData["" + this.parent.parentIdMapping])) {
3450
+ if (this.isVirtualRemote) {
3451
+ if (!currentData.hasChildRecords && !currentData["" + this.parentIdMapping]) {
3250
3452
  currentData.hasChildRecords = true;
3251
- for (var c = 0; c < this.parent["" + remoteCollapsedData].length; c++) {
3252
- if (this.parent["" + remoteCollapsedData][parseInt(c.toString(), 10)]["" + this.parent.idMapping] === currentData["" + this.parent.idMapping]) {
3453
+ var remoteCollapsedLen = this.remoteCollapsedList.length;
3454
+ var currentId = currentData["" + this.idMapping];
3455
+ for (var c = 0; c < remoteCollapsedLen; c++) {
3456
+ if (this.remoteCollapsedList[parseInt(c.toString(), 10)]["" + this.idMapping] === currentId) {
3253
3457
  currentData.expanded = false;
3458
+ break;
3254
3459
  }
3255
3460
  }
3256
3461
  }
3257
- else if (currentData.level === 0 && isNullOrUndefined(parentRecords) && !currentData.hasChildRecords) {
3258
- currentData.level = currentData.level + 1;
3462
+ else if (currentData.level === 0 && !parentRecords && !currentData.hasChildRecords) {
3463
+ currentData.level++;
3259
3464
  }
3260
- if (currentData["" + this.parent.hasChildMapping] && !isNullOrUndefined(currentData["" + this.parent.expandStateMapping])) {
3261
- currentData.expanded = currentData["" + this.parent.expandStateMapping];
3465
+ if (currentData["" + this.parent.hasChildMapping] && currentData["" + this.expandStateMapping] !== undefined) {
3466
+ currentData.expanded = currentData["" + this.expandStateMapping];
3262
3467
  currentData.hasChildRecords = true;
3263
3468
  }
3264
- this.parent.flatData.push(currentData);
3469
+ flatData.push(currentData);
3265
3470
  }
3266
- else if (isNullOrUndefined(currentData["" + this.parent.parentIdMapping]) || currentData.parentItem) {
3267
- if (!isNullOrUndefined(this.parent.rowDropSettings.targetID)) {
3471
+ else if (!currentData["" + this.parentIdMapping] || parentItem) {
3472
+ if (!isNullOrUndefined(this.rowDragAndDropTargetID)) {
3268
3473
  if (!this.parent.rowDragAndDropModule['isDuplicateData'](currentData)) {
3269
- this.parent.flatData.push(currentData);
3474
+ flatData.push(currentData);
3270
3475
  }
3271
3476
  }
3272
3477
  else {
3273
- this.parent.flatData.push(currentData);
3478
+ flatData.push(currentData);
3274
3479
  }
3275
- this.parent['infiniteScrollData'].push(currentData);
3480
+ this.infiniteScrollData.push(currentData);
3276
3481
  }
3277
3482
  if (!this.isSelfReference && currentData.level === 0) {
3278
- this.parent.parentData.push(currentData);
3483
+ parentData.push(currentData);
3279
3484
  }
3280
- if (!isNullOrUndefined(currentData[this.parent.childMapping] && currentData[this.parent.childMapping].length)) {
3281
- var record = this.createRecords(currentData[this.parent.childMapping], currentData);
3282
- currentData.childRecords = record;
3485
+ if (hasChildren) {
3486
+ currentData.childRecords = this.createConvertRecords(childMapping, currentData);
3283
3487
  }
3284
3488
  treeGridData.push(currentData);
3285
3489
  }
3286
3490
  return treeGridData;
3287
3491
  };
3492
+ DataManipulation.prototype.createRecords = function (data) {
3493
+ this.childMapping = this.parent.childMapping;
3494
+ this.hasChildMapping = this.parent.hasChildMapping;
3495
+ this.expandStateMapping = this.parent.expandStateMapping;
3496
+ this.parentIdMapping = this.parent.parentIdMapping;
3497
+ this.idMapping = this.parent.idMapping;
3498
+ this.cachedElementId = this.parent.element.id + '_data_';
3499
+ this.loadChildOnDemand = this.parent.loadChildOnDemand;
3500
+ this.initialRender = this.parent.initialRender;
3501
+ this.isCountRequired = isCountRequired(this.parent);
3502
+ this.rowDragAndDropTargetID = this.parent.rowDropSettings.targetID;
3503
+ this.isVirtualRemote = this.parent.enableVirtualization && !this.loadChildOnDemand &&
3504
+ isRemoteData(this.parent) && !this.initialRender;
3505
+ this.isRemoteData = isRemoteData(this.parent);
3506
+ var remoteCollapsedData = 'remoteCollapsedData';
3507
+ this.remoteCollapsedList = this.isVirtualRemote ? this.parent["" + remoteCollapsedData] : [];
3508
+ this.infiniteScrollData = this.parent['infiniteScrollData'];
3509
+ this.uniqueIDCollection = this.parent.uniqueIDCollection;
3510
+ return this.createConvertRecords(data);
3511
+ };
3288
3512
  /**
3289
3513
  * Function to perform filtering/sorting action for local data
3290
3514
  *
@@ -3325,8 +3549,9 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
3325
3549
  dataObj = expresults;
3326
3550
  }
3327
3551
  else {
3328
- dataObj = isCountRequired(this.parent) ? getValue('result', this.parent.grid.dataSource)
3329
- : this.parent.grid.dataSource;
3552
+ dataObj = isCountRequired(this.parent) ? getValue('result', this.parent.grid.dataSource) :
3553
+ this.parent.enableDomVirtualization && (action === 'collapse' || action === 'expand') ? args.result
3554
+ : this.parent.grid.dataSource;
3330
3555
  }
3331
3556
  var results = dataObj instanceof DataManager ? dataObj.dataSource.json : dataObj;
3332
3557
  var count = isCountRequired(this.parent) ? getValue('count', this.parent.dataSource)
@@ -3385,6 +3610,9 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
3385
3610
  }
3386
3611
  count = isCountRequired(this.parent) ? getValue('count', this.parent.dataSource)
3387
3612
  : results.length;
3613
+ if (this.parent.enableDomVirtualization) {
3614
+ this.parent.virtualDomScrollData = results;
3615
+ }
3388
3616
  var temp = this.paging(results, count, isExport, isPrinting, exportType, args);
3389
3617
  results = temp.result;
3390
3618
  count = temp.count;
@@ -3400,9 +3628,9 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
3400
3628
  count = isCountRequired(this.parent) ? getValue('count', this.parent.dataSource)
3401
3629
  : this.dataResults.count;
3402
3630
  }
3403
- else if ((this.parent.enableVirtualization || this.parent.enableInfiniteScrolling) && (!isExport || exportType === 'CurrentPage')
3404
- && getValue('requestType', args) !== 'save') {
3405
- var actArgs = this.parent.enableInfiniteScrolling ? args : getValue('actionArgs', args);
3631
+ else if ((this.parent.enableVirtualization || this.parent.enableInfiniteScrolling || this.parent.enableDomVirtualization) &&
3632
+ (!isExport || exportType === 'CurrentPage') && getValue('requestType', args) !== 'save') {
3633
+ var actArgs = this.parent.enableInfiniteScrolling || this.parent.enableDomVirtualization ? args : getValue('actionArgs', args);
3406
3634
  this.parent.notify(pagingActions, { result: results, count: count, actionArgs: actArgs });
3407
3635
  results = this.dataResults.result;
3408
3636
  count = this.dataResults.count;
@@ -3868,9 +4096,9 @@ function editAction(details, control, isSelfReference, addRowIndex, selectedInde
3868
4096
  else {
3869
4097
  if (action === 'edit') {
3870
4098
  for (j = 0; j < keys.length; j++) {
3871
- if (Object.prototype.hasOwnProperty.call(treeData[parseInt(i.toString(), 10)], keys[parseInt(j.toString(), 10)]) && ((control.editSettings.mode !== 'Cell'
3872
- || (!isNullOrUndefined(batchChanges) && batchChanges["" + changedRecords].length === 0))
3873
- || keys[parseInt(j.toString(), 10)] === columnName)) {
4099
+ if (Object.prototype.hasOwnProperty.call(treeData[parseInt(i.toString(), 10)], keys[parseInt(j.toString(), 10)]) &&
4100
+ ((!isNullOrUndefined(control.editSettings.mode) || (!isNullOrUndefined(batchChanges) && batchChanges["" + changedRecords].length === 0))
4101
+ || keys[parseInt(j.toString(), 10)] === columnName)) {
3874
4102
  var editedData = getParentData(control, modifiedData[parseInt(k.toString(), 10)].uniqueID);
3875
4103
  treeData[parseInt(i.toString(), 10)][keys[parseInt(j.toString(), 10)]] =
3876
4104
  modifiedData[parseInt(k.toString(), 10)][keys[parseInt(j.toString(), 10)]];
@@ -4023,16 +4251,11 @@ function removeChildRecords(childRecords, modifiedData, action, key, control, is
4023
4251
  var editedData = getParentData(control, modifiedData.uniqueID);
4024
4252
  for (var i = 0; i < keys.length; i++) {
4025
4253
  if (Object.prototype.hasOwnProperty.call(childRecords[parseInt(j.toString(), 10)], keys[parseInt(i.toString(), 10)]) &&
4026
- (control.editSettings.mode !== 'Cell' || keys[parseInt(i.toString(), 10)] === columnName)) {
4254
+ (!isNullOrUndefined(control.editSettings.mode) || keys[parseInt(i.toString(), 10)] === columnName)) {
4027
4255
  editedData[keys[parseInt(i.toString(), 10)]] =
4028
4256
  editedData.taskData[keys[parseInt(i.toString(), 10)]] =
4029
4257
  childRecords[parseInt(j.toString(), 10)][keys[parseInt(i.toString(), 10)]] =
4030
4258
  modifiedData[keys[parseInt(i.toString(), 10)]];
4031
- if (control.grid.editSettings.mode === 'Normal' && control.editSettings.mode === 'Cell' && !isNullOrUndefined(control.grid.editModule)) {
4032
- var editModule = 'editModule';
4033
- control.grid.editModule["" + editModule].editRowIndex = modifiedData.index;
4034
- control.grid.editModule["" + editModule].updateCurrentViewData(modifiedData);
4035
- }
4036
4259
  }
4037
4260
  }
4038
4261
  break;
@@ -4308,6 +4531,62 @@ var __decorate$c = (undefined && undefined.__decorate) || function (decorators,
4308
4531
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
4309
4532
  return c > 3 && r && Object.defineProperty(target, key, r), r;
4310
4533
  };
4534
+ /**
4535
+ * Configures the DOM virtualization settings for TreeGrid.
4536
+ */
4537
+ var DomVirtualizationSettings = /** @__PURE__ @class */ (function (_super) {
4538
+ __extends$e(DomVirtualizationSettings, _super);
4539
+ function DomVirtualizationSettings() {
4540
+ return _super !== null && _super.apply(this, arguments) || this;
4541
+ }
4542
+ __decorate$c([
4543
+ Property('Row')
4544
+ ], DomVirtualizationSettings.prototype, "virtualDomType", void 0);
4545
+ __decorate$c([
4546
+ Property(5)
4547
+ ], DomVirtualizationSettings.prototype, "rowBuffer", void 0);
4548
+ __decorate$c([
4549
+ Property(0)
4550
+ ], DomVirtualizationSettings.prototype, "scrollThrottle", void 0);
4551
+ __decorate$c([
4552
+ Property(500)
4553
+ ], DomVirtualizationSettings.prototype, "maxPoolSize", void 0);
4554
+ __decorate$c([
4555
+ Property(false)
4556
+ ], DomVirtualizationSettings.prototype, "autoRowHeight", void 0);
4557
+ return DomVirtualizationSettings;
4558
+ }(ChildProperty));
4559
+
4560
+ var __extends$f = (undefined && undefined.__extends) || (function () {
4561
+ var extendStatics = function (d, b) {
4562
+ extendStatics = Object.setPrototypeOf ||
4563
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
4564
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
4565
+ return extendStatics(d, b);
4566
+ };
4567
+ return function (d, b) {
4568
+ extendStatics(d, b);
4569
+ function __() { this.constructor = d; }
4570
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
4571
+ };
4572
+ })();
4573
+ var __assign$1 = (undefined && undefined.__assign) || function () {
4574
+ __assign$1 = Object.assign || function(t) {
4575
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4576
+ s = arguments[i];
4577
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
4578
+ t[p] = s[p];
4579
+ }
4580
+ return t;
4581
+ };
4582
+ return __assign$1.apply(this, arguments);
4583
+ };
4584
+ var __decorate$d = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
4585
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4586
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4587
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
4588
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
4589
+ };
4311
4590
  /**
4312
4591
  * Represents the TreeGrid component.
4313
4592
  * ```html
@@ -4319,13 +4598,15 @@ var __decorate$c = (undefined && undefined.__decorate) || function (decorators,
4319
4598
  * ```
4320
4599
  */
4321
4600
  var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4322
- __extends$e(TreeGrid, _super);
4601
+ __extends$f(TreeGrid, _super);
4323
4602
  function TreeGrid(options, element) {
4324
4603
  var _this = _super.call(this, options, element) || this;
4325
4604
  _this.dataResults = {};
4326
4605
  /** @hidden */
4327
4606
  _this.uniqueIDCollection = {};
4328
4607
  /** @hidden */
4608
+ _this.uniqueIDCollpaseCollection = {};
4609
+ /** @hidden */
4329
4610
  _this.uniqueIDFilterCollection = {};
4330
4611
  _this.changedRecords = 'changedRecords';
4331
4612
  _this.deletedRecords = 'deletedRecords';
@@ -4570,6 +4851,8 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4570
4851
  }
4571
4852
  this.TreeGridLocale();
4572
4853
  this.initProperties();
4854
+ this.autoCheckHierarchy = (this.hierarchyCheckboxMode === 'hierarchy' || this.hierarchyCheckboxMode === 'filteredHierarchy')
4855
+ ? true : false;
4573
4856
  this.defaultLocale = {
4574
4857
  Above: 'Above',
4575
4858
  Below: 'Below',
@@ -4622,7 +4905,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4622
4905
  };
4623
4906
  /**
4624
4907
  * Searches for TreeGrid records using a specified search string.
4625
- * Customize the search behavior through the [searchSettings](./#searchsettings/).
4908
+ * Customize the search behavior through the [searchSettings](./index-default#searchsettings).
4626
4909
  *
4627
4910
  * @param {string} searchString - The string used as the search key.
4628
4911
  * @returns {void}
@@ -4670,7 +4953,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4670
4953
  };
4671
4954
  /**
4672
4955
  * Prints all the pages of the TreeGrid and hides the pager by default.
4673
- * Customize print options using the [printMode](./#printmode).
4956
+ * Customize print options using the [printMode](./index-default#printmode).
4674
4957
  *
4675
4958
  * @returns {void}
4676
4959
  */
@@ -4685,6 +4968,20 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4685
4968
  var row = void 0;
4686
4969
  var summaryElement = void 0;
4687
4970
  switch (e.action) {
4971
+ case 'space': {
4972
+ target = e.target;
4973
+ var checkboxWrapper = target && target.closest('.e-checkbox-wrapper');
4974
+ var headerCheckbox = checkboxWrapper && checkboxWrapper.querySelector('.e-treeselectall');
4975
+ if (headerCheckbox && this.selectionModule) {
4976
+ if (this.selectionModule['headerSelectionState'] === 'check') {
4977
+ this.selectionModule['headerSelection'](false);
4978
+ }
4979
+ else {
4980
+ this.selectionModule['headerSelection'](true);
4981
+ }
4982
+ }
4983
+ break;
4984
+ }
4688
4985
  case 'ctrlDownArrow':
4689
4986
  this.expandAll();
4690
4987
  break;
@@ -4819,7 +5116,8 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4819
5116
  ctrlShiftUpArrow: 'ctrl+shift+uparrow',
4820
5117
  ctrlShiftDownArrow: 'ctrl+shift+downarrow',
4821
5118
  downArrow: 'downArrow',
4822
- upArrow: 'upArrow'
5119
+ upArrow: 'upArrow',
5120
+ space: 'space'
4823
5121
  };
4824
5122
  this.isLocalData = (!(this.dataSource instanceof DataManager) || this.dataSource.dataSource.offline
4825
5123
  || (!isNullOrUndefined(this.dataSource.ready)) || this.dataSource.adaptor instanceof RemoteSaveAdaptor);
@@ -5004,7 +5302,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5004
5302
  name: 'Selection'
5005
5303
  });
5006
5304
  }
5007
- if (this.enableVirtualization) {
5305
+ if (this.enableVirtualization && !this.enableDomVirtualization) {
5008
5306
  modules.push({
5009
5307
  member: 'virtualScroll',
5010
5308
  args: [this],
@@ -5018,6 +5316,13 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5018
5316
  name: 'InfiniteScroll'
5019
5317
  });
5020
5318
  }
5319
+ if (this.enableDomVirtualization) {
5320
+ modules.push({
5321
+ member: 'domVirtualization',
5322
+ args: [this],
5323
+ name: 'DomVirtualization'
5324
+ });
5325
+ }
5021
5326
  modules.push({
5022
5327
  member: 'logger',
5023
5328
  args: [this.grid]
@@ -5122,7 +5427,10 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5122
5427
  var modules = [];
5123
5428
  modules = gridRequiredModules.apply(this);
5124
5429
  for (var i = 0; i < modules.length; i++) {
5125
- if (modules[parseInt(i.toString(), 10)].member === 'virtualscroll') {
5430
+ if (modules[parseInt(i.toString(), 10)].member === 'domVirtualization') {
5431
+ modules[parseInt(i.toString(), 10)].member = 'treeDomVirtualization';
5432
+ }
5433
+ else if (modules[parseInt(i.toString(), 10)].member === 'virtualscroll') {
5126
5434
  modules[parseInt(i.toString(), 10)].member = 'treeVirtualScroll';
5127
5435
  }
5128
5436
  }
@@ -5322,6 +5630,8 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5322
5630
  this.grid.allowSorting = this.allowSorting;
5323
5631
  this.grid.allowMultiSorting = this.allowMultiSorting;
5324
5632
  this.grid.allowFiltering = this.allowFiltering;
5633
+ this.grid.enableDomVirtualization = this.enableDomVirtualization;
5634
+ this.grid.domVirtualizationSettings = this.domVirtualizationSettings;
5325
5635
  this.grid.enableVirtualization = this.enableVirtualization;
5326
5636
  this.grid.enableColumnVirtualization = this.enableColumnVirtualization;
5327
5637
  this.grid.enableInfiniteScrolling = this.enableInfiniteScrolling;
@@ -5424,7 +5734,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5424
5734
  _this.trigger(rowDeselecting, args);
5425
5735
  };
5426
5736
  this.grid.rowSelected = function (args) {
5427
- if (_this.enableVirtualization) {
5737
+ if (_this.enableVirtualization && !_this.enableDomVirtualization) {
5428
5738
  _this.virtualScrollModule.updateSelection(args);
5429
5739
  }
5430
5740
  _this.selectedRowIndex = _this.grid.selectedRowIndex;
@@ -5583,8 +5893,13 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5583
5893
  var dataSource = 'dataSource';
5584
5894
  var requestType = getObject('action', args);
5585
5895
  if (((isRemoteData(treeGrid) && !isOffline(treeGrid)) || isCountRequired(this)) && requestType !== 'edit') {
5586
- treeGrid.notify('updateRemoteLevel', args);
5587
- args = (treeGrid.dataResults);
5896
+ if (this.enableDomVirtualization && requestType === 'collapse' && !this.enableVirtualization) {
5897
+ args.result = args.result.slice();
5898
+ }
5899
+ else {
5900
+ treeGrid.notify('updateRemoteLevel', args);
5901
+ args = (treeGrid.dataResults);
5902
+ }
5588
5903
  }
5589
5904
  else if (treeGrid.flatData.length === 0 && isOffline(treeGrid) && treeGrid.dataSource instanceof DataManager) {
5590
5905
  var dm = treeGrid.dataSource;
@@ -5792,6 +6107,14 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5792
6107
  TreeGrid.prototype.extendedGridActionEvents = function () {
5793
6108
  var _this = this;
5794
6109
  this.grid.actionBegin = function (args) {
6110
+ var newArgs = __assign$1({}, args);
6111
+ var changeArgs = false;
6112
+ if (newArgs.requestType === 'save' && _this['isGantt'] && !isNullOrUndefined(_this.editSettings)
6113
+ && _this.editSettings.mode === 'Cell') {
6114
+ delete newArgs.requestType;
6115
+ newArgs.type = 'save';
6116
+ changeArgs = true;
6117
+ }
5795
6118
  if (args.requestType === 'sorting' && args.target && args.target.parentElement &&
5796
6119
  args.target.parentElement.classList.contains('e-hierarchycheckbox')) {
5797
6120
  args.cancel = true;
@@ -5828,7 +6151,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5828
6151
  }
5829
6152
  if (_this.action !== 'indenting' && _this.action !== 'outdenting') {
5830
6153
  var callBackPromise_2 = new Deferred();
5831
- _this.trigger(actionBegin, args, function (actionArgs) {
6154
+ _this.trigger(actionBegin, changeArgs ? newArgs : args, function (actionArgs) {
5832
6155
  if (!actionArgs.cancel) {
5833
6156
  _this.notify(beginEdit, actionArgs);
5834
6157
  }
@@ -5838,6 +6161,14 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5838
6161
  }
5839
6162
  };
5840
6163
  this.grid.actionComplete = function (args) {
6164
+ var newArgs = __assign$1({}, args);
6165
+ var changeArgs = false;
6166
+ if (newArgs.requestType === 'save' && _this['isGantt'] && !isNullOrUndefined(_this.editSettings)
6167
+ && _this.editSettings.mode === 'Cell') {
6168
+ delete newArgs.requestType;
6169
+ newArgs.type = 'save';
6170
+ changeArgs = true;
6171
+ }
5841
6172
  _this.notify('actioncomplete', args);
5842
6173
  _this.updateColumnModel();
5843
6174
  _this.updateTreeGridModel();
@@ -5886,7 +6217,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5886
6217
  var frozenContent$1 = _this.grid.element.querySelector('.' + frozenContent);
5887
6218
  movableContent$1.style.height = frozenContent$1.style.height = 'auto';
5888
6219
  }
5889
- _this.trigger(actionComplete, args);
6220
+ _this.trigger(actionComplete, changeArgs ? newArgs : args);
5890
6221
  }
5891
6222
  };
5892
6223
  };
@@ -6014,7 +6345,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6014
6345
  edit.mode = 'Normal';
6015
6346
  break;
6016
6347
  case 'Cell':
6017
- edit.mode = 'Normal';
6348
+ edit.mode = this.editSettings.mode;
6018
6349
  edit.showConfirmDialog = false;
6019
6350
  break;
6020
6351
  }
@@ -6225,6 +6556,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6225
6556
  case 'enableVirtualization':
6226
6557
  this.grid.enableVirtualization = this.enableVirtualization;
6227
6558
  break;
6559
+ case 'enableDomVirtualization':
6560
+ this.grid.enableDomVirtualization = this.enableDomVirtualization;
6561
+ break;
6228
6562
  case 'enableColumnVirtualization':
6229
6563
  this.grid.enableColumnVirtualization = this.enableColumnVirtualization;
6230
6564
  break;
@@ -6432,6 +6766,10 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6432
6766
  this.grid.enableColumnSpan = this.enableColumnSpan;
6433
6767
  this.refreshColumns();
6434
6768
  break;
6769
+ case 'hierarchyCheckboxMode':
6770
+ this.autoCheckHierarchy = (this.hierarchyCheckboxMode === 'filteredHierarchy' ||
6771
+ this.hierarchyCheckboxMode === 'hierarchy');
6772
+ break;
6435
6773
  }
6436
6774
  }
6437
6775
  if (requireRefresh) {
@@ -6495,6 +6833,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6495
6833
  }
6496
6834
  this.dataResults = null;
6497
6835
  this.uniqueIDCollection = {};
6836
+ this.uniqueIDCollpaseCollection = {};
6498
6837
  this.uniqueIDFilterCollection = {};
6499
6838
  this.element.innerHTML = '';
6500
6839
  this.grid = null;
@@ -6570,6 +6909,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6570
6909
  };
6571
6910
  TreeGrid.prototype.mouseClickHandler = function (e) {
6572
6911
  var _this = this;
6912
+ this.resetDoubleClickTarget();
6573
6913
  if (!isNullOrUndefined(e.touches)) {
6574
6914
  return;
6575
6915
  }
@@ -8090,9 +8430,15 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
8090
8430
  if (!rows.length && this.getRows().length) {
8091
8431
  rows.push(this.getRows()[0]);
8092
8432
  }
8093
- this.isExpandAll = true;
8094
- this.isCollapseAll = true;
8095
- if (((this.allowPaging && (this.pageSettings.pageSizeMode === 'All' || this.pageSettings.pageSizeMode === 'Root')) || this.enableVirtualization || this.enableInfiniteScrolling) && !isRemoteData(this)) {
8433
+ this.isExpandAll = this.enableDomVirtualization ? action !== 'collapse' : true;
8434
+ this.isCollapseAll = this.enableDomVirtualization ? action === 'collapse' : true;
8435
+ if (this.enableDomVirtualization) {
8436
+ var collapseArgs = { data: this.parentData, row: rows[0] };
8437
+ this.trigger(collapsed, collapseArgs);
8438
+ this.notify(virtualExpandCollapse, { action: action, row: rows[0] });
8439
+ this.notify(localPagedExpandCollapse, { action: action, row: rows[0] });
8440
+ }
8441
+ else if (((this.allowPaging && (this.pageSettings.pageSizeMode === 'All' || this.pageSettings.pageSizeMode === 'Root')) || this.enableVirtualization || this.enableInfiniteScrolling) && !isRemoteData(this)) {
8096
8442
  this.flatData.filter(function (e) {
8097
8443
  if (e.hasChildRecords) {
8098
8444
  e.expanded = action === 'collapse' ? false : true;
@@ -8162,64 +8508,65 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
8162
8508
  if (!isNullOrUndefined(row)) {
8163
8509
  row.setAttribute('aria-expanded', action === 'expand' ? 'true' : 'false');
8164
8510
  }
8165
- if (((this.allowPaging && (this.pageSettings.pageSizeMode === 'All' || this.pageSettings.pageSizeMode === 'Root')) || this.enableVirtualization) && !isRemoteData(this)
8511
+ if (((this.allowPaging && (this.pageSettings.pageSizeMode === 'All' || this.pageSettings.pageSizeMode === 'Root')) || this.enableVirtualization || this.enableDomVirtualization) && !isRemoteData(this)
8166
8512
  && !isCountRequired(this)) {
8513
+ this.notify(virtualExpandCollapse, { action: action, row: row, record: record });
8167
8514
  this.notify(localPagedExpandCollapse, { action: action, row: row, record: record });
8168
8515
  }
8169
8516
  else {
8170
- var displayAction = void 0;
8171
- if (action === 'expand') {
8172
- displayAction = 'e-childrow-visible';
8173
- if (!isChild) {
8174
- record.expanded = true;
8175
- this.flatData.forEach(function (e) {
8176
- e.expanded = e.uniqueID === record.uniqueID && e.expanded !== record.expanded ? record.expanded : e.expanded;
8177
- });
8178
- this.uniqueIDCollection[record.uniqueID].expanded = record.expanded;
8179
- }
8180
- if (!isNullOrUndefined(row)) {
8181
- targetEle = row.getElementsByClassName('e-treegridcollapse')[0];
8182
- }
8183
- if (isChild && !isNullOrUndefined(record[this.expandStateMapping]) &&
8184
- record[this.expandStateMapping] && isNullOrUndefined(targetEle)) {
8185
- targetEle = row.getElementsByClassName('e-treegridexpand')[0];
8186
- }
8187
- if (isNullOrUndefined(targetEle)) {
8188
- return;
8189
- }
8190
- if (!targetEle.classList.contains('e-treegridexpand')) {
8191
- addClass([targetEle], 'e-treegridexpand');
8517
+ var isExpand = action === 'expand';
8518
+ var displayAction = isExpand ? 'e-childrow-visible' : 'e-childrow-hidden';
8519
+ var expandStateMap = this.expandStateMapping;
8520
+ var recordUniqueID = record.uniqueID;
8521
+ if (!isChild) {
8522
+ record.expanded = isExpand;
8523
+ var flatRecord = this.flatData[record.index];
8524
+ if (!isNullOrUndefined(flatRecord)) {
8525
+ flatRecord.expanded = flatRecord.uniqueID === record.uniqueID &&
8526
+ flatRecord.expanded !== record.expanded ? record.expanded : flatRecord.expanded;
8527
+ }
8528
+ this.uniqueIDCollection["" + recordUniqueID].expanded = isExpand;
8529
+ }
8530
+ else if (isExpand || isCountRequired(this)) {
8531
+ record.expanded = isExpand;
8532
+ var flatRecord = this.flatData[record.index];
8533
+ if (!isNullOrUndefined(flatRecord)) {
8534
+ flatRecord.expanded = flatRecord.uniqueID === record.uniqueID &&
8535
+ flatRecord.expanded !== record.expanded ? record.expanded : flatRecord.expanded;
8536
+ }
8537
+ this.uniqueIDCollection["" + recordUniqueID].expanded = isExpand;
8538
+ }
8539
+ if (!isNullOrUndefined(row)) {
8540
+ var collapseEle = row.getElementsByClassName('e-treegridcollapse')[0];
8541
+ var expandEle = row.getElementsByClassName('e-treegridexpand')[0];
8542
+ targetEle = isExpand ? collapseEle : expandEle;
8543
+ if (isChild && !isNullOrUndefined(record["" + expandStateMap]) &&
8544
+ ((isExpand && record["" + expandStateMap]) || (!isExpand && !record["" + expandStateMap])) &&
8545
+ isNullOrUndefined(targetEle)) {
8546
+ targetEle = isExpand ? expandEle : collapseEle;
8547
+ }
8548
+ }
8549
+ if (isNullOrUndefined(targetEle)) {
8550
+ return;
8551
+ }
8552
+ var targetClsList = targetEle.classList;
8553
+ var expandClass = 'e-treegridexpand';
8554
+ var collapseClass = 'e-treegridcollapse';
8555
+ if (isExpand) {
8556
+ if (!targetClsList.contains(expandClass)) {
8557
+ addClass([targetEle], expandClass);
8558
+ removeClass([targetEle], collapseClass);
8192
8559
  }
8193
- removeClass([targetEle], 'e-treegridcollapse');
8194
8560
  }
8195
8561
  else {
8196
- displayAction = 'e-childrow-hidden';
8197
- if (!isChild || isCountRequired(this)) {
8198
- record.expanded = false;
8199
- this.flatData.forEach(function (e) {
8200
- e.expanded = e.uniqueID === record.uniqueID && e.expanded !== record.expanded ? record.expanded : e.expanded;
8201
- });
8202
- this.uniqueIDCollection[record.uniqueID].expanded = record.expanded;
8203
- }
8204
- if (!isNullOrUndefined(row)) {
8205
- targetEle = row.getElementsByClassName('e-treegridexpand')[0];
8206
- }
8207
- if (isChild && !isNullOrUndefined(record[this.expandStateMapping]) &&
8208
- !record[this.expandStateMapping] && isNullOrUndefined(targetEle)) {
8209
- targetEle = row.getElementsByClassName('e-treegridcollapse')[0];
8210
- }
8211
- if (isNullOrUndefined(targetEle)) {
8212
- return;
8562
+ if (!targetClsList.contains(collapseClass)) {
8563
+ addClass([targetEle], collapseClass);
8564
+ removeClass([targetEle], expandClass);
8213
8565
  }
8214
- if (!targetEle.classList.contains('e-treegridcollapse')) {
8215
- addClass([targetEle], 'e-treegridcollapse');
8216
- }
8217
- removeClass([targetEle], 'e-treegridexpand');
8218
8566
  }
8219
- row.querySelectorAll('.e-treerowcell')[0].setAttribute('aria-expanded', action === 'expand' ? 'true' : 'false');
8220
- var detailrows = gridRows.filter(function (r) {
8221
- return r.classList.contains('e-griddetailrowindex' + record.index + 'level' + (record.level + 1));
8222
- });
8567
+ row.querySelectorAll('.e-treerowcell')[0].setAttribute('aria-expanded', isExpand ? 'true' : 'false');
8568
+ var detailRowClass_1 = 'e-griddetailrowindex' + record.index + 'level' + (record.level + 1);
8569
+ var detailrows = gridRows.filter(function (r) { return r.classList.contains(detailRowClass_1); });
8223
8570
  if (isRemoteData(this) && !isOffline(this)) {
8224
8571
  this.remoteExpand(action, row, record);
8225
8572
  }
@@ -8230,29 +8577,37 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
8230
8577
  if (this.enableInfiniteScrolling && action === 'collapse' && !this.isCollapseAll) {
8231
8578
  this.notify(collapseActionComplete, { isCollapse: true, data: record, row: row });
8232
8579
  }
8233
- var lastrowIdx = this.getVisibleRecords()[this.getVisibleRecords().length - 1]['index'];
8234
- var lastRow = this.getRowByIndex(lastrowIdx);
8235
- var borderElement = lastRow ? lastRow.nextElementSibling ? lastRow.nextElementSibling.classList.contains('e-detailrow') ? lastRow.nextElementSibling : lastRow : lastRow : null;
8236
- if (!this.isInfiniteCollapse && this.grid.getContentTable().clientHeight <= this.grid.getContent().clientHeight && !isNullOrUndefined(borderElement) && !borderElement.cells[0].classList.contains('e-lastrowcell')) {
8237
- this.lastRowBorder(borderElement, true);
8580
+ var visibleRecords = this.getVisibleRecords();
8581
+ var lastRecord = visibleRecords[visibleRecords.length - 1];
8582
+ if (!isNullOrUndefined(lastRecord)) {
8583
+ var lastrowIdx = lastRecord.index;
8584
+ var lastRow = this.getRowByIndex(lastrowIdx);
8585
+ var borderElement = (lastRow ? lastRow.nextElementSibling ? lastRow.nextElementSibling.classList.contains('e-detailrow') ? lastRow.nextElementSibling : lastRow : lastRow : null);
8586
+ if (!this.isInfiniteCollapse && this.grid.getContentTable().clientHeight <= this.grid.getContent().clientHeight && !isNullOrUndefined(borderElement) && !(borderElement.cells[0].classList.contains('e-lastrowcell'))) {
8587
+ this.lastRowBorder(borderElement, true);
8588
+ }
8238
8589
  }
8239
8590
  }
8240
- if (isCountRequired(this) && action === 'expand') {
8591
+ if (isCountRequired(this) && isExpand) {
8241
8592
  var currentData = this.getCurrentViewRecords();
8242
- var visibleRecords = currentData.filter(function (e) {
8593
+ var filteredRecords = currentData.filter(function (e) {
8243
8594
  return getExpandStatus(_this, e, _this.parentData);
8244
8595
  });
8245
- this.dataResults.result = visibleRecords;
8596
+ this.dataResults.result = filteredRecords;
8246
8597
  }
8247
- if (!isNullOrUndefined(targetEle) && targetEle.closest('.e-treerowcell').classList.contains('e-cellselectionbackground')) {
8248
- targetEle.closest('.e-treerowcell').classList.remove('e-cellselectionbackground');
8249
- targetEle.closest('.e-treerowcell').removeAttribute('aria-selected');
8598
+ if (!isNullOrUndefined(targetEle)) {
8599
+ var treeRowCell = targetEle.closest('.e-treerowcell');
8600
+ if (!isNullOrUndefined(treeRowCell) && treeRowCell.classList.contains('e-cellselectionbackground')) {
8601
+ treeRowCell.classList.remove('e-cellselectionbackground');
8602
+ treeRowCell.removeAttribute('aria-selected');
8603
+ }
8250
8604
  }
8251
8605
  if (this.isPixelHeight() && !row.cells[0].classList.contains('e-lastrowcell') && !this.isInfiniteCollapse) {
8252
8606
  var totalRows = this.getRows();
8253
8607
  var rows = this.getContentTable().rows;
8254
8608
  totalRows = [].slice.call(rows);
8255
- for (var i = totalRows.length - 1; i >= 0; i--) {
8609
+ var len = totalRows.length;
8610
+ for (var i = len - 1; i >= 0; i--) {
8256
8611
  if (!isHidden(totalRows[parseInt(i.toString(), 10)])) {
8257
8612
  var table = this.getContentTable();
8258
8613
  var sHeight = table.scrollHeight;
@@ -8393,7 +8748,13 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
8393
8748
  this.dataModule["" + fetchRemoteChildData]({ action: action, record: args.data, rows: null, parentRow: args.row });
8394
8749
  }
8395
8750
  else {
8396
- this.collapseRemoteChild({ record: record, rows: rows });
8751
+ if (this.enableDomVirtualization) {
8752
+ this.notify(virtualExpandCollapse, { action: action, row: row, record: record });
8753
+ this.notify(localPagedExpandCollapse, { action: action, row: row, record: record });
8754
+ }
8755
+ else {
8756
+ this.collapseRemoteChild({ record: record, rows: rows });
8757
+ }
8397
8758
  this.trigger(collapsed, args);
8398
8759
  }
8399
8760
  };
@@ -8669,6 +9030,11 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
8669
9030
  Array.prototype.push.apply(args.elements, cells);
8670
9031
  }
8671
9032
  };
9033
+ TreeGrid.prototype.resetDoubleClickTarget = function () {
9034
+ if (this.editModule) {
9035
+ this.notify('resetDoubleClickTarget', {});
9036
+ }
9037
+ };
8672
9038
  TreeGrid.prototype.partialFilterUpdate = function (args) {
8673
9039
  var gridFiltered = args.gridFiltered;
8674
9040
  if ((this.allowFiltering && this.filterModule && this.grid.filterSettings.columns.length) ||
@@ -9152,424 +9518,433 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
9152
9518
  return this.grid.getRowIndexByPrimaryKey(value);
9153
9519
  };
9154
9520
  var TreeGrid_1;
9155
- __decorate$c([
9521
+ __decorate$d([
9156
9522
  Property(0)
9157
9523
  ], TreeGrid.prototype, "frozenRows", void 0);
9158
- __decorate$c([
9524
+ __decorate$d([
9159
9525
  Property(0)
9160
9526
  ], TreeGrid.prototype, "frozenColumns", void 0);
9161
- __decorate$c([
9527
+ __decorate$d([
9162
9528
  Property('Ellipsis')
9163
9529
  ], TreeGrid.prototype, "clipMode", void 0);
9164
- __decorate$c([
9530
+ __decorate$d([
9165
9531
  Property([])
9166
9532
  ], TreeGrid.prototype, "columns", void 0);
9167
- __decorate$c([
9533
+ __decorate$d([
9168
9534
  Property(null)
9169
9535
  ], TreeGrid.prototype, "childMapping", void 0);
9170
- __decorate$c([
9536
+ __decorate$d([
9171
9537
  Property(null)
9172
9538
  ], TreeGrid.prototype, "hasChildMapping", void 0);
9173
- __decorate$c([
9539
+ __decorate$d([
9174
9540
  Property(0)
9175
9541
  ], TreeGrid.prototype, "treeColumnIndex", void 0);
9176
- __decorate$c([
9542
+ __decorate$d([
9177
9543
  Property(null)
9178
9544
  ], TreeGrid.prototype, "idMapping", void 0);
9179
- __decorate$c([
9545
+ __decorate$d([
9180
9546
  Property(null)
9181
9547
  ], TreeGrid.prototype, "parentIdMapping", void 0);
9182
- __decorate$c([
9548
+ __decorate$d([
9183
9549
  Property(false)
9184
9550
  ], TreeGrid.prototype, "enableCollapseAll", void 0);
9185
- __decorate$c([
9551
+ __decorate$d([
9186
9552
  Property(null)
9187
9553
  ], TreeGrid.prototype, "expandStateMapping", void 0);
9188
- __decorate$c([
9554
+ __decorate$d([
9189
9555
  Property(false)
9190
9556
  ], TreeGrid.prototype, "allowRowDragAndDrop", void 0);
9191
- __decorate$c([
9557
+ __decorate$d([
9192
9558
  Property([])
9193
9559
  ], TreeGrid.prototype, "dataSource", void 0);
9194
- __decorate$c([
9560
+ __decorate$d([
9195
9561
  Property()
9196
9562
  ], TreeGrid.prototype, "query", void 0);
9197
- __decorate$c([
9563
+ __decorate$d([
9198
9564
  Property()
9199
9565
  ], TreeGrid.prototype, "cloneQuery", void 0);
9200
- __decorate$c([
9566
+ __decorate$d([
9201
9567
  Property('AllPages')
9202
9568
  ], TreeGrid.prototype, "printMode", void 0);
9203
- __decorate$c([
9569
+ __decorate$d([
9204
9570
  Property(false)
9205
9571
  ], TreeGrid.prototype, "allowPaging", void 0);
9206
- __decorate$c([
9572
+ __decorate$d([
9207
9573
  Property(true)
9208
9574
  ], TreeGrid.prototype, "loadChildOnDemand", void 0);
9209
- __decorate$c([
9575
+ __decorate$d([
9210
9576
  Property(false)
9211
9577
  ], TreeGrid.prototype, "allowTextWrap", void 0);
9212
- __decorate$c([
9578
+ __decorate$d([
9213
9579
  Complex({}, TextWrapSettings)
9214
9580
  ], TreeGrid.prototype, "textWrapSettings", void 0);
9215
- __decorate$c([
9581
+ __decorate$d([
9216
9582
  Property(false)
9217
9583
  ], TreeGrid.prototype, "allowReordering", void 0);
9218
- __decorate$c([
9584
+ __decorate$d([
9219
9585
  Property(false)
9220
9586
  ], TreeGrid.prototype, "allowResizing", void 0);
9221
- __decorate$c([
9587
+ __decorate$d([
9222
9588
  Property(false)
9223
9589
  ], TreeGrid.prototype, "autoCheckHierarchy", void 0);
9224
- __decorate$c([
9590
+ __decorate$d([
9591
+ Property('self')
9592
+ ], TreeGrid.prototype, "hierarchyCheckboxMode", void 0);
9593
+ __decorate$d([
9225
9594
  Complex({}, PageSettings)
9226
9595
  ], TreeGrid.prototype, "pageSettings", void 0);
9227
- __decorate$c([
9596
+ __decorate$d([
9228
9597
  Complex({}, RowDropSettings$1)
9229
9598
  ], TreeGrid.prototype, "rowDropSettings", void 0);
9230
- __decorate$c([
9599
+ __decorate$d([
9231
9600
  Property('USD')
9232
9601
  ], TreeGrid.prototype, "currencyCode", void 0);
9233
- __decorate$c([
9602
+ __decorate$d([
9234
9603
  Property()
9235
9604
  ], TreeGrid.prototype, "pagerTemplate", void 0);
9236
- __decorate$c([
9605
+ __decorate$d([
9237
9606
  Property(false)
9238
9607
  ], TreeGrid.prototype, "showColumnMenu", void 0);
9239
- __decorate$c([
9608
+ __decorate$d([
9240
9609
  Property(false)
9241
9610
  ], TreeGrid.prototype, "showColumnChooser", void 0);
9242
- __decorate$c([
9611
+ __decorate$d([
9243
9612
  Complex({}, ColumnChooserSettings)
9244
9613
  ], TreeGrid.prototype, "columnChooserSettings", void 0);
9245
- __decorate$c([
9614
+ __decorate$d([
9246
9615
  Property(false)
9247
9616
  ], TreeGrid.prototype, "allowSorting", void 0);
9248
- __decorate$c([
9617
+ __decorate$d([
9249
9618
  Property(true)
9250
9619
  ], TreeGrid.prototype, "allowMultiSorting", void 0);
9251
- __decorate$c([
9620
+ __decorate$d([
9252
9621
  Complex({}, SortSettings)
9253
9622
  ], TreeGrid.prototype, "sortSettings", void 0);
9254
- __decorate$c([
9623
+ __decorate$d([
9255
9624
  Collection([], AggregateRow)
9256
9625
  ], TreeGrid.prototype, "aggregates", void 0);
9257
- __decorate$c([
9626
+ __decorate$d([
9258
9627
  Complex({}, EditSettings)
9259
9628
  ], TreeGrid.prototype, "editSettings", void 0);
9260
- __decorate$c([
9629
+ __decorate$d([
9261
9630
  Property(false)
9262
9631
  ], TreeGrid.prototype, "allowFiltering", void 0);
9263
- __decorate$c([
9632
+ __decorate$d([
9264
9633
  Property()
9265
9634
  ], TreeGrid.prototype, "detailTemplate", void 0);
9266
- __decorate$c([
9635
+ __decorate$d([
9267
9636
  Complex({}, FilterSettings)
9268
9637
  ], TreeGrid.prototype, "filterSettings", void 0);
9269
- __decorate$c([
9638
+ __decorate$d([
9270
9639
  Complex({}, SearchSettings)
9271
9640
  ], TreeGrid.prototype, "searchSettings", void 0);
9272
- __decorate$c([
9641
+ __decorate$d([
9273
9642
  Property()
9274
9643
  ], TreeGrid.prototype, "toolbar", void 0);
9275
- __decorate$c([
9644
+ __decorate$d([
9276
9645
  Property()
9277
9646
  ], TreeGrid.prototype, "toolbarTemplate", void 0);
9278
- __decorate$c([
9647
+ __decorate$d([
9279
9648
  Property('Default')
9280
9649
  ], TreeGrid.prototype, "gridLines", void 0);
9281
- __decorate$c([
9650
+ __decorate$d([
9282
9651
  Property()
9283
9652
  ], TreeGrid.prototype, "contextMenuItems", void 0);
9284
- __decorate$c([
9653
+ __decorate$d([
9285
9654
  Property()
9286
9655
  ], TreeGrid.prototype, "columnMenuItems", void 0);
9287
- __decorate$c([
9656
+ __decorate$d([
9288
9657
  Property()
9289
9658
  ], TreeGrid.prototype, "rowTemplate", void 0);
9290
- __decorate$c([
9659
+ __decorate$d([
9291
9660
  Property('Parent')
9292
9661
  ], TreeGrid.prototype, "copyHierarchyMode", void 0);
9293
- __decorate$c([
9662
+ __decorate$d([
9294
9663
  Property(null)
9295
9664
  ], TreeGrid.prototype, "rowHeight", void 0);
9296
- __decorate$c([
9665
+ __decorate$d([
9297
9666
  Property(true)
9298
9667
  ], TreeGrid.prototype, "enableAltRow", void 0);
9299
- __decorate$c([
9668
+ __decorate$d([
9300
9669
  Property(true)
9301
9670
  ], TreeGrid.prototype, "allowKeyboard", void 0);
9302
- __decorate$c([
9671
+ __decorate$d([
9303
9672
  Property(false)
9304
9673
  ], TreeGrid.prototype, "enableHover", void 0);
9305
- __decorate$c([
9674
+ __decorate$d([
9306
9675
  Property(false)
9307
9676
  ], TreeGrid.prototype, "enableAutoFill", void 0);
9308
- __decorate$c([
9677
+ __decorate$d([
9309
9678
  Property(false)
9310
9679
  ], TreeGrid.prototype, "enableAdaptiveUI", void 0);
9311
- __decorate$c([
9680
+ __decorate$d([
9312
9681
  Property(false)
9313
9682
  ], TreeGrid.prototype, "enableImmutableMode", void 0);
9314
- __decorate$c([
9683
+ __decorate$d([
9315
9684
  Property(false)
9316
9685
  ], TreeGrid.prototype, "enableStickyHeader", void 0);
9317
- __decorate$c([
9686
+ __decorate$d([
9318
9687
  Property()
9319
9688
  ], TreeGrid.prototype, "emptyRecordTemplate", void 0);
9320
- __decorate$c([
9689
+ __decorate$d([
9321
9690
  Property('auto')
9322
9691
  ], TreeGrid.prototype, "height", void 0);
9323
- __decorate$c([
9692
+ __decorate$d([
9324
9693
  Property('auto')
9325
9694
  ], TreeGrid.prototype, "width", void 0);
9326
- __decorate$c([
9695
+ __decorate$d([
9327
9696
  Complex({}, LoadingIndicator)
9328
9697
  ], TreeGrid.prototype, "loadingIndicator", void 0);
9329
- __decorate$c([
9698
+ __decorate$d([
9330
9699
  Property(true)
9331
9700
  ], TreeGrid.prototype, "enableVirtualMaskRow", void 0);
9332
- __decorate$c([
9701
+ __decorate$d([
9333
9702
  Property(false)
9334
9703
  ], TreeGrid.prototype, "enableVirtualization", void 0);
9335
- __decorate$c([
9704
+ __decorate$d([
9336
9705
  Property(false)
9337
9706
  ], TreeGrid.prototype, "enableColumnVirtualization", void 0);
9338
- __decorate$c([
9707
+ __decorate$d([
9339
9708
  Property(false)
9340
9709
  ], TreeGrid.prototype, "enableHtmlSanitizer", void 0);
9341
- __decorate$c([
9710
+ __decorate$d([
9342
9711
  Property(false)
9343
9712
  ], TreeGrid.prototype, "enableInfiniteScrolling", void 0);
9344
- __decorate$c([
9713
+ __decorate$d([
9345
9714
  Complex({}, InfiniteScrollSettings)
9346
9715
  ], TreeGrid.prototype, "infiniteScrollSettings", void 0);
9347
- __decorate$c([
9716
+ __decorate$d([
9717
+ Property(false)
9718
+ ], TreeGrid.prototype, "enableDomVirtualization", void 0);
9719
+ __decorate$d([
9720
+ Complex({}, DomVirtualizationSettings)
9721
+ ], TreeGrid.prototype, "domVirtualizationSettings", void 0);
9722
+ __decorate$d([
9348
9723
  Property('All')
9349
9724
  ], TreeGrid.prototype, "columnQueryMode", void 0);
9350
- __decorate$c([
9725
+ __decorate$d([
9351
9726
  Property(true)
9352
9727
  ], TreeGrid.prototype, "allowSelection", void 0);
9353
- __decorate$c([
9728
+ __decorate$d([
9354
9729
  Property(-1)
9355
9730
  ], TreeGrid.prototype, "selectedRowIndex", void 0);
9356
- __decorate$c([
9731
+ __decorate$d([
9357
9732
  Property(null)
9358
9733
  ], TreeGrid.prototype, "isRowSelectable", void 0);
9359
- __decorate$c([
9734
+ __decorate$d([
9360
9735
  Complex({}, SelectionSettings)
9361
9736
  ], TreeGrid.prototype, "selectionSettings", void 0);
9362
- __decorate$c([
9737
+ __decorate$d([
9363
9738
  Property(false)
9364
9739
  ], TreeGrid.prototype, "allowExcelExport", void 0);
9365
- __decorate$c([
9740
+ __decorate$d([
9366
9741
  Property(false)
9367
9742
  ], TreeGrid.prototype, "allowPdfExport", void 0);
9368
- __decorate$c([
9743
+ __decorate$d([
9369
9744
  Property(false)
9370
9745
  ], TreeGrid.prototype, "enableColumnSpan", void 0);
9371
- __decorate$c([
9746
+ __decorate$d([
9372
9747
  Property(false)
9373
9748
  ], TreeGrid.prototype, "enableRowSpan", void 0);
9374
- __decorate$c([
9749
+ __decorate$d([
9375
9750
  Event()
9376
9751
  ], TreeGrid.prototype, "created", void 0);
9377
- __decorate$c([
9752
+ __decorate$d([
9378
9753
  Event()
9379
9754
  ], TreeGrid.prototype, "load", void 0);
9380
- __decorate$c([
9755
+ __decorate$d([
9381
9756
  Event()
9382
9757
  ], TreeGrid.prototype, "expanding", void 0);
9383
- __decorate$c([
9758
+ __decorate$d([
9384
9759
  Event()
9385
9760
  ], TreeGrid.prototype, "expanded", void 0);
9386
- __decorate$c([
9761
+ __decorate$d([
9387
9762
  Event()
9388
9763
  ], TreeGrid.prototype, "collapsing", void 0);
9389
- __decorate$c([
9764
+ __decorate$d([
9390
9765
  Event()
9391
9766
  ], TreeGrid.prototype, "collapsed", void 0);
9392
- __decorate$c([
9767
+ __decorate$d([
9393
9768
  Event()
9394
9769
  ], TreeGrid.prototype, "cellSave", void 0);
9395
- __decorate$c([
9770
+ __decorate$d([
9396
9771
  Event()
9397
9772
  ], TreeGrid.prototype, "cellSaved", void 0);
9398
- __decorate$c([
9773
+ __decorate$d([
9399
9774
  Event()
9400
9775
  ], TreeGrid.prototype, "actionBegin", void 0);
9401
- __decorate$c([
9776
+ __decorate$d([
9402
9777
  Event()
9403
9778
  ], TreeGrid.prototype, "actionComplete", void 0);
9404
- __decorate$c([
9779
+ __decorate$d([
9405
9780
  Event()
9406
9781
  ], TreeGrid.prototype, "beginEdit", void 0);
9407
- __decorate$c([
9782
+ __decorate$d([
9408
9783
  Event()
9409
9784
  ], TreeGrid.prototype, "batchAdd", void 0);
9410
- __decorate$c([
9785
+ __decorate$d([
9411
9786
  Event()
9412
9787
  ], TreeGrid.prototype, "batchDelete", void 0);
9413
- __decorate$c([
9788
+ __decorate$d([
9414
9789
  Event()
9415
9790
  ], TreeGrid.prototype, "batchCancel", void 0);
9416
- __decorate$c([
9791
+ __decorate$d([
9417
9792
  Event()
9418
9793
  ], TreeGrid.prototype, "beforeBatchAdd", void 0);
9419
- __decorate$c([
9794
+ __decorate$d([
9420
9795
  Event()
9421
9796
  ], TreeGrid.prototype, "beforeBatchDelete", void 0);
9422
- __decorate$c([
9797
+ __decorate$d([
9423
9798
  Event()
9424
9799
  ], TreeGrid.prototype, "beforeBatchSave", void 0);
9425
- __decorate$c([
9800
+ __decorate$d([
9426
9801
  Event()
9427
9802
  ], TreeGrid.prototype, "cellEdit", void 0);
9428
- __decorate$c([
9803
+ __decorate$d([
9429
9804
  Event()
9430
9805
  ], TreeGrid.prototype, "actionFailure", void 0);
9431
- __decorate$c([
9806
+ __decorate$d([
9432
9807
  Event()
9433
9808
  ], TreeGrid.prototype, "dataBound", void 0);
9434
- __decorate$c([
9809
+ __decorate$d([
9435
9810
  Event()
9436
9811
  ], TreeGrid.prototype, "dataSourceChanged", void 0);
9437
- __decorate$c([
9812
+ __decorate$d([
9438
9813
  Event()
9439
9814
  ], TreeGrid.prototype, "dataStateChange", void 0);
9440
- __decorate$c([
9815
+ __decorate$d([
9441
9816
  Event()
9442
9817
  ], TreeGrid.prototype, "recordDoubleClick", void 0);
9443
- __decorate$c([
9818
+ __decorate$d([
9444
9819
  Event()
9445
9820
  ], TreeGrid.prototype, "rowDataBound", void 0);
9446
- __decorate$c([
9821
+ __decorate$d([
9447
9822
  Event()
9448
9823
  ], TreeGrid.prototype, "detailDataBound", void 0);
9449
- __decorate$c([
9824
+ __decorate$d([
9450
9825
  Event()
9451
9826
  ], TreeGrid.prototype, "queryCellInfo", void 0);
9452
- __decorate$c([
9827
+ __decorate$d([
9453
9828
  Event()
9454
9829
  ], TreeGrid.prototype, "rowSelecting", void 0);
9455
- __decorate$c([
9830
+ __decorate$d([
9456
9831
  Event()
9457
9832
  ], TreeGrid.prototype, "rowSelected", void 0);
9458
- __decorate$c([
9833
+ __decorate$d([
9459
9834
  Event()
9460
9835
  ], TreeGrid.prototype, "rowDeselecting", void 0);
9461
- __decorate$c([
9836
+ __decorate$d([
9462
9837
  Event()
9463
9838
  ], TreeGrid.prototype, "rowDeselected", void 0);
9464
- __decorate$c([
9839
+ __decorate$d([
9465
9840
  Event()
9466
9841
  ], TreeGrid.prototype, "headerCellInfo", void 0);
9467
- __decorate$c([
9842
+ __decorate$d([
9468
9843
  Event()
9469
9844
  ], TreeGrid.prototype, "cellSelecting", void 0);
9470
- __decorate$c([
9845
+ __decorate$d([
9471
9846
  Event()
9472
9847
  ], TreeGrid.prototype, "columnMenuOpen", void 0);
9473
- __decorate$c([
9848
+ __decorate$d([
9474
9849
  Event()
9475
9850
  ], TreeGrid.prototype, "columnMenuClick", void 0);
9476
- __decorate$c([
9851
+ __decorate$d([
9477
9852
  Event()
9478
9853
  ], TreeGrid.prototype, "cellSelected", void 0);
9479
- __decorate$c([
9854
+ __decorate$d([
9480
9855
  Event()
9481
9856
  ], TreeGrid.prototype, "cellDeselecting", void 0);
9482
- __decorate$c([
9857
+ __decorate$d([
9483
9858
  Event()
9484
9859
  ], TreeGrid.prototype, "cellDeselected", void 0);
9485
- __decorate$c([
9860
+ __decorate$d([
9486
9861
  Event()
9487
9862
  ], TreeGrid.prototype, "resizeStart", void 0);
9488
- __decorate$c([
9863
+ __decorate$d([
9489
9864
  Event()
9490
9865
  ], TreeGrid.prototype, "resizing", void 0);
9491
- __decorate$c([
9866
+ __decorate$d([
9492
9867
  Event()
9493
9868
  ], TreeGrid.prototype, "resizeStop", void 0);
9494
- __decorate$c([
9869
+ __decorate$d([
9495
9870
  Event()
9496
9871
  ], TreeGrid.prototype, "columnDragStart", void 0);
9497
- __decorate$c([
9872
+ __decorate$d([
9498
9873
  Event()
9499
9874
  ], TreeGrid.prototype, "columnDrag", void 0);
9500
- __decorate$c([
9875
+ __decorate$d([
9501
9876
  Event()
9502
9877
  ], TreeGrid.prototype, "columnDrop", void 0);
9503
- __decorate$c([
9878
+ __decorate$d([
9504
9879
  Event()
9505
9880
  ], TreeGrid.prototype, "checkboxChange", void 0);
9506
- __decorate$c([
9881
+ __decorate$d([
9507
9882
  Event()
9508
9883
  ], TreeGrid.prototype, "printComplete", void 0);
9509
- __decorate$c([
9884
+ __decorate$d([
9510
9885
  Event()
9511
9886
  ], TreeGrid.prototype, "beforePrint", void 0);
9512
- __decorate$c([
9887
+ __decorate$d([
9513
9888
  Event()
9514
9889
  ], TreeGrid.prototype, "toolbarClick", void 0);
9515
- __decorate$c([
9890
+ __decorate$d([
9516
9891
  Event()
9517
9892
  ], TreeGrid.prototype, "beforeDataBound", void 0);
9518
- __decorate$c([
9893
+ __decorate$d([
9519
9894
  Event()
9520
9895
  ], TreeGrid.prototype, "contextMenuOpen", void 0);
9521
- __decorate$c([
9896
+ __decorate$d([
9522
9897
  Event()
9523
9898
  ], TreeGrid.prototype, "contextMenuClick", void 0);
9524
- __decorate$c([
9899
+ __decorate$d([
9525
9900
  Event()
9526
9901
  ], TreeGrid.prototype, "beforeCopy", void 0);
9527
- __decorate$c([
9902
+ __decorate$d([
9528
9903
  Event()
9529
9904
  ], TreeGrid.prototype, "beforePaste", void 0);
9530
- __decorate$c([
9905
+ __decorate$d([
9531
9906
  Event()
9532
9907
  ], TreeGrid.prototype, "rowDrag", void 0);
9533
- __decorate$c([
9908
+ __decorate$d([
9534
9909
  Event()
9535
9910
  ], TreeGrid.prototype, "rowDragStart", void 0);
9536
- __decorate$c([
9911
+ __decorate$d([
9537
9912
  Event()
9538
9913
  ], TreeGrid.prototype, "rowDragStartHelper", void 0);
9539
- __decorate$c([
9914
+ __decorate$d([
9540
9915
  Event()
9541
9916
  ], TreeGrid.prototype, "rowDrop", void 0);
9542
- __decorate$c([
9917
+ __decorate$d([
9543
9918
  Event()
9544
9919
  ], TreeGrid.prototype, "pdfQueryCellInfo", void 0);
9545
- __decorate$c([
9920
+ __decorate$d([
9546
9921
  Event()
9547
9922
  ], TreeGrid.prototype, "pdfHeaderQueryCellInfo", void 0);
9548
- __decorate$c([
9923
+ __decorate$d([
9549
9924
  Event()
9550
9925
  ], TreeGrid.prototype, "excelQueryCellInfo", void 0);
9551
- __decorate$c([
9926
+ __decorate$d([
9552
9927
  Event()
9553
9928
  ], TreeGrid.prototype, "pdfAggregateQueryCellInfo", void 0);
9554
- __decorate$c([
9929
+ __decorate$d([
9555
9930
  Event()
9556
9931
  ], TreeGrid.prototype, "excelAggregateQueryCellInfo", void 0);
9557
- __decorate$c([
9932
+ __decorate$d([
9558
9933
  Event()
9559
9934
  ], TreeGrid.prototype, "excelHeaderQueryCellInfo", void 0);
9560
- __decorate$c([
9935
+ __decorate$d([
9561
9936
  Event()
9562
9937
  ], TreeGrid.prototype, "beforeExcelExport", void 0);
9563
- __decorate$c([
9938
+ __decorate$d([
9564
9939
  Event()
9565
9940
  ], TreeGrid.prototype, "excelExportComplete", void 0);
9566
- __decorate$c([
9941
+ __decorate$d([
9567
9942
  Event()
9568
9943
  ], TreeGrid.prototype, "beforePdfExport", void 0);
9569
- __decorate$c([
9944
+ __decorate$d([
9570
9945
  Event()
9571
9946
  ], TreeGrid.prototype, "pdfExportComplete", void 0);
9572
- TreeGrid = TreeGrid_1 = __decorate$c([
9947
+ TreeGrid = TreeGrid_1 = __decorate$d([
9573
9948
  NotifyPropertyChanges
9574
9949
  ], TreeGrid);
9575
9950
  return TreeGrid;
@@ -10983,6 +11358,7 @@ var RowDD = /** @__PURE__ @class */ (function () {
10983
11358
  * @returns {void} - This function does not return any value.
10984
11359
  */
10985
11360
  RowDD.prototype.dropRows = function (args, isByMethod) {
11361
+ var oldParentsList = [];
10986
11362
  if (this.dropPosition !== 'Invalid' && !isRemoteData(this.parent)) {
10987
11363
  var tObj = this.parent;
10988
11364
  var draggedRecord_2;
@@ -11025,6 +11401,15 @@ var RowDD = /** @__PURE__ @class */ (function () {
11025
11401
  else {
11026
11402
  dragRecords = args.data;
11027
11403
  }
11404
+ if (isCheckboxcolumn(this.parent) && this.parent.autoCheckHierarchy) {
11405
+ for (var dragIndex = 0; dragIndex < dragRecords.length; dragIndex++) {
11406
+ var drag = dragRecords[parseInt(dragIndex.toString(), 10)];
11407
+ var oldParent = drag && drag.parentItem;
11408
+ if (oldParent) {
11409
+ oldParentsList.push(oldParent);
11410
+ }
11411
+ }
11412
+ }
11028
11413
  this.parent[this.modifiedRecords].push(args.data[0], droppedRecord);
11029
11414
  var count = 0;
11030
11415
  var multiplegrid = this.parent.rowDropSettings.targetID;
@@ -11141,6 +11526,15 @@ var RowDD = /** @__PURE__ @class */ (function () {
11141
11526
  _loop_1(i);
11142
11527
  }
11143
11528
  }
11529
+ if (this.dropPosition !== 'Invalid' && !isNullOrUndefined(args.data) && args.data.length
11530
+ && isCheckboxcolumn(this.parent) && this.parent.autoCheckHierarchy) {
11531
+ this.parent.notify(hierarchyCheckstateUpdate, {
11532
+ draggedRecords: args.data,
11533
+ oldParents: oldParentsList,
11534
+ droppedRecord: this.droppedRecord,
11535
+ dropPosition: this.dropPosition
11536
+ });
11537
+ }
11144
11538
  };
11145
11539
  /**
11146
11540
  * Handles the logic for inserting a dragged record into the middle of a parent record's child records.
@@ -11591,7 +11985,7 @@ var RowDD = /** @__PURE__ @class */ (function () {
11591
11985
  return RowDD;
11592
11986
  }());
11593
11987
 
11594
- var __extends$f = (undefined && undefined.__extends) || (function () {
11988
+ var __extends$g = (undefined && undefined.__extends) || (function () {
11595
11989
  var extendStatics = function (d, b) {
11596
11990
  extendStatics = Object.setPrototypeOf ||
11597
11991
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -11604,7 +11998,7 @@ var __extends$f = (undefined && undefined.__extends) || (function () {
11604
11998
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
11605
11999
  };
11606
12000
  })();
11607
- var __decorate$d = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
12001
+ var __decorate$e = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
11608
12002
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
11609
12003
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
11610
12004
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
@@ -11614,17 +12008,17 @@ var __decorate$d = (undefined && undefined.__decorate) || function (decorators,
11614
12008
  * Configures the settings for row dragging and dropping within the TreeGrid, allowing for enhanced user interaction and data manipulation capabilities.
11615
12009
  */
11616
12010
  var RowDropSettings = /** @__PURE__ @class */ (function (_super) {
11617
- __extends$f(RowDropSettings, _super);
12011
+ __extends$g(RowDropSettings, _super);
11618
12012
  function RowDropSettings() {
11619
12013
  return _super !== null && _super.apply(this, arguments) || this;
11620
12014
  }
11621
- __decorate$d([
12015
+ __decorate$e([
11622
12016
  Property()
11623
12017
  ], RowDropSettings.prototype, "targetID", void 0);
11624
12018
  return RowDropSettings;
11625
12019
  }(ChildProperty));
11626
12020
 
11627
- var __extends$g = (undefined && undefined.__extends) || (function () {
12021
+ var __extends$h = (undefined && undefined.__extends) || (function () {
11628
12022
  var extendStatics = function (d, b) {
11629
12023
  extendStatics = Object.setPrototypeOf ||
11630
12024
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -11643,7 +12037,7 @@ var __extends$g = (undefined && undefined.__extends) || (function () {
11643
12037
  * @hidden
11644
12038
  */
11645
12039
  var TreeVirtualRowModelGenerator = /** @__PURE__ @class */ (function (_super) {
11646
- __extends$g(TreeVirtualRowModelGenerator, _super);
12040
+ __extends$h(TreeVirtualRowModelGenerator, _super);
11647
12041
  function TreeVirtualRowModelGenerator(parent) {
11648
12042
  var _this = _super.call(this, parent) || this;
11649
12043
  _this.addEventListener();
@@ -11729,6 +12123,54 @@ var TreeVirtualRowModelGenerator = /** @__PURE__ @class */ (function (_super) {
11729
12123
  return TreeVirtualRowModelGenerator;
11730
12124
  }(VirtualRowModelGenerator));
11731
12125
 
12126
+ var __extends$i = (undefined && undefined.__extends) || (function () {
12127
+ var extendStatics = function (d, b) {
12128
+ extendStatics = Object.setPrototypeOf ||
12129
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
12130
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
12131
+ return extendStatics(d, b);
12132
+ };
12133
+ return function (d, b) {
12134
+ extendStatics(d, b);
12135
+ function __() { this.constructor = d; }
12136
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12137
+ };
12138
+ })();
12139
+ /**
12140
+ * DomVirtualTreeContentRenderer extends Grid's DOM virtualization rendering layer to provide tree-specific hierarchy support.
12141
+ *
12142
+ * @hidden
12143
+ */
12144
+ var DomVirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
12145
+ __extends$i(DomVirtualTreeContentRenderer, _super);
12146
+ /**
12147
+ * Constructor for DomVirtualTreeContentRenderer
12148
+ *
12149
+ * @param {IGrid} parent - Grid/TreeGrid instance
12150
+ * @param {ServiceLocator} locator - Service locator for dependency injection
12151
+ */
12152
+ function DomVirtualTreeContentRenderer(parent, locator) {
12153
+ var _this = _super.call(this, parent, locator) || this;
12154
+ _this.addEventListener();
12155
+ return _this;
12156
+ }
12157
+ DomVirtualTreeContentRenderer.prototype.addEventListener = function () {
12158
+ if (this.parent.isDestroyed) {
12159
+ return;
12160
+ }
12161
+ };
12162
+ DomVirtualTreeContentRenderer.prototype.removeEventListener = function () {
12163
+ if (this.parent.isDestroyed) {
12164
+ return;
12165
+ }
12166
+ };
12167
+ DomVirtualTreeContentRenderer.prototype.destroy = function () {
12168
+ this.removeEventListener();
12169
+ _super.prototype.destroy.call(this);
12170
+ };
12171
+ return DomVirtualTreeContentRenderer;
12172
+ }(DomVirtualContentRenderer));
12173
+
11732
12174
  /**
11733
12175
  * TreeGrid Filter module will handle filtering action
11734
12176
  *
@@ -11741,7 +12183,7 @@ var Filter = /** @__PURE__ @class */ (function () {
11741
12183
  * @param {TreeGrid} parent - Tree Grid instance
11742
12184
  */
11743
12185
  function Filter(parent) {
11744
- initializeTelemetryFeature('Filter', 'TreeGrid');
12186
+ initializeTelemetryFeature('Filter', 'Treegrid');
11745
12187
  Grid.Inject(Filter$1);
11746
12188
  this.parent = parent;
11747
12189
  this.isHierarchyFilter = false;
@@ -12533,11 +12975,16 @@ var Page = /** @__PURE__ @class */ (function () {
12533
12975
  */
12534
12976
  Page.prototype.collapseExpandPagedchilds = function (rowDetails) {
12535
12977
  rowDetails.record.expanded = rowDetails.action === 'collapse' ? false : true;
12536
- this.parent.flatData.map(function (e) { return e.expanded = e.uniqueID === rowDetails.record.uniqueID &&
12978
+ var flatData = this.parent.flatData;
12979
+ var isRemote = isRemoteData(this.parent) && !isOffline(this.parent);
12980
+ if (this.parent.enableDomVirtualization && isRemote) {
12981
+ flatData = this.parent.getCurrentViewRecords();
12982
+ }
12983
+ flatData.map(function (e) { return e.expanded = e.uniqueID === rowDetails.record.uniqueID &&
12537
12984
  e.expanded !== rowDetails.record.expanded ? rowDetails.record.expanded : e.expanded; });
12538
12985
  if (this.parent.enableImmutableMode) {
12539
12986
  var primaryKeyField_1 = this.parent.getPrimaryKeyFieldNames()[0];
12540
- var record = this.parent.flatData.filter(function (e) {
12987
+ var record = flatData.filter(function (e) {
12541
12988
  return e["" + primaryKeyField_1] === rowDetails.record["" + primaryKeyField_1];
12542
12989
  });
12543
12990
  if (record.length) {
@@ -12545,13 +12992,14 @@ var Page = /** @__PURE__ @class */ (function () {
12545
12992
  }
12546
12993
  }
12547
12994
  var ret = {
12548
- result: this.parent.flatData,
12995
+ result: flatData,
12549
12996
  row: rowDetails.row,
12550
12997
  action: rowDetails.action,
12551
12998
  record: rowDetails.record,
12552
- count: this.parent.flatData.length
12999
+ count: flatData.length
12553
13000
  };
12554
- getValue('grid.renderModule', this.parent).dataManagerSuccess(ret);
13001
+ var request = this.parent.enableDomVirtualization ? { requestType: 'refresh' } : undefined;
13002
+ getValue('grid.renderModule', this.parent).dataManagerSuccess(ret, request);
12555
13003
  if (this.parent.enableImmutableMode) {
12556
13004
  var row = 'row';
12557
13005
  var action = 'action';
@@ -12751,11 +13199,6 @@ var Toolbar = /** @__PURE__ @class */ (function () {
12751
13199
  Toolbar.prototype.toolbarClickHandler = function (args) {
12752
13200
  var tObj = this.parent;
12753
13201
  var indentOutdentAction = 'indentOutdentAction';
12754
- if (this.parent.editSettings.mode === 'Cell' && this.parent.grid.editSettings.mode === 'Batch' &&
12755
- args.item.id === this.parent.grid.element.id + '_update') {
12756
- args.cancel = true;
12757
- this.parent.grid.editModule.saveCell();
12758
- }
12759
13202
  if (args.item.id === this.parent.grid.element.id + '_expandall') {
12760
13203
  this.parent.expandAll();
12761
13204
  }
@@ -12770,6 +13213,13 @@ var Toolbar = /** @__PURE__ @class */ (function () {
12770
13213
  && !isNullOrUndefined(tObj.rowDragAndDropModule)) {
12771
13214
  this.parent.rowDragAndDropModule["" + indentOutdentAction](null, 'outdent');
12772
13215
  }
13216
+ if (args.item.id === tObj.grid.element.id + '_delete'
13217
+ && isCheckboxcolumn(this.parent)
13218
+ && this.parent.getCheckedRecords().length > 0
13219
+ && !isNullOrUndefined(this.parent.selectionModule)) {
13220
+ this.parent.selectionModule['deleteCheckedRecords']();
13221
+ args.cancel = true;
13222
+ }
12773
13223
  };
12774
13224
  /**
12775
13225
  * Gets the toolbar of the TreeGrid.
@@ -14107,14 +14557,13 @@ var Edit = /** @__PURE__ @class */ (function () {
14107
14557
  this.parent.on(cellEdit, this.cellEdit, this);
14108
14558
  this.parent.on('actionBegin', this.editActionEvents, this);
14109
14559
  this.parent.on('actionComplete', this.editActionEvents, this);
14560
+ this.parent.on('resetDoubleClickTarget', this.resetDoubleClickTarget, this);
14110
14561
  this.parent.grid.on(doubleTap, this.recordDoubleClick, this);
14111
14562
  this.parent.grid.on('dblclick', this.gridDblClick, this);
14112
14563
  this.parent.grid.on('recordAdded', this.customCellSave, this);
14113
14564
  this.parent.on('savePreviousRowPosition', this.savePreviousRowPosition, this);
14114
14565
  // this.parent.on(events.beforeDataBound, this.beforeDataBound, this);
14115
14566
  this.parent.grid.on(beforeStartEdit, this.beforeStartEdit, this);
14116
- this.parent.grid.on(beforeBatchCancel, this.beforeBatchCancel, this);
14117
- this.parent.grid.on('reset-edit-props', this.resetIsOnBatch, this);
14118
14567
  this.parent.grid.on('get-row-position', this.getRowPosition, this);
14119
14568
  this.parent.grid.on('last-row-validation', this.lastRowValidation, this);
14120
14569
  };
@@ -14130,7 +14579,6 @@ var Edit = /** @__PURE__ @class */ (function () {
14130
14579
  /* eslint-disable-next-line */
14131
14580
  this.parent.grid.getDataRows()[rowIndex].dataset.uid = this.parent.grid.contentModule.getRows()[rowIndex].uid;
14132
14581
  }
14133
- this.doubleClickTarget = null;
14134
14582
  }
14135
14583
  };
14136
14584
  Edit.prototype.getRowPosition = function (addArgs) {
@@ -14138,17 +14586,14 @@ var Edit = /** @__PURE__ @class */ (function () {
14138
14586
  addArgs.addRowIndex = this.addRowIndex;
14139
14587
  addArgs.dataRowIndex = +this.prevAriaRowIndex;
14140
14588
  };
14589
+ Edit.prototype.resetDoubleClickTarget = function () {
14590
+ this.doubleClickTarget = null;
14591
+ };
14141
14592
  Edit.prototype.beforeStartEdit = function (args) {
14142
14593
  if (this.parent.editSettings.mode === 'Cell') {
14143
14594
  this.parent.trigger(actionBegin, args);
14144
14595
  }
14145
14596
  };
14146
- Edit.prototype.beforeBatchCancel = function (args) {
14147
- if (this.parent.editSettings.mode === 'Cell') {
14148
- args['requestType'] = 'cancel';
14149
- this.parent.trigger(actionComplete, args);
14150
- }
14151
- };
14152
14597
  /**
14153
14598
  * @hidden
14154
14599
  * @returns {void}
@@ -14172,9 +14617,8 @@ var Edit = /** @__PURE__ @class */ (function () {
14172
14617
  this.parent.grid.off(doubleTap, this.recordDoubleClick);
14173
14618
  this.parent.off('savePreviousRowPosition', this.savePreviousRowPosition);
14174
14619
  this.parent.grid.off(beforeStartEdit, this.beforeStartEdit);
14175
- this.parent.grid.off(beforeBatchCancel, this.beforeBatchCancel);
14620
+ this.parent.off('resetDoubleClickTarget', this.resetDoubleClickTarget);
14176
14621
  this.parent.grid.off('dblclick', this.gridDblClick);
14177
- this.parent.grid.off('reset-edit-props', this.resetIsOnBatch);
14178
14622
  this.parent.grid.off('get-row-position', this.getRowPosition);
14179
14623
  this.parent.grid.off('last-row-validation', this.lastRowValidation);
14180
14624
  //this.parent.grid.off('click', this.gridSingleClick);
@@ -14301,33 +14745,10 @@ var Edit = /** @__PURE__ @class */ (function () {
14301
14745
  return;
14302
14746
  }
14303
14747
  var column = this.parent.grid.getColumnByIndex(+target.closest('td.e-rowcell').getAttribute('aria-colindex') - 1);
14304
- if (this.parent.editSettings.mode === 'Cell' && !this.isOnBatch && column && !column.isPrimaryKey &&
14748
+ if (this.parent.editSettings.mode === 'Cell' && column && !column.isPrimaryKey &&
14305
14749
  this.parent.editSettings.allowEditing && column.allowEditing && !(target.classList.contains('e-treegridexpand') ||
14306
14750
  target.classList.contains('e-treegridcollapse')) && this.parent.editSettings.allowEditOnDblClick) {
14307
- this.isOnBatch = true;
14308
14751
  this.parent.grid.setProperties({ selectedRowIndex: args.rowIndex }, true);
14309
- if (this.parent.enableVirtualization) {
14310
- var tr = parentsUntil(args.target, 'e-row');
14311
- this.prevAriaRowIndex = tr.getAttribute('aria-rowindex');
14312
- tr.setAttribute('aria-rowindex', (tr.rowIndex + 1) + '');
14313
- }
14314
- this.updateGridEditMode('Batch');
14315
- }
14316
- else if (this.parent.editSettings.mode === 'Cell' && (!column.allowEditing || column.isPrimaryKey)) {
14317
- this.isOnBatch = true;
14318
- this.updateGridEditMode('Batch');
14319
- }
14320
- };
14321
- Edit.prototype.updateGridEditMode = function (mode) {
14322
- this.parent.grid.setProperties({ editSettings: { mode: mode } }, true);
14323
- var updateMethod = getObject('updateEditObj', this.parent.grid.editModule);
14324
- updateMethod.apply(this.parent.grid.editModule);
14325
- this.parent.grid.isEdit = false;
14326
- };
14327
- Edit.prototype.resetIsOnBatch = function () {
14328
- if (this.parent.enableVirtualization && this.parent.editSettings.mode === 'Cell' && !this.parent['isGantt']) {
14329
- this.isOnBatch = false;
14330
- this.updateGridEditMode('Normal');
14331
14752
  }
14332
14753
  };
14333
14754
  Edit.prototype.keyPressed = function (args) {
@@ -14338,7 +14759,9 @@ var Edit = /** @__PURE__ @class */ (function () {
14338
14759
  this.recordDoubleClick(args);
14339
14760
  }
14340
14761
  if (args.action === 'escape') {
14341
- this.closeEdit();
14762
+ if (this.parent.grid.isEdit) {
14763
+ this.closeEdit();
14764
+ }
14342
14765
  }
14343
14766
  };
14344
14767
  Edit.prototype.deleteUniqueID = function (value) {
@@ -14352,6 +14775,13 @@ var Edit = /** @__PURE__ @class */ (function () {
14352
14775
  var promise = 'promise';
14353
14776
  var prom = args["" + promise];
14354
14777
  delete args["" + promise];
14778
+ if (this.doubleClickTarget && (this.doubleClickTarget.classList.contains('e-treegridexpand') ||
14779
+ this.doubleClickTarget.classList.contains('e-treegridcollapse') || this.doubleClickTarget.classList.contains('e-summarycell') ||
14780
+ this.doubleClickTarget.closest('.e-hierarchycheckbox'))) {
14781
+ args.cancel = true;
14782
+ this.doubleClickTarget = null;
14783
+ return;
14784
+ }
14355
14785
  if (this.parent.enableVirtualization && !isNullOrUndefined(this.prevAriaRowIndex) && this.prevAriaRowIndex !== '-1') {
14356
14786
  args.row.setAttribute('aria-rowindex', this.prevAriaRowIndex);
14357
14787
  this.prevAriaRowIndex = undefined;
@@ -14361,21 +14791,11 @@ var Edit = /** @__PURE__ @class */ (function () {
14361
14791
  if (!celleditArgs.cancel && _this.parent.editSettings.mode === 'Cell') {
14362
14792
  _this.enableToolbarItems('edit');
14363
14793
  }
14364
- else if (celleditArgs.cancel && _this.parent.editSettings.mode === 'Cell') {
14365
- _this.isOnBatch = false;
14366
- _this.updateGridEditMode('Normal');
14367
- }
14368
14794
  if (!isNullOrUndefined(prom)) {
14369
14795
  prom.resolve(celleditArgs);
14370
14796
  }
14371
14797
  });
14372
14798
  }
14373
- if (this.doubleClickTarget && (this.doubleClickTarget.classList.contains('e-treegridexpand') ||
14374
- this.doubleClickTarget.classList.contains('e-treegridcollapse') || this.doubleClickTarget.classList.contains('e-summarycell'))) {
14375
- args.cancel = true;
14376
- this.doubleClickTarget = null;
14377
- return;
14378
- }
14379
14799
  if (this.parent.editSettings.mode === 'Cell') {
14380
14800
  if (this.keyPress === 'tab' || this.keyPress === 'shiftTab') {
14381
14801
  this.keyPress = null;
@@ -14404,20 +14824,6 @@ var Edit = /** @__PURE__ @class */ (function () {
14404
14824
  }
14405
14825
  };
14406
14826
  Edit.prototype.batchCancel = function () {
14407
- if (this.parent.editSettings.mode === 'Cell') {
14408
- var cellDetails = getValue('editModule.cellDetails', this.parent.grid.editModule);
14409
- if (!isNullOrUndefined(this.editedRowIndex)) {
14410
- cellDetails.rowIndex = this.editedRowIndex;
14411
- }
14412
- var treeCell = this.parent.getCellFromIndex(cellDetails.rowIndex, this.parent.treeColumnIndex);
14413
- this.parent.renderModule.cellRender({
14414
- data: cellDetails.rowData,
14415
- cell: treeCell,
14416
- column: this.parent.grid.getColumns()[this.parent.treeColumnIndex]
14417
- });
14418
- this.updateGridEditMode('Normal');
14419
- this.isOnBatch = false;
14420
- }
14421
14827
  if (this.parent.editSettings.mode === 'Batch') {
14422
14828
  this.parent.notify('batchCancelAction', {});
14423
14829
  }
@@ -14425,138 +14831,16 @@ var Edit = /** @__PURE__ @class */ (function () {
14425
14831
  Edit.prototype.customCellSave = function (args) {
14426
14832
  if (isCountRequired(this.parent) && this.parent.editSettings.mode === 'Cell' && args.action === 'edit') {
14427
14833
  this.updateCell(args, args.rowIndex);
14428
- this.afterCellSave(args, args.row);
14429
14834
  }
14430
14835
  };
14431
14836
  Edit.prototype.cellSave = function (args) {
14432
- var _this = this;
14433
- if (this.parent.editSettings.mode === 'Cell' && this.parent.element.querySelector('form')) {
14434
- args.cancel = true;
14435
- var editModule = 'editModule';
14436
- setValue('isEditCollapse', true, this.parent);
14437
- args.rowData[args.columnName] = args.value;
14438
- var row_1;
14439
- if (isNullOrUndefined(args.cell)) {
14440
- row_1 = this.parent.grid.editModule["" + editModule].form.parentElement.parentNode;
14441
- }
14442
- else {
14443
- row_1 = args.cell.parentNode;
14444
- }
14445
- var rowIndex_1;
14446
- var primaryKeys_1 = this.parent.getPrimaryKeyFieldNames();
14447
- if (isNullOrUndefined(row_1)) {
14448
- this.parent.grid.getCurrentViewRecords().filter(function (e, i) {
14449
- if (e[primaryKeys_1[0]] === args.rowData[primaryKeys_1[0]]) {
14450
- rowIndex_1 = i;
14451
- return;
14452
- }
14453
- });
14454
- }
14455
- else {
14456
- var freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
14457
- this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
14458
- if (freeze) {
14459
- if (this.parent.getRows().indexOf(row_1) !== -1) {
14460
- rowIndex_1 = this.parent.getRows().indexOf(row_1);
14461
- }
14462
- else {
14463
- rowIndex_1 = this.parent.getRows().indexOf(row_1);
14464
- }
14465
- }
14466
- else {
14467
- rowIndex_1 = (this.parent.getRows().indexOf(row_1) === -1 && (this.parent.getFrozenColumns() > 0)) ?
14468
- this.parent.grid.getRows().indexOf(row_1) : this.parent.getRows().indexOf(row_1);
14469
- }
14470
- }
14471
- var arg = {};
14472
- extend$1(arg, args);
14473
- arg.cancel = false;
14474
- arg.type = 'save';
14475
- row_1 = this.parent.grid.getRows()[row_1.rowIndex];
14476
- this.parent.trigger(actionBegin, arg);
14477
- if (!arg.cancel) {
14478
- if ((row_1.rowIndex === this.parent.getCurrentViewRecords().length - 1) && this.keyPress === 'tab') {
14479
- this.isTabLastRow = true;
14480
- }
14481
- if (!isRemoteData(this.parent) &&
14482
- !(this.parent.dataSource instanceof DataManager && this.parent.dataSource.adaptor instanceof RemoteSaveAdaptor)) {
14483
- if (isCountRequired(this.parent)) {
14484
- var eventPromise = 'eventPromise';
14485
- var editArgs = { requestType: 'save', data: args.rowData, action: 'edit', row: row_1,
14486
- rowIndex: rowIndex_1, rowData: args.rowData, columnName: args.columnName,
14487
- filterChoiceCount: null, excelSearchOperator: null };
14488
- this.parent.grid.getDataModule()["" + eventPromise](editArgs, this.parent.grid.query);
14489
- }
14490
- else {
14491
- this.updateCell(args, rowIndex_1);
14492
- setValue('isEdit', false, this.parent.grid);
14493
- this.afterCellSave(args, row_1);
14494
- }
14495
- }
14496
- else if (isRemoteData(this.parent) ||
14497
- (this.parent.dataSource instanceof DataManager && this.parent.dataSource.adaptor instanceof RemoteSaveAdaptor)) {
14498
- var query = this.parent.grid.query;
14499
- if (this.parent['isGantt'] && this.parent.loadChildOnDemand) {
14500
- this.updateCell(args, rowIndex_1);
14501
- setValue('isEdit', false, this.parent.grid);
14502
- this.afterCellSave(args, row_1);
14503
- }
14504
- else {
14505
- var crud = null;
14506
- crud = this.parent.grid.dataSource.update(primaryKeys_1[0], args.rowData, query.fromTable, query, args.previousValue);
14507
- crud.then(function (e) {
14508
- if (!isNullOrUndefined(e)) {
14509
- args.rowData[args.columnName] = e[args.columnName];
14510
- }
14511
- _this.updateCell(args, rowIndex_1);
14512
- setValue('isEdit', false, _this.parent.grid);
14513
- _this.afterCellSave(args, row_1);
14514
- });
14515
- }
14516
- }
14517
- }
14518
- else {
14519
- this.parent.grid.isEdit = true;
14520
- }
14521
- }
14522
14837
  if (this.parent.enableVirtualization) {
14523
14838
  this.parent.grid.contentModule['virtualData'] = {};
14524
14839
  }
14525
14840
  };
14526
- Edit.prototype.afterCellSave = function (args, row) {
14527
- if (this.parent.grid.aggregateModule) {
14528
- this.parent.grid.aggregateModule.refresh(args.rowData);
14529
- }
14530
- this.parent.grid.editModule.destroyWidgets([this.parent.grid.getColumnByField(args.columnName)]);
14531
- this.parent.grid.editModule.formObj.destroy();
14532
- if (this.keyPress !== 'tab' && this.keyPress !== 'shiftTab') {
14533
- this.updateGridEditMode('Normal');
14534
- this.isOnBatch = false;
14535
- }
14536
- this.enableToolbarItems('save');
14537
- removeClass([row], ['e-editedrow', 'e-batchrow']);
14538
- removeClass(row.querySelectorAll('.e-rowcell'), ['e-editedbatchcell', 'e-updatedtd']);
14539
- if (this.parent['isCellSaveFocus'] !== false) {
14540
- this.parent.grid.focusModule.restoreFocus();
14541
- }
14542
- editAction({ value: args.rowData, action: 'edit' }, this.parent, this.isSelfReference, this.addRowIndex, this.selectedIndex, args.columnName);
14543
- if ((row.rowIndex === this.parent.getCurrentViewRecords().length - 1) && this.keyPress === 'enter') {
14544
- this.keyPress = null;
14545
- }
14546
- var saveArgs = {
14547
- type: 'save', column: this.parent.getColumnByField(args.columnName), data: args.rowData,
14548
- previousData: args.previousValue, row: row, target: args.cell
14549
- };
14550
- if (this.parent.aggregates.some(function (ag) { return ag.showChildSummary === true; })) {
14551
- this.parent.grid.refresh();
14552
- }
14553
- this.parent.trigger(actionComplete, saveArgs);
14554
- };
14555
14841
  Edit.prototype.lastCellTab = function () {
14556
- if (!this.parent.grid.isEdit && this.isOnBatch && this.keyPress === 'tab' && this.parent.editSettings.mode === 'Cell') {
14842
+ if (!this.parent.grid.isEdit && this.keyPress === 'tab' && this.parent.editSettings.mode === 'Cell') {
14557
14843
  if (!this.parent.editSettings.allowNextRowEdit) {
14558
- this.updateGridEditMode('Normal');
14559
- this.isOnBatch = false;
14560
14844
  this.keyPress = null;
14561
14845
  }
14562
14846
  else {
@@ -14814,12 +15098,13 @@ var Edit = /** @__PURE__ @class */ (function () {
14814
15098
  args.cancel = true;
14815
15099
  return;
14816
15100
  }
14817
- if (this.parent.editSettings.mode === 'Cell' && args.requestType === 'beginEdit') {
15101
+ if (this.parent.editSettings.mode === 'Cell' && args.requestType === 'beginEdit' && args.row.classList.contains('e-summaryrow')) {
14818
15102
  args.cancel = true;
14819
15103
  return;
14820
15104
  }
14821
15105
  if (this.doubleClickTarget && args.requestType !== 'delete' && (this.doubleClickTarget.classList.contains('e-treegridexpand') ||
14822
- this.doubleClickTarget.classList.contains('e-treegridcollapse') || this.doubleClickTarget.classList.contains('e-frame'))) {
15106
+ this.doubleClickTarget.classList.contains('e-treegridcollapse') || this.doubleClickTarget.classList.contains('e-frame') ||
15107
+ this.doubleClickTarget.closest('.e-hierarchycheckbox'))) {
14823
15108
  args.cancel = true;
14824
15109
  this.doubleClickTarget = null;
14825
15110
  return;
@@ -14827,10 +15112,10 @@ var Edit = /** @__PURE__ @class */ (function () {
14827
15112
  if (args.requestType === 'delete') {
14828
15113
  var data_1 = args.data;
14829
15114
  if (isNullOrUndefined(args.data[0].uniqueID)) {
14830
- var primaryKeys_2 = this.parent.getPrimaryKeyFieldNames();
15115
+ var primaryKeys_1 = this.parent.getPrimaryKeyFieldNames();
14831
15116
  var _loop_1 = function (i) {
14832
15117
  this_1.parent.flatData.filter(function (e) {
14833
- if (e["" + primaryKeys_2[0]] === args.data[parseInt(i.toString(), 10)][primaryKeys_2[0]]) {
15118
+ if (e["" + primaryKeys_1[0]] === args.data[parseInt(i.toString(), 10)][primaryKeys_1[0]]) {
14834
15119
  data_1[parseInt(i.toString(), 10)] = e;
14835
15120
  }
14836
15121
  });
@@ -15135,6 +15420,7 @@ var Edit = /** @__PURE__ @class */ (function () {
15135
15420
  else {
15136
15421
  this.selectedIndex = this.parent.selectedRowIndex;
15137
15422
  this.addRowIndex = this.parent.selectedRowIndex;
15423
+ index = this.parent.selectedRowIndex;
15138
15424
  }
15139
15425
  if (position) {
15140
15426
  this.parent.setProperties({ editSettings: { newRowPosition: position } }, true);
@@ -15180,10 +15466,6 @@ var Edit = /** @__PURE__ @class */ (function () {
15180
15466
  */
15181
15467
  Edit.prototype.editCell = function (rowIndex, field) {
15182
15468
  if (this.parent.editSettings.mode === 'Cell' || this.parent.editSettings.mode === 'Batch') {
15183
- if (this.parent.editSettings.mode !== 'Batch') {
15184
- this.isOnBatch = true;
15185
- this.updateGridEditMode('Batch');
15186
- }
15187
15469
  this.parent.grid.editModule.editCell(rowIndex, field);
15188
15470
  }
15189
15471
  };
@@ -15375,7 +15657,7 @@ var DetailRow = /** @__PURE__ @class */ (function () {
15375
15657
  return DetailRow;
15376
15658
  }());
15377
15659
 
15378
- var __extends$h = (undefined && undefined.__extends) || (function () {
15660
+ var __extends$j = (undefined && undefined.__extends) || (function () {
15379
15661
  var extendStatics = function (d, b) {
15380
15662
  extendStatics = Object.setPrototypeOf ||
15381
15663
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -15394,7 +15676,7 @@ var __extends$h = (undefined && undefined.__extends) || (function () {
15394
15676
  * @hidden
15395
15677
  */
15396
15678
  var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
15397
- __extends$h(VirtualTreeContentRenderer, _super);
15679
+ __extends$j(VirtualTreeContentRenderer, _super);
15398
15680
  function VirtualTreeContentRenderer(parent, locator) {
15399
15681
  var _this = _super.call(this, parent, locator) || this;
15400
15682
  _this.isExpandCollapse = false;
@@ -15884,7 +16166,6 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
15884
16166
  VirtualTreeContentRenderer.prototype.resetIseditValue = function () {
15885
16167
  var resetIsEdit = 'resetIsedit';
15886
16168
  var isAdd = 'isAdd';
15887
- this.parent.notify('reset-edit-props', {});
15888
16169
  if ((this.rowPosition === 'Top' || this.rowPosition === 'Bottom') && this["" + isAdd]) {
15889
16170
  _super.prototype["" + resetIsEdit].call(this);
15890
16171
  }
@@ -16207,7 +16488,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
16207
16488
  }
16208
16489
  }
16209
16490
  }
16210
- if (((downScroll && scrollArgs.direction !== 'up' && (scrollArgs.offset.top < (rowHeight * this.totalRecords)))
16491
+ if (((downScroll && scrollArgs.direction !== 'up' && (scrollArgs.offset.top <= (rowHeight * this.totalRecords)))
16211
16492
  || (upScroll)) || (scrollArgs.direction === 'right' || scrollArgs.direction === 'left') ||
16212
16493
  ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
16213
16494
  && !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== ''))) {
@@ -16425,7 +16706,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
16425
16706
  return VirtualTreeContentRenderer;
16426
16707
  }(VirtualContentRenderer));
16427
16708
  var TreeInterSectionObserver = /** @__PURE__ @class */ (function (_super) {
16428
- __extends$h(TreeInterSectionObserver, _super);
16709
+ __extends$j(TreeInterSectionObserver, _super);
16429
16710
  function TreeInterSectionObserver() {
16430
16711
  var _this = _super !== null && _super.apply(this, arguments) || this;
16431
16712
  _this.isWheeling = false;
@@ -16577,7 +16858,7 @@ var TreeInterSectionObserver = /** @__PURE__ @class */ (function (_super) {
16577
16858
  return TreeInterSectionObserver;
16578
16859
  }(InterSectionObserver));
16579
16860
 
16580
- var __extends$i = (undefined && undefined.__extends) || (function () {
16861
+ var __extends$k = (undefined && undefined.__extends) || (function () {
16581
16862
  var extendStatics = function (d, b) {
16582
16863
  extendStatics = Object.setPrototypeOf ||
16583
16864
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -16860,7 +17141,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
16860
17141
  return VirtualScroll;
16861
17142
  }());
16862
17143
  var TreeVirtual = /** @__PURE__ @class */ (function (_super) {
16863
- __extends$i(TreeVirtual, _super);
17144
+ __extends$k(TreeVirtual, _super);
16864
17145
  function TreeVirtual(parent, locator) {
16865
17146
  var _this = _super.call(this, parent, locator) || this;
16866
17147
  getValue('parent', _this).off('initial-load', getValue('instantiateRenderer', _this), _this);
@@ -17441,5 +17722,236 @@ var InfiniteScroll = /** @__PURE__ @class */ (function () {
17441
17722
  return InfiniteScroll;
17442
17723
  }());
17443
17724
 
17444
- 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, collapseActionComplete, 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 };
17725
+ var __extends$l = (undefined && undefined.__extends) || (function () {
17726
+ var extendStatics = function (d, b) {
17727
+ extendStatics = Object.setPrototypeOf ||
17728
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
17729
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
17730
+ return extendStatics(d, b);
17731
+ };
17732
+ return function (d, b) {
17733
+ extendStatics(d, b);
17734
+ function __() { this.constructor = d; }
17735
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17736
+ };
17737
+ })();
17738
+ /**
17739
+ * TreeGrid DOM Virtualization module handles high-performance rendering of large hierarchical datasets.
17740
+ *
17741
+ * @hidden
17742
+ */
17743
+ var DomVirtualization = /** @__PURE__ @class */ (function () {
17744
+ /**
17745
+ * Constructor for DomVirtualization module
17746
+ *
17747
+ * @param {TreeGrid} parent - TreeGrid instance
17748
+ * @param {ServiceLocator} locator - Service locator for dependency injection
17749
+ */
17750
+ function DomVirtualization(parent, locator) {
17751
+ initializeTelemetryFeature('DomVirtualization', 'TreeGrid');
17752
+ this.parent = parent;
17753
+ this.locator = locator;
17754
+ Grid.Inject(DomVirtualTreeExtension);
17755
+ this.addEventListener();
17756
+ }
17757
+ DomVirtualization.prototype.getModuleName = function () {
17758
+ return 'domVirtualization';
17759
+ };
17760
+ /**
17761
+ * @hidden
17762
+ * @returns {void}
17763
+ */
17764
+ DomVirtualization.prototype.addEventListener = function () {
17765
+ if (this.parent.isDestroyed) {
17766
+ return;
17767
+ }
17768
+ this.parent.on(destroy$1, this.destroy, this);
17769
+ this.parent.on(virtualExpandCollapse, this.collapseExpandVirtualchilds, this);
17770
+ this.parent.on(pagingActions, this.virtualPageAction, this);
17771
+ };
17772
+ /**
17773
+ * @hidden
17774
+ * @returns {void}
17775
+ */
17776
+ DomVirtualization.prototype.removeEventListener = function () {
17777
+ if (this.parent.isDestroyed) {
17778
+ return;
17779
+ }
17780
+ this.parent.off(destroy$1, this.destroy);
17781
+ this.parent.off(virtualExpandCollapse, this.collapseExpandVirtualchilds);
17782
+ this.parent.off(pagingActions, this.virtualPageAction);
17783
+ };
17784
+ /**
17785
+ * Handles the action related to virtual scrolling with paging details.
17786
+ *
17787
+ * @param {Object} pageingDetails - Contains the result data, count of results, and action arguments.
17788
+ * @param {ITreeData[]} pageingDetails.result - The result data to be handled.
17789
+ * @param {number} pageingDetails.count - The count of results.
17790
+ * @param {ActionEventArgs} pageingDetails.actionArgs - The action arguments related to the virtual page action.
17791
+ * @returns {void}
17792
+ */
17793
+ DomVirtualization.prototype.virtualPageAction = function (pageingDetails) {
17794
+ var _this = this;
17795
+ var actionArgs = getValue('actionArgs', pageingDetails.actionArgs);
17796
+ var action = getValue('action', pageingDetails.actionArgs);
17797
+ var isFiltering = (pageingDetails.actionArgs.requestType === 'filtering' && (pageingDetails.actionArgs.action !== 'clear-filter' && pageingDetails.actionArgs.action !== 'clearFilter')) ||
17798
+ (!isNullOrUndefined(this.parent['filterModule']) && (this.parent['filterModule'].filteredResult && this.parent['filterModule'].filteredResult.length > 0));
17799
+ var isFlatHierarchy = this.parent.filterSettings.hierarchyMode === 'Child' ||
17800
+ this.parent.filterSettings.hierarchyMode === 'None';
17801
+ var parents = pageingDetails.result;
17802
+ parents = isFiltering && isFlatHierarchy ? parents.filter(function (e) {
17803
+ if (isNullOrUndefined(e.parentItem)) {
17804
+ return true;
17805
+ }
17806
+ var hasParentInFilteredList = parents.some(function (p) { return p.uniqueID === e.parentItem.uniqueID; });
17807
+ return hasParentInFilteredList ? getExpandStatus(_this.parent, e) : true;
17808
+ }) : parents.filter(function (e) { return getExpandStatus(_this.parent, e); });
17809
+ this.parent.virtualDomScrollData = parents;
17810
+ var dm = new DataManager(parents);
17811
+ this.visualData = parents;
17812
+ var query = new Query();
17813
+ if (this.parent.allowPaging || this.parent.enableVirtualization) {
17814
+ var take = isNullOrUndefined(actionArgs.requestType) || actionArgs.requestType === 'dom-virtualscroll' ?
17815
+ pageingDetails.actionArgs.result.length : pageingDetails.result.length;
17816
+ if (action === 'collapse') {
17817
+ take = this.parent.grid.currentViewData.length;
17818
+ }
17819
+ var skip = this.parent.grid.pageSettings.currentPage <= 1 ? 0 :
17820
+ (this.parent.grid.pageSettings.currentPage - 1) * this.parent.grid.pageSettings.pageSize;
17821
+ if (actionArgs.requestType === 'dom-virtualscroll') {
17822
+ var pagingQueries = (pageingDetails.actionArgs && pageingDetails.actionArgs.query
17823
+ && pageingDetails.actionArgs.query.queries) || [];
17824
+ var takeQuery = pagingQueries.filter(function (q) { return q.fn === 'onTake'; });
17825
+ var explicitTake = takeQuery.length > 0
17826
+ ? takeQuery[parseInt((takeQuery.length - 1).toString(), 10)] : undefined;
17827
+ if (!isNullOrUndefined(explicitTake) && typeof explicitTake.e.nos === 'number') {
17828
+ take = explicitTake.e.nos;
17829
+ }
17830
+ }
17831
+ else if ((actionArgs.requestType === 'filtering' || actionArgs.requestType === 'searching') && skip > 0) {
17832
+ skip = 0;
17833
+ this.parent.grid.setProperties({ pageSettings: { currentPage: 1 } }, true);
17834
+ }
17835
+ query = query.skip(skip).take(take);
17836
+ }
17837
+ dm.dataSource.json = this.visualData;
17838
+ pageingDetails.result = dm.executeLocal(query);
17839
+ pageingDetails.count = this.visualData.length;
17840
+ this.parent.notify('updateAction', pageingDetails);
17841
+ };
17842
+ DomVirtualization.prototype.calculateChildCount = function (startIndex, level, records) {
17843
+ var count = 0;
17844
+ for (var i = startIndex; i < records.length; i++) {
17845
+ if (records[i + 1] && (level === records[i + 1].level || level === records[i + 1].level + 1)) {
17846
+ break;
17847
+ }
17848
+ count++;
17849
+ }
17850
+ return count;
17851
+ };
17852
+ /**
17853
+ * Handles the virtual child collapse or expand action in a tree grid.
17854
+ *
17855
+ * @param {object} row - Object containing information about the collapse/expand action.
17856
+ * @param {string} row.action - The type of action, either "collapse" or "expand".
17857
+ * @param {HTMLTableRowElement} row.row - The HTML row element that is affected by the action.
17858
+ * @param {ITreeData} row.record - The tree data record associated with the row.
17859
+ * @param {RowCollapsedEventArgs} row.args - Additional event arguments related to the row collapse or expand.
17860
+ *
17861
+ * @returns {void} No return value as the function executes a procedure.
17862
+ */
17863
+ DomVirtualization.prototype.collapseExpandVirtualchilds = function (row) {
17864
+ var contentModule = this.parent.grid.contentModule;
17865
+ var isRemote = isRemoteData(this.parent) && !isOffline(this.parent);
17866
+ var flatData = isRemote ? this.parent.getCurrentViewRecords() : this.parent.enableVirtualization ?
17867
+ this.parent.virtualDomScrollData.slice() : this.parent.grid.currentViewData.slice();
17868
+ var totalflatData = this.parent.infiniteScrollData;
17869
+ var uniqueIDCollpaseCollection = this.parent.uniqueIDCollpaseCollection;
17870
+ var startIndex = contentModule.currentStartIndex;
17871
+ if (getValue('isCollapseAll', this.parent) || getValue('isExpandAll', this.parent)) {
17872
+ if (row.action === 'collapse') {
17873
+ flatData.filter(function (e) {
17874
+ if (e.hasChildRecords) {
17875
+ e.expanded = row.action === 'collapse' ? false : true;
17876
+ }
17877
+ });
17878
+ flatData.splice.apply(flatData, [0, flatData.length].concat(this.parent.parentData));
17879
+ // this.parent.pageSettings.totalRecordsCount = this.parent.parentData.length;
17880
+ }
17881
+ else {
17882
+ totalflatData.filter(function (e) {
17883
+ if (e.hasChildRecords) {
17884
+ e.expanded = row.action === 'collapse' ? false : true;
17885
+ }
17886
+ });
17887
+ flatData.splice.apply(flatData, [0, flatData.length].concat(totalflatData));
17888
+ // this.parent.pageSettings.totalRecordsCount = totalflatData.length;
17889
+ }
17890
+ }
17891
+ else {
17892
+ row.record.expanded = row.action === 'collapse' ? false : true;
17893
+ for (var i = startIndex; i < flatData.length; i++) {
17894
+ if (row.record.uniqueID === flatData[parseInt(i.toString(), 10)].uniqueID &&
17895
+ row.record.childRecords.length > 0) {
17896
+ if (row.action === 'collapse') {
17897
+ var level = flatData[parseInt(i.toString(), 10)].level;
17898
+ var count = this.calculateChildCount(i, level, flatData);
17899
+ // this.parent.pageSettings.totalRecordsCount -= count;
17900
+ uniqueIDCollpaseCollection[row.record.uniqueID] = flatData.splice(i + 1, count);
17901
+ }
17902
+ else {
17903
+ if (uniqueIDCollpaseCollection[row.record.uniqueID] && uniqueIDCollpaseCollection[row.record.uniqueID].length) {
17904
+ flatData.splice.apply(flatData, [i + 1, 0].concat(uniqueIDCollpaseCollection[row.record.uniqueID]));
17905
+ // this.parent.pageSettings.totalRecordsCount += uniqueIDCollpaseCollection[row.record.uniqueID].length;
17906
+ }
17907
+ else {
17908
+ uniqueIDCollpaseCollection[row.record.uniqueID] = row.record.childRecords;
17909
+ flatData.splice.apply(flatData, [i + 1, 0].concat(uniqueIDCollpaseCollection[row.record.uniqueID]));
17910
+ // this.parent.pageSettings.totalRecordsCount += uniqueIDCollpaseCollection[row.record.uniqueID].length;
17911
+ }
17912
+ }
17913
+ break;
17914
+ }
17915
+ }
17916
+ }
17917
+ var actionDetails = {
17918
+ result: flatData,
17919
+ row: row.row,
17920
+ action: row.action,
17921
+ record: row.record,
17922
+ count: flatData.length
17923
+ };
17924
+ getValue('grid.renderModule', this.parent).dataManagerSuccess(actionDetails, { requestType: 'refresh' });
17925
+ };
17926
+ DomVirtualization.prototype.destroy = function () {
17927
+ this.removeEventListener();
17928
+ };
17929
+ return DomVirtualization;
17930
+ }());
17931
+ var DomVirtualTreeExtension = /** @__PURE__ @class */ (function (_super) {
17932
+ __extends$l(DomVirtualTreeExtension, _super);
17933
+ /**
17934
+ * Constructor for DomVirtualTreeExtension
17935
+ *
17936
+ * @param {IGrid} parent - Grid instance (actually TreeGrid)
17937
+ * @param {ServiceLocator} locator - Service locator for dependency injection
17938
+ */
17939
+ function DomVirtualTreeExtension(parent, locator) {
17940
+ var _this = _super.call(this, parent, locator) || this;
17941
+ getValue('parent', _this).off(initialLoad, getValue('instantiateRenderer', _this), _this);
17942
+ getValue('parent', _this).on(initialLoad, _this.instantiateRenderers, _this);
17943
+ return _this;
17944
+ }
17945
+ DomVirtualTreeExtension.prototype.getModuleName = function () {
17946
+ return 'treeDomVirtualization';
17947
+ };
17948
+ DomVirtualTreeExtension.prototype.instantiateRenderers = function () {
17949
+ var rendererFactory = getValue('locator', this).getService('rendererFactory');
17950
+ getValue('addRenderer', rendererFactory)
17951
+ .apply(rendererFactory, [RenderType.Content, new DomVirtualTreeContentRenderer(getValue('parent', this), getValue('locator', this))]);
17952
+ };
17953
+ return DomVirtualTreeExtension;
17954
+ }(DomVirtualization$1));
17955
+
17956
+ export { Aggregate, AggregateColumn, AggregateRow, Column, ColumnChooser, ColumnMenu, CommandColumn, ContextMenu, ContextMenuItems, DataManipulation, DetailRow, DomVirtualTreeContentRenderer, DomVirtualTreeExtension, DomVirtualization, DomVirtualizationSettings, 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, collapseActionComplete, 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, hierarchyCheckstateUpdate, 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, virtualExpandCollapse };
17445
17957
  //# sourceMappingURL=ej2-treegrid.es5.js.map