@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
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.3.
|
|
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
|
+
"_id": "@syncfusion/ej2-treegrid@20.3.48",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
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-
|
|
28
|
-
"_shasum": "
|
|
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.
|
|
39
|
+
"@syncfusion/ej2-base": "~20.3.49",
|
|
40
40
|
"@syncfusion/ej2-data": "~20.3.47",
|
|
41
|
-
"@syncfusion/ej2-grids": "~20.3.
|
|
42
|
-
"@syncfusion/ej2-popups": "~20.3.
|
|
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.
|
|
63
|
+
"version": "20.3.49",
|
|
64
64
|
"sideEffects": false
|
|
65
65
|
}
|
|
@@ -241,6 +241,10 @@ var Edit = /** @class */ (function () {
|
|
|
241
241
|
}
|
|
242
242
|
this.updateGridEditMode('Batch');
|
|
243
243
|
}
|
|
244
|
+
else if (this.parent.editSettings.mode === 'Cell' && (!column.allowEditing || column.isPrimaryKey)) {
|
|
245
|
+
this.isOnBatch = true;
|
|
246
|
+
this.updateGridEditMode('Batch');
|
|
247
|
+
}
|
|
244
248
|
};
|
|
245
249
|
Edit.prototype.updateGridEditMode = function (mode) {
|
|
246
250
|
this.parent.grid.setProperties({ editSettings: { mode: mode } }, true);
|
|
@@ -917,7 +921,12 @@ var Edit = /** @class */ (function () {
|
|
|
917
921
|
}
|
|
918
922
|
index = (childRecordCount1 > 0) ? (currentDataIndex1 + childRecordCount1) : (currentDataIndex1);
|
|
919
923
|
if (this.isSelfReference) {
|
|
920
|
-
|
|
924
|
+
if (!this.parent.isLocalData && this.parent.editModule.selectedIndex === -1) {
|
|
925
|
+
value.taskData[this.parent.parentIdMapping] = value[this.parent.parentIdMapping] = null;
|
|
926
|
+
}
|
|
927
|
+
else {
|
|
928
|
+
value.taskData[this.parent.parentIdMapping] = value[this.parent.parentIdMapping] = idMapping;
|
|
929
|
+
}
|
|
921
930
|
if (!isNullOrUndefined(value.parentItem)) {
|
|
922
931
|
updateParentRow(key, value.parentItem, 'add', this.parent, this.isSelfReference, value);
|
|
923
932
|
}
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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);
|
|
@@ -747,12 +747,12 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
747
747
|
this.trigger(getObject('name', args), args);
|
|
748
748
|
};
|
|
749
749
|
TreeGrid.prototype.IsExpandCollapseClicked = function (args) {
|
|
750
|
-
if (args['name'] ===
|
|
750
|
+
if (args['name'] === 'rowSelecting' && !isNullOrUndefined(args.target) && (args.target.classList.contains('e-treegridexpand')
|
|
751
751
|
|| args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell')) && (isNullOrUndefined(args['previousRowIndex']))) {
|
|
752
752
|
args.cancel = true;
|
|
753
753
|
return;
|
|
754
754
|
}
|
|
755
|
-
else if (args['name'] ===
|
|
755
|
+
else if (args['name'] === 'rowDeselecting' && !isNullOrUndefined(args.target) && ((!isNullOrUndefined(args.row) && (!args.row.length)) && (args.target.classList.contains('e-treegridexpand')
|
|
756
756
|
|| args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell')))) {
|
|
757
757
|
args.cancel = true;
|
|
758
758
|
return;
|
|
@@ -214,7 +214,11 @@ var Render = /** @class */ (function () {
|
|
|
214
214
|
args.cell.querySelector('.e-treecell').innerHTML = summaryData;
|
|
215
215
|
}
|
|
216
216
|
else {
|
|
217
|
-
args.
|
|
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
|
-
|
|
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 =
|
|
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
|
-
|
|
633
|
-
|
|
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;
|
package/styles/bootstrap5.css
CHANGED
package/styles/fluent-dark.css
CHANGED
package/styles/fluent.css
CHANGED
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
.e-treecell {
|
|
175
175
|
display: table-cell;
|
|
176
176
|
@if $skin-name == 'bootstrap5' or $skin-name == 'boostrap5-dark' or $skin-name == 'FluentUI' or $theme-name == 'fluentui-dark' {
|
|
177
|
-
line-height:
|
|
177
|
+
line-height: 19px;
|
|
178
178
|
}
|
|
179
179
|
@else {
|
|
180
180
|
line-height: normal;
|