@syncfusion/ej2-treegrid 34.2.6 → 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
@@ -60,14 +60,13 @@ var Edit = /** @class */ (function () {
60
60
  this.parent.on(events.cellEdit, this.cellEdit, this);
61
61
  this.parent.on('actionBegin', this.editActionEvents, this);
62
62
  this.parent.on('actionComplete', this.editActionEvents, this);
63
+ this.parent.on('resetDoubleClickTarget', this.resetDoubleClickTarget, this);
63
64
  this.parent.grid.on(events.doubleTap, this.recordDoubleClick, this);
64
65
  this.parent.grid.on('dblclick', this.gridDblClick, this);
65
66
  this.parent.grid.on('recordAdded', this.customCellSave, this);
66
67
  this.parent.on('savePreviousRowPosition', this.savePreviousRowPosition, this);
67
68
  // this.parent.on(events.beforeDataBound, this.beforeDataBound, this);
68
69
  this.parent.grid.on(events.beforeStartEdit, this.beforeStartEdit, this);
69
- this.parent.grid.on(events.beforeBatchCancel, this.beforeBatchCancel, this);
70
- this.parent.grid.on('reset-edit-props', this.resetIsOnBatch, this);
71
70
  this.parent.grid.on('get-row-position', this.getRowPosition, this);
72
71
  this.parent.grid.on('last-row-validation', this.lastRowValidation, this);
73
72
  };
@@ -83,7 +82,6 @@ var Edit = /** @class */ (function () {
83
82
  /* eslint-disable-next-line */
84
83
  this.parent.grid.getDataRows()[rowIndex].dataset.uid = this.parent.grid.contentModule.getRows()[rowIndex].uid;
85
84
  }
86
- this.doubleClickTarget = null;
87
85
  }
88
86
  };
89
87
  Edit.prototype.getRowPosition = function (addArgs) {
@@ -91,17 +89,14 @@ var Edit = /** @class */ (function () {
91
89
  addArgs.addRowIndex = this.addRowIndex;
92
90
  addArgs.dataRowIndex = +this.prevAriaRowIndex;
93
91
  };
92
+ Edit.prototype.resetDoubleClickTarget = function () {
93
+ this.doubleClickTarget = null;
94
+ };
94
95
  Edit.prototype.beforeStartEdit = function (args) {
95
96
  if (this.parent.editSettings.mode === 'Cell') {
96
97
  this.parent.trigger(events.actionBegin, args);
97
98
  }
98
99
  };
99
- Edit.prototype.beforeBatchCancel = function (args) {
100
- if (this.parent.editSettings.mode === 'Cell') {
101
- args['requestType'] = 'cancel';
102
- this.parent.trigger(events.actionComplete, args);
103
- }
104
- };
105
100
  /**
106
101
  * @hidden
107
102
  * @returns {void}
@@ -125,9 +120,8 @@ var Edit = /** @class */ (function () {
125
120
  this.parent.grid.off(events.doubleTap, this.recordDoubleClick);
126
121
  this.parent.off('savePreviousRowPosition', this.savePreviousRowPosition);
127
122
  this.parent.grid.off(events.beforeStartEdit, this.beforeStartEdit);
128
- this.parent.grid.off(events.beforeBatchCancel, this.beforeBatchCancel);
123
+ this.parent.off('resetDoubleClickTarget', this.resetDoubleClickTarget);
129
124
  this.parent.grid.off('dblclick', this.gridDblClick);
130
- this.parent.grid.off('reset-edit-props', this.resetIsOnBatch);
131
125
  this.parent.grid.off('get-row-position', this.getRowPosition);
132
126
  this.parent.grid.off('last-row-validation', this.lastRowValidation);
133
127
  //this.parent.grid.off('click', this.gridSingleClick);
@@ -254,33 +248,10 @@ var Edit = /** @class */ (function () {
254
248
  return;
255
249
  }
256
250
  var column = this.parent.grid.getColumnByIndex(+target.closest('td.e-rowcell').getAttribute('aria-colindex') - 1);
257
- if (this.parent.editSettings.mode === 'Cell' && !this.isOnBatch && column && !column.isPrimaryKey &&
251
+ if (this.parent.editSettings.mode === 'Cell' && column && !column.isPrimaryKey &&
258
252
  this.parent.editSettings.allowEditing && column.allowEditing && !(target.classList.contains('e-treegridexpand') ||
259
253
  target.classList.contains('e-treegridcollapse')) && this.parent.editSettings.allowEditOnDblClick) {
260
- this.isOnBatch = true;
261
254
  this.parent.grid.setProperties({ selectedRowIndex: args.rowIndex }, true);
262
- if (this.parent.enableVirtualization) {
263
- var tr = parentsUntil(args.target, 'e-row');
264
- this.prevAriaRowIndex = tr.getAttribute('aria-rowindex');
265
- tr.setAttribute('aria-rowindex', (tr.rowIndex + 1) + '');
266
- }
267
- this.updateGridEditMode('Batch');
268
- }
269
- else if (this.parent.editSettings.mode === 'Cell' && (!column.allowEditing || column.isPrimaryKey)) {
270
- this.isOnBatch = true;
271
- this.updateGridEditMode('Batch');
272
- }
273
- };
274
- Edit.prototype.updateGridEditMode = function (mode) {
275
- this.parent.grid.setProperties({ editSettings: { mode: mode } }, true);
276
- var updateMethod = getObject('updateEditObj', this.parent.grid.editModule);
277
- updateMethod.apply(this.parent.grid.editModule);
278
- this.parent.grid.isEdit = false;
279
- };
280
- Edit.prototype.resetIsOnBatch = function () {
281
- if (this.parent.enableVirtualization && this.parent.editSettings.mode === 'Cell' && !this.parent['isGantt']) {
282
- this.isOnBatch = false;
283
- this.updateGridEditMode('Normal');
284
255
  }
285
256
  };
286
257
  Edit.prototype.keyPressed = function (args) {
@@ -291,7 +262,9 @@ var Edit = /** @class */ (function () {
291
262
  this.recordDoubleClick(args);
292
263
  }
293
264
  if (args.action === 'escape') {
294
- this.closeEdit();
265
+ if (this.parent.grid.isEdit) {
266
+ this.closeEdit();
267
+ }
295
268
  }
296
269
  };
297
270
  Edit.prototype.deleteUniqueID = function (value) {
@@ -305,6 +278,13 @@ var Edit = /** @class */ (function () {
305
278
  var promise = 'promise';
306
279
  var prom = args["" + promise];
307
280
  delete args["" + promise];
281
+ if (this.doubleClickTarget && (this.doubleClickTarget.classList.contains('e-treegridexpand') ||
282
+ this.doubleClickTarget.classList.contains('e-treegridcollapse') || this.doubleClickTarget.classList.contains('e-summarycell') ||
283
+ this.doubleClickTarget.closest('.e-hierarchycheckbox'))) {
284
+ args.cancel = true;
285
+ this.doubleClickTarget = null;
286
+ return;
287
+ }
308
288
  if (this.parent.enableVirtualization && !isNullOrUndefined(this.prevAriaRowIndex) && this.prevAriaRowIndex !== '-1') {
309
289
  args.row.setAttribute('aria-rowindex', this.prevAriaRowIndex);
310
290
  this.prevAriaRowIndex = undefined;
@@ -314,21 +294,11 @@ var Edit = /** @class */ (function () {
314
294
  if (!celleditArgs.cancel && _this.parent.editSettings.mode === 'Cell') {
315
295
  _this.enableToolbarItems('edit');
316
296
  }
317
- else if (celleditArgs.cancel && _this.parent.editSettings.mode === 'Cell') {
318
- _this.isOnBatch = false;
319
- _this.updateGridEditMode('Normal');
320
- }
321
297
  if (!isNullOrUndefined(prom)) {
322
298
  prom.resolve(celleditArgs);
323
299
  }
324
300
  });
325
301
  }
326
- if (this.doubleClickTarget && (this.doubleClickTarget.classList.contains('e-treegridexpand') ||
327
- this.doubleClickTarget.classList.contains('e-treegridcollapse') || this.doubleClickTarget.classList.contains('e-summarycell'))) {
328
- args.cancel = true;
329
- this.doubleClickTarget = null;
330
- return;
331
- }
332
302
  if (this.parent.editSettings.mode === 'Cell') {
333
303
  if (this.keyPress === 'tab' || this.keyPress === 'shiftTab') {
334
304
  this.keyPress = null;
@@ -357,20 +327,6 @@ var Edit = /** @class */ (function () {
357
327
  }
358
328
  };
359
329
  Edit.prototype.batchCancel = function () {
360
- if (this.parent.editSettings.mode === 'Cell') {
361
- var cellDetails = getValue('editModule.cellDetails', this.parent.grid.editModule);
362
- if (!isNullOrUndefined(this.editedRowIndex)) {
363
- cellDetails.rowIndex = this.editedRowIndex;
364
- }
365
- var treeCell = this.parent.getCellFromIndex(cellDetails.rowIndex, this.parent.treeColumnIndex);
366
- this.parent.renderModule.cellRender({
367
- data: cellDetails.rowData,
368
- cell: treeCell,
369
- column: this.parent.grid.getColumns()[this.parent.treeColumnIndex]
370
- });
371
- this.updateGridEditMode('Normal');
372
- this.isOnBatch = false;
373
- }
374
330
  if (this.parent.editSettings.mode === 'Batch') {
375
331
  this.parent.notify('batchCancelAction', {});
376
332
  }
@@ -378,138 +334,16 @@ var Edit = /** @class */ (function () {
378
334
  Edit.prototype.customCellSave = function (args) {
379
335
  if (isCountRequired(this.parent) && this.parent.editSettings.mode === 'Cell' && args.action === 'edit') {
380
336
  this.updateCell(args, args.rowIndex);
381
- this.afterCellSave(args, args.row);
382
337
  }
383
338
  };
384
339
  Edit.prototype.cellSave = function (args) {
385
- var _this = this;
386
- if (this.parent.editSettings.mode === 'Cell' && this.parent.element.querySelector('form')) {
387
- args.cancel = true;
388
- var editModule = 'editModule';
389
- setValue('isEditCollapse', true, this.parent);
390
- args.rowData[args.columnName] = args.value;
391
- var row_1;
392
- if (isNullOrUndefined(args.cell)) {
393
- row_1 = this.parent.grid.editModule["" + editModule].form.parentElement.parentNode;
394
- }
395
- else {
396
- row_1 = args.cell.parentNode;
397
- }
398
- var rowIndex_1;
399
- var primaryKeys_1 = this.parent.getPrimaryKeyFieldNames();
400
- if (isNullOrUndefined(row_1)) {
401
- this.parent.grid.getCurrentViewRecords().filter(function (e, i) {
402
- if (e[primaryKeys_1[0]] === args.rowData[primaryKeys_1[0]]) {
403
- rowIndex_1 = i;
404
- return;
405
- }
406
- });
407
- }
408
- else {
409
- var freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
410
- this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
411
- if (freeze) {
412
- if (this.parent.getRows().indexOf(row_1) !== -1) {
413
- rowIndex_1 = this.parent.getRows().indexOf(row_1);
414
- }
415
- else {
416
- rowIndex_1 = this.parent.getRows().indexOf(row_1);
417
- }
418
- }
419
- else {
420
- rowIndex_1 = (this.parent.getRows().indexOf(row_1) === -1 && (this.parent.getFrozenColumns() > 0)) ?
421
- this.parent.grid.getRows().indexOf(row_1) : this.parent.getRows().indexOf(row_1);
422
- }
423
- }
424
- var arg = {};
425
- extend(arg, args);
426
- arg.cancel = false;
427
- arg.type = 'save';
428
- row_1 = this.parent.grid.getRows()[row_1.rowIndex];
429
- this.parent.trigger(events.actionBegin, arg);
430
- if (!arg.cancel) {
431
- if ((row_1.rowIndex === this.parent.getCurrentViewRecords().length - 1) && this.keyPress === 'tab') {
432
- this.isTabLastRow = true;
433
- }
434
- if (!isRemoteData(this.parent) &&
435
- !(this.parent.dataSource instanceof DataManager && this.parent.dataSource.adaptor instanceof RemoteSaveAdaptor)) {
436
- if (isCountRequired(this.parent)) {
437
- var eventPromise = 'eventPromise';
438
- var editArgs = { requestType: 'save', data: args.rowData, action: 'edit', row: row_1,
439
- rowIndex: rowIndex_1, rowData: args.rowData, columnName: args.columnName,
440
- filterChoiceCount: null, excelSearchOperator: null };
441
- this.parent.grid.getDataModule()["" + eventPromise](editArgs, this.parent.grid.query);
442
- }
443
- else {
444
- this.updateCell(args, rowIndex_1);
445
- setValue('isEdit', false, this.parent.grid);
446
- this.afterCellSave(args, row_1);
447
- }
448
- }
449
- else if (isRemoteData(this.parent) ||
450
- (this.parent.dataSource instanceof DataManager && this.parent.dataSource.adaptor instanceof RemoteSaveAdaptor)) {
451
- var query = this.parent.grid.query;
452
- if (this.parent['isGantt'] && this.parent.loadChildOnDemand) {
453
- this.updateCell(args, rowIndex_1);
454
- setValue('isEdit', false, this.parent.grid);
455
- this.afterCellSave(args, row_1);
456
- }
457
- else {
458
- var crud = null;
459
- crud = this.parent.grid.dataSource.update(primaryKeys_1[0], args.rowData, query.fromTable, query, args.previousValue);
460
- crud.then(function (e) {
461
- if (!isNullOrUndefined(e)) {
462
- args.rowData[args.columnName] = e[args.columnName];
463
- }
464
- _this.updateCell(args, rowIndex_1);
465
- setValue('isEdit', false, _this.parent.grid);
466
- _this.afterCellSave(args, row_1);
467
- });
468
- }
469
- }
470
- }
471
- else {
472
- this.parent.grid.isEdit = true;
473
- }
474
- }
475
340
  if (this.parent.enableVirtualization) {
476
341
  this.parent.grid.contentModule['virtualData'] = {};
477
342
  }
478
343
  };
479
- Edit.prototype.afterCellSave = function (args, row) {
480
- if (this.parent.grid.aggregateModule) {
481
- this.parent.grid.aggregateModule.refresh(args.rowData);
482
- }
483
- this.parent.grid.editModule.destroyWidgets([this.parent.grid.getColumnByField(args.columnName)]);
484
- this.parent.grid.editModule.formObj.destroy();
485
- if (this.keyPress !== 'tab' && this.keyPress !== 'shiftTab') {
486
- this.updateGridEditMode('Normal');
487
- this.isOnBatch = false;
488
- }
489
- this.enableToolbarItems('save');
490
- removeClass([row], ['e-editedrow', 'e-batchrow']);
491
- removeClass(row.querySelectorAll('.e-rowcell'), ['e-editedbatchcell', 'e-updatedtd']);
492
- if (this.parent['isCellSaveFocus'] !== false) {
493
- this.parent.grid.focusModule.restoreFocus();
494
- }
495
- editAction({ value: args.rowData, action: 'edit' }, this.parent, this.isSelfReference, this.addRowIndex, this.selectedIndex, args.columnName);
496
- if ((row.rowIndex === this.parent.getCurrentViewRecords().length - 1) && this.keyPress === 'enter') {
497
- this.keyPress = null;
498
- }
499
- var saveArgs = {
500
- type: 'save', column: this.parent.getColumnByField(args.columnName), data: args.rowData,
501
- previousData: args.previousValue, row: row, target: args.cell
502
- };
503
- if (this.parent.aggregates.some(function (ag) { return ag.showChildSummary === true; })) {
504
- this.parent.grid.refresh();
505
- }
506
- this.parent.trigger(events.actionComplete, saveArgs);
507
- };
508
344
  Edit.prototype.lastCellTab = function () {
509
- if (!this.parent.grid.isEdit && this.isOnBatch && this.keyPress === 'tab' && this.parent.editSettings.mode === 'Cell') {
345
+ if (!this.parent.grid.isEdit && this.keyPress === 'tab' && this.parent.editSettings.mode === 'Cell') {
510
346
  if (!this.parent.editSettings.allowNextRowEdit) {
511
- this.updateGridEditMode('Normal');
512
- this.isOnBatch = false;
513
347
  this.keyPress = null;
514
348
  }
515
349
  else {
@@ -767,12 +601,13 @@ var Edit = /** @class */ (function () {
767
601
  args.cancel = true;
768
602
  return;
769
603
  }
770
- if (this.parent.editSettings.mode === 'Cell' && args.requestType === 'beginEdit') {
604
+ if (this.parent.editSettings.mode === 'Cell' && args.requestType === 'beginEdit' && args.row.classList.contains('e-summaryrow')) {
771
605
  args.cancel = true;
772
606
  return;
773
607
  }
774
608
  if (this.doubleClickTarget && args.requestType !== 'delete' && (this.doubleClickTarget.classList.contains('e-treegridexpand') ||
775
- this.doubleClickTarget.classList.contains('e-treegridcollapse') || this.doubleClickTarget.classList.contains('e-frame'))) {
609
+ this.doubleClickTarget.classList.contains('e-treegridcollapse') || this.doubleClickTarget.classList.contains('e-frame') ||
610
+ this.doubleClickTarget.closest('.e-hierarchycheckbox'))) {
776
611
  args.cancel = true;
777
612
  this.doubleClickTarget = null;
778
613
  return;
@@ -780,10 +615,10 @@ var Edit = /** @class */ (function () {
780
615
  if (args.requestType === 'delete') {
781
616
  var data_1 = args.data;
782
617
  if (isNullOrUndefined(args.data[0].uniqueID)) {
783
- var primaryKeys_2 = this.parent.getPrimaryKeyFieldNames();
618
+ var primaryKeys_1 = this.parent.getPrimaryKeyFieldNames();
784
619
  var _loop_1 = function (i) {
785
620
  this_1.parent.flatData.filter(function (e) {
786
- if (e["" + primaryKeys_2[0]] === args.data[parseInt(i.toString(), 10)][primaryKeys_2[0]]) {
621
+ if (e["" + primaryKeys_1[0]] === args.data[parseInt(i.toString(), 10)][primaryKeys_1[0]]) {
787
622
  data_1[parseInt(i.toString(), 10)] = e;
788
623
  }
789
624
  });
@@ -1088,6 +923,7 @@ var Edit = /** @class */ (function () {
1088
923
  else {
1089
924
  this.selectedIndex = this.parent.selectedRowIndex;
1090
925
  this.addRowIndex = this.parent.selectedRowIndex;
926
+ index = this.parent.selectedRowIndex;
1091
927
  }
1092
928
  if (position) {
1093
929
  this.parent.setProperties({ editSettings: { newRowPosition: position } }, true);
@@ -1133,10 +969,6 @@ var Edit = /** @class */ (function () {
1133
969
  */
1134
970
  Edit.prototype.editCell = function (rowIndex, field) {
1135
971
  if (this.parent.editSettings.mode === 'Cell' || this.parent.editSettings.mode === 'Batch') {
1136
- if (this.parent.editSettings.mode !== 'Batch') {
1137
- this.isOnBatch = true;
1138
- this.updateGridEditMode('Batch');
1139
- }
1140
972
  this.parent.grid.editModule.editCell(rowIndex, field);
1141
973
  }
1142
974
  };
@@ -13,7 +13,7 @@ var Filter = /** @class */ (function () {
13
13
  * @param {TreeGrid} parent - Tree Grid instance
14
14
  */
15
15
  function Filter(parent) {
16
- initializeTelemetryFeature('Filter', 'TreeGrid');
16
+ initializeTelemetryFeature('Filter', 'Treegrid');
17
17
  Grid.Inject(GridFilter);
18
18
  this.parent = parent;
19
19
  this.isHierarchyFilter = false;
@@ -22,3 +22,4 @@ export * from './freeze-column';
22
22
  export * from './column-chooser';
23
23
  export * from './logger';
24
24
  export * from './infinite-scroll';
25
+ export * from './dom-virtualization';
@@ -22,3 +22,4 @@ export * from './freeze-column';
22
22
  export * from './column-chooser';
23
23
  export * from './logger';
24
24
  export * from './infinite-scroll';
25
+ export * from './dom-virtualization';
@@ -3,7 +3,7 @@ import { Page as GridPage } from '@syncfusion/ej2-grids';
3
3
  import * as events from '../base/constant';
4
4
  import { DataManager, Query, Predicate } from '@syncfusion/ej2-data';
5
5
  import { getValue, isNullOrUndefined, addClass, removeClass, initializeTelemetryFeature } from '@syncfusion/ej2-base';
6
- import { getExpandStatus, isFilterChildHierarchy } from '../utils';
6
+ import { getExpandStatus, isFilterChildHierarchy, isOffline, isRemoteData } from '../utils';
7
7
  /**
8
8
  * The `Page` module is used to render pager and handle paging action.
9
9
  *
@@ -94,11 +94,16 @@ var Page = /** @class */ (function () {
94
94
  */
95
95
  Page.prototype.collapseExpandPagedchilds = function (rowDetails) {
96
96
  rowDetails.record.expanded = rowDetails.action === 'collapse' ? false : true;
97
- this.parent.flatData.map(function (e) { return e.expanded = e.uniqueID === rowDetails.record.uniqueID &&
97
+ var flatData = this.parent.flatData;
98
+ var isRemote = isRemoteData(this.parent) && !isOffline(this.parent);
99
+ if (this.parent.enableDomVirtualization && isRemote) {
100
+ flatData = this.parent.getCurrentViewRecords();
101
+ }
102
+ flatData.map(function (e) { return e.expanded = e.uniqueID === rowDetails.record.uniqueID &&
98
103
  e.expanded !== rowDetails.record.expanded ? rowDetails.record.expanded : e.expanded; });
99
104
  if (this.parent.enableImmutableMode) {
100
105
  var primaryKeyField_1 = this.parent.getPrimaryKeyFieldNames()[0];
101
- var record = this.parent.flatData.filter(function (e) {
106
+ var record = flatData.filter(function (e) {
102
107
  return e["" + primaryKeyField_1] === rowDetails.record["" + primaryKeyField_1];
103
108
  });
104
109
  if (record.length) {
@@ -106,13 +111,14 @@ var Page = /** @class */ (function () {
106
111
  }
107
112
  }
108
113
  var ret = {
109
- result: this.parent.flatData,
114
+ result: flatData,
110
115
  row: rowDetails.row,
111
116
  action: rowDetails.action,
112
117
  record: rowDetails.record,
113
- count: this.parent.flatData.length
118
+ count: flatData.length
114
119
  };
115
- getValue('grid.renderModule', this.parent).dataManagerSuccess(ret);
120
+ var request = this.parent.enableDomVirtualization ? { requestType: 'refresh' } : undefined;
121
+ getValue('grid.renderModule', this.parent).dataManagerSuccess(ret, request);
116
122
  if (this.parent.enableImmutableMode) {
117
123
  var row = 'row';
118
124
  var action = 'action';
@@ -4,7 +4,7 @@ import { closest, isNullOrUndefined, setValue, extend, getValue, removeClass, ad
4
4
  import { DataManager } from '@syncfusion/ej2-data';
5
5
  import * as events from '../base/constant';
6
6
  import { editAction } from './crud-actions';
7
- import { getParentData, findChildrenRecords, isRemoteData, isOffline, isCountRequired } from '../utils';
7
+ import { getParentData, findChildrenRecords, isRemoteData, isOffline, isCountRequired, isCheckboxcolumn } from '../utils';
8
8
  /**
9
9
  * TreeGrid RowDragAndDrop module
10
10
  *
@@ -1312,6 +1312,7 @@ var RowDD = /** @class */ (function () {
1312
1312
  * @returns {void} - This function does not return any value.
1313
1313
  */
1314
1314
  RowDD.prototype.dropRows = function (args, isByMethod) {
1315
+ var oldParentsList = [];
1315
1316
  if (this.dropPosition !== 'Invalid' && !isRemoteData(this.parent)) {
1316
1317
  var tObj = this.parent;
1317
1318
  var draggedRecord_2;
@@ -1354,6 +1355,15 @@ var RowDD = /** @class */ (function () {
1354
1355
  else {
1355
1356
  dragRecords = args.data;
1356
1357
  }
1358
+ if (isCheckboxcolumn(this.parent) && this.parent.autoCheckHierarchy) {
1359
+ for (var dragIndex = 0; dragIndex < dragRecords.length; dragIndex++) {
1360
+ var drag = dragRecords[parseInt(dragIndex.toString(), 10)];
1361
+ var oldParent = drag && drag.parentItem;
1362
+ if (oldParent) {
1363
+ oldParentsList.push(oldParent);
1364
+ }
1365
+ }
1366
+ }
1357
1367
  this.parent[this.modifiedRecords].push(args.data[0], droppedRecord);
1358
1368
  var count = 0;
1359
1369
  var multiplegrid = this.parent.rowDropSettings.targetID;
@@ -1470,6 +1480,15 @@ var RowDD = /** @class */ (function () {
1470
1480
  _loop_1(i);
1471
1481
  }
1472
1482
  }
1483
+ if (this.dropPosition !== 'Invalid' && !isNullOrUndefined(args.data) && args.data.length
1484
+ && isCheckboxcolumn(this.parent) && this.parent.autoCheckHierarchy) {
1485
+ this.parent.notify(events.hierarchyCheckstateUpdate, {
1486
+ draggedRecords: args.data,
1487
+ oldParents: oldParentsList,
1488
+ droppedRecord: this.droppedRecord,
1489
+ dropPosition: this.dropPosition
1490
+ });
1491
+ }
1473
1492
  };
1474
1493
  /**
1475
1494
  * Handles the logic for inserting a dragged record into the middle of a parent record's child records.
@@ -151,9 +151,18 @@ export declare class Selection {
151
151
  *
152
152
  * @param {Object} record - The record whose children should be summarized.
153
153
  * @param {boolean} [ignoreFilter] - If true, ignore current filter when computing summary.
154
+ * @param {boolean} [useFullChildList] - If true, skip the `getFilteredChildRecords` narrowing
155
+ * step even when a filter is active.
154
156
  * @returns {{ total: number, checked: number, indeterminate: number }} The computed summary.
155
157
  */
156
158
  private buildSelectionSummary;
159
+ /**
160
+ * Decides whether the parent `checkboxState` derivation should consider the full original
161
+ * child set instead of the filtered subset.
162
+ *
163
+ * @returns {boolean} `true` when derivation should use the full child list.
164
+ */
165
+ private shouldConsiderAllChildren;
157
166
  /**
158
167
  * Applies a delta to a selection summary based on a state change.
159
168
  *
@@ -258,6 +267,12 @@ export declare class Selection {
258
267
  * @returns {void}
259
268
  */
260
269
  private updateGridActions;
270
+ /**
271
+ *
272
+ * @param {Object} args - The notification payload from `rowDragdrop.dropRows`.
273
+ * @returns {void}
274
+ */
275
+ private rowDropCompleteSelection;
261
276
  /**
262
277
  * Retrieves checked record objects.
263
278
  * This array maintains the `ITreeData` objects in the order they were selected.
@@ -273,4 +288,10 @@ export declare class Selection {
273
288
  * @returns {number[]} Array of checked row indexes in selection order.
274
289
  */
275
290
  getCheckedRowIndexes(): number[];
291
+ /**
292
+ * Deletes all currently checked records in the TreeGrid.
293
+ *
294
+ * @returns {void}
295
+ */
296
+ deleteCheckedRecords(): void;
276
297
  }