@syncfusion/ej2-treegrid 27.1.57 → 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 +34 -13
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +34 -13
- 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 -6
- package/src/treegrid/renderer/render.js +1 -1
- package/src/treegrid/renderer/virtual-tree-content-render.js +12 -5
- 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
|
@@ -2013,7 +2013,7 @@ var Render = /** @__PURE__ @class */ (function () {
|
|
|
2013
2013
|
var cellRenderer = new CellRenderer(_this.parent.grid, _this.parent.grid.serviceLocator);
|
|
2014
2014
|
var td = rows.length >= rowsObj.length
|
|
2015
2015
|
? _this.parent.getCellFromIndex(rowsObj[parseInt(j.toString(), 10)].index, cellIndex - indent)
|
|
2016
|
-
:
|
|
2016
|
+
: rows[rowsObj[parseInt(j.toString(), 10)].index].querySelector('.e-templatecell');
|
|
2017
2017
|
cellRenderer.refreshTD(td, cell, rowsObj[parseInt(j.toString(), 10)].data, { index: rowsObj[parseInt(j.toString(), 10)]["" + rowIdx] });
|
|
2018
2018
|
var treecell = _this.parent.getRows()[parseInt(j.toString(), 10)]
|
|
2019
2019
|
.cells[parseInt(cellIndex.toString(), 10)];
|
|
@@ -4723,10 +4723,6 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
4723
4723
|
if (_this.pageSettings.pageSizeMode === 'Root') {
|
|
4724
4724
|
_this.grid.selectionModule['totalRecordsCount'] = _this.grid.currentViewData.length;
|
|
4725
4725
|
}
|
|
4726
|
-
if (!isNullOrUndefined(_this.selectionSettings) && !_this.selectionSettings.persistSelection &&
|
|
4727
|
-
_this.enableVirtualization && args.rowIndex === _this.selectedRowIndex && _this.isGantt) {
|
|
4728
|
-
args.cancel = false;
|
|
4729
|
-
}
|
|
4730
4726
|
_this.trigger(rowSelecting, args);
|
|
4731
4727
|
};
|
|
4732
4728
|
this.grid.rowDeselecting = function (args) {
|
|
@@ -5903,7 +5899,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
5903
5899
|
*/
|
|
5904
5900
|
TreeGrid.prototype.closeEdit = function () {
|
|
5905
5901
|
if (this.grid.editModule) {
|
|
5906
|
-
this.
|
|
5902
|
+
this.editModule['closeEdit']();
|
|
5907
5903
|
}
|
|
5908
5904
|
};
|
|
5909
5905
|
/**
|
|
@@ -7608,7 +7604,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
7608
7604
|
* @returns {void}
|
|
7609
7605
|
*/
|
|
7610
7606
|
TreeGrid.prototype.clearSelection = function () {
|
|
7611
|
-
this.grid.selectionModule
|
|
7607
|
+
if (!isNullOrUndefined(this.grid.selectionModule)) {
|
|
7608
|
+
this.grid.selectionModule['actualTarget'] = null;
|
|
7609
|
+
}
|
|
7612
7610
|
this.grid.clearSelection();
|
|
7613
7611
|
};
|
|
7614
7612
|
/**
|
|
@@ -12377,7 +12375,7 @@ var Edit = /** @__PURE__ @class */ (function () {
|
|
|
12377
12375
|
this.recordDoubleClick(args);
|
|
12378
12376
|
}
|
|
12379
12377
|
if (args.action === 'escape') {
|
|
12380
|
-
this.
|
|
12378
|
+
this.closeEdit();
|
|
12381
12379
|
}
|
|
12382
12380
|
};
|
|
12383
12381
|
Edit.prototype.deleteUniqueID = function (value) {
|
|
@@ -12445,6 +12443,9 @@ var Edit = /** @__PURE__ @class */ (function () {
|
|
|
12445
12443
|
Edit.prototype.batchCancel = function () {
|
|
12446
12444
|
if (this.parent.editSettings.mode === 'Cell') {
|
|
12447
12445
|
var cellDetails = getValue('editModule.cellDetails', this.parent.grid.editModule);
|
|
12446
|
+
if (!isNullOrUndefined(this.editedRowIndex)) {
|
|
12447
|
+
cellDetails.rowIndex = this.editedRowIndex;
|
|
12448
|
+
}
|
|
12448
12449
|
var treeCell = this.parent.getCellFromIndex(cellDetails.rowIndex, this.parent.treeColumnIndex);
|
|
12449
12450
|
this.parent.renderModule.cellRender({
|
|
12450
12451
|
data: cellDetails.rowData,
|
|
@@ -12766,6 +12767,7 @@ var Edit = /** @__PURE__ @class */ (function () {
|
|
|
12766
12767
|
this.prevAriaRowIndex = '-1';
|
|
12767
12768
|
}
|
|
12768
12769
|
if (!this.parent.enableVirtualization || this.parent.enableVirtualization && !Object.keys(this.parent.grid.contentModule['emptyRowData']).length) {
|
|
12770
|
+
this.isScrollByFocus = true;
|
|
12769
12771
|
focussedElement.focus();
|
|
12770
12772
|
}
|
|
12771
12773
|
if (this.parent.enableVirtualization && !Object.keys(this.parent.grid.contentModule['emptyRowData']).length) {
|
|
@@ -13149,6 +13151,18 @@ var Edit = /** @__PURE__ @class */ (function () {
|
|
|
13149
13151
|
this.parent.grid.editModule.editCell(rowIndex, field);
|
|
13150
13152
|
}
|
|
13151
13153
|
};
|
|
13154
|
+
/**
|
|
13155
|
+
* Cancels edited state.
|
|
13156
|
+
*
|
|
13157
|
+
* @returns {void}
|
|
13158
|
+
*/
|
|
13159
|
+
Edit.prototype.closeEdit = function () {
|
|
13160
|
+
if (this.parent.enableVirtualization && this.parent.grid.editSettings.mode === 'Batch' && this.parent.grid.pageSettings.currentPage > 1) {
|
|
13161
|
+
this.editedRowIndex = this.parent.grid.editModule.editModule['cellDetails'].rowIndex;
|
|
13162
|
+
this.parent.grid.editModule.editModule['cellDetails'].rowIndex = parseInt(this.parent.getRows()[this.parent.grid.editModule.editModule['cellDetails'].rowIndex].getAttribute('data-rowIndex'), 10);
|
|
13163
|
+
}
|
|
13164
|
+
this.parent.grid.editModule.closeEdit();
|
|
13165
|
+
};
|
|
13152
13166
|
return Edit;
|
|
13153
13167
|
}());
|
|
13154
13168
|
|
|
@@ -13338,9 +13352,12 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
13338
13352
|
if (this.parent.enableVirtualization && this.parent.isFrozenGrid()) {
|
|
13339
13353
|
return this.getRowCollection(index, true);
|
|
13340
13354
|
}
|
|
13341
|
-
|
|
13342
|
-
|
|
13355
|
+
var dataRows = this.parent.getDataRows();
|
|
13356
|
+
var targetRow = dataRows.find(function (e) { return parseInt(e.getAttribute('data-rowindex'), 10) === index; });
|
|
13357
|
+
if (!targetRow && this.parent.isEdit && this.parent.editSettings.mode === 'Batch') {
|
|
13358
|
+
return index != null ? this.parent.getRows()[parseInt(index.toString(), 10)] : undefined;
|
|
13343
13359
|
}
|
|
13360
|
+
return targetRow;
|
|
13344
13361
|
};
|
|
13345
13362
|
VirtualTreeContentRenderer.prototype.getFrozenRightVirtualRowByIndex = function (index) {
|
|
13346
13363
|
return this.getRowCollection(index, false, false, true);
|
|
@@ -13713,8 +13730,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
13713
13730
|
- this.parent.pageSettings.pageSize;
|
|
13714
13731
|
index = (index > 0) ? index : 0;
|
|
13715
13732
|
if (!isNullOrUndefined(this["" + selectedRowIndex]) && this["" + selectedRowIndex] !== -1 && index !== this["" + selectedRowIndex] &&
|
|
13716
|
-
((this.parent.rowHeight * this.parent.pageSettings.pageSize) < content.scrollTop)
|
|
13717
|
-
!(this.parent.root && this.parent.root.treeGrid && this.parent.root.treeGrid.isGantt)) {
|
|
13733
|
+
((this.parent.rowHeight * this.parent.pageSettings.pageSize) < content.scrollTop)) {
|
|
13718
13734
|
index = this["" + selectedRowIndex];
|
|
13719
13735
|
}
|
|
13720
13736
|
this.startIndex = index;
|
|
@@ -13759,7 +13775,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
13759
13775
|
var nextSetResIndex = ~~(content.scrollTop / rowHeight);
|
|
13760
13776
|
var isLastBlock = (this["" + selectedRowIndex] + this.parent.pageSettings.pageSize) < this.totalRecords ? false : true;
|
|
13761
13777
|
if (!isNullOrUndefined(this["" + selectedRowIndex]) && this["" + selectedRowIndex] !== -1 &&
|
|
13762
|
-
nextSetResIndex !== this["" + selectedRowIndex] && !isLastBlock
|
|
13778
|
+
nextSetResIndex !== this["" + selectedRowIndex] && !isLastBlock) {
|
|
13763
13779
|
nextSetResIndex = this["" + selectedRowIndex];
|
|
13764
13780
|
}
|
|
13765
13781
|
var lastIndex = nextSetResIndex + this.parent.pageSettings.pageSize;
|
|
@@ -13945,7 +13961,12 @@ var TreeInterSectionObserver = /** @__PURE__ @class */ (function (_super) {
|
|
|
13945
13961
|
var debounced100 = debounce(callback, delay);
|
|
13946
13962
|
var debounced50 = debounce(callback, 50);
|
|
13947
13963
|
this["" + options].prevTop = this["" + options].prevLeft = 0;
|
|
13964
|
+
var isScrollByFocus = 'isScrollByFocus';
|
|
13948
13965
|
return function (e) {
|
|
13966
|
+
if (instance.isEdit && instance.root.editModule["" + isScrollByFocus]) {
|
|
13967
|
+
instance.root.editModule["" + isScrollByFocus] = false;
|
|
13968
|
+
return;
|
|
13969
|
+
}
|
|
13949
13970
|
var top = _this["" + options].movableContainer ? _this["" + options].container.scrollTop : e.target.scrollTop;
|
|
13950
13971
|
var left = _this["" + options].movableContainer ? _this["" + options].scrollbar.scrollLeft : e.target.scrollLeft;
|
|
13951
13972
|
var direction = _this["" + options].prevTop < top ? 'down' : 'up';
|