@visactor/vtable-sheet 1.23.2 → 1.23.3-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.
package/cjs/index.d.ts CHANGED
@@ -2,5 +2,5 @@ import VTableSheet from './components/vtable-sheet';
2
2
  import type { ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions } from './ts-types';
3
3
  import * as TYPES from './ts-types';
4
4
  import * as VTable from './vtable';
5
- export declare const version = "1.23.2";
5
+ export declare const version = "1.23.3-alpha.0";
6
6
  export { VTableSheet, TYPES, VTable, ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions };
package/cjs/index.js CHANGED
@@ -47,4 +47,4 @@ exports.VTable = VTable;
47
47
 
48
48
  const style_manager_1 = require("./styles/style-manager");
49
49
 
50
- exports.version = "1.23.2", (0, style_manager_1.importStyles)();
50
+ exports.version = "1.23.3-alpha.0", (0, style_manager_1.importStyles)();
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6EAAoD;AAW3C,sBAXF,sBAAW,CAWE;AATpB,kDAAoC;AASd,sBAAK;AAR3B,iDAAmC;AAQN,wBAAM;AAPnC,0DAAsD;AACzC,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEhC,IAAA,4BAAY,GAAE,CAAC","file":"index.js","sourcesContent":["import VTableSheet from './components/vtable-sheet';\nimport type { ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport * as VTable from './vtable';\nimport { importStyles } from './styles/style-manager';\nexport const version = \"1.23.2\";\n// 导入样式\nimportStyles();\n/**\n * @namespace VTableSheet\n */\nexport { VTableSheet, TYPES, VTable, ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions };\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6EAAoD;AAW3C,sBAXF,sBAAW,CAWE;AATpB,kDAAoC;AASd,sBAAK;AAR3B,iDAAmC;AAQN,wBAAM;AAPnC,0DAAsD;AACzC,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAExC,IAAA,4BAAY,GAAE,CAAC","file":"index.js","sourcesContent":["import VTableSheet from './components/vtable-sheet';\nimport type { ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport * as VTable from './vtable';\nimport { importStyles } from './styles/style-manager';\nexport const version = \"1.23.3-alpha.0\";\n// 导入样式\nimportStyles();\n/**\n * @namespace VTableSheet\n */\nexport { VTableSheet, TYPES, VTable, ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions };\n"]}
@@ -24512,7 +24512,7 @@
24512
24512
  this._sliderRenderBounds = null, this._sliderLimitRange = null;
24513
24513
  }
24514
24514
  release(all) {
24515
- super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).addEventListener("touchmove", this._handleTouchMove, {
24515
+ super.release(all), ("browser" === vglobal.env ? vglobal : this.stage).removeEventListener("touchmove", this._handleTouchMove, {
24516
24516
  passive: !1
24517
24517
  }), this._clearDragEvents();
24518
24518
  }
@@ -26095,17 +26095,21 @@
26095
26095
  } = this.attribute.label;
26096
26096
  textStyle = isFunction$4(textStyle) ? merge({}, DEFAULT_AXIS_THEME.label.style, textStyle(tickDatum, index, tickData, layer)) : textStyle;
26097
26097
  const labelAlign = this.getLabelAlign(vector, inside, textStyle.angle);
26098
- return textStyle = merge(labelAlign, textStyle), isFunction$4(textStyle.text) && (textStyle.text = textStyle.text({
26098
+ textStyle = merge(labelAlign, textStyle), isFunction$4(textStyle.text) && (textStyle.text = textStyle.text({
26099
26099
  label: tickDatum.label,
26100
26100
  value: tickDatum.rawValue,
26101
26101
  index: tickDatum.index,
26102
26102
  layer: layer
26103
- })), Object.assign(Object.assign(Object.assign({}, this.getLabelPosition(point, vector, textContent, textStyle)), {
26103
+ }));
26104
+ let reactStyle = textStyle.react;
26105
+ return isFunction$4(reactStyle) && (reactStyle = reactStyle(tickDatum, index, tickData, layer)), Object.assign(Object.assign(Object.assign(Object.assign({}, this.getLabelPosition(point, vector, textContent, textStyle)), {
26104
26106
  text: null != text ? text : textContent,
26105
26107
  _originText: tickDatum.label,
26106
26108
  lineHeight: null == textStyle ? void 0 : textStyle.fontSize,
26107
26109
  type: type
26108
- }), textStyle);
26110
+ }), textStyle), {
26111
+ react: reactStyle
26112
+ });
26109
26113
  }
26110
26114
  getLabelPosition(point, vector, text, style) {
26111
26115
  return point;
@@ -27134,6 +27138,8 @@
27134
27138
  this.status === STATUS$1.RUNNING && (this.tickCounts++, this.timelines.forEach(timeline => {
27135
27139
  timeline.tick(delta);
27136
27140
  }), this.emit("tick", delta));
27141
+ }, this._handleGraphTick = () => {
27142
+ this.initHandler(!1);
27137
27143
  }, this.init(), this.lastFrameTime = -1, this.tickCounts = 0, this.stage = stage, this.autoStop = !0, this.interval = 16, this.computeTimeOffsetAndJitter();
27138
27144
  }
27139
27145
  bindStage(stage) {
@@ -27143,9 +27149,7 @@
27143
27149
  this.timeOffset = Math.floor(Math.random() * this.interval), this._jitter = Math.min(Math.max(.2 * this.interval, 6), .7 * this.interval);
27144
27150
  }
27145
27151
  init() {
27146
- this.interval = 16, this.status = STATUS$1.INITIAL, application.global.hooks.onSetEnv.tap("graph-ticker", () => {
27147
- this.initHandler(!1);
27148
- }), application.global.env && this.initHandler(!1);
27152
+ this.interval = 16, this.status = STATUS$1.INITIAL, application.global.hooks.onSetEnv.tap("graph-ticker", this._handleGraphTick), application.global.env && this.initHandler(!1);
27149
27153
  }
27150
27154
  addTimeline(timeline) {
27151
27155
  this.timelines.push(timeline);
@@ -27218,7 +27222,7 @@
27218
27222
  }
27219
27223
  release() {
27220
27224
  var _a;
27221
- this.stop(), this.timelines = [], null === (_a = this.tickerHandler) || void 0 === _a || _a.release(), this.tickerHandler = null, this.lastFrameTime = -1;
27225
+ this.stop(), this.timelines = [], null === (_a = this.tickerHandler) || void 0 === _a || _a.release(), this.tickerHandler = null, this.lastFrameTime = -1, application.global.hooks.onSetEnv.unTap("graph-ticker", this._handleGraphTick);
27222
27226
  }
27223
27227
  checkSkip(delta) {
27224
27228
  var _a, _b, _c;
@@ -60574,7 +60578,7 @@
60574
60578
  }
60575
60579
  constructor(container, options = {}) {
60576
60580
  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;
60577
- if (super(), this.showFrozenIcon = !0, this._tableBorderWidth_left = 0, this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0, this.version = "1.23.2", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env$1.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");
60581
+ if (super(), this.showFrozenIcon = !0, this._tableBorderWidth_left = 0, this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0, this.version = "1.23.3-alpha.0", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env$1.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");
60578
60582
  this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
60579
60583
  options: options,
60580
60584
  container: container
@@ -61513,17 +61517,18 @@
61513
61517
  this.release();
61514
61518
  }
61515
61519
  release() {
61516
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
61520
+ 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;
61521
+ 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(), 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(), 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();
61517
61522
  const internalProps = this.internalProps;
61518
61523
  if (this.isReleased) return;
61519
- null === (_b = null === (_a = internalProps.tooltipHandler) || void 0 === _a ? void 0 : _a.release) || void 0 === _b || _b.call(_a), null === (_d = null === (_c = internalProps.menuHandler) || void 0 === _c ? void 0 : _c.release) || void 0 === _d || _d.call(_c), null === (_e = super.release) || void 0 === _e || _e.call(this), this.pluginManager.release(), null === (_g = null === (_f = internalProps.handler) || void 0 === _f ? void 0 : _f.release) || void 0 === _g || _g.call(_f), this.eventManager.release(), null === (_j = null === (_h = internalProps.focusControl) || void 0 === _h ? void 0 : _h.release) || void 0 === _j || _j.call(_h), null === (_k = internalProps.legends) || void 0 === _k || _k.forEach(legend => {
61524
+ null === (_l = null === (_k = internalProps.tooltipHandler) || void 0 === _k ? void 0 : _k.release) || void 0 === _l || _l.call(_k), null === (_o = null === (_m = internalProps.menuHandler) || void 0 === _m ? void 0 : _m.release) || void 0 === _o || _o.call(_m), null === (_p = super.release) || void 0 === _p || _p.call(this), this.pluginManager.release(), null === (_r = null === (_q = internalProps.handler) || void 0 === _q ? void 0 : _q.release) || void 0 === _r || _r.call(_q), this.eventManager.release(), null === (_t = null === (_s = internalProps.focusControl) || void 0 === _s ? void 0 : _s.release) || void 0 === _t || _t.call(_s), null === (_u = internalProps.legends) || void 0 === _u || _u.forEach(legend => {
61520
61525
  null == legend || legend.release();
61521
- }), null === (_l = internalProps.title) || void 0 === _l || _l.release(), internalProps.title = null, null === (_m = internalProps.emptyTip) || void 0 === _m || _m.release(), internalProps.emptyTip = null, internalProps.layoutMap.release(), internalProps.releaseList && (internalProps.releaseList.forEach(releaseObj => {
61526
+ }), null === (_v = internalProps.title) || void 0 === _v || _v.release(), internalProps.title = null, null === (_w = internalProps.emptyTip) || void 0 === _w || _w.release(), internalProps.emptyTip = null, internalProps.layoutMap.release(), internalProps.releaseList && (internalProps.releaseList.forEach(releaseObj => {
61522
61527
  var _a;
61523
61528
  return null === (_a = null == releaseObj ? void 0 : releaseObj.release) || void 0 === _a ? void 0 : _a.call(releaseObj);
61524
61529
  }), internalProps.releaseList = null), this.scenegraph.stage.release(), this.scenegraph.proxy.release();
61525
- const parentElement = null === (_o = internalProps.element) || void 0 === _o ? void 0 : _o.parentElement;
61526
- parentElement && !this.options.canvas && parentElement.removeChild(internalProps.element), 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), this.isReleased = !0, this.scenegraph = null, this.internalProps = null, null === (_s = this.reactCustomLayout) || void 0 === _s || _s.clearCache(), clearChartRenderQueue();
61530
+ const parentElement = null === (_x = internalProps.element) || void 0 === _x ? void 0 : _x.parentElement;
61531
+ parentElement && !this.options.canvas && parentElement.removeChild(internalProps.element), 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), this.isReleased = !0, this.scenegraph = null, this.internalProps = null, null === (_1 = this.reactCustomLayout) || void 0 === _1 || _1.clearCache(), clearChartRenderQueue();
61527
61532
  }
61528
61533
  fireListeners(type, event) {
61529
61534
  return super.fireListeners(type, event);
@@ -92960,7 +92965,7 @@
92960
92965
  importStyle();
92961
92966
  }
92962
92967
 
92963
- const version = "1.23.2";
92968
+ const version = "1.23.3-alpha.0";
92964
92969
  importStyles();
92965
92970
 
92966
92971
  exports.TYPES = index;