@syncfusion/ej2-treegrid 20.3.47 → 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.
- package/CHANGELOG.md +17 -1
- package/dist/ej2-treegrid.min.js +2 -2
- package/dist/ej2-treegrid.umd.min.js +2 -2
- package/dist/ej2-treegrid.umd.min.js.map +1 -1
- package/dist/es6/ej2-treegrid.es2015.js +51 -17
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +51 -17
- package/dist/es6/ej2-treegrid.es5.js.map +1 -1
- package/dist/global/ej2-treegrid.min.js +2 -2
- package/dist/global/ej2-treegrid.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +8 -8
- package/src/treegrid/actions/edit.js +10 -1
- package/src/treegrid/actions/rowdragdrop.js +12 -2
- package/src/treegrid/base/treegrid.js +2 -2
- package/src/treegrid/renderer/render.js +5 -1
- package/src/treegrid/renderer/virtual-row-model-generator.js +5 -1
- package/src/treegrid/renderer/virtual-tree-content-render.d.ts +1 -1
- package/src/treegrid/renderer/virtual-tree-content-render.js +17 -10
- package/styles/bootstrap5-dark.css +1 -1
- package/styles/bootstrap5.css +1 -1
- package/styles/fluent-dark.css +1 -1
- package/styles/fluent.css +1 -1
- package/styles/treegrid/_layout.scss +1 -1
- package/styles/treegrid/bootstrap5-dark.css +1 -1
- package/styles/treegrid/bootstrap5.css +1 -1
- package/styles/treegrid/fluent-dark.css +1 -1
- package/styles/treegrid/fluent.css +1 -1
|
@@ -1760,7 +1760,11 @@ var Render = /** @__PURE__ @class */ (function () {
|
|
|
1760
1760
|
args.cell.querySelector('.e-treecell').innerHTML = summaryData;
|
|
1761
1761
|
}
|
|
1762
1762
|
else {
|
|
1763
|
-
args.
|
|
1763
|
+
if (args.column.template) {
|
|
1764
|
+
args.cell.innerHTML = null;
|
|
1765
|
+
}
|
|
1766
|
+
else
|
|
1767
|
+
args.cell.innerHTML = summaryData;
|
|
1764
1768
|
}
|
|
1765
1769
|
}
|
|
1766
1770
|
if (isNullOrUndefined(this.parent.rowTemplate)) {
|
|
@@ -3973,12 +3977,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
3973
3977
|
this.trigger(getObject('name', args), args);
|
|
3974
3978
|
};
|
|
3975
3979
|
TreeGrid.prototype.IsExpandCollapseClicked = function (args) {
|
|
3976
|
-
if (args['name'] ===
|
|
3980
|
+
if (args['name'] === 'rowSelecting' && !isNullOrUndefined(args.target) && (args.target.classList.contains('e-treegridexpand')
|
|
3977
3981
|
|| args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell')) && (isNullOrUndefined(args['previousRowIndex']))) {
|
|
3978
3982
|
args.cancel = true;
|
|
3979
3983
|
return;
|
|
3980
3984
|
}
|
|
3981
|
-
else if (args['name'] ===
|
|
3985
|
+
else if (args['name'] === 'rowDeselecting' && !isNullOrUndefined(args.target) && ((!isNullOrUndefined(args.row) && (!args.row.length)) && (args.target.classList.contains('e-treegridexpand')
|
|
3982
3986
|
|| args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell')))) {
|
|
3983
3987
|
args.cancel = true;
|
|
3984
3988
|
return;
|
|
@@ -8439,7 +8443,12 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
8439
8443
|
}
|
|
8440
8444
|
length = record.childRecords.length;
|
|
8441
8445
|
for (var i = 0; i < length; i++) {
|
|
8442
|
-
|
|
8446
|
+
if (!this.isMultipleGrid) {
|
|
8447
|
+
currentRecord = getValue('uniqueIDCollection.' + record.childRecords[i].uniqueID, tObj);
|
|
8448
|
+
}
|
|
8449
|
+
else {
|
|
8450
|
+
currentRecord = record.childRecords[i];
|
|
8451
|
+
}
|
|
8443
8452
|
count++;
|
|
8444
8453
|
tObj.flatData.splice(count, 0, currentRecord);
|
|
8445
8454
|
setValue('uniqueIDCollection.' + currentRecord.uniqueID, currentRecord, this.parent);
|
|
@@ -8461,7 +8470,12 @@ var RowDD$1 = /** @__PURE__ @class */ (function () {
|
|
|
8461
8470
|
}
|
|
8462
8471
|
length = record.childRecords.length;
|
|
8463
8472
|
for (var i = 0; i < length; i++) {
|
|
8464
|
-
|
|
8473
|
+
if (!this.isMultipleGrid) {
|
|
8474
|
+
currentRecord = getValue('uniqueIDCollection.' + record.childRecords[i].uniqueID, this.parent);
|
|
8475
|
+
}
|
|
8476
|
+
else {
|
|
8477
|
+
currentRecord = record.childRecords[i];
|
|
8478
|
+
}
|
|
8465
8479
|
var parentData = void 0;
|
|
8466
8480
|
if (record.parentItem) {
|
|
8467
8481
|
parentData = getParentData(this.parent, record.parentItem.uniqueID);
|
|
@@ -8759,7 +8773,11 @@ var TreeVirtualRowModelGenerator = /** @__PURE__ @class */ (function (_super) {
|
|
|
8759
8773
|
var info = this.getDataInfo();
|
|
8760
8774
|
if (!isNullOrUndefined(notifyArgs.virtualInfo)) {
|
|
8761
8775
|
if (notifyArgs.virtualInfo.direction !== 'right' && notifyArgs.virtualInfo.direction !== 'left') {
|
|
8762
|
-
|
|
8776
|
+
if (!((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
8777
|
+
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent))
|
|
8778
|
+
|| notifyArgs.virtualInfo.blockIndexes.length === 1) {
|
|
8779
|
+
notifyArgs.virtualInfo.blockIndexes = info.blockIndexes;
|
|
8780
|
+
}
|
|
8763
8781
|
}
|
|
8764
8782
|
else {
|
|
8765
8783
|
notifyArgs.virtualInfo.blockIndexes = this.getBlockIndexes(notifyArgs.virtualInfo.page);
|
|
@@ -11170,6 +11188,10 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
11170
11188
|
}
|
|
11171
11189
|
this.updateGridEditMode('Batch');
|
|
11172
11190
|
}
|
|
11191
|
+
else if (this.parent.editSettings.mode === 'Cell' && (!column.allowEditing || column.isPrimaryKey)) {
|
|
11192
|
+
this.isOnBatch = true;
|
|
11193
|
+
this.updateGridEditMode('Batch');
|
|
11194
|
+
}
|
|
11173
11195
|
};
|
|
11174
11196
|
Edit$$1.prototype.updateGridEditMode = function (mode) {
|
|
11175
11197
|
this.parent.grid.setProperties({ editSettings: { mode: mode } }, true);
|
|
@@ -11846,7 +11868,12 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
11846
11868
|
}
|
|
11847
11869
|
index = (childRecordCount1 > 0) ? (currentDataIndex1 + childRecordCount1) : (currentDataIndex1);
|
|
11848
11870
|
if (this.isSelfReference) {
|
|
11849
|
-
|
|
11871
|
+
if (!this.parent.isLocalData && this.parent.editModule.selectedIndex === -1) {
|
|
11872
|
+
value.taskData[this.parent.parentIdMapping] = value[this.parent.parentIdMapping] = null;
|
|
11873
|
+
}
|
|
11874
|
+
else {
|
|
11875
|
+
value.taskData[this.parent.parentIdMapping] = value[this.parent.parentIdMapping] = idMapping;
|
|
11876
|
+
}
|
|
11850
11877
|
if (!isNullOrUndefined(value.parentItem)) {
|
|
11851
11878
|
updateParentRow(key, value.parentItem, 'add', this.parent, this.isSelfReference, value);
|
|
11852
11879
|
}
|
|
@@ -12246,7 +12273,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12246
12273
|
this.parent[action]('data-ready', this.onDataReady, this);
|
|
12247
12274
|
this.parent[action]('refresh-virtual-block', this.refreshContentRows, this);
|
|
12248
12275
|
this.fn = function () {
|
|
12249
|
-
_this.observers.observes(function (scrollArgs) { return _this.scrollListeners(scrollArgs); }, _this.onEnteredAction());
|
|
12276
|
+
_this.observers.observes(function (scrollArgs) { return _this.scrollListeners(scrollArgs); }, _this.onEnteredAction(), _this.parent);
|
|
12250
12277
|
_this.parent.off('content-ready', _this.fn);
|
|
12251
12278
|
};
|
|
12252
12279
|
this.parent.addEventListener('dataBound', this.dataBoundEvent.bind(this));
|
|
@@ -12575,7 +12602,9 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12575
12602
|
}
|
|
12576
12603
|
}
|
|
12577
12604
|
if (((downScroll && (scrollArgs.offset.top < (this.parent.getRowHeight() * this.totalRecords)))
|
|
12578
|
-
|| (upScroll)) || (scrollArgs.direction === 'right' || scrollArgs.direction === 'left')
|
|
12605
|
+
|| (upScroll)) || (scrollArgs.direction === 'right' || scrollArgs.direction === 'left') ||
|
|
12606
|
+
((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
12607
|
+
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent))) {
|
|
12579
12608
|
var viewInfo = this.currentInfo = getValue('getInfoFromView', this).apply(this, [scrollArgs.direction, info, scrollArgs.offset]);
|
|
12580
12609
|
this.previousInfo = viewInfo;
|
|
12581
12610
|
this.parent.setColumnIndexesInView(this.parent.enableColumnVirtualization ? viewInfo.columnIndexes : []);
|
|
@@ -12695,20 +12724,20 @@ var TreeInterSectionObserver = /** @__PURE__ @class */ (function (_super) {
|
|
|
12695
12724
|
_this.timer = 0;
|
|
12696
12725
|
return _this;
|
|
12697
12726
|
}
|
|
12698
|
-
TreeInterSectionObserver.prototype.observes = function (callback, onEnterCallback) {
|
|
12727
|
+
TreeInterSectionObserver.prototype.observes = function (callback, onEnterCallback, instance) {
|
|
12699
12728
|
var containerRect = 'containerRect';
|
|
12700
12729
|
_super.prototype[containerRect] = getValue('options', this).container.getBoundingClientRect();
|
|
12701
|
-
EventHandler.add(getValue('options', this).container, 'scroll', this.virtualScrollHandlers(callback, onEnterCallback), this);
|
|
12730
|
+
EventHandler.add(getValue('options', this).container, 'scroll', this.virtualScrollHandlers(callback, onEnterCallback, instance), this);
|
|
12702
12731
|
if (getValue('options', this).movableContainer) {
|
|
12703
12732
|
var movableContainerRect = 'movableContainerRect';
|
|
12704
12733
|
_super.prototype[movableContainerRect] = getValue('options', this).movableContainer.getBoundingClientRect();
|
|
12705
|
-
EventHandler.add(getValue('options', this).movableContainer, 'scroll', this.virtualScrollHandlers(callback, onEnterCallback), this);
|
|
12734
|
+
EventHandler.add(getValue('options', this).movableContainer, 'scroll', this.virtualScrollHandlers(callback, onEnterCallback, instance), this);
|
|
12706
12735
|
}
|
|
12707
12736
|
};
|
|
12708
12737
|
TreeInterSectionObserver.prototype.clear = function () {
|
|
12709
12738
|
this.lastPos = null;
|
|
12710
12739
|
};
|
|
12711
|
-
TreeInterSectionObserver.prototype.virtualScrollHandlers = function (callback, onEnterCallback) {
|
|
12740
|
+
TreeInterSectionObserver.prototype.virtualScrollHandlers = function (callback, onEnterCallback, instance) {
|
|
12712
12741
|
var _this = this;
|
|
12713
12742
|
var delay = Browser.info.name === 'chrome' ? 200 : 100;
|
|
12714
12743
|
var options = 'options';
|
|
@@ -12753,15 +12782,20 @@ var TreeInterSectionObserver = /** @__PURE__ @class */ (function (_super) {
|
|
|
12753
12782
|
}
|
|
12754
12783
|
}
|
|
12755
12784
|
if (check) {
|
|
12756
|
-
var fn =
|
|
12785
|
+
var fn = debounced50;
|
|
12757
12786
|
if (current.axis === 'X') {
|
|
12758
|
-
fn = debounced50;
|
|
12759
12787
|
fn({ direction: direction, sentinel: current, offset: { top: top, left: left },
|
|
12760
12788
|
focusElement: document.activeElement });
|
|
12761
12789
|
}
|
|
12762
12790
|
else {
|
|
12763
|
-
|
|
12764
|
-
|
|
12791
|
+
if ((instance.dataSource instanceof DataManager && instance.dataSource.dataSource.url !== undefined
|
|
12792
|
+
&& !instance.dataSource.dataSource.offline && instance.dataSource.dataSource.url !== '') || isCountRequired(instance)) {
|
|
12793
|
+
fn({ direction: direction, sentinel: current, offset: { top: top, left: left },
|
|
12794
|
+
focusElement: document.activeElement });
|
|
12795
|
+
}
|
|
12796
|
+
else
|
|
12797
|
+
callback({ direction: direction, sentinel: current, offset: { top: top, left: left },
|
|
12798
|
+
focusElement: document.activeElement });
|
|
12765
12799
|
}
|
|
12766
12800
|
}
|
|
12767
12801
|
_this[fromWheel] = false;
|