@syncfusion/ej2-treegrid 20.3.61 → 20.4.40

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 (46) hide show
  1. package/.eslintrc.json +16 -1
  2. package/CHANGELOG.md +9 -60
  3. package/README.md +64 -51
  4. package/dist/ej2-treegrid.min.js +2 -2
  5. package/dist/ej2-treegrid.umd.min.js +2 -2
  6. package/dist/ej2-treegrid.umd.min.js.map +1 -1
  7. package/dist/es6/ej2-treegrid.es2015.js +1198 -910
  8. package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
  9. package/dist/es6/ej2-treegrid.es5.js +1256 -946
  10. package/dist/es6/ej2-treegrid.es5.js.map +1 -1
  11. package/dist/global/ej2-treegrid.min.js +2 -2
  12. package/dist/global/ej2-treegrid.min.js.map +1 -1
  13. package/dist/global/index.d.ts +1 -1
  14. package/package.json +17 -11
  15. package/src/treegrid/actions/batch-edit.js +82 -82
  16. package/src/treegrid/actions/clipboard.js +34 -33
  17. package/src/treegrid/actions/context-menu.js +1 -1
  18. package/src/treegrid/actions/crud-actions.js +62 -55
  19. package/src/treegrid/actions/detail-row.js +7 -7
  20. package/src/treegrid/actions/edit.js +61 -60
  21. package/src/treegrid/actions/excel-export.js +2 -2
  22. package/src/treegrid/actions/filter.js +13 -13
  23. package/src/treegrid/actions/freeze-column.js +9 -8
  24. package/src/treegrid/actions/infinite-scroll.js +19 -19
  25. package/src/treegrid/actions/logger.js +10 -10
  26. package/src/treegrid/actions/page.js +8 -8
  27. package/src/treegrid/actions/reorder.js +2 -2
  28. package/src/treegrid/actions/rowdragdrop.js +88 -82
  29. package/src/treegrid/actions/selection.js +34 -32
  30. package/src/treegrid/actions/sort.js +7 -6
  31. package/src/treegrid/actions/summary.js +24 -24
  32. package/src/treegrid/actions/toolbar.js +2 -2
  33. package/src/treegrid/base/data.js +242 -55
  34. package/src/treegrid/base/treegrid-model.d.ts +20 -4
  35. package/src/treegrid/base/treegrid.d.ts +24 -5
  36. package/src/treegrid/base/treegrid.js +232 -192
  37. package/src/treegrid/models/column.js +3 -3
  38. package/src/treegrid/models/index.d.ts +2 -0
  39. package/src/treegrid/models/index.js +1 -0
  40. package/src/treegrid/models/loading-indicator-model.d.ts +19 -0
  41. package/src/treegrid/models/loading-indicator.d.ts +16 -0
  42. package/src/treegrid/models/loading-indicator.js +34 -0
  43. package/src/treegrid/renderer/render.js +20 -19
  44. package/src/treegrid/renderer/virtual-row-model-generator.js +6 -5
  45. package/src/treegrid/renderer/virtual-tree-content-render.js +128 -99
  46. package/src/treegrid/utils.js +12 -11
@@ -141,13 +141,13 @@ var Edit = /** @class */ (function () {
141
141
  var rowIndex = isNullOrUndefined(eventArgs.row) || !Object.keys(eventArgs.row).length ? this.selectedIndex :
142
142
  eventArgs.row.rowIndex - 1;
143
143
  var keyData = (!isNullOrUndefined(rowIndex) && rowIndex !== -1) ?
144
- treeObj.getCurrentViewRecords()[rowIndex][treeObj.getPrimaryKeyFieldNames()[0]] : -1;
144
+ treeObj.getCurrentViewRecords()[parseInt(rowIndex.toString(), 10)][treeObj.getPrimaryKeyFieldNames()[0]] : -1;
145
145
  treeObj.grid.query.addParams('relationalKey', keyData);
146
146
  }
147
147
  else if (eventName === 'actionComplete') {
148
148
  var paramsLength = treeObj.grid.query.params.length;
149
149
  for (var i = 0; i < paramsLength; i++) {
150
- if (treeObj.grid.query.params[i].key === 'relationalKey') {
150
+ if (treeObj.grid.query.params[parseInt(i.toString(), 10)].key === 'relationalKey') {
151
151
  treeObj.grid.query.params.splice(i);
152
152
  }
153
153
  }
@@ -197,9 +197,9 @@ var Edit = /** @class */ (function () {
197
197
  var size = Math.ceil(newRowIndex / this.parent.grid.pageSettings.pageSize);
198
198
  var page = size > 0 ? size : 1;
199
199
  var dataIndex = newRowIndex - ((page - 1) * this.parent.pageSettings.pageSize);
200
- var infiniteCurrentViewData = this.parent.grid.infiniteScrollModule[infiniteData];
200
+ var infiniteCurrentViewData = this.parent.grid.infiniteScrollModule["" + infiniteData];
201
201
  infiniteCurrentViewData[1].splice(0, 1);
202
- var data = infiniteCurrentViewData[page];
202
+ var data = infiniteCurrentViewData[parseInt(page.toString(), 10)];
203
203
  if (!isNullOrUndefined(this.addRowRecord)) {
204
204
  data.filter(function (e, index) {
205
205
  if (e.uniqueID === _this.addRowRecord.uniqueID) {
@@ -213,12 +213,12 @@ var Edit = /** @class */ (function () {
213
213
  }
214
214
  if (dataIndex >= this.parent.pageSettings.pageSize) {
215
215
  page += 1;
216
- data = infiniteCurrentViewData[page];
216
+ data = infiniteCurrentViewData[parseInt(page.toString(), 10)];
217
217
  dataIndex = dataIndex - this.parent.pageSettings.pageSize >= 0 ? dataIndex - this.parent.pageSettings.pageSize : 0;
218
218
  }
219
219
  dataIndex = this.parent.editSettings.newRowPosition === 'Below' ? dataIndex + 1 : dataIndex;
220
220
  data.splice(dataIndex, 0, newRecord);
221
- this.parent.grid.infiniteScrollModule[updateCurrentViewData]();
221
+ this.parent.grid.infiniteScrollModule["" + updateCurrentViewData]();
222
222
  };
223
223
  Edit.prototype.recordDoubleClick = function (args) {
224
224
  var target = args.target;
@@ -271,15 +271,15 @@ var Edit = /** @class */ (function () {
271
271
  };
272
272
  Edit.prototype.deleteUniqueID = function (value) {
273
273
  var idFilter = 'uniqueIDFilterCollection';
274
- delete this.parent[idFilter][value];
274
+ delete this.parent["" + idFilter]["" + value];
275
275
  var id = 'uniqueIDCollection';
276
- delete this.parent[id][value];
276
+ delete this.parent["" + id]["" + value];
277
277
  };
278
278
  Edit.prototype.cellEdit = function (args) {
279
279
  var _this = this;
280
280
  var promise = 'promise';
281
- var prom = args[promise];
282
- delete args[promise];
281
+ var prom = args["" + promise];
282
+ delete args["" + promise];
283
283
  if (this.parent.enableVirtualization && !isNullOrUndefined(this.prevAriaRowIndex) && this.prevAriaRowIndex !== '-1') {
284
284
  args.row.setAttribute('data-rowindex', this.prevAriaRowIndex);
285
285
  this.prevAriaRowIndex = undefined;
@@ -363,7 +363,7 @@ var Edit = /** @class */ (function () {
363
363
  args.rowData[args.columnName] = args.value;
364
364
  var row_1;
365
365
  if (isNullOrUndefined(args.cell)) {
366
- row_1 = this.parent.grid.editModule[editModule].form.parentElement.parentNode;
366
+ row_1 = this.parent.grid.editModule["" + editModule].form.parentElement.parentNode;
367
367
  }
368
368
  else {
369
369
  row_1 = args.cell.parentNode;
@@ -414,7 +414,7 @@ var Edit = /** @class */ (function () {
414
414
  var editArgs = { requestType: 'save', data: args.rowData, action: 'edit', row: row_1,
415
415
  rowIndex: rowIndex_1, rowData: args.rowData, columnName: args.columnName,
416
416
  filterChoiceCount: null, excelSearchOperator: null };
417
- this.parent.grid.getDataModule()[eventPromise](editArgs, this.parent.grid.query);
417
+ this.parent.grid.getDataModule()["" + eventPromise](editArgs, this.parent.grid.query);
418
418
  }
419
419
  else {
420
420
  this.updateCell(args, rowIndex_1);
@@ -459,23 +459,23 @@ var Edit = /** @class */ (function () {
459
459
  this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
460
460
  if (freeze) {
461
461
  if (args.cell.closest('.e-frozen-left-header') || args.cell.closest('.e-frozen-left-content')) {
462
- mRow = this.parent.grid.getRows()[rowIndex];
462
+ mRow = this.parent.grid.getRows()[parseInt(rowIndex.toString(), 10)];
463
463
  }
464
464
  else if (args.cell.closest('.e-movableheader') || args.cell.closest('.e-movablecontent')) {
465
- mRow = this.parent.grid.getMovableRows()[rowIndex];
465
+ mRow = this.parent.grid.getMovableRows()[parseInt(rowIndex.toString(), 10)];
466
466
  }
467
467
  else {
468
- mRow = this.parent.grid.getFrozenRightRows()[rowIndex];
468
+ mRow = this.parent.grid.getFrozenRightRows()[parseInt(rowIndex.toString(), 10)];
469
469
  }
470
470
  removeClass([mRow], ['e-editedrow', 'e-batchrow']);
471
471
  removeClass(mRow.querySelectorAll('.e-rowcell'), ['e-editedbatchcell', 'e-updatedtd']);
472
472
  }
473
473
  else if (this.parent.getFrozenColumns() > 0) {
474
474
  if (args.cell.closest('.e-frozenheader') || args.cell.closest('.e-frozencontent')) {
475
- mRow = this.parent.grid.getRows()[rowIndex];
475
+ mRow = this.parent.grid.getRows()[parseInt(rowIndex.toString(), 10)];
476
476
  }
477
477
  else {
478
- mRow = this.parent.grid.getMovableRows()[rowIndex];
478
+ mRow = this.parent.grid.getMovableRows()[parseInt(rowIndex.toString(), 10)];
479
479
  }
480
480
  removeClass([mRow], ['e-editedrow', 'e-batchrow']);
481
481
  removeClass(mRow.querySelectorAll('.e-rowcell'), ['e-editedbatchcell', 'e-updatedtd']);
@@ -512,7 +512,7 @@ var Edit = /** @class */ (function () {
512
512
  };
513
513
  Edit.prototype.updateCell = function (args, rowIndex) {
514
514
  this.parent.grid.editModule.updateCell(rowIndex, args.columnName, args.rowData[args.columnName]);
515
- this.parent.grid.getRowsObject()[rowIndex].data = args.rowData;
515
+ this.parent.grid.getRowsObject()[parseInt(rowIndex.toString(), 10)].data = args.rowData;
516
516
  };
517
517
  Edit.prototype.crudAction = function (details, columnName) {
518
518
  editAction(details, this.parent, this.isSelfReference, this.addRowIndex, this.selectedIndex, columnName, this.addRowRecord);
@@ -520,27 +520,27 @@ var Edit = /** @class */ (function () {
520
520
  var data = this.parent.grid.dataSource instanceof DataManager ?
521
521
  this.parent.grid.dataSource.dataSource.json : this.parent.grid.dataSource;
522
522
  for (var i = 0; i < data.length; i++) {
523
- data[i].index = i;
523
+ data[parseInt(i.toString(), 10)].index = i;
524
524
  var key = this.parent.grid.getPrimaryKeyFieldNames()[0];
525
- if (details.value[key] === data[i][key]) {
525
+ if (details.value["" + key] === data[parseInt(i.toString(), 10)]["" + key]) {
526
526
  if (details.action === 'add') {
527
- data[i].level = this.internalProperties.level;
528
- data[i].taskData = this.internalProperties.taskData;
529
- data[i].uniqueID = this.internalProperties.uniqueID;
527
+ data[parseInt(i.toString(), 10)].level = this.internalProperties.level;
528
+ data[parseInt(i.toString(), 10)].taskData = this.internalProperties.taskData;
529
+ data[parseInt(i.toString(), 10)].uniqueID = this.internalProperties.uniqueID;
530
530
  if (!isNullOrUndefined(this.internalProperties.parentItem)) {
531
- data[i].parentItem = this.internalProperties.parentItem;
532
- data[i].parentUniqueID = this.internalProperties.parentUniqueID;
531
+ data[parseInt(i.toString(), 10)].parentItem = this.internalProperties.parentItem;
532
+ data[parseInt(i.toString(), 10)].parentUniqueID = this.internalProperties.parentUniqueID;
533
533
  }
534
- data[i].childRecords = this.internalProperties.childRecords;
534
+ data[parseInt(i.toString(), 10)].childRecords = this.internalProperties.childRecords;
535
535
  }
536
536
  }
537
- setValue('uniqueIDCollection.' + data[i].uniqueID + '.index', i, this.parent);
537
+ setValue('uniqueIDCollection.' + data[parseInt(i.toString(), 10)].uniqueID + '.index', i, this.parent);
538
538
  var adaptor = this.parent.dataSource.adaptor;
539
539
  if ((isRemoteData(this.parent) || adaptor instanceof RemoteSaveAdaptor)) {
540
- setValue('uniqueIDCollection.' + data[i].uniqueID, data[i], this.parent);
540
+ setValue('uniqueIDCollection.' + data[parseInt(i.toString(), 10)].uniqueID, data[parseInt(i.toString(), 10)], this.parent);
541
541
  }
542
- if (!data[i].level) {
543
- this.parent.parentData.push(data[i]);
542
+ if (!data[parseInt(i.toString(), 10)].level) {
543
+ this.parent.parentData.push(data[parseInt(i.toString(), 10)]);
544
544
  }
545
545
  }
546
546
  if (!this.parent.enableInfiniteScrolling) {
@@ -552,7 +552,7 @@ var Edit = /** @class */ (function () {
552
552
  };
553
553
  Edit.prototype.updateIndex = function (data, rows, records) {
554
554
  for (var j = 0; j < this.parent.getDataRows().length; j++) {
555
- var data1 = records[j];
555
+ var data1 = records[parseInt(j.toString(), 10)];
556
556
  if (!isNullOrUndefined(data1)) {
557
557
  var index = getValue('uniqueIDCollection.' + data1.uniqueID + '.index', this.parent);
558
558
  data1.index = index;
@@ -567,28 +567,28 @@ var Edit = /** @class */ (function () {
567
567
  if (this.parent.getFrozenColumns() > 0) {
568
568
  var cells = rows[0].querySelectorAll('.e-rowcell');
569
569
  for (var l = 0; l < cells.length; l++) {
570
- if (cells[l].classList.contains('e-gridrowindex0level0')) {
570
+ if (cells[parseInt(l.toString(), 10)].classList.contains('e-gridrowindex0level0')) {
571
571
  treeColIndex = l;
572
572
  break;
573
573
  }
574
574
  }
575
575
  }
576
576
  for (var k = 0; k < this.parent.getRows().length; k++) {
577
- if (!rows[k].classList.contains('e-detailrow')) {
577
+ if (!rows[parseInt(k.toString(), 10)].classList.contains('e-detailrow')) {
578
578
  count++;
579
579
  }
580
- var data2 = records[count];
580
+ var data2 = records[parseInt(count.toString(), 10)];
581
581
  if (!isNullOrUndefined(data2)) {
582
582
  var index = data2.index;
583
583
  var level = data2.level;
584
- var row = rows[k];
584
+ var row = rows[parseInt(k.toString(), 10)];
585
585
  if (!isNullOrUndefined(data2.parentItem)) {
586
586
  index = getValue('uniqueIDCollection.' + data2.parentItem.uniqueID + '.index', this.parent);
587
587
  }
588
- var treecell = row.cells[treeColIndex];
588
+ var treecell = row.cells[parseInt(treeColIndex.toString(), 10)];
589
589
  if (!isNullOrUndefined(treecell)) {
590
590
  for (var l = 0; l < treecell.classList.length; l++) {
591
- var value = treecell.classList[l];
591
+ var value = treecell.classList[parseInt(l.toString(), 10)];
592
592
  var remove = /e-gridrowindex/i;
593
593
  var removed = /e-griddetailrowindex/i;
594
594
  var result = value.match(remove);
@@ -600,7 +600,7 @@ var Edit = /** @class */ (function () {
600
600
  removeClass([treecell], value);
601
601
  }
602
602
  }
603
- if (!rows[k].classList.contains('e-detailrow')) {
603
+ if (!rows[parseInt(k.toString(), 10)].classList.contains('e-detailrow')) {
604
604
  addClass([treecell], 'e-gridrowindex' + index + 'level' + level);
605
605
  }
606
606
  else {
@@ -634,17 +634,18 @@ var Edit = /** @class */ (function () {
634
634
  else if ((this.parent.editSettings.newRowPosition === 'Below' || this.parent.editSettings.newRowPosition === 'Child')
635
635
  && (this.selectedIndex > -1 || isVirtualization) && withinRange) {
636
636
  position = 'after';
637
- if (!isNullOrUndefined(records[index]) && records[index].expanded) {
637
+ if (!isNullOrUndefined(records[parseInt(index.toString(), 10)]) &&
638
+ records[parseInt(index.toString(), 10)].expanded) {
638
639
  if (this.parent.editSettings.mode === 'Batch' && (this.parent.getBatchChanges()[this.addedRecords].length > 1
639
640
  || this.parent.getBatchChanges()[this.deletedRecords].length)) {
640
- index += findChildrenRecords(records[index]).length;
641
+ index += findChildrenRecords(records[parseInt(index.toString(), 10)]).length;
641
642
  if (this.parent.editSettings.newRowPosition !== 'Child') {
642
643
  var batchChildCount = this.batchEditModule.getBatchChildCount();
643
644
  index = index + batchChildCount;
644
645
  }
645
646
  }
646
647
  else {
647
- index += findChildrenRecords(records[index]).length;
648
+ index += findChildrenRecords(records[parseInt(index.toString(), 10)]).length;
648
649
  }
649
650
  }
650
651
  }
@@ -655,14 +656,14 @@ var Edit = /** @class */ (function () {
655
656
  index = rows.length - 2;
656
657
  }
657
658
  var r = 'rows';
658
- var newRowObject = this.parent.grid.contentModule[r][0];
659
+ var newRowObject = this.parent.grid.contentModule["" + r][0];
659
660
  var focussedElement = document.activeElement;
660
- rows[index + 1][position](rows[0]);
661
+ rows[index + 1]["" + position](rows[0]);
661
662
  setValue('batchIndex', index + 1, this.batchEditModule);
662
663
  var rowObjectIndex = this.parent.editSettings.newRowPosition === 'Above' ? index : index + 1;
663
664
  if (this.parent.editSettings.mode === 'Batch') {
664
- this.parent.grid.contentModule[r].splice(0, 1);
665
- this.parent.grid.contentModule[r].splice(rowObjectIndex, 0, newRowObject);
665
+ this.parent.grid.contentModule["" + r].splice(0, 1);
666
+ this.parent.grid.contentModule["" + r].splice(rowObjectIndex, 0, newRowObject);
666
667
  }
667
668
  var freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
668
669
  this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
@@ -670,21 +671,21 @@ var Edit = /** @class */ (function () {
670
671
  var movableRows = this.parent.getMovableDataRows();
671
672
  var frows = 'freezeRows';
672
673
  var newFreezeRowObject = this.parent.grid.getRowsObject()[0];
673
- movableRows[index + 1][position](movableRows[0]);
674
+ movableRows[index + 1]["" + position](movableRows[0]);
674
675
  if (freeze) {
675
676
  var rightFrozenRows = this.parent.getFrozenRightDataRows();
676
- rightFrozenRows[index + 1][position](rightFrozenRows[0]);
677
+ rightFrozenRows[index + 1]["" + position](rightFrozenRows[0]);
677
678
  }
678
679
  if (this.parent.editSettings.mode === 'Batch') {
679
- this.parent.grid.contentModule[frows].splice(0, 1);
680
- this.parent.grid.contentModule[frows].splice(rowObjectIndex, 0, newFreezeRowObject);
680
+ this.parent.grid.contentModule["" + frows].splice(0, 1);
681
+ this.parent.grid.contentModule["" + frows].splice(rowObjectIndex, 0, newFreezeRowObject);
681
682
  }
682
683
  setValue('batchIndex', index + 1, this.batchEditModule);
683
684
  }
684
685
  if (this.parent.editSettings.mode === 'Row' || this.parent.editSettings.mode === 'Cell') {
685
686
  var errors = this.parent.grid.getContentTable().querySelectorAll('.e-griderror');
686
687
  for (var i = 0; i < errors.length; i++) {
687
- errors[i].remove();
688
+ errors[parseInt(i.toString(), 10)].remove();
688
689
  }
689
690
  setValue('errorRules', [], this.parent.grid.editModule.formObj);
690
691
  }
@@ -706,8 +707,8 @@ var Edit = /** @class */ (function () {
706
707
  var newlyAddedRecord = void 0;
707
708
  if (batchAddedRecords.length) {
708
709
  for (var i = 0; i < batchAddedRecords.length; i++) {
709
- if (isNullOrUndefined(batchAddedRecords[i].uniqueID)) {
710
- newlyAddedRecord = batchAddedRecords[i];
710
+ if (isNullOrUndefined(batchAddedRecords[parseInt(i.toString(), 10)].uniqueID)) {
711
+ newlyAddedRecord = batchAddedRecords[parseInt(i.toString(), 10)];
711
712
  }
712
713
  }
713
714
  }
@@ -761,8 +762,8 @@ var Edit = /** @class */ (function () {
761
762
  var primaryKeys_2 = this.parent.getPrimaryKeyFieldNames();
762
763
  var _loop_1 = function (i) {
763
764
  this_1.parent.flatData.filter(function (e) {
764
- if (e[primaryKeys_2[0]] === args.data[i][primaryKeys_2[0]]) {
765
- data_1[i] = e;
765
+ if (e["" + primaryKeys_2[0]] === args.data[parseInt(i.toString(), 10)][primaryKeys_2[0]]) {
766
+ data_1[parseInt(i.toString(), 10)] = e;
766
767
  }
767
768
  });
768
769
  };
@@ -772,10 +773,10 @@ var Edit = /** @class */ (function () {
772
773
  }
773
774
  }
774
775
  for (var i = 0; i < data_1.length; i++) {
775
- this.deleteUniqueID(data_1[i].uniqueID);
776
- var childs = findChildrenRecords(data_1[i]);
776
+ this.deleteUniqueID(data_1[parseInt(i.toString(), 10)].uniqueID);
777
+ var childs = findChildrenRecords(data_1[parseInt(i.toString(), 10)]);
777
778
  for (var c = 0; c < childs.length; c++) {
778
- this.deleteUniqueID(childs[c].uniqueID);
779
+ this.deleteUniqueID(childs[parseInt(c.toString(), 10)].uniqueID);
779
780
  }
780
781
  args.data = args.data.concat(childs);
781
782
  }
@@ -971,10 +972,10 @@ var Edit = /** @class */ (function () {
971
972
  if (args.requestType === 'delete') {
972
973
  var deletedValues = args.data;
973
974
  for (var i = 0; i < deletedValues.length; i++) {
974
- if (deletedValues[i].parentItem) {
975
- var parentItem = getParentData(this.parent, deletedValues[i].parentItem.uniqueID);
975
+ if (deletedValues[parseInt(i.toString(), 10)].parentItem) {
976
+ var parentItem = getParentData(this.parent, deletedValues[parseInt(i.toString(), 10)].parentItem.uniqueID);
976
977
  if (!isNullOrUndefined(parentItem) && parentItem.hasChildRecords) {
977
- var childIndex = parentItem.childRecords.indexOf(deletedValues[i]);
978
+ var childIndex = parentItem.childRecords.indexOf(deletedValues[parseInt(i.toString(), 10)]);
978
979
  parentItem.childRecords.splice(childIndex, 1);
979
980
  }
980
981
  }
@@ -191,8 +191,8 @@ var ExcelExport = /** @class */ (function () {
191
191
  /* eslint-disable-next-line */
192
192
  ExcelExport.prototype.finalPageSetup = function (workbook) {
193
193
  for (var i = 0; i < workbook.worksheets.length; i++) {
194
- if (workbook.worksheets[i].rows) {
195
- workbook.worksheets[i].pageSetup = { isSummaryRowBelow: false };
194
+ if (workbook.worksheets[parseInt(i.toString(), 10)].rows) {
195
+ workbook.worksheets[parseInt(i.toString(), 10)].pageSetup = { isSummaryRowBelow: false };
196
196
  }
197
197
  }
198
198
  };
@@ -73,7 +73,7 @@ var Filter = /** @class */ (function () {
73
73
  this.filteredResult = [];
74
74
  this.isHierarchyFilter = false;
75
75
  for (var f = 0; f < this.flatFilteredData.length; f++) {
76
- var rec = this.flatFilteredData[f];
76
+ var rec = this.flatFilteredData[parseInt(f.toString(), 10)];
77
77
  this.addParentRecord(rec);
78
78
  var hierarchyMode = this.parent.grid.searchSettings.key === '' ? this.parent.filterSettings.hierarchyMode
79
79
  : this.parent.searchSettings.hierarchyMode;
@@ -168,27 +168,27 @@ var Filter = /** @class */ (function () {
168
168
  var childRec = getObject('childRecords', records);
169
169
  var isExist = false;
170
170
  for (var count = 0; count < childRec.length; count++) {
171
- var ischild = childRec[count].childRecords;
171
+ var ischild = childRec[parseInt(count.toString(), 10)].childRecords;
172
172
  var hierarchyMode = this.parent.grid.searchSettings.key === '' ?
173
173
  this.parent.filterSettings.hierarchyMode : this.parent.searchSettings.hierarchyMode;
174
174
  if (((hierarchyMode === 'Child' || hierarchyMode === 'Both') && (this.parent.grid.filterSettings.columns.length !== 0
175
175
  || this.parent.grid.searchSettings.key !== ''))) {
176
176
  var uniqueIDValue = getValue('uniqueIDFilterCollection', this.parent);
177
- if (!Object.prototype.hasOwnProperty.call(uniqueIDValue, childRec[count].uniqueID)) {
178
- this.filteredResult.push(childRec[count]);
179
- setValue('uniqueIDFilterCollection.' + childRec[count].uniqueID, childRec[count], this.parent);
177
+ if (!Object.prototype.hasOwnProperty.call(uniqueIDValue, childRec[parseInt(count.toString(), 10)].uniqueID)) {
178
+ this.filteredResult.push(childRec[parseInt(count.toString(), 10)]);
179
+ setValue('uniqueIDFilterCollection.' + childRec[parseInt(count.toString(), 10)].uniqueID, childRec[parseInt(count.toString(), 10)], this.parent);
180
180
  isExist = true;
181
181
  }
182
182
  }
183
183
  if ((hierarchyMode === 'None')
184
184
  && (this.parent.grid.filterSettings.columns.length !== 0 || this.parent.grid.searchSettings.key !== '')) {
185
- if (this.flatFilteredData.indexOf(childRec[count]) !== -1) {
185
+ if (this.flatFilteredData.indexOf(childRec[parseInt(count.toString(), 10)]) !== -1) {
186
186
  isExist = true;
187
187
  break;
188
188
  }
189
189
  }
190
190
  if (!isNullOrUndefined(ischild) && ischild.length) {
191
- isExist = this.checkChildExsist(childRec[count]);
191
+ isExist = this.checkChildExsist(childRec[parseInt(count.toString(), 10)]);
192
192
  }
193
193
  if ((hierarchyMode === 'Child' || hierarchyMode === 'Both') && childRec.length) {
194
194
  isExist = true;
@@ -200,15 +200,15 @@ var Filter = /** @class */ (function () {
200
200
  var record = this.filteredResult;
201
201
  var len = this.filteredResult.length;
202
202
  for (var c = 0; c < len; c++) {
203
- var parent_2 = getParentData(this.parent, record[c].parentUniqueID);
203
+ var parent_2 = getParentData(this.parent, record[parseInt(c.toString(), 10)].parentUniqueID);
204
204
  var isPrst = record.indexOf(parent_2) !== -1;
205
205
  if (isPrst) {
206
- var parent_3 = getParentData(this.parent, record[c].parentUniqueID, true);
207
- record[c].filterLevel = parent_3.filterLevel + 1;
206
+ var parent_3 = getParentData(this.parent, record[parseInt(c.toString(), 10)].parentUniqueID, true);
207
+ record[parseInt(c.toString(), 10)].filterLevel = parent_3.filterLevel + 1;
208
208
  }
209
209
  else {
210
- record[c].filterLevel = 0;
211
- this.filteredParentRecs.push(record[c]);
210
+ record[parseInt(c.toString(), 10)].filterLevel = 0;
211
+ this.filteredParentRecs.push(record[parseInt(c.toString(), 10)]);
212
212
  }
213
213
  }
214
214
  };
@@ -218,7 +218,7 @@ var Filter = /** @class */ (function () {
218
218
  var len = flatData.length;
219
219
  var currentRecord;
220
220
  for (count; count < len; count++) {
221
- currentRecord = flatData[count];
221
+ currentRecord = flatData[parseInt(count.toString(), 10)];
222
222
  var fLevel = currentRecord.filterLevel;
223
223
  if (fLevel || fLevel === 0 || !isNullOrUndefined(currentRecord.hasFilteredChildRecords)) {
224
224
  currentRecord.hasFilteredChildRecords = null;
@@ -87,22 +87,23 @@ var Freeze = /** @class */ (function () {
87
87
  rows = args.detailrows;
88
88
  }
89
89
  for (var i = 0; i < rows.length; i++) {
90
- var rData = this.parent.grid.getRowObjectFromUID(rows[i].getAttribute('data-Uid')).data;
91
- rows[i].style.display = args.action;
92
- if (freeze) {
93
- frozenRightRows[i].style.display = args.action;
90
+ var rData = this.parent.grid.getRowObjectFromUID(rows[parseInt(i.toString(), 10)].getAttribute('data-Uid')).data;
91
+ rows[parseInt(i.toString(), 10)].style.display = args.action;
92
+ if (freeze && frozenRightRows.length) {
93
+ frozenRightRows[parseInt(i.toString(), 10)].style.display = args.action;
94
94
  }
95
95
  var queryselector = args.action === 'none' ? '.e-treecolumn-container .e-treegridcollapse'
96
96
  : '.e-treecolumn-container .e-treegridexpand';
97
- if (frozenrows[rows[i].rowIndex].querySelector(queryselector)) {
97
+ if (frozenrows[rows[parseInt(i.toString(), 10)].rowIndex].querySelector(queryselector)) {
98
98
  var cRow = [];
99
99
  for (var i_1 = 0; i_1 < movableRows.length; i_1++) {
100
- if (movableRows[i_1].querySelector('.e-gridrowindex' + rData.index + 'level' + (rData.level + 1))) {
101
- cRow.push(movableRows[i_1]);
100
+ if (movableRows[parseInt(i_1.toString(), 10)].querySelector('.e-gridrowindex' + rData.index + 'level' + (rData.level + 1))) {
101
+ cRow.push(movableRows[parseInt(i_1.toString(), 10)]);
102
102
  }
103
103
  }
104
104
  if (cRow.length) {
105
- this.rowExpandCollapse({ detailrows: cRow, action: args.action });
105
+ var data = this.parent.getCurrentViewRecords()[cRow[0].rowIndex];
106
+ this.rowExpandCollapse({ detailrows: cRow, action: args.action, record: data });
106
107
  }
107
108
  }
108
109
  }
@@ -70,25 +70,25 @@ var InfiniteScroll = /** @class */ (function () {
70
70
  var rowObjects = this.parent.grid.getRowsObject();
71
71
  var locator = 'serviceLocator';
72
72
  var generateRows = 'generateRows';
73
- var serviceLocator = this.parent.grid.infiniteScrollModule[locator];
73
+ var serviceLocator = this.parent.grid.infiniteScrollModule["" + locator];
74
74
  var rowRenderer = new RowRenderer(serviceLocator, null, this.parent.grid);
75
75
  var rows = this.parent.getRows();
76
76
  var position = args.index === rows.length - 1 ? 'after' : 'before';
77
77
  var cols = this.parent.grid.getColumns();
78
- var childRowObjects = this.parent.grid.infiniteScrollModule[generateRows](args.childData, args);
78
+ var childRowObjects = this.parent.grid.infiniteScrollModule["" + generateRows](args.childData, args);
79
79
  var childRowElements = [];
80
80
  for (var i = 0; i < childRowObjects.length; i++) {
81
- childRowElements.push(rowRenderer.render(childRowObjects[i], cols));
81
+ childRowElements.push(rowRenderer.render(childRowObjects[parseInt(i.toString(), 10)], cols));
82
82
  }
83
83
  rowObjects.splice.apply(rowObjects, [args.index + 1, 0].concat(childRowObjects));
84
84
  for (var i = 0; i < childRowElements.length; i++) {
85
85
  if (position === 'after') {
86
- rows[args.index + i][position](childRowElements[i]);
86
+ rows[args.index + i]["" + position](childRowElements[parseInt(i.toString(), 10)]);
87
87
  }
88
88
  else {
89
- rows[args.index + i + 1][position](childRowElements[i]);
89
+ rows[args.index + i + 1]["" + position](childRowElements[parseInt(i.toString(), 10)]);
90
90
  }
91
- rows.splice(args.index + 1 + i, 0, childRowElements[i]);
91
+ rows.splice(args.index + 1 + i, 0, childRowElements[parseInt(i.toString(), 10)]);
92
92
  }
93
93
  resetRowIndex(this.parent.grid, this.parent.grid.getRowsObject(), this.parent.grid.getRows(), 0);
94
94
  };
@@ -100,9 +100,9 @@ var InfiniteScroll = /** @class */ (function () {
100
100
  InfiniteScroll.prototype.contentready = function () {
101
101
  if (this.parent.infiniteScrollSettings.enableCache && !isNullOrUndefined(this.parent.editModule)) {
102
102
  var updateIndex = 'updateIndex';
103
- this.parent.editModule[updateIndex](this.parent.grid.dataSource, this.parent.getRows(), this.parent.getCurrentViewRecords());
103
+ this.parent.editModule["" + updateIndex](this.parent.grid.dataSource, this.parent.getRows(), this.parent.getCurrentViewRecords());
104
104
  if (this.parent.getFrozenColumns()) {
105
- this.parent.editModule[updateIndex](this.parent.grid.dataSource, this.parent.getMovableDataRows(), this.parent.getCurrentViewRecords());
105
+ this.parent.editModule["" + updateIndex](this.parent.grid.dataSource, this.parent.getMovableDataRows(), this.parent.getCurrentViewRecords());
106
106
  }
107
107
  }
108
108
  };
@@ -201,11 +201,11 @@ var InfiniteScroll = /** @class */ (function () {
201
201
  */
202
202
  InfiniteScroll.prototype.infiniteEditHandler = function (args) {
203
203
  var infiniteData = 'infiniteCurrentViewData';
204
- var infiniteCurrentViewData = this.parent.grid.infiniteScrollModule[infiniteData];
204
+ var infiniteCurrentViewData = this.parent.grid.infiniteScrollModule["" + infiniteData];
205
205
  var keys = Object.keys(infiniteCurrentViewData);
206
206
  if (args.e.requestType === 'delete' && args.result.length > 1) {
207
207
  for (var i = 1; i < args.result.length; i++) {
208
- infiniteCurrentViewData[keys[keys.length - 1]].push(args.result[i]);
208
+ infiniteCurrentViewData[keys[keys.length - 1]].push(args.result[parseInt(i.toString(), 10)]);
209
209
  }
210
210
  }
211
211
  };
@@ -244,13 +244,13 @@ var InfiniteScroll = /** @class */ (function () {
244
244
  var resetInfiniteCurrentViewData = 'resetInfiniteCurrentViewData';
245
245
  var _loop_1 = function (i) {
246
246
  rows.filter(function (e, index) {
247
- if (e.data[keyField] === data[i][keyField]) {
247
+ if (e.data["" + keyField] === data[parseInt(i.toString(), 10)]["" + keyField]) {
248
248
  if (isFrozen) {
249
249
  var page = Math.ceil((index + 1) / _this.parent.grid.pageSettings.pageSize);
250
- _this.parent.grid.infiniteScrollModule[resetInfiniteCurrentViewData](page, index);
250
+ _this.parent.grid.infiniteScrollModule["" + resetInfiniteCurrentViewData](page, index);
251
251
  }
252
252
  rows.splice(index, 1);
253
- remove(rowElms[index]);
253
+ remove(rowElms[parseInt(index.toString(), 10)]);
254
254
  rowElms.splice(index, 1);
255
255
  }
256
256
  });
@@ -266,7 +266,7 @@ var InfiniteScroll = /** @class */ (function () {
266
266
  var locator = 'serviceLocator';
267
267
  var actionArgs = eventArgs.args.e;
268
268
  var row = eventArgs.row;
269
- var serviceLocator = this.parent.grid.infiniteScrollModule[locator];
269
+ var serviceLocator = this.parent.grid.infiniteScrollModule["" + locator];
270
270
  var rowRenderer = new RowRenderer(serviceLocator, null, this.parent.grid);
271
271
  var tbody;
272
272
  var currentData = this.parent.getCurrentViewRecords();
@@ -290,22 +290,22 @@ var InfiniteScroll = /** @class */ (function () {
290
290
  }
291
291
  var position;
292
292
  var addRowIndex = 'addRowIndex';
293
- var newRowIndex = this.parent.editModule[addRowIndex];
293
+ var newRowIndex = this.parent.editModule["" + addRowIndex];
294
294
  for (var i = 0; i < row.length; i++) {
295
- var newRow = rowRenderer.render(row[i], this.parent.grid.getColumns());
295
+ var newRow = rowRenderer.render(row[parseInt(i.toString(), 10)], this.parent.grid.getColumns());
296
296
  if (actionArgs.requestType === 'save' && actionArgs.action === 'add') {
297
297
  if (getValue('selectedIndex', this.parent.editModule) !== -1 && this.parent.editSettings.newRowPosition !== 'Top') {
298
298
  if (this.parent.editSettings.newRowPosition === 'Below' || this.parent.editSettings.newRowPosition === 'Child') {
299
299
  position = 'after';
300
- newRowIndex += findChildrenRecords(currentData[newRowIndex]).length;
300
+ newRowIndex += findChildrenRecords(currentData[parseInt(newRowIndex.toString(), 10)]).length;
301
301
  if (this.parent.editSettings.newRowPosition === 'Child') {
302
302
  newRowIndex -= 1; //// for child position already child record is added in childRecords so subtracting 1
303
303
  }
304
- currentRows[newRowIndex][position](newRow);
304
+ currentRows[parseInt(newRowIndex.toString(), 10)]["" + position](newRow);
305
305
  }
306
306
  else if (this.parent.editSettings.newRowPosition === 'Above') {
307
307
  position = 'before';
308
- currentRows[this.parent.editModule[addRowIndex]][position](newRow);
308
+ currentRows[this.parent.editModule["" + addRowIndex]]["" + position](newRow);
309
309
  }
310
310
  }
311
311
  else if (this.parent.editSettings.newRowPosition === 'Bottom') {
@@ -49,36 +49,36 @@ var Logger = /** @class */ (function (_super) {
49
49
  }
50
50
  var type = types;
51
51
  for (var i = 0; i < type.length; i++) {
52
- var item = detailLists[type[i]];
52
+ var item = detailLists[type[parseInt(i.toString(), 10)]];
53
53
  var cOp = item.check(args, this.parent);
54
54
  if (cOp.success) {
55
55
  var message = item.generateMessage(args, this.parent, cOp.options);
56
56
  message = message.replace('EJ2Grid', 'EJ2TreeGrid').replace('* Hierarchy Grid', '').replace('* Grouping', '');
57
- if (IsRowDDEnabled && type[i] === 'primary_column_missing') {
57
+ if (IsRowDDEnabled && type[parseInt(i.toString(), 10)] === 'primary_column_missing') {
58
58
  message = message.replace('Editing', 'Row DragAndDrop');
59
59
  IsRowDDEnabled = false;
60
60
  }
61
61
  var index = message.indexOf('https');
62
62
  var gridurl = message.substring(index);
63
- if (type[i] === 'module_missing') {
63
+ if (type[parseInt(i.toString(), 10)] === 'module_missing') {
64
64
  message = message.replace(gridurl, DOC_URL + '/modules');
65
65
  }
66
- else if (type[i] === 'primary_column_missing' || type[i] === 'selection_key_missing') {
66
+ else if (type[parseInt(i.toString(), 10)] === 'primary_column_missing' || type[parseInt(i.toString(), 10)] === 'selection_key_missing') {
67
67
  message = message.replace(gridurl, BASE_DOC_URL + '/api/treegrid/column/#isprimarykey');
68
68
  }
69
- else if (type[i] === 'grid_remote_edit') {
69
+ else if (type[parseInt(i.toString(), 10)] === 'grid_remote_edit') {
70
70
  message = message.replace(gridurl, DOC_URL + '/edit');
71
71
  }
72
- else if (type[i] === 'virtual_height') {
72
+ else if (type[parseInt(i.toString(), 10)] === 'virtual_height') {
73
73
  message = message.replace(gridurl, DOC_URL + '/virtual');
74
74
  }
75
- else if (type[i] === 'check_datasource_columns') {
75
+ else if (type[parseInt(i.toString(), 10)] === 'check_datasource_columns') {
76
76
  message = message.replace(gridurl, DOC_URL + '/columns');
77
77
  }
78
- else if (type[i] === 'locale_missing') {
78
+ else if (type[parseInt(i.toString(), 10)] === 'locale_missing') {
79
79
  message = message.replace(gridurl, DOC_URL + '/global-local/#localization');
80
80
  }
81
- if (type[i] === 'datasource_syntax_mismatch') {
81
+ if (type[parseInt(i.toString(), 10)] === 'datasource_syntax_mismatch') {
82
82
  if (!isNullOrUndefined(this.treeGridObj) && !isNullOrUndefined(this.treeGridObj.dataStateChange)) {
83
83
  // eslint-disable-next-line no-console
84
84
  console[item.logType](message);
@@ -102,7 +102,7 @@ var Logger = /** @class */ (function (_super) {
102
102
  this.log('primary_column_missing', args);
103
103
  }
104
104
  for (var i = 0; i < type.length; i++) {
105
- var item = treeGridDetails[type[i]];
105
+ var item = treeGridDetails[type[parseInt(i.toString(), 10)]];
106
106
  var cOp = item.check(args, treeGrid);
107
107
  if (cOp.success) {
108
108
  var message = item.generateMessage(args, treeGrid, cOp.options);