@syncfusion/ej2-treegrid 20.1.59 → 20.2.38
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 +11 -51
- 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 +213 -119
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +218 -124
- 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/helpers/e2e/index.js +8 -6
- package/helpers/e2e/treegridhelper.js +82 -65
- package/package.json +9 -9
- package/src/treegrid/actions/batch-edit.js +6 -1
- package/src/treegrid/actions/edit.js +12 -5
- package/src/treegrid/actions/rowdragdrop.js +46 -9
- package/src/treegrid/actions/selection.js +6 -1
- package/src/treegrid/actions/sort.js +11 -0
- package/src/treegrid/base/data.js +14 -2
- package/src/treegrid/base/treegrid.js +8 -4
- package/src/treegrid/renderer/render.js +3 -1
- package/src/treegrid/renderer/virtual-tree-content-render.js +13 -3
- package/styles/bootstrap-dark.css +9 -0
- package/styles/bootstrap.css +9 -0
- package/styles/bootstrap4.css +9 -0
- package/styles/bootstrap5-dark.css +9 -0
- package/styles/bootstrap5.css +9 -0
- package/styles/fabric-dark.css +9 -0
- package/styles/fabric.css +9 -0
- package/styles/fluent-dark.css +9 -0
- package/styles/fluent.css +9 -0
- package/styles/highcontrast-light.css +9 -0
- package/styles/highcontrast.css +9 -0
- package/styles/material-dark.css +9 -0
- package/styles/material.css +9 -0
- package/styles/tailwind-dark.css +9 -0
- package/styles/tailwind.css +9 -0
- package/styles/treegrid/_fusionnew-definition.scss +29 -0
- package/styles/treegrid/_icons.scss +11 -0
- package/styles/treegrid/_material3-definition.scss +29 -0
- package/styles/treegrid/bootstrap-dark.css +9 -0
- package/styles/treegrid/bootstrap.css +9 -0
- package/styles/treegrid/bootstrap4.css +9 -0
- package/styles/treegrid/bootstrap5-dark.css +9 -0
- package/styles/treegrid/bootstrap5.css +9 -0
- package/styles/treegrid/fabric-dark.css +9 -0
- package/styles/treegrid/fabric.css +9 -0
- package/styles/treegrid/fluent-dark.css +9 -0
- package/styles/treegrid/fluent.css +9 -0
- package/styles/treegrid/highcontrast-light.css +9 -0
- package/styles/treegrid/highcontrast.css +9 -0
- package/styles/treegrid/icons/_bootstrap-dark.scss +11 -0
- package/styles/treegrid/icons/_bootstrap.scss +11 -0
- package/styles/treegrid/icons/_bootstrap4.scss +11 -0
- package/styles/treegrid/icons/_bootstrap5.scss +11 -0
- package/styles/treegrid/icons/_fabric-dark.scss +11 -0
- package/styles/treegrid/icons/_fabric.scss +11 -0
- package/styles/treegrid/icons/_fluent.scss +11 -0
- package/styles/treegrid/icons/_fusionnew.scss +26 -0
- package/styles/treegrid/icons/_highcontrast-light.scss +11 -0
- package/styles/treegrid/icons/_highcontrast.scss +11 -0
- package/styles/treegrid/icons/_material-dark.scss +11 -0
- package/styles/treegrid/icons/_material.scss +11 -0
- package/styles/treegrid/icons/_material3.scss +26 -0
- package/styles/treegrid/icons/_tailwind-dark.scss +11 -0
- package/styles/treegrid/icons/_tailwind.scss +11 -0
- package/styles/treegrid/material-dark.css +9 -0
- package/styles/treegrid/material.css +9 -0
- package/styles/treegrid/tailwind-dark.css +9 -0
- package/styles/treegrid/tailwind.css +9 -0
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.
|
|
3
|
+
* version : 20.2.38
|
|
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/helpers/e2e/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
define(["require", "exports", "./treegridhelper"], function (require, exports, treegridhelper_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
function __export(m) {
|
|
4
|
+
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
5
|
+
}
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
__export(treegridhelper_1);
|
|
8
|
+
});
|
|
@@ -1,66 +1,83 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
extendStatics(d, b);
|
|
10
|
+
function __() { this.constructor = d; }
|
|
11
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
+
};
|
|
13
|
+
})();
|
|
14
|
+
define(["require", "exports", "@syncfusion/ej2-base/helpers/e2e"], function (require, exports, e2e_1) {
|
|
15
|
+
"use strict";
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var TreeGridHelper = (function (_super) {
|
|
18
|
+
__extends(TreeGridHelper, _super);
|
|
19
|
+
function TreeGridHelper(id, wrapperFn) {
|
|
20
|
+
var _this = _super.call(this) || this;
|
|
21
|
+
_this.id = id;
|
|
22
|
+
if (wrapperFn !== undefined) {
|
|
23
|
+
_this.wrapperFn = wrapperFn;
|
|
24
|
+
}
|
|
25
|
+
return _this;
|
|
10
26
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
exports.TreeGridHelper = TreeGridHelper;
|
|
27
|
+
TreeGridHelper.prototype.getDataGridElement = function () {
|
|
28
|
+
return this.selector('#' + this.id);
|
|
29
|
+
};
|
|
30
|
+
TreeGridHelper.prototype.getHeaderElement = function () {
|
|
31
|
+
return this.selector('#' + this.id + ' .e-gridheader');
|
|
32
|
+
};
|
|
33
|
+
TreeGridHelper.prototype.getContentElement = function () {
|
|
34
|
+
return this.selector('#' + this.id + ' .e-gridcontent');
|
|
35
|
+
};
|
|
36
|
+
TreeGridHelper.prototype.getFooterElement = function () {
|
|
37
|
+
return this.selector('#' + this.id + ' .e-gridfooter');
|
|
38
|
+
};
|
|
39
|
+
TreeGridHelper.prototype.getPagerElement = function () {
|
|
40
|
+
return this.selector('#' + this.id + ' .e-gridpager');
|
|
41
|
+
};
|
|
42
|
+
TreeGridHelper.prototype.getDialogElement = function () {
|
|
43
|
+
return this.selector('#' + this.id + '_gridcontrol_dialogEdit_wrapper');
|
|
44
|
+
};
|
|
45
|
+
TreeGridHelper.prototype.getFilterPopupElement = function () {
|
|
46
|
+
return this.selector('#' + this.id + ' .e-filter-popup');
|
|
47
|
+
};
|
|
48
|
+
TreeGridHelper.prototype.getToolbarElement = function () {
|
|
49
|
+
return this.selector('#' + this.id + '_gridcontrol_toolbarItems');
|
|
50
|
+
};
|
|
51
|
+
TreeGridHelper.prototype.getCurrentPagerElement = function () {
|
|
52
|
+
return this.selector('#' + this.id + ' .e-numericitem.e-currentitem');
|
|
53
|
+
};
|
|
54
|
+
TreeGridHelper.prototype.getPagerDropDownElement = function () {
|
|
55
|
+
return this.selector('#' + this.id + ' .e-pagerdropdown');
|
|
56
|
+
};
|
|
57
|
+
TreeGridHelper.prototype.getExpandedElements = function () {
|
|
58
|
+
return this.selector('#' + this.id + ' .e-treegridexpand');
|
|
59
|
+
};
|
|
60
|
+
TreeGridHelper.prototype.getCollapsedElements = function () {
|
|
61
|
+
return this.selector('#' + this.id + ' .e-treegridcollapsed');
|
|
62
|
+
};
|
|
63
|
+
TreeGridHelper.prototype.setModel = function (property, value) {
|
|
64
|
+
return cy.get('#' + this.id).then(function (ele) {
|
|
65
|
+
return ele[0].ej2_instances[0][property] = value;
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
TreeGridHelper.prototype.getModel = function (property) {
|
|
69
|
+
return cy.get('#' + this.id).then(function (ele) {
|
|
70
|
+
return ele[0].ej2_instances[0][property];
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
TreeGridHelper.prototype.invoke = function (fName, args) {
|
|
74
|
+
if (args === void 0) { args = []; }
|
|
75
|
+
return cy.get('#' + this.id).then(function (ele) {
|
|
76
|
+
var inst = ele[0].ej2_instances[0];
|
|
77
|
+
return inst[fName].apply(inst, args);
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
return TreeGridHelper;
|
|
81
|
+
}(e2e_1.TestHelper));
|
|
82
|
+
exports.TreeGridHelper = TreeGridHelper;
|
|
83
|
+
});
|
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.2.36",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-OrB3ZEOBULnCkrBvX3d7Al0eOEi3YDIpNArHSNNbSx5A/UrcQHgPo+Ivhg5hFEQPW2jH7UhYfsucaPSYEtQ2Jg==",
|
|
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.
|
|
28
|
-
"_shasum": "
|
|
27
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-20.2.36.tgz",
|
|
28
|
+
"_shasum": "8f57494d4d0796652709bcc45f3d541d83bc5e4e",
|
|
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.
|
|
40
|
-
"@syncfusion/ej2-data": "~20.
|
|
41
|
-
"@syncfusion/ej2-grids": "~20.
|
|
42
|
-
"@syncfusion/ej2-popups": "~20.
|
|
39
|
+
"@syncfusion/ej2-base": "~20.2.38",
|
|
40
|
+
"@syncfusion/ej2-data": "~20.2.38",
|
|
41
|
+
"@syncfusion/ej2-grids": "~20.2.38",
|
|
42
|
+
"@syncfusion/ej2-popups": "~20.2.38"
|
|
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.
|
|
63
|
+
"version": "20.2.38",
|
|
64
64
|
"sideEffects": false
|
|
65
65
|
}
|
|
@@ -611,7 +611,12 @@ var BatchEdit = /** @class */ (function () {
|
|
|
611
611
|
BatchEdit.prototype.nextCellIndex = function (args) {
|
|
612
612
|
var index = 'index';
|
|
613
613
|
var rowIndex = 'rowIndex';
|
|
614
|
-
|
|
614
|
+
if (this.parent.getSelectedRows().length) {
|
|
615
|
+
args[index] = this.parent.getSelectedRows()[0][rowIndex];
|
|
616
|
+
}
|
|
617
|
+
else {
|
|
618
|
+
args[index] = this.batchIndex;
|
|
619
|
+
}
|
|
615
620
|
};
|
|
616
621
|
return BatchEdit;
|
|
617
622
|
}());
|
|
@@ -532,9 +532,11 @@ var Edit = /** @class */ (function () {
|
|
|
532
532
|
this.parent.parentData.push(data[i]);
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
|
-
if (
|
|
536
|
-
|
|
537
|
-
|
|
535
|
+
if (!this.parent.enableInfiniteScrolling) {
|
|
536
|
+
if (details.action === 'add' && this.previousNewRowPosition != null) {
|
|
537
|
+
this.parent.setProperties({ editSettings: { newRowPosition: this.previousNewRowPosition } }, true);
|
|
538
|
+
this.previousNewRowPosition = null;
|
|
539
|
+
}
|
|
538
540
|
}
|
|
539
541
|
};
|
|
540
542
|
Edit.prototype.updateIndex = function (data, rows, records) {
|
|
@@ -782,14 +784,19 @@ var Edit = /** @class */ (function () {
|
|
|
782
784
|
}
|
|
783
785
|
else {
|
|
784
786
|
if (this.isAddedRowByMethod && (this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)) {
|
|
785
|
-
|
|
787
|
+
if (args.index !== 0) {
|
|
788
|
+
this.addRowIndex = args.index;
|
|
789
|
+
}
|
|
790
|
+
else {
|
|
791
|
+
this.addRowIndex = this.parent.grid.selectedRowIndex;
|
|
792
|
+
}
|
|
786
793
|
}
|
|
787
794
|
else {
|
|
788
795
|
this.addRowIndex = this.parent.grid.selectedRowIndex > -1 ? this.parent.grid.selectedRowIndex : 0;
|
|
789
796
|
}
|
|
790
797
|
}
|
|
791
798
|
if (this.isAddedRowByMethod && (this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)) {
|
|
792
|
-
this.addRowRecord = this.parent.flatData[
|
|
799
|
+
this.addRowRecord = this.parent.flatData[this.parent.grid.selectedRowIndex];
|
|
793
800
|
}
|
|
794
801
|
else {
|
|
795
802
|
this.addRowRecord = this.parent.getSelectedRecords()[0];
|
|
@@ -84,7 +84,8 @@ var RowDD = /** @class */ (function () {
|
|
|
84
84
|
this.parent[dropPosition] = this.dropPosition;
|
|
85
85
|
var data = [];
|
|
86
86
|
for (var i = 0; i < fromIndexes.length; i++) {
|
|
87
|
-
|
|
87
|
+
var index = this.parent.getRowByIndex(fromIndexes[i]).rowIndex;
|
|
88
|
+
data[i] = this.parent.getCurrentViewRecords()[index];
|
|
88
89
|
}
|
|
89
90
|
var isByMethod = true;
|
|
90
91
|
var args = {
|
|
@@ -188,6 +189,9 @@ var RowDD = /** @class */ (function () {
|
|
|
188
189
|
else {
|
|
189
190
|
dropIndex = this.selectedRow.rowIndex - 1;
|
|
190
191
|
}
|
|
192
|
+
if (this.parent.enableVirtualization && this.parent.allowRowDragAndDrop && this.selectedRecord) {
|
|
193
|
+
dropIndex = parseInt(this.selectedRow.getAttribute('aria-rowindex'), 10) - 1;
|
|
194
|
+
}
|
|
191
195
|
tObj[action] = 'indenting';
|
|
192
196
|
tObj[droppedIndex] = dropIndex;
|
|
193
197
|
this.eventTrigger('indenting', dropIndex);
|
|
@@ -204,6 +208,9 @@ var RowDD = /** @class */ (function () {
|
|
|
204
208
|
dropIndex = i;
|
|
205
209
|
}
|
|
206
210
|
}
|
|
211
|
+
if (this.parent.enableVirtualization && this.parent.allowRowDragAndDrop && this.selectedRecord) {
|
|
212
|
+
dropIndex = parseInt(this.parent.getRows()[dropIndex].getAttribute('aria-rowindex'), 10);
|
|
213
|
+
}
|
|
207
214
|
tObj[action] = 'outdenting';
|
|
208
215
|
tObj[droppedIndex] = dropIndex;
|
|
209
216
|
this.eventTrigger('outdenting', dropIndex);
|
|
@@ -221,10 +228,20 @@ var RowDD = /** @class */ (function () {
|
|
|
221
228
|
this.parent.trigger(events.actionBegin, actionArgs, function (actionArgs) {
|
|
222
229
|
if (!actionArgs.cancel) {
|
|
223
230
|
if (actionArgs.action === 'indenting') {
|
|
224
|
-
|
|
231
|
+
if (_this.parent.enableVirtualization && _this.parent.allowRowDragAndDrop) {
|
|
232
|
+
_this.reorderRows([parseInt(_this.selectedRow.getAttribute('aria-rowindex'), 10)], dropIndex, 'child');
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
_this.reorderRows([_this.selectedRow.rowIndex], dropIndex, 'child');
|
|
236
|
+
}
|
|
225
237
|
}
|
|
226
238
|
else if (actionArgs.action === 'outdenting') {
|
|
227
|
-
|
|
239
|
+
if (_this.parent.enableVirtualization && _this.parent.allowRowDragAndDrop) {
|
|
240
|
+
_this.reorderRows([parseInt(_this.selectedRow.getAttribute('aria-rowindex'), 10)], dropIndex, 'below');
|
|
241
|
+
}
|
|
242
|
+
else {
|
|
243
|
+
_this.reorderRows([_this.selectedRow.rowIndex], dropIndex, 'below');
|
|
244
|
+
}
|
|
228
245
|
}
|
|
229
246
|
}
|
|
230
247
|
});
|
|
@@ -419,9 +436,17 @@ var RowDD = /** @class */ (function () {
|
|
|
419
436
|
RowDD.prototype.removeLastrowBorder = function (element) {
|
|
420
437
|
var isEmptyRow = element && (element.classList.contains('e-emptyrow') || element.classList.contains('e-columnheader')
|
|
421
438
|
|| element.classList.contains('e-detailrow'));
|
|
422
|
-
var islastRowIndex
|
|
423
|
-
|
|
424
|
-
|
|
439
|
+
var islastRowIndex;
|
|
440
|
+
if (this.parent.enableVirtualization) {
|
|
441
|
+
islastRowIndex = element && !isEmptyRow &&
|
|
442
|
+
this.parent.getRows()[this.parent.getCurrentViewRecords().length - 1].getAttribute('data-uid') !==
|
|
443
|
+
element.getAttribute('data-uid');
|
|
444
|
+
}
|
|
445
|
+
else {
|
|
446
|
+
islastRowIndex = element && !isEmptyRow &&
|
|
447
|
+
this.parent.getRowByIndex(this.parent.getCurrentViewRecords().length - 1).getAttribute('data-uid') !==
|
|
448
|
+
element.getAttribute('data-uid');
|
|
449
|
+
}
|
|
425
450
|
var canremove = islastRowIndex || this.dropPosition === 'topSegment';
|
|
426
451
|
if (this.parent.element.getElementsByClassName('e-lastrow-border').length > 0 && element && (islastRowIndex || canremove)) {
|
|
427
452
|
this.parent.element.getElementsByClassName('e-lastrow-border')[0].remove();
|
|
@@ -455,7 +480,12 @@ var RowDD = /** @class */ (function () {
|
|
|
455
480
|
rowPositionHeight = rowEle.offsetTop - scrollTop;
|
|
456
481
|
}
|
|
457
482
|
// let scrollTop = (tObj.grid.scrollModule as any).content.scrollTop;
|
|
458
|
-
|
|
483
|
+
if (this.parent.enableVirtualization) {
|
|
484
|
+
rowTop = rowEle.getBoundingClientRect().top;
|
|
485
|
+
}
|
|
486
|
+
else {
|
|
487
|
+
rowTop = rowPositionHeight + contentHeight + roundOff;
|
|
488
|
+
}
|
|
459
489
|
var rowBottom = rowTop + row[0].offsetHeight;
|
|
460
490
|
var difference = rowBottom - rowTop;
|
|
461
491
|
var divide = difference / 3;
|
|
@@ -535,7 +565,7 @@ var RowDD = /** @class */ (function () {
|
|
|
535
565
|
RowDD.prototype.addLastRowborder = function (trElement) {
|
|
536
566
|
var isEmptyRow = trElement && (trElement.classList.contains('e-emptyrow') ||
|
|
537
567
|
trElement.classList.contains('e-columnheader') || trElement.classList.contains('e-detailrow'));
|
|
538
|
-
if (trElement && !isEmptyRow && this.parent.
|
|
568
|
+
if (trElement && !isEmptyRow && this.parent.getRows()[this.parent.getCurrentViewRecords().length - 1].getAttribute('data-uid') ===
|
|
539
569
|
trElement.getAttribute('data-uid')) {
|
|
540
570
|
var bottomborder = this.parent.createElement('div', { className: 'e-lastrow-border' });
|
|
541
571
|
var gridcontentEle = this.parent.getContent();
|
|
@@ -877,7 +907,13 @@ var RowDD = /** @class */ (function () {
|
|
|
877
907
|
}
|
|
878
908
|
else {
|
|
879
909
|
args.dropIndex = args.dropIndex === args.fromIndex ? this.getTargetIdx(args.target.parentElement) : args.dropIndex;
|
|
880
|
-
this.
|
|
910
|
+
if (this.parent.enableVirtualization) {
|
|
911
|
+
var index = this.parent.getRowByIndex(args.dropIndex).rowIndex;
|
|
912
|
+
this.droppedRecord = tObj.getCurrentViewRecords()[index];
|
|
913
|
+
}
|
|
914
|
+
else {
|
|
915
|
+
this.droppedRecord = tObj.getCurrentViewRecords()[args.dropIndex];
|
|
916
|
+
}
|
|
881
917
|
}
|
|
882
918
|
var dragRecords = [];
|
|
883
919
|
droppedRecord = this.droppedRecord;
|
|
@@ -954,6 +990,7 @@ var RowDD = /** @class */ (function () {
|
|
|
954
990
|
childRecords.splice(droppedRecordIndex, 0, draggedRecord_2);
|
|
955
991
|
draggedRecord_2.parentItem = droppedRecord.parentItem;
|
|
956
992
|
draggedRecord_2.parentUniqueID = droppedRecord.parentUniqueID;
|
|
993
|
+
draggedRecord_2.level = droppedRecord.level;
|
|
957
994
|
if (this_1.parent.parentIdMapping) {
|
|
958
995
|
draggedRecord_2[this_1.parent.parentIdMapping] = droppedRecord[this_1.parent.parentIdMapping];
|
|
959
996
|
draggedRecord_2.parentItem = droppedRecord.parentItem;
|
|
@@ -245,7 +245,12 @@ var Selection = /** @class */ (function () {
|
|
|
245
245
|
if (indeter > 0 || (checkChildRecords > 0 && checkChildRecords !== length)) {
|
|
246
246
|
record.checkboxState = 'indeterminate';
|
|
247
247
|
}
|
|
248
|
-
else if (checkChildRecords === 0 &&
|
|
248
|
+
else if (checkChildRecords === 0 && (!record.hasFilteredChildRecords || isNullOrUndefined(record.hasFilteredChildRecords)) && !isNullOrUndefined(this.parent['dataResults']['actionArgs']) &&
|
|
249
|
+
(this.parent['dataResults']['actionArgs'].requestType === 'searching' || this.parent['dataResults']['actionArgs'].requestType === 'filtering') && record.checkboxState === 'check') {
|
|
250
|
+
record.checkboxState = 'check';
|
|
251
|
+
}
|
|
252
|
+
else if ((checkChildRecords === 0 && indeter === 0) || (checkChildRecords === 0 && record.hasFilteredChildRecords && !isNullOrUndefined(this.parent['dataResults']['actionArgs']) &&
|
|
253
|
+
(this.parent['dataResults']['actionArgs'].requestType === 'searching' || this.parent['dataResults']['actionArgs'].requestType === 'filtering') && record.checkboxState === 'check')) {
|
|
249
254
|
record.checkboxState = 'uncheck';
|
|
250
255
|
}
|
|
251
256
|
else {
|
|
@@ -66,6 +66,17 @@ var Sort = /** @class */ (function () {
|
|
|
66
66
|
}
|
|
67
67
|
if (data[d].hasChildRecords) {
|
|
68
68
|
var childSort = (new DataManager(data[d].childRecords).executeLocal(srtQry));
|
|
69
|
+
if (this.parent.allowRowDragAndDrop && data[d].childRecords.indexOf(this.parent.rowDragAndDropModule['draggedRecord']) !== -1 && this.parent.rowDragAndDropModule['dropPosition'] !== 'middleSegment') {
|
|
70
|
+
var dragdIndex = childSort.indexOf(this.parent.rowDragAndDropModule['draggedRecord']);
|
|
71
|
+
childSort.splice(dragdIndex, 1);
|
|
72
|
+
var dropdIndex = childSort.indexOf(this.parent.rowDragAndDropModule['droppedRecord']);
|
|
73
|
+
if (this.parent.rowDragAndDropModule['dropPosition'] === 'topSegment') {
|
|
74
|
+
childSort.splice(dropdIndex, 0, this.parent.rowDragAndDropModule['draggedRecord']);
|
|
75
|
+
}
|
|
76
|
+
else if (this.parent.rowDragAndDropModule['dropPosition'] === 'bottomSegment') {
|
|
77
|
+
childSort.splice(dropdIndex + 1, 0, this.parent.rowDragAndDropModule['draggedRecord']);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
69
80
|
this.iterateSort(childSort, srtQry);
|
|
70
81
|
}
|
|
71
82
|
}
|
|
@@ -377,8 +377,8 @@ var DataManipulation = /** @class */ (function () {
|
|
|
377
377
|
if (!Object.prototype.hasOwnProperty.call(currentData, 'index')) {
|
|
378
378
|
currentData.index = this.storedIndex;
|
|
379
379
|
}
|
|
380
|
-
if (!isNullOrUndefined(currentData[this.parent.childMapping]) ||
|
|
381
|
-
(currentData[this.parent.hasChildMapping] && isCountRequired(this.parent))) {
|
|
380
|
+
if ((!isNullOrUndefined(currentData[this.parent.childMapping]) && !isCountRequired(this.parent)) ||
|
|
381
|
+
((currentData[this.parent.hasChildMapping]) && isCountRequired(this.parent) && this.parent.initialRender)) {
|
|
382
382
|
currentData.hasChildRecords = true;
|
|
383
383
|
if (this.parent.enableCollapseAll || !isNullOrUndefined(this.parent.dataStateChange)
|
|
384
384
|
&& isNullOrUndefined(currentData[this.parent.childMapping])) {
|
|
@@ -530,6 +530,18 @@ var DataManipulation = /** @class */ (function () {
|
|
|
530
530
|
srtQry.sortBy(this.parent.grid.sortSettings.columns[srt].field, compFun);
|
|
531
531
|
}
|
|
532
532
|
var modifiedData = new DataManager(parentData).executeLocal(srtQry);
|
|
533
|
+
if (this.parent.allowRowDragAndDrop && !isNullOrUndefined(this.parent.rowDragAndDropModule['draggedRecord']) &&
|
|
534
|
+
this.parent.rowDragAndDropModule['droppedRecord'].hasChildRecords && this.parent.rowDragAndDropModule['dropPosition'] !== 'middleSegment') {
|
|
535
|
+
var dragdIndex = modifiedData.indexOf(this.parent.rowDragAndDropModule['draggedRecord']);
|
|
536
|
+
modifiedData.splice(dragdIndex, 1);
|
|
537
|
+
var dropdIndex = modifiedData.indexOf(this.parent.rowDragAndDropModule['droppedRecord']);
|
|
538
|
+
if (this.parent.rowDragAndDropModule['droppedRecord'].hasChildRecords && this.parent.rowDragAndDropModule['dropPosition'] === 'topSegment') {
|
|
539
|
+
modifiedData.splice(dropdIndex, 0, this.parent.rowDragAndDropModule['draggedRecord']);
|
|
540
|
+
}
|
|
541
|
+
else if (this.parent.rowDragAndDropModule['dropPosition'] === 'bottomSegment') {
|
|
542
|
+
modifiedData.splice(dropdIndex + 1, 0, this.parent.rowDragAndDropModule['draggedRecord']);
|
|
543
|
+
}
|
|
544
|
+
}
|
|
533
545
|
var sortArgs = { modifiedData: modifiedData, filteredData: results, srtQry: srtQry };
|
|
534
546
|
this.parent.notify('createSort', sortArgs);
|
|
535
547
|
results = sortArgs.modifiedData;
|
|
@@ -27,7 +27,6 @@ import { TextWrapSettings } from '../models/textwrap-settings';
|
|
|
27
27
|
import { Logger as TreeLogger } from '../actions/logger';
|
|
28
28
|
import { TreeClipboard } from '../actions/clipboard';
|
|
29
29
|
import { Selection as TreeGridSelection } from '../actions/selection';
|
|
30
|
-
import { Freeze } from '../actions/freeze-column';
|
|
31
30
|
import { Print } from '../actions/print';
|
|
32
31
|
import * as events from '../base/constant';
|
|
33
32
|
import { SearchSettings } from '../models/search-settings';
|
|
@@ -399,7 +398,6 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
399
398
|
TreeGrid.prototype.requiredModules = function () {
|
|
400
399
|
var modules = [];
|
|
401
400
|
var splitFrozenCount = 'splitFrozenCount';
|
|
402
|
-
this.freezeModule = new Freeze(this);
|
|
403
401
|
this.grid[splitFrozenCount](this.getGridColumns(this.columns));
|
|
404
402
|
if (this.isDestroyed) {
|
|
405
403
|
return modules;
|
|
@@ -450,8 +448,11 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
450
448
|
member: 'ExcelExport', args: [this]
|
|
451
449
|
});
|
|
452
450
|
}
|
|
451
|
+
var freezePresent = this.injectedModules.filter(function (e) {
|
|
452
|
+
return e.prototype.getModuleName() === 'freeze';
|
|
453
|
+
});
|
|
453
454
|
if (this.frozenColumns || this.frozenRows || this.getFrozenColumns() ||
|
|
454
|
-
this.grid.getFrozenLeftColumnsCount() || this.grid.getFrozenRightColumnsCount() ||
|
|
455
|
+
this.grid.getFrozenLeftColumnsCount() || this.grid.getFrozenRightColumnsCount() || freezePresent.length) {
|
|
455
456
|
modules.push({
|
|
456
457
|
member: 'freeze', args: [this]
|
|
457
458
|
});
|
|
@@ -1404,6 +1405,9 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
1404
1405
|
gridColumn[prop] = this.getGridColumns(column[i][prop], false, index);
|
|
1405
1406
|
treeGridColumn[prop] = column[i][prop];
|
|
1406
1407
|
}
|
|
1408
|
+
else if (this.initialRender && !isNullOrUndefined(treeColumn) && this.enablePersistence && prop === 'edit') {
|
|
1409
|
+
gridColumn[prop] = treeGridColumn[prop] = treeColumn[prop];
|
|
1410
|
+
}
|
|
1407
1411
|
else if (!(treeColumn) || prop !== 'sortComparer') {
|
|
1408
1412
|
gridColumn[prop] = treeGridColumn[prop] = column[i][prop];
|
|
1409
1413
|
}
|
|
@@ -2965,7 +2969,7 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2965
2969
|
var args = { data: record, row: row };
|
|
2966
2970
|
var rows = [];
|
|
2967
2971
|
rows = gridRows.filter(function (r) {
|
|
2968
|
-
return r.querySelector('.e-gridrowindex' + record.index + 'level' + (record.level + 1));
|
|
2972
|
+
return ((r.querySelector('.e-gridrowindex' + record.index + 'level' + (record.level + 1))) || (r.querySelector('.e-gridrowindex' + record.index + 'level0' + '.e-summarycell')));
|
|
2969
2973
|
});
|
|
2970
2974
|
if (action === 'expand') {
|
|
2971
2975
|
this.notify(events.remoteExpand, { record: record, rows: rows, parentRow: row });
|
|
@@ -47,7 +47,7 @@ var Render = /** @class */ (function () {
|
|
|
47
47
|
var parentrec = this.parent.getCurrentViewRecords().filter(function (rec) {
|
|
48
48
|
return getValue(proxy_1.idMapping, rec) === getValue(proxy_1.parentIdMapping, data);
|
|
49
49
|
});
|
|
50
|
-
if (parentrec.length > 0) {
|
|
50
|
+
if (parentrec.length > 0 && !parentrec[0].isSummaryRow) {
|
|
51
51
|
var display = parentrec[0].expanded ? 'table-row' : 'none';
|
|
52
52
|
args.row.setAttribute('style', 'display: ' + display + ';');
|
|
53
53
|
}
|
|
@@ -296,6 +296,8 @@ var Render = /** @class */ (function () {
|
|
|
296
296
|
var cellRenderer = new CellRenderer(_this.parent.grid, _this.parent.grid.serviceLocator);
|
|
297
297
|
var td = _this.parent.getCellFromIndex(rowsObj[j].index, cellIndex - indent);
|
|
298
298
|
cellRenderer.refreshTD(td, cell, rowsObj[j].data, { index: rowsObj[j][rowIdx] });
|
|
299
|
+
var treecell = _this.parent.getRows()[j].cells[cellIndex];
|
|
300
|
+
_this.cellRender({ data: rowsObj[j].data, cell: treecell, column: cell.column });
|
|
299
301
|
}
|
|
300
302
|
}
|
|
301
303
|
});
|
|
@@ -126,7 +126,7 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
|
|
|
126
126
|
getValue('virtualEle', this).setVirtualHeight(this.parent.getRowHeight() * e.count, '100%');
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
if ((!isNullOrUndefined(e.requestType) && e.requestType.toString() === 'collapseAll') || (this.isDataSourceChanged && this.startIndex === -1)) {
|
|
129
|
+
if ((!isNullOrUndefined(e.requestType) && e.requestType.toString() === 'collapseAll') || (this.isDataSourceChanged && (this.startIndex === -1 || this.startIndex === 0 && this['preStartIndex'] === 0))) {
|
|
130
130
|
this.contents.scrollTop = 0;
|
|
131
131
|
this.isDataSourceChanged = false;
|
|
132
132
|
}
|
|
@@ -356,7 +356,12 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
|
|
|
356
356
|
firsttdinx = +attr; // this.parent.getContent().querySelector('.e-content tr').getAttribute('aria-rowindex');
|
|
357
357
|
}
|
|
358
358
|
if (firsttdinx === 0) {
|
|
359
|
-
this.
|
|
359
|
+
if (this.parent.allowRowDragAndDrop) {
|
|
360
|
+
this.translateY = scrollArgs.offset.top - this.parent.getRowHeight() * 2;
|
|
361
|
+
}
|
|
362
|
+
else {
|
|
363
|
+
this.translateY = scrollArgs.offset.top;
|
|
364
|
+
}
|
|
360
365
|
}
|
|
361
366
|
else {
|
|
362
367
|
var height = this.parent.getRowHeight();
|
|
@@ -382,7 +387,12 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
|
|
|
382
387
|
this.translateY = this.getTranslateY(scrollArgs.offset.top, content.getBoundingClientRect().height);
|
|
383
388
|
}
|
|
384
389
|
else {
|
|
385
|
-
this.
|
|
390
|
+
if (this.parent.allowRowDragAndDrop) {
|
|
391
|
+
this.translateY = scrollArgs.offset.top - this.parent.getRowHeight() * 2;
|
|
392
|
+
}
|
|
393
|
+
else {
|
|
394
|
+
this.translateY = scrollArgs.offset.top;
|
|
395
|
+
}
|
|
386
396
|
}
|
|
387
397
|
}
|
|
388
398
|
if (((downScroll && (scrollArgs.offset.top < (this.parent.getRowHeight() * this.totalRecords)))
|
|
@@ -119,6 +119,15 @@
|
|
|
119
119
|
transform: rotate(360deg);
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
+
.e-treegrid .e-indent::before,
|
|
123
|
+
.e-grid-menu .e-indent::before {
|
|
124
|
+
content: "\e33f";
|
|
125
|
+
}
|
|
126
|
+
.e-treegrid .e-outdent::before,
|
|
127
|
+
.e-grid-menu .e-outdent::before {
|
|
128
|
+
content: "\e35d";
|
|
129
|
+
}
|
|
130
|
+
|
|
122
131
|
.e-treegrid .e-treegridexpand::before,
|
|
123
132
|
.e-treegrid .e-treegridcollapse::before {
|
|
124
133
|
content: "\e22f";
|
package/styles/bootstrap.css
CHANGED
|
@@ -120,6 +120,15 @@
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
/*! component's theme wise override definitions and variables */
|
|
123
|
+
.e-treegrid .e-indent::before,
|
|
124
|
+
.e-grid-menu .e-indent::before {
|
|
125
|
+
content: "\e33f";
|
|
126
|
+
}
|
|
127
|
+
.e-treegrid .e-outdent::before,
|
|
128
|
+
.e-grid-menu .e-outdent::before {
|
|
129
|
+
content: "\e35d";
|
|
130
|
+
}
|
|
131
|
+
|
|
123
132
|
.e-treegrid .e-treegridexpand::before,
|
|
124
133
|
.e-treegrid .e-treegridcollapse::before {
|
|
125
134
|
content: "\e22f";
|
package/styles/bootstrap4.css
CHANGED
|
@@ -161,6 +161,15 @@
|
|
|
161
161
|
transform: rotate(360deg);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
+
.e-treegrid .e-indent::before,
|
|
165
|
+
.e-grid-menu .e-indent::before {
|
|
166
|
+
content: "\e702";
|
|
167
|
+
}
|
|
168
|
+
.e-treegrid .e-outdent::before,
|
|
169
|
+
.e-grid-menu .e-outdent::before {
|
|
170
|
+
content: "\e722";
|
|
171
|
+
}
|
|
172
|
+
|
|
164
173
|
.e-treegrid .e-treegridexpand::before,
|
|
165
174
|
.e-treegrid .e-treegridcollapse::before {
|
|
166
175
|
content: "\e70b";
|
|
@@ -161,6 +161,15 @@
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
/*! Toolbar's bootstrap5 theme wise override definitions and variables */
|
|
164
|
+
.e-treegrid .e-indent::before,
|
|
165
|
+
.e-grid-menu .e-indent::before {
|
|
166
|
+
content: "\e810";
|
|
167
|
+
}
|
|
168
|
+
.e-treegrid .e-outdent::before,
|
|
169
|
+
.e-grid-menu .e-outdent::before {
|
|
170
|
+
content: "\e72a";
|
|
171
|
+
}
|
|
172
|
+
|
|
164
173
|
.e-treegrid .e-treegridexpand::before,
|
|
165
174
|
.e-treegrid .e-treegridcollapse::before {
|
|
166
175
|
content: "\e75c";
|