@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
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 20.3.61
3
+ * version : 20.4.40
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-treegrid@*",
3
- "_id": "@syncfusion/ej2-treegrid@20.3.60",
3
+ "_id": "@syncfusion/ej2-treegrid@20.4.38",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-vwUG87xUw7K5Ch2OYXIlI++Ggg2Pia/d5s6TvuLEepSbrtZ17YNTg1M0Q/SuTAkQLY3dSYdapNhdPDxs2cQU5g==",
5
+ "_integrity": "sha512-J8IzPFLGvayxjLY78cQGvLHlWRHVZuTBSKr/7fmhghhW6Wm57HyBMckPQG45eCMnrF/m1d/aZxGdi1es5Q4hzA==",
6
6
  "_location": "/@syncfusion/ej2-treegrid",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -24,8 +24,8 @@
24
24
  "/@syncfusion/ej2-react-treegrid",
25
25
  "/@syncfusion/ej2-vue-treegrid"
26
26
  ],
27
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-20.3.60.tgz",
28
- "_shasum": "ae56ea6b799c2789f20f1c4918efc5ee5f3f065d",
27
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-20.4.38.tgz",
28
+ "_shasum": "5ce373c5b5fbab41f75c1dc8d7d4b77be13a868d",
29
29
  "_spec": "@syncfusion/ej2-treegrid@*",
30
30
  "_where": "/jenkins/workspace/ease-automation_release_19.1.0.1/packages/included",
31
31
  "author": {
@@ -36,20 +36,26 @@
36
36
  },
37
37
  "bundleDependencies": false,
38
38
  "dependencies": {
39
- "@syncfusion/ej2-base": "~20.3.56",
40
- "@syncfusion/ej2-data": "~20.3.60",
41
- "@syncfusion/ej2-grids": "~20.3.61",
42
- "@syncfusion/ej2-popups": "~20.3.60"
39
+ "@syncfusion/ej2-base": "~20.4.40",
40
+ "@syncfusion/ej2-data": "~20.4.40",
41
+ "@syncfusion/ej2-grids": "~20.4.40",
42
+ "@syncfusion/ej2-popups": "~20.4.40"
43
43
  },
44
44
  "deprecated": false,
45
45
  "description": "Essential JS 2 TreeGrid Component",
46
46
  "devDependencies": {},
47
47
  "es2015": "./dist/es6/ej2-treegrid.es5.js",
48
- "homepage": "https://github.com/syncfusion/ej2-treegrid#readme",
48
+ "homepage": "https://www.syncfusion.com/javascript-ui-controls",
49
49
  "keywords": [
50
50
  "ej2",
51
51
  "syncfusion",
52
- "ej2-treegrid"
52
+ "JavaScript",
53
+ "TypeScript",
54
+ "treelist",
55
+ "tree-data",
56
+ "tree-table",
57
+ "table",
58
+ "treegrid"
53
59
  ],
54
60
  "license": "SEE LICENSE IN license",
55
61
  "main": "./dist/ej2-treegrid.umd.min.js",
@@ -60,6 +66,6 @@
60
66
  "url": "git+https://github.com/syncfusion/ej2-treegrid.git"
61
67
  },
62
68
  "typings": "index.d.ts",
63
- "version": "20.3.61",
69
+ "version": "20.4.40",
64
70
  "sideEffects": false
65
71
  }
@@ -100,7 +100,7 @@ var BatchEdit = /** @class */ (function () {
100
100
  var index;
101
101
  if (!isNullOrUndefined(this.batchAddedRecords) && this.batchAddedRecords.length) {
102
102
  for (var i = 0; i < this.batchAddedRecords.length; i++) {
103
- index = data.map(function (e) { return e[primaryKey]; }).indexOf(this.batchAddedRecords[i][primaryKey]);
103
+ index = data.map(function (e) { return e["" + primaryKey]; }).indexOf(this.batchAddedRecords[parseInt(i.toString(), 10)]["" + primaryKey]);
104
104
  data.splice(index, 1);
105
105
  }
106
106
  }
@@ -137,7 +137,7 @@ var BatchEdit = /** @class */ (function () {
137
137
  var indexvalue = void 0;
138
138
  var parentItem = 'parentItem';
139
139
  var uniqueID = 'uniqueID';
140
- var parentRecord = this.selectedIndex > -1 ? this.batchRecords[this.addRowIndex][parentItem] : null;
140
+ var parentRecord = this.selectedIndex > -1 ? this.batchRecords[parseInt(this.addRowIndex.toString(), 10)]["" + parentItem] : null;
141
141
  var idMapping = void 0;
142
142
  var parentUniqueID = void 0;
143
143
  var parentIdMapping = void 0;
@@ -149,14 +149,14 @@ var BatchEdit = /** @class */ (function () {
149
149
  if (this.batchRecords.length) {
150
150
  idMapping = this.batchRecords[this.addRowIndex][this.parent.idMapping];
151
151
  parentIdMapping = this.batchRecords[this.addRowIndex][this.parent.parentIdMapping];
152
- if (this.batchRecords[this.addRowIndex][parentItem]) {
153
- parentUniqueID = this.batchRecords[this.addRowIndex][parentItem][uniqueID];
152
+ if (this.batchRecords[parseInt(this.addRowIndex.toString(), 10)]["" + parentItem]) {
153
+ parentUniqueID = this.batchRecords[parseInt(this.addRowIndex.toString(), 10)]["" + parentItem]["" + uniqueID];
154
154
  }
155
155
  }
156
156
  this.batchAddedRecords = extendArray(this.batchAddedRecords);
157
157
  this.batchAddRowRecord = extendArray(this.batchAddRowRecord);
158
158
  this.batchAddRowRecord.push(this.batchRecords[this.addRowIndex]);
159
- added = this.parent.grid.getRowsObject()[rowObjectIndex].changes;
159
+ added = this.parent.grid.getRowsObject()[parseInt(rowObjectIndex.toString(), 10)].changes;
160
160
  added.uniqueID = getUid(this.parent.element.id + '_data_');
161
161
  setValue('uniqueIDCollection.' + added.uniqueID, added, this.parent);
162
162
  if (!Object.prototype.hasOwnProperty.call(added, 'level')) {
@@ -173,7 +173,7 @@ var BatchEdit = /** @class */ (function () {
173
173
  var childRecordCount = findChildrenRecords(this.batchRecords[this.addRowIndex]).length;
174
174
  var record = findChildrenRecords(this.batchRecords[this.addRowIndex])[childRecordCount - 1];
175
175
  record = isNullOrUndefined(record) ? this.batchRecords[this.addRowIndex] : record;
176
- currentDataIndex = data.map(function (e) { return e[primaryKey_1]; }).indexOf(record[primaryKey_1]);
176
+ currentDataIndex = data.map(function (e) { return e["" + primaryKey_1]; }).indexOf(record["" + primaryKey_1]);
177
177
  if (this.isSelfReference) {
178
178
  added[this.parent.parentIdMapping] = idMapping;
179
179
  }
@@ -182,7 +182,7 @@ var BatchEdit = /** @class */ (function () {
182
182
  }
183
183
  else if ((this.parent.editSettings.newRowPosition === 'Above' || this.parent.editSettings.newRowPosition === 'Below')
184
184
  && !isNullOrUndefined(this.batchRecords[this.addRowIndex])) {
185
- added.level = this.batchRecords[this.addRowIndex][level];
185
+ added.level = this.batchRecords[parseInt(this.addRowIndex.toString(), 10)]["" + level];
186
186
  if (added.level && this.selectedIndex > -1) {
187
187
  added.parentItem = parentRecord;
188
188
  added.parentUniqueID = parentUniqueID;
@@ -194,11 +194,11 @@ var BatchEdit = /** @class */ (function () {
194
194
  var childRecordCount = findChildrenRecords(this.batchRecords[this.addRowIndex]).length;
195
195
  var record = findChildrenRecords(this.batchRecords[this.addRowIndex])[childRecordCount - 1];
196
196
  record = isNullOrUndefined(record) ? this.batchRecords[this.addRowIndex] : record;
197
- currentDataIndex = data.map(function (e) { return e[primaryKey_1]; }).indexOf(record[primaryKey_1]);
197
+ currentDataIndex = data.map(function (e) { return e["" + primaryKey_1]; }).indexOf(record["" + primaryKey_1]);
198
198
  }
199
199
  if (this.parent.editSettings.newRowPosition === 'Above' && this.selectedIndex > -1) {
200
200
  var record = this.batchRecords[this.addRowIndex];
201
- currentDataIndex = data.map(function (e) { return e[primaryKey_1]; }).indexOf(record[primaryKey_1]);
201
+ currentDataIndex = data.map(function (e) { return e["" + primaryKey_1]; }).indexOf(record["" + primaryKey_1]);
202
202
  }
203
203
  if (this.isSelfReference) {
204
204
  added[this.parent.parentIdMapping] = parentIdMapping;
@@ -221,20 +221,20 @@ var BatchEdit = /** @class */ (function () {
221
221
  data.splice(indexvalue, 0, added);
222
222
  this.batchAddedRecords.push(added);
223
223
  }
224
- this.parent.grid.getRowsObject()[rowObjectIndex].data = added;
224
+ this.parent.grid.getRowsObject()[parseInt(rowObjectIndex.toString(), 10)].data = added;
225
225
  this.newBatchRowAdded = false;
226
226
  }
227
227
  if (this.parent.frozenColumns || this.parent.getFrozenColumns()
228
- && this.parent.grid.getRowsObject()[rowObjectIndex].edit === 'add') {
229
- merge(this.currentViewRecords[rowObjectIndex], this.parent.grid.getRowsObject()[rowObjectIndex].changes);
228
+ && this.parent.grid.getRowsObject()[parseInt(rowObjectIndex.toString(), 10)].edit === 'add') {
229
+ merge(this.currentViewRecords[parseInt(rowObjectIndex.toString(), 10)], this.parent.grid.getRowsObject()[parseInt(rowObjectIndex.toString(), 10)].changes);
230
230
  }
231
231
  }
232
232
  };
233
233
  BatchEdit.prototype.beforeBatchAdd = function (e) {
234
234
  var isTabLastRow = 'isTabLastRow';
235
- if (this.parent.editSettings.mode === 'Cell' && this.parent.editModule[isTabLastRow]) {
235
+ if (this.parent.editSettings.mode === 'Cell' && this.parent.editModule["" + isTabLastRow]) {
236
236
  e.cancel = true;
237
- this.parent.editModule[isTabLastRow] = false;
237
+ this.parent.editModule["" + isTabLastRow] = false;
238
238
  return;
239
239
  }
240
240
  if (this.parent.editModule['isAddedRowByMethod'] && !isNullOrUndefined(this.parent.editModule['addRowIndex']) &&
@@ -324,9 +324,9 @@ var BatchEdit = /** @class */ (function () {
324
324
  var totalCount = parentRowIndex + childs.length;
325
325
  var firstChildIndex = parentRowIndex + 1;
326
326
  for (var i = firstChildIndex; i <= totalCount; i++) {
327
- row.push(this.parent.grid.getDataRows()[i]);
327
+ row.push(this.parent.grid.getDataRows()[parseInt(i.toString(), 10)]);
328
328
  if (this.parent.frozenRows || this.parent.frozenColumns || this.parent.getFrozenColumns()) {
329
- row.push(this.parent.grid.getMovableRows()[i]);
329
+ row.push(this.parent.grid.getMovableRows()[parseInt(i.toString(), 10)]);
330
330
  }
331
331
  }
332
332
  }
@@ -342,21 +342,21 @@ var BatchEdit = /** @class */ (function () {
342
342
  childs.push(data);
343
343
  records = childs;
344
344
  for (var i = 0; i < records.length; i++) {
345
- var indexvalue = this.batchRecords.map(function (e) { return e[primarykey]; }).indexOf(records[i][primarykey]);
345
+ var indexvalue = this.batchRecords.map(function (e) { return e["" + primarykey]; }).indexOf(records[parseInt(i.toString(), 10)]["" + primarykey]);
346
346
  if (indexvalue !== -1) {
347
347
  this.batchRecords.splice(indexvalue, 1);
348
348
  }
349
349
  }
350
350
  for (var i = 0; i < row.length; i++) {
351
- if (!isNullOrUndefined(row[i])) {
352
- this.parent.grid.selectionModule.selectedRecords.push(row[i]);
351
+ if (!isNullOrUndefined(row[parseInt(i.toString(), 10)])) {
352
+ this.parent.grid.selectionModule.selectedRecords.push(row[parseInt(i.toString(), 10)]);
353
353
  }
354
354
  }
355
355
  };
356
356
  BatchEdit.prototype.updateRowIndex = function () {
357
357
  var rows = this.parent.grid.getDataRows();
358
358
  for (var i = 0; i < rows.length; i++) {
359
- rows[i].setAttribute('data-rowindex', i.toString());
359
+ rows[parseInt(i.toString(), 10)].setAttribute('data-rowindex', i.toString());
360
360
  }
361
361
  var freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
362
362
  this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
@@ -364,9 +364,9 @@ var BatchEdit = /** @class */ (function () {
364
364
  var mRows = this.parent.grid.getMovableDataRows();
365
365
  var freezeRightRows = this.parent.grid.getFrozenRightDataRows();
366
366
  for (var i = 0; i < mRows.length; i++) {
367
- mRows[i].setAttribute('data-rowindex', i.toString());
367
+ mRows[parseInt(i.toString(), 10)].setAttribute('data-rowindex', i.toString());
368
368
  if (freeze) {
369
- freezeRightRows[i].setAttribute('data-rowindex', i.toString());
369
+ freezeRightRows[parseInt(i.toString(), 10)].setAttribute('data-rowindex', i.toString());
370
370
  }
371
371
  }
372
372
  }
@@ -375,9 +375,9 @@ var BatchEdit = /** @class */ (function () {
375
375
  var primaryKey = this.parent.grid.getPrimaryKeyFieldNames()[0];
376
376
  var addedRecords = 'addedRecords';
377
377
  var parentItem = this.parent.editSettings.newRowPosition === 'Child' ? 'primaryParent' : 'parentItem';
378
- for (var i = 0; i < this.parent.getBatchChanges()[addedRecords].length; i++) {
379
- if (!isNullOrUndefined(this.parent.getBatchChanges()[addedRecords][i][parentItem])) {
380
- if (this.parent.getBatchChanges()[addedRecords][i][parentItem][primaryKey] === records[this.addRowIndex][primaryKey]) {
378
+ for (var i = 0; i < this.parent.getBatchChanges()["" + addedRecords].length; i++) {
379
+ if (!isNullOrUndefined(this.parent.getBatchChanges()["" + addedRecords][parseInt(i.toString(), 10)]["" + parentItem])) {
380
+ if (this.parent.getBatchChanges()["" + addedRecords][parseInt(i.toString(), 10)]["" + parentItem]["" + primaryKey] === records[parseInt(this.addRowIndex.toString(), 10)]["" + primaryKey]) {
381
381
  this.batchChildCount = this.batchChildCount + 1;
382
382
  }
383
383
  }
@@ -386,32 +386,32 @@ var BatchEdit = /** @class */ (function () {
386
386
  BatchEdit.prototype.beforeBatchSave = function (e) {
387
387
  var changeRecords = 'changedRecords';
388
388
  var deleterecords = 'deletedRecords';
389
- var changedRecords = e.batchChanges[changeRecords];
390
- if (e.batchChanges[changeRecords].length) {
389
+ var changedRecords = e.batchChanges["" + changeRecords];
390
+ if (e.batchChanges["" + changeRecords].length) {
391
391
  var columnName = void 0;
392
392
  for (var i = 0; i < changedRecords.length; i++) {
393
- editAction({ value: changedRecords[i], action: 'edit' }, this.parent, this.isSelfReference, this.addRowIndex, this.selectedIndex, columnName);
393
+ editAction({ value: changedRecords[parseInt(i.toString(), 10)], action: 'edit' }, this.parent, this.isSelfReference, this.addRowIndex, this.selectedIndex, columnName);
394
394
  }
395
395
  }
396
- if (e.batchChanges[deleterecords].length) {
397
- var deletedRecords = e.batchChanges[deleterecords];
396
+ if (e.batchChanges["" + deleterecords].length) {
397
+ var deletedRecords = e.batchChanges["" + deleterecords];
398
398
  var record = deletedRecords;
399
399
  for (var i = 0; i < record.length; i++) {
400
- this.deleteUniqueID(record[i].uniqueID);
401
- var childs = findChildrenRecords(record[i]);
400
+ this.deleteUniqueID(record[parseInt(i.toString(), 10)].uniqueID);
401
+ var childs = findChildrenRecords(record[parseInt(i.toString(), 10)]);
402
402
  for (var c = 0; c < childs.length; c++) {
403
- this.deleteUniqueID(childs[c].uniqueID);
403
+ this.deleteUniqueID(childs[parseInt(c.toString(), 10)].uniqueID);
404
404
  }
405
- e.batchChanges[deleterecords] = e.batchChanges[deleterecords].concat(childs);
405
+ e.batchChanges["" + deleterecords] = e.batchChanges["" + deleterecords].concat(childs);
406
406
  }
407
407
  }
408
408
  this.isAdd = false;
409
409
  };
410
410
  BatchEdit.prototype.deleteUniqueID = function (value) {
411
411
  var idFilter = 'uniqueIDFilterCollection';
412
- delete this.parent[idFilter][value];
412
+ delete this.parent["" + idFilter]["" + value];
413
413
  var id = 'uniqueIDCollection';
414
- delete this.parent[id][value];
414
+ delete this.parent["" + id]["" + value];
415
415
  };
416
416
  BatchEdit.prototype.batchCancelAction = function () {
417
417
  var targetElement = 'targetElement';
@@ -425,39 +425,39 @@ var BatchEdit = /** @class */ (function () {
425
425
  var primaryKey = this.parent.grid.getPrimaryKeyFieldNames()[0];
426
426
  if (!isNullOrUndefined(this.batchAddedRecords)) {
427
427
  for (var i = 0; i < this.batchAddedRecords.length; i++) {
428
- index = data.map(function (e) { return e[primaryKey]; }).indexOf(this.batchAddedRecords[i][primaryKey]);
428
+ index = data.map(function (e) { return e["" + primaryKey]; }).indexOf(this.batchAddedRecords[parseInt(i.toString(), 10)]["" + primaryKey]);
429
429
  if (index !== -1) {
430
430
  data.splice(index, 1);
431
431
  }
432
432
  if (this.parent.editSettings.newRowPosition === 'Child') {
433
- index = currentViewRecords.map(function (e) { return e[primaryKey]; })
434
- .indexOf(this.batchAddedRecords[i][parentItem] ? this.batchAddedRecords[i][parentItem][primaryKey]
435
- : this.batchAddedRecords[i][primaryKey]);
436
- if (!isNullOrUndefined(currentViewRecords[index])) {
437
- var children = currentViewRecords[index][childRecords];
433
+ index = currentViewRecords.map(function (e) { return e["" + primaryKey]; })
434
+ .indexOf(this.batchAddedRecords[parseInt(i.toString(), 10)]["" + parentItem] ? this.batchAddedRecords[parseInt(i.toString(), 10)]["" + parentItem]["" + primaryKey]
435
+ : this.batchAddedRecords[parseInt(i.toString(), 10)]["" + primaryKey]);
436
+ if (!isNullOrUndefined(currentViewRecords[parseInt(index.toString(), 10)])) {
437
+ var children = currentViewRecords[parseInt(index.toString(), 10)]["" + childRecords];
438
438
  for (var j = 0; children && j < children.length; j++) {
439
- if (children[j][primaryKey] === this.batchAddedRecords[i][primaryKey]) {
440
- currentViewRecords[index][childRecords].splice(j, 1);
439
+ if (children[parseInt(j.toString(), 10)]["" + primaryKey] === this.batchAddedRecords[parseInt(i.toString(), 10)]["" + primaryKey]) {
440
+ currentViewRecords[parseInt(index.toString(), 10)]["" + childRecords].splice(j, 1);
441
441
  }
442
442
  }
443
443
  }
444
444
  }
445
445
  }
446
446
  }
447
- if (!isNullOrUndefined(this.parent[targetElement])) {
448
- var row = this.parent[targetElement].closest('tr');
447
+ if (!isNullOrUndefined(this.parent["" + targetElement])) {
448
+ var row = this.parent["" + targetElement].closest('tr');
449
449
  this.parent.collapseRow(row);
450
- this.parent[targetElement] = null;
450
+ this.parent["" + targetElement] = null;
451
451
  }
452
452
  if (!isNullOrUndefined(this.batchDeletedRecords)) {
453
453
  for (var i = 0; i < this.batchDeletedRecords.length; i++) {
454
- if (!isNullOrUndefined(this.batchDeletedRecords[i][parentItem])) {
455
- index = currentViewRecords.map(function (e) { return e[primaryKey]; })
456
- .indexOf(this.batchDeletedRecords[i][parentItem][primaryKey]);
457
- var positionIndex = this.batchDeletedRecords[i][indexvalue] === 0 ? this.batchDeletedRecords[i][indexvalue] :
458
- this.batchDeletedRecords[i][indexvalue] - 1;
459
- if (!isNullOrUndefined(currentViewRecords[index])) {
460
- currentViewRecords[index][childRecords].splice(positionIndex, 0, this.batchDeletedRecords[i]);
454
+ if (!isNullOrUndefined(this.batchDeletedRecords[parseInt(i.toString(), 10)]["" + parentItem])) {
455
+ index = currentViewRecords.map(function (e) { return e["" + primaryKey]; })
456
+ .indexOf(this.batchDeletedRecords[parseInt(i.toString(), 10)]["" + parentItem]["" + primaryKey]);
457
+ var positionIndex = this.batchDeletedRecords[parseInt(i.toString(), 10)]["" + indexvalue] === 0 ? this.batchDeletedRecords[parseInt(i.toString(), 10)]["" + indexvalue] :
458
+ this.batchDeletedRecords[parseInt(i.toString(), 10)]["" + indexvalue] - 1;
459
+ if (!isNullOrUndefined(currentViewRecords[parseInt(index.toString(), 10)])) {
460
+ currentViewRecords[parseInt(index.toString(), 10)]["" + childRecords].splice(positionIndex, 0, this.batchDeletedRecords[parseInt(i.toString(), 10)]);
461
461
  }
462
462
  }
463
463
  }
@@ -482,7 +482,7 @@ var BatchEdit = /** @class */ (function () {
482
482
  var currentViewRecords = this.parent.grid.getCurrentViewRecords();
483
483
  var primarykey_1 = this.parent.grid.getPrimaryKeyFieldNames()[0];
484
484
  var level = 'level';
485
- var addRecords = batchChanges[addedRecords];
485
+ var addRecords = batchChanges["" + addedRecords];
486
486
  var parentItem = 'parentItem';
487
487
  var selectedIndex = void 0;
488
488
  var addRowIndex = void 0;
@@ -497,8 +497,8 @@ var BatchEdit = /** @class */ (function () {
497
497
  if (this.parent.editModule['isAddedRowByMethod'] && addRecords.length && !isNullOrUndefined(this.parent.editModule['addRowIndex']) && !this.parent.editModule['isAddedRowByContextMenu']) {
498
498
  addRecords.reverse();
499
499
  for (var i_1 = 0; i_1 < addRecords.length; i_1++) {
500
- var index_1 = parseInt(this.parent.getContentTable().getElementsByClassName('e-insertedrow')[i_1].getAttribute('data-rowindex'), 10);
501
- data.splice(index_1, 0, addRecords[i_1]);
500
+ var index_1 = parseInt(this.parent.getContentTable().getElementsByClassName('e-insertedrow')[parseInt(i_1.toString(), 10)].getAttribute('data-rowindex'), 10);
501
+ data.splice(index_1, 0, addRecords[parseInt(i_1.toString(), 10)]);
502
502
  }
503
503
  }
504
504
  if (!this.parent.allowPaging && data.length !== currentViewRecords.length) {
@@ -509,8 +509,8 @@ var BatchEdit = /** @class */ (function () {
509
509
  else {
510
510
  var totalRecords = extendArray(data);
511
511
  if (totalRecords.length) {
512
- var startIndex = totalRecords.map(function (e) { return e[primarykey_1]; })
513
- .indexOf(currentViewRecords[0][primarykey_1]);
512
+ var startIndex = totalRecords.map(function (e) { return e["" + primarykey_1]; })
513
+ .indexOf(currentViewRecords[0]["" + primarykey_1]);
514
514
  var endIndex = startIndex + this.parent.grid.pageSettings.pageSize;
515
515
  currentViewRecords = totalRecords.splice(startIndex, endIndex);
516
516
  }
@@ -523,7 +523,7 @@ var BatchEdit = /** @class */ (function () {
523
523
  addRecords.reverse();
524
524
  }
525
525
  for (i = 0; i < addRecords.length; i++) {
526
- var taskData = extend({}, addRecords[i]);
526
+ var taskData = extend({}, addRecords[parseInt(i.toString(), 10)]);
527
527
  delete taskData.parentItem;
528
528
  delete taskData.uniqueID;
529
529
  delete taskData.index;
@@ -539,50 +539,50 @@ var BatchEdit = /** @class */ (function () {
539
539
  this.parent.editSettings.newRowPosition = this.parent.editModule['previousNewRowPosition'];
540
540
  this.parent.editModule['previousNewRowPosition'] = rowPosition;
541
541
  }
542
- addRecords[i].taskData = taskData;
543
- addRowRecord = this.batchAddRowRecord[i];
542
+ addRecords[parseInt(i.toString(), 10)].taskData = taskData;
543
+ addRowRecord = this.batchAddRowRecord[parseInt(i.toString(), 10)];
544
544
  if (isNullOrUndefined(addRowRecord)) {
545
545
  addRowRecord = this.batchAddRowRecord[i - 1];
546
546
  }
547
547
  if (this.isSelfReference) {
548
- if (!isNullOrUndefined(addRecords[i].parentItem)) {
549
- updateParentRow(primarykey_1, addRecords[i].parentItem, 'add', this.parent, this.isSelfReference, addRecords[i]);
548
+ if (!isNullOrUndefined(addRecords[parseInt(i.toString(), 10)].parentItem)) {
549
+ updateParentRow(primarykey_1, addRecords[parseInt(i.toString(), 10)].parentItem, 'add', this.parent, this.isSelfReference, addRecords[parseInt(i.toString(), 10)]);
550
550
  }
551
551
  }
552
552
  if (!isNullOrUndefined(addRowRecord)) {
553
553
  addRowIndex = addRowRecord.index;
554
554
  }
555
555
  if (this.parent.editSettings.newRowPosition !== 'Top' && this.parent.editSettings.newRowPosition !== 'Bottom') {
556
- if (isNullOrUndefined(addRecords[i].parentItem) && this.selectedIndex === -1) {
556
+ if (isNullOrUndefined(addRecords[parseInt(i.toString(), 10)].parentItem) && this.selectedIndex === -1) {
557
557
  selectedIndex = -1;
558
558
  addRowRecord = null;
559
559
  }
560
560
  }
561
- editAction({ value: addRecords[i], action: 'add' }, this.parent, this.isSelfReference, addRowIndex, selectedIndex, columnName, addRowRecord);
561
+ editAction({ value: addRecords[parseInt(i.toString(), 10)], action: 'add' }, this.parent, this.isSelfReference, addRowIndex, selectedIndex, columnName, addRowRecord);
562
562
  selectedIndex = null;
563
- if (this.parent.editSettings.newRowPosition === 'Child' && !isNullOrUndefined(addRecords[i][parentItem]) &&
563
+ if (this.parent.editSettings.newRowPosition === 'Child' && !isNullOrUndefined(addRecords[parseInt(i.toString(), 10)]["" + parentItem]) &&
564
564
  (isNullOrUndefined(this.parent.editModule['addRowIndex']) || this.isSelfReference)) {
565
- var indexValue = currentViewRecords.map(function (e) { return e[primarykey_1]; })
566
- .indexOf(addRecords[i][parentItem][primarykey_1]);
567
- var children = currentViewRecords[indexValue][childRecords];
565
+ var indexValue = currentViewRecords.map(function (e) { return e["" + primarykey_1]; })
566
+ .indexOf(addRecords[parseInt(i.toString(), 10)]["" + parentItem]["" + primarykey_1]);
567
+ var children = currentViewRecords[parseInt(indexValue.toString(), 10)]["" + childRecords];
568
568
  for (var j = 0; j < children.length; j++) {
569
- if (children[j][primarykey_1] === addRecords[i][primarykey_1]) {
570
- currentViewRecords[indexValue][childRecords].splice(j, 1);
569
+ if (children[parseInt(j.toString(), 10)]["" + primarykey_1] === addRecords[parseInt(i.toString(), 10)]["" + primarykey_1]) {
570
+ currentViewRecords[parseInt(indexValue.toString(), 10)]["" + childRecords].splice(j, 1);
571
571
  }
572
572
  }
573
573
  }
574
574
  }
575
- if (batchChanges[deletedRecords].length) {
576
- for (i = 0; i < batchChanges[deletedRecords].length; i++) {
577
- editAction({ value: batchChanges[deletedRecords][i], action: 'delete' }, this.parent, this.isSelfReference, addRowIndex, selectedIndex, columnName, addRowRecord);
575
+ if (batchChanges["" + deletedRecords].length) {
576
+ for (i = 0; i < batchChanges["" + deletedRecords].length; i++) {
577
+ editAction({ value: batchChanges["" + deletedRecords][parseInt(i.toString(), 10)], action: 'delete' }, this.parent, this.isSelfReference, addRowIndex, selectedIndex, columnName, addRowRecord);
578
578
  }
579
579
  }
580
580
  this.parent.parentData = [];
581
581
  for (var i_2 = 0; i_2 < data.length; i_2++) {
582
- data[i_2][index] = i_2;
583
- setValue('uniqueIDCollection.' + data[i_2][uniqueID] + '.index', i_2, this.parent);
584
- if (!data[i_2][level]) {
585
- this.parent.parentData.push(data[i_2]);
582
+ data[parseInt(i_2.toString(), 10)]["" + index] = i_2;
583
+ setValue('uniqueIDCollection.' + data[parseInt(i_2.toString(), 10)]["" + uniqueID] + '.index', i_2, this.parent);
584
+ if (!data[parseInt(i_2.toString(), 10)]["" + level]) {
585
+ this.parent.parentData.push(data[parseInt(i_2.toString(), 10)]);
586
586
  }
587
587
  }
588
588
  }
@@ -628,17 +628,17 @@ var BatchEdit = /** @class */ (function () {
628
628
  addedRecords = changes.addedRecords;
629
629
  }
630
630
  for (var i = 0; i < addedRecords.length; i++) {
631
- e.rows.splice(addedRecords[i][index], 1);
631
+ e.rows.splice(addedRecords[parseInt(i.toString(), 10)]["" + index], 1);
632
632
  }
633
633
  };
634
634
  BatchEdit.prototype.nextCellIndex = function (args) {
635
635
  var index = 'index';
636
636
  var rowIndex = 'rowIndex';
637
637
  if (this.parent.getSelectedRows().length) {
638
- args[index] = this.parent.getSelectedRows()[0][rowIndex];
638
+ args["" + index] = this.parent.getSelectedRows()[0]["" + rowIndex];
639
639
  }
640
640
  else {
641
- args[index] = this.batchIndex;
641
+ args["" + index] = this.batchIndex;
642
642
  }
643
643
  };
644
644
  return BatchEdit;
@@ -36,7 +36,7 @@ var TreeClipboard = /** @class */ (function (_super) {
36
36
  var uniqueID = 'uniqueID';
37
37
  var currentRecords = this.treeGridParent.getCurrentViewRecords();
38
38
  if (window.getSelection().toString() === '') {
39
- this.clipBoardTextArea.value = this[copyContent] = '';
39
+ this.clipBoardTextArea.value = this["" + copyContent] = '';
40
40
  var rows = this.treeGridParent.grid.getRows();
41
41
  if (this.treeGridParent.selectionSettings.mode !== 'Cell') {
42
42
  var selectedIndexes = this.treeGridParent.getSelectedRowIndexes().sort(function (a, b) {
@@ -46,19 +46,19 @@ var TreeClipboard = /** @class */ (function (_super) {
46
46
  if (i > 0) {
47
47
  this.treeCopyContent += '\n';
48
48
  }
49
- if (!rows[selectedIndexes[i]].classList.contains('e-summaryrow')) {
50
- var cells = [].slice.call(rows[selectedIndexes[i]].querySelectorAll('.e-rowcell'));
51
- var uniqueid = this.treeGridParent.getSelectedRecords()[i][uniqueID];
49
+ if (!rows[selectedIndexes[parseInt(i.toString(), 10)]].classList.contains('e-summaryrow')) {
50
+ var cells = [].slice.call(rows[selectedIndexes[parseInt(i.toString(), 10)]].querySelectorAll('.e-rowcell'));
51
+ var uniqueid = this.treeGridParent.getSelectedRecords()[parseInt(i.toString(), 10)]["" + uniqueID];
52
52
  if (this.copiedUniqueIdCollection.indexOf(uniqueid) === -1) {
53
53
  if (this.treeGridParent.copyHierarchyMode === 'Parent' || this.treeGridParent.copyHierarchyMode === 'Both') {
54
- this.parentContentData(currentRecords, selectedIndexes[i], rows, withHeader, i);
54
+ this.parentContentData(currentRecords, selectedIndexes[parseInt(i.toString(), 10)], rows, withHeader, i);
55
55
  }
56
- this[getCopyData](cells, false, '\t', withHeader);
57
- this.treeCopyContent += this[copyContent];
56
+ this["" + getCopyData](cells, false, '\t', withHeader);
57
+ this.treeCopyContent += this["" + copyContent];
58
58
  this.copiedUniqueIdCollection.push(uniqueid);
59
- this[copyContent] = '';
59
+ this["" + copyContent] = '';
60
60
  if (this.treeGridParent.copyHierarchyMode === 'Child' || this.treeGridParent.copyHierarchyMode === 'Both') {
61
- this.childContentData(currentRecords, selectedIndexes[i], rows, withHeader);
61
+ this.childContentData(currentRecords, selectedIndexes[parseInt(i.toString(), 10)], rows, withHeader);
62
62
  }
63
63
  }
64
64
  }
@@ -66,10 +66,11 @@ var TreeClipboard = /** @class */ (function (_super) {
66
66
  if (withHeader) {
67
67
  var headerTextArray = [];
68
68
  for (var i = 0; i < this.treeGridParent.getVisibleColumns().length; i++) {
69
- headerTextArray[i] = this.treeGridParent.getVisibleColumns()[i].headerText;
69
+ headerTextArray[parseInt(i.toString(), 10)] =
70
+ this.treeGridParent.getVisibleColumns()[parseInt(i.toString(), 10)].headerText;
70
71
  }
71
- this[getCopyData](headerTextArray, false, '\t', withHeader);
72
- this.treeCopyContent = this[copyContent] + '\n' + this.treeCopyContent;
72
+ this["" + getCopyData](headerTextArray, false, '\t', withHeader);
73
+ this.treeCopyContent = this["" + copyContent] + '\n' + this.treeCopyContent;
73
74
  }
74
75
  var args = {
75
76
  data: this.treeCopyContent,
@@ -79,14 +80,14 @@ var TreeClipboard = /** @class */ (function (_super) {
79
80
  if (args.cancel) {
80
81
  return;
81
82
  }
82
- this.clipBoardTextArea.value = this[copyContent] = args.data;
83
+ this.clipBoardTextArea.value = this["" + copyContent] = args.data;
83
84
  if (!Browser.userAgent.match(/ipad|ipod|iphone/i)) {
84
85
  this.clipBoardTextArea.select();
85
86
  }
86
87
  else {
87
88
  this.clipBoardTextArea.setSelectionRange(0, this.clipBoardTextArea.value.length);
88
89
  }
89
- this[isSelect] = true;
90
+ this["" + isSelect] = true;
90
91
  this.copiedUniqueIdCollection = [];
91
92
  this.treeCopyContent = '';
92
93
  }
@@ -101,25 +102,25 @@ var TreeClipboard = /** @class */ (function (_super) {
101
102
  var parentItem = 'parentItem';
102
103
  var uniqueID = 'uniqueID';
103
104
  var level = 'level';
104
- if (!isNullOrUndefined(currentRecords[selectedIndex][parentItem])) {
105
- var treeLevel = currentRecords[selectedIndex][parentItem][level];
105
+ if (!isNullOrUndefined(currentRecords[parseInt(selectedIndex.toString(), 10)]["" + parentItem])) {
106
+ var treeLevel = currentRecords[parseInt(selectedIndex.toString(), 10)]["" + parentItem]["" + level];
106
107
  for (var i = 0; i < treeLevel + 1; i++) {
107
108
  for (var j = 0; j < currentRecords.length; j++) {
108
- if (!isNullOrUndefined(currentRecords[selectedIndex][parentItem]) &&
109
- currentRecords[j][uniqueID] === currentRecords[selectedIndex][parentItem][uniqueID]) {
109
+ if (!isNullOrUndefined(currentRecords[parseInt(selectedIndex.toString(), 10)]["" + parentItem]) &&
110
+ currentRecords[parseInt(j.toString(), 10)]["" + uniqueID] === currentRecords[parseInt(selectedIndex.toString(), 10)]["" + parentItem]["" + uniqueID]) {
110
111
  selectedIndex = j;
111
- var cells = [].slice.call(rows[selectedIndex].querySelectorAll('.e-rowcell'));
112
- var uniqueid = currentRecords[j][uniqueID];
112
+ var cells = [].slice.call(rows[parseInt(selectedIndex.toString(), 10)].querySelectorAll('.e-rowcell'));
113
+ var uniqueid = currentRecords[parseInt(j.toString(), 10)]["" + uniqueID];
113
114
  if (this.copiedUniqueIdCollection.indexOf(uniqueid) === -1) {
114
- this[getCopyData](cells, false, '\t', withHeader);
115
+ this["" + getCopyData](cells, false, '\t', withHeader);
115
116
  if (index > 0) {
116
- this.treeCopyContent = this.treeCopyContent + this[copyContent] + '\n';
117
+ this.treeCopyContent = this.treeCopyContent + this["" + copyContent] + '\n';
117
118
  }
118
119
  else {
119
- this.treeCopyContent = this[copyContent] + '\n' + this.treeCopyContent;
120
+ this.treeCopyContent = this["" + copyContent] + '\n' + this.treeCopyContent;
120
121
  }
121
122
  this.copiedUniqueIdCollection.push(uniqueid);
122
- this[copyContent] = '';
123
+ this["" + copyContent] = '';
123
124
  break;
124
125
  }
125
126
  }
@@ -157,18 +158,18 @@ var TreeClipboard = /** @class */ (function (_super) {
157
158
  var childRecords = 'childRecords';
158
159
  var hasChildRecords = 'hasChildRecords';
159
160
  var uniqueID = 'uniqueID';
160
- if (currentRecords[selectedIndex][hasChildRecords]) {
161
- var childData = currentRecords[selectedIndex][childRecords];
161
+ if (currentRecords[parseInt(selectedIndex.toString(), 10)]["" + hasChildRecords]) {
162
+ var childData = currentRecords[parseInt(selectedIndex.toString(), 10)]["" + childRecords];
162
163
  for (var i = 0; i < childData.length; i++) {
163
164
  for (var j = 0; j < currentRecords.length; j++) {
164
- if (!isNullOrUndefined(childData[i][uniqueID]) && currentRecords[j][uniqueID] === childData[i][uniqueID]) {
165
- if ((!isNullOrUndefined(rows[j])) && !rows[j].classList.contains('e-summaryrow')) {
166
- var cells = [].slice.call(rows[j].querySelectorAll('.e-rowcell'));
167
- var uniqueid = currentRecords[j][uniqueID];
165
+ if (!isNullOrUndefined(childData[parseInt(i.toString(), 10)]["" + uniqueID]) && currentRecords[parseInt(j.toString(), 10)]["" + uniqueID] === childData[parseInt(i.toString(), 10)]["" + uniqueID]) {
166
+ if ((!isNullOrUndefined(rows[parseInt(j.toString(), 10)])) && !rows[parseInt(j.toString(), 10)].classList.contains('e-summaryrow')) {
167
+ var cells = [].slice.call(rows[parseInt(j.toString(), 10)].querySelectorAll('.e-rowcell'));
168
+ var uniqueid = currentRecords[parseInt(j.toString(), 10)]["" + uniqueID];
168
169
  if (this.copiedUniqueIdCollection.indexOf(uniqueid) === -1) {
169
- this[getCopyData](cells, false, '\t', withHeader);
170
- this.treeCopyContent += ('\n' + this[copyContent]);
171
- this[copyContent] = '';
170
+ this["" + getCopyData](cells, false, '\t', withHeader);
171
+ this.treeCopyContent += ('\n' + this["" + copyContent]);
172
+ this["" + copyContent] = '';
172
173
  this.copiedUniqueIdCollection.push(uniqueid);
173
174
  this.childContentData(currentRecords, j, rows, withHeader);
174
175
  }
@@ -101,7 +101,7 @@ var ContextMenu = /** @class */ (function () {
101
101
  if (!isNullOrUndefined(this.parent.rowDragAndDropModule)) {
102
102
  var indentOutdentAction = 'indentOutdentAction';
103
103
  var action = args.item.id === this.parent.element.id + '_gridcontrol_cmenu_Indent' ? 'indent' : 'outdent';
104
- this.parent.rowDragAndDropModule[indentOutdentAction](null, action);
104
+ this.parent.rowDragAndDropModule["" + indentOutdentAction](null, action);
105
105
  }
106
106
  }
107
107
  };