@visactor/vtable-gantt 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.
@@ -38455,24 +38455,6 @@
38455
38455
  }, delay));
38456
38456
  };
38457
38457
  }
38458
- function cancellableThrottle(func, delay) {
38459
- let timer = null,
38460
- lastArgs = null,
38461
- context = null;
38462
- return {
38463
- throttled: function (...args) {
38464
- lastArgs = args, context = this, timer || (timer = setTimeout(() => {
38465
- lastArgs && func.apply(context, lastArgs), timer = null, lastArgs = null, context = null;
38466
- }, delay));
38467
- },
38468
- cancel: () => {
38469
- timer && (clearTimeout(timer), timer = null, lastArgs = null, context = null);
38470
- },
38471
- flush: () => {
38472
- timer && lastArgs && (clearTimeout(timer), func.apply(context, lastArgs), timer = null, lastArgs = null, context = null);
38473
- }
38474
- };
38475
- }
38476
38458
  function pad(num, totalChars) {
38477
38459
  for (num = `${num}`; num.length < totalChars;) num = "0" + num;
38478
38460
  return num;
@@ -38736,6 +38718,7 @@
38736
38718
  AFTER_UPDATE_CELL_CONTENT_WIDTH: "after_update_cell_content_width",
38737
38719
  AFTER_UPDATE_SELECT_BORDER_HEIGHT: "after_update_select_border_height",
38738
38720
  CHANGE_CELL_VALUE: "change_cell_value",
38721
+ CHANGE_CELL_VALUES: "change_cell_values",
38739
38722
  DRAG_FILL_HANDLE_END: "drag_fill_handle_end",
38740
38723
  MOUSEDOWN_FILL_HANDLE: "mousedown_fill_handle",
38741
38724
  DBLCLICK_FILL_HANDLE: "dblclick_fill_handle",
@@ -47620,26 +47603,48 @@
47620
47603
  const cellGroup = table.scenegraph.getCell(col, i),
47621
47604
  chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
47622
47605
  chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListColumnByColumnDirection[col][i] || isValid$1(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance), setTimeout(() => {
47623
- var _a, _b, _c, _d;
47606
+ var _a, _b, _c, _d, _e, _f;
47624
47607
  if (null === (_a = chartInstanceListColumnByColumnDirection[col]) || void 0 === _a ? void 0 : _a[i]) {
47625
47608
  const chartDimensionLinkage = table.options.chartDimensionLinkage;
47626
47609
  let isShowTooltip = !isScatter;
47627
- 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 {
47628
- const cellBoundry = table.getCellRelativeRect(col, i),
47629
- bodyBoundryTop = table.frozenRowCount ? table.getCellRelativeRect(col, table.frozenRowCount - 1).bottom : 0,
47610
+ if (!isScatter && "object" == typeof chartDimensionLinkage) if (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === rowEnd && isShowTooltip) {
47611
+ const heightLimitToShowTooltipForEdgeRow = null !== (_c = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _c ? _c : 0,
47612
+ {
47613
+ rowEnd: rowEnd1
47614
+ } = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
47615
+ if (rowEnd1 === rowEnd) isShowTooltip = !0;else {
47616
+ const {
47617
+ rowEnd: rowEnd2
47618
+ } = table.getBodyVisibleRowRange(0, 5);
47619
+ isShowTooltip = rowEnd2 !== rowEnd;
47620
+ }
47621
+ } else if (i === rowStart && isShowTooltip) {
47622
+ const heightLimitToShowTooltipForEdgeRow = null !== (_d = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _d ? _d : 0,
47623
+ {
47624
+ rowStart: rowStart1
47625
+ } = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
47626
+ if (rowStart1 === rowStart) isShowTooltip = !0;else {
47627
+ const {
47628
+ rowStart: rowStart2
47629
+ } = table.getBodyVisibleRowRange(0, -5);
47630
+ isShowTooltip = rowStart2 !== rowStart;
47631
+ }
47632
+ }
47633
+ 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 {
47634
+ const bodyBoundryTop = table.frozenRowCount ? table.getCellRelativeRect(col, table.frozenRowCount - 1).bottom : 0,
47630
47635
  absolutePositionTop = Math.max(bodyBoundryTop, table.getCellRelativeRect(col, i).top);
47631
47636
  hideTooltip ? (table.stateManager.hover.cellPos.col === col && table.stateManager.hover.cellPos.row === i || chartInstanceListColumnByColumnDirection[col][i].hideTooltip(), chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
47632
47637
  tooltip: !1,
47633
47638
  showTooltipOption: {
47634
- x: canvasXY.x - cellBoundry.left,
47635
- y: absolutePositionTop - cellBoundry.top,
47639
+ x: canvasXY.x,
47640
+ y: absolutePositionTop,
47636
47641
  activeType: "dimension"
47637
47642
  }
47638
47643
  })) : chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
47639
47644
  tooltip: isShowTooltip,
47640
47645
  showTooltipOption: {
47641
- x: canvasXY.x - cellBoundry.left,
47642
- y: absolutePositionTop - cellBoundry.top,
47646
+ x: canvasXY.x,
47647
+ y: absolutePositionTop,
47643
47648
  activeType: "dimension"
47644
47649
  }
47645
47650
  });
@@ -47680,22 +47685,44 @@
47680
47685
  if (null === (_a = chartInstanceListRowByRowDirection[row]) || void 0 === _a ? void 0 : _a[i]) {
47681
47686
  const chartDimensionLinkage = table.options.chartDimensionLinkage;
47682
47687
  let isShowTooltip = !isScatter;
47683
- 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 {
47684
- const cellBoundry = table.getCellRelativeRect(i, row),
47685
- bodyBoundryLeft = table.frozenColCount ? table.getCellRelativeRect(table.frozenColCount - 1, row).right : 0,
47688
+ if (!isScatter && "object" == typeof chartDimensionLinkage) if (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === colEnd && isShowTooltip) {
47689
+ const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
47690
+ {
47691
+ colEnd: colEnd1
47692
+ } = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
47693
+ if (colEnd1 === colEnd) isShowTooltip = !0;else {
47694
+ const {
47695
+ colEnd: colEnd2
47696
+ } = table.getBodyVisibleColRange(0, 5);
47697
+ isShowTooltip = colEnd2 !== colEnd;
47698
+ }
47699
+ } else if (i === colStart && isShowTooltip) {
47700
+ const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
47701
+ {
47702
+ colStart: colStart1
47703
+ } = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
47704
+ if (colStart1 === colStart) isShowTooltip = !0;else {
47705
+ const {
47706
+ colStart: colStart2
47707
+ } = table.getBodyVisibleColRange(0, -5);
47708
+ isShowTooltip = colStart2 !== colStart;
47709
+ }
47710
+ }
47711
+ 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 {
47712
+ const bodyBoundryLeft = table.frozenColCount ? table.getCellRelativeRect(table.frozenColCount - 1, row).right : 0,
47686
47713
  absolutePositionLeft = Math.max(bodyBoundryLeft, table.getCellRelativeRect(i, row).left);
47687
47714
  hideTooltip ? (table.stateManager.hover.cellPos.col === i && table.stateManager.hover.cellPos.row === row || chartInstanceListRowByRowDirection[row][i].hideTooltip(), chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
47688
47715
  tooltip: !1,
47689
47716
  showTooltipOption: {
47690
- x: absolutePositionLeft - cellBoundry.left,
47691
- y: canvasXY.y - cellBoundry.top,
47717
+ x: absolutePositionLeft,
47718
+ y: canvasXY.y,
47692
47719
  activeType: "dimension"
47693
47720
  }
47694
47721
  })) : chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
47695
47722
  tooltip: isShowTooltip,
47696
47723
  showTooltipOption: {
47697
- x: absolutePositionLeft - cellBoundry.left,
47698
- y: canvasXY.y - cellBoundry.top,
47724
+ x: absolutePositionLeft,
47725
+ y: canvasXY.y,
47699
47726
  activeType: "dimension"
47700
47727
  }
47701
47728
  });
@@ -47704,103 +47731,6 @@
47704
47731
  }, 0), table.scenegraph.updateNextFrame();
47705
47732
  }
47706
47733
  }
47707
- function generateChartInstanceListByViewRange(datum, table, deactivate = !1) {
47708
- var _a;
47709
- const {
47710
- rowStart: rowStart
47711
- } = table.getBodyVisibleRowRange();
47712
- let rowEnd = table.getBodyVisibleRowRange().rowEnd;
47713
- rowEnd = Math.min(table.rowCount - 1 - table.bottomFrozenRowCount, rowEnd);
47714
- const {
47715
- colStart: colStart
47716
- } = table.getBodyVisibleColRange();
47717
- let colEnd = table.getBodyVisibleColRange().colEnd;
47718
- colEnd = Math.min(table.colCount - 1 - table.rightFrozenColCount, colEnd);
47719
- for (let col = colStart; col <= colEnd; col++) {
47720
- isValid$1(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
47721
- for (let i = rowStart; i <= rowEnd; i++) {
47722
- const cellGroup = table.scenegraph.getCell(col, i),
47723
- chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
47724
- 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(() => {
47725
- var _a, _b;
47726
- if (null === (_a = chartInstanceListColumnByColumnDirection[col]) || void 0 === _a ? void 0 : _a[i]) {
47727
- const chartDimensionLinkage = table.options.chartDimensionLinkage;
47728
- let isShowTooltip = !0;
47729
- "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, {
47730
- activeType: "mark"
47731
- })));
47732
- }
47733
- }, 0), table.scenegraph.updateNextFrame();
47734
- }
47735
- }
47736
- }
47737
- function checkIsShowTooltipForEdgeRow(row, table) {
47738
- var _a, _b;
47739
- let isShowTooltip = !0;
47740
- const {
47741
- rowStart: rowStart
47742
- } = table.getBodyVisibleRowRange();
47743
- let rowEnd = table.getBodyVisibleRowRange().rowEnd;
47744
- rowEnd = Math.min(table.rowCount - 1 - table.bottomFrozenRowCount, rowEnd);
47745
- const chartDimensionLinkage = table.options.chartDimensionLinkage;
47746
- if (row === rowEnd && isShowTooltip) {
47747
- const heightLimitToShowTooltipForEdgeRow = null !== (_a = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _a ? _a : 0,
47748
- {
47749
- rowEnd: rowEnd1
47750
- } = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
47751
- if (rowEnd1 === rowEnd) isShowTooltip = !0;else {
47752
- const {
47753
- rowEnd: rowEnd2
47754
- } = table.getBodyVisibleRowRange(0, 5);
47755
- isShowTooltip = rowEnd2 !== rowEnd;
47756
- }
47757
- } else if (row === rowStart && isShowTooltip) {
47758
- const heightLimitToShowTooltipForEdgeRow = null !== (_b = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _b ? _b : 0,
47759
- {
47760
- rowStart: rowStart1
47761
- } = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
47762
- if (rowStart1 === rowStart) isShowTooltip = !0;else {
47763
- const {
47764
- rowStart: rowStart2
47765
- } = table.getBodyVisibleRowRange(0, -5);
47766
- isShowTooltip = rowStart2 !== rowStart;
47767
- }
47768
- }
47769
- return isShowTooltip;
47770
- }
47771
- function checkIsShowTooltipForEdgeColumn(col, table) {
47772
- let isShowTooltip = !0;
47773
- const {
47774
- colStart: colStart
47775
- } = table.getBodyVisibleColRange();
47776
- let colEnd = table.getBodyVisibleColRange().colEnd;
47777
- colEnd = Math.min(table.colCount - 1 - table.rightFrozenColCount, colEnd);
47778
- const chartDimensionLinkage = table.options.chartDimensionLinkage;
47779
- if (col === colEnd && isShowTooltip) {
47780
- const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
47781
- {
47782
- colEnd: colEnd1
47783
- } = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
47784
- if (colEnd1 === colEnd) isShowTooltip = !0;else {
47785
- const {
47786
- colEnd: colEnd2
47787
- } = table.getBodyVisibleColRange(0, 5);
47788
- isShowTooltip = colEnd2 !== colEnd;
47789
- }
47790
- } else if (col === colStart && isShowTooltip) {
47791
- const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
47792
- {
47793
- colStart: colStart1
47794
- } = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
47795
- if (colStart1 === colStart) isShowTooltip = !0;else {
47796
- const {
47797
- colStart: colStart2
47798
- } = table.getBodyVisibleColRange(0, -5);
47799
- isShowTooltip = colStart2 !== colStart;
47800
- }
47801
- }
47802
- return isShowTooltip;
47803
- }
47804
47734
  function clearChartInstanceListByRowDirection(row, excludedCol, table) {
47805
47735
  var _a;
47806
47736
  if (isValid$1(chartInstanceListRowByRowDirection[row])) for (const i in chartInstanceListRowByRowDirection[row]) {
@@ -47815,10 +47745,6 @@
47815
47745
  }
47816
47746
  delete chartInstanceListRowByRowDirection[row];
47817
47747
  }
47818
- function clearAllChartInstanceList(table) {
47819
- for (const col in chartInstanceListColumnByColumnDirection) clearChartInstanceListByColumnDirection(Number(col), void 0, table);
47820
- for (const row in chartInstanceListRowByRowDirection) clearChartInstanceListByRowDirection(Number(row), void 0, table);
47821
- }
47822
47748
 
47823
47749
  function isValidAlignDomain(domain) {
47824
47750
  return 2 === domain.length && isValidNumber$1(domain[0]) && isValidNumber$1(domain[1]) && domain[1] >= domain[0];
@@ -48452,7 +48378,7 @@
48452
48378
  const CHART_NUMBER_TYPE = genNumberType();
48453
48379
  class Chart extends Rect$2 {
48454
48380
  constructor(isShareChartSpec, params) {
48455
- 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 {
48381
+ 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 {
48456
48382
  const chartInstance = this.chartInstance = new params.ClassType(params.spec, merge({}, this.attribute.tableChartOption, {
48457
48383
  renderCanvas: params.canvas,
48458
48384
  mode: "node" === this.attribute.mode ? "node" : "desktop-browser",
@@ -48473,7 +48399,7 @@
48473
48399
  }
48474
48400
  }
48475
48401
  activate(table) {
48476
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
48402
+ var _a, _b, _c, _d, _e;
48477
48403
  if (this.activeChartInstance) return;
48478
48404
  const {
48479
48405
  col: col,
@@ -48526,7 +48452,7 @@
48526
48452
  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());
48527
48453
  }
48528
48454
  },
48529
- componentShowContent: (null === (_b = table.options.chartDimensionLinkage) || void 0 === _b ? void 0 : _b.showTooltip) && "scatter" !== this.attribute.spec.type ? {
48455
+ componentShowContent: table.options.chartDimensionLinkage && "scatter" !== this.attribute.spec.type ? {
48530
48456
  tooltip: {
48531
48457
  dimension: !1,
48532
48458
  mark: !0
@@ -48537,37 +48463,15 @@
48537
48463
  const chartStage = this.activeChartInstance.getStage(),
48538
48464
  matrix = this.globalTransMatrix.clone(),
48539
48465
  stageMatrix = this.stage.window.getViewBoxTransform();
48540
- let brushChangeThrottle;
48541
- 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 => {
48466
+ 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 => {
48542
48467
  var _a;
48543
- !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");
48544
- }), (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 => {
48468
+ !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);
48469
+ }), this.activeChartInstance.on("brushEnd", params => {
48545
48470
  var _a;
48546
- brushChangeThrottle.throttled(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData, "brush");
48547
- })), this.activeChartInstance.on("brushEnd", params => {
48548
- var _a;
48549
- 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(() => {
48471
+ table.scenegraph.updateChartState(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData), Chart.temp = 0, setTimeout(() => {
48550
48472
  Chart.temp = 1;
48551
48473
  }, 0);
48552
- }), (null === (_h = table.options.chartDimensionLinkage) || void 0 === _h ? void 0 : _h.showTooltip) && ("pie" === this.attribute.spec.type && (this.activeChartInstance.on("pointerover", {
48553
- markName: "pie"
48554
- }, params => {
48555
- var _a;
48556
- const categoryField = this.attribute.spec.categoryField,
48557
- datum = {
48558
- [categoryField]: null === (_a = null == params ? void 0 : params.datum) || void 0 === _a ? void 0 : _a[categoryField]
48559
- };
48560
- generateChartInstanceListByViewRange(datum, table, !1);
48561
- }), this.activeChartInstance.on("pointerout", {
48562
- markName: "pie"
48563
- }, params => {
48564
- var _a;
48565
- const categoryField = this.attribute.spec.categoryField,
48566
- datum = {
48567
- [categoryField]: null === (_a = null == params ? void 0 : params.datum) || void 0 === _a ? void 0 : _a[categoryField]
48568
- };
48569
- generateChartInstanceListByViewRange(datum, table, !0);
48570
- })), this.activeChartInstance.on("dimensionHover", params => {
48474
+ }), table.options.chartDimensionLinkage && this.activeChartInstance.on("dimensionHover", params => {
48571
48475
  var _a, _b;
48572
48476
  const dimensionInfo = null == params ? void 0 : params.dimensionInfo[0],
48573
48477
  canvasXY = null === (_a = null == params ? void 0 : params.event) || void 0 === _a ? void 0 : _a.canvas,
@@ -48630,13 +48534,12 @@
48630
48534
  }
48631
48535
  }
48632
48536
  }
48633
- })), null === (_k = (_j = table)._bindChartEvent) || void 0 === _k || _k.call(_j, this.activeChartInstance);
48537
+ }), null === (_e = (_d = table)._bindChartEvent) || void 0 === _e || _e.call(_d, this.activeChartInstance);
48634
48538
  }
48635
48539
  deactivate(table, {
48636
48540
  releaseChartInstance = !0,
48637
48541
  releaseColumnChartInstance = !0,
48638
- releaseRowChartInstance = !0,
48639
- releaseAllChartInstance = !1
48542
+ releaseRowChartInstance = !0
48640
48543
  } = {}) {
48641
48544
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
48642
48545
  if (this.activeChartInstanceHoverOnMark = null, this.justShowMarkTooltip = void 0, this.justShowMarkTooltipTimer = Date.now(), clearTimeout(this.delayRunDimensionHoverTimer), this.delayRunDimensionHoverTimer = void 0, releaseChartInstance) {
@@ -48658,7 +48561,7 @@
48658
48561
  } = this.parent;
48659
48562
  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));
48660
48563
  }
48661
- 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));
48564
+ 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);
48662
48565
  }
48663
48566
  updateData(data) {
48664
48567
  this.attribute.data = data;
@@ -48673,14 +48576,13 @@
48673
48576
  y1: y1,
48674
48577
  x2: x2,
48675
48578
  y2: y2
48676
- } = cellGroup.globalAABBBounds,
48677
- viewBox = {
48678
- 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)),
48679
- 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)),
48680
- 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)),
48681
- 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))
48682
- };
48683
- return this.activeChartInstance ? this.activeChartInstanceLastViewBox = viewBox : this.activeChartInstanceLastViewBox = null, viewBox;
48579
+ } = cellGroup.globalAABBBounds;
48580
+ return {
48581
+ 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)),
48582
+ 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)),
48583
+ 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)),
48584
+ 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))
48585
+ };
48684
48586
  }
48685
48587
  }
48686
48588
  function getTableBounds(col, row, table) {
@@ -48895,7 +48797,7 @@
48895
48797
  {
48896
48798
  width = groupAttribute.width,
48897
48799
  height = groupAttribute.height
48898
- } = chart.attribute,
48800
+ } = (chart.getViewBox(), chart.attribute),
48899
48801
  {
48900
48802
  table: table
48901
48803
  } = chart.getRootNode(),
@@ -48923,9 +48825,8 @@
48923
48825
  });
48924
48826
  }
48925
48827
  }
48926
- const lastViewBox = chart.activeChartInstanceLastViewBox,
48927
- viewBox = chart.getViewBox();
48928
- lastViewBox && viewBox.x1 === lastViewBox.x1 && viewBox.x2 === lastViewBox.x2 && viewBox.y1 === lastViewBox.y1 && viewBox.y2 === lastViewBox.y2 || activeChartInstance.updateViewBox({
48828
+ const viewBox = chart.getViewBox();
48829
+ activeChartInstance.updateViewBox({
48929
48830
  x1: 0,
48930
48831
  x2: viewBox.x2 - viewBox.x1,
48931
48832
  y1: 0,
@@ -52443,10 +52344,9 @@
52443
52344
  });
52444
52345
  }
52445
52346
  }
52446
- function updateChartState(scenegraph, datum, selectedDataMode) {
52347
+ function updateChartState(scenegraph, datum) {
52447
52348
  const table = scenegraph.table;
52448
52349
  if (table.isPivotChart()) {
52449
- table._selectedDataMode = selectedDataMode;
52450
52350
  const preSelectItemsCount = table._selectedDataItemsInChart.length;
52451
52351
  if ((null == datum || 0 === (null == datum ? void 0 : datum.length) || 0 === Object.keys(datum).length) && 0 === preSelectItemsCount) return;
52452
52352
  const newSelectedDataItemsInChart = [];
@@ -53194,22 +53094,16 @@
53194
53094
  resetResidentHoverIcon(col, row) {
53195
53095
  resetResidentHoverIcon(col, row, this);
53196
53096
  }
53197
- deactivateChart(col, row, forceRelease = !1) {
53198
- var _a, _b, _c, _d, _e, _f;
53097
+ deactivateChart(col, row) {
53098
+ var _a, _b, _c;
53199
53099
  if (-1 === col || -1 === row) return;
53200
53100
  const cellGroup = this.getCell(col, row);
53201
53101
  if (null === (_a = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _a ? void 0 : _a.deactivate) {
53202
- 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, {
53203
- releaseChartInstance: !0,
53204
- releaseColumnChartInstance: !0,
53205
- releaseRowChartInstance: !0,
53206
- releaseAllChartInstance: !0
53207
- }));
53208
53102
  const chartType = (null == cellGroup ? void 0 : cellGroup.firstChild).attribute.spec.type;
53209
- 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) ? {
53210
- 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),
53211
- 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),
53212
- 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)
53103
+ 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 ? {
53104
+ 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,
53105
+ 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,
53106
+ 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
53213
53107
  } : void 0);
53214
53108
  }
53215
53109
  }
@@ -53257,8 +53151,8 @@
53257
53151
  updateChartSizeForResizeRowHeight(row) {
53258
53152
  updateChartSizeForResizeRowHeight(this, row);
53259
53153
  }
53260
- updateChartState(datum, selectedDataMode) {
53261
- this.table.isPivotChart() && updateChartState(this, datum, selectedDataMode);
53154
+ updateChartState(datum) {
53155
+ this.table.isPivotChart() && updateChartState(this, datum);
53262
53156
  }
53263
53157
  updateCheckboxCellState(col, row, checked) {
53264
53158
  var _a, _b;
@@ -56285,7 +56179,7 @@
56285
56179
  }, 0 !== e.button) return;
56286
56180
  const eventArgsSet = getCellEventArgsSet(e);
56287
56181
  if (eventManager.downIcon = void 0, stateManager.interactionState !== InteractionState.default) return;
56288
- 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;
56182
+ 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;
56289
56183
  const isCompleteEdit = null === (_e = table.editorManager) || void 0 === _e ? void 0 : _e.completeEdit(e.nativeEvent);
56290
56184
  getPromiseValue(isCompleteEdit, isCompleteEdit => {
56291
56185
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
@@ -56313,7 +56207,7 @@
56313
56207
  }
56314
56208
  eventManager.dealTableHover(eventArgsSet);
56315
56209
  } else {
56316
- if (!eventManager.checkCellFillhandle(eventArgsSet) && (eventManager.checkColumnResize(eventArgsSet, !0) || eventManager.checkRowResize(eventArgsSet, !0))) return table.scenegraph.updateChartState(null, void 0), void stateManager.updateInteractionState(InteractionState.grabing);
56210
+ if (!eventManager.checkCellFillhandle(eventArgsSet) && (eventManager.checkColumnResize(eventArgsSet, !0) || eventManager.checkRowResize(eventArgsSet, !0))) return table.scenegraph.updateChartState(null), void stateManager.updateInteractionState(InteractionState.grabing);
56317
56211
  if (eventManager.checkColumnMover(eventArgsSet)) return void stateManager.updateInteractionState(InteractionState.grabing);
56318
56212
  if (eventManager.checkCellFillhandle(eventArgsSet, !0) && eventManager.dealFillSelect(eventArgsSet)) return void stateManager.updateInteractionState(InteractionState.grabing);
56319
56213
  eventManager.dealTableSelect(eventArgsSet) && stateManager.updateInteractionState(InteractionState.grabing);
@@ -56465,7 +56359,7 @@
56465
56359
  if (!(null === (_a = table.options.customConfig) || void 0 === _a ? void 0 : _a.selectCellWhenCellEditorNotExists) && !1 === isCompleteEdit) return;
56466
56360
  const hitIcon = (null === (_b = e.target.role) || void 0 === _b ? void 0 : _b.startsWith("icon")) ? e.target : void 0;
56467
56361
  if (eventManager.downIcon = hitIcon, "touch" === e.pointerType || hitIcon || eventManager.checkCellFillhandle(eventArgsSet) || stateManager.columnResize.resizing || !eventManager.checkColumnResize(eventArgsSet, !0)) ;else {
56468
- table.scenegraph.updateChartState(null, void 0), stateManager.updateInteractionState(InteractionState.grabing);
56362
+ table.scenegraph.updateChartState(null), stateManager.updateInteractionState(InteractionState.grabing);
56469
56363
  const {
56470
56364
  eventArgs: eventArgs
56471
56365
  } = eventArgsSet;
@@ -56484,7 +56378,7 @@
56484
56378
  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 {
56485
56379
  stateManager.updateInteractionState(InteractionState.default), eventManager.dealTableHover();
56486
56380
  const isHasSelected = !!(null === (_a = stateManager.select.ranges) || void 0 === _a ? void 0 : _a.length);
56487
- (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);
56381
+ (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);
56488
56382
  }
56489
56383
  }), table.scenegraph.stage.addEventListener("pointermove", e => {
56490
56384
  var _a, _b, _c;
@@ -56602,15 +56496,7 @@
56602
56496
  table.stateManager.setCheckedState(col, row, cellInfo.field, e.detail.checked), table.fireListeners(TABLE_EVENT_TYPE.SWITCH_STATE_CHANGE, cellsEvent), table.scenegraph.updateNextFrame();
56603
56497
  }), table.scenegraph.stage.addEventListener("wheel", e => {
56604
56498
  var _a;
56605
- if (!e.path.find(node => "legend" === node.name)) {
56606
- null === (_a = table.editorManager) || void 0 === _a || _a.completeEdit();
56607
- const {
56608
- cellPos: cellPos
56609
- } = table.stateManager.hover,
56610
- prevHoverCellCol = cellPos.col,
56611
- prevHoverCellRow = cellPos.row;
56612
- table.scenegraph.deactivateChart(prevHoverCellCol, prevHoverCellRow, !0), table.eventManager._enableTableScroll && handleWhell(e, stateManager);
56613
- }
56499
+ e.path.find(node => "legend" === node.name) || (null === (_a = table.editorManager) || void 0 === _a || _a.completeEdit(), table.eventManager._enableTableScroll && handleWhell(e, stateManager));
56614
56500
  });
56615
56501
  }
56616
56502
  function bindGesture(eventManager) {
@@ -57779,7 +57665,13 @@
57779
57665
  try {
57780
57666
  const selectCells = this.cutCellRange;
57781
57667
  if (!selectCells || 0 === selectCells.length) return;
57782
- 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);
57668
+ const changeValues = [];
57669
+ for (let i = 0; i < selectCells.length; i++) for (let j = 0; j < selectCells[i].length; j++) selectCells[i][j] && changeValues.push({
57670
+ col: selectCells[i][j].col,
57671
+ row: selectCells[i][j].row,
57672
+ value: void 0
57673
+ });
57674
+ table.changeCellValuesByIds(changeValues);
57783
57675
  } catch (error) {}
57784
57676
  }
57785
57677
  checkClipboardChanged() {
@@ -60022,7 +59914,7 @@
60022
59914
  }
60023
59915
  constructor(container, options = {}) {
60024
59916
  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;
60025
- 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");
59917
+ 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");
60026
59918
  this.pluginManager = new PluginManager$1(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
60027
59919
  options: options,
60028
59920
  container: container
@@ -63833,15 +63725,16 @@
63833
63725
  step((generator = generator.apply(thisArg, _arguments || [])).next());
63834
63726
  });
63835
63727
  };
63836
- function listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, table) {
63728
+ function listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, table, silentChangeCellValuesEvent) {
63837
63729
  if (workOnEditableCell && table.isHasEditorDefine(col, row) || !1 === workOnEditableCell) {
63838
- const recordIndex = table.getRecordShowIndexByCell(col, row),
63730
+ const recordShowIndex = table.getRecordShowIndexByCell(col, row),
63731
+ recordIndex = recordShowIndex >= 0 ? table.dataSource.getIndexKey(recordShowIndex) : void 0,
63839
63732
  {
63840
63733
  field: field
63841
63734
  } = table.internalProps.layoutMap.getBody(col, row),
63842
63735
  beforeChangeValue = table.getCellRawValue(col, row),
63843
63736
  oldValue = table.getCellOriginValue(col, row);
63844
- table.isHeader(col, row) ? table.internalProps.layoutMap.updateColumnTitle(col, row, value) : table.dataSource.changeFieldValue(value, recordIndex, field, col, row, table);
63737
+ table.isHeader(col, row) ? table.internalProps.layoutMap.updateColumnTitle(col, row, value) : table.dataSource.changeFieldValue(value, recordShowIndex, field, col, row, table);
63845
63738
  const range = table.getCellRange(col, row),
63846
63739
  aggregators = table.internalProps.layoutMap.getAggregatorsByCell(col, row);
63847
63740
  if (aggregators) {
@@ -63864,16 +63757,24 @@
63864
63757
  table.scenegraph.updateRowHeight(row, newHeight - oldHeight);
63865
63758
  }
63866
63759
  const changedValue = table.getCellOriginValue(col, row);
63867
- oldValue !== changedValue && triggerEvent && table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
63868
- col: col,
63869
- row: row,
63870
- rawValue: beforeChangeValue,
63871
- currentValue: oldValue,
63872
- changedValue: changedValue
63873
- }), table.scenegraph.updateNextFrame();
63760
+ if (oldValue !== changedValue && triggerEvent) {
63761
+ const changeValue = {
63762
+ col: col,
63763
+ row: row,
63764
+ recordIndex: recordIndex,
63765
+ field: field,
63766
+ rawValue: beforeChangeValue,
63767
+ currentValue: oldValue,
63768
+ changedValue: changedValue
63769
+ };
63770
+ table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, changeValue), silentChangeCellValuesEvent || table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, {
63771
+ values: [changeValue]
63772
+ });
63773
+ }
63774
+ table.scenegraph.updateNextFrame();
63874
63775
  }
63875
63776
  }
63876
- function listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, table) {
63777
+ function listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, table, silentChangeCellValuesEvent) {
63877
63778
  var _a, _b;
63878
63779
  return __awaiter(this, void 0, void 0, function* () {
63879
63780
  const changedCellResults = [];
@@ -63895,6 +63796,7 @@
63895
63796
  oldRowValues.push(oldValue);
63896
63797
  }
63897
63798
  }
63799
+ const resultChangeValues = [];
63898
63800
  for (let i = 0; i < values.length && !(startRow + i > table.rowCount - 1); i++) {
63899
63801
  changedCellResults[i] = [], pasteRowEnd = startRow + i;
63900
63802
  const rowValues = values[i];
@@ -63918,25 +63820,34 @@
63918
63820
  if (isCanChange) {
63919
63821
  changedCellResults[i][j] = !0;
63920
63822
  const value = rowValues[j],
63921
- recordIndex = table.getRecordShowIndexByCell(startCol + j, startRow + i),
63823
+ recordShowIndex = table.getRecordShowIndexByCell(startCol + j, startRow + i),
63824
+ recordIndex = recordShowIndex >= 0 ? table.dataSource.getIndexKey(recordShowIndex) : void 0,
63922
63825
  {
63923
63826
  field: field
63924
63827
  } = table.internalProps.layoutMap.getBody(startCol + j, startRow + i),
63925
63828
  beforeChangeValue = beforeChangeValues[i][j],
63926
63829
  oldValue = oldValues[i][j];
63927
- 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);
63830
+ 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);
63928
63831
  const changedValue = table.getCellOriginValue(startCol + j, startRow + i);
63929
- oldValue !== changedValue && triggerEvent && table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, {
63930
- col: startCol + j,
63931
- row: startRow + i,
63932
- rawValue: beforeChangeValue,
63933
- currentValue: oldValue,
63934
- changedValue: changedValue
63935
- });
63832
+ if (oldValue !== changedValue && triggerEvent) {
63833
+ const changeValue = {
63834
+ col: startCol + j,
63835
+ row: startRow + i,
63836
+ recordIndex: recordIndex,
63837
+ field: field,
63838
+ rawValue: beforeChangeValue,
63839
+ currentValue: oldValue,
63840
+ changedValue: changedValue
63841
+ };
63842
+ table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, changeValue), resultChangeValues.push(changeValue);
63843
+ }
63936
63844
  } else changedCellResults[i][j] = !1;
63937
63845
  }
63938
63846
  pasteColEnd = Math.max(pasteColEnd, thisRowPasteColEnd);
63939
63847
  }
63848
+ silentChangeCellValuesEvent || table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, {
63849
+ values: resultChangeValues
63850
+ });
63940
63851
  const startRange = table.getCellRange(startCol, startRow),
63941
63852
  range = table.getCellRange(pasteColEnd, pasteRowEnd),
63942
63853
  aggregators = table.internalProps.layoutMap.getAggregatorsByCellRange(startRange.start.col, startRange.start.row, range.end.col, range.end.row);
@@ -63970,6 +63881,36 @@
63970
63881
  return table.scenegraph.updateNextFrame(), changedCellResults;
63971
63882
  });
63972
63883
  }
63884
+ function listTableChangeCellValuesByIds(changeValues, triggerEvent, table, silentChangeCellValuesEvent) {
63885
+ return __awaiter(this, void 0, void 0, function* () {
63886
+ const resultChangeValues = [];
63887
+ for (let i = 0; i < changeValues.length; i++) {
63888
+ const {
63889
+ col: col,
63890
+ row: row,
63891
+ value: value
63892
+ } = changeValues[i],
63893
+ recordShowIndex = table.getRecordShowIndexByCell(col, row),
63894
+ recordIndex = recordShowIndex >= 0 ? table.dataSource.getIndexKey(recordShowIndex) : void 0,
63895
+ {
63896
+ field: field
63897
+ } = table.internalProps.layoutMap.getBody(col, row),
63898
+ oldValue = table.getCellOriginValue(col, row);
63899
+ listTableChangeCellValue(col, row, value, !1, triggerEvent, table, !0), oldValue !== value && triggerEvent && resultChangeValues.push({
63900
+ col: col,
63901
+ row: row,
63902
+ recordIndex: recordIndex,
63903
+ field: field,
63904
+ rawValue: oldValue,
63905
+ currentValue: oldValue,
63906
+ changedValue: value
63907
+ });
63908
+ }
63909
+ silentChangeCellValuesEvent || table.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, {
63910
+ values: resultChangeValues
63911
+ });
63912
+ });
63913
+ }
63973
63914
  function getCellUpdateType(col, row, table, oldCellUpdateType) {
63974
63915
  if ("group" === oldCellUpdateType) return oldCellUpdateType;
63975
63916
  if ("sort" === oldCellUpdateType && !table.internalProps.groupBy) return oldCellUpdateType;
@@ -65133,11 +65074,37 @@
65133
65074
  }
65134
65075
  return isValid$1(editorDefine);
65135
65076
  }
65136
- changeCellValue(col, row, value, workOnEditableCell = !1, triggerEvent = !0) {
65137
- return listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, this);
65138
- }
65139
- changeCellValues(startCol, startRow, values, workOnEditableCell = !1, triggerEvent = !0) {
65140
- return listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, this);
65077
+ changeCellValue(col, row, value, workOnEditableCell = !1, triggerEvent = !0, silentChangeCellValuesEvent) {
65078
+ return listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, this, silentChangeCellValuesEvent);
65079
+ }
65080
+ changeCellValues(startCol, startRow, values, workOnEditableCell = !1, triggerEvent = !0, silentChangeCellValuesEvent) {
65081
+ return listTableChangeCellValues(startCol, startRow, values, workOnEditableCell, triggerEvent, this, silentChangeCellValuesEvent);
65082
+ }
65083
+ changeCellValuesByIds(changeValues, triggerEvent = !0, silentChangeCellValuesEvent) {
65084
+ return listTableChangeCellValuesByIds(changeValues, triggerEvent, this, silentChangeCellValuesEvent);
65085
+ }
65086
+ changeSourceCellValue(recordIndex, field, value) {
65087
+ const tableIndex = this.getTableIndexByRecordIndex(recordIndex),
65088
+ cellAddr = this.getCellAddrByFieldRecord(field, recordIndex);
65089
+ if (tableIndex < 0 || cellAddr.col < 0 || cellAddr.row < 0) return;
65090
+ this.dataSource.changeFieldValue(value, tableIndex, field, cellAddr.col, cellAddr.row, this);
65091
+ const beforeChangeValue = this.getCellRawValue(cellAddr.col, cellAddr.row),
65092
+ oldValue = this.getCellOriginValue(cellAddr.col, cellAddr.row),
65093
+ changedValue = this.getCellOriginValue(cellAddr.col, cellAddr.row);
65094
+ if (oldValue !== changedValue) {
65095
+ const changeValue = {
65096
+ col: cellAddr.col,
65097
+ row: cellAddr.row,
65098
+ recordIndex: recordIndex,
65099
+ field: field,
65100
+ rawValue: beforeChangeValue,
65101
+ currentValue: oldValue,
65102
+ changedValue: changedValue
65103
+ };
65104
+ this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUE, changeValue), this.fireListeners(TABLE_EVENT_TYPE.CHANGE_CELL_VALUES, {
65105
+ values: [changeValue]
65106
+ });
65107
+ }
65141
65108
  }
65142
65109
  addRecord(record, recordIndex) {
65143
65110
  var _a;
@@ -65159,11 +65126,16 @@
65159
65126
  }
65160
65127
  deleteRecords(recordIndexs) {
65161
65128
  var _a;
65162
- listTableDeleteRecords(recordIndexs, this), adjustHeightResizedRowMapWithDeleteRecordIndex(this, recordIndexs), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible();
65129
+ const deletedRecords = [];
65130
+ (null == recordIndexs ? void 0 : recordIndexs.length) > 0 && recordIndexs.forEach(index => {
65131
+ let record = null;
65132
+ record = "number" == typeof index ? this.dataSource.get(index) : [], deletedRecords.push(record);
65133
+ }), listTableDeleteRecords(recordIndexs, this), adjustHeightResizedRowMapWithDeleteRecordIndex(this, recordIndexs), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible();
65163
65134
  const rowIndexs = [];
65164
65135
  for (let i = 0; i < recordIndexs.length; i++) rowIndexs.push(this.getBodyRowIndexByRecordIndex(recordIndexs[i]) + this.columnHeaderLevelCount);
65165
65136
  this.fireListeners(TABLE_EVENT_TYPE.DELETE_RECORD, {
65166
65137
  recordIndexs: recordIndexs,
65138
+ records: deletedRecords,
65167
65139
  rowIndexs: rowIndexs,
65168
65140
  deletedCount: (Array.isArray(recordIndexs[0]), recordIndexs.length)
65169
65141
  });
@@ -76327,7 +76299,7 @@
76327
76299
  PluginManager: PluginManager
76328
76300
  });
76329
76301
 
76330
- const version = "1.22.11-alpha.0";
76302
+ const version = "1.22.11-alpha.1";
76331
76303
 
76332
76304
  exports.Gantt = Gantt;
76333
76305
  exports.TYPES = index$4;