@visactor/vtable-calendar 1.19.6 → 1.19.8

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.
@@ -33380,6 +33380,7 @@
33380
33380
  MOUSEENTER_CELL: "mouseenter_cell",
33381
33381
  MOUSELEAVE_CELL: "mouseleave_cell",
33382
33382
  CONTEXTMENU_CELL: "contextmenu_cell",
33383
+ CONTEXTMENU_CANVAS: "contextmenu_canvas",
33383
33384
  RESIZE_COLUMN: "resize_column",
33384
33385
  RESIZE_COLUMN_END: "resize_column_end",
33385
33386
  RESIZE_ROW: "resize_row",
@@ -34692,6 +34693,10 @@
34692
34693
  get verticalPadding() {
34693
34694
  var _a;
34694
34695
  return null !== (_a = scroll.verticalPadding) && void 0 !== _a ? _a : 0;
34696
+ },
34697
+ get ignoreFrozenCols() {
34698
+ var _a;
34699
+ return null !== (_a = scroll.ignoreFrozenCols) && void 0 !== _a && _a;
34695
34700
  }
34696
34701
  };
34697
34702
  }
@@ -37384,7 +37389,7 @@
37384
37389
  for (let i = 0; i < oldSource.length; i++) {
37385
37390
  const oldRecord = oldSource[i],
37386
37391
  newRecord = newSource[newGroupMap.get(oldRecord.vtableMergeName)];
37387
- isValid$3(newRecord) && (newRecord.hierarchyState = oldSource[i].hierarchyState), isArray$7(oldRecord.children) && isArray$7(newRecord.children) && 0 !== oldRecord.map.size && 0 !== newRecord.map.size && syncGroupCollapseState(oldRecord.children, newRecord.children, oldRecord.map, newRecord.map);
37392
+ isValid$3(newRecord) && (newRecord.hierarchyState = oldSource[i].hierarchyState), isArray$7(null == oldRecord ? void 0 : oldRecord.children) && isArray$7(null == newRecord ? void 0 : newRecord.children) && 0 !== oldRecord.map.size && 0 !== newRecord.map.size && syncGroupCollapseState(oldRecord.children, newRecord.children, oldRecord.map, newRecord.map);
37388
37393
  }
37389
37394
  }
37390
37395
 
@@ -41640,7 +41645,7 @@
41640
41645
  }), this.vScrollBar.render(), this.vScrollBar.hideAll();
41641
41646
  }
41642
41647
  updateScrollBar() {
41643
- var _a, _b, _c, _d, _e, _f, _g;
41648
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
41644
41649
  const oldHorizontalBarPos = this.table.stateManager.scroll.horizontalBarPos,
41645
41650
  oldVerticalBarPos = this.table.stateManager.scroll.verticalBarPos,
41646
41651
  theme = this.table.theme,
@@ -41648,24 +41653,27 @@
41648
41653
  visible1 = null === (_b = theme.scrollStyle) || void 0 === _b ? void 0 : _b.visible,
41649
41654
  horizontalVisible = null !== (_d = null === (_c = theme.scrollStyle) || void 0 === _c ? void 0 : _c.horizontalVisible) && void 0 !== _d ? _d : visible1,
41650
41655
  verticalVisible = null !== (_f = null === (_e = theme.scrollStyle) || void 0 === _e ? void 0 : _e.verticalVisible) && void 0 !== _f ? _f : visible1,
41651
- tableWidth = Math.ceil(this.table.scenegraph.tableGroup.attribute.width),
41652
- tableHeight = Math.ceil(this.table.scenegraph.tableGroup.attribute.height),
41656
+ tableWidth = Math.ceil(this.table.tableNoFrameWidth),
41657
+ tableHeight = Math.ceil(this.table.tableNoFrameHeight),
41653
41658
  totalHeight = this.table.getAllRowsHeight(),
41654
41659
  totalWidth = this.table.getAllColsWidth(),
41655
41660
  frozenRowsHeight = this.table.getFrozenRowsHeight(),
41656
41661
  frozenColsWidth = this.table.getFrozenColsWidth(),
41657
41662
  bottomFrozenRowsHeight = this.table.getBottomFrozenRowsHeight(),
41658
41663
  rightFrozenColsWidth = this.table.getRightFrozenColsWidth(),
41664
+ hoverOn = this.table.theme.scrollStyle.hoverOn,
41659
41665
  sizeTolerance = (null === (_g = this.table.options.customConfig) || void 0 === _g ? void 0 : _g._disableColumnAndRowSizeRound) ? 1 : 0;
41660
41666
  if (totalWidth > tableWidth + sizeTolerance) {
41661
41667
  const y = Math.min(tableHeight, totalHeight),
41662
- rangeEnd = Math.max(.05, (tableWidth - frozenColsWidth) / (totalWidth - frozenColsWidth)),
41663
- hoverOn = this.table.theme.scrollStyle.hoverOn;
41668
+ rangeEnd = Math.max(.05, (tableWidth - frozenColsWidth) / (totalWidth - frozenColsWidth));
41664
41669
  let attrY = 0;
41665
- attrY = this.table.theme.scrollStyle.barToSide ? this.table.tableNoFrameHeight - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y) + this.table.tableY : y - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y), this.hScrollBar.setAttributes({
41666
- x: frozenColsWidth + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x),
41670
+ attrY = this.table.theme.scrollStyle.barToSide ? this.table.tableNoFrameHeight - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y) + this.table.tableY : y - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y);
41671
+ let hScrollBarx = frozenColsWidth + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x),
41672
+ hScrollBarWidth = tableWidth - frozenColsWidth - rightFrozenColsWidth;
41673
+ null !== (_j = null === (_h = this.table.theme.scrollStyle) || void 0 === _h ? void 0 : _h.ignoreFrozenCols) && void 0 !== _j && _j ? (hScrollBarx = hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x, hScrollBarWidth = tableWidth) : (hScrollBarx = frozenColsWidth + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x), hScrollBarWidth = tableWidth - frozenColsWidth - rightFrozenColsWidth), this.hScrollBar.setAttributes({
41674
+ x: hScrollBarx,
41667
41675
  y: attrY,
41668
- width: tableWidth - frozenColsWidth - rightFrozenColsWidth,
41676
+ width: hScrollBarWidth,
41669
41677
  range: [0, rangeEnd],
41670
41678
  visible: "always" === horizontalVisible
41671
41679
  });
@@ -41684,7 +41692,6 @@
41684
41692
  const x = Math.min(tableWidth, totalWidth),
41685
41693
  rangeEnd = Math.max(.05, (tableHeight - frozenRowsHeight) / (totalHeight - frozenRowsHeight));
41686
41694
  let attrX = 0;
41687
- const hoverOn = this.table.theme.scrollStyle.hoverOn;
41688
41695
  attrX = this.table.theme.scrollStyle.barToSide ? this.table.tableNoFrameWidth - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.x) + this.table.tableX : x - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.x), this.vScrollBar.setAttributes({
41689
41696
  x: attrX,
41690
41697
  y: frozenRowsHeight + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.y),
@@ -43682,7 +43689,7 @@
43682
43689
  textAlign,
43683
43690
  textBaseline,
43684
43691
  y = 0;
43685
- columnGroup.lastChild && columnGroup.lastChild.row === rowStart - 1 ? y = columnGroup.lastChild.attribute.y + columnGroup.lastChild.attribute.height : columnGroup.colHeight && (y = columnGroup.colHeight);
43692
+ columnGroup.lastChild && columnGroup.lastChild.row === rowStart - 1 ? y = columnGroup.lastChild.attribute.y + columnGroup.lastChild.attribute.height : columnGroup.colHeight ? y = columnGroup.colHeight : rowStart >= table.columnHeaderLevelCount && rowStart < table.rowCount - table.bottomFrozenRowCount && (y = table.getRowsHeight(table.columnHeaderLevelCount, rowStart - 1));
43686
43693
  for (let j = rowStart; j <= rowEnd; j++) {
43687
43694
  const row = j;
43688
43695
  let range,
@@ -46591,6 +46598,19 @@
46591
46598
  initSceneGraph() {
46592
46599
  this.isPivot = this.table.isPivotTable(), initSceneGraph(this);
46593
46600
  }
46601
+ canvasShowMenu() {
46602
+ this.stage.addEventListener("rightdown", e => {
46603
+ const eventArgsSet = getCellEventArgsSet(e);
46604
+ eventArgsSet.eventArgs || (this.table.stateManager.triggerContextMenu(-1, -1, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y), this.table.fireListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CANVAS, {
46605
+ event: e,
46606
+ x: eventArgsSet.abstractPos.x,
46607
+ y: eventArgsSet.abstractPos.y,
46608
+ col: -1,
46609
+ row: -1,
46610
+ target: void 0
46611
+ }));
46612
+ });
46613
+ }
46594
46614
  clearCells() {
46595
46615
  var _a, _b;
46596
46616
  this.table.animationManager.clear(), (this.table.isPivotChart() || this.table._hasCustomRenderOrLayout()) && this.stage.pluginService.findPluginsByName("poptipForText").forEach(plugin => {
@@ -46984,7 +47004,8 @@
46984
47004
  0 === x && firstBodyCol && firstBodyCol.col === this.table.frozenColCount && firstBodyCol.attribute.x + x < 0 ? x = -firstBodyCol.attribute.x : lastBodyCol && this.table.tableNoFrameWidth < this.table.getAllColsWidth() && lastBodyCol.col === this.table.colCount - this.table.rightFrozenColCount - 1 && lastBodyCol.attribute.x + lastBodyCol.attribute.width + x < this.table.tableNoFrameWidth - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth() && (x = this.table.tableNoFrameWidth - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth() - lastBodyCol.attribute.x - lastBodyCol.attribute.width), this.table.getFrozenColsWidth() + x !== this.bodyGroup.attribute.x && (this.bodyGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.colHeaderGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.table.bottomFrozenRowCount > 0 && this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.updateNextFrame());
46985
47005
  }
46986
47006
  afterScenegraphCreated() {
46987
- this.isPivot || this.table.transpose ? this.table.options.frozenColCount ? this.component.setFrozenColumnShadow(this.table.frozenColCount - 1) : this.table.options.rightFrozenColCount ? this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount) : this.component.setFrozenColumnShadow(-1) : (this.component.setFrozenColumnShadow(this.table.frozenColCount - 1), this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount)), this.table.stateManager.checkFrozen(), this.updateContainer(), this.createFrameBorder(), this.updateBorderSizeAndPosition(), this.component.updateScrollBar(), handleTextStick(this.table), this.table.options.animationAppear && dealWithAnimationAppear(this.table), this.updateNextFrame();
47007
+ var _a;
47008
+ this.isPivot || this.table.transpose ? this.table.options.frozenColCount ? this.component.setFrozenColumnShadow(this.table.frozenColCount - 1) : this.table.options.rightFrozenColCount ? this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount) : this.component.setFrozenColumnShadow(-1) : (this.component.setFrozenColumnShadow(this.table.frozenColCount - 1), this.component.setRightFrozenColumnShadow(this.table.colCount - this.table.rightFrozenColCount)), this.table.stateManager.checkFrozen(), this.updateContainer(), this.createFrameBorder(), this.updateBorderSizeAndPosition(), this.component.updateScrollBar(), handleTextStick(this.table), this.table.options.animationAppear && dealWithAnimationAppear(this.table), !1 === (null === (_a = this.table.options.menu) || void 0 === _a ? void 0 : _a.contextMenuWorkOnlyCell) && this.canvasShowMenu(), this.updateNextFrame();
46988
47009
  }
46989
47010
  dealWidthMode() {
46990
47011
  const table = this.table;
@@ -48122,7 +48143,7 @@
48122
48143
  }
48123
48144
  rightColWidth - detaX < state.table.internalProps.limitMinWidth && (detaX = rightColWidth - state.table.internalProps.limitMinWidth);
48124
48145
  }
48125
- detaX = Math.ceil(detaX), state.columnResize.col < state.table.rowHeaderLevelCount || state.columnResize.col >= state.table.colCount - state.table.rightFrozenColCount ? updateResizeColForColumn(detaX, state) : "indicator" === state.table.internalProps.columnResizeType ? updateResizeColForIndicator$1(detaX, state) : "indicatorGroup" === state.table.internalProps.columnResizeType ? updateResizeColForIndicatorGroup$1(detaX, state) : "all" === state.table.internalProps.columnResizeType ? updateResizeColForAll$1(detaX, state) : updateResizeColForColumn(detaX, state), state.columnResize.x = xInTable, state.table.scenegraph.component.updateResizeCol(state.columnResize.col, yInTable, state.columnResize.isRightFrozen), state.columnResize.col < state.table.frozenColCount && !state.table.isPivotTable() && !state.table.transpose ? state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1, state.columnResize.isRightFrozen) : state.table.options.frozenColCount && state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1), (state.columnResize.col >= state.table.colCount - state.table.rightFrozenColCount && !state.table.isPivotTable() && !state.table.transpose || state.table.options.rightFrozenColCount) && state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount), state.table.scenegraph.updateNextFrame();
48146
+ detaX = Math.ceil(detaX), state.columnResize.col < state.table.rowHeaderLevelCount || state.columnResize.col >= state.table.colCount - state.table.rightFrozenColCount ? updateResizeColForColumn(detaX, state) : "indicator" === state.table.internalProps.columnResizeType ? updateResizeColForIndicator$1(detaX, state) : "indicatorGroup" === state.table.internalProps.columnResizeType ? updateResizeColForIndicatorGroup$1(detaX, state) : "all" === state.table.internalProps.columnResizeType ? updateResizeColForAll$1(detaX, state) : updateResizeColForColumn(detaX, state), state.columnResize.x = xInTable, state.table.scenegraph.component.updateResizeCol(state.columnResize.col, yInTable, state.columnResize.isRightFrozen), state.table._updateSize(), state.columnResize.col < state.table.frozenColCount && !state.table.isPivotTable() && !state.table.transpose ? state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1, state.columnResize.isRightFrozen) : state.table.options.frozenColCount && state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1), (state.columnResize.col >= state.table.colCount - state.table.rightFrozenColCount && !state.table.isPivotTable() && !state.table.transpose || state.table.options.rightFrozenColCount) && state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount), state.table.scenegraph.updateNextFrame();
48126
48147
  }
48127
48148
  function updateResizeColForColumn(detaX, state) {
48128
48149
  "adaptive" === state.table.widthMode && state.columnResize.col < state.table.colCount - 1 ? (state.table.scenegraph.updateColWidth(state.columnResize.col, detaX), state.table.scenegraph.updateColWidth(state.columnResize.col + 1, -detaX), state.table.internalProps._widthResizedColMap.add(state.columnResize.col), state.table.internalProps._widthResizedColMap.add(state.columnResize.col + 1)) : (state.table.scenegraph.updateColWidth(state.columnResize.col, detaX), state.table.internalProps._widthResizedColMap.add(state.columnResize.col));
@@ -48445,7 +48466,7 @@
48445
48466
  let bottomRowHeight = state.table.getRowHeight(state.rowResize.row + 1);
48446
48467
  bottomRowHeight -= detaY, bottomRowHeight - detaY < state.table.internalProps.limitMinHeight && (detaY = bottomRowHeight - state.table.internalProps.limitMinHeight);
48447
48468
  }
48448
- detaY = Math.ceil(detaY), state.rowResize.row < state.table.columnHeaderLevelCount || state.rowResize.row >= state.table.rowCount - state.table.bottomFrozenRowCount ? updateResizeColForRow(detaY, state) : "indicator" === state.table.internalProps.rowResizeType ? updateResizeColForIndicator(detaY, state) : "indicatorGroup" === state.table.internalProps.rowResizeType ? updateResizeColForIndicatorGroup(detaY, state) : "all" === state.table.internalProps.rowResizeType ? updateResizeColForAll(detaY, state) : updateResizeColForRow(detaY, state), state.rowResize.y = yInTable, state.table.scenegraph.component.updateResizeRow(state.rowResize.row, xInTable, state.rowResize.isBottomFrozen), state.table.scenegraph.updateNextFrame();
48469
+ detaY = Math.ceil(detaY), state.rowResize.row < state.table.columnHeaderLevelCount || state.rowResize.row >= state.table.rowCount - state.table.bottomFrozenRowCount ? updateResizeColForRow(detaY, state) : "indicator" === state.table.internalProps.rowResizeType ? updateResizeColForIndicator(detaY, state) : "indicatorGroup" === state.table.internalProps.rowResizeType ? updateResizeColForIndicatorGroup(detaY, state) : "all" === state.table.internalProps.rowResizeType ? updateResizeColForAll(detaY, state) : updateResizeColForRow(detaY, state), state.rowResize.y = yInTable, state.table.scenegraph.component.updateResizeRow(state.rowResize.row, xInTable, state.rowResize.isBottomFrozen), state.table._updateSize(), state.table.scenegraph.updateNextFrame();
48449
48470
  }
48450
48471
  function updateResizeColForRow(detaY, state) {
48451
48472
  "adaptive" === state.table.heightMode && state.rowResize.row < state.table.rowCount - 1 ? (state.table.scenegraph.updateRowHeight(state.rowResize.row, detaY), state.table.scenegraph.updateRowHeight(state.rowResize.row + 1, -detaY), state.table.internalProps._heightResizedRowMap.add(state.rowResize.row), state.table.internalProps._heightResizedRowMap.add(state.rowResize.row + 1)) : (state.table.scenegraph.updateRowHeight(state.rowResize.row, detaY), state.table.internalProps._heightResizedRowMap.add(state.rowResize.row));
@@ -49806,25 +49827,40 @@
49806
49827
  col: col,
49807
49828
  row: row
49808
49829
  } = eventArgsSet.eventArgs;
49809
- if (table.hasListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CELL)) {
49810
- const cellInfo = table.getCellInfo(col, row);
49811
- let icon, position;
49812
- if (null === (_a = eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target) {
49813
- const iconInfo = getIconAndPositionFromTarget(null === (_b = eventArgsSet.eventArgs) || void 0 === _b ? void 0 : _b.target);
49814
- iconInfo && (icon = iconInfo.icon, position = iconInfo.position);
49830
+ if (col >= 0 && row >= 0) {
49831
+ const ranges = table.getSelectedCellRanges();
49832
+ let cellInRange = !1;
49833
+ if (ranges.length > 0) for (let i = 0; i < ranges.length; i++) {
49834
+ const range = ranges[i],
49835
+ startCol = range.start.col,
49836
+ endCol = range.end.col,
49837
+ startRow = range.start.row,
49838
+ endRow = range.end.row;
49839
+ if (col >= startCol && col <= endCol && row >= startRow && row <= endRow || col >= endCol && col <= startCol && row >= endRow && row <= startRow || col >= startCol && col <= endCol && row >= endRow && row <= startRow || col >= endCol && col <= startCol && row >= startRow && row <= endRow) {
49840
+ cellInRange = !0;
49841
+ break;
49842
+ }
49843
+ }
49844
+ if (cellInRange || table.selectCell(col, row), table.hasListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CELL)) {
49845
+ const cellInfo = table.getCellInfo(col, row);
49846
+ let icon, position;
49847
+ if (null === (_a = eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target) {
49848
+ const iconInfo = getIconAndPositionFromTarget(null === (_b = eventArgsSet.eventArgs) || void 0 === _b ? void 0 : _b.target);
49849
+ iconInfo && (icon = iconInfo.icon, position = iconInfo.position);
49850
+ }
49851
+ const cellsEvent = Object.assign(Object.assign({}, cellInfo), {
49852
+ event: e.nativeEvent,
49853
+ cells: [],
49854
+ targetIcon: icon ? {
49855
+ name: icon.name,
49856
+ position: position,
49857
+ funcType: icon.attribute.funcType
49858
+ } : void 0,
49859
+ target: null === (_c = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _c ? void 0 : _c.target,
49860
+ mergeCellInfo: null === (_d = eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.mergeInfo
49861
+ });
49862
+ (null === (_f = null === (_e = table.options.eventOptions) || void 0 === _e ? void 0 : _e.contextmenuReturnAllSelectedCells) || void 0 === _f || _f) && (cellInRanges(table.stateManager.select.ranges, col, row) ? cellsEvent.cells = table.getSelectedCellInfos() : cellsEvent.cells = [[cellInfo]]), table.fireListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CELL, cellsEvent);
49815
49863
  }
49816
- const cellsEvent = Object.assign(Object.assign({}, cellInfo), {
49817
- event: e.nativeEvent,
49818
- cells: [],
49819
- targetIcon: icon ? {
49820
- name: icon.name,
49821
- position: position,
49822
- funcType: icon.attribute.funcType
49823
- } : void 0,
49824
- target: null === (_c = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _c ? void 0 : _c.target,
49825
- mergeCellInfo: null === (_d = eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.mergeInfo
49826
- });
49827
- (null === (_f = null === (_e = table.options.eventOptions) || void 0 === _e ? void 0 : _e.contextmenuReturnAllSelectedCells) || void 0 === _f || _f) && (cellInRanges(table.stateManager.select.ranges, col, row) ? cellsEvent.cells = table.getSelectedCellInfos() : cellsEvent.cells = [[cellInfo]]), table.fireListeners(TABLE_EVENT_TYPE.CONTEXTMENU_CELL, cellsEvent);
49828
49864
  }
49829
49865
  }
49830
49866
  }), table.scenegraph.tableGroup.addEventListener("pointertap", e => {
@@ -50898,29 +50934,6 @@
50898
50934
  });
50899
50935
  }
50900
50936
 
50901
- function rightButtonClickEvent(table) {
50902
- table.on(TABLE_EVENT_TYPE.CONTEXTMENU_CELL, e => {
50903
- const {
50904
- col: col,
50905
- row: row
50906
- } = e,
50907
- ranges = table.getSelectedCellRanges();
50908
- let cellInRange = !1;
50909
- if (ranges.length > 0) for (let i = 0; i < ranges.length; i++) {
50910
- const range = ranges[i],
50911
- startCol = range.start.col,
50912
- endCol = range.end.col,
50913
- startRow = range.start.row,
50914
- endRow = range.end.row;
50915
- if (col >= startCol && col <= endCol && row >= startRow && row <= endRow || col >= endCol && col <= startCol && row >= endRow && row <= startRow || col >= startCol && col <= endCol && row >= endRow && row <= startRow || col >= endCol && col <= startCol && row >= startRow && row <= endRow) {
50916
- cellInRange = !0;
50917
- break;
50918
- }
50919
- }
50920
- cellInRange || table.selectCell(col, row);
50921
- });
50922
- }
50923
-
50924
50937
  class EventManager {
50925
50938
  constructor(table) {
50926
50939
  this.isDown = !1, this.isDraging = !1, this.globalEventListeners = [], this._enableTableScroll = !0, this.table = table, this.handleTextStickBindId = [], this.inertiaScroll = new InertiaScroll(table.stateManager), "node" === Env.mode || table.options.disableInteraction || (this.bindOuterEvent(), setTimeout(() => {
@@ -50945,7 +50958,7 @@
50945
50958
  }, 0);
50946
50959
  }
50947
50960
  bindSelfEvent() {
50948
- this.table.isReleased || (bindIconClickEvent(this.table), bindDropdownMenuEvent(this.table), this.updateEventBinder(), bindMediaClick(this.table), bindDBClickAutoColumnWidthEvent(this.table), this.table.isPivotTable() && checkHaveDrill(this.table) && bindDrillEvent(this.table), bindSparklineHoverEvent(this.table), bindAxisClickEvent(this.table), bindAxisHoverEvent(this.table), bindGroupTitleCheckboxChange(this.table), bindGroupCheckboxTreeChange(this.table), bindHeaderCheckboxChange(this.table), bindButtonClickEvent(this.table), rightButtonClickEvent(this.table));
50961
+ this.table.isReleased || (bindIconClickEvent(this.table), bindDropdownMenuEvent(this.table), this.updateEventBinder(), bindMediaClick(this.table), bindDBClickAutoColumnWidthEvent(this.table), this.table.isPivotTable() && checkHaveDrill(this.table) && bindDrillEvent(this.table), bindSparklineHoverEvent(this.table), bindAxisClickEvent(this.table), bindAxisHoverEvent(this.table), bindGroupTitleCheckboxChange(this.table), bindGroupCheckboxTreeChange(this.table), bindHeaderCheckboxChange(this.table), bindButtonClickEvent(this.table));
50949
50962
  }
50950
50963
  dealTableHover(eventArgsSet) {
50951
50964
  if (!eventArgsSet) return void this.table.stateManager.updateHoverPos(-1, -1);
@@ -51573,6 +51586,7 @@
51573
51586
  left: left,
51574
51587
  right: right
51575
51588
  } = rect;
51589
+ if (-1 === col && -1 === row) return !0;
51576
51590
  if (table.isFrozenCell(col, row)) return !0;
51577
51591
  if (bottom < table.getFrozenRowsHeight() || right < table.getFrozenColsWidth() || left > table.tableNoFrameWidth - table.getRightFrozenColsWidth() || top > table.tableNoFrameHeight - table.getBottomFrozenRowsHeight()) return !1;
51578
51592
  const {
@@ -53768,7 +53782,7 @@
53768
53782
  }
53769
53783
  constructor(container, options = {}) {
53770
53784
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
53771
- if (super(), this.showFrozenIcon = !0, this.version = "1.19.6", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
53785
+ if (super(), this.showFrozenIcon = !0, this.version = "1.19.8", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
53772
53786
  this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
53773
53787
  options: options,
53774
53788
  container: container
@@ -54171,15 +54185,51 @@
54171
54185
  } = this.internalProps;
54172
54186
  widthP = (null !== (_c = null === (_b = canvas.parentElement) || void 0 === _b ? void 0 : _b.offsetWidth) && void 0 !== _c ? _c : 1) - (this.options.tableSizeAntiJitter ? 1 : 0), heightP = (null !== (_e = null === (_d = canvas.parentElement) || void 0 === _d ? void 0 : _d.offsetHeight) && void 0 !== _e ? _e : 1) - (this.options.tableSizeAntiJitter ? 1 : 0), (null === (_f = null == this ? void 0 : this.scenegraph) || void 0 === _f ? void 0 : _f.stage) ? (null === (_g = this.options) || void 0 === _g ? void 0 : _g.viewBox) && !(null === (_h = this.options) || void 0 === _h ? void 0 : _h.canvas) && this.scenegraph.stage.resize(widthP, heightP) : (canvas.style.width = "", canvas.style.height = "", canvas.width = widthP, canvas.height = heightP, canvas.style.width = `${widthP}px`, canvas.style.height = `${heightP}px`), (null === (_j = this.options) || void 0 === _j ? void 0 : _j.viewBox) && (widthP = this.options.viewBox.x2 - this.options.viewBox.x1, heightP = this.options.viewBox.y2 - this.options.viewBox.y1), (null === (_k = null == this ? void 0 : this.scenegraph) || void 0 === _k ? void 0 : _k.stage) && (this.options.viewBox ? this.scenegraph.stage.setViewBox(this.options.viewBox, !1) : this.scenegraph.stage.resize(widthP, heightP));
54173
54187
  } else "node" === Env.mode && (widthP = this.canvasWidth - 1, heightP = this.canvasHeight - 1);
54174
- const width = Math.floor(widthP - getVerticalScrollBarSize(this.getTheme().scrollStyle)),
54175
- height = Math.floor(heightP - getHorizontalScrollBarSize(this.getTheme().scrollStyle));
54188
+ const scrollStyle = this.getTheme().scrollStyle;
54189
+ let vScrollBarWidth = 0,
54190
+ hScrollBarWidth = 0;
54191
+ vScrollBarWidth = this.shouldVScrollBarWidthShow(widthP, heightP, scrollStyle) ? getVerticalScrollBarSize(scrollStyle) : 0, hScrollBarWidth = this.shouldHScrollBarWidthShow(widthP, heightP, scrollStyle) ? getHorizontalScrollBarSize(scrollStyle) : 0;
54192
+ const width = Math.floor(widthP - vScrollBarWidth),
54193
+ height = Math.floor(heightP - hScrollBarWidth);
54176
54194
  if (null === (_l = this.internalProps.theme) || void 0 === _l ? void 0 : _l.frameStyle) {
54177
54195
  const lineWidths = toBoxArray(null !== (_o = null === (_m = this.internalProps.theme.frameStyle) || void 0 === _m ? void 0 : _m.borderLineWidth) && void 0 !== _o ? _o : [null]),
54178
54196
  shadowWidths = toBoxArray(null !== (_q = null === (_p = this.internalProps.theme.frameStyle) || void 0 === _p ? void 0 : _p.shadowBlur) && void 0 !== _q ? _q : [0]);
54179
- (null === (_r = this.theme.frameStyle) || void 0 === _r ? void 0 : _r.innerBorder) ? (this.tableX = 0, this.tableY = 0, this.tableNoFrameWidth = width - (null !== (_s = shadowWidths[1]) && void 0 !== _s ? _s : 0), this.tableNoFrameHeight = height - (null !== (_t = shadowWidths[2]) && void 0 !== _t ? _t : 0)) : (this.tableX = (null !== (_u = lineWidths[3]) && void 0 !== _u ? _u : 0) + (null !== (_v = shadowWidths[3]) && void 0 !== _v ? _v : 0), this.tableY = (null !== (_w = lineWidths[0]) && void 0 !== _w ? _w : 0) + (null !== (_x = shadowWidths[0]) && void 0 !== _x ? _x : 0), this.tableNoFrameWidth = width - ((null !== (_y = lineWidths[1]) && void 0 !== _y ? _y : 0) + (null !== (_z = shadowWidths[1]) && void 0 !== _z ? _z : 0)) - ((null !== (_0 = lineWidths[3]) && void 0 !== _0 ? _0 : 0) + (null !== (_1 = shadowWidths[3]) && void 0 !== _1 ? _1 : 0)), this.tableNoFrameHeight = height - ((null !== (_2 = lineWidths[0]) && void 0 !== _2 ? _2 : 0) + (null !== (_3 = shadowWidths[0]) && void 0 !== _3 ? _3 : 0)) - ((null !== (_4 = lineWidths[2]) && void 0 !== _4 ? _4 : 0) + (null !== (_5 = shadowWidths[2]) && void 0 !== _5 ? _5 : 0)));
54197
+ if (null === (_r = this.theme.frameStyle) || void 0 === _r ? void 0 : _r.innerBorder) this.tableX = 0, this.tableY = 0, this.tableNoFrameWidth = width - (null !== (_s = shadowWidths[1]) && void 0 !== _s ? _s : 0), this.tableNoFrameHeight = height - (null !== (_t = shadowWidths[2]) && void 0 !== _t ? _t : 0);else {
54198
+ this.tableX = (null !== (_u = lineWidths[3]) && void 0 !== _u ? _u : 0) + (null !== (_v = shadowWidths[3]) && void 0 !== _v ? _v : 0), this.tableY = (null !== (_w = lineWidths[0]) && void 0 !== _w ? _w : 0) + (null !== (_x = shadowWidths[0]) && void 0 !== _x ? _x : 0);
54199
+ const rightBorder = (null !== (_y = lineWidths[1]) && void 0 !== _y ? _y : 0) + (null !== (_z = shadowWidths[1]) && void 0 !== _z ? _z : 0);
54200
+ this.tableNoFrameWidth = width - (rightBorder > vScrollBarWidth ? rightBorder - vScrollBarWidth : 0) - ((null !== (_0 = lineWidths[3]) && void 0 !== _0 ? _0 : 0) + (null !== (_1 = shadowWidths[3]) && void 0 !== _1 ? _1 : 0));
54201
+ const bottomBorder = (null !== (_2 = lineWidths[2]) && void 0 !== _2 ? _2 : 0) + (null !== (_3 = shadowWidths[2]) && void 0 !== _3 ? _3 : 0);
54202
+ this.tableNoFrameHeight = height - (bottomBorder > hScrollBarWidth ? bottomBorder - hScrollBarWidth : 0) - ((null !== (_4 = lineWidths[0]) && void 0 !== _4 ? _4 : 0) + (null !== (_5 = shadowWidths[0]) && void 0 !== _5 ? _5 : 0));
54203
+ }
54180
54204
  }
54181
54205
  this._clearColRangeWidthsMap(), this._clearRowRangeHeightsMap();
54182
54206
  }
54207
+ shouldVScrollBarWidthShow(tableWidth, tableHeight, scrollStyle) {
54208
+ if (scrollStyle.hoverOn || "none" === scrollStyle.visible) return !1;
54209
+ const totalHeight = this.getAllRowsHeight(),
54210
+ sizeTolerance = scrollStyle.visible ? getHorizontalScrollBarSize(scrollStyle) : 0;
54211
+ if (totalHeight > tableHeight - sizeTolerance && totalHeight <= tableHeight) {
54212
+ const totalWidth = this.getAllColsWidth(),
54213
+ sizeTolerance = scrollStyle.visible ? getVerticalScrollBarSize(scrollStyle) : 0;
54214
+ if (totalWidth > tableWidth - sizeTolerance && totalWidth <= tableWidth) return !1;
54215
+ if (totalWidth > tableWidth) return !0;
54216
+ if (totalWidth <= tableWidth - sizeTolerance) return !1;
54217
+ }
54218
+ return !(totalHeight <= tableHeight - sizeTolerance);
54219
+ }
54220
+ shouldHScrollBarWidthShow(tableWidth, tableHeight, scrollStyle) {
54221
+ if (scrollStyle.hoverOn || "none" === scrollStyle.visible) return !1;
54222
+ const totalWidth = this.getAllColsWidth(),
54223
+ sizeTolerance = scrollStyle.visible ? getVerticalScrollBarSize(scrollStyle) : 0;
54224
+ if (totalWidth > tableWidth - sizeTolerance && totalWidth <= tableWidth) {
54225
+ const totalHeight = this.getAllRowsHeight(),
54226
+ sizeTolerance = scrollStyle.visible ? getHorizontalScrollBarSize(scrollStyle) : 0;
54227
+ if (totalHeight > tableHeight - sizeTolerance && totalHeight <= tableHeight) return !1;
54228
+ if (totalHeight > tableHeight) return !0;
54229
+ if (totalHeight <= tableHeight - sizeTolerance) return !1;
54230
+ }
54231
+ return !(totalWidth <= tableWidth - sizeTolerance);
54232
+ }
54183
54233
  updateViewBox(newViewBox) {
54184
54234
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
54185
54235
  const oldWidth = (null !== (_c = null === (_b = null === (_a = this.options) || void 0 === _a ? void 0 : _a.viewBox) || void 0 === _b ? void 0 : _b.x2) && void 0 !== _c ? _c : 0) - (null !== (_f = null === (_e = null === (_d = this.options) || void 0 === _d ? void 0 : _d.viewBox) || void 0 === _e ? void 0 : _e.x1) && void 0 !== _f ? _f : 0),
@@ -57693,7 +57743,7 @@
57693
57743
  hideColumnsSubHeader ? this._headerCellIds[row - 1] && void 0 !== this._headerCellIds[row - 1][col] && (rowCells[col] = this._headerCellIds[row - 1][col]) : rowCells[col] = id;
57694
57744
  const expand = !hd.hierarchyState || hd.hierarchyState === HierarchyState.expand;
57695
57745
  if (hd.columns && expand) {
57696
- !hd.columns.every(c => c.hide) && this._addHeaders(maxRow + 1, hd.columns, [...roots, id], hd.hideColumnsSubHeader || hideColumnsSubHeader, hd.levelSpan).forEach(c => results.push(c));
57746
+ !(hd.columns.every(c => c.hide) || hd.hide) && this._addHeaders(maxRow + 1, hd.columns, [...roots, id], hd.hideColumnsSubHeader || hideColumnsSubHeader, hd.levelSpan).forEach(c => results.push(c));
57697
57747
  } else {
57698
57748
  const colDef = {
57699
57749
  id: this.seqId++,
@@ -58723,7 +58773,7 @@
58723
58773
  sortState: internalProps.sortState
58724
58774
  }) : this.setRecords([]), options.title) {
58725
58775
  const Title = Factory.getComponent("title");
58726
- internalProps.title = new Title(options.title, this), this.scenegraph.resize();
58776
+ internalProps.title = new Title(options.title, this);
58727
58777
  }
58728
58778
  if (this.options.emptyTip) if (this.internalProps.emptyTip) null === (_g = this.internalProps.emptyTip) || void 0 === _g || _g.resetVisible();else {
58729
58779
  const EmptyTip = Factory.getComponent("emptyTip");
@@ -58734,7 +58784,7 @@
58734
58784
  this.listTreeStickCellPlugin = new ListTreeStickCellPlugin(this);
58735
58785
  }
58736
58786
  setTimeout(() => {
58737
- this.fireListeners(TABLE_EVENT_TYPE.INITIALIZED, null);
58787
+ this.resize(), this.fireListeners(TABLE_EVENT_TYPE.INITIALIZED, null);
58738
58788
  }, 0);
58739
58789
  }
58740
58790
  isListTable() {
@@ -58772,7 +58822,7 @@
58772
58822
  col: this.stateManager.hover.cellPos.col,
58773
58823
  row: this.stateManager.hover.cellPos.row
58774
58824
  };
58775
- this._hasAutoImageColumn = void 0, this.refreshHeader(), this.records && checkHasAggregationOnColumnDefine(this.internalProps.columns) && this.dataSource.processRecords(null !== (_b = null === (_a = this.dataSource.dataSourceObj) || void 0 === _a ? void 0 : _a.records) && void 0 !== _b ? _b : this.dataSource.dataSourceObj), this.internalProps.useOneRowHeightFillAll = !1, this.headerStyleCache = new Map(), this.bodyStyleCache = new Map(), this.bodyBottomStyleCache = new Map(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this.renderAsync(), this.eventManager.updateEventBinder();
58825
+ this._hasAutoImageColumn = void 0, this.refreshHeader(), this.records && checkHasAggregationOnColumnDefine(this.internalProps.columns) && this.dataSource.processRecords(null !== (_b = null === (_a = this.dataSource.dataSourceObj) || void 0 === _a ? void 0 : _a.records) && void 0 !== _b ? _b : this.dataSource.dataSourceObj), this.internalProps.useOneRowHeightFillAll = !1, this.headerStyleCache = new Map(), this.bodyStyleCache = new Map(), this.bodyBottomStyleCache = new Map(), this._updateSize(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this.renderAsync(), this.eventManager.updateEventBinder();
58776
58826
  }
58777
58827
  addColumn(column) {
58778
58828
  const columns = this.options.columns;
@@ -58986,7 +59036,7 @@
58986
59036
  } = table.internalProps;
58987
59037
  if (!layoutMap) return;
58988
59038
  const dataCount = null !== (_b = null === (_a = table.internalProps.dataSource) || void 0 === _a ? void 0 : _a.length) && void 0 !== _b ? _b : 0;
58989
- layoutMap.recordsCount = dataCount + (dataCount > 0 || this.options.showAggregationWhenEmpty ? layoutMap.hasAggregationOnTopCount + layoutMap.hasAggregationOnBottomCount : 0), table.transpose ? (table.rowCount = null !== (_c = layoutMap.rowCount) && void 0 !== _c ? _c : 0, table.colCount = null !== (_d = layoutMap.colCount) && void 0 !== _d ? _d : 0, this.internalProps.frozenColCount = Math.max((null !== (_e = layoutMap.headerLevelCount) && void 0 !== _e ? _e : 0) + layoutMap.leftRowSeriesNumberColumnCount, null !== (_f = this.options.frozenColCount) && void 0 !== _f ? _f : 0), this.internalProps.frozenRowCount = null !== (_g = this.options.frozenRowCount) && void 0 !== _g ? _g : 0, table.bottomFrozenRowCount !== (null !== (_h = this.options.bottomFrozenRowCount) && void 0 !== _h ? _h : 0) && (table.bottomFrozenRowCount = null !== (_j = this.options.bottomFrozenRowCount) && void 0 !== _j ? _j : 0), table.rightFrozenColCount !== (null !== (_k = this.options.rightFrozenColCount) && void 0 !== _k ? _k : 0) && (table.rightFrozenColCount = null !== (_l = this.options.rightFrozenColCount) && void 0 !== _l ? _l : 0)) : (table.colCount = null !== (_m = layoutMap.colCount) && void 0 !== _m ? _m : 0, table.rowCount = layoutMap.recordsCount * layoutMap.bodyRowSpanCount + layoutMap.headerLevelCount, this.internalProps.frozenColCount = null !== (_o = this.options.frozenColCount) && void 0 !== _o ? _o : 0, table.frozenRowCount = Math.max(layoutMap.headerLevelCount, null !== (_p = this.options.frozenRowCount) && void 0 !== _p ? _p : 0), table.bottomFrozenRowCount !== (null !== (_q = this.options.bottomFrozenRowCount) && void 0 !== _q ? _q : 0) && (table.bottomFrozenRowCount = null !== (_r = this.options.bottomFrozenRowCount) && void 0 !== _r ? _r : 0), table.rightFrozenColCount !== (null !== (_s = this.options.rightFrozenColCount) && void 0 !== _s ? _s : 0) && (table.rightFrozenColCount = null !== (_t = this.options.rightFrozenColCount) && void 0 !== _t ? _t : 0)), this.stateManager.setFrozenCol(this.internalProps.frozenColCount);
59039
+ layoutMap.recordsCount = dataCount + (dataCount > 0 || this.options.showAggregationWhenEmpty ? layoutMap.hasAggregationOnTopCount + layoutMap.hasAggregationOnBottomCount : 0), table.transpose ? (table.rowCount = null !== (_c = layoutMap.rowCount) && void 0 !== _c ? _c : 0, table.colCount = null !== (_d = layoutMap.colCount) && void 0 !== _d ? _d : 0, this.internalProps.frozenColCount = Math.max((null !== (_e = layoutMap.headerLevelCount) && void 0 !== _e ? _e : 0) + layoutMap.leftRowSeriesNumberColumnCount, null !== (_f = this.options.frozenColCount) && void 0 !== _f ? _f : 0), this.internalProps.frozenRowCount = null !== (_g = this.options.frozenRowCount) && void 0 !== _g ? _g : 0, table.bottomFrozenRowCount !== (null !== (_h = this.options.bottomFrozenRowCount) && void 0 !== _h ? _h : 0) && (table.bottomFrozenRowCount = null !== (_j = this.options.bottomFrozenRowCount) && void 0 !== _j ? _j : 0), table.rightFrozenColCount !== (null !== (_k = this.options.rightFrozenColCount) && void 0 !== _k ? _k : 0) && (table.rightFrozenColCount = null !== (_l = this.options.rightFrozenColCount) && void 0 !== _l ? _l : 0)) : (table.colCount = null !== (_m = layoutMap.colCount) && void 0 !== _m ? _m : 0, table.rowCount = layoutMap.recordsCount * layoutMap.bodyRowSpanCount + layoutMap.headerLevelCount, this.internalProps.frozenColCount = null !== (_o = this.options.frozenColCount) && void 0 !== _o ? _o : 0, this.options.frozenColCount >= this.colCount && (this.internalProps.frozenColCount = 0), table.frozenRowCount = Math.max(layoutMap.headerLevelCount, null !== (_p = this.options.frozenRowCount) && void 0 !== _p ? _p : 0), table.bottomFrozenRowCount !== (null !== (_q = this.options.bottomFrozenRowCount) && void 0 !== _q ? _q : 0) && (table.bottomFrozenRowCount = null !== (_r = this.options.bottomFrozenRowCount) && void 0 !== _r ? _r : 0), table.rightFrozenColCount !== (null !== (_s = this.options.rightFrozenColCount) && void 0 !== _s ? _s : 0) && (table.rightFrozenColCount = null !== (_t = this.options.rightFrozenColCount) && void 0 !== _t ? _t : 0)), this.stateManager.setFrozenCol(this.internalProps.frozenColCount);
58990
59040
  }
58991
59041
  getFieldData(field, col, row) {
58992
59042
  if (null === field) return null;
@@ -59169,7 +59219,7 @@
59169
59219
  })), this.internalProps.layoutMap.clearCellRangeMap(), this.internalProps.useOneRowHeightFillAll = !1, this.scenegraph.sortCell()), sortState.length && this.stateManager.updateSortState(sortState);
59170
59220
  }
59171
59221
  updateFilterRules(filterRules) {
59172
- 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();
59222
+ 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(), this.resize();
59173
59223
  }
59174
59224
  getCheckboxState(field) {
59175
59225
  if (this.stateManager.checkedState.size < this.rowCount - this.columnHeaderLevelCount && this.stateManager.initLeftRecordsCheckState(this.records), isValid$3(field)) {
@@ -59244,7 +59294,7 @@
59244
59294
  }
59245
59295
  this.refreshRowColCount();
59246
59296
  } else _setRecords(this, records);
59247
- if (this.stateManager.initCheckedState(records), this.clearCellStyleCache(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this.internalProps.title && !this.internalProps.title.isReleased && (this._updateSize(), this.internalProps.title.resize(), this.scenegraph.resize()), this.options.emptyTip) if (this.internalProps.emptyTip) null === (_c = this.internalProps.emptyTip) || void 0 === _c || _c.resetVisible();else {
59297
+ if (this.stateManager.initCheckedState(records), this.clearCellStyleCache(), this.scenegraph.createSceneGraph(), this.stateManager.updateHoverPos(oldHoverState.col, oldHoverState.row), this._updateSize(), this.internalProps.title && !this.internalProps.title.isReleased && this.internalProps.title.resize(), this.scenegraph.resize(), this.options.emptyTip) if (this.internalProps.emptyTip) null === (_c = this.internalProps.emptyTip) || void 0 === _c || _c.resetVisible();else {
59248
59298
  const EmptyTip = Factory.getComponent("emptyTip");
59249
59299
  this.internalProps.emptyTip = new EmptyTip(this.options.emptyTip, this), null === (_d = this.internalProps.emptyTip) || void 0 === _d || _d.resetVisible();
59250
59300
  }
@@ -61125,10 +61175,12 @@
61125
61175
  }), legend.hideAll()), this.table.scenegraph.stage.defaultLayer.appendChild(legend), this.adjustTableSize(attrs);
61126
61176
  }
61127
61177
  resize() {
61128
- this.legendComponent && !1 !== this.visible && (this.legendComponent.setAttributes({
61129
- maxWidth: this.table.tableNoFrameWidth,
61130
- maxHeight: this.table.tableNoFrameHeight
61131
- }), this.adjustTableSize(this.legendComponent.attribute));
61178
+ if (!this.legendComponent || !1 === this.visible) return;
61179
+ const attrs = this.getLegendAttributes({
61180
+ width: this.table.tableNoFrameWidth,
61181
+ height: this.table.tableNoFrameHeight
61182
+ });
61183
+ this.legendComponent.setAttributes(attrs), this.adjustTableSize(this.legendComponent.attribute);
61132
61184
  }
61133
61185
  adjustTableSize(attrs) {
61134
61186
  var _a, _b;
@@ -61607,7 +61659,22 @@
61607
61659
  container: table => new Container(table)
61608
61660
  };
61609
61661
  function getMenuInstanceInfo(table, col, row, type, dropDownMenuOptions) {
61610
- var _a, _b;
61662
+ var _a, _b, _c;
61663
+ if (-1 === col && -1 === row && "context-menu" === type) return (null == dropDownMenuOptions ? void 0 : dropDownMenuOptions.content) ? {
61664
+ type: type,
61665
+ position: dropDownMenuOptions.position,
61666
+ referencePosition: null !== (_a = dropDownMenuOptions.referencePosition) && void 0 !== _a ? _a : {
61667
+ rect: {
61668
+ left: 0,
61669
+ right: 0,
61670
+ top: 0,
61671
+ bottom: 0,
61672
+ width: 0,
61673
+ height: 0
61674
+ }
61675
+ },
61676
+ content: dropDownMenuOptions.content
61677
+ } : null;
61611
61678
  const {
61612
61679
  lineHeight: lineHeight,
61613
61680
  textBaseline: textBaseline,
@@ -61636,7 +61703,7 @@
61636
61703
  } = table.internalProps.headerHelper.getDropDownIconRect(rect, lineHeight, textBaseline || "middle")), null == dropDownMenuOptions ? void 0 : dropDownMenuOptions.content) return {
61637
61704
  type: type,
61638
61705
  position: dropDownMenuOptions.position,
61639
- referencePosition: null !== (_a = dropDownMenuOptions.referencePosition) && void 0 !== _a ? _a : {
61706
+ referencePosition: null !== (_b = dropDownMenuOptions.referencePosition) && void 0 !== _b ? _b : {
61640
61707
  rect: {
61641
61708
  left: left,
61642
61709
  right: right,
@@ -61651,7 +61718,7 @@
61651
61718
  if ("dropdown-menu" === type) {
61652
61719
  let dropDownMenu = table.globalDropDownMenu;
61653
61720
  const headerData = table._getHeaderLayoutMap(col, row);
61654
- dropDownMenu = null !== (_b = headerData.dropDownMenu) && void 0 !== _b ? _b : dropDownMenu;
61721
+ dropDownMenu = null !== (_c = headerData.dropDownMenu) && void 0 !== _c ? _c : dropDownMenu;
61655
61722
  const pivotInfo = headerData.pivotInfo;
61656
61723
  return "function" == typeof dropDownMenu && (dropDownMenu = dropDownMenu({
61657
61724
  row: row,
@@ -61694,7 +61761,16 @@
61694
61761
  info: menuInstanceInfo
61695
61762
  } = instanceInfo;
61696
61763
  if (instance && instance.bindMenuElement(col, row, menuInstanceInfo)) {
61697
- const range = this._table.getCellRange(col, row);
61764
+ const range = -1 === col && -1 === row ? {
61765
+ start: {
61766
+ col: -1,
61767
+ row: -1
61768
+ },
61769
+ end: {
61770
+ col: -1,
61771
+ row: -1
61772
+ }
61773
+ } : this._table.getCellRange(col, row);
61698
61774
  this._attachInfo = {
61699
61775
  range: range,
61700
61776
  instance: instance
@@ -61739,6 +61815,19 @@
61739
61815
  }
61740
61816
  });
61741
61817
  }
61818
+ }), table.on(TABLE_EVENT_TYPE.CONTEXTMENU_CANVAS, e => {
61819
+ var _a, _b, _c, _d;
61820
+ if ("html" === (null === (_a = table.internalProps.menu) || void 0 === _a ? void 0 : _a.renderMode)) {
61821
+ const abstractPos = table._getMouseAbstractPoint(e.event);
61822
+ let menu = null;
61823
+ abstractPos.inTable && "function" == typeof (null === (_b = table.internalProps.menu) || void 0 === _b ? void 0 : _b.contextMenuItems) ? menu = table.internalProps.menu.contextMenuItems(table.getHeaderField(e.col, e.row), e.row, e.col, table) : abstractPos.inTable && Array.isArray(null === (_c = table.internalProps.menu) || void 0 === _c ? void 0 : _c.contextMenuItems) && (menu = null === (_d = table.internalProps.menu) || void 0 === _d ? void 0 : _d.contextMenuItems), this._bindToCell(-1, -1, "context-menu", {
61824
+ content: menu,
61825
+ position: {
61826
+ x: abstractPos.x,
61827
+ y: abstractPos.y
61828
+ }
61829
+ });
61830
+ }
61742
61831
  });
61743
61832
  }
61744
61833
  _getMenuInstanceInfo(col, row, type, dropDownMenuOptions) {