@visactor/vtable-calendar 1.13.3-alpha.2 → 1.13.3-alpha.4
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 +32 -36
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +2 -2
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(), table.
|
|
31800
|
+
"autoWidth" === table.widthMode && table.scenegraph.recalculateColWidths(), "autoHeight" === table.heightMode && 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 = table.
|
|
33999
|
+
isAllRowsAuto = "autoHeight" === table.heightMode || "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,16 +34088,12 @@
|
|
|
34088
34088
|
}
|
|
34089
34089
|
function computeRowHeight(row, startCol, endCol, table) {
|
|
34090
34090
|
var _a;
|
|
34091
|
-
if (!(table.
|
|
34091
|
+
if (!("autoHeight" === table.heightMode || "adaptive" === table.heightMode && !1 !== table.options.autoHeightInAdaptiveMode) && "auto" !== table.getDefaultRowHeight(row)) return table.getDefaultRowHeight(row);
|
|
34092
34092
|
let maxHeight;
|
|
34093
|
-
if (table.options.customComputeRowHeight) {
|
|
34094
|
-
|
|
34095
|
-
|
|
34096
|
-
|
|
34097
|
-
});
|
|
34098
|
-
if ("number" == typeof customRowHeight) return customRowHeight;
|
|
34099
|
-
if ("auto" !== customRowHeight) return table.getDefaultRowHeight(row);
|
|
34100
|
-
}
|
|
34093
|
+
if (table.options.customComputeRowHeight) return table.options.customComputeRowHeight({
|
|
34094
|
+
row: row,
|
|
34095
|
+
table: table
|
|
34096
|
+
});
|
|
34101
34097
|
if (table.isPivotChart() && row >= table.columnHeaderLevelCount && row < table.rowCount - table.bottomFrozenRowCount) if (table.internalProps.layoutMap.indicatorsAsCol) {
|
|
34102
34098
|
const optimunHeight = table.internalProps.layoutMap.getOptimunHeightForChart(row);
|
|
34103
34099
|
if (optimunHeight > 0) return optimunHeight;
|
|
@@ -34132,7 +34128,7 @@
|
|
|
34132
34128
|
layoutMap: layoutMap
|
|
34133
34129
|
} = table.internalProps,
|
|
34134
34130
|
row = table.columnHeaderLevelCount;
|
|
34135
|
-
if ((table.internalProps.autoWrapText || table.internalProps.enableLineBreak || table.isPivotChart()) && (table.
|
|
34131
|
+
if ((table.internalProps.autoWrapText || table.internalProps.enableLineBreak || table.isPivotChart()) && ("autoHeight" === table.options.heightMode || "adaptive" === table.options.heightMode)) return !1;
|
|
34136
34132
|
for (let col = 0; col < table.colCount; col++) {
|
|
34137
34133
|
const cellDefine = layoutMap.getBody(col, row);
|
|
34138
34134
|
if ("radio" === cellDefine.cellType) return !1;
|
|
@@ -34147,7 +34143,7 @@
|
|
|
34147
34143
|
const {
|
|
34148
34144
|
layoutMap: layoutMap
|
|
34149
34145
|
} = table.internalProps;
|
|
34150
|
-
if ((table.internalProps.autoWrapText || table.internalProps.enableLineBreak) && (table.
|
|
34146
|
+
if ((table.internalProps.autoWrapText || table.internalProps.enableLineBreak) && ("autoHeight" === table.options.heightMode || "adaptive" === table.options.heightMode)) return !1;
|
|
34151
34147
|
const cellDefine = layoutMap.getBody(table.rowHeaderLevelCount, row);
|
|
34152
34148
|
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
34149
|
const cellStyle = table._getCellStyle(table.rowHeaderLevelCount, row);
|
|
@@ -34158,7 +34154,7 @@
|
|
|
34158
34154
|
const {
|
|
34159
34155
|
layoutMap: layoutMap
|
|
34160
34156
|
} = table.internalProps;
|
|
34161
|
-
if (table.internalProps.autoWrapText && (table.
|
|
34157
|
+
if (table.internalProps.autoWrapText && ("autoHeight" === table.options.heightMode || "adaptive" === table.options.heightMode)) return !1;
|
|
34162
34158
|
const headerDefine = layoutMap.getHeader(table.rowHeaderLevelCount, row);
|
|
34163
34159
|
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
34160
|
const headerStyle = table._getCellStyle(table.rowHeaderLevelCount, row);
|
|
@@ -37434,7 +37430,7 @@
|
|
|
37434
37430
|
rightBottomCornerGroup: rightBottomCornerGroup
|
|
37435
37431
|
} = table.scenegraph;
|
|
37436
37432
|
let distCol, distRow, distColForCompute, distRowForCompute;
|
|
37437
|
-
proxy.setParamsForRow(), proxy.setParamsForColumn(), "adaptive" === table.widthMode || table.options.autoWrapText && ("adaptive" === table.heightMode || table.
|
|
37433
|
+
proxy.setParamsForRow(), proxy.setParamsForColumn(), "adaptive" === table.widthMode || table.options.autoWrapText && ("adaptive" === table.heightMode || "autoHeight" === table.heightMode) ? (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
37434
|
x: table.getFrozenColsWidth(),
|
|
37439
37435
|
y: table.getFrozenRowsHeight()
|
|
37440
37436
|
}), 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 +37702,20 @@
|
|
|
37706
37702
|
distStartRow = "up" === direction ? proxy.rowEnd + 1 : proxy.rowStart - count,
|
|
37707
37703
|
distEndRow = "up" === direction ? proxy.rowEnd + count : proxy.rowStart - 1;
|
|
37708
37704
|
let syncTopRow, syncBottomRow;
|
|
37709
|
-
if (proxy.table.
|
|
37705
|
+
if ("autoHeight" === proxy.table.heightMode) syncTopRow = distStartRow, syncBottomRow = distEndRow;else {
|
|
37710
37706
|
syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - 1 * proxy.screenRowCount), syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + 2 * proxy.screenRowCount, proxy.table.rowCount - 1);
|
|
37711
37707
|
}
|
|
37712
37708
|
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
37709
|
const sync = updateRowContent(syncTopRow, syncBottomRow, proxy, !0);
|
|
37714
|
-
proxy.table.
|
|
37710
|
+
"autoHeight" === proxy.table.heightMode && (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), "autoHeight" === proxy.table.heightMode && 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
37711
|
} else {
|
|
37716
37712
|
const distStartRow = "up" === direction ? proxy.rowStart + count : proxy.rowStart - count,
|
|
37717
37713
|
distEndRow = Math.min(proxy.table.rowCount - 1, "up" === direction ? proxy.rowEnd + count : proxy.rowEnd - count),
|
|
37718
37714
|
distStartRowY = proxy.table.getRowsHeight(proxy.bodyTopRow, distStartRow - 1);
|
|
37719
37715
|
let syncTopRow, syncBottomRow;
|
|
37720
|
-
proxy.table.
|
|
37716
|
+
"autoHeight" === proxy.table.heightMode ? (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
37717
|
const sync = updateRowContent(syncTopRow, syncBottomRow, proxy, !0);
|
|
37722
|
-
proxy.table.
|
|
37718
|
+
"autoHeight" === proxy.table.heightMode && (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), "autoHeight" === proxy.table.heightMode && 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
37719
|
}
|
|
37724
37720
|
});
|
|
37725
37721
|
}
|
|
@@ -37823,7 +37819,7 @@
|
|
|
37823
37819
|
"group" === colGroup.type && (colGroup.needUpdate = !0, null == colGroup || colGroup.forEachChildren(cellGroup => {
|
|
37824
37820
|
cellGroup.needUpdate = !0;
|
|
37825
37821
|
}));
|
|
37826
|
-
}), proxy.table.
|
|
37822
|
+
}), "autoHeight" === proxy.table.heightMode ? (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
37823
|
const oldBodyHeight = proxy.table.getAllRowsHeight();
|
|
37828
37824
|
computeRowsHeight(proxy.table, syncTopRow, syncBottomRow);
|
|
37829
37825
|
const newBodyHeight = proxy.table.getAllRowsHeight();
|
|
@@ -37845,7 +37841,7 @@
|
|
|
37845
37841
|
for (let row = proxy.rowStart; row <= proxy.rowEnd; row++) proxy.table.scenegraph.updateCellContent(col, row);
|
|
37846
37842
|
for (let row = proxy.table.rowCount - proxy.table.bottomFrozenRowCount; row < proxy.table.rowCount; row++) proxy.table.scenegraph.updateCellContent(col, row);
|
|
37847
37843
|
}
|
|
37848
|
-
updateRowContent(syncTopRow, syncBottomRow, proxy), proxy.table.
|
|
37844
|
+
updateRowContent(syncTopRow, syncBottomRow, proxy), "autoHeight" === proxy.table.heightMode && 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(), "autoHeight" !== proxy.table.heightMode && (yield proxy.progress());
|
|
37849
37845
|
});
|
|
37850
37846
|
}
|
|
37851
37847
|
|
|
@@ -38138,7 +38134,7 @@
|
|
|
38138
38134
|
};
|
|
38139
38135
|
class SceneProxy {
|
|
38140
38136
|
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))) : this.table.
|
|
38137
|
+
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))) : "autoHeight" === this.table.heightMode ? 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
38138
|
}
|
|
38143
38139
|
get bodyLeftCol() {
|
|
38144
38140
|
return this.table.frozenColCount;
|
|
@@ -38308,17 +38304,17 @@
|
|
|
38308
38304
|
}
|
|
38309
38305
|
updateCellGroups(count) {
|
|
38310
38306
|
const distRow = Math.min(this.bodyBottomRow, this.rowUpdatePos + count);
|
|
38311
|
-
this.table.
|
|
38307
|
+
"autoHeight" === this.table.heightMode && computeRowsHeight(this.table, this.rowUpdatePos, distRow, !1), updateRowContent(this.rowUpdatePos, distRow, this), "autoHeight" === this.table.heightMode && (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
38308
|
}
|
|
38313
38309
|
updateBottomFrozenCellGroups() {
|
|
38314
38310
|
const startRow = this.table.rowCount - this.table.bottomFrozenRowCount,
|
|
38315
38311
|
endRow = this.table.rowCount - 1;
|
|
38316
|
-
this.table.
|
|
38312
|
+
"autoHeight" === this.table.heightMode && computeRowsHeight(this.table, startRow, endRow, !1), updateRowContent(startRow, endRow, this), "autoHeight" === this.table.heightMode && (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
38313
|
}
|
|
38318
38314
|
updateRightFrozenCellGroups() {
|
|
38319
38315
|
const startCol = this.table.colCount - this.table.rightFrozenColCount,
|
|
38320
38316
|
endCol = this.table.colCount - 1;
|
|
38321
|
-
"autoWidth" === this.table.widthMode && computeColsWidth(this.table, startCol, endCol, !1), updateColContent(startCol, endCol, this), this.table.
|
|
38317
|
+
"autoWidth" === this.table.widthMode && computeColsWidth(this.table, startCol, endCol, !1), updateColContent(startCol, endCol, this), "autoHeight" === this.table.heightMode && updateAutoColumn(startCol, endCol, this.table, this.colUpdateDirection);
|
|
38322
38318
|
}
|
|
38323
38319
|
updateColCellGroupsAsync() {
|
|
38324
38320
|
return __awaiter$1(this, void 0, void 0, function* () {
|
|
@@ -39027,22 +39023,22 @@
|
|
|
39027
39023
|
beforeCell.mergeStartRow && beforeCell.mergeEndRow && beforeCell.mergeEndRow > beforeRow && (addNeedUpdateTag({
|
|
39028
39024
|
start: {
|
|
39029
39025
|
row: beforeCell.mergeStartRow,
|
|
39030
|
-
col: scene.table.
|
|
39026
|
+
col: "autoHeight" === scene.table.heightMode ? 0 : beforeCell.mergeStartCol
|
|
39031
39027
|
},
|
|
39032
39028
|
end: {
|
|
39033
39029
|
row: beforeCell.mergeEndRow,
|
|
39034
|
-
col: scene.table.
|
|
39030
|
+
col: "autoHeight" === scene.table.heightMode ? scene.table.colCount - 1 : beforeCell.mergeEndCol
|
|
39035
39031
|
}
|
|
39036
39032
|
}, scene), row = beforeCell.mergeStartRow);
|
|
39037
39033
|
const afterCell = scene.highPerformanceGetCell(col, afterRow);
|
|
39038
39034
|
afterCell.mergeStartRow && afterCell.mergeEndRow && afterCell.mergeStartRow < afterRow && (addNeedUpdateTag({
|
|
39039
39035
|
start: {
|
|
39040
39036
|
row: afterCell.mergeStartRow,
|
|
39041
|
-
col: scene.table.
|
|
39037
|
+
col: "autoHeight" === scene.table.heightMode ? 0 : afterCell.mergeStartCol
|
|
39042
39038
|
},
|
|
39043
39039
|
end: {
|
|
39044
39040
|
row: afterCell.mergeEndRow,
|
|
39045
|
-
col: scene.table.
|
|
39041
|
+
col: "autoHeight" === scene.table.heightMode ? scene.table.colCount - 1 : afterCell.mergeEndCol
|
|
39046
39042
|
}
|
|
39047
39043
|
}, scene), row = afterCell.mergeStartRow), isValid$1(row) && (updateRow = isValid$1(updateRow) ? Math.min(updateRow, row) : row);
|
|
39048
39044
|
}
|
|
@@ -40646,7 +40642,7 @@
|
|
|
40646
40642
|
const addRows = deduplication$1(addCells.map(cell => cell.row)).sort((a, b) => a - b),
|
|
40647
40643
|
updateRows = deduplication$1(updateCells.map(cell => cell.row)).sort((a, b) => a - b),
|
|
40648
40644
|
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 (this.table.
|
|
40645
|
+
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 ("autoHeight" === this.table.heightMode) for (let i = 0; i < updateRows.length; i++) {
|
|
40650
40646
|
const row = updateRows[i],
|
|
40651
40647
|
oldHeight = this.table.getRowHeight(row),
|
|
40652
40648
|
newHeight = computeRowHeight(row, 0, this.table.colCount - 1, this.table);
|
|
@@ -46233,7 +46229,7 @@
|
|
|
46233
46229
|
cacheStyle = cacheStyle.clone();
|
|
46234
46230
|
for (const key in customCellStyle) {
|
|
46235
46231
|
const value = customCellStyle[key];
|
|
46236
|
-
|
|
46232
|
+
value && (cacheStyle[`_${key}`] = value);
|
|
46237
46233
|
}
|
|
46238
46234
|
return cacheStyle;
|
|
46239
46235
|
}
|
|
@@ -46376,7 +46372,7 @@
|
|
|
46376
46372
|
constructor(container) {
|
|
46377
46373
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
46378
46374
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
46379
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.13.3-alpha.
|
|
46375
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.13.3-alpha.4", 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
46376
|
const {
|
|
46381
46377
|
frozenColCount = 0,
|
|
46382
46378
|
frozenRowCount: frozenRowCount,
|
|
@@ -46792,7 +46788,7 @@
|
|
|
46792
46788
|
return this._adjustColWidth(col, this._colWidthDefineToPxWidth(width));
|
|
46793
46789
|
}
|
|
46794
46790
|
isAutoRowHeight(row) {
|
|
46795
|
-
return "autoHeight" === this.heightMode ||
|
|
46791
|
+
return "autoHeight" === this.heightMode || row >= 0 && row < this.columnHeaderLevelCount && "auto" === this.getDefaultRowHeight(row);
|
|
46796
46792
|
}
|
|
46797
46793
|
getColWidth(col) {
|
|
46798
46794
|
var _a;
|
|
@@ -49702,7 +49698,7 @@
|
|
|
49702
49698
|
newWidth = computeColWidth(col, 0, table.rowCount - 1, table, !1);
|
|
49703
49699
|
newWidth !== oldWidth && table.scenegraph.updateColWidth(col, newWidth - oldWidth);
|
|
49704
49700
|
}
|
|
49705
|
-
if ("adaptive" === table.heightMode || table.autoFillHeight && table.getAllRowsHeight() <= table.tableNoFrameHeight) 0 === table.internalProps._heightResizedRowMap.size && table.scenegraph.recalculateRowHeights();else if (table.
|
|
49701
|
+
if ("adaptive" === table.heightMode || table.autoFillHeight && table.getAllRowsHeight() <= table.tableNoFrameHeight) 0 === table.internalProps._heightResizedRowMap.size && table.scenegraph.recalculateRowHeights();else if ("autoHeight" === table.heightMode && !table.internalProps._heightResizedRowMap.has(row)) {
|
|
49706
49702
|
const oldHeight = table.getRowHeight(row),
|
|
49707
49703
|
newHeight = computeRowHeight(row, 0, table.colCount - 1, table);
|
|
49708
49704
|
table.scenegraph.updateRowHeight(row, newHeight - oldHeight);
|
|
@@ -49789,7 +49785,7 @@
|
|
|
49789
49785
|
newWidth = computeColWidth(sCol, 0, table.rowCount - 1, table, !1);
|
|
49790
49786
|
newWidth !== oldWidth && table.scenegraph.updateColWidth(sCol, newWidth - oldWidth);
|
|
49791
49787
|
}
|
|
49792
|
-
if ("adaptive" === table.heightMode || table.autoFillHeight && table.getAllRowsHeight() <= table.tableNoFrameHeight) table.scenegraph.recalculateRowHeights();else if (table.
|
|
49788
|
+
if ("adaptive" === table.heightMode || table.autoFillHeight && table.getAllRowsHeight() <= table.tableNoFrameHeight) table.scenegraph.recalculateRowHeights();else if ("autoHeight" === table.heightMode) {
|
|
49793
49789
|
const rows = [],
|
|
49794
49790
|
deltaYs = [];
|
|
49795
49791
|
for (let sRow = startRow; sRow <= range.end.row; sRow++) if (table.rowHeightsMap.get(sRow)) {
|
|
@@ -54018,7 +54014,7 @@
|
|
|
54018
54014
|
lineClamp: lineClamp
|
|
54019
54015
|
} = cellStyle,
|
|
54020
54016
|
autoColWidth = "auto" === colWidth,
|
|
54021
|
-
autoRowHeight = table.
|
|
54017
|
+
autoRowHeight = "autoHeight" === table.heightMode,
|
|
54022
54018
|
attribute = {
|
|
54023
54019
|
maxLineWidth: autoColWidth ? 1 / 0 : cellWidth - (padding[1] + padding[3] + hierarchyOffset) - size - spaceBetweenTextAndIcon,
|
|
54024
54020
|
textAlign: "left",
|