@syncfusion/ej2-treegrid 19.4.52 → 19.4.54
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 +12 -0
- package/README.md +1 -1
- 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 +41 -11
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +41 -11
- 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/crud-actions.js +5 -0
- package/src/treegrid/actions/rowdragdrop.js +11 -0
- package/src/treegrid/actions/toolbar.js +17 -7
- package/src/treegrid/base/treegrid.js +8 -4
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 19.4.
|
|
3
|
+
* version : 19.4.54
|
|
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@19.4.
|
|
3
|
+
"_id": "@syncfusion/ej2-treegrid@19.4.52",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-B6Doo437VJTVspTB15gVZ40BpaqThNJQJ6/Gl/Ei7zTnJY6Tg/NEyW8hajktphWX264WotqDWdruY1UfNY6pkA==",
|
|
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-19.4.
|
|
28
|
-
"_shasum": "
|
|
27
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-19.4.52.tgz",
|
|
28
|
+
"_shasum": "88f378640e61e1f0fb7be34f3f84685a3b015430",
|
|
29
29
|
"_spec": "@syncfusion/ej2-treegrid@*",
|
|
30
30
|
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
|
|
31
31
|
"author": {
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"bundleDependencies": false,
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@syncfusion/ej2-base": "~19.4.52",
|
|
40
|
-
"@syncfusion/ej2-data": "~19.4.
|
|
41
|
-
"@syncfusion/ej2-grids": "~19.4.
|
|
42
|
-
"@syncfusion/ej2-popups": "~19.4.
|
|
40
|
+
"@syncfusion/ej2-data": "~19.4.54",
|
|
41
|
+
"@syncfusion/ej2-grids": "~19.4.54",
|
|
42
|
+
"@syncfusion/ej2-popups": "~19.4.53"
|
|
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": "19.4.
|
|
63
|
+
"version": "19.4.54",
|
|
64
64
|
"sideEffects": false
|
|
65
65
|
}
|
|
@@ -381,6 +381,11 @@ export function updateParentRow(key, record, action, control, isSelfReference, c
|
|
|
381
381
|
column: control.grid.getColumns()[control.treeColumnIndex],
|
|
382
382
|
requestType: action
|
|
383
383
|
});
|
|
384
|
+
if (control.enableImmutableMode && control['action'] === 'indenting' || control['action'] === 'outdenting') {
|
|
385
|
+
control.renderModule.RowModifier({
|
|
386
|
+
data: record, row: row
|
|
387
|
+
});
|
|
388
|
+
}
|
|
384
389
|
}
|
|
385
390
|
}
|
|
386
391
|
}
|
|
@@ -60,6 +60,7 @@ var RowDD = /** @class */ (function () {
|
|
|
60
60
|
*/
|
|
61
61
|
RowDD.prototype.reorderRows = function (fromIndexes, toIndex, position) {
|
|
62
62
|
var tObj = this.parent;
|
|
63
|
+
var action = 'action';
|
|
63
64
|
if (fromIndexes[0] !== toIndex && ['above', 'below', 'child'].indexOf(position) !== -1) {
|
|
64
65
|
if (position === 'above') {
|
|
65
66
|
this.dropPosition = 'topSegment';
|
|
@@ -86,6 +87,11 @@ var RowDD = /** @class */ (function () {
|
|
|
86
87
|
if (tObj.isLocalData) {
|
|
87
88
|
tObj.flatData = this.orderToIndex(tObj.flatData);
|
|
88
89
|
}
|
|
90
|
+
if (this.parent[action] === 'outdenting') {
|
|
91
|
+
if (!isNullOrUndefined(data[0].parentItem)) {
|
|
92
|
+
data[0].level = data[0].parentItem.level + 1;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
89
95
|
this.parent.grid.refresh();
|
|
90
96
|
if (this.parent.enableImmutableMode && this.dropPosition === 'middleSegment') {
|
|
91
97
|
var index = this.parent.treeColumnIndex + 1;
|
|
@@ -106,6 +112,11 @@ var RowDD = /** @class */ (function () {
|
|
|
106
112
|
column: this.parent.grid.getColumns()[this.parent.treeColumnIndex],
|
|
107
113
|
requestType: 'rowDragAndDrop'
|
|
108
114
|
});
|
|
115
|
+
if (this.parent[action] === 'indenting' || this.parent[action] === 'outdenting') {
|
|
116
|
+
this.parent.renderModule.RowModifier({
|
|
117
|
+
data: totalRecord[i], row: rows[i]
|
|
118
|
+
});
|
|
119
|
+
}
|
|
109
120
|
}
|
|
110
121
|
}
|
|
111
122
|
}
|
|
@@ -27,6 +27,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
27
27
|
*/
|
|
28
28
|
Toolbar.prototype.addEventListener = function () {
|
|
29
29
|
this.parent.on(events.rowSelected, this.refreshToolbar, this);
|
|
30
|
+
this.parent.on(events.rowDeselected, this.refreshToolbar, this);
|
|
30
31
|
this.parent.on(events.toolbarClick, this.toolbarClickHandler, this);
|
|
31
32
|
};
|
|
32
33
|
/**
|
|
@@ -38,6 +39,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
38
39
|
return;
|
|
39
40
|
}
|
|
40
41
|
this.parent.off(events.rowSelected, this.refreshToolbar);
|
|
42
|
+
this.parent.off(events.rowDeselected, this.refreshToolbar);
|
|
41
43
|
this.parent.off(events.toolbarClick, this.toolbarClickHandler);
|
|
42
44
|
};
|
|
43
45
|
Toolbar.prototype.refreshToolbar = function (args) {
|
|
@@ -45,7 +47,7 @@ var Toolbar = /** @class */ (function () {
|
|
|
45
47
|
if (args.row.rowIndex === 0 || tObj.getSelectedRecords().length > 1) {
|
|
46
48
|
this.enableItems([tObj.element.id + '_gridcontrol_indent', tObj.element.id + '_gridcontrol_outdent'], false);
|
|
47
49
|
}
|
|
48
|
-
else {
|
|
50
|
+
else if (args['name'] !== "rowDeselected") {
|
|
49
51
|
if (!isNullOrUndefined(tObj.getCurrentViewRecords()[args.row.rowIndex])) {
|
|
50
52
|
if (!isNullOrUndefined(tObj.getCurrentViewRecords()[args.row.rowIndex]) &&
|
|
51
53
|
(tObj.getCurrentViewRecords()[args.row.rowIndex].level >
|
|
@@ -67,6 +69,14 @@ var Toolbar = /** @class */ (function () {
|
|
|
67
69
|
}
|
|
68
70
|
}
|
|
69
71
|
}
|
|
72
|
+
if (args['name'] === "rowDeselected") {
|
|
73
|
+
if (this.parent.toolbar['includes']('Indent')) {
|
|
74
|
+
this.enableItems([tObj.element.id + '_gridcontrol_indent'], false);
|
|
75
|
+
}
|
|
76
|
+
if (this.parent.toolbar['includes']('Outdent')) {
|
|
77
|
+
this.enableItems([tObj.element.id + '_gridcontrol_outdent'], false);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
70
80
|
if (args.row.rowIndex === 0 && !isNullOrUndefined(args.data.parentItem)) {
|
|
71
81
|
this.enableItems([tObj.element.id + '_gridcontrol_outdent'], true);
|
|
72
82
|
}
|
|
@@ -98,8 +108,8 @@ var Toolbar = /** @class */ (function () {
|
|
|
98
108
|
else {
|
|
99
109
|
dropIndex = tObj.getSelectedRowIndexes()[0] - 1;
|
|
100
110
|
}
|
|
101
|
-
this.parent[action] = '
|
|
102
|
-
this.eventTrigger('
|
|
111
|
+
this.parent[action] = 'indenting';
|
|
112
|
+
this.eventTrigger('indenting', dropIndex);
|
|
103
113
|
}
|
|
104
114
|
if (args.item.id === tObj.grid.element.id + '_outdent' && tObj.getSelectedRecords().length) {
|
|
105
115
|
var dropIndex = void 0;
|
|
@@ -109,8 +119,8 @@ var Toolbar = /** @class */ (function () {
|
|
|
109
119
|
dropIndex = i;
|
|
110
120
|
}
|
|
111
121
|
}
|
|
112
|
-
this.parent[action] = '
|
|
113
|
-
this.eventTrigger('
|
|
122
|
+
this.parent[action] = 'outdenting';
|
|
123
|
+
this.eventTrigger('outdenting', dropIndex);
|
|
114
124
|
}
|
|
115
125
|
};
|
|
116
126
|
Toolbar.prototype.eventTrigger = function (action, dropIndex) {
|
|
@@ -127,10 +137,10 @@ var Toolbar = /** @class */ (function () {
|
|
|
127
137
|
};
|
|
128
138
|
this.parent.trigger(events.actionBegin, actionArgs, function (actionArgs) {
|
|
129
139
|
if (!actionArgs.cancel) {
|
|
130
|
-
if (actionArgs.requestType === '
|
|
140
|
+
if (actionArgs.requestType === 'indenting') {
|
|
131
141
|
_this.parent.reorderRows([_this.parent.getSelectedRowIndexes()[0]], dropIndex, 'child');
|
|
132
142
|
}
|
|
133
|
-
else if (actionArgs.requestType === '
|
|
143
|
+
else if (actionArgs.requestType === 'outdenting') {
|
|
134
144
|
_this.parent.reorderRows([_this.parent.getSelectedRowIndexes()[0]], dropIndex, 'below');
|
|
135
145
|
}
|
|
136
146
|
}
|
|
@@ -743,6 +743,9 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
743
743
|
};
|
|
744
744
|
this.grid.rowDeselected = function (args) {
|
|
745
745
|
_this.selectedRowIndex = _this.grid.selectedRowIndex;
|
|
746
|
+
if (!isNullOrUndefined(args.data)) {
|
|
747
|
+
_this.notify(events.rowDeselected, args);
|
|
748
|
+
}
|
|
746
749
|
_this.trigger(events.rowDeselected, args);
|
|
747
750
|
};
|
|
748
751
|
this.grid.resizeStop = function (args) {
|
|
@@ -1061,7 +1064,7 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
1061
1064
|
_this.grid.query = _this.grid.query instanceof Query ? _this.grid.query : new Query();
|
|
1062
1065
|
}
|
|
1063
1066
|
}
|
|
1064
|
-
if (_this.action !== '
|
|
1067
|
+
if (_this.action !== 'indenting' && _this.action !== 'outdenting') {
|
|
1065
1068
|
var callBackPromise_2 = new Deferred();
|
|
1066
1069
|
_this.trigger(events.actionBegin, args, function (actionArgs) {
|
|
1067
1070
|
if (!actionArgs.cancel) {
|
|
@@ -1090,7 +1093,8 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
1090
1093
|
if (args.requestType === 'save' && _this.aggregates.map(function (ag) { return ag.showChildSummary === true; }).length) {
|
|
1091
1094
|
_this.grid.refresh();
|
|
1092
1095
|
}
|
|
1093
|
-
if (_this.action === '
|
|
1096
|
+
if (_this.action === 'indenting' || _this.action === 'outdenting') {
|
|
1097
|
+
_this.action = _this.action === 'indenting' ? 'indented' : 'outdented';
|
|
1094
1098
|
var actionArgs = {
|
|
1095
1099
|
requestType: _this.action,
|
|
1096
1100
|
data: _this.selectedRecords,
|
|
@@ -1302,7 +1306,7 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
1302
1306
|
case ToolbarItem.RowIndent:
|
|
1303
1307
|
tooltipText = this.l10n.getConstant('RowIndent');
|
|
1304
1308
|
items.push({
|
|
1305
|
-
text: tooltipText, tooltipText: tooltipText,
|
|
1309
|
+
text: tooltipText, tooltipText: tooltipText, disabled: true,
|
|
1306
1310
|
prefixIcon: 'e-indent', id: this.element.id + '_gridcontrol_indent'
|
|
1307
1311
|
});
|
|
1308
1312
|
break;
|
|
@@ -1310,7 +1314,7 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
1310
1314
|
case ToolbarItem.RowOutdent:
|
|
1311
1315
|
tooltipText = this.l10n.getConstant('RowOutdent');
|
|
1312
1316
|
items.push({
|
|
1313
|
-
text: tooltipText, tooltipText: tooltipText,
|
|
1317
|
+
text: tooltipText, tooltipText: tooltipText, disabled: true,
|
|
1314
1318
|
prefixIcon: 'e-outdent', id: this.element.id + '_gridcontrol_outdent'
|
|
1315
1319
|
});
|
|
1316
1320
|
break;
|