@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
|
@@ -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,13 +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 (_this.enableVirtualization && args.rowIndex === _this.selectedRowIndex && !_this.enablePersistence) {
|
|
4727
|
-
args.cancel = true;
|
|
4728
|
-
}
|
|
4729
|
-
if (!isNullOrUndefined(_this.selectionSettings) && !_this.selectionSettings.persistSelection &&
|
|
4730
|
-
_this.enableVirtualization && args.rowIndex === _this.selectedRowIndex && _this.isGantt) {
|
|
4731
|
-
args.cancel = false;
|
|
4732
|
-
}
|
|
4733
4726
|
_this.trigger(rowSelecting, args);
|
|
4734
4727
|
};
|
|
4735
4728
|
this.grid.rowDeselecting = function (args) {
|
|
@@ -5906,7 +5899,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
5906
5899
|
*/
|
|
5907
5900
|
TreeGrid.prototype.closeEdit = function () {
|
|
5908
5901
|
if (this.grid.editModule) {
|
|
5909
|
-
this.
|
|
5902
|
+
this.editModule['closeEdit']();
|
|
5910
5903
|
}
|
|
5911
5904
|
};
|
|
5912
5905
|
/**
|
|
@@ -7611,7 +7604,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
7611
7604
|
* @returns {void}
|
|
7612
7605
|
*/
|
|
7613
7606
|
TreeGrid.prototype.clearSelection = function () {
|
|
7614
|
-
this.grid.selectionModule
|
|
7607
|
+
if (!isNullOrUndefined(this.grid.selectionModule)) {
|
|
7608
|
+
this.grid.selectionModule['actualTarget'] = null;
|
|
7609
|
+
}
|
|
7615
7610
|
this.grid.clearSelection();
|
|
7616
7611
|
};
|
|
7617
7612
|
/**
|
|
@@ -12380,7 +12375,7 @@ var Edit = /** @__PURE__ @class */ (function () {
|
|
|
12380
12375
|
this.recordDoubleClick(args);
|
|
12381
12376
|
}
|
|
12382
12377
|
if (args.action === 'escape') {
|
|
12383
|
-
this.
|
|
12378
|
+
this.closeEdit();
|
|
12384
12379
|
}
|
|
12385
12380
|
};
|
|
12386
12381
|
Edit.prototype.deleteUniqueID = function (value) {
|
|
@@ -12448,6 +12443,9 @@ var Edit = /** @__PURE__ @class */ (function () {
|
|
|
12448
12443
|
Edit.prototype.batchCancel = function () {
|
|
12449
12444
|
if (this.parent.editSettings.mode === 'Cell') {
|
|
12450
12445
|
var cellDetails = getValue('editModule.cellDetails', this.parent.grid.editModule);
|
|
12446
|
+
if (!isNullOrUndefined(this.editedRowIndex)) {
|
|
12447
|
+
cellDetails.rowIndex = this.editedRowIndex;
|
|
12448
|
+
}
|
|
12451
12449
|
var treeCell = this.parent.getCellFromIndex(cellDetails.rowIndex, this.parent.treeColumnIndex);
|
|
12452
12450
|
this.parent.renderModule.cellRender({
|
|
12453
12451
|
data: cellDetails.rowData,
|
|
@@ -12769,6 +12767,7 @@ var Edit = /** @__PURE__ @class */ (function () {
|
|
|
12769
12767
|
this.prevAriaRowIndex = '-1';
|
|
12770
12768
|
}
|
|
12771
12769
|
if (!this.parent.enableVirtualization || this.parent.enableVirtualization && !Object.keys(this.parent.grid.contentModule['emptyRowData']).length) {
|
|
12770
|
+
this.isScrollByFocus = true;
|
|
12772
12771
|
focussedElement.focus();
|
|
12773
12772
|
}
|
|
12774
12773
|
if (this.parent.enableVirtualization && !Object.keys(this.parent.grid.contentModule['emptyRowData']).length) {
|
|
@@ -13152,6 +13151,18 @@ var Edit = /** @__PURE__ @class */ (function () {
|
|
|
13152
13151
|
this.parent.grid.editModule.editCell(rowIndex, field);
|
|
13153
13152
|
}
|
|
13154
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
|
+
};
|
|
13155
13166
|
return Edit;
|
|
13156
13167
|
}());
|
|
13157
13168
|
|
|
@@ -13341,9 +13352,12 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
13341
13352
|
if (this.parent.enableVirtualization && this.parent.isFrozenGrid()) {
|
|
13342
13353
|
return this.getRowCollection(index, true);
|
|
13343
13354
|
}
|
|
13344
|
-
|
|
13345
|
-
|
|
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;
|
|
13346
13359
|
}
|
|
13360
|
+
return targetRow;
|
|
13347
13361
|
};
|
|
13348
13362
|
VirtualTreeContentRenderer.prototype.getFrozenRightVirtualRowByIndex = function (index) {
|
|
13349
13363
|
return this.getRowCollection(index, false, false, true);
|
|
@@ -13703,7 +13717,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
13703
13717
|
content = this.parent.getContent().querySelector('.e-content');
|
|
13704
13718
|
}
|
|
13705
13719
|
var scrollHeight = outBuffer * rowHeight;
|
|
13706
|
-
var upScroll = (scrollArgs.offset.top - this.translateY)
|
|
13720
|
+
var upScroll = (scrollArgs.offset.top - this.translateY) < 0;
|
|
13707
13721
|
var downScroll = Math.ceil(scrollArgs.offset.top - this.translateY) + rowHeight >= scrollHeight;
|
|
13708
13722
|
var selectedRowIndex = 'selectedRowIndex';
|
|
13709
13723
|
var currentViewData = this.parent.currentViewData;
|
|
@@ -13716,8 +13730,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
13716
13730
|
- this.parent.pageSettings.pageSize;
|
|
13717
13731
|
index = (index > 0) ? index : 0;
|
|
13718
13732
|
if (!isNullOrUndefined(this["" + selectedRowIndex]) && this["" + selectedRowIndex] !== -1 && index !== this["" + selectedRowIndex] &&
|
|
13719
|
-
((this.parent.rowHeight * this.parent.pageSettings.pageSize) < content.scrollTop)
|
|
13720
|
-
!(this.parent.root && this.parent.root.treeGrid && this.parent.root.treeGrid.isGantt)) {
|
|
13733
|
+
((this.parent.rowHeight * this.parent.pageSettings.pageSize) < content.scrollTop)) {
|
|
13721
13734
|
index = this["" + selectedRowIndex];
|
|
13722
13735
|
}
|
|
13723
13736
|
this.startIndex = index;
|
|
@@ -13744,8 +13757,9 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
13744
13757
|
firsttdinx = +attr; // this.parent.getContent().querySelector('.e-content tr').getAttribute('data-rowindex');
|
|
13745
13758
|
}
|
|
13746
13759
|
if (firsttdinx === 0) {
|
|
13747
|
-
this.translateY = (
|
|
13748
|
-
|
|
13760
|
+
this.translateY = !isNullOrUndefined(this.endIndex) ?
|
|
13761
|
+
(this.endIndex - this.parent.pageSettings.pageSize) * (this.parent.rowHeight ?
|
|
13762
|
+
this.parent.rowHeight : this.parent.getRowHeight()) : 0;
|
|
13749
13763
|
}
|
|
13750
13764
|
else if (this.parent.getFrozenColumns() > 0) {
|
|
13751
13765
|
scrollArgs.offset.top = scrollArgs.offset.top + 80;
|
|
@@ -13761,7 +13775,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
13761
13775
|
var nextSetResIndex = ~~(content.scrollTop / rowHeight);
|
|
13762
13776
|
var isLastBlock = (this["" + selectedRowIndex] + this.parent.pageSettings.pageSize) < this.totalRecords ? false : true;
|
|
13763
13777
|
if (!isNullOrUndefined(this["" + selectedRowIndex]) && this["" + selectedRowIndex] !== -1 &&
|
|
13764
|
-
nextSetResIndex !== this["" + selectedRowIndex] && !isLastBlock
|
|
13778
|
+
nextSetResIndex !== this["" + selectedRowIndex] && !isLastBlock) {
|
|
13765
13779
|
nextSetResIndex = this["" + selectedRowIndex];
|
|
13766
13780
|
}
|
|
13767
13781
|
var lastIndex = nextSetResIndex + this.parent.pageSettings.pageSize;
|
|
@@ -13947,7 +13961,12 @@ var TreeInterSectionObserver = /** @__PURE__ @class */ (function (_super) {
|
|
|
13947
13961
|
var debounced100 = debounce(callback, delay);
|
|
13948
13962
|
var debounced50 = debounce(callback, 50);
|
|
13949
13963
|
this["" + options].prevTop = this["" + options].prevLeft = 0;
|
|
13964
|
+
var isScrollByFocus = 'isScrollByFocus';
|
|
13950
13965
|
return function (e) {
|
|
13966
|
+
if (instance.isEdit && instance.root.editModule["" + isScrollByFocus]) {
|
|
13967
|
+
instance.root.editModule["" + isScrollByFocus] = false;
|
|
13968
|
+
return;
|
|
13969
|
+
}
|
|
13951
13970
|
var top = _this["" + options].movableContainer ? _this["" + options].container.scrollTop : e.target.scrollTop;
|
|
13952
13971
|
var left = _this["" + options].movableContainer ? _this["" + options].scrollbar.scrollLeft : e.target.scrollLeft;
|
|
13953
13972
|
var direction = _this["" + options].prevTop < top ? 'down' : 'up';
|