@visactor/vtable-calendar 1.13.3-alpha.1 → 1.13.3-alpha.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 +29 -29
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +4 -4
package/dist/vtable-calendar.js
CHANGED
|
@@ -31797,7 +31797,7 @@
|
|
|
31797
31797
|
const range = getUpdateCustomCellRangeInListTable(componentId, table, isHeaderCustomLayout);
|
|
31798
31798
|
for (let col = range.start.col; col <= range.end.col; col++) for (let row = range.start.row; row <= range.end.row; row++) table.scenegraph.updateCellContent(col, row);
|
|
31799
31799
|
}
|
|
31800
|
-
"autoWidth" === table.widthMode && table.scenegraph.recalculateColWidths(),
|
|
31800
|
+
"autoWidth" === table.widthMode && table.scenegraph.recalculateColWidths(), table.isAutoRowHeight() && table.scenegraph.recalculateRowHeights(), table.scenegraph.renderSceneGraph();
|
|
31801
31801
|
}
|
|
31802
31802
|
getCustomLayoutFunc(col, row) {
|
|
31803
31803
|
var _a;
|
|
@@ -33996,7 +33996,7 @@
|
|
|
33996
33996
|
const layoutMap = table.internalProps.layoutMap;
|
|
33997
33997
|
table.isPivotTable() && (layoutMap.enableUseGetBodyCache(), layoutMap.enableUseHeaderPathCache()), table.defaultHeaderRowHeight, table.defaultHeaderColWidth;
|
|
33998
33998
|
const isDefaultHeaderHasAuto = "auto" === table.defaultHeaderRowHeight || isArray$1(table.defaultHeaderRowHeight) && table.defaultHeaderRowHeight.some(item => "auto" === item),
|
|
33999
|
-
isAllRowsAuto =
|
|
33999
|
+
isAllRowsAuto = table.isAutoRowHeight() || "adaptive" === table.heightMode && !1 !== table.options.autoHeightInAdaptiveMode,
|
|
34000
34000
|
isDefaultRowHeightIsAuto = "auto" === table.options.defaultRowHeight;
|
|
34001
34001
|
if (isAllRowsAuto || isDefaultHeaderHasAuto || isDefaultRowHeightIsAuto) {
|
|
34002
34002
|
rowStart = null != rowStart ? rowStart : 0, rowEnd = null != rowEnd ? rowEnd : table.rowCount - 1, (0 === rowStart && rowEnd === table.rowCount - 1 || isClearRowRangeHeightsMap) && table._clearRowRangeHeightsMap();
|
|
@@ -34088,7 +34088,7 @@
|
|
|
34088
34088
|
}
|
|
34089
34089
|
function computeRowHeight(row, startCol, endCol, table) {
|
|
34090
34090
|
var _a;
|
|
34091
|
-
if (!(
|
|
34091
|
+
if (!(table.isAutoRowHeight() || "adaptive" === table.heightMode && !1 !== table.options.autoHeightInAdaptiveMode) && "auto" !== table.getDefaultRowHeight(row)) return table.getDefaultRowHeight(row);
|
|
34092
34092
|
let maxHeight;
|
|
34093
34093
|
if (table.options.customComputeRowHeight) {
|
|
34094
34094
|
const customRowHeight = table.options.customComputeRowHeight({
|
|
@@ -34132,7 +34132,7 @@
|
|
|
34132
34132
|
layoutMap: layoutMap
|
|
34133
34133
|
} = table.internalProps,
|
|
34134
34134
|
row = table.columnHeaderLevelCount;
|
|
34135
|
-
if ((table.internalProps.autoWrapText || table.internalProps.enableLineBreak || table.isPivotChart()) && (
|
|
34135
|
+
if ((table.internalProps.autoWrapText || table.internalProps.enableLineBreak || table.isPivotChart()) && (table.isAutoRowHeight() || "adaptive" === table.options.heightMode)) return !1;
|
|
34136
34136
|
for (let col = 0; col < table.colCount; col++) {
|
|
34137
34137
|
const cellDefine = layoutMap.getBody(col, row);
|
|
34138
34138
|
if ("radio" === cellDefine.cellType) return !1;
|
|
@@ -34147,7 +34147,7 @@
|
|
|
34147
34147
|
const {
|
|
34148
34148
|
layoutMap: layoutMap
|
|
34149
34149
|
} = table.internalProps;
|
|
34150
|
-
if ((table.internalProps.autoWrapText || table.internalProps.enableLineBreak) && (
|
|
34150
|
+
if ((table.internalProps.autoWrapText || table.internalProps.enableLineBreak) && (table.isAutoRowHeight() || "adaptive" === table.options.heightMode)) return !1;
|
|
34151
34151
|
const cellDefine = layoutMap.getBody(table.rowHeaderLevelCount, row);
|
|
34152
34152
|
if ("function" == typeof cellDefine.style || "function" == typeof cellDefine.icon || (null === (_a = cellDefine.define) || void 0 === _a ? void 0 : _a.customRender) || (null === (_b = cellDefine.define) || void 0 === _b ? void 0 : _b.customLayout) || "function" == typeof (null === (_c = cellDefine.define) || void 0 === _c ? void 0 : _c.icon)) return !1;
|
|
34153
34153
|
const cellStyle = table._getCellStyle(table.rowHeaderLevelCount, row);
|
|
@@ -34158,7 +34158,7 @@
|
|
|
34158
34158
|
const {
|
|
34159
34159
|
layoutMap: layoutMap
|
|
34160
34160
|
} = table.internalProps;
|
|
34161
|
-
if (table.internalProps.autoWrapText && (
|
|
34161
|
+
if (table.internalProps.autoWrapText && (table.isAutoRowHeight() || "adaptive" === table.options.heightMode)) return !1;
|
|
34162
34162
|
const headerDefine = layoutMap.getHeader(table.rowHeaderLevelCount, row);
|
|
34163
34163
|
if ("function" == typeof headerDefine.style || "function" == typeof headerDefine.icons || (null === (_a = headerDefine.define) || void 0 === _a ? void 0 : _a.headerCustomRender) || (null === (_b = headerDefine.define) || void 0 === _b ? void 0 : _b.headerCustomLayout) || "function" == typeof (null === (_c = headerDefine.define) || void 0 === _c ? void 0 : _c.icon)) return !1;
|
|
34164
34164
|
const headerStyle = table._getCellStyle(table.rowHeaderLevelCount, row);
|
|
@@ -37434,7 +37434,7 @@
|
|
|
37434
37434
|
rightBottomCornerGroup: rightBottomCornerGroup
|
|
37435
37435
|
} = table.scenegraph;
|
|
37436
37436
|
let distCol, distRow, distColForCompute, distRowForCompute;
|
|
37437
|
-
proxy.setParamsForRow(), proxy.setParamsForColumn(), "adaptive" === table.widthMode || table.options.autoWrapText && ("adaptive" === table.heightMode ||
|
|
37437
|
+
proxy.setParamsForRow(), proxy.setParamsForColumn(), "adaptive" === table.widthMode || table.options.autoWrapText && ("adaptive" === table.heightMode || table.isAutoRowHeight()) ? (distColForCompute = table.colCount - 1, distCol = Math.min(proxy.firstScreenColLimit, table.colCount - 1)) : distCol = Math.min(proxy.firstScreenColLimit, table.colCount - 1), "adaptive" === table.heightMode ? (distRowForCompute = table.rowCount - 1, distRow = Math.min(proxy.firstScreenRowLimit, table.rowCount - 1)) : distRow = Math.min(proxy.firstScreenRowLimit, table.rowCount - 1), 0 === table.internalProps._widthResizedColMap.size && computeColsWidth(table, 0, null != distColForCompute ? distColForCompute : distCol), 0 === table.internalProps._heightResizedRowMap.size && computeRowsHeight(table, 0, null != distRowForCompute ? distRowForCompute : distRow), distCol < table.colCount - table.rightFrozenColCount && computeColsWidth(table, table.colCount - table.rightFrozenColCount, table.colCount - 1), distRow < table.rowCount - table.bottomFrozenRowCount && computeRowsHeight(table, table.rowCount - table.bottomFrozenRowCount, table.rowCount - 1), table.scenegraph.colHeaderGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rowHeaderGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bottomFrozenGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rightFrozenGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bodyGroup.setAttributes({
|
|
37438
37438
|
x: table.getFrozenColsWidth(),
|
|
37439
37439
|
y: table.getFrozenRowsHeight()
|
|
37440
37440
|
}), createColGroup(cornerHeaderGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, 0, table.frozenRowCount - 1, table.isListTable() ? "columnHeader" : "cornerHeader", table), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(colHeaderGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, 0, table.frozenRowCount - 1, "columnHeader", table), table.frozenColCount > 0 && (table.leftRowSeriesNumberCount > 0 && createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, table.leftRowSeriesNumberCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "rowHeader", table), table.rowHeaderLevelCount > 0 && createColGroup(rowHeaderGroup, xOrigin, yOrigin, table.leftRowSeriesNumberCount, table.leftRowSeriesNumberCount + table.rowHeaderLevelCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "rowHeader", table), table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount && createColGroup(rowHeaderGroup, xOrigin, yOrigin, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, table.frozenColCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "body", table)), table.bottomFrozenRowCount > 0 && (table.frozenColCount > 0 && (table.leftRowSeriesNumberCount > 0 && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, 0, table.leftRowSeriesNumberCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "rowHeader", table), table.rowHeaderLevelCount > 0 && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, table.leftRowSeriesNumberCount, table.leftRowSeriesNumberCount + table.rowHeaderLevelCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "rowHeader", table), table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, table.frozenColCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table)), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(bottomFrozenGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isPivotChart() ? "rowHeader" : "body", table)), table.rightFrozenColCount > 0 && (createColGroup(rightTopCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, 0, table.frozenRowCount - 1, "columnHeader", table), createColGroup(rightFrozenGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, table.isPivotChart() ? "rowHeader" : "body", table)), table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0 && createColGroup(rightBottomCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(bodyGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "body", table), bodyGroup.firstChild || colHeaderGroup.firstChild || cornerHeaderGroup.firstChild || rowHeaderGroup.firstChild ? (proxy.currentRow = null !== (_d = null !== (_b = null === (_a = bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.rowNumber) && void 0 !== _b ? _b : null === (_c = rowHeaderGroup.firstChild) || void 0 === _c ? void 0 : _c.rowNumber) && void 0 !== _d ? _d : proxy.totalRow, proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.currentCol = null !== (_m = null !== (_k = null !== (_h = null !== (_f = null === (_e = bodyGroup.lastChild) || void 0 === _e ? void 0 : _e.col) && void 0 !== _f ? _f : null === (_g = colHeaderGroup.lastChild) || void 0 === _g ? void 0 : _g.col) && void 0 !== _h ? _h : null === (_j = rowHeaderGroup.lastChild) || void 0 === _j ? void 0 : _j.col) && void 0 !== _k ? _k : null === (_l = cornerHeaderGroup.lastChild) || void 0 === _l ? void 0 : _l.col) && void 0 !== _m ? _m : proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2), proxy.progress()) : (proxy.currentRow = proxy.totalRow, proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.currentCol = proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2));
|
|
@@ -37706,20 +37706,20 @@
|
|
|
37706
37706
|
distStartRow = "up" === direction ? proxy.rowEnd + 1 : proxy.rowStart - count,
|
|
37707
37707
|
distEndRow = "up" === direction ? proxy.rowEnd + count : proxy.rowStart - 1;
|
|
37708
37708
|
let syncTopRow, syncBottomRow;
|
|
37709
|
-
if (
|
|
37709
|
+
if (proxy.table.isAutoRowHeight()) syncTopRow = distStartRow, syncBottomRow = distEndRow;else {
|
|
37710
37710
|
syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - 1 * proxy.screenRowCount), syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + 2 * proxy.screenRowCount, proxy.table.rowCount - 1);
|
|
37711
37711
|
}
|
|
37712
37712
|
computeRowsHeight(proxy.table, syncTopRow, syncBottomRow, !1), updatePartRowPosition(startRow, endRow, direction, proxy), proxy.rowStart = "up" === direction ? proxy.rowStart + count : proxy.rowStart - count, proxy.rowEnd = "up" === direction ? proxy.rowEnd + count : proxy.rowEnd - count;
|
|
37713
37713
|
const sync = updateRowContent(syncTopRow, syncBottomRow, proxy, !0);
|
|
37714
|
-
|
|
37714
|
+
proxy.table.isAutoRowHeight() && (updateAutoRow(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up", !0), updateAutoRow(0, proxy.table.frozenColCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up", !0), updateAutoRow(proxy.table.colCount - proxy.table.rightFrozenColCount, proxy.table.colCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up", !0)), proxy.currentRow = "up" === direction ? proxy.currentRow + count : proxy.currentRow - count, proxy.totalRow = Math.max(0, Math.min(proxy.bodyBottomRow, "up" === direction ? proxy.totalRow + count : proxy.totalRow - count, proxy.table.rowCount - 1)), proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.table.isAutoRowHeight() && sync ? proxy.rowUpdatePos = Math.min(proxy.rowUpdatePos, proxy.rowEnd + 1) : proxy.rowUpdatePos = Math.min(proxy.rowUpdatePos, distStartRow), proxy.rowUpdateDirection = direction, proxy.table.scenegraph.updateNextFrame(), yield proxy.progress();
|
|
37715
37715
|
} else {
|
|
37716
37716
|
const distStartRow = "up" === direction ? proxy.rowStart + count : proxy.rowStart - count,
|
|
37717
37717
|
distEndRow = Math.min(proxy.table.rowCount - 1, "up" === direction ? proxy.rowEnd + count : proxy.rowEnd - count),
|
|
37718
37718
|
distStartRowY = proxy.table.getRowsHeight(proxy.bodyTopRow, distStartRow - 1);
|
|
37719
37719
|
let syncTopRow, syncBottomRow;
|
|
37720
|
-
|
|
37720
|
+
proxy.table.isAutoRowHeight() ? (syncTopRow = distStartRow, syncBottomRow = distEndRow) : (syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - 1 * proxy.screenRowCount), syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + 2 * proxy.screenRowCount, proxy.table.rowCount - 1)), computeRowsHeight(proxy.table, syncTopRow, syncBottomRow, !1), updateAllRowPosition(distStartRowY, count, direction, proxy), proxy.rowStart = distStartRow, proxy.rowEnd = distEndRow;
|
|
37721
37721
|
const sync = updateRowContent(syncTopRow, syncBottomRow, proxy, !0);
|
|
37722
|
-
|
|
37722
|
+
proxy.table.isAutoRowHeight() && (updateAutoRow(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up"), updateAutoRow(0, proxy.table.frozenColCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up"), updateAutoRow(proxy.table.colCount - proxy.table.rightFrozenColCount, proxy.table.colCount - 1, syncTopRow, syncBottomRow, proxy.table, distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up")), proxy.currentRow = "up" === direction ? proxy.currentRow + count : proxy.currentRow - count, proxy.totalRow = Math.max(0, Math.min(proxy.bodyBottomRow, "up" === direction ? proxy.totalRow + count : proxy.totalRow - count, proxy.table.rowCount - 1)), proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.table.isAutoRowHeight() && sync ? proxy.rowUpdatePos = proxy.rowEnd + 1 : proxy.rowUpdatePos = proxy.rowStart, proxy.rowUpdateDirection = distEndRow > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up", proxy.table.scenegraph.updateNextFrame(), yield proxy.progress();
|
|
37723
37723
|
}
|
|
37724
37724
|
});
|
|
37725
37725
|
}
|
|
@@ -37823,7 +37823,7 @@
|
|
|
37823
37823
|
"group" === colGroup.type && (colGroup.needUpdate = !0, null == colGroup || colGroup.forEachChildren(cellGroup => {
|
|
37824
37824
|
cellGroup.needUpdate = !0;
|
|
37825
37825
|
}));
|
|
37826
|
-
}),
|
|
37826
|
+
}), proxy.table.isAutoRowHeight() ? (syncTopRow = proxy.rowStart, syncBottomRow = proxy.rowEnd) : (syncTopRow = Math.max(proxy.bodyTopRow, proxy.screenTopRow - 1 * proxy.screenRowCount), syncBottomRow = Math.min(proxy.bodyBottomRow, proxy.screenTopRow + 2 * proxy.screenRowCount, proxy.table.rowCount - 1));
|
|
37827
37827
|
const oldBodyHeight = proxy.table.getAllRowsHeight();
|
|
37828
37828
|
computeRowsHeight(proxy.table, syncTopRow, syncBottomRow);
|
|
37829
37829
|
const newBodyHeight = proxy.table.getAllRowsHeight();
|
|
@@ -37845,7 +37845,7 @@
|
|
|
37845
37845
|
for (let row = proxy.rowStart; row <= proxy.rowEnd; row++) proxy.table.scenegraph.updateCellContent(col, row);
|
|
37846
37846
|
for (let row = proxy.table.rowCount - proxy.table.bottomFrozenRowCount; row < proxy.table.rowCount; row++) proxy.table.scenegraph.updateCellContent(col, row);
|
|
37847
37847
|
}
|
|
37848
|
-
updateRowContent(syncTopRow, syncBottomRow, proxy),
|
|
37848
|
+
updateRowContent(syncTopRow, syncBottomRow, proxy), proxy.table.isAutoRowHeight() && updateAutoRow(proxy.bodyLeftCol, proxy.bodyRightCol, syncTopRow, syncBottomRow, proxy.table, proxy.rowEnd > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up"), proxy.rowUpdatePos = proxy.rowStart, proxy.rowUpdateDirection = proxy.rowEnd > proxy.bodyBottomRow - (proxy.rowEnd - proxy.rowStart + 1) ? "down" : "up", proxy.table.scenegraph.updateNextFrame(), proxy.table.isAutoRowHeight() || (yield proxy.progress());
|
|
37849
37849
|
});
|
|
37850
37850
|
}
|
|
37851
37851
|
|
|
@@ -38138,7 +38138,7 @@
|
|
|
38138
38138
|
};
|
|
38139
38139
|
class SceneProxy {
|
|
38140
38140
|
constructor(table) {
|
|
38141
|
-
this.isRelease = !1, this.mode = "column", this.rowLimit = 200, this.currentRow = 0, this.rowStart = 0, this.rowEnd = 0, this.referenceRow = 0, this.screenTopRow = 0, this.deltaY = 0, this.deltaHeight = 0, this.colLimit = 100, this.screenLeftCol = 0, this.deltaX = 0, this.deltaWidth = 0, this.cellCache = new Map(), this.table = table, this.table.isPivotChart() ? (this.rowLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight)), this.colLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameWidth / table.defaultColWidth))) :
|
|
38141
|
+
this.isRelease = !1, this.mode = "column", this.rowLimit = 200, this.currentRow = 0, this.rowStart = 0, this.rowEnd = 0, this.referenceRow = 0, this.screenTopRow = 0, this.deltaY = 0, this.deltaHeight = 0, this.colLimit = 100, this.screenLeftCol = 0, this.deltaX = 0, this.deltaWidth = 0, this.cellCache = new Map(), this.table = table, this.table.isPivotChart() ? (this.rowLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight)), this.colLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameWidth / table.defaultColWidth))) : this.table.isAutoRowHeight() ? this.rowLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight)) : ("autoWidth" === this.table.widthMode || (this.rowLimit = Math.max(200, Math.ceil(2 * table.tableNoFrameHeight / table.defaultRowHeight))), this.colLimit = Math.max(100, Math.ceil(2 * table.tableNoFrameWidth / table.defaultColWidth))), this.table.internalProps.transpose ? this.mode = "row" : this.table.isPivotTable() && (this.mode = "pivot"), this.table.options.maintainedDataCount && (this.rowLimit = this.table.options.maintainedDataCount);
|
|
38142
38142
|
}
|
|
38143
38143
|
get bodyLeftCol() {
|
|
38144
38144
|
return this.table.frozenColCount;
|
|
@@ -38308,17 +38308,17 @@
|
|
|
38308
38308
|
}
|
|
38309
38309
|
updateCellGroups(count) {
|
|
38310
38310
|
const distRow = Math.min(this.bodyBottomRow, this.rowUpdatePos + count);
|
|
38311
|
-
|
|
38311
|
+
this.table.isAutoRowHeight() && computeRowsHeight(this.table, this.rowUpdatePos, distRow, !1), updateRowContent(this.rowUpdatePos, distRow, this), this.table.isAutoRowHeight() && (updateAutoRow(this.bodyLeftCol, this.bodyRightCol, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection, !0), updateAutoRow(0, this.table.frozenColCount - 1, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection, !0), updateAutoRow(this.table.colCount - this.table.rightFrozenColCount, this.table.colCount - 1, this.rowUpdatePos, distRow, this.table, this.rowUpdateDirection, !0)), this.rowUpdatePos = distRow + 1;
|
|
38312
38312
|
}
|
|
38313
38313
|
updateBottomFrozenCellGroups() {
|
|
38314
38314
|
const startRow = this.table.rowCount - this.table.bottomFrozenRowCount,
|
|
38315
38315
|
endRow = this.table.rowCount - 1;
|
|
38316
|
-
|
|
38316
|
+
this.table.isAutoRowHeight() && computeRowsHeight(this.table, startRow, endRow, !1), updateRowContent(startRow, endRow, this), this.table.isAutoRowHeight() && (updateAutoRow(this.bodyLeftCol, this.bodyRightCol, startRow, endRow, this.table, this.rowUpdateDirection), updateAutoRow(0, this.table.frozenColCount - 1, startRow, endRow, this.table, this.rowUpdateDirection), updateAutoRow(this.table.colCount - this.table.rightFrozenColCount, this.table.colCount - 1, startRow, endRow, this.table, this.rowUpdateDirection));
|
|
38317
38317
|
}
|
|
38318
38318
|
updateRightFrozenCellGroups() {
|
|
38319
38319
|
const startCol = this.table.colCount - this.table.rightFrozenColCount,
|
|
38320
38320
|
endCol = this.table.colCount - 1;
|
|
38321
|
-
"autoWidth" === this.table.widthMode && computeColsWidth(this.table, startCol, endCol, !1), updateColContent(startCol, endCol, this),
|
|
38321
|
+
"autoWidth" === this.table.widthMode && computeColsWidth(this.table, startCol, endCol, !1), updateColContent(startCol, endCol, this), this.table.isAutoRowHeight() && updateAutoColumn(startCol, endCol, this.table, this.colUpdateDirection);
|
|
38322
38322
|
}
|
|
38323
38323
|
updateColCellGroupsAsync() {
|
|
38324
38324
|
return __awaiter$1(this, void 0, void 0, function* () {
|
|
@@ -39027,22 +39027,22 @@
|
|
|
39027
39027
|
beforeCell.mergeStartRow && beforeCell.mergeEndRow && beforeCell.mergeEndRow > beforeRow && (addNeedUpdateTag({
|
|
39028
39028
|
start: {
|
|
39029
39029
|
row: beforeCell.mergeStartRow,
|
|
39030
|
-
col:
|
|
39030
|
+
col: scene.table.isAutoRowHeight() ? 0 : beforeCell.mergeStartCol
|
|
39031
39031
|
},
|
|
39032
39032
|
end: {
|
|
39033
39033
|
row: beforeCell.mergeEndRow,
|
|
39034
|
-
col:
|
|
39034
|
+
col: scene.table.isAutoRowHeight() ? scene.table.colCount - 1 : beforeCell.mergeEndCol
|
|
39035
39035
|
}
|
|
39036
39036
|
}, scene), row = beforeCell.mergeStartRow);
|
|
39037
39037
|
const afterCell = scene.highPerformanceGetCell(col, afterRow);
|
|
39038
39038
|
afterCell.mergeStartRow && afterCell.mergeEndRow && afterCell.mergeStartRow < afterRow && (addNeedUpdateTag({
|
|
39039
39039
|
start: {
|
|
39040
39040
|
row: afterCell.mergeStartRow,
|
|
39041
|
-
col:
|
|
39041
|
+
col: scene.table.isAutoRowHeight() ? 0 : afterCell.mergeStartCol
|
|
39042
39042
|
},
|
|
39043
39043
|
end: {
|
|
39044
39044
|
row: afterCell.mergeEndRow,
|
|
39045
|
-
col:
|
|
39045
|
+
col: scene.table.isAutoRowHeight() ? scene.table.colCount - 1 : afterCell.mergeEndCol
|
|
39046
39046
|
}
|
|
39047
39047
|
}, scene), row = afterCell.mergeStartRow), isValid$1(row) && (updateRow = isValid$1(updateRow) ? Math.min(updateRow, row) : row);
|
|
39048
39048
|
}
|
|
@@ -40646,7 +40646,7 @@
|
|
|
40646
40646
|
const addRows = deduplication$1(addCells.map(cell => cell.row)).sort((a, b) => a - b),
|
|
40647
40647
|
updateRows = deduplication$1(updateCells.map(cell => cell.row)).sort((a, b) => a - b),
|
|
40648
40648
|
isNotFillHeight = this.table.getAllRowsHeight() - [...addRows, ...updateRows].reduce((tolHeight, rowNumber) => tolHeight + this.table.getRowHeight(rowNumber), 0) <= this.table.tableNoFrameHeight;
|
|
40649
|
-
if (updateRow(removeCells, addCells, updateCells, this.table, skipUpdateProxy), recalculateColWidths && this.recalculateColWidths(), "adaptive" === this.table.heightMode || this.table.autoFillHeight && (this.table.getAllRowsHeight() <= this.table.tableNoFrameHeight || isNotFillHeight)) this.table.scenegraph.recalculateRowHeights();else if (
|
|
40649
|
+
if (updateRow(removeCells, addCells, updateCells, this.table, skipUpdateProxy), recalculateColWidths && this.recalculateColWidths(), "adaptive" === this.table.heightMode || this.table.autoFillHeight && (this.table.getAllRowsHeight() <= this.table.tableNoFrameHeight || isNotFillHeight)) this.table.scenegraph.recalculateRowHeights();else if (this.table.isAutoRowHeight()) for (let i = 0; i < updateRows.length; i++) {
|
|
40650
40650
|
const row = updateRows[i],
|
|
40651
40651
|
oldHeight = this.table.getRowHeight(row),
|
|
40652
40652
|
newHeight = computeRowHeight(row, 0, this.table.colCount - 1, this.table);
|
|
@@ -46233,7 +46233,7 @@
|
|
|
46233
46233
|
cacheStyle = cacheStyle.clone();
|
|
46234
46234
|
for (const key in customCellStyle) {
|
|
46235
46235
|
const value = customCellStyle[key];
|
|
46236
|
-
value && (cacheStyle[`_${key}`] = value);
|
|
46236
|
+
isValid$1(value) && (cacheStyle[`_${key}`] = value);
|
|
46237
46237
|
}
|
|
46238
46238
|
return cacheStyle;
|
|
46239
46239
|
}
|
|
@@ -46376,7 +46376,7 @@
|
|
|
46376
46376
|
constructor(container) {
|
|
46377
46377
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
46378
46378
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
46379
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.13.3-alpha.
|
|
46379
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.13.3-alpha.3", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
46380
46380
|
const {
|
|
46381
46381
|
frozenColCount = 0,
|
|
46382
46382
|
frozenRowCount: frozenRowCount,
|
|
@@ -46762,7 +46762,7 @@
|
|
|
46762
46762
|
startRow = Math.max(startRow, 0), endRow = Math.min(endRow, (null !== (_a = this.rowCount) && void 0 !== _a ? _a : 1 / 0) - 1);
|
|
46763
46763
|
let h = 0;
|
|
46764
46764
|
const isDefaultRowHeightIsAuto = "auto" === this.options.defaultRowHeight;
|
|
46765
|
-
if ("standard" !== this.heightMode || this.autoFillHeight || !this.internalProps.layoutMap || this.hasAutoImageColumn() || isDefaultRowHeightIsAuto || 0 !== this.internalProps._heightResizedRowMap.size) {
|
|
46765
|
+
if ("standard" !== this.heightMode || this.options.customComputeRowHeight || this.autoFillHeight || !this.internalProps.layoutMap || this.hasAutoImageColumn() || isDefaultRowHeightIsAuto || 0 !== this.internalProps._heightResizedRowMap.size) {
|
|
46766
46766
|
if (null === (_b = this.options.customConfig) || void 0 === _b ? void 0 : _b._disableColumnAndRowSizeRound) {
|
|
46767
46767
|
const tempH = this.rowHeightsMap.getSumInRange(startRow, endRow);
|
|
46768
46768
|
let heightRange;
|
|
@@ -46792,7 +46792,7 @@
|
|
|
46792
46792
|
return this._adjustColWidth(col, this._colWidthDefineToPxWidth(width));
|
|
46793
46793
|
}
|
|
46794
46794
|
isAutoRowHeight(row) {
|
|
46795
|
-
return "autoHeight" === this.heightMode || row >= 0 && row < this.columnHeaderLevelCount && "auto" === this.getDefaultRowHeight(row);
|
|
46795
|
+
return "autoHeight" === this.heightMode || !!this.options.customComputeRowHeight || row >= 0 && row < this.columnHeaderLevelCount && "auto" === this.getDefaultRowHeight(row);
|
|
46796
46796
|
}
|
|
46797
46797
|
getColWidth(col) {
|
|
46798
46798
|
var _a;
|
|
@@ -49702,7 +49702,7 @@
|
|
|
49702
49702
|
newWidth = computeColWidth(col, 0, table.rowCount - 1, table, !1);
|
|
49703
49703
|
newWidth !== oldWidth && table.scenegraph.updateColWidth(col, newWidth - oldWidth);
|
|
49704
49704
|
}
|
|
49705
|
-
if ("adaptive" === table.heightMode || table.autoFillHeight && table.getAllRowsHeight() <= table.tableNoFrameHeight) 0 === table.internalProps._heightResizedRowMap.size && table.scenegraph.recalculateRowHeights();else if (
|
|
49705
|
+
if ("adaptive" === table.heightMode || table.autoFillHeight && table.getAllRowsHeight() <= table.tableNoFrameHeight) 0 === table.internalProps._heightResizedRowMap.size && table.scenegraph.recalculateRowHeights();else if (table.isAutoRowHeight() && !table.internalProps._heightResizedRowMap.has(row)) {
|
|
49706
49706
|
const oldHeight = table.getRowHeight(row),
|
|
49707
49707
|
newHeight = computeRowHeight(row, 0, table.colCount - 1, table);
|
|
49708
49708
|
table.scenegraph.updateRowHeight(row, newHeight - oldHeight);
|
|
@@ -49789,7 +49789,7 @@
|
|
|
49789
49789
|
newWidth = computeColWidth(sCol, 0, table.rowCount - 1, table, !1);
|
|
49790
49790
|
newWidth !== oldWidth && table.scenegraph.updateColWidth(sCol, newWidth - oldWidth);
|
|
49791
49791
|
}
|
|
49792
|
-
if ("adaptive" === table.heightMode || table.autoFillHeight && table.getAllRowsHeight() <= table.tableNoFrameHeight) table.scenegraph.recalculateRowHeights();else if (
|
|
49792
|
+
if ("adaptive" === table.heightMode || table.autoFillHeight && table.getAllRowsHeight() <= table.tableNoFrameHeight) table.scenegraph.recalculateRowHeights();else if (table.isAutoRowHeight()) {
|
|
49793
49793
|
const rows = [],
|
|
49794
49794
|
deltaYs = [];
|
|
49795
49795
|
for (let sRow = startRow; sRow <= range.end.row; sRow++) if (table.rowHeightsMap.get(sRow)) {
|
|
@@ -54018,7 +54018,7 @@
|
|
|
54018
54018
|
lineClamp: lineClamp
|
|
54019
54019
|
} = cellStyle,
|
|
54020
54020
|
autoColWidth = "auto" === colWidth,
|
|
54021
|
-
autoRowHeight =
|
|
54021
|
+
autoRowHeight = table.isAutoRowHeight(),
|
|
54022
54022
|
attribute = {
|
|
54023
54023
|
maxLineWidth: autoColWidth ? 1 / 0 : cellWidth - (padding[1] + padding[3] + hierarchyOffset) - size - spaceBetweenTextAndIcon,
|
|
54024
54024
|
textAlign: "left",
|