@visactor/vtable 1.22.13-alpha.1 → 1.22.13-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.
@@ -117,4 +117,5 @@ class BodyHelper {
117
117
  }
118
118
  }
119
119
 
120
- exports.BodyHelper = BodyHelper;
120
+ exports.BodyHelper = BodyHelper;
121
+ //# sourceMappingURL=body-helper.js.map
@@ -49,5 +49,4 @@ function of(columnStyle, bodyStyle, styleArg, StyleClassDef = Style_1.Style, glo
49
49
  StyleClassDef === CheckboxStyle_1.CheckboxStyle ? new CheckboxStyle_1.CheckboxStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_a = theme.checkboxStyle) && void 0 !== _a ? _a : {}) : StyleClassDef === RadioStyle_1.RadioStyle ? new RadioStyle_1.RadioStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_b = theme.radioStyle) && void 0 !== _b ? _b : {}) : StyleClassDef === SwitchStyle_1.SwitchStyle ? new SwitchStyle_1.SwitchStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_c = theme.switchStyle) && void 0 !== _c ? _c : {}) : StyleClassDef === ButtonStyle_1.ButtonStyle ? new ButtonStyle_1.ButtonStyle(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {}, null !== (_d = theme.buttonStyle) && void 0 !== _d ? _d : {}) : new StyleClassDef(null != columnStyle ? columnStyle : {}, null != bodyStyle ? bodyStyle : {})) : StyleClassDef.DEFAULT;
50
50
  }
51
51
 
52
- exports.EVENT_TYPE = EVENT_TYPE, exports.of = of;
53
- //# sourceMappingURL=style.js.map
52
+ exports.EVENT_TYPE = EVENT_TYPE, exports.of = of;
@@ -43,7 +43,7 @@ class BaseTable extends EventTarget_1.EventTarget {
43
43
  }
44
44
  constructor(container, options = {}) {
45
45
  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;
46
- if (super(), this.showFrozenIcon = !0, this.version = "1.22.13-alpha.1", this.id = `VTable${Date.now()}`,
46
+ if (super(), this.showFrozenIcon = !0, this.version = "1.22.13-alpha.10", this.id = `VTable${Date.now()}`,
47
47
  this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = (0, util_1.throttle2)(this.render.bind(this), 200),
48
48
  "node" === env_1.Env.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container,
49
49
  container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
@@ -933,26 +933,29 @@ class BaseTable extends EventTarget_1.EventTarget {
933
933
  this.release();
934
934
  }
935
935
  release() {
936
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
936
+ 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, _0, _1;
937
+ null === (_c = null === (_b = null === (_a = this.scenegraph) || void 0 === _a ? void 0 : _a.component) || void 0 === _b ? void 0 : _b.vScrollBar) || void 0 === _c || _c.release(),
938
+ null === (_f = null === (_e = null === (_d = this.scenegraph) || void 0 === _d ? void 0 : _d.component) || void 0 === _e ? void 0 : _e.hScrollBar) || void 0 === _f || _f.release(),
939
+ this.animationManager.clear(), this.animationManager.ticker.release(), null === (_j = null === (_h = null === (_g = this.scenegraph) || void 0 === _g ? void 0 : _g.stage) || void 0 === _h ? void 0 : _h.ticker) || void 0 === _j || _j.release();
937
940
  const internalProps = this.internalProps;
938
941
  if (this.isReleased) return;
939
- null === (_b = null === (_a = internalProps.tooltipHandler) || void 0 === _a ? void 0 : _a.release) || void 0 === _b || _b.call(_a),
940
- null === (_d = null === (_c = internalProps.menuHandler) || void 0 === _c ? void 0 : _c.release) || void 0 === _d || _d.call(_c),
941
- null === (_e = super.release) || void 0 === _e || _e.call(this), this.pluginManager.release(),
942
- null === (_g = null === (_f = internalProps.handler) || void 0 === _f ? void 0 : _f.release) || void 0 === _g || _g.call(_f),
943
- this.eventManager.release(), null === (_j = null === (_h = internalProps.focusControl) || void 0 === _h ? void 0 : _h.release) || void 0 === _j || _j.call(_h),
944
- null === (_k = internalProps.legends) || void 0 === _k || _k.forEach((legend => {
942
+ null === (_l = null === (_k = internalProps.tooltipHandler) || void 0 === _k ? void 0 : _k.release) || void 0 === _l || _l.call(_k),
943
+ null === (_o = null === (_m = internalProps.menuHandler) || void 0 === _m ? void 0 : _m.release) || void 0 === _o || _o.call(_m),
944
+ null === (_p = super.release) || void 0 === _p || _p.call(this), this.pluginManager.release(),
945
+ null === (_r = null === (_q = internalProps.handler) || void 0 === _q ? void 0 : _q.release) || void 0 === _r || _r.call(_q),
946
+ this.eventManager.release(), null === (_t = null === (_s = internalProps.focusControl) || void 0 === _s ? void 0 : _s.release) || void 0 === _t || _t.call(_s),
947
+ null === (_u = internalProps.legends) || void 0 === _u || _u.forEach((legend => {
945
948
  null == legend || legend.release();
946
- })), null === (_l = internalProps.title) || void 0 === _l || _l.release(), internalProps.title = null,
947
- null === (_m = internalProps.emptyTip) || void 0 === _m || _m.release(), internalProps.emptyTip = null,
949
+ })), null === (_v = internalProps.title) || void 0 === _v || _v.release(), internalProps.title = null,
950
+ null === (_w = internalProps.emptyTip) || void 0 === _w || _w.release(), internalProps.emptyTip = null,
948
951
  internalProps.layoutMap.release(), internalProps.releaseList && (internalProps.releaseList.forEach((releaseObj => {
949
952
  var _a;
950
953
  return null === (_a = null == releaseObj ? void 0 : releaseObj.release) || void 0 === _a ? void 0 : _a.call(releaseObj);
951
954
  })), internalProps.releaseList = null), this.scenegraph.stage.release(), this.scenegraph.proxy.release();
952
- const parentElement = null === (_o = internalProps.element) || void 0 === _o ? void 0 : _o.parentElement;
955
+ const parentElement = null === (_x = internalProps.element) || void 0 === _x ? void 0 : _x.parentElement;
953
956
  parentElement && !this.options.canvas && parentElement.removeChild(internalProps.element),
954
- null === (_r = null === (_q = null === (_p = this.editorManager) || void 0 === _p ? void 0 : _p.editingEditor) || void 0 === _q ? void 0 : _q.onEnd) || void 0 === _r || _r.call(_q),
955
- this.isReleased = !0, this.scenegraph = null, this.internalProps = null, null === (_s = this.reactCustomLayout) || void 0 === _s || _s.clearCache(),
957
+ null === (_0 = null === (_z = null === (_y = this.editorManager) || void 0 === _y ? void 0 : _y.editingEditor) || void 0 === _z ? void 0 : _z.onEnd) || void 0 === _0 || _0.call(_z),
958
+ this.isReleased = !0, this.scenegraph = null, this.internalProps = null, null === (_1 = this.reactCustomLayout) || void 0 === _1 || _1.clearCache(),
956
959
  (0, chart_render_helper_1.clearChartRenderQueue)();
957
960
  }
958
961
  fireListeners(type, event) {
@@ -2073,6 +2076,7 @@ class BaseTable extends EventTarget_1.EventTarget {
2073
2076
  });
2074
2077
  }
2075
2078
  scrollToCell(cellAddr, animationOption) {
2079
+ var _a;
2076
2080
  if (animationOption) return void this.animationManager.scrollTo(cellAddr, animationOption);
2077
2081
  const drawRange = this.getDrawRange();
2078
2082
  if ((0, vutils_1.isValid)(cellAddr.col) && cellAddr.col >= this.frozenColCount) {
@@ -2080,7 +2084,9 @@ class BaseTable extends EventTarget_1.EventTarget {
2080
2084
  this.scrollLeft = Math.min(left - frozenWidth, this.getAllColsWidth() - drawRange.width);
2081
2085
  }
2082
2086
  if ((0, vutils_1.isValid)(cellAddr.row) && cellAddr.row >= this.frozenRowCount) {
2083
- const frozenHeight = this.getFrozenRowsHeight(), top = this.getRowsHeight(0, cellAddr.row - 1);
2087
+ const frozenHeight = this.getFrozenRowsHeight(), rowInt = Math.floor(cellAddr.row), rowFloat = cellAddr.row - rowInt;
2088
+ let top = this.internalProps._rowHeightsMap.getSumInRange(0, rowInt - 1);
2089
+ rowFloat > 0 && (top += (null !== (_a = this.internalProps._rowHeightsMap.get(rowInt)) && void 0 !== _a ? _a : this.getRowHeight(rowInt)) * rowFloat),
2084
2090
  this.scrollTop = Math.min(top - frozenHeight, this.getAllRowsHeight() - drawRange.height);
2085
2091
  }
2086
2092
  this.render();