@visactor/vtable-calendar 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/dist/vtable-calendar.js +84 -26
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +4 -4
package/dist/vtable-calendar.js
CHANGED
|
@@ -37062,7 +37062,7 @@
|
|
|
37062
37062
|
} else if (isEmptyA || isEmptyB) return indexA - indexB;
|
|
37063
37063
|
return (state.orderFn || ("desc" !== state.order ? (v1, v2) => v1 === v2 ? 0 : v1 > v2 ? 1 : -1 : (v1, v2) => v1 === v2 ? 0 : v1 < v2 ? 1 : -1))(this.getOriginalField(indexA, state.field), this.getOriginalField(indexB, state.field), state.order);
|
|
37064
37064
|
}, 0);
|
|
37065
|
-
}), this.currentIndexedData = sortedIndexArray, this.hierarchyExpandLevel) {
|
|
37065
|
+
}), this.currentIndexedData = sortedIndexArray, this.hierarchyExpandLevel && "tree" === this.rowHierarchyType) {
|
|
37066
37066
|
let nodeLength = sortedIndexArray.length;
|
|
37067
37067
|
for (let i = 0; i < nodeLength; i++) {
|
|
37068
37068
|
const record = this.getOriginalRecord(sortedIndexArray[i]),
|
|
@@ -41321,7 +41321,7 @@
|
|
|
41321
41321
|
var _a, _b;
|
|
41322
41322
|
if (isPromise(value) && (value = table.getCellValue(col, row)), !addNew && (oldCellGroup.row !== row || oldCellGroup.col !== col)) return null;
|
|
41323
41323
|
if (!addNew && oldCellGroup.parent && table.reactCustomLayout) {
|
|
41324
|
-
const reactGroup = oldCellGroup.getChildByName(
|
|
41324
|
+
const reactGroup = oldCellGroup.getChildByName(CUSTOM_CONTAINER_NAME$1);
|
|
41325
41325
|
if (reactGroup) {
|
|
41326
41326
|
const {
|
|
41327
41327
|
col: col,
|
|
@@ -41734,7 +41734,6 @@
|
|
|
41734
41734
|
});
|
|
41735
41735
|
function computeRowsHeight(table, rowStart, rowEnd, isClearRowRangeHeightsMap = !0, update) {
|
|
41736
41736
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
41737
|
-
"undefined" != typeof window && window.performance.now();
|
|
41738
41737
|
const oldRowHeights = [],
|
|
41739
41738
|
newHeights = [];
|
|
41740
41739
|
if (update) for (let row = rowStart; row <= rowEnd; row++) oldRowHeights[row] = table.getRowHeight(row);
|
|
@@ -41757,7 +41756,7 @@
|
|
|
41757
41756
|
const height = computeRowHeight(row, 0, table.colCount - 1, table);
|
|
41758
41757
|
update ? newHeights[row] = Math.round(height) : table._setRowHeight(row, height);
|
|
41759
41758
|
}
|
|
41760
|
-
if (rowEnd < table.columnHeaderLevelCount || !isAllRowsAuto && !isDefaultRowHeightIsAuto) ;else if (table.internalProps.transpose || table.isPivotTable() && !table.internalProps.layoutMap.indicatorsAsCol || table.options.customComputeRowHeight || !checkFixedStyleAndNoWrap(table, rowStart)) {
|
|
41759
|
+
if (rowEnd < table.columnHeaderLevelCount || !isAllRowsAuto && !isDefaultRowHeightIsAuto) ;else if (table.internalProps.transpose || table.isPivotTable() && !table.internalProps.layoutMap.indicatorsAsCol || table.options.customComputeRowHeight || table.options.rowHeightConfig || !checkFixedStyleAndNoWrap(table, rowStart)) {
|
|
41761
41760
|
if (table.internalProps.transpose || table.isPivotTable() && !table.internalProps.layoutMap.indicatorsAsCol) for (let row = Math.max(rowStart, table.columnHeaderLevelCount); row <= rowEnd; row++) {
|
|
41762
41761
|
let height;
|
|
41763
41762
|
height = checkFixedStyleAndNoWrapForTranspose(table, row) ? computeRowHeight(row, 0, table.rowHeaderLevelCount, table) : computeRowHeight(row, 0, table.colCount - 1, table), update ? newHeights[row] = Math.round(height) : table._setRowHeight(row, height);
|
|
@@ -41841,6 +41840,10 @@
|
|
|
41841
41840
|
if ("number" == typeof customRowHeight) return customRowHeight;
|
|
41842
41841
|
if ("auto" !== customRowHeight) return table.getDefaultRowHeight(row);
|
|
41843
41842
|
}
|
|
41843
|
+
if (table.internalProps.rowHeightConfig) {
|
|
41844
|
+
const rowHeightConfig = table.internalProps.rowHeightConfig.find(item => item.key === row);
|
|
41845
|
+
if (rowHeightConfig) return table.internalProps._heightResizedRowMap.has(row) || (table._setRowHeight(row, rowHeightConfig.height), table.internalProps._heightResizedRowMap.add(row)), rowHeightConfig.height;
|
|
41846
|
+
}
|
|
41844
41847
|
if (table.isPivotChart() && row >= table.columnHeaderLevelCount && row < table.rowCount - table.bottomFrozenRowCount) {
|
|
41845
41848
|
let ifNeedComputeRowHeight = table.internalProps.layoutMap.indicatorsAsCol,
|
|
41846
41849
|
isHeatmap = !1;
|
|
@@ -41869,7 +41872,8 @@
|
|
|
41869
41872
|
}
|
|
41870
41873
|
}
|
|
41871
41874
|
if (table.isPivotChart() && (table.isLeftFrozenColumn(col) && table.isBottomFrozenRow(row) || table.isRightFrozenColumn(col) && table.isBottomFrozenRow(row))) continue;
|
|
41872
|
-
const
|
|
41875
|
+
const cellType = table.isHeader(col, row) ? null === (_a = table._getHeaderLayoutMap(col, row)) || void 0 === _a ? void 0 : _a.headerType : table.getBodyColumnType(col, row),
|
|
41876
|
+
textHeight = computeTextHeight(col, row, cellType, table);
|
|
41873
41877
|
maxHeight = isValid$3(maxHeight) ? Math.max(textHeight, maxHeight) : textHeight;
|
|
41874
41878
|
}
|
|
41875
41879
|
if (isValid$3(maxHeight)) return maxHeight;
|
|
@@ -44545,7 +44549,7 @@
|
|
|
44545
44549
|
strokeColor = rectAttribute.stroke,
|
|
44546
44550
|
cornerRadius = rectAttribute.cornerRadius
|
|
44547
44551
|
} = rect.attribute;
|
|
44548
|
-
if (stroke
|
|
44552
|
+
if (!(!stroke || !Array.isArray(strokeArrayWidth) && 0 === lineWidth || width <= 0 || height <= 0) && (Array.isArray(stroke) || Array.isArray(strokeArrayColor) || Array.isArray(strokeArrayWidth))) {
|
|
44549
44553
|
const deltaWidth = 0,
|
|
44550
44554
|
deltaHeight = 0;
|
|
44551
44555
|
"border-rect" !== rect.name && "table-border-rect" !== rect.name && ("number" == typeof lineWidth && 1 & lineWidth || Array.isArray(strokeArrayWidth) && strokeArrayWidth.some(width => 1 & width)) && (x = Math.floor(x) + .5, y = Math.floor(y) + .5), 0 === cornerRadius || isArray$7(cornerRadius) && cornerRadius.every(num => 0 === num) ? renderStroke(rect, context, x, y, rectAttribute, stroke, strokeArrayWidth || lineWidth, strokeArrayColor || strokeColor, "table-border-rect" !== rect.name ? Math.ceil(width + deltaWidth) : width + deltaWidth, "table-border-rect" !== rect.name ? Math.ceil(height + deltaHeight) : height + deltaHeight) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius, !0, new Array(4).fill(0).map((_, i) => (x1, y1, x2, y2) => {
|
|
@@ -49458,9 +49462,9 @@
|
|
|
49458
49462
|
|
|
49459
49463
|
function adjustMoveHeaderTarget(source, target, table) {
|
|
49460
49464
|
const sourceCellRange = table.getCellRange(source.col, source.row);
|
|
49461
|
-
if (table.isColumnHeader(source.col, source.row)) {
|
|
49465
|
+
if (table.isColumnHeader(source.col, source.row) || "column" === table.stateManager.columnMove.movingColumnOrRow && 0 === source.row) {
|
|
49462
49466
|
const targetCellRange = table.getCellRange(target.col, sourceCellRange.start.row);
|
|
49463
|
-
target.row >= table.columnHeaderLevelCount && (target.row = table.columnHeaderLevelCount - 1), target.col >= source.col ? target.col = targetCellRange.end.col : target.col = targetCellRange.start.col;
|
|
49467
|
+
target.row >= table.columnHeaderLevelCount && (target.row = Math.max(table.columnHeaderLevelCount - 1, 0)), target.col >= source.col ? target.col = targetCellRange.end.col : target.col = targetCellRange.start.col;
|
|
49464
49468
|
} else if (table.isRowHeader(source.col, source.row)) {
|
|
49465
49469
|
const layoutMap = table.internalProps.layoutMap,
|
|
49466
49470
|
targetCellRange = table.getCellRange(sourceCellRange.start.col, target.row);
|
|
@@ -49475,6 +49479,52 @@
|
|
|
49475
49479
|
}
|
|
49476
49480
|
return target;
|
|
49477
49481
|
}
|
|
49482
|
+
function adjustWidthResizedColMap(moveContext, table) {
|
|
49483
|
+
if (table.internalProps._widthResizedColMap.size > 0) {
|
|
49484
|
+
const resizedColIndexs = Array.from(table.internalProps._widthResizedColMap.keys());
|
|
49485
|
+
table.internalProps._widthResizedColMap.clear();
|
|
49486
|
+
for (let i = 0; i < resizedColIndexs.length; i++) {
|
|
49487
|
+
const colIndex = resizedColIndexs[i];
|
|
49488
|
+
let newColIndex;
|
|
49489
|
+
const {
|
|
49490
|
+
sourceIndex: sourceIndex,
|
|
49491
|
+
targetIndex: targetIndex,
|
|
49492
|
+
sourceSize: sourceSize
|
|
49493
|
+
} = moveContext;
|
|
49494
|
+
newColIndex = colIndex >= sourceIndex && colIndex < sourceIndex + sourceSize ? targetIndex + (colIndex - sourceIndex) : sourceIndex < targetIndex ? colIndex >= sourceIndex + sourceSize && colIndex < targetIndex || colIndex >= targetIndex ? colIndex - sourceSize : colIndex : colIndex >= targetIndex && colIndex < sourceIndex ? colIndex + sourceSize : colIndex, table.internalProps._widthResizedColMap.add(newColIndex);
|
|
49495
|
+
}
|
|
49496
|
+
}
|
|
49497
|
+
}
|
|
49498
|
+
function adjustHeightResizedRowMap(moveContext, table) {
|
|
49499
|
+
if (table.internalProps._heightResizedRowMap.size > 0) {
|
|
49500
|
+
const resizedRowIndexs = Array.from(table.internalProps._heightResizedRowMap.keys());
|
|
49501
|
+
table.internalProps._heightResizedRowMap.clear();
|
|
49502
|
+
for (let i = 0; i < resizedRowIndexs.length; i++) {
|
|
49503
|
+
const rowIndex = resizedRowIndexs[i];
|
|
49504
|
+
let newRowIndex;
|
|
49505
|
+
const {
|
|
49506
|
+
sourceIndex: sourceIndex,
|
|
49507
|
+
targetIndex: targetIndex,
|
|
49508
|
+
sourceSize: sourceSize
|
|
49509
|
+
} = moveContext;
|
|
49510
|
+
newRowIndex = rowIndex >= sourceIndex && rowIndex < sourceIndex + sourceSize ? targetIndex + (rowIndex - sourceIndex) : sourceIndex < targetIndex ? rowIndex >= sourceIndex + sourceSize && rowIndex < targetIndex || rowIndex >= targetIndex ? rowIndex - sourceSize : rowIndex : rowIndex >= targetIndex && rowIndex < sourceIndex ? rowIndex + sourceSize : rowIndex, table.internalProps._heightResizedRowMap.add(newRowIndex);
|
|
49511
|
+
}
|
|
49512
|
+
}
|
|
49513
|
+
}
|
|
49514
|
+
function adjustHeightResizedRowMapWithAddRecordIndex(table, recordIndex, records) {
|
|
49515
|
+
const resizedRowIndexs = Array.from(table.internalProps._heightResizedRowMap.keys()),
|
|
49516
|
+
rowIndex = recordIndex + (table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount);
|
|
49517
|
+
for (let i = 0; i < resizedRowIndexs.length; i++) resizedRowIndexs[i] >= rowIndex && (table.internalProps._heightResizedRowMap.delete(resizedRowIndexs[i]), table.internalProps._heightResizedRowMap.add(resizedRowIndexs[i] + records.length));
|
|
49518
|
+
}
|
|
49519
|
+
function adjustHeightResizedRowMapWithDeleteRecordIndex(table, recordIndexs) {
|
|
49520
|
+
const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
|
|
49521
|
+
recordIndexs.sort((a, b) => b - a);
|
|
49522
|
+
for (let i = 0; i < recordIndexs.length; i++) {
|
|
49523
|
+
const rowIndex = recordIndexs[i] + headerCount,
|
|
49524
|
+
resizedRowIndexs = Array.from(table.internalProps._heightResizedRowMap.keys());
|
|
49525
|
+
for (let j = 0; j < resizedRowIndexs.length; j++) resizedRowIndexs[j] === rowIndex ? table.internalProps._heightResizedRowMap.delete(resizedRowIndexs[j]) : resizedRowIndexs[j] > rowIndex && (table.internalProps._heightResizedRowMap.delete(resizedRowIndexs[j]), table.internalProps._heightResizedRowMap.add(resizedRowIndexs[j] - 1));
|
|
49526
|
+
}
|
|
49527
|
+
}
|
|
49478
49528
|
|
|
49479
49529
|
function startMoveCol(col, row, x, y, state, event, dragColumnOrRow) {
|
|
49480
49530
|
var _a;
|
|
@@ -49536,7 +49586,7 @@
|
|
|
49536
49586
|
let lineX, backX, lineY, backY;
|
|
49537
49587
|
state.updateCursor("grabbing");
|
|
49538
49588
|
const cellLocation = state.table.getCellLocation(state.columnMove.colSource, state.columnMove.rowSource);
|
|
49539
|
-
"columnHeader" === cellLocation ? (backX = state.columnMove.x, lineX = state.table.isLeftFrozenColumn(col) ? state.columnMove.colTarget >= state.columnMove.colSource ? state.table.getColsWidth(0, state.columnMove.colTarget) : state.table.getColsWidth(0, state.columnMove.colTarget - 1) : state.table.isRightFrozenColumn(col) ? state.table.tableNoFrameWidth - state.table.getColsWidth(targetCell.col + 1, state.table.colCount - 1) : (state.columnMove.colTarget >= state.columnMove.colSource ? state.table.getColsWidth(0, state.columnMove.colTarget) : state.table.getColsWidth(0, state.columnMove.colTarget - 1)) - state.table.stateManager.scroll.horizontalBarPos) : ("rowHeader" === cellLocation || state.table.internalProps.layoutMap.isSeriesNumberInBody(col, row) || "row" === state.columnMove.movingColumnOrRow) && (backY = state.columnMove.y, lineY = state.table.isFrozenRow(row) ? state.columnMove.rowTarget >= state.columnMove.rowSource ? state.table.getRowsHeight(0, state.columnMove.rowTarget) : state.table.getRowsHeight(0, state.columnMove.rowTarget - 1) : state.table.isBottomFrozenRow(row) ? state.table.tableNoFrameHeight - state.table.getRowsHeight(targetCell.row + 1, state.table.rowCount - 1) : (state.columnMove.rowTarget >= state.columnMove.rowSource ? state.table.getRowsHeight(0, state.columnMove.rowTarget) : state.table.getRowsHeight(0, state.columnMove.rowTarget - 1)) - state.table.stateManager.scroll.verticalBarPos), state.table.scenegraph.component.updateMoveCol(backX, lineX, backY, lineY), state.table.fireListeners(TABLE_EVENT_TYPE.CHANGING_HEADER_POSITION, {
|
|
49589
|
+
"columnHeader" === cellLocation || "column" === state.columnMove.movingColumnOrRow && 0 === state.columnMove.rowSource ? (backX = state.columnMove.x, lineX = state.table.isLeftFrozenColumn(col) ? state.columnMove.colTarget >= state.columnMove.colSource ? state.table.getColsWidth(0, state.columnMove.colTarget) : state.table.getColsWidth(0, state.columnMove.colTarget - 1) : state.table.isRightFrozenColumn(col) ? state.table.tableNoFrameWidth - state.table.getColsWidth(targetCell.col + 1, state.table.colCount - 1) : (state.columnMove.colTarget >= state.columnMove.colSource ? state.table.getColsWidth(0, state.columnMove.colTarget) : state.table.getColsWidth(0, state.columnMove.colTarget - 1)) - state.table.stateManager.scroll.horizontalBarPos) : ("rowHeader" === cellLocation || state.table.internalProps.layoutMap.isSeriesNumberInBody(col, row) || "row" === state.columnMove.movingColumnOrRow) && (backY = state.columnMove.y, lineY = state.table.isFrozenRow(row) ? state.columnMove.rowTarget >= state.columnMove.rowSource ? state.table.getRowsHeight(0, state.columnMove.rowTarget) : state.table.getRowsHeight(0, state.columnMove.rowTarget - 1) : state.table.isBottomFrozenRow(row) ? state.table.tableNoFrameHeight - state.table.getRowsHeight(targetCell.row + 1, state.table.rowCount - 1) : (state.columnMove.rowTarget >= state.columnMove.rowSource ? state.table.getRowsHeight(0, state.columnMove.rowTarget) : state.table.getRowsHeight(0, state.columnMove.rowTarget - 1)) - state.table.stateManager.scroll.verticalBarPos), state.table.scenegraph.component.updateMoveCol(backX, lineX, backY, lineY), state.table.fireListeners(TABLE_EVENT_TYPE.CHANGING_HEADER_POSITION, {
|
|
49540
49590
|
col: col,
|
|
49541
49591
|
row: row,
|
|
49542
49592
|
x: x,
|
|
@@ -51050,7 +51100,7 @@
|
|
|
51050
51100
|
});
|
|
51051
51101
|
(optimizedDeltaX || optimizedDeltaY) && state.interactionState !== InteractionState.scrolling && state.updateInteractionState(InteractionState.scrolling);
|
|
51052
51102
|
const autoHide = "scrolling" === (null === (_b = null === (_a = state.table.options.theme) || void 0 === _a ? void 0 : _a.scrollStyle) || void 0 === _b ? void 0 : _b.visible);
|
|
51053
|
-
optimizedDeltaX && (state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX, event), state.showHorizontalScrollBar(autoHide)), optimizedDeltaY && (state.setScrollTop(state.scroll.verticalBarPos + optimizedDeltaY, event), state.showVerticalScrollBar(autoHide)), isWheelEvent && state.resetInteractionState(state.interactionStateBeforeScroll), (null === (_c = event.nativeEvent) || void 0 === _c ? void 0 : _c.cancelable) && ("none" === state.table.internalProps.overscrollBehavior || Math.abs(deltaY) >= Math.abs(deltaX) && 0 !== deltaY && isVerticalScrollable(deltaY, state) || Math.abs(deltaY) <= Math.abs(deltaX) && 0 !== deltaX && isHorizontalScrollable(deltaX, state)) && event.nativeEvent.preventDefault();
|
|
51103
|
+
optimizedDeltaX && (state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX, event), state.showHorizontalScrollBar(autoHide)), optimizedDeltaY && (state.setScrollTop(state.scroll.verticalBarPos + optimizedDeltaY, event), state.showVerticalScrollBar(autoHide)), isWheelEvent && state.resetInteractionState(state.interactionStateBeforeScroll), (null === (_c = event.nativeEvent) || void 0 === _c ? void 0 : _c.cancelable) && ("none" === state.table.internalProps.overscrollBehavior && (deltaY && isVerticalExistScrollBar(state) || deltaX && isHorizontalExistScrollBar(state)) || Math.abs(deltaY) >= Math.abs(deltaX) && 0 !== deltaY && isVerticalScrollable(deltaY, state) || Math.abs(deltaY) <= Math.abs(deltaX) && 0 !== deltaX && isHorizontalScrollable(deltaX, state)) && event.nativeEvent.preventDefault();
|
|
51054
51104
|
}
|
|
51055
51105
|
function optimizeScrollXY(x, y, ratio) {
|
|
51056
51106
|
var _a, _b;
|
|
@@ -51065,6 +51115,12 @@
|
|
|
51065
51115
|
function isHorizontalScrollable(deltaX, state) {
|
|
51066
51116
|
return 0 != state.table.getAllColsWidth() - state.table.scenegraph.width && !isScrollToLeft(deltaX, state) && !isScrollToRight(deltaX, state);
|
|
51067
51117
|
}
|
|
51118
|
+
function isVerticalExistScrollBar(state) {
|
|
51119
|
+
return !(state.table.getAllRowsHeight() - state.table.scenegraph.height <= 0);
|
|
51120
|
+
}
|
|
51121
|
+
function isHorizontalExistScrollBar(state) {
|
|
51122
|
+
return !(state.table.getAllColsWidth() - state.table.scenegraph.width <= 0);
|
|
51123
|
+
}
|
|
51068
51124
|
function isScrollToTop(deltaY, state) {
|
|
51069
51125
|
return 0 !== state.table.getAllRowsHeight() - state.table.scenegraph.height && deltaY <= 0 && state.scroll.verticalBarPos < 1;
|
|
51070
51126
|
}
|
|
@@ -52007,7 +52063,7 @@
|
|
|
52007
52063
|
handleWhell({
|
|
52008
52064
|
deltaX: deltaX,
|
|
52009
52065
|
deltaY: deltaY
|
|
52010
|
-
}, stateManager), e.cancelable && ("none" === table.internalProps.overscrollBehavior || Math.abs(deltaY) >= Math.abs(deltaX) && 0 !== deltaY && isVerticalScrollable(deltaY, stateManager) || Math.abs(deltaY) <= Math.abs(deltaX) && 0 !== deltaX && isHorizontalScrollable(deltaX, stateManager)) && e.preventDefault();
|
|
52066
|
+
}, stateManager), e.cancelable && ("none" === table.internalProps.overscrollBehavior && (deltaY && isVerticalExistScrollBar(stateManager) || deltaX && isHorizontalExistScrollBar(stateManager)) || Math.abs(deltaY) >= Math.abs(deltaX) && 0 !== deltaY && isVerticalScrollable(deltaY, stateManager) || Math.abs(deltaY) <= Math.abs(deltaX) && 0 !== deltaX && isHorizontalScrollable(deltaX, stateManager)) && e.preventDefault();
|
|
52011
52067
|
}
|
|
52012
52068
|
};
|
|
52013
52069
|
vglobal.addEventListener("touchmove", globalTouchMoveCallback, {
|
|
@@ -54859,7 +54915,7 @@
|
|
|
54859
54915
|
targetRange: targetRange,
|
|
54860
54916
|
theme: theme
|
|
54861
54917
|
} = axisRange;
|
|
54862
|
-
isNumber$4(null == axisOption ? void 0 : axisOption.
|
|
54918
|
+
isNumber$4(null == axisOption ? void 0 : axisOption.max) ? (range.max = axisOption.max, range.max < 0 && (axisOption.zero = !1)) : "boxPlot" === chartType && (range.max += (range.max - range.min) / 20), isNumber$4(null == axisOption ? void 0 : axisOption.min) ? (range.min = axisOption.min, range.min > 0 && (axisOption.zero = !1)) : "boxPlot" === chartType && (range.min -= (range.max - range.min) / 20);
|
|
54863
54919
|
let domain = [];
|
|
54864
54920
|
if ("heatmap" === chartType) {
|
|
54865
54921
|
const colDimensionKey = layout.getDimensionKeyInChartSpec(col, layout.rowCount - layout.bottomFrozenRowCount - 1, "xField"),
|
|
@@ -54941,7 +54997,7 @@
|
|
|
54941
54997
|
targetRange: targetRange,
|
|
54942
54998
|
theme: theme
|
|
54943
54999
|
} = axisRange;
|
|
54944
|
-
isNumber$4(null == axisOption ? void 0 : axisOption.
|
|
55000
|
+
isNumber$4(null == axisOption ? void 0 : axisOption.max) ? (range.max = axisOption.max, range.max < 0 && (axisOption.zero = !1)) : "boxPlot" === chartType && (range.max += (range.max - range.min) / 20), isNumber$4(null == axisOption ? void 0 : axisOption.min) ? (range.min = axisOption.min, range.min > 0 && (axisOption.zero = !1)) : "boxPlot" === chartType && (range.min -= (range.max - range.min) / 20);
|
|
54945
55001
|
let domain = [];
|
|
54946
55002
|
if ("heatmap" === chartType) {
|
|
54947
55003
|
const rowDimensionKey = layout.getDimensionKeyInChartSpec(layout.rowHeaderLevelCount, row, "yField"),
|
|
@@ -55543,7 +55599,7 @@
|
|
|
55543
55599
|
}
|
|
55544
55600
|
constructor(container, options = {}) {
|
|
55545
55601
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
55546
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.22.
|
|
55602
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.22.3", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
55547
55603
|
this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
55548
55604
|
options: options,
|
|
55549
55605
|
container: container
|
|
@@ -56123,7 +56179,7 @@
|
|
|
56123
56179
|
return this._adjustColWidth(col, this._colWidthDefineToPxWidth(width));
|
|
56124
56180
|
}
|
|
56125
56181
|
isAutoRowHeight(row) {
|
|
56126
|
-
return "autoHeight" === this.heightMode || !!this.options.customComputeRowHeight || (row >= 0 && row < this.columnHeaderLevelCount ? "auto" === this.getDefaultRowHeight(row) : "auto" === this.internalProps.defaultRowHeight);
|
|
56182
|
+
return "autoHeight" === this.heightMode || !!this.options.customComputeRowHeight || !!this.internalProps.rowHeightConfig || (row >= 0 && row < this.columnHeaderLevelCount ? "auto" === this.getDefaultRowHeight(row) : "auto" === this.internalProps.defaultRowHeight);
|
|
56127
56183
|
}
|
|
56128
56184
|
getColWidth(col) {
|
|
56129
56185
|
var _a;
|
|
@@ -59701,7 +59757,7 @@
|
|
|
59701
59757
|
if (this.transpose && (this.isSeriesNumberInBody(target.col, target.row) && this.isSeriesNumberInBody(source.col, source.row) || "row" === dragColumnOrRow) && (this.getBody(source.col + this.leftRowSeriesNumberColumnCount, source.row).isChildNode && this.getBody(target.col + this.leftRowSeriesNumberColumnCount, target.row).isChildNode ? (source.col = source.col + this.leftRowSeriesNumberColumnCount + this.rowHeaderLevelCount - 1, target.col = target.col + this.leftRowSeriesNumberColumnCount + this.rowHeaderLevelCount - 1) : (source.col = source.col + this.leftRowSeriesNumberColumnCount, target.col = target.col + this.leftRowSeriesNumberColumnCount)), source.col < 0 || source.row < 0 || target.col < 0 || target.row < 0) return !1;
|
|
59702
59758
|
if ("disabled" === this._table.internalProps.frozenColDragHeaderMode && this._table.isFrozenColumn(target.col)) return !1;
|
|
59703
59759
|
const sourceCellRange = this.getCellRange(source.col, source.row);
|
|
59704
|
-
if (this.isColumnHeader(source.col, source.row)) {
|
|
59760
|
+
if (this.isColumnHeader(source.col, source.row) || "column" === this._table.stateManager.columnMove.movingColumnOrRow && 0 === source.row) {
|
|
59705
59761
|
return this.getParentCellId(source.col, sourceCellRange.start.row) === this.getParentCellId(target.col, sourceCellRange.start.row);
|
|
59706
59762
|
}
|
|
59707
59763
|
if (this.isRowHeader(source.col, source.row)) {
|
|
@@ -59713,7 +59769,7 @@
|
|
|
59713
59769
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
59714
59770
|
if ((!(null === (_a = this._table.options.dragOrder) || void 0 === _a ? void 0 : _a.validateDragOrderOnEnd) || (null === (_b = this._table.options.dragOrder) || void 0 === _b ? void 0 : _b.validateDragOrderOnEnd(source, target))) && this.canMoveHeaderPosition(source, target)) {
|
|
59715
59771
|
let sourceCellRange = this.getCellRange(source.col, source.row);
|
|
59716
|
-
if (this.isColumnHeader(source.col, source.row)) {
|
|
59772
|
+
if (this.isColumnHeader(source.col, source.row) || "column" === this._table.stateManager.columnMove.movingColumnOrRow && 0 === source.row) {
|
|
59717
59773
|
const sourceSize = sourceCellRange.end.col - sourceCellRange.start.col + 1;
|
|
59718
59774
|
let targetIndex;
|
|
59719
59775
|
const targetCellRange = this.getCellRange(target.col, sourceCellRange.start.row);
|
|
@@ -59725,7 +59781,7 @@
|
|
|
59725
59781
|
if (null === (_c = this._table.options.dragOrder) || void 0 === _c ? void 0 : _c.maintainArrayDataOrder) for (let j = 0; j < (null === (_d = this._table.dataSource.dataSourceObj) || void 0 === _d ? void 0 : _d.records.length); j++) {
|
|
59726
59782
|
const rowRecords = null === (_e = this._table.dataSource.dataSourceObj) || void 0 === _e ? void 0 : _e.records[j];
|
|
59727
59783
|
if (Array.isArray(rowRecords)) {
|
|
59728
|
-
rowRecords.length - 1 < targetIndex && rowRecords.push(...Array(targetIndex - rowRecords.length + 1).fill(void 0));
|
|
59784
|
+
rowRecords.length - 1 < Math.max(targetIndex, source.col) && rowRecords.push(...Array(Math.max(targetIndex, source.col) - rowRecords.length + 1).fill(void 0));
|
|
59729
59785
|
const sourceData = rowRecords.splice(sourceCellRange.start.col - this.leftRowSeriesNumberColumnCount, sourceSize);
|
|
59730
59786
|
sourceData.unshift(targetIndex - this.leftRowSeriesNumberColumnCount, 0), Array.prototype.splice.apply(rowRecords, sourceData);
|
|
59731
59787
|
}
|
|
@@ -60695,7 +60751,7 @@
|
|
|
60695
60751
|
const internalProps = this.internalProps;
|
|
60696
60752
|
if (internalProps.frozenColDragHeaderMode = null !== (_b = null === (_a = options.dragOrder) || void 0 === _a ? void 0 : _a.frozenColDragHeaderMode) && void 0 !== _b ? _b : options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.multipleSort = !!options.multipleSort, internalProps.dataConfig = this.internalProps.groupBy ? getGroupByDataConfig(this.internalProps.groupBy, options.addRecordRule) : {
|
|
60697
60753
|
addRecordRule: options.addRecordRule
|
|
60698
|
-
}, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_d = null !== (_c = options.enableTreeNodeMerge) && void 0 !== _c ? _c : isValid$3(this.internalProps.groupBy)) && void 0 !== _d && _d, this.internalProps.headerHelper.setTableColumnsEditor(), this.showHeader = null === (_e = options.showHeader) || void 0 === _e || _e, this.internalProps.columnWidthConfig = options.columnWidthConfig, this.transpose = null !== (_f = options.transpose) && void 0 !== _f && _f, "node" !== Env.mode && (this.editorManager = new EditManager(this)), this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, options.dataSource ? this.dataSource = options.dataSource : options.records ? this.setRecords(options.records, {
|
|
60754
|
+
}, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_d = null !== (_c = options.enableTreeNodeMerge) && void 0 !== _c ? _c : isValid$3(this.internalProps.groupBy)) && void 0 !== _d && _d, this.internalProps.headerHelper.setTableColumnsEditor(), this.showHeader = null === (_e = options.showHeader) || void 0 === _e || _e, this.internalProps.columnWidthConfig = options.columnWidthConfig, this.internalProps.rowHeightConfig = options.rowHeightConfig, this.transpose = null !== (_f = options.transpose) && void 0 !== _f && _f, "node" !== Env.mode && (this.editorManager = new EditManager(this)), this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, options.dataSource ? this.dataSource = options.dataSource : options.records ? this.setRecords(options.records, {
|
|
60699
60755
|
sortState: internalProps.sortState
|
|
60700
60756
|
}) : this.setRecords([]), options.title) {
|
|
60701
60757
|
const Title = Factory.getComponent("title");
|
|
@@ -60974,7 +61030,7 @@
|
|
|
60974
61030
|
const internalProps = this.internalProps;
|
|
60975
61031
|
if (super.updateOption(options, updateConfig), internalProps.frozenColDragHeaderMode = null !== (_b = null === (_a = options.dragOrder) || void 0 === _a ? void 0 : _a.frozenColDragHeaderMode) && void 0 !== _b ? _b : options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.dataConfig = this.internalProps.groupBy ? getGroupByDataConfig(this.internalProps.groupBy, options.addRecordRule) : {
|
|
60976
61032
|
addRecordRule: options.addRecordRule
|
|
60977
|
-
}, this.showHeader = null === (_c = options.showHeader) || void 0 === _c || _c, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_e = null !== (_d = options.enableTreeNodeMerge) && void 0 !== _d ? _d : isValid$3(this.internalProps.groupBy)) && void 0 !== _e && _e, this.internalProps.headerHelper.setTableColumnsEditor(), this.transpose = null !== (_f = options.transpose) && void 0 !== _f && _f, this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, this.internalProps.columnWidthConfig = options.columnWidthConfig, internalProps.releaseList) for (let i = internalProps.releaseList.length - 1; i >= 0; i--) {
|
|
61033
|
+
}, this.showHeader = null === (_c = options.showHeader) || void 0 === _c || _c, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_e = null !== (_d = options.enableTreeNodeMerge) && void 0 !== _d ? _d : isValid$3(this.internalProps.groupBy)) && void 0 !== _e && _e, this.internalProps.headerHelper.setTableColumnsEditor(), this.transpose = null !== (_f = options.transpose) && void 0 !== _f && _f, this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, this.internalProps.columnWidthConfig = options.columnWidthConfig, this.internalProps.rowHeightConfig = options.rowHeightConfig, internalProps.releaseList) for (let i = internalProps.releaseList.length - 1; i >= 0; i--) {
|
|
60978
61034
|
const releaseObj = internalProps.releaseList[i];
|
|
60979
61035
|
releaseObj instanceof DataSource ? releaseObj.updateColumns(this.internalProps.columns) : (null === (_g = null == releaseObj ? void 0 : releaseObj.release) || void 0 === _g || _g.call(releaseObj), internalProps.releaseList.splice(i, 1));
|
|
60980
61036
|
}
|
|
@@ -61030,7 +61086,7 @@
|
|
|
61030
61086
|
const sourceCellRange = this.getCellRange(source.col, source.row),
|
|
61031
61087
|
targetCellRange = this.getCellRange(target.col, target.row),
|
|
61032
61088
|
moveContext = this.internalProps.layoutMap.moveHeaderPosition(source, target);
|
|
61033
|
-
return moveContext ? ("column" === moveContext.moveType ? (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), this.transpose || (this.colWidthsLimit = {}, this.setMinMaxLimitWidth())) : moveContext.targetIndex > moveContext.sourceIndex ? this.rowHeightsMap.exchangeOrder(moveContext.sourceIndex, moveContext.sourceSize, moveContext.targetIndex + moveContext.sourceSize - moveContext.targetSize, moveContext.targetSize, moveContext.targetIndex) : this.rowHeightsMap.exchangeOrder(moveContext.sourceIndex, moveContext.sourceSize, moveContext.targetIndex, moveContext.targetSize, moveContext.targetIndex), moveContext) : null;
|
|
61089
|
+
return moveContext ? ("column" === moveContext.moveType ? (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), adjustWidthResizedColMap(moveContext, this), this.transpose || (this.colWidthsLimit = {}, this.setMinMaxLimitWidth())) : (moveContext.targetIndex > moveContext.sourceIndex ? this.rowHeightsMap.exchangeOrder(moveContext.sourceIndex, moveContext.sourceSize, moveContext.targetIndex + moveContext.sourceSize - moveContext.targetSize, moveContext.targetSize, moveContext.targetIndex) : this.rowHeightsMap.exchangeOrder(moveContext.sourceIndex, moveContext.sourceSize, moveContext.targetIndex, moveContext.targetSize, moveContext.targetIndex), adjustHeightResizedRowMap(moveContext, this)), moveContext) : null;
|
|
61034
61090
|
}
|
|
61035
61091
|
changeRecordOrder(sourceIndex, targetIndex) {
|
|
61036
61092
|
this.transpose ? (sourceIndex = this.getRecordShowIndexByCell(sourceIndex, 0), targetIndex = this.getRecordShowIndexByCell(targetIndex, 0)) : (sourceIndex = this.getRecordShowIndexByCell(0, sourceIndex), targetIndex = this.getRecordShowIndexByCell(0, targetIndex)), this.dataSource.changeOrder(sourceIndex, targetIndex);
|
|
@@ -61194,8 +61250,10 @@
|
|
|
61194
61250
|
};
|
|
61195
61251
|
})), this.internalProps.layoutMap.clearCellRangeMap(), this.internalProps.useOneRowHeightFillAll = !1, this.scenegraph.sortCell()), sortState.length && this.stateManager.updateSortState(sortState);
|
|
61196
61252
|
}
|
|
61197
|
-
updateFilterRules(filterRules
|
|
61198
|
-
|
|
61253
|
+
updateFilterRules(filterRules, options = {
|
|
61254
|
+
clearRowHeightCache: !0
|
|
61255
|
+
}) {
|
|
61256
|
+
this.scenegraph.clearCells(), this.sortState ? (this.dataSource.updateFilterRulesForSorted(filterRules), sortRecords(this)) : this.dataSource.updateFilterRules(filterRules), this.refreshRowColCount(), this.stateManager.initCheckedState(this.records), this.scenegraph.createSceneGraph(!(null == options ? void 0 : options.clearRowHeightCache)), this.resize();
|
|
61199
61257
|
}
|
|
61200
61258
|
getFilteredRecords() {
|
|
61201
61259
|
return this.dataSource.records;
|
|
@@ -61340,7 +61398,7 @@
|
|
|
61340
61398
|
addRecord(record, recordIndex) {
|
|
61341
61399
|
var _a;
|
|
61342
61400
|
const success = listTableAddRecord(record, recordIndex, this);
|
|
61343
|
-
null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible(), success && this.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, {
|
|
61401
|
+
adjustHeightResizedRowMapWithAddRecordIndex(this, recordIndex, [record]), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible(), success && this.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, {
|
|
61344
61402
|
records: [record],
|
|
61345
61403
|
recordIndex: recordIndex,
|
|
61346
61404
|
recordCount: 1
|
|
@@ -61349,7 +61407,7 @@
|
|
|
61349
61407
|
addRecords(records, recordIndex) {
|
|
61350
61408
|
var _a;
|
|
61351
61409
|
const success = listTableAddRecords(records, recordIndex, this);
|
|
61352
|
-
null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible(), success && this.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, {
|
|
61410
|
+
"number" == typeof recordIndex && adjustHeightResizedRowMapWithAddRecordIndex(this, recordIndex, records), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible(), success && this.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, {
|
|
61353
61411
|
records: records,
|
|
61354
61412
|
recordIndex: recordIndex,
|
|
61355
61413
|
recordCount: records.length
|
|
@@ -61357,7 +61415,7 @@
|
|
|
61357
61415
|
}
|
|
61358
61416
|
deleteRecords(recordIndexs) {
|
|
61359
61417
|
var _a;
|
|
61360
|
-
listTableDeleteRecords(recordIndexs, this), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible();
|
|
61418
|
+
listTableDeleteRecords(recordIndexs, this), adjustHeightResizedRowMapWithDeleteRecordIndex(this, recordIndexs), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible();
|
|
61361
61419
|
const rowIndexs = [];
|
|
61362
61420
|
for (let i = 0; i < recordIndexs.length; i++) rowIndexs.push(this.getBodyRowIndexByRecordIndex(recordIndexs[i]) + this.columnHeaderLevelCount);
|
|
61363
61421
|
this.fireListeners(TABLE_EVENT_TYPE.DELETE_RECORD, {
|