@syncfusion/ej2-treegrid 27.1.56 → 27.2.2
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/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 +38 -19
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +38 -19
- 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 +9 -9
- package/src/treegrid/actions/edit.d.ts +8 -0
- package/src/treegrid/actions/edit.js +17 -1
- package/src/treegrid/base/treegrid.js +4 -9
- package/src/treegrid/renderer/render.js +1 -1
- package/src/treegrid/renderer/virtual-tree-content-render.js +16 -8
- package/styles/bootstrap-dark-lite.css +1 -1
- package/styles/bootstrap-dark.css +1 -1
- package/styles/bootstrap-lite.css +1 -1
- package/styles/bootstrap.css +1 -1
- package/styles/bootstrap4-lite.css +1 -1
- package/styles/bootstrap4.css +1 -1
- package/styles/bootstrap5-dark-lite.css +1 -1
- package/styles/bootstrap5-dark.css +1 -1
- package/styles/bootstrap5-lite.css +1 -1
- package/styles/bootstrap5.3-lite.css +1 -1
- package/styles/bootstrap5.3.css +1 -1
- package/styles/bootstrap5.css +1 -1
- package/styles/fabric-dark-lite.css +1 -1
- package/styles/fabric-dark.css +1 -1
- package/styles/fabric-lite.css +1 -1
- package/styles/fabric.css +1 -1
- package/styles/fluent-dark-lite.css +1 -1
- package/styles/fluent-dark.css +1 -1
- package/styles/fluent-lite.css +1 -1
- package/styles/fluent.css +1 -1
- package/styles/fluent2-lite.css +2 -3
- package/styles/fluent2.css +2 -3
- package/styles/highcontrast-light-lite.css +1 -1
- package/styles/highcontrast-light.css +1 -1
- package/styles/highcontrast-lite.css +1 -1
- package/styles/highcontrast.css +1 -1
- package/styles/material-dark-lite.css +1 -1
- package/styles/material-dark.css +1 -1
- package/styles/material-lite.css +1 -1
- package/styles/material.css +1 -1
- package/styles/material3-dark-lite.css +1 -1
- package/styles/material3-dark.css +1 -1
- package/styles/material3-lite.css +1 -1
- package/styles/material3.css +1 -1
- package/styles/tailwind-dark-lite.css +1 -1
- package/styles/tailwind-dark.css +1 -1
- package/styles/tailwind-lite.css +1 -1
- package/styles/tailwind.css +1 -1
- package/styles/treegrid/_layout.scss +1 -1
- package/styles/treegrid/bootstrap-dark.css +1 -1
- package/styles/treegrid/bootstrap.css +1 -1
- package/styles/treegrid/bootstrap4.css +1 -1
- package/styles/treegrid/bootstrap5-dark.css +1 -1
- package/styles/treegrid/bootstrap5.3.css +1 -1
- package/styles/treegrid/bootstrap5.css +1 -1
- package/styles/treegrid/fabric-dark.css +1 -1
- package/styles/treegrid/fabric.css +1 -1
- package/styles/treegrid/fluent-dark.css +1 -1
- package/styles/treegrid/fluent.css +1 -1
- package/styles/treegrid/fluent2.css +2 -3
- package/styles/treegrid/highcontrast-light.css +1 -1
- package/styles/treegrid/highcontrast.css +1 -1
- package/styles/treegrid/material-dark.css +1 -1
- package/styles/treegrid/material.css +1 -1
- package/styles/treegrid/material3-dark.css +1 -1
- package/styles/treegrid/material3.css +1 -1
- package/styles/treegrid/tailwind-dark.css +1 -1
- package/styles/treegrid/tailwind.css +1 -1
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 27.
|
|
3
|
+
* version : 27.2.2
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. 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@27.1.
|
|
3
|
+
"_id": "@syncfusion/ej2-treegrid@27.1.57",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-MFAGgIaAJHu1K/QMwDlqJporeiGSTHRBMpis6lWmyHAKT6k7qsrwOBvZj9j4fC93tHscVXtOadPpm5ThdQ0Z7g==",
|
|
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": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-27.1.
|
|
28
|
-
"_shasum": "
|
|
27
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-27.1.57.tgz",
|
|
28
|
+
"_shasum": "ebed313f3536546820413ffb30bb5f278d699632",
|
|
29
29
|
"_spec": "@syncfusion/ej2-treegrid@*",
|
|
30
30
|
"_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included",
|
|
31
31
|
"author": {
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
},
|
|
37
37
|
"bundleDependencies": false,
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@syncfusion/ej2-base": "~27.
|
|
40
|
-
"@syncfusion/ej2-data": "~27.
|
|
41
|
-
"@syncfusion/ej2-grids": "~27.
|
|
42
|
-
"@syncfusion/ej2-popups": "~27.
|
|
39
|
+
"@syncfusion/ej2-base": "~27.2.2",
|
|
40
|
+
"@syncfusion/ej2-data": "~27.2.2",
|
|
41
|
+
"@syncfusion/ej2-grids": "~27.2.2",
|
|
42
|
+
"@syncfusion/ej2-popups": "~27.2.2"
|
|
43
43
|
},
|
|
44
44
|
"deprecated": false,
|
|
45
45
|
"description": "Essential JS 2 TreeGrid Component",
|
|
@@ -76,6 +76,6 @@
|
|
|
76
76
|
"url": "git+https://github.com/syncfusion/ej2-treegrid.git"
|
|
77
77
|
},
|
|
78
78
|
"typings": "index.d.ts",
|
|
79
|
-
"version": "27.
|
|
79
|
+
"version": "27.2.2",
|
|
80
80
|
"sideEffects": false
|
|
81
81
|
}
|
|
@@ -23,6 +23,8 @@ export declare class Edit {
|
|
|
23
23
|
private prevAriaRowIndex;
|
|
24
24
|
private isAddedRowByMethod;
|
|
25
25
|
private isAddedRowByContextMenu;
|
|
26
|
+
private editedRowIndex;
|
|
27
|
+
private isScrollByFocus;
|
|
26
28
|
/**
|
|
27
29
|
* Constructor for Edit module
|
|
28
30
|
*
|
|
@@ -109,4 +111,10 @@ export declare class Edit {
|
|
|
109
111
|
* @returns {void}
|
|
110
112
|
*/
|
|
111
113
|
editCell(rowIndex?: number, field?: string): void;
|
|
114
|
+
/**
|
|
115
|
+
* Cancels edited state.
|
|
116
|
+
*
|
|
117
|
+
* @returns {void}
|
|
118
|
+
*/
|
|
119
|
+
private closeEdit;
|
|
112
120
|
}
|
|
@@ -281,7 +281,7 @@ var Edit = /** @class */ (function () {
|
|
|
281
281
|
this.recordDoubleClick(args);
|
|
282
282
|
}
|
|
283
283
|
if (args.action === 'escape') {
|
|
284
|
-
this.
|
|
284
|
+
this.closeEdit();
|
|
285
285
|
}
|
|
286
286
|
};
|
|
287
287
|
Edit.prototype.deleteUniqueID = function (value) {
|
|
@@ -349,6 +349,9 @@ var Edit = /** @class */ (function () {
|
|
|
349
349
|
Edit.prototype.batchCancel = function () {
|
|
350
350
|
if (this.parent.editSettings.mode === 'Cell') {
|
|
351
351
|
var cellDetails = getValue('editModule.cellDetails', this.parent.grid.editModule);
|
|
352
|
+
if (!isNullOrUndefined(this.editedRowIndex)) {
|
|
353
|
+
cellDetails.rowIndex = this.editedRowIndex;
|
|
354
|
+
}
|
|
352
355
|
var treeCell = this.parent.getCellFromIndex(cellDetails.rowIndex, this.parent.treeColumnIndex);
|
|
353
356
|
this.parent.renderModule.cellRender({
|
|
354
357
|
data: cellDetails.rowData,
|
|
@@ -670,6 +673,7 @@ var Edit = /** @class */ (function () {
|
|
|
670
673
|
this.prevAriaRowIndex = '-1';
|
|
671
674
|
}
|
|
672
675
|
if (!this.parent.enableVirtualization || this.parent.enableVirtualization && !Object.keys(this.parent.grid.contentModule['emptyRowData']).length) {
|
|
676
|
+
this.isScrollByFocus = true;
|
|
673
677
|
focussedElement.focus();
|
|
674
678
|
}
|
|
675
679
|
if (this.parent.enableVirtualization && !Object.keys(this.parent.grid.contentModule['emptyRowData']).length) {
|
|
@@ -1053,6 +1057,18 @@ var Edit = /** @class */ (function () {
|
|
|
1053
1057
|
this.parent.grid.editModule.editCell(rowIndex, field);
|
|
1054
1058
|
}
|
|
1055
1059
|
};
|
|
1060
|
+
/**
|
|
1061
|
+
* Cancels edited state.
|
|
1062
|
+
*
|
|
1063
|
+
* @returns {void}
|
|
1064
|
+
*/
|
|
1065
|
+
Edit.prototype.closeEdit = function () {
|
|
1066
|
+
if (this.parent.enableVirtualization && this.parent.grid.editSettings.mode === 'Batch' && this.parent.grid.pageSettings.currentPage > 1) {
|
|
1067
|
+
this.editedRowIndex = this.parent.grid.editModule.editModule['cellDetails'].rowIndex;
|
|
1068
|
+
this.parent.grid.editModule.editModule['cellDetails'].rowIndex = parseInt(this.parent.getRows()[this.parent.grid.editModule.editModule['cellDetails'].rowIndex].getAttribute('data-rowIndex'), 10);
|
|
1069
|
+
}
|
|
1070
|
+
this.parent.grid.editModule.closeEdit();
|
|
1071
|
+
};
|
|
1056
1072
|
return Edit;
|
|
1057
1073
|
}());
|
|
1058
1074
|
export { Edit };
|
|
@@ -1059,13 +1059,6 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
1059
1059
|
if (_this.pageSettings.pageSizeMode === 'Root') {
|
|
1060
1060
|
_this.grid.selectionModule['totalRecordsCount'] = _this.grid.currentViewData.length;
|
|
1061
1061
|
}
|
|
1062
|
-
if (_this.enableVirtualization && args.rowIndex === _this.selectedRowIndex && !_this.enablePersistence) {
|
|
1063
|
-
args.cancel = true;
|
|
1064
|
-
}
|
|
1065
|
-
if (!isNullOrUndefined(_this.selectionSettings) && !_this.selectionSettings.persistSelection &&
|
|
1066
|
-
_this.enableVirtualization && args.rowIndex === _this.selectedRowIndex && _this.isGantt) {
|
|
1067
|
-
args.cancel = false;
|
|
1068
|
-
}
|
|
1069
1062
|
_this.trigger(events.rowSelecting, args);
|
|
1070
1063
|
};
|
|
1071
1064
|
this.grid.rowDeselecting = function (args) {
|
|
@@ -2242,7 +2235,7 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
2242
2235
|
*/
|
|
2243
2236
|
TreeGrid.prototype.closeEdit = function () {
|
|
2244
2237
|
if (this.grid.editModule) {
|
|
2245
|
-
this.
|
|
2238
|
+
this.editModule['closeEdit']();
|
|
2246
2239
|
}
|
|
2247
2240
|
};
|
|
2248
2241
|
/**
|
|
@@ -3947,7 +3940,9 @@ var TreeGrid = /** @class */ (function (_super) {
|
|
|
3947
3940
|
* @returns {void}
|
|
3948
3941
|
*/
|
|
3949
3942
|
TreeGrid.prototype.clearSelection = function () {
|
|
3950
|
-
this.grid.selectionModule
|
|
3943
|
+
if (!isNullOrUndefined(this.grid.selectionModule)) {
|
|
3944
|
+
this.grid.selectionModule['actualTarget'] = null;
|
|
3945
|
+
}
|
|
3951
3946
|
this.grid.clearSelection();
|
|
3952
3947
|
};
|
|
3953
3948
|
/**
|
|
@@ -359,7 +359,7 @@ var Render = /** @class */ (function () {
|
|
|
359
359
|
var cellRenderer = new CellRenderer(_this.parent.grid, _this.parent.grid.serviceLocator);
|
|
360
360
|
var td = rows.length >= rowsObj.length
|
|
361
361
|
? _this.parent.getCellFromIndex(rowsObj[parseInt(j.toString(), 10)].index, cellIndex - indent)
|
|
362
|
-
:
|
|
362
|
+
: rows[rowsObj[parseInt(j.toString(), 10)].index].querySelector('.e-templatecell');
|
|
363
363
|
cellRenderer.refreshTD(td, cell, rowsObj[parseInt(j.toString(), 10)].data, { index: rowsObj[parseInt(j.toString(), 10)]["" + rowIdx] });
|
|
364
364
|
var treecell = _this.parent.getRows()[parseInt(j.toString(), 10)]
|
|
365
365
|
.cells[parseInt(cellIndex.toString(), 10)];
|
|
@@ -45,9 +45,12 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
|
|
|
45
45
|
if (this.parent.enableVirtualization && this.parent.isFrozenGrid()) {
|
|
46
46
|
return this.getRowCollection(index, true);
|
|
47
47
|
}
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
var dataRows = this.parent.getDataRows();
|
|
49
|
+
var targetRow = dataRows.find(function (e) { return parseInt(e.getAttribute('data-rowindex'), 10) === index; });
|
|
50
|
+
if (!targetRow && this.parent.isEdit && this.parent.editSettings.mode === 'Batch') {
|
|
51
|
+
return index != null ? this.parent.getRows()[parseInt(index.toString(), 10)] : undefined;
|
|
50
52
|
}
|
|
53
|
+
return targetRow;
|
|
51
54
|
};
|
|
52
55
|
VirtualTreeContentRenderer.prototype.getFrozenRightVirtualRowByIndex = function (index) {
|
|
53
56
|
return this.getRowCollection(index, false, false, true);
|
|
@@ -407,7 +410,7 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
|
|
|
407
410
|
content = this.parent.getContent().querySelector('.e-content');
|
|
408
411
|
}
|
|
409
412
|
var scrollHeight = outBuffer * rowHeight;
|
|
410
|
-
var upScroll = (scrollArgs.offset.top - this.translateY)
|
|
413
|
+
var upScroll = (scrollArgs.offset.top - this.translateY) < 0;
|
|
411
414
|
var downScroll = Math.ceil(scrollArgs.offset.top - this.translateY) + rowHeight >= scrollHeight;
|
|
412
415
|
var selectedRowIndex = 'selectedRowIndex';
|
|
413
416
|
var currentViewData = this.parent.currentViewData;
|
|
@@ -420,8 +423,7 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
|
|
|
420
423
|
- this.parent.pageSettings.pageSize;
|
|
421
424
|
index = (index > 0) ? index : 0;
|
|
422
425
|
if (!isNullOrUndefined(this["" + selectedRowIndex]) && this["" + selectedRowIndex] !== -1 && index !== this["" + selectedRowIndex] &&
|
|
423
|
-
((this.parent.rowHeight * this.parent.pageSettings.pageSize) < content.scrollTop)
|
|
424
|
-
!(this.parent.root && this.parent.root.treeGrid && this.parent.root.treeGrid.isGantt)) {
|
|
426
|
+
((this.parent.rowHeight * this.parent.pageSettings.pageSize) < content.scrollTop)) {
|
|
425
427
|
index = this["" + selectedRowIndex];
|
|
426
428
|
}
|
|
427
429
|
this.startIndex = index;
|
|
@@ -448,8 +450,9 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
|
|
|
448
450
|
firsttdinx = +attr; // this.parent.getContent().querySelector('.e-content tr').getAttribute('data-rowindex');
|
|
449
451
|
}
|
|
450
452
|
if (firsttdinx === 0) {
|
|
451
|
-
this.translateY = (
|
|
452
|
-
|
|
453
|
+
this.translateY = !isNullOrUndefined(this.endIndex) ?
|
|
454
|
+
(this.endIndex - this.parent.pageSettings.pageSize) * (this.parent.rowHeight ?
|
|
455
|
+
this.parent.rowHeight : this.parent.getRowHeight()) : 0;
|
|
453
456
|
}
|
|
454
457
|
else if (this.parent.getFrozenColumns() > 0) {
|
|
455
458
|
scrollArgs.offset.top = scrollArgs.offset.top + 80;
|
|
@@ -465,7 +468,7 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
|
|
|
465
468
|
var nextSetResIndex = ~~(content.scrollTop / rowHeight);
|
|
466
469
|
var isLastBlock = (this["" + selectedRowIndex] + this.parent.pageSettings.pageSize) < this.totalRecords ? false : true;
|
|
467
470
|
if (!isNullOrUndefined(this["" + selectedRowIndex]) && this["" + selectedRowIndex] !== -1 &&
|
|
468
|
-
nextSetResIndex !== this["" + selectedRowIndex] && !isLastBlock
|
|
471
|
+
nextSetResIndex !== this["" + selectedRowIndex] && !isLastBlock) {
|
|
469
472
|
nextSetResIndex = this["" + selectedRowIndex];
|
|
470
473
|
}
|
|
471
474
|
var lastIndex = nextSetResIndex + this.parent.pageSettings.pageSize;
|
|
@@ -652,7 +655,12 @@ var TreeInterSectionObserver = /** @class */ (function (_super) {
|
|
|
652
655
|
var debounced100 = debounce(callback, delay);
|
|
653
656
|
var debounced50 = debounce(callback, 50);
|
|
654
657
|
this["" + options].prevTop = this["" + options].prevLeft = 0;
|
|
658
|
+
var isScrollByFocus = 'isScrollByFocus';
|
|
655
659
|
return function (e) {
|
|
660
|
+
if (instance.isEdit && instance.root.editModule["" + isScrollByFocus]) {
|
|
661
|
+
instance.root.editModule["" + isScrollByFocus] = false;
|
|
662
|
+
return;
|
|
663
|
+
}
|
|
656
664
|
var top = _this["" + options].movableContainer ? _this["" + options].container.scrollTop : e.target.scrollTop;
|
|
657
665
|
var left = _this["" + options].movableContainer ? _this["" + options].scrollbar.scrollLeft : e.target.scrollLeft;
|
|
658
666
|
var direction = _this["" + options].prevTop < top ? 'down' : 'up';
|
package/styles/bootstrap.css
CHANGED
package/styles/bootstrap4.css
CHANGED
package/styles/bootstrap5.3.css
CHANGED
package/styles/bootstrap5.css
CHANGED
package/styles/fabric-dark.css
CHANGED
package/styles/fabric-lite.css
CHANGED
package/styles/fabric.css
CHANGED
package/styles/fluent-dark.css
CHANGED
package/styles/fluent-lite.css
CHANGED
package/styles/fluent.css
CHANGED
package/styles/fluent2-lite.css
CHANGED
|
@@ -260,8 +260,7 @@
|
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
.e-dlg-overlay {
|
|
263
|
-
|
|
264
|
-
backdrop-filter: blur(2px) !important;
|
|
263
|
+
backdrop-filter: blur(2px) !important;
|
|
265
264
|
}
|
|
266
265
|
|
|
267
266
|
.e-dialog .e-dlg-header-content .e-btn.e-dlg-closeicon-btn:hover,
|
|
@@ -353,7 +352,7 @@
|
|
|
353
352
|
text-align: center;
|
|
354
353
|
vertical-align: unset;
|
|
355
354
|
}
|
|
356
|
-
.e-treegrid tr.e-
|
|
355
|
+
.e-treegrid tr.e-childrow-hidden {
|
|
357
356
|
display: none;
|
|
358
357
|
}
|
|
359
358
|
.e-treegrid .e-rowcell:not(.e-gridclip) .e-treecolumn-container {
|
package/styles/fluent2.css
CHANGED
|
@@ -260,8 +260,7 @@
|
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
.e-dlg-overlay {
|
|
263
|
-
|
|
264
|
-
backdrop-filter: blur(2px) !important;
|
|
263
|
+
backdrop-filter: blur(2px) !important;
|
|
265
264
|
}
|
|
266
265
|
|
|
267
266
|
.e-dialog .e-dlg-header-content .e-btn.e-dlg-closeicon-btn:hover,
|
|
@@ -353,7 +352,7 @@
|
|
|
353
352
|
text-align: center;
|
|
354
353
|
vertical-align: unset;
|
|
355
354
|
}
|
|
356
|
-
.e-treegrid tr.e-
|
|
355
|
+
.e-treegrid tr.e-childrow-hidden {
|
|
357
356
|
display: none;
|
|
358
357
|
}
|
|
359
358
|
.e-treegrid .e-rowcell:not(.e-gridclip) .e-treecolumn-container {
|
package/styles/highcontrast.css
CHANGED
package/styles/material-dark.css
CHANGED
package/styles/material-lite.css
CHANGED
package/styles/material.css
CHANGED
package/styles/material3.css
CHANGED
package/styles/tailwind-dark.css
CHANGED
package/styles/tailwind-lite.css
CHANGED
package/styles/tailwind.css
CHANGED