@syncfusion/ej2-treegrid 28.1.35 → 28.1.36
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 +1 -10
- package/dist/ej2-treegrid.umd.min.js +1 -10
- package/dist/ej2-treegrid.umd.min.js.map +1 -1
- package/dist/es6/ej2-treegrid.es2015.js +34 -5
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +34 -5
- package/dist/es6/ej2-treegrid.es5.js.map +1 -1
- package/dist/global/ej2-treegrid.min.js +1 -10
- package/dist/global/ej2-treegrid.min.js.map +1 -1
- package/dist/global/index.d.ts +0 -9
- package/package.json +6 -7
- package/src/treegrid/base/treegrid.js +28 -1
- package/src/treegrid/renderer/virtual-tree-content-render.js +6 -4
- package/styles/bds-lite.css +16 -12
- package/styles/bds.css +16 -12
- package/styles/bootstrap-dark-lite.css +23 -16
- package/styles/bootstrap-dark.css +23 -16
- package/styles/bootstrap-lite.css +34 -15
- package/styles/bootstrap.css +34 -15
- package/styles/bootstrap4-lite.css +23 -16
- package/styles/bootstrap4.css +23 -16
- package/styles/bootstrap5-dark-lite.css +23 -16
- package/styles/bootstrap5-dark.css +23 -16
- package/styles/bootstrap5-lite.css +23 -16
- package/styles/bootstrap5.3-lite.css +23 -16
- package/styles/bootstrap5.3.css +23 -16
- package/styles/bootstrap5.css +23 -16
- package/styles/fabric-dark-lite.css +23 -16
- package/styles/fabric-dark.css +23 -16
- package/styles/fabric-lite.css +23 -16
- package/styles/fabric.css +23 -16
- package/styles/fluent-dark-lite.css +23 -16
- package/styles/fluent-dark.css +23 -16
- package/styles/fluent-lite.css +23 -16
- package/styles/fluent.css +23 -16
- package/styles/fluent2-lite.css +23 -16
- package/styles/fluent2.css +23 -16
- package/styles/highcontrast-light-lite.css +23 -16
- package/styles/highcontrast-light.css +23 -16
- package/styles/highcontrast-lite.css +23 -16
- package/styles/highcontrast.css +23 -16
- package/styles/material-dark-lite.css +23 -16
- package/styles/material-dark.css +23 -16
- package/styles/material-lite.css +23 -16
- package/styles/material.css +23 -16
- package/styles/material3-dark-lite.css +23 -16
- package/styles/material3-dark.css +23 -16
- package/styles/material3-lite.css +23 -16
- package/styles/material3.css +23 -16
- package/styles/tailwind-dark-lite.css +23 -16
- package/styles/tailwind-dark.css +23 -16
- package/styles/tailwind-lite.css +23 -16
- package/styles/tailwind.css +23 -16
- package/styles/tailwind3-lite.css +23 -16
- package/styles/tailwind3.css +23 -16
- package/styles/treegrid/_icons.scss +8 -5
- package/styles/treegrid/_layout.scss +17 -13
- package/styles/treegrid/bds.css +16 -12
- package/styles/treegrid/bootstrap-dark.css +23 -16
- package/styles/treegrid/bootstrap.css +34 -15
- package/styles/treegrid/bootstrap4.css +23 -16
- package/styles/treegrid/bootstrap5-dark.css +23 -16
- package/styles/treegrid/bootstrap5.3.css +23 -16
- package/styles/treegrid/bootstrap5.css +23 -16
- package/styles/treegrid/fabric-dark.css +23 -16
- package/styles/treegrid/fabric.css +23 -16
- package/styles/treegrid/fluent-dark.css +23 -16
- package/styles/treegrid/fluent.css +23 -16
- package/styles/treegrid/fluent2.css +23 -16
- package/styles/treegrid/highcontrast-light.css +23 -16
- package/styles/treegrid/highcontrast.css +23 -16
- package/styles/treegrid/icons/_bootstrap-dark.scss +8 -5
- package/styles/treegrid/icons/_bootstrap.scss +24 -4
- package/styles/treegrid/icons/_bootstrap4.scss +8 -5
- package/styles/treegrid/icons/_bootstrap5.3.scss +8 -5
- package/styles/treegrid/icons/_bootstrap5.scss +8 -5
- package/styles/treegrid/icons/_fabric-dark.scss +8 -5
- package/styles/treegrid/icons/_fabric.scss +8 -5
- package/styles/treegrid/icons/_fluent.scss +8 -5
- package/styles/treegrid/icons/_fluent2.scss +8 -5
- package/styles/treegrid/icons/_fusionnew.scss +8 -5
- package/styles/treegrid/icons/_highcontrast-light.scss +8 -5
- package/styles/treegrid/icons/_highcontrast.scss +8 -5
- package/styles/treegrid/icons/_material-dark.scss +8 -5
- package/styles/treegrid/icons/_material.scss +8 -5
- package/styles/treegrid/icons/_material3.scss +8 -5
- package/styles/treegrid/icons/_tailwind-dark.scss +9 -6
- package/styles/treegrid/icons/_tailwind.scss +8 -5
- package/styles/treegrid/icons/_tailwind3.scss +8 -5
- package/styles/treegrid/material-dark.css +23 -16
- package/styles/treegrid/material.css +23 -16
- package/styles/treegrid/material3-dark.css +23 -16
- package/styles/treegrid/material3.css +23 -16
- package/styles/treegrid/tailwind-dark.css +23 -16
- package/styles/treegrid/tailwind.css +23 -16
- package/styles/treegrid/tailwind3.css +23 -16
|
@@ -4301,8 +4301,10 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
4301
4301
|
var freezePresent = this.injectedModules.filter(function (e) {
|
|
4302
4302
|
return e.prototype.getModuleName() === 'freeze';
|
|
4303
4303
|
});
|
|
4304
|
+
var hasFreezeProp = Array.isArray(this.columns) &&
|
|
4305
|
+
this.columns.some(function (col) { return !!col.freeze; });
|
|
4304
4306
|
if ((this.frozenColumns || this.frozenRows || this.getFrozenColumns() ||
|
|
4305
|
-
|
|
4307
|
+
hasFreezeProp) && freezePresent.length > 0) {
|
|
4306
4308
|
modules.push({
|
|
4307
4309
|
member: 'freeze', args: [this],
|
|
4308
4310
|
name: 'Freeze'
|
|
@@ -6706,6 +6708,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6706
6708
|
};
|
|
6707
6709
|
// Internal method to handle the rows expand
|
|
6708
6710
|
TreeGrid.prototype.expandRows = function (row, record, parentRec) {
|
|
6711
|
+
var initialTotalRecordsCount = this.grid.totalDataRecordsCount;
|
|
6709
6712
|
this.expandCollapse('expand', row, record);
|
|
6710
6713
|
var children = 'Children';
|
|
6711
6714
|
if (!(isRemoteData(this) && !isOffline(this)) && (!isCountRequired(this) || !isNullOrUndefined(record["" + children]))) {
|
|
@@ -6726,6 +6729,18 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6726
6729
|
this.trigger(expanded, expandArgs);
|
|
6727
6730
|
}
|
|
6728
6731
|
}
|
|
6732
|
+
if (this.enableVirtualization) {
|
|
6733
|
+
var index = this.grid.currentViewData.indexOf(record);
|
|
6734
|
+
var expandedRow = isNullOrUndefined(row) ? this.getRows()[parseInt(index.toString(), 10)] : row;
|
|
6735
|
+
if (!isNullOrUndefined(expandedRow)) {
|
|
6736
|
+
var rowIndex = +expandedRow.getAttribute('data-rowindex');
|
|
6737
|
+
var outBuffer = this.grid.pageSettings.pageSize - Math.ceil(this.grid.pageSettings.pageSize / 2);
|
|
6738
|
+
var lastBlockIdx = initialTotalRecordsCount - outBuffer;
|
|
6739
|
+
if (rowIndex > lastBlockIdx) {
|
|
6740
|
+
this.grid.getContent().firstElementChild.scrollTop = rowIndex * this.grid.getRowHeight();
|
|
6741
|
+
}
|
|
6742
|
+
}
|
|
6743
|
+
}
|
|
6729
6744
|
};
|
|
6730
6745
|
TreeGrid.prototype.expandCollapseAllChildren = function (record, action, key, level) {
|
|
6731
6746
|
if ((!isNullOrUndefined(key) && record[this.getPrimaryKeyFieldNames()[0]] !== key) ||
|
|
@@ -6841,6 +6856,18 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6841
6856
|
this.grid.getContent().firstElementChild.scrollBy(0, this.grid.getRowHeight());
|
|
6842
6857
|
}
|
|
6843
6858
|
}
|
|
6859
|
+
if (this.enableVirtualization) {
|
|
6860
|
+
var index = this.grid.currentViewData.indexOf(record);
|
|
6861
|
+
var collapsedRow = isNullOrUndefined(row) ? this.getRows()[parseInt(index.toString(), 10)] : row;
|
|
6862
|
+
if (!isNullOrUndefined(collapsedRow)) {
|
|
6863
|
+
var rowIndex = +collapsedRow.getAttribute('data-rowindex');
|
|
6864
|
+
var outBuffer = this.grid.pageSettings.pageSize - Math.ceil(this.grid.pageSettings.pageSize / 2);
|
|
6865
|
+
var lastBlockIdx = this.grid.totalDataRecordsCount - outBuffer;
|
|
6866
|
+
if (rowIndex > lastBlockIdx) {
|
|
6867
|
+
this.grid.getContent().firstElementChild.scrollBy(0, (rowIndex - lastBlockIdx) * this.grid.getRowHeight());
|
|
6868
|
+
}
|
|
6869
|
+
}
|
|
6870
|
+
}
|
|
6844
6871
|
}
|
|
6845
6872
|
};
|
|
6846
6873
|
TreeGrid.prototype.updateExpandStateMapping = function (record, state) {
|
|
@@ -13837,7 +13864,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
13837
13864
|
VirtualTreeContentRenderer.prototype.dataBoundEvent = function () {
|
|
13838
13865
|
var dataBoundEve = 'dataBound';
|
|
13839
13866
|
var initialRowTop = 'initialRowTop';
|
|
13840
|
-
if (this.parent.getRows().length && !isNullOrUndefined(this.parent.getRowByIndex(0)) && !this["" + initialRowTop]) {
|
|
13867
|
+
if (!isNullOrUndefined(this.parent.getRows()) && this.parent.getRows().length && !isNullOrUndefined(this.parent.getRowByIndex(0)) && !this["" + initialRowTop]) {
|
|
13841
13868
|
var rowTop = this.parent.getRowByIndex(0).getBoundingClientRect().top;
|
|
13842
13869
|
var gridTop = this.parent.element.getBoundingClientRect().top;
|
|
13843
13870
|
if (rowTop > 0) {
|
|
@@ -14029,7 +14056,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
14029
14056
|
content = this.parent.getContent().querySelector('.e-content');
|
|
14030
14057
|
}
|
|
14031
14058
|
var scrollHeight = outBuffer * rowHeight;
|
|
14032
|
-
var upScroll = (scrollArgs.offset.top - this.translateY) < 0;
|
|
14059
|
+
var upScroll = (scrollArgs.offset.top - this.translateY) < 0 && this.activeKey !== 'downArrow';
|
|
14033
14060
|
var downScroll = Math.ceil(scrollArgs.offset.top - this.translateY) + rowHeight >= scrollHeight;
|
|
14034
14061
|
var selectedRowIndex = 'selectedRowIndex';
|
|
14035
14062
|
var currentViewData = this.parent.currentViewData;
|
|
@@ -14054,7 +14081,8 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
14054
14081
|
this.startIndex = (this.startIndex - remains) < 0 ? 0 : (this.startIndex - remains);
|
|
14055
14082
|
}
|
|
14056
14083
|
if (currentViewData.length && (currentViewData[0]["" + indexValue] >= this.parent.pageSettings.pageSize / 2) &&
|
|
14057
|
-
((currentViewData[0]["" + indexValue] - this.startIndex) < (this.parent.pageSettings.pageSize / 2)) &&
|
|
14084
|
+
((currentViewData[0]["" + indexValue] - this.startIndex) < (this.parent.pageSettings.pageSize / 2)) &&
|
|
14085
|
+
this.parent.selectionModule && this.parent.selectionModule.isRowSelected) {
|
|
14058
14086
|
this.startIndex = currentViewData[0]["" + indexValue] - (this.parent.pageSettings.pageSize / 2);
|
|
14059
14087
|
this.endIndex = this.startIndex + this.parent.pageSettings.pageSize;
|
|
14060
14088
|
}
|
|
@@ -14111,7 +14139,8 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
14111
14139
|
this.startIndex = lastIndex - (this.parent.pageSettings.pageSize / 2);
|
|
14112
14140
|
}
|
|
14113
14141
|
if (currentViewData.length && this.startIndex > currentViewData[0]["" + indexValue] &&
|
|
14114
|
-
((this.startIndex - currentViewData[0]["" + indexValue]) < (this.parent.pageSettings.pageSize / 2)) &&
|
|
14142
|
+
((this.startIndex - currentViewData[0]["" + indexValue]) < (this.parent.pageSettings.pageSize / 2)) &&
|
|
14143
|
+
this.parent.selectionModule && this.parent.selectionModule.isRowSelected) {
|
|
14115
14144
|
this.startIndex = currentViewData[0]["" + indexValue] + (this.parent.pageSettings.pageSize / 2);
|
|
14116
14145
|
}
|
|
14117
14146
|
if (this.parent.root.isSelfReference) {
|