@visactor/vtable 0.13.4-alpha.3 → 0.13.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/PivotChart.d.ts +3 -0
- package/cjs/PivotChart.js +44 -40
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/components/menu/dom/logic/MenuElementStyle.js +1 -1
- package/cjs/components/menu/dom/logic/MenuElementStyle.js.map +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js +1 -1
- package/cjs/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +14 -0
- package/cjs/core/BaseTable.js +28 -3
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/style.js +1 -1
- package/cjs/core/style.js.map +1 -1
- package/cjs/event/event.d.ts +1 -1
- package/cjs/event/event.js +5 -4
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/table-group.js +9 -6
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/listener/touch.js +1 -1
- package/cjs/event/listener/touch.js.map +1 -1
- package/cjs/event/scroll.js +1 -1
- package/cjs/event/scroll.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/render/layout/arc.d.ts +21 -10
- package/cjs/render/layout/arc.js +9 -7
- package/cjs/render/layout/arc.js.map +1 -1
- package/cjs/render/layout/circle.d.ts +17 -10
- package/cjs/render/layout/circle.js +6 -5
- package/cjs/render/layout/circle.js.map +1 -1
- package/cjs/render/layout/container.d.ts +48 -10
- package/cjs/render/layout/container.js +100 -15
- package/cjs/render/layout/container.js.map +1 -1
- package/cjs/render/layout/group-element.d.ts +24 -4
- package/cjs/render/layout/group-element.js +40 -4
- package/cjs/render/layout/group-element.js.map +1 -1
- package/cjs/render/layout/icon.d.ts +10 -10
- package/cjs/render/layout/icon.js +9 -11
- package/cjs/render/layout/icon.js.map +1 -1
- package/cjs/render/layout/image.d.ts +17 -10
- package/cjs/render/layout/image.js +7 -6
- package/cjs/render/layout/image.js.map +1 -1
- package/cjs/render/layout/index.d.ts +0 -2
- package/cjs/render/layout/index.js +1 -2
- package/cjs/render/layout/index.js.map +1 -1
- package/cjs/render/layout/percent-calc.d.ts +4 -1
- package/cjs/render/layout/percent-calc.js.map +1 -1
- package/cjs/render/layout/rect.d.ts +20 -10
- package/cjs/render/layout/rect.js +6 -5
- package/cjs/render/layout/rect.js.map +1 -1
- package/cjs/render/layout/text.d.ts +46 -9
- package/cjs/render/layout/text.js +18 -7
- package/cjs/render/layout/text.js.map +1 -1
- package/cjs/scenegraph/component/custom.d.ts +2 -2
- package/cjs/scenegraph/component/custom.js +6 -14
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/group-creater/init-scenegraph.js +3 -3
- package/cjs/scenegraph/group-creater/init-scenegraph.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +8 -5
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +5 -4
- package/cjs/scenegraph/scenegraph.js +4 -2
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/select/create-select-border.d.ts +2 -2
- package/cjs/scenegraph/select/create-select-border.js +6 -15
- package/cjs/scenegraph/select/create-select-border.js.map +1 -1
- package/cjs/scenegraph/select/delete-select-border.js.map +1 -1
- package/cjs/scenegraph/select/update-select-border.js +84 -31
- package/cjs/scenegraph/select/update-select-border.js.map +1 -1
- package/cjs/tools/LimitPromiseQueue.js +1 -1
- package/cjs/tools/NumberMap.js +1 -1
- package/cjs/tools/Rect.js +1 -1
- package/cjs/ts-types/base-table.d.ts +16 -0
- package/cjs/ts-types/base-table.js +1 -1
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/common.js +1 -1
- package/cjs/ts-types/customElement.js +1 -1
- package/cjs/ts-types/table-engine.d.ts +2 -1
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/dist/vtable.js +1000 -446
- package/dist/vtable.min.js +2 -2
- package/es/PivotChart.d.ts +3 -0
- package/es/PivotChart.js +44 -40
- package/es/PivotChart.js.map +1 -1
- package/es/components/menu/dom/logic/MenuElementStyle.js +1 -1
- package/es/components/menu/dom/logic/MenuElementStyle.js.map +1 -1
- package/es/components/tooltip/logic/BubbleTooltipElementStyle.js +1 -1
- package/es/components/tooltip/logic/BubbleTooltipElementStyle.js.map +1 -1
- package/es/core/BaseTable.d.ts +14 -0
- package/es/core/BaseTable.js +36 -12
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/style.js +1 -1
- package/es/core/style.js.map +1 -1
- package/es/event/event.d.ts +1 -1
- package/es/event/event.js +5 -4
- package/es/event/event.js.map +1 -1
- package/es/event/listener/table-group.js +9 -6
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/listener/touch.js +1 -1
- package/es/event/listener/touch.js.map +1 -1
- package/es/event/scroll.js +1 -1
- package/es/event/scroll.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/render/layout/arc.d.ts +21 -10
- package/es/render/layout/arc.js +7 -7
- package/es/render/layout/arc.js.map +1 -1
- package/es/render/layout/circle.d.ts +17 -10
- package/es/render/layout/circle.js +6 -7
- package/es/render/layout/circle.js.map +1 -1
- package/es/render/layout/container.d.ts +48 -10
- package/es/render/layout/container.js +107 -16
- package/es/render/layout/container.js.map +1 -1
- package/es/render/layout/group-element.d.ts +24 -4
- package/es/render/layout/group-element.js +42 -4
- package/es/render/layout/group-element.js.map +1 -1
- package/es/render/layout/icon.d.ts +10 -10
- package/es/render/layout/icon.js +10 -12
- package/es/render/layout/icon.js.map +1 -1
- package/es/render/layout/image.d.ts +17 -10
- package/es/render/layout/image.js +7 -8
- package/es/render/layout/image.js.map +1 -1
- package/es/render/layout/index.d.ts +0 -2
- package/es/render/layout/index.js +0 -4
- package/es/render/layout/index.js.map +1 -1
- package/es/render/layout/percent-calc.d.ts +4 -1
- package/es/render/layout/percent-calc.js.map +1 -1
- package/es/render/layout/rect.d.ts +20 -10
- package/es/render/layout/rect.js +6 -7
- package/es/render/layout/rect.js.map +1 -1
- package/es/render/layout/text.d.ts +46 -9
- package/es/render/layout/text.js +18 -9
- package/es/render/layout/text.js.map +1 -1
- package/es/scenegraph/component/custom.d.ts +2 -2
- package/es/scenegraph/component/custom.js +7 -15
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/group-creater/init-scenegraph.js +3 -3
- package/es/scenegraph/group-creater/init-scenegraph.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +8 -5
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +5 -4
- package/es/scenegraph/scenegraph.js +3 -2
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/select/create-select-border.d.ts +2 -2
- package/es/scenegraph/select/create-select-border.js +6 -15
- package/es/scenegraph/select/create-select-border.js.map +1 -1
- package/es/scenegraph/select/delete-select-border.js.map +1 -1
- package/es/scenegraph/select/update-select-border.js +84 -31
- package/es/scenegraph/select/update-select-border.js.map +1 -1
- package/es/tools/LimitPromiseQueue.js +1 -1
- package/es/tools/NumberMap.js +1 -1
- package/es/tools/Rect.js +1 -1
- package/es/ts-types/base-table.d.ts +16 -0
- package/es/ts-types/base-table.js +1 -1
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/common.js +1 -1
- package/es/ts-types/customElement.js +1 -1
- package/es/ts-types/table-engine.d.ts +2 -1
- package/es/ts-types/table-engine.js.map +1 -1
- package/package.json +4 -4
- package/cjs/render/layout/group.d.ts +0 -12
- package/cjs/render/layout/group.js +0 -18
- package/cjs/render/layout/group.js.map +0 -1
- package/cjs/render/layout/tag.d.ts +0 -14
- package/cjs/render/layout/tag.js +0 -21
- package/cjs/render/layout/tag.js.map +0 -1
- package/es/render/layout/group.d.ts +0 -12
- package/es/render/layout/group.js +0 -12
- package/es/render/layout/group.js.map +0 -1
- package/es/render/layout/tag.d.ts +0 -14
- package/es/render/layout/tag.js +0 -15
- package/es/render/layout/tag.js.map +0 -1
package/dist/vtable.js
CHANGED
|
@@ -2747,7 +2747,7 @@
|
|
|
2747
2747
|
max-height: none;
|
|
2748
2748
|
}
|
|
2749
2749
|
`;
|
|
2750
|
-
document.
|
|
2750
|
+
document.head.appendChild(styleElement);
|
|
2751
2751
|
}
|
|
2752
2752
|
|
|
2753
2753
|
function getScrollBarSize(scrollStyle) {
|
|
@@ -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$
|
|
7870
|
+
const DIRECTION_KEY$2 = {
|
|
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$
|
|
11621
|
+
let Group$1 = 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$
|
|
11771
|
+
Group$1.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR$1;
|
|
11772
11772
|
|
|
11773
|
-
class Layer extends Group$
|
|
11773
|
+
class Layer extends Group$1 {
|
|
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$
|
|
13593
|
+
let Line$3 = 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$
|
|
13657
|
+
Line$3.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$
|
|
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();
|
|
13879
13879
|
}
|
|
13880
13880
|
draw(ctx, drawIcon) {
|
|
13881
13881
|
const {
|
|
@@ -14220,9 +14220,9 @@
|
|
|
14220
14220
|
}
|
|
14221
14221
|
};
|
|
14222
14222
|
|
|
14223
|
-
let Line$
|
|
14223
|
+
let Line$2 = 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$
|
|
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;
|
|
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$
|
|
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];
|
|
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$
|
|
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);
|
|
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
|
-
|
|
14684
|
+
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
|
|
14837
|
+
}
|
|
14838
|
+
Arc.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 {
|
|
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$
|
|
15720
|
+
class ShadowRoot extends Group$1 {
|
|
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
|
|
15753
|
+
return new Arc(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$
|
|
15762
|
+
return new Group$1(attributes);
|
|
15763
15763
|
}
|
|
15764
15764
|
function createLine(attributes) {
|
|
15765
|
-
return new Line$
|
|
15765
|
+
return new Line$3(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$
|
|
20603
|
+
class Stage extends Group$1 {
|
|
20604
20604
|
set viewBox(b) {
|
|
20605
20605
|
this._viewBox.setValue(b.x1, b.y1, b.x2, b.y2);
|
|
20606
20606
|
}
|
|
@@ -22428,7 +22428,7 @@
|
|
|
22428
22428
|
return 0;
|
|
22429
22429
|
}
|
|
22430
22430
|
getStaticCanvasCount() {
|
|
22431
|
-
return
|
|
22431
|
+
return 999;
|
|
22432
22432
|
}
|
|
22433
22433
|
loadJson(url) {
|
|
22434
22434
|
const jsonPromise = fetch(url).then(data => data.json());
|
|
@@ -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$
|
|
25706
|
+
class AbstractComponent extends Group$1 {
|
|
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
|
-
|
|
26053
|
+
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
|
|
26141
|
+
}
|
|
26142
|
+
Tag.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
|
|
26975
|
+
axisTitle = new Tag(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
|
|
27893
|
+
const titleTag = new Tag(tagAttrs);
|
|
27894
27894
|
titleTag.name = LEGEND_ELEMENT_NAME.title, this._title = titleTag, this._innerView.add(titleTag);
|
|
27895
27895
|
}
|
|
27896
27896
|
_adjustLayout() {
|
|
@@ -30587,7 +30587,7 @@
|
|
|
30587
30587
|
subtextWidth = this._subTitle ? null === (_1 = this._subTitle) || void 0 === _1 ? void 0 : _1.AABBBounds.width() : 0;
|
|
30588
30588
|
let titleWidth = Math.max(maintextWidth, subtextWidth),
|
|
30589
30589
|
titleHeight = maintextHeight + (null !== (_2 = null == subtextStyle ? void 0 : subtextStyle.height) && void 0 !== _2 ? _2 : subtextHeight);
|
|
30590
|
-
if (isValid$6(width) && (titleWidth = width, null === (_3 = this._mainTitle) || void 0 === _3 || _3.setAttribute("maxLineWidth", width), null === (_4 = this._subTitle) || void 0 === _4 || _4.setAttribute("maxLineWidth", width)), isValid$6(height) && (titleHeight = height), isValid$6(minWidth) && titleWidth < minWidth && (titleWidth = minWidth), isValid$6(maxWidth) && (null === (_5 = this._mainTitle) || void 0 === _5 || _5.setAttribute("maxLineWidth", maxWidth), null === (_6 = this._subTitle) || void 0 === _6 || _6.setAttribute("maxLineWidth", maxWidth), null === (_7 = this._mainTitle) || void 0 === _7 || _7.setAttribute("maxWidth", maxWidth), null === (_8 = this._subTitle) || void 0 === _8 || _8.setAttribute("maxWidth", maxWidth), titleWidth > maxWidth && (titleWidth = maxWidth)), isValid$6(minHeight) && titleHeight < minHeight && (titleHeight = minHeight), isValid$6(maxHeight) && (null === (_9 = this._mainTitle) || void 0 === _9 || _9.setAttribute("maxHeight", maxHeight), null === (_10 = this._subTitle) || void 0 === _10 || _10.setAttribute("maxHeight", maxHeight - maintextHeight), titleHeight > maxHeight && (titleHeight = maxHeight)), group.attribute.width = titleWidth
|
|
30590
|
+
if (isValid$6(width) && (titleWidth = width, null === (_3 = this._mainTitle) || void 0 === _3 || _3.setAttribute("maxLineWidth", width), null === (_4 = this._subTitle) || void 0 === _4 || _4.setAttribute("maxLineWidth", width)), isValid$6(height) && (titleHeight = height), isValid$6(minWidth) && titleWidth < minWidth && (titleWidth = minWidth), isValid$6(maxWidth) && (null === (_5 = this._mainTitle) || void 0 === _5 || _5.setAttribute("maxLineWidth", maxWidth), null === (_6 = this._subTitle) || void 0 === _6 || _6.setAttribute("maxLineWidth", maxWidth), null === (_7 = this._mainTitle) || void 0 === _7 || _7.setAttribute("maxWidth", maxWidth), null === (_8 = this._subTitle) || void 0 === _8 || _8.setAttribute("maxWidth", maxWidth), titleWidth > maxWidth && (titleWidth = maxWidth)), isValid$6(minHeight) && titleHeight < minHeight && (titleHeight = minHeight), isValid$6(maxHeight) && (null === (_9 = this._mainTitle) || void 0 === _9 || _9.setAttribute("maxHeight", maxHeight), null === (_10 = this._subTitle) || void 0 === _10 || _10.setAttribute("maxHeight", maxHeight - maintextHeight), titleHeight > maxHeight && (titleHeight = maxHeight)), group.attribute.width = titleWidth, group.attribute.height = titleHeight, group.attribute.boundsPadding = parsedPadding, isValid$6(align) || isValid$6(null == textStyle ? void 0 : textStyle.align)) {
|
|
30591
30591
|
const mainTitleAlign = (null == textStyle ? void 0 : textStyle.align) ? null == textStyle ? void 0 : textStyle.align : align,
|
|
30592
30592
|
mainTitleWidth = null !== (_11 = null == textStyle ? void 0 : textStyle.width) && void 0 !== _11 ? _11 : maintextWidth;
|
|
30593
30593
|
"left" === mainTitleAlign ? (null === (_12 = this._mainTitle) || void 0 === _12 || _12.setAttribute("x", 0), null === (_13 = this._mainTitle) || void 0 === _13 || _13.setAttribute("textAlign", "left")) : "center" === mainTitleAlign ? (null === (_14 = this._mainTitle) || void 0 === _14 || _14.setAttribute("x", mainTitleWidth / 2), null === (_15 = this._mainTitle) || void 0 === _15 || _15.setAttribute("textAlign", "center")) : "right" === mainTitleAlign && (null === (_16 = this._mainTitle) || void 0 === _16 || _16.setAttribute("x", mainTitleWidth), null === (_17 = this._mainTitle) || void 0 === _17 || _17.setAttribute("textAlign", "right"));
|
|
@@ -32750,7 +32750,7 @@
|
|
|
32750
32750
|
class Application {}
|
|
32751
32751
|
const application = new Application();
|
|
32752
32752
|
|
|
32753
|
-
const DIRECTION_KEY = {
|
|
32753
|
+
const DIRECTION_KEY$1 = {
|
|
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[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$1[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
|
-
class Line {
|
|
35621
|
+
let Line$1 = 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[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$1[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[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$1[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(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$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);
|
|
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
|
-
|
|
38074
|
+
class Group extends Group$1 {
|
|
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,10 +38309,13 @@
|
|
|
38309
38309
|
if (customRenderObj.rootContainer) {
|
|
38310
38310
|
customRenderObj.rootContainer = decodeReactDom(customRenderObj.rootContainer);
|
|
38311
38311
|
}
|
|
38312
|
-
if (customRenderObj.rootContainer instanceof Group$
|
|
38312
|
+
if (customRenderObj.rootContainer instanceof Group$1) {
|
|
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
|
+
}
|
|
38316
38319
|
renderDefault = customRenderObj.renderDefault;
|
|
38317
38320
|
}
|
|
38318
38321
|
else if (typeof customRender === 'function') {
|
|
@@ -38349,14 +38352,13 @@
|
|
|
38349
38352
|
const value = table.getCellValue(col, row);
|
|
38350
38353
|
elementsGroup = adjustElementToGroup(customElements, autoWidth ? expectedWidth : width, autoHeight ? expectedHeight : height, value);
|
|
38351
38354
|
}
|
|
38352
|
-
dealPercentCalc(elementsGroup);
|
|
38353
38355
|
return {
|
|
38354
38356
|
elementsGroup,
|
|
38355
38357
|
renderDefault
|
|
38356
38358
|
};
|
|
38357
38359
|
}
|
|
38358
38360
|
function adjustElementToGroup(elements, width, height, value) {
|
|
38359
|
-
const customGroup = new Group
|
|
38361
|
+
const customGroup = new Group({
|
|
38360
38362
|
x: 0,
|
|
38361
38363
|
y: 0,
|
|
38362
38364
|
width,
|
|
@@ -38505,8 +38507,6 @@
|
|
|
38505
38507
|
rect.x = isString$3(rect.x)
|
|
38506
38508
|
? transformString(rect.x, width - borderLineWidths[1])
|
|
38507
38509
|
: 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,24 +38557,6 @@
|
|
|
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
|
-
}
|
|
38578
38560
|
function decodeReactDom(dom) {
|
|
38579
38561
|
if (!dom.$$typeof) {
|
|
38580
38562
|
return dom;
|
|
@@ -38955,7 +38937,7 @@
|
|
|
38955
38937
|
if (cellTheme?.text?.textBaseline) {
|
|
38956
38938
|
textBaseline = cellTheme?.text?.textBaseline;
|
|
38957
38939
|
}
|
|
38958
|
-
const cellGroup = new Group
|
|
38940
|
+
const cellGroup = new Group({
|
|
38959
38941
|
x: xOrigin,
|
|
38960
38942
|
y: yOrigin,
|
|
38961
38943
|
width,
|
|
@@ -39096,7 +39078,7 @@
|
|
|
39096
39078
|
const height = table.getRowHeight(row);
|
|
39097
39079
|
let contentWidth = width;
|
|
39098
39080
|
let contentHeight = height;
|
|
39099
|
-
const percentCompleteBarGroup = new Group
|
|
39081
|
+
const percentCompleteBarGroup = new Group({
|
|
39100
39082
|
x: 0,
|
|
39101
39083
|
y: 0,
|
|
39102
39084
|
width: contentWidth,
|
|
@@ -39526,7 +39508,7 @@
|
|
|
39526
39508
|
const yScale = new LinearScale();
|
|
39527
39509
|
function createSparkLineCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, width, height, padding, table, cellTheme) {
|
|
39528
39510
|
if (!cellGroup) {
|
|
39529
|
-
cellGroup = new Group
|
|
39511
|
+
cellGroup = new Group({
|
|
39530
39512
|
x: xOrigin,
|
|
39531
39513
|
y: yOrigin,
|
|
39532
39514
|
width,
|
|
@@ -39699,7 +39681,7 @@
|
|
|
39699
39681
|
else {
|
|
39700
39682
|
specObj = spec;
|
|
39701
39683
|
}
|
|
39702
|
-
const group = new Group
|
|
39684
|
+
const group = new Group({
|
|
39703
39685
|
x,
|
|
39704
39686
|
y,
|
|
39705
39687
|
width,
|
|
@@ -39724,7 +39706,7 @@
|
|
|
39724
39706
|
interpolate: 'linear'
|
|
39725
39707
|
};
|
|
39726
39708
|
}
|
|
39727
|
-
const symbolGroup = new Group
|
|
39709
|
+
const symbolGroup = new Group({
|
|
39728
39710
|
x: 0,
|
|
39729
39711
|
y: 0,
|
|
39730
39712
|
width,
|
|
@@ -39748,7 +39730,7 @@
|
|
|
39748
39730
|
return group;
|
|
39749
39731
|
}
|
|
39750
39732
|
|
|
39751
|
-
class CellContent extends Group
|
|
39733
|
+
class CellContent extends Group {
|
|
39752
39734
|
_leftGroup;
|
|
39753
39735
|
_rightGroup;
|
|
39754
39736
|
_centerGroup;
|
|
@@ -39760,19 +39742,19 @@
|
|
|
39760
39742
|
_baseline;
|
|
39761
39743
|
constructor(params) {
|
|
39762
39744
|
super(params);
|
|
39763
|
-
this._leftGroup = new Group
|
|
39745
|
+
this._leftGroup = new Group({
|
|
39764
39746
|
pickable: false,
|
|
39765
39747
|
fill: false,
|
|
39766
39748
|
stroke: false
|
|
39767
39749
|
});
|
|
39768
39750
|
this._leftGroup.role = 'content-left';
|
|
39769
|
-
this._rightGroup = new Group
|
|
39751
|
+
this._rightGroup = new Group({
|
|
39770
39752
|
pickable: false,
|
|
39771
39753
|
fill: false,
|
|
39772
39754
|
stroke: false
|
|
39773
39755
|
});
|
|
39774
39756
|
this._rightGroup.role = 'content-right';
|
|
39775
|
-
this._centerGroup = new Group
|
|
39757
|
+
this._centerGroup = new Group({
|
|
39776
39758
|
pickable: false,
|
|
39777
39759
|
fill: false,
|
|
39778
39760
|
stroke: false
|
|
@@ -41292,7 +41274,7 @@
|
|
|
41292
41274
|
if (customLayoutObj.rootContainer) {
|
|
41293
41275
|
customLayoutObj.rootContainer = decodeReactDom(customLayoutObj.rootContainer);
|
|
41294
41276
|
}
|
|
41295
|
-
if (customLayoutObj.rootContainer instanceof Group$
|
|
41277
|
+
if (customLayoutObj.rootContainer instanceof Group$1) {
|
|
41296
41278
|
height = customLayoutObj.rootContainer.AABBBounds.height() ?? 0;
|
|
41297
41279
|
}
|
|
41298
41280
|
else if (customLayoutObj.rootContainer) {
|
|
@@ -41828,7 +41810,7 @@
|
|
|
41828
41810
|
_menuInfo;
|
|
41829
41811
|
constructor(table) {
|
|
41830
41812
|
this._table = table;
|
|
41831
|
-
this._menuInstance = new Group
|
|
41813
|
+
this._menuInstance = new Group({
|
|
41832
41814
|
x: 0,
|
|
41833
41815
|
y: 0,
|
|
41834
41816
|
fill: menuStyle.bgColor,
|
|
@@ -41918,7 +41900,7 @@
|
|
|
41918
41900
|
icon = item.icon;
|
|
41919
41901
|
}
|
|
41920
41902
|
}
|
|
41921
|
-
const group = new Group
|
|
41903
|
+
const group = new Group({
|
|
41922
41904
|
y,
|
|
41923
41905
|
x,
|
|
41924
41906
|
height: menuStyle.lineHeight,
|
|
@@ -42792,7 +42774,7 @@
|
|
|
42792
42774
|
}
|
|
42793
42775
|
|
|
42794
42776
|
const CHART_NUMBER_TYPE = genNumberType$1();
|
|
42795
|
-
class Chart extends Group$
|
|
42777
|
+
class Chart extends Group$1 {
|
|
42796
42778
|
type = 'chart';
|
|
42797
42779
|
chartInstance;
|
|
42798
42780
|
activeChartInstance;
|
|
@@ -43919,9 +43901,14 @@
|
|
|
43919
43901
|
if (customLayoutObj.rootContainer) {
|
|
43920
43902
|
customLayoutObj.rootContainer = decodeReactDom(customLayoutObj.rootContainer);
|
|
43921
43903
|
}
|
|
43922
|
-
if (customLayoutObj.rootContainer instanceof Group$
|
|
43904
|
+
if (customLayoutObj.rootContainer instanceof Group$1) {
|
|
43923
43905
|
width = customLayoutObj.rootContainer.AABBBounds.width() ?? 0;
|
|
43924
43906
|
}
|
|
43907
|
+
else if (customLayoutObj.rootContainer) {
|
|
43908
|
+
customLayoutObj.rootContainer.isRoot = true;
|
|
43909
|
+
const size = customLayoutObj.rootContainer.getContentSize();
|
|
43910
|
+
width = size.width ?? 0;
|
|
43911
|
+
}
|
|
43925
43912
|
else {
|
|
43926
43913
|
width = 0;
|
|
43927
43914
|
}
|
|
@@ -43999,7 +43986,7 @@
|
|
|
43999
43986
|
return widthDefined;
|
|
44000
43987
|
}
|
|
44001
43988
|
|
|
44002
|
-
const emptyGroup = new Group
|
|
43989
|
+
const emptyGroup = new Group({});
|
|
44003
43990
|
emptyGroup.role = 'empty';
|
|
44004
43991
|
|
|
44005
43992
|
const chartTypes = {};
|
|
@@ -44018,7 +44005,7 @@
|
|
|
44018
44005
|
padding = functionalPadding;
|
|
44019
44006
|
}
|
|
44020
44007
|
if (!cellGroup) {
|
|
44021
|
-
cellGroup = new Group
|
|
44008
|
+
cellGroup = new Group({
|
|
44022
44009
|
x: xOrigin,
|
|
44023
44010
|
y: yOrigin,
|
|
44024
44011
|
width,
|
|
@@ -44076,7 +44063,7 @@
|
|
|
44076
44063
|
const autoColWidth = colWidth === 'auto';
|
|
44077
44064
|
const autoWrapText = headerStyle.autoWrapText ?? table.internalProps.autoWrapText;
|
|
44078
44065
|
const lineClamp = headerStyle.lineClamp;
|
|
44079
|
-
const cellGroup = new Group
|
|
44066
|
+
const cellGroup = new Group({
|
|
44080
44067
|
x: xOrigin,
|
|
44081
44068
|
y: yOrigin,
|
|
44082
44069
|
width: cellWidth,
|
|
@@ -44140,7 +44127,7 @@
|
|
|
44140
44127
|
if (cellTheme?.text?.textBaseline) {
|
|
44141
44128
|
textBaseline = cellTheme?.text?.textBaseline;
|
|
44142
44129
|
}
|
|
44143
|
-
const cellGroup = new Group
|
|
44130
|
+
const cellGroup = new Group({
|
|
44144
44131
|
x: xOrigin,
|
|
44145
44132
|
y: yOrigin,
|
|
44146
44133
|
width,
|
|
@@ -44231,7 +44218,7 @@
|
|
|
44231
44218
|
|
|
44232
44219
|
function createCheckboxCellGroup(cellGroup, columnGroup, xOrigin, yOrigin, col, row, colWidth, width, height, padding, textAlign, textBaseline, table, cellTheme, define) {
|
|
44233
44220
|
if (!cellGroup) {
|
|
44234
|
-
cellGroup = new Group
|
|
44221
|
+
cellGroup = new Group({
|
|
44235
44222
|
x: xOrigin,
|
|
44236
44223
|
y: yOrigin,
|
|
44237
44224
|
width,
|
|
@@ -44531,7 +44518,7 @@
|
|
|
44531
44518
|
}
|
|
44532
44519
|
let newCellGroup;
|
|
44533
44520
|
if (isMerge && (col !== range.start.col || row !== range.start.row)) {
|
|
44534
|
-
newCellGroup = new Group
|
|
44521
|
+
newCellGroup = new Group({
|
|
44535
44522
|
x: 0,
|
|
44536
44523
|
y: addNew ? 0 : oldCellGroup.attribute.y,
|
|
44537
44524
|
width: 0,
|
|
@@ -44686,7 +44673,7 @@
|
|
|
44686
44673
|
}
|
|
44687
44674
|
if (mergeResult) {
|
|
44688
44675
|
const height = mergeResult.cellHeight / (range.end.row - range.start.row + 1);
|
|
44689
|
-
const cellGroup = new Group
|
|
44676
|
+
const cellGroup = new Group({
|
|
44690
44677
|
x: 0,
|
|
44691
44678
|
y,
|
|
44692
44679
|
width: 0,
|
|
@@ -44748,7 +44735,7 @@
|
|
|
44748
44735
|
for (let i = colStart; i <= colEnd; i++) {
|
|
44749
44736
|
const col = i;
|
|
44750
44737
|
const colWidth = table.getColWidth(col);
|
|
44751
|
-
const columnGroup = new Group
|
|
44738
|
+
const columnGroup = new Group({
|
|
44752
44739
|
x: xOrigin + x,
|
|
44753
44740
|
y: yOrigin,
|
|
44754
44741
|
width: colWidth,
|
|
@@ -45671,7 +45658,7 @@
|
|
|
45671
45658
|
}
|
|
45672
45659
|
}
|
|
45673
45660
|
if (this.table.columnHeaderLevelCount) {
|
|
45674
|
-
const lastColumnGroup = (this.table.scenegraph.colHeaderGroup.lastChild instanceof Group
|
|
45661
|
+
const lastColumnGroup = (this.table.scenegraph.colHeaderGroup.lastChild instanceof Group
|
|
45675
45662
|
? this.table.scenegraph.colHeaderGroup.lastChild
|
|
45676
45663
|
: this.table.scenegraph.colHeaderGroup.lastChild._prev);
|
|
45677
45664
|
const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;
|
|
@@ -45679,7 +45666,7 @@
|
|
|
45679
45666
|
createColGroup(this.table.scenegraph.colHeaderGroup, xOrigin, yOrigin, this.currentCol + 1, endCol, 0, this.table.columnHeaderLevelCount - 1, 'columnHeader', this.table);
|
|
45680
45667
|
}
|
|
45681
45668
|
if (this.table.bottomFrozenRowCount) {
|
|
45682
|
-
const lastColumnGroup = (this.table.scenegraph.bottomFrozenGroup.lastChild instanceof Group
|
|
45669
|
+
const lastColumnGroup = (this.table.scenegraph.bottomFrozenGroup.lastChild instanceof Group
|
|
45683
45670
|
? this.table.scenegraph.bottomFrozenGroup.lastChild
|
|
45684
45671
|
: this.table.scenegraph.bottomFrozenGroup.lastChild._prev);
|
|
45685
45672
|
const xOrigin = lastColumnGroup.attribute.x + lastColumnGroup.attribute.width;
|
|
@@ -45687,13 +45674,13 @@
|
|
|
45687
45674
|
createColGroup(this.table.scenegraph.bottomFrozenGroup, xOrigin, yOrigin, this.currentCol + 1, endCol, this.table.rowCount - this.table.bottomFrozenRowCount, this.table.rowCount - 1, 'columnHeader', this.table);
|
|
45688
45675
|
}
|
|
45689
45676
|
let lastColumnGroup = this.table.scenegraph.bodyGroup.lastChild &&
|
|
45690
|
-
(this.table.scenegraph.bodyGroup.lastChild instanceof Group
|
|
45677
|
+
(this.table.scenegraph.bodyGroup.lastChild instanceof Group
|
|
45691
45678
|
? this.table.scenegraph.bodyGroup.lastChild
|
|
45692
45679
|
: this.table.scenegraph.bodyGroup.lastChild._prev);
|
|
45693
45680
|
if (!lastColumnGroup) {
|
|
45694
45681
|
lastColumnGroup =
|
|
45695
45682
|
this.table.scenegraph.colHeaderGroup.lastChild &&
|
|
45696
|
-
(this.table.scenegraph.colHeaderGroup.lastChild instanceof Group
|
|
45683
|
+
(this.table.scenegraph.colHeaderGroup.lastChild instanceof Group
|
|
45697
45684
|
? this.table.scenegraph.colHeaderGroup.lastChild
|
|
45698
45685
|
: this.table.scenegraph.colHeaderGroup.lastChild._prev);
|
|
45699
45686
|
}
|
|
@@ -45835,7 +45822,7 @@
|
|
|
45835
45822
|
return getCellByCache(cacheCellGroup._next, row);
|
|
45836
45823
|
}
|
|
45837
45824
|
|
|
45838
|
-
new Group$
|
|
45825
|
+
new Group$1({});
|
|
45839
45826
|
function moveHeaderPosition(colSource, rowSource, colTarget, rowTarget, table) {
|
|
45840
45827
|
const scene = table.scenegraph;
|
|
45841
45828
|
const cellLocation = table.getCellLocation(colTarget, rowTarget);
|
|
@@ -45922,67 +45909,139 @@
|
|
|
45922
45909
|
}
|
|
45923
45910
|
function updateComponent(selectComp, key, scene) {
|
|
45924
45911
|
const [startColStr, startRowStr, endColStr, endRowStr] = key.split('-');
|
|
45925
|
-
|
|
45926
|
-
|
|
45927
|
-
|
|
45928
|
-
|
|
45929
|
-
let
|
|
45930
|
-
|
|
45931
|
-
|
|
45932
|
-
|
|
45933
|
-
if (
|
|
45934
|
-
|
|
45912
|
+
let startCol = parseInt(startColStr, 10);
|
|
45913
|
+
let startRow = parseInt(startRowStr, 10);
|
|
45914
|
+
let endCol = parseInt(endColStr, 10);
|
|
45915
|
+
let endRow = parseInt(endRowStr, 10);
|
|
45916
|
+
let visibleCellRange;
|
|
45917
|
+
switch (selectComp.role) {
|
|
45918
|
+
case 'rowHeader':
|
|
45919
|
+
visibleCellRange = scene.table.getBodyVisibleRowRange();
|
|
45920
|
+
if (visibleCellRange) {
|
|
45921
|
+
startRow = Math.max(startRow, visibleCellRange.rowStart);
|
|
45922
|
+
endRow = Math.min(endRow, visibleCellRange.rowEnd);
|
|
45935
45923
|
}
|
|
45936
|
-
|
|
45937
|
-
|
|
45938
|
-
|
|
45939
|
-
|
|
45924
|
+
break;
|
|
45925
|
+
case 'columnHeader':
|
|
45926
|
+
visibleCellRange = scene.table.getBodyVisibleCellRange();
|
|
45927
|
+
if (visibleCellRange) {
|
|
45928
|
+
startCol = Math.max(startCol, visibleCellRange.colStart);
|
|
45929
|
+
endCol = Math.min(endCol, visibleCellRange.colEnd);
|
|
45940
45930
|
}
|
|
45941
|
-
|
|
45942
|
-
|
|
45931
|
+
break;
|
|
45932
|
+
case 'cornerHeader':
|
|
45933
|
+
break;
|
|
45934
|
+
case 'bottomFrozen':
|
|
45935
|
+
visibleCellRange = scene.table.getBodyVisibleCellRange();
|
|
45936
|
+
if (visibleCellRange) {
|
|
45937
|
+
startCol = Math.max(startCol, visibleCellRange.colStart);
|
|
45938
|
+
endCol = Math.min(endCol, visibleCellRange.colEnd);
|
|
45943
45939
|
}
|
|
45944
|
-
|
|
45945
|
-
|
|
45946
|
-
|
|
45947
|
-
|
|
45948
|
-
|
|
45949
|
-
|
|
45950
|
-
|
|
45951
|
-
|
|
45952
|
-
|
|
45953
|
-
|
|
45954
|
-
|
|
45955
|
-
|
|
45956
|
-
|
|
45957
|
-
|
|
45958
|
-
|
|
45940
|
+
break;
|
|
45941
|
+
case 'rightFrozen':
|
|
45942
|
+
visibleCellRange = scene.table.getBodyVisibleCellRange();
|
|
45943
|
+
if (visibleCellRange) {
|
|
45944
|
+
startRow = Math.max(startRow, visibleCellRange.rowStart);
|
|
45945
|
+
endRow = Math.min(endRow, visibleCellRange.rowEnd);
|
|
45946
|
+
}
|
|
45947
|
+
break;
|
|
45948
|
+
case 'rightTopCorner':
|
|
45949
|
+
break;
|
|
45950
|
+
case 'leftBottomCorner':
|
|
45951
|
+
break;
|
|
45952
|
+
case 'rightBottomCorner':
|
|
45953
|
+
break;
|
|
45954
|
+
default:
|
|
45955
|
+
visibleCellRange = scene.table.getBodyVisibleCellRange();
|
|
45956
|
+
if (visibleCellRange) {
|
|
45957
|
+
startRow = Math.max(startRow, visibleCellRange.rowStart);
|
|
45958
|
+
endRow = Math.min(endRow, visibleCellRange.rowEnd);
|
|
45959
|
+
startCol = Math.max(startCol, visibleCellRange.colStart);
|
|
45960
|
+
endCol = Math.min(endCol, visibleCellRange.colEnd);
|
|
45961
|
+
}
|
|
45962
|
+
break;
|
|
45959
45963
|
}
|
|
45964
|
+
const cellRange = scene.table.getCellRange(startCol, startRow);
|
|
45965
|
+
const colsWidth = scene.table.getColsWidth(cellRange.start.col, endCol);
|
|
45966
|
+
const rowsHeight = scene.table.getRowsHeight(cellRange.start.row, endRow);
|
|
45967
|
+
const firstCellBound = scene.highPerformanceGetCell(startCol, startRow).globalAABBBounds;
|
|
45968
|
+
selectComp.rect.setAttributes({
|
|
45969
|
+
x: firstCellBound.x1 - scene.tableGroup.attribute.x,
|
|
45970
|
+
y: firstCellBound.y1 - scene.tableGroup.attribute.y,
|
|
45971
|
+
width: colsWidth,
|
|
45972
|
+
height: rowsHeight,
|
|
45973
|
+
visible: true
|
|
45974
|
+
});
|
|
45960
45975
|
const isNearRowHeader = startCol === scene.table.frozenColCount;
|
|
45976
|
+
const isNearRightRowHeader = endCol === scene.table.colCount - scene.table.rightFrozenColCount - 1;
|
|
45961
45977
|
const isNearColHeader = startRow === scene.table.frozenRowCount;
|
|
45978
|
+
const isNearBottomColHeader = endRow === scene.table.rowCount - scene.table.bottomFrozenRowCount - 1;
|
|
45962
45979
|
if ((isNearRowHeader && selectComp.rect.attribute.stroke[3]) ||
|
|
45963
|
-
(
|
|
45964
|
-
|
|
45965
|
-
|
|
45966
|
-
|
|
45967
|
-
|
|
45968
|
-
|
|
45980
|
+
(isNearRightRowHeader && selectComp.rect.attribute.stroke[1]) ||
|
|
45981
|
+
(isNearColHeader && selectComp.rect.attribute.stroke[0]) ||
|
|
45982
|
+
(isNearBottomColHeader && selectComp.rect.attribute.stroke[2])) {
|
|
45983
|
+
if (isNearRowHeader && selectComp.rect.attribute.stroke[3]) {
|
|
45984
|
+
scene.tableGroup.insertAfter(selectComp.rect, selectComp.role === 'columnHeader'
|
|
45985
|
+
? scene.cornerHeaderGroup
|
|
45986
|
+
: selectComp.role === 'bottomFrozen'
|
|
45987
|
+
? scene.leftBottomCornerGroup
|
|
45988
|
+
: scene.rowHeaderGroup);
|
|
45989
|
+
}
|
|
45990
|
+
if (isNearBottomColHeader && selectComp.rect.attribute.stroke[2]) {
|
|
45991
|
+
scene.tableGroup.insertAfter(selectComp.rect, selectComp.role === 'rowHeader'
|
|
45992
|
+
? scene.leftBottomCornerGroup
|
|
45993
|
+
: selectComp.role === 'rightFrozen'
|
|
45994
|
+
? scene.rightBottomCornerGroup
|
|
45995
|
+
: scene.bottomFrozenGroup);
|
|
45996
|
+
}
|
|
45997
|
+
if (isNearColHeader && selectComp.rect.attribute.stroke[0]) {
|
|
45998
|
+
scene.tableGroup.insertAfter(selectComp.rect, selectComp.role === 'rowHeader'
|
|
45999
|
+
? scene.cornerHeaderGroup
|
|
46000
|
+
: selectComp.role === 'rightFrozen'
|
|
46001
|
+
? scene.rightTopCornerGroup
|
|
46002
|
+
: scene.colHeaderGroup);
|
|
46003
|
+
}
|
|
46004
|
+
if (isNearRightRowHeader && selectComp.rect.attribute.stroke[1]) {
|
|
46005
|
+
scene.tableGroup.insertAfter(selectComp.rect, selectComp.role === 'columnHeader'
|
|
46006
|
+
? scene.rightTopCornerGroup
|
|
46007
|
+
: selectComp.role === 'bottomFrozen'
|
|
46008
|
+
? scene.rightBottomCornerGroup
|
|
46009
|
+
: scene.rightFrozenGroup);
|
|
45969
46010
|
}
|
|
45970
46011
|
if (selectComp.rect.attribute.x < scene.rowHeaderGroup.attribute.width &&
|
|
45971
46012
|
scene.table.scrollLeft > 0 &&
|
|
45972
|
-
(selectComp.role === 'body' || selectComp.role === 'columnHeader')) {
|
|
46013
|
+
(selectComp.role === 'body' || selectComp.role === 'columnHeader' || selectComp.role === 'bottomFrozen')) {
|
|
45973
46014
|
selectComp.rect.setAttributes({
|
|
45974
46015
|
x: selectComp.rect.attribute.x + (scene.rowHeaderGroup.attribute.width - selectComp.rect.attribute.x),
|
|
45975
46016
|
width: selectComp.rect.attribute.width - (scene.rowHeaderGroup.attribute.width - selectComp.rect.attribute.x)
|
|
45976
46017
|
});
|
|
45977
46018
|
}
|
|
46019
|
+
if (scene.rightFrozenGroup.attribute.width > 0 &&
|
|
46020
|
+
scene.rightFrozenGroup.attribute.height > 0 &&
|
|
46021
|
+
selectComp.rect.attribute.x + selectComp.rect.attribute.width > scene.rightFrozenGroup.attribute.x &&
|
|
46022
|
+
(selectComp.role === 'body' || selectComp.role === 'columnHeader' || selectComp.role === 'bottomFrozen')) {
|
|
46023
|
+
selectComp.rect.setAttributes({
|
|
46024
|
+
x: selectComp.rect.attribute.x,
|
|
46025
|
+
width: scene.rightFrozenGroup.attribute.x - selectComp.rect.attribute.x
|
|
46026
|
+
});
|
|
46027
|
+
}
|
|
45978
46028
|
if (selectComp.rect.attribute.y < scene.colHeaderGroup.attribute.height &&
|
|
45979
46029
|
scene.table.scrollTop > 0 &&
|
|
45980
|
-
(selectComp.role === 'body' || selectComp.role === 'rowHeader')) {
|
|
46030
|
+
(selectComp.role === 'body' || selectComp.role === 'rowHeader' || selectComp.role === 'rightFrozen')) {
|
|
45981
46031
|
selectComp.rect.setAttributes({
|
|
45982
46032
|
y: selectComp.rect.attribute.y + (scene.colHeaderGroup.attribute.height - selectComp.rect.attribute.y),
|
|
45983
46033
|
height: selectComp.rect.attribute.height - (scene.colHeaderGroup.attribute.height - selectComp.rect.attribute.y)
|
|
45984
46034
|
});
|
|
45985
46035
|
}
|
|
46036
|
+
if (scene.bottomFrozenGroup.attribute.width > 0 &&
|
|
46037
|
+
scene.bottomFrozenGroup.attribute.height > 0 &&
|
|
46038
|
+
selectComp.rect.attribute.y + selectComp.rect.attribute.height > scene.bottomFrozenGroup.attribute.y &&
|
|
46039
|
+
(selectComp.role === 'body' || selectComp.role === 'rowHeader' || selectComp.role === 'rightFrozen')) {
|
|
46040
|
+
selectComp.rect.setAttributes({
|
|
46041
|
+
y: selectComp.rect.attribute.y,
|
|
46042
|
+
height: scene.bottomFrozenGroup.attribute.y - selectComp.rect.attribute.y
|
|
46043
|
+
});
|
|
46044
|
+
}
|
|
45986
46045
|
}
|
|
45987
46046
|
else {
|
|
45988
46047
|
scene.tableGroup.insertAfter(selectComp.rect, selectComp.role === 'body'
|
|
@@ -45991,7 +46050,17 @@
|
|
|
45991
46050
|
? scene.colHeaderGroup
|
|
45992
46051
|
: selectComp.role === 'rowHeader'
|
|
45993
46052
|
? scene.rowHeaderGroup
|
|
45994
|
-
:
|
|
46053
|
+
: selectComp.role === 'cornerHeader'
|
|
46054
|
+
? scene.cornerHeaderGroup
|
|
46055
|
+
: selectComp.role === 'rightTopCorner'
|
|
46056
|
+
? scene.rightTopCornerGroup
|
|
46057
|
+
: selectComp.role === 'rightFrozen'
|
|
46058
|
+
? scene.rightFrozenGroup
|
|
46059
|
+
: selectComp.role === 'leftBottomCorner'
|
|
46060
|
+
? scene.leftBottomCornerGroup
|
|
46061
|
+
: selectComp.role === 'bottomFrozen'
|
|
46062
|
+
? scene.bottomFrozenGroup
|
|
46063
|
+
: scene.rightBottomCornerGroup);
|
|
45995
46064
|
}
|
|
45996
46065
|
}
|
|
45997
46066
|
function updateCellSelectBorder(scene, newStartCol, newStartRow, newEndCol, newEndRow) {
|
|
@@ -46063,19 +46132,51 @@
|
|
|
46063
46132
|
});
|
|
46064
46133
|
scene.selectingRangeComponents = new Map();
|
|
46065
46134
|
let needRowHeader = false;
|
|
46135
|
+
let needRightRowHeader = false;
|
|
46066
46136
|
let needColumnHeader = false;
|
|
46137
|
+
let needBottomColumnHeader = false;
|
|
46067
46138
|
let needBody = false;
|
|
46068
46139
|
let needCornerHeader = false;
|
|
46140
|
+
let needRightTopCornerHeader = false;
|
|
46141
|
+
let needRightBottomCornerHeader = false;
|
|
46142
|
+
let needLeftBottomCornerHeader = false;
|
|
46069
46143
|
if (startCol <= scene.table.frozenColCount - 1 && startRow <= scene.table.frozenRowCount - 1) {
|
|
46070
46144
|
needCornerHeader = true;
|
|
46071
46145
|
}
|
|
46072
|
-
if (
|
|
46146
|
+
if (endCol >= scene.table.colCount - scene.table.rightFrozenColCount && startRow <= scene.table.frozenRowCount - 1) {
|
|
46147
|
+
needRightTopCornerHeader = true;
|
|
46148
|
+
}
|
|
46149
|
+
if (startCol <= scene.table.frozenColCount - 1 && endRow >= scene.table.rowCount - scene.table.bottomFrozenRowCount) {
|
|
46150
|
+
needLeftBottomCornerHeader = true;
|
|
46151
|
+
}
|
|
46152
|
+
if (endCol >= scene.table.colCount - scene.table.rightFrozenColCount &&
|
|
46153
|
+
endRow >= scene.table.rowCount - scene.table.bottomFrozenRowCount) {
|
|
46154
|
+
needRightBottomCornerHeader = true;
|
|
46155
|
+
}
|
|
46156
|
+
if (startCol <= scene.table.frozenColCount - 1 &&
|
|
46157
|
+
endRow >= scene.table.frozenRowCount &&
|
|
46158
|
+
startRow <= scene.table.rowCount - scene.table.bottomFrozenRowCount - 1) {
|
|
46073
46159
|
needRowHeader = true;
|
|
46074
46160
|
}
|
|
46075
|
-
if (
|
|
46161
|
+
if (endCol >= scene.table.colCount - scene.table.rightFrozenColCount &&
|
|
46162
|
+
endRow >= scene.table.frozenRowCount &&
|
|
46163
|
+
startRow <= scene.table.rowCount - scene.table.bottomFrozenRowCount - 1) {
|
|
46164
|
+
needRightRowHeader = true;
|
|
46165
|
+
}
|
|
46166
|
+
if (startRow <= scene.table.frozenRowCount - 1 &&
|
|
46167
|
+
endCol >= scene.table.frozenColCount &&
|
|
46168
|
+
startCol <= scene.table.colCount - scene.table.rightFrozenColCount - 1) {
|
|
46076
46169
|
needColumnHeader = true;
|
|
46077
46170
|
}
|
|
46078
|
-
if (
|
|
46171
|
+
if (endRow >= scene.table.rowCount - scene.table.bottomFrozenRowCount &&
|
|
46172
|
+
endCol >= scene.table.frozenColCount &&
|
|
46173
|
+
startCol <= scene.table.colCount - scene.table.rightFrozenColCount - 1) {
|
|
46174
|
+
needBottomColumnHeader = true;
|
|
46175
|
+
}
|
|
46176
|
+
if (startCol <= scene.table.colCount - scene.table.rightFrozenColCount - 1 &&
|
|
46177
|
+
endCol >= scene.table.frozenColCount &&
|
|
46178
|
+
startRow <= scene.table.rowCount - scene.table.bottomFrozenRowCount - 1 &&
|
|
46179
|
+
endRow >= scene.table.frozenRowCount) {
|
|
46079
46180
|
needBody = true;
|
|
46080
46181
|
}
|
|
46081
46182
|
if (needCornerHeader) {
|
|
@@ -46084,23 +46185,59 @@
|
|
|
46084
46185
|
const strokeArray = [true, !needColumnHeader, !needRowHeader, true];
|
|
46085
46186
|
scene.createCellSelectBorder(startCol, startRow, cornerEndCol, cornerEndRow, 'cornerHeader', `${startCol}${startRow}${endCol}${endRow}`, strokeArray);
|
|
46086
46187
|
}
|
|
46188
|
+
if (needRightTopCornerHeader) {
|
|
46189
|
+
const cornerStartCol = Math.max(startCol, scene.table.colCount - scene.table.rightFrozenColCount);
|
|
46190
|
+
const cornerEndRow = Math.min(endRow, scene.table.frozenRowCount - 1);
|
|
46191
|
+
const strokeArray = [true, true, !needRightRowHeader, !needColumnHeader];
|
|
46192
|
+
scene.createCellSelectBorder(cornerStartCol, startRow, endCol, cornerEndRow, 'rightTopCorner', `${startCol}${startRow}${endCol}${endRow}`, strokeArray);
|
|
46193
|
+
}
|
|
46194
|
+
if (needLeftBottomCornerHeader) {
|
|
46195
|
+
const cornerEndCol = Math.min(endCol, scene.table.frozenColCount - 1);
|
|
46196
|
+
const cornerStartRow = Math.max(startRow, scene.table.rowCount - scene.table.bottomFrozenRowCount);
|
|
46197
|
+
const strokeArray = [!needRowHeader, !needBottomColumnHeader, true, true];
|
|
46198
|
+
scene.createCellSelectBorder(startCol, cornerStartRow, cornerEndCol, endRow, 'leftBottomCorner', `${startCol}${startRow}${endCol}${endRow}`, strokeArray);
|
|
46199
|
+
}
|
|
46200
|
+
if (needRightBottomCornerHeader) {
|
|
46201
|
+
const cornerStartCol = Math.max(startCol, scene.table.colCount - scene.table.rightFrozenColCount);
|
|
46202
|
+
const cornerStartRow = Math.max(startRow, scene.table.rowCount - scene.table.bottomFrozenRowCount);
|
|
46203
|
+
const strokeArray = [!needRightRowHeader, true, true, !needBottomColumnHeader];
|
|
46204
|
+
scene.createCellSelectBorder(cornerStartCol, cornerStartRow, endCol, endRow, 'rightBottomCorner', `${startCol}${startRow}${endCol}${endRow}`, strokeArray);
|
|
46205
|
+
}
|
|
46087
46206
|
if (needColumnHeader) {
|
|
46088
46207
|
const columnHeaderStartCol = Math.max(startCol, scene.table.frozenColCount);
|
|
46208
|
+
const columnHeaderEndCol = Math.min(endCol, scene.table.colCount - scene.table.rightFrozenColCount - 1);
|
|
46089
46209
|
const columnHeaderEndRow = Math.min(endRow, scene.table.frozenRowCount - 1);
|
|
46090
|
-
const strokeArray = [true,
|
|
46091
|
-
scene.createCellSelectBorder(columnHeaderStartCol, startRow,
|
|
46210
|
+
const strokeArray = [true, !needRightTopCornerHeader, !needBody, !needCornerHeader];
|
|
46211
|
+
scene.createCellSelectBorder(columnHeaderStartCol, startRow, columnHeaderEndCol, columnHeaderEndRow, 'columnHeader', `${startCol}${startRow}${endCol}${endRow}`, strokeArray);
|
|
46212
|
+
}
|
|
46213
|
+
if (needBottomColumnHeader) {
|
|
46214
|
+
const columnHeaderStartCol = Math.max(startCol, scene.table.frozenColCount);
|
|
46215
|
+
const columnHeaderEndCol = Math.min(endCol, scene.table.colCount - scene.table.rightFrozenColCount - 1);
|
|
46216
|
+
const columnHeaderStartRow = Math.max(startRow, scene.table.rowCount - scene.table.bottomFrozenRowCount);
|
|
46217
|
+
const strokeArray = [!needBody, !needRightBottomCornerHeader, true, !needLeftBottomCornerHeader];
|
|
46218
|
+
scene.createCellSelectBorder(columnHeaderStartCol, columnHeaderStartRow, columnHeaderEndCol, endRow, 'bottomFrozen', `${startCol}${startRow}${endCol}${endRow}`, strokeArray);
|
|
46092
46219
|
}
|
|
46093
46220
|
if (needRowHeader) {
|
|
46094
46221
|
const columnHeaderStartRow = Math.max(startRow, scene.table.frozenRowCount);
|
|
46222
|
+
const columnHeaderEndRow = Math.min(endRow, scene.table.rowCount - scene.table.bottomFrozenRowCount - 1);
|
|
46095
46223
|
const columnHeaderEndCol = Math.min(endCol, scene.table.frozenColCount - 1);
|
|
46096
|
-
const strokeArray = [!needCornerHeader, !needBody,
|
|
46097
|
-
scene.createCellSelectBorder(startCol, columnHeaderStartRow, columnHeaderEndCol,
|
|
46224
|
+
const strokeArray = [!needCornerHeader, !needBody, !needLeftBottomCornerHeader, true];
|
|
46225
|
+
scene.createCellSelectBorder(startCol, columnHeaderStartRow, columnHeaderEndCol, columnHeaderEndRow, 'rowHeader', `${startCol}${startRow}${endCol}${endRow}`, strokeArray);
|
|
46226
|
+
}
|
|
46227
|
+
if (needRightRowHeader) {
|
|
46228
|
+
const columnHeaderStartRow = Math.max(startRow, scene.table.frozenRowCount);
|
|
46229
|
+
const columnHeaderEndRow = Math.min(endRow, scene.table.rowCount - scene.table.bottomFrozenRowCount - 1);
|
|
46230
|
+
const columnHeaderStartCol = Math.max(startCol, scene.table.colCount - scene.table.rightFrozenColCount);
|
|
46231
|
+
const strokeArray = [!needRightTopCornerHeader, true, !needRightBottomCornerHeader, !needBody];
|
|
46232
|
+
scene.createCellSelectBorder(columnHeaderStartCol, columnHeaderStartRow, endCol, columnHeaderEndRow, 'rightFrozen', `${startCol}${startRow}${endCol}${endRow}`, strokeArray);
|
|
46098
46233
|
}
|
|
46099
46234
|
if (needBody) {
|
|
46100
46235
|
const columnHeaderStartCol = Math.max(startCol, scene.table.frozenColCount);
|
|
46101
46236
|
const columnHeaderStartRow = Math.max(startRow, scene.table.frozenRowCount);
|
|
46102
|
-
const
|
|
46103
|
-
|
|
46237
|
+
const columnHeaderEndCol = Math.min(endCol, scene.table.colCount - scene.table.rightFrozenColCount - 1);
|
|
46238
|
+
const columnHeaderEndRow = Math.min(endRow, scene.table.rowCount - scene.table.bottomFrozenRowCount - 1);
|
|
46239
|
+
const strokeArray = [!needColumnHeader, !needRightRowHeader, !needBottomColumnHeader, !needRowHeader];
|
|
46240
|
+
scene.createCellSelectBorder(columnHeaderStartCol, columnHeaderStartRow, columnHeaderEndCol, columnHeaderEndRow, 'body', `${startCol}${startRow}${endCol}${endRow}`, strokeArray);
|
|
46104
46241
|
}
|
|
46105
46242
|
}
|
|
46106
46243
|
|
|
@@ -46109,23 +46246,7 @@
|
|
|
46109
46246
|
const startRow = Math.min(start_Row, end_Row);
|
|
46110
46247
|
const endCol = Math.max(start_Col, end_Col);
|
|
46111
46248
|
const endRow = Math.max(start_Row, end_Row);
|
|
46112
|
-
|
|
46113
|
-
for (let i = startCol; i <= endCol; i++) {
|
|
46114
|
-
for (let j = startRow; j <= endRow; j++) {
|
|
46115
|
-
const cellGroup = scene.highPerformanceGetCell(i, j);
|
|
46116
|
-
if (cellGroup.role === 'shadow-cell') {
|
|
46117
|
-
continue;
|
|
46118
|
-
}
|
|
46119
|
-
cellGroup.AABBBounds.width();
|
|
46120
|
-
const bounds = cellGroup.globalAABBBounds;
|
|
46121
|
-
if (!cellsBounds) {
|
|
46122
|
-
cellsBounds = bounds;
|
|
46123
|
-
}
|
|
46124
|
-
else {
|
|
46125
|
-
cellsBounds.union(bounds);
|
|
46126
|
-
}
|
|
46127
|
-
}
|
|
46128
|
-
}
|
|
46249
|
+
const firstCellBound = scene.highPerformanceGetCell(startCol, startRow).globalAABBBounds;
|
|
46129
46250
|
const theme = scene.table.theme;
|
|
46130
46251
|
const bodyClickBorderColor = theme.selectionStyle?.cellBorderColor;
|
|
46131
46252
|
const bodyClickLineWidth = theme.selectionStyle?.cellBorderLineWidth;
|
|
@@ -46139,10 +46260,10 @@
|
|
|
46139
46260
|
}
|
|
46140
46261
|
return false;
|
|
46141
46262
|
}),
|
|
46142
|
-
x:
|
|
46143
|
-
y:
|
|
46144
|
-
width:
|
|
46145
|
-
height:
|
|
46263
|
+
x: firstCellBound.x1 - scene.tableGroup.attribute.x,
|
|
46264
|
+
y: firstCellBound.y1 - scene.tableGroup.attribute.y,
|
|
46265
|
+
width: 0,
|
|
46266
|
+
height: 0,
|
|
46146
46267
|
visible: true
|
|
46147
46268
|
});
|
|
46148
46269
|
scene.lastSelectId = selectId;
|
|
@@ -46156,7 +46277,17 @@
|
|
|
46156
46277
|
? scene.colHeaderGroup
|
|
46157
46278
|
: selectRangeType === 'rowHeader'
|
|
46158
46279
|
? scene.rowHeaderGroup
|
|
46159
|
-
:
|
|
46280
|
+
: selectRangeType === 'cornerHeader'
|
|
46281
|
+
? scene.cornerHeaderGroup
|
|
46282
|
+
: selectRangeType === 'rightTopCorner'
|
|
46283
|
+
? scene.rightTopCornerGroup
|
|
46284
|
+
: selectRangeType === 'rightFrozen'
|
|
46285
|
+
? scene.rightFrozenGroup
|
|
46286
|
+
: selectRangeType === 'leftBottomCorner'
|
|
46287
|
+
? scene.leftBottomCornerGroup
|
|
46288
|
+
: selectRangeType === 'bottomFrozen'
|
|
46289
|
+
? scene.bottomFrozenGroup
|
|
46290
|
+
: scene.rightBottomCornerGroup);
|
|
46160
46291
|
}
|
|
46161
46292
|
|
|
46162
46293
|
function moveSelectingRangeComponentsToSelectedRangeComponents(scene) {
|
|
@@ -46236,7 +46367,7 @@
|
|
|
46236
46367
|
}
|
|
46237
46368
|
function addRow(row, scene) {
|
|
46238
46369
|
for (let col = 0; col < scene.table.colCount; col++) {
|
|
46239
|
-
const cellGroup = new Group
|
|
46370
|
+
const cellGroup = new Group({
|
|
46240
46371
|
x: 0,
|
|
46241
46372
|
y: 0,
|
|
46242
46373
|
width: scene.table.getColWidth(col),
|
|
@@ -46509,7 +46640,7 @@
|
|
|
46509
46640
|
scene.hasFrozen = true;
|
|
46510
46641
|
}
|
|
46511
46642
|
function moveColumnFromBodyToRowHeader(scene) {
|
|
46512
|
-
const column = scene.bodyGroup.firstChild instanceof Group
|
|
46643
|
+
const column = scene.bodyGroup.firstChild instanceof Group ? scene.bodyGroup.firstChild : null;
|
|
46513
46644
|
if (column) {
|
|
46514
46645
|
scene.rowHeaderGroup.appendChild(column);
|
|
46515
46646
|
scene.rowHeaderGroup.setAttribute('width', scene.rowHeaderGroup.attribute.width + column.attribute.width);
|
|
@@ -46517,7 +46648,7 @@
|
|
|
46517
46648
|
}
|
|
46518
46649
|
}
|
|
46519
46650
|
function moveColumnFromColHeaderToCornerHeader(scene) {
|
|
46520
|
-
const headerColumn = scene.colHeaderGroup.firstChild instanceof Group
|
|
46651
|
+
const headerColumn = scene.colHeaderGroup.firstChild instanceof Group ? scene.colHeaderGroup.firstChild : null;
|
|
46521
46652
|
if (headerColumn) {
|
|
46522
46653
|
scene.cornerHeaderGroup.appendChild(headerColumn);
|
|
46523
46654
|
scene.cornerHeaderGroup.setAttribute('width', scene.cornerHeaderGroup.attribute.width + headerColumn.attribute.width);
|
|
@@ -46525,7 +46656,7 @@
|
|
|
46525
46656
|
}
|
|
46526
46657
|
}
|
|
46527
46658
|
function moveColumnFromRowHeaderToBody(scene) {
|
|
46528
|
-
const column = scene.rowHeaderGroup.lastChild instanceof Group
|
|
46659
|
+
const column = scene.rowHeaderGroup.lastChild instanceof Group
|
|
46529
46660
|
? scene.rowHeaderGroup.lastChild
|
|
46530
46661
|
: scene.rowHeaderGroup.lastChild?._prev;
|
|
46531
46662
|
if (column) {
|
|
@@ -46535,7 +46666,7 @@
|
|
|
46535
46666
|
}
|
|
46536
46667
|
}
|
|
46537
46668
|
function moveColumnFromCornerHeaderToColHeader(scene) {
|
|
46538
|
-
const headerColumn = scene.cornerHeaderGroup.lastChild instanceof Group
|
|
46669
|
+
const headerColumn = scene.cornerHeaderGroup.lastChild instanceof Group
|
|
46539
46670
|
? scene.cornerHeaderGroup.lastChild
|
|
46540
46671
|
: scene.cornerHeaderGroup.lastChild?._prev;
|
|
46541
46672
|
if (headerColumn) {
|
|
@@ -46545,7 +46676,7 @@
|
|
|
46545
46676
|
}
|
|
46546
46677
|
}
|
|
46547
46678
|
function moveColumnFromBottomToLeftBottomCorner(scene) {
|
|
46548
|
-
const column = scene.bottomFrozenGroup.firstChild instanceof Group
|
|
46679
|
+
const column = scene.bottomFrozenGroup.firstChild instanceof Group ? scene.bottomFrozenGroup.firstChild : null;
|
|
46549
46680
|
if (column) {
|
|
46550
46681
|
scene.leftBottomCornerGroup.appendChild(column);
|
|
46551
46682
|
scene.leftBottomCornerGroup.setAttribute('width', scene.leftBottomCornerGroup.attribute.width + column.attribute.width);
|
|
@@ -46553,7 +46684,7 @@
|
|
|
46553
46684
|
}
|
|
46554
46685
|
}
|
|
46555
46686
|
function moveColumnFromLeftBottomCornerToBottom(scene) {
|
|
46556
|
-
const column = scene.leftBottomCornerGroup.lastChild instanceof Group
|
|
46687
|
+
const column = scene.leftBottomCornerGroup.lastChild instanceof Group
|
|
46557
46688
|
? scene.leftBottomCornerGroup.lastChild
|
|
46558
46689
|
: scene.leftBottomCornerGroup.lastChild?._prev;
|
|
46559
46690
|
if (column) {
|
|
@@ -46890,7 +47021,7 @@
|
|
|
46890
47021
|
function initSceneGraph(scene) {
|
|
46891
47022
|
const width = scene.table.tableNoFrameWidth;
|
|
46892
47023
|
const height = scene.table.tableNoFrameHeight;
|
|
46893
|
-
scene.tableGroup = new Group
|
|
47024
|
+
scene.tableGroup = new Group({ x: 0, y: 0, width, height, clip: true, pickable: false });
|
|
46894
47025
|
scene.tableGroup.role = 'table';
|
|
46895
47026
|
const colHeaderGroup = createContainerGroup(0, 0);
|
|
46896
47027
|
colHeaderGroup.role = 'col-header';
|
|
@@ -46928,10 +47059,10 @@
|
|
|
46928
47059
|
createCornerCell(rightBottomCornerGroup, scene.table.theme.cornerRightBottomCellStyle || scene.table.theme.cornerHeaderStyle);
|
|
46929
47060
|
}
|
|
46930
47061
|
scene.tableGroup.addChild(bodyGroup);
|
|
46931
|
-
scene.tableGroup.addChild(rightFrozenGroup);
|
|
46932
|
-
scene.tableGroup.addChild(bottomFrozenGroup);
|
|
46933
47062
|
scene.tableGroup.addChild(rowHeaderGroup);
|
|
47063
|
+
scene.tableGroup.addChild(bottomFrozenGroup);
|
|
46934
47064
|
scene.tableGroup.addChild(colHeaderGroup);
|
|
47065
|
+
scene.tableGroup.addChild(rightFrozenGroup);
|
|
46935
47066
|
scene.tableGroup.addChild(rightBottomCornerGroup);
|
|
46936
47067
|
scene.tableGroup.addChild(rightTopCornerGroup);
|
|
46937
47068
|
scene.tableGroup.addChild(leftBottomCornerGroup);
|
|
@@ -46939,7 +47070,7 @@
|
|
|
46939
47070
|
scene.tableGroup.addChild(componentGroup);
|
|
46940
47071
|
}
|
|
46941
47072
|
function createContainerGroup(width, height) {
|
|
46942
|
-
return new Group
|
|
47073
|
+
return new Group({
|
|
46943
47074
|
x: 0,
|
|
46944
47075
|
y: 0,
|
|
46945
47076
|
width,
|
|
@@ -47358,7 +47489,7 @@
|
|
|
47358
47489
|
if (this.table.rightFrozenColCount > 0 &&
|
|
47359
47490
|
col >= this.table.colCount - this.table.rightFrozenColCount &&
|
|
47360
47491
|
row < this.table.frozenRowCount) {
|
|
47361
|
-
cell = this.
|
|
47492
|
+
cell = this.rightTopCornerGroup.getColGroup(col)?.getRowGroup(row);
|
|
47362
47493
|
}
|
|
47363
47494
|
else if (this.table.bottomFrozenRowCount > 0 &&
|
|
47364
47495
|
row >= this.table.rowCount - this.table.bottomFrozenRowCount &&
|
|
@@ -47453,7 +47584,9 @@
|
|
|
47453
47584
|
this.stage.renderNextFrame();
|
|
47454
47585
|
}
|
|
47455
47586
|
resetAllSelectComponent() {
|
|
47456
|
-
|
|
47587
|
+
if (this.table.stateManeger.select?.ranges?.length > 0) {
|
|
47588
|
+
updateAllSelectComponent(this);
|
|
47589
|
+
}
|
|
47457
47590
|
}
|
|
47458
47591
|
hideHoverIcon(col, row) {
|
|
47459
47592
|
if (col === -1 || row === -1) {
|
|
@@ -50172,7 +50305,7 @@
|
|
|
50172
50305
|
eventManeger.dealColumnMover(eventArgsSet);
|
|
50173
50306
|
}
|
|
50174
50307
|
else {
|
|
50175
|
-
eventManeger.dealTableSelect(eventArgsSet);
|
|
50308
|
+
eventManeger.dealTableSelect(eventArgsSet, true);
|
|
50176
50309
|
}
|
|
50177
50310
|
return;
|
|
50178
50311
|
}
|
|
@@ -50285,7 +50418,7 @@
|
|
|
50285
50418
|
}
|
|
50286
50419
|
});
|
|
50287
50420
|
table.scenegraph.tableGroup.addEventListener('pointerleave', (e) => {
|
|
50288
|
-
if (!stateManeger.isResizeCol()) {
|
|
50421
|
+
if (!stateManeger.isResizeCol() && !stateManeger.isMoveCol() && !stateManeger.isSelecting()) {
|
|
50289
50422
|
stateManeger.updateInteractionState(InteractionState.default);
|
|
50290
50423
|
stateManeger.updateCursor();
|
|
50291
50424
|
}
|
|
@@ -50322,10 +50455,15 @@
|
|
|
50322
50455
|
}
|
|
50323
50456
|
}
|
|
50324
50457
|
else if (stateManeger.isSelecting()) {
|
|
50325
|
-
table.stateManeger.endSelectCells();
|
|
50326
50458
|
if (table.stateManeger.select?.ranges?.length) {
|
|
50327
50459
|
const lastCol = table.stateManeger.select.ranges[table.stateManeger.select.ranges.length - 1].end.col;
|
|
50328
50460
|
const lastRow = table.stateManeger.select.ranges[table.stateManeger.select.ranges.length - 1].end.row;
|
|
50461
|
+
table.stateManeger.select.selecting = false;
|
|
50462
|
+
table.fireListeners(TABLE_EVENT_TYPE.SELECTED_CELL, {
|
|
50463
|
+
ranges: table.stateManeger.select.ranges,
|
|
50464
|
+
col: lastCol,
|
|
50465
|
+
row: lastRow
|
|
50466
|
+
});
|
|
50329
50467
|
if (table.hasListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END)) {
|
|
50330
50468
|
const cellsEvent = {
|
|
50331
50469
|
event: e.nativeEvent,
|
|
@@ -50555,7 +50693,8 @@
|
|
|
50555
50693
|
const target = e.target;
|
|
50556
50694
|
if (target &&
|
|
50557
50695
|
!target.isDescendantsOf(table.scenegraph.tableGroup) &&
|
|
50558
|
-
target !== table.scenegraph.tableGroup
|
|
50696
|
+
target !== table.scenegraph.tableGroup &&
|
|
50697
|
+
target !== table.scenegraph.stage) {
|
|
50559
50698
|
stateManeger.updateInteractionState(InteractionState.default);
|
|
50560
50699
|
eventManeger.dealTableHover();
|
|
50561
50700
|
eventManeger.dealTableSelect();
|
|
@@ -50740,7 +50879,8 @@
|
|
|
50740
50879
|
}
|
|
50741
50880
|
state.resetInteractionState();
|
|
50742
50881
|
if (event.cancelable &&
|
|
50743
|
-
(
|
|
50882
|
+
(state.table.internalProps.overscrollBehavior === 'none' ||
|
|
50883
|
+
(Math.abs(deltaY) >= Math.abs(deltaX) && deltaY !== 0 && isVerticalScrollable(deltaY, state)) ||
|
|
50744
50884
|
(Math.abs(deltaY) <= Math.abs(deltaX) && deltaX !== 0 && isHorizontalScrollable(deltaX, state)))) {
|
|
50745
50885
|
event.preventDefault();
|
|
50746
50886
|
}
|
|
@@ -50870,7 +51010,8 @@
|
|
|
50870
51010
|
eventManeger.touchMovePoints[eventManeger.touchMovePoints.length - 2].y;
|
|
50871
51011
|
handleWhell({ deltaX, deltaY }, stateManeger);
|
|
50872
51012
|
if (e.cancelable &&
|
|
50873
|
-
(
|
|
51013
|
+
(table.internalProps.overscrollBehavior === 'none' ||
|
|
51014
|
+
(Math.abs(deltaY) >= Math.abs(deltaX) && deltaY !== 0 && isVerticalScrollable(deltaY, stateManeger)) ||
|
|
50874
51015
|
(Math.abs(deltaY) <= Math.abs(deltaX) && deltaX !== 0 && isHorizontalScrollable(deltaX, stateManeger)))) {
|
|
50875
51016
|
e.preventDefault();
|
|
50876
51017
|
}
|
|
@@ -51165,7 +51306,7 @@
|
|
|
51165
51306
|
}
|
|
51166
51307
|
dealMenuHover(eventArgsSet) {
|
|
51167
51308
|
}
|
|
51168
|
-
dealTableSelect(eventArgsSet) {
|
|
51309
|
+
dealTableSelect(eventArgsSet, isSelectMoving) {
|
|
51169
51310
|
if (!eventArgsSet) {
|
|
51170
51311
|
this.table.stateManeger.updateSelectPos(-1, -1);
|
|
51171
51312
|
return false;
|
|
@@ -51176,10 +51317,17 @@
|
|
|
51176
51317
|
return false;
|
|
51177
51318
|
}
|
|
51178
51319
|
const define = this.table.getBodyColumnDefine(eventArgs.col, eventArgs.row);
|
|
51179
|
-
if (this.table.isHeader(eventArgs.col, eventArgs.row) &&
|
|
51320
|
+
if (this.table.isHeader(eventArgs.col, eventArgs.row) &&
|
|
51321
|
+
(define?.disableHeaderSelect || this.table.stateManeger.select?.disableHeader)) {
|
|
51322
|
+
if (!isSelectMoving) {
|
|
51323
|
+
this.table.stateManeger.updateSelectPos(-1, -1);
|
|
51324
|
+
}
|
|
51180
51325
|
return false;
|
|
51181
51326
|
}
|
|
51182
51327
|
else if (!this.table.isHeader(eventArgs.col, eventArgs.row) && define?.disableSelect) {
|
|
51328
|
+
if (!isSelectMoving) {
|
|
51329
|
+
this.table.stateManeger.updateSelectPos(-1, -1);
|
|
51330
|
+
}
|
|
51183
51331
|
return false;
|
|
51184
51332
|
}
|
|
51185
51333
|
if (this.table.isPivotChart() &&
|
|
@@ -51670,7 +51818,7 @@
|
|
|
51670
51818
|
margin-right: 15px;
|
|
51671
51819
|
}
|
|
51672
51820
|
`;
|
|
51673
|
-
document.
|
|
51821
|
+
document.head.appendChild(styleElement);
|
|
51674
51822
|
}
|
|
51675
51823
|
|
|
51676
51824
|
importStyle$1();
|
|
@@ -52600,7 +52748,7 @@
|
|
|
52600
52748
|
border: 1px solid #E6E8ED;
|
|
52601
52749
|
}
|
|
52602
52750
|
`;
|
|
52603
|
-
document.
|
|
52751
|
+
document.head.appendChild(styleElement);
|
|
52604
52752
|
}
|
|
52605
52753
|
|
|
52606
52754
|
importStyle();
|
|
@@ -54093,7 +54241,7 @@
|
|
|
54093
54241
|
return TABLE_EVENT_TYPE;
|
|
54094
54242
|
}
|
|
54095
54243
|
options;
|
|
54096
|
-
version = "0.13.4
|
|
54244
|
+
version = "0.13.4";
|
|
54097
54245
|
pagination;
|
|
54098
54246
|
id = `VTable${Date.now()}`;
|
|
54099
54247
|
headerStyleCache;
|
|
@@ -54105,7 +54253,7 @@
|
|
|
54105
54253
|
if (!container && options.mode !== 'node') {
|
|
54106
54254
|
throw new Error("vtable's container is undefined");
|
|
54107
54255
|
}
|
|
54108
|
-
const { frozenColCount = 0, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth, widthMode = 'standard', heightMode = 'standard', autoFillWidth = false, autoFillHeight = false, keyboardOptions, columnResizeMode, dragHeaderMode, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, customRender, pixelRatio = defaultPixelRatio, renderChartAsync, renderChartAsyncBatchCount, mode, modeParams, canvasWidth, canvasHeight } = options;
|
|
54256
|
+
const { frozenColCount = 0, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth, widthMode = 'standard', heightMode = 'standard', autoFillWidth = false, autoFillHeight = false, keyboardOptions, columnResizeMode, dragHeaderMode, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, customRender, pixelRatio = defaultPixelRatio, renderChartAsync, renderChartAsyncBatchCount, mode, modeParams, canvasWidth, canvasHeight, overscrollBehavior } = options;
|
|
54109
54257
|
this.container = container;
|
|
54110
54258
|
this.options = options;
|
|
54111
54259
|
this.options.container = container;
|
|
@@ -54157,6 +54305,7 @@
|
|
|
54157
54305
|
internalProps.dragHeaderMode = dragHeaderMode;
|
|
54158
54306
|
internalProps.renderChartAsync = renderChartAsync;
|
|
54159
54307
|
setBatchRenderChartCount(renderChartAsyncBatchCount);
|
|
54308
|
+
internalProps.overscrollBehavior = overscrollBehavior ?? 'auto';
|
|
54160
54309
|
internalProps._rowHeightsMap = new NumberMap();
|
|
54161
54310
|
internalProps._rowRangeHeightsMap = new Map();
|
|
54162
54311
|
internalProps._colRangeWidthsMap = new Map();
|
|
@@ -54971,6 +55120,51 @@
|
|
|
54971
55120
|
}
|
|
54972
55121
|
return count;
|
|
54973
55122
|
}
|
|
55123
|
+
getBodyVisibleCellRange() {
|
|
55124
|
+
const { scrollTop, scrollLeft } = this;
|
|
55125
|
+
const frozenRowsHeight = this.getFrozenRowsHeight();
|
|
55126
|
+
const frozenColsWidth = this.getFrozenColsWidth();
|
|
55127
|
+
const bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight();
|
|
55128
|
+
const rightFrozenColsWidth = this.getRightFrozenColsWidth();
|
|
55129
|
+
const { row: rowStart } = this.getRowAt(scrollTop + frozenRowsHeight + 1);
|
|
55130
|
+
const { col: colStart } = this.getColAt(scrollLeft + frozenColsWidth + 1);
|
|
55131
|
+
const rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight
|
|
55132
|
+
? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight).row
|
|
55133
|
+
: this.rowCount - 1;
|
|
55134
|
+
const colEnd = this.getAllColsWidth() > this.tableNoFrameWidth
|
|
55135
|
+
? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth).col
|
|
55136
|
+
: this.colCount - 1;
|
|
55137
|
+
if (colEnd < 0 || rowEnd < 0) {
|
|
55138
|
+
return null;
|
|
55139
|
+
}
|
|
55140
|
+
return { rowStart, colStart, rowEnd, colEnd };
|
|
55141
|
+
}
|
|
55142
|
+
getBodyVisibleRowRange() {
|
|
55143
|
+
const { scrollTop } = this;
|
|
55144
|
+
const frozenRowsHeight = this.getFrozenRowsHeight();
|
|
55145
|
+
const bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight();
|
|
55146
|
+
const { row: rowStart } = this.getRowAt(scrollTop + frozenRowsHeight + 1);
|
|
55147
|
+
const rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight
|
|
55148
|
+
? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight).row
|
|
55149
|
+
: this.rowCount - 1;
|
|
55150
|
+
if (rowEnd < 0) {
|
|
55151
|
+
return null;
|
|
55152
|
+
}
|
|
55153
|
+
return { rowStart, rowEnd };
|
|
55154
|
+
}
|
|
55155
|
+
getBodyVisibleColRange() {
|
|
55156
|
+
const { scrollLeft } = this;
|
|
55157
|
+
const frozenColsWidth = this.getFrozenColsWidth();
|
|
55158
|
+
const rightFrozenColsWidth = this.getRightFrozenColsWidth();
|
|
55159
|
+
const { col: colStart } = this.getColAt(scrollLeft + frozenColsWidth + 1);
|
|
55160
|
+
const colEnd = this.getAllColsWidth() > this.tableNoFrameWidth
|
|
55161
|
+
? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth).col
|
|
55162
|
+
: this.colCount - 1;
|
|
55163
|
+
if (colEnd < 0) {
|
|
55164
|
+
return null;
|
|
55165
|
+
}
|
|
55166
|
+
return { colStart, colEnd };
|
|
55167
|
+
}
|
|
54974
55168
|
get visibleColCount() {
|
|
54975
55169
|
const { frozenColCount } = this;
|
|
54976
55170
|
const visibleRect = this.getVisibleRect();
|
|
@@ -55055,7 +55249,7 @@
|
|
|
55055
55249
|
}
|
|
55056
55250
|
updateOption(options) {
|
|
55057
55251
|
this.options = options;
|
|
55058
|
-
const { frozenColCount = 0, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth = 80, keyboardOptions, columnResizeMode, dragHeaderMode, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, pixelRatio, widthMode, heightMode, autoFillWidth, autoFillHeight, customRender, renderChartAsync, renderChartAsyncBatchCount } = options;
|
|
55252
|
+
const { frozenColCount = 0, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth = 80, keyboardOptions, columnResizeMode, dragHeaderMode, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, pixelRatio, widthMode, heightMode, autoFillWidth, autoFillHeight, customRender, renderChartAsync, renderChartAsyncBatchCount, overscrollBehavior } = options;
|
|
55059
55253
|
if (pixelRatio && pixelRatio !== this.internalProps.pixelRatio) {
|
|
55060
55254
|
this.internalProps.pixelRatio = pixelRatio;
|
|
55061
55255
|
}
|
|
@@ -55096,6 +55290,7 @@
|
|
|
55096
55290
|
internalProps.dragHeaderMode = dragHeaderMode;
|
|
55097
55291
|
internalProps.renderChartAsync = renderChartAsync;
|
|
55098
55292
|
setBatchRenderChartCount(renderChartAsyncBatchCount);
|
|
55293
|
+
internalProps.overscrollBehavior = overscrollBehavior ?? 'auto';
|
|
55099
55294
|
internalProps.cellTextOverflows = {};
|
|
55100
55295
|
internalProps._rowHeightsMap = new NumberMap();
|
|
55101
55296
|
internalProps._rowRangeHeightsMap = new Map();
|
|
@@ -63038,67 +63233,70 @@
|
|
|
63038
63233
|
}
|
|
63039
63234
|
getChartInstance(cellHeaderPaths) {
|
|
63040
63235
|
const cellAddr = this.getCellAddressByHeaderPaths(cellHeaderPaths);
|
|
63041
|
-
|
|
63042
|
-
|
|
63043
|
-
|
|
63044
|
-
|
|
63045
|
-
|
|
63046
|
-
|
|
63047
|
-
|
|
63048
|
-
|
|
63049
|
-
|
|
63050
|
-
|
|
63051
|
-
|
|
63052
|
-
|
|
63053
|
-
|
|
63054
|
-
|
|
63055
|
-
|
|
63056
|
-
|
|
63057
|
-
|
|
63058
|
-
|
|
63059
|
-
|
|
63060
|
-
|
|
63236
|
+
if (cellAddr) {
|
|
63237
|
+
const cellPosition = this.getCellRelativeRect(cellAddr.col, cellAddr.row);
|
|
63238
|
+
const cellGroup = this.scenegraph.getCell(cellAddr.col, cellAddr.row);
|
|
63239
|
+
let chartInstance;
|
|
63240
|
+
const chartNode = cellGroup?.getChildren()?.[0];
|
|
63241
|
+
if (chartNode.attribute.chartInstance) {
|
|
63242
|
+
chartInstance = chartNode.attribute.chartInstance;
|
|
63243
|
+
const { dataId, data, axes, spec } = chartNode.attribute;
|
|
63244
|
+
const viewBox = chartNode.getViewBox();
|
|
63245
|
+
axes.forEach((axis, index) => {
|
|
63246
|
+
if (axis.type === 'linear') {
|
|
63247
|
+
const chartAxis = chartInstance._chart._components[index];
|
|
63248
|
+
chartAxis._domain = {
|
|
63249
|
+
min: axis.range?.min ?? 0,
|
|
63250
|
+
max: axis.range?.max ?? 0
|
|
63251
|
+
};
|
|
63252
|
+
}
|
|
63253
|
+
else if (axis.type === 'band') {
|
|
63254
|
+
const chartAxis = chartInstance._chart._components[index];
|
|
63255
|
+
chartAxis._spec.domain = axis.domain.slice(0);
|
|
63256
|
+
chartAxis.updateScaleDomain();
|
|
63257
|
+
}
|
|
63258
|
+
});
|
|
63259
|
+
chartInstance.updateViewBox({
|
|
63260
|
+
x1: viewBox.x1 - chartNode.getRootNode().table.scrollLeft,
|
|
63261
|
+
x2: viewBox.x2 - chartNode.getRootNode().table.scrollLeft,
|
|
63262
|
+
y1: viewBox.y1 - chartNode.getRootNode().table.scrollTop,
|
|
63263
|
+
y2: viewBox.y2 - chartNode.getRootNode().table.scrollTop
|
|
63264
|
+
}, false, false);
|
|
63265
|
+
if (typeof dataId === 'string') {
|
|
63266
|
+
chartInstance.updateDataSync(dataId, data ?? []);
|
|
63061
63267
|
}
|
|
63062
|
-
|
|
63063
|
-
|
|
63064
|
-
|
|
63065
|
-
|
|
63066
|
-
|
|
63067
|
-
|
|
63068
|
-
|
|
63069
|
-
|
|
63070
|
-
|
|
63071
|
-
|
|
63072
|
-
|
|
63073
|
-
|
|
63074
|
-
|
|
63075
|
-
|
|
63076
|
-
|
|
63077
|
-
|
|
63078
|
-
|
|
63079
|
-
|
|
63080
|
-
|
|
63081
|
-
|
|
63082
|
-
|
|
63083
|
-
: data ?? [],
|
|
63084
|
-
fields: series?.data?.fields
|
|
63085
|
-
});
|
|
63086
|
-
if (!chartInstance.updateFullDataSync) {
|
|
63087
|
-
chartInstance.updateDataSync(dataIdStr, dataIdAndField
|
|
63088
|
-
? data?.filter((item) => {
|
|
63089
|
-
return item.hasOwnProperty(dataIdAndField);
|
|
63090
|
-
}) ?? []
|
|
63091
|
-
: data ?? []);
|
|
63268
|
+
else {
|
|
63269
|
+
const dataBatch = [];
|
|
63270
|
+
for (const dataIdStr in dataId) {
|
|
63271
|
+
const dataIdAndField = dataId[dataIdStr];
|
|
63272
|
+
const series = spec.series.find((item) => item?.data?.id === dataIdStr);
|
|
63273
|
+
dataBatch.push({
|
|
63274
|
+
id: dataIdStr,
|
|
63275
|
+
values: dataIdAndField
|
|
63276
|
+
? data?.filter((item) => {
|
|
63277
|
+
return item.hasOwnProperty(dataIdAndField);
|
|
63278
|
+
}) ?? []
|
|
63279
|
+
: data ?? [],
|
|
63280
|
+
fields: series?.data?.fields
|
|
63281
|
+
});
|
|
63282
|
+
if (!chartInstance.updateFullDataSync) {
|
|
63283
|
+
chartInstance.updateDataSync(dataIdStr, dataIdAndField
|
|
63284
|
+
? data?.filter((item) => {
|
|
63285
|
+
return item.hasOwnProperty(dataIdAndField);
|
|
63286
|
+
}) ?? []
|
|
63287
|
+
: data ?? []);
|
|
63288
|
+
}
|
|
63092
63289
|
}
|
|
63290
|
+
chartInstance.updateFullDataSync?.(dataBatch);
|
|
63093
63291
|
}
|
|
63094
|
-
|
|
63292
|
+
this.render();
|
|
63095
63293
|
}
|
|
63096
|
-
|
|
63294
|
+
return {
|
|
63295
|
+
chartInstance,
|
|
63296
|
+
bounds: cellPosition.bounds
|
|
63297
|
+
};
|
|
63097
63298
|
}
|
|
63098
|
-
return {
|
|
63099
|
-
chartInstance,
|
|
63100
|
-
bounds: cellPosition.bounds
|
|
63101
|
-
};
|
|
63299
|
+
return {};
|
|
63102
63300
|
}
|
|
63103
63301
|
_getDimensionSortArray() {
|
|
63104
63302
|
if (this.options?.axes?.length) {
|
|
@@ -63117,180 +63315,569 @@
|
|
|
63117
63315
|
}
|
|
63118
63316
|
}
|
|
63119
63317
|
|
|
63120
|
-
class
|
|
63318
|
+
class BaseElement {
|
|
63319
|
+
type;
|
|
63320
|
+
id;
|
|
63321
|
+
x = 0;
|
|
63322
|
+
y = 0;
|
|
63323
|
+
width = 0;
|
|
63324
|
+
height = 0;
|
|
63325
|
+
marginLeft;
|
|
63326
|
+
marginRight;
|
|
63327
|
+
marginTop;
|
|
63328
|
+
marginBottom;
|
|
63329
|
+
layoutWidth;
|
|
63330
|
+
layoutHeight;
|
|
63331
|
+
dx = 0;
|
|
63332
|
+
dy = 0;
|
|
63333
|
+
background;
|
|
63121
63334
|
constructor(options) {
|
|
63122
|
-
|
|
63123
|
-
|
|
63124
|
-
|
|
63125
|
-
|
|
63126
|
-
|
|
63127
|
-
|
|
63128
|
-
|
|
63129
|
-
|
|
63130
|
-
|
|
63131
|
-
|
|
63132
|
-
|
|
63133
|
-
|
|
63134
|
-
|
|
63335
|
+
this.id = options.id;
|
|
63336
|
+
this.marginLeft = options.marginLeft ?? 0;
|
|
63337
|
+
this.marginRight = options.marginRight ?? 0;
|
|
63338
|
+
this.marginTop = options.marginTop ?? 0;
|
|
63339
|
+
this.marginBottom = options.marginBottom ?? 0;
|
|
63340
|
+
this.background = options.background || undefined;
|
|
63341
|
+
}
|
|
63342
|
+
getSize(table) {
|
|
63343
|
+
this.initLayoutSize();
|
|
63344
|
+
}
|
|
63345
|
+
initLayoutSize() {
|
|
63346
|
+
this.layoutWidth = this.width + this.marginLeft + this.marginRight;
|
|
63347
|
+
this.layoutHeight = this.height + this.marginTop + this.marginBottom;
|
|
63348
|
+
if (this.background) {
|
|
63349
|
+
this.layoutWidth += (this.background.expandX || 0) * 2;
|
|
63350
|
+
this.layoutHeight += (this.background.expandY || 0) * 2;
|
|
63351
|
+
}
|
|
63352
|
+
this.dx = this.marginLeft;
|
|
63353
|
+
this.dy = this.marginTop;
|
|
63135
63354
|
}
|
|
63136
63355
|
}
|
|
63137
63356
|
|
|
63138
|
-
class
|
|
63139
|
-
|
|
63140
|
-
|
|
63141
|
-
|
|
63142
|
-
|
|
63143
|
-
|
|
63144
|
-
|
|
63145
|
-
|
|
63146
|
-
|
|
63147
|
-
|
|
63148
|
-
|
|
63149
|
-
|
|
63150
|
-
|
|
63151
|
-
|
|
63152
|
-
|
|
63153
|
-
|
|
63154
|
-
|
|
63155
|
-
|
|
63156
|
-
|
|
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);
|
|
63357
|
+
class Circle extends BaseElement {
|
|
63358
|
+
type = 'circle';
|
|
63359
|
+
radius;
|
|
63360
|
+
radian;
|
|
63361
|
+
lineWidth;
|
|
63362
|
+
fill;
|
|
63363
|
+
stroke;
|
|
63364
|
+
constructor(options) {
|
|
63365
|
+
super(options);
|
|
63366
|
+
this.radius = options.radius;
|
|
63367
|
+
this.radian = options.radian;
|
|
63368
|
+
this.lineWidth = options.lineWidth;
|
|
63369
|
+
this.fill = options.fill;
|
|
63370
|
+
this.stroke = options.stroke;
|
|
63371
|
+
this.width = this.radius * 2;
|
|
63372
|
+
this.height = this.radius * 2;
|
|
63373
|
+
this.initLayoutSize();
|
|
63374
|
+
this.dx += this.radius;
|
|
63375
|
+
this.dy += this.radius;
|
|
63185
63376
|
}
|
|
63186
63377
|
}
|
|
63187
63378
|
|
|
63188
|
-
|
|
63189
|
-
|
|
63190
|
-
|
|
63191
|
-
|
|
63379
|
+
const DIRECTION_KEY = {
|
|
63380
|
+
row: {
|
|
63381
|
+
x: 'x',
|
|
63382
|
+
y: 'y',
|
|
63383
|
+
width: 'width',
|
|
63384
|
+
height: 'height',
|
|
63385
|
+
layoutWidth: 'layoutWidth',
|
|
63386
|
+
layoutHeight: 'layoutHeight',
|
|
63387
|
+
widthLimit: 'widthLimit',
|
|
63388
|
+
heightLimit: 'heightLimit',
|
|
63389
|
+
parentX: 'parentX',
|
|
63390
|
+
parentY: 'parentY',
|
|
63391
|
+
dx: 'dx',
|
|
63392
|
+
dy: 'dy'
|
|
63393
|
+
},
|
|
63394
|
+
column: {
|
|
63395
|
+
x: 'y',
|
|
63396
|
+
y: 'x',
|
|
63397
|
+
width: 'height',
|
|
63398
|
+
height: 'width',
|
|
63399
|
+
layoutWidth: 'layoutHeight',
|
|
63400
|
+
layoutHeight: 'layoutWidth',
|
|
63401
|
+
widthLimit: 'heightLimit',
|
|
63402
|
+
heightLimit: 'widthLimit',
|
|
63403
|
+
parentX: 'parentY',
|
|
63404
|
+
parentY: 'parentX',
|
|
63405
|
+
dx: 'dy',
|
|
63406
|
+
dy: 'dx'
|
|
63407
|
+
}
|
|
63408
|
+
};
|
|
63409
|
+
|
|
63410
|
+
class Line {
|
|
63411
|
+
width = 0;
|
|
63412
|
+
height = 0;
|
|
63413
|
+
y = 0;
|
|
63414
|
+
x = 0;
|
|
63415
|
+
children = [];
|
|
63416
|
+
addAble = true;
|
|
63417
|
+
widthLimit = 0;
|
|
63418
|
+
heightLimit = 0;
|
|
63419
|
+
direction;
|
|
63420
|
+
directionKey;
|
|
63421
|
+
offsetX = 0;
|
|
63422
|
+
justifyContent;
|
|
63423
|
+
alignItems;
|
|
63424
|
+
constructor(widthLimit, direction, justifyContent, alignItems) {
|
|
63425
|
+
this.direction = direction;
|
|
63426
|
+
this.directionKey = DIRECTION_KEY[this.direction];
|
|
63427
|
+
this.justifyContent = justifyContent;
|
|
63428
|
+
this.alignItems = alignItems;
|
|
63429
|
+
this[this.directionKey.widthLimit] = widthLimit;
|
|
63430
|
+
}
|
|
63431
|
+
add(element) {
|
|
63432
|
+
element[this.directionKey.x] = this[this.directionKey.width];
|
|
63433
|
+
this[this.directionKey.width] += element[this.directionKey.layoutWidth];
|
|
63434
|
+
this.children.push(element);
|
|
63435
|
+
this.updateHeight(element);
|
|
63436
|
+
}
|
|
63437
|
+
canAdd(element) {
|
|
63438
|
+
if (this[this.directionKey.width] + element[this.directionKey.layoutWidth] > this[this.directionKey.widthLimit]) {
|
|
63439
|
+
return false;
|
|
63440
|
+
}
|
|
63441
|
+
return true;
|
|
63442
|
+
}
|
|
63443
|
+
updateHeight(element) {
|
|
63444
|
+
if (element[this.directionKey.layoutHeight] > this[this.directionKey.height]) {
|
|
63445
|
+
this[this.directionKey.height] = element[this.directionKey.layoutHeight];
|
|
63446
|
+
}
|
|
63447
|
+
}
|
|
63448
|
+
lineFinish() {
|
|
63449
|
+
this.updateXAlign();
|
|
63450
|
+
}
|
|
63451
|
+
updateXAlign() {
|
|
63452
|
+
const offsetX = this[this.directionKey.widthLimit] - this[this.directionKey.width];
|
|
63453
|
+
if (this.justifyContent === 'center') {
|
|
63454
|
+
this.offsetX = offsetX / 2;
|
|
63455
|
+
}
|
|
63456
|
+
else if (this.justifyContent === 'start') {
|
|
63457
|
+
this.offsetX = 0;
|
|
63458
|
+
}
|
|
63459
|
+
else {
|
|
63460
|
+
this.offsetX = offsetX;
|
|
63461
|
+
}
|
|
63462
|
+
}
|
|
63463
|
+
getOffsetY(element) {
|
|
63464
|
+
switch (this.alignItems) {
|
|
63465
|
+
case 'start':
|
|
63466
|
+
return 0;
|
|
63467
|
+
case 'center':
|
|
63468
|
+
return (this[this.directionKey.height] - element[this.directionKey.layoutHeight]) / 2;
|
|
63469
|
+
case 'end':
|
|
63470
|
+
return this[this.directionKey.height] - element[this.directionKey.layoutHeight];
|
|
63471
|
+
default:
|
|
63472
|
+
return 0;
|
|
63473
|
+
}
|
|
63474
|
+
}
|
|
63475
|
+
getContentSize() {
|
|
63476
|
+
const result = {
|
|
63477
|
+
width: 0,
|
|
63478
|
+
height: 0
|
|
63479
|
+
};
|
|
63480
|
+
for (let i = 0; i < this.children.length; i++) {
|
|
63481
|
+
const element = this.children[i];
|
|
63482
|
+
let size;
|
|
63483
|
+
if (element.type === 'container') {
|
|
63484
|
+
size = element.getContentSize();
|
|
63485
|
+
}
|
|
63486
|
+
else {
|
|
63487
|
+
size = {
|
|
63488
|
+
width: element.layoutWidth,
|
|
63489
|
+
height: element.layoutHeight
|
|
63490
|
+
};
|
|
63491
|
+
}
|
|
63492
|
+
if (result[this.directionKey.height] < size[this.directionKey.height]) {
|
|
63493
|
+
result[this.directionKey.height] = size[this.directionKey.height];
|
|
63494
|
+
}
|
|
63495
|
+
result[this.directionKey.width] += size[this.directionKey.width];
|
|
63496
|
+
}
|
|
63497
|
+
return result;
|
|
63498
|
+
}
|
|
63499
|
+
getElements(parentPos = { parentX: 0, parentY: 0 }, isHover = false, isSelect = false) {
|
|
63500
|
+
const elements = [];
|
|
63501
|
+
for (let i = 0; i < this.children.length; i++) {
|
|
63502
|
+
const element = this.children[i];
|
|
63503
|
+
if (element.type === 'container' || element.type === 'group-element') {
|
|
63504
|
+
const childElements = element.getElements({
|
|
63505
|
+
[this.directionKey.parentX]: this.offsetX + this[this.directionKey.x] + parentPos.parentX,
|
|
63506
|
+
[this.directionKey.parentY]: this.getOffsetY(element) + this[this.directionKey.y] + parentPos.parentY
|
|
63507
|
+
}, isHover, isSelect);
|
|
63508
|
+
elements.push(...childElements);
|
|
63509
|
+
}
|
|
63510
|
+
else {
|
|
63511
|
+
if (element.type === 'icon' &&
|
|
63512
|
+
((element.cache?.visibleTime === 'mouseenter_cell' && !isHover) ||
|
|
63513
|
+
(element.cache?.visibleTime === 'click_cell' && !isSelect))) {
|
|
63514
|
+
continue;
|
|
63515
|
+
}
|
|
63516
|
+
element[this.directionKey.x] += this.offsetX + this[this.directionKey.x] + parentPos.parentX;
|
|
63517
|
+
element[this.directionKey.y] += this.getOffsetY(element) + this[this.directionKey.y] + parentPos.parentY;
|
|
63518
|
+
elements.push(element);
|
|
63519
|
+
}
|
|
63520
|
+
}
|
|
63521
|
+
return elements;
|
|
63192
63522
|
}
|
|
63193
63523
|
}
|
|
63194
63524
|
|
|
63195
|
-
class
|
|
63196
|
-
|
|
63197
|
-
|
|
63198
|
-
|
|
63525
|
+
class Rect extends BaseElement {
|
|
63526
|
+
type = 'rect';
|
|
63527
|
+
lineWidth;
|
|
63528
|
+
cornerRadius;
|
|
63529
|
+
radius;
|
|
63530
|
+
fill;
|
|
63531
|
+
stroke;
|
|
63532
|
+
constructor(options) {
|
|
63533
|
+
super(options);
|
|
63534
|
+
this.width = options.width;
|
|
63535
|
+
this.height = options.height;
|
|
63536
|
+
this.lineWidth = options.lineWidth || 0;
|
|
63537
|
+
this.cornerRadius = options.cornerRadius || 0;
|
|
63538
|
+
this.radius = this.cornerRadius;
|
|
63539
|
+
this.fill = options.fill || '#777';
|
|
63540
|
+
this.stroke = options.stroke || undefined;
|
|
63541
|
+
this.initLayoutSize();
|
|
63542
|
+
}
|
|
63543
|
+
}
|
|
63544
|
+
|
|
63545
|
+
class Container extends BaseElement {
|
|
63546
|
+
type = 'container';
|
|
63547
|
+
_widthObj;
|
|
63548
|
+
_heightObj;
|
|
63549
|
+
needCalcSize = false;
|
|
63550
|
+
direction;
|
|
63551
|
+
justifyContent;
|
|
63552
|
+
alignItems;
|
|
63553
|
+
alignContent;
|
|
63554
|
+
lines = [];
|
|
63555
|
+
currentLine;
|
|
63556
|
+
currentLineY = 0;
|
|
63557
|
+
table;
|
|
63558
|
+
directionKey;
|
|
63559
|
+
showBounds;
|
|
63560
|
+
offsetY = 0;
|
|
63561
|
+
isRoot;
|
|
63199
63562
|
constructor(options) {
|
|
63200
|
-
let cache;
|
|
63201
|
-
if (isString$3(options.iconName)) {
|
|
63202
|
-
const regedIcons = get$1();
|
|
63203
|
-
cache = regedIcons[options.iconName];
|
|
63204
|
-
if (cache) {
|
|
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
63563
|
super(options);
|
|
63227
|
-
this.
|
|
63564
|
+
this.direction = options.direction || 'row';
|
|
63565
|
+
this.justifyContent = options.justifyContent || 'start';
|
|
63566
|
+
this.alignItems = options.alignItems || 'start';
|
|
63567
|
+
this.alignContent = options.alignContent || 'start';
|
|
63568
|
+
if (isNumber$6(options.width)) {
|
|
63569
|
+
this.width = options.width;
|
|
63570
|
+
}
|
|
63571
|
+
else {
|
|
63572
|
+
this._widthObj = options.width;
|
|
63573
|
+
this.needCalcSize = true;
|
|
63574
|
+
}
|
|
63575
|
+
if (isNumber$6(options.height)) {
|
|
63576
|
+
this.height = options.height;
|
|
63577
|
+
}
|
|
63578
|
+
else {
|
|
63579
|
+
this._heightObj = options.height;
|
|
63580
|
+
this.needCalcSize = true;
|
|
63581
|
+
}
|
|
63582
|
+
this.directionKey = DIRECTION_KEY[this.direction];
|
|
63583
|
+
this.showBounds = options.showBounds || false;
|
|
63584
|
+
this.initLayoutSize();
|
|
63228
63585
|
}
|
|
63229
|
-
|
|
63230
|
-
|
|
63231
|
-
|
|
63586
|
+
add(element) {
|
|
63587
|
+
if (this.needCalcSize) {
|
|
63588
|
+
throw new Error('Need to specify a parent element before adding a child element when use percent size!');
|
|
63589
|
+
}
|
|
63590
|
+
if (element.type === 'container') {
|
|
63591
|
+
element.calcSize(this.width, this.height);
|
|
63592
|
+
}
|
|
63593
|
+
if (this.currentLine && this.currentLine.canAdd(element)) {
|
|
63594
|
+
this.currentLine.add(element);
|
|
63595
|
+
}
|
|
63596
|
+
else {
|
|
63597
|
+
if (this.currentLine) {
|
|
63598
|
+
this.currentLine.addAble = false;
|
|
63599
|
+
this.currentLineY += this.currentLine[this.directionKey.height];
|
|
63600
|
+
this.currentLine.lineFinish();
|
|
63601
|
+
}
|
|
63602
|
+
this.currentLine = new Line(this[this.directionKey.width], this.direction, this.justifyContent, this.alignItems);
|
|
63603
|
+
this.currentLine[this.directionKey.y] = this.currentLineY;
|
|
63604
|
+
this.currentLine.add(element);
|
|
63605
|
+
this.lines.push(this.currentLine);
|
|
63606
|
+
}
|
|
63607
|
+
}
|
|
63608
|
+
updateYAlign() {
|
|
63609
|
+
const offsetY = this[this.directionKey.height] - this.currentLineY;
|
|
63610
|
+
if (this.alignContent === 'center') {
|
|
63611
|
+
this.offsetY = offsetY / 2;
|
|
63612
|
+
}
|
|
63613
|
+
else if (this.alignContent === 'start') {
|
|
63614
|
+
this.offsetY = 0;
|
|
63615
|
+
}
|
|
63616
|
+
else {
|
|
63617
|
+
this.offsetY = offsetY;
|
|
63618
|
+
}
|
|
63619
|
+
}
|
|
63620
|
+
getSize() {
|
|
63621
|
+
const result = {
|
|
63622
|
+
width: 0,
|
|
63623
|
+
height: 0
|
|
63624
|
+
};
|
|
63625
|
+
if (this.currentLine && this.currentLine.addAble) {
|
|
63626
|
+
result[this.directionKey.height] = this.currentLineY + this.currentLine[this.directionKey.height];
|
|
63627
|
+
}
|
|
63628
|
+
else {
|
|
63629
|
+
result[this.directionKey.height] = this.currentLineY;
|
|
63630
|
+
}
|
|
63631
|
+
for (let i = 0; i < this.lines.length; i++) {
|
|
63632
|
+
const line = this.lines[i];
|
|
63633
|
+
if (result[this.directionKey.width] < line[this.directionKey.width]) {
|
|
63634
|
+
result[this.directionKey.width] = line[this.directionKey.width];
|
|
63635
|
+
}
|
|
63636
|
+
}
|
|
63637
|
+
return result;
|
|
63638
|
+
}
|
|
63639
|
+
getContentSize() {
|
|
63640
|
+
const result = {
|
|
63641
|
+
width: 0,
|
|
63642
|
+
height: 0
|
|
63643
|
+
};
|
|
63644
|
+
const calcFlag = {
|
|
63645
|
+
width: true,
|
|
63646
|
+
height: true
|
|
63647
|
+
};
|
|
63648
|
+
if (!this.isRoot && !this._heightObj) {
|
|
63649
|
+
calcFlag.height = false;
|
|
63650
|
+
result.height = this.height;
|
|
63651
|
+
}
|
|
63652
|
+
if (!this.isRoot && !this._widthObj) {
|
|
63653
|
+
calcFlag.width = false;
|
|
63654
|
+
result.width = this.width;
|
|
63655
|
+
}
|
|
63656
|
+
for (let i = 0; i < this.lines.length; i++) {
|
|
63657
|
+
const line = this.lines[i];
|
|
63658
|
+
const size = line.getContentSize();
|
|
63659
|
+
if (calcFlag[this.directionKey.width] && result[this.directionKey.width] < size[this.directionKey.width]) {
|
|
63660
|
+
result[this.directionKey.width] = size[this.directionKey.width];
|
|
63661
|
+
}
|
|
63662
|
+
if (calcFlag[this.directionKey.height]) {
|
|
63663
|
+
result[this.directionKey.height] += size[this.directionKey.height];
|
|
63664
|
+
}
|
|
63665
|
+
}
|
|
63666
|
+
return result;
|
|
63667
|
+
}
|
|
63668
|
+
calcSize(parentWidth, parentHeight) {
|
|
63669
|
+
if (this._heightObj) {
|
|
63670
|
+
this.height = (parentHeight * this._heightObj.percent) / 100 + this._heightObj.delta;
|
|
63671
|
+
this.needCalcSize = false;
|
|
63672
|
+
this.initLayoutSize();
|
|
63673
|
+
}
|
|
63674
|
+
if (this._widthObj) {
|
|
63675
|
+
this.width = (parentWidth * this._widthObj.percent) / 100 + this._widthObj.delta;
|
|
63676
|
+
this.needCalcSize = false;
|
|
63677
|
+
this.initLayoutSize();
|
|
63678
|
+
}
|
|
63679
|
+
}
|
|
63680
|
+
getElements(parentPos = { parentX: 0, parentY: 0 }, isHover = false, isSelect = false) {
|
|
63681
|
+
if (this.currentLine && this.currentLine.addAble) {
|
|
63682
|
+
this.currentLine.addAble = false;
|
|
63683
|
+
this.currentLineY += this.currentLine[this.directionKey.height];
|
|
63684
|
+
this.currentLine.lineFinish();
|
|
63685
|
+
}
|
|
63686
|
+
this.updateYAlign();
|
|
63687
|
+
const elements = [];
|
|
63688
|
+
if (this.background && this.background.fill) {
|
|
63689
|
+
const backgroundRect = new Rect({
|
|
63690
|
+
width: this.width,
|
|
63691
|
+
height: this.height,
|
|
63692
|
+
stroke: this.background.stroke ?? false,
|
|
63693
|
+
fill: this.background.fill,
|
|
63694
|
+
cornerRadius: this.background.cornerRadius ?? 0,
|
|
63695
|
+
lineWidth: this.background.lineWidth ?? 1
|
|
63696
|
+
});
|
|
63697
|
+
backgroundRect.x += this.x + parentPos.parentX;
|
|
63698
|
+
backgroundRect.y += this.y + parentPos.parentY;
|
|
63699
|
+
elements.push(backgroundRect);
|
|
63700
|
+
}
|
|
63701
|
+
if (this.showBounds) {
|
|
63702
|
+
const boundsRect = new Rect({
|
|
63703
|
+
width: this.width,
|
|
63704
|
+
height: this.height,
|
|
63705
|
+
cornerRadius: 0,
|
|
63706
|
+
stroke: 'red',
|
|
63707
|
+
fill: 'rgba(255, 0, 0, 0.2)',
|
|
63708
|
+
lineWidth: 4
|
|
63709
|
+
});
|
|
63710
|
+
boundsRect.x += this.x + parentPos.parentX;
|
|
63711
|
+
boundsRect.y += this.y + parentPos.parentY;
|
|
63712
|
+
elements.push(boundsRect);
|
|
63713
|
+
}
|
|
63714
|
+
for (let i = 0; i < this.lines.length; i++) {
|
|
63715
|
+
const line = this.lines[i];
|
|
63716
|
+
line[this.directionKey.y] += this.offsetY;
|
|
63717
|
+
const linesElements = line.getElements({
|
|
63718
|
+
[this.directionKey.parentX]: this.x + parentPos.parentX,
|
|
63719
|
+
[this.directionKey.parentY]: this.y + parentPos.parentY
|
|
63720
|
+
}, isHover, isSelect);
|
|
63721
|
+
elements.push(...linesElements);
|
|
63722
|
+
}
|
|
63723
|
+
return elements;
|
|
63724
|
+
}
|
|
63725
|
+
}
|
|
63726
|
+
|
|
63727
|
+
class GroupElement extends BaseElement {
|
|
63728
|
+
type = 'group-element';
|
|
63729
|
+
direction;
|
|
63730
|
+
alignItems;
|
|
63731
|
+
width = 0;
|
|
63732
|
+
height = 0;
|
|
63733
|
+
children = [];
|
|
63734
|
+
directionKey;
|
|
63232
63735
|
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
63736
|
super(options);
|
|
63737
|
+
this.direction = options.direction || 'row';
|
|
63738
|
+
this.alignItems = options.alignItems || 'start';
|
|
63739
|
+
this.directionKey = DIRECTION_KEY[this.direction];
|
|
63252
63740
|
}
|
|
63253
|
-
|
|
63741
|
+
add(element) {
|
|
63742
|
+
element.x = this.width;
|
|
63743
|
+
this.width += element.layoutWidth;
|
|
63744
|
+
this.children.push(element);
|
|
63745
|
+
this.updateHeight(element);
|
|
63746
|
+
this.initLayoutSize();
|
|
63747
|
+
}
|
|
63748
|
+
updateHeight(element) {
|
|
63749
|
+
if (element.layoutHeight > this.height) {
|
|
63750
|
+
this.height = element.layoutHeight;
|
|
63751
|
+
}
|
|
63752
|
+
}
|
|
63753
|
+
getOffsetY(element) {
|
|
63754
|
+
switch (this.alignItems) {
|
|
63755
|
+
case 'start':
|
|
63756
|
+
return 0;
|
|
63757
|
+
case 'center':
|
|
63758
|
+
return (this[this.directionKey.height] - element[this.directionKey.layoutHeight]) / 2;
|
|
63759
|
+
case 'end':
|
|
63760
|
+
return this[this.directionKey.height] - element[this.directionKey.layoutHeight];
|
|
63761
|
+
default:
|
|
63762
|
+
return 0;
|
|
63763
|
+
}
|
|
63764
|
+
}
|
|
63765
|
+
getElements(parentPos = { parentX: 0, parentY: 0 }, isHover = false, isSelect = false) {
|
|
63766
|
+
const elements = [];
|
|
63767
|
+
for (let i = 0; i < this.children.length; i++) {
|
|
63768
|
+
const element = this.children[i];
|
|
63769
|
+
if (element.type === 'icon' &&
|
|
63770
|
+
((element.cache?.visibleTime === 'mouseenter_cell' && !isHover) ||
|
|
63771
|
+
(element.cache?.visibleTime === 'click_cell' && !isSelect))) {
|
|
63772
|
+
continue;
|
|
63773
|
+
}
|
|
63774
|
+
element[this.directionKey.x] += this[this.directionKey.dx] + this[this.directionKey.x] + parentPos.parentX;
|
|
63775
|
+
element[this.directionKey.y] +=
|
|
63776
|
+
this.getOffsetY(element) + this[this.directionKey.dy] + this[this.directionKey.y] + parentPos.parentY;
|
|
63777
|
+
elements.push(element);
|
|
63778
|
+
}
|
|
63779
|
+
return elements;
|
|
63780
|
+
}
|
|
63781
|
+
}
|
|
63254
63782
|
|
|
63255
|
-
class
|
|
63783
|
+
class Icon extends BaseElement {
|
|
63784
|
+
type = 'icon';
|
|
63785
|
+
svg;
|
|
63786
|
+
iconName;
|
|
63787
|
+
cursor;
|
|
63788
|
+
cache;
|
|
63256
63789
|
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;
|
|
63269
63790
|
super(options);
|
|
63791
|
+
this.iconName = options.iconName;
|
|
63792
|
+
if (isString$3(this.iconName)) {
|
|
63793
|
+
const regedIcons = get$1();
|
|
63794
|
+
const cache = regedIcons[this.iconName];
|
|
63795
|
+
if (cache) {
|
|
63796
|
+
this.cache = cache;
|
|
63797
|
+
this.width = cache.width;
|
|
63798
|
+
this.height = cache.height;
|
|
63799
|
+
this.svg = cache.svg;
|
|
63800
|
+
this.cursor = cache.cursor;
|
|
63801
|
+
}
|
|
63802
|
+
}
|
|
63803
|
+
this.width = options.width ?? this.width;
|
|
63804
|
+
this.height = options.height ?? this.height;
|
|
63805
|
+
this.svg = options.svg ?? this.svg;
|
|
63806
|
+
this.initLayoutSize();
|
|
63270
63807
|
}
|
|
63271
63808
|
}
|
|
63272
63809
|
|
|
63273
|
-
class
|
|
63810
|
+
let Image$1 = class Image extends BaseElement {
|
|
63811
|
+
type = 'image';
|
|
63812
|
+
src;
|
|
63813
|
+
cursor;
|
|
63814
|
+
cache;
|
|
63815
|
+
shape;
|
|
63816
|
+
constructor(options) {
|
|
63817
|
+
super(options);
|
|
63818
|
+
this.width = options.width ?? this.width;
|
|
63819
|
+
this.height = options.height ?? this.height;
|
|
63820
|
+
this.src = options.src ?? this.src;
|
|
63821
|
+
this.shape = options.shape ?? this.shape;
|
|
63822
|
+
this.initLayoutSize();
|
|
63823
|
+
}
|
|
63824
|
+
};
|
|
63825
|
+
|
|
63826
|
+
class Text extends BaseElement {
|
|
63827
|
+
type = 'text';
|
|
63828
|
+
text;
|
|
63829
|
+
fill;
|
|
63830
|
+
color;
|
|
63831
|
+
stroke;
|
|
63832
|
+
lineWidth;
|
|
63833
|
+
fontSize;
|
|
63834
|
+
fontFamily;
|
|
63835
|
+
fontWeight;
|
|
63836
|
+
fontVariant;
|
|
63837
|
+
fontStyle;
|
|
63838
|
+
ellipsis;
|
|
63839
|
+
maxLineWidth;
|
|
63840
|
+
textAlign;
|
|
63841
|
+
textBaseline;
|
|
63842
|
+
lineHeight;
|
|
63843
|
+
underline;
|
|
63844
|
+
lineThrough;
|
|
63845
|
+
heightLimit;
|
|
63846
|
+
lineClamp;
|
|
63274
63847
|
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;
|
|
63290
63848
|
super(options);
|
|
63849
|
+
this.text = options.text;
|
|
63850
|
+
this.fontSize = options.fontSize || 12;
|
|
63851
|
+
this.fontFamily = options.fontFamily || 'Arial,sans-serif';
|
|
63852
|
+
this.fill = options.color || options.fill || 'black';
|
|
63853
|
+
this.textBaseline = options.textBaseline || 'top';
|
|
63854
|
+
this.textAlign = options.textAlign || 'left';
|
|
63855
|
+
options.stroke && (this.stroke = options.stroke);
|
|
63856
|
+
options.lineWidth && (this.lineWidth = options.lineWidth);
|
|
63857
|
+
options.fontWeight && (this.fontWeight = options.fontWeight);
|
|
63858
|
+
options.fontVariant && (this.fontVariant = options.fontVariant);
|
|
63859
|
+
options.fontStyle && (this.fontStyle = options.fontStyle);
|
|
63860
|
+
options.ellipsis && (this.ellipsis = options.ellipsis);
|
|
63861
|
+
options.maxLineWidth && (this.maxLineWidth = options.maxLineWidth);
|
|
63862
|
+
options.lineHeight && (this.lineHeight = options.lineHeight);
|
|
63863
|
+
options.underline && (this.underline = options.underline);
|
|
63864
|
+
options.lineThrough && (this.lineThrough = options.lineThrough);
|
|
63865
|
+
options.heightLimit && (this.heightLimit = options.heightLimit);
|
|
63866
|
+
options.lineClamp && (this.lineClamp = options.lineClamp);
|
|
63291
63867
|
}
|
|
63292
63868
|
getSize(table) {
|
|
63293
|
-
this.
|
|
63869
|
+
const { width, height } = table.measureText(this.text, {
|
|
63870
|
+
fontSize: this.fontSize,
|
|
63871
|
+
fontWeight: this.fontWeight,
|
|
63872
|
+
fontFamily: this.fontFamily
|
|
63873
|
+
});
|
|
63874
|
+
this.width = width;
|
|
63875
|
+
this.height = height;
|
|
63876
|
+
this.initLayoutSize();
|
|
63877
|
+
if (this.background) {
|
|
63878
|
+
this.dx += this.background.expandX || 0;
|
|
63879
|
+
this.dy += this.background.expandY || 0;
|
|
63880
|
+
}
|
|
63294
63881
|
}
|
|
63295
63882
|
}
|
|
63296
63883
|
|
|
@@ -63301,74 +63888,41 @@
|
|
|
63301
63888
|
};
|
|
63302
63889
|
}
|
|
63303
63890
|
|
|
63304
|
-
class
|
|
63305
|
-
|
|
63306
|
-
|
|
63307
|
-
|
|
63308
|
-
|
|
63309
|
-
|
|
63310
|
-
|
|
63311
|
-
|
|
63312
|
-
|
|
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 {
|
|
63891
|
+
class Sector extends BaseElement {
|
|
63892
|
+
type = 'arc';
|
|
63893
|
+
radius;
|
|
63894
|
+
startDegree = 0;
|
|
63895
|
+
endDegree = 360;
|
|
63896
|
+
clockWise = true;
|
|
63897
|
+
lineWidth;
|
|
63898
|
+
fill;
|
|
63899
|
+
stroke;
|
|
63323
63900
|
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 {
|
|
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;
|
|
63357
63901
|
super(options);
|
|
63902
|
+
this.radius = options.radius;
|
|
63903
|
+
this.startDegree = options.startDegree;
|
|
63904
|
+
this.endDegree = options.endDegree;
|
|
63905
|
+
this.clockWise = options.clockWise;
|
|
63906
|
+
this.lineWidth = options.lineWidth;
|
|
63907
|
+
this.fill = options.fill;
|
|
63908
|
+
this.stroke = options.stroke;
|
|
63909
|
+
this.width = this.radius * 2;
|
|
63910
|
+
this.height = this.radius * 2;
|
|
63911
|
+
this.initLayoutSize();
|
|
63912
|
+
this.dx += this.radius;
|
|
63913
|
+
this.dy += this.radius;
|
|
63358
63914
|
}
|
|
63359
63915
|
}
|
|
63360
63916
|
|
|
63361
63917
|
var index = /*#__PURE__*/Object.freeze({
|
|
63362
63918
|
__proto__: null,
|
|
63363
|
-
Arc: Arc,
|
|
63364
63919
|
Circle: Circle,
|
|
63365
63920
|
Container: Container,
|
|
63366
|
-
Group: Group,
|
|
63367
63921
|
GroupElement: GroupElement,
|
|
63368
63922
|
Icon: Icon,
|
|
63369
63923
|
Image: Image$1,
|
|
63370
63924
|
Rect: Rect,
|
|
63371
|
-
|
|
63925
|
+
Sector: Sector,
|
|
63372
63926
|
Text: Text,
|
|
63373
63927
|
percentCalc: percentCalc
|
|
63374
63928
|
});
|
|
@@ -63619,10 +64173,10 @@
|
|
|
63619
64173
|
}
|
|
63620
64174
|
|
|
63621
64175
|
function VTag(params) {
|
|
63622
|
-
return new Tag
|
|
64176
|
+
return new Tag(params ? params.attribute : {});
|
|
63623
64177
|
}
|
|
63624
64178
|
|
|
63625
|
-
const version = "0.13.4
|
|
64179
|
+
const version = "0.13.4";
|
|
63626
64180
|
function getIcons() {
|
|
63627
64181
|
return get$1();
|
|
63628
64182
|
}
|