@visactor/vtable 1.22.2 → 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/PivotChart.js +10 -8
- package/cjs/PivotChart.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/dataset/dataset.js +5 -1
- package/cjs/dataset/dataset.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/chart-helper/get-axis-config.d.ts +1 -0
- package/cjs/layout/chart-helper/get-axis-config.js +11 -8
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
- package/cjs/layout/chart-helper/get-chart-spec.js +7 -7
- package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/cjs/layout/index.js +2 -1
- package/cjs/layout/pivot-header-layout.d.ts +2 -1
- package/cjs/layout/pivot-header-layout.js +38 -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/scenegraph/scenegraph.js +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/new-data-set.d.ts +1 -0
- package/cjs/ts-types/new-data-set.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 +297 -48
- 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/PivotChart.js +10 -8
- package/es/PivotChart.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/dataset/dataset.js +5 -1
- package/es/dataset/dataset.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/chart-helper/get-axis-config.d.ts +1 -0
- package/es/layout/chart-helper/get-axis-config.js +11 -8
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/layout/chart-helper/get-chart-spec.js +6 -7
- package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/es/layout/index.js +2 -1
- package/es/layout/pivot-header-layout.d.ts +2 -1
- package/es/layout/pivot-header-layout.js +38 -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/scenegraph/scenegraph.js +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/new-data-set.d.ts +1 -0
- package/es/ts-types/new-data-set.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 +4 -4
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();
|
|
@@ -68105,17 +68237,23 @@
|
|
|
68105
68237
|
const chartCellStyle = layout._table._getCellStyle(col, row - 1);
|
|
68106
68238
|
const padding = getQuadProps(getProp('padding', chartCellStyle, col, row - 1, layout._table));
|
|
68107
68239
|
const { range, ticks, axisOption, index, targetTicks, targetRange, theme } = axisRange;
|
|
68240
|
+
if (isNumber$4(axisOption?.max)) {
|
|
68241
|
+
range.max = axisOption.max;
|
|
68242
|
+
if (range.max < 0) {
|
|
68243
|
+
axisOption.zero = false;
|
|
68244
|
+
}
|
|
68245
|
+
}
|
|
68246
|
+
else if (chartType === 'boxPlot') {
|
|
68247
|
+
range.max += (range.max - range.min) / 20;
|
|
68248
|
+
}
|
|
68108
68249
|
if (isNumber$4(axisOption?.min)) {
|
|
68109
68250
|
range.min = axisOption.min;
|
|
68110
68251
|
if (range.min > 0) {
|
|
68111
68252
|
axisOption.zero = false;
|
|
68112
68253
|
}
|
|
68113
68254
|
}
|
|
68114
|
-
if (
|
|
68115
|
-
range.max
|
|
68116
|
-
if (range.max < 0) {
|
|
68117
|
-
axisOption.zero = false;
|
|
68118
|
-
}
|
|
68255
|
+
else if (chartType === 'boxPlot') {
|
|
68256
|
+
range.min -= (range.max - range.min) / 20;
|
|
68119
68257
|
}
|
|
68120
68258
|
let domain = [];
|
|
68121
68259
|
if (chartType === 'heatmap') {
|
|
@@ -68197,17 +68335,23 @@
|
|
|
68197
68335
|
const chartCellStyle = layout._table._getCellStyle(col + 1, row);
|
|
68198
68336
|
const padding = getQuadProps(getProp('padding', chartCellStyle, col + 1, row, layout._table));
|
|
68199
68337
|
const { range, ticks, axisOption, index, targetTicks, targetRange, theme } = axisRange;
|
|
68338
|
+
if (isNumber$4(axisOption?.max)) {
|
|
68339
|
+
range.max = axisOption.max;
|
|
68340
|
+
if (range.max < 0) {
|
|
68341
|
+
axisOption.zero = false;
|
|
68342
|
+
}
|
|
68343
|
+
}
|
|
68344
|
+
else if (chartType === 'boxPlot') {
|
|
68345
|
+
range.max += (range.max - range.min) / 20;
|
|
68346
|
+
}
|
|
68200
68347
|
if (isNumber$4(axisOption?.min)) {
|
|
68201
68348
|
range.min = axisOption.min;
|
|
68202
68349
|
if (range.min > 0) {
|
|
68203
68350
|
axisOption.zero = false;
|
|
68204
68351
|
}
|
|
68205
68352
|
}
|
|
68206
|
-
if (
|
|
68207
|
-
range.max
|
|
68208
|
-
if (range.max < 0) {
|
|
68209
|
-
axisOption.zero = false;
|
|
68210
|
-
}
|
|
68353
|
+
else if (chartType === 'boxPlot') {
|
|
68354
|
+
range.min -= (range.max - range.min) / 20;
|
|
68211
68355
|
}
|
|
68212
68356
|
let domain = [];
|
|
68213
68357
|
if (chartType === 'heatmap') {
|
|
@@ -68672,7 +68816,7 @@
|
|
|
68672
68816
|
};
|
|
68673
68817
|
}
|
|
68674
68818
|
function getAxisRangeAndTicks(col, row, index, position, subAxisPosition, indicatorKeys, path, layout) {
|
|
68675
|
-
const { range, isZeroAlign, isTickAlign, axisOption } = getChartAxisRange(col, row, index, position, indicatorKeys, path, layout);
|
|
68819
|
+
const { range, isZeroAlign, isTickAlign, axisOption, chartType } = getChartAxisRange(col, row, index, position, indicatorKeys, path, layout);
|
|
68676
68820
|
const { targetRange, targetTicks } = getTargetRangeAndTicks(col, row, index, isZeroAlign, isTickAlign, range, indicatorKeys, subAxisPosition, path, layout);
|
|
68677
68821
|
if (index !== 0 && targetTicks) {
|
|
68678
68822
|
const getAxisDomainRangeAndLabels = Factory.getFunction('getAxisDomainRangeAndLabels');
|
|
@@ -68689,7 +68833,8 @@
|
|
|
68689
68833
|
axisOption,
|
|
68690
68834
|
range,
|
|
68691
68835
|
targetTicks,
|
|
68692
|
-
targetRange
|
|
68836
|
+
targetRange,
|
|
68837
|
+
chartType
|
|
68693
68838
|
};
|
|
68694
68839
|
}
|
|
68695
68840
|
function getTargetRangeAndTicks(col, row, index, isZeroAlign, isTickAlign, range, indicatorKeys, subAxisPosition, path, layout) {
|
|
@@ -69259,7 +69404,7 @@
|
|
|
69259
69404
|
return TABLE_EVENT_TYPE;
|
|
69260
69405
|
}
|
|
69261
69406
|
options;
|
|
69262
|
-
version = "1.22.
|
|
69407
|
+
version = "1.22.3";
|
|
69263
69408
|
pagination;
|
|
69264
69409
|
id = `VTable${Date.now()}`;
|
|
69265
69410
|
headerStyleCache;
|
|
@@ -70304,6 +70449,9 @@
|
|
|
70304
70449
|
else if (this.options.customComputeRowHeight) {
|
|
70305
70450
|
return true;
|
|
70306
70451
|
}
|
|
70452
|
+
else if (this.internalProps.rowHeightConfig) {
|
|
70453
|
+
return true;
|
|
70454
|
+
}
|
|
70307
70455
|
else if (row >= 0 && row < this.columnHeaderLevelCount) {
|
|
70308
70456
|
return this.getDefaultRowHeight(row) === 'auto';
|
|
70309
70457
|
}
|
|
@@ -74098,12 +74246,18 @@
|
|
|
74098
74246
|
const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);
|
|
74099
74247
|
const colPath = layout.getColKeysPath(col, row);
|
|
74100
74248
|
indicatorKeys.forEach((key, index) => {
|
|
74101
|
-
const { range, targetTicks, targetRange, axisOption } = getAxisRangeAndTicks(col, row, index, index === 0 ? 'bottom' : 'top', index === 0 ? 'top' : 'bottom', indicatorKeys, colPath, layout);
|
|
74249
|
+
const { range, targetTicks, targetRange, axisOption, chartType } = getAxisRangeAndTicks(col, row, index, index === 0 ? 'bottom' : 'top', index === 0 ? 'top' : 'bottom', indicatorKeys, colPath, layout);
|
|
74250
|
+
if (isNumber$4(axisOption?.max)) {
|
|
74251
|
+
range.max = axisOption.max;
|
|
74252
|
+
}
|
|
74253
|
+
else if (chartType === 'boxPlot') {
|
|
74254
|
+
range.max += (range.max - range.min) / 20;
|
|
74255
|
+
}
|
|
74102
74256
|
if (isNumber$4(axisOption?.min)) {
|
|
74103
74257
|
range.min = axisOption.min;
|
|
74104
74258
|
}
|
|
74105
|
-
if (
|
|
74106
|
-
range.max
|
|
74259
|
+
else if (chartType === 'boxPlot') {
|
|
74260
|
+
range.min -= (range.max - range.min) / 20;
|
|
74107
74261
|
}
|
|
74108
74262
|
if (hasSameAxis(axisOption, axes)) {
|
|
74109
74263
|
return;
|
|
@@ -74153,16 +74307,22 @@
|
|
|
74153
74307
|
const rowPath = layout.getRowKeysPath(col, row);
|
|
74154
74308
|
indicatorKeys.forEach((key, index) => {
|
|
74155
74309
|
const { range, targetTicks, targetRange, axisOption } = getAxisRangeAndTicks(col, row, index, index === 0 ? 'left' : 'right', index === 0 ? 'right' : 'left', indicatorKeys, rowPath, layout);
|
|
74310
|
+
const { chartType } = getAxisOption(col, row, index === 0 ? 'left' : 'right', layout);
|
|
74311
|
+
if (isNumber$4(axisOption?.max)) {
|
|
74312
|
+
range.max = axisOption.max;
|
|
74313
|
+
}
|
|
74314
|
+
else if (chartType === 'boxPlot') {
|
|
74315
|
+
range.max += (range.max - range.min) / 20;
|
|
74316
|
+
}
|
|
74156
74317
|
if (isNumber$4(axisOption?.min)) {
|
|
74157
74318
|
range.min = axisOption.min;
|
|
74158
74319
|
}
|
|
74159
|
-
if (
|
|
74160
|
-
range.max
|
|
74320
|
+
else if (chartType === 'boxPlot') {
|
|
74321
|
+
range.min -= (range.max - range.min) / 20;
|
|
74161
74322
|
}
|
|
74162
74323
|
if (hasSameAxis(axisOption, axes)) {
|
|
74163
74324
|
return;
|
|
74164
74325
|
}
|
|
74165
|
-
const { chartType } = getAxisOption(col, row, index === 0 ? 'left' : 'right', layout);
|
|
74166
74326
|
let domain = [];
|
|
74167
74327
|
if (chartType === 'heatmap') {
|
|
74168
74328
|
const rowDimensionKey = layout.getDimensionKeyInChartSpec(layout.rowHeaderLevelCount, row, 'yField');
|
|
@@ -75497,7 +75657,8 @@
|
|
|
75497
75657
|
}
|
|
75498
75658
|
}
|
|
75499
75659
|
const sourceCellRange = this.getCellRange(source.col, source.row);
|
|
75500
|
-
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)) {
|
|
75501
75662
|
const sourceTopId = this.getParentCellId(source.col, sourceCellRange.start.row);
|
|
75502
75663
|
const targetTopId = this.getParentCellId(target.col, sourceCellRange.start.row);
|
|
75503
75664
|
return sourceTopId === targetTopId;
|
|
@@ -75514,7 +75675,8 @@
|
|
|
75514
75675
|
this._table.options.dragOrder?.validateDragOrderOnEnd(source, target)) &&
|
|
75515
75676
|
this.canMoveHeaderPosition(source, target)) {
|
|
75516
75677
|
let sourceCellRange = this.getCellRange(source.col, source.row);
|
|
75517
|
-
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)) {
|
|
75518
75680
|
const sourceSize = sourceCellRange.end.col - sourceCellRange.start.col + 1;
|
|
75519
75681
|
let targetIndex;
|
|
75520
75682
|
const targetCellRange = this.getCellRange(target.col, sourceCellRange.start.row);
|
|
@@ -75536,8 +75698,8 @@
|
|
|
75536
75698
|
for (let j = 0; j < this._table.dataSource.dataSourceObj?.records.length; j++) {
|
|
75537
75699
|
const rowRecords = this._table.dataSource.dataSourceObj?.records[j];
|
|
75538
75700
|
if (Array.isArray(rowRecords)) {
|
|
75539
|
-
if (rowRecords.length - 1 < targetIndex) {
|
|
75540
|
-
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));
|
|
75541
75703
|
}
|
|
75542
75704
|
const sourceData = rowRecords.splice(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceSize);
|
|
75543
75705
|
sourceData.unshift((targetIndex - this.leftRowSeriesNumberColumnCount), 0);
|
|
@@ -77000,6 +77162,7 @@
|
|
|
77000
77162
|
this.internalProps.headerHelper.setTableColumnsEditor();
|
|
77001
77163
|
this.showHeader = options.showHeader ?? true;
|
|
77002
77164
|
this.internalProps.columnWidthConfig = options.columnWidthConfig;
|
|
77165
|
+
this.internalProps.rowHeightConfig = options.rowHeightConfig;
|
|
77003
77166
|
this.transpose = options.transpose ?? false;
|
|
77004
77167
|
if (Env.mode !== 'node') {
|
|
77005
77168
|
this.editorManager = new EditManager(this);
|
|
@@ -77402,6 +77565,7 @@
|
|
|
77402
77565
|
this.refreshHeader();
|
|
77403
77566
|
this.internalProps.useOneRowHeightFillAll = false;
|
|
77404
77567
|
this.internalProps.columnWidthConfig = options.columnWidthConfig;
|
|
77568
|
+
this.internalProps.rowHeightConfig = options.rowHeightConfig;
|
|
77405
77569
|
if (internalProps.releaseList) {
|
|
77406
77570
|
for (let i = internalProps.releaseList.length - 1; i >= 0; i--) {
|
|
77407
77571
|
const releaseObj = internalProps.releaseList[i];
|
|
@@ -77550,6 +77714,7 @@
|
|
|
77550
77714
|
if (moveContext) {
|
|
77551
77715
|
if (moveContext.moveType === 'column') {
|
|
77552
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);
|
|
77553
77718
|
if (!this.transpose) {
|
|
77554
77719
|
this.colWidthsLimit = {};
|
|
77555
77720
|
this.setMinMaxLimitWidth();
|
|
@@ -77562,6 +77727,7 @@
|
|
|
77562
77727
|
else {
|
|
77563
77728
|
this.rowHeightsMap.exchangeOrder(moveContext.sourceIndex, moveContext.sourceSize, moveContext.targetIndex, moveContext.targetSize, moveContext.targetIndex);
|
|
77564
77729
|
}
|
|
77730
|
+
adjustHeightResizedRowMap(moveContext, this);
|
|
77565
77731
|
}
|
|
77566
77732
|
return moveContext;
|
|
77567
77733
|
}
|
|
@@ -77829,7 +77995,7 @@
|
|
|
77829
77995
|
this.stateManager.updateSortState(sortState);
|
|
77830
77996
|
}
|
|
77831
77997
|
}
|
|
77832
|
-
updateFilterRules(filterRules) {
|
|
77998
|
+
updateFilterRules(filterRules, options = { clearRowHeightCache: true }) {
|
|
77833
77999
|
this.scenegraph.clearCells();
|
|
77834
78000
|
if (this.sortState) {
|
|
77835
78001
|
this.dataSource.updateFilterRulesForSorted(filterRules);
|
|
@@ -77840,7 +78006,7 @@
|
|
|
77840
78006
|
}
|
|
77841
78007
|
this.refreshRowColCount();
|
|
77842
78008
|
this.stateManager.initCheckedState(this.records);
|
|
77843
|
-
this.scenegraph.createSceneGraph();
|
|
78009
|
+
this.scenegraph.createSceneGraph(!!!options?.clearRowHeightCache);
|
|
77844
78010
|
this.resize();
|
|
77845
78011
|
}
|
|
77846
78012
|
getFilteredRecords() {
|
|
@@ -78049,6 +78215,7 @@
|
|
|
78049
78215
|
}
|
|
78050
78216
|
addRecord(record, recordIndex) {
|
|
78051
78217
|
const success = listTableAddRecord(record, recordIndex, this);
|
|
78218
|
+
adjustHeightResizedRowMapWithAddRecordIndex(this, recordIndex, [record]);
|
|
78052
78219
|
this.internalProps.emptyTip?.resetVisible();
|
|
78053
78220
|
if (success) {
|
|
78054
78221
|
this.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, {
|
|
@@ -78060,6 +78227,9 @@
|
|
|
78060
78227
|
}
|
|
78061
78228
|
addRecords(records, recordIndex) {
|
|
78062
78229
|
const success = listTableAddRecords(records, recordIndex, this);
|
|
78230
|
+
if (typeof recordIndex === 'number') {
|
|
78231
|
+
adjustHeightResizedRowMapWithAddRecordIndex(this, recordIndex, records);
|
|
78232
|
+
}
|
|
78063
78233
|
this.internalProps.emptyTip?.resetVisible();
|
|
78064
78234
|
if (success) {
|
|
78065
78235
|
this.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, {
|
|
@@ -78071,6 +78241,7 @@
|
|
|
78071
78241
|
}
|
|
78072
78242
|
deleteRecords(recordIndexs) {
|
|
78073
78243
|
listTableDeleteRecords(recordIndexs, this);
|
|
78244
|
+
adjustHeightResizedRowMapWithDeleteRecordIndex(this, recordIndexs);
|
|
78074
78245
|
this.internalProps.emptyTip?.resetVisible();
|
|
78075
78246
|
const rowIndexs = [];
|
|
78076
78247
|
for (let i = 0; i < recordIndexs.length; i++) {
|
|
@@ -86645,6 +86816,37 @@
|
|
|
86645
86816
|
});
|
|
86646
86817
|
return headerPaths;
|
|
86647
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
|
+
}
|
|
86648
86850
|
getIndicatorInfoByIndicatorKey(indicatorKey) {
|
|
86649
86851
|
const indicatorInfo = this.indicatorsDefine?.find(indicator => {
|
|
86650
86852
|
if (typeof indicator === 'string') {
|
|
@@ -87425,7 +87627,17 @@
|
|
|
87425
87627
|
const { startInTotal, afterSpanLevel } = rowDimensionFinded ?? defaultDimension;
|
|
87426
87628
|
row += startInTotal ?? 0;
|
|
87427
87629
|
if (this.rowHierarchyType === 'grid') {
|
|
87428
|
-
|
|
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
|
+
}
|
|
87429
87641
|
}
|
|
87430
87642
|
else {
|
|
87431
87643
|
defaultCol = 0;
|
|
@@ -87440,6 +87652,15 @@
|
|
|
87440
87652
|
if (isValid$3(col) || isValid$3(row)) {
|
|
87441
87653
|
return { col: col ?? defaultCol, row: row ?? defaultRow };
|
|
87442
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
|
+
}
|
|
87443
87664
|
return undefined;
|
|
87444
87665
|
}
|
|
87445
87666
|
setChartInstance(_col, _row, chartInstance) {
|
|
@@ -87811,6 +88032,9 @@
|
|
|
87811
88032
|
const chartSpec = this.getRawChartSpec(_col, _row);
|
|
87812
88033
|
const indicatorKeys = [];
|
|
87813
88034
|
if (chartSpec) {
|
|
88035
|
+
if (chartSpec.type === 'boxPlot') {
|
|
88036
|
+
return [chartSpec.maxField];
|
|
88037
|
+
}
|
|
87814
88038
|
if (chartSpec.series || chartSpec.xField || chartSpec.yField) {
|
|
87815
88039
|
if (this.indicatorsAsCol === false) {
|
|
87816
88040
|
if (chartSpec.series) {
|
|
@@ -88971,8 +89195,22 @@
|
|
|
88971
89195
|
}
|
|
88972
89196
|
else if (this.collectValuesBy[field].range) {
|
|
88973
89197
|
const fieldRange = this.collectedValues[field][collectKeys];
|
|
88974
|
-
|
|
88975
|
-
|
|
89198
|
+
let max = Math.max(record[field], fieldRange.max);
|
|
89199
|
+
let min = Math.min(record[field], fieldRange.min);
|
|
89200
|
+
if (this.collectValuesBy[field].considerFields) {
|
|
89201
|
+
for (const considerField of this.collectValuesBy[field].considerFields) {
|
|
89202
|
+
if (record[considerField]) {
|
|
89203
|
+
if (typeof record[considerField] === 'number') {
|
|
89204
|
+
max = Math.max(record[considerField], max);
|
|
89205
|
+
min = Math.min(record[considerField], min);
|
|
89206
|
+
}
|
|
89207
|
+
else if (Array.isArray(record[considerField])) {
|
|
89208
|
+
max = Math.max(...record[considerField], max);
|
|
89209
|
+
min = Math.min(...record[considerField], min);
|
|
89210
|
+
}
|
|
89211
|
+
}
|
|
89212
|
+
}
|
|
89213
|
+
}
|
|
88976
89214
|
if (!isNaN(max)) {
|
|
88977
89215
|
fieldRange.max = max;
|
|
88978
89216
|
fieldRange.min = min;
|
|
@@ -89307,12 +89545,10 @@
|
|
|
89307
89545
|
if (isResetTree) {
|
|
89308
89546
|
return this.setRecords(this.records);
|
|
89309
89547
|
}
|
|
89310
|
-
|
|
89311
|
-
for (const
|
|
89312
|
-
for (
|
|
89313
|
-
|
|
89314
|
-
this.tree[treeRowKey][treeColKey][i]?.reset();
|
|
89315
|
-
}
|
|
89548
|
+
for (const treeRowKey in this.tree) {
|
|
89549
|
+
for (const treeColKey in this.tree[treeRowKey]) {
|
|
89550
|
+
for (let i = 0; i < this.tree[treeRowKey][treeColKey].length; i++) {
|
|
89551
|
+
this.tree[treeRowKey][treeColKey][i]?.reset();
|
|
89316
89552
|
}
|
|
89317
89553
|
}
|
|
89318
89554
|
}
|
|
@@ -91887,6 +92123,9 @@
|
|
|
91887
92123
|
cellLocation
|
|
91888
92124
|
};
|
|
91889
92125
|
}
|
|
92126
|
+
getCellRowHeaderFullPaths(col) {
|
|
92127
|
+
return this.internalProps.layoutMap.getCellRowHeaderFullPaths(col);
|
|
92128
|
+
}
|
|
91890
92129
|
setLoadingHierarchyState(col, row) {
|
|
91891
92130
|
this.scenegraph.setLoadingHierarchyState(col, row);
|
|
91892
92131
|
}
|
|
@@ -92662,7 +92901,7 @@
|
|
|
92662
92901
|
indicatorSpec?.stack !== false &&
|
|
92663
92902
|
(indicatorSpec?.type === 'bar' || indicatorSpec?.type === 'area') &&
|
|
92664
92903
|
(indicatorSpec.stack = true);
|
|
92665
|
-
const yField = indicatorSpec.yField;
|
|
92904
|
+
const yField = indicatorSpec.yField ?? indicatorSpec.maxField;
|
|
92666
92905
|
collectValuesBy[yField] = {
|
|
92667
92906
|
by: rowKeys,
|
|
92668
92907
|
type: indicatorSpec.direction !== 'horizontal' ? 'yField' : undefined,
|
|
@@ -92671,7 +92910,10 @@
|
|
|
92671
92910
|
? columnKeys.concat(indicatorSpec?.xField, indicatorSpec?.x2Field)
|
|
92672
92911
|
: indicatorSpec.stack && columnKeys.concat(indicatorSpec?.xField),
|
|
92673
92912
|
sortBy: indicatorSpec.direction === 'horizontal' ? indicatorSpec?.data?.fields?.[yField]?.domain : undefined,
|
|
92674
|
-
extendRange: parseMarkLineGetExtendRange(indicatorSpec.markLine)
|
|
92913
|
+
extendRange: parseMarkLineGetExtendRange(indicatorSpec.markLine),
|
|
92914
|
+
considerFields: indicatorSpec?.type === 'boxPlot'
|
|
92915
|
+
? [indicatorSpec.maxField, indicatorSpec.minField, indicatorSpec.outliersField]
|
|
92916
|
+
: undefined
|
|
92675
92917
|
};
|
|
92676
92918
|
}
|
|
92677
92919
|
}
|
|
@@ -92724,14 +92966,19 @@
|
|
|
92724
92966
|
indicatorSpec?.stack !== false &&
|
|
92725
92967
|
(indicatorSpec?.type === 'bar' || indicatorSpec?.type === 'area') &&
|
|
92726
92968
|
(indicatorSpec.stack = true);
|
|
92727
|
-
const xField = indicatorSpec.type === 'histogram'
|
|
92969
|
+
const xField = indicatorSpec.type === 'histogram'
|
|
92970
|
+
? indicatorSpec.x2Field
|
|
92971
|
+
: indicatorSpec.xField ?? indicatorSpec.maxField;
|
|
92728
92972
|
collectValuesBy[xField] = {
|
|
92729
92973
|
by: columnKeys,
|
|
92730
92974
|
type: indicatorSpec.direction === 'horizontal' ? 'xField' : undefined,
|
|
92731
92975
|
range: hasLinearAxis(indicatorSpec, this._axes, indicatorSpec.direction === 'horizontal', true),
|
|
92732
92976
|
sumBy: indicatorSpec.stack && rowKeys.concat(indicatorSpec?.yField),
|
|
92733
92977
|
sortBy: indicatorSpec.direction !== 'horizontal' ? indicatorSpec?.data?.fields?.[xField]?.domain : undefined,
|
|
92734
|
-
extendRange: parseMarkLineGetExtendRange(indicatorSpec.markLine)
|
|
92978
|
+
extendRange: parseMarkLineGetExtendRange(indicatorSpec.markLine),
|
|
92979
|
+
considerFields: indicatorSpec?.type === 'boxPlot'
|
|
92980
|
+
? [indicatorSpec.maxField, indicatorSpec.minField, indicatorSpec.outliersField]
|
|
92981
|
+
: undefined
|
|
92735
92982
|
};
|
|
92736
92983
|
}
|
|
92737
92984
|
}
|
|
@@ -93738,7 +93985,7 @@
|
|
|
93738
93985
|
}
|
|
93739
93986
|
|
|
93740
93987
|
registerForVrender();
|
|
93741
|
-
const version = "1.22.
|
|
93988
|
+
const version = "1.22.3";
|
|
93742
93989
|
function getIcons() {
|
|
93743
93990
|
return get$2();
|
|
93744
93991
|
}
|
|
@@ -93746,6 +93993,8 @@
|
|
|
93746
93993
|
clearAll();
|
|
93747
93994
|
}
|
|
93748
93995
|
|
|
93996
|
+
exports.CUSTOM_CONTAINER_NAME = CUSTOM_CONTAINER_NAME;
|
|
93997
|
+
exports.CUSTOM_MERGE_PRE_NAME = CUSTOM_MERGE_PRE_NAME;
|
|
93749
93998
|
exports.CustomLayout = index;
|
|
93750
93999
|
exports.DataStatistics = DataStatistics;
|
|
93751
94000
|
exports.EventTarget = EventTarget$1;
|