@visactor/vtable-calendar 1.13.3-alpha.0 → 1.13.3-alpha.2

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.
@@ -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(), "autoHeight" === table.heightMode && table.scenegraph.recalculateRowHeights(), table.scenegraph.renderSceneGraph();
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 = "autoHeight" === table.heightMode || "adaptive" === table.heightMode && !1 !== table.options.autoHeightInAdaptiveMode,
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,12 +34088,16 @@
34088
34088
  }
34089
34089
  function computeRowHeight(row, startCol, endCol, table) {
34090
34090
  var _a;
34091
- if (!("autoHeight" === table.heightMode || "adaptive" === table.heightMode && !1 !== table.options.autoHeightInAdaptiveMode) && "auto" !== table.getDefaultRowHeight(row)) return table.getDefaultRowHeight(row);
34091
+ if (!(table.isAutoRowHeight() || "adaptive" === table.heightMode && !1 !== table.options.autoHeightInAdaptiveMode) && "auto" !== table.getDefaultRowHeight(row)) return table.getDefaultRowHeight(row);
34092
34092
  let maxHeight;
34093
- if (table.options.customComputeRowHeight) return table.options.customComputeRowHeight({
34094
- row: row,
34095
- table: table
34096
- });
34093
+ if (table.options.customComputeRowHeight) {
34094
+ const customRowHeight = table.options.customComputeRowHeight({
34095
+ row: row,
34096
+ table: table
34097
+ });
34098
+ if ("number" == typeof customRowHeight) return customRowHeight;
34099
+ if ("auto" !== customRowHeight) return table.getDefaultRowHeight(row);
34100
+ }
34097
34101
  if (table.isPivotChart() && row >= table.columnHeaderLevelCount && row < table.rowCount - table.bottomFrozenRowCount) if (table.internalProps.layoutMap.indicatorsAsCol) {
34098
34102
  const optimunHeight = table.internalProps.layoutMap.getOptimunHeightForChart(row);
34099
34103
  if (optimunHeight > 0) return optimunHeight;
@@ -34128,7 +34132,7 @@
34128
34132
  layoutMap: layoutMap
34129
34133
  } = table.internalProps,
34130
34134
  row = table.columnHeaderLevelCount;
34131
- if ((table.internalProps.autoWrapText || table.internalProps.enableLineBreak || table.isPivotChart()) && ("autoHeight" === table.options.heightMode || "adaptive" === table.options.heightMode)) return !1;
34135
+ if ((table.internalProps.autoWrapText || table.internalProps.enableLineBreak || table.isPivotChart()) && (table.isAutoRowHeight() || "adaptive" === table.options.heightMode)) return !1;
34132
34136
  for (let col = 0; col < table.colCount; col++) {
34133
34137
  const cellDefine = layoutMap.getBody(col, row);
34134
34138
  if ("radio" === cellDefine.cellType) return !1;
@@ -34143,7 +34147,7 @@
34143
34147
  const {
34144
34148
  layoutMap: layoutMap
34145
34149
  } = table.internalProps;
34146
- if ((table.internalProps.autoWrapText || table.internalProps.enableLineBreak) && ("autoHeight" === table.options.heightMode || "adaptive" === table.options.heightMode)) return !1;
34150
+ if ((table.internalProps.autoWrapText || table.internalProps.enableLineBreak) && (table.isAutoRowHeight() || "adaptive" === table.options.heightMode)) return !1;
34147
34151
  const cellDefine = layoutMap.getBody(table.rowHeaderLevelCount, row);
34148
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;
34149
34153
  const cellStyle = table._getCellStyle(table.rowHeaderLevelCount, row);
@@ -34154,7 +34158,7 @@
34154
34158
  const {
34155
34159
  layoutMap: layoutMap
34156
34160
  } = table.internalProps;
34157
- if (table.internalProps.autoWrapText && ("autoHeight" === table.options.heightMode || "adaptive" === table.options.heightMode)) return !1;
34161
+ if (table.internalProps.autoWrapText && (table.isAutoRowHeight() || "adaptive" === table.options.heightMode)) return !1;
34158
34162
  const headerDefine = layoutMap.getHeader(table.rowHeaderLevelCount, row);
34159
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;
34160
34164
  const headerStyle = table._getCellStyle(table.rowHeaderLevelCount, row);
@@ -37430,7 +37434,7 @@
37430
37434
  rightBottomCornerGroup: rightBottomCornerGroup
37431
37435
  } = table.scenegraph;
37432
37436
  let distCol, distRow, distColForCompute, distRowForCompute;
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({
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({
37434
37438
  x: table.getFrozenColsWidth(),
37435
37439
  y: table.getFrozenRowsHeight()
37436
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));
@@ -37702,20 +37706,20 @@
37702
37706
  distStartRow = "up" === direction ? proxy.rowEnd + 1 : proxy.rowStart - count,
37703
37707
  distEndRow = "up" === direction ? proxy.rowEnd + count : proxy.rowStart - 1;
37704
37708
  let syncTopRow, syncBottomRow;
37705
- if ("autoHeight" === proxy.table.heightMode) syncTopRow = distStartRow, syncBottomRow = distEndRow;else {
37709
+ if (proxy.table.isAutoRowHeight()) syncTopRow = distStartRow, syncBottomRow = distEndRow;else {
37706
37710
  syncTopRow = Math.max(proxy.bodyTopRow, screenTopRow - 1 * proxy.screenRowCount), syncBottomRow = Math.min(proxy.bodyBottomRow, screenTopRow + 2 * proxy.screenRowCount, proxy.table.rowCount - 1);
37707
37711
  }
37708
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;
37709
37713
  const sync = updateRowContent(syncTopRow, syncBottomRow, proxy, !0);
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();
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();
37711
37715
  } else {
37712
37716
  const distStartRow = "up" === direction ? proxy.rowStart + count : proxy.rowStart - count,
37713
37717
  distEndRow = Math.min(proxy.table.rowCount - 1, "up" === direction ? proxy.rowEnd + count : proxy.rowEnd - count),
37714
37718
  distStartRowY = proxy.table.getRowsHeight(proxy.bodyTopRow, distStartRow - 1);
37715
37719
  let syncTopRow, syncBottomRow;
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;
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;
37717
37721
  const sync = updateRowContent(syncTopRow, syncBottomRow, proxy, !0);
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();
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();
37719
37723
  }
37720
37724
  });
37721
37725
  }
@@ -37819,7 +37823,7 @@
37819
37823
  "group" === colGroup.type && (colGroup.needUpdate = !0, null == colGroup || colGroup.forEachChildren(cellGroup => {
37820
37824
  cellGroup.needUpdate = !0;
37821
37825
  }));
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));
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));
37823
37827
  const oldBodyHeight = proxy.table.getAllRowsHeight();
37824
37828
  computeRowsHeight(proxy.table, syncTopRow, syncBottomRow);
37825
37829
  const newBodyHeight = proxy.table.getAllRowsHeight();
@@ -37841,7 +37845,7 @@
37841
37845
  for (let row = proxy.rowStart; row <= proxy.rowEnd; row++) proxy.table.scenegraph.updateCellContent(col, row);
37842
37846
  for (let row = proxy.table.rowCount - proxy.table.bottomFrozenRowCount; row < proxy.table.rowCount; row++) proxy.table.scenegraph.updateCellContent(col, row);
37843
37847
  }
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());
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(), "autoHeight" !== proxy.table.heightMode && (yield proxy.progress());
37845
37849
  });
37846
37850
  }
37847
37851
 
@@ -38134,7 +38138,7 @@
38134
38138
  };
38135
38139
  class SceneProxy {
38136
38140
  constructor(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);
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);
38138
38142
  }
38139
38143
  get bodyLeftCol() {
38140
38144
  return this.table.frozenColCount;
@@ -38304,17 +38308,17 @@
38304
38308
  }
38305
38309
  updateCellGroups(count) {
38306
38310
  const distRow = Math.min(this.bodyBottomRow, this.rowUpdatePos + count);
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;
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;
38308
38312
  }
38309
38313
  updateBottomFrozenCellGroups() {
38310
38314
  const startRow = this.table.rowCount - this.table.bottomFrozenRowCount,
38311
38315
  endRow = this.table.rowCount - 1;
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));
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));
38313
38317
  }
38314
38318
  updateRightFrozenCellGroups() {
38315
38319
  const startCol = this.table.colCount - this.table.rightFrozenColCount,
38316
38320
  endCol = this.table.colCount - 1;
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);
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);
38318
38322
  }
38319
38323
  updateColCellGroupsAsync() {
38320
38324
  return __awaiter$1(this, void 0, void 0, function* () {
@@ -39023,22 +39027,22 @@
39023
39027
  beforeCell.mergeStartRow && beforeCell.mergeEndRow && beforeCell.mergeEndRow > beforeRow && (addNeedUpdateTag({
39024
39028
  start: {
39025
39029
  row: beforeCell.mergeStartRow,
39026
- col: "autoHeight" === scene.table.heightMode ? 0 : beforeCell.mergeStartCol
39030
+ col: scene.table.isAutoRowHeight() ? 0 : beforeCell.mergeStartCol
39027
39031
  },
39028
39032
  end: {
39029
39033
  row: beforeCell.mergeEndRow,
39030
- col: "autoHeight" === scene.table.heightMode ? scene.table.colCount - 1 : beforeCell.mergeEndCol
39034
+ col: scene.table.isAutoRowHeight() ? scene.table.colCount - 1 : beforeCell.mergeEndCol
39031
39035
  }
39032
39036
  }, scene), row = beforeCell.mergeStartRow);
39033
39037
  const afterCell = scene.highPerformanceGetCell(col, afterRow);
39034
39038
  afterCell.mergeStartRow && afterCell.mergeEndRow && afterCell.mergeStartRow < afterRow && (addNeedUpdateTag({
39035
39039
  start: {
39036
39040
  row: afterCell.mergeStartRow,
39037
- col: "autoHeight" === scene.table.heightMode ? 0 : afterCell.mergeStartCol
39041
+ col: scene.table.isAutoRowHeight() ? 0 : afterCell.mergeStartCol
39038
39042
  },
39039
39043
  end: {
39040
39044
  row: afterCell.mergeEndRow,
39041
- col: "autoHeight" === scene.table.heightMode ? scene.table.colCount - 1 : afterCell.mergeEndCol
39045
+ col: scene.table.isAutoRowHeight() ? scene.table.colCount - 1 : afterCell.mergeEndCol
39042
39046
  }
39043
39047
  }, scene), row = afterCell.mergeStartRow), isValid$1(row) && (updateRow = isValid$1(updateRow) ? Math.min(updateRow, row) : row);
39044
39048
  }
@@ -40642,7 +40646,7 @@
40642
40646
  const addRows = deduplication$1(addCells.map(cell => cell.row)).sort((a, b) => a - b),
40643
40647
  updateRows = deduplication$1(updateCells.map(cell => cell.row)).sort((a, b) => a - b),
40644
40648
  isNotFillHeight = this.table.getAllRowsHeight() - [...addRows, ...updateRows].reduce((tolHeight, rowNumber) => tolHeight + this.table.getRowHeight(rowNumber), 0) <= this.table.tableNoFrameHeight;
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++) {
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++) {
40646
40650
  const row = updateRows[i],
40647
40651
  oldHeight = this.table.getRowHeight(row),
40648
40652
  newHeight = computeRowHeight(row, 0, this.table.colCount - 1, this.table);
@@ -41544,10 +41548,8 @@
41544
41548
  function setCheckedState(col, row, field, checked, state) {
41545
41549
  const recordIndex = state.table.getRecordShowIndexByCell(col, row);
41546
41550
  if (recordIndex >= 0) {
41547
- const dataIndex = state.table.dataSource.getIndexKey(recordIndex).toString();
41548
- state.checkedState.has(dataIndex) ? state.checkedState.get(dataIndex)[field] = checked : state.checkedState.set(dataIndex, {
41549
- [field]: checked
41550
- });
41551
+ const dataIndex = state.table.dataSource.getIndexKey(recordIndex);
41552
+ state.checkedState[dataIndex] || (state.checkedState[dataIndex] = {}), state.checkedState[dataIndex][field] = checked;
41551
41553
  }
41552
41554
  }
41553
41555
  function setHeaderCheckedState(field, checked, state) {
@@ -41561,23 +41563,21 @@
41561
41563
  if (state.table.isHeader(col, row)) {
41562
41564
  if (isValid$1(state.headerCheckedState[field])) return state.headerCheckedState[field];
41563
41565
  if ("function" == typeof checked) return;
41564
- if (isValid$1(checked)) state.headerCheckedState[field] = checked;else if ((null === (_a = state.checkedState) || void 0 === _a ? void 0 : _a.size) > 0) {
41566
+ if (isValid$1(checked)) state.headerCheckedState[field] = checked;else if ((null === (_a = state.checkedState) || void 0 === _a ? void 0 : _a.length) > 0) {
41565
41567
  return state.updateHeaderCheckedState(field, col, row);
41566
41568
  }
41567
41569
  return state.headerCheckedState[field];
41568
41570
  }
41569
41571
  const recordIndex = state.table.getRecordShowIndexByCell(col, row);
41570
41572
  if (recordIndex >= 0) {
41571
- const dataIndex = state.table.dataSource.getIndexKey(recordIndex).toString();
41572
- if (isValid$1(null === (_b = state.checkedState.get(dataIndex)) || void 0 === _b ? void 0 : _b[field])) return state.checkedState.get(dataIndex)[field];
41573
- state.checkedState.has(dataIndex) ? state.checkedState.get(dataIndex)[field] = checked : state.checkedState.set(dataIndex, {
41574
- [field]: checked
41575
- });
41573
+ const dataIndex = state.table.dataSource.getIndexKey(recordIndex);
41574
+ if (isValid$1(null === (_b = state.checkedState[dataIndex]) || void 0 === _b ? void 0 : _b[field])) return state.checkedState[dataIndex][field];
41575
+ state.checkedState[dataIndex] || (state.checkedState[dataIndex] = {}), state.checkedState[dataIndex][field] = checked;
41576
41576
  }
41577
41577
  return checked;
41578
41578
  }
41579
41579
  function initCheckedState(records, state) {
41580
- state.checkedState.clear(), state.headerCheckedState = {}, state.radioState = {};
41580
+ state.checkedState = [], state.headerCheckedState = {}, state.radioState = {};
41581
41581
  let isNeedInitHeaderCheckedStateFromRecord = !1;
41582
41582
  if (state._checkboxCellTypeFields = [], state._headerCheckFuncs = {}, state.table.internalProps.layoutMap.headerObjects.forEach((hd, index) => {
41583
41583
  if ("checkbox" === hd.headerType) {
@@ -41588,29 +41588,46 @@
41588
41588
  for (let i = 0; i < state.table.leftRowSeriesNumberCount; i++) state.headerCheckedState[`_vtable_rowSeries_number_${i}`] = !1, state._checkboxCellTypeFields.push(`_vtable_rowSeries_number_${i}`);
41589
41589
  isNeedInitHeaderCheckedStateFromRecord = !0;
41590
41590
  }
41591
- isNeedInitHeaderCheckedStateFromRecord && initRecordCheckState(state);
41591
+ isNeedInitHeaderCheckedStateFromRecord && (null == records || records.forEach((record, index) => {
41592
+ state._checkboxCellTypeFields.forEach(field => {
41593
+ const value = record[field];
41594
+ let isChecked;
41595
+ if (isObject$4(value) ? isChecked = value.checked : "boolean" == typeof value && (isChecked = value), null == isChecked) {
41596
+ const headerCheckFunc = state._headerCheckFuncs[field];
41597
+ if (headerCheckFunc) {
41598
+ const cellAddr = state.table.getCellAddrByFieldRecord(field, index);
41599
+ isChecked = getOrApply(headerCheckFunc, {
41600
+ col: cellAddr.col,
41601
+ row: cellAddr.row,
41602
+ table: state.table,
41603
+ context: null,
41604
+ value: value
41605
+ });
41606
+ }
41607
+ }
41608
+ state.checkedState[index] || (state.checkedState[index] = {}), state.checkedState[index][field] = isChecked;
41609
+ });
41610
+ }));
41592
41611
  }
41593
41612
  function updateHeaderCheckedState(field, state, col, row) {
41594
- let allChecked = !0,
41595
- allUnChecked = !0,
41596
- hasChecked = !1;
41597
- return state.checkedState.forEach((check_state, index) => {
41598
- index = index.includes(",") ? index.split(",").map(item => Number(item)) : Number(index);
41599
- const tableIndex = state.table.getTableIndexByRecordIndex(index),
41600
- mergeCell = state.table.transpose ? state.table.getCustomMerge(tableIndex, row) : state.table.getCustomMerge(col, tableIndex),
41601
- data = state.table.dataSource.get(index);
41602
- mergeCell || data.vtableMerge || (!0 !== (null == check_state ? void 0 : check_state[field]) ? allChecked = !1 : (allUnChecked = !1, hasChecked = !0));
41603
- }), allChecked ? (state.headerCheckedState[field] = !0, allChecked) : allUnChecked ? (state.headerCheckedState[field] = !1, !1) : !!hasChecked && (state.headerCheckedState[field] = "indeterminate", "indeterminate");
41613
+ const allChecked = state.checkedState.every((check_state, index) => {
41614
+ const tableIndex = state.table.getTableIndexByRecordIndex(index);
41615
+ return !!(state.table.transpose ? state.table.getCustomMerge(tableIndex, row) : state.table.getCustomMerge(col, tableIndex)) || !0 === (null == check_state ? void 0 : check_state[field]);
41616
+ });
41617
+ if (allChecked) return state.headerCheckedState[field] = !0, allChecked;
41618
+ if (state.checkedState.every((check_state, index) => {
41619
+ const tableIndex = state.table.getTableIndexByRecordIndex(index);
41620
+ return !!(state.table.transpose ? state.table.getCustomMerge(tableIndex, row) : state.table.getCustomMerge(col, tableIndex)) || !1 === (null == check_state ? void 0 : check_state[field]);
41621
+ })) return state.headerCheckedState[field] = !1, !1;
41622
+ return !!state.checkedState.find(check_state => !0 === (null == check_state ? void 0 : check_state[field])) && (state.headerCheckedState[field] = "indeterminate", "indeterminate");
41604
41623
  }
41605
41624
  function initLeftRecordsCheckState(records, state) {
41606
- for (let index = state.checkedState.size; index < records.length; index++) {
41625
+ for (let index = state.checkedState.length; index < records.length; index++) {
41607
41626
  const record = records[index];
41608
41627
  state._checkboxCellTypeFields.forEach(field => {
41609
41628
  const value = record[field];
41610
41629
  let isChecked;
41611
- isObject$4(value) ? isChecked = value.checked : "boolean" == typeof value && (isChecked = value);
41612
- const dataIndex = index.toString();
41613
- state.checkedState.get(dataIndex) || state.checkedState.set(dataIndex, {}), state.checkedState.get(dataIndex)[field] = isChecked;
41630
+ isObject$4(value) ? isChecked = value.checked : "boolean" == typeof value && (isChecked = value), state.checkedState[index] || (state.checkedState[index] = {}), state.checkedState[index][field] = isChecked;
41614
41631
  });
41615
41632
  }
41616
41633
  }
@@ -41643,35 +41660,14 @@
41643
41660
  checkedState: checkedState,
41644
41661
  table: table
41645
41662
  } = state;
41646
- let source, target;
41647
- if (table.internalProps.transpose ? (sourceIndex = table.getRecordShowIndexByCell(sourceIndex, 0), targetIndex = table.getRecordShowIndexByCell(targetIndex, 0)) : (source = table.getRecordIndexByCell(0, sourceIndex), target = table.getRecordIndexByCell(0, targetIndex)), isNumber$2(source) && isNumber$2(target)) {
41648
- if (sourceIndex > targetIndex) {
41649
- const sourceRecord = checkedState.get(sourceIndex.toString());
41650
- for (let i = sourceIndex; i > targetIndex; i--) checkedState.set(i.toString(), checkedState.get((i - 1).toString()));
41651
- checkedState.set(targetIndex.toString(), sourceRecord);
41652
- } else if (sourceIndex < targetIndex) {
41653
- const sourceRecord = checkedState.get(sourceIndex.toString());
41654
- for (let i = sourceIndex; i < targetIndex; i++) checkedState.set(i.toString(), checkedState.get((i + 1).toString()));
41655
- checkedState.set(targetIndex.toString(), sourceRecord);
41656
- }
41657
- } else if (isArray$1(source) && isArray$1(target)) if ((sourceIndex = source[source.length - 1]) > (targetIndex = target[target.length - 1])) {
41658
- const sourceRecord = checkedState.get(source.toString());
41659
- for (let i = sourceIndex; i > targetIndex; i--) {
41660
- const now = [...source];
41661
- now[now.length - 1] = i;
41662
- const last = [...source];
41663
- last[last.length - 1] = i - 1, checkedState.set(now.toString(), checkedState.get(last.toString()));
41664
- }
41665
- checkedState.set(target.toString(), sourceRecord);
41663
+ if (table.internalProps.transpose ? (sourceIndex = table.getRecordShowIndexByCell(sourceIndex, 0), targetIndex = table.getRecordShowIndexByCell(targetIndex, 0)) : (sourceIndex = table.getRecordShowIndexByCell(0, sourceIndex), targetIndex = table.getRecordShowIndexByCell(0, targetIndex)), sourceIndex > targetIndex) {
41664
+ const sourceRecord = checkedState[sourceIndex];
41665
+ for (let i = sourceIndex; i > targetIndex; i--) checkedState[i] = checkedState[i - 1];
41666
+ checkedState[targetIndex] = sourceRecord;
41666
41667
  } else if (sourceIndex < targetIndex) {
41667
- const sourceRecord = checkedState.get(source.toString());
41668
- for (let i = sourceIndex; i < targetIndex; i++) {
41669
- const now = [...source];
41670
- now[now.length - 1] = i;
41671
- const next = [...source];
41672
- next[next.length - 1] = i + 1, checkedState.set(now.toString(), checkedState.get(next.toString()));
41673
- }
41674
- checkedState.set(target.toString(), sourceRecord);
41668
+ const sourceRecord = checkedState[sourceIndex];
41669
+ for (let i = sourceIndex; i < targetIndex; i++) checkedState[i] = checkedState[i + 1];
41670
+ checkedState[targetIndex] = sourceRecord;
41675
41671
  }
41676
41672
  }
41677
41673
  function getGroupCheckboxState(table) {
@@ -41683,37 +41679,10 @@
41683
41679
  const {
41684
41680
  vtableOriginIndex: vtableOriginIndex
41685
41681
  } = dataSource.getRawRecord(indexArr);
41686
- result[vtableOriginIndex] = table.stateManager.checkedState.get(indexArr.toString());
41682
+ result[vtableOriginIndex] = table.stateManager.checkedState[indexArr];
41687
41683
  }
41688
41684
  }), result;
41689
41685
  }
41690
- function initRecordCheckState(state) {
41691
- const table = state.table,
41692
- start = table.internalProps.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount,
41693
- end = table.internalProps.transpose ? table.colCount : table.rowCount;
41694
- for (let index = 0; index + start < end; index++) {
41695
- const record = table.dataSource.get(index);
41696
- state._checkboxCellTypeFields.forEach(field => {
41697
- const value = record[field];
41698
- let isChecked;
41699
- if (isObject$4(value) ? isChecked = value.checked : "boolean" == typeof value && (isChecked = value), null == isChecked) {
41700
- const headerCheckFunc = state._headerCheckFuncs[field];
41701
- if (headerCheckFunc) {
41702
- const cellAddr = state.table.getCellAddrByFieldRecord(field, index);
41703
- isChecked = getOrApply(headerCheckFunc, {
41704
- col: cellAddr.col,
41705
- row: cellAddr.row,
41706
- table: state.table,
41707
- context: null,
41708
- value: value
41709
- });
41710
- }
41711
- }
41712
- const dataIndex = state.table.dataSource.getIndexKey(index).toString();
41713
- state.checkedState.get(dataIndex) || state.checkedState.set(dataIndex, {}), state.checkedState.get(dataIndex)[field] = isChecked;
41714
- });
41715
- }
41716
- }
41717
41686
 
41718
41687
  function updateResizeRow(xInTable, yInTable, state) {
41719
41688
  xInTable = Math.ceil(xInTable), yInTable = Math.ceil(yInTable);
@@ -41801,7 +41770,7 @@
41801
41770
 
41802
41771
  class StateManager {
41803
41772
  constructor(table) {
41804
- this.fastScrolling = !1, this.checkedState = new Map(), this.headerCheckedState = {}, this._checkboxCellTypeFields = [], this._headerCheckFuncs = {}, this.radioState = {}, this.resetInteractionState = debounce(state => {
41773
+ this.fastScrolling = !1, this.checkedState = [], this.headerCheckedState = {}, this._checkboxCellTypeFields = [], this._headerCheckFuncs = {}, this.radioState = {}, this.resetInteractionState = debounce(state => {
41805
41774
  this.updateInteractionState(null != state ? state : InteractionState.default);
41806
41775
  }, 100), this.table = table, this.initState(), this.updateVerticalScrollBar = this.updateVerticalScrollBar.bind(this), this.updateHorizontalScrollBar = this.updateHorizontalScrollBar.bind(this);
41807
41776
  }
@@ -42481,7 +42450,7 @@
42481
42450
  return syncRadioState(col, row, field, radioType, indexInCell, isChecked, this);
42482
42451
  }
42483
42452
  changeCheckboxAndRadioOrder(sourceIndex, targetIndex) {
42484
- this.checkedState.size && changeCheckboxOrder(sourceIndex, targetIndex, this), this.radioState.length && changeRadioOrder(sourceIndex, targetIndex, this);
42453
+ this.checkedState.length && changeCheckboxOrder(sourceIndex, targetIndex, this), this.radioState.length && changeRadioOrder(sourceIndex, targetIndex, this);
42485
42454
  }
42486
42455
  setCustomSelectRanges(customSelectRanges) {
42487
42456
  deletaCustomSelectRanges(this), addCustomSelectRanges(customSelectRanges, this);
@@ -46264,7 +46233,7 @@
46264
46233
  cacheStyle = cacheStyle.clone();
46265
46234
  for (const key in customCellStyle) {
46266
46235
  const value = customCellStyle[key];
46267
- value && (cacheStyle[`_${key}`] = value);
46236
+ isValid$1(value) && (cacheStyle[`_${key}`] = value);
46268
46237
  }
46269
46238
  return cacheStyle;
46270
46239
  }
@@ -46407,7 +46376,7 @@
46407
46376
  constructor(container) {
46408
46377
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
46409
46378
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
46410
- if (super(), this.showFrozenIcon = !0, this.version = "1.13.3-alpha.0", 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");
46379
+ if (super(), this.showFrozenIcon = !0, this.version = "1.13.3-alpha.2", 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");
46411
46380
  const {
46412
46381
  frozenColCount = 0,
46413
46382
  frozenRowCount: frozenRowCount,
@@ -46823,7 +46792,7 @@
46823
46792
  return this._adjustColWidth(col, this._colWidthDefineToPxWidth(width));
46824
46793
  }
46825
46794
  isAutoRowHeight(row) {
46826
- 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);
46827
46796
  }
46828
46797
  getColWidth(col) {
46829
46798
  var _a;
@@ -49733,7 +49702,7 @@
49733
49702
  newWidth = computeColWidth(col, 0, table.rowCount - 1, table, !1);
49734
49703
  newWidth !== oldWidth && table.scenegraph.updateColWidth(col, newWidth - oldWidth);
49735
49704
  }
49736
- 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)) {
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)) {
49737
49706
  const oldHeight = table.getRowHeight(row),
49738
49707
  newHeight = computeRowHeight(row, 0, table.colCount - 1, table);
49739
49708
  table.scenegraph.updateRowHeight(row, newHeight - oldHeight);
@@ -49820,7 +49789,7 @@
49820
49789
  newWidth = computeColWidth(sCol, 0, table.rowCount - 1, table, !1);
49821
49790
  newWidth !== oldWidth && table.scenegraph.updateColWidth(sCol, newWidth - oldWidth);
49822
49791
  }
49823
- if ("adaptive" === table.heightMode || table.autoFillHeight && table.getAllRowsHeight() <= table.tableNoFrameHeight) table.scenegraph.recalculateRowHeights();else if ("autoHeight" === table.heightMode) {
49792
+ if ("adaptive" === table.heightMode || table.autoFillHeight && table.getAllRowsHeight() <= table.tableNoFrameHeight) table.scenegraph.recalculateRowHeights();else if (table.isAutoRowHeight()) {
49824
49793
  const rows = [],
49825
49794
  deltaYs = [];
49826
49795
  for (let sRow = startRow; sRow <= range.end.row; sRow++) if (table.rowHeightsMap.get(sRow)) {
@@ -50609,11 +50578,11 @@
50609
50578
  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();
50610
50579
  }
50611
50580
  getCheckboxState(field) {
50612
- if (this.stateManager.checkedState.size < this.rowCount - this.columnHeaderLevelCount && this.stateManager.initLeftRecordsCheckState(this.records), isValid$1(field)) {
50613
- let stateArr = this.stateManager.checkedState.values();
50581
+ if (this.stateManager.checkedState.length < this.rowCount - this.columnHeaderLevelCount && this.stateManager.initLeftRecordsCheckState(this.records), isValid$1(field)) {
50582
+ let stateArr = this.stateManager.checkedState;
50614
50583
  return this.options.groupBy && (stateArr = getGroupCheckboxState(this)), stateArr.map(state => state[field]);
50615
50584
  }
50616
- return new Array(...this.stateManager.checkedState.values());
50585
+ return this.stateManager.checkedState;
50617
50586
  }
50618
50587
  getCellCheckboxState(col, row) {
50619
50588
  var _a;
@@ -50621,8 +50590,8 @@
50621
50590
  field = null == define ? void 0 : define.field,
50622
50591
  cellType = this.getCellType(col, row);
50623
50592
  if (isValid$1(field) && "checkbox" === cellType) {
50624
- const dataIndex = this.dataSource.getIndexKey(this.getRecordShowIndexByCell(col, row)).toString();
50625
- return null === (_a = this.stateManager.checkedState.get(dataIndex)) || void 0 === _a ? void 0 : _a[field];
50593
+ const dataIndex = this.dataSource.getIndexKey(this.getRecordShowIndexByCell(col, row));
50594
+ return null === (_a = this.stateManager.checkedState[dataIndex]) || void 0 === _a ? void 0 : _a[field];
50626
50595
  }
50627
50596
  }
50628
50597
  getRadioState(field) {
@@ -54049,7 +54018,7 @@
54049
54018
  lineClamp: lineClamp
54050
54019
  } = cellStyle,
54051
54020
  autoColWidth = "auto" === colWidth,
54052
- autoRowHeight = "autoHeight" === table.heightMode,
54021
+ autoRowHeight = table.isAutoRowHeight(),
54053
54022
  attribute = {
54054
54023
  maxLineWidth: autoColWidth ? 1 / 0 : cellWidth - (padding[1] + padding[3] + hierarchyOffset) - size - spaceBetweenTextAndIcon,
54055
54024
  textAlign: "left",