@visactor/vtable 1.22.3-alpha.0 → 1.22.3
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/cjs/ListTable.d.ts +3 -1
- package/cjs/ListTable.js +15 -8
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotTable.d.ts +1 -0
- package/cjs/PivotTable.js +3 -0
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/body-helper/style/ButtonStyle.d.ts +10 -1
- package/cjs/body-helper/style/ButtonStyle.js.map +1 -1
- package/cjs/body-helper/style/CheckboxStyle.d.ts +14 -1
- package/cjs/body-helper/style/CheckboxStyle.js.map +1 -1
- package/cjs/body-helper/style/RadioStyle.d.ts +8 -1
- package/cjs/body-helper/style/RadioStyle.js.map +1 -1
- package/cjs/body-helper/style/SwitchStyle.d.ts +13 -1
- package/cjs/body-helper/style/SwitchStyle.js.map +1 -1
- package/cjs/core/BaseTable.js +2 -2
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/record-helper.js.map +1 -1
- package/cjs/data/DataSource.js +1 -1
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/event/listener/touch.js +2 -1
- package/cjs/event/listener/touch.js.map +1 -1
- package/cjs/event/scroll.d.ts +2 -0
- package/cjs/event/scroll.js +12 -3
- package/cjs/event/scroll.js.map +1 -1
- package/cjs/index.d.ts +2 -1
- package/cjs/index.js +18 -4
- package/cjs/index.js.map +1 -1
- package/cjs/layout/index.js +2 -1
- package/cjs/layout/pivot-header-layout.d.ts +1 -0
- package/cjs/layout/pivot-header-layout.js +37 -4
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/pivot-layout.js +2 -0
- package/cjs/layout/row-height-map.js +1 -1
- package/cjs/layout/simple-header-layout.js +4 -4
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/layout/tree-helper.js +1 -1
- package/cjs/plugins/custom-cell-style.js +1 -2
- package/cjs/plugins/index.js +1 -1
- package/cjs/plugins/interface.js +1 -1
- package/cjs/plugins/invert-highlight.js +1 -1
- package/cjs/plugins/list-tree-stick-cell.js +1 -1
- package/cjs/plugins/plugin-manager.js +1 -1
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js +1 -1
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +7 -3
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/state/cell-move/adjust-header.d.ts +13 -0
- package/cjs/state/cell-move/adjust-header.js +50 -3
- package/cjs/state/cell-move/adjust-header.js.map +1 -1
- package/cjs/state/cell-move/index.js +2 -1
- package/cjs/state/cell-move/index.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +7 -2
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/list-table/define/basic-define.d.ts +1 -1
- package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +9 -2
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +219 -18
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +3 -1
- package/es/ListTable.js +17 -10
- package/es/ListTable.js.map +1 -1
- package/es/PivotTable.d.ts +1 -0
- package/es/PivotTable.js +3 -0
- package/es/PivotTable.js.map +1 -1
- package/es/body-helper/style/ButtonStyle.d.ts +10 -1
- package/es/body-helper/style/ButtonStyle.js.map +1 -1
- package/es/body-helper/style/CheckboxStyle.d.ts +14 -1
- package/es/body-helper/style/CheckboxStyle.js.map +1 -1
- package/es/body-helper/style/RadioStyle.d.ts +8 -1
- package/es/body-helper/style/RadioStyle.js.map +1 -1
- package/es/body-helper/style/SwitchStyle.d.ts +13 -1
- package/es/body-helper/style/SwitchStyle.js.map +1 -1
- package/es/core/BaseTable.js +2 -2
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/record-helper.js.map +1 -1
- package/es/data/DataSource.js +1 -1
- package/es/data/DataSource.js.map +1 -1
- package/es/event/listener/touch.js +2 -2
- package/es/event/listener/touch.js.map +1 -1
- package/es/event/scroll.d.ts +2 -0
- package/es/event/scroll.js +9 -1
- package/es/event/scroll.js.map +1 -1
- package/es/index.d.ts +2 -1
- package/es/index.js +3 -1
- package/es/index.js.map +1 -1
- package/es/layout/index.js +2 -1
- package/es/layout/pivot-header-layout.d.ts +1 -0
- package/es/layout/pivot-header-layout.js +37 -4
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/pivot-layout.js +2 -0
- package/es/layout/row-height-map.js +1 -1
- package/es/layout/simple-header-layout.js +4 -4
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/layout/tree-helper.js +1 -1
- package/es/plugins/custom-cell-style.js +1 -2
- package/es/plugins/index.js +1 -1
- package/es/plugins/interface.js +1 -1
- package/es/plugins/invert-highlight.js +1 -1
- package/es/plugins/list-tree-stick-cell.js +1 -1
- package/es/plugins/plugin-manager.js +1 -1
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js +1 -1
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +2 -2
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +7 -3
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/state/cell-move/adjust-header.d.ts +13 -0
- package/es/state/cell-move/adjust-header.js +46 -2
- package/es/state/cell-move/adjust-header.js.map +1 -1
- package/es/state/cell-move/index.js +2 -1
- package/es/state/cell-move/index.js.map +1 -1
- package/es/ts-types/base-table.d.ts +7 -2
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/list-table/define/basic-define.d.ts +1 -1
- package/es/ts-types/list-table/define/basic-define.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +9 -2
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +5 -5
package/dist/vtable.js
CHANGED
|
@@ -39102,7 +39102,7 @@
|
|
|
39102
39102
|
}, 0);
|
|
39103
39103
|
});
|
|
39104
39104
|
this.currentIndexedData = sortedIndexArray;
|
|
39105
|
-
if (this.hierarchyExpandLevel) {
|
|
39105
|
+
if (this.hierarchyExpandLevel && this.rowHierarchyType === 'tree') {
|
|
39106
39106
|
let nodeLength = sortedIndexArray.length;
|
|
39107
39107
|
for (let i = 0; i < nodeLength; i++) {
|
|
39108
39108
|
const record = this.getOriginalRecord(sortedIndexArray[i]);
|
|
@@ -45337,7 +45337,7 @@
|
|
|
45337
45337
|
}
|
|
45338
45338
|
if (!addNew && oldCellGroup.parent) {
|
|
45339
45339
|
if (table.reactCustomLayout) {
|
|
45340
|
-
const reactGroup = oldCellGroup.getChildByName(
|
|
45340
|
+
const reactGroup = oldCellGroup.getChildByName(CUSTOM_CONTAINER_NAME);
|
|
45341
45341
|
if (reactGroup) {
|
|
45342
45342
|
const { col, row } = reactGroup;
|
|
45343
45343
|
if (isNumber$4(col) && isNumber$4(row)) {
|
|
@@ -45853,7 +45853,6 @@
|
|
|
45853
45853
|
textConfig: []
|
|
45854
45854
|
});
|
|
45855
45855
|
function computeRowsHeight(table, rowStart, rowEnd, isClearRowRangeHeightsMap = true, update) {
|
|
45856
|
-
typeof window !== 'undefined' ? window.performance.now() : 0;
|
|
45857
45856
|
const oldRowHeights = [];
|
|
45858
45857
|
const newHeights = [];
|
|
45859
45858
|
if (update) {
|
|
@@ -45913,6 +45912,7 @@
|
|
|
45913
45912
|
if (!(table.internalProps.transpose ||
|
|
45914
45913
|
(table.isPivotTable() && !table.internalProps.layoutMap.indicatorsAsCol)) &&
|
|
45915
45914
|
!table.options.customComputeRowHeight &&
|
|
45915
|
+
!table.options.rowHeightConfig &&
|
|
45916
45916
|
checkFixedStyleAndNoWrap(table, rowStart)) {
|
|
45917
45917
|
const height = computeRowHeight(table.columnHeaderLevelCount, 0, table.colCount - 1, table);
|
|
45918
45918
|
fillRowsHeight(height, table.columnHeaderLevelCount, table.rowCount - 1 - table.bottomFrozenRowCount, table, update ? newHeights : undefined);
|
|
@@ -46106,6 +46106,16 @@
|
|
|
46106
46106
|
return table.getDefaultRowHeight(row);
|
|
46107
46107
|
}
|
|
46108
46108
|
}
|
|
46109
|
+
if (table.internalProps.rowHeightConfig) {
|
|
46110
|
+
const rowHeightConfig = table.internalProps.rowHeightConfig.find((item) => item.key === row);
|
|
46111
|
+
if (rowHeightConfig) {
|
|
46112
|
+
if (!table.internalProps._heightResizedRowMap.has(row)) {
|
|
46113
|
+
table._setRowHeight(row, rowHeightConfig.height);
|
|
46114
|
+
table.internalProps._heightResizedRowMap.add(row);
|
|
46115
|
+
}
|
|
46116
|
+
return rowHeightConfig.height;
|
|
46117
|
+
}
|
|
46118
|
+
}
|
|
46109
46119
|
if (table.isPivotChart() &&
|
|
46110
46120
|
row >= table.columnHeaderLevelCount &&
|
|
46111
46121
|
row < table.rowCount - table.bottomFrozenRowCount) {
|
|
@@ -50238,7 +50248,7 @@
|
|
|
50238
50248
|
order = 0;
|
|
50239
50249
|
drawShape(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb) {
|
|
50240
50250
|
const { width = rectAttribute.width, height = rectAttribute.height, stroke = rectAttribute.stroke, strokeArrayColor = rectAttribute.strokeArrayColor, strokeArrayWidth = rectAttribute.strokeArrayWidth, lineWidth = rectAttribute.lineWidth, strokeColor = rectAttribute.stroke, cornerRadius = rectAttribute.cornerRadius } = rect.attribute;
|
|
50241
|
-
if (!stroke || (!Array.isArray(strokeArrayWidth) && lineWidth === 0)) {
|
|
50251
|
+
if (!stroke || (!Array.isArray(strokeArrayWidth) && lineWidth === 0) || width <= 0 || height <= 0) {
|
|
50242
50252
|
return;
|
|
50243
50253
|
}
|
|
50244
50254
|
if (Array.isArray(stroke) || Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth)) {
|
|
@@ -58688,10 +58698,11 @@
|
|
|
58688
58698
|
|
|
58689
58699
|
function adjustMoveHeaderTarget(source, target, table) {
|
|
58690
58700
|
const sourceCellRange = table.getCellRange(source.col, source.row);
|
|
58691
|
-
if (table.isColumnHeader(source.col, source.row)
|
|
58701
|
+
if (table.isColumnHeader(source.col, source.row) ||
|
|
58702
|
+
(table.stateManager.columnMove.movingColumnOrRow === 'column' && source.row === 0)) {
|
|
58692
58703
|
const targetCellRange = table.getCellRange(target.col, sourceCellRange.start.row);
|
|
58693
58704
|
if (target.row >= table.columnHeaderLevelCount) {
|
|
58694
|
-
target.row = table.columnHeaderLevelCount - 1;
|
|
58705
|
+
target.row = Math.max(table.columnHeaderLevelCount - 1, 0);
|
|
58695
58706
|
}
|
|
58696
58707
|
if (target.col >= source.col) {
|
|
58697
58708
|
target.col = targetCellRange.end.col;
|
|
@@ -58732,6 +58743,109 @@
|
|
|
58732
58743
|
}
|
|
58733
58744
|
return target;
|
|
58734
58745
|
}
|
|
58746
|
+
function adjustWidthResizedColMap(moveContext, table) {
|
|
58747
|
+
if (table.internalProps._widthResizedColMap.size > 0) {
|
|
58748
|
+
const resizedColIndexs = Array.from(table.internalProps._widthResizedColMap.keys());
|
|
58749
|
+
table.internalProps._widthResizedColMap.clear();
|
|
58750
|
+
for (let i = 0; i < resizedColIndexs.length; i++) {
|
|
58751
|
+
const colIndex = resizedColIndexs[i];
|
|
58752
|
+
let newColIndex;
|
|
58753
|
+
const { sourceIndex, targetIndex, sourceSize } = moveContext;
|
|
58754
|
+
if (colIndex >= sourceIndex && colIndex < sourceIndex + sourceSize) {
|
|
58755
|
+
newColIndex = targetIndex + (colIndex - sourceIndex);
|
|
58756
|
+
}
|
|
58757
|
+
else if (sourceIndex < targetIndex) {
|
|
58758
|
+
if (colIndex >= sourceIndex + sourceSize && colIndex < targetIndex) {
|
|
58759
|
+
newColIndex = colIndex - sourceSize;
|
|
58760
|
+
}
|
|
58761
|
+
else if (colIndex >= targetIndex) {
|
|
58762
|
+
newColIndex = colIndex - sourceSize;
|
|
58763
|
+
}
|
|
58764
|
+
else {
|
|
58765
|
+
newColIndex = colIndex;
|
|
58766
|
+
}
|
|
58767
|
+
}
|
|
58768
|
+
else {
|
|
58769
|
+
if (colIndex >= targetIndex && colIndex < sourceIndex) {
|
|
58770
|
+
newColIndex = colIndex + sourceSize;
|
|
58771
|
+
}
|
|
58772
|
+
else if (colIndex >= sourceIndex + sourceSize) {
|
|
58773
|
+
newColIndex = colIndex;
|
|
58774
|
+
}
|
|
58775
|
+
else {
|
|
58776
|
+
newColIndex = colIndex;
|
|
58777
|
+
}
|
|
58778
|
+
}
|
|
58779
|
+
table.internalProps._widthResizedColMap.add(newColIndex);
|
|
58780
|
+
}
|
|
58781
|
+
}
|
|
58782
|
+
}
|
|
58783
|
+
function adjustHeightResizedRowMap(moveContext, table) {
|
|
58784
|
+
if (table.internalProps._heightResizedRowMap.size > 0) {
|
|
58785
|
+
const resizedRowIndexs = Array.from(table.internalProps._heightResizedRowMap.keys());
|
|
58786
|
+
table.internalProps._heightResizedRowMap.clear();
|
|
58787
|
+
for (let i = 0; i < resizedRowIndexs.length; i++) {
|
|
58788
|
+
const rowIndex = resizedRowIndexs[i];
|
|
58789
|
+
let newRowIndex;
|
|
58790
|
+
const { sourceIndex, targetIndex, sourceSize } = moveContext;
|
|
58791
|
+
if (rowIndex >= sourceIndex && rowIndex < sourceIndex + sourceSize) {
|
|
58792
|
+
newRowIndex = targetIndex + (rowIndex - sourceIndex);
|
|
58793
|
+
}
|
|
58794
|
+
else if (sourceIndex < targetIndex) {
|
|
58795
|
+
if (rowIndex >= sourceIndex + sourceSize && rowIndex < targetIndex) {
|
|
58796
|
+
newRowIndex = rowIndex - sourceSize;
|
|
58797
|
+
}
|
|
58798
|
+
else if (rowIndex >= targetIndex) {
|
|
58799
|
+
newRowIndex = rowIndex - sourceSize;
|
|
58800
|
+
}
|
|
58801
|
+
else {
|
|
58802
|
+
newRowIndex = rowIndex;
|
|
58803
|
+
}
|
|
58804
|
+
}
|
|
58805
|
+
else {
|
|
58806
|
+
if (rowIndex >= targetIndex && rowIndex < sourceIndex) {
|
|
58807
|
+
newRowIndex = rowIndex + sourceSize;
|
|
58808
|
+
}
|
|
58809
|
+
else if (rowIndex >= sourceIndex + sourceSize) {
|
|
58810
|
+
newRowIndex = rowIndex;
|
|
58811
|
+
}
|
|
58812
|
+
else {
|
|
58813
|
+
newRowIndex = rowIndex;
|
|
58814
|
+
}
|
|
58815
|
+
}
|
|
58816
|
+
table.internalProps._heightResizedRowMap.add(newRowIndex);
|
|
58817
|
+
}
|
|
58818
|
+
}
|
|
58819
|
+
}
|
|
58820
|
+
function adjustHeightResizedRowMapWithAddRecordIndex(table, recordIndex, records) {
|
|
58821
|
+
const resizedRowIndexs = Array.from(table.internalProps._heightResizedRowMap.keys());
|
|
58822
|
+
const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
|
|
58823
|
+
const rowIndex = recordIndex + headerCount;
|
|
58824
|
+
for (let i = 0; i < resizedRowIndexs.length; i++) {
|
|
58825
|
+
if (resizedRowIndexs[i] >= rowIndex) {
|
|
58826
|
+
table.internalProps._heightResizedRowMap.delete(resizedRowIndexs[i]);
|
|
58827
|
+
table.internalProps._heightResizedRowMap.add(resizedRowIndexs[i] + records.length);
|
|
58828
|
+
}
|
|
58829
|
+
}
|
|
58830
|
+
}
|
|
58831
|
+
function adjustHeightResizedRowMapWithDeleteRecordIndex(table, recordIndexs) {
|
|
58832
|
+
const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
|
|
58833
|
+
recordIndexs.sort((a, b) => b - a);
|
|
58834
|
+
for (let i = 0; i < recordIndexs.length; i++) {
|
|
58835
|
+
const rowIndex = recordIndexs[i] + headerCount;
|
|
58836
|
+
const resizedRowIndexs = Array.from(table.internalProps._heightResizedRowMap.keys());
|
|
58837
|
+
for (let j = 0; j < resizedRowIndexs.length; j++) {
|
|
58838
|
+
if (resizedRowIndexs[j] === rowIndex) {
|
|
58839
|
+
table.internalProps._heightResizedRowMap.delete(resizedRowIndexs[j]);
|
|
58840
|
+
}
|
|
58841
|
+
else if (resizedRowIndexs[j] > rowIndex) {
|
|
58842
|
+
table.internalProps._heightResizedRowMap.delete(resizedRowIndexs[j]);
|
|
58843
|
+
table.internalProps._heightResizedRowMap.add(resizedRowIndexs[j] - 1);
|
|
58844
|
+
}
|
|
58845
|
+
else ;
|
|
58846
|
+
}
|
|
58847
|
+
}
|
|
58848
|
+
}
|
|
58735
58849
|
|
|
58736
58850
|
function startMoveCol(col, row, x, y, state, event, dragColumnOrRow) {
|
|
58737
58851
|
if (!('canMoveHeaderPosition' in state.table.internalProps.layoutMap)) {
|
|
@@ -58812,7 +58926,8 @@
|
|
|
58812
58926
|
let lineY;
|
|
58813
58927
|
let backY;
|
|
58814
58928
|
const cellLocation = state.table.getCellLocation(state.columnMove.colSource, state.columnMove.rowSource);
|
|
58815
|
-
if (cellLocation === 'columnHeader'
|
|
58929
|
+
if (cellLocation === 'columnHeader' ||
|
|
58930
|
+
(state.columnMove.movingColumnOrRow === 'column' && state.columnMove.rowSource === 0)) {
|
|
58816
58931
|
backX = state.columnMove.x;
|
|
58817
58932
|
if (state.table.isLeftFrozenColumn(col)) {
|
|
58818
58933
|
lineX =
|
|
@@ -61491,7 +61606,8 @@
|
|
|
61491
61606
|
}
|
|
61492
61607
|
isWheelEvent && state.resetInteractionState(state.interactionStateBeforeScroll);
|
|
61493
61608
|
if (event.nativeEvent?.cancelable &&
|
|
61494
|
-
(state.table.internalProps.overscrollBehavior === 'none'
|
|
61609
|
+
((state.table.internalProps.overscrollBehavior === 'none' &&
|
|
61610
|
+
((deltaY && isVerticalExistScrollBar(state)) || (deltaX && isHorizontalExistScrollBar(state)))) ||
|
|
61495
61611
|
(Math.abs(deltaY) >= Math.abs(deltaX) && deltaY !== 0 && isVerticalScrollable(deltaY, state)) ||
|
|
61496
61612
|
(Math.abs(deltaY) <= Math.abs(deltaX) && deltaX !== 0 && isHorizontalScrollable(deltaX, state)))) {
|
|
61497
61613
|
event.nativeEvent.preventDefault();
|
|
@@ -61518,6 +61634,20 @@
|
|
|
61518
61634
|
}
|
|
61519
61635
|
return !isScrollToLeft(deltaX, state) && !isScrollToRight(deltaX, state);
|
|
61520
61636
|
}
|
|
61637
|
+
function isVerticalExistScrollBar(state) {
|
|
61638
|
+
const totalHeight = state.table.getAllRowsHeight() - state.table.scenegraph.height;
|
|
61639
|
+
if (totalHeight <= 0) {
|
|
61640
|
+
return false;
|
|
61641
|
+
}
|
|
61642
|
+
return true;
|
|
61643
|
+
}
|
|
61644
|
+
function isHorizontalExistScrollBar(state) {
|
|
61645
|
+
const totalWidth = state.table.getAllColsWidth() - state.table.scenegraph.width;
|
|
61646
|
+
if (totalWidth <= 0) {
|
|
61647
|
+
return false;
|
|
61648
|
+
}
|
|
61649
|
+
return true;
|
|
61650
|
+
}
|
|
61521
61651
|
function isScrollToTop(deltaY, state) {
|
|
61522
61652
|
const totalHeight = state.table.getAllRowsHeight() - state.table.scenegraph.height;
|
|
61523
61653
|
return totalHeight !== 0 && deltaY <= 0 && state.scroll.verticalBarPos < 1;
|
|
@@ -63183,7 +63313,9 @@
|
|
|
63183
63313
|
eventManager.touchMovePoints[eventManager.touchMovePoints.length - 2].y;
|
|
63184
63314
|
handleWhell({ deltaX, deltaY }, stateManager);
|
|
63185
63315
|
if (e.cancelable &&
|
|
63186
|
-
(table.internalProps.overscrollBehavior === 'none'
|
|
63316
|
+
((table.internalProps.overscrollBehavior === 'none' &&
|
|
63317
|
+
((deltaY && isVerticalExistScrollBar(stateManager)) ||
|
|
63318
|
+
(deltaX && isHorizontalExistScrollBar(stateManager)))) ||
|
|
63187
63319
|
(Math.abs(deltaY) >= Math.abs(deltaX) && deltaY !== 0 && isVerticalScrollable(deltaY, stateManager)) ||
|
|
63188
63320
|
(Math.abs(deltaY) <= Math.abs(deltaX) && deltaX !== 0 && isHorizontalScrollable(deltaX, stateManager)))) {
|
|
63189
63321
|
e.preventDefault();
|
|
@@ -69272,7 +69404,7 @@
|
|
|
69272
69404
|
return TABLE_EVENT_TYPE;
|
|
69273
69405
|
}
|
|
69274
69406
|
options;
|
|
69275
|
-
version = "1.22.3
|
|
69407
|
+
version = "1.22.3";
|
|
69276
69408
|
pagination;
|
|
69277
69409
|
id = `VTable${Date.now()}`;
|
|
69278
69410
|
headerStyleCache;
|
|
@@ -70317,6 +70449,9 @@
|
|
|
70317
70449
|
else if (this.options.customComputeRowHeight) {
|
|
70318
70450
|
return true;
|
|
70319
70451
|
}
|
|
70452
|
+
else if (this.internalProps.rowHeightConfig) {
|
|
70453
|
+
return true;
|
|
70454
|
+
}
|
|
70320
70455
|
else if (row >= 0 && row < this.columnHeaderLevelCount) {
|
|
70321
70456
|
return this.getDefaultRowHeight(row) === 'auto';
|
|
70322
70457
|
}
|
|
@@ -75522,7 +75657,8 @@
|
|
|
75522
75657
|
}
|
|
75523
75658
|
}
|
|
75524
75659
|
const sourceCellRange = this.getCellRange(source.col, source.row);
|
|
75525
|
-
if (this.isColumnHeader(source.col, source.row)
|
|
75660
|
+
if (this.isColumnHeader(source.col, source.row) ||
|
|
75661
|
+
(this._table.stateManager.columnMove.movingColumnOrRow === 'column' && source.row === 0)) {
|
|
75526
75662
|
const sourceTopId = this.getParentCellId(source.col, sourceCellRange.start.row);
|
|
75527
75663
|
const targetTopId = this.getParentCellId(target.col, sourceCellRange.start.row);
|
|
75528
75664
|
return sourceTopId === targetTopId;
|
|
@@ -75539,7 +75675,8 @@
|
|
|
75539
75675
|
this._table.options.dragOrder?.validateDragOrderOnEnd(source, target)) &&
|
|
75540
75676
|
this.canMoveHeaderPosition(source, target)) {
|
|
75541
75677
|
let sourceCellRange = this.getCellRange(source.col, source.row);
|
|
75542
|
-
if (this.isColumnHeader(source.col, source.row)
|
|
75678
|
+
if (this.isColumnHeader(source.col, source.row) ||
|
|
75679
|
+
(this._table.stateManager.columnMove.movingColumnOrRow === 'column' && source.row === 0)) {
|
|
75543
75680
|
const sourceSize = sourceCellRange.end.col - sourceCellRange.start.col + 1;
|
|
75544
75681
|
let targetIndex;
|
|
75545
75682
|
const targetCellRange = this.getCellRange(target.col, sourceCellRange.start.row);
|
|
@@ -75561,8 +75698,8 @@
|
|
|
75561
75698
|
for (let j = 0; j < this._table.dataSource.dataSourceObj?.records.length; j++) {
|
|
75562
75699
|
const rowRecords = this._table.dataSource.dataSourceObj?.records[j];
|
|
75563
75700
|
if (Array.isArray(rowRecords)) {
|
|
75564
|
-
if (rowRecords.length - 1 < targetIndex) {
|
|
75565
|
-
rowRecords.push(...Array(targetIndex - rowRecords.length + 1).fill(undefined));
|
|
75701
|
+
if (rowRecords.length - 1 < Math.max(targetIndex, source.col)) {
|
|
75702
|
+
rowRecords.push(...Array(Math.max(targetIndex, source.col) - rowRecords.length + 1).fill(undefined));
|
|
75566
75703
|
}
|
|
75567
75704
|
const sourceData = rowRecords.splice(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceSize);
|
|
75568
75705
|
sourceData.unshift((targetIndex - this.leftRowSeriesNumberColumnCount), 0);
|
|
@@ -77025,6 +77162,7 @@
|
|
|
77025
77162
|
this.internalProps.headerHelper.setTableColumnsEditor();
|
|
77026
77163
|
this.showHeader = options.showHeader ?? true;
|
|
77027
77164
|
this.internalProps.columnWidthConfig = options.columnWidthConfig;
|
|
77165
|
+
this.internalProps.rowHeightConfig = options.rowHeightConfig;
|
|
77028
77166
|
this.transpose = options.transpose ?? false;
|
|
77029
77167
|
if (Env.mode !== 'node') {
|
|
77030
77168
|
this.editorManager = new EditManager(this);
|
|
@@ -77427,6 +77565,7 @@
|
|
|
77427
77565
|
this.refreshHeader();
|
|
77428
77566
|
this.internalProps.useOneRowHeightFillAll = false;
|
|
77429
77567
|
this.internalProps.columnWidthConfig = options.columnWidthConfig;
|
|
77568
|
+
this.internalProps.rowHeightConfig = options.rowHeightConfig;
|
|
77430
77569
|
if (internalProps.releaseList) {
|
|
77431
77570
|
for (let i = internalProps.releaseList.length - 1; i >= 0; i--) {
|
|
77432
77571
|
const releaseObj = internalProps.releaseList[i];
|
|
@@ -77575,6 +77714,7 @@
|
|
|
77575
77714
|
if (moveContext) {
|
|
77576
77715
|
if (moveContext.moveType === 'column') {
|
|
77577
77716
|
this.colWidthsMap.exchangeOrder(sourceCellRange.start.col, sourceCellRange.end.col - sourceCellRange.start.col + 1, targetCellRange.start.col, targetCellRange.end.col - targetCellRange.start.col + 1, moveContext.targetIndex);
|
|
77717
|
+
adjustWidthResizedColMap(moveContext, this);
|
|
77578
77718
|
if (!this.transpose) {
|
|
77579
77719
|
this.colWidthsLimit = {};
|
|
77580
77720
|
this.setMinMaxLimitWidth();
|
|
@@ -77587,6 +77727,7 @@
|
|
|
77587
77727
|
else {
|
|
77588
77728
|
this.rowHeightsMap.exchangeOrder(moveContext.sourceIndex, moveContext.sourceSize, moveContext.targetIndex, moveContext.targetSize, moveContext.targetIndex);
|
|
77589
77729
|
}
|
|
77730
|
+
adjustHeightResizedRowMap(moveContext, this);
|
|
77590
77731
|
}
|
|
77591
77732
|
return moveContext;
|
|
77592
77733
|
}
|
|
@@ -77854,7 +77995,7 @@
|
|
|
77854
77995
|
this.stateManager.updateSortState(sortState);
|
|
77855
77996
|
}
|
|
77856
77997
|
}
|
|
77857
|
-
updateFilterRules(filterRules) {
|
|
77998
|
+
updateFilterRules(filterRules, options = { clearRowHeightCache: true }) {
|
|
77858
77999
|
this.scenegraph.clearCells();
|
|
77859
78000
|
if (this.sortState) {
|
|
77860
78001
|
this.dataSource.updateFilterRulesForSorted(filterRules);
|
|
@@ -77865,7 +78006,7 @@
|
|
|
77865
78006
|
}
|
|
77866
78007
|
this.refreshRowColCount();
|
|
77867
78008
|
this.stateManager.initCheckedState(this.records);
|
|
77868
|
-
this.scenegraph.createSceneGraph();
|
|
78009
|
+
this.scenegraph.createSceneGraph(!!!options?.clearRowHeightCache);
|
|
77869
78010
|
this.resize();
|
|
77870
78011
|
}
|
|
77871
78012
|
getFilteredRecords() {
|
|
@@ -78074,6 +78215,7 @@
|
|
|
78074
78215
|
}
|
|
78075
78216
|
addRecord(record, recordIndex) {
|
|
78076
78217
|
const success = listTableAddRecord(record, recordIndex, this);
|
|
78218
|
+
adjustHeightResizedRowMapWithAddRecordIndex(this, recordIndex, [record]);
|
|
78077
78219
|
this.internalProps.emptyTip?.resetVisible();
|
|
78078
78220
|
if (success) {
|
|
78079
78221
|
this.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, {
|
|
@@ -78085,6 +78227,9 @@
|
|
|
78085
78227
|
}
|
|
78086
78228
|
addRecords(records, recordIndex) {
|
|
78087
78229
|
const success = listTableAddRecords(records, recordIndex, this);
|
|
78230
|
+
if (typeof recordIndex === 'number') {
|
|
78231
|
+
adjustHeightResizedRowMapWithAddRecordIndex(this, recordIndex, records);
|
|
78232
|
+
}
|
|
78088
78233
|
this.internalProps.emptyTip?.resetVisible();
|
|
78089
78234
|
if (success) {
|
|
78090
78235
|
this.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, {
|
|
@@ -78096,6 +78241,7 @@
|
|
|
78096
78241
|
}
|
|
78097
78242
|
deleteRecords(recordIndexs) {
|
|
78098
78243
|
listTableDeleteRecords(recordIndexs, this);
|
|
78244
|
+
adjustHeightResizedRowMapWithDeleteRecordIndex(this, recordIndexs);
|
|
78099
78245
|
this.internalProps.emptyTip?.resetVisible();
|
|
78100
78246
|
const rowIndexs = [];
|
|
78101
78247
|
for (let i = 0; i < recordIndexs.length; i++) {
|
|
@@ -86670,6 +86816,37 @@
|
|
|
86670
86816
|
});
|
|
86671
86817
|
return headerPaths;
|
|
86672
86818
|
}
|
|
86819
|
+
getCellRowHeaderFullPaths(col) {
|
|
86820
|
+
const headerPaths = [];
|
|
86821
|
+
if (this.rowHierarchyType === 'grid') {
|
|
86822
|
+
for (let i = 0; i <= Math.min(this.rowsDefine.length - 1, col); i++) {
|
|
86823
|
+
const rowDefine = this.rowsDefine[i];
|
|
86824
|
+
if (typeof rowDefine === 'string') {
|
|
86825
|
+
headerPaths.push({
|
|
86826
|
+
dimensionKey: rowDefine
|
|
86827
|
+
});
|
|
86828
|
+
}
|
|
86829
|
+
else {
|
|
86830
|
+
headerPaths.push({
|
|
86831
|
+
dimensionKey: rowDefine.dimensionKey
|
|
86832
|
+
});
|
|
86833
|
+
}
|
|
86834
|
+
}
|
|
86835
|
+
if (col >= this.rowsDefine.length && this.indicatorsAsCol === false && this.indicatorsDefine.length > 0) {
|
|
86836
|
+
if (typeof this.indicatorsDefine[0] === 'string') {
|
|
86837
|
+
headerPaths.push({
|
|
86838
|
+
indicatorKey: this.indicatorsDefine[0]
|
|
86839
|
+
});
|
|
86840
|
+
}
|
|
86841
|
+
else {
|
|
86842
|
+
headerPaths.push({
|
|
86843
|
+
indicatorKey: this.indicatorsDefine[0].indicatorKey
|
|
86844
|
+
});
|
|
86845
|
+
}
|
|
86846
|
+
}
|
|
86847
|
+
}
|
|
86848
|
+
return headerPaths;
|
|
86849
|
+
}
|
|
86673
86850
|
getIndicatorInfoByIndicatorKey(indicatorKey) {
|
|
86674
86851
|
const indicatorInfo = this.indicatorsDefine?.find(indicator => {
|
|
86675
86852
|
if (typeof indicator === 'string') {
|
|
@@ -87450,7 +87627,17 @@
|
|
|
87450
87627
|
const { startInTotal, afterSpanLevel } = rowDimensionFinded ?? defaultDimension;
|
|
87451
87628
|
row += startInTotal ?? 0;
|
|
87452
87629
|
if (this.rowHierarchyType === 'grid') {
|
|
87453
|
-
|
|
87630
|
+
const isMatch = rowHeaderPaths.every((path, index) => {
|
|
87631
|
+
return this.rowDimensionKeys[index] === path.dimensionKey;
|
|
87632
|
+
});
|
|
87633
|
+
if (isMatch) {
|
|
87634
|
+
const col = rowHeaderPaths.length - 1;
|
|
87635
|
+
defaultCol = (this.rowHeaderTitle ? col + 1 : col) + this.leftRowSeriesNumberColumnCount;
|
|
87636
|
+
}
|
|
87637
|
+
else {
|
|
87638
|
+
defaultCol =
|
|
87639
|
+
(this.rowHeaderTitle ? afterSpanLevel + 1 : afterSpanLevel) + this.leftRowSeriesNumberColumnCount;
|
|
87640
|
+
}
|
|
87454
87641
|
}
|
|
87455
87642
|
else {
|
|
87456
87643
|
defaultCol = 0;
|
|
@@ -87465,6 +87652,15 @@
|
|
|
87465
87652
|
if (isValid$3(col) || isValid$3(row)) {
|
|
87466
87653
|
return { col: col ?? defaultCol, row: row ?? defaultRow };
|
|
87467
87654
|
}
|
|
87655
|
+
if (rowHeaderPaths.length > 0) {
|
|
87656
|
+
const isMatch = rowHeaderPaths.every((path, index) => {
|
|
87657
|
+
return this.rowDimensionKeys[index] === path.dimensionKey;
|
|
87658
|
+
});
|
|
87659
|
+
if (isMatch) {
|
|
87660
|
+
const col = rowHeaderPaths.length - 1;
|
|
87661
|
+
return { col: (this.rowHeaderTitle ? col + 1 : col) + this.leftRowSeriesNumberColumnCount, row: undefined };
|
|
87662
|
+
}
|
|
87663
|
+
}
|
|
87468
87664
|
return undefined;
|
|
87469
87665
|
}
|
|
87470
87666
|
setChartInstance(_col, _row, chartInstance) {
|
|
@@ -91927,6 +92123,9 @@
|
|
|
91927
92123
|
cellLocation
|
|
91928
92124
|
};
|
|
91929
92125
|
}
|
|
92126
|
+
getCellRowHeaderFullPaths(col) {
|
|
92127
|
+
return this.internalProps.layoutMap.getCellRowHeaderFullPaths(col);
|
|
92128
|
+
}
|
|
91930
92129
|
setLoadingHierarchyState(col, row) {
|
|
91931
92130
|
this.scenegraph.setLoadingHierarchyState(col, row);
|
|
91932
92131
|
}
|
|
@@ -93786,7 +93985,7 @@
|
|
|
93786
93985
|
}
|
|
93787
93986
|
|
|
93788
93987
|
registerForVrender();
|
|
93789
|
-
const version = "1.22.3
|
|
93988
|
+
const version = "1.22.3";
|
|
93790
93989
|
function getIcons() {
|
|
93791
93990
|
return get$2();
|
|
93792
93991
|
}
|
|
@@ -93794,6 +93993,8 @@
|
|
|
93794
93993
|
clearAll();
|
|
93795
93994
|
}
|
|
93796
93995
|
|
|
93996
|
+
exports.CUSTOM_CONTAINER_NAME = CUSTOM_CONTAINER_NAME;
|
|
93997
|
+
exports.CUSTOM_MERGE_PRE_NAME = CUSTOM_MERGE_PRE_NAME;
|
|
93797
93998
|
exports.CustomLayout = index;
|
|
93798
93999
|
exports.DataStatistics = DataStatistics;
|
|
93799
94000
|
exports.EventTarget = EventTarget$1;
|