@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
|
@@ -4010,8 +4010,10 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
4010
4010
|
const freezePresent = this.injectedModules.filter((e) => {
|
|
4011
4011
|
return e.prototype.getModuleName() === 'freeze';
|
|
4012
4012
|
});
|
|
4013
|
+
const hasFreezeProp = Array.isArray(this.columns) &&
|
|
4014
|
+
this.columns.some((col) => !!col.freeze);
|
|
4013
4015
|
if ((this.frozenColumns || this.frozenRows || this.getFrozenColumns() ||
|
|
4014
|
-
|
|
4016
|
+
hasFreezeProp) && freezePresent.length > 0) {
|
|
4015
4017
|
modules.push({
|
|
4016
4018
|
member: 'freeze', args: [this],
|
|
4017
4019
|
name: 'Freeze'
|
|
@@ -6394,6 +6396,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6394
6396
|
}
|
|
6395
6397
|
// Internal method to handle the rows expand
|
|
6396
6398
|
expandRows(row, record, parentRec) {
|
|
6399
|
+
const initialTotalRecordsCount = this.grid.totalDataRecordsCount;
|
|
6397
6400
|
this.expandCollapse('expand', row, record);
|
|
6398
6401
|
const children = 'Children';
|
|
6399
6402
|
if (!(isRemoteData(this) && !isOffline(this)) && (!isCountRequired(this) || !isNullOrUndefined(record[`${children}`]))) {
|
|
@@ -6414,6 +6417,18 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6414
6417
|
this.trigger(expanded, expandArgs);
|
|
6415
6418
|
}
|
|
6416
6419
|
}
|
|
6420
|
+
if (this.enableVirtualization) {
|
|
6421
|
+
const index = this.grid.currentViewData.indexOf(record);
|
|
6422
|
+
const expandedRow = isNullOrUndefined(row) ? this.getRows()[parseInt(index.toString(), 10)] : row;
|
|
6423
|
+
if (!isNullOrUndefined(expandedRow)) {
|
|
6424
|
+
const rowIndex = +expandedRow.getAttribute('data-rowindex');
|
|
6425
|
+
const outBuffer = this.grid.pageSettings.pageSize - Math.ceil(this.grid.pageSettings.pageSize / 2);
|
|
6426
|
+
const lastBlockIdx = initialTotalRecordsCount - outBuffer;
|
|
6427
|
+
if (rowIndex > lastBlockIdx) {
|
|
6428
|
+
this.grid.getContent().firstElementChild.scrollTop = rowIndex * this.grid.getRowHeight();
|
|
6429
|
+
}
|
|
6430
|
+
}
|
|
6431
|
+
}
|
|
6417
6432
|
}
|
|
6418
6433
|
expandCollapseAllChildren(record, action, key, level) {
|
|
6419
6434
|
if ((!isNullOrUndefined(key) && record[this.getPrimaryKeyFieldNames()[0]] !== key) ||
|
|
@@ -6528,6 +6543,18 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6528
6543
|
this.grid.getContent().firstElementChild.scrollBy(0, this.grid.getRowHeight());
|
|
6529
6544
|
}
|
|
6530
6545
|
}
|
|
6546
|
+
if (this.enableVirtualization) {
|
|
6547
|
+
const index = this.grid.currentViewData.indexOf(record);
|
|
6548
|
+
const collapsedRow = isNullOrUndefined(row) ? this.getRows()[parseInt(index.toString(), 10)] : row;
|
|
6549
|
+
if (!isNullOrUndefined(collapsedRow)) {
|
|
6550
|
+
const rowIndex = +collapsedRow.getAttribute('data-rowindex');
|
|
6551
|
+
const outBuffer = this.grid.pageSettings.pageSize - Math.ceil(this.grid.pageSettings.pageSize / 2);
|
|
6552
|
+
const lastBlockIdx = this.grid.totalDataRecordsCount - outBuffer;
|
|
6553
|
+
if (rowIndex > lastBlockIdx) {
|
|
6554
|
+
this.grid.getContent().firstElementChild.scrollBy(0, (rowIndex - lastBlockIdx) * this.grid.getRowHeight());
|
|
6555
|
+
}
|
|
6556
|
+
}
|
|
6557
|
+
}
|
|
6531
6558
|
}
|
|
6532
6559
|
}
|
|
6533
6560
|
updateExpandStateMapping(record, state) {
|
|
@@ -9830,8 +9857,7 @@ class TreeVirtualRowModelGenerator extends VirtualRowModelGenerator {
|
|
|
9830
9857
|
if (!isNullOrUndefined(notifyArgs.virtualInfo)) {
|
|
9831
9858
|
if (notifyArgs.virtualInfo.direction !== 'right' && notifyArgs.virtualInfo.direction !== 'left') {
|
|
9832
9859
|
if (!((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
9833
|
-
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent))
|
|
9834
|
-
|| notifyArgs.virtualInfo.blockIndexes.length === 1) {
|
|
9860
|
+
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent) || isRemoteData(this.parent))) {
|
|
9835
9861
|
notifyArgs.virtualInfo.blockIndexes = info.blockIndexes;
|
|
9836
9862
|
}
|
|
9837
9863
|
}
|
|
@@ -9840,7 +9866,7 @@ class TreeVirtualRowModelGenerator extends VirtualRowModelGenerator {
|
|
|
9840
9866
|
}
|
|
9841
9867
|
}
|
|
9842
9868
|
if ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
9843
|
-
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)) {
|
|
9869
|
+
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent) || isRemoteData(this.parent)) {
|
|
9844
9870
|
return super.generateRows(data, notifyArgs);
|
|
9845
9871
|
}
|
|
9846
9872
|
else {
|
|
@@ -9861,7 +9887,7 @@ class TreeVirtualRowModelGenerator extends VirtualRowModelGenerator {
|
|
|
9861
9887
|
const clear = ['paging', 'refresh', 'sorting', 'filtering', 'searching', 'reorder',
|
|
9862
9888
|
'save', 'delete'].some((value) => action === value);
|
|
9863
9889
|
if ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
9864
|
-
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)) {
|
|
9890
|
+
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent) || isRemoteData(this.parent)) {
|
|
9865
9891
|
const model = 'model';
|
|
9866
9892
|
const currentPage = this[`${model}`].currentPage;
|
|
9867
9893
|
if (clear) {
|
|
@@ -13402,7 +13428,7 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13402
13428
|
dataBoundEvent() {
|
|
13403
13429
|
const dataBoundEve = 'dataBound';
|
|
13404
13430
|
const initialRowTop = 'initialRowTop';
|
|
13405
|
-
if (this.parent.getRows().length && !isNullOrUndefined(this.parent.getRowByIndex(0)) && !this[`${initialRowTop}`]) {
|
|
13431
|
+
if (!isNullOrUndefined(this.parent.getRows()) && this.parent.getRows().length && !isNullOrUndefined(this.parent.getRowByIndex(0)) && !this[`${initialRowTop}`]) {
|
|
13406
13432
|
const rowTop = this.parent.getRowByIndex(0).getBoundingClientRect().top;
|
|
13407
13433
|
const gridTop = this.parent.element.getBoundingClientRect().top;
|
|
13408
13434
|
if (rowTop > 0) {
|
|
@@ -13593,7 +13619,7 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13593
13619
|
content = this.parent.getContent().querySelector('.e-content');
|
|
13594
13620
|
}
|
|
13595
13621
|
const scrollHeight = outBuffer * rowHeight;
|
|
13596
|
-
const upScroll = (scrollArgs.offset.top - this.translateY) < 0;
|
|
13622
|
+
const upScroll = (scrollArgs.offset.top - this.translateY) < 0 && this.activeKey !== 'downArrow';
|
|
13597
13623
|
const downScroll = Math.ceil(scrollArgs.offset.top - this.translateY) + rowHeight >= scrollHeight;
|
|
13598
13624
|
const selectedRowIndex = 'selectedRowIndex';
|
|
13599
13625
|
const currentViewData = this.parent.currentViewData;
|
|
@@ -13618,7 +13644,8 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13618
13644
|
this.startIndex = (this.startIndex - remains) < 0 ? 0 : (this.startIndex - remains);
|
|
13619
13645
|
}
|
|
13620
13646
|
if (currentViewData.length && (currentViewData[0][`${indexValue}`] >= this.parent.pageSettings.pageSize / 2) &&
|
|
13621
|
-
((currentViewData[0][`${indexValue}`] - this.startIndex) < (this.parent.pageSettings.pageSize / 2)) &&
|
|
13647
|
+
((currentViewData[0][`${indexValue}`] - this.startIndex) < (this.parent.pageSettings.pageSize / 2)) &&
|
|
13648
|
+
this.parent.selectionModule && this.parent.selectionModule.isRowSelected) {
|
|
13622
13649
|
this.startIndex = currentViewData[0][`${indexValue}`] - (this.parent.pageSettings.pageSize / 2);
|
|
13623
13650
|
this.endIndex = this.startIndex + this.parent.pageSettings.pageSize;
|
|
13624
13651
|
}
|
|
@@ -13675,7 +13702,8 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13675
13702
|
this.startIndex = lastIndex - (this.parent.pageSettings.pageSize / 2);
|
|
13676
13703
|
}
|
|
13677
13704
|
if (currentViewData.length && this.startIndex > currentViewData[0][`${indexValue}`] &&
|
|
13678
|
-
((this.startIndex - currentViewData[0][`${indexValue}`]) < (this.parent.pageSettings.pageSize / 2)) &&
|
|
13705
|
+
((this.startIndex - currentViewData[0][`${indexValue}`]) < (this.parent.pageSettings.pageSize / 2)) &&
|
|
13706
|
+
this.parent.selectionModule && this.parent.selectionModule.isRowSelected) {
|
|
13679
13707
|
this.startIndex = currentViewData[0][`${indexValue}`] + (this.parent.pageSettings.pageSize / 2);
|
|
13680
13708
|
}
|
|
13681
13709
|
if (this.parent.root.isSelfReference) {
|
|
@@ -13704,12 +13732,27 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13704
13732
|
}
|
|
13705
13733
|
}
|
|
13706
13734
|
}
|
|
13707
|
-
if (((downScroll && (scrollArgs.offset.top < (rowHeight * this.totalRecords)))
|
|
13735
|
+
if (isRemoteData(this.parent) || ((downScroll && (scrollArgs.offset.top < (rowHeight * this.totalRecords)))
|
|
13708
13736
|
|| (upScroll)) || (scrollArgs.direction === 'right' || scrollArgs.direction === 'left') ||
|
|
13709
13737
|
((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
13710
13738
|
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') && (downScroll || upScroll) || isCountRequired(this.parent))) {
|
|
13711
13739
|
const viewInfo = this.currentInfo = getValue('getInfoFromView', this).apply(this, [scrollArgs.direction, info, scrollArgs.offset]);
|
|
13712
13740
|
this.previousInfo = viewInfo;
|
|
13741
|
+
if (this.prevInfo && ((info.axis === 'Y' && this.prevInfo.blockIndexes.toString() === viewInfo.blockIndexes.toString())
|
|
13742
|
+
|| ((info.axis === 'X' && this.prevInfo.columnIndexes.toString() === viewInfo.columnIndexes.toString())
|
|
13743
|
+
|| (this.parent.isFrozenGrid() && this.parent.getVisibleFrozenLeftCount() >= viewInfo.columnIndexes[0]
|
|
13744
|
+
&& this.prevInfo.columnIndexes.toString().includes(viewInfo.columnIndexes.toString()))))) {
|
|
13745
|
+
this.parent.removeMaskRow();
|
|
13746
|
+
this.parent.notify('removeGanttShimmer', { requestType: 'hideShimmer' });
|
|
13747
|
+
if (Browser.isIE) {
|
|
13748
|
+
this.parent.hideSpinner();
|
|
13749
|
+
}
|
|
13750
|
+
this.requestType = this.requestType === 'virtualscroll' ? this['empty'] : this.requestType;
|
|
13751
|
+
if (info.axis === 'Y') {
|
|
13752
|
+
this['restoreEdit']();
|
|
13753
|
+
}
|
|
13754
|
+
return;
|
|
13755
|
+
}
|
|
13713
13756
|
this.parent.setColumnIndexesInView(this.parent.enableColumnVirtualization ? viewInfo.columnIndexes : []);
|
|
13714
13757
|
const page = viewInfo.loadNext && !viewInfo.loadSelf ? viewInfo.nextInfo.page : viewInfo.page;
|
|
13715
13758
|
this.parent.setProperties({ pageSettings: { currentPage: page } }, true);
|
|
@@ -13736,7 +13779,7 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
13736
13779
|
}
|
|
13737
13780
|
appendContent(target, newChild, e) {
|
|
13738
13781
|
if ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
|
|
13739
|
-
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)) {
|
|
13782
|
+
&& !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent) || isRemoteData(this.parent)) {
|
|
13740
13783
|
if (getValue('isExpandCollapse', e)) {
|
|
13741
13784
|
this.isRemoteExpand = true;
|
|
13742
13785
|
}
|