@visactor/vtable-calendar 1.11.6-alpha.3 → 1.12.0

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.
@@ -26675,6 +26675,8 @@
26675
26675
  HierarchyState.expand = "expand", HierarchyState.collapse = "collapse", HierarchyState.none = "none", HierarchyState.loading = "loading";
26676
26676
  }(HierarchyState || (HierarchyState = {}));
26677
26677
 
26678
+ const cellStyleKeys = ["bgColor", "color", "strokeColor", "borderColor", "linkColor"];
26679
+
26678
26680
  var AggregationType;
26679
26681
  !function (AggregationType) {
26680
26682
  AggregationType.RECORD = "RECORD", AggregationType.NONE = "NONE", AggregationType.SUM = "SUM", AggregationType.MIN = "MIN", AggregationType.MAX = "MAX", AggregationType.AVG = "AVG", AggregationType.COUNT = "COUNT", AggregationType.CUSTOM = "CUSTOM", AggregationType.RECALCULATE = "RECALCULATE";
@@ -27848,7 +27850,7 @@
27848
27850
  if (this._sorted || (keys.sort((a, b) => a < b ? -1 : a > b ? 1 : 0), this._sorted = !0), sourceIndex > targetIndex) {
27849
27851
  const targetVals = [],
27850
27852
  sourceVals = [];
27851
- for (let i = indexFirst$1(keys, targetIndex); i < sourceIndex + sourceCount; i++) {
27853
+ for (let i = indexFirst$1(keys, targetIndex); i < indexFirst$1(keys, sourceIndex) + sourceCount; i++) {
27852
27854
  const key = keys[i];
27853
27855
  key >= sourceIndex && key < sourceIndex + sourceCount ? sourceVals.push(this.get(key)) : targetVals.push(this.get(key));
27854
27856
  }
@@ -27857,7 +27859,7 @@
27857
27859
  } else {
27858
27860
  const targetVals = [],
27859
27861
  sourceVals = [];
27860
- for (let i = indexFirst$1(keys, sourceIndex); i < targetIndex + targetCount; i++) {
27862
+ for (let i = indexFirst$1(keys, sourceIndex); i < indexFirst$1(keys, targetIndex) + targetCount; i++) {
27861
27863
  const key = keys[i];
27862
27864
  key >= sourceIndex && key < sourceIndex + sourceCount ? sourceVals.push(this.get(key)) : targetVals.push(this.get(key));
27863
27865
  }
@@ -29877,7 +29879,7 @@
29877
29879
  const dataIndex = this.getIndexKey(index);
29878
29880
  if (!this.beforeChangedRecordsMap[dataIndex]) {
29879
29881
  const originRecord = this.getOriginalRecord(dataIndex);
29880
- this.beforeChangedRecordsMap[dataIndex] = null !== (_a = cloneDeep(originRecord)) && void 0 !== _a ? _a : {};
29882
+ this.beforeChangedRecordsMap[dataIndex] = null !== (_a = cloneDeep(originRecord, void 0, ["vtable_gantt_linkedFrom", "vtable_gantt_linkedTo"])) && void 0 !== _a ? _a : {};
29881
29883
  }
29882
29884
  if ("string" == typeof field || "number" == typeof field) {
29883
29885
  const beforeChangedValue = this.beforeChangedRecordsMap[dataIndex][field],
@@ -30983,7 +30985,7 @@
30983
30985
  super(params), "mouseenter_cell" !== this.attribute.visibleTime && "click_cell" !== this.attribute.visibleTime || (this.attribute.opacity = 0), this.attribute.hoverImage && (this.attribute.originImage = this.attribute.image), this.attribute.isGif && this.attribute.gif && this.loadGif();
30984
30986
  }
30985
30987
  loadGif() {
30986
- this.playing = !1, ResourceLoader.GetFile(this.attribute.gif, "arrayBuffer").then(res => {
30988
+ this.playing = !1, ResourceLoader.GetFile(this.attribute.gif + "?role=gif", "arrayBuffer").then(res => {
30987
30989
  const gif = parseGIF_1(res),
30988
30990
  frames = decompressFrames_1(gif, !0);
30989
30991
  this.renderGIF(frames), this.resources.set(this.attribute.image, {
@@ -32731,12 +32733,12 @@
32731
32733
  } else if ("checkbox" === type) {
32732
32734
  cellGroup = Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync);
32733
32735
  } else if ("radio" === type) {
32734
- cellGroup = Factory.getFunction("createRadioCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define);
32736
+ cellGroup = Factory.getFunction("createRadioCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define, range);
32735
32737
  }
32736
32738
  return cellGroup.onBeforeAttributeUpdate = onBeforeAttributeUpdateForInvertHighlight, cellGroup;
32737
32739
  }
32738
- function updateCell$1(col, row, table, addNew, isShadow) {
32739
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
32740
+ function updateCell$1(col, row, table, addNew, isShadow, forceFastUpdate) {
32741
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
32740
32742
  const oldCellGroup = table.scenegraph.highPerformanceGetCell(col, row, !0),
32741
32743
  cellLocation = table.getCellLocation(col, row);
32742
32744
  let isMerge,
@@ -32776,20 +32778,21 @@
32776
32778
  const cellStyle = customStyle || table._getCellStyle(range ? range.start.col : col, range ? range.start.row : row),
32777
32779
  autoWrapText = null !== (_a = cellStyle.autoWrapText) && void 0 !== _a ? _a : table.internalProps.autoWrapText,
32778
32780
  cellTheme = getStyleTheme(cellStyle, table, isMerge ? range.start.col : col, isMerge ? range.start.row : row, getProp).theme;
32779
- if (cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table), !addNew && !isMerge && !((null == define ? void 0 : define.customLayout) || (null == define ? void 0 : define.customRender) || (null == define ? void 0 : define.headerCustomLayout) || (null == define ? void 0 : define.headerCustomRender)) && canUseFastUpdate(col, row, oldCellGroup, autoWrapText, mayHaveIcon, table)) {
32781
+ if (cellTheme.group.cornerRadius = getCellCornerRadius(col, row, table), !addNew && !isMerge && !((null == define ? void 0 : define.customLayout) || (null == define ? void 0 : define.customRender) || (null == define ? void 0 : define.headerCustomLayout) || (null == define ? void 0 : define.headerCustomRender)) && (forceFastUpdate || canUseFastUpdate(col, row, oldCellGroup, autoWrapText, mayHaveIcon, table))) {
32780
32782
  const cellWidth = table.getColWidth(col),
32781
- cellHeight = table.getRowHeight(row);
32783
+ cellHeight = table.getRowHeight(row),
32784
+ strokeArrayWidth = getCellBorderStrokeWidth(col, row, cellTheme, table);
32782
32785
  oldCellGroup.setAttributes({
32783
32786
  width: cellWidth,
32784
32787
  height: cellHeight,
32785
32788
  lineWidth: null !== (_c = null === (_b = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _b ? void 0 : _b.lineWidth) && void 0 !== _c ? _c : void 0,
32786
32789
  fill: null !== (_e = null === (_d = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _d ? void 0 : _d.fill) && void 0 !== _e ? _e : void 0,
32787
32790
  stroke: null !== (_g = null === (_f = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _f ? void 0 : _f.stroke) && void 0 !== _g ? _g : void 0,
32788
- strokeArrayWidth: null !== (_j = null === (_h = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _h ? void 0 : _h.strokeArrayWidth) && void 0 !== _j ? _j : void 0,
32789
- strokeArrayColor: null !== (_l = null === (_k = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _k ? void 0 : _k.strokeArrayColor) && void 0 !== _l ? _l : void 0,
32790
- cursor: null !== (_o = null === (_m = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _m ? void 0 : _m.cursor) && void 0 !== _o ? _o : void 0,
32791
- cornerRadius: null !== (_q = null === (_p = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _p ? void 0 : _p.cornerRadius) && void 0 !== _q ? _q : 0,
32792
- lineDash: null !== (_s = null === (_r = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _r ? void 0 : _r.lineDash) && void 0 !== _s ? _s : void 0,
32791
+ strokeArrayWidth: null != strokeArrayWidth ? strokeArrayWidth : void 0,
32792
+ strokeArrayColor: null !== (_j = null === (_h = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _h ? void 0 : _h.strokeArrayColor) && void 0 !== _j ? _j : void 0,
32793
+ cursor: null !== (_l = null === (_k = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _k ? void 0 : _k.cursor) && void 0 !== _l ? _l : void 0,
32794
+ cornerRadius: null !== (_o = null === (_m = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _m ? void 0 : _m.cornerRadius) && void 0 !== _o ? _o : 0,
32795
+ lineDash: null !== (_q = null === (_p = null == cellTheme ? void 0 : cellTheme.group) || void 0 === _p ? void 0 : _p.lineDash) && void 0 !== _q ? _q : void 0,
32793
32796
  y: table.scenegraph.getCellGroupY(row)
32794
32797
  }), oldCellGroup.forEachChildren(child => {
32795
32798
  child.setAttributes({
@@ -32806,7 +32809,7 @@
32806
32809
  } = breakString(text, table),
32807
32810
  hierarchyOffset = getHierarchyOffset(col, row, table),
32808
32811
  lineClamp = cellStyle.lineClamp,
32809
- padding = null !== (_t = getQuadProps(getProp("padding", cellStyle, col, row, table))) && void 0 !== _t ? _t : [0, 0, 0, 0],
32812
+ padding = null !== (_r = getQuadProps(getProp("padding", cellStyle, col, row, table))) && void 0 !== _r ? _r : [0, 0, 0, 0],
32810
32813
  textAlign = cellTheme.text.textAlign;
32811
32814
  let x = 0;
32812
32815
  x = "center" === textAlign ? padding[3] + (cellWidth - (padding[1] + padding[3])) / 2 : "right" === textAlign ? padding[3] + cellWidth - (padding[1] + padding[3]) : padding[3];
@@ -32835,7 +32838,7 @@
32835
32838
  return oldCellGroup;
32836
32839
  }
32837
32840
  if (!addNew && "empty" === oldCellGroup.role) return;
32838
- const type = isVtableMerge || isCustomMerge ? "text" : table.isHeader(col, row) ? null !== (_u = table._getHeaderLayoutMap(col, row).headerType) && void 0 !== _u ? _u : "text" : null !== (_v = table.getBodyColumnType(col, row)) && void 0 !== _v ? _v : "text",
32841
+ const type = isVtableMerge || isCustomMerge ? "text" : table.isHeader(col, row) ? null !== (_s = table._getHeaderLayoutMap(col, row).headerType) && void 0 !== _s ? _s : "text" : null !== (_t = table.getBodyColumnType(col, row)) && void 0 !== _t ? _t : "text",
32839
32842
  padding = cellTheme._vtable.padding,
32840
32843
  textAlign = cellTheme.text.textAlign,
32841
32844
  textBaseline = cellTheme.text.textBaseline;
@@ -33249,8 +33252,9 @@
33249
33252
  const layoutMap = table.internalProps.layoutMap;
33250
33253
  table.isPivotTable() && (layoutMap.enableUseGetBodyCache(), layoutMap.enableUseHeaderPathCache()), table.defaultHeaderRowHeight, table.defaultHeaderColWidth;
33251
33254
  const isDefaultHeaderHasAuto = "auto" === table.defaultHeaderRowHeight || isArray$1(table.defaultHeaderRowHeight) && table.defaultHeaderRowHeight.some(item => "auto" === item),
33252
- isAllRowsAuto = "autoHeight" === table.heightMode || "adaptive" === table.heightMode && !1 !== table.options.autoHeightInAdaptiveMode;
33253
- if (isAllRowsAuto || isDefaultHeaderHasAuto) {
33255
+ isAllRowsAuto = "autoHeight" === table.heightMode || "adaptive" === table.heightMode && !1 !== table.options.autoHeightInAdaptiveMode,
33256
+ isDefaultRowHeightIsAuto = "auto" === table.options.defaultRowHeight;
33257
+ if (isAllRowsAuto || isDefaultHeaderHasAuto || isDefaultRowHeightIsAuto) {
33254
33258
  rowStart = null != rowStart ? rowStart : 0, rowEnd = null != rowEnd ? rowEnd : table.rowCount - 1, (0 === rowStart && rowEnd === table.rowCount - 1 || isClearRowRangeHeightsMap) && table._clearRowRangeHeightsMap();
33255
33259
  for (let row = rowStart; row < table.columnHeaderLevelCount; row++) {
33256
33260
  let startCol = 0,
@@ -33264,7 +33268,7 @@
33264
33268
  const height = computeRowHeight(row, 0, table.colCount - 1, table);
33265
33269
  update ? newHeights[row] = Math.round(height) : table._setRowHeight(row, height);
33266
33270
  }
33267
- if (rowEnd < table.columnHeaderLevelCount || !isAllRowsAuto) ;else if (table.internalProps.transpose || table.isPivotTable() && !table.internalProps.layoutMap.indicatorsAsCol || !checkFixedStyleAndNoWrap(table)) {
33271
+ if (rowEnd < table.columnHeaderLevelCount || !isAllRowsAuto && !isDefaultRowHeightIsAuto) ;else if (table.internalProps.transpose || table.isPivotTable() && !table.internalProps.layoutMap.indicatorsAsCol || table.options.customComputeRowHeight || !checkFixedStyleAndNoWrap(table)) {
33268
33272
  if (table.internalProps.transpose || table.isPivotTable() && !table.internalProps.layoutMap.indicatorsAsCol) for (let row = Math.max(rowStart, table.columnHeaderLevelCount); row <= rowEnd; row++) {
33269
33273
  let height;
33270
33274
  height = checkFixedStyleAndNoWrapForTranspose(table, row) ? computeRowHeight(row, 0, table.rowHeaderLevelCount, table) : computeRowHeight(row, 0, table.colCount - 1, table), update ? newHeights[row] = Math.round(height) : table._setRowHeight(row, height);
@@ -33340,7 +33344,12 @@
33340
33344
  }
33341
33345
  function computeRowHeight(row, startCol, endCol, table) {
33342
33346
  var _a;
33347
+ if (!("autoHeight" === table.heightMode || "adaptive" === table.heightMode && !1 !== table.options.autoHeightInAdaptiveMode) && "auto" !== table.getDefaultRowHeight(row)) return table.getDefaultRowHeight(row);
33343
33348
  let maxHeight;
33349
+ if (table.options.customComputeRowHeight) return table.options.customComputeRowHeight({
33350
+ row: row,
33351
+ table: table
33352
+ });
33344
33353
  if (table.isPivotChart() && row >= table.columnHeaderLevelCount && row < table.rowCount - table.bottomFrozenRowCount) if (table.internalProps.layoutMap.indicatorsAsCol) {
33345
33354
  const optimunHeight = table.internalProps.layoutMap.getOptimunHeightForChart(row);
33346
33355
  if (optimunHeight > 0) return optimunHeight;
@@ -36636,11 +36645,11 @@
36636
36645
  function createColGroup(containerGroup, xOrigin, yOrigin, colStart, colEnd, rowStart, rowEnd, cellLocation, table, rowLimit) {
36637
36646
  if (colStart > colEnd || rowStart > rowEnd) return;
36638
36647
  const {
36639
- layoutMap: layoutMap,
36640
- defaultRowHeight: defaultRowHeight,
36641
- defaultHeaderRowHeight: defaultHeaderRowHeight,
36642
- defaultColWidth: defaultColWidth
36643
- } = table.internalProps;
36648
+ layoutMap: layoutMap,
36649
+ defaultHeaderRowHeight: defaultHeaderRowHeight,
36650
+ defaultColWidth: defaultColWidth
36651
+ } = table.internalProps,
36652
+ defaultRowHeight = table.defaultRowHeight;
36644
36653
  let x = 0,
36645
36654
  heightMax = 0;
36646
36655
  for (let i = colStart; i <= colEnd; i++) {
@@ -37456,7 +37465,7 @@
37456
37465
  const colGroup = this.table.scenegraph.getColGroup(col),
37457
37466
  {
37458
37467
  height: height
37459
- } = (this.table.isListTable(), createComplexColumn(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table));
37468
+ } = (this.table.isListTable(), createComplexColumn(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.defaultRowHeight, this.table));
37460
37469
  maxHeight = Math.max(maxHeight, height), this.table.scenegraph.rowHeaderGroup.setAttribute("height", maxHeight);
37461
37470
  }
37462
37471
  }
@@ -37466,7 +37475,7 @@
37466
37475
  const colGroup = this.table.scenegraph.getColGroup(col),
37467
37476
  {
37468
37477
  height: height
37469
- } = (this.table.isPivotChart(), createComplexColumn(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table));
37478
+ } = (this.table.isPivotChart(), createComplexColumn(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.defaultRowHeight, this.table));
37470
37479
  maxHeight = Math.max(maxHeight, height), this.table.scenegraph.rightFrozenGroup.setAttribute("height", maxHeight);
37471
37480
  }
37472
37481
  }
@@ -37477,7 +37486,7 @@
37477
37486
  this.table.rowHeaderLevelCount;
37478
37487
  const {
37479
37488
  height: height
37480
- } = createComplexColumn(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.internalProps.defaultRowHeight, this.table);
37489
+ } = createComplexColumn(colGroup, col, colGroup.attribute.width, this.currentRow + 1, endRow, this.table.scenegraph.mergeMap, this.table.defaultRowHeight, this.table);
37481
37490
  maxHeight = Math.max(maxHeight, height);
37482
37491
  }
37483
37492
  this.table.scenegraph.bodyGroup.setAttribute("height", maxHeight), this.currentRow = endRow, this.rowUpdatePos = this.rowEnd, this.table.scenegraph.updateContainer(), this.table.scenegraph.updateBorderSizeAndPosition();
@@ -39866,7 +39875,8 @@
39866
39875
  this.component.drillIcon.update(visible, x, y, drillDown, drillUp, this);
39867
39876
  }
39868
39877
  updateCellContent(col, row) {
39869
- if (!this.clear) return updateCell$1(col, row, this.table);
39878
+ let forceFastUpdate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
39879
+ if (!this.clear) return updateCell$1(col, row, this.table, void 0, void 0, forceFastUpdate);
39870
39880
  }
39871
39881
  setPixelRatio(pixelRatio) {
39872
39882
  this.stage.disableDirtyBounds(), this.stage.window.setDpr(pixelRatio), this.stage.render(), this.stage.enableDirtyBounds();
@@ -44397,7 +44407,7 @@
44397
44407
  if (this._sorted || (keys.sort((a, b) => a < b ? -1 : a > b ? 1 : 0), this._sorted = !0), sourceIndex > targetIndex) {
44398
44408
  const targetVals = [],
44399
44409
  sourceVals = [];
44400
- for (let i = indexFirst(keys, targetIndex); i < sourceIndex + sourceCount; i++) {
44410
+ for (let i = indexFirst(keys, targetIndex); i < indexFirst(keys, sourceIndex) + sourceCount; i++) {
44401
44411
  const key = keys[i];
44402
44412
  key >= sourceIndex && key < sourceIndex + sourceCount ? sourceVals.push(this.get(key)) : targetVals.push(this.get(key));
44403
44413
  }
@@ -44406,7 +44416,7 @@
44406
44416
  } else {
44407
44417
  const targetVals = [],
44408
44418
  sourceVals = [];
44409
- for (let i = indexFirst(keys, sourceIndex); i < targetIndex + targetCount; i++) {
44419
+ for (let i = indexFirst(keys, sourceIndex); i < indexFirst(keys, targetIndex) + targetCount; i++) {
44410
44420
  const key = keys[i];
44411
44421
  key >= sourceIndex && key < sourceIndex + sourceCount ? sourceVals.push(this.get(key)) : targetVals.push(this.get(key));
44412
44422
  }
@@ -44783,7 +44793,7 @@
44783
44793
  return getTargetRowAt(absoluteY, _this);
44784
44794
  }
44785
44795
  function computeTargetRowByY(absoluteY, _this) {
44786
- let defaultRowHeight = _this.internalProps.defaultRowHeight;
44796
+ let defaultRowHeight = _this.defaultRowHeight;
44787
44797
  return _this._rowRangeHeightsMap.get("$0$" + (_this.rowCount - 1)) && (defaultRowHeight = _this._rowRangeHeightsMap.get("$0$" + (_this.rowCount - 1)) / _this.rowCount), Math.min(Math.ceil(absoluteY / defaultRowHeight), _this.rowCount - 1);
44788
44798
  }
44789
44799
  function computeTargetColByX(absoluteX, _this) {
@@ -45398,25 +45408,34 @@
45398
45408
  }), this.table.scenegraph.updateNextFrame();
45399
45409
  }
45400
45410
  arrangeCustomCellStyle(cellPos, customStyleId) {
45411
+ var _a;
45401
45412
  const index = this.customCellStyleArrangement.findIndex(style => style.cellPosition.range && cellPos.range ? style.cellPosition.range.start.col === cellPos.range.start.col && style.cellPosition.range.start.row === cellPos.range.start.row && style.cellPosition.range.end.col === cellPos.range.end.col && style.cellPosition.range.end.row === cellPos.range.end.row : style.cellPosition.col === cellPos.col && style.cellPosition.row === cellPos.row);
45402
- if (-1 !== index || customStyleId) {
45403
- if (-1 === index && customStyleId) this.customCellStyleArrangement.push({
45404
- cellPosition: {
45405
- col: cellPos.col,
45406
- row: cellPos.row,
45407
- range: cellPos.range
45408
- },
45409
- customStyleId: customStyleId
45410
- });else {
45411
- if (this.customCellStyleArrangement[index].customStyleId === customStyleId) return;
45412
- customStyleId ? this.customCellStyleArrangement[index].customStyleId = customStyleId : this.customCellStyleArrangement.splice(index, 1);
45413
+ if (-1 === index && !customStyleId) return;
45414
+ if (-1 === index && customStyleId) this.customCellStyleArrangement.push({
45415
+ cellPosition: {
45416
+ col: cellPos.col,
45417
+ row: cellPos.row,
45418
+ range: cellPos.range
45419
+ },
45420
+ customStyleId: customStyleId
45421
+ });else {
45422
+ if (this.customCellStyleArrangement[index].customStyleId === customStyleId) return;
45423
+ customStyleId ? this.customCellStyleArrangement[index].customStyleId = customStyleId : this.customCellStyleArrangement.splice(index, 1);
45424
+ }
45425
+ const style = null === (_a = this.getCustomCellStyleOption(customStyleId)) || void 0 === _a ? void 0 : _a.style;
45426
+ let forceFastUpdate;
45427
+ if (style) {
45428
+ forceFastUpdate = !0;
45429
+ for (const key in style) if (-1 === cellStyleKeys.indexOf(key)) {
45430
+ forceFastUpdate = !1;
45431
+ break;
45413
45432
  }
45414
- if (cellPos.range) for (let col = Math.max(0, cellPos.range.start.col); col <= Math.min(this.table.colCount - 1, cellPos.range.end.col); col++) for (let row = Math.max(0, cellPos.range.start.row); row <= Math.min(this.table.rowCount - 1, cellPos.range.end.row); row++) {
45415
- const range = this.table.getCellRange(col, row);
45416
- for (let c = range.start.col; c <= range.end.col; c++) for (let r = range.start.row; r <= range.end.row; r++) this.table.scenegraph.updateCellContent(c, r);
45417
- } else this.table.scenegraph.updateCellContent(cellPos.col, cellPos.row);
45418
- this.table.scenegraph.updateNextFrame();
45419
45433
  }
45434
+ if (cellPos.range) for (let col = Math.max(0, cellPos.range.start.col); col <= Math.min(this.table.colCount - 1, cellPos.range.end.col); col++) for (let row = Math.max(0, cellPos.range.start.row); row <= Math.min(this.table.rowCount - 1, cellPos.range.end.row); row++) {
45435
+ const range = this.table.getCellRange(col, row);
45436
+ for (let c = range.start.col; c <= range.end.col; c++) for (let r = range.start.row; r <= range.end.row; r++) this.table.scenegraph.updateCellContent(c, r, forceFastUpdate);
45437
+ } else this.table.scenegraph.updateCellContent(cellPos.col, cellPos.row, forceFastUpdate);
45438
+ this.table.scenegraph.updateNextFrame();
45420
45439
  }
45421
45440
  updateCustomCell(customCellStyle, customCellStyleArrangement) {
45422
45441
  this.customCellStyle.length = 0, this.customCellStyleArrangement.length = 0, customCellStyle.forEach(cellStyle => {
@@ -45576,7 +45595,7 @@
45576
45595
  constructor(container) {
45577
45596
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
45578
45597
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
45579
- if (super(), this.showFrozenIcon = !0, this.version = "1.11.6-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");
45598
+ if (super(), this.showFrozenIcon = !0, this.version = "1.12.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");
45580
45599
  const {
45581
45600
  frozenColCount = 0,
45582
45601
  frozenRowCount: frozenRowCount,
@@ -45733,7 +45752,7 @@
45733
45752
  this.scenegraph.dealWidthBottomFrozen(bottomFrozenRowCount);
45734
45753
  }
45735
45754
  get defaultRowHeight() {
45736
- return this.internalProps.defaultRowHeight;
45755
+ return isNumber$2(this.internalProps.defaultRowHeight) ? this.internalProps.defaultRowHeight : 40;
45737
45756
  }
45738
45757
  set defaultRowHeight(defaultRowHeight) {
45739
45758
  this.internalProps.defaultRowHeight = defaultRowHeight, this.options.defaultRowHeight = defaultRowHeight;
@@ -45961,7 +45980,8 @@
45961
45980
  if (startRow > endRow || 0 === this.rowCount) return 0;
45962
45981
  startRow = Math.max(startRow, 0), endRow = Math.min(endRow, (null !== (_a = this.rowCount) && void 0 !== _a ? _a : 1 / 0) - 1);
45963
45982
  let h = 0;
45964
- if ("standard" !== this.heightMode || this.autoFillHeight || !this.internalProps.layoutMap || this.hasAutoImageColumn() || 0 !== this.internalProps._heightResizedRowMap.size) {
45983
+ const isDefaultRowHeightIsAuto = "auto" === this.options.defaultRowHeight;
45984
+ if ("standard" !== this.heightMode || this.autoFillHeight || !this.internalProps.layoutMap || this.hasAutoImageColumn() || isDefaultRowHeightIsAuto || 0 !== this.internalProps._heightResizedRowMap.size) {
45965
45985
  if (null === (_b = this.options.customConfig) || void 0 === _b ? void 0 : _b._disableColumnAndRowSizeRound) {
45966
45986
  const tempH = this.rowHeightsMap.getSumInRange(startRow, endRow);
45967
45987
  let heightRange;
@@ -48811,7 +48831,7 @@
48811
48831
  height: rect.height
48812
48832
  }
48813
48833
  };
48814
- editor.beginEditing, null === (_c = editor.beginEditing) || void 0 === _c || _c.call(editor, this.table.getElement(), referencePosition, dataValue), editor.bindSuccessCallback, null === (_d = editor.bindSuccessCallback) || void 0 === _d || _d.call(editor, () => {
48834
+ col === this.table.colCount - 1 && (referencePosition.rect.width = rect.width - 1), row === this.table.rowCount - 1 && (referencePosition.rect.height = rect.height - 1), editor.beginEditing, null === (_c = editor.beginEditing) || void 0 === _c || _c.call(editor, this.table.getElement(), referencePosition, dataValue), editor.bindSuccessCallback, null === (_d = editor.bindSuccessCallback) || void 0 === _d || _d.call(editor, () => {
48815
48835
  this.completeEdit();
48816
48836
  }), null === (_e = editor.onStart) || void 0 === _e || _e.call(editor, {
48817
48837
  value: dataValue,
@@ -49669,7 +49689,7 @@
49669
49689
  }
49670
49690
  _refreshHierarchyState(col, row) {
49671
49691
  let recalculateColWidths = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
49672
- var _a;
49692
+ var _a, _b, _c;
49673
49693
  let notFillWidth = !1,
49674
49694
  notFillHeight = !1;
49675
49695
  const checkHasChart = this.internalProps.layoutMap.checkHasChart();
@@ -49694,7 +49714,7 @@
49694
49714
  });
49695
49715
  diffPositions.removeCellPositions = [], this.scenegraph.proxy.refreshRowCount();
49696
49716
  }
49697
- this.scenegraph.updateRow(diffPositions.removeCellPositions, diffPositions.addCellPositions, updateCells, recalculateColWidths), checkHasChart && (this.autoFillWidth && !notFillWidth && (notFillWidth = this.getAllColsWidth() <= this.tableNoFrameWidth), this.autoFillHeight && !notFillHeight && (notFillHeight = this.getAllRowsHeight() <= this.tableNoFrameHeight), ("adaptive" === this.widthMode || notFillWidth || "adaptive" === this.heightMode || notFillHeight) && this.scenegraph.updateChartSizeForResizeColWidth(-1));
49717
+ null === (_b = this.reactCustomLayout) || void 0 === _b || _b.clearCache(), this.scenegraph.updateRow(diffPositions.removeCellPositions, diffPositions.addCellPositions, updateCells, recalculateColWidths), null === (_c = this.reactCustomLayout) || void 0 === _c || _c.updateAllCustomCell(), checkHasChart && (this.autoFillWidth && !notFillWidth && (notFillWidth = this.getAllColsWidth() <= this.tableNoFrameWidth), this.autoFillHeight && !notFillHeight && (notFillHeight = this.getAllRowsHeight() <= this.tableNoFrameHeight), ("adaptive" === this.widthMode || notFillWidth || "adaptive" === this.heightMode || notFillHeight) && this.scenegraph.updateChartSizeForResizeColWidth(-1));
49698
49718
  }
49699
49719
  _hasHierarchyTreeHeader() {
49700
49720
  var _a, _b;
@@ -52165,7 +52185,7 @@
52165
52185
  return checkbox.name = "checkbox", checkbox;
52166
52186
  }
52167
52187
 
52168
- function createRadioCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, table, cellTheme, define) {
52188
+ function createRadioCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, table, cellTheme, define, range) {
52169
52189
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
52170
52190
  if (!cellGroup) {
52171
52191
  const strokeArrayWidth = getCellBorderStrokeWidth(col, row, cellTheme, table);
@@ -52189,13 +52209,13 @@
52189
52209
  const {
52190
52210
  width: radioWidth,
52191
52211
  height: radioHeight
52192
- } = createRadio(col, row, colWidth, width, height, padding, cellTheme, define, cellGroup, table);
52212
+ } = createRadio(col, row, colWidth, width, height, padding, cellTheme, define, cellGroup, range, table);
52193
52213
  return width -= padding[1] + padding[3], height -= padding[0] + padding[2], cellGroup.forEachChildren(radioComponent => {
52194
52214
  "center" === textAlign ? radioComponent.setAttribute("x", padding[3] + radioComponent.attribute.x + (width - radioWidth) / 2) : "right" === textAlign ? radioComponent.setAttribute("x", padding[3] + radioComponent.attribute.x + width - radioWidth) : radioComponent.setAttribute("x", padding[3] + radioComponent.attribute.x), "middle" === textBaseline ? radioComponent.setAttribute("y", padding[0] + radioComponent.attribute.y + (height - radioHeight) / 2) : "bottom" === textBaseline ? radioComponent.setAttribute("y", padding[0] + radioComponent.attribute.y + height - radioHeight) : radioComponent.setAttribute("y", padding[0] + radioComponent.attribute.y);
52195
52215
  }), cellGroup;
52196
52216
  }
52197
- function createRadio(col, row, colWidth, cellWidth, cellHeight, padding, cellTheme, define, cellGroup, table) {
52198
- var _a, _b;
52217
+ function createRadio(col, row, colWidth, cellWidth, cellHeight, padding, cellTheme, define, cellGroup, range, table) {
52218
+ var _a, _b, _c, _d;
52199
52219
  const style = table._getCellStyle(col, row);
52200
52220
  let size = getProp("size", style, col, row, table),
52201
52221
  innerRadius = getProp("innerRadius", style, col, row, table),
@@ -52245,13 +52265,14 @@
52245
52265
  height = 0;
52246
52266
  const direction = null !== (_b = define.radioDirectionInCell) && void 0 !== _b ? _b : "vertical";
52247
52267
  if (isArray$1(value)) value.forEach((item, index) => {
52268
+ var _a, _b;
52248
52269
  const radioComponent = createSingleRadio(item, dataValue, index, col, row, define, autoWrapText, radioAttributes, table);
52249
- radioComponent && cellGroup.appendChild(radioComponent), radioComponent.id = `radio-${col}-${row}-${index}`, radioComponent.render();
52270
+ radioComponent && cellGroup.appendChild(radioComponent), radioComponent.id = `radio-${null !== (_a = null == range ? void 0 : range.start.col) && void 0 !== _a ? _a : col}-${null !== (_b = null == range ? void 0 : range.start.row) && void 0 !== _b ? _b : row}-${index}`, radioComponent.render();
52250
52271
  const bounds = radioComponent.AABBBounds;
52251
52272
  "vertical" === direction ? (radioComponent.setAttribute("y", height), height += bounds.height() + (index !== value.length - 1 ? spaceBetweenRadio : 0), width = Math.max(width, bounds.width())) : "horizontal" === direction && (radioComponent.setAttribute("x", width), width += bounds.width() + (index !== value.length - 1 ? spaceBetweenRadio : 0), height = Math.max(height, bounds.height()));
52252
52273
  });else {
52253
52274
  const radioComponent = createSingleRadio(value, dataValue, void 0, col, row, define, autoWrapText, radioAttributes, table);
52254
- radioComponent && cellGroup.appendChild(radioComponent), radioComponent.id = `radio-${col}-${row}`, radioComponent.render();
52275
+ radioComponent && cellGroup.appendChild(radioComponent), radioComponent.id = `radio-${null !== (_c = null == range ? void 0 : range.start.col) && void 0 !== _c ? _c : col}-${null !== (_d = null == range ? void 0 : range.start.row) && void 0 !== _d ? _d : row}`, radioComponent.render();
52255
52276
  const bounds = radioComponent.AABBBounds;
52256
52277
  width = bounds.width(), height = bounds.height();
52257
52278
  }