@syncfusion/ej2-treegrid 20.1.55 → 20.1.56-97113

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 (126) hide show
  1. package/.eslintrc.json +16 -1
  2. package/CHANGELOG.md +15 -32
  3. package/README.md +64 -51
  4. package/dist/ej2-treegrid.min.js +1 -0
  5. package/dist/ej2-treegrid.umd.min.js +1 -10
  6. package/dist/ej2-treegrid.umd.min.js.map +1 -1
  7. package/dist/es6/ej2-treegrid.es2015.js +2046 -1076
  8. package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
  9. package/dist/es6/ej2-treegrid.es5.js +2131 -1113
  10. package/dist/es6/ej2-treegrid.es5.js.map +1 -1
  11. package/dist/global/ej2-treegrid.min.js +1 -10
  12. package/dist/global/ej2-treegrid.min.js.map +1 -1
  13. package/dist/global/index.d.ts +0 -9
  14. package/helpers/e2e/index.js +8 -6
  15. package/helpers/e2e/treegridhelper.js +82 -65
  16. package/package.json +64 -64
  17. package/src/treegrid/actions/batch-edit.js +115 -87
  18. package/src/treegrid/actions/clipboard.d.ts +3 -2
  19. package/src/treegrid/actions/clipboard.js +37 -35
  20. package/src/treegrid/actions/context-menu.js +53 -1
  21. package/src/treegrid/actions/crud-actions.js +67 -56
  22. package/src/treegrid/actions/detail-row.js +7 -7
  23. package/src/treegrid/actions/edit.d.ts +1 -0
  24. package/src/treegrid/actions/edit.js +168 -115
  25. package/src/treegrid/actions/excel-export.js +2 -2
  26. package/src/treegrid/actions/filter.js +13 -16
  27. package/src/treegrid/actions/freeze-column.d.ts +1 -0
  28. package/src/treegrid/actions/freeze-column.js +48 -11
  29. package/src/treegrid/actions/infinite-scroll.js +25 -22
  30. package/src/treegrid/actions/logger.js +10 -10
  31. package/src/treegrid/actions/page.d.ts +1 -0
  32. package/src/treegrid/actions/page.js +21 -8
  33. package/src/treegrid/actions/reorder.js +2 -2
  34. package/src/treegrid/actions/rowdragdrop.js +142 -86
  35. package/src/treegrid/actions/selection.d.ts +1 -0
  36. package/src/treegrid/actions/selection.js +71 -39
  37. package/src/treegrid/actions/sort.js +17 -5
  38. package/src/treegrid/actions/summary.js +24 -24
  39. package/src/treegrid/actions/toolbar.js +45 -43
  40. package/src/treegrid/actions/virtual-scroll.js +7 -4
  41. package/src/treegrid/base/constant.d.ts +30 -0
  42. package/src/treegrid/base/constant.js +30 -0
  43. package/src/treegrid/base/data.d.ts +1 -0
  44. package/src/treegrid/base/data.js +257 -57
  45. package/src/treegrid/base/treegrid-model.d.ts +50 -34
  46. package/src/treegrid/base/treegrid.d.ts +57 -35
  47. package/src/treegrid/base/treegrid.js +363 -200
  48. package/src/treegrid/enum.d.ts +8 -2
  49. package/src/treegrid/enum.js +2 -0
  50. package/src/treegrid/models/column.d.ts +6 -6
  51. package/src/treegrid/models/column.js +9 -9
  52. package/src/treegrid/models/index.d.ts +2 -0
  53. package/src/treegrid/models/index.js +1 -0
  54. package/src/treegrid/models/loading-indicator-model.d.ts +20 -0
  55. package/src/treegrid/models/loading-indicator.d.ts +17 -0
  56. package/src/treegrid/models/loading-indicator.js +34 -0
  57. package/src/treegrid/renderer/render.d.ts +4 -4
  58. package/src/treegrid/renderer/render.js +33 -24
  59. package/src/treegrid/renderer/virtual-row-model-generator.js +15 -6
  60. package/src/treegrid/renderer/virtual-tree-content-render.d.ts +5 -2
  61. package/src/treegrid/renderer/virtual-tree-content-render.js +224 -106
  62. package/src/treegrid/renderer/virtual-tree-freeze-render.d.ts +59 -0
  63. package/src/treegrid/renderer/virtual-tree-freeze-render.js +163 -0
  64. package/src/treegrid/utils.js +13 -12
  65. package/styles/bootstrap-dark.css +14 -1
  66. package/styles/bootstrap.css +14 -1
  67. package/styles/bootstrap4.css +14 -1
  68. package/styles/bootstrap5-dark.css +16 -2
  69. package/styles/bootstrap5.css +16 -2
  70. package/styles/fabric-dark.css +14 -1
  71. package/styles/fabric.css +14 -1
  72. package/styles/fluent-dark.css +15 -2
  73. package/styles/fluent.css +15 -2
  74. package/styles/highcontrast-light.css +14 -1
  75. package/styles/highcontrast.css +14 -1
  76. package/styles/material-dark.css +14 -1
  77. package/styles/material.css +14 -1
  78. package/styles/tailwind-dark.css +14 -1
  79. package/styles/tailwind.css +14 -1
  80. package/styles/treegrid/_all.scss +1 -1
  81. package/styles/treegrid/_bootstrap-dark-definition.scss +1 -1
  82. package/styles/treegrid/_bootstrap-definition.scss +1 -2
  83. package/styles/treegrid/_bootstrap4-definition.scss +0 -1
  84. package/styles/treegrid/_bootstrap5-definition.scss +0 -1
  85. package/styles/treegrid/_fabric-dark-definition.scss +1 -2
  86. package/styles/treegrid/_fabric-definition.scss +1 -2
  87. package/styles/treegrid/_fluent-definition.scss +0 -1
  88. package/styles/treegrid/_fusionnew-definition.scss +28 -0
  89. package/styles/treegrid/_highcontrast-definition.scss +0 -1
  90. package/styles/treegrid/_highcontrast-light-definition.scss +0 -2
  91. package/styles/treegrid/_icons.scss +12 -1
  92. package/styles/treegrid/_layout.scss +4 -4
  93. package/styles/treegrid/_material-definition.scss +0 -1
  94. package/styles/treegrid/_material3-definition.scss +28 -0
  95. package/styles/treegrid/_tailwind-definition.scss +0 -1
  96. package/styles/treegrid/_theme.scss +1 -0
  97. package/styles/treegrid/bootstrap-dark.css +14 -1
  98. package/styles/treegrid/bootstrap.css +14 -1
  99. package/styles/treegrid/bootstrap4.css +14 -1
  100. package/styles/treegrid/bootstrap5-dark.css +16 -2
  101. package/styles/treegrid/bootstrap5.css +16 -2
  102. package/styles/treegrid/fabric-dark.css +14 -1
  103. package/styles/treegrid/fabric.css +14 -1
  104. package/styles/treegrid/fluent-dark.css +15 -2
  105. package/styles/treegrid/fluent.css +15 -2
  106. package/styles/treegrid/highcontrast-light.css +14 -1
  107. package/styles/treegrid/highcontrast.css +14 -1
  108. package/styles/treegrid/icons/_bootstrap-dark.scss +12 -1
  109. package/styles/treegrid/icons/_bootstrap.scss +12 -1
  110. package/styles/treegrid/icons/_bootstrap4.scss +12 -1
  111. package/styles/treegrid/icons/_bootstrap5.scss +11 -0
  112. package/styles/treegrid/icons/_fabric-dark.scss +12 -1
  113. package/styles/treegrid/icons/_fabric.scss +12 -1
  114. package/styles/treegrid/icons/_fluent.scss +11 -0
  115. package/styles/treegrid/icons/_fusionnew.scss +26 -0
  116. package/styles/treegrid/icons/_highcontrast-light.scss +12 -1
  117. package/styles/treegrid/icons/_highcontrast.scss +11 -0
  118. package/styles/treegrid/icons/_material-dark.scss +12 -1
  119. package/styles/treegrid/icons/_material.scss +11 -0
  120. package/styles/treegrid/icons/_material3.scss +26 -0
  121. package/styles/treegrid/icons/_tailwind-dark.scss +11 -0
  122. package/styles/treegrid/icons/_tailwind.scss +11 -0
  123. package/styles/treegrid/material-dark.css +14 -1
  124. package/styles/treegrid/material.css +14 -1
  125. package/styles/treegrid/tailwind-dark.css +14 -1
  126. package/styles/treegrid/tailwind.css +14 -1
@@ -13,6 +13,7 @@ var __extends = (this && this.__extends) || (function () {
13
13
  })();
14
14
  import { Cell, CellType } from '@syncfusion/ej2-grids';
15
15
  import { VirtualContentRenderer } from '@syncfusion/ej2-grids';
16
+ import * as literals from '../base/constant';
16
17
  import { InterSectionObserver } from '@syncfusion/ej2-grids';
17
18
  import { TreeVirtualRowModelGenerator } from '../renderer/virtual-row-model-generator';
18
19
  import * as events from '../base/constant';
@@ -41,7 +42,31 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
41
42
  return new TreeVirtualRowModelGenerator(this.parent);
42
43
  };
43
44
  VirtualTreeContentRenderer.prototype.getRowByIndex = function (index) {
44
- return this.parent.getDataRows().filter(function (e) { return parseInt(e.getAttribute('aria-rowindex'), 10) === index; })[0];
45
+ return this.parent.getDataRows().filter(function (e) { return parseInt(e.getAttribute('data-rowindex'), 10) === index; })[0];
46
+ };
47
+ VirtualTreeContentRenderer.prototype.getMovableVirtualRowByIndex = function (index) {
48
+ return this.getRowCollection(index, true);
49
+ };
50
+ VirtualTreeContentRenderer.prototype.getFrozenRightVirtualRowByIndex = function (index) {
51
+ return this.getRowCollection(index, false, false, true);
52
+ };
53
+ VirtualTreeContentRenderer.prototype.getRowCollection = function (index, isMovable, isRowObject, isFrozenRight) {
54
+ var startIdx = parseInt(this.parent.getRows()[0].getAttribute(literals.dataRowIndex), 10);
55
+ var rowCollection = isMovable ? this.parent.getMovableDataRows() : this.parent.getDataRows();
56
+ rowCollection = isFrozenRight ? this.parent.getFrozenRightDataRows() : rowCollection;
57
+ var collection = isRowObject ? this.parent.getCurrentViewRecords() : rowCollection;
58
+ var selectedRow = collection[index - startIdx];
59
+ if (this.parent.frozenRows && this.parent.pageSettings.currentPage > 1) {
60
+ if (!isRowObject) {
61
+ selectedRow = index <= this.parent.frozenRows ? rowCollection[parseInt(index.toString(), 10)]
62
+ : rowCollection[(index - startIdx) + this.parent.frozenRows];
63
+ }
64
+ else {
65
+ selectedRow = index <= this.parent.frozenRows ?
66
+ this.parent.getRowsObject()[parseInt(index.toString(), 10)].data : selectedRow;
67
+ }
68
+ }
69
+ return selectedRow;
45
70
  };
46
71
  VirtualTreeContentRenderer.prototype.addEventListener = function () {
47
72
  this.parent.on(events.virtualActionArgs, this.virtualOtherAction, this);
@@ -70,7 +95,7 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
70
95
  this.startIndex = lastIndex - this.parent.getRows().length;
71
96
  this.endIndex = lastIndex;
72
97
  }
73
- else {
98
+ else if (this.parent.root.editSettings.newRowPosition !== 'Top' && this.parent.root.editModule.selectedIndex !== -1 || this.parent.root.editModule.selectedIndex !== -1) {
74
99
  this.startIndex += 1;
75
100
  this.endIndex += 1;
76
101
  }
@@ -87,26 +112,26 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
87
112
  var _this = this;
88
113
  if (!(this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
89
114
  && this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || !isCountRequired(this.parent)) {
90
- this.parent[action]('data-ready', this.onDataReady, this);
91
- this.parent[action]('refresh-virtual-block', this.refreshContentRows, this);
115
+ this.parent["" + action]('data-ready', this.onDataReady, this);
116
+ this.parent["" + action]('refresh-virtual-block', this.refreshContentRows, this);
92
117
  this.fn = function () {
93
- _this.observers.observes(function (scrollArgs) { return _this.scrollListeners(scrollArgs); }, _this.onEnteredAction());
118
+ _this.observers.observes(function (scrollArgs) { return _this.scrollListeners(scrollArgs); }, _this.onEnteredAction(), _this.parent);
94
119
  _this.parent.off('content-ready', _this.fn);
95
120
  };
96
121
  this.parent.addEventListener('dataBound', this.dataBoundEvent.bind(this));
97
122
  this.parent.addEventListener('rowSelected', this.rowSelectedEvent.bind(this));
98
- this.parent[action]('select-virtual-Row', this.toSelectVirtualRow, this);
123
+ this.parent["" + action]('select-virtual-Row', this.toSelectVirtualRow, this);
99
124
  this.parent.on('content-ready', this.fn, this);
100
125
  this.parent.addEventListener(events.actionComplete, this.onActionComplete.bind(this));
101
- this.parent[action]('virtual-scroll-edit-action-begin', this.beginEdit, this);
102
- this.parent[action]('virtual-scroll-add-action-begin', this.beginAdd, this);
103
- this.parent[action]('virtual-scroll-edit-success', this.virtualEditSuccess, this);
104
- this.parent[action]('edit-reset', this.resetIseditValue, this);
105
- this.parent[action]('get-virtual-data', this.getData, this);
106
- this.parent[action]('virtual-scroll-edit-cancel', this.cancelEdit, this);
107
- this.parent[action]('select-row-on-context-open', this.toSelectRowOnContextOpen, this);
108
- this.parent[action]('refresh-virtual-editform-cells', this.refreshCell, this);
109
- this.parent[action]('virtaul-cell-focus', this.cellFocus, this);
126
+ this.parent["" + action]('virtual-scroll-edit-action-begin', this.beginEdit, this);
127
+ this.parent["" + action]('virtual-scroll-add-action-begin', this.beginAdd, this);
128
+ this.parent["" + action]('virtual-scroll-edit-success', this.virtualEditSuccess, this);
129
+ this.parent["" + action]('edit-reset', this.resetIseditValue, this);
130
+ this.parent["" + action]('get-virtual-data', this.getData, this);
131
+ this.parent["" + action]('virtual-scroll-edit-cancel', this.cancelEdit, this);
132
+ this.parent["" + action]('select-row-on-context-open', this.toSelectRowOnContextOpen, this);
133
+ this.parent["" + action]('refresh-virtual-editform-cells', this.refreshCell, this);
134
+ this.parent["" + action]('virtaul-cell-focus', this.cellFocus, this);
110
135
  }
111
136
  else {
112
137
  _super.prototype.eventListener.call(this, 'on');
@@ -114,7 +139,7 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
114
139
  };
115
140
  VirtualTreeContentRenderer.prototype.cellFocus = function (e) {
116
141
  var virtualCellFocus = 'virtualCellFocus';
117
- _super.prototype[virtualCellFocus].call(this, e);
142
+ _super.prototype["" + virtualCellFocus].call(this, e);
118
143
  };
119
144
  VirtualTreeContentRenderer.prototype.onDataReady = function (e) {
120
145
  _super.prototype.onDataReady.call(this, e);
@@ -122,11 +147,19 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
122
147
  && this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || !isCountRequired(this.parent)) {
123
148
  if (!isNullOrUndefined(e.count)) {
124
149
  this.totalRecords = e.count;
125
- if (!this.parent.enableColumnVirtualization) {
150
+ // To overcome the white space issue in last page when records collapsed
151
+ if (this.parent.isFrozenGrid() && e.count < Object.keys(this.parent.dataSource).length) {
152
+ var width = this.parent.enableColumnVirtualization ?
153
+ this.getColumnOffset(this.parent.columns.length - 1) + 'px' : '100%';
154
+ var height = (this.parent.getRowHeight() * e.count) -
155
+ (this.parent.getRowHeight() * this.parent.pageSettings.pageSize);
156
+ getValue('virtualEle', this).setVirtualHeight(height, width);
157
+ }
158
+ if (!this.parent.enableColumnVirtualization && !this.parent.isFrozenGrid()) {
126
159
  getValue('virtualEle', this).setVirtualHeight(this.parent.getRowHeight() * e.count, '100%');
127
160
  }
128
161
  }
129
- if ((!isNullOrUndefined(e.requestType) && e.requestType.toString() === 'collapseAll') || (this.isDataSourceChanged && this.startIndex === -1)) {
162
+ if ((!isNullOrUndefined(e.requestType) && e.requestType.toString() === 'collapseAll') || (this.isDataSourceChanged && (this.startIndex === -1 || this.startIndex === 0 && this['preStartIndex'] === 0))) {
130
163
  this.contents.scrollTop = 0;
131
164
  this.isDataSourceChanged = false;
132
165
  }
@@ -160,22 +193,22 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
160
193
  VirtualTreeContentRenderer.prototype.dataBoundEvent = function () {
161
194
  var dataBoundEve = 'dataBound';
162
195
  var initialRowTop = 'initialRowTop';
163
- if (this.parent.getRows().length && !this[initialRowTop] && !isNullOrUndefined(this.parent.getRowByIndex(0))) {
196
+ if (!isNullOrUndefined(this.parent.getRowByIndex(0)) && this.parent.getRows().length && !this["" + initialRowTop]) {
164
197
  var rowTop = this.parent.getRowByIndex(0).getBoundingClientRect().top;
165
198
  var gridTop = this.parent.element.getBoundingClientRect().top;
166
199
  if (rowTop > 0) {
167
- this[initialRowTop] = this.parent.getRowByIndex(0).getBoundingClientRect().top - gridTop;
200
+ this["" + initialRowTop] = this.parent.getRowByIndex(0).getBoundingClientRect().top - gridTop;
168
201
  }
169
202
  else {
170
- this[initialRowTop] = this.content.getBoundingClientRect().top -
203
+ this["" + initialRowTop] = this.content.getBoundingClientRect().top -
171
204
  this.parent.getRowByIndex(0).getBoundingClientRect().height;
172
205
  }
173
206
  }
174
- _super.prototype[dataBoundEve].call(this);
207
+ _super.prototype["" + dataBoundEve].call(this);
175
208
  };
176
209
  VirtualTreeContentRenderer.prototype.rowSelectedEvent = function (args) {
177
210
  var rowSelected = 'rowSelected';
178
- _super.prototype[rowSelected].call(this, args);
211
+ _super.prototype["" + rowSelected].call(this, args);
179
212
  };
180
213
  VirtualTreeContentRenderer.prototype.toSelectVirtualRow = function (args) {
181
214
  if (this.parent.isEdit) {
@@ -183,12 +216,12 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
183
216
  }
184
217
  var selectVirtualRow = 'selectVirtualRow';
185
218
  var containerRect = 'containerRect';
186
- if (isNullOrUndefined(this.observer[containerRect])) {
187
- this.observer[containerRect] = this.observers[containerRect];
219
+ if (isNullOrUndefined(this.observer["" + containerRect])) {
220
+ this.observer["" + containerRect] = this.observers["" + containerRect];
188
221
  }
189
222
  if (isNullOrUndefined(this.parent['clipboardModule'].treeGridParent.editModule) || args.selectedIndex !== 0 ||
190
223
  isNullOrUndefined(this.parent['clipboardModule'].treeGridParent.editModule['addRowIndex'])) {
191
- _super.prototype[selectVirtualRow].call(this, args);
224
+ _super.prototype["" + selectVirtualRow].call(this, args);
192
225
  }
193
226
  };
194
227
  VirtualTreeContentRenderer.prototype.refreshCell = function (rowObj) {
@@ -197,7 +230,7 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
197
230
  VirtualTreeContentRenderer.prototype.generateCells = function () {
198
231
  var cells = [];
199
232
  for (var i = 0; i < this.parent.columns.length; i++) {
200
- cells.push(this.generateCell(this.parent.columns[i]));
233
+ cells.push(this.generateCell(this.parent.columns[parseInt(i.toString(), 10)]));
201
234
  }
202
235
  return cells;
203
236
  };
@@ -220,90 +253,99 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
220
253
  return new Cell(opt);
221
254
  };
222
255
  VirtualTreeContentRenderer.prototype.beginEdit = function (e) {
223
- var selector = '.e-row[aria-rowindex="' + e.index + '"]';
256
+ this['editedRowIndex'] = e.index;
257
+ var selector = '.e-row[data-rowindex="' + e.index + '"]';
224
258
  var index = this.parent.getContent().querySelector(selector).rowIndex;
225
- var rowData = this.parent.getCurrentViewRecords()[index];
259
+ var rowData = this.parent.getCurrentViewRecords()[parseInt(index.toString(), 10)];
226
260
  e.data = rowData;
227
261
  };
228
262
  VirtualTreeContentRenderer.prototype.beginAdd = function (args) {
229
263
  var addAction = 'addActionBegin';
230
264
  var isAdd = 'isAdd';
231
- var addArgs = { newRowPosition: this.rowPosition, addRowIndex: this.addRowIndex, ariaRowIndex: this.ariaRowIndex };
265
+ var addArgs = { newRowPosition: this.rowPosition, addRowIndex: this.addRowIndex, dataRowIndex: this.dataRowIndex };
232
266
  this.parent.notify('get-row-position', addArgs);
233
267
  this.rowPosition = addArgs.newRowPosition;
234
268
  this.addRowIndex = addArgs.addRowIndex;
235
- this.ariaRowIndex = addArgs.ariaRowIndex;
269
+ this.dataRowIndex = addArgs.dataRowIndex;
236
270
  var rows = this.parent.getRows();
237
- var firstAriaIndex = rows.length ? +rows[0].getAttribute('aria-rowindex') : 0;
238
- var lastAriaIndex = rows.length ? +rows[rows.length - 1].getAttribute('aria-rowindex') : 0;
271
+ var firstAriaIndex = rows.length ? +rows[0].getAttribute('data-rowindex') : 0;
272
+ var lastAriaIndex = rows.length ? +rows[rows.length - 1].getAttribute('data-rowindex') : 0;
239
273
  var withInRange = this.parent.selectedRowIndex >= firstAriaIndex && this.parent.selectedRowIndex <= lastAriaIndex;
240
274
  if (!(this.rowPosition === 'Top' || this.rowPosition === 'Bottom')) {
241
- this[isAdd] = true;
275
+ this["" + isAdd] = true;
242
276
  }
243
277
  if (this.rowPosition === 'Top' || this.rowPosition === 'Bottom' ||
244
278
  ((!this.addRowIndex || this.addRowIndex === -1) && (this.parent.selectedRowIndex === -1 || !withInRange))) {
245
- _super.prototype[addAction].call(this, args);
279
+ _super.prototype["" + addAction].call(this, args);
246
280
  }
247
281
  };
248
282
  VirtualTreeContentRenderer.prototype.restoreEditState = function () {
249
283
  var restoreEdit = 'restoreEdit';
250
- _super.prototype[restoreEdit].call(this);
284
+ _super.prototype["" + restoreEdit].call(this);
251
285
  };
252
286
  VirtualTreeContentRenderer.prototype.resetIseditValue = function () {
253
287
  var resetIsEdit = 'resetIsedit';
254
288
  var isAdd = 'isAdd';
255
289
  this.parent.notify('reset-edit-props', {});
256
- if ((this.rowPosition === 'Top' || this.rowPosition === 'Bottom') && this[isAdd]) {
257
- _super.prototype[resetIsEdit].call(this);
290
+ if ((this.rowPosition === 'Top' || this.rowPosition === 'Bottom') && this["" + isAdd]) {
291
+ _super.prototype["" + resetIsEdit].call(this);
258
292
  }
259
293
  };
260
294
  VirtualTreeContentRenderer.prototype.virtualEditSuccess = function () {
261
295
  var isAdd = 'isAdd';
262
296
  var content = this.parent.getContent().querySelector('.e-content');
263
- if (this[isAdd] && content.querySelector('.e-addedrow')) {
297
+ if (this["" + isAdd] && content.querySelector('.e-addedrow')) {
264
298
  this.recordAdded = true;
265
299
  }
266
300
  };
267
301
  VirtualTreeContentRenderer.prototype.cancelEdit = function (args) {
268
302
  var editCancel = 'editCancel';
269
- _super.prototype[editCancel].call(this, args);
303
+ _super.prototype["" + editCancel].call(this, args);
270
304
  };
271
305
  VirtualTreeContentRenderer.prototype.toSelectRowOnContextOpen = function (args) {
272
306
  var selectRowOnContextOpen = 'selectRowOnContextOpen';
273
- _super.prototype[selectRowOnContextOpen].call(this, args);
307
+ _super.prototype["" + selectRowOnContextOpen].call(this, args);
274
308
  };
275
309
  VirtualTreeContentRenderer.prototype.restoreNewRow = function () {
276
310
  var isAdd = 'isAdd';
277
311
  var content = this.parent.getContent().querySelector('.e-content');
278
- if (this[isAdd] && !content.querySelector('.e-addedrow')) {
312
+ if (this["" + isAdd] && !content.querySelector('.e-addedrow')) {
279
313
  this.parent.isEdit = false;
280
- this.parent.addRecord();
314
+ this.parent.editModule.addRecord(null, this.parent.root.editModule.selectedIndex);
281
315
  }
282
316
  };
283
317
  VirtualTreeContentRenderer.prototype.getData = function (data) {
284
318
  var getVirtualData = 'getVirtualData';
285
- _super.prototype[getVirtualData].call(this, data);
319
+ _super.prototype["" + getVirtualData].call(this, data);
286
320
  };
287
321
  VirtualTreeContentRenderer.prototype.onActionComplete = function (args) {
288
322
  if (args.requestType === 'add') {
289
- var addArgs = { newRowPosition: this.rowPosition, addRowIndex: this.addRowIndex, ariaRowIndex: this.ariaRowIndex };
323
+ var addArgs = { newRowPosition: this.rowPosition, addRowIndex: this.addRowIndex, dataRowIndex: this.dataRowIndex };
290
324
  this.parent.notify('get-row-position', addArgs);
291
325
  this.rowPosition = addArgs.newRowPosition;
292
326
  this.addRowIndex = addArgs.addRowIndex;
293
- this.ariaRowIndex = addArgs.ariaRowIndex;
327
+ this.dataRowIndex = this.parent.root.editModule.selectedIndex;
294
328
  }
295
329
  var actionComplete = 'actionComplete';
296
- _super.prototype[actionComplete].call(this, args);
330
+ _super.prototype["" + actionComplete].call(this, args);
297
331
  };
298
332
  VirtualTreeContentRenderer.prototype.onEnteredAction = function () {
299
333
  var _this = this;
300
334
  return function (element, current, direction, e, isWheel, check) {
301
335
  var directVirtualRender = 'directVirtualRender';
302
- if (!_this.parent[directVirtualRender]) { // with this property, columns are rendered without debouncing on horizontal scroll.
336
+ if (!_this.parent["" + directVirtualRender]) { // with this property, columns are rendered without debouncing on horizontal scroll.
303
337
  var preventEvent = 'preventEvent';
304
- if (Browser.isIE && !isWheel && check && !_this[preventEvent]) {
338
+ if (Browser.isIE && !isWheel && check && !_this["" + preventEvent] && !_this.parent.enableVirtualMaskRow) {
305
339
  _this.parent.showSpinner();
306
340
  }
341
+ if (_this.parent.enableVirtualMaskRow && !_this["" + preventEvent]) {
342
+ setTimeout(function () {
343
+ _this.parent.showMaskRow(current.axis);
344
+ _this.parent.notify('showGanttShimmer', { requestType: 'showShimmer' });
345
+ }, 0);
346
+ }
347
+ var height = _this.content.getBoundingClientRect().height;
348
+ var top_1 = _this.prevInfo.offsets ? _this.prevInfo.offsets.top : null;
307
349
  var xAxis = current.axis === 'X';
308
350
  var x = _this.getColumnOffset(xAxis ? _this.vgenerator.getColumnIndexes()[0] - 1 : _this.prevInfo.columnIndexes[0]
309
351
  - 1);
@@ -312,30 +354,44 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
312
354
  var maxLeft = _this.vgenerator.cOffsets[idx - 1];
313
355
  x = x > maxLeft ? maxLeft : x; //TODO: This fix horizontal scrollbar jumping issue in column virtualization.
314
356
  }
315
- _this.virtualEle.adjustTable(x, _this.translateY);
316
- if (_this.parent.enableColumnVirtualization) {
317
- _this.header.virtualEle.adjustTable(x, 0);
357
+ var y = _this.getTranslateY(e.top, height, xAxis && top_1 === e.top ? _this.prevInfo : undefined, true);
358
+ if (!_this.parent.isFrozenGrid() || _this.parent.enableVirtualMaskRow) {
359
+ if (_this.parent.enableVirtualMaskRow) {
360
+ var upScroll = (e.top - _this.translateY) < 0;
361
+ y = (Math.round(_this.translateY) > y && !upScroll) ? Math.round(_this.translateY) : y;
362
+ _this.virtualEle.adjustTable(x, y);
363
+ }
364
+ else {
365
+ _this.virtualEle.adjustTable(x, _this.translateY);
366
+ }
367
+ if (_this.parent.enableColumnVirtualization) {
368
+ _this.header.virtualEle.adjustTable(x, 0);
369
+ }
318
370
  }
319
371
  }
320
372
  };
321
373
  };
322
374
  VirtualTreeContentRenderer.prototype.scrollListeners = function (scrollArgs) {
375
+ this['scrollAfterEdit']();
323
376
  var info = scrollArgs.sentinel;
377
+ var rowHeight = this.parent.getRowHeight();
324
378
  var outBuffer = this.parent.pageSettings.pageSize - Math.ceil(this.parent.pageSettings.pageSize / 2);
325
379
  var content = this.parent.getContent().querySelector('.e-content');
326
- var scrollHeight = outBuffer * this.parent.getRowHeight();
380
+ var scrollHeight = outBuffer * rowHeight;
327
381
  var upScroll = (scrollArgs.offset.top - this.translateY) < 0;
328
- var downScroll = Math.ceil(scrollArgs.offset.top - this.translateY) >= scrollHeight;
382
+ var downScroll = Math.ceil(scrollArgs.offset.top - this.translateY) + rowHeight >= scrollHeight;
329
383
  var selectedRowIndex = 'selectedRowIndex';
384
+ var currentViewData = this.parent.currentViewData;
385
+ var indexValue = 'index';
330
386
  if (upScroll && (scrollArgs.direction !== 'right' && scrollArgs.direction !== 'left')) {
331
387
  var vHeight = +(this.parent.height.toString().indexOf('%') < 0 ? this.parent.height :
332
388
  this.parent.element.getBoundingClientRect().height);
333
- var index = (~~(content.scrollTop / this.parent.getRowHeight())
334
- + Math.ceil(vHeight / this.parent.getRowHeight()))
389
+ var index = (~~(content.scrollTop / rowHeight)
390
+ + Math.ceil(vHeight / rowHeight))
335
391
  - this.parent.pageSettings.pageSize;
336
392
  index = (index > 0) ? index : 0;
337
- if (!isNullOrUndefined(this[selectedRowIndex]) && this[selectedRowIndex] !== -1 && index !== this[selectedRowIndex]) {
338
- index = this[selectedRowIndex];
393
+ if (!isNullOrUndefined(this["" + selectedRowIndex]) && this["" + selectedRowIndex] !== -1 && index !== this["" + selectedRowIndex]) {
394
+ index = this["" + selectedRowIndex];
339
395
  }
340
396
  this.startIndex = index;
341
397
  this.endIndex = index + this.parent.pageSettings.pageSize;
@@ -345,31 +401,40 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
345
401
  this.endIndex = lastInx;
346
402
  this.startIndex = (this.startIndex - remains) < 0 ? 0 : (this.startIndex - remains);
347
403
  }
404
+ if (currentViewData.length && (currentViewData[0]["" + indexValue] >= this.parent.pageSettings.pageSize / 2) &&
405
+ ((currentViewData[0]["" + indexValue] - this.startIndex) < (this.parent.pageSettings.pageSize / 2))) {
406
+ this.startIndex = currentViewData[0]["" + indexValue] - (this.parent.pageSettings.pageSize / 2);
407
+ this.endIndex = this.startIndex + this.parent.pageSettings.pageSize;
408
+ }
348
409
  //var firsttdinx = parseInt(this.parent.getContent().querySelector('.e-content td').getAttribute('index'), 0);
349
- var rowPt = Math.ceil(scrollArgs.offset.top / this.parent.getRowHeight());
410
+ var rowPt = Math.ceil(scrollArgs.offset.top / rowHeight);
350
411
  rowPt = rowPt % this.parent.pageSettings.pageSize;
351
412
  var firsttdinx = 0;
352
- if (!isNullOrUndefined(this.parent.getRows()[rowPt]) &&
353
- !isNullOrUndefined(this.parent.getContent().querySelectorAll('.e-content tr')[rowPt])) {
354
- var attr = this.parent.getContent().querySelectorAll('.e-content tr')[rowPt]
413
+ if (!isNullOrUndefined(this.parent.getRows()[parseInt(rowPt.toString(), 10)]) &&
414
+ !isNullOrUndefined(this.parent.getContent().querySelectorAll('.e-content tr')[parseInt(rowPt.toString(), 10)])) {
415
+ var attr = this.parent.getContent().querySelectorAll('.e-content tr')[parseInt(rowPt.toString(), 10)]
355
416
  .querySelector('td').getAttribute('index');
356
- firsttdinx = +attr; // this.parent.getContent().querySelector('.e-content tr').getAttribute('aria-rowindex');
417
+ firsttdinx = +attr; // this.parent.getContent().querySelector('.e-content tr').getAttribute('data-rowindex');
357
418
  }
358
419
  if (firsttdinx === 0) {
359
- this.translateY = scrollArgs.offset.top;
420
+ if (this.parent.allowRowDragAndDrop) {
421
+ this.translateY = scrollArgs.offset.top - rowHeight * 2;
422
+ }
423
+ else {
424
+ this.translateY = scrollArgs.offset.top;
425
+ }
360
426
  }
361
427
  else {
362
- var height = this.parent.getRowHeight();
363
- this.translateY = (scrollArgs.offset.top - (outBuffer * height) > 0) ?
364
- scrollArgs.offset.top - (outBuffer * height) + 10 : 0;
428
+ this.translateY = (scrollArgs.offset.top - (outBuffer * rowHeight) > 0) ?
429
+ scrollArgs.offset.top - (outBuffer * rowHeight) + 10 : 0;
365
430
  }
366
431
  }
367
432
  else if (downScroll && (scrollArgs.direction !== 'right' && scrollArgs.direction !== 'left')) {
368
- var nextSetResIndex = ~~(content.scrollTop / this.parent.getRowHeight());
369
- var isLastBlock = (this[selectedRowIndex] + this.parent.pageSettings.pageSize) < this.totalRecords ? false : true;
370
- if (!isNullOrUndefined(this[selectedRowIndex]) && this[selectedRowIndex] !== -1 &&
371
- nextSetResIndex !== this[selectedRowIndex] && !isLastBlock) {
372
- nextSetResIndex = this[selectedRowIndex];
433
+ var nextSetResIndex = ~~(content.scrollTop / rowHeight);
434
+ var isLastBlock = (this["" + selectedRowIndex] + this.parent.pageSettings.pageSize) < this.totalRecords ? false : true;
435
+ if (!isNullOrUndefined(this["" + selectedRowIndex]) && this["" + selectedRowIndex] !== -1 &&
436
+ nextSetResIndex !== this["" + selectedRowIndex] && !isLastBlock) {
437
+ nextSetResIndex = this["" + selectedRowIndex];
373
438
  }
374
439
  var lastIndex = nextSetResIndex + this.parent.pageSettings.pageSize;
375
440
  if (lastIndex > this.totalRecords) {
@@ -378,33 +443,73 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
378
443
  }
379
444
  this.startIndex = !isLastBlock ? lastIndex - this.parent.pageSettings.pageSize : nextSetResIndex;
380
445
  this.endIndex = lastIndex;
381
- if (scrollArgs.offset.top > (this.parent.getRowHeight() * this.totalRecords)) {
446
+ if (currentViewData.length && this.startIndex > currentViewData[0]["" + indexValue] &&
447
+ ((this.startIndex - currentViewData[0]["" + indexValue]) < (this.parent.pageSettings.pageSize / 2))) {
448
+ this.startIndex = currentViewData[0]["" + indexValue] + (this.parent.pageSettings.pageSize / 2);
449
+ }
450
+ if (scrollArgs.offset.top > (rowHeight * this.totalRecords)) {
382
451
  this.translateY = this.getTranslateY(scrollArgs.offset.top, content.getBoundingClientRect().height);
383
452
  }
384
453
  else {
385
- this.translateY = scrollArgs.offset.top;
454
+ if (this.parent.allowRowDragAndDrop) {
455
+ this.translateY = scrollArgs.offset.top - rowHeight * 2;
456
+ }
457
+ else {
458
+ this.translateY = scrollArgs.offset.top;
459
+ }
386
460
  }
387
461
  }
388
- if (((downScroll && (scrollArgs.offset.top < (this.parent.getRowHeight() * this.totalRecords)))
389
- || (upScroll)) || (scrollArgs.direction === 'right' || scrollArgs.direction === 'left')) {
462
+ if (((downScroll && (scrollArgs.offset.top < (rowHeight * this.totalRecords)))
463
+ || (upScroll)) || (scrollArgs.direction === 'right' || scrollArgs.direction === 'left') ||
464
+ ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
465
+ && !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') && (downScroll || upScroll) || isCountRequired(this.parent))) {
390
466
  var viewInfo = this.currentInfo = getValue('getInfoFromView', this).apply(this, [scrollArgs.direction, info, scrollArgs.offset]);
391
467
  this.previousInfo = viewInfo;
392
468
  this.parent.setColumnIndexesInView(this.parent.enableColumnVirtualization ? viewInfo.columnIndexes : []);
393
469
  var page = viewInfo.loadNext && !viewInfo.loadSelf ? viewInfo.nextInfo.page : viewInfo.page;
394
470
  this.parent.setProperties({ pageSettings: { currentPage: page } }, true);
471
+ this.requestType = 'virtualscroll';
395
472
  if (scrollArgs.direction !== 'right' && scrollArgs.direction !== 'left') {
396
473
  viewInfo.event = viewInfo.event === 'refresh-virtual-block' ? 'model-changed' : viewInfo.event;
397
474
  }
475
+ if (this.parent.enableVirtualMaskRow) {
476
+ this.parent.showMaskRow(info.axis);
477
+ this.parent.addShimmerEffect();
478
+ this.parent.notify('showGanttShimmer', { requestType: 'showShimmer' });
479
+ }
398
480
  this.parent.notify(viewInfo.event, { requestType: 'virtualscroll', virtualInfo: viewInfo, focusElement: scrollArgs.focusElement });
399
481
  }
482
+ else {
483
+ if (this.parent.enableVirtualMaskRow) {
484
+ this.parent.removeMaskRow();
485
+ this.parent.notify('removeGanttShimmer', { requestType: 'hideShimmer' });
486
+ }
487
+ }
400
488
  };
401
489
  VirtualTreeContentRenderer.prototype.appendContent = function (target, newChild, e) {
490
+ var isFrozen = this.parent.isFrozenGrid();
402
491
  if ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
403
- && !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)) {
492
+ && !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent) || this.parent.isFrozenGrid()) {
404
493
  if (getValue('isExpandCollapse', e)) {
405
494
  this.isRemoteExpand = true;
406
495
  }
496
+ if (isFrozen && ((isNullOrUndefined(this.requestType) && getValue('requestTypes', this).indexOf('isFrozen') === -1) ||
497
+ (this.parent.enableVirtualMaskRow && this.requestType === 'virtualscroll'))) {
498
+ getValue('requestTypes', this).push('isFrozen');
499
+ this.requestType = 'isFrozen';
500
+ }
407
501
  _super.prototype.appendContent.call(this, target, newChild, e);
502
+ if (getValue('requestTypes', this).indexOf('isFrozen') !== -1) {
503
+ getValue('requestTypes', this).splice(getValue('requestTypes', this).indexOf('isFrozen'), 1);
504
+ this.requestType = this.requestType === 'isFrozen' ? undefined : this.requestType;
505
+ }
506
+ if (isFrozen && (!this.isExpandCollapse || this.translateY === 0)) {
507
+ this.translateY = this.translateY < 0 ? 0 : this.translateY;
508
+ getValue('virtualEle', this).adjustTable(0, this.translateY);
509
+ }
510
+ else {
511
+ this.isExpandCollapse = false;
512
+ }
408
513
  }
409
514
  else {
410
515
  var info = e.virtualInfo.sentinelInfo && e.virtualInfo.sentinelInfo.axis === 'Y' &&
@@ -423,7 +528,7 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
423
528
  target = this.parent.createElement('tbody');
424
529
  target.appendChild(newChild);
425
530
  var replace = 'replaceWith';
426
- this.getTable().querySelector('tbody')[replace](target);
531
+ this.getTable().querySelector('tbody')["" + replace](target);
427
532
  if (!this.isExpandCollapse || this.translateY === 0) {
428
533
  this.translateY = this.translateY < 0 ? 0 : this.translateY;
429
534
  getValue('virtualEle', this).adjustTable(cOffset, this.translateY);
@@ -438,22 +543,22 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
438
543
  var focusCell = 'focusCell';
439
544
  var restoreAdd = 'restoreAdd';
440
545
  var ensureSelectedRowPosition = 'ensureSelectedRowPosition';
441
- _super.prototype[focusCell].call(this, e);
546
+ _super.prototype["" + focusCell].call(this, e);
442
547
  var isAdd = 'isAdd';
443
- if (this[isAdd] && !this.parent.getContent().querySelector('.e-content').querySelector('.e-addedrow')) {
548
+ if (this["" + isAdd] && !this.parent.getContent().querySelector('.e-content').querySelector('.e-addedrow')) {
444
549
  if (!(this.rowPosition === 'Top' || this.rowPosition === 'Bottom')) {
445
- if (this.ariaRowIndex >= this.startIndex) {
550
+ if (this.dataRowIndex >= this.startIndex) {
446
551
  this.restoreNewRow();
447
552
  }
448
553
  else if (this.addRowIndex && this.addRowIndex > -1) {
449
- this[isAdd] = false;
554
+ this["" + isAdd] = false;
450
555
  this.parent.isEdit = false;
451
556
  }
452
557
  }
453
558
  }
454
559
  this.restoreEditState();
455
- _super.prototype[restoreAdd].call(this);
456
- _super.prototype[ensureSelectedRowPosition].call(this);
560
+ _super.prototype["" + restoreAdd].call(this);
561
+ _super.prototype["" + ensureSelectedRowPosition].call(this);
457
562
  }
458
563
  };
459
564
  VirtualTreeContentRenderer.prototype.removeEventListener = function () {
@@ -490,15 +595,20 @@ var TreeInterSectionObserver = /** @class */ (function (_super) {
490
595
  _this.timer = 0;
491
596
  return _this;
492
597
  }
493
- TreeInterSectionObserver.prototype.observes = function (callback, onEnterCallback) {
598
+ TreeInterSectionObserver.prototype.observes = function (callback, onEnterCallback, instance) {
494
599
  var containerRect = 'containerRect';
495
- _super.prototype[containerRect] = getValue('options', this).container.getBoundingClientRect();
496
- EventHandler.add(getValue('options', this).container, 'scroll', this.virtualScrollHandlers(callback, onEnterCallback), this);
600
+ _super.prototype["" + containerRect] = getValue('options', this).container.getBoundingClientRect();
601
+ EventHandler.add(getValue('options', this).container, 'scroll', this.virtualScrollHandlers(callback, onEnterCallback, instance), this);
602
+ if (getValue('options', this).movableContainer) {
603
+ var movableContainerRect = 'movableContainerRect';
604
+ _super.prototype["" + movableContainerRect] = getValue('options', this).movableContainer.getBoundingClientRect();
605
+ EventHandler.add(getValue('options', this).movableContainer, 'scroll', this.virtualScrollHandlers(callback, onEnterCallback, instance), this);
606
+ }
497
607
  };
498
608
  TreeInterSectionObserver.prototype.clear = function () {
499
609
  this.lastPos = null;
500
610
  };
501
- TreeInterSectionObserver.prototype.virtualScrollHandlers = function (callback, onEnterCallback) {
611
+ TreeInterSectionObserver.prototype.virtualScrollHandlers = function (callback, onEnterCallback, instance) {
502
612
  var _this = this;
503
613
  var delay = Browser.info.name === 'chrome' ? 200 : 100;
504
614
  var options = 'options';
@@ -507,15 +617,15 @@ var TreeInterSectionObserver = /** @class */ (function (_super) {
507
617
  var fromWheel = 'fromWheel';
508
618
  var debounced100 = debounce(callback, delay);
509
619
  var debounced50 = debounce(callback, 50);
510
- this[options].prevTop = this[options].prevLeft = 0;
620
+ this["" + options].prevTop = this["" + options].prevLeft = 0;
511
621
  return function (e) {
512
- var top = _this[options].movableContainer ? _this[options].container.scrollTop : e.target.scrollTop;
513
- var left = _this[options].movableContainer ? _this[options].scrollbar.scrollLeft : e.target.scrollLeft;
514
- var direction = _this[options].prevTop < top ? 'down' : 'up';
515
- direction = _this[options].prevLeft === left ? direction : _this[options].prevLeft < left ? 'right' : 'left';
516
- _this[options].prevTop = top;
517
- _this[options].prevLeft = left;
518
- var current = _this.sentinelInfo[direction];
622
+ var top = _this["" + options].movableContainer ? _this["" + options].container.scrollTop : e.target.scrollTop;
623
+ var left = _this["" + options].movableContainer ? _this["" + options].scrollbar.scrollLeft : e.target.scrollLeft;
624
+ var direction = _this["" + options].prevTop < top ? 'down' : 'up';
625
+ direction = _this["" + options].prevLeft === left ? direction : _this["" + options].prevLeft < left ? 'right' : 'left';
626
+ _this["" + options].prevTop = top;
627
+ _this["" + options].prevLeft = left;
628
+ var current = _this.sentinelInfo["" + direction];
519
629
  var delta = 0;
520
630
  _this.newPos = top;
521
631
  if (_this.lastPos != null) { // && newPos < maxScroll
@@ -530,31 +640,39 @@ var TreeInterSectionObserver = /** @class */ (function (_super) {
530
640
  e.returnValue = false;
531
641
  e.preventDefault();
532
642
  }
533
- if (_this[options].axes.indexOf(current.axis) === -1) {
643
+ if (_this["" + options].axes.indexOf(current.axis) === -1) {
534
644
  return;
535
645
  }
536
646
  var check = _this.check(direction);
537
- if (current.entered && current.axis === 'X') {
538
- if (_this[movableEle] && (direction === 'right' || direction === 'left')) {
539
- onEnterCallback(_this[movableEle], current, direction, { top: top, left: left }, _this[fromWheel], check);
647
+ if (current.entered && (current.axis === 'X' || instance.enableVirtualMaskRow)) {
648
+ if (_this["" + movableEle] && (direction === 'right' || direction === 'left')) {
649
+ onEnterCallback(_this["" + movableEle], current, direction, { top: top, left: left }, _this["" + fromWheel], check);
540
650
  }
541
651
  else {
542
- onEnterCallback(_this[element], current, direction, { top: top, left: left }, _this[fromWheel], check);
652
+ onEnterCallback(_this["" + element], current, direction, { top: top, left: left }, _this["" + fromWheel], check);
543
653
  }
544
654
  }
545
655
  if (check) {
546
- var fn = debounced100;
656
+ var fn = debounced50;
547
657
  if (current.axis === 'X') {
548
- fn = debounced50;
549
658
  fn({ direction: direction, sentinel: current, offset: { top: top, left: left },
550
659
  focusElement: document.activeElement });
551
660
  }
552
661
  else {
553
- callback({ direction: direction, sentinel: current, offset: { top: top, left: left },
554
- focusElement: document.activeElement });
662
+ if ((instance.dataSource instanceof DataManager && instance.dataSource.dataSource.url !== undefined
663
+ && !instance.dataSource.dataSource.offline && instance.dataSource.dataSource.url !== '') || isCountRequired(instance)
664
+ || instance.enableVirtualMaskRow) {
665
+ fn = instance.enableVirtualMaskRow ? debounced100 : fn;
666
+ fn({ direction: direction, sentinel: current, offset: { top: top, left: left },
667
+ focusElement: document.activeElement });
668
+ }
669
+ else {
670
+ callback({ direction: direction, sentinel: current, offset: { top: top, left: left },
671
+ focusElement: document.activeElement });
672
+ }
555
673
  }
556
674
  }
557
- _this[fromWheel] = false;
675
+ _this["" + fromWheel] = false;
558
676
  };
559
677
  };
560
678
  return TreeInterSectionObserver;