@visactor/vrender-components 1.0.8-alpha.1 → 1.0.8-alpha.2

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.
Files changed (52) hide show
  1. package/cjs/animation/label-animate.js +2 -2
  2. package/cjs/animation/label-animate.js.map +1 -1
  3. package/cjs/index.d.ts +2 -1
  4. package/cjs/index.js +3 -2
  5. package/cjs/index.js.map +1 -1
  6. package/cjs/label/base.js +6 -5
  7. package/cjs/label/base.js.map +1 -1
  8. package/cjs/table-series-number/event-manager.d.ts +15 -0
  9. package/cjs/table-series-number/event-manager.js +149 -0
  10. package/cjs/table-series-number/event-manager.js.map +1 -0
  11. package/cjs/table-series-number/index.d.ts +2 -0
  12. package/cjs/table-series-number/index.js +21 -0
  13. package/cjs/table-series-number/index.js.map +1 -0
  14. package/cjs/table-series-number/register.d.ts +1 -0
  15. package/cjs/table-series-number/register.js +14 -0
  16. package/cjs/table-series-number/register.js.map +1 -0
  17. package/cjs/table-series-number/table-series-number.d.ts +76 -0
  18. package/cjs/table-series-number/table-series-number.js +534 -0
  19. package/cjs/table-series-number/table-series-number.js.map +1 -0
  20. package/cjs/table-series-number/tools.d.ts +1 -0
  21. package/cjs/table-series-number/tools.js +14 -0
  22. package/cjs/table-series-number/tools.js.map +1 -0
  23. package/cjs/table-series-number/type.d.ts +79 -0
  24. package/cjs/table-series-number/type.js +16 -0
  25. package/cjs/table-series-number/type.js.map +1 -0
  26. package/dist/index.es.js +1016 -81
  27. package/es/animation/label-animate.js +2 -2
  28. package/es/animation/label-animate.js.map +1 -1
  29. package/es/index.d.ts +2 -1
  30. package/es/index.js +3 -1
  31. package/es/index.js.map +1 -1
  32. package/es/label/base.js +6 -5
  33. package/es/label/base.js.map +1 -1
  34. package/es/table-series-number/event-manager.d.ts +15 -0
  35. package/es/table-series-number/event-manager.js +143 -0
  36. package/es/table-series-number/event-manager.js.map +1 -0
  37. package/es/table-series-number/index.d.ts +2 -0
  38. package/es/table-series-number/index.js +4 -0
  39. package/es/table-series-number/index.js.map +1 -0
  40. package/es/table-series-number/register.d.ts +1 -0
  41. package/es/table-series-number/register.js +6 -0
  42. package/es/table-series-number/register.js.map +1 -0
  43. package/es/table-series-number/table-series-number.d.ts +76 -0
  44. package/es/table-series-number/table-series-number.js +542 -0
  45. package/es/table-series-number/table-series-number.js.map +1 -0
  46. package/es/table-series-number/tools.d.ts +1 -0
  47. package/es/table-series-number/tools.js +8 -0
  48. package/es/table-series-number/tools.js.map +1 -0
  49. package/es/table-series-number/type.d.ts +79 -0
  50. package/es/table-series-number/type.js +15 -0
  51. package/es/table-series-number/type.js.map +1 -0
  52. package/package.json +6 -6
package/dist/index.es.js CHANGED
@@ -6391,15 +6391,15 @@ class Graphic extends Node {
6391
6391
  setWidthHeightWithoutTransform(aabbBounds) {
6392
6392
  this.widthWithoutTransform = aabbBounds.x2 - aabbBounds.x1, this.heightWithoutTransform = aabbBounds.y2 - aabbBounds.y1;
6393
6393
  }
6394
- setAttributesAndPreventAnimate(params, forceUpdateTag = !1, context, ignorePriority) {
6394
+ setAttributesAndPreventAnimate(params, forceUpdateTag = !1, context) {
6395
6395
  this.setAttributes(params, forceUpdateTag, context), this.animates && this.animates.forEach(animate => {
6396
- (animate.priority !== 1 / 0 || ignorePriority) && Object.keys(params).forEach(key => {
6396
+ Object.keys(params).forEach(key => {
6397
6397
  animate.preventAttr(key);
6398
6398
  });
6399
6399
  });
6400
6400
  }
6401
6401
  setAttributes(params, forceUpdateTag = !1, context) {
6402
- params && ((params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params).background ? this.loadImage(params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic), this._setAttributes(params, forceUpdateTag, context));
6402
+ (params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params).background ? this.loadImage(params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic), this._setAttributes(params, forceUpdateTag, context);
6403
6403
  }
6404
6404
  _setAttributes(params, forceUpdateTag = !1, context) {
6405
6405
  const keys = Object.keys(params);
@@ -6564,7 +6564,7 @@ class Graphic extends Node {
6564
6564
  });
6565
6565
  } else this.stopStateAnimates(), this.setAttributesAndPreventAnimate(attrs, !1, {
6566
6566
  type: AttributeUpdateType.STATE
6567
- }), this.finalAttribute && Object.assign(this.finalAttribute, attrs);
6567
+ });
6568
6568
  this._emitCustomEvent("afterStateUpdate", {
6569
6569
  type: AttributeUpdateType.STATE
6570
6570
  });
@@ -6957,7 +6957,7 @@ class Group extends Graphic {
6957
6957
  }
6958
6958
  removeChild(child) {
6959
6959
  const data = super.removeChild(child);
6960
- return this.getGraphicService().onRemove(child), child.stage = null, this.addUpdateBoundTag(), data;
6960
+ return child.stage = null, this.getGraphicService().onRemove(child), this.addUpdateBoundTag(), data;
6961
6961
  }
6962
6962
  removeAllChild(deep = !1) {
6963
6963
  this.forEachChildren(child => {
@@ -18802,7 +18802,6 @@ class Step {
18802
18802
  return this.getEndProps();
18803
18803
  }
18804
18804
  stop() {}
18805
- release() {}
18806
18805
  }
18807
18806
  class WaitStep extends Step {
18808
18807
  constructor(type, props, duration, easing) {
@@ -18826,7 +18825,7 @@ class DefaultTimeline extends EventEmitter {
18826
18825
  return this._animateCount;
18827
18826
  }
18828
18827
  constructor() {
18829
- super(), this.head = null, this.tail = null, this.animateMap = new Map(), this._animateCount = 0, this._playSpeed = 1, this._totalDuration = 0, this._startTime = 0, this._currentTime = 0, this._animationEndFlag = !0, this.id = Generator.GenAutoIncrementId(), this.paused = !1;
18828
+ super(), this.head = null, this.tail = null, this.animateMap = new Map(), this._animateCount = 0, this._playSpeed = 1, this._totalDuration = 0, this._startTime = 0, this._currentTime = 0, this.id = Generator.GenAutoIncrementId(), this.paused = !1;
18830
18829
  }
18831
18830
  isRunning() {
18832
18831
  return !this.paused && this._animateCount > 0;
@@ -18855,11 +18854,10 @@ class DefaultTimeline extends EventEmitter {
18855
18854
  }
18856
18855
  tick(delta) {
18857
18856
  if (this.paused) return;
18858
- this._animationEndFlag && (this._animationEndFlag = !1, this.emit("animationStart"));
18859
18857
  const scaledDelta = delta * this._playSpeed;
18860
18858
  this._currentTime += scaledDelta, this.forEachAccessAnimate((animate, i) => {
18861
18859
  animate.status === AnimateStatus.END ? this.removeAnimate(animate, !0) : animate.status !== AnimateStatus.RUNNING && animate.status !== AnimateStatus.INITIAL || animate.advance(scaledDelta);
18862
- }), 0 === this._animateCount && (this._animationEndFlag = !0, this.emit("animationEnd"));
18860
+ }), 0 === this._animateCount && this.emit("animationEnd");
18863
18861
  }
18864
18862
  clear() {
18865
18863
  this.forEachAccessAnimate(animate => {
@@ -18923,9 +18921,7 @@ class Animate {
18923
18921
  return this._timeline;
18924
18922
  }
18925
18923
  bind(target) {
18926
- return this.target = target, this.target.animates || (this.target.animates = new Map()), this.target.animates.set(this.id, this), this.onRemove(() => {
18927
- this.stop(), this.target.animates.delete(this.id);
18928
- }), this.target.onAnimateBind && !this.slience && this.target.onAnimateBind(this), this.target.animationAttribute || (this.target.animationAttribute = {}), this;
18924
+ return this.target = target, this.target.onAnimateBind && !this.slience && this.target.onAnimateBind(this), this.target.animationAttribute || (this.target.animationAttribute = {}), this;
18929
18925
  }
18930
18926
  to(props, duration = 300, easing = "linear") {
18931
18927
  const step = new Step(AnimateStepType.to, props, duration, easing);
@@ -19020,9 +19016,7 @@ class Animate {
19020
19016
  this.status !== AnimateStatus.END && this.onEnd(), this.status = AnimateStatus.END, this.target && ("start" === type ? this.target.setAttributes(this._startProps) : "end" === type ? this.target.setAttributes(this._endProps) : type && this.target.setAttributes(type));
19021
19017
  }
19022
19018
  release() {
19023
- this.status = AnimateStatus.END, this._onRemove && this._onRemove.forEach(cb => cb()), this._onStart = [], this._onFrame = [], this._onEnd = [], this._onRemove = [], this.forEachStep(step => {
19024
- step.release();
19025
- });
19019
+ this.status = AnimateStatus.END, this._onRemove && this._onRemove.forEach(cb => cb()), this._onStart = [], this._onFrame = [], this._onEnd = [], this._onRemove = [];
19026
19020
  }
19027
19021
  getDuration() {
19028
19022
  return this._duration;
@@ -19096,10 +19090,6 @@ class Animate {
19096
19090
  getLoop() {
19097
19091
  return this._loopCount;
19098
19092
  }
19099
- forEachStep(cb) {
19100
- let step = this._firstStep;
19101
- for (; step;) cb(step), step = step.next;
19102
- }
19103
19093
  }
19104
19094
 
19105
19095
  const performanceRAF = new PerformanceRAF();
@@ -19145,8 +19135,8 @@ class DefaultTicker extends EventEmitter {
19145
19135
  }
19146
19136
  init() {
19147
19137
  this.interval = 16, this.status = STATUS$1.INITIAL, application.global.hooks.onSetEnv.tap("graph-ticker", () => {
19148
- this.initHandler(!1);
19149
- }), application.global.env && this.initHandler(!1);
19138
+ this.initHandler();
19139
+ }), application.global.env && this.initHandler();
19150
19140
  }
19151
19141
  addTimeline(timeline) {
19152
19142
  this.timelines.push(timeline);
@@ -19157,11 +19147,10 @@ class DefaultTicker extends EventEmitter {
19157
19147
  getTimelines() {
19158
19148
  return this.timelines;
19159
19149
  }
19160
- initHandler(force = !1) {
19161
- this.setupTickHandler(force);
19150
+ initHandler() {
19151
+ this.setupTickHandler();
19162
19152
  }
19163
- setupTickHandler(force = !1) {
19164
- if (!force && this.tickerHandler) return !0;
19153
+ setupTickHandler() {
19165
19154
  const handler = new RAFTickHandler();
19166
19155
  return this.tickerHandler && this.tickerHandler.release(), this.tickerHandler = handler, !0;
19167
19156
  }
@@ -19212,7 +19201,7 @@ class DefaultTicker extends EventEmitter {
19212
19201
  return this.status = STATUS$1.RUNNING, this.tickerHandler.tick(0, this.handleTick), !0;
19213
19202
  }
19214
19203
  stop() {
19215
- this.status = STATUS$1.INITIAL, this.setupTickHandler(!0), this.lastFrameTime = -1;
19204
+ this.status = STATUS$1.INITIAL, this.setupTickHandler(), this.lastFrameTime = -1;
19216
19205
  }
19217
19206
  trySyncTickStatus() {
19218
19207
  this.status === STATUS$1.INITIAL && this.timelines.some(timeline => timeline.isRunning()) ? this.start() : this.status === STATUS$1.RUNNING && this.timelines.every(timeline => !timeline.isRunning()) && this.stop();
@@ -19222,8 +19211,7 @@ class DefaultTicker extends EventEmitter {
19222
19211
  this.stop(), this.timelines = [], null === (_a = this.tickerHandler) || void 0 === _a || _a.release(), this.tickerHandler = null, this.lastFrameTime = -1;
19223
19212
  }
19224
19213
  checkSkip(delta) {
19225
- var _a, _b, _c;
19226
- if ("performance" === (null === (_c = null === (_b = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.params) || void 0 === _b ? void 0 : _b.optimize) || void 0 === _c ? void 0 : _c.tickRenderMode)) return !1;
19214
+ if ("performance" === this.stage.params.optimize.tickRenderMode) return !1;
19227
19215
  return delta < this.interval + 2 * (Math.random() - .5) * this._jitter;
19228
19216
  }
19229
19217
  }
@@ -19474,11 +19462,10 @@ class AnimateExecutor {
19474
19462
  _handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic) {
19475
19463
  var _a, _b, _c, _d;
19476
19464
  if (custom && customType) {
19477
- const customParams = Object.assign({
19465
+ const customParams = this.resolveValue(customParameters, graphic, {
19478
19466
  width: graphic.stage.width,
19479
- height: graphic.stage.height,
19480
- group: this._target.parent
19481
- }, this.resolveValue(customParameters, graphic)),
19467
+ height: graphic.stage.height
19468
+ }),
19482
19469
  objOptions = isFunction(options) ? options.call(null, null !== (_b = customParams && (null === (_a = customParams.data) || void 0 === _a ? void 0 : _a[0])) && void 0 !== _b ? _b : null === (_d = null === (_c = graphic.context) || void 0 === _c ? void 0 : _c.data) || void 0 === _d ? void 0 : _d[0], graphic, customParams) : options;
19483
19470
  customParams.options = objOptions, customParams.controlOptions = controlOptions, 1 === customType ? this.createCustomAnimation(animate, custom, from, props, duration, easing, customParams) : 2 === customType && this.createCustomInterpolatorAnimation(animate, custom, props, duration, easing, customParams);
19484
19471
  } else "to" === type ? animate.to(props, duration, easing) : "from" === type && animate.from(props, duration, easing);
@@ -19696,11 +19683,6 @@ class AnimationStateManager {
19696
19683
  state.executor.stop();
19697
19684
  }), this.stateList = null;
19698
19685
  }
19699
- reApplyState(state) {
19700
- var _a;
19701
- const stateInfo = null === (_a = this.stateList) || void 0 === _a ? void 0 : _a.find(stateInfo => stateInfo.state === state);
19702
- stateInfo && (stateInfo.executor.stop(), stateInfo.executor.execute(stateInfo.animationConfig));
19703
- }
19704
19686
  }
19705
19687
 
19706
19688
  class GraphicStateExtension {
@@ -19731,19 +19713,12 @@ class GraphicStateExtension {
19731
19713
  applyUnhighlightState(animationConfig, callback) {
19732
19714
  return this._getAnimationStateManager(this).applyUnhighlightState(animationConfig, callback), this;
19733
19715
  }
19734
- stopAnimationState(state, type, deep = !1) {
19735
- return this._getAnimationStateManager(this).stopState(state, type), deep && this.isContainer && this.forEachChildren(child => {
19736
- child.stopAnimationState(state, type, deep);
19737
- }), this;
19716
+ stopAnimationState(state, type) {
19717
+ return this._getAnimationStateManager(this).stopState(state, type), this;
19738
19718
  }
19739
19719
  clearAnimationStates() {
19740
19720
  return this._getAnimationStateManager(this).clearState(), this;
19741
19721
  }
19742
- reApplyAnimationState(state, deep = !1) {
19743
- return this._getAnimationStateManager(this).reApplyState(state), deep && this.isContainer && this.forEachChildren(child => {
19744
- child.reApplyAnimationState(state, deep);
19745
- }), this;
19746
- }
19747
19722
  static extend(graphic) {
19748
19723
  return new GraphicStateExtension()._getAnimationStateManager(graphic), graphic;
19749
19724
  }
@@ -19755,6 +19730,7 @@ class AnimateExtension {
19755
19730
  }
19756
19731
  animate(params) {
19757
19732
  var _a, _b, _c;
19733
+ this.animates || (this.animates = new Map());
19758
19734
  const animate = new Animate(null == params ? void 0 : params.id, null !== (_b = null !== (_a = null == params ? void 0 : params.timeline) && void 0 !== _a ? _a : this.stage && this.stage.getTimeline()) && void 0 !== _b ? _b : defaultTimeline, null == params ? void 0 : params.slience);
19759
19735
  if (animate.bind(this), params) {
19760
19736
  const {
@@ -19764,7 +19740,9 @@ class AnimateExtension {
19764
19740
  } = params;
19765
19741
  null != onStart && animate.onStart(onStart), null != onEnd && animate.onEnd(onEnd), null != onRemove && animate.onRemove(onRemove);
19766
19742
  }
19767
- return null === (_c = this.stage) || void 0 === _c || _c.ticker.start(), animate;
19743
+ return this.animates.set(animate.id, animate), animate.onRemove(() => {
19744
+ animate.stop(), this.animates.delete(animate.id);
19745
+ }), null === (_c = this.stage) || void 0 === _c || _c.ticker.start(), animate;
19768
19746
  }
19769
19747
  createTimeline() {
19770
19748
  return new DefaultTimeline();
@@ -19795,21 +19773,6 @@ class AnimateExtension {
19795
19773
  getGraphicAttribute(key, prev = !1) {
19796
19774
  return !prev && this.finalAttribute ? this.finalAttribute[key] : this.attribute[key];
19797
19775
  }
19798
- pauseAnimation(deep = !1) {
19799
- this.animates && this.animates.forEach(animate => animate.pause()), deep && this.isContainer && this.forEachChildren(child => {
19800
- child.pauseAnimation(deep);
19801
- });
19802
- }
19803
- resumeAnimation(deep = !1) {
19804
- this.animates && this.animates.forEach(animate => animate.resume()), deep && this.isContainer && this.forEachChildren(child => {
19805
- child.resumeAnimation(deep);
19806
- });
19807
- }
19808
- stopAnimation(deep = !1) {
19809
- this.animates && this.animates.forEach(animate => animate.stop()), deep && this.isContainer && this.forEachChildren(child => {
19810
- child.stopAnimation(deep);
19811
- });
19812
- }
19813
19776
  }
19814
19777
 
19815
19778
  function registerAnimate() {
@@ -19818,7 +19781,7 @@ function registerAnimate() {
19818
19781
 
19819
19782
  class ACustomAnimate extends Step {
19820
19783
  constructor(customFrom, customTo, duration, easing, params) {
19821
- super("customAnimate", customTo, duration, easing), this.type = "customAnimate", this.customFrom = customFrom, this.params = params, this.from = customFrom, this.to = customTo;
19784
+ super("customAnimate", customTo, duration, easing), this.type = "customAnimate", this.customFrom = customFrom, this.params = params;
19822
19785
  }
19823
19786
  update(end, ratio, out) {
19824
19787
  if (this.onStart(), !this.props || !this.propKeys) return;
@@ -22127,7 +22090,7 @@ class LabelUpdate extends AComponentAnimate {
22127
22090
  this._animator = animator;
22128
22091
  const duration = this.duration;
22129
22092
  const easing = this.easing;
22130
- const { prevText, curText, prevLabelLine, curLabelLine, increaseEffect = true } = this.params;
22093
+ const { prevText, curText, prevLabelLine, curLabelLine } = this.params;
22131
22094
  const diff = {};
22132
22095
  for (const key in curText.attribute) {
22133
22096
  if (prevText.attribute[key] !== curText.attribute[key]) {
@@ -22141,16 +22104,14 @@ class LabelUpdate extends AComponentAnimate {
22141
22104
  duration,
22142
22105
  easing
22143
22106
  });
22144
- if (increaseEffect !== false) {
22145
- animator.animate(prevText, {
22146
- type: 'increaseCount',
22147
- to: {
22148
- text: curText.attribute.text
22149
- },
22150
- duration,
22151
- easing
22152
- });
22153
- }
22107
+ animator.animate(prevText, {
22108
+ type: 'increaseCount',
22109
+ to: {
22110
+ text: curText.attribute.text
22111
+ },
22112
+ duration,
22113
+ easing
22114
+ });
22154
22115
  if (prevLabelLine) {
22155
22116
  animator.animate(prevLabelLine, {
22156
22117
  type: 'to',
@@ -22971,13 +22932,12 @@ class LabelBase extends AnimateComponent {
22971
22932
  prevText.applyAnimationState(['update'], [
22972
22933
  {
22973
22934
  name: 'update',
22974
- animation: {
22975
- type: 'labelUpdate',
22976
- customParameters: Object.assign(Object.assign({}, this._animationConfig.update), { prevText,
22935
+ animation: Object.assign(Object.assign({ type: 'labelUpdate' }, this._animationConfig.update), { customParameters: {
22936
+ prevText,
22977
22937
  curText,
22978
22938
  prevLabelLine,
22979
- curLabelLine })
22980
- }
22939
+ curLabelLine
22940
+ } })
22981
22941
  }
22982
22942
  ]);
22983
22943
  }
@@ -33127,6 +33087,981 @@ StoryLabelItem.defaultAttributes = {
33127
33087
  theme: 'default'
33128
33088
  };
33129
33089
 
33130
- const version = "1.0.8-alpha.1";
33090
+ function generateColField(index) {
33091
+ if (index < 26) {
33092
+ return String.fromCharCode(65 + index);
33093
+ }
33094
+ const title = [];
33095
+ index++;
33096
+ while (index > 0) {
33097
+ index--;
33098
+ title.unshift(String.fromCharCode(65 + (index % 26)));
33099
+ index = Math.floor(index / 26);
33100
+ }
33101
+ return title.join('');
33102
+ }
33103
+
33104
+ var SeriesNumberCellStateValue;
33105
+ (function (SeriesNumberCellStateValue) {
33106
+ SeriesNumberCellStateValue["hover"] = "hover";
33107
+ SeriesNumberCellStateValue["select"] = "select";
33108
+ })(SeriesNumberCellStateValue || (SeriesNumberCellStateValue = {}));
33109
+ var SeriesNumberEvent;
33110
+ (function (SeriesNumberEvent) {
33111
+ SeriesNumberEvent["seriesNumberCellHover"] = "seriesNumberCellHover";
33112
+ SeriesNumberEvent["seriesNumberCellUnHover"] = "seriesNumberCellUnHover";
33113
+ SeriesNumberEvent["seriesNumberCellClick"] = "seriesNumberCellClick";
33114
+ SeriesNumberEvent["seriesNumberCellClickUp"] = "seriesNumberCellClickUp";
33115
+ SeriesNumberEvent["seriesNumberCellCancelClick"] = "seriesNumberCellCancelClick";
33116
+ SeriesNumberEvent["rowSeriesNumberWidthChange"] = "rowSeriesNumberWidthChange";
33117
+ SeriesNumberEvent["resizeRowHeightStart"] = "resizeRowHeightStart";
33118
+ SeriesNumberEvent["resizeColWidthStart"] = "resizeColWidthStart";
33119
+ })(SeriesNumberEvent || (SeriesNumberEvent = {}));
33120
+
33121
+ class TableSeriesNumberEventManager {
33122
+ constructor(tableSeriesNumber) {
33123
+ this.isPointerDownStartSelect = false;
33124
+ this._onPointermove = (e) => {
33125
+ const target = e.target;
33126
+ if (this.isPointerDownStartSelect) {
33127
+ if (!this._tableSeriesNumber.interactionState.selectIndexs.has(target.name)) {
33128
+ this._tableSeriesNumber.interactionState.selectIndexs.add(target.name);
33129
+ this._tableSeriesNumber.renderSelectedIndexsState();
33130
+ this._tableSeriesNumber.dispatchTableSeriesNumberEvent(SeriesNumberEvent.seriesNumberCellClick, {
33131
+ seriesNumberCell: target,
33132
+ event: e,
33133
+ isDragSelect: true
33134
+ });
33135
+ }
33136
+ else {
33137
+ if (this._tableSeriesNumber.interactionState._lastClickItem &&
33138
+ this._tableSeriesNumber.interactionState._lastClickItem.id === target.id) {
33139
+ return;
33140
+ }
33141
+ this._tableSeriesNumber.renderSelectedIndexsState();
33142
+ this._tableSeriesNumber.dispatchTableSeriesNumberEvent(SeriesNumberEvent.seriesNumberCellClick, {
33143
+ seriesNumberCell: target,
33144
+ event: e,
33145
+ isDragSelect: true
33146
+ });
33147
+ }
33148
+ this._tableSeriesNumber.interactionState._lastClickItem = target;
33149
+ return;
33150
+ }
33151
+ if (target.name.startsWith('col')) {
33152
+ Number(target.name.split('-')[1]);
33153
+ const canvasPointXY = target.stage.window.pointTransform(e.canvasX, e.canvasY);
33154
+ const XYtoTarget = { x: 0, y: 0 };
33155
+ target.globalTransMatrix.transformPoint(canvasPointXY, XYtoTarget);
33156
+ if (XYtoTarget.x <= 4 ||
33157
+ (XYtoTarget.x <= target.getAttributes().width && XYtoTarget.x >= target.getAttributes().width - 4)) {
33158
+ target.setAttribute('cursor', 'col-resize');
33159
+ }
33160
+ else {
33161
+ target.setAttribute('cursor', 'default');
33162
+ }
33163
+ }
33164
+ else if (target.name.startsWith('row')) {
33165
+ Number(target.name.split('-')[1]);
33166
+ const canvasPointXY = target.stage.window.pointTransform(e.canvasX, e.canvasY);
33167
+ const XYtoTarget = { x: 0, y: 0 };
33168
+ target.globalTransMatrix.transformPoint(canvasPointXY, XYtoTarget);
33169
+ if (XYtoTarget.y <= 4 ||
33170
+ (XYtoTarget.y <= target.getAttributes().height && XYtoTarget.y >= target.getAttributes().height - 4)) {
33171
+ target.setAttribute('cursor', 'row-resize');
33172
+ }
33173
+ else {
33174
+ target.setAttribute('cursor', 'default');
33175
+ }
33176
+ }
33177
+ if (this._tableSeriesNumber.interactionState._lastHoverItem) {
33178
+ if (this._tableSeriesNumber.interactionState._lastHoverItem.id === target.id) {
33179
+ return;
33180
+ }
33181
+ this._unHoverHandler(this._tableSeriesNumber.interactionState._lastHoverItem, e);
33182
+ }
33183
+ if (this._tableSeriesNumber.getAttributes().hover) {
33184
+ this._hoverHandler(target, e);
33185
+ }
33186
+ };
33187
+ this._onPointerleave = (e) => {
33188
+ if (this._tableSeriesNumber.interactionState._lastHoverItem) {
33189
+ this._unHoverHandler(this._tableSeriesNumber.interactionState._lastHoverItem, e);
33190
+ this._tableSeriesNumber.interactionState._lastHoverItem = null;
33191
+ }
33192
+ };
33193
+ this._onPointerdown = (e) => {
33194
+ var _a;
33195
+ const target = e.target;
33196
+ if (target.name.startsWith('col')) {
33197
+ const colIndex = Number(target.name.split('-')[1]);
33198
+ const canvasPointXY = target.stage.window.pointTransform(e.canvasX, e.canvasY);
33199
+ const XYtoTarget = { x: 0, y: 0 };
33200
+ target.globalTransMatrix.transformPoint(canvasPointXY, XYtoTarget);
33201
+ if (XYtoTarget.x <= 4 ||
33202
+ (XYtoTarget.x <= target.getAttributes().width && XYtoTarget.x >= target.getAttributes().width - 4)) {
33203
+ let resizeTargetColIndex = colIndex;
33204
+ if (XYtoTarget.x <= 4) {
33205
+ resizeTargetColIndex = colIndex - 1;
33206
+ }
33207
+ this._tableSeriesNumber.dispatchTableSeriesNumberEvent(SeriesNumberEvent.resizeColWidthStart, {
33208
+ colIndex: resizeTargetColIndex,
33209
+ event: e
33210
+ });
33211
+ return;
33212
+ }
33213
+ }
33214
+ else if (target.name.startsWith('row')) {
33215
+ const rowIndex = Number(target.name.split('-')[1]);
33216
+ const canvasPointXY = target.stage.window.pointTransform(e.canvasX, e.canvasY);
33217
+ const XYtoTarget = { x: 0, y: 0 };
33218
+ target.globalTransMatrix.transformPoint(canvasPointXY, XYtoTarget);
33219
+ if (XYtoTarget.y <= 4 ||
33220
+ (XYtoTarget.y <= target.getAttributes().height && XYtoTarget.y >= target.getAttributes().height - 4)) {
33221
+ let resizeTargetRowIndex = rowIndex;
33222
+ if (XYtoTarget.y <= 4) {
33223
+ resizeTargetRowIndex = rowIndex - 1;
33224
+ }
33225
+ this._tableSeriesNumber.dispatchTableSeriesNumberEvent(SeriesNumberEvent.resizeRowHeightStart, {
33226
+ rowIndex: resizeTargetRowIndex,
33227
+ event: e
33228
+ });
33229
+ return;
33230
+ }
33231
+ }
33232
+ this.isPointerDownStartSelect = true;
33233
+ if ((_a = this._tableSeriesNumber.interactionState.selectIndexs) === null || _a === void 0 ? void 0 : _a.size) {
33234
+ if (this._tableSeriesNumber.interactionState.selectIndexs.has(target.name)) {
33235
+ if (e.nativeEvent.ctrlKey || e.nativeEvent.metaKey) {
33236
+ this._tableSeriesNumber.removeOneGroupSelected(target);
33237
+ this._unClickHandler(target.name, e);
33238
+ }
33239
+ else {
33240
+ this._tableSeriesNumber.removeAllSelectedIndexs();
33241
+ for (const name of this._tableSeriesNumber.interactionState.selectIndexs) {
33242
+ this._unClickHandler(name, e);
33243
+ }
33244
+ }
33245
+ }
33246
+ else {
33247
+ if (e.nativeEvent.ctrlKey || e.nativeEvent.metaKey) ;
33248
+ else {
33249
+ this._tableSeriesNumber.removeAllSelectedIndexs();
33250
+ for (const name of this._tableSeriesNumber.interactionState.selectIndexs) {
33251
+ if ((target.name.startsWith('row') && name.startsWith('row')) ||
33252
+ (target.name.startsWith('col') && name.startsWith('col'))) {
33253
+ this._unClickHandler(name, e);
33254
+ }
33255
+ }
33256
+ }
33257
+ }
33258
+ }
33259
+ this._clickHandler(target, e);
33260
+ };
33261
+ this._onPointerup = (e) => {
33262
+ const target = e.target;
33263
+ if (this.isPointerDownStartSelect) {
33264
+ this.isPointerDownStartSelect = false;
33265
+ this._tableSeriesNumber.interactionState._lastClickItem = null;
33266
+ this._tableSeriesNumber.dispatchTableSeriesNumberEvent(SeriesNumberEvent.seriesNumberCellClickUp, {
33267
+ seriesNumberCell: target,
33268
+ event: e
33269
+ });
33270
+ }
33271
+ };
33272
+ this._tableSeriesNumber = tableSeriesNumber;
33273
+ }
33274
+ bindEvents() {
33275
+ const { hover = true, select = true } = this._tableSeriesNumber.attribute;
33276
+ if (hover) {
33277
+ this._tableSeriesNumber._rowSeriesNumberGroup.addEventListener('pointermove', this._onPointermove);
33278
+ this._tableSeriesNumber._rowSeriesNumberGroup.addEventListener('pointerleave', this._onPointerleave);
33279
+ this._tableSeriesNumber._colSeriesNumberGroup.addEventListener('pointermove', this._onPointermove);
33280
+ this._tableSeriesNumber._colSeriesNumberGroup.addEventListener('pointerleave', this._onPointerleave);
33281
+ this._tableSeriesNumber._cornerGroup.addEventListener('pointermove', this._onPointermove);
33282
+ this._tableSeriesNumber._cornerGroup.addEventListener('pointerleave', this._onPointerleave);
33283
+ this._tableSeriesNumber._frozenTopRowSeriesNumberGroup.addEventListener('pointermove', this._onPointermove);
33284
+ this._tableSeriesNumber._frozenTopRowSeriesNumberGroup.addEventListener('pointerleave', this._onPointerleave);
33285
+ this._tableSeriesNumber._frozenLeftColSeriesNumberGroup.addEventListener('pointermove', this._onPointermove);
33286
+ this._tableSeriesNumber._frozenLeftColSeriesNumberGroup.addEventListener('pointerleave', this._onPointerleave);
33287
+ }
33288
+ if (select) {
33289
+ this._tableSeriesNumber._rowSeriesNumberGroup.addEventListener('pointerdown', this._onPointerdown);
33290
+ this._tableSeriesNumber._colSeriesNumberGroup.addEventListener('pointerdown', this._onPointerdown);
33291
+ this._tableSeriesNumber._cornerGroup.addEventListener('pointerdown', this._onPointerdown);
33292
+ this._tableSeriesNumber._frozenTopRowSeriesNumberGroup.addEventListener('pointerdown', this._onPointerdown);
33293
+ this._tableSeriesNumber._frozenLeftColSeriesNumberGroup.addEventListener('pointerdown', this._onPointerdown);
33294
+ vglobal.addEventListener('pointerup', this._onPointerup);
33295
+ }
33296
+ }
33297
+ _hoverHandler(seriesNumberCell, e) {
33298
+ this._tableSeriesNumber.interactionState._lastHoverItem = seriesNumberCell;
33299
+ if (seriesNumberCell.hasState(SeriesNumberCellStateValue.select)) {
33300
+ seriesNumberCell.useStates([SeriesNumberCellStateValue.select, SeriesNumberCellStateValue.hover]);
33301
+ }
33302
+ else {
33303
+ seriesNumberCell.useStates([SeriesNumberCellStateValue.hover]);
33304
+ }
33305
+ this._tableSeriesNumber.dispatchTableSeriesNumberEvent(SeriesNumberEvent.seriesNumberCellHover, {
33306
+ seriesNumberCell,
33307
+ event: e
33308
+ });
33309
+ }
33310
+ _unHoverHandler(seriesNumberCell, e) {
33311
+ seriesNumberCell.removeState(SeriesNumberCellStateValue.hover);
33312
+ this._tableSeriesNumber.dispatchTableSeriesNumberEvent(SeriesNumberEvent.seriesNumberCellUnHover, {
33313
+ seriesNumberCell,
33314
+ event: e
33315
+ });
33316
+ }
33317
+ _clickHandler(seriesNumberCell, e) {
33318
+ this._tableSeriesNumber.addOneGroupSelected(seriesNumberCell);
33319
+ this._tableSeriesNumber.interactionState._lastClickItem = seriesNumberCell;
33320
+ this._tableSeriesNumber.dispatchTableSeriesNumberEvent(SeriesNumberEvent.seriesNumberCellClick, {
33321
+ seriesNumberCell,
33322
+ event: e
33323
+ });
33324
+ }
33325
+ _unClickHandler(seriesNumberIndex, e) {
33326
+ const isRow = seriesNumberIndex.startsWith('row');
33327
+ const seriesNumberCell = isRow
33328
+ ? this._tableSeriesNumber.getRowSeriesNumberCellGroup(Number(seriesNumberIndex.split('-')[1]))
33329
+ : this._tableSeriesNumber.getColSeriesNumberCellGroup(Number(seriesNumberIndex.split('-')[1]));
33330
+ seriesNumberCell === null || seriesNumberCell === void 0 ? void 0 : seriesNumberCell.removeState(SeriesNumberCellStateValue.select);
33331
+ this._tableSeriesNumber.dispatchTableSeriesNumberEvent(SeriesNumberEvent.seriesNumberCellCancelClick, {
33332
+ index: seriesNumberIndex,
33333
+ event: e
33334
+ });
33335
+ }
33336
+ }
33337
+
33338
+ function loadTableSeriesNumberComponent() {
33339
+ registerGroup();
33340
+ registerText();
33341
+ registerImage();
33342
+ }
33343
+
33344
+ loadTableSeriesNumberComponent();
33345
+ class TableSeriesNumber extends AbstractComponent {
33346
+ constructor(attributes, options) {
33347
+ super((options === null || options === void 0 ? void 0 : options.skipDefault) ? attributes : merge({}, TableSeriesNumber.defaultAttributes, attributes));
33348
+ this.name = 'tableSeriesNumber';
33349
+ this._firstRowSeriesNumberIndex = 0;
33350
+ this._firstColSeriesNumberIndex = 0;
33351
+ this._maxTextWidth = 0;
33352
+ this._changeRowSeriesNumberWidthTimer = null;
33353
+ this.interactionState = { selectIndexs: new Set(), _lastHoverItem: null, _lastClickItem: null };
33354
+ this._parsedRowSeriesNumberCellPadding = [0, 0, 0, 0];
33355
+ this._parsedColSeriesNumberCellPadding = [0, 0, 0, 0];
33356
+ this.initRenderAll = false;
33357
+ this.initRenderAll = (options === null || options === void 0 ? void 0 : options.initRenderAll) || false;
33358
+ this._skipRenderAttributes.push('frozenTopRow');
33359
+ this._skipRenderAttributes.push('frozenLeftCol');
33360
+ this._skipRenderAttributes.push('frozenRightCol');
33361
+ this._skipRenderAttributes.push('frozenBottomRow');
33362
+ this._skipRenderAttributes.push('rowCount');
33363
+ this._skipRenderAttributes.push('colCount');
33364
+ this._skipRenderAttributes.push('hover');
33365
+ this._skipRenderAttributes.push('select');
33366
+ if (this.attribute.rowSeriesNumberCellStyle.text.padding) {
33367
+ const padding = parsePadding(this.attribute.rowSeriesNumberCellStyle.text.padding);
33368
+ if (typeof padding === 'number') {
33369
+ this._parsedRowSeriesNumberCellPadding = [padding, padding, padding, padding];
33370
+ }
33371
+ else {
33372
+ this._parsedRowSeriesNumberCellPadding = padding;
33373
+ }
33374
+ }
33375
+ if (this.attribute.colSeriesNumberCellStyle.text.padding) {
33376
+ const padding = parsePadding(this.attribute.colSeriesNumberCellStyle.text.padding);
33377
+ if (typeof padding === 'number') {
33378
+ this._parsedColSeriesNumberCellPadding = [padding, padding, padding, padding];
33379
+ }
33380
+ else {
33381
+ this._parsedColSeriesNumberCellPadding = padding;
33382
+ }
33383
+ }
33384
+ this._eventManager = new TableSeriesNumberEventManager(this);
33385
+ }
33386
+ get rowSeriesNumberWidth() {
33387
+ const { rowSeriesNumberWidth } = this.attribute;
33388
+ if (this._maxTextWidth) {
33389
+ return Math.max(this._maxTextWidth + this._parsedRowSeriesNumberCellPadding[3] + this._parsedRowSeriesNumberCellPadding[1], typeof rowSeriesNumberWidth === 'number' ? rowSeriesNumberWidth : 40);
33390
+ }
33391
+ return typeof rowSeriesNumberWidth === 'number' ? rowSeriesNumberWidth : 40;
33392
+ }
33393
+ get colSeriesNumberHeight() {
33394
+ const { colSeriesNumberHeight } = this.attribute;
33395
+ return typeof colSeriesNumberHeight === 'number' ? colSeriesNumberHeight : 20;
33396
+ }
33397
+ get rowCount() {
33398
+ const { rowCount } = this.attribute;
33399
+ return rowCount;
33400
+ }
33401
+ get colCount() {
33402
+ const { colCount } = this.attribute;
33403
+ return colCount;
33404
+ }
33405
+ bindEvents() {
33406
+ this._eventManager.bindEvents();
33407
+ }
33408
+ dispatchTableSeriesNumberEvent(event, ...args) {
33409
+ this._dispatchEvent(event, ...args);
33410
+ }
33411
+ render() {
33412
+ const { rowCount, colCount, rowSeriesNumberWidth, colSeriesNumberHeight, rowSeriesNumberCellStyle, colSeriesNumberCellStyle, rowHeight, colWidth } = this.attribute;
33413
+ const innerView = this.createOrUpdateChild('tableSeriesNumberContainer', {
33414
+ x: 0,
33415
+ y: 0,
33416
+ fill: 'rgba(1,1,1,0)',
33417
+ width: this.rowSeriesNumberWidth + colCount * (typeof colWidth === 'number' ? colWidth : 20),
33418
+ height: this.colSeriesNumberHeight + rowCount * (typeof rowHeight === 'number' ? rowHeight : 20),
33419
+ pickable: false,
33420
+ childrenPickable: true
33421
+ }, 'group');
33422
+ this._tableSeriesNumberContainer = innerView;
33423
+ this._renderContent();
33424
+ }
33425
+ _renderContent() {
33426
+ this._renderRowSeriesNumber();
33427
+ this._renderColSeriesNumber();
33428
+ this._renderFrozenTopRowSeriesNumber();
33429
+ this._renderFrozenLeftColSeriesNumber();
33430
+ this._renderCorner();
33431
+ if (this.initRenderAll) {
33432
+ this.recreateCellsToRowSeriesNumberGroup(0, this.attribute.rowCount - 1);
33433
+ this.recreateCellsToColSeriesNumberGroup(0, this.attribute.colCount - 1);
33434
+ let y = 0;
33435
+ for (let i = 0; i < this.attribute.rowCount; i++) {
33436
+ this.setRowSeriesNumberCellAttributes(i, {
33437
+ y,
33438
+ height: typeof this.attribute.rowHeight === 'number' ? this.attribute.rowHeight : 20
33439
+ });
33440
+ y += typeof this.attribute.rowHeight === 'number' ? this.attribute.rowHeight : 20;
33441
+ }
33442
+ let x = 0;
33443
+ for (let i = 0; i < this.attribute.colCount; i++) {
33444
+ this.setColSeriesNumberCellAttributes(i, {
33445
+ x,
33446
+ width: typeof this.attribute.colWidth === 'number' ? this.attribute.colWidth : 20
33447
+ });
33448
+ x += typeof this.attribute.colWidth === 'number' ? this.attribute.colWidth : 20;
33449
+ }
33450
+ }
33451
+ }
33452
+ _renderCorner() {
33453
+ const { rowCount, colCount, cornerCellStyle: cornerSeriesNumberCellStyle, rowSeriesNumberWidth, colSeriesNumberHeight, rowSeriesNumberCellStyle, colSeriesNumberCellStyle, rowHeight, colWidth } = this.attribute;
33454
+ const cornerGroup = this._tableSeriesNumberContainer.createOrUpdateChild('cornerSeriesNumberCell', {
33455
+ x: 0,
33456
+ y: 0,
33457
+ fill: cornerSeriesNumberCellStyle.bgColor,
33458
+ stroke: cornerSeriesNumberCellStyle.borderLine.stroke,
33459
+ lineWidth: cornerSeriesNumberCellStyle.borderLine.lineWidth,
33460
+ pickable: true,
33461
+ width: this.rowSeriesNumberWidth,
33462
+ height: this.colSeriesNumberHeight
33463
+ }, 'group');
33464
+ cornerGroup.id = '0,0';
33465
+ cornerGroup.states = cornerSeriesNumberCellStyle.states;
33466
+ this._cornerGroup = cornerGroup;
33467
+ }
33468
+ _renderRowSeriesNumber() {
33469
+ const { frozenRowCount, rowCount, colCount, rowSeriesNumberWidth, colSeriesNumberHeight, rowSeriesNumberCellStyle, colSeriesNumberCellStyle, rowHeight, colWidth } = this.attribute;
33470
+ const rowSeriesNumberGroup = this._tableSeriesNumberContainer.createOrUpdateChild('rowSeriesNumberCellGroup', {
33471
+ x: 0,
33472
+ y: this.colSeriesNumberHeight,
33473
+ pickable: true,
33474
+ fill: rowSeriesNumberCellStyle.bgColor,
33475
+ width: this.rowSeriesNumberWidth,
33476
+ height: rowCount * (typeof rowHeight === 'number' ? rowHeight : 20)
33477
+ }, 'group');
33478
+ this._rowSeriesNumberGroup = rowSeriesNumberGroup;
33479
+ }
33480
+ _renderColSeriesNumber() {
33481
+ const { frozenColCount, rowCount, colCount, rowSeriesNumberWidth, colSeriesNumberHeight, rowSeriesNumberCellStyle, colSeriesNumberCellStyle, rowHeight, colWidth } = this.attribute;
33482
+ const colSeriesNumberGroup = this._tableSeriesNumberContainer.createOrUpdateChild('colSeriesNumberCellGroup', {
33483
+ x: this.rowSeriesNumberWidth + frozenColCount * (typeof colWidth === 'number' ? colWidth : 20),
33484
+ y: 0,
33485
+ pickable: true,
33486
+ fill: colSeriesNumberCellStyle.bgColor,
33487
+ width: colCount * (typeof colWidth === 'number' ? colWidth : 20),
33488
+ height: this.colSeriesNumberHeight
33489
+ }, 'group');
33490
+ this._colSeriesNumberGroup = colSeriesNumberGroup;
33491
+ }
33492
+ _renderFrozenTopRowSeriesNumber() {
33493
+ const { frozenRowCount, colCount, rowSeriesNumberWidth, colSeriesNumberHeight, rowSeriesNumberCellStyle, colSeriesNumberCellStyle, rowHeight, colWidth } = this.attribute;
33494
+ const frozenTopSeriesNumberGroup = this._tableSeriesNumberContainer.createOrUpdateChild('frozenTopSeriesNumberGroup', {
33495
+ x: 0,
33496
+ y: this.colSeriesNumberHeight,
33497
+ width: this.rowSeriesNumberWidth,
33498
+ height: frozenRowCount * (typeof rowHeight === 'number' ? rowHeight : 20)
33499
+ }, 'group');
33500
+ this._frozenTopRowSeriesNumberGroup = frozenTopSeriesNumberGroup;
33501
+ }
33502
+ _renderFrozenLeftColSeriesNumber() {
33503
+ const { frozenColCount, rowCount, rowSeriesNumberWidth, colSeriesNumberHeight, rowSeriesNumberCellStyle, colSeriesNumberCellStyle, rowHeight, colWidth } = this.attribute;
33504
+ const frozenLeftSeriesNumberGroup = this._tableSeriesNumberContainer.createOrUpdateChild('frozenLeftSeriesNumberGroup', {
33505
+ x: this.rowSeriesNumberWidth,
33506
+ y: 0,
33507
+ height: this.colSeriesNumberHeight,
33508
+ width: frozenColCount * (typeof colWidth === 'number' ? colWidth : 20)
33509
+ }, 'group');
33510
+ this._frozenLeftColSeriesNumberGroup = frozenLeftSeriesNumberGroup;
33511
+ }
33512
+ recreateCellsToRowSeriesNumberGroup(startIndex, endIndex) {
33513
+ var _a, _b;
33514
+ const { frozenRowCount, rowCount, colCount, rowSeriesNumberWidth, colSeriesNumberHeight, rowSeriesNumberCellStyle, colSeriesNumberCellStyle, rowHeight, colWidth } = this.attribute;
33515
+ this._frozenTopRowSeriesNumberGroup.removeAllChild();
33516
+ this._rowSeriesNumberGroup.removeAllChild();
33517
+ let y = 0;
33518
+ const height = (typeof rowHeight === 'number' ? rowHeight : 20) -
33519
+ this._parsedRowSeriesNumberCellPadding[0] -
33520
+ this._parsedRowSeriesNumberCellPadding[2];
33521
+ if (rowSeriesNumberCellStyle.text.textBaseline === 'middle') {
33522
+ y = this._parsedRowSeriesNumberCellPadding[0] + (height - rowSeriesNumberCellStyle.text.fontSize) / 2;
33523
+ }
33524
+ else if (rowSeriesNumberCellStyle.text.textBaseline === 'bottom') {
33525
+ y = this._parsedRowSeriesNumberCellPadding[0] + height - rowSeriesNumberCellStyle.text.fontSize;
33526
+ }
33527
+ else {
33528
+ y = this._parsedRowSeriesNumberCellPadding[0];
33529
+ }
33530
+ let x;
33531
+ const width = this.rowSeriesNumberWidth - this._parsedRowSeriesNumberCellPadding[3] - this._parsedRowSeriesNumberCellPadding[1];
33532
+ const textAlign = this.attribute.rowSeriesNumberCellStyle.text.textAlign;
33533
+ const padding = this._parsedRowSeriesNumberCellPadding;
33534
+ if (textAlign === 'center') {
33535
+ x = padding[3] + +width / 2;
33536
+ }
33537
+ else if (textAlign === 'right') {
33538
+ x = padding[3] + width;
33539
+ }
33540
+ else {
33541
+ x = padding[3];
33542
+ }
33543
+ for (let i = 0; i < frozenRowCount; i++) {
33544
+ const cellGroup = this._frozenTopRowSeriesNumberGroup.createOrUpdateChild(`rowSeriesNumberCell-${i}`, {
33545
+ x: 0,
33546
+ y: 0,
33547
+ pickable: true,
33548
+ fill: rowSeriesNumberCellStyle.bgColor,
33549
+ stroke: rowSeriesNumberCellStyle.borderLine.stroke,
33550
+ lineWidth: rowSeriesNumberCellStyle.borderLine.lineWidth,
33551
+ width: this.rowSeriesNumberWidth,
33552
+ height: typeof rowHeight === 'number' ? rowHeight : 20
33553
+ }, 'group');
33554
+ cellGroup.id = i;
33555
+ cellGroup.states = rowSeriesNumberCellStyle.states;
33556
+ if ((_a = this.interactionState.selectIndexs) === null || _a === void 0 ? void 0 : _a.has(cellGroup.name)) {
33557
+ cellGroup.useStates([SeriesNumberCellStateValue.select]);
33558
+ }
33559
+ cellGroup.createOrUpdateChild(`rowSeriesNumberCellText-${i}`, Object.assign(Object.assign({ x,
33560
+ y, text: `${i + 1}`, pickable: false, dx: 0 }, rowSeriesNumberCellStyle.text), { textBaseline: 'top' }), 'text');
33561
+ }
33562
+ this._firstRowSeriesNumberIndex = Math.max(startIndex, frozenRowCount) - frozenRowCount;
33563
+ let thisTextMaxWidth = 0;
33564
+ for (let i = this._firstRowSeriesNumberIndex; i <= endIndex - frozenRowCount; i++) {
33565
+ const cellGroup = this._rowSeriesNumberGroup.createOrUpdateChild(`rowSeriesNumberCell-${i + frozenRowCount}`, {
33566
+ x: 0,
33567
+ y: 0,
33568
+ pickable: true,
33569
+ fill: rowSeriesNumberCellStyle.bgColor,
33570
+ stroke: rowSeriesNumberCellStyle.borderLine.stroke,
33571
+ lineWidth: rowSeriesNumberCellStyle.borderLine.lineWidth,
33572
+ width: this.rowSeriesNumberWidth,
33573
+ height: typeof rowHeight === 'number' ? rowHeight : 20
33574
+ }, 'group');
33575
+ cellGroup.id = i + frozenRowCount;
33576
+ cellGroup.states = rowSeriesNumberCellStyle.states;
33577
+ if ((_b = this.interactionState.selectIndexs) === null || _b === void 0 ? void 0 : _b.has(cellGroup.name)) {
33578
+ cellGroup.useStates([SeriesNumberCellStateValue.select]);
33579
+ }
33580
+ const text = cellGroup.createOrUpdateChild(`rowSeriesNumberCellText-${i + frozenRowCount}`, Object.assign(Object.assign({ x,
33581
+ y, text: `${i + 1 + frozenRowCount}`, pickable: false, dx: 0 }, rowSeriesNumberCellStyle.text), { textBaseline: 'top' }), 'text');
33582
+ if (i === endIndex - frozenRowCount) {
33583
+ thisTextMaxWidth = text.clipedWidth;
33584
+ }
33585
+ }
33586
+ clearTimeout(this._changeRowSeriesNumberWidthTimer);
33587
+ this._changeRowSeriesNumberWidthTimer = setTimeout(() => {
33588
+ if (Math.abs(thisTextMaxWidth - this._maxTextWidth) >= 6) {
33589
+ const oldWidth = this._maxTextWidth;
33590
+ this._maxTextWidth = thisTextMaxWidth;
33591
+ this.changeRowSeriesNumberWidth(Math.max(this.rowSeriesNumberWidth, 20));
33592
+ this._dispatchEvent(SeriesNumberEvent.rowSeriesNumberWidthChange, {
33593
+ newWidth: this.rowSeriesNumberWidth,
33594
+ oldWidth
33595
+ });
33596
+ }
33597
+ }, 100);
33598
+ }
33599
+ recreateCellsToColSeriesNumberGroup(startIndex, endIndex) {
33600
+ var _a, _b;
33601
+ const { colCount, colSeriesNumberCellStyle, frozenColCount, colWidth } = this
33602
+ .attribute;
33603
+ this._frozenLeftColSeriesNumberGroup.removeAllChild();
33604
+ this._colSeriesNumberGroup.removeAllChild();
33605
+ let y = 0;
33606
+ const height = this.colSeriesNumberHeight -
33607
+ this._parsedColSeriesNumberCellPadding[0] -
33608
+ this._parsedColSeriesNumberCellPadding[2];
33609
+ if (colSeriesNumberCellStyle.text.textBaseline === 'middle') {
33610
+ y = this._parsedColSeriesNumberCellPadding[0] + (height - colSeriesNumberCellStyle.text.fontSize) / 2;
33611
+ }
33612
+ else if (colSeriesNumberCellStyle.text.textBaseline === 'bottom') {
33613
+ y = this._parsedColSeriesNumberCellPadding[0] + height - colSeriesNumberCellStyle.text.fontSize;
33614
+ }
33615
+ else {
33616
+ y = this._parsedColSeriesNumberCellPadding[0];
33617
+ }
33618
+ let x;
33619
+ const width = (typeof colWidth === 'number' ? colWidth : 20) -
33620
+ this._parsedColSeriesNumberCellPadding[3] -
33621
+ this._parsedColSeriesNumberCellPadding[1];
33622
+ const textAlign = this.attribute.colSeriesNumberCellStyle.text.textAlign;
33623
+ const padding = this._parsedColSeriesNumberCellPadding;
33624
+ if (textAlign === 'center') {
33625
+ x = padding[3] + +width / 2;
33626
+ }
33627
+ else if (textAlign === 'right') {
33628
+ x = padding[3] + width;
33629
+ }
33630
+ else {
33631
+ x = padding[3];
33632
+ }
33633
+ for (let i = 0; i < frozenColCount; i++) {
33634
+ const cellGroup = this._frozenLeftColSeriesNumberGroup.createOrUpdateChild(`colSeriesNumberCell-${i}`, {
33635
+ x: 0,
33636
+ y: 0,
33637
+ pickable: true,
33638
+ fill: colSeriesNumberCellStyle.bgColor,
33639
+ stroke: colSeriesNumberCellStyle.borderLine.stroke,
33640
+ lineWidth: colSeriesNumberCellStyle.borderLine.lineWidth,
33641
+ width: typeof colWidth === 'number' ? colWidth : 20,
33642
+ height: this.colSeriesNumberHeight
33643
+ }, 'group');
33644
+ cellGroup.id = i;
33645
+ cellGroup.states = colSeriesNumberCellStyle.states;
33646
+ if ((_a = this.interactionState.selectIndexs) === null || _a === void 0 ? void 0 : _a.has(cellGroup.name)) {
33647
+ cellGroup.useStates([SeriesNumberCellStateValue.select]);
33648
+ }
33649
+ cellGroup.createOrUpdateChild(`colSeriesNumberCellText-${i}`, Object.assign(Object.assign({ x,
33650
+ y, dx: 0, text: generateColField(i), pickable: false }, colSeriesNumberCellStyle.text), { textBaseline: 'top' }), 'text');
33651
+ }
33652
+ this._firstColSeriesNumberIndex = Math.max(startIndex, frozenColCount) - frozenColCount;
33653
+ for (let i = this._firstColSeriesNumberIndex; i <= endIndex - frozenColCount; i++) {
33654
+ const cellGroup = this._colSeriesNumberGroup.createOrUpdateChild(`colSeriesNumberCell-${i + frozenColCount}`, {
33655
+ x: 0,
33656
+ y: 0,
33657
+ pickable: true,
33658
+ fill: colSeriesNumberCellStyle.bgColor,
33659
+ stroke: colSeriesNumberCellStyle.borderLine.stroke,
33660
+ lineWidth: colSeriesNumberCellStyle.borderLine.lineWidth,
33661
+ width: typeof colWidth === 'number' ? colWidth : 20,
33662
+ height: this.colSeriesNumberHeight
33663
+ }, 'group');
33664
+ cellGroup.id = i + frozenColCount;
33665
+ cellGroup.states = colSeriesNumberCellStyle.states;
33666
+ if ((_b = this.interactionState.selectIndexs) === null || _b === void 0 ? void 0 : _b.has(cellGroup.name)) {
33667
+ cellGroup.useStates([SeriesNumberCellStateValue.select]);
33668
+ }
33669
+ cellGroup.createOrUpdateChild(`colSeriesNumberCellText-${i + frozenColCount}`, Object.assign(Object.assign({ x,
33670
+ y, dx: 0, text: generateColField(i + frozenColCount), pickable: false }, colSeriesNumberCellStyle.text), { textBaseline: 'top' }), 'text');
33671
+ }
33672
+ }
33673
+ changeRowSeriesNumberWidth(newWidth) {
33674
+ const { rowHeight, rowCount: oldRowCount, frozenRowCount, frozenColCount: frozenLeftCol, rowSeriesNumberCellStyle } = this.attribute;
33675
+ this._cornerGroup.setAttributes({
33676
+ width: newWidth
33677
+ });
33678
+ this._frozenTopRowSeriesNumberGroup.setAttributes({
33679
+ width: newWidth
33680
+ });
33681
+ for (let i = 0; i < this._frozenTopRowSeriesNumberGroup.children.length; i++) {
33682
+ this.setRowSeriesNumberCellAttributes(i, {
33683
+ width: newWidth
33684
+ });
33685
+ }
33686
+ this._rowSeriesNumberGroup.setAttributes({
33687
+ width: newWidth
33688
+ });
33689
+ for (let i = 0; i < this._rowSeriesNumberGroup.children.length; i++) {
33690
+ this.setRowSeriesNumberCellAttributes(i + this._firstRowSeriesNumberIndex + frozenRowCount, {
33691
+ width: newWidth
33692
+ });
33693
+ }
33694
+ this._frozenLeftColSeriesNumberGroup.setAttributes({
33695
+ x: newWidth
33696
+ });
33697
+ this._colSeriesNumberGroup.setAttributes({
33698
+ x: newWidth + this._frozenLeftColSeriesNumberGroup.getAttributes().width
33699
+ });
33700
+ }
33701
+ getRowSeriesNumberCellGroup(index) {
33702
+ const { frozenRowCount } = this.getAttributes();
33703
+ if (index >= 0 && index < frozenRowCount) {
33704
+ return this._frozenTopRowSeriesNumberGroup.children[index];
33705
+ }
33706
+ const rowSeriesNumberGroup = this._rowSeriesNumberGroup;
33707
+ const rowSeriesNumberCell = rowSeriesNumberGroup.children[index - frozenRowCount - this._firstRowSeriesNumberIndex];
33708
+ return rowSeriesNumberCell;
33709
+ }
33710
+ getColSeriesNumberCellGroup(index) {
33711
+ const { frozenColCount } = this.getAttributes();
33712
+ if (index >= 0 && index < frozenColCount) {
33713
+ return this._frozenLeftColSeriesNumberGroup.children[index];
33714
+ }
33715
+ const colSeriesNumberGroup = this._colSeriesNumberGroup;
33716
+ const colSeriesNumberCell = colSeriesNumberGroup.children[index - frozenColCount - this._firstColSeriesNumberIndex];
33717
+ return colSeriesNumberCell;
33718
+ }
33719
+ getRowSeriesNumberCellAttributes(index) {
33720
+ const { frozenRowCount } = this.getAttributes();
33721
+ if (index >= 0 && index < frozenRowCount) {
33722
+ return this._frozenTopRowSeriesNumberGroup.children[index].attribute;
33723
+ }
33724
+ const rowSeriesNumberGroup = this._rowSeriesNumberGroup;
33725
+ const rowSeriesNumberCell = rowSeriesNumberGroup.children[index - frozenRowCount - this._firstRowSeriesNumberIndex];
33726
+ return rowSeriesNumberCell.attribute;
33727
+ }
33728
+ getColSeriesNumberCellAttributes(index) {
33729
+ const { frozenColCount } = this.getAttributes();
33730
+ if (index >= 0 && index < frozenColCount) {
33731
+ return this._frozenLeftColSeriesNumberGroup.children[index].attribute;
33732
+ }
33733
+ const colSeriesNumberGroup = this._colSeriesNumberGroup;
33734
+ const colSeriesNumberCell = colSeriesNumberGroup.children[index - frozenColCount - this._firstColSeriesNumberIndex];
33735
+ return colSeriesNumberCell.attribute;
33736
+ }
33737
+ setRowSeriesNumberCellAttributes(index, attributes) {
33738
+ const { frozenRowCount } = this.getAttributes();
33739
+ let targetCellGroup;
33740
+ if (index >= 0 && index < frozenRowCount) {
33741
+ const { height: oldHeight, width: oldWidth, y } = this._frozenTopRowSeriesNumberGroup.getAttributes();
33742
+ targetCellGroup = this._frozenTopRowSeriesNumberGroup.children[index];
33743
+ targetCellGroup.setAttributes(attributes);
33744
+ if (attributes.height) {
33745
+ this._frozenTopRowSeriesNumberGroup.setAttributes({
33746
+ height: this._frozenTopRowSeriesNumberGroup.getAttributes().height + (attributes.height - oldHeight)
33747
+ });
33748
+ }
33749
+ if (attributes.width) {
33750
+ this._frozenTopRowSeriesNumberGroup.setAttributes({
33751
+ width: this._frozenTopRowSeriesNumberGroup.getAttributes().width + (attributes.width - oldWidth)
33752
+ });
33753
+ }
33754
+ if (attributes.height) {
33755
+ this._rowSeriesNumberGroup.setAttributes({
33756
+ y: this._frozenTopRowSeriesNumberGroup.getAttributes().height +
33757
+ this._frozenTopRowSeriesNumberGroup.getAttributes().y
33758
+ });
33759
+ }
33760
+ }
33761
+ else {
33762
+ const rowSeriesNumberGroup = this._rowSeriesNumberGroup;
33763
+ targetCellGroup = rowSeriesNumberGroup.children[index - frozenRowCount - this._firstRowSeriesNumberIndex];
33764
+ targetCellGroup.setAttributes(attributes);
33765
+ }
33766
+ if (attributes.width) {
33767
+ let x;
33768
+ const width = attributes.width - this._parsedRowSeriesNumberCellPadding[3] - this._parsedRowSeriesNumberCellPadding[1];
33769
+ const textAlign = this.attribute.rowSeriesNumberCellStyle.text.textAlign;
33770
+ const padding = this._parsedRowSeriesNumberCellPadding;
33771
+ if (textAlign === 'center') {
33772
+ x = padding[3] + +width / 2;
33773
+ }
33774
+ else if (textAlign === 'right') {
33775
+ x = padding[3] + width;
33776
+ }
33777
+ else {
33778
+ x = padding[3];
33779
+ }
33780
+ targetCellGroup.children[0].setAttributes({
33781
+ x
33782
+ });
33783
+ }
33784
+ if (attributes.height) {
33785
+ const height = attributes.height - this._parsedRowSeriesNumberCellPadding[0] - this._parsedRowSeriesNumberCellPadding[2];
33786
+ const textBaseline = this.attribute.rowSeriesNumberCellStyle.text.textBaseline;
33787
+ const padding = this._parsedRowSeriesNumberCellPadding;
33788
+ let y;
33789
+ if (textBaseline === 'middle') {
33790
+ y = padding[0] + (height - this.attribute.rowSeriesNumberCellStyle.text.fontSize) / 2;
33791
+ }
33792
+ else if (textBaseline === 'bottom') {
33793
+ y = padding[0] + height - this.attribute.rowSeriesNumberCellStyle.text.fontSize;
33794
+ }
33795
+ else {
33796
+ y = padding[0];
33797
+ }
33798
+ targetCellGroup.children[0].setAttributes({
33799
+ y
33800
+ });
33801
+ }
33802
+ }
33803
+ setColSeriesNumberCellAttributes(index, attributes) {
33804
+ const { frozenColCount: frozenColCount } = this.getAttributes();
33805
+ let targetCellGroup;
33806
+ if (index >= 0 && index < frozenColCount) {
33807
+ targetCellGroup = this._frozenLeftColSeriesNumberGroup.children[index];
33808
+ const { height: oldHeight, width: oldWidth } = targetCellGroup.getAttributes();
33809
+ targetCellGroup.setAttributes(attributes);
33810
+ if (attributes.height) {
33811
+ this._frozenLeftColSeriesNumberGroup.setAttributes({
33812
+ height: this._frozenLeftColSeriesNumberGroup.getAttributes().height + (attributes.height - oldHeight)
33813
+ });
33814
+ }
33815
+ if (attributes.width) {
33816
+ this._frozenLeftColSeriesNumberGroup.setAttributes({
33817
+ width: this._frozenLeftColSeriesNumberGroup.getAttributes().width + (attributes.width - oldWidth)
33818
+ });
33819
+ }
33820
+ if (attributes.width) {
33821
+ this._colSeriesNumberGroup.setAttributes({
33822
+ x: this._frozenLeftColSeriesNumberGroup.getAttributes().width +
33823
+ this._frozenLeftColSeriesNumberGroup.getAttributes().x
33824
+ });
33825
+ }
33826
+ }
33827
+ else {
33828
+ const colSeriesNumberGroup = this._colSeriesNumberGroup;
33829
+ targetCellGroup = colSeriesNumberGroup.children[index - frozenColCount - this._firstColSeriesNumberIndex];
33830
+ targetCellGroup.setAttributes(attributes);
33831
+ }
33832
+ if (attributes.width) {
33833
+ let x;
33834
+ const width = attributes.width - this._parsedColSeriesNumberCellPadding[3] - this._parsedColSeriesNumberCellPadding[1];
33835
+ const textAlign = this.attribute.colSeriesNumberCellStyle.text.textAlign;
33836
+ const padding = this._parsedColSeriesNumberCellPadding;
33837
+ if (textAlign === 'center') {
33838
+ x = padding[3] + +width / 2;
33839
+ }
33840
+ else if (textAlign === 'right') {
33841
+ x = padding[3] + width;
33842
+ }
33843
+ else {
33844
+ x = padding[3];
33845
+ }
33846
+ targetCellGroup.children[0].setAttributes({
33847
+ x
33848
+ });
33849
+ }
33850
+ if (attributes.height) {
33851
+ const height = attributes.height - this._parsedColSeriesNumberCellPadding[0] - this._parsedColSeriesNumberCellPadding[2];
33852
+ const textBaseline = this.attribute.colSeriesNumberCellStyle.text.textBaseline;
33853
+ const padding = this._parsedColSeriesNumberCellPadding;
33854
+ let y;
33855
+ if (textBaseline === 'middle') {
33856
+ y = padding[0] + (height - this.attribute.colSeriesNumberCellStyle.text.fontSize) / 2;
33857
+ }
33858
+ else if (textBaseline === 'bottom') {
33859
+ y = padding[0] + height - this.attribute.colSeriesNumberCellStyle.text.fontSize;
33860
+ }
33861
+ else {
33862
+ y = padding[0];
33863
+ }
33864
+ targetCellGroup.children[0].setAttributes({
33865
+ y
33866
+ });
33867
+ }
33868
+ }
33869
+ setRowSeriesNumberGroupAttributes(attributes) {
33870
+ this._rowSeriesNumberGroup.setAttributes(attributes);
33871
+ }
33872
+ setColSeriesNumberGroupAttributes(attributes) {
33873
+ this._colSeriesNumberGroup.setAttributes(attributes);
33874
+ }
33875
+ addSelectedIndex(isRow, index) {
33876
+ let name;
33877
+ if (isRow) {
33878
+ name = `rowSeriesNumberCell-${index}`;
33879
+ }
33880
+ else {
33881
+ name = `colSeriesNumberCell-${index}`;
33882
+ }
33883
+ this.interactionState.selectIndexs.add(name);
33884
+ }
33885
+ addRowSelectedRanges(ranges) {
33886
+ performance.now();
33887
+ for (let i = 0; i < ranges.length; i++) {
33888
+ const { startIndex, endIndex } = ranges[i];
33889
+ for (let j = startIndex; j <= endIndex; j++) {
33890
+ const name = `rowSeriesNumberCell-${j}`;
33891
+ this.interactionState.selectIndexs.add(name);
33892
+ }
33893
+ }
33894
+ performance.now();
33895
+ }
33896
+ addColSelectedRanges(ranges) {
33897
+ for (let i = 0; i < ranges.length; i++) {
33898
+ const { startIndex, endIndex } = ranges[i];
33899
+ for (let j = startIndex; j <= endIndex; j++) {
33900
+ const name = `colSeriesNumberCell-${j}`;
33901
+ this.interactionState.selectIndexs.add(name);
33902
+ }
33903
+ }
33904
+ }
33905
+ addCornderSelected() {
33906
+ this.interactionState.selectIndexs.add(this._cornerGroup.name);
33907
+ }
33908
+ resetAllSelectedIndexs({ rowIndexs, colIndexs }) {
33909
+ this.interactionState.selectIndexs = new Set();
33910
+ if (rowIndexs) {
33911
+ for (let i = 0; i < rowIndexs.length; i++) {
33912
+ const name = `rowSeriesNumberCell-${rowIndexs[i]}`;
33913
+ this.interactionState.selectIndexs.add(name);
33914
+ }
33915
+ }
33916
+ if (colIndexs) {
33917
+ for (let i = 0; i < colIndexs.length; i++) {
33918
+ const name = `colSeriesNumberCell-${colIndexs[i]}`;
33919
+ this.interactionState.selectIndexs.add(name);
33920
+ }
33921
+ }
33922
+ }
33923
+ removeSelectedIndex(isRow, index) {
33924
+ let name;
33925
+ if (isRow) {
33926
+ name = `rowSeriesNumberLeftCell-${index}`;
33927
+ }
33928
+ else {
33929
+ name = `colSeriesNumberCell-${index}`;
33930
+ }
33931
+ this.interactionState.selectIndexs.delete(name);
33932
+ }
33933
+ removeAllSelectedIndexs() {
33934
+ var _a, _b;
33935
+ for (const name of this.interactionState.selectIndexs) {
33936
+ const isRow = name.startsWith('row');
33937
+ const isCol = name.startsWith('col');
33938
+ const index = Number(name.split('-')[1]);
33939
+ if (isRow) {
33940
+ (_a = this.getRowSeriesNumberCellGroup(index)) === null || _a === void 0 ? void 0 : _a.removeState(SeriesNumberCellStateValue.select);
33941
+ }
33942
+ else if (isCol) {
33943
+ (_b = this.getColSeriesNumberCellGroup(index)) === null || _b === void 0 ? void 0 : _b.removeState(SeriesNumberCellStateValue.select);
33944
+ }
33945
+ else {
33946
+ this._cornerGroup.removeState(SeriesNumberCellStateValue.select);
33947
+ }
33948
+ }
33949
+ this.interactionState.selectIndexs.clear();
33950
+ }
33951
+ removeOneGroupSelected(group) {
33952
+ this.interactionState.selectIndexs.delete(group.name);
33953
+ group.removeState(SeriesNumberCellStateValue.select);
33954
+ }
33955
+ addOneGroupSelected(group) {
33956
+ this.interactionState.selectIndexs.add(group.name);
33957
+ group.useStates([SeriesNumberCellStateValue.select]);
33958
+ }
33959
+ renderSelectedIndexsState() {
33960
+ var _a, _b;
33961
+ this.attribute;
33962
+ for (const name of this.interactionState.selectIndexs) {
33963
+ const isRow = name.startsWith('row');
33964
+ const isCol = name.startsWith('col');
33965
+ const index = Number(name.split('-')[1]);
33966
+ if (isRow) {
33967
+ (_a = this.getRowSeriesNumberCellGroup(index)) === null || _a === void 0 ? void 0 : _a.useStates([SeriesNumberCellStateValue.select]);
33968
+ }
33969
+ else if (isCol) {
33970
+ (_b = this.getColSeriesNumberCellGroup(index)) === null || _b === void 0 ? void 0 : _b.useStates([SeriesNumberCellStateValue.select]);
33971
+ }
33972
+ else {
33973
+ this._cornerGroup.useStates([SeriesNumberCellStateValue.select]);
33974
+ }
33975
+ }
33976
+ this.stage.render();
33977
+ }
33978
+ }
33979
+ TableSeriesNumber.defaultAttributes = {
33980
+ frozenRowCount: 0,
33981
+ frozenColCount: 0,
33982
+ rightFrozenColCount: 0,
33983
+ bottomFrozenRowCount: 0,
33984
+ pickable: false,
33985
+ rowCount: 100,
33986
+ colCount: 100,
33987
+ rowHeight: 20,
33988
+ colWidth: 50,
33989
+ rowSeriesNumberWidth: 30,
33990
+ colSeriesNumberHeight: 30,
33991
+ rowSeriesNumberCellStyle: {
33992
+ text: {
33993
+ fontSize: 14,
33994
+ fill: '#7A7A7A',
33995
+ pickable: false,
33996
+ textAlign: 'left',
33997
+ textBaseline: 'middle',
33998
+ padding: [2, 4, 2, 4]
33999
+ },
34000
+ borderLine: {
34001
+ stroke: '#D9D9D9',
34002
+ lineWidth: 1,
34003
+ pickable: false
34004
+ },
34005
+ bgColor: '#F9F9F9',
34006
+ states: {
34007
+ hover: {
34008
+ fill: '#98C8A5',
34009
+ opacity: 0.7
34010
+ },
34011
+ select: {
34012
+ fill: 'yellow',
34013
+ opacity: 0.7
34014
+ }
34015
+ }
34016
+ },
34017
+ colSeriesNumberCellStyle: {
34018
+ text: {
34019
+ fontSize: 14,
34020
+ fill: '#7A7A7A',
34021
+ pickable: false,
34022
+ textAlign: 'left',
34023
+ textBaseline: 'middle',
34024
+ padding: [2, 4, 2, 4]
34025
+ },
34026
+ borderLine: {
34027
+ stroke: '#D9D9D9',
34028
+ lineWidth: 1,
34029
+ pickable: false
34030
+ },
34031
+ bgColor: '#F9F9F9',
34032
+ states: {
34033
+ hover: {
34034
+ fill: '#98C8A5',
34035
+ opacity: 0.7
34036
+ },
34037
+ select: {
34038
+ fill: 'orange',
34039
+ opacity: 0.7
34040
+ }
34041
+ }
34042
+ },
34043
+ cornerCellStyle: {
34044
+ borderLine: {
34045
+ stroke: '#D9D9D9',
34046
+ lineWidth: 1,
34047
+ pickable: false
34048
+ },
34049
+ bgColor: '#F9F9F9',
34050
+ states: {
34051
+ hover: {
34052
+ fill: '#98C8A5',
34053
+ opacity: 0.7
34054
+ },
34055
+ select: {
34056
+ fill: '#98C8A5',
34057
+ opacity: 0.7
34058
+ }
34059
+ }
34060
+ },
34061
+ hover: true,
34062
+ select: true
34063
+ };
34064
+
34065
+ const version = "1.0.8-alpha.2";
33131
34066
 
33132
- export { AXIS_ELEMENT_NAME, AbstractComponent, ArcInfo, ArcLabel, ArcSegment, AxisStateValue, BasePlayer, Brush, CheckBox, CircleAxis, CircleAxisGrid, CircleCrosshair, ColorContinuousLegend, ContinuousPlayer, DEFAULT_ITEM_SPACE_COL, DEFAULT_ITEM_SPACE_ROW, DEFAULT_LABEL_SPACE, DEFAULT_PAGER_SPACE, DEFAULT_SHAPE_SIZE, DEFAULT_SHAPE_SPACE, DEFAULT_STATES$1 as DEFAULT_STATES, DEFAULT_TITLE_SPACE, DEFAULT_VALUE_SPACE, DataLabel, DataZoom, DataZoomActiveTag, DirectionEnum, DiscreteLegend, DiscretePlayer, EmptyTip, GroupTransition, IMarkAreaLabelPosition, IMarkCommonArcLabelPosition, IMarkLineLabelPosition, IMarkPointItemPosition, IOperateType, Indicator, LEGEND_ELEMENT_NAME, LabelBase, LegendEvent, LegendStateValue, LineAxis, LineAxisGrid, LineCrosshair, LineLabel, LinkPath, MarkArcArea, MarkArcLine, MarkArea, MarkLine, MarkPoint, Pager, PlayerEventEnum, PolygonCrosshair, PolygonSectorCrosshair, PopTip, Radio, RectCrosshair, RectLabel, SLIDER_ELEMENT_NAME, ScrollBar, SectorCrosshair, Segment, SizeContinuousLegend, Slider, StoryLabelItem, Switch, SymbolLabel, Tag, Timeline, Title, Tooltip, TopZIndex, VTag, WeatherBox, alignTextInLine, angle, angleLabelOrientAttribute, angleTo, cartesianTicks, clampRadian, computeOffsetForlimit, continuousTicks, contrastAccessibilityChecker, convertDomainToTickData, createTextGraphicByType, deltaXYToAngle, fuzzyEqualNumber, getAxisBreakSymbolAttrs, getCircleLabelPosition, getCirclePoints, getCircleVerticalVector, getElMap, getHorizontalPath, getMarksByName, getNoneGroupMarksByName, getPolarAngleLabelPosition, getPolygonPath, getSizeHandlerPath, getTextAlignAttrOfVerticalDir, getTextType, getVerticalCoord, getVerticalPath, hasOverlap, htmlAttributeTransform, initTextMeasure, isInRange, isPostiveXAxis, isRichText, isVisible, labelSmartInvert, length, limitShapeInBounds, linearDiscreteTicks, loadPoptip, loadScrollbar, measureTextSize, normalize, polarAngleAxisDiscreteTicks, polarTicks, reactAttributeTransform, registerArcDataLabel, registerLineDataLabel, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, registerRectDataLabel, registerSymbolDataLabel, removeRepeatPoint, richTextAttributeTransform, scale, scrollbarModule, setPoptipTheme, smartInvertStrategy, tan2AngleToAngle, textIntersect, ticks, traverseGroup, version };
34067
+ export { AXIS_ELEMENT_NAME, AbstractComponent, ArcInfo, ArcLabel, ArcSegment, AxisStateValue, BasePlayer, Brush, CheckBox, CircleAxis, CircleAxisGrid, CircleCrosshair, ColorContinuousLegend, ContinuousPlayer, DEFAULT_ITEM_SPACE_COL, DEFAULT_ITEM_SPACE_ROW, DEFAULT_LABEL_SPACE, DEFAULT_PAGER_SPACE, DEFAULT_SHAPE_SIZE, DEFAULT_SHAPE_SPACE, DEFAULT_STATES$1 as DEFAULT_STATES, DEFAULT_TITLE_SPACE, DEFAULT_VALUE_SPACE, DataLabel, DataZoom, DataZoomActiveTag, DirectionEnum, DiscreteLegend, DiscretePlayer, EmptyTip, GroupTransition, IMarkAreaLabelPosition, IMarkCommonArcLabelPosition, IMarkLineLabelPosition, IMarkPointItemPosition, IOperateType, Indicator, LEGEND_ELEMENT_NAME, LabelBase, LegendEvent, LegendStateValue, LineAxis, LineAxisGrid, LineCrosshair, LineLabel, LinkPath, MarkArcArea, MarkArcLine, MarkArea, MarkLine, MarkPoint, Pager, PlayerEventEnum, PolygonCrosshair, PolygonSectorCrosshair, PopTip, Radio, RectCrosshair, RectLabel, SLIDER_ELEMENT_NAME, ScrollBar, SectorCrosshair, Segment, SeriesNumberCellStateValue, SeriesNumberEvent, SizeContinuousLegend, Slider, StoryLabelItem, Switch, SymbolLabel, TableSeriesNumber, Tag, Timeline, Title, Tooltip, TopZIndex, VTag, WeatherBox, alignTextInLine, angle, angleLabelOrientAttribute, angleTo, cartesianTicks, clampRadian, computeOffsetForlimit, continuousTicks, contrastAccessibilityChecker, convertDomainToTickData, createTextGraphicByType, deltaXYToAngle, fuzzyEqualNumber, getAxisBreakSymbolAttrs, getCircleLabelPosition, getCirclePoints, getCircleVerticalVector, getElMap, getHorizontalPath, getMarksByName, getNoneGroupMarksByName, getPolarAngleLabelPosition, getPolygonPath, getSizeHandlerPath, getTextAlignAttrOfVerticalDir, getTextType, getVerticalCoord, getVerticalPath, hasOverlap, htmlAttributeTransform, initTextMeasure, isInRange, isPostiveXAxis, isRichText, isVisible, labelSmartInvert, length, limitShapeInBounds, linearDiscreteTicks, loadPoptip, loadScrollbar, measureTextSize, normalize, polarAngleAxisDiscreteTicks, polarTicks, reactAttributeTransform, registerArcDataLabel, registerLineDataLabel, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, registerRectDataLabel, registerSymbolDataLabel, removeRepeatPoint, richTextAttributeTransform, scale, scrollbarModule, setPoptipTheme, smartInvertStrategy, tan2AngleToAngle, textIntersect, ticks, traverseGroup, version };