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

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.
@@ -35917,6 +35917,9 @@
35917
35917
  var _a;
35918
35918
  return null !== (_a = defaultStyle.textAlign) && void 0 !== _a ? _a : "left";
35919
35919
  },
35920
+ get textStickBaseOnAlign() {
35921
+ return defaultStyle.textStickBaseOnAlign;
35922
+ },
35920
35923
  get textBaseline() {
35921
35924
  var _a;
35922
35925
  return null !== (_a = defaultStyle.textBaseline) && void 0 !== _a ? _a : "middle";
@@ -36600,6 +36603,9 @@
36600
36603
  get textStick() {
36601
36604
  return style.textStick;
36602
36605
  },
36606
+ get textStickBaseOnAlign() {
36607
+ return style.textStickBaseOnAlign;
36608
+ },
36603
36609
  get marked() {
36604
36610
  return style.marked;
36605
36611
  },
@@ -43753,11 +43759,35 @@
43753
43759
  return hoverMode;
43754
43760
  }
43755
43761
 
43762
+ let brushingChartInstance,
43763
+ brushingChartInstanceCellPos = {
43764
+ col: -1,
43765
+ row: -1
43766
+ };
43767
+ function setBrushingChartInstance(chartInstance, col, row) {
43768
+ brushingChartInstance = chartInstance, brushingChartInstanceCellPos = {
43769
+ col: col,
43770
+ row: row
43771
+ };
43772
+ }
43773
+ function clearBrushingChartInstance() {
43774
+ brushingChartInstance = void 0, brushingChartInstanceCellPos = {
43775
+ col: -1,
43776
+ row: -1
43777
+ };
43778
+ }
43779
+ function getBrushingChartInstance() {
43780
+ return brushingChartInstance;
43781
+ }
43782
+ function getBrushingChartInstanceCellPos() {
43783
+ return brushingChartInstanceCellPos;
43784
+ }
43756
43785
  const chartInstanceListColumnByColumnDirection = {};
43757
43786
  const chartInstanceListRowByRowDirection = {};
43787
+ const delayRunDimensionHoverTimer = [];
43758
43788
  function generateChartInstanceListByColumnDirection(col, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = !1, isScatter = !1) {
43759
43789
  var _a;
43760
- isValid$1(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
43790
+ clearDelayRunDimensionHoverTimers(), isValid$1(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
43761
43791
  const {
43762
43792
  rowStart: rowStart
43763
43793
  } = table.getBodyVisibleRowRange();
@@ -43766,7 +43796,8 @@
43766
43796
  for (let i = rowStart; i <= rowEnd; i++) {
43767
43797
  const cellGroup = table.scenegraph.getCell(col, i),
43768
43798
  chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
43769
- chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListColumnByColumnDirection[col][i] || isValid$1(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance), setTimeout(() => {
43799
+ chartInstanceListColumnByColumnDirection[col][i] || isValid$1(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance);
43800
+ const timer = setTimeout(() => {
43770
43801
  var _a, _b, _c, _d;
43771
43802
  if (null === (_a = chartInstanceListColumnByColumnDirection[col]) || void 0 === _a ? void 0 : _a[i]) {
43772
43803
  const chartDimensionLinkage = table.options.chartDimensionLinkage;
@@ -43792,28 +43823,13 @@
43792
43823
  });
43793
43824
  }
43794
43825
  }
43795
- }, 0), table.scenegraph.updateNextFrame();
43796
- }
43797
- }
43798
- function clearChartInstanceListByColumnDirection(col, excludedRow, table) {
43799
- var _a;
43800
- if (isValid$1(chartInstanceListColumnByColumnDirection[col])) {
43801
- for (const i in chartInstanceListColumnByColumnDirection[col]) {
43802
- if (isValid$1(excludedRow) && Number(i) === excludedRow) continue;
43803
- const cellGroup = table.scenegraph.getCell(col, Number(i)),
43804
- chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
43805
- chartNode.addUpdateShapeAndBoundsTag(), isValid$1(chartNode) && (chartNode.deactivate(table, {
43806
- releaseChartInstance: !0,
43807
- releaseColumnChartInstance: !1,
43808
- releaseRowChartInstance: !1
43809
- }), chartInstanceListColumnByColumnDirection[col][i] = null);
43810
- }
43811
- delete chartInstanceListColumnByColumnDirection[col];
43826
+ }, 0);
43827
+ delayRunDimensionHoverTimer.push(timer), table.scenegraph.updateNextFrame();
43812
43828
  }
43813
43829
  }
43814
43830
  function generateChartInstanceListByRowDirection(row, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = !1, isScatter = !1) {
43815
43831
  var _a;
43816
- isValid$1(chartInstanceListRowByRowDirection[row]) || (chartInstanceListRowByRowDirection[row] = {});
43832
+ clearDelayRunDimensionHoverTimers(), isValid$1(chartInstanceListRowByRowDirection[row]) || (chartInstanceListRowByRowDirection[row] = {});
43817
43833
  const {
43818
43834
  colStart: colStart
43819
43835
  } = table.getBodyVisibleColRange();
@@ -43822,7 +43838,8 @@
43822
43838
  for (let i = colStart; i <= colEnd; i++) {
43823
43839
  const cellGroup = table.scenegraph.getCell(i, row),
43824
43840
  chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
43825
- chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListRowByRowDirection[row][i] || isValid$1(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance), setTimeout(() => {
43841
+ chartInstanceListRowByRowDirection[row][i] || isValid$1(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance);
43842
+ const timer = setTimeout(() => {
43826
43843
  var _a, _b, _c, _d;
43827
43844
  if (null === (_a = chartInstanceListRowByRowDirection[row]) || void 0 === _a ? void 0 : _a[i]) {
43828
43845
  const chartDimensionLinkage = table.options.chartDimensionLinkage;
@@ -43848,11 +43865,13 @@
43848
43865
  });
43849
43866
  }
43850
43867
  }
43851
- }, 0), table.scenegraph.updateNextFrame();
43868
+ }, 0);
43869
+ delayRunDimensionHoverTimer.push(timer), table.scenegraph.updateNextFrame();
43852
43870
  }
43853
43871
  }
43854
43872
  function generateChartInstanceListByViewRange(datum, table, deactivate = !1) {
43855
43873
  var _a;
43874
+ clearDelayRunDimensionHoverTimers();
43856
43875
  const {
43857
43876
  rowStart: rowStart
43858
43877
  } = table.getBodyVisibleRowRange();
@@ -43868,7 +43887,8 @@
43868
43887
  for (let i = rowStart; i <= rowEnd; i++) {
43869
43888
  const cellGroup = table.scenegraph.getCell(col, i),
43870
43889
  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(() => {
43890
+ chartInstanceListColumnByColumnDirection[col][i] || isValid$1(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.activeChartInstance ? chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance : "pie" === chartNode.attribute.spec.type && (chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance));
43891
+ const timer = setTimeout(() => {
43872
43892
  var _a, _b;
43873
43893
  if (null === (_a = chartInstanceListColumnByColumnDirection[col]) || void 0 === _a ? void 0 : _a[i]) {
43874
43894
  const chartDimensionLinkage = table.options.chartDimensionLinkage;
@@ -43877,7 +43897,8 @@
43877
43897
  activeType: "mark"
43878
43898
  })));
43879
43899
  }
43880
- }, 0), table.scenegraph.updateNextFrame();
43900
+ }, 0);
43901
+ delayRunDimensionHoverTimer.push(timer), table.scenegraph.updateNextFrame();
43881
43902
  }
43882
43903
  }
43883
43904
  }
@@ -43948,13 +43969,31 @@
43948
43969
  }
43949
43970
  return isShowTooltip;
43950
43971
  }
43951
- function clearChartInstanceListByRowDirection(row, excludedCol, table) {
43972
+ function clearChartInstanceListByColumnDirection(col, excludedRow, table, forceRelease = !1) {
43973
+ var _a;
43974
+ if (isValid$1(chartInstanceListColumnByColumnDirection[col])) {
43975
+ for (const i in chartInstanceListColumnByColumnDirection[col]) {
43976
+ if (isValid$1(excludedRow) && Number(i) === excludedRow) continue;
43977
+ const cellGroup = table.scenegraph.getCell(col, Number(i)),
43978
+ chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
43979
+ isValid$1(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.deactivate(table, {
43980
+ forceRelease: forceRelease,
43981
+ releaseChartInstance: !0,
43982
+ releaseColumnChartInstance: !1,
43983
+ releaseRowChartInstance: !1
43984
+ }), chartInstanceListColumnByColumnDirection[col][i] = null);
43985
+ }
43986
+ delete chartInstanceListColumnByColumnDirection[col];
43987
+ }
43988
+ }
43989
+ function clearChartInstanceListByRowDirection(row, excludedCol, table, forceRelease = !1) {
43952
43990
  var _a;
43953
43991
  if (isValid$1(chartInstanceListRowByRowDirection[row])) for (const i in chartInstanceListRowByRowDirection[row]) {
43954
43992
  if (isValid$1(excludedCol) && Number(i) === excludedCol) continue;
43955
43993
  const cellGroup = table.scenegraph.getCell(Number(i), row),
43956
43994
  chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
43957
- chartNode.addUpdateShapeAndBoundsTag(), isValid$1(chartNode) && (chartNode.deactivate(table, {
43995
+ isValid$1(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.deactivate(table, {
43996
+ forceRelease: forceRelease,
43958
43997
  releaseChartInstance: !0,
43959
43998
  releaseColumnChartInstance: !1,
43960
43999
  releaseRowChartInstance: !1
@@ -43962,9 +44001,18 @@
43962
44001
  }
43963
44002
  delete chartInstanceListRowByRowDirection[row];
43964
44003
  }
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);
44004
+ function clearDelayRunDimensionHoverTimers() {
44005
+ for (const timer of delayRunDimensionHoverTimer) clearTimeout(timer);
44006
+ delayRunDimensionHoverTimer.length = 0;
44007
+ }
44008
+ function clearAllChartInstanceList(table, forceRelease = !1) {
44009
+ clearDelayRunDimensionHoverTimers();
44010
+ for (const col in chartInstanceListColumnByColumnDirection) clearChartInstanceListByColumnDirection(Number(col), void 0, table, forceRelease);
44011
+ for (const row in chartInstanceListRowByRowDirection) clearChartInstanceListByRowDirection(Number(row), void 0, table, forceRelease);
44012
+ }
44013
+ let disabledTooltipToAllChartInstances = !1;
44014
+ function isDisabledTooltipToAllChartInstances() {
44015
+ return disabledTooltipToAllChartInstances;
43968
44016
  }
43969
44017
 
43970
44018
  function isValidAlignDomain(domain) {
@@ -44620,7 +44668,7 @@
44620
44668
  }
44621
44669
  }
44622
44670
  activate(table) {
44623
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
44671
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
44624
44672
  if (this.activeChartInstance) return;
44625
44673
  const {
44626
44674
  col: col,
@@ -44639,7 +44687,7 @@
44639
44687
  y1: y1 - table.scrollTop,
44640
44688
  y2: y2 - table.scrollTop
44641
44689
  });
44642
- null === (_a = this.activeChartInstance) || void 0 === _a || _a.release(), this.attribute.ClassType.globalConfig.uniqueTooltip = !1, this.activeChartInstance = new this.attribute.ClassType(this.attribute.spec, merge({}, this.attribute.tableChartOption, {
44690
+ this.attribute.ClassType.globalConfig.uniqueTooltip = !1, this.activeChartInstance = new this.attribute.ClassType(this.attribute.spec, merge({}, this.attribute.tableChartOption, {
44643
44691
  renderCanvas: this.attribute.canvas,
44644
44692
  mode: "desktop-browser",
44645
44693
  canvasControled: !1,
@@ -44673,7 +44721,7 @@
44673
44721
  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
44722
  }
44675
44723
  },
44676
- componentShowContent: (null === (_b = table.options.chartDimensionLinkage) || void 0 === _b ? void 0 : _b.showTooltip) && "scatter" !== this.attribute.spec.type ? {
44724
+ componentShowContent: (null === (_a = table.options.chartDimensionLinkage) || void 0 === _a ? void 0 : _a.showTooltip) && "scatter" !== this.attribute.spec.type ? {
44677
44725
  tooltip: {
44678
44726
  dimension: !1,
44679
44727
  mark: !0
@@ -44685,18 +44733,22 @@
44685
44733
  matrix = this.globalTransMatrix.clone(),
44686
44734
  stageMatrix = this.stage.window.getViewBoxTransform();
44687
44735
  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 => {
44736
+ 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
44737
  var _a;
44690
44738
  !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 => {
44739
+ }), (null === (_d = table.options.chartDimensionLinkage) || void 0 === _d ? void 0 : _d.listenBrushChange) && (brushChangeThrottle = cancellableThrottle(table.scenegraph.updateChartState.bind(table.scenegraph), null !== (_f = null === (_e = table.options.chartDimensionLinkage) || void 0 === _e ? void 0 : _e.brushChangeDelay) && void 0 !== _f ? _f : 100), this.activeChartInstance.on("brushChange", params => {
44692
44740
  var _a;
44693
44741
  brushChangeThrottle.throttled(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData, "brush");
44694
- })), this.activeChartInstance.on("brushEnd", params => {
44742
+ })), this.activeChartInstance.on("brushStart", params => {
44743
+ var _a;
44744
+ const brushingChartInstance = getBrushingChartInstance();
44745
+ brushingChartInstance !== this.activeChartInstance && (brushingChartInstance && (null === (_a = brushingChartInstance.getChart()) || void 0 === _a || _a.getComponentsByKey("brush")[0].clearBrushStateAndMask()), setBrushingChartInstance(this.activeChartInstance, col, row));
44746
+ }), this.activeChartInstance.on("brushEnd", params => {
44695
44747
  var _a;
44696
44748
  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(() => {
44697
44749
  Chart.temp = 1;
44698
44750
  }, 0);
44699
- }), (null === (_h = table.options.chartDimensionLinkage) || void 0 === _h ? void 0 : _h.showTooltip) && ("pie" === this.attribute.spec.type && (this.activeChartInstance.on("pointerover", {
44751
+ }), (null === (_g = table.options.chartDimensionLinkage) || void 0 === _g ? void 0 : _g.showTooltip) && ("pie" === this.attribute.spec.type && (this.activeChartInstance.on("pointerover", {
44700
44752
  markName: "pie"
44701
44753
  }, params => {
44702
44754
  var _a;
@@ -44716,6 +44768,8 @@
44716
44768
  generateChartInstanceListByViewRange(datum, table, !0);
44717
44769
  })), this.activeChartInstance.on("dimensionHover", params => {
44718
44770
  var _a, _b;
44771
+ if (isDisabledTooltipToAllChartInstances()) return;
44772
+ this.activeChartInstance.disableTooltip(!1);
44719
44773
  const dimensionInfo = null == params ? void 0 : params.dimensionInfo[0],
44720
44774
  canvasXY = null === (_a = null == params ? void 0 : params.event) || void 0 === _a ? void 0 : _a.canvas,
44721
44775
  viewport = null === (_b = null == params ? void 0 : params.event) || void 0 === _b ? void 0 : _b.viewport;
@@ -44732,11 +44786,11 @@
44732
44786
  prev_justShowMarkTooltip = this.justShowMarkTooltip;
44733
44787
  params.mark && params.datum && !Array.isArray(params.datum) ? (this.activeChartInstanceHoverOnMark = params.mark, justShowMarkTooltip = !0) : (this.activeChartInstanceHoverOnMark = null, justShowMarkTooltip = !1), this.justShowMarkTooltip = justShowMarkTooltip;
44734
44788
  let delayRunDimensionHover = !1;
44735
- if (!1 !== prev_justShowMarkTooltip && !1 === justShowMarkTooltip ? (this.justShowMarkTooltipTimer = Date.now(), delayRunDimensionHover = !0) : !1 === prev_justShowMarkTooltip && !1 === justShowMarkTooltip ? delayRunDimensionHover = Date.now() - this.justShowMarkTooltipTimer < 100 : (!1 === prev_justShowMarkTooltip && !0 === justShowMarkTooltip || !0 === prev_justShowMarkTooltip && !0 === justShowMarkTooltip) && (delayRunDimensionHover = !1, clearTimeout(this.delayRunDimensionHoverTimer), this.delayRunDimensionHoverTimer = void 0), "enter" === params.action || "move" === params.action || preMark !== this.activeChartInstanceHoverOnMark) {
44789
+ if (!1 !== prev_justShowMarkTooltip && !1 === justShowMarkTooltip ? (this.justShowMarkTooltipTimer = Date.now(), delayRunDimensionHover = !0) : !1 === prev_justShowMarkTooltip && !1 === justShowMarkTooltip ? delayRunDimensionHover = Date.now() - this.justShowMarkTooltipTimer < 100 : (!1 === prev_justShowMarkTooltip && !0 === justShowMarkTooltip || !0 === prev_justShowMarkTooltip && !0 === justShowMarkTooltip) && (delayRunDimensionHover = !1, this.clearDelayRunDimensionHoverTimer()), "enter" === params.action || "move" === params.action || preMark !== this.activeChartInstanceHoverOnMark) {
44736
44790
  const dimensionValue = dimensionInfo.value,
44737
44791
  indicatorsAsCol = table.options.indicatorsAsCol;
44738
- if (delayRunDimensionHover ? (clearTimeout(this.delayRunDimensionHoverTimer), this.delayRunDimensionHoverTimer = setTimeout(() => {
44739
- indicatorsAsCol ? generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1) : generateChartInstanceListByColumnDirection(col, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1);
44792
+ if (delayRunDimensionHover ? (this.clearDelayRunDimensionHoverTimer(), this.delayRunDimensionHoverTimer = setTimeout(() => {
44793
+ isDisabledTooltipToAllChartInstances() || (indicatorsAsCol ? generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1) : generateChartInstanceListByColumnDirection(col, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1));
44740
44794
  }, 100)) : indicatorsAsCol ? generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1) : generateChartInstanceListByColumnDirection(col, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1), indicatorsAsCol) {
44741
44795
  const series = dimensionInfo.data[0].series,
44742
44796
  width = "histogram" === this.attribute.spec.type || "line" === series.type || "area" === series.type ? 0 : series.getYAxisHelper().getBandwidth(0);
@@ -44777,22 +44831,26 @@
44777
44831
  }
44778
44832
  }
44779
44833
  }
44780
- })), null === (_k = (_j = table)._bindChartEvent) || void 0 === _k || _k.call(_j, this.activeChartInstance);
44834
+ })), null === (_j = (_h = table)._bindChartEvent) || void 0 === _j || _j.call(_h, this.activeChartInstance), isDisabledTooltipToAllChartInstances() && this.activeChartInstance.disableTooltip(!0);
44835
+ }
44836
+ clearDelayRunDimensionHoverTimer() {
44837
+ clearTimeout(this.delayRunDimensionHoverTimer), this.delayRunDimensionHoverTimer = void 0;
44781
44838
  }
44782
44839
  deactivate(table, {
44840
+ forceRelease = !1,
44783
44841
  releaseChartInstance = !0,
44784
44842
  releaseColumnChartInstance = !0,
44785
44843
  releaseRowChartInstance = !0,
44786
44844
  releaseAllChartInstance = !1
44787
44845
  } = {}) {
44788
44846
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
44789
- if (this.activeChartInstanceHoverOnMark = null, this.justShowMarkTooltip = void 0, this.justShowMarkTooltipTimer = Date.now(), clearTimeout(this.delayRunDimensionHoverTimer), this.delayRunDimensionHoverTimer = void 0, releaseChartInstance) {
44790
- null === (_a = this.activeChartInstance) || void 0 === _a || _a.updateViewBox({
44847
+ if (this.activeChartInstanceHoverOnMark = null, this.justShowMarkTooltip = void 0, this.justShowMarkTooltipTimer = Date.now(), this.clearDelayRunDimensionHoverTimer(), releaseChartInstance) {
44848
+ !this.activeChartInstance || !forceRelease && getBrushingChartInstance() && getBrushingChartInstance() === this.activeChartInstance || (null === (_a = this.activeChartInstance) || void 0 === _a || _a.updateViewBox({
44791
44849
  x1: -1e3,
44792
44850
  x2: -800,
44793
44851
  y1: -1e3,
44794
44852
  y2: -800
44795
- }, !1, !1), null === (_b = this.activeChartInstance) || void 0 === _b || _b.release(), this.activeChartInstance = null;
44853
+ }, !1, !1), null === (_b = this.activeChartInstance) || void 0 === _b || _b.release(), this.activeChartInstance = null);
44796
44854
  const {
44797
44855
  col: col,
44798
44856
  row: row
@@ -44805,7 +44863,7 @@
44805
44863
  } = this.parent;
44806
44864
  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
44865
  }
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));
44866
+ releaseAllChartInstance ? clearAllChartInstanceList(table, forceRelease) : (releaseColumnChartInstance && clearChartInstanceListByColumnDirection(this.parent.col, "scatter" === this.attribute.spec.type ? this.parent.row : void 0, table, forceRelease), releaseRowChartInstance && clearChartInstanceListByRowDirection(this.parent.row, "scatter" === this.attribute.spec.type ? this.parent.col : void 0, table, forceRelease));
44809
44867
  }
44810
44868
  updateData(data) {
44811
44869
  this.attribute.data = data;
@@ -48581,15 +48639,21 @@
48581
48639
  }
48582
48640
  function clearChartCacheImage(scenegraph) {
48583
48641
  var _a;
48642
+ const brushingCellPos = getBrushingChartInstanceCellPos();
48584
48643
  for (let c = scenegraph.proxy.colStart; c <= scenegraph.proxy.colEnd; c++) {
48585
48644
  const columnGroup = scenegraph.getColGroup(c);
48586
48645
  null === (_a = null == columnGroup ? void 0 : columnGroup.getChildren()) || void 0 === _a || _a.forEach(cellNode => {
48587
- cellNode.children.forEach(node => {
48646
+ brushingCellPos && brushingCellPos.col === cellNode.col && brushingCellPos.row === cellNode.row || cellNode.children.forEach(node => {
48588
48647
  "chart" === node.type && (node.cacheCanvas = null, node.addUpdateBoundTag());
48589
48648
  });
48590
48649
  });
48591
48650
  }
48592
48651
  }
48652
+ function clearCellChartCacheImage(col, row, scenegraph) {
48653
+ scenegraph.getCell(col, row).children.forEach(node => {
48654
+ "chart" === node.type && (node.cacheCanvas = null, node.addUpdateBoundTag());
48655
+ });
48656
+ }
48593
48657
  function updateChartState(scenegraph, datum, selectedDataMode) {
48594
48658
  const table = scenegraph.table;
48595
48659
  if (table.isPivotChart()) {
@@ -49342,18 +49406,33 @@
49342
49406
  resetResidentHoverIcon(col, row, this);
49343
49407
  }
49344
49408
  deactivateChart(col, row, forceRelease = !1) {
49345
- var _a, _b, _c, _d, _e, _f;
49409
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
49410
+ if (forceRelease) {
49411
+ const brushingChartInstanceCellPos = getBrushingChartInstanceCellPos(),
49412
+ brushingChartInstance = getBrushingChartInstance();
49413
+ if (brushingChartInstanceCellPos && brushingChartInstance) {
49414
+ const cellGroup = this.getCell(brushingChartInstanceCellPos.col, brushingChartInstanceCellPos.row);
49415
+ (null === (_a = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _a ? void 0 : _a.deactivate) && (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, {
49416
+ forceRelease: !0,
49417
+ releaseChartInstance: !0,
49418
+ releaseColumnChartInstance: !0,
49419
+ releaseRowChartInstance: !0,
49420
+ releaseAllChartInstance: !0
49421
+ })), clearCellChartCacheImage(brushingChartInstanceCellPos.col, brushingChartInstanceCellPos.row, this), clearBrushingChartInstance();
49422
+ }
49423
+ }
49346
49424
  if (-1 === col || -1 === row) return;
49347
49425
  const cellGroup = this.getCell(col, row);
49348
- 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, {
49426
+ if (null === (_d = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _d ? void 0 : _d.deactivate) {
49427
+ if (forceRelease) return void (null === (_f = null === (_e = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _e ? void 0 : _e.deactivate) || void 0 === _f || _f.call(_e, this.table, {
49428
+ forceRelease: !0,
49350
49429
  releaseChartInstance: !0,
49351
49430
  releaseColumnChartInstance: !0,
49352
49431
  releaseRowChartInstance: !0,
49353
49432
  releaseAllChartInstance: !0
49354
49433
  }));
49355
49434
  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) ? {
49435
+ null === (_h = null === (_g = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _g ? void 0 : _g.deactivate) || void 0 === _h || _h.call(_g, this.table, (null === (_j = this.table.options.chartDimensionLinkage) || void 0 === _j ? void 0 : _j.showTooltip) ? {
49357
49436
  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
49437
  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
49438
  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)
@@ -49405,7 +49484,14 @@
49405
49484
  updateChartSizeForResizeRowHeight(this, row);
49406
49485
  }
49407
49486
  updateChartState(datum, selectedDataMode) {
49408
- this.table.isPivotChart() && updateChartState(this, datum, selectedDataMode);
49487
+ var _a, _b, _c;
49488
+ if (this.table.isPivotChart()) {
49489
+ if (null == datum || 0 === (null == datum ? void 0 : datum.length) || 0 === Object.keys(datum).length) {
49490
+ const brushingChartInstance = getBrushingChartInstance();
49491
+ brushingChartInstance && (null === (_a = brushingChartInstance.getChart()) || void 0 === _a || _a.getComponentsByKey("brush")[0].clearBrushStateAndMask()), null === (_c = null === (_b = this.table.options.chartDimensionLinkage) || void 0 === _b ? void 0 : _b.clearChartState) || void 0 === _c || _c.call(_b);
49492
+ }
49493
+ updateChartState(this, datum, selectedDataMode);
49494
+ }
49409
49495
  }
49410
49496
  updateCheckboxCellState(col, row, checked) {
49411
49497
  var _a, _b;
@@ -52432,7 +52518,7 @@
52432
52518
  }, 0 !== e.button) return;
52433
52519
  const eventArgsSet = getCellEventArgsSet(e);
52434
52520
  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;
52521
+ 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), table.scenegraph.deactivateChart(-1, -1, !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;
52436
52522
  const isCompleteEdit = null === (_e = table.editorManager) || void 0 === _e ? void 0 : _e.completeEdit(e.nativeEvent);
52437
52523
  getPromiseValue(isCompleteEdit, isCompleteEdit => {
52438
52524
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
@@ -52460,7 +52546,7 @@
52460
52546
  }
52461
52547
  eventManager.dealTableHover(eventArgsSet);
52462
52548
  } 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);
52549
+ if (!eventManager.checkCellFillhandle(eventArgsSet) && (eventManager.checkColumnResize(eventArgsSet, !0) || eventManager.checkRowResize(eventArgsSet, !0))) return table.scenegraph.updateChartState(null, void 0), table.scenegraph.deactivateChart(-1, -1, !0), void stateManager.updateInteractionState(InteractionState.grabing);
52464
52550
  if (eventManager.checkColumnMover(eventArgsSet)) return void stateManager.updateInteractionState(InteractionState.grabing);
52465
52551
  if (eventManager.checkCellFillhandle(eventArgsSet, !0) && eventManager.dealFillSelect(eventArgsSet)) return void stateManager.updateInteractionState(InteractionState.grabing);
52466
52552
  eventManager.dealTableSelect(eventArgsSet) && stateManager.updateInteractionState(InteractionState.grabing);
@@ -52612,7 +52698,7 @@
52612
52698
  if (!(null === (_a = table.options.customConfig) || void 0 === _a ? void 0 : _a.selectCellWhenCellEditorNotExists) && !1 === isCompleteEdit) return;
52613
52699
  const hitIcon = (null === (_b = e.target.role) || void 0 === _b ? void 0 : _b.startsWith("icon")) ? e.target : void 0;
52614
52700
  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);
52701
+ table.scenegraph.updateChartState(null, void 0), table.scenegraph.deactivateChart(-1, -1, !0), stateManager.updateInteractionState(InteractionState.grabing);
52616
52702
  const {
52617
52703
  eventArgs: eventArgs
52618
52704
  } = eventArgsSet;
@@ -52631,7 +52717,7 @@
52631
52717
  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
52718
  stateManager.updateInteractionState(InteractionState.default), eventManager.dealTableHover();
52633
52719
  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);
52720
+ (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), table.scenegraph.deactivateChart(-1, -1, !0);
52635
52721
  }
52636
52722
  }), table.scenegraph.stage.addEventListener("pointermove", e => {
52637
52723
  var _a, _b, _c;
@@ -52872,11 +52958,13 @@
52872
52958
  const throttleVerticalWheel = throttle(stateManager.updateVerticalScrollBar, 20),
52873
52959
  throttleHorizontalWheel = throttle(stateManager.updateHorizontalScrollBar, 20);
52874
52960
  scenegraph.component.vScrollBar.addEventListener("scrollDrag", e => {
52875
- scenegraph.table.eventManager.isDown && (scenegraph.table.eventManager.isDraging = !0), stateManager.fastScrolling = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling);
52961
+ var _a;
52962
+ scenegraph.table.eventManager.isDown && (scenegraph.table.eventManager.isDraging = !0), stateManager.fastScrolling = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling), scenegraph.table.stateManager.hideMenu(), null === (_a = scenegraph.table.editorManager) || void 0 === _a || _a.completeEdit(), table.scenegraph.deactivateChart(-1, -1, !0);
52876
52963
  const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
52877
52964
  throttleVerticalWheel(ratio, e);
52878
52965
  }), scenegraph.component.hScrollBar.addEventListener("scrollDrag", e => {
52879
- scenegraph.table.eventManager.isDown && (scenegraph.table.eventManager.isDraging = !0), stateManager.fastScrolling = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling);
52966
+ var _a;
52967
+ scenegraph.table.eventManager.isDown && (scenegraph.table.eventManager.isDraging = !0), stateManager.fastScrolling = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling), scenegraph.table.stateManager.hideMenu(), null === (_a = scenegraph.table.editorManager) || void 0 === _a || _a.completeEdit(), table.scenegraph.deactivateChart(-1, -1, !0);
52880
52968
  const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
52881
52969
  throttleHorizontalWheel(ratio);
52882
52970
  });
@@ -53026,7 +53114,7 @@
53026
53114
  const isHasSelected = !!(null === (_b = stateManager.select.ranges) || void 0 === _b ? void 0 : _b.length);
53027
53115
  eventManager.dealTableSelect(), stateManager.endSelectCells(!0, isHasSelected);
53028
53116
  }
53029
- });
53117
+ }), table.scenegraph.updateChartState(null, void 0), table.scenegraph.deactivateChart(-1, -1, !0);
53030
53118
  }
53031
53119
  };
53032
53120
  eventManager.globalEventListeners.push({
@@ -56169,7 +56257,7 @@
56169
56257
  }
56170
56258
  constructor(container, options = {}) {
56171
56259
  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");
56260
+ if (super(), this.showFrozenIcon = !0, this.version = "1.22.11-alpha.10", 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
56261
  this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
56174
56262
  options: options,
56175
56263
  container: container
@@ -59793,9 +59881,9 @@
59793
59881
  };
59794
59882
  col === this.table.colCount - 1 ? referencePosition.rect.width = rect.width - 1 : referencePosition.rect.width = rect.width + 1, row === this.table.rowCount - 1 ? referencePosition.rect.height = rect.height - 1 : referencePosition.rect.height = rect.height + 1;
59795
59883
  const editor = this.table.getEditor(col, row);
59796
- setTimeout(() => {
59884
+ editor && setTimeout(() => {
59797
59885
  var _a;
59798
- this.editingEditor !== editor && (null === (_a = editor.prepareEdit) || void 0 === _a || _a.call(editor, {
59886
+ editor && this.editingEditor !== editor && (null === (_a = editor.prepareEdit) || void 0 === _a || _a.call(editor, {
59799
59887
  referencePosition: referencePosition,
59800
59888
  container: this.table.getElement(),
59801
59889
  table: this.table,