@visactor/vtable-calendar 1.22.6 → 1.22.7-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9498,7 +9498,7 @@
9498
9498
  }
9499
9499
  }]), noAnimateAttrs && this.setAttributesAndPreventAnimate(noAnimateAttrs, !1, {
9500
9500
  type: AttributeUpdateType.STATE
9501
- });
9501
+ }), this.finalAttribute && Object.assign(this.finalAttribute, attrs);
9502
9502
  } else this.stopStateAnimates(), this.setAttributesAndPreventAnimate(attrs, !1, {
9503
9503
  type: AttributeUpdateType.STATE
9504
9504
  }), this.finalAttribute && Object.assign(this.finalAttribute, attrs);
@@ -9524,7 +9524,7 @@
9524
9524
  getNormalAttribute(key) {
9525
9525
  var _a, _b;
9526
9526
  const value = this.attribute[key];
9527
- return this.animates ? null === (_a = this.finalAttribute) || void 0 === _a ? void 0 : _a[key] : null != value ? value : null === (_b = this.finalAttribute) || void 0 === _b ? void 0 : _b[key];
9527
+ return this.animates && this.animates.size ? null === (_a = this.finalAttribute) || void 0 === _a ? void 0 : _a[key] : null != value ? value : null === (_b = this.finalAttribute) || void 0 === _b ? void 0 : _b[key];
9528
9528
  }
9529
9529
  clearStates(hasAnimation) {
9530
9530
  this.hasState() && this.normalAttrs ? (this.currentStates = [], this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0)) : this.currentStates = [], this.normalAttrs = null;
@@ -43786,39 +43786,53 @@
43786
43786
  for (let i = rowStart; i <= rowEnd; i++) {
43787
43787
  const cellGroup = table.scenegraph.getCell(col, i),
43788
43788
  chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
43789
- chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListColumnByColumnDirection[col][i] || isValid$3(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance), table.stateManager.hover.cellPos.col === col && table.stateManager.hover.cellPos.row === i || setTimeout(() => {
43789
+ chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListColumnByColumnDirection[col][i] || isValid$3(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance), setTimeout(() => {
43790
43790
  var _a, _b, _c, _d;
43791
43791
  if (null === (_a = chartInstanceListColumnByColumnDirection[col]) || void 0 === _a ? void 0 : _a[i]) {
43792
- const absolutePosition = table.getCellRelativeRect(col, i),
43793
- chartDimensionLinkage = table.options.chartDimensionLinkage;
43792
+ const chartDimensionLinkage = table.options.chartDimensionLinkage;
43794
43793
  let isShowTooltip = !isScatter;
43795
- if (!isScatter && "object" == typeof chartDimensionLinkage && (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === rowEnd && isShowTooltip)) {
43796
- const heightLimitToShowTooltipForLastRow = chartDimensionLinkage.heightLimitToShowTooltipForLastRow,
43794
+ if (!isScatter && "object" == typeof chartDimensionLinkage) if (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === rowEnd && isShowTooltip) {
43795
+ const heightLimitToShowTooltipForEdgeRow = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow,
43797
43796
  {
43798
43797
  rowEnd: rowEnd1
43799
- } = table.getBodyVisibleRowRange(-heightLimitToShowTooltipForLastRow);
43798
+ } = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
43800
43799
  if (rowEnd1 === rowEnd) isShowTooltip = !0;else {
43801
43800
  const {
43802
43801
  rowEnd: rowEnd2
43803
- } = table.getBodyVisibleRowRange(5);
43802
+ } = table.getBodyVisibleRowRange(0, 5);
43804
43803
  isShowTooltip = rowEnd2 !== rowEnd;
43805
43804
  }
43806
- }
43807
- isScatter ? null === (_d = (_c = chartInstanceListColumnByColumnDirection[col][i]).showCrosshair) || void 0 === _d || _d.call(_c, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue) : hideTooltip ? (chartInstanceListColumnByColumnDirection[col][i].hideTooltip(), chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
43808
- tooltip: !1,
43809
- showTooltipOption: {
43810
- x: canvasXY.x,
43811
- y: absolutePosition.top + 3,
43812
- activeType: "dimension"
43813
- }
43814
- })) : chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
43815
- tooltip: isShowTooltip,
43816
- showTooltipOption: {
43817
- x: canvasXY.x,
43818
- y: absolutePosition.top + 3,
43819
- activeType: "dimension"
43805
+ } else if (i === rowStart && isShowTooltip) {
43806
+ const heightLimitToShowTooltipForEdgeRow = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow,
43807
+ {
43808
+ rowStart: rowStart1
43809
+ } = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
43810
+ if (rowStart1 === rowStart) isShowTooltip = !0;else {
43811
+ const {
43812
+ rowStart: rowStart2
43813
+ } = table.getBodyVisibleRowRange(0, -5);
43814
+ isShowTooltip = rowStart2 !== rowStart;
43820
43815
  }
43821
- });
43816
+ }
43817
+ if (isScatter) null === (_d = (_c = chartInstanceListColumnByColumnDirection[col][i]).showCrosshair) || void 0 === _d || _d.call(_c, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue);else {
43818
+ const bodyBoundryTop = table.frozenRowCount ? table.getCellRelativeRect(col, table.frozenRowCount - 1).bottom : 0,
43819
+ absolutePositionTop = Math.max(bodyBoundryTop, table.getCellRelativeRect(col, i).top);
43820
+ hideTooltip ? (table.stateManager.hover.cellPos.col === col && table.stateManager.hover.cellPos.row === i || chartInstanceListColumnByColumnDirection[col][i].hideTooltip(), chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
43821
+ tooltip: !1,
43822
+ showTooltipOption: {
43823
+ x: canvasXY.x,
43824
+ y: absolutePositionTop,
43825
+ activeType: "dimension"
43826
+ }
43827
+ })) : chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
43828
+ tooltip: isShowTooltip,
43829
+ showTooltipOption: {
43830
+ x: canvasXY.x,
43831
+ y: absolutePositionTop,
43832
+ activeType: "dimension"
43833
+ }
43834
+ });
43835
+ }
43822
43836
  }
43823
43837
  }, 0), table.scenegraph.updateNextFrame();
43824
43838
  }
@@ -43850,39 +43864,53 @@
43850
43864
  for (let i = colStart; i <= colEnd; i++) {
43851
43865
  const cellGroup = table.scenegraph.getCell(i, row),
43852
43866
  chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
43853
- chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListRowByRowDirection[row][i] || isValid$3(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance), table.stateManager.hover.cellPos.col === i && table.stateManager.hover.cellPos.row === row || setTimeout(() => {
43867
+ chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListRowByRowDirection[row][i] || isValid$3(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance), setTimeout(() => {
43854
43868
  var _a, _b, _c, _d;
43855
43869
  if (null === (_a = chartInstanceListRowByRowDirection[row]) || void 0 === _a ? void 0 : _a[i]) {
43856
- const absolutePosition = table.getCellRelativeRect(i, row),
43857
- chartDimensionLinkage = table.options.chartDimensionLinkage;
43870
+ const chartDimensionLinkage = table.options.chartDimensionLinkage;
43858
43871
  let isShowTooltip = !isScatter;
43859
- if (!isScatter && "object" == typeof chartDimensionLinkage && (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === colEnd && isShowTooltip)) {
43860
- const widthLimitToShowTooltipForLastColumn = chartDimensionLinkage.widthLimitToShowTooltipForLastColumn,
43872
+ if (!isScatter && "object" == typeof chartDimensionLinkage) if (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === colEnd && isShowTooltip) {
43873
+ const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
43861
43874
  {
43862
43875
  colEnd: colEnd1
43863
- } = table.getBodyVisibleColRange(-widthLimitToShowTooltipForLastColumn);
43876
+ } = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
43864
43877
  if (colEnd1 === colEnd) isShowTooltip = !0;else {
43865
43878
  const {
43866
43879
  colEnd: colEnd2
43867
- } = table.getBodyVisibleColRange(5);
43880
+ } = table.getBodyVisibleColRange(0, 5);
43868
43881
  isShowTooltip = colEnd2 !== colEnd;
43869
43882
  }
43870
- }
43871
- isScatter ? null === (_d = (_c = chartInstanceListRowByRowDirection[row][i]).showCrosshair) || void 0 === _d || _d.call(_c, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue) : hideTooltip ? (chartInstanceListRowByRowDirection[row][i].hideTooltip(), chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
43872
- tooltip: !1,
43873
- showTooltipOption: {
43874
- x: absolutePosition.left + 3,
43875
- y: canvasXY.y,
43876
- activeType: "dimension"
43877
- }
43878
- })) : chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
43879
- tooltip: isShowTooltip,
43880
- showTooltipOption: {
43881
- x: absolutePosition.left + 3,
43882
- y: canvasXY.y,
43883
- activeType: "dimension"
43883
+ } else if (i === colStart && isShowTooltip) {
43884
+ const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
43885
+ {
43886
+ colStart: colStart1
43887
+ } = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
43888
+ if (colStart1 === colStart) isShowTooltip = !0;else {
43889
+ const {
43890
+ colStart: colStart2
43891
+ } = table.getBodyVisibleColRange(0, -5);
43892
+ isShowTooltip = colStart2 !== colStart;
43884
43893
  }
43885
- });
43894
+ }
43895
+ if (isScatter) null === (_d = (_c = chartInstanceListRowByRowDirection[row][i]).showCrosshair) || void 0 === _d || _d.call(_c, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue);else {
43896
+ const bodyBoundryLeft = table.frozenColCount ? table.getCellRelativeRect(table.frozenColCount - 1, row).right : 0,
43897
+ absolutePositionLeft = Math.max(bodyBoundryLeft, table.getCellRelativeRect(i, row).left);
43898
+ hideTooltip ? (table.stateManager.hover.cellPos.col === i && table.stateManager.hover.cellPos.row === row || chartInstanceListRowByRowDirection[row][i].hideTooltip(), chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
43899
+ tooltip: !1,
43900
+ showTooltipOption: {
43901
+ x: absolutePositionLeft,
43902
+ y: canvasXY.y,
43903
+ activeType: "dimension"
43904
+ }
43905
+ })) : chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
43906
+ tooltip: isShowTooltip,
43907
+ showTooltipOption: {
43908
+ x: absolutePositionLeft,
43909
+ y: canvasXY.y,
43910
+ activeType: "dimension"
43911
+ }
43912
+ });
43913
+ }
43886
43914
  }
43887
43915
  }, 0), table.scenegraph.updateNextFrame();
43888
43916
  }
@@ -44606,7 +44634,14 @@
44606
44634
  } = drawParams;
44607
44635
  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());
44608
44636
  }
44609
- }
44637
+ },
44638
+ componentShowContent: table.options.chartDimensionLinkage ? {
44639
+ tooltip: {
44640
+ dimension: !1,
44641
+ mark: !0
44642
+ },
44643
+ crosshair: !1
44644
+ } : void 0
44610
44645
  }));
44611
44646
  const chartStage = this.activeChartInstance.getStage(),
44612
44647
  matrix = this.globalTransMatrix.clone(),
@@ -56035,7 +56070,7 @@
56035
56070
  }
56036
56071
  constructor(container, options = {}) {
56037
56072
  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;
56038
- if (super(), this.showFrozenIcon = !0, this.version = "1.22.6", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
56073
+ if (super(), this.showFrozenIcon = !0, this.version = "1.22.7-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");
56039
56074
  this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
56040
56075
  options: options,
56041
56076
  container: container
@@ -56876,7 +56911,7 @@
56876
56911
  colEnd: colEnd
56877
56912
  };
56878
56913
  }
56879
- getBodyVisibleRowRange(deltaY = 0) {
56914
+ getBodyVisibleRowRange(start_deltaY = 0, end_deltaY = 0) {
56880
56915
  const {
56881
56916
  scrollTop: scrollTop
56882
56917
  } = this,
@@ -56884,14 +56919,14 @@
56884
56919
  bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight(),
56885
56920
  {
56886
56921
  row: rowStart
56887
- } = this.getRowAt(scrollTop + frozenRowsHeight + 1),
56888
- rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight + deltaY).row : this.rowCount - 1;
56922
+ } = this.getRowAt(scrollTop + frozenRowsHeight + 1 + start_deltaY),
56923
+ rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight + end_deltaY).row : this.rowCount - 1;
56889
56924
  return rowEnd < 0 ? null : {
56890
56925
  rowStart: rowStart,
56891
56926
  rowEnd: rowEnd
56892
56927
  };
56893
56928
  }
56894
- getBodyVisibleColRange(deltaX = 0) {
56929
+ getBodyVisibleColRange(start_deltaX = 0, end_deltaX = 0) {
56895
56930
  const {
56896
56931
  scrollLeft: scrollLeft
56897
56932
  } = this,
@@ -56899,8 +56934,8 @@
56899
56934
  rightFrozenColsWidth = this.getRightFrozenColsWidth(),
56900
56935
  {
56901
56936
  col: colStart
56902
- } = this.getColAt(scrollLeft + frozenColsWidth + 1),
56903
- colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth + deltaX).col : this.colCount - 1;
56937
+ } = this.getColAt(scrollLeft + frozenColsWidth + 1 + start_deltaX),
56938
+ colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth + end_deltaX).col : this.colCount - 1;
56904
56939
  return colEnd < 0 ? null : {
56905
56940
  colStart: colStart,
56906
56941
  colEnd: colEnd