@visactor/vtable-calendar 1.17.3 → 1.17.4-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.
@@ -45049,8 +45049,8 @@
45049
45049
  constructor() {
45050
45050
  let style = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
45051
45051
  let bodyStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
45052
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
45053
- super(style, bodyStyle), this._showBar = null === (_a = style.showBar) || void 0 === _a || _a, this._barColor = null !== (_b = style.barColor) && void 0 !== _b ? _b : DEFAULT_BAR_COLOR, this._barPositiveColor = null !== (_c = style.barPositiveColor) && void 0 !== _c ? _c : "#4dbd74", this._barNegativeColor = null !== (_d = style.barNegativeColor) && void 0 !== _d ? _d : "#f86c6b", this._barAxisColor = null !== (_e = style.barAxisColor) && void 0 !== _e ? _e : "black", this._barBgColor = style.barBgColor, this._barHeight = null !== (_f = style.barHeight) && void 0 !== _f ? _f : 3, this._barHeight = null !== (_g = style.barHeight) && void 0 !== _g ? _g : 3, this._barBottom = null !== (_h = style.barBottom) && void 0 !== _h ? _h : 0, this._barPadding = null !== (_j = style.barPadding) && void 0 !== _j ? _j : [0, 0, 0, 0], this._showBarMark = null !== (_k = style.showBarMark) && void 0 !== _k && _k, this._barMarkPositiveColor = null !== (_l = style.barMarkPositiveColor) && void 0 !== _l ? _l : "#4dbd74", this._barMarkNegativeColor = null !== (_m = style.barMarkNegativeColor) && void 0 !== _m ? _m : "#f86c6b", this._barMarkWidth = null !== (_o = style.barMarkWidth) && void 0 !== _o ? _o : 2, this._barMarkPosition = null !== (_p = style.barMarkPosition) && void 0 !== _p ? _p : "right", this._barRightToLeft = null !== (_q = style.barRightToLeft) && void 0 !== _q && _q;
45052
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
45053
+ super(style, bodyStyle), this._showBar = null === (_a = style.showBar) || void 0 === _a || _a, this._barColor = null !== (_b = style.barColor) && void 0 !== _b ? _b : DEFAULT_BAR_COLOR, this._barPositiveColor = null !== (_c = style.barPositiveColor) && void 0 !== _c ? _c : "#4dbd74", this._barNegativeColor = null !== (_d = style.barNegativeColor) && void 0 !== _d ? _d : "#f86c6b", this._barAxisColor = null !== (_e = style.barAxisColor) && void 0 !== _e ? _e : "black", this._barBgColor = style.barBgColor, this._barHeight = null !== (_f = style.barHeight) && void 0 !== _f ? _f : 3, this._barHeight = null !== (_g = style.barHeight) && void 0 !== _g ? _g : 3, this._barBottom = null !== (_h = style.barBottom) && void 0 !== _h ? _h : 0, this._barPadding = null !== (_j = style.barPadding) && void 0 !== _j ? _j : [0, 0, 0, 0], this._showBarMark = null !== (_k = style.showBarMark) && void 0 !== _k && _k, this._barMarkPositiveColor = null !== (_l = style.barMarkPositiveColor) && void 0 !== _l ? _l : "#4dbd74", this._barMarkNegativeColor = null !== (_m = style.barMarkNegativeColor) && void 0 !== _m ? _m : "#f86c6b", this._barMarkWidth = null !== (_o = style.barMarkWidth) && void 0 !== _o ? _o : 2, this._barMarkPosition = null !== (_p = style.barMarkPosition) && void 0 !== _p ? _p : "right", this._barRightToLeft = null !== (_q = style.barRightToLeft) && void 0 !== _q && _q, this._barMarkInBar = null === (_r = style.barMarkInBar) || void 0 === _r || _r;
45054
45054
  }
45055
45055
  get showBar() {
45056
45056
  return this._showBar;
@@ -45142,6 +45142,12 @@
45142
45142
  set barRightToLeft(value) {
45143
45143
  this._barRightToLeft = value;
45144
45144
  }
45145
+ get barMarkInBar() {
45146
+ return this._barMarkInBar;
45147
+ }
45148
+ set barMarkInBar(value) {
45149
+ this._barMarkInBar = value;
45150
+ }
45145
45151
  clone() {
45146
45152
  return new ProgressBarStyle(this, null);
45147
45153
  }
@@ -47606,7 +47612,7 @@
47606
47612
  constructor(container) {
47607
47613
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
47608
47614
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
47609
- if (super(), this.showFrozenIcon = !0, this.version = "1.17.3", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
47615
+ if (super(), this.showFrozenIcon = !0, this.version = "1.17.4-alpha.0", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
47610
47616
  !1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
47611
47617
  const {
47612
47618
  frozenColCount = 0,
@@ -56915,7 +56921,8 @@
56915
56921
  barMarkPositiveColor: barMarkPositiveColor,
56916
56922
  barMarkNegativeColor: barMarkNegativeColor,
56917
56923
  barMarkWidth: barMarkWidth,
56918
- barMarkPosition: barMarkPosition
56924
+ barMarkPosition: barMarkPosition,
56925
+ barMarkInBar: barMarkInBar
56919
56926
  } = style;
56920
56927
  let {
56921
56928
  barHeight: barHeight,
@@ -56930,11 +56937,11 @@
56930
56937
  return Number(v);
56931
56938
  });
56932
56939
  const borderWidth = getQuadProps(getProp("borderLineWidth", style, col, row, table)),
56933
- barPaddingTop = Math.max(barPadding[0], Math.ceil(borderWidth[0] / 2)),
56934
- barPaddingRight = Math.max(barPadding[1], Math.floor(borderWidth[1] / 2)),
56935
- barPaddingBottom = Math.max(barPadding[2], Math.floor(borderWidth[2] / 2)),
56936
- barPaddingLeft = Math.max(barPadding[3], Math.ceil(borderWidth[3] / 2));
56937
- contentWidth -= barPaddingRight + barPaddingLeft, contentHeight -= barPaddingBottom + barPaddingTop, row === table.rowCount - 1 && [0, "0"].includes(barBottom) && (contentHeight -= 1);
56940
+ barPaddingTop = Math.max(barPadding[0], Math.ceil(borderWidth[0] / 2));
56941
+ let barPaddingRight = Math.max(barPadding[1], Math.floor(borderWidth[1] / 2));
56942
+ const barPaddingBottom = Math.max(barPadding[2], Math.floor(borderWidth[2] / 2));
56943
+ let barPaddingLeft = Math.max(barPadding[3], Math.ceil(borderWidth[3] / 2));
56944
+ showBarMark && barMarkWidth > 0 && "right" === barMarkPosition && !1 === barMarkInBar && (barPaddingRight += barMarkWidth, barPaddingLeft += barMarkWidth), contentWidth -= barPaddingRight + barPaddingLeft, contentHeight -= barPaddingBottom + barPaddingTop, row === table.rowCount - 1 && [0, "0"].includes(barBottom) && (contentHeight -= 1);
56938
56945
  const top = barPaddingTop,
56939
56946
  left = barPaddingLeft,
56940
56947
  right = contentWidth;
@@ -57121,7 +57128,7 @@
57121
57128
  dataValue: dataValue,
57122
57129
  percentile: positiveRate
57123
57130
  }) || "#20a8d8", "right" === barMarkPosition) {
57124
- const markLeft = barRightToLeft ? barRectPosi.left + barMarkWidth / 2 : barRectPosi.left + barRectPosi.width - barMarkWidth / 2;
57131
+ const markLeft = barRightToLeft ? barRectPosi.left + barMarkWidth / 2 : barRectPosi.left + barRectPosi.width + (barMarkInBar ? -barMarkWidth / 2 : barMarkWidth / 2);
57125
57132
  points.push({
57126
57133
  x: markLeft,
57127
57134
  y: barRectPosi.top