@syncfusion/ej2-treegrid 22.2.9 → 23.1.39

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 (64) hide show
  1. package/CHANGELOG.md +15 -50
  2. package/dist/ej2-treegrid.min.js +3 -3
  3. package/dist/ej2-treegrid.umd.min.js +3 -3
  4. package/dist/ej2-treegrid.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-treegrid.es2015.js +234 -328
  6. package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
  7. package/dist/es6/ej2-treegrid.es5.js +233 -351
  8. package/dist/es6/ej2-treegrid.es5.js.map +1 -1
  9. package/dist/global/ej2-treegrid.min.js +3 -3
  10. package/dist/global/ej2-treegrid.min.js.map +1 -1
  11. package/dist/global/index.d.ts +2 -2
  12. package/package.json +10 -10
  13. package/src/treegrid/actions/batch-edit.js +2 -28
  14. package/src/treegrid/actions/crud-actions.js +1 -1
  15. package/src/treegrid/actions/edit.js +6 -52
  16. package/src/treegrid/actions/excel-export.d.ts +2 -2
  17. package/src/treegrid/actions/freeze-column.d.ts +0 -1
  18. package/src/treegrid/actions/freeze-column.js +4 -36
  19. package/src/treegrid/actions/infinite-scroll.js +8 -8
  20. package/src/treegrid/actions/pdf-export.d.ts +2 -2
  21. package/src/treegrid/actions/rowdragdrop.js +3 -1
  22. package/src/treegrid/actions/selection.js +1 -1
  23. package/src/treegrid/actions/virtual-scroll.js +6 -8
  24. package/src/treegrid/base/data.js +20 -4
  25. package/src/treegrid/base/treegrid-model.d.ts +8 -1
  26. package/src/treegrid/base/treegrid.d.ts +69 -1
  27. package/src/treegrid/base/treegrid.js +172 -34
  28. package/src/treegrid/models/column.d.ts +1 -0
  29. package/src/treegrid/renderer/virtual-row-model-generator.js +4 -4
  30. package/src/treegrid/renderer/virtual-tree-content-render.d.ts +0 -1
  31. package/src/treegrid/renderer/virtual-tree-content-render.js +9 -21
  32. package/styles/material-dark.css +0 -1
  33. package/styles/material.css +0 -1
  34. package/styles/material3-dark.css +0 -1
  35. package/styles/material3-dark.scss +1 -1
  36. package/styles/material3.css +0 -1
  37. package/styles/material3.scss +1 -1
  38. package/styles/tailwind-dark.css +0 -1
  39. package/styles/tailwind.css +0 -1
  40. package/styles/treegrid/bootstrap-dark.scss +1 -1
  41. package/styles/treegrid/bootstrap.scss +1 -1
  42. package/styles/treegrid/bootstrap4.scss +1 -1
  43. package/styles/treegrid/bootstrap5-dark.scss +1 -1
  44. package/styles/treegrid/bootstrap5.scss +1 -1
  45. package/styles/treegrid/fabric-dark.scss +1 -1
  46. package/styles/treegrid/fabric.scss +1 -1
  47. package/styles/treegrid/fluent-dark.scss +1 -1
  48. package/styles/treegrid/fluent.scss +1 -1
  49. package/styles/treegrid/highcontrast-light.scss +1 -1
  50. package/styles/treegrid/highcontrast.scss +1 -1
  51. package/styles/treegrid/material-dark.css +0 -1
  52. package/styles/treegrid/material-dark.scss +1 -1
  53. package/styles/treegrid/material.css +0 -1
  54. package/styles/treegrid/material.scss +1 -1
  55. package/styles/treegrid/material3-dark.css +0 -1
  56. package/styles/treegrid/material3-dark.scss +1 -1
  57. package/styles/treegrid/material3.css +0 -1
  58. package/styles/treegrid/material3.scss +1 -1
  59. package/styles/treegrid/tailwind-dark.css +0 -1
  60. package/styles/treegrid/tailwind-dark.scss +1 -1
  61. package/styles/treegrid/tailwind.css +0 -1
  62. package/styles/treegrid/tailwind.scss +1 -1
  63. package/src/treegrid/renderer/virtual-tree-freeze-render.d.ts +0 -59
  64. package/src/treegrid/renderer/virtual-tree-freeze-render.js +0 -163
@@ -1,5 +1,5 @@
1
1
  import { Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, Internationalization, KeyboardEvents, L10n, NotifyPropertyChanges, Property, SanitizeHtmlHelper, addClass, classList, closest, compile, createElement, debounce, extend, getEnumValue, getValue, isNullOrUndefined, merge, remove, removeClass, select, setStyleAttribute, setValue } from '@syncfusion/ej2-base';
2
- import { Aggregate, Cell, CellRenderer, CellType, Clipboard, ColumnChooser, ColumnFreezeContentRenderer, ColumnFreezeHeaderRenderer, ColumnMenu, ColumnVirtualFreezeRenderer, CommandColumn, ContextMenu, DetailRow, Edit, ExcelExport, Filter, Freeze, FreezeContentRender, FreezeRender, FreezeRowModelGenerator, Grid, InfiniteScroll, InterSectionObserver, Logger, Page, PdfExport, Print, RenderType, Reorder, Resize, RowDD, RowDropSettings, RowRenderer, Scroll, Sort, Toolbar, VirtualContentRenderer, VirtualFreezeHdrRenderer, VirtualFreezeRenderer, VirtualHeaderRenderer, VirtualRowModelGenerator, VirtualScroll, appendChildren, calculateAggregate, detailLists, extend as extend$1, getActualProperties, getObject, getTransformValues, getUid, iterateArrayOrObject, parentsUntil, resetRowIndex, setDebounce, templateCompiler } from '@syncfusion/ej2-grids';
2
+ import { Aggregate, Cell, CellRenderer, CellType, Clipboard, ColumnChooser, ColumnMenu, CommandColumn, ContextMenu, DetailRow, Edit, ExcelExport, Filter, Freeze, Grid, InfiniteScroll, InterSectionObserver, Logger, Page, PdfExport, Print, RenderType, Reorder, Resize, RowDD, RowDropSettings, RowRenderer, Scroll, Sort, Toolbar, VirtualContentRenderer, VirtualHeaderRenderer, VirtualRowModelGenerator, VirtualScroll, appendChildren, calculateAggregate, detailLists, extend as extend$1, getActualProperties, getNumberFormat, getObject, getTransformValues, getUid, iterateArrayOrObject, parentsUntil, resetRowIndex, templateCompiler } from '@syncfusion/ej2-grids';
3
3
  import { createCheckBox } from '@syncfusion/ej2-buttons';
4
4
  import { CacheAdaptor, DataManager, DataUtil, Deferred, JsonAdaptor, ODataAdaptor, Predicate, Query, RemoteSaveAdaptor, UrlAdaptor, WebApiAdaptor, WebMethodAdaptor } from '@syncfusion/ej2-data';
5
5
  import { createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';
@@ -1348,7 +1348,7 @@ var Selection = /** @__PURE__ @class */ (function () {
1348
1348
  if (recordIndex > -1) {
1349
1349
  var movableTr = void 0;
1350
1350
  if (this.parent.frozenRows || this.parent.getFrozenColumns()) {
1351
- movableTr = this.parent.getMovableDataRows()[parseInt(recordIndex.toString(), 10)];
1351
+ movableTr = this.parent.getDataRows()[parseInt(recordIndex.toString(), 10)];
1352
1352
  }
1353
1353
  checkbox = tr.querySelectorAll('.e-frame')[0] ? tr.querySelectorAll('.e-frame')[0]
1354
1354
  : movableTr.querySelectorAll('.e-frame')[0];
@@ -2085,9 +2085,13 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
2085
2085
  qry.isCountRequired = true;
2086
2086
  dm.executeQuery(qry).then(function (e) {
2087
2087
  _this.parentItems = DataUtil.distinct(e.result, _this.parent.parentIdMapping, false);
2088
- var req = getObject('dataSource.requests', _this.parent).filter(function (e) {
2089
- return e.httpRequest.statusText !== 'OK';
2090
- }).length;
2088
+ var req;
2089
+ if (e.result) {
2090
+ req = 0;
2091
+ }
2092
+ else {
2093
+ req = 1;
2094
+ }
2091
2095
  if (req === 0) {
2092
2096
  setValue('grid.contentModule.isLoaded', true, _this.parent);
2093
2097
  if (!isNullOrUndefined(_this.zerothLevelData)) {
@@ -2347,7 +2351,19 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
2347
2351
  var remoteCollapsedData = 'remoteCollapsedData';
2348
2352
  var level = 'level';
2349
2353
  var datas = _this.parent.grid.currentViewData.slice();
2350
- var inx = datas.indexOf(rowDetails.record);
2354
+ var inx;
2355
+ var idMapping = _this.parent.idMapping;
2356
+ if (_this.parent['isGantt'] && !_this.parent.loadChildOnDemand && _this.parent.hasChildMapping) {
2357
+ for (var i = 0; i < _this.parent.grid.currentViewData.length; i++) {
2358
+ if (rowDetails.record[idMapping] === _this.parent.grid.currentViewData[i][idMapping]) {
2359
+ inx = i;
2360
+ break;
2361
+ }
2362
+ }
2363
+ }
2364
+ else {
2365
+ inx = datas.indexOf(rowDetails.record);
2366
+ }
2351
2367
  if (_this.parent.enableVirtualization && (rowDetails.action === 'collapse' || rowDetails.action === 'remoteExpand')) {
2352
2368
  datas = [];
2353
2369
  for (var i = 0; i < inx; i++) {
@@ -3549,7 +3565,7 @@ function updateParentRow(key, record, action, control, isSelfReference, child) {
3549
3565
  }
3550
3566
  var movableRow = void 0;
3551
3567
  if (control.frozenRows || control.getFrozenColumns()) {
3552
- movableRow = control.getMovableRowByIndex(index_1);
3568
+ movableRow = control.getRowByIndex(index_1);
3553
3569
  }
3554
3570
  if (!control.enableVirtualization && !isNullOrUndefined(row) || !isNullOrUndefined(movableRow)) {
3555
3571
  var index_2 = control.treeColumnIndex;
@@ -3725,6 +3741,112 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
3725
3741
  TreeGrid.prototype.pdfExport = function (pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
3726
3742
  return this.pdfExportModule.Map(pdfExportProperties, isMultipleExport, pdfDoc, isBlob);
3727
3743
  };
3744
+ /**
3745
+ * Sends a post request to export tree grid to excel file in server side.
3746
+ *
3747
+ * @param {string} url - Pass URL for server side excel export action.
3748
+ * @returns {void}
3749
+ */
3750
+ TreeGrid.prototype.serverExcelExport = function (url) {
3751
+ this.isExcel = true;
3752
+ this.exportTreeGrid(url);
3753
+ };
3754
+ /**
3755
+ * Sends a post request to export tree grid to pdf file in server side.
3756
+ *
3757
+ * @param {string} url - Pass URL for server-side pdf export action.
3758
+ * @returns {void}
3759
+ */
3760
+ TreeGrid.prototype.serverPdfExport = function (url) {
3761
+ this.isExcel = false;
3762
+ this.exportTreeGrid(url);
3763
+ };
3764
+ /**
3765
+ * Sends a Post request to export Tree Grid to CSV file in server side.
3766
+ *
3767
+ * @param {string} url - Pass URL for server-side csv export action.
3768
+ * @returns {void}
3769
+ */
3770
+ TreeGrid.prototype.serverCsvExport = function (url) {
3771
+ this.isExcel = true;
3772
+ this.exportTreeGrid(url);
3773
+ };
3774
+ /**
3775
+ * Exports the TreeGrid data to the specified URL using a POST request.
3776
+ * @param {string} url - Defines exporting url
3777
+ * @returns {void}
3778
+ */
3779
+ TreeGrid.prototype.exportTreeGrid = function (url) {
3780
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
3781
+ var treegrid = this;
3782
+ var query = treegrid.grid.getDataModule().generateQuery(true);
3783
+ var state = new UrlAdaptor().processQuery(new DataManager({ url: '' }), query);
3784
+ var queries = JSON.parse(state.data);
3785
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
3786
+ var treeGridModel = JSON.parse(this.addOnPersist(['allowPaging', 'pageSettings', 'sortSettings', 'allowPdfExport', 'allowExcelExport', 'aggregates',
3787
+ 'filterSettings', 'columns', 'locale', 'searchSettings', 'idMapping', 'parentIdMapping', 'childMapping', 'treeColumnIndex']));
3788
+ var include = ['field', 'headerText', 'type', 'format', 'visible',
3789
+ 'template', 'index', 'width', 'textAlign', 'headerTextAlign', 'columns'];
3790
+ treeGridModel.filterSettings.columns = queries.where;
3791
+ treeGridModel.searchSettings.fields = queries.search && queries.search[0]['fields'] || [];
3792
+ treeGridModel.sortSettings.columns = queries.sorted;
3793
+ treeGridModel.columns = this.setHeaderText(treeGridModel.columns, include);
3794
+ var form = this.createElement('form', { id: 'ExportForm', styles: 'display:none;' });
3795
+ var treeGridInput = this.createElement('input', { id: 'treeGridInput', attrs: { name: 'treeGridModel' } });
3796
+ treeGridInput.value = JSON.stringify(treeGridModel);
3797
+ form.method = 'POST';
3798
+ form.action = url;
3799
+ form.appendChild(treeGridInput);
3800
+ document.body.appendChild(form);
3801
+ form.submit();
3802
+ form.remove();
3803
+ };
3804
+ /**
3805
+ * Sets the header text and other properties for an array of columns based on specified criteria.
3806
+ * @param {Column[]} columns - Defines array of columns
3807
+ * @param {string[]} include - Defines array of sting
3808
+ * @returns {Column[]} returns array of columns
3809
+ */
3810
+ TreeGrid.prototype.setHeaderText = function (columns, include) {
3811
+ for (var i = 0; i < columns.length; i++) {
3812
+ var column = this.getColumnByUid(columns[parseInt(i.toString(), 10)].uid);
3813
+ if (this.stackedHeader && isNullOrUndefined(column)) {
3814
+ column = !isNullOrUndefined(columns[parseInt(i.toString(), 10)].field) ?
3815
+ this.getColumnByField(columns[parseInt(i.toString(), 10)].field) : columns[parseInt(i.toString(), 10)];
3816
+ }
3817
+ columns[parseInt(i.toString(), 10)].headerText = column.headerText;
3818
+ if (!isNullOrUndefined(column.template)) {
3819
+ columns[parseInt(i.toString(), 10)].template = 'true';
3820
+ }
3821
+ if (columns[parseInt(i.toString(), 10)].format) {
3822
+ columns[parseInt(i.toString(), 10)].format = getNumberFormat(this.getFormat(column.format), column.type, false, this.currencyCode);
3823
+ if (!this.isExcel && (column.type === 'datetime' || column.type === 'date')) {
3824
+ columns[parseInt(i.toString(), 10)].format = columns[parseInt(i.toString(), 10)].format.toString().replace('AM/PM', 'tt');
3825
+ }
3826
+ columns[parseInt(i.toString(), 10)].type = column.type;
3827
+ }
3828
+ if (columns[parseInt(i.toString(), 10)].columns) {
3829
+ this.setHeaderText(columns[parseInt(i.toString(), 10)].columns, include);
3830
+ }
3831
+ var keys = Object.keys(columns[parseInt(i.toString(), 10)]);
3832
+ for (var j = 0; j < keys.length; j++) {
3833
+ if (include.indexOf(keys[parseInt(j.toString(), 10)]) < 0) {
3834
+ delete columns[parseInt(i.toString(), 10)][keys[parseInt(j.toString(), 10)]];
3835
+ }
3836
+ }
3837
+ }
3838
+ return columns;
3839
+ };
3840
+ /**
3841
+ * Retrieves the appropriate format string from the given format options.
3842
+ *
3843
+ * @param {string | NumberFormatOptions | DateFormatOptions} format - The format options to retrieve the format string from.
3844
+ * @returns {string} The format string extracted from the provided format options.
3845
+ */
3846
+ TreeGrid.prototype.getFormat = function (format) {
3847
+ return typeof (format) === 'object' ? !isNullOrUndefined(format.format) ?
3848
+ format.format : format.skeleton : format;
3849
+ };
3728
3850
  /**
3729
3851
  * For internal use only - Get the module name.
3730
3852
  *
@@ -4000,7 +4122,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4000
4122
  TreeGrid.prototype.requiredModules = function () {
4001
4123
  var modules = [];
4002
4124
  var splitFrozenCount = 'splitFrozenCount';
4003
- this.grid["" + splitFrozenCount](this.getGridColumns(this.columns));
4125
+ this.grid["" + splitFrozenCount](this.getColumns());
4004
4126
  if (this.isDestroyed) {
4005
4127
  return modules;
4006
4128
  }
@@ -4360,9 +4482,11 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4360
4482
  TreeGrid.prototype.IsExpandCollapseClicked = function (args) {
4361
4483
  if (!isNullOrUndefined(args.target) && (args.target.classList.contains('e-treegridexpand')
4362
4484
  || args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell'))
4363
- && (!isNullOrUndefined(args.data) && args.data['hasChildRecords']) && !this.selectionSettings.checkboxOnly) {
4364
- args.cancel = true;
4365
- return;
4485
+ && !this.selectionSettings.checkboxOnly) {
4486
+ if ((!isNullOrUndefined(args.data) && args.data['hasChildRecords']) || (args.rowIndex !== -1 && isNullOrUndefined(args.data))) {
4487
+ args.cancel = true;
4488
+ return;
4489
+ }
4366
4490
  }
4367
4491
  };
4368
4492
  TreeGrid.prototype.bindGridEvents = function () {
@@ -4480,9 +4604,13 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4480
4604
  _this.updateAltRow(_this.getRows());
4481
4605
  _this.notify('dataBoundArg', args);
4482
4606
  if (isRemoteData(_this) && !isOffline(_this) && !_this.hasChildMapping) {
4483
- var req = getObject('dataSource.requests', _this).filter(function (e) {
4484
- return e.httpRequest.statusText !== 'OK';
4485
- }).length;
4607
+ var req = void 0;
4608
+ if (_this.dataResults.result) {
4609
+ req = 0;
4610
+ }
4611
+ else {
4612
+ req = 1;
4613
+ }
4486
4614
  setValue('grid.contentModule.isLoaded', !(req > 0), _this);
4487
4615
  }
4488
4616
  if (_this.isPixelHeight() && _this.initialRender) {
@@ -5447,6 +5575,18 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5447
5575
  }
5448
5576
  this.isEditCollapse = false;
5449
5577
  this.notify('checkboxSelection', { target: target });
5578
+ if (this.grid.isCheckBoxSelection && !this.grid.isPersistSelection) {
5579
+ if (this.aggregates.map(function (ag) { return ag.showChildSummary === true; }).length) {
5580
+ var checkedTarget = this.grid.getHeaderContent().querySelector('.e-checkselectall');
5581
+ var checkedLen = this.grid.getSelectedRowIndexes().length;
5582
+ var totalRecords = this.getCurrentViewRecords().length;
5583
+ if (checkedLen === totalRecords) {
5584
+ var spanEle = checkedTarget.nextElementSibling;
5585
+ removeClass([spanEle], ['e-stop', 'e-uncheck']);
5586
+ addClass([spanEle], ['e-check']);
5587
+ }
5588
+ }
5589
+ }
5450
5590
  };
5451
5591
  /**
5452
5592
  * Returns TreeGrid rows
@@ -6243,7 +6383,6 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6243
6383
  var children = 'Children';
6244
6384
  if (!(isRemoteData(this) && !isOffline(this)) && (!isCountRequired(this) || !isNullOrUndefined(record["" + children]))) {
6245
6385
  var expandArgs = { data: record, row: row };
6246
- this.setHeightForFrozenContent();
6247
6386
  if (!isNullOrUndefined(this.expandStateMapping)) {
6248
6387
  this.updateExpandStateMapping(expandArgs.data, true);
6249
6388
  }
@@ -6270,12 +6409,6 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6270
6409
  this.expandCollapse(action, null, records[parseInt(i.toString(), 10)]);
6271
6410
  }
6272
6411
  };
6273
- TreeGrid.prototype.setHeightForFrozenContent = function () {
6274
- var freeze = (this.grid.getFrozenLeftColumnsCount() > 0 || this.grid.getFrozenRightColumnsCount() > 0) ? true : false;
6275
- if (this.grid.getFrozenColumns() > 0 || freeze) {
6276
- this.grid.contentModule.refreshScrollOffset();
6277
- }
6278
- };
6279
6412
  TreeGrid.prototype.getCollapseExpandRecords = function (row, record) {
6280
6413
  if (this.allowPaging && this.pageSettings.pageSizeMode === 'All' && this.isExpandAll && isNullOrUndefined(record) &&
6281
6414
  !isRemoteData(this)) {
@@ -6352,7 +6485,6 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6352
6485
  this.expandCollapse('collapse', row, record);
6353
6486
  var collapseArgs = { data: record, row: row };
6354
6487
  if (!isRemoteData(this)) {
6355
- this.setHeightForFrozenContent();
6356
6488
  if (!isNullOrUndefined(this.expandStateMapping)) {
6357
6489
  this.updateExpandStateMapping(collapseArgs.data, false);
6358
6490
  }
@@ -6807,7 +6939,6 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6807
6939
  _this.isExpandRefresh = true;
6808
6940
  var scrollHeightBeforeRefresh = _this.getContentTable().parentElement.scrollTop;
6809
6941
  _this.grid.refresh();
6810
- _this.setHeightForFrozenContent();
6811
6942
  if (_this.enableInfiniteScrolling) {
6812
6943
  _this.getContentTable().parentElement.scrollTop = scrollHeightBeforeRefresh;
6813
6944
  }
@@ -6830,7 +6961,6 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6830
6961
  this.notify(remoteExpand, { record: record, rows: rows, parentRow: row });
6831
6962
  var args_1 = { row: row, data: record };
6832
6963
  if (rows.length > 0) {
6833
- this.setHeightForFrozenContent();
6834
6964
  this.trigger(expanded, args_1);
6835
6965
  }
6836
6966
  }
@@ -6839,7 +6969,6 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6839
6969
  }
6840
6970
  else {
6841
6971
  this.collapseRemoteChild({ record: record, rows: rows });
6842
- this.setHeightForFrozenContent();
6843
6972
  this.trigger(collapsed, args);
6844
6973
  }
6845
6974
  };
@@ -6874,12 +7003,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6874
7003
  }
6875
7004
  var freeze = (this.grid.getFrozenLeftColumnsCount() > 0 || this.grid.getFrozenRightColumnsCount() > 0) ? true : false;
6876
7005
  if (this.frozenRows || this.frozenColumns || this.getFrozenColumns() || freeze) {
6877
- movableRows = this.getMovableRows().filter(function (r) {
7006
+ movableRows = this.getRows().filter(function (r) {
6878
7007
  return r.querySelector('.e-gridrowindex' + record.index + 'level' + (record.level + 1));
6879
7008
  });
6880
7009
  }
6881
7010
  if (freeze) {
6882
- freezeRightRows = this.getFrozenRightRows().filter(function (r) {
7011
+ freezeRightRows = this.getRows().filter(function (r) {
6883
7012
  return r.querySelector('.e-gridrowindex' + record.index + 'level' + (record.level + 1));
6884
7013
  });
6885
7014
  }
@@ -6979,10 +7108,10 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6979
7108
  var rightrows = [];
6980
7109
  var freeze = (this.getFrozenLeftColumnsCount() > 0 || this.getFrozenRightColumnsCount() > 0) ? true : false;
6981
7110
  if (freeze) {
6982
- movablerows = this.getMovableRows().filter(function (r) {
7111
+ movablerows = this.getRows().filter(function (r) {
6983
7112
  return r.querySelector('.e-gridrowindex' + rowDetails.record.index + 'level' + (rowDetails.record.level + 1));
6984
7113
  });
6985
- rightrows = this.getFrozenRightRows().filter(function (r) {
7114
+ rightrows = this.getRows().filter(function (r) {
6986
7115
  return r.querySelector('.e-gridrowindex' + rowDetails.record.index + 'level' + (rowDetails.record.level + 1));
6987
7116
  });
6988
7117
  }
@@ -7192,59 +7321,72 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
7192
7321
  * @param {number} rowIndex - Specifies the row index.
7193
7322
  * @param {number} columnIndex - Specifies the column index.
7194
7323
  * @returns {Element} - Returns movable cell element from the indexes passed
7324
+ *
7325
+ * @deprecated This method is deprecated. Use getCellFromIndex method instead.
7195
7326
  */
7196
7327
  TreeGrid.prototype.getMovableCellFromIndex = function (rowIndex, columnIndex) {
7197
- return this.grid.getMovableCellFromIndex(rowIndex, columnIndex);
7328
+ return this.grid.getCellFromIndex(rowIndex, columnIndex);
7198
7329
  };
7199
7330
  /**
7200
7331
  * Gets all the TreeGrid's movable table data rows.
7201
7332
  *
7202
7333
  * @returns {Element[]} - Returns element collection of movable rows
7334
+ *
7335
+ * @deprecated This method is deprecated. Use getDataRows method instead.
7203
7336
  */
7204
7337
  TreeGrid.prototype.getMovableDataRows = function () {
7205
- return this.grid.getMovableDataRows();
7338
+ return this.grid.getDataRows();
7206
7339
  };
7207
7340
  /**
7208
7341
  * Gets a movable tables row by index.
7209
7342
  *
7210
7343
  * @param {number} index - Specifies the row index.
7211
7344
  * @returns {Element} - Returns movable row based on index passed
7345
+ *
7346
+ * @deprecated This method is deprecated. Use getRowByIndex method instead.
7212
7347
  */
7213
7348
  TreeGrid.prototype.getMovableRowByIndex = function (index) {
7214
- return this.grid.getMovableRowByIndex(index);
7349
+ return this.grid.getRowByIndex(index);
7215
7350
  };
7216
7351
  /**
7217
7352
  * Gets the TreeGrid's movable content rows from frozen treegrid.
7218
7353
  *
7219
7354
  * @returns {Element[]}: Returns movable row element
7355
+ * @deprecated This method is deprecated. Use getRows method instead.
7220
7356
  */
7221
7357
  TreeGrid.prototype.getMovableRows = function () {
7222
- return this.grid.getMovableRows();
7358
+ return this.grid.getRows();
7223
7359
  };
7224
7360
  /**
7225
7361
  * Gets a frozen right tables row element by index.
7226
7362
  *
7227
7363
  * @param {number} index - Specifies the row index.
7228
7364
  * @returns {Element} returns the element
7365
+ *
7366
+ * @deprecated This method is deprecated. Use getRowByIndex method instead.
7229
7367
  */
7230
7368
  TreeGrid.prototype.getFrozenRightRowByIndex = function (index) {
7231
- return this.grid.getFrozenRightRowByIndex(index);
7369
+ return this.grid.getRowByIndex(index);
7232
7370
  };
7233
7371
  /**
7234
7372
  * Gets the Tree Grid's frozen right content rows from frozen Tree Grid.
7235
7373
  *
7236
7374
  * @returns {Element[]} returns the element
7375
+ *
7376
+ * @deprecated This method is deprecated. Use getRows method instead.
7237
7377
  */
7238
7378
  TreeGrid.prototype.getFrozenRightRows = function () {
7239
- return this.grid.getFrozenRightRows();
7379
+ return this.grid.getRows();
7240
7380
  };
7241
7381
  /**
7242
7382
  * Gets all the Tree Grid's frozen right table data rows.
7243
7383
  *
7244
7384
  * @returns {Element[]} Returns the Element
7385
+ *
7386
+ * @deprecated This method is deprecated. Use getDataRows method instead.
7245
7387
  */
7246
7388
  TreeGrid.prototype.getFrozenRightDataRows = function () {
7247
- return this.grid.getFrozenRightDataRows();
7389
+ return this.grid.getDataRows();
7248
7390
  };
7249
7391
  /**
7250
7392
  * Gets a frozen right table cell by row and column index.
@@ -7252,36 +7394,44 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
7252
7394
  * @param {number} rowIndex - Specifies the row index.
7253
7395
  * @param {number} columnIndex - Specifies the column index.
7254
7396
  * @returns {Element} Returns the Element
7397
+ *
7398
+ * @deprecated This method is deprecated. Use getCellFromIndex method instead.
7255
7399
  */
7256
7400
  TreeGrid.prototype.getFrozenRightCellFromIndex = function (rowIndex, columnIndex) {
7257
- return this.grid.getFrozenRightCellFromIndex(rowIndex, columnIndex);
7401
+ return this.grid.getCellFromIndex(rowIndex, columnIndex);
7258
7402
  };
7259
7403
  /**
7260
7404
  * Gets a frozen left column header by column index.
7261
7405
  *
7262
7406
  * @param {number} index - Specifies the column index.
7263
7407
  * @returns {Element} Returns the Element
7408
+ *
7409
+ * @deprecated This method is deprecated. Use getColumnHeaderByIndex method instead.
7264
7410
  */
7265
7411
  TreeGrid.prototype.getFrozenLeftColumnHeaderByIndex = function (index) {
7266
- return this.grid.getFrozenLeftColumnHeaderByIndex(index);
7412
+ return this.grid.getColumnHeaderByIndex(index);
7267
7413
  };
7268
7414
  /**
7269
7415
  * Gets a frozen right column header by column index.
7270
7416
  *
7271
7417
  * @param {number} index - Specifies the column index.
7272
7418
  * @returns {Element} Returns the Element
7419
+ *
7420
+ * @deprecated This method is deprecated. Use getColumnHeaderByIndex method instead.
7273
7421
  */
7274
7422
  TreeGrid.prototype.getFrozenRightColumnHeaderByIndex = function (index) {
7275
- return this.grid.getFrozenRightColumnHeaderByIndex(index);
7423
+ return this.grid.getColumnHeaderByIndex(index);
7276
7424
  };
7277
7425
  /**
7278
7426
  * Gets a movable column header by column index.
7279
7427
  *
7280
7428
  * @param {number} index - Specifies the column index.
7281
7429
  * @returns {Element} Returns the Element
7430
+ *
7431
+ * @deprecated This method is deprecated. Use getColumnHeaderByIndex method instead.
7282
7432
  */
7283
7433
  TreeGrid.prototype.getMovableColumnHeaderByIndex = function (index) {
7284
- return this.grid.getMovableColumnHeaderByIndex(index);
7434
+ return this.grid.getColumnHeaderByIndex(index);
7285
7435
  };
7286
7436
  /**
7287
7437
  * @hidden
@@ -7515,6 +7665,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
7515
7665
  __decorate([
7516
7666
  Complex({}, RowDropSettings)
7517
7667
  ], TreeGrid.prototype, "rowDropSettings", void 0);
7668
+ __decorate([
7669
+ Property('USD')
7670
+ ], TreeGrid.prototype, "currencyCode", void 0);
7518
7671
  __decorate([
7519
7672
  Property()
7520
7673
  ], TreeGrid.prototype, "pagerTemplate", void 0);
@@ -8653,6 +8806,9 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
8653
8806
  if (!tObj.rowDropSettings.targetID && this.canDrop) {
8654
8807
  tObj.rowDragAndDropModule.updateIcon(args.rows, rowIdx, args);
8655
8808
  }
8809
+ if (isNullOrUndefined(tObj.rowDropSettings.targetID) && !this.canDrop) {
8810
+ this.removetopOrBottomBorder();
8811
+ }
8656
8812
  if (tObj.rowDropSettings.targetID) {
8657
8813
  var dropElement = parentsUntil(args.target, 'e-treegrid');
8658
8814
  if (dropElement && dropElement.id === this.parent.rowDropSettings.targetID) {
@@ -8676,7 +8832,6 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
8676
8832
  this.dropPosition = 'Invalid';
8677
8833
  }
8678
8834
  setValue('dropPosition', this.dropPosition, args);
8679
- args.dropIndex = args.dropIndex === args.fromIndex ? this.getTargetIdx(args.target.parentElement) : args.dropIndex;
8680
8835
  tObj.trigger(rowDrop, args);
8681
8836
  if (!args.cancel) {
8682
8837
  if (!isCountRequired(this.parent)) {
@@ -9454,8 +9609,8 @@ var TreeVirtualRowModelGenerator = /** @__PURE__ @class */ (function (_super) {
9454
9609
  var currentPage = this["" + model].currentPage;
9455
9610
  if (clear) {
9456
9611
  this.cache = {};
9457
- this.movableCache = {};
9458
- this.frozenRightCache = {};
9612
+ /*this.movableCache = {};
9613
+ this.frozenRightCache = {};*/
9459
9614
  this.data = {};
9460
9615
  this.groups = {};
9461
9616
  }
@@ -9470,8 +9625,8 @@ var TreeVirtualRowModelGenerator = /** @__PURE__ @class */ (function (_super) {
9470
9625
  this.cache = {};
9471
9626
  this.data = {};
9472
9627
  this.groups = {};
9473
- this.movableCache = {};
9474
- this.frozenRightCache = {};
9628
+ /*this.movableCache = {};
9629
+ this.frozenRightCache = {};*/
9475
9630
  }
9476
9631
  }
9477
9632
  return clear;
@@ -11069,21 +11224,7 @@ var BatchEdit = /** @__PURE__ @class */ (function () {
11069
11224
  };
11070
11225
  BatchEdit.prototype.cellSaved = function (args) {
11071
11226
  var actualCellIndex = args.column.index;
11072
- var frozenCols = this.parent.frozenColumns || this.parent.getFrozenColumns();
11073
- if (frozenCols && args.columnObject.index > frozenCols) {
11074
- actualCellIndex = actualCellIndex + frozenCols;
11075
- }
11076
- var freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
11077
- this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
11078
- if (freeze) {
11079
- var colCount = this.parent.getFrozenLeftColumnsCount() + actualCellIndex;
11080
- if (colCount === this.parent.treeColumnIndex) {
11081
- this.parent.renderModule.cellRender({ data: args.rowData, cell: args.cell,
11082
- column: this.parent.grid.getColumnByIndex(args.column.index)
11083
- });
11084
- }
11085
- }
11086
- else if (actualCellIndex === this.parent.treeColumnIndex) {
11227
+ if (actualCellIndex === this.parent.treeColumnIndex) {
11087
11228
  this.parent.renderModule.cellRender({ data: args.rowData, cell: args.cell,
11088
11229
  column: this.parent.grid.getColumnByIndex(args.column.index)
11089
11230
  });
@@ -11287,7 +11428,7 @@ var BatchEdit = /** @__PURE__ @class */ (function () {
11287
11428
  for (var i = firstChildIndex; i <= totalCount; i++) {
11288
11429
  row.push(this.parent.grid.getDataRows()[parseInt(i.toString(), 10)]);
11289
11430
  if (this.parent.frozenRows || this.parent.frozenColumns || this.parent.getFrozenColumns()) {
11290
- row.push(this.parent.grid.getMovableRows()[parseInt(i.toString(), 10)]);
11431
+ row.push(this.parent.grid.getHeaderContent()[parseInt(i.toString(), 10)]);
11291
11432
  }
11292
11433
  }
11293
11434
  }
@@ -11319,18 +11460,6 @@ var BatchEdit = /** @__PURE__ @class */ (function () {
11319
11460
  for (var i = 0; i < rows.length; i++) {
11320
11461
  rows[parseInt(i.toString(), 10)].setAttribute('data-rowindex', i.toString());
11321
11462
  }
11322
- var freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
11323
- this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
11324
- if (this.parent.frozenRows || this.parent.getFrozenColumns() || this.parent.frozenColumns || freeze) {
11325
- var mRows = this.parent.grid.getMovableDataRows();
11326
- var freezeRightRows = this.parent.grid.getFrozenRightDataRows();
11327
- for (var i = 0; i < mRows.length; i++) {
11328
- mRows[parseInt(i.toString(), 10)].setAttribute('data-rowindex', i.toString());
11329
- if (freeze) {
11330
- freezeRightRows[parseInt(i.toString(), 10)].setAttribute('data-rowindex', i.toString());
11331
- }
11332
- }
11333
- }
11334
11463
  };
11335
11464
  BatchEdit.prototype.updateChildCount = function (records) {
11336
11465
  var primaryKey = this.parent.grid.getPrimaryKeyFieldNames()[0];
@@ -11789,8 +11918,8 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
11789
11918
  currentData.splice(newRowObjectIndex, 0, newRecord);
11790
11919
  this.updateInfiniteCurrentViewData(newRecord, this.addRowIndex);
11791
11920
  }
11792
- var movableRows = this.parent.grid.getMovableRows();
11793
- var movableRowsObject = this.parent.grid.getMovableRowsObject();
11921
+ var movableRows = this.parent.grid.getRows();
11922
+ var movableRowsObject = this.parent.grid.getRowsObject();
11794
11923
  var isCache = this.parent.infiniteScrollSettings.enableCache;
11795
11924
  if (!isCache) {
11796
11925
  resetRowIndex(this.parent.grid, this.parent.grid.getRowsObject(), this.parent.grid.getRows(), 0);
@@ -11997,16 +12126,13 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
11997
12126
  if (this.parent.getRows().indexOf(row_1) !== -1) {
11998
12127
  rowIndex_1 = this.parent.getRows().indexOf(row_1);
11999
12128
  }
12000
- else if (this.parent.getFrozenRightRows().indexOf(row_1) !== -1) {
12001
- rowIndex_1 = this.parent.getFrozenRightRows().indexOf(row_1);
12002
- }
12003
12129
  else {
12004
- rowIndex_1 = this.parent.getMovableRows().indexOf(row_1);
12130
+ rowIndex_1 = this.parent.getRows().indexOf(row_1);
12005
12131
  }
12006
12132
  }
12007
12133
  else {
12008
12134
  rowIndex_1 = (this.parent.getRows().indexOf(row_1) === -1 && (this.parent.getFrozenColumns() > 0)) ?
12009
- this.parent.grid.getMovableRows().indexOf(row_1) : this.parent.getRows().indexOf(row_1);
12135
+ this.parent.grid.getRows().indexOf(row_1) : this.parent.getRows().indexOf(row_1);
12010
12136
  }
12011
12137
  }
12012
12138
  var arg = {};
@@ -12062,7 +12188,6 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
12062
12188
  }
12063
12189
  };
12064
12190
  Edit$$1.prototype.afterCellSave = function (args, row, rowIndex) {
12065
- var mRow;
12066
12191
  if (this.parent.grid.aggregateModule) {
12067
12192
  this.parent.grid.aggregateModule.refresh(args.rowData);
12068
12193
  }
@@ -12073,31 +12198,6 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
12073
12198
  this.isOnBatch = false;
12074
12199
  }
12075
12200
  this.enableToolbarItems('save');
12076
- var freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
12077
- this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
12078
- if (freeze) {
12079
- if (args.cell.closest('.e-frozen-left-header') || args.cell.closest('.e-frozen-left-content')) {
12080
- mRow = this.parent.grid.getRows()[parseInt(rowIndex.toString(), 10)];
12081
- }
12082
- else if (args.cell.closest('.e-movableheader') || args.cell.closest('.e-movablecontent')) {
12083
- mRow = this.parent.grid.getMovableRows()[parseInt(rowIndex.toString(), 10)];
12084
- }
12085
- else {
12086
- mRow = this.parent.grid.getFrozenRightRows()[parseInt(rowIndex.toString(), 10)];
12087
- }
12088
- removeClass([mRow], ['e-editedrow', 'e-batchrow']);
12089
- removeClass(mRow.querySelectorAll('.e-rowcell'), ['e-editedbatchcell', 'e-updatedtd']);
12090
- }
12091
- else if (this.parent.getFrozenColumns() > 0) {
12092
- if (args.cell.closest('.e-frozenheader') || args.cell.closest('.e-frozencontent')) {
12093
- mRow = this.parent.grid.getRows()[parseInt(rowIndex.toString(), 10)];
12094
- }
12095
- else {
12096
- mRow = this.parent.grid.getMovableRows()[parseInt(rowIndex.toString(), 10)];
12097
- }
12098
- removeClass([mRow], ['e-editedrow', 'e-batchrow']);
12099
- removeClass(mRow.querySelectorAll('.e-rowcell'), ['e-editedbatchcell', 'e-updatedtd']);
12100
- }
12101
12201
  removeClass([row], ['e-editedrow', 'e-batchrow']);
12102
12202
  removeClass(row.querySelectorAll('.e-rowcell'), ['e-editedbatchcell', 'e-updatedtd']);
12103
12203
  if (this.parent['isCellSaveFocus'] !== false) {
@@ -12283,23 +12383,6 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
12283
12383
  this.parent.grid.contentModule["" + r].splice(0, 1);
12284
12384
  this.parent.grid.contentModule["" + r].splice(rowObjectIndex, 0, newRowObject);
12285
12385
  }
12286
- var freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
12287
- this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
12288
- if (this.parent.frozenRows || this.parent.getFrozenColumns() || this.parent.frozenColumns || freeze) {
12289
- var movableRows = this.parent.getMovableDataRows();
12290
- var frows = 'freezeRows';
12291
- var newFreezeRowObject = this.parent.grid.getRowsObject()[0];
12292
- movableRows[index + 1]["" + position](movableRows[0]);
12293
- if (freeze) {
12294
- var rightFrozenRows = this.parent.getFrozenRightDataRows();
12295
- rightFrozenRows[index + 1]["" + position](rightFrozenRows[0]);
12296
- }
12297
- if (this.parent.editSettings.mode === 'Batch') {
12298
- this.parent.grid.contentModule["" + frows].splice(0, 1);
12299
- this.parent.grid.contentModule["" + frows].splice(rowObjectIndex, 0, newFreezeRowObject);
12300
- }
12301
- setValue('batchIndex', index + 1, this.batchEditModule);
12302
- }
12303
12386
  if (this.parent.editSettings.mode === 'Row' || this.parent.editSettings.mode === 'Cell') {
12304
12387
  var errors = this.parent.grid.getContentTable().querySelectorAll('.e-griderror');
12305
12388
  for (var i = 0; i < errors.length; i++) {
@@ -12672,8 +12755,8 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
12672
12755
  || (this.parent.editSettings.mode === 'Batch' && e.args.requestType.toString() === 'batchsave'))) {
12673
12756
  this.updateIndex(this.parent.grid.dataSource, this.parent.getRows(), this.parent.getCurrentViewRecords());
12674
12757
  if (this.parent.frozenRows || this.parent.getFrozenColumns() || this.parent.frozenColumns) {
12675
- if (this.parent.grid.dataSource.length === this.parent.getMovableDataRows().length) {
12676
- this.updateIndex(this.parent.grid.dataSource, this.parent.getMovableDataRows(), this.parent.getCurrentViewRecords());
12758
+ if (this.parent.grid.dataSource.length === this.parent.getDataRows().length) {
12759
+ this.updateIndex(this.parent.grid.dataSource, this.parent.getDataRows(), this.parent.getCurrentViewRecords());
12677
12760
  }
12678
12761
  }
12679
12762
  }
@@ -12878,18 +12961,19 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
12878
12961
  return new TreeVirtualRowModelGenerator(this.parent);
12879
12962
  };
12880
12963
  VirtualTreeContentRenderer.prototype.getRowByIndex = function (index) {
12881
- return this.parent.getDataRows().filter(function (e) { return parseInt(e.getAttribute('data-rowindex'), 10) === index; })[0];
12882
- };
12883
- VirtualTreeContentRenderer.prototype.getMovableVirtualRowByIndex = function (index) {
12884
- return this.getRowCollection(index, true);
12964
+ if (this.parent.enableVirtualization && this.parent.isFrozenGrid()) {
12965
+ return this.getRowCollection(index, true);
12966
+ }
12967
+ else {
12968
+ return this.parent.getDataRows().filter(function (e) { return parseInt(e.getAttribute('data-rowindex'), 10) === index; })[0];
12969
+ }
12885
12970
  };
12886
12971
  VirtualTreeContentRenderer.prototype.getFrozenRightVirtualRowByIndex = function (index) {
12887
12972
  return this.getRowCollection(index, false, false, true);
12888
12973
  };
12889
12974
  VirtualTreeContentRenderer.prototype.getRowCollection = function (index, isMovable, isRowObject, isFrozenRight) {
12890
12975
  var startIdx = parseInt(this.parent.getRows()[0].getAttribute(dataRowIndex), 10);
12891
- var rowCollection = isMovable ? this.parent.getMovableDataRows() : this.parent.getDataRows();
12892
- rowCollection = isFrozenRight ? this.parent.getFrozenRightDataRows() : rowCollection;
12976
+ var rowCollection = this.parent.getDataRows();
12893
12977
  var collection = isRowObject ? this.parent.getCurrentViewRecords() : rowCollection;
12894
12978
  var selectedRow = collection[index - startIdx];
12895
12979
  if (this.parent.frozenRows && this.parent.pageSettings.currentPage > 1) {
@@ -12942,8 +13026,8 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
12942
13026
  this.endIndex = this.parent.pageSettings.pageSize - 1;
12943
13027
  }
12944
13028
  if ((this.endIndex - this.startIndex !== this.parent.pageSettings.pageSize) &&
12945
- (this.totalRecords > this.parent.pageSettings.pageSize) &&
12946
- (this.endIndex === this.totalRecords)) {
13029
+ (this.totalRecords > this.parent.pageSettings.pageSize)
13030
+ && (this.endIndex === this.totalRecords)) {
12947
13031
  args.startIndex = this.endIndex - this.parent.pageSettings.pageSize;
12948
13032
  args.endIndex = this.endIndex;
12949
13033
  }
@@ -13341,29 +13425,16 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13341
13425
  }
13342
13426
  };
13343
13427
  VirtualTreeContentRenderer.prototype.appendContent = function (target, newChild, e) {
13344
- var isFrozen = this.parent.isFrozenGrid();
13345
13428
  if ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
13346
13429
  && !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent) || this.parent.isFrozenGrid()) {
13347
13430
  if (getValue('isExpandCollapse', e)) {
13348
13431
  this.isRemoteExpand = true;
13349
13432
  }
13350
- if (isFrozen && ((isNullOrUndefined(this.requestType) && getValue('requestTypes', this).indexOf('isFrozen') === -1) ||
13351
- (this.parent.enableVirtualMaskRow && this.requestType === 'virtualscroll'))) {
13352
- getValue('requestTypes', this).push('isFrozen');
13353
- this.requestType = 'isFrozen';
13354
- }
13355
13433
  _super.prototype.appendContent.call(this, target, newChild, e);
13356
13434
  if (getValue('requestTypes', this).indexOf('isFrozen') !== -1) {
13357
13435
  getValue('requestTypes', this).splice(getValue('requestTypes', this).indexOf('isFrozen'), 1);
13358
13436
  this.requestType = this.requestType === 'isFrozen' ? undefined : this.requestType;
13359
13437
  }
13360
- if (isFrozen && (!this.isExpandCollapse || this.translateY === 0)) {
13361
- this.translateY = this.translateY < 0 ? 0 : this.translateY;
13362
- getValue('virtualEle', this).adjustTable(0, this.translateY);
13363
- }
13364
- else {
13365
- this.isExpandCollapse = false;
13366
- }
13367
13438
  }
13368
13439
  else {
13369
13440
  var info = e.virtualInfo.sentinelInfo && e.virtualInfo.sentinelInfo.axis === 'Y' &&
@@ -13633,6 +13704,7 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
13633
13704
  this.parent.grid.notify(indexModifier, counts);
13634
13705
  var startIndex = counts.startIndex;
13635
13706
  var endIndex = counts.endIndex;
13707
+ pageingDetails.count = visualData.length;
13636
13708
  if (startIndex === -1 && endIndex === -1) {
13637
13709
  var query = new Query();
13638
13710
  var size = this.parent.grid.pageSettings.pageSize;
@@ -13651,7 +13723,7 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
13651
13723
  this.parent.grid.getContent().firstElementChild.scrollTop = 0;
13652
13724
  this.parent.grid.notify(virtualActionArgs, { setTop: true });
13653
13725
  }
13654
- if ((requestType === 'save' && (pageingDetails.actionArgs.index >= (counts.count - this.parent.grid.pageSettings.pageSize)) || (requestType === 'refresh' && this.parent['isGantt'] && this.parent['isAddedFromGantt']) && (counts.count === this.prevendIndex + 1))) {
13726
+ if ((requestType === 'save' && pageingDetails.actionArgs.index >= (counts.count - this.parent.grid.pageSettings.pageSize)) || (requestType === 'refresh' && this.parent['isGantt'] && this.parent['isAddedFromGantt'])) {
13655
13727
  startIndex = counts.startIndex + (counts.count - counts.endIndex);
13656
13728
  endIndex = counts.count;
13657
13729
  this.parent['isAddedFromGantt'] = false;
@@ -13724,15 +13796,12 @@ var TreeVirtual = /** @__PURE__ @class */ (function (_super) {
13724
13796
  var parentGrid = getValue('parent', this);
13725
13797
  getValue('parent', this).log(['limitation', 'virtual_height'], 'virtualization');
13726
13798
  var renderer = getValue('locator', this).getService('rendererFactory');
13727
- if (!parentGrid.isFrozenGrid()) {
13728
- if (parentGrid.enableColumnVirtualization) {
13729
- getValue('addRenderer', renderer)
13730
- .apply(renderer, [RenderType.Header, new VirtualHeaderRenderer(getValue('parent', this), getValue('locator', this))]);
13731
- }
13799
+ if (parentGrid.enableColumnVirtualization) {
13732
13800
  getValue('addRenderer', renderer)
13733
- .apply(renderer, [RenderType.Content, new VirtualTreeContentRenderer(getValue('parent', this), getValue('locator', this))]);
13801
+ .apply(renderer, [RenderType.Header, new VirtualHeaderRenderer(getValue('parent', this), getValue('locator', this))]);
13734
13802
  }
13735
- //renderer.addRenderer(RenderType.Content, new VirtualTreeContentRenderer(getValue('parent', this), getValue('locator', this)));
13803
+ getValue('addRenderer', renderer)
13804
+ .apply(renderer, [RenderType.Content, new VirtualTreeContentRenderer(getValue('parent', this), getValue('locator', this))]);
13736
13805
  this.ensurePageSize();
13737
13806
  };
13738
13807
  TreeVirtual.prototype.ensurePageSize = function () {
@@ -13751,162 +13820,6 @@ var TreeVirtual = /** @__PURE__ @class */ (function (_super) {
13751
13820
  return TreeVirtual;
13752
13821
  }(VirtualScroll));
13753
13822
 
13754
- var __extends$18 = (undefined && undefined.__extends) || (function () {
13755
- var extendStatics = function (d, b) {
13756
- extendStatics = Object.setPrototypeOf ||
13757
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
13758
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
13759
- return extendStatics(d, b);
13760
- };
13761
- return function (d, b) {
13762
- extendStatics(d, b);
13763
- function __() { this.constructor = d; }
13764
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13765
- };
13766
- })();
13767
- /**
13768
- * VirtualTreeFreezeRenderer is used to render the virtual table within the frozen and movable content table
13769
- *
13770
- * @hidden
13771
- */
13772
- var VirtualTreeFreezeRenderer = /** @__PURE__ @class */ (function (_super) {
13773
- __extends$18(VirtualTreeFreezeRenderer, _super);
13774
- function VirtualTreeFreezeRenderer(parent, locator) {
13775
- var _this = _super.call(this, parent, locator) || this;
13776
- _this.addEventListener();
13777
- return _this;
13778
- }
13779
- /**
13780
- * @returns {void}
13781
- * @hidden
13782
- */
13783
- VirtualTreeFreezeRenderer.prototype.renderTable = function () {
13784
- this.freezeRowGenerator = new FreezeRowModelGenerator(this.parent);
13785
- this.virtualRenderer = new VirtualTreeContentRenderer(this.parent, this.serviceLoc);
13786
- this.virtualRenderer.header = this.serviceLoc.getService('rendererFactory')
13787
- .getRenderer(RenderType.Header).virtualHdrRenderer;
13788
- FreezeContentRender.prototype.renderTable.call(this);
13789
- this.virtualRenderer.setPanel(this.parent.getContent());
13790
- this.scrollbar = this.parent.getContent().querySelector('.e-movablescrollbar');
13791
- var movableCont = this.getMovableContent();
13792
- var minHeight = this.parent.height;
13793
- this.virtualRenderer.virtualEle.content = this.virtualRenderer.content = this.getPanel().querySelector('.' + content);
13794
- this.virtualRenderer.virtualEle.content.style.overflowX = 'hidden';
13795
- this.virtualRenderer.virtualEle.renderFrozenWrapper(minHeight);
13796
- this.virtualRenderer.virtualEle.renderFrozenPlaceHolder();
13797
- if (this.parent.enableColumnVirtualization) {
13798
- this.virtualRenderer.virtualEle.movableContent = this.virtualRenderer.movableContent
13799
- = this.getPanel().querySelector('.' + movableContent);
13800
- this.virtualRenderer.virtualEle.renderMovableWrapper(minHeight);
13801
- this.virtualRenderer.virtualEle.renderMovablePlaceHolder();
13802
- var tbl = movableCont.querySelector('table');
13803
- this.virtualRenderer.virtualEle.movableTable = tbl;
13804
- this.virtualRenderer.virtualEle.movableWrapper.appendChild(tbl);
13805
- movableCont.appendChild(this.virtualRenderer.virtualEle.movableWrapper);
13806
- movableCont.appendChild(this.virtualRenderer.virtualEle.movablePlaceholder);
13807
- }
13808
- this.virtualRenderer.virtualEle.wrapper.appendChild(this.getFrozenContent());
13809
- this.virtualRenderer.virtualEle.wrapper.appendChild(movableCont);
13810
- this.virtualRenderer.virtualEle.table = this.getTable();
13811
- setDebounce(this.parent, this.virtualRenderer, this.scrollbar, this.getMovableContent());
13812
- };
13813
- /**
13814
- * @param {HTMLElement} target - specifies the target
13815
- * @param {DocumentFragment} newChild - specifies the newChild
13816
- * @param {NotifyArgs} e - specifies the notifyargs
13817
- * @returns {void}
13818
- * @hidden
13819
- */
13820
- VirtualTreeFreezeRenderer.prototype.appendContent = function (target, newChild, e) {
13821
- getValue('observer', this.virtualRenderer).options.debounceEvent = false;
13822
- this.virtualRenderer['observers'] = new TreeInterSectionObserver(getValue('observer', this.virtualRenderer).element, getValue('observer', this.virtualRenderer).options, getValue('observer', this.virtualRenderer).movableEle);
13823
- this.virtualRenderer['contents'] = this.getPanel().firstChild;
13824
- _super.prototype.appendContent.call(this, target, newChild, e);
13825
- };
13826
- /**
13827
- * @param {Object[]} data - specifies the data
13828
- * @param {NotifyArgs} e - specifies the notifyargs
13829
- * @returns {Row<Column>[]} returns the row
13830
- * @hidden
13831
- */
13832
- VirtualTreeFreezeRenderer.prototype.generateRows = function (data, e) {
13833
- return _super.prototype.generateRows.call(this, data, e);
13834
- };
13835
- return VirtualTreeFreezeRenderer;
13836
- }(VirtualFreezeRenderer));
13837
- /**
13838
- * ColumnVirtualTreeFreezeRenderer is used to render the virtual table within the frozen and movable content table
13839
- *
13840
- * @hidden
13841
- */
13842
- var ColumnVirtualTreeFreezeRenderer = /** @__PURE__ @class */ (function (_super) {
13843
- __extends$18(ColumnVirtualTreeFreezeRenderer, _super);
13844
- function ColumnVirtualTreeFreezeRenderer(parent, locator) {
13845
- var _this = _super.call(this, parent, locator) || this;
13846
- _this.serviceLoc = locator;
13847
- _this.eventListener('on');
13848
- return _this;
13849
- }
13850
- /**
13851
- * @returns {void}
13852
- * @hidden
13853
- */
13854
- ColumnVirtualTreeFreezeRenderer.prototype.renderTable = function () {
13855
- this.virtualRenderer = new VirtualTreeContentRenderer(this.parent, this.serviceLoc);
13856
- this.virtualRenderer.header = this.serviceLoc.getService('rendererFactory')
13857
- .getRenderer(RenderType.Header).virtualHdrRenderer;
13858
- this.freezeRowGenerator = new FreezeRowModelGenerator(this.parent);
13859
- ColumnFreezeContentRenderer.prototype.renderTable.call(this);
13860
- this.virtualRenderer.setPanel(this.parent.getContent());
13861
- this.scrollbar = this.parent.getContent().querySelector('.e-movablescrollbar');
13862
- var frozenRightCont = this.getFrozenRightContent();
13863
- var frzCont = this.getFrozenContent();
13864
- var movableCont = this.getMovableContent();
13865
- if (this.parent.getFrozenMode() === 'Right') {
13866
- frzCont = frozenRightCont;
13867
- }
13868
- this.virtualRenderer.virtualEle.content = this.virtualRenderer.content = this.getPanel().querySelector('.' + content);
13869
- this.virtualRenderer.virtualEle.content.style.overflowX = 'hidden';
13870
- var minHeight = this.parent.height;
13871
- this.virtualRenderer.virtualEle.renderFrozenWrapper(minHeight);
13872
- this.virtualRenderer.virtualEle.renderFrozenPlaceHolder();
13873
- _super.prototype['renderVirtualFrozenLeft'].call(this, frzCont, movableCont);
13874
- _super.prototype['renderVirtualFrozenRight'].call(this, frzCont, movableCont);
13875
- _super.prototype['renderVirtualFrozenLeftRight'].call(this, frzCont, movableCont, frozenRightCont);
13876
- this.virtualRenderer.virtualEle.table = this.getTable();
13877
- setDebounce(this.parent, this.virtualRenderer, this.scrollbar, this.getMovableContent());
13878
- };
13879
- ColumnVirtualTreeFreezeRenderer.prototype.appendContent = function (target, newChild, e) {
13880
- getValue('observer', this.virtualRenderer).options.debounceEvent = false;
13881
- this.virtualRenderer['observers'] = new TreeInterSectionObserver(getValue('observer', this.virtualRenderer).element, getValue('observer', this.virtualRenderer).options, getValue('observer', this.virtualRenderer).movableEle);
13882
- this.virtualRenderer['contents'] = this.getPanel().firstChild;
13883
- _super.prototype.appendContent.call(this, target, newChild, e);
13884
- };
13885
- return ColumnVirtualTreeFreezeRenderer;
13886
- }(ColumnVirtualFreezeRenderer));
13887
- /**
13888
- * VirtualTreeFreezeHdrRenderer is used to render the virtual table within the frozen and movable header table
13889
- *
13890
- * @hidden
13891
- */
13892
- var VirtualTreeFreezeHdrRenderer = /** @__PURE__ @class */ (function (_super) {
13893
- __extends$18(VirtualTreeFreezeHdrRenderer, _super);
13894
- function VirtualTreeFreezeHdrRenderer() {
13895
- return _super !== null && _super.apply(this, arguments) || this;
13896
- }
13897
- /**
13898
- * @returns {void}
13899
- * @hidden
13900
- */
13901
- VirtualTreeFreezeHdrRenderer.prototype.renderTable = function () {
13902
- _super.prototype.renderTable.call(this);
13903
- };
13904
- VirtualTreeFreezeHdrRenderer.prototype.rfshMovable = function () {
13905
- _super.prototype.rfshMovable.call(this);
13906
- };
13907
- return VirtualTreeFreezeHdrRenderer;
13908
- }(VirtualFreezeHdrRenderer));
13909
-
13910
13823
  /**
13911
13824
  * TreeGrid Freeze module
13912
13825
  *
@@ -13927,7 +13840,6 @@ var Freeze$1 = /** @__PURE__ @class */ (function () {
13927
13840
  this.parent.on('rowExpandCollapse', this.rowExpandCollapse, this);
13928
13841
  this.parent.on('dataBoundArg', this.dataBoundArg, this);
13929
13842
  this.parent.grid.on('dblclick', this.dblClickHandler, this);
13930
- this.parent.grid.on('initial-load', this.instantiateRenderer, this);
13931
13843
  };
13932
13844
  Freeze$$1.prototype.removeEventListener = function () {
13933
13845
  if (this.parent.isDestroyed) {
@@ -13936,46 +13848,16 @@ var Freeze$1 = /** @__PURE__ @class */ (function () {
13936
13848
  this.parent.off('rowExpandCollapse', this.rowExpandCollapse);
13937
13849
  this.parent.off('dataBoundArg', this.dataBoundArg);
13938
13850
  this.parent.grid.off('dblclick', this.dblClickHandler);
13939
- this.parent.grid.off('initial-load', this.instantiateRenderer);
13940
- };
13941
- Freeze$$1.prototype.instantiateRenderer = function () {
13942
- var renderer = getValue('serviceLocator', this.parent.grid).getService('rendererFactory');
13943
- if (this.parent.getFrozenColumns()) {
13944
- if (this.parent.enableColumnVirtualization) {
13945
- getValue('addRenderer', renderer)
13946
- .apply(renderer, [RenderType.Header, new VirtualTreeFreezeHdrRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
13947
- }
13948
- else {
13949
- getValue('addRenderer', renderer)
13950
- .apply(renderer, [RenderType.Header, new FreezeRender(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
13951
- }
13952
- if (this.parent.enableVirtualization) {
13953
- getValue('addRenderer', renderer)
13954
- .apply(renderer, [RenderType.Content, new VirtualTreeFreezeRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
13955
- }
13956
- }
13957
- if (this.parent.getFrozenLeftColumnsCount() || this.parent.getFrozenRightColumnsCount()) {
13958
- getValue('addRenderer', renderer)
13959
- .apply(renderer, [RenderType.Header, new ColumnFreezeHeaderRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
13960
- if (this.parent.enableVirtualization) {
13961
- getValue('addRenderer', renderer)
13962
- .apply(renderer, [RenderType.Content, new ColumnVirtualTreeFreezeRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
13963
- }
13964
- else {
13965
- getValue('addRenderer', renderer)
13966
- .apply(renderer, [RenderType.Content, new ColumnFreezeContentRenderer(getValue('grid', this.parent), getValue('serviceLocator', this.parent.grid))]);
13967
- }
13968
- }
13969
13851
  };
13970
13852
  Freeze$$1.prototype.rowExpandCollapse = function (args) {
13971
- var movableRows = this.parent.getMovableDataRows();
13853
+ var movableRows = this.parent.getDataRows();
13972
13854
  var frozenrows = this.parent.getRows();
13973
13855
  var rows;
13974
13856
  var frozenRightRows;
13975
13857
  var freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
13976
13858
  this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
13977
13859
  if (freeze) {
13978
- frozenRightRows = this.parent.getFrozenRightRows().filter(function (e) {
13860
+ frozenRightRows = this.parent.getRows().filter(function (e) {
13979
13861
  return e.querySelector('.e-gridrowindex' + args.record.index + 'level' + (args.record.level + 1));
13980
13862
  });
13981
13863
  }
@@ -14186,7 +14068,7 @@ var InfiniteScroll$1 = /** @__PURE__ @class */ (function () {
14186
14068
  var updateIndex = 'updateIndex';
14187
14069
  this.parent.editModule["" + updateIndex](this.parent.grid.dataSource, this.parent.getRows(), this.parent.getCurrentViewRecords());
14188
14070
  if (this.parent.getFrozenColumns()) {
14189
- this.parent.editModule["" + updateIndex](this.parent.grid.dataSource, this.parent.getMovableDataRows(), this.parent.getCurrentViewRecords());
14071
+ this.parent.editModule["" + updateIndex](this.parent.grid.dataSource, this.parent.getDataRows(), this.parent.getCurrentViewRecords());
14190
14072
  }
14191
14073
  }
14192
14074
  };
@@ -14307,8 +14189,8 @@ var InfiniteScroll$1 = /** @__PURE__ @class */ (function () {
14307
14189
  var keyField = this.parent.grid.getPrimaryKeyFieldNames()[0];
14308
14190
  this.removeRows(rowElms, rows, data, keyField, true);
14309
14191
  if (this.parent.getFrozenColumns() > 0) {
14310
- var mRows = this.parent.grid.getMovableRowsObject();
14311
- var mRowElms = this.parent.grid.getMovableRows();
14192
+ var mRows = this.parent.grid.getRowsObject();
14193
+ var mRowElms = this.parent.grid.getRows();
14312
14194
  this.removeRows(mRowElms, mRows, data, keyField);
14313
14195
  }
14314
14196
  }
@@ -14354,23 +14236,23 @@ var InfiniteScroll$1 = /** @__PURE__ @class */ (function () {
14354
14236
  var rowRenderer = new RowRenderer(serviceLocator, null, this.parent.grid);
14355
14237
  var tbody;
14356
14238
  var currentData = this.parent.getCurrentViewRecords();
14357
- var currentRows = eventArgs.isMovable ? this.parent.grid.getMovableRows()
14239
+ var currentRows = eventArgs.isMovable ? this.parent.grid.getRows()
14358
14240
  : this.parent.grid.getDataRows();
14359
14241
  if (eventArgs.isFrozenRight) {
14360
14242
  tbody = this.parent.element.querySelector('.e-frozen-right-content').querySelector('tbody');
14361
14243
  }
14362
14244
  else {
14363
14245
  tbody = !this.parent.grid.isFrozenGrid() ? this.parent.getContent().querySelector('tbody') : eventArgs.isMovable
14364
- ? this.parent.grid.getMovableVirtualContent().querySelector('tbody')
14365
- : this.parent.grid.getFrozenVirtualContent().querySelector('tbody');
14246
+ ? this.parent.grid.getContent().querySelector('tbody')
14247
+ : this.parent.grid.getContent().querySelector('tbody');
14366
14248
  }
14367
14249
  if (this.parent.frozenRows) {
14368
14250
  tbody = eventArgs.isFrozenRows && this.parent.grid.infiniteScrollModule.requestType !== 'add'
14369
14251
  || !eventArgs.isFrozenRows && this.parent.grid.infiniteScrollModule.requestType === 'add'
14370
14252
  ? !this.parent.grid.isFrozenGrid() ? this.parent.getHeaderContent().querySelector('tbody')
14371
- : eventArgs.isMovable ? this.parent.grid.getMovableVirtualHeader().querySelector('tbody')
14253
+ : eventArgs.isMovable ? this.parent.grid.getHeaderContent().querySelector('tbody')
14372
14254
  : eventArgs.isFrozenRight ? this.parent.element.querySelector('.e-frozen-right-header').querySelector('tbody')
14373
- : this.parent.grid.getFrozenVirtualHeader().querySelector('tbody') : tbody;
14255
+ : this.parent.grid.getHeaderContent().querySelector('tbody') : tbody;
14374
14256
  }
14375
14257
  var position;
14376
14258
  var addRowIndex = 'addRowIndex';