@syncfusion/ej2-treegrid 20.3.48 → 20.3.49

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 20.3.48
3
+ * version : 20.3.49
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.47",
3
+ "_id": "@syncfusion/ej2-treegrid@20.3.48",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-h6rSxBpMoZDLav2suqY58wIzpy42bpTtxPL/2APnJc98TC6Nk2c7seEgn4iJkc2hJ7AzZ+BEaTpJU72+r+W7vg==",
5
+ "_integrity": "sha512-FntkOlAYV9IljTx9G3tCA8gbjuc/dBLSHI8BT8KxgljA9j9KWzRAO0yPQ0PHiZfMXcEt3ypWcntHwh9TvcfYKA==",
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": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-20.3.47.tgz",
28
- "_shasum": "1847003b673227740c5a591d0292fe16bc4615b8",
27
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-20.3.48.tgz",
28
+ "_shasum": "2170f2614a8c447a00d8ed7f29c0cefa3e7a09bd",
29
29
  "_spec": "@syncfusion/ej2-treegrid@*",
30
30
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
31
31
  "author": {
@@ -36,10 +36,10 @@
36
36
  },
37
37
  "bundleDependencies": false,
38
38
  "dependencies": {
39
- "@syncfusion/ej2-base": "~20.3.48",
39
+ "@syncfusion/ej2-base": "~20.3.49",
40
40
  "@syncfusion/ej2-data": "~20.3.47",
41
- "@syncfusion/ej2-grids": "~20.3.48",
42
- "@syncfusion/ej2-popups": "~20.3.48"
41
+ "@syncfusion/ej2-grids": "~20.3.49",
42
+ "@syncfusion/ej2-popups": "~20.3.49"
43
43
  },
44
44
  "deprecated": false,
45
45
  "description": "Essential JS 2 TreeGrid Component",
@@ -60,6 +60,6 @@
60
60
  "url": "git+https://github.com/syncfusion/ej2-treegrid.git"
61
61
  },
62
62
  "typings": "index.d.ts",
63
- "version": "20.3.48",
63
+ "version": "20.3.49",
64
64
  "sideEffects": false
65
65
  }
@@ -1139,7 +1139,12 @@ var RowDD = /** @class */ (function () {
1139
1139
  }
1140
1140
  length = record.childRecords.length;
1141
1141
  for (var i = 0; i < length; i++) {
1142
- currentRecord = getValue('uniqueIDCollection.' + record.childRecords[i].uniqueID, tObj);
1142
+ if (!this.isMultipleGrid) {
1143
+ currentRecord = getValue('uniqueIDCollection.' + record.childRecords[i].uniqueID, tObj);
1144
+ }
1145
+ else {
1146
+ currentRecord = record.childRecords[i];
1147
+ }
1143
1148
  count++;
1144
1149
  tObj.flatData.splice(count, 0, currentRecord);
1145
1150
  setValue('uniqueIDCollection.' + currentRecord.uniqueID, currentRecord, this.parent);
@@ -1161,7 +1166,12 @@ var RowDD = /** @class */ (function () {
1161
1166
  }
1162
1167
  length = record.childRecords.length;
1163
1168
  for (var i = 0; i < length; i++) {
1164
- currentRecord = getValue('uniqueIDCollection.' + record.childRecords[i].uniqueID, this.parent);
1169
+ if (!this.isMultipleGrid) {
1170
+ currentRecord = getValue('uniqueIDCollection.' + record.childRecords[i].uniqueID, this.parent);
1171
+ }
1172
+ else {
1173
+ currentRecord = record.childRecords[i];
1174
+ }
1165
1175
  var parentData = void 0;
1166
1176
  if (record.parentItem) {
1167
1177
  parentData = getParentData(this.parent, record.parentItem.uniqueID);
@@ -214,7 +214,11 @@ var Render = /** @class */ (function () {
214
214
  args.cell.querySelector('.e-treecell').innerHTML = summaryData;
215
215
  }
216
216
  else {
217
- args.cell.innerHTML = summaryData;
217
+ if (args.column.template) {
218
+ args.cell.innerHTML = null;
219
+ }
220
+ else
221
+ args.cell.innerHTML = summaryData;
218
222
  }
219
223
  }
220
224
  if (isNullOrUndefined(this.parent.rowTemplate)) {
@@ -49,7 +49,11 @@ var TreeVirtualRowModelGenerator = /** @class */ (function (_super) {
49
49
  var info = this.getDataInfo();
50
50
  if (!isNullOrUndefined(notifyArgs.virtualInfo)) {
51
51
  if (notifyArgs.virtualInfo.direction !== 'right' && notifyArgs.virtualInfo.direction !== 'left') {
52
- notifyArgs.virtualInfo.blockIndexes = info.blockIndexes;
52
+ if (!((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
53
+ && !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent))
54
+ || notifyArgs.virtualInfo.blockIndexes.length === 1) {
55
+ notifyArgs.virtualInfo.blockIndexes = info.blockIndexes;
56
+ }
53
57
  }
54
58
  else {
55
59
  notifyArgs.virtualInfo.blockIndexes = this.getBlockIndexes(notifyArgs.virtualInfo.page);
@@ -62,7 +62,7 @@ export declare class TreeInterSectionObserver extends InterSectionObserver {
62
62
  private newPos;
63
63
  private lastPos;
64
64
  private timer;
65
- observes(callback: Function, onEnterCallback: Function): void;
65
+ observes(callback: Function, onEnterCallback: Function, instance: IGrid): void;
66
66
  private clear;
67
67
  private virtualScrollHandlers;
68
68
  }
@@ -114,7 +114,7 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
114
114
  this.parent[action]('data-ready', this.onDataReady, this);
115
115
  this.parent[action]('refresh-virtual-block', this.refreshContentRows, this);
116
116
  this.fn = function () {
117
- _this.observers.observes(function (scrollArgs) { return _this.scrollListeners(scrollArgs); }, _this.onEnteredAction());
117
+ _this.observers.observes(function (scrollArgs) { return _this.scrollListeners(scrollArgs); }, _this.onEnteredAction(), _this.parent);
118
118
  _this.parent.off('content-ready', _this.fn);
119
119
  };
120
120
  this.parent.addEventListener('dataBound', this.dataBoundEvent.bind(this));
@@ -443,7 +443,9 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
443
443
  }
444
444
  }
445
445
  if (((downScroll && (scrollArgs.offset.top < (this.parent.getRowHeight() * this.totalRecords)))
446
- || (upScroll)) || (scrollArgs.direction === 'right' || scrollArgs.direction === 'left')) {
446
+ || (upScroll)) || (scrollArgs.direction === 'right' || scrollArgs.direction === 'left') ||
447
+ ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
448
+ && !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent))) {
447
449
  var viewInfo = this.currentInfo = getValue('getInfoFromView', this).apply(this, [scrollArgs.direction, info, scrollArgs.offset]);
448
450
  this.previousInfo = viewInfo;
449
451
  this.parent.setColumnIndexesInView(this.parent.enableColumnVirtualization ? viewInfo.columnIndexes : []);
@@ -564,20 +566,20 @@ var TreeInterSectionObserver = /** @class */ (function (_super) {
564
566
  _this.timer = 0;
565
567
  return _this;
566
568
  }
567
- TreeInterSectionObserver.prototype.observes = function (callback, onEnterCallback) {
569
+ TreeInterSectionObserver.prototype.observes = function (callback, onEnterCallback, instance) {
568
570
  var containerRect = 'containerRect';
569
571
  _super.prototype[containerRect] = getValue('options', this).container.getBoundingClientRect();
570
- EventHandler.add(getValue('options', this).container, 'scroll', this.virtualScrollHandlers(callback, onEnterCallback), this);
572
+ EventHandler.add(getValue('options', this).container, 'scroll', this.virtualScrollHandlers(callback, onEnterCallback, instance), this);
571
573
  if (getValue('options', this).movableContainer) {
572
574
  var movableContainerRect = 'movableContainerRect';
573
575
  _super.prototype[movableContainerRect] = getValue('options', this).movableContainer.getBoundingClientRect();
574
- EventHandler.add(getValue('options', this).movableContainer, 'scroll', this.virtualScrollHandlers(callback, onEnterCallback), this);
576
+ EventHandler.add(getValue('options', this).movableContainer, 'scroll', this.virtualScrollHandlers(callback, onEnterCallback, instance), this);
575
577
  }
576
578
  };
577
579
  TreeInterSectionObserver.prototype.clear = function () {
578
580
  this.lastPos = null;
579
581
  };
580
- TreeInterSectionObserver.prototype.virtualScrollHandlers = function (callback, onEnterCallback) {
582
+ TreeInterSectionObserver.prototype.virtualScrollHandlers = function (callback, onEnterCallback, instance) {
581
583
  var _this = this;
582
584
  var delay = Browser.info.name === 'chrome' ? 200 : 100;
583
585
  var options = 'options';
@@ -622,15 +624,20 @@ var TreeInterSectionObserver = /** @class */ (function (_super) {
622
624
  }
623
625
  }
624
626
  if (check) {
625
- var fn = debounced100;
627
+ var fn = debounced50;
626
628
  if (current.axis === 'X') {
627
- fn = debounced50;
628
629
  fn({ direction: direction, sentinel: current, offset: { top: top, left: left },
629
630
  focusElement: document.activeElement });
630
631
  }
631
632
  else {
632
- callback({ direction: direction, sentinel: current, offset: { top: top, left: left },
633
- focusElement: document.activeElement });
633
+ if ((instance.dataSource instanceof DataManager && instance.dataSource.dataSource.url !== undefined
634
+ && !instance.dataSource.dataSource.offline && instance.dataSource.dataSource.url !== '') || isCountRequired(instance)) {
635
+ fn({ direction: direction, sentinel: current, offset: { top: top, left: left },
636
+ focusElement: document.activeElement });
637
+ }
638
+ else
639
+ callback({ direction: direction, sentinel: current, offset: { top: top, left: left },
640
+ focusElement: document.activeElement });
634
641
  }
635
642
  }
636
643
  _this[fromWheel] = false;