@visactor/vtable 0.13.4-alpha.2 → 0.13.4-alpha.3

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 (121) hide show
  1. package/cjs/components/axis/get-axis-attributes.d.ts +0 -7
  2. package/cjs/components/axis/get-axis-attributes.js +17 -13
  3. package/cjs/components/axis/get-axis-attributes.js.map +1 -1
  4. package/cjs/core/BaseTable.js +1 -1
  5. package/cjs/core/BaseTable.js.map +1 -1
  6. package/cjs/event/media-click.js +2 -1
  7. package/cjs/event/sparkline-event.js +1 -2
  8. package/cjs/index.d.ts +1 -1
  9. package/cjs/index.js +1 -1
  10. package/cjs/index.js.map +1 -1
  11. package/cjs/layout/chart-helper/get-axis-config.js +5 -7
  12. package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
  13. package/cjs/layout/chart-helper/get-axis-domain.d.ts +1 -1
  14. package/cjs/layout/chart-helper/get-axis-domain.js +7 -17
  15. package/cjs/layout/chart-helper/get-axis-domain.js.map +1 -1
  16. package/cjs/layout/chart-helper/get-chart-spec.js +3 -3
  17. package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
  18. package/cjs/render/layout/arc.d.ts +10 -21
  19. package/cjs/render/layout/arc.js +7 -9
  20. package/cjs/render/layout/arc.js.map +1 -1
  21. package/cjs/render/layout/circle.d.ts +10 -17
  22. package/cjs/render/layout/circle.js +5 -6
  23. package/cjs/render/layout/circle.js.map +1 -1
  24. package/cjs/render/layout/container.d.ts +10 -48
  25. package/cjs/render/layout/container.js +15 -100
  26. package/cjs/render/layout/container.js.map +1 -1
  27. package/cjs/render/layout/group-element.d.ts +4 -24
  28. package/cjs/render/layout/group-element.js +4 -40
  29. package/cjs/render/layout/group-element.js.map +1 -1
  30. package/cjs/render/layout/group.d.ts +12 -0
  31. package/cjs/render/layout/group.js +18 -0
  32. package/cjs/render/layout/group.js.map +1 -0
  33. package/cjs/render/layout/icon.d.ts +10 -10
  34. package/cjs/render/layout/icon.js +11 -9
  35. package/cjs/render/layout/icon.js.map +1 -1
  36. package/cjs/render/layout/image.d.ts +10 -17
  37. package/cjs/render/layout/image.js +6 -7
  38. package/cjs/render/layout/image.js.map +1 -1
  39. package/cjs/render/layout/index.d.ts +2 -0
  40. package/cjs/render/layout/index.js +2 -1
  41. package/cjs/render/layout/index.js.map +1 -1
  42. package/cjs/render/layout/percent-calc.d.ts +1 -4
  43. package/cjs/render/layout/percent-calc.js.map +1 -1
  44. package/cjs/render/layout/rect.d.ts +10 -20
  45. package/cjs/render/layout/rect.js +5 -6
  46. package/cjs/render/layout/rect.js.map +1 -1
  47. package/cjs/render/layout/tag.d.ts +14 -0
  48. package/cjs/render/layout/tag.js +21 -0
  49. package/cjs/render/layout/tag.js.map +1 -0
  50. package/cjs/render/layout/text.d.ts +9 -46
  51. package/cjs/render/layout/text.js +7 -18
  52. package/cjs/render/layout/text.js.map +1 -1
  53. package/cjs/scenegraph/component/custom.d.ts +2 -2
  54. package/cjs/scenegraph/component/custom.js +14 -6
  55. package/cjs/scenegraph/component/custom.js.map +1 -1
  56. package/cjs/scenegraph/layout/compute-col-width.js +5 -8
  57. package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
  58. package/cjs/scenegraph/layout/update-height.js +4 -2
  59. package/cjs/scenegraph/layout/update-height.js.map +1 -1
  60. package/dist/vtable.js +310 -670
  61. package/dist/vtable.min.js +2 -2
  62. package/es/components/axis/get-axis-attributes.d.ts +0 -7
  63. package/es/components/axis/get-axis-attributes.js +1 -1
  64. package/es/components/axis/get-axis-attributes.js.map +1 -1
  65. package/es/core/BaseTable.js +1 -1
  66. package/es/core/BaseTable.js.map +1 -1
  67. package/es/event/media-click.js +2 -1
  68. package/es/event/sparkline-event.js +1 -2
  69. package/es/index.d.ts +1 -1
  70. package/es/index.js +1 -1
  71. package/es/index.js.map +1 -1
  72. package/es/layout/chart-helper/get-axis-config.js +5 -7
  73. package/es/layout/chart-helper/get-axis-config.js.map +1 -1
  74. package/es/layout/chart-helper/get-axis-domain.d.ts +1 -1
  75. package/es/layout/chart-helper/get-axis-domain.js +7 -19
  76. package/es/layout/chart-helper/get-axis-domain.js.map +1 -1
  77. package/es/layout/chart-helper/get-chart-spec.js +3 -3
  78. package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
  79. package/es/render/layout/arc.d.ts +10 -21
  80. package/es/render/layout/arc.js +7 -7
  81. package/es/render/layout/arc.js.map +1 -1
  82. package/es/render/layout/circle.d.ts +10 -17
  83. package/es/render/layout/circle.js +7 -6
  84. package/es/render/layout/circle.js.map +1 -1
  85. package/es/render/layout/container.d.ts +10 -48
  86. package/es/render/layout/container.js +16 -107
  87. package/es/render/layout/container.js.map +1 -1
  88. package/es/render/layout/group-element.d.ts +4 -24
  89. package/es/render/layout/group-element.js +4 -42
  90. package/es/render/layout/group-element.js.map +1 -1
  91. package/es/render/layout/group.d.ts +12 -0
  92. package/es/render/layout/group.js +12 -0
  93. package/es/render/layout/group.js.map +1 -0
  94. package/es/render/layout/icon.d.ts +10 -10
  95. package/es/render/layout/icon.js +12 -10
  96. package/es/render/layout/icon.js.map +1 -1
  97. package/es/render/layout/image.d.ts +10 -17
  98. package/es/render/layout/image.js +8 -7
  99. package/es/render/layout/image.js.map +1 -1
  100. package/es/render/layout/index.d.ts +2 -0
  101. package/es/render/layout/index.js +4 -0
  102. package/es/render/layout/index.js.map +1 -1
  103. package/es/render/layout/percent-calc.d.ts +1 -4
  104. package/es/render/layout/percent-calc.js.map +1 -1
  105. package/es/render/layout/rect.d.ts +10 -20
  106. package/es/render/layout/rect.js +7 -6
  107. package/es/render/layout/rect.js.map +1 -1
  108. package/es/render/layout/tag.d.ts +14 -0
  109. package/es/render/layout/tag.js +15 -0
  110. package/es/render/layout/tag.js.map +1 -0
  111. package/es/render/layout/text.d.ts +9 -46
  112. package/es/render/layout/text.js +9 -18
  113. package/es/render/layout/text.js.map +1 -1
  114. package/es/scenegraph/component/custom.d.ts +2 -2
  115. package/es/scenegraph/component/custom.js +15 -7
  116. package/es/scenegraph/component/custom.js.map +1 -1
  117. package/es/scenegraph/layout/compute-col-width.js +5 -8
  118. package/es/scenegraph/layout/compute-col-width.js.map +1 -1
  119. package/es/scenegraph/layout/update-height.js +4 -2
  120. package/es/scenegraph/layout/update-height.js.map +1 -1
  121. package/package.json +3 -3
package/dist/vtable.js CHANGED
@@ -7867,7 +7867,7 @@
7867
7867
  let Application$1 = class Application {};
7868
7868
  const application$1 = new Application$1();
7869
7869
 
7870
- const DIRECTION_KEY$2 = {
7870
+ const DIRECTION_KEY$1 = {
7871
7871
  horizontal: {
7872
7872
  width: "width",
7873
7873
  height: "height",
@@ -11618,7 +11618,7 @@
11618
11618
  !function (GroupUpdateAABBBoundsMode) {
11619
11619
  GroupUpdateAABBBoundsMode[GroupUpdateAABBBoundsMode.LESS_GROUP = 0] = "LESS_GROUP", GroupUpdateAABBBoundsMode[GroupUpdateAABBBoundsMode.MORE_GROUP = 1] = "MORE_GROUP";
11620
11620
  }(GroupUpdateAABBBoundsMode || (GroupUpdateAABBBoundsMode = {}));
11621
- let Group$1 = class Group extends Graphic$1 {
11621
+ let Group$2 = class Group extends Graphic$1 {
11622
11622
  constructor(params) {
11623
11623
  super(params), this.type = "group", this.parent = null, this.isContainer = !0, this.numberType = GROUP_NUMBER_TYPE, this._childUpdateTag = UpdateTag$1.UPDATE_BOUNDS;
11624
11624
  }
@@ -11768,9 +11768,9 @@
11768
11768
  return Group.NOWORK_ANIMATE_ATTR;
11769
11769
  }
11770
11770
  };
11771
- Group$1.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR$1;
11771
+ Group$2.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR$1;
11772
11772
 
11773
- class Layer extends Group$1 {
11773
+ class Layer extends Group$2 {
11774
11774
  get offscreen() {
11775
11775
  return this.layerHandler.offscreen;
11776
11776
  }
@@ -13590,7 +13590,7 @@
13590
13590
  }, NOWORK_ANIMATE_ATTR$1);
13591
13591
 
13592
13592
  const LINE_UPDATE_TAG_KEY = ["segments", "points", "curveType", ...GRAPHIC_UPDATE_TAG_KEY$1];
13593
- let Line$3 = class Line extends Graphic$1 {
13593
+ let Line$2 = class Line extends Graphic$1 {
13594
13594
  constructor() {
13595
13595
  let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
13596
13596
  super(params), this.type = "line", this.numberType = LINE_NUMBER_TYPE;
@@ -13654,7 +13654,7 @@
13654
13654
  return Line.NOWORK_ANIMATE_ATTR;
13655
13655
  }
13656
13656
  };
13657
- Line$3.NOWORK_ANIMATE_ATTR = Object.assign({
13657
+ Line$2.NOWORK_ANIMATE_ATTR = Object.assign({
13658
13658
  segments: 1,
13659
13659
  curveType: 1
13660
13660
  }, NOWORK_ANIMATE_ATTR$1);
@@ -13875,7 +13875,7 @@
13875
13875
 
13876
13876
  let Frame$1 = class Frame {
13877
13877
  constructor(left, top, width, height, ellipsis, wordBreak, verticalDirection, globalAlign, globalBaseline, layoutDirection, isWidthMax, isHeightMax, singleLine, icons) {
13878
- this.left = left, this.top = top, this.width = width, this.height = height, this.actualHeight = 0, this.bottom = top + height, this.right = left + width, this.ellipsis = ellipsis, this.wordBreak = wordBreak, this.verticalDirection = verticalDirection, this.lines = [], this.globalAlign = globalAlign, this.globalBaseline = globalBaseline, this.layoutDirection = layoutDirection, this.directionKey = DIRECTION_KEY$2[this.layoutDirection], this.isWidthMax = isWidthMax, this.isHeightMax = isHeightMax, this.singleLine = singleLine, icons ? (icons.clear(), this.icons = icons) : this.icons = new Map();
13878
+ this.left = left, this.top = top, this.width = width, this.height = height, this.actualHeight = 0, this.bottom = top + height, this.right = left + width, this.ellipsis = ellipsis, this.wordBreak = wordBreak, this.verticalDirection = verticalDirection, this.lines = [], this.globalAlign = globalAlign, this.globalBaseline = globalBaseline, this.layoutDirection = layoutDirection, this.directionKey = DIRECTION_KEY$1[this.layoutDirection], this.isWidthMax = isWidthMax, this.isHeightMax = isHeightMax, this.singleLine = singleLine, icons ? (icons.clear(), this.icons = icons) : this.icons = new Map();
13879
13879
  }
13880
13880
  draw(ctx, drawIcon) {
13881
13881
  const {
@@ -14220,9 +14220,9 @@
14220
14220
  }
14221
14221
  };
14222
14222
 
14223
- let Line$2 = class Line {
14223
+ let Line$1 = class Line {
14224
14224
  constructor(left, width, baseline, ascent, descent, lineBuffer, direction, isWidthMax) {
14225
- this.left = left, this.width = width, this.baseline = baseline, this.ascent = ascent, this.descent = descent, this.top = baseline - ascent, this.paragraphs = lineBuffer.map(p => p), this.textAlign = (this.paragraphs[0] instanceof RichTextIcon$1 ? this.paragraphs[0].attribute.textAlign : this.paragraphs[0].character.textAlign) || "left", this.direction = direction, this.directionKey = DIRECTION_KEY$2[this.direction], this.actualWidth = 0;
14225
+ this.left = left, this.width = width, this.baseline = baseline, this.ascent = ascent, this.descent = descent, this.top = baseline - ascent, this.paragraphs = lineBuffer.map(p => p), this.textAlign = (this.paragraphs[0] instanceof RichTextIcon$1 ? this.paragraphs[0].attribute.textAlign : this.paragraphs[0].character.textAlign) || "left", this.direction = direction, this.directionKey = DIRECTION_KEY$1[this.direction], this.actualWidth = 0;
14226
14226
  let maxHeight = 0;
14227
14227
  this.paragraphs.forEach((word, index) => {
14228
14228
  if (0 === index && word instanceof Paragraph$1) {
@@ -14312,7 +14312,7 @@
14312
14312
 
14313
14313
  let Wrapper$1 = class Wrapper {
14314
14314
  constructor(frame) {
14315
- this.frame = frame, this.width = this.frame.width, this.height = this.frame.height, this.lineWidth = 0, this.y = this.frame.top, this.maxAscent = 0, this.maxDescent = 0, this.maxAscentForBlank = 0, this.maxDescentForBlank = 0, this.lineBuffer = [], this.direction = frame.layoutDirection, this.directionKey = DIRECTION_KEY$2[this.direction];
14315
+ this.frame = frame, this.width = this.frame.width, this.height = this.frame.height, this.lineWidth = 0, this.y = this.frame.top, this.maxAscent = 0, this.maxDescent = 0, this.maxAscentForBlank = 0, this.maxDescentForBlank = 0, this.lineBuffer = [], this.direction = frame.layoutDirection, this.directionKey = DIRECTION_KEY$1[this.direction];
14316
14316
  }
14317
14317
  store(paragraph) {
14318
14318
  if (paragraph instanceof RichTextIcon$1) {
@@ -14326,7 +14326,7 @@
14326
14326
  if (0 === this.lineBuffer.length) return;
14327
14327
  const maxAscent = 0 === this.maxAscent ? this.maxAscentForBlank : this.maxAscent,
14328
14328
  maxDescent = 0 === this.maxDescent ? this.maxDescentForBlank : this.maxDescent,
14329
- line = new Line$2(this.frame.left, this[this.directionKey.width], this.y + maxAscent, maxAscent, maxDescent, this.lineBuffer, this.direction, "horizontal" === this.direction ? this.frame.isWidthMax : this.frame.isHeightMax);
14329
+ line = new Line$1(this.frame.left, this[this.directionKey.width], this.y + maxAscent, maxAscent, maxDescent, this.lineBuffer, this.direction, "horizontal" === this.direction ? this.frame.isWidthMax : this.frame.isHeightMax);
14330
14330
  this.frame.lines.push(line), this.frame.actualHeight += line.height, this.y += line.height, this.lineBuffer.length = 0, this.lineWidth = this.maxAscent = this.maxDescent = this.maxAscentForBlank = this.maxDescentForBlank = 0;
14331
14331
  }
14332
14332
  deal(paragraph) {
@@ -14681,7 +14681,7 @@
14681
14681
  }, NOWORK_ANIMATE_ATTR$1);
14682
14682
 
14683
14683
  const ARC_UPDATE_TAG_KEY = ["innerRadius", "outerRadius", "startAngle", "endAngle", "cornerRadius", "padAngle", "padRadius", "cap", ...GRAPHIC_UPDATE_TAG_KEY$1];
14684
- class Arc extends Graphic$1 {
14684
+ let Arc$1 = class Arc extends Graphic$1 {
14685
14685
  constructor(params) {
14686
14686
  super(params), this.type = "arc", this.numberType = ARC_NUMBER_TYPE;
14687
14687
  }
@@ -14834,12 +14834,12 @@
14834
14834
  getNoWorkAnimateAttr() {
14835
14835
  return Arc.NOWORK_ANIMATE_ATTR;
14836
14836
  }
14837
- }
14838
- Arc.NOWORK_ANIMATE_ATTR = Object.assign({
14837
+ };
14838
+ Arc$1.NOWORK_ANIMATE_ATTR = Object.assign({
14839
14839
  cap: 1
14840
14840
  }, NOWORK_ANIMATE_ATTR$1);
14841
14841
 
14842
- class Arc3d extends Arc {
14842
+ class Arc3d extends Arc$1 {
14843
14843
  constructor(params) {
14844
14844
  super(params), this.type = "arc3d", this.numberType = ARC3D_NUMBER_TYPE;
14845
14845
  }
@@ -15717,7 +15717,7 @@
15717
15717
  };
15718
15718
  DefaultGraphicService = __decorate$1C([injectable(), __param$P(0, inject(GraphicCreator)), __param$P(1, inject(ContributionProvider)), __param$P(1, named(RectBoundsContribution)), __param$P(2, inject(ContributionProvider)), __param$P(2, named(SymbolBoundsContribution)), __param$P(3, inject(ContributionProvider)), __param$P(3, named(CircleBoundsContribution)), __param$P(4, inject(ContributionProvider)), __param$P(4, named(ArcBoundsContribution)), __param$P(5, inject(ContributionProvider)), __param$P(5, named(PathBoundsContribution)), __metadata$13("design:paramtypes", [Object, Object, Object, Object, Object, Object])], DefaultGraphicService);
15719
15719
 
15720
- class ShadowRoot extends Group$1 {
15720
+ class ShadowRoot extends Group$2 {
15721
15721
  constructor(graphic) {
15722
15722
  super({
15723
15723
  x: 0,
@@ -15750,7 +15750,7 @@
15750
15750
  }
15751
15751
 
15752
15752
  function createArc(attributes) {
15753
- return new Arc(attributes);
15753
+ return new Arc$1(attributes);
15754
15754
  }
15755
15755
  function createArea(attributes) {
15756
15756
  return new Area(attributes);
@@ -15759,10 +15759,10 @@
15759
15759
  return new Circle$1(attributes);
15760
15760
  }
15761
15761
  function createGroup(attributes) {
15762
- return new Group$1(attributes);
15762
+ return new Group$2(attributes);
15763
15763
  }
15764
15764
  function createLine(attributes) {
15765
- return new Line$3(attributes);
15765
+ return new Line$2(attributes);
15766
15766
  }
15767
15767
  function createPath(attributes) {
15768
15768
  return new Path(attributes);
@@ -20600,7 +20600,7 @@
20600
20600
  Y: 0,
20601
20601
  BACKGROUND: "white"
20602
20602
  };
20603
- class Stage extends Group$1 {
20603
+ class Stage extends Group$2 {
20604
20604
  set viewBox(b) {
20605
20605
  this._viewBox.setValue(b.x1, b.y1, b.x2, b.y2);
20606
20606
  }
@@ -25703,7 +25703,7 @@
25703
25703
  }
25704
25704
 
25705
25705
  const GROUP_ATTRIBUTES = ["x", "y", "dx", "dy", "scaleX", "scaleY", "angle", "anchor", "postMatrix", "visible", "clip", "pickable", "childrenPickable", "zIndex", "cursor"];
25706
- class AbstractComponent extends Group$1 {
25706
+ class AbstractComponent extends Group$2 {
25707
25707
  constructor(attributes) {
25708
25708
  let mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "2d";
25709
25709
  super(attributes), this.mode = mode, this.setTheme({
@@ -26050,7 +26050,7 @@
26050
26050
  }
26051
26051
  return t;
26052
26052
  };
26053
- class Tag extends AbstractComponent {
26053
+ let Tag$1 = class Tag extends AbstractComponent {
26054
26054
  constructor(attributes) {
26055
26055
  super(merge$1({}, Tag.defaultAttributes, attributes)), this.name = "tag";
26056
26056
  }
@@ -26138,8 +26138,8 @@
26138
26138
  isEmpty(null == state ? void 0 : state.panel) || (bgRect.states = state.panel);
26139
26139
  }
26140
26140
  }
26141
- }
26142
- Tag.defaultAttributes = {
26141
+ };
26142
+ Tag$1.defaultAttributes = {
26143
26143
  visible: !0,
26144
26144
  textStyle: {
26145
26145
  fontSize: 12,
@@ -26972,7 +26972,7 @@
26972
26972
  }
26973
26973
  renderTitle(container) {
26974
26974
  const titleAttributes = this.getTitleAttribute(),
26975
- axisTitle = new Tag(Object.assign({}, titleAttributes));
26975
+ axisTitle = new Tag$1(Object.assign({}, titleAttributes));
26976
26976
  axisTitle.name = AXIS_ELEMENT_NAME.title, axisTitle.id = this._getNodeId("title"), container.add(axisTitle);
26977
26977
  }
26978
26978
  getVerticalCoord(point, offset, inside) {
@@ -27890,7 +27890,7 @@
27890
27890
  }, shape.style), isValid$6(shape.space) && (tagAttrs.space = shape.space)), background && background.visible && (tagAttrs.panel = Object.assign({
27891
27891
  visible: !0
27892
27892
  }, background.style));
27893
- const titleTag = new Tag(tagAttrs);
27893
+ const titleTag = new Tag$1(tagAttrs);
27894
27894
  titleTag.name = LEGEND_ELEMENT_NAME.title, this._title = titleTag, this._innerView.add(titleTag);
27895
27895
  }
27896
27896
  _adjustLayout() {
@@ -32750,7 +32750,7 @@
32750
32750
  class Application {}
32751
32751
  const application = new Application();
32752
32752
 
32753
- const DIRECTION_KEY$1 = {
32753
+ const DIRECTION_KEY = {
32754
32754
  horizontal: {
32755
32755
  width: "width",
32756
32756
  height: "height",
@@ -35273,7 +35273,7 @@
35273
35273
 
35274
35274
  class Frame {
35275
35275
  constructor(left, top, width, height, ellipsis, wordBreak, verticalDirection, globalAlign, globalBaseline, layoutDirection, isWidthMax, isHeightMax, singleLine, icons) {
35276
- this.left = left, this.top = top, this.width = width, this.height = height, this.actualHeight = 0, this.bottom = top + height, this.right = left + width, this.ellipsis = ellipsis, this.wordBreak = wordBreak, this.verticalDirection = verticalDirection, this.lines = [], this.globalAlign = globalAlign, this.globalBaseline = globalBaseline, this.layoutDirection = layoutDirection, this.directionKey = DIRECTION_KEY$1[this.layoutDirection], this.isWidthMax = isWidthMax, this.isHeightMax = isHeightMax, this.singleLine = singleLine, icons ? (icons.clear(), this.icons = icons) : this.icons = new Map();
35276
+ this.left = left, this.top = top, this.width = width, this.height = height, this.actualHeight = 0, this.bottom = top + height, this.right = left + width, this.ellipsis = ellipsis, this.wordBreak = wordBreak, this.verticalDirection = verticalDirection, this.lines = [], this.globalAlign = globalAlign, this.globalBaseline = globalBaseline, this.layoutDirection = layoutDirection, this.directionKey = DIRECTION_KEY[this.layoutDirection], this.isWidthMax = isWidthMax, this.isHeightMax = isHeightMax, this.singleLine = singleLine, icons ? (icons.clear(), this.icons = icons) : this.icons = new Map();
35277
35277
  }
35278
35278
  draw(ctx, drawIcon) {
35279
35279
  const {
@@ -35618,9 +35618,9 @@
35618
35618
  }
35619
35619
  }
35620
35620
 
35621
- let Line$1 = class Line {
35621
+ class Line {
35622
35622
  constructor(left, width, baseline, ascent, descent, lineBuffer, direction, isWidthMax) {
35623
- this.left = left, this.width = width, this.baseline = baseline, this.ascent = ascent, this.descent = descent, this.top = baseline - ascent, this.paragraphs = lineBuffer.map(p => p), this.textAlign = (this.paragraphs[0] instanceof RichTextIcon ? this.paragraphs[0].attribute.textAlign : this.paragraphs[0].character.textAlign) || "left", this.direction = direction, this.directionKey = DIRECTION_KEY$1[this.direction], this.actualWidth = 0;
35623
+ this.left = left, this.width = width, this.baseline = baseline, this.ascent = ascent, this.descent = descent, this.top = baseline - ascent, this.paragraphs = lineBuffer.map(p => p), this.textAlign = (this.paragraphs[0] instanceof RichTextIcon ? this.paragraphs[0].attribute.textAlign : this.paragraphs[0].character.textAlign) || "left", this.direction = direction, this.directionKey = DIRECTION_KEY[this.direction], this.actualWidth = 0;
35624
35624
  let maxHeight = 0;
35625
35625
  this.paragraphs.forEach((word, index) => {
35626
35626
  if (0 === index && word instanceof Paragraph) {
@@ -35706,11 +35706,11 @@
35706
35706
  width += paragraph instanceof RichTextIcon ? paragraph.width : paragraph.getWidthWithEllips(this.direction);
35707
35707
  }), width;
35708
35708
  }
35709
- };
35709
+ }
35710
35710
 
35711
35711
  class Wrapper {
35712
35712
  constructor(frame) {
35713
- this.frame = frame, this.width = this.frame.width, this.height = this.frame.height, this.lineWidth = 0, this.y = this.frame.top, this.maxAscent = 0, this.maxDescent = 0, this.maxAscentForBlank = 0, this.maxDescentForBlank = 0, this.lineBuffer = [], this.direction = frame.layoutDirection, this.directionKey = DIRECTION_KEY$1[this.direction];
35713
+ this.frame = frame, this.width = this.frame.width, this.height = this.frame.height, this.lineWidth = 0, this.y = this.frame.top, this.maxAscent = 0, this.maxDescent = 0, this.maxAscentForBlank = 0, this.maxDescentForBlank = 0, this.lineBuffer = [], this.direction = frame.layoutDirection, this.directionKey = DIRECTION_KEY[this.direction];
35714
35714
  }
35715
35715
  store(paragraph) {
35716
35716
  if (paragraph instanceof RichTextIcon) {
@@ -35724,7 +35724,7 @@
35724
35724
  if (0 === this.lineBuffer.length) return;
35725
35725
  const maxAscent = 0 === this.maxAscent ? this.maxAscentForBlank : this.maxAscent,
35726
35726
  maxDescent = 0 === this.maxDescent ? this.maxDescentForBlank : this.maxDescent,
35727
- line = new Line$1(this.frame.left, this[this.directionKey.width], this.y + maxAscent, maxAscent, maxDescent, this.lineBuffer, this.direction, "horizontal" === this.direction ? this.frame.isWidthMax : this.frame.isHeightMax);
35727
+ line = new Line(this.frame.left, this[this.directionKey.width], this.y + maxAscent, maxAscent, maxDescent, this.lineBuffer, this.direction, "horizontal" === this.direction ? this.frame.isWidthMax : this.frame.isHeightMax);
35728
35728
  this.frame.lines.push(line), this.frame.actualHeight += line.height, this.y += line.height, this.lineBuffer.length = 0, this.lineWidth = this.maxAscent = this.maxDescent = this.maxAscentForBlank = this.maxDescentForBlank = 0;
35729
35729
  }
35730
35730
  deal(paragraph) {
@@ -38071,7 +38071,7 @@
38071
38071
  };
38072
38072
  }
38073
38073
 
38074
- class Group extends Group$1 {
38074
+ let Group$1 = class Group extends Group$2 {
38075
38075
  role;
38076
38076
  col;
38077
38077
  row;
@@ -38252,7 +38252,7 @@
38252
38252
  this.colHeight += cellHeight;
38253
38253
  }
38254
38254
  }
38255
- }
38255
+ };
38256
38256
  function after(group, selfChange) {
38257
38257
  if (!(group.stage && group.stage.renderCount)) {
38258
38258
  return;
@@ -38309,13 +38309,10 @@
38309
38309
  if (customRenderObj.rootContainer) {
38310
38310
  customRenderObj.rootContainer = decodeReactDom(customRenderObj.rootContainer);
38311
38311
  }
38312
- if (customRenderObj.rootContainer instanceof Group$1) {
38312
+ if (customRenderObj.rootContainer instanceof Group$2) {
38313
38313
  elementsGroup = customRenderObj.rootContainer;
38314
38314
  elementsGroup.name = 'custom-container';
38315
38315
  }
38316
- else if (customRenderObj.rootContainer) {
38317
- customElements = customRenderObj.rootContainer.getElements(undefined, false, false);
38318
- }
38319
38316
  renderDefault = customRenderObj.renderDefault;
38320
38317
  }
38321
38318
  else if (typeof customRender === 'function') {
@@ -38352,13 +38349,14 @@
38352
38349
  const value = table.getCellValue(col, row);
38353
38350
  elementsGroup = adjustElementToGroup(customElements, autoWidth ? expectedWidth : width, autoHeight ? expectedHeight : height, value);
38354
38351
  }
38352
+ dealPercentCalc(elementsGroup);
38355
38353
  return {
38356
38354
  elementsGroup,
38357
38355
  renderDefault
38358
38356
  };
38359
38357
  }
38360
38358
  function adjustElementToGroup(elements, width, height, value) {
38361
- const customGroup = new Group({
38359
+ const customGroup = new Group$1({
38362
38360
  x: 0,
38363
38361
  y: 0,
38364
38362
  width,
@@ -38507,6 +38505,8 @@
38507
38505
  rect.x = isString$3(rect.x)
38508
38506
  ? transformString(rect.x, width - borderLineWidths[1])
38509
38507
  : Number(rect.x);
38508
+ }
38509
+ if (isValid$6(rect.y)) {
38510
38510
  rect.y = isString$3(rect.y)
38511
38511
  ? transformString(rect.y, height - borderLineWidths[2])
38512
38512
  : Number(rect.y);
@@ -38557,6 +38557,24 @@
38557
38557
  }
38558
38558
  return parseInt(str, 10);
38559
38559
  }
38560
+ function dealPercentCalc(group) {
38561
+ if (!group) {
38562
+ return;
38563
+ }
38564
+ group.forEachChildren((child) => {
38565
+ if (isObject$4(child.attribute.width) && child.attribute.width.percent) {
38566
+ child.setAttribute('width', (child.attribute.width.percent / 100) * group.attribute.width +
38567
+ (child.attribute.width.delta ?? 0));
38568
+ }
38569
+ if (isObject$4(child.attribute.height) && child.attribute.height.percent) {
38570
+ child.setAttribute('height', (child.attribute.height.percent / 100) * group.attribute.height +
38571
+ (child.attribute.height.delta ?? 0));
38572
+ }
38573
+ if (child.type === 'group') {
38574
+ dealPercentCalc(child);
38575
+ }
38576
+ });
38577
+ }
38560
38578
  function decodeReactDom(dom) {
38561
38579
  if (!dom.$$typeof) {
38562
38580
  return dom;
@@ -38937,7 +38955,7 @@
38937
38955
  if (cellTheme?.text?.textBaseline) {
38938
38956
  textBaseline = cellTheme?.text?.textBaseline;
38939
38957
  }
38940
- const cellGroup = new Group({
38958
+ const cellGroup = new Group$1({
38941
38959
  x: xOrigin,
38942
38960
  y: yOrigin,
38943
38961
  width,
@@ -39078,7 +39096,7 @@
39078
39096
  const height = table.getRowHeight(row);
39079
39097
  let contentWidth = width;
39080
39098
  let contentHeight = height;
39081
- const percentCompleteBarGroup = new Group({
39099
+ const percentCompleteBarGroup = new Group$1({
39082
39100
  x: 0,
39083
39101
  y: 0,
39084
39102
  width: contentWidth,
@@ -39508,7 +39526,7 @@
39508
39526
  const yScale = new LinearScale();
39509
39527
  function createSparkLineCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, width, height, padding, table, cellTheme) {
39510
39528
  if (!cellGroup) {
39511
- cellGroup = new Group({
39529
+ cellGroup = new Group$1({
39512
39530
  x: xOrigin,
39513
39531
  y: yOrigin,
39514
39532
  width,
@@ -39681,7 +39699,7 @@
39681
39699
  else {
39682
39700
  specObj = spec;
39683
39701
  }
39684
- const group = new Group({
39702
+ const group = new Group$1({
39685
39703
  x,
39686
39704
  y,
39687
39705
  width,
@@ -39706,7 +39724,7 @@
39706
39724
  interpolate: 'linear'
39707
39725
  };
39708
39726
  }
39709
- const symbolGroup = new Group({
39727
+ const symbolGroup = new Group$1({
39710
39728
  x: 0,
39711
39729
  y: 0,
39712
39730
  width,
@@ -39730,7 +39748,7 @@
39730
39748
  return group;
39731
39749
  }
39732
39750
 
39733
- class CellContent extends Group {
39751
+ class CellContent extends Group$1 {
39734
39752
  _leftGroup;
39735
39753
  _rightGroup;
39736
39754
  _centerGroup;
@@ -39742,19 +39760,19 @@
39742
39760
  _baseline;
39743
39761
  constructor(params) {
39744
39762
  super(params);
39745
- this._leftGroup = new Group({
39763
+ this._leftGroup = new Group$1({
39746
39764
  pickable: false,
39747
39765
  fill: false,
39748
39766
  stroke: false
39749
39767
  });
39750
39768
  this._leftGroup.role = 'content-left';
39751
- this._rightGroup = new Group({
39769
+ this._rightGroup = new Group$1({
39752
39770
  pickable: false,
39753
39771
  fill: false,
39754
39772
  stroke: false
39755
39773
  });
39756
39774
  this._rightGroup.role = 'content-right';
39757
- this._centerGroup = new Group({
39775
+ this._centerGroup = new Group$1({
39758
39776
  pickable: false,
39759
39777
  fill: false,
39760
39778
  stroke: false
@@ -40385,21 +40403,11 @@
40385
40403
  }
40386
40404
 
40387
40405
  const DEFAULT_CONTINUOUS_TICK_COUNT = 5;
40388
- function getAxisDomainRangeAndLabels(min, max, axisOption, isZeroAlign, axisLength, skipTick) {
40406
+ function getAxisDomainRangeAndLabels(min, max, axisOption, isZeroAlign, skipTick) {
40389
40407
  if (axisOption?.zero) {
40390
40408
  min = Math.min(min, 0);
40391
40409
  max = Math.max(max, 0);
40392
40410
  }
40393
- if (axisOption?.expand) {
40394
- const domainMin = min;
40395
- const domainMax = max;
40396
- if (isValid$6(axisOption.expand.min)) {
40397
- min = domainMin - (domainMax - domainMin) * axisOption.expand.min;
40398
- }
40399
- if (isValid$6(axisOption.expand.max)) {
40400
- max = domainMax + (domainMax - domainMin) * axisOption.expand.max;
40401
- }
40402
- }
40403
40411
  if (isNumber$6(axisOption?.min)) {
40404
40412
  min = axisOption.min;
40405
40413
  }
@@ -40421,14 +40429,6 @@
40421
40429
  scale.domain([min, max], !!axisOption?.nice);
40422
40430
  if (axisOption?.nice && !isZeroAlign) {
40423
40431
  let tickCount = axisOption.tick?.forceTickCount ?? axisOption.tick?.tickCount ?? 10;
40424
- if (isFunction$1(tickCount)) {
40425
- tickCount = tickCount({
40426
- axisLength,
40427
- labelStyle: axisOption?.label?.style ?? {
40428
- fontSize: THEME_CONSTANTS.LABEL_FONT_SIZE
40429
- }
40430
- });
40431
- }
40432
40432
  if (axisOption.niceType === 'accurateFirst') {
40433
40433
  tickCount = Math.max(10, tickCount);
40434
40434
  }
@@ -40459,7 +40459,6 @@
40459
40459
  if (!layout._table.isPivotChart()) {
40460
40460
  return undefined;
40461
40461
  }
40462
- const table = layout._table;
40463
40462
  if (layout.indicatorsAsCol) {
40464
40463
  if (layout.hasTwoIndicatorAxes &&
40465
40464
  row === layout.columnHeaderLevelCount - 1 &&
@@ -40479,7 +40478,7 @@
40479
40478
  range.min = range.min < 0 ? -1 : 0;
40480
40479
  range.max = range.max > 0 ? 1 : 0;
40481
40480
  }
40482
- const { range: niceRange, ticks } = getAxisDomainRangeAndLabels(range.min, range.max, axisOption, isZeroAlign, table.getColWidth(col));
40481
+ const { range: niceRange, ticks } = getAxisDomainRangeAndLabels(range.min, range.max, axisOption, isZeroAlign);
40483
40482
  range.min = !isNaN(niceRange[0]) ? niceRange[0] : 0;
40484
40483
  range.max = !isNaN(niceRange[1]) ? niceRange[1] : 1;
40485
40484
  if (isNumber$6(axisOption?.min)) {
@@ -40529,7 +40528,7 @@
40529
40528
  range.min = range.min < 0 ? -1 : 0;
40530
40529
  range.max = range.max > 0 ? 1 : 0;
40531
40530
  }
40532
- const { range: niceRange, ticks } = getAxisDomainRangeAndLabels(range.min, range.max, axisOption, isZeroAlign, table.getColWidth(col));
40531
+ const { range: niceRange, ticks } = getAxisDomainRangeAndLabels(range.min, range.max, axisOption, isZeroAlign);
40533
40532
  range.min = !isNaN(niceRange[0]) ? niceRange[0] : 0;
40534
40533
  range.max = !isNaN(niceRange[1]) ? niceRange[1] : 1;
40535
40534
  if (isNumber$6(axisOption?.min)) {
@@ -40609,7 +40608,7 @@
40609
40608
  range.min = range.min < 0 ? -1 : 0;
40610
40609
  range.max = range.max > 0 ? 1 : 0;
40611
40610
  }
40612
- const { range: niceRange, ticks } = getAxisDomainRangeAndLabels(range.min, range.max, axisOption, isZeroAlign, table.getRowHeight(row));
40611
+ const { range: niceRange, ticks } = getAxisDomainRangeAndLabels(range.min, range.max, axisOption, isZeroAlign);
40613
40612
  range.min = !isNaN(niceRange[0]) ? niceRange[0] : 0;
40614
40613
  range.max = !isNaN(niceRange[1]) ? niceRange[1] : 1;
40615
40614
  if (isNumber$6(axisOption?.min)) {
@@ -40657,7 +40656,7 @@
40657
40656
  range.min = range.min < 0 ? -1 : 0;
40658
40657
  range.max = range.max > 0 ? 1 : 0;
40659
40658
  }
40660
- const { range: niceRange, ticks } = getAxisDomainRangeAndLabels(range.min, range.max, axisOption, isZeroAlign, table.getRowHeight(row));
40659
+ const { range: niceRange, ticks } = getAxisDomainRangeAndLabels(range.min, range.max, axisOption, isZeroAlign);
40661
40660
  range.min = !isNaN(niceRange[0]) ? niceRange[0] : 0;
40662
40661
  range.max = !isNaN(niceRange[1]) ? niceRange[1] : 1;
40663
40662
  if (isNumber$6(axisOption?.min)) {
@@ -41293,7 +41292,7 @@
41293
41292
  if (customLayoutObj.rootContainer) {
41294
41293
  customLayoutObj.rootContainer = decodeReactDom(customLayoutObj.rootContainer);
41295
41294
  }
41296
- if (customLayoutObj.rootContainer instanceof Group$1) {
41295
+ if (customLayoutObj.rootContainer instanceof Group$2) {
41297
41296
  height = customLayoutObj.rootContainer.AABBBounds.height() ?? 0;
41298
41297
  }
41299
41298
  else if (customLayoutObj.rootContainer) {
@@ -41431,6 +41430,9 @@
41431
41430
  let rowStart = 0;
41432
41431
  let rowEnd = 0;
41433
41432
  if (row < scene.table.columnHeaderLevelCount) {
41433
+ scene.colHeaderGroup.setAttribute('height', scene.colHeaderGroup.attribute.height + detaY);
41434
+ scene.rowHeaderGroup.setAttribute('y', scene.colHeaderGroup.attribute.y + detaY);
41435
+ scene.bodyGroup.setAttribute('y', scene.bodyGroup.attribute.y + detaY);
41434
41436
  rowStart = row + 1;
41435
41437
  rowEnd = scene.table.columnHeaderLevelCount - 1;
41436
41438
  }
@@ -41826,7 +41828,7 @@
41826
41828
  _menuInfo;
41827
41829
  constructor(table) {
41828
41830
  this._table = table;
41829
- this._menuInstance = new Group({
41831
+ this._menuInstance = new Group$1({
41830
41832
  x: 0,
41831
41833
  y: 0,
41832
41834
  fill: menuStyle.bgColor,
@@ -41916,7 +41918,7 @@
41916
41918
  icon = item.icon;
41917
41919
  }
41918
41920
  }
41919
- const group = new Group({
41921
+ const group = new Group$1({
41920
41922
  y,
41921
41923
  x,
41922
41924
  height: menuStyle.lineHeight,
@@ -42790,7 +42792,7 @@
42790
42792
  }
42791
42793
 
42792
42794
  const CHART_NUMBER_TYPE = genNumberType$1();
42793
- class Chart extends Group$1 {
42795
+ class Chart extends Group$2 {
42794
42796
  type = 'chart';
42795
42797
  chartInstance;
42796
42798
  activeChartInstance;
@@ -43917,14 +43919,9 @@
43917
43919
  if (customLayoutObj.rootContainer) {
43918
43920
  customLayoutObj.rootContainer = decodeReactDom(customLayoutObj.rootContainer);
43919
43921
  }
43920
- if (customLayoutObj.rootContainer instanceof Group$1) {
43922
+ if (customLayoutObj.rootContainer instanceof Group$2) {
43921
43923
  width = customLayoutObj.rootContainer.AABBBounds.width() ?? 0;
43922
43924
  }
43923
- else if (customLayoutObj.rootContainer) {
43924
- customLayoutObj.rootContainer.isRoot = true;
43925
- const size = customLayoutObj.rootContainer.getContentSize();
43926
- width = size.width ?? 0;
43927
- }
43928
43925
  else {
43929
43926
  width = 0;
43930
43927
  }
@@ -44002,7 +43999,7 @@
44002
43999
  return widthDefined;
44003
44000
  }
44004
44001
 
44005
- const emptyGroup = new Group({});
44002
+ const emptyGroup = new Group$1({});
44006
44003
  emptyGroup.role = 'empty';
44007
44004
 
44008
44005
  const chartTypes = {};
@@ -44021,7 +44018,7 @@
44021
44018
  padding = functionalPadding;
44022
44019
  }
44023
44020
  if (!cellGroup) {
44024
- cellGroup = new Group({
44021
+ cellGroup = new Group$1({
44025
44022
  x: xOrigin,
44026
44023
  y: yOrigin,
44027
44024
  width,
@@ -44079,7 +44076,7 @@
44079
44076
  const autoColWidth = colWidth === 'auto';
44080
44077
  const autoWrapText = headerStyle.autoWrapText ?? table.internalProps.autoWrapText;
44081
44078
  const lineClamp = headerStyle.lineClamp;
44082
- const cellGroup = new Group({
44079
+ const cellGroup = new Group$1({
44083
44080
  x: xOrigin,
44084
44081
  y: yOrigin,
44085
44082
  width: cellWidth,
@@ -44143,7 +44140,7 @@
44143
44140
  if (cellTheme?.text?.textBaseline) {
44144
44141
  textBaseline = cellTheme?.text?.textBaseline;
44145
44142
  }
44146
- const cellGroup = new Group({
44143
+ const cellGroup = new Group$1({
44147
44144
  x: xOrigin,
44148
44145
  y: yOrigin,
44149
44146
  width,
@@ -44234,7 +44231,7 @@
44234
44231
 
44235
44232
  function createCheckboxCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, table, cellTheme, define) {
44236
44233
  if (!cellGroup) {
44237
- cellGroup = new Group({
44234
+ cellGroup = new Group$1({
44238
44235
  x: xOrigin,
44239
44236
  y: yOrigin,
44240
44237
  width,
@@ -44534,7 +44531,7 @@
44534
44531
  }
44535
44532
  let newCellGroup;
44536
44533
  if (isMerge && (col !== range.start.col || row !== range.start.row)) {
44537
- newCellGroup = new Group({
44534
+ newCellGroup = new Group$1({
44538
44535
  x: 0,
44539
44536
  y: addNew ? 0 : oldCellGroup.attribute.y,
44540
44537
  width: 0,
@@ -44689,7 +44686,7 @@
44689
44686
  }
44690
44687
  if (mergeResult) {
44691
44688
  const height = mergeResult.cellHeight / (range.end.row - range.start.row + 1);
44692
- const cellGroup = new Group({
44689
+ const cellGroup = new Group$1({
44693
44690
  x: 0,
44694
44691
  y,
44695
44692
  width: 0,
@@ -44751,7 +44748,7 @@
44751
44748
  for (let i = colStart; i <= colEnd; i++) {
44752
44749
  const col = i;
44753
44750
  const colWidth = table.getColWidth(col);
44754
- const columnGroup = new Group({
44751
+ const columnGroup = new Group$1({
44755
44752
  x: xOrigin + x,
44756
44753
  y: yOrigin,
44757
44754
  width: colWidth,
@@ -45674,7 +45671,7 @@
45674
45671
  }
45675
45672
  }
45676
45673
  if (this.table.columnHeaderLevelCount) {
45677
- const lastColumnGroup = (this.table.scenegraph.colHeaderGroup.lastChild instanceof Group
45674
+ const lastColumnGroup = (this.table.scenegraph.colHeaderGroup.lastChild instanceof Group$1
45678
45675
  ? this.table.scenegraph.colHeaderGroup.lastChild
45679
45676
  : this.table.scenegraph.colHeaderGroup.lastChild._prev);
45680
45677
  const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;
@@ -45682,7 +45679,7 @@
45682
45679
  createColGroup(this.table.scenegraph.colHeaderGroup, xOrigin, yOrigin, this.currentCol + 1, endCol, 0, this.table.columnHeaderLevelCount - 1, 'columnHeader', this.table);
45683
45680
  }
45684
45681
  if (this.table.bottomFrozenRowCount) {
45685
- const lastColumnGroup = (this.table.scenegraph.bottomFrozenGroup.lastChild instanceof Group
45682
+ const lastColumnGroup = (this.table.scenegraph.bottomFrozenGroup.lastChild instanceof Group$1
45686
45683
  ? this.table.scenegraph.bottomFrozenGroup.lastChild
45687
45684
  : this.table.scenegraph.bottomFrozenGroup.lastChild._prev);
45688
45685
  const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;
@@ -45690,13 +45687,13 @@
45690
45687
  createColGroup(this.table.scenegraph.bottomFrozenGroup, xOrigin, yOrigin, this.currentCol + 1, endCol, this.table.rowCount - this.table.bottomFrozenRowCount, this.table.rowCount - 1, 'columnHeader', this.table);
45691
45688
  }
45692
45689
  let lastColumnGroup = this.table.scenegraph.bodyGroup.lastChild &&
45693
- (this.table.scenegraph.bodyGroup.lastChild instanceof Group
45690
+ (this.table.scenegraph.bodyGroup.lastChild instanceof Group$1
45694
45691
  ? this.table.scenegraph.bodyGroup.lastChild
45695
45692
  : this.table.scenegraph.bodyGroup.lastChild._prev);
45696
45693
  if (!lastColumnGroup) {
45697
45694
  lastColumnGroup =
45698
45695
  this.table.scenegraph.colHeaderGroup.lastChild &&
45699
- (this.table.scenegraph.colHeaderGroup.lastChild instanceof Group
45696
+ (this.table.scenegraph.colHeaderGroup.lastChild instanceof Group$1
45700
45697
  ? this.table.scenegraph.colHeaderGroup.lastChild
45701
45698
  : this.table.scenegraph.colHeaderGroup.lastChild._prev);
45702
45699
  }
@@ -45838,7 +45835,7 @@
45838
45835
  return getCellByCache(cacheCellGroup._next, row);
45839
45836
  }
45840
45837
 
45841
- new Group$1({});
45838
+ new Group$2({});
45842
45839
  function moveHeaderPosition(colSource, rowSource, colTarget, rowTarget, table) {
45843
45840
  const scene = table.scenegraph;
45844
45841
  const cellLocation = table.getCellLocation(colTarget, rowTarget);
@@ -46239,7 +46236,7 @@
46239
46236
  }
46240
46237
  function addRow(row, scene) {
46241
46238
  for (let col = 0; col < scene.table.colCount; col++) {
46242
- const cellGroup = new Group({
46239
+ const cellGroup = new Group$1({
46243
46240
  x: 0,
46244
46241
  y: 0,
46245
46242
  width: scene.table.getColWidth(col),
@@ -46512,7 +46509,7 @@
46512
46509
  scene.hasFrozen = true;
46513
46510
  }
46514
46511
  function moveColumnFromBodyToRowHeader(scene) {
46515
- const column = scene.bodyGroup.firstChild instanceof Group ? scene.bodyGroup.firstChild : null;
46512
+ const column = scene.bodyGroup.firstChild instanceof Group$1 ? scene.bodyGroup.firstChild : null;
46516
46513
  if (column) {
46517
46514
  scene.rowHeaderGroup.appendChild(column);
46518
46515
  scene.rowHeaderGroup.setAttribute('width', scene.rowHeaderGroup.attribute.width + column.attribute.width);
@@ -46520,7 +46517,7 @@
46520
46517
  }
46521
46518
  }
46522
46519
  function moveColumnFromColHeaderToCornerHeader(scene) {
46523
- const headerColumn = scene.colHeaderGroup.firstChild instanceof Group ? scene.colHeaderGroup.firstChild : null;
46520
+ const headerColumn = scene.colHeaderGroup.firstChild instanceof Group$1 ? scene.colHeaderGroup.firstChild : null;
46524
46521
  if (headerColumn) {
46525
46522
  scene.cornerHeaderGroup.appendChild(headerColumn);
46526
46523
  scene.cornerHeaderGroup.setAttribute('width', scene.cornerHeaderGroup.attribute.width + headerColumn.attribute.width);
@@ -46528,7 +46525,7 @@
46528
46525
  }
46529
46526
  }
46530
46527
  function moveColumnFromRowHeaderToBody(scene) {
46531
- const column = scene.rowHeaderGroup.lastChild instanceof Group
46528
+ const column = scene.rowHeaderGroup.lastChild instanceof Group$1
46532
46529
  ? scene.rowHeaderGroup.lastChild
46533
46530
  : scene.rowHeaderGroup.lastChild?._prev;
46534
46531
  if (column) {
@@ -46538,7 +46535,7 @@
46538
46535
  }
46539
46536
  }
46540
46537
  function moveColumnFromCornerHeaderToColHeader(scene) {
46541
- const headerColumn = scene.cornerHeaderGroup.lastChild instanceof Group
46538
+ const headerColumn = scene.cornerHeaderGroup.lastChild instanceof Group$1
46542
46539
  ? scene.cornerHeaderGroup.lastChild
46543
46540
  : scene.cornerHeaderGroup.lastChild?._prev;
46544
46541
  if (headerColumn) {
@@ -46548,7 +46545,7 @@
46548
46545
  }
46549
46546
  }
46550
46547
  function moveColumnFromBottomToLeftBottomCorner(scene) {
46551
- const column = scene.bottomFrozenGroup.firstChild instanceof Group ? scene.bottomFrozenGroup.firstChild : null;
46548
+ const column = scene.bottomFrozenGroup.firstChild instanceof Group$1 ? scene.bottomFrozenGroup.firstChild : null;
46552
46549
  if (column) {
46553
46550
  scene.leftBottomCornerGroup.appendChild(column);
46554
46551
  scene.leftBottomCornerGroup.setAttribute('width', scene.leftBottomCornerGroup.attribute.width + column.attribute.width);
@@ -46556,7 +46553,7 @@
46556
46553
  }
46557
46554
  }
46558
46555
  function moveColumnFromLeftBottomCornerToBottom(scene) {
46559
- const column = scene.leftBottomCornerGroup.lastChild instanceof Group
46556
+ const column = scene.leftBottomCornerGroup.lastChild instanceof Group$1
46560
46557
  ? scene.leftBottomCornerGroup.lastChild
46561
46558
  : scene.leftBottomCornerGroup.lastChild?._prev;
46562
46559
  if (column) {
@@ -46893,7 +46890,7 @@
46893
46890
  function initSceneGraph(scene) {
46894
46891
  const width = scene.table.tableNoFrameWidth;
46895
46892
  const height = scene.table.tableNoFrameHeight;
46896
- scene.tableGroup = new Group({ x: 0, y: 0, width, height, clip: true, pickable: false });
46893
+ scene.tableGroup = new Group$1({ x: 0, y: 0, width, height, clip: true, pickable: false });
46897
46894
  scene.tableGroup.role = 'table';
46898
46895
  const colHeaderGroup = createContainerGroup(0, 0);
46899
46896
  colHeaderGroup.role = 'col-header';
@@ -46942,7 +46939,7 @@
46942
46939
  scene.tableGroup.addChild(componentGroup);
46943
46940
  }
46944
46941
  function createContainerGroup(width, height) {
46945
- return new Group({
46942
+ return new Group$1({
46946
46943
  x: 0,
46947
46944
  y: 0,
46948
46945
  width,
@@ -54096,7 +54093,7 @@
54096
54093
  return TABLE_EVENT_TYPE;
54097
54094
  }
54098
54095
  options;
54099
- version = "0.13.4-alpha.2";
54096
+ version = "0.13.4-alpha.3";
54100
54097
  pagination;
54101
54098
  id = `VTable${Date.now()}`;
54102
54099
  headerStyleCache;
@@ -56367,7 +56364,6 @@
56367
56364
  }
56368
56365
  function getChartAxes(col, row, layout) {
56369
56366
  const axes = [];
56370
- const table = layout._table;
56371
56367
  if (layout.indicatorsAsCol) {
56372
56368
  const indicatorKeys = layout.getIndicatorKeyInChartSpec(col, row);
56373
56369
  const colPath = layout.getColKeysPath(col, row);
@@ -56383,7 +56379,7 @@
56383
56379
  range.max = Math.max(range.max, 0);
56384
56380
  }
56385
56381
  if (axisOption?.nice) {
56386
- const { range: axisRange } = getAxisDomainRangeAndLabels(range.min, range.max, axisOption, isZeroAlign, table.getColWidth(col));
56382
+ const { range: axisRange } = getAxisDomainRangeAndLabels(range.min, range.max, axisOption, isZeroAlign);
56387
56383
  range.min = axisRange[0];
56388
56384
  range.max = axisRange[1];
56389
56385
  }
@@ -56444,7 +56440,7 @@
56444
56440
  range.max = Math.max(range.max, 0);
56445
56441
  }
56446
56442
  if (axisOption?.nice) {
56447
- const { range: axisRange } = getAxisDomainRangeAndLabels(range.min, range.max, axisOption, isZeroAlign, table.getRowHeight(row));
56443
+ const { range: axisRange } = getAxisDomainRangeAndLabels(range.min, range.max, axisOption, isZeroAlign);
56448
56444
  range.min = axisRange[0];
56449
56445
  range.max = axisRange[1];
56450
56446
  }
@@ -63121,569 +63117,180 @@
63121
63117
  }
63122
63118
  }
63123
63119
 
63124
- class BaseElement {
63125
- type;
63126
- id;
63127
- x = 0;
63128
- y = 0;
63129
- width = 0;
63130
- height = 0;
63131
- marginLeft;
63132
- marginRight;
63133
- marginTop;
63134
- marginBottom;
63135
- layoutWidth;
63136
- layoutHeight;
63137
- dx = 0;
63138
- dy = 0;
63139
- background;
63140
- constructor(options) {
63141
- this.id = options.id;
63142
- this.marginLeft = options.marginLeft ?? 0;
63143
- this.marginRight = options.marginRight ?? 0;
63144
- this.marginTop = options.marginTop ?? 0;
63145
- this.marginBottom = options.marginBottom ?? 0;
63146
- this.background = options.background || undefined;
63147
- }
63148
- getSize(table) {
63149
- this.initLayoutSize();
63150
- }
63151
- initLayoutSize() {
63152
- this.layoutWidth = this.width + this.marginLeft + this.marginRight;
63153
- this.layoutHeight = this.height + this.marginTop + this.marginBottom;
63154
- if (this.background) {
63155
- this.layoutWidth += (this.background.expandX || 0) * 2;
63156
- this.layoutHeight += (this.background.expandY || 0) * 2;
63157
- }
63158
- this.dx = this.marginLeft;
63159
- this.dy = this.marginTop;
63160
- }
63161
- }
63162
-
63163
- class Circle extends BaseElement {
63164
- type = 'circle';
63165
- radius;
63166
- radian;
63167
- lineWidth;
63168
- fill;
63169
- stroke;
63120
+ class Circle extends Circle$1 {
63170
63121
  constructor(options) {
63122
+ const isPaddingNumber = isArray$5(options.boundsPadding);
63123
+ const padding = [
63124
+ options.marginTop ?? (isPaddingNumber ? options.boundsPadding[0] : options.boundsPadding) ?? 0,
63125
+ options.marginRight ?? (isPaddingNumber ? options.boundsPadding[1] : options.boundsPadding) ?? 0,
63126
+ options.marginBottom ??
63127
+ (isPaddingNumber ? options.boundsPadding[2] ?? options.boundsPadding[0] : options.boundsPadding) ??
63128
+ 0,
63129
+ options.marginLeft ??
63130
+ (isPaddingNumber ? options.boundsPadding[3] ?? options.boundsPadding[1] : options.boundsPadding) ??
63131
+ 0
63132
+ ];
63133
+ options.boundsPadding = padding;
63171
63134
  super(options);
63172
- this.radius = options.radius;
63173
- this.radian = options.radian;
63174
- this.lineWidth = options.lineWidth;
63175
- this.fill = options.fill;
63176
- this.stroke = options.stroke;
63177
- this.width = this.radius * 2;
63178
- this.height = this.radius * 2;
63179
- this.initLayoutSize();
63180
- this.dx += this.radius;
63181
- this.dy += this.radius;
63182
63135
  }
63183
63136
  }
63184
63137
 
63185
- const DIRECTION_KEY = {
63186
- row: {
63187
- x: 'x',
63188
- y: 'y',
63189
- width: 'width',
63190
- height: 'height',
63191
- layoutWidth: 'layoutWidth',
63192
- layoutHeight: 'layoutHeight',
63193
- widthLimit: 'widthLimit',
63194
- heightLimit: 'heightLimit',
63195
- parentX: 'parentX',
63196
- parentY: 'parentY',
63197
- dx: 'dx',
63198
- dy: 'dy'
63199
- },
63200
- column: {
63201
- x: 'y',
63202
- y: 'x',
63203
- width: 'height',
63204
- height: 'width',
63205
- layoutWidth: 'layoutHeight',
63206
- layoutHeight: 'layoutWidth',
63207
- widthLimit: 'heightLimit',
63208
- heightLimit: 'widthLimit',
63209
- parentX: 'parentY',
63210
- parentY: 'parentX',
63211
- dx: 'dy',
63212
- dy: 'dx'
63213
- }
63214
- };
63215
-
63216
- class Line {
63217
- width = 0;
63218
- height = 0;
63219
- y = 0;
63220
- x = 0;
63221
- children = [];
63222
- addAble = true;
63223
- widthLimit = 0;
63224
- heightLimit = 0;
63225
- direction;
63226
- directionKey;
63227
- offsetX = 0;
63228
- justifyContent;
63229
- alignItems;
63230
- constructor(widthLimit, direction, justifyContent, alignItems) {
63231
- this.direction = direction;
63232
- this.directionKey = DIRECTION_KEY[this.direction];
63233
- this.justifyContent = justifyContent;
63234
- this.alignItems = alignItems;
63235
- this[this.directionKey.widthLimit] = widthLimit;
63236
- }
63237
- add(element) {
63238
- element[this.directionKey.x] = this[this.directionKey.width];
63239
- this[this.directionKey.width] += element[this.directionKey.layoutWidth];
63240
- this.children.push(element);
63241
- this.updateHeight(element);
63242
- }
63243
- canAdd(element) {
63244
- if (this[this.directionKey.width] + element[this.directionKey.layoutWidth] > this[this.directionKey.widthLimit]) {
63245
- return false;
63246
- }
63247
- return true;
63248
- }
63249
- updateHeight(element) {
63250
- if (element[this.directionKey.layoutHeight] > this[this.directionKey.height]) {
63251
- this[this.directionKey.height] = element[this.directionKey.layoutHeight];
63252
- }
63253
- }
63254
- lineFinish() {
63255
- this.updateXAlign();
63256
- }
63257
- updateXAlign() {
63258
- const offsetX = this[this.directionKey.widthLimit] - this[this.directionKey.width];
63259
- if (this.justifyContent === 'center') {
63260
- this.offsetX = offsetX / 2;
63261
- }
63262
- else if (this.justifyContent === 'start') {
63263
- this.offsetX = 0;
63264
- }
63265
- else {
63266
- this.offsetX = offsetX;
63267
- }
63268
- }
63269
- getOffsetY(element) {
63270
- switch (this.alignItems) {
63271
- case 'start':
63272
- return 0;
63273
- case 'center':
63274
- return (this[this.directionKey.height] - element[this.directionKey.layoutHeight]) / 2;
63275
- case 'end':
63276
- return this[this.directionKey.height] - element[this.directionKey.layoutHeight];
63277
- default:
63278
- return 0;
63279
- }
63280
- }
63281
- getContentSize() {
63282
- const result = {
63283
- width: 0,
63284
- height: 0
63285
- };
63286
- for (let i = 0; i < this.children.length; i++) {
63287
- const element = this.children[i];
63288
- let size;
63289
- if (element.type === 'container') {
63290
- size = element.getContentSize();
63291
- }
63292
- else {
63293
- size = {
63294
- width: element.layoutWidth,
63295
- height: element.layoutHeight
63296
- };
63297
- }
63298
- if (result[this.directionKey.height] < size[this.directionKey.height]) {
63299
- result[this.directionKey.height] = size[this.directionKey.height];
63300
- }
63301
- result[this.directionKey.width] += size[this.directionKey.width];
63302
- }
63303
- return result;
63304
- }
63305
- getElements(parentPos = { parentX: 0, parentY: 0 }, isHover = false, isSelect = false) {
63306
- const elements = [];
63307
- for (let i = 0; i < this.children.length; i++) {
63308
- const element = this.children[i];
63309
- if (element.type === 'container' || element.type === 'group-element') {
63310
- const childElements = element.getElements({
63311
- [this.directionKey.parentX]: this.offsetX + this[this.directionKey.x] + parentPos.parentX,
63312
- [this.directionKey.parentY]: this.getOffsetY(element) + this[this.directionKey.y] + parentPos.parentY
63313
- }, isHover, isSelect);
63314
- elements.push(...childElements);
63315
- }
63316
- else {
63317
- if (element.type === 'icon' &&
63318
- ((element.cache?.visibleTime === 'mouseenter_cell' && !isHover) ||
63319
- (element.cache?.visibleTime === 'click_cell' && !isSelect))) {
63320
- continue;
63321
- }
63322
- element[this.directionKey.x] += this.offsetX + this[this.directionKey.x] + parentPos.parentX;
63323
- element[this.directionKey.y] += this.getOffsetY(element) + this[this.directionKey.y] + parentPos.parentY;
63324
- elements.push(element);
63325
- }
63326
- }
63327
- return elements;
63138
+ class Container extends Group$2 {
63139
+ constructor(containerOptions) {
63140
+ if (containerOptions.direction) {
63141
+ containerOptions.flexDirection = containerOptions.direction;
63142
+ }
63143
+ if (containerOptions.justifyContent &&
63144
+ (containerOptions.justifyContent === 'start' || containerOptions.justifyContent === 'end')) {
63145
+ containerOptions.justifyContent = ('flex-' + containerOptions.justifyContent);
63146
+ }
63147
+ if (containerOptions.alignItems &&
63148
+ (containerOptions.alignItems === 'start' || containerOptions.alignItems === 'end')) {
63149
+ containerOptions.alignItems = ('flex-' + containerOptions.alignItems);
63150
+ }
63151
+ if (containerOptions.alignContent &&
63152
+ (containerOptions.alignContent === 'start' || containerOptions.alignContent === 'end')) {
63153
+ containerOptions.alignContent = ('flex-' + containerOptions.alignContent);
63154
+ }
63155
+ containerOptions.display = 'flex';
63156
+ if (!containerOptions.flexDirection) {
63157
+ containerOptions.flexDirection = 'row';
63158
+ }
63159
+ containerOptions.clip = true;
63160
+ containerOptions.fill = containerOptions?.background?.fill;
63161
+ containerOptions.stroke = containerOptions?.background?.stroke;
63162
+ containerOptions.lineWidth = containerOptions?.background?.lineWidth;
63163
+ containerOptions.cornerRadius = containerOptions?.background?.cornerRadius;
63164
+ const isPaddingNumber = isArray$5(containerOptions.boundsPadding);
63165
+ const padding = [
63166
+ containerOptions.marginTop ??
63167
+ (isPaddingNumber ? containerOptions.boundsPadding[0] : containerOptions.boundsPadding) ??
63168
+ 0,
63169
+ containerOptions.marginRight ??
63170
+ (isPaddingNumber ? containerOptions.boundsPadding[1] : containerOptions.boundsPadding) ??
63171
+ 0,
63172
+ containerOptions.marginBottom ??
63173
+ (isPaddingNumber
63174
+ ? containerOptions.boundsPadding[2] ?? containerOptions.boundsPadding[0]
63175
+ : containerOptions.boundsPadding) ??
63176
+ 0,
63177
+ containerOptions.marginLeft ??
63178
+ (isPaddingNumber
63179
+ ? containerOptions.boundsPadding[3] ?? containerOptions.boundsPadding[1]
63180
+ : containerOptions.boundsPadding) ??
63181
+ 0
63182
+ ];
63183
+ containerOptions.boundsPadding = padding;
63184
+ super(containerOptions);
63328
63185
  }
63329
63186
  }
63330
63187
 
63331
- class Rect extends BaseElement {
63332
- type = 'rect';
63333
- lineWidth;
63334
- cornerRadius;
63335
- radius;
63336
- fill;
63337
- stroke;
63338
- constructor(options) {
63339
- super(options);
63340
- this.width = options.width;
63341
- this.height = options.height;
63342
- this.lineWidth = options.lineWidth || 0;
63343
- this.cornerRadius = options.cornerRadius || 0;
63344
- this.radius = this.cornerRadius;
63345
- this.fill = options.fill || '#777';
63346
- this.stroke = options.stroke || undefined;
63347
- this.initLayoutSize();
63348
- }
63349
- }
63350
-
63351
- class Container extends BaseElement {
63352
- type = 'container';
63353
- _widthObj;
63354
- _heightObj;
63355
- needCalcSize = false;
63356
- direction;
63357
- justifyContent;
63358
- alignItems;
63359
- alignContent;
63360
- lines = [];
63361
- currentLine;
63362
- currentLineY = 0;
63363
- table;
63364
- directionKey;
63365
- showBounds;
63366
- offsetY = 0;
63367
- isRoot;
63368
- constructor(options) {
63369
- super(options);
63370
- this.direction = options.direction || 'row';
63371
- this.justifyContent = options.justifyContent || 'start';
63372
- this.alignItems = options.alignItems || 'start';
63373
- this.alignContent = options.alignContent || 'start';
63374
- if (isNumber$6(options.width)) {
63375
- this.width = options.width;
63376
- }
63377
- else {
63378
- this._widthObj = options.width;
63379
- this.needCalcSize = true;
63380
- }
63381
- if (isNumber$6(options.height)) {
63382
- this.height = options.height;
63383
- }
63384
- else {
63385
- this._heightObj = options.height;
63386
- this.needCalcSize = true;
63387
- }
63388
- this.directionKey = DIRECTION_KEY[this.direction];
63389
- this.showBounds = options.showBounds || false;
63390
- this.initLayoutSize();
63391
- }
63392
- add(element) {
63393
- if (this.needCalcSize) {
63394
- throw new Error('Need to specify a parent element before adding a child element when use percent size!');
63395
- }
63396
- if (element.type === 'container') {
63397
- element.calcSize(this.width, this.height);
63398
- }
63399
- if (this.currentLine && this.currentLine.canAdd(element)) {
63400
- this.currentLine.add(element);
63401
- }
63402
- else {
63403
- if (this.currentLine) {
63404
- this.currentLine.addAble = false;
63405
- this.currentLineY += this.currentLine[this.directionKey.height];
63406
- this.currentLine.lineFinish();
63407
- }
63408
- this.currentLine = new Line(this[this.directionKey.width], this.direction, this.justifyContent, this.alignItems);
63409
- this.currentLine[this.directionKey.y] = this.currentLineY;
63410
- this.currentLine.add(element);
63411
- this.lines.push(this.currentLine);
63412
- }
63413
- }
63414
- updateYAlign() {
63415
- const offsetY = this[this.directionKey.height] - this.currentLineY;
63416
- if (this.alignContent === 'center') {
63417
- this.offsetY = offsetY / 2;
63418
- }
63419
- else if (this.alignContent === 'start') {
63420
- this.offsetY = 0;
63421
- }
63422
- else {
63423
- this.offsetY = offsetY;
63424
- }
63425
- }
63426
- getSize() {
63427
- const result = {
63428
- width: 0,
63429
- height: 0
63430
- };
63431
- if (this.currentLine && this.currentLine.addAble) {
63432
- result[this.directionKey.height] = this.currentLineY + this.currentLine[this.directionKey.height];
63433
- }
63434
- else {
63435
- result[this.directionKey.height] = this.currentLineY;
63436
- }
63437
- for (let i = 0; i < this.lines.length; i++) {
63438
- const line = this.lines[i];
63439
- if (result[this.directionKey.width] < line[this.directionKey.width]) {
63440
- result[this.directionKey.width] = line[this.directionKey.width];
63441
- }
63442
- }
63443
- return result;
63444
- }
63445
- getContentSize() {
63446
- const result = {
63447
- width: 0,
63448
- height: 0
63449
- };
63450
- const calcFlag = {
63451
- width: true,
63452
- height: true
63453
- };
63454
- if (!this.isRoot && !this._heightObj) {
63455
- calcFlag.height = false;
63456
- result.height = this.height;
63457
- }
63458
- if (!this.isRoot && !this._widthObj) {
63459
- calcFlag.width = false;
63460
- result.width = this.width;
63461
- }
63462
- for (let i = 0; i < this.lines.length; i++) {
63463
- const line = this.lines[i];
63464
- const size = line.getContentSize();
63465
- if (calcFlag[this.directionKey.width] && result[this.directionKey.width] < size[this.directionKey.width]) {
63466
- result[this.directionKey.width] = size[this.directionKey.width];
63467
- }
63468
- if (calcFlag[this.directionKey.height]) {
63469
- result[this.directionKey.height] += size[this.directionKey.height];
63470
- }
63471
- }
63472
- return result;
63473
- }
63474
- calcSize(parentWidth, parentHeight) {
63475
- if (this._heightObj) {
63476
- this.height = (parentHeight * this._heightObj.percent) / 100 + this._heightObj.delta;
63477
- this.needCalcSize = false;
63478
- this.initLayoutSize();
63479
- }
63480
- if (this._widthObj) {
63481
- this.width = (parentWidth * this._widthObj.percent) / 100 + this._widthObj.delta;
63482
- this.needCalcSize = false;
63483
- this.initLayoutSize();
63484
- }
63485
- }
63486
- getElements(parentPos = { parentX: 0, parentY: 0 }, isHover = false, isSelect = false) {
63487
- if (this.currentLine && this.currentLine.addAble) {
63488
- this.currentLine.addAble = false;
63489
- this.currentLineY += this.currentLine[this.directionKey.height];
63490
- this.currentLine.lineFinish();
63491
- }
63492
- this.updateYAlign();
63493
- const elements = [];
63494
- if (this.background && this.background.fill) {
63495
- const backgroundRect = new Rect({
63496
- width: this.width,
63497
- height: this.height,
63498
- stroke: this.background.stroke ?? false,
63499
- fill: this.background.fill,
63500
- cornerRadius: this.background.cornerRadius ?? 0,
63501
- lineWidth: this.background.lineWidth ?? 1
63502
- });
63503
- backgroundRect.x += this.x + parentPos.parentX;
63504
- backgroundRect.y += this.y + parentPos.parentY;
63505
- elements.push(backgroundRect);
63506
- }
63507
- if (this.showBounds) {
63508
- const boundsRect = new Rect({
63509
- width: this.width,
63510
- height: this.height,
63511
- cornerRadius: 0,
63512
- stroke: 'red',
63513
- fill: 'rgba(255, 0, 0, 0.2)',
63514
- lineWidth: 4
63515
- });
63516
- boundsRect.x += this.x + parentPos.parentX;
63517
- boundsRect.y += this.y + parentPos.parentY;
63518
- elements.push(boundsRect);
63519
- }
63520
- for (let i = 0; i < this.lines.length; i++) {
63521
- const line = this.lines[i];
63522
- line[this.directionKey.y] += this.offsetY;
63523
- const linesElements = line.getElements({
63524
- [this.directionKey.parentX]: this.x + parentPos.parentX,
63525
- [this.directionKey.parentY]: this.y + parentPos.parentY
63526
- }, isHover, isSelect);
63527
- elements.push(...linesElements);
63528
- }
63529
- return elements;
63530
- }
63531
- }
63532
-
63533
- class GroupElement extends BaseElement {
63534
- type = 'group-element';
63535
- direction;
63536
- alignItems;
63537
- width = 0;
63538
- height = 0;
63539
- children = [];
63540
- directionKey;
63541
- constructor(options) {
63542
- super(options);
63543
- this.direction = options.direction || 'row';
63544
- this.alignItems = options.alignItems || 'start';
63545
- this.directionKey = DIRECTION_KEY[this.direction];
63546
- }
63547
- add(element) {
63548
- element.x = this.width;
63549
- this.width += element.layoutWidth;
63550
- this.children.push(element);
63551
- this.updateHeight(element);
63552
- this.initLayoutSize();
63553
- }
63554
- updateHeight(element) {
63555
- if (element.layoutHeight > this.height) {
63556
- this.height = element.layoutHeight;
63557
- }
63558
- }
63559
- getOffsetY(element) {
63560
- switch (this.alignItems) {
63561
- case 'start':
63562
- return 0;
63563
- case 'center':
63564
- return (this[this.directionKey.height] - element[this.directionKey.layoutHeight]) / 2;
63565
- case 'end':
63566
- return this[this.directionKey.height] - element[this.directionKey.layoutHeight];
63567
- default:
63568
- return 0;
63569
- }
63570
- }
63571
- getElements(parentPos = { parentX: 0, parentY: 0 }, isHover = false, isSelect = false) {
63572
- const elements = [];
63573
- for (let i = 0; i < this.children.length; i++) {
63574
- const element = this.children[i];
63575
- if (element.type === 'icon' &&
63576
- ((element.cache?.visibleTime === 'mouseenter_cell' && !isHover) ||
63577
- (element.cache?.visibleTime === 'click_cell' && !isSelect))) {
63578
- continue;
63579
- }
63580
- element[this.directionKey.x] += this[this.directionKey.dx] + this[this.directionKey.x] + parentPos.parentX;
63581
- element[this.directionKey.y] +=
63582
- this.getOffsetY(element) + this[this.directionKey.dy] + this[this.directionKey.y] + parentPos.parentY;
63583
- elements.push(element);
63584
- }
63585
- return elements;
63188
+ class GroupElement extends Container {
63189
+ constructor(option) {
63190
+ option.flexWrap = 'nowrap';
63191
+ super(option);
63586
63192
  }
63587
63193
  }
63588
63194
 
63589
- class Icon extends BaseElement {
63590
- type = 'icon';
63195
+ class Icon extends Image$3 {
63591
63196
  svg;
63592
63197
  iconName;
63593
- cursor;
63594
63198
  cache;
63595
63199
  constructor(options) {
63596
- super(options);
63597
- this.iconName = options.iconName;
63598
- if (isString$3(this.iconName)) {
63200
+ let cache;
63201
+ if (isString$3(options.iconName)) {
63599
63202
  const regedIcons = get$1();
63600
- const cache = regedIcons[this.iconName];
63203
+ cache = regedIcons[options.iconName];
63601
63204
  if (cache) {
63602
- this.cache = cache;
63603
- this.width = cache.width;
63604
- this.height = cache.height;
63605
- this.svg = cache.svg;
63606
- this.cursor = cache.cursor;
63607
- }
63608
- }
63609
- this.width = options.width ?? this.width;
63610
- this.height = options.height ?? this.height;
63611
- this.svg = options.svg ?? this.svg;
63612
- this.initLayoutSize();
63205
+ options.width = options.width ?? cache.width;
63206
+ options.height = options.height ?? cache.height;
63207
+ options.svg = cache.svg;
63208
+ options.cursor = cache.cursor;
63209
+ }
63210
+ }
63211
+ if (options.svg) {
63212
+ options.image = options.svg;
63213
+ }
63214
+ const isPaddingNumber = isArray$5(options.boundsPadding);
63215
+ const padding = [
63216
+ options.marginTop ?? (isPaddingNumber ? options.boundsPadding[0] : options.boundsPadding) ?? 0,
63217
+ options.marginRight ?? (isPaddingNumber ? options.boundsPadding[1] : options.boundsPadding) ?? 0,
63218
+ options.marginBottom ??
63219
+ (isPaddingNumber ? options.boundsPadding[2] ?? options.boundsPadding[0] : options.boundsPadding) ??
63220
+ 0,
63221
+ options.marginLeft ??
63222
+ (isPaddingNumber ? options.boundsPadding[3] ?? options.boundsPadding[1] : options.boundsPadding) ??
63223
+ 0
63224
+ ];
63225
+ options.boundsPadding = padding;
63226
+ super(options);
63227
+ this.cache = cache;
63613
63228
  }
63614
63229
  }
63615
63230
 
63616
- let Image$1 = class Image extends BaseElement {
63617
- type = 'image';
63618
- src;
63619
- cursor;
63620
- cache;
63621
- shape;
63231
+ let Image$1 = class Image extends Image$3 {
63232
+ constructor(options) {
63233
+ if (options.src) {
63234
+ options.image = options.src;
63235
+ }
63236
+ if (options.shape === 'circle') {
63237
+ options.cornerRadius = options.width / 2;
63238
+ }
63239
+ const isPaddingNumber = isArray$5(options.boundsPadding);
63240
+ const padding = [
63241
+ options.marginTop ?? (isPaddingNumber ? options.boundsPadding[0] : options.boundsPadding) ?? 0,
63242
+ options.marginRight ?? (isPaddingNumber ? options.boundsPadding[1] : options.boundsPadding) ?? 0,
63243
+ options.marginBottom ??
63244
+ (isPaddingNumber ? options.boundsPadding[2] ?? options.boundsPadding[0] : options.boundsPadding) ??
63245
+ 0,
63246
+ options.marginLeft ??
63247
+ (isPaddingNumber ? options.boundsPadding[3] ?? options.boundsPadding[1] : options.boundsPadding) ??
63248
+ 0
63249
+ ];
63250
+ options.boundsPadding = padding;
63251
+ super(options);
63252
+ }
63253
+ };
63254
+
63255
+ class Rect extends Rect$1 {
63622
63256
  constructor(options) {
63257
+ const isPaddingNumber = isArray$5(options.boundsPadding);
63258
+ const padding = [
63259
+ options.marginTop ?? (isPaddingNumber ? options.boundsPadding[0] : options.boundsPadding) ?? 0,
63260
+ options.marginRight ?? (isPaddingNumber ? options.boundsPadding[1] : options.boundsPadding) ?? 0,
63261
+ options.marginBottom ??
63262
+ (isPaddingNumber ? options.boundsPadding[2] ?? options.boundsPadding[0] : options.boundsPadding) ??
63263
+ 0,
63264
+ options.marginLeft ??
63265
+ (isPaddingNumber ? options.boundsPadding[3] ?? options.boundsPadding[1] : options.boundsPadding) ??
63266
+ 0
63267
+ ];
63268
+ options.boundsPadding = padding;
63623
63269
  super(options);
63624
- this.width = options.width ?? this.width;
63625
- this.height = options.height ?? this.height;
63626
- this.src = options.src ?? this.src;
63627
- this.shape = options.shape ?? this.shape;
63628
- this.initLayoutSize();
63629
- }
63630
- };
63631
-
63632
- class Text extends BaseElement {
63633
- type = 'text';
63634
- text;
63635
- fill;
63636
- color;
63637
- stroke;
63638
- lineWidth;
63639
- fontSize;
63640
- fontFamily;
63641
- fontWeight;
63642
- fontVariant;
63643
- fontStyle;
63644
- ellipsis;
63645
- maxLineWidth;
63646
- textAlign;
63647
- textBaseline;
63648
- lineHeight;
63649
- underline;
63650
- lineThrough;
63651
- heightLimit;
63652
- lineClamp;
63270
+ }
63271
+ }
63272
+
63273
+ class Text extends WrapText {
63653
63274
  constructor(options) {
63275
+ if (!options.textBaseline) {
63276
+ options.textBaseline = 'top';
63277
+ }
63278
+ const isPaddingNumber = isArray$5(options.boundsPadding);
63279
+ const padding = [
63280
+ options.marginTop ?? (isPaddingNumber ? options.boundsPadding[0] : options.boundsPadding) ?? 0,
63281
+ options.marginRight ?? (isPaddingNumber ? options.boundsPadding[1] : options.boundsPadding) ?? 0,
63282
+ options.marginBottom ??
63283
+ (isPaddingNumber ? options.boundsPadding[2] ?? options.boundsPadding[0] : options.boundsPadding) ??
63284
+ 0,
63285
+ options.marginLeft ??
63286
+ (isPaddingNumber ? options.boundsPadding[3] ?? options.boundsPadding[1] : options.boundsPadding) ??
63287
+ 0
63288
+ ];
63289
+ options.boundsPadding = padding;
63654
63290
  super(options);
63655
- this.text = options.text;
63656
- this.fontSize = options.fontSize || 12;
63657
- this.fontFamily = options.fontFamily || 'Arial,sans-serif';
63658
- this.fill = options.color || options.fill || 'black';
63659
- this.textBaseline = options.textBaseline || 'top';
63660
- this.textAlign = options.textAlign || 'left';
63661
- options.stroke && (this.stroke = options.stroke);
63662
- options.lineWidth && (this.lineWidth = options.lineWidth);
63663
- options.fontWeight && (this.fontWeight = options.fontWeight);
63664
- options.fontVariant && (this.fontVariant = options.fontVariant);
63665
- options.fontStyle && (this.fontStyle = options.fontStyle);
63666
- options.ellipsis && (this.ellipsis = options.ellipsis);
63667
- options.maxLineWidth && (this.maxLineWidth = options.maxLineWidth);
63668
- options.lineHeight && (this.lineHeight = options.lineHeight);
63669
- options.underline && (this.underline = options.underline);
63670
- options.lineThrough && (this.lineThrough = options.lineThrough);
63671
- options.heightLimit && (this.heightLimit = options.heightLimit);
63672
- options.lineClamp && (this.lineClamp = options.lineClamp);
63673
63291
  }
63674
63292
  getSize(table) {
63675
- const { width, height } = table.measureText(this.text, {
63676
- fontSize: this.fontSize,
63677
- fontWeight: this.fontWeight,
63678
- fontFamily: this.fontFamily
63679
- });
63680
- this.width = width;
63681
- this.height = height;
63682
- this.initLayoutSize();
63683
- if (this.background) {
63684
- this.dx += this.background.expandX || 0;
63685
- this.dy += this.background.expandY || 0;
63686
- }
63293
+ this.AABBBounds.width();
63687
63294
  }
63688
63295
  }
63689
63296
 
@@ -63694,41 +63301,74 @@
63694
63301
  };
63695
63302
  }
63696
63303
 
63697
- class Sector extends BaseElement {
63698
- type = 'arc';
63699
- radius;
63700
- startDegree = 0;
63701
- endDegree = 360;
63702
- clockWise = true;
63703
- lineWidth;
63704
- fill;
63705
- stroke;
63304
+ class Arc extends Arc$1 {
63305
+ constructor(options) {
63306
+ const isPaddingNumber = isArray$5(options.boundsPadding);
63307
+ const padding = [
63308
+ options.marginTop ?? (isPaddingNumber ? options.boundsPadding[0] : options.boundsPadding) ?? 0,
63309
+ options.marginRight ?? (isPaddingNumber ? options.boundsPadding[1] : options.boundsPadding) ?? 0,
63310
+ options.marginBottom ??
63311
+ (isPaddingNumber ? options.boundsPadding[2] ?? options.boundsPadding[0] : options.boundsPadding) ??
63312
+ 0,
63313
+ options.marginLeft ??
63314
+ (isPaddingNumber ? options.boundsPadding[3] ?? options.boundsPadding[1] : options.boundsPadding) ??
63315
+ 0
63316
+ ];
63317
+ options.boundsPadding = padding;
63318
+ super(options);
63319
+ }
63320
+ }
63321
+
63322
+ class Tag extends Tag$1 {
63323
+ constructor(options) {
63324
+ const isPaddingNumber = isArray$5(options.boundsPadding);
63325
+ const padding = [
63326
+ options.marginTop ?? (isPaddingNumber ? options.boundsPadding[0] : options.boundsPadding) ?? 0,
63327
+ options.marginRight ?? (isPaddingNumber ? options.boundsPadding[1] : options.boundsPadding) ?? 0,
63328
+ options.marginBottom ??
63329
+ (isPaddingNumber ? options.boundsPadding[2] ?? options.boundsPadding[0] : options.boundsPadding) ??
63330
+ 0,
63331
+ options.marginLeft ??
63332
+ (isPaddingNumber ? options.boundsPadding[3] ?? options.boundsPadding[1] : options.boundsPadding) ??
63333
+ 0
63334
+ ];
63335
+ options.boundsPadding = padding;
63336
+ super(options);
63337
+ }
63338
+ getSize(table) {
63339
+ this.AABBBounds.width();
63340
+ }
63341
+ }
63342
+
63343
+ class Group extends Group$2 {
63706
63344
  constructor(options) {
63345
+ const isPaddingNumber = isArray$5(options.boundsPadding);
63346
+ const padding = [
63347
+ options.marginTop ?? (isPaddingNumber ? options.boundsPadding[0] : options.boundsPadding) ?? 0,
63348
+ options.marginRight ?? (isPaddingNumber ? options.boundsPadding[1] : options.boundsPadding) ?? 0,
63349
+ options.marginBottom ??
63350
+ (isPaddingNumber ? options.boundsPadding[2] ?? options.boundsPadding[0] : options.boundsPadding) ??
63351
+ 0,
63352
+ options.marginLeft ??
63353
+ (isPaddingNumber ? options.boundsPadding[3] ?? options.boundsPadding[1] : options.boundsPadding) ??
63354
+ 0
63355
+ ];
63356
+ options.boundsPadding = padding;
63707
63357
  super(options);
63708
- this.radius = options.radius;
63709
- this.startDegree = options.startDegree;
63710
- this.endDegree = options.endDegree;
63711
- this.clockWise = options.clockWise;
63712
- this.lineWidth = options.lineWidth;
63713
- this.fill = options.fill;
63714
- this.stroke = options.stroke;
63715
- this.width = this.radius * 2;
63716
- this.height = this.radius * 2;
63717
- this.initLayoutSize();
63718
- this.dx += this.radius;
63719
- this.dy += this.radius;
63720
63358
  }
63721
63359
  }
63722
63360
 
63723
63361
  var index = /*#__PURE__*/Object.freeze({
63724
63362
  __proto__: null,
63363
+ Arc: Arc,
63725
63364
  Circle: Circle,
63726
63365
  Container: Container,
63366
+ Group: Group,
63727
63367
  GroupElement: GroupElement,
63728
63368
  Icon: Icon,
63729
63369
  Image: Image$1,
63730
63370
  Rect: Rect,
63731
- Sector: Sector,
63371
+ Tag: Tag,
63732
63372
  Text: Text,
63733
63373
  percentCalc: percentCalc
63734
63374
  });
@@ -63979,10 +63619,10 @@
63979
63619
  }
63980
63620
 
63981
63621
  function VTag(params) {
63982
- return new Tag(params ? params.attribute : {});
63622
+ return new Tag$1(params ? params.attribute : {});
63983
63623
  }
63984
63624
 
63985
- const version = "0.13.4-alpha.2";
63625
+ const version = "0.13.4-alpha.3";
63986
63626
  function getIcons() {
63987
63627
  return get$1();
63988
63628
  }