@visactor/vtable-calendar 1.22.11-alpha.0 → 1.22.11-alpha.1

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.
@@ -34616,24 +34616,6 @@
34616
34616
  }, delay));
34617
34617
  };
34618
34618
  }
34619
- function cancellableThrottle(func, delay) {
34620
- let timer = null,
34621
- lastArgs = null,
34622
- context = null;
34623
- return {
34624
- throttled: function (...args) {
34625
- lastArgs = args, context = this, timer || (timer = setTimeout(() => {
34626
- lastArgs && func.apply(context, lastArgs), timer = null, lastArgs = null, context = null;
34627
- }, delay));
34628
- },
34629
- cancel: () => {
34630
- timer && (clearTimeout(timer), timer = null, lastArgs = null, context = null);
34631
- },
34632
- flush: () => {
34633
- timer && lastArgs && (clearTimeout(timer), func.apply(context, lastArgs), timer = null, lastArgs = null, context = null);
34634
- }
34635
- };
34636
- }
34637
34619
  function pad(num, totalChars) {
34638
34620
  for (num = `${num}`; num.length < totalChars;) num = "0" + num;
34639
34621
  return num;
@@ -34897,6 +34879,7 @@
34897
34879
  AFTER_UPDATE_CELL_CONTENT_WIDTH: "after_update_cell_content_width",
34898
34880
  AFTER_UPDATE_SELECT_BORDER_HEIGHT: "after_update_select_border_height",
34899
34881
  CHANGE_CELL_VALUE: "change_cell_value",
34882
+ CHANGE_CELL_VALUES: "change_cell_values",
34900
34883
  DRAG_FILL_HANDLE_END: "drag_fill_handle_end",
34901
34884
  MOUSEDOWN_FILL_HANDLE: "mousedown_fill_handle",
34902
34885
  DBLCLICK_FILL_HANDLE: "dblclick_fill_handle",
@@ -43767,26 +43750,48 @@
43767
43750
  const cellGroup = table.scenegraph.getCell(col, i),
43768
43751
  chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
43769
43752
  chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListColumnByColumnDirection[col][i] || isValid$1(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance), setTimeout(() => {
43770
- var _a, _b, _c, _d;
43753
+ var _a, _b, _c, _d, _e, _f;
43771
43754
  if (null === (_a = chartInstanceListColumnByColumnDirection[col]) || void 0 === _a ? void 0 : _a[i]) {
43772
43755
  const chartDimensionLinkage = table.options.chartDimensionLinkage;
43773
43756
  let isShowTooltip = !isScatter;
43774
- if (isScatter || "object" != typeof chartDimensionLinkage || (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeRow(i, table)), isScatter) table.stateManager.hover.cellPos.col === col && table.stateManager.hover.cellPos.row === i || null === (_d = (_c = chartInstanceListColumnByColumnDirection[col][i]).showCrosshair) || void 0 === _d || _d.call(_c, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue);else {
43775
- const cellBoundry = table.getCellRelativeRect(col, i),
43776
- bodyBoundryTop = table.frozenRowCount ? table.getCellRelativeRect(col, table.frozenRowCount - 1).bottom : 0,
43757
+ if (!isScatter && "object" == typeof chartDimensionLinkage) if (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === rowEnd && isShowTooltip) {
43758
+ const heightLimitToShowTooltipForEdgeRow = null !== (_c = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _c ? _c : 0,
43759
+ {
43760
+ rowEnd: rowEnd1
43761
+ } = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
43762
+ if (rowEnd1 === rowEnd) isShowTooltip = !0;else {
43763
+ const {
43764
+ rowEnd: rowEnd2
43765
+ } = table.getBodyVisibleRowRange(0, 5);
43766
+ isShowTooltip = rowEnd2 !== rowEnd;
43767
+ }
43768
+ } else if (i === rowStart && isShowTooltip) {
43769
+ const heightLimitToShowTooltipForEdgeRow = null !== (_d = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _d ? _d : 0,
43770
+ {
43771
+ rowStart: rowStart1
43772
+ } = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
43773
+ if (rowStart1 === rowStart) isShowTooltip = !0;else {
43774
+ const {
43775
+ rowStart: rowStart2
43776
+ } = table.getBodyVisibleRowRange(0, -5);
43777
+ isShowTooltip = rowStart2 !== rowStart;
43778
+ }
43779
+ }
43780
+ if (isScatter) table.stateManager.hover.cellPos.col === col && table.stateManager.hover.cellPos.row === i || null === (_f = (_e = chartInstanceListColumnByColumnDirection[col][i]).showCrosshair) || void 0 === _f || _f.call(_e, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue);else {
43781
+ const bodyBoundryTop = table.frozenRowCount ? table.getCellRelativeRect(col, table.frozenRowCount - 1).bottom : 0,
43777
43782
  absolutePositionTop = Math.max(bodyBoundryTop, table.getCellRelativeRect(col, i).top);
43778
43783
  hideTooltip ? (table.stateManager.hover.cellPos.col === col && table.stateManager.hover.cellPos.row === i || chartInstanceListColumnByColumnDirection[col][i].hideTooltip(), chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
43779
43784
  tooltip: !1,
43780
43785
  showTooltipOption: {
43781
- x: canvasXY.x - cellBoundry.left,
43782
- y: absolutePositionTop - cellBoundry.top,
43786
+ x: canvasXY.x,
43787
+ y: absolutePositionTop,
43783
43788
  activeType: "dimension"
43784
43789
  }
43785
43790
  })) : chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
43786
43791
  tooltip: isShowTooltip,
43787
43792
  showTooltipOption: {
43788
- x: canvasXY.x - cellBoundry.left,
43789
- y: absolutePositionTop - cellBoundry.top,
43793
+ x: canvasXY.x,
43794
+ y: absolutePositionTop,
43790
43795
  activeType: "dimension"
43791
43796
  }
43792
43797
  });
@@ -43827,22 +43832,44 @@
43827
43832
  if (null === (_a = chartInstanceListRowByRowDirection[row]) || void 0 === _a ? void 0 : _a[i]) {
43828
43833
  const chartDimensionLinkage = table.options.chartDimensionLinkage;
43829
43834
  let isShowTooltip = !isScatter;
43830
- if (isScatter || "object" != typeof chartDimensionLinkage || (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeColumn(i, table)), isScatter) table.stateManager.hover.cellPos.col === i && table.stateManager.hover.cellPos.row === row || null === (_d = (_c = chartInstanceListRowByRowDirection[row][i]).showCrosshair) || void 0 === _d || _d.call(_c, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue);else {
43831
- const cellBoundry = table.getCellRelativeRect(i, row),
43832
- bodyBoundryLeft = table.frozenColCount ? table.getCellRelativeRect(table.frozenColCount - 1, row).right : 0,
43835
+ if (!isScatter && "object" == typeof chartDimensionLinkage) if (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === colEnd && isShowTooltip) {
43836
+ const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
43837
+ {
43838
+ colEnd: colEnd1
43839
+ } = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
43840
+ if (colEnd1 === colEnd) isShowTooltip = !0;else {
43841
+ const {
43842
+ colEnd: colEnd2
43843
+ } = table.getBodyVisibleColRange(0, 5);
43844
+ isShowTooltip = colEnd2 !== colEnd;
43845
+ }
43846
+ } else if (i === colStart && isShowTooltip) {
43847
+ const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
43848
+ {
43849
+ colStart: colStart1
43850
+ } = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
43851
+ if (colStart1 === colStart) isShowTooltip = !0;else {
43852
+ const {
43853
+ colStart: colStart2
43854
+ } = table.getBodyVisibleColRange(0, -5);
43855
+ isShowTooltip = colStart2 !== colStart;
43856
+ }
43857
+ }
43858
+ if (isScatter) table.stateManager.hover.cellPos.col === i && table.stateManager.hover.cellPos.row === row || null === (_d = (_c = chartInstanceListRowByRowDirection[row][i]).showCrosshair) || void 0 === _d || _d.call(_c, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue);else {
43859
+ const bodyBoundryLeft = table.frozenColCount ? table.getCellRelativeRect(table.frozenColCount - 1, row).right : 0,
43833
43860
  absolutePositionLeft = Math.max(bodyBoundryLeft, table.getCellRelativeRect(i, row).left);
43834
43861
  hideTooltip ? (table.stateManager.hover.cellPos.col === i && table.stateManager.hover.cellPos.row === row || chartInstanceListRowByRowDirection[row][i].hideTooltip(), chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
43835
43862
  tooltip: !1,
43836
43863
  showTooltipOption: {
43837
- x: absolutePositionLeft - cellBoundry.left,
43838
- y: canvasXY.y - cellBoundry.top,
43864
+ x: absolutePositionLeft,
43865
+ y: canvasXY.y,
43839
43866
  activeType: "dimension"
43840
43867
  }
43841
43868
  })) : chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
43842
43869
  tooltip: isShowTooltip,
43843
43870
  showTooltipOption: {
43844
- x: absolutePositionLeft - cellBoundry.left,
43845
- y: canvasXY.y - cellBoundry.top,
43871
+ x: absolutePositionLeft,
43872
+ y: canvasXY.y,
43846
43873
  activeType: "dimension"
43847
43874
  }
43848
43875
  });
@@ -43851,103 +43878,6 @@
43851
43878
  }, 0), table.scenegraph.updateNextFrame();
43852
43879
  }
43853
43880
  }
43854
- function generateChartInstanceListByViewRange(datum, table, deactivate = !1) {
43855
- var _a;
43856
- const {
43857
- rowStart: rowStart
43858
- } = table.getBodyVisibleRowRange();
43859
- let rowEnd = table.getBodyVisibleRowRange().rowEnd;
43860
- rowEnd = Math.min(table.rowCount - 1 - table.bottomFrozenRowCount, rowEnd);
43861
- const {
43862
- colStart: colStart
43863
- } = table.getBodyVisibleColRange();
43864
- let colEnd = table.getBodyVisibleColRange().colEnd;
43865
- colEnd = Math.min(table.colCount - 1 - table.rightFrozenColCount, colEnd);
43866
- for (let col = colStart; col <= colEnd; col++) {
43867
- isValid$1(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
43868
- for (let i = rowStart; i <= rowEnd; i++) {
43869
- const cellGroup = table.scenegraph.getCell(col, i),
43870
- chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
43871
- chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListColumnByColumnDirection[col][i] || isValid$1(chartNode) && (chartNode.activeChartInstance ? chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance : "pie" === chartNode.attribute.spec.type && (chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance)), setTimeout(() => {
43872
- var _a, _b;
43873
- if (null === (_a = chartInstanceListColumnByColumnDirection[col]) || void 0 === _a ? void 0 : _a[i]) {
43874
- const chartDimensionLinkage = table.options.chartDimensionLinkage;
43875
- let isShowTooltip = !0;
43876
- "object" == typeof chartDimensionLinkage && (deactivate ? (chartInstanceListColumnByColumnDirection[col][i].setHovered(), chartInstanceListColumnByColumnDirection[col][i].hideTooltip()) : (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeRow(i, table), isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeColumn(col, table), chartInstanceListColumnByColumnDirection[col][i].setHovered(datum), isShowTooltip && chartInstanceListColumnByColumnDirection[col][i].showTooltip(datum, {
43877
- activeType: "mark"
43878
- })));
43879
- }
43880
- }, 0), table.scenegraph.updateNextFrame();
43881
- }
43882
- }
43883
- }
43884
- function checkIsShowTooltipForEdgeRow(row, table) {
43885
- var _a, _b;
43886
- let isShowTooltip = !0;
43887
- const {
43888
- rowStart: rowStart
43889
- } = table.getBodyVisibleRowRange();
43890
- let rowEnd = table.getBodyVisibleRowRange().rowEnd;
43891
- rowEnd = Math.min(table.rowCount - 1 - table.bottomFrozenRowCount, rowEnd);
43892
- const chartDimensionLinkage = table.options.chartDimensionLinkage;
43893
- if (row === rowEnd && isShowTooltip) {
43894
- const heightLimitToShowTooltipForEdgeRow = null !== (_a = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _a ? _a : 0,
43895
- {
43896
- rowEnd: rowEnd1
43897
- } = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
43898
- if (rowEnd1 === rowEnd) isShowTooltip = !0;else {
43899
- const {
43900
- rowEnd: rowEnd2
43901
- } = table.getBodyVisibleRowRange(0, 5);
43902
- isShowTooltip = rowEnd2 !== rowEnd;
43903
- }
43904
- } else if (row === rowStart && isShowTooltip) {
43905
- const heightLimitToShowTooltipForEdgeRow = null !== (_b = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _b ? _b : 0,
43906
- {
43907
- rowStart: rowStart1
43908
- } = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
43909
- if (rowStart1 === rowStart) isShowTooltip = !0;else {
43910
- const {
43911
- rowStart: rowStart2
43912
- } = table.getBodyVisibleRowRange(0, -5);
43913
- isShowTooltip = rowStart2 !== rowStart;
43914
- }
43915
- }
43916
- return isShowTooltip;
43917
- }
43918
- function checkIsShowTooltipForEdgeColumn(col, table) {
43919
- let isShowTooltip = !0;
43920
- const {
43921
- colStart: colStart
43922
- } = table.getBodyVisibleColRange();
43923
- let colEnd = table.getBodyVisibleColRange().colEnd;
43924
- colEnd = Math.min(table.colCount - 1 - table.rightFrozenColCount, colEnd);
43925
- const chartDimensionLinkage = table.options.chartDimensionLinkage;
43926
- if (col === colEnd && isShowTooltip) {
43927
- const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
43928
- {
43929
- colEnd: colEnd1
43930
- } = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
43931
- if (colEnd1 === colEnd) isShowTooltip = !0;else {
43932
- const {
43933
- colEnd: colEnd2
43934
- } = table.getBodyVisibleColRange(0, 5);
43935
- isShowTooltip = colEnd2 !== colEnd;
43936
- }
43937
- } else if (col === colStart && isShowTooltip) {
43938
- const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
43939
- {
43940
- colStart: colStart1
43941
- } = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
43942
- if (colStart1 === colStart) isShowTooltip = !0;else {
43943
- const {
43944
- colStart: colStart2
43945
- } = table.getBodyVisibleColRange(0, -5);
43946
- isShowTooltip = colStart2 !== colStart;
43947
- }
43948
- }
43949
- return isShowTooltip;
43950
- }
43951
43881
  function clearChartInstanceListByRowDirection(row, excludedCol, table) {
43952
43882
  var _a;
43953
43883
  if (isValid$1(chartInstanceListRowByRowDirection[row])) for (const i in chartInstanceListRowByRowDirection[row]) {
@@ -43962,10 +43892,6 @@
43962
43892
  }
43963
43893
  delete chartInstanceListRowByRowDirection[row];
43964
43894
  }
43965
- function clearAllChartInstanceList(table) {
43966
- for (const col in chartInstanceListColumnByColumnDirection) clearChartInstanceListByColumnDirection(Number(col), void 0, table);
43967
- for (const row in chartInstanceListRowByRowDirection) clearChartInstanceListByRowDirection(Number(row), void 0, table);
43968
- }
43969
43895
 
43970
43896
  function isValidAlignDomain(domain) {
43971
43897
  return 2 === domain.length && isValidNumber$1(domain[0]) && isValidNumber$1(domain[1]) && domain[1] >= domain[0];
@@ -44599,7 +44525,7 @@
44599
44525
  const CHART_NUMBER_TYPE = genNumberType();
44600
44526
  class Chart extends Rect$1 {
44601
44527
  constructor(isShareChartSpec, params) {
44602
- if (super(params), this.type = "chart", this.activeChartInstanceLastViewBox = null, this.activeChartInstanceHoverOnMark = null, this.justShowMarkTooltip = void 0, this.justShowMarkTooltipTimer = Date.now(), this.delayRunDimensionHoverTimer = void 0, this.numberType = CHART_NUMBER_TYPE, this.isShareChartSpec = isShareChartSpec, params.chartInstance) this.chartInstance = params.chartInstance;else {
44528
+ if (super(params), this.type = "chart", this.activeChartInstanceHoverOnMark = null, this.justShowMarkTooltip = void 0, this.justShowMarkTooltipTimer = Date.now(), this.delayRunDimensionHoverTimer = void 0, this.numberType = CHART_NUMBER_TYPE, this.isShareChartSpec = isShareChartSpec, params.chartInstance) this.chartInstance = params.chartInstance;else {
44603
44529
  const chartInstance = this.chartInstance = new params.ClassType(params.spec, merge({}, this.attribute.tableChartOption, {
44604
44530
  renderCanvas: params.canvas,
44605
44531
  mode: "node" === this.attribute.mode ? "node" : "desktop-browser",
@@ -44620,7 +44546,7 @@
44620
44546
  }
44621
44547
  }
44622
44548
  activate(table) {
44623
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
44549
+ var _a, _b, _c, _d, _e;
44624
44550
  if (this.activeChartInstance) return;
44625
44551
  const {
44626
44552
  col: col,
@@ -44673,7 +44599,7 @@
44673
44599
  layer.main && drawParams.clear && hoverColor && (context.beginPath(), context.fillStyle = hoverColor, context.rect(viewBox.x1, viewBox.y1, viewBox.x2 - viewBox.x1, viewBox.y2 - viewBox.y1), context.fill());
44674
44600
  }
44675
44601
  },
44676
- componentShowContent: (null === (_b = table.options.chartDimensionLinkage) || void 0 === _b ? void 0 : _b.showTooltip) && "scatter" !== this.attribute.spec.type ? {
44602
+ componentShowContent: table.options.chartDimensionLinkage && "scatter" !== this.attribute.spec.type ? {
44677
44603
  tooltip: {
44678
44604
  dimension: !1,
44679
44605
  mark: !0
@@ -44684,37 +44610,15 @@
44684
44610
  const chartStage = this.activeChartInstance.getStage(),
44685
44611
  matrix = this.globalTransMatrix.clone(),
44686
44612
  stageMatrix = this.stage.window.getViewBoxTransform();
44687
- let brushChangeThrottle;
44688
- matrix.multiply(stageMatrix.a, stageMatrix.b, stageMatrix.c, stageMatrix.d, stageMatrix.e, stageMatrix.f), chartStage.window.setViewBoxTransform && chartStage.window.setViewBoxTransform(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f), this.activeChartInstance.renderSync(), null === (_d = null === (_c = table.internalProps.layoutMap) || void 0 === _c ? void 0 : _c.updateDataStateToActiveChartInstance) || void 0 === _d || _d.call(_c, this.activeChartInstance), this.activeChartInstance.on("click", params => {
44613
+ matrix.multiply(stageMatrix.a, stageMatrix.b, stageMatrix.c, stageMatrix.d, stageMatrix.e, stageMatrix.f), chartStage.window.setViewBoxTransform && chartStage.window.setViewBoxTransform(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f), this.activeChartInstance.renderSync(), null === (_c = null === (_b = table.internalProps.layoutMap) || void 0 === _b ? void 0 : _b.updateDataStateToActiveChartInstance) || void 0 === _c || _c.call(_b, this.activeChartInstance), this.activeChartInstance.on("click", params => {
44689
44614
  var _a;
44690
- !1 === (null === (_a = this.attribute.spec.select) || void 0 === _a ? void 0 : _a.enable) ? table.scenegraph.updateChartState(null, void 0) : Chart.temp && table.scenegraph.updateChartState(null == params ? void 0 : params.datum, "click");
44691
- }), (null === (_e = table.options.chartDimensionLinkage) || void 0 === _e ? void 0 : _e.listenBrushChange) && (brushChangeThrottle = cancellableThrottle(table.scenegraph.updateChartState.bind(table.scenegraph), null !== (_g = null === (_f = table.options.chartDimensionLinkage) || void 0 === _f ? void 0 : _f.brushChangeDelay) && void 0 !== _g ? _g : 100), this.activeChartInstance.on("brushChange", params => {
44615
+ !1 === (null === (_a = this.attribute.spec.select) || void 0 === _a ? void 0 : _a.enable) ? table.scenegraph.updateChartState(null) : Chart.temp && table.scenegraph.updateChartState(null == params ? void 0 : params.datum);
44616
+ }), this.activeChartInstance.on("brushEnd", params => {
44692
44617
  var _a;
44693
- brushChangeThrottle.throttled(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData, "brush");
44694
- })), this.activeChartInstance.on("brushEnd", params => {
44695
- var _a;
44696
- null == brushChangeThrottle || brushChangeThrottle.cancel(), table.scenegraph.updateChartState(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData, "brush"), Chart.temp = 0, setTimeout(() => {
44618
+ table.scenegraph.updateChartState(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData), Chart.temp = 0, setTimeout(() => {
44697
44619
  Chart.temp = 1;
44698
44620
  }, 0);
44699
- }), (null === (_h = table.options.chartDimensionLinkage) || void 0 === _h ? void 0 : _h.showTooltip) && ("pie" === this.attribute.spec.type && (this.activeChartInstance.on("pointerover", {
44700
- markName: "pie"
44701
- }, params => {
44702
- var _a;
44703
- const categoryField = this.attribute.spec.categoryField,
44704
- datum = {
44705
- [categoryField]: null === (_a = null == params ? void 0 : params.datum) || void 0 === _a ? void 0 : _a[categoryField]
44706
- };
44707
- generateChartInstanceListByViewRange(datum, table, !1);
44708
- }), this.activeChartInstance.on("pointerout", {
44709
- markName: "pie"
44710
- }, params => {
44711
- var _a;
44712
- const categoryField = this.attribute.spec.categoryField,
44713
- datum = {
44714
- [categoryField]: null === (_a = null == params ? void 0 : params.datum) || void 0 === _a ? void 0 : _a[categoryField]
44715
- };
44716
- generateChartInstanceListByViewRange(datum, table, !0);
44717
- })), this.activeChartInstance.on("dimensionHover", params => {
44621
+ }), table.options.chartDimensionLinkage && this.activeChartInstance.on("dimensionHover", params => {
44718
44622
  var _a, _b;
44719
44623
  const dimensionInfo = null == params ? void 0 : params.dimensionInfo[0],
44720
44624
  canvasXY = null === (_a = null == params ? void 0 : params.event) || void 0 === _a ? void 0 : _a.canvas,
@@ -44777,13 +44681,12 @@
44777
44681
  }
44778
44682
  }
44779
44683
  }
44780
- })), null === (_k = (_j = table)._bindChartEvent) || void 0 === _k || _k.call(_j, this.activeChartInstance);
44684
+ }), null === (_e = (_d = table)._bindChartEvent) || void 0 === _e || _e.call(_d, this.activeChartInstance);
44781
44685
  }
44782
44686
  deactivate(table, {
44783
44687
  releaseChartInstance = !0,
44784
44688
  releaseColumnChartInstance = !0,
44785
- releaseRowChartInstance = !0,
44786
- releaseAllChartInstance = !1
44689
+ releaseRowChartInstance = !0
44787
44690
  } = {}) {
44788
44691
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
44789
44692
  if (this.activeChartInstanceHoverOnMark = null, this.justShowMarkTooltip = void 0, this.justShowMarkTooltipTimer = Date.now(), clearTimeout(this.delayRunDimensionHoverTimer), this.delayRunDimensionHoverTimer = void 0, releaseChartInstance) {
@@ -44805,7 +44708,7 @@
44805
44708
  } = this.parent;
44806
44709
  releaseColumnChartInstance && table.internalProps.layoutMap.isAxisCell(col, table.rowCount - table.bottomFrozenRowCount) && (null === (_h = null === (_g = table.scenegraph.getCell(col, table.rowCount - table.bottomFrozenRowCount).firstChild) || void 0 === _g ? void 0 : _g.hideLabelHoverOnAxis) || void 0 === _h || _h.call(_g)), releaseRowChartInstance && table.internalProps.layoutMap.isAxisCell(table.rowHeaderLevelCount - 1, row) && (null === (_k = null === (_j = table.scenegraph.getCell(table.rowHeaderLevelCount - 1, row).firstChild) || void 0 === _j ? void 0 : _j.hideLabelHoverOnAxis) || void 0 === _k || _k.call(_j));
44807
44710
  }
44808
- releaseAllChartInstance ? clearAllChartInstanceList(table) : (releaseColumnChartInstance && clearChartInstanceListByColumnDirection(this.parent.col, "scatter" === this.attribute.spec.type ? this.parent.row : void 0, table), releaseRowChartInstance && clearChartInstanceListByRowDirection(this.parent.row, "scatter" === this.attribute.spec.type ? this.parent.col : void 0, table));
44711
+ releaseColumnChartInstance && clearChartInstanceListByColumnDirection(this.parent.col, "scatter" === this.attribute.spec.type ? this.parent.row : void 0, table), releaseRowChartInstance && clearChartInstanceListByRowDirection(this.parent.row, "scatter" === this.attribute.spec.type ? this.parent.col : void 0, table);
44809
44712
  }
44810
44713
  updateData(data) {
44811
44714
  this.attribute.data = data;
@@ -44820,14 +44723,13 @@
44820
44723
  y1: y1,
44821
44724
  x2: x2,
44822
44725
  y2: y2
44823
- } = cellGroup.globalAABBBounds,
44824
- viewBox = {
44825
- x1: Math.ceil(x1 + padding[3] + table.scrollLeft + (null !== (_b = null === (_a = table.options.viewBox) || void 0 === _a ? void 0 : _a.x1) && void 0 !== _b ? _b : 0)),
44826
- x2: Math.ceil(x1 + cellGroup.attribute.width - padding[1] + table.scrollLeft + (null !== (_d = null === (_c = table.options.viewBox) || void 0 === _c ? void 0 : _c.x1) && void 0 !== _d ? _d : 0)),
44827
- y1: Math.ceil(y1 + padding[0] + table.scrollTop + (null !== (_f = null === (_e = table.options.viewBox) || void 0 === _e ? void 0 : _e.y1) && void 0 !== _f ? _f : 0)),
44828
- y2: Math.ceil(y1 + cellGroup.attribute.height - padding[2] + table.scrollTop + (null !== (_h = null === (_g = table.options.viewBox) || void 0 === _g ? void 0 : _g.y1) && void 0 !== _h ? _h : 0))
44829
- };
44830
- return this.activeChartInstance ? this.activeChartInstanceLastViewBox = viewBox : this.activeChartInstanceLastViewBox = null, viewBox;
44726
+ } = cellGroup.globalAABBBounds;
44727
+ return {
44728
+ x1: Math.ceil(x1 + padding[3] + table.scrollLeft + (null !== (_b = null === (_a = table.options.viewBox) || void 0 === _a ? void 0 : _a.x1) && void 0 !== _b ? _b : 0)),
44729
+ x2: Math.ceil(x1 + cellGroup.attribute.width - padding[1] + table.scrollLeft + (null !== (_d = null === (_c = table.options.viewBox) || void 0 === _c ? void 0 : _c.x1) && void 0 !== _d ? _d : 0)),
44730
+ y1: Math.ceil(y1 + padding[0] + table.scrollTop + (null !== (_f = null === (_e = table.options.viewBox) || void 0 === _e ? void 0 : _e.y1) && void 0 !== _f ? _f : 0)),
44731
+ y2: Math.ceil(y1 + cellGroup.attribute.height - padding[2] + table.scrollTop + (null !== (_h = null === (_g = table.options.viewBox) || void 0 === _g ? void 0 : _g.y1) && void 0 !== _h ? _h : 0))
44732
+ };
44831
44733
  }
44832
44734
  }
44833
44735
  function getTableBounds(col, row, table) {
@@ -45042,7 +44944,7 @@
45042
44944
  {
45043
44945
  width = groupAttribute.width,
45044
44946
  height = groupAttribute.height
45045
- } = chart.attribute,
44947
+ } = (chart.getViewBox(), chart.attribute),
45046
44948
  {
45047
44949
  table: table
45048
44950
  } = chart.getRootNode(),
@@ -45070,9 +44972,8 @@
45070
44972
  });
45071
44973
  }
45072
44974
  }
45073
- const lastViewBox = chart.activeChartInstanceLastViewBox,
45074
- viewBox = chart.getViewBox();
45075
- lastViewBox && viewBox.x1 === lastViewBox.x1 && viewBox.x2 === lastViewBox.x2 && viewBox.y1 === lastViewBox.y1 && viewBox.y2 === lastViewBox.y2 || activeChartInstance.updateViewBox({
44975
+ const viewBox = chart.getViewBox();
44976
+ activeChartInstance.updateViewBox({
45076
44977
  x1: 0,
45077
44978
  x2: viewBox.x2 - viewBox.x1,
45078
44979
  y1: 0,
@@ -48590,10 +48491,9 @@
48590
48491
  });
48591
48492
  }
48592
48493
  }
48593
- function updateChartState(scenegraph, datum, selectedDataMode) {
48494
+ function updateChartState(scenegraph, datum) {
48594
48495
  const table = scenegraph.table;
48595
48496
  if (table.isPivotChart()) {
48596
- table._selectedDataMode = selectedDataMode;
48597
48497
  const preSelectItemsCount = table._selectedDataItemsInChart.length;
48598
48498
  if ((null == datum || 0 === (null == datum ? void 0 : datum.length) || 0 === Object.keys(datum).length) && 0 === preSelectItemsCount) return;
48599
48499
  const newSelectedDataItemsInChart = [];
@@ -49341,22 +49241,16 @@
49341
49241
  resetResidentHoverIcon(col, row) {
49342
49242
  resetResidentHoverIcon(col, row, this);
49343
49243
  }
49344
- deactivateChart(col, row, forceRelease = !1) {
49345
- var _a, _b, _c, _d, _e, _f;
49244
+ deactivateChart(col, row) {
49245
+ var _a, _b, _c;
49346
49246
  if (-1 === col || -1 === row) return;
49347
49247
  const cellGroup = this.getCell(col, row);
49348
49248
  if (null === (_a = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _a ? void 0 : _a.deactivate) {
49349
- if (forceRelease) return void (null === (_c = null === (_b = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _b ? void 0 : _b.deactivate) || void 0 === _c || _c.call(_b, this.table, {
49350
- releaseChartInstance: !0,
49351
- releaseColumnChartInstance: !0,
49352
- releaseRowChartInstance: !0,
49353
- releaseAllChartInstance: !0
49354
- }));
49355
49249
  const chartType = (null == cellGroup ? void 0 : cellGroup.firstChild).attribute.spec.type;
49356
- null === (_e = null === (_d = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _d ? void 0 : _d.deactivate) || void 0 === _e || _e.call(_d, this.table, (null === (_f = this.table.options.chartDimensionLinkage) || void 0 === _f ? void 0 : _f.showTooltip) ? {
49357
- releaseChartInstance: "pie" !== chartType && ("scatter" === chartType ? col !== this.table.stateManager.hover.cellPos.col && row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount : this.table.options.indicatorsAsCol ? row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount : col !== this.table.stateManager.hover.cellPos.col || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount),
49358
- releaseColumnChartInstance: "pie" !== chartType && (col !== this.table.stateManager.hover.cellPos.col || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount),
49359
- releaseRowChartInstance: "pie" !== chartType && (row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount)
49250
+ null === (_c = null === (_b = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _b ? void 0 : _b.deactivate) || void 0 === _c || _c.call(_b, this.table, this.table.options.chartDimensionLinkage ? {
49251
+ releaseChartInstance: "scatter" === chartType ? col !== this.table.stateManager.hover.cellPos.col && row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount : this.table.options.indicatorsAsCol ? row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount : col !== this.table.stateManager.hover.cellPos.col || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount,
49252
+ releaseColumnChartInstance: col !== this.table.stateManager.hover.cellPos.col || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount,
49253
+ releaseRowChartInstance: row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount
49360
49254
  } : void 0);
49361
49255
  }
49362
49256
  }
@@ -49404,8 +49298,8 @@
49404
49298
  updateChartSizeForResizeRowHeight(row) {
49405
49299
  updateChartSizeForResizeRowHeight(this, row);
49406
49300
  }
49407
- updateChartState(datum, selectedDataMode) {
49408
- this.table.isPivotChart() && updateChartState(this, datum, selectedDataMode);
49301
+ updateChartState(datum) {
49302
+ this.table.isPivotChart() && updateChartState(this, datum);
49409
49303
  }
49410
49304
  updateCheckboxCellState(col, row, checked) {
49411
49305
  var _a, _b;
@@ -52432,7 +52326,7 @@
52432
52326
  }, 0 !== e.button) return;
52433
52327
  const eventArgsSet = getCellEventArgsSet(e);
52434
52328
  if (eventManager.downIcon = void 0, stateManager.interactionState !== InteractionState.default) return;
52435
- if (table.isPivotChart() && "chart" !== (null === (_a = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target.type) && table.scenegraph.updateChartState(null, void 0), (null === (_b = eventArgsSet.eventArgs) || void 0 === _b ? void 0 : _b.target) !== (null === (_c = stateManager.residentHoverIcon) || void 0 === _c ? void 0 : _c.icon) && stateManager.hideMenu(), "chart" === (null === (_d = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.target.type)) return;
52329
+ if (table.isPivotChart() && "chart" !== (null === (_a = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target.type) && table.scenegraph.updateChartState(null), (null === (_b = eventArgsSet.eventArgs) || void 0 === _b ? void 0 : _b.target) !== (null === (_c = stateManager.residentHoverIcon) || void 0 === _c ? void 0 : _c.icon) && stateManager.hideMenu(), "chart" === (null === (_d = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.target.type)) return;
52436
52330
  const isCompleteEdit = null === (_e = table.editorManager) || void 0 === _e ? void 0 : _e.completeEdit(e.nativeEvent);
52437
52331
  getPromiseValue(isCompleteEdit, isCompleteEdit => {
52438
52332
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
@@ -52460,7 +52354,7 @@
52460
52354
  }
52461
52355
  eventManager.dealTableHover(eventArgsSet);
52462
52356
  } else {
52463
- if (!eventManager.checkCellFillhandle(eventArgsSet) && (eventManager.checkColumnResize(eventArgsSet, !0) || eventManager.checkRowResize(eventArgsSet, !0))) return table.scenegraph.updateChartState(null, void 0), void stateManager.updateInteractionState(InteractionState.grabing);
52357
+ if (!eventManager.checkCellFillhandle(eventArgsSet) && (eventManager.checkColumnResize(eventArgsSet, !0) || eventManager.checkRowResize(eventArgsSet, !0))) return table.scenegraph.updateChartState(null), void stateManager.updateInteractionState(InteractionState.grabing);
52464
52358
  if (eventManager.checkColumnMover(eventArgsSet)) return void stateManager.updateInteractionState(InteractionState.grabing);
52465
52359
  if (eventManager.checkCellFillhandle(eventArgsSet, !0) && eventManager.dealFillSelect(eventArgsSet)) return void stateManager.updateInteractionState(InteractionState.grabing);
52466
52360
  eventManager.dealTableSelect(eventArgsSet) && stateManager.updateInteractionState(InteractionState.grabing);
@@ -52612,7 +52506,7 @@
52612
52506
  if (!(null === (_a = table.options.customConfig) || void 0 === _a ? void 0 : _a.selectCellWhenCellEditorNotExists) && !1 === isCompleteEdit) return;
52613
52507
  const hitIcon = (null === (_b = e.target.role) || void 0 === _b ? void 0 : _b.startsWith("icon")) ? e.target : void 0;
52614
52508
  if (eventManager.downIcon = hitIcon, "touch" === e.pointerType || hitIcon || eventManager.checkCellFillhandle(eventArgsSet) || stateManager.columnResize.resizing || !eventManager.checkColumnResize(eventArgsSet, !0)) ;else {
52615
- table.scenegraph.updateChartState(null, void 0), stateManager.updateInteractionState(InteractionState.grabing);
52509
+ table.scenegraph.updateChartState(null), stateManager.updateInteractionState(InteractionState.grabing);
52616
52510
  const {
52617
52511
  eventArgs: eventArgs
52618
52512
  } = eventArgsSet;
@@ -52631,7 +52525,7 @@
52631
52525
  if (table.eventManager.isDraging || !target || !target.isDescendantsOf(table.scenegraph.stage) && target.stage !== target || target.isDescendantsOf(table.scenegraph.tableGroup)) table.eventManager.isDraging && stateManager.isSelecting() && stateManager.endSelectCells();else {
52632
52526
  stateManager.updateInteractionState(InteractionState.default), eventManager.dealTableHover();
52633
52527
  const isHasSelected = !!(null === (_a = stateManager.select.ranges) || void 0 === _a ? void 0 : _a.length);
52634
- (null === (_b = table.options.customConfig) || void 0 === _b ? void 0 : _b.cancelSelectCellHook) ? (null === (_c = table.options.customConfig) || void 0 === _c ? void 0 : _c.cancelSelectCellHook(e)) && eventManager.dealTableSelect() : (null === (_e = null === (_d = table.options.select) || void 0 === _d ? void 0 : _d.blankAreaClickDeselect) || void 0 === _e || _e) && eventManager.dealTableSelect(), stateManager.endSelectCells(!0, isHasSelected), stateManager.updateCursor(), table.scenegraph.updateChartState(null, void 0);
52528
+ (null === (_b = table.options.customConfig) || void 0 === _b ? void 0 : _b.cancelSelectCellHook) ? (null === (_c = table.options.customConfig) || void 0 === _c ? void 0 : _c.cancelSelectCellHook(e)) && eventManager.dealTableSelect() : (null === (_e = null === (_d = table.options.select) || void 0 === _d ? void 0 : _d.blankAreaClickDeselect) || void 0 === _e || _e) && eventManager.dealTableSelect(), stateManager.endSelectCells(!0, isHasSelected), stateManager.updateCursor(), table.scenegraph.updateChartState(null);
52635
52529
  }
52636
52530
  }), table.scenegraph.stage.addEventListener("pointermove", e => {
52637
52531
  var _a, _b, _c;
@@ -52749,15 +52643,7 @@
52749
52643
  table.stateManager.setCheckedState(col, row, cellInfo.field, e.detail.checked), table.fireListeners(TABLE_EVENT_TYPE.SWITCH_STATE_CHANGE, cellsEvent), table.scenegraph.updateNextFrame();
52750
52644
  }), table.scenegraph.stage.addEventListener("wheel", e => {
52751
52645
  var _a;
52752
- if (!e.path.find(node => "legend" === node.name)) {
52753
- null === (_a = table.editorManager) || void 0 === _a || _a.completeEdit();
52754
- const {
52755
- cellPos: cellPos
52756
- } = table.stateManager.hover,
52757
- prevHoverCellCol = cellPos.col,
52758
- prevHoverCellRow = cellPos.row;
52759
- table.scenegraph.deactivateChart(prevHoverCellCol, prevHoverCellRow, !0), table.eventManager._enableTableScroll && handleWhell(e, stateManager);
52760
- }
52646
+ e.path.find(node => "legend" === node.name) || (null === (_a = table.editorManager) || void 0 === _a || _a.completeEdit(), table.eventManager._enableTableScroll && handleWhell(e, stateManager));
52761
52647
  });
52762
52648
  }
52763
52649
  function bindGesture(eventManager) {
@@ -53926,7 +53812,13 @@
53926
53812
  try {
53927
53813
  const selectCells = this.cutCellRange;
53928
53814
  if (!selectCells || 0 === selectCells.length) return;
53929
- for (let i = 0; i < selectCells.length; i++) for (let j = 0; j < selectCells[i].length; j++) selectCells[i][j] && table.changeCellValue(selectCells[i][j].col, selectCells[i][j].row, void 0);
53815
+ const changeValues = [];
53816
+ for (let i = 0; i < selectCells.length; i++) for (let j = 0; j < selectCells[i].length; j++) selectCells[i][j] && changeValues.push({
53817
+ col: selectCells[i][j].col,
53818
+ row: selectCells[i][j].row,
53819
+ value: void 0
53820
+ });
53821
+ table.changeCellValuesByIds(changeValues);
53930
53822
  } catch (error) {}
53931
53823
  }
53932
53824
  checkClipboardChanged() {
@@ -56169,7 +56061,7 @@
56169
56061
  }
56170
56062
  constructor(container, options = {}) {
56171
56063
  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;
56172
- if (super(), this.showFrozenIcon = !0, this.version = "1.22.11-alpha.0", 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");
56064
+ if (super(), this.showFrozenIcon = !0, this.version = "1.22.11-alpha.1", 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");
56173
56065
  this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
56174
56066
  options: options,
56175
56067
  container: container
@@ -59944,15 +59836,16 @@
59944
59836
  step((generator = generator.apply(thisArg, _arguments || [])).next());
59945
59837
  });
59946
59838
  };
59947
- function listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, table) {
59839
+ function listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, table, silentChangeCellValuesEvent) {
59948
59840
  if (workOnEditableCell && table.isHasEditorDefine(col, row) || !1 === workOnEditableCell) {
59949
- const recordIndex = table.getRecordShowIndexByCell(col, row),
59841
+ const recordShowIndex = table.getRecordShowIndexByCell(col, row),
59842
+ recordIndex = recordShowIndex >= 0 ? table.dataSource.getIndexKey(recordShowIndex) : void 0,
59950
59843
  {
59951
59844
  field: field
59952
59845
  } = table.internalProps.layoutMap.getBody(col, row),
59953
59846
  beforeChangeValue = table.getCellRawValue(col, row),
59954
59847
  oldValue = table.getCellOriginValue(col, row);
59955
- table.isHeader(col, row) ? table.internalProps.layoutMap.updateColumnTitle(col, row, value) : table.dataSource.changeFieldValue(value, recordIndex, field, col, row, table);
59848
+ table.isHeader(col, row) ? table.internalProps.layoutMap.updateColumnTitle(col, row, value) : table.dataSource.changeFieldValue(value, recordShowIndex, field, col, row, table);
59956
59849
  const range = table.getCellRange(col, row),
59957
59850
  aggregators = table.internalProps.layoutMap.getAggregatorsByCell(col, row);
59958
59851
  if (aggregators) {
@@ -59975,16 +59868,24 @@
59975
59868
  table.scenegraph.updateRowHeight(row, newHeight - oldHeight);
59976
59869
  }
59977
59870
  const changedValue = table.getCellOriginValue(col, row);
59978
- oldValue !== changedValue && triggerEvent && table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
59979
- col: col,
59980
- row: row,
59981
- rawValue: beforeChangeValue,
59982
- currentValue: oldValue,
59983
- changedValue: changedValue
59984
- }), table.scenegraph.updateNextFrame();
59871
+ if (oldValue !== changedValue && triggerEvent) {
59872
+ const changeValue = {
59873
+ col: col,
59874
+ row: row,
59875
+ recordIndex: recordIndex,
59876
+ field: field,
59877
+ rawValue: beforeChangeValue,
59878
+ currentValue: oldValue,
59879
+ changedValue: changedValue
59880
+ };
59881
+ table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, changeValue), silentChangeCellValuesEvent || table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, {
59882
+ values: [changeValue]
59883
+ });
59884
+ }
59885
+ table.scenegraph.updateNextFrame();
59985
59886
  }
59986
59887
  }
59987
- function listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, table) {
59888
+ function listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, table, silentChangeCellValuesEvent) {
59988
59889
  var _a, _b;
59989
59890
  return __awaiter(this, void 0, void 0, function* () {
59990
59891
  const changedCellResults = [];
@@ -60006,6 +59907,7 @@
60006
59907
  oldRowValues.push(oldValue);
60007
59908
  }
60008
59909
  }
59910
+ const resultChangeValues = [];
60009
59911
  for (let i = 0; i < values.length && !(startRow + i > table.rowCount - 1); i++) {
60010
59912
  changedCellResults[i] = [], pasteRowEnd = startRow + i;
60011
59913
  const rowValues = values[i];
@@ -60029,25 +59931,34 @@
60029
59931
  if (isCanChange) {
60030
59932
  changedCellResults[i][j] = !0;
60031
59933
  const value = rowValues[j],
60032
- recordIndex = table.getRecordShowIndexByCell(startCol + j, startRow + i),
59934
+ recordShowIndex = table.getRecordShowIndexByCell(startCol + j, startRow + i),
59935
+ recordIndex = recordShowIndex >= 0 ? table.dataSource.getIndexKey(recordShowIndex) : void 0,
60033
59936
  {
60034
59937
  field: field
60035
59938
  } = table.internalProps.layoutMap.getBody(startCol + j, startRow + i),
60036
59939
  beforeChangeValue = beforeChangeValues[i][j],
60037
59940
  oldValue = oldValues[i][j];
60038
- table.isHeader(startCol + j, startRow + i) ? table.internalProps.layoutMap.updateColumnTitle(startCol + j, startRow + i, value) : table.dataSource.changeFieldValue(value, recordIndex, field, startCol + j, startRow + i, table);
59941
+ table.isHeader(startCol + j, startRow + i) ? table.internalProps.layoutMap.updateColumnTitle(startCol + j, startRow + i, value) : table.dataSource.changeFieldValue(value, recordShowIndex, field, startCol + j, startRow + i, table);
60039
59942
  const changedValue = table.getCellOriginValue(startCol + j, startRow + i);
60040
- oldValue !== changedValue && triggerEvent && table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
60041
- col: startCol + j,
60042
- row: startRow + i,
60043
- rawValue: beforeChangeValue,
60044
- currentValue: oldValue,
60045
- changedValue: changedValue
60046
- });
59943
+ if (oldValue !== changedValue && triggerEvent) {
59944
+ const changeValue = {
59945
+ col: startCol + j,
59946
+ row: startRow + i,
59947
+ recordIndex: recordIndex,
59948
+ field: field,
59949
+ rawValue: beforeChangeValue,
59950
+ currentValue: oldValue,
59951
+ changedValue: changedValue
59952
+ };
59953
+ table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, changeValue), resultChangeValues.push(changeValue);
59954
+ }
60047
59955
  } else changedCellResults[i][j] = !1;
60048
59956
  }
60049
59957
  pasteColEnd = Math.max(pasteColEnd, thisRowPasteColEnd);
60050
59958
  }
59959
+ silentChangeCellValuesEvent || table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, {
59960
+ values: resultChangeValues
59961
+ });
60051
59962
  const startRange = table.getCellRange(startCol, startRow),
60052
59963
  range = table.getCellRange(pasteColEnd, pasteRowEnd),
60053
59964
  aggregators = table.internalProps.layoutMap.getAggregatorsByCellRange(startRange.start.col, startRange.start.row, range.end.col, range.end.row);
@@ -60081,6 +59992,36 @@
60081
59992
  return table.scenegraph.updateNextFrame(), changedCellResults;
60082
59993
  });
60083
59994
  }
59995
+ function listTableChangeCellValuesByIds(changeValues, triggerEvent, table, silentChangeCellValuesEvent) {
59996
+ return __awaiter(this, void 0, void 0, function* () {
59997
+ const resultChangeValues = [];
59998
+ for (let i = 0; i < changeValues.length; i++) {
59999
+ const {
60000
+ col: col,
60001
+ row: row,
60002
+ value: value
60003
+ } = changeValues[i],
60004
+ recordShowIndex = table.getRecordShowIndexByCell(col, row),
60005
+ recordIndex = recordShowIndex >= 0 ? table.dataSource.getIndexKey(recordShowIndex) : void 0,
60006
+ {
60007
+ field: field
60008
+ } = table.internalProps.layoutMap.getBody(col, row),
60009
+ oldValue = table.getCellOriginValue(col, row);
60010
+ listTableChangeCellValue(col, row, value, !1, triggerEvent, table, !0), oldValue !== value && triggerEvent && resultChangeValues.push({
60011
+ col: col,
60012
+ row: row,
60013
+ recordIndex: recordIndex,
60014
+ field: field,
60015
+ rawValue: oldValue,
60016
+ currentValue: oldValue,
60017
+ changedValue: value
60018
+ });
60019
+ }
60020
+ silentChangeCellValuesEvent || table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, {
60021
+ values: resultChangeValues
60022
+ });
60023
+ });
60024
+ }
60084
60025
  function getCellUpdateType(col, row, table, oldCellUpdateType) {
60085
60026
  if ("group" === oldCellUpdateType) return oldCellUpdateType;
60086
60027
  if ("sort" === oldCellUpdateType && !table.internalProps.groupBy) return oldCellUpdateType;
@@ -61244,11 +61185,37 @@
61244
61185
  }
61245
61186
  return isValid$1(editorDefine);
61246
61187
  }
61247
- changeCellValue(col, row, value, workOnEditableCell = !1, triggerEvent = !0) {
61248
- return listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, this);
61249
- }
61250
- changeCellValues(startCol, startRow, values, workOnEditableCell = !1, triggerEvent = !0) {
61251
- return listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, this);
61188
+ changeCellValue(col, row, value, workOnEditableCell = !1, triggerEvent = !0, silentChangeCellValuesEvent) {
61189
+ return listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, this, silentChangeCellValuesEvent);
61190
+ }
61191
+ changeCellValues(startCol, startRow, values, workOnEditableCell = !1, triggerEvent = !0, silentChangeCellValuesEvent) {
61192
+ return listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, this, silentChangeCellValuesEvent);
61193
+ }
61194
+ changeCellValuesByIds(changeValues, triggerEvent = !0, silentChangeCellValuesEvent) {
61195
+ return listTableChangeCellValuesByIds(changeValues, triggerEvent, this, silentChangeCellValuesEvent);
61196
+ }
61197
+ changeSourceCellValue(recordIndex, field, value) {
61198
+ const tableIndex = this.getTableIndexByRecordIndex(recordIndex),
61199
+ cellAddr = this.getCellAddrByFieldRecord(field, recordIndex);
61200
+ if (tableIndex < 0 || cellAddr.col < 0 || cellAddr.row < 0) return;
61201
+ this.dataSource.changeFieldValue(value, tableIndex, field, cellAddr.col, cellAddr.row, this);
61202
+ const beforeChangeValue = this.getCellRawValue(cellAddr.col, cellAddr.row),
61203
+ oldValue = this.getCellOriginValue(cellAddr.col, cellAddr.row),
61204
+ changedValue = this.getCellOriginValue(cellAddr.col, cellAddr.row);
61205
+ if (oldValue !== changedValue) {
61206
+ const changeValue = {
61207
+ col: cellAddr.col,
61208
+ row: cellAddr.row,
61209
+ recordIndex: recordIndex,
61210
+ field: field,
61211
+ rawValue: beforeChangeValue,
61212
+ currentValue: oldValue,
61213
+ changedValue: changedValue
61214
+ };
61215
+ this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, changeValue), this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, {
61216
+ values: [changeValue]
61217
+ });
61218
+ }
61252
61219
  }
61253
61220
  addRecord(record, recordIndex) {
61254
61221
  var _a;
@@ -61270,11 +61237,16 @@
61270
61237
  }
61271
61238
  deleteRecords(recordIndexs) {
61272
61239
  var _a;
61273
- listTableDeleteRecords(recordIndexs, this), adjustHeightResizedRowMapWithDeleteRecordIndex(this, recordIndexs), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible();
61240
+ const deletedRecords = [];
61241
+ (null == recordIndexs ? void 0 : recordIndexs.length) > 0 && recordIndexs.forEach(index => {
61242
+ let record = null;
61243
+ record = "number" == typeof index ? this.dataSource.get(index) : [], deletedRecords.push(record);
61244
+ }), listTableDeleteRecords(recordIndexs, this), adjustHeightResizedRowMapWithDeleteRecordIndex(this, recordIndexs), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible();
61274
61245
  const rowIndexs = [];
61275
61246
  for (let i = 0; i < recordIndexs.length; i++) rowIndexs.push(this.getBodyRowIndexByRecordIndex(recordIndexs[i]) + this.columnHeaderLevelCount);
61276
61247
  this.fireListeners(TABLE_EVENT_TYPE.DELETE_RECORD, {
61277
61248
  recordIndexs: recordIndexs,
61249
+ records: deletedRecords,
61278
61250
  rowIndexs: rowIndexs,
61279
61251
  deletedCount: (Array.isArray(recordIndexs[0]), recordIndexs.length)
61280
61252
  });