@syncfusion/ej2-treegrid 28.1.35 → 28.1.37
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 +54 -11
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +54 -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 +6 -7
- package/src/treegrid/base/treegrid.js +28 -1
- package/src/treegrid/renderer/virtual-row-model-generator.js +4 -5
- package/src/treegrid/renderer/virtual-tree-content-render.js +24 -7
- package/src/treegrid/utils.d.ts +1 -1
- 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) {
|
|
@@ -10214,8 +10241,7 @@ var TreeVirtualRowModelGenerator = /** @__PURE__ @class */ (function (_super) {
|
|
|
10214
10241
|
if (!isNullOrUndefined(notifyArgs.virtualInfo)) {
|
|
10215
10242
|
if (notifyArgs.virtualInfo.direction !== 'right' && notifyArgs.virtualInfo.direction !== 'left') {
|
|
10216
10243
|
if (!((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
10217
|
-
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent))
|
|
10218
|
-
|| notifyArgs.virtualInfo.blockIndexes.length === 1) {
|
|
10244
|
+
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent) || isRemoteData(this.parent))) {
|
|
10219
10245
|
notifyArgs.virtualInfo.blockIndexes = info.blockIndexes;
|
|
10220
10246
|
}
|
|
10221
10247
|
}
|
|
@@ -10224,7 +10250,7 @@ var TreeVirtualRowModelGenerator = /** @__PURE__ @class */ (function (_super) {
|
|
|
10224
10250
|
}
|
|
10225
10251
|
}
|
|
10226
10252
|
if ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
10227
|
-
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)) {
|
|
10253
|
+
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent) || isRemoteData(this.parent)) {
|
|
10228
10254
|
return _super.prototype.generateRows.call(this, data, notifyArgs);
|
|
10229
10255
|
}
|
|
10230
10256
|
else {
|
|
@@ -10245,7 +10271,7 @@ var TreeVirtualRowModelGenerator = /** @__PURE__ @class */ (function (_super) {
|
|
|
10245
10271
|
var clear = ['paging', 'refresh', 'sorting', 'filtering', 'searching', 'reorder',
|
|
10246
10272
|
'save', 'delete'].some(function (value) { return action === value; });
|
|
10247
10273
|
if ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
10248
|
-
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)) {
|
|
10274
|
+
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent) || isRemoteData(this.parent)) {
|
|
10249
10275
|
var model = 'model';
|
|
10250
10276
|
var currentPage = this["" + model].currentPage;
|
|
10251
10277
|
if (clear) {
|
|
@@ -13837,7 +13863,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
13837
13863
|
VirtualTreeContentRenderer.prototype.dataBoundEvent = function () {
|
|
13838
13864
|
var dataBoundEve = 'dataBound';
|
|
13839
13865
|
var initialRowTop = 'initialRowTop';
|
|
13840
|
-
if (this.parent.getRows().length && !isNullOrUndefined(this.parent.getRowByIndex(0)) && !this["" + initialRowTop]) {
|
|
13866
|
+
if (!isNullOrUndefined(this.parent.getRows()) && this.parent.getRows().length && !isNullOrUndefined(this.parent.getRowByIndex(0)) && !this["" + initialRowTop]) {
|
|
13841
13867
|
var rowTop = this.parent.getRowByIndex(0).getBoundingClientRect().top;
|
|
13842
13868
|
var gridTop = this.parent.element.getBoundingClientRect().top;
|
|
13843
13869
|
if (rowTop > 0) {
|
|
@@ -14029,7 +14055,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
14029
14055
|
content = this.parent.getContent().querySelector('.e-content');
|
|
14030
14056
|
}
|
|
14031
14057
|
var scrollHeight = outBuffer * rowHeight;
|
|
14032
|
-
var upScroll = (scrollArgs.offset.top - this.translateY) < 0;
|
|
14058
|
+
var upScroll = (scrollArgs.offset.top - this.translateY) < 0 && this.activeKey !== 'downArrow';
|
|
14033
14059
|
var downScroll = Math.ceil(scrollArgs.offset.top - this.translateY) + rowHeight >= scrollHeight;
|
|
14034
14060
|
var selectedRowIndex = 'selectedRowIndex';
|
|
14035
14061
|
var currentViewData = this.parent.currentViewData;
|
|
@@ -14054,7 +14080,8 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
14054
14080
|
this.startIndex = (this.startIndex - remains) < 0 ? 0 : (this.startIndex - remains);
|
|
14055
14081
|
}
|
|
14056
14082
|
if (currentViewData.length && (currentViewData[0]["" + indexValue] >= this.parent.pageSettings.pageSize / 2) &&
|
|
14057
|
-
((currentViewData[0]["" + indexValue] - this.startIndex) < (this.parent.pageSettings.pageSize / 2)) &&
|
|
14083
|
+
((currentViewData[0]["" + indexValue] - this.startIndex) < (this.parent.pageSettings.pageSize / 2)) &&
|
|
14084
|
+
this.parent.selectionModule && this.parent.selectionModule.isRowSelected) {
|
|
14058
14085
|
this.startIndex = currentViewData[0]["" + indexValue] - (this.parent.pageSettings.pageSize / 2);
|
|
14059
14086
|
this.endIndex = this.startIndex + this.parent.pageSettings.pageSize;
|
|
14060
14087
|
}
|
|
@@ -14111,7 +14138,8 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
14111
14138
|
this.startIndex = lastIndex - (this.parent.pageSettings.pageSize / 2);
|
|
14112
14139
|
}
|
|
14113
14140
|
if (currentViewData.length && this.startIndex > currentViewData[0]["" + indexValue] &&
|
|
14114
|
-
((this.startIndex - currentViewData[0]["" + indexValue]) < (this.parent.pageSettings.pageSize / 2)) &&
|
|
14141
|
+
((this.startIndex - currentViewData[0]["" + indexValue]) < (this.parent.pageSettings.pageSize / 2)) &&
|
|
14142
|
+
this.parent.selectionModule && this.parent.selectionModule.isRowSelected) {
|
|
14115
14143
|
this.startIndex = currentViewData[0]["" + indexValue] + (this.parent.pageSettings.pageSize / 2);
|
|
14116
14144
|
}
|
|
14117
14145
|
if (this.parent.root.isSelfReference) {
|
|
@@ -14140,12 +14168,27 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
14140
14168
|
}
|
|
14141
14169
|
}
|
|
14142
14170
|
}
|
|
14143
|
-
if (((downScroll && (scrollArgs.offset.top < (rowHeight * this.totalRecords)))
|
|
14171
|
+
if (isRemoteData(this.parent) || ((downScroll && (scrollArgs.offset.top < (rowHeight * this.totalRecords)))
|
|
14144
14172
|
|| (upScroll)) || (scrollArgs.direction === 'right' || scrollArgs.direction === 'left') ||
|
|
14145
14173
|
((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
14146
14174
|
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') && (downScroll || upScroll) || isCountRequired(this.parent))) {
|
|
14147
14175
|
var viewInfo = this.currentInfo = getValue('getInfoFromView', this).apply(this, [scrollArgs.direction, info, scrollArgs.offset]);
|
|
14148
14176
|
this.previousInfo = viewInfo;
|
|
14177
|
+
if (this.prevInfo && ((info.axis === 'Y' && this.prevInfo.blockIndexes.toString() === viewInfo.blockIndexes.toString())
|
|
14178
|
+
|| ((info.axis === 'X' && this.prevInfo.columnIndexes.toString() === viewInfo.columnIndexes.toString())
|
|
14179
|
+
|| (this.parent.isFrozenGrid() && this.parent.getVisibleFrozenLeftCount() >= viewInfo.columnIndexes[0]
|
|
14180
|
+
&& this.prevInfo.columnIndexes.toString().includes(viewInfo.columnIndexes.toString()))))) {
|
|
14181
|
+
this.parent.removeMaskRow();
|
|
14182
|
+
this.parent.notify('removeGanttShimmer', { requestType: 'hideShimmer' });
|
|
14183
|
+
if (Browser.isIE) {
|
|
14184
|
+
this.parent.hideSpinner();
|
|
14185
|
+
}
|
|
14186
|
+
this.requestType = this.requestType === 'virtualscroll' ? this['empty'] : this.requestType;
|
|
14187
|
+
if (info.axis === 'Y') {
|
|
14188
|
+
this['restoreEdit']();
|
|
14189
|
+
}
|
|
14190
|
+
return;
|
|
14191
|
+
}
|
|
14149
14192
|
this.parent.setColumnIndexesInView(this.parent.enableColumnVirtualization ? viewInfo.columnIndexes : []);
|
|
14150
14193
|
var page = viewInfo.loadNext && !viewInfo.loadSelf ? viewInfo.nextInfo.page : viewInfo.page;
|
|
14151
14194
|
this.parent.setProperties({ pageSettings: { currentPage: page } }, true);
|
|
@@ -14172,7 +14215,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
14172
14215
|
};
|
|
14173
14216
|
VirtualTreeContentRenderer.prototype.appendContent = function (target, newChild, e) {
|
|
14174
14217
|
if ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
14175
|
-
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)) {
|
|
14218
|
+
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent) || isRemoteData(this.parent)) {
|
|
14176
14219
|
if (getValue('isExpandCollapse', e)) {
|
|
14177
14220
|
this.isRemoteExpand = true;
|
|
14178
14221
|
}
|