@visactor/vtable-calendar 1.14.1 → 1.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vtable-calendar.js +363 -202
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +4 -4
package/dist/vtable-calendar.js
CHANGED
|
@@ -591,6 +591,31 @@
|
|
|
591
591
|
return function (target, key) {
|
|
592
592
|
decorator(target, key, paramIndex);
|
|
593
593
|
};
|
|
594
|
+
},
|
|
595
|
+
__awaiter$b = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
596
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
597
|
+
function fulfilled(value) {
|
|
598
|
+
try {
|
|
599
|
+
step(generator.next(value));
|
|
600
|
+
} catch (e) {
|
|
601
|
+
reject(e);
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
function rejected(value) {
|
|
605
|
+
try {
|
|
606
|
+
step(generator.throw(value));
|
|
607
|
+
} catch (e) {
|
|
608
|
+
reject(e);
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
function step(result) {
|
|
612
|
+
var value;
|
|
613
|
+
result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P(function (resolve) {
|
|
614
|
+
resolve(value);
|
|
615
|
+
})).then(fulfilled, rejected);
|
|
616
|
+
}
|
|
617
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
618
|
+
});
|
|
594
619
|
};
|
|
595
620
|
let DefaultGlobal = class {
|
|
596
621
|
get env() {
|
|
@@ -716,6 +741,11 @@
|
|
|
716
741
|
loadBlob(url) {
|
|
717
742
|
return this._env || this.setEnv("browser"), this.envContribution.loadBlob(url);
|
|
718
743
|
}
|
|
744
|
+
loadFont(name, source, descriptors) {
|
|
745
|
+
return __awaiter$b(this, void 0, void 0, function* () {
|
|
746
|
+
return this._env || this.setEnv("browser"), this.envContribution.loadFont(name, source, descriptors);
|
|
747
|
+
});
|
|
748
|
+
}
|
|
719
749
|
isChrome() {
|
|
720
750
|
return null != this._isChrome || (this._env || this.setEnv("browser"), this._isChrome = "browser" === this._env && navigator.userAgent.indexOf("Chrome") > -1), this._isChrome;
|
|
721
751
|
}
|
|
@@ -1794,19 +1824,10 @@
|
|
|
1794
1824
|
}
|
|
1795
1825
|
function isRotateAABBIntersect(box1, box2) {
|
|
1796
1826
|
let isDeg = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
|
|
1797
|
-
let ctx = arguments.length > 3 ? arguments[3] : undefined;
|
|
1798
1827
|
const rect1 = toRect(box1, isDeg),
|
|
1799
1828
|
rect2 = toRect(box2, isDeg),
|
|
1800
|
-
vector = (start, end) => [end.x - start.x, end.y - start.y]
|
|
1801
|
-
|
|
1802
|
-
0 === index ? ctx.moveTo(item.x, item.y) : ctx.lineTo(item.x, item.y);
|
|
1803
|
-
}), ctx.fill(), ctx.restore(), ctx.save(), ctx.fillStyle = "green", ctx.globalAlpha = .6, rect2.forEach((item, index) => {
|
|
1804
|
-
0 === index ? ctx.moveTo(item.x, item.y) : ctx.lineTo(item.x, item.y);
|
|
1805
|
-
}), ctx.fill(), ctx.restore());
|
|
1806
|
-
const p1 = getCenterPoint(box1),
|
|
1807
|
-
p2 = getCenterPoint(box2);
|
|
1808
|
-
ctx && ctx.fillRect(p1.x, p1.y, 2, 2), ctx && ctx.fillRect(p2.x, p2.y, 2, 2);
|
|
1809
|
-
const vp1p2 = vector(p1, p2),
|
|
1829
|
+
vector = (start, end) => [end.x - start.x, end.y - start.y],
|
|
1830
|
+
vp1p2 = vector(getCenterPoint(box1), getCenterPoint(box2)),
|
|
1810
1831
|
AB = vector(rect1[0], rect1[1]),
|
|
1811
1832
|
BC = vector(rect1[1], rect1[2]),
|
|
1812
1833
|
A1B1 = vector(rect2[0], rect2[1]),
|
|
@@ -2195,7 +2216,8 @@
|
|
|
2195
2216
|
class OBBBounds extends Bounds$1 {
|
|
2196
2217
|
constructor(bounds) {
|
|
2197
2218
|
let angle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
2198
|
-
|
|
2219
|
+
var _a;
|
|
2220
|
+
super(bounds), bounds && (this.angle = null !== (_a = bounds.angle) && void 0 !== _a ? _a : angle);
|
|
2199
2221
|
}
|
|
2200
2222
|
intersects(b) {
|
|
2201
2223
|
return isRotateAABBIntersect(this, b);
|
|
@@ -2208,6 +2230,9 @@
|
|
|
2208
2230
|
let angle = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
2209
2231
|
return super.setValue(x1, y1, x2, y2), this.angle = angle, this;
|
|
2210
2232
|
}
|
|
2233
|
+
clone() {
|
|
2234
|
+
return new OBBBounds(this);
|
|
2235
|
+
}
|
|
2211
2236
|
}
|
|
2212
2237
|
|
|
2213
2238
|
class Matrix {
|
|
@@ -5653,7 +5678,7 @@
|
|
|
5653
5678
|
return null;
|
|
5654
5679
|
}
|
|
5655
5680
|
|
|
5656
|
-
var __awaiter$
|
|
5681
|
+
var __awaiter$a = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
5657
5682
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5658
5683
|
function fulfilled(value) {
|
|
5659
5684
|
try {
|
|
@@ -5723,7 +5748,7 @@
|
|
|
5723
5748
|
}
|
|
5724
5749
|
forEachChildrenAsync(cb) {
|
|
5725
5750
|
let reverse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
|
|
5726
|
-
return __awaiter$
|
|
5751
|
+
return __awaiter$a(this, void 0, void 0, function* () {
|
|
5727
5752
|
if (reverse) {
|
|
5728
5753
|
let child = this._lastChild,
|
|
5729
5754
|
i = 0;
|
|
@@ -10353,68 +10378,6 @@
|
|
|
10353
10378
|
const defaultRectTextureRenderContribution = defaultBaseTextureRenderContribution;
|
|
10354
10379
|
const defaultRectBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
|
|
10355
10380
|
|
|
10356
|
-
class DefaultImageBackgroundRenderContribution extends DefaultBaseBackgroundRenderContribution {
|
|
10357
|
-
constructor() {
|
|
10358
|
-
super(...arguments), this.time = BaseRenderContributionTime.beforeFillStroke;
|
|
10359
|
-
}
|
|
10360
|
-
drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb) {
|
|
10361
|
-
const {
|
|
10362
|
-
background: background,
|
|
10363
|
-
backgroundMode = graphicAttribute.backgroundMode,
|
|
10364
|
-
backgroundFit = graphicAttribute.backgroundFit
|
|
10365
|
-
} = graphic.attribute;
|
|
10366
|
-
if (background) if (graphic.backgroundImg) {
|
|
10367
|
-
const res = graphic.resources.get(background);
|
|
10368
|
-
if ("success" !== res.state || !res.data) return;
|
|
10369
|
-
if (context.save(), graphic.parent && !graphic.transMatrix.onlyTranslate()) {
|
|
10370
|
-
const groupAttribute = getTheme(graphic.parent).group,
|
|
10371
|
-
{
|
|
10372
|
-
scrollX = groupAttribute.scrollX,
|
|
10373
|
-
scrollY = groupAttribute.scrollY
|
|
10374
|
-
} = graphic.parent.attribute;
|
|
10375
|
-
context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0), context.translate(scrollX, scrollY);
|
|
10376
|
-
}
|
|
10377
|
-
const b = graphic.AABBBounds;
|
|
10378
|
-
this.doDrawImage(context, res.data, b, backgroundMode, backgroundFit), context.restore(), graphic.transMatrix.onlyTranslate() || context.setTransformForCurrent();
|
|
10379
|
-
} else if (isObject$6(background)) {
|
|
10380
|
-
const {
|
|
10381
|
-
stroke: stroke,
|
|
10382
|
-
fill: fill,
|
|
10383
|
-
lineWidth = 1,
|
|
10384
|
-
cornerRadius = 0,
|
|
10385
|
-
expandX = 0,
|
|
10386
|
-
expandY = 0
|
|
10387
|
-
} = background;
|
|
10388
|
-
if (!stroke && !fill) return;
|
|
10389
|
-
context.beginPath();
|
|
10390
|
-
const {
|
|
10391
|
-
x: x,
|
|
10392
|
-
y: y,
|
|
10393
|
-
width: width,
|
|
10394
|
-
height: height
|
|
10395
|
-
} = getActualPosition(graphic);
|
|
10396
|
-
cornerRadius ? createRectPath(context, x - expandX, y - expandY, width + 2 * expandX, height + 2 * expandY, cornerRadius) : context.rect(x - expandX, y - expandY, width + 2 * expandX, height + 2 * expandY), context.globalAlpha = 1, fill && (context.fillStyle = fill, context.fill()), stroke && lineWidth > 0 && (context.lineWidth = lineWidth, context.strokeStyle = stroke, context.stroke());
|
|
10397
|
-
} else {
|
|
10398
|
-
context.beginPath();
|
|
10399
|
-
const b = graphic.AABBBounds;
|
|
10400
|
-
context.rect(x, y, b.width(), b.height()), context.fillStyle = background, context.globalAlpha = 1, context.fill();
|
|
10401
|
-
}
|
|
10402
|
-
}
|
|
10403
|
-
}
|
|
10404
|
-
function getActualPosition(graphic) {
|
|
10405
|
-
const boundsPadding = parsePadding(graphic.attribute.boundsPadding),
|
|
10406
|
-
bounds = graphic.AABBBounds;
|
|
10407
|
-
let x = bounds.x1,
|
|
10408
|
-
y = bounds.y1,
|
|
10409
|
-
width = bounds.width(),
|
|
10410
|
-
height = bounds.height();
|
|
10411
|
-
return isNumber$4(boundsPadding) ? (x += boundsPadding, y += boundsPadding, width -= 2 * boundsPadding, height -= 2 * boundsPadding) : (x += boundsPadding[3], y += boundsPadding[0], width -= boundsPadding[1] + boundsPadding[3], height -= boundsPadding[0] + boundsPadding[2]), {
|
|
10412
|
-
x: x,
|
|
10413
|
-
y: y,
|
|
10414
|
-
width: width,
|
|
10415
|
-
height: height
|
|
10416
|
-
};
|
|
10417
|
-
}
|
|
10418
10381
|
class DefaultImageRenderContribution extends DefaultRectRenderContribution {
|
|
10419
10382
|
constructor() {
|
|
10420
10383
|
super(...arguments), this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
|
|
@@ -10424,7 +10387,7 @@
|
|
|
10424
10387
|
}
|
|
10425
10388
|
}
|
|
10426
10389
|
const defaultImageRenderContribution = new DefaultImageRenderContribution();
|
|
10427
|
-
const defaultImageBackgroundRenderContribution =
|
|
10390
|
+
const defaultImageBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
|
|
10428
10391
|
|
|
10429
10392
|
class DefaultSymbolRenderContribution {
|
|
10430
10393
|
constructor() {
|
|
@@ -12102,26 +12065,25 @@
|
|
|
12102
12065
|
doFill: doFill,
|
|
12103
12066
|
doStroke: doStroke
|
|
12104
12067
|
} = data;
|
|
12105
|
-
|
|
12068
|
+
if (!url || !image.resources) return;
|
|
12069
|
+
const res = image.resources.get(url);
|
|
12070
|
+
if ("success" !== res.state) return;
|
|
12071
|
+
let needRestore = !1;
|
|
12072
|
+
0 === cornerRadius || isArray$3(cornerRadius) && cornerRadius.every(num => 0 === num) || (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius), needRestore = !0), context.setShadowBlendStyle && context.setShadowBlendStyle(image, image.attribute, imageAttribute);
|
|
12106
12073
|
const _runFill = () => {
|
|
12107
12074
|
if (doFill) if (fillCb) fillCb(context, image.attribute, imageAttribute);else if (fVisible) {
|
|
12108
|
-
|
|
12109
|
-
const res = image.resources.get(url);
|
|
12110
|
-
if ("success" !== res.state) return;
|
|
12111
|
-
let needRestore = !1;
|
|
12112
|
-
0 === cornerRadius || isArray$3(cornerRadius) && cornerRadius.every(num => 0 === num) || (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius), context.save(), context.clip(), needRestore = !0), context.setCommonStyle(image, image.attribute, x, y, imageAttribute);
|
|
12075
|
+
context.setCommonStyle(image, image.attribute, x, y, imageAttribute);
|
|
12113
12076
|
let repeat = 0;
|
|
12114
12077
|
if ("repeat" === repeatX && (repeat |= 1), "repeat" === repeatY && (repeat |= 2), repeat) {
|
|
12115
12078
|
const pattern = context.createPattern(res.data, repeatStr[repeat]);
|
|
12116
12079
|
context.fillStyle = pattern, context.translate(x, y, !0), context.fillRect(0, 0, width, height), context.translate(-x, -y, !0);
|
|
12117
12080
|
} else context.drawImage(res.data, x, y, width, height);
|
|
12118
|
-
needRestore && context.restore();
|
|
12119
12081
|
}
|
|
12120
12082
|
},
|
|
12121
12083
|
_runStroke = () => {
|
|
12122
12084
|
doStroke && (strokeCb ? strokeCb(context, image.attribute, imageAttribute) : sVisible && (context.setStrokeStyle(image, image.attribute, originX - x, originY - y, imageAttribute), context.stroke()));
|
|
12123
12085
|
};
|
|
12124
|
-
fillStrokeOrder ? (_runStroke(), _runFill()) : (_runFill(), _runStroke()), this.afterRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb);
|
|
12086
|
+
fillStrokeOrder ? (_runStroke(), needRestore && (context.save(), context.clip()), this.beforeRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb), _runFill(), needRestore && context.restore()) : (needRestore && (context.save(), context.clip()), this.beforeRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb), _runFill(), needRestore && context.restore(), _runStroke()), this.afterRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb);
|
|
12125
12087
|
}
|
|
12126
12088
|
draw(image, renderService, drawContext) {
|
|
12127
12089
|
const {
|
|
@@ -15338,7 +15300,7 @@
|
|
|
15338
15300
|
container.load(envModules), container.load(textMeasureModules), container.load(layerHandlerModules);
|
|
15339
15301
|
}
|
|
15340
15302
|
|
|
15341
|
-
var __awaiter$
|
|
15303
|
+
var __awaiter$9 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
15342
15304
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15343
15305
|
function fulfilled(value) {
|
|
15344
15306
|
try {
|
|
@@ -15411,7 +15373,7 @@
|
|
|
15411
15373
|
}
|
|
15412
15374
|
function foreachAsync(graphic, defaultZIndex, cb) {
|
|
15413
15375
|
let reverse = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
|
|
15414
|
-
return __awaiter$
|
|
15376
|
+
return __awaiter$9(this, void 0, void 0, function* () {
|
|
15415
15377
|
yield graphic.forEachChildrenAsync(cb, reverse);
|
|
15416
15378
|
});
|
|
15417
15379
|
}
|
|
@@ -15772,7 +15734,7 @@
|
|
|
15772
15734
|
decorator(target, key, paramIndex);
|
|
15773
15735
|
};
|
|
15774
15736
|
},
|
|
15775
|
-
__awaiter$
|
|
15737
|
+
__awaiter$8 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
15776
15738
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15777
15739
|
function fulfilled(value) {
|
|
15778
15740
|
try {
|
|
@@ -15807,7 +15769,7 @@
|
|
|
15807
15769
|
}, this.defaultRenderMap.set(this.lineRender.numberType, this.lineRender), this.defaultRenderMap.set(this.areaRender.numberType, this.areaRender);
|
|
15808
15770
|
}
|
|
15809
15771
|
draw(renderService, drawContext) {
|
|
15810
|
-
return __awaiter$
|
|
15772
|
+
return __awaiter$8(this, void 0, void 0, function* () {
|
|
15811
15773
|
if (this.checkingForDrawPromise) return;
|
|
15812
15774
|
this.lastRenderService = renderService, this.lastDrawContext = drawContext, this.checkingForDrawPromise = this.checkForDraw(drawContext);
|
|
15813
15775
|
const skipDraw = yield this.checkingForDrawPromise;
|
|
@@ -15828,15 +15790,15 @@
|
|
|
15828
15790
|
});
|
|
15829
15791
|
}
|
|
15830
15792
|
_increaseRender(group, drawContext) {
|
|
15831
|
-
return __awaiter$
|
|
15793
|
+
return __awaiter$8(this, void 0, void 0, function* () {
|
|
15832
15794
|
this.rendering = !0, yield this._renderIncrementalGroup(group, drawContext);
|
|
15833
15795
|
});
|
|
15834
15796
|
}
|
|
15835
15797
|
_renderIncrementalGroup(group, drawContext) {
|
|
15836
|
-
return __awaiter$
|
|
15798
|
+
return __awaiter$8(this, void 0, void 0, function* () {
|
|
15837
15799
|
this.count = group.count, yield new Promise(resolve => {
|
|
15838
15800
|
this.renderItem(group, drawContext, {
|
|
15839
|
-
drawingCb: () => __awaiter$
|
|
15801
|
+
drawingCb: () => __awaiter$8(this, void 0, void 0, function* () {
|
|
15840
15802
|
if (2 !== group.count) yield foreachAsync(group, DefaultAttribute.zIndex, (item, i) => {
|
|
15841
15803
|
if (this.status === STATUS.STOP) return !0;
|
|
15842
15804
|
if (item.isContainer) return !1;
|
|
@@ -15857,7 +15819,7 @@
|
|
|
15857
15819
|
});
|
|
15858
15820
|
}
|
|
15859
15821
|
waitToNextFrame() {
|
|
15860
|
-
return __awaiter$
|
|
15822
|
+
return __awaiter$8(this, void 0, void 0, function* () {
|
|
15861
15823
|
return new Promise(resolve => {
|
|
15862
15824
|
this.global.getRequestAnimationFrame()(() => {
|
|
15863
15825
|
resolve(!1);
|
|
@@ -15866,13 +15828,13 @@
|
|
|
15866
15828
|
});
|
|
15867
15829
|
}
|
|
15868
15830
|
checkForDraw(drawContext) {
|
|
15869
|
-
return __awaiter$
|
|
15831
|
+
return __awaiter$8(this, void 0, void 0, function* () {
|
|
15870
15832
|
let skip = this.rendering;
|
|
15871
15833
|
return drawContext.restartIncremental && (skip = !1, yield this.forceStop(), this.resetToInit()), skip;
|
|
15872
15834
|
});
|
|
15873
15835
|
}
|
|
15874
15836
|
forceStop() {
|
|
15875
|
-
return __awaiter$
|
|
15837
|
+
return __awaiter$8(this, void 0, void 0, function* () {
|
|
15876
15838
|
this.rendering && (this.status = STATUS.STOP, yield new Promise(resolve => {
|
|
15877
15839
|
this.hooks.completeDraw.tap("stopCb", () => {
|
|
15878
15840
|
this.status = STATUS.NORMAL, this.hooks.completeDraw.taps = this.hooks.completeDraw.taps.filter(item => "stopCb" !== item.name), resolve(!1);
|
|
@@ -15884,11 +15846,11 @@
|
|
|
15884
15846
|
this.currFrameStartAt = 0, this.currentIdx = 0;
|
|
15885
15847
|
}
|
|
15886
15848
|
renderGroup(group, drawContext) {
|
|
15887
|
-
return __awaiter$
|
|
15849
|
+
return __awaiter$8(this, void 0, void 0, function* () {
|
|
15888
15850
|
if (!drawContext.break && !1 !== group.attribute.visibleAll) return group.incremental && drawContext.startAtId === group._uid ? (yield this._increaseRender(group, drawContext), void (drawContext.break = !0)) : void (yield new Promise(resolve => {
|
|
15889
15851
|
this.renderItem(group, drawContext, {
|
|
15890
|
-
drawingCb: () => __awaiter$
|
|
15891
|
-
yield foreachAsync(group, DefaultAttribute.zIndex, item => __awaiter$
|
|
15852
|
+
drawingCb: () => __awaiter$8(this, void 0, void 0, function* () {
|
|
15853
|
+
yield foreachAsync(group, DefaultAttribute.zIndex, item => __awaiter$8(this, void 0, void 0, function* () {
|
|
15892
15854
|
drawContext.break || item.isContainer && (yield this.renderGroup(item, drawContext));
|
|
15893
15855
|
})), resolve(!1);
|
|
15894
15856
|
})
|
|
@@ -16688,12 +16650,37 @@
|
|
|
16688
16650
|
BaseCanvas.env = "browser";
|
|
16689
16651
|
|
|
16690
16652
|
var __decorate$E = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
16691
|
-
|
|
16692
|
-
|
|
16693
|
-
|
|
16694
|
-
|
|
16695
|
-
|
|
16696
|
-
|
|
16653
|
+
var d,
|
|
16654
|
+
c = arguments.length,
|
|
16655
|
+
r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
|
|
16656
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
|
|
16657
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
16658
|
+
},
|
|
16659
|
+
__awaiter$7 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
16660
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16661
|
+
function fulfilled(value) {
|
|
16662
|
+
try {
|
|
16663
|
+
step(generator.next(value));
|
|
16664
|
+
} catch (e) {
|
|
16665
|
+
reject(e);
|
|
16666
|
+
}
|
|
16667
|
+
}
|
|
16668
|
+
function rejected(value) {
|
|
16669
|
+
try {
|
|
16670
|
+
step(generator.throw(value));
|
|
16671
|
+
} catch (e) {
|
|
16672
|
+
reject(e);
|
|
16673
|
+
}
|
|
16674
|
+
}
|
|
16675
|
+
function step(result) {
|
|
16676
|
+
var value;
|
|
16677
|
+
result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P(function (resolve) {
|
|
16678
|
+
resolve(value);
|
|
16679
|
+
})).then(fulfilled, rejected);
|
|
16680
|
+
}
|
|
16681
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
16682
|
+
});
|
|
16683
|
+
};
|
|
16697
16684
|
let BaseEnvContribution = class {
|
|
16698
16685
|
configure(service) {
|
|
16699
16686
|
service.env === this.type && service.setActiveEnvContribution(this);
|
|
@@ -16762,6 +16749,13 @@
|
|
|
16762
16749
|
left: 0
|
|
16763
16750
|
};
|
|
16764
16751
|
}
|
|
16752
|
+
loadFont(font, source, descriptors) {
|
|
16753
|
+
return __awaiter$7(this, void 0, void 0, function* () {
|
|
16754
|
+
return {
|
|
16755
|
+
loadState: "fail"
|
|
16756
|
+
};
|
|
16757
|
+
});
|
|
16758
|
+
}
|
|
16765
16759
|
};
|
|
16766
16760
|
BaseEnvContribution = __decorate$E([injectable()], BaseEnvContribution);
|
|
16767
16761
|
|
|
@@ -16997,7 +16991,7 @@
|
|
|
16997
16991
|
const fVisible = fillVisible(opacity, fillOpacity, !0),
|
|
16998
16992
|
sVisible = fillVisible(opacity, strokeOpacity, !0);
|
|
16999
16993
|
if (!fVisible) return;
|
|
17000
|
-
context.translate(x, y), this.beforeRenderStep(richtext, context, x, y, fVisible, sVisible, fVisible, sVisible, richtextAttribute, drawContext);
|
|
16994
|
+
context.setShadowBlendStyle && context.setShadowBlendStyle(richtext, richtext.attribute, richtextAttribute), context.translate(x, y), this.beforeRenderStep(richtext, context, x, y, fVisible, sVisible, fVisible, sVisible, richtextAttribute, drawContext);
|
|
17001
16995
|
richtext.getFrameCache().draw(context, this.drawIcon), this.afterRenderStep(richtext, context, x, y, fVisible, sVisible, fVisible, sVisible, richtextAttribute, drawContext);
|
|
17002
16996
|
}
|
|
17003
16997
|
drawIcon(icon, context, x, y, baseline) {
|
|
@@ -17375,10 +17369,17 @@
|
|
|
17375
17369
|
this.render(), this.bindEvents();
|
|
17376
17370
|
});
|
|
17377
17371
|
}
|
|
17378
|
-
setAttribute(key, value, forceUpdateTag) {
|
|
17372
|
+
setAttribute(key, value, forceUpdateTag, context) {
|
|
17373
|
+
const params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate({
|
|
17374
|
+
[key]: value
|
|
17375
|
+
}, this.attribute, key, context);
|
|
17376
|
+
if (params) return this._setAttributes(params, forceUpdateTag);
|
|
17379
17377
|
isPlainObject$3(this.attribute[key]) && isPlainObject$3(value) && !isFunction$3(this.attribute[key]) && !isFunction$3(value) ? merge$1(this.attribute[key], value) : this.attribute[key] = value, GROUP_ATTRIBUTES.includes(key) || this.render(), this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTag(key) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(), this.addUpdatePositionTag(), this.onAttributeUpdate();
|
|
17380
17378
|
}
|
|
17381
|
-
setAttributes(params, forceUpdateTag) {
|
|
17379
|
+
setAttributes(params, forceUpdateTag, context) {
|
|
17380
|
+
return params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params, this._setAttributes(params, forceUpdateTag);
|
|
17381
|
+
}
|
|
17382
|
+
_setAttributes(params, forceUpdateTag) {
|
|
17382
17383
|
const keys = Object.keys(params);
|
|
17383
17384
|
this._mergeAttributes(params, keys), keys.every(key => GROUP_ATTRIBUTES.includes(key)) || this.render(), this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTags(keys) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(), this.addUpdatePositionTag(), this.onAttributeUpdate();
|
|
17384
17385
|
}
|
|
@@ -17685,6 +17686,7 @@
|
|
|
17685
17686
|
});
|
|
17686
17687
|
}
|
|
17687
17688
|
emitEvent(type, e) {
|
|
17689
|
+
if (!this.element) return;
|
|
17688
17690
|
const listeners = this.element._events[WILDCARD];
|
|
17689
17691
|
if (listeners) if ("fn" in listeners) listeners.fn.call(listeners.context, e, type);else for (let i = 0, j = listeners.length; i < j && !e.propagationImmediatelyStopped; i++) listeners[i].fn.call(listeners[i].context, e, type);
|
|
17690
17692
|
this.emit(type, e);
|
|
@@ -18561,6 +18563,31 @@
|
|
|
18561
18563
|
},
|
|
18562
18564
|
__metadata$j = undefined && undefined.__metadata || function (k, v) {
|
|
18563
18565
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
18566
|
+
},
|
|
18567
|
+
__awaiter$6 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
18568
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18569
|
+
function fulfilled(value) {
|
|
18570
|
+
try {
|
|
18571
|
+
step(generator.next(value));
|
|
18572
|
+
} catch (e) {
|
|
18573
|
+
reject(e);
|
|
18574
|
+
}
|
|
18575
|
+
}
|
|
18576
|
+
function rejected(value) {
|
|
18577
|
+
try {
|
|
18578
|
+
step(generator.throw(value));
|
|
18579
|
+
} catch (e) {
|
|
18580
|
+
reject(e);
|
|
18581
|
+
}
|
|
18582
|
+
}
|
|
18583
|
+
function step(result) {
|
|
18584
|
+
var value;
|
|
18585
|
+
result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P(function (resolve) {
|
|
18586
|
+
resolve(value);
|
|
18587
|
+
})).then(fulfilled, rejected);
|
|
18588
|
+
}
|
|
18589
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18590
|
+
});
|
|
18564
18591
|
};
|
|
18565
18592
|
class DynamicB {
|
|
18566
18593
|
get x1() {
|
|
@@ -18756,6 +18783,19 @@
|
|
|
18756
18783
|
left: actualLeft
|
|
18757
18784
|
};
|
|
18758
18785
|
}
|
|
18786
|
+
loadFont(font, source, descriptors) {
|
|
18787
|
+
return __awaiter$6(this, void 0, void 0, function* () {
|
|
18788
|
+
return new FontFace(font, isString$4(source) ? `url(${source})` : source, descriptors).load().then(function (loadedFont) {
|
|
18789
|
+
return document.fonts.add(loadedFont), {
|
|
18790
|
+
loadState: "success"
|
|
18791
|
+
};
|
|
18792
|
+
}).catch(function (error) {
|
|
18793
|
+
return {
|
|
18794
|
+
loadState: "fail"
|
|
18795
|
+
};
|
|
18796
|
+
});
|
|
18797
|
+
});
|
|
18798
|
+
}
|
|
18759
18799
|
};
|
|
18760
18800
|
BrowserEnvContribution = __decorate$v([injectable(), __metadata$j("design:paramtypes", [])], BrowserEnvContribution);
|
|
18761
18801
|
|
|
@@ -21104,6 +21144,52 @@
|
|
|
21104
21144
|
zIndex: 1
|
|
21105
21145
|
};
|
|
21106
21146
|
|
|
21147
|
+
function genNormalBounds(item) {
|
|
21148
|
+
const bounds = item.AABBBounds;
|
|
21149
|
+
return {
|
|
21150
|
+
x1: bounds.x1,
|
|
21151
|
+
x2: bounds.x2,
|
|
21152
|
+
y1: bounds.y1,
|
|
21153
|
+
y2: bounds.y2,
|
|
21154
|
+
centerX: item.attribute.x,
|
|
21155
|
+
centerY: item.attribute.y,
|
|
21156
|
+
angle: item.attribute.angle
|
|
21157
|
+
};
|
|
21158
|
+
}
|
|
21159
|
+
function genRotateBounds(items) {
|
|
21160
|
+
items.forEach(item => {
|
|
21161
|
+
if (item.rotatedBounds || !item.attribute.angle) return;
|
|
21162
|
+
const bounds = genNormalBounds(item),
|
|
21163
|
+
rotatedCenter = rotatePoint({
|
|
21164
|
+
x: item.attribute.x,
|
|
21165
|
+
y: item.attribute.y
|
|
21166
|
+
}, bounds.angle, {
|
|
21167
|
+
x: bounds.centerX,
|
|
21168
|
+
y: bounds.centerY
|
|
21169
|
+
}),
|
|
21170
|
+
deltaX = rotatedCenter.x - bounds.centerX,
|
|
21171
|
+
deltaY = rotatedCenter.y - bounds.centerY;
|
|
21172
|
+
bounds.x1 += deltaX, bounds.x2 += deltaX, bounds.y1 += deltaY, bounds.y2 += deltaY, bounds.centerX += deltaX, bounds.centerY += deltaY, item.rotatedBounds = bounds;
|
|
21173
|
+
});
|
|
21174
|
+
}
|
|
21175
|
+
function itemIntersect(item1, item2) {
|
|
21176
|
+
var _a, _b;
|
|
21177
|
+
return (null === (_a = item1.OBBBounds) || void 0 === _a ? void 0 : _a.empty()) || (null === (_b = item2.OBBBounds) || void 0 === _b ? void 0 : _b.empty()) ? isRectIntersect(item1.AABBBounds, item2.AABBBounds, !1) && (!item1.rotatedBounds || !item2.rotatedBounds || isRotateAABBIntersect(item1.rotatedBounds, item2.rotatedBounds, !0)) : item1.OBBBounds.intersects(item2.OBBBounds);
|
|
21178
|
+
}
|
|
21179
|
+
const DELTA_ANGLE = Math.sin(Math.PI / 10);
|
|
21180
|
+
function isAngleVertical(angle) {
|
|
21181
|
+
let delta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DELTA_ANGLE;
|
|
21182
|
+
const hasAngle = !isNil$3(angle) && 0 !== angle,
|
|
21183
|
+
cos = hasAngle ? Math.cos(angle) : 1;
|
|
21184
|
+
return hasAngle && Math.abs(cos) <= delta;
|
|
21185
|
+
}
|
|
21186
|
+
function isAngleHorizontal(angle) {
|
|
21187
|
+
let delta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DELTA_ANGLE;
|
|
21188
|
+
const hasAngle = !isNil$3(angle) && 0 !== angle,
|
|
21189
|
+
sin = hasAngle ? Math.sin(angle) : 0;
|
|
21190
|
+
return !hasAngle || Math.abs(sin) <= delta;
|
|
21191
|
+
}
|
|
21192
|
+
|
|
21107
21193
|
function getCircleLabelPosition(tickPosition, tickVector) {
|
|
21108
21194
|
return {
|
|
21109
21195
|
x: tickPosition.x + tickVector[0],
|
|
@@ -21151,9 +21237,11 @@
|
|
|
21151
21237
|
return getCircleLabelPosition(labelPoint, getCircleVerticalVector(labelOffset || 1, labelPoint, center, inside));
|
|
21152
21238
|
}
|
|
21153
21239
|
function textIntersect(textA, textB, sep) {
|
|
21154
|
-
|
|
21155
|
-
|
|
21156
|
-
|
|
21240
|
+
var _a;
|
|
21241
|
+
let a, b;
|
|
21242
|
+
const angle = null === (_a = textA.attribute) || void 0 === _a ? void 0 : _a.angle,
|
|
21243
|
+
isAABBIntersects = (textA, textB, sep) => (a = textA.AABBBounds, b = textB.AABBBounds, sep > Math.max(b.x1 - a.x2, a.x1 - b.x2, b.y1 - a.y2, a.y1 - b.y2));
|
|
21244
|
+
return isAngleHorizontal(angle, Number.EPSILON) ? isAABBIntersects(textA, textB, sep) : (a = textA.OBBBounds, b = textB.OBBBounds, !a || !b || a.empty() || b.empty() ? isAABBIntersects(textA, textB, sep) : a.intersects(b));
|
|
21157
21245
|
}
|
|
21158
21246
|
function hasOverlap(items, pad) {
|
|
21159
21247
|
for (let b, i = 1, n = items.length, a = items[0]; i < n; a = b, ++i) if (b = items[i], textIntersect(a, b, pad)) return !0;
|
|
@@ -21323,7 +21411,10 @@
|
|
|
21323
21411
|
isFunction$3(labelState[key]) && (labelState[key] = labelState[key](item, index, data, layer));
|
|
21324
21412
|
}), text.states = labelState;
|
|
21325
21413
|
}
|
|
21326
|
-
|
|
21414
|
+
text.data = Object.assign(Object.assign({}, item), {
|
|
21415
|
+
index: index,
|
|
21416
|
+
layer: layer
|
|
21417
|
+
}), labelGroup.add(text);
|
|
21327
21418
|
}), labelGroup;
|
|
21328
21419
|
}
|
|
21329
21420
|
renderTitle(container) {
|
|
@@ -21537,50 +21628,6 @@
|
|
|
21537
21628
|
});
|
|
21538
21629
|
}
|
|
21539
21630
|
|
|
21540
|
-
function genNormalBounds(item) {
|
|
21541
|
-
const bounds = item.AABBBounds;
|
|
21542
|
-
return {
|
|
21543
|
-
x1: bounds.x1,
|
|
21544
|
-
x2: bounds.x2,
|
|
21545
|
-
y1: bounds.y1,
|
|
21546
|
-
y2: bounds.y2,
|
|
21547
|
-
centerX: item.attribute.x,
|
|
21548
|
-
centerY: item.attribute.y,
|
|
21549
|
-
angle: item.attribute.angle
|
|
21550
|
-
};
|
|
21551
|
-
}
|
|
21552
|
-
function genRotateBounds(items) {
|
|
21553
|
-
items.forEach(item => {
|
|
21554
|
-
if (item.rotatedBounds || !item.attribute.angle) return;
|
|
21555
|
-
const bounds = genNormalBounds(item),
|
|
21556
|
-
rotatedCenter = rotatePoint({
|
|
21557
|
-
x: item.attribute.x,
|
|
21558
|
-
y: item.attribute.y
|
|
21559
|
-
}, bounds.angle, {
|
|
21560
|
-
x: bounds.centerX,
|
|
21561
|
-
y: bounds.centerY
|
|
21562
|
-
}),
|
|
21563
|
-
deltaX = rotatedCenter.x - bounds.centerX,
|
|
21564
|
-
deltaY = rotatedCenter.y - bounds.centerY;
|
|
21565
|
-
bounds.x1 += deltaX, bounds.x2 += deltaX, bounds.y1 += deltaY, bounds.y2 += deltaY, bounds.centerX += deltaX, bounds.centerY += deltaY, item.rotatedBounds = bounds;
|
|
21566
|
-
});
|
|
21567
|
-
}
|
|
21568
|
-
function itemIntersect(item1, item2) {
|
|
21569
|
-
var _a, _b;
|
|
21570
|
-
return (null === (_a = item1.OBBBounds) || void 0 === _a ? void 0 : _a.empty()) || (null === (_b = item2.OBBBounds) || void 0 === _b ? void 0 : _b.empty()) ? isRectIntersect(item1.AABBBounds, item2.AABBBounds, !1) && (!item1.rotatedBounds || !item2.rotatedBounds || isRotateAABBIntersect(item1.rotatedBounds, item2.rotatedBounds, !0)) : item1.OBBBounds.intersects(item2.OBBBounds);
|
|
21571
|
-
}
|
|
21572
|
-
const DELTA_ANGLE = Math.sin(Math.PI / 10);
|
|
21573
|
-
function isAngleVertical(angle) {
|
|
21574
|
-
const hasAngle = !isNil$3(angle) && 0 !== angle,
|
|
21575
|
-
cos = hasAngle ? Math.cos(angle) : 1;
|
|
21576
|
-
return hasAngle && Math.abs(cos) <= DELTA_ANGLE;
|
|
21577
|
-
}
|
|
21578
|
-
function isAngleHorizontal(angle) {
|
|
21579
|
-
const hasAngle = !isNil$3(angle) && 0 !== angle,
|
|
21580
|
-
sin = hasAngle ? Math.sin(angle) : 0;
|
|
21581
|
-
return !hasAngle || Math.abs(sin) <= DELTA_ANGLE;
|
|
21582
|
-
}
|
|
21583
|
-
|
|
21584
21631
|
function autoRotate(items, rotateConfig) {
|
|
21585
21632
|
if (isEmpty$1(items)) return;
|
|
21586
21633
|
const {
|
|
@@ -22816,7 +22863,7 @@
|
|
|
22816
22863
|
breakData: breakData
|
|
22817
22864
|
} = op;
|
|
22818
22865
|
let scaleTicks;
|
|
22819
|
-
if (isValid$3(tickStep))
|
|
22866
|
+
if (isValid$3(tickStep)) ticks = scale.stepTicks(tickStep), breakDomains = breakData && breakData() ? breakData().breakDomains : null, scaleTicks = breakDomains && breakDomains.length ? ticks.filter(tick => breakDomains.every(breakDomain => tick < breakDomain[0] || tick > breakDomain[1])) : ticks;else if (isValid$3(forceTickCount)) scaleTicks = getScaleTicks(op, scale, forceTickCount, (count, subDomain) => subDomain && subDomain.length ? scale.domain(subDomain, !0).forceTicks(count) : scale.forceTicks(count));else if ("d3" === op.tickMode) {
|
|
22820
22867
|
const count = null !== (_a = isFunction$3(tickCount) ? tickCount({
|
|
22821
22868
|
axisLength: rangeSize,
|
|
22822
22869
|
labelStyle: labelStyle
|
|
@@ -22840,19 +22887,30 @@
|
|
|
22840
22887
|
customTicks: customTicks
|
|
22841
22888
|
}));
|
|
22842
22889
|
}
|
|
22890
|
+
var ticks, breakDomains;
|
|
22843
22891
|
const domain = scale.domain();
|
|
22844
22892
|
if (op.labelFirstVisible && domain[0] !== scaleTicks[0] && !scaleTicks.includes(domain[0]) && scaleTicks.unshift(domain[0]), op.labelLastVisible && domain[domain.length - 1] !== scaleTicks[scaleTicks.length - 1] && !scaleTicks.includes(domain[domain.length - 1]) && scaleTicks.push(domain[domain.length - 1]), op.sampling && scaleTicks.length > 1 && ("cartesian" === op.coordinateType || "polar" === op.coordinateType && "radius" === op.axisOrientType)) {
|
|
22845
22893
|
const {
|
|
22846
|
-
|
|
22847
|
-
|
|
22848
|
-
|
|
22849
|
-
|
|
22894
|
+
labelGap = 4,
|
|
22895
|
+
labelFlush: labelFlush
|
|
22896
|
+
} = op,
|
|
22897
|
+
MIN_FONT_SIZE = 6;
|
|
22898
|
+
let items;
|
|
22899
|
+
if (scaleTicks.length * MIN_FONT_SIZE > rangeSize) {
|
|
22900
|
+
const samplingScaleTicks = [],
|
|
22901
|
+
step = Math.floor(scaleTicks.length * MIN_FONT_SIZE / rangeSize);
|
|
22902
|
+
scaleTicks.forEach((tick, index) => {
|
|
22903
|
+
index % step != 0 && index !== scaleTicks.length - 1 || samplingScaleTicks.push(tick);
|
|
22904
|
+
}), items = getCartesianLabelBounds(scale, samplingScaleTicks, op).map((bounds, i) => ({
|
|
22905
|
+
AABBBounds: bounds,
|
|
22906
|
+
value: samplingScaleTicks[i]
|
|
22907
|
+
}));
|
|
22908
|
+
} else items = getCartesianLabelBounds(scale, scaleTicks, op).map((bounds, i) => ({
|
|
22850
22909
|
AABBBounds: bounds,
|
|
22851
22910
|
value: scaleTicks[i]
|
|
22852
22911
|
}));
|
|
22853
|
-
const
|
|
22854
|
-
|
|
22855
|
-
lastSourceItem = last$1(source),
|
|
22912
|
+
const firstSourceItem = items[0],
|
|
22913
|
+
lastSourceItem = last$1(items),
|
|
22856
22914
|
samplingMethod = breakData && breakData() ? methods.greedy : methods.parity;
|
|
22857
22915
|
for (; items.length >= 3 && hasOverlap(items, labelGap);) items = samplingMethod(items, labelGap);
|
|
22858
22916
|
const checkFirst = op.labelFirstVisible;
|
|
@@ -23422,7 +23480,8 @@
|
|
|
23422
23480
|
} = this.attribute,
|
|
23423
23481
|
{
|
|
23424
23482
|
spaceCol = DEFAULT_ITEM_SPACE_COL,
|
|
23425
|
-
spaceRow = DEFAULT_ITEM_SPACE_ROW
|
|
23483
|
+
spaceRow = DEFAULT_ITEM_SPACE_ROW,
|
|
23484
|
+
verticalAlign = "middle"
|
|
23426
23485
|
} = itemAttrs,
|
|
23427
23486
|
itemsContainer = this._itemsContainer,
|
|
23428
23487
|
{
|
|
@@ -23441,7 +23500,9 @@
|
|
|
23441
23500
|
startY: startY,
|
|
23442
23501
|
pages: pages
|
|
23443
23502
|
} = this._itemContext,
|
|
23444
|
-
lastItemWidth = 0
|
|
23503
|
+
lastItemWidth = 0,
|
|
23504
|
+
lastLineHeight = 0;
|
|
23505
|
+
const lastLineItemGroup = [];
|
|
23445
23506
|
for (let index = startIndex, len = legendItems.length; index < len && !(lazyload && pages > this._itemContext.currentPage * maxPages); index++) {
|
|
23446
23507
|
lazyload && (this._itemContext.startIndex = index + 1), item = legendItems[index], item.id || (item.id = item.label), item.index = index;
|
|
23447
23508
|
let isSelected = !0;
|
|
@@ -23449,15 +23510,23 @@
|
|
|
23449
23510
|
const itemGroup = this._renderEachItem(item, isSelected, index, legendItems),
|
|
23450
23511
|
itemWidth = itemGroup.attribute.width,
|
|
23451
23512
|
itemHeight = itemGroup.attribute.height;
|
|
23452
|
-
this._itemHeight = Math.max(this._itemHeight, itemHeight), maxWidthInCol = Math.max(itemWidth, maxWidthInCol), this._itemMaxWidth = Math.max(itemWidth, this._itemMaxWidth), isHorizontal ? (isValid$3(maxWidth) && (isScrollbar && autoPage ? (pages = Math.ceil((startX + itemWidth) / maxWidth), doWrap = pages > 1) : startX + itemWidth > maxWidth && (doWrap = !0, startX > 0 && (
|
|
23513
|
+
this._itemHeight = Math.max(this._itemHeight, itemHeight), maxWidthInCol = Math.max(itemWidth, maxWidthInCol), this._itemMaxWidth = Math.max(itemWidth, this._itemMaxWidth), isHorizontal ? (isValid$3(maxWidth) && (isScrollbar && autoPage ? (pages = Math.ceil((startX + itemWidth) / maxWidth), doWrap = pages > 1) : startX + itemWidth > maxWidth && (doWrap = !0, startX > 0 && ("middle" !== verticalAlign && "bottom" !== verticalAlign || lastLineItemGroup.forEach(i => {
|
|
23514
|
+
i.setAttributes({
|
|
23515
|
+
y: i.attribute.y + (lastLineHeight - i.attribute.height) / ("middle" === verticalAlign ? 2 : 1)
|
|
23516
|
+
});
|
|
23517
|
+
}), pages += 1, startX = 0, startY += lastLineHeight + spaceRow, lastLineHeight = 0, lastLineItemGroup.length = 0))), 0 === startX && 0 === startY || itemGroup.setAttributes({
|
|
23453
23518
|
x: startX,
|
|
23454
23519
|
y: startY
|
|
23455
|
-
}), startX += spaceCol + itemWidth) : (isValid$3(maxHeight) && (isScrollbar && autoPage ? (pages = Math.ceil((startY + itemHeight) / maxHeight), doWrap = pages > 1) : maxHeight <= itemHeight ? (pages += 1, doWrap = !0, startY = 0, index > 0 && (startX += lastItemWidth + spaceCol)) : maxHeight < startY + itemHeight && (pages += 1, doWrap = !0, startY = 0, startX += maxWidthInCol + spaceCol, maxWidthInCol = 0)), 0 === startX && 0 === startY || itemGroup.setAttributes({
|
|
23520
|
+
}), startX += spaceCol + itemWidth, lastLineHeight = Math.max(lastLineHeight, itemHeight), lastLineItemGroup.push(itemGroup)) : (isValid$3(maxHeight) && (isScrollbar && autoPage ? (pages = Math.ceil((startY + itemHeight) / maxHeight), doWrap = pages > 1) : maxHeight <= itemHeight ? (pages += 1, doWrap = !0, startY = 0, index > 0 && (startX += lastItemWidth + spaceCol)) : maxHeight < startY + itemHeight && (pages += 1, doWrap = !0, startY = 0, startX += maxWidthInCol + spaceCol, maxWidthInCol = 0)), 0 === startX && 0 === startY || itemGroup.setAttributes({
|
|
23456
23521
|
x: startX,
|
|
23457
23522
|
y: startY
|
|
23458
23523
|
}), startY += spaceRow + itemHeight), itemsContainer.add(itemGroup), lastItemWidth = itemWidth;
|
|
23459
23524
|
}
|
|
23460
|
-
return
|
|
23525
|
+
return !isHorizontal || "middle" !== verticalAlign && "bottom" !== verticalAlign || lastLineItemGroup.forEach(i => {
|
|
23526
|
+
i.setAttributes({
|
|
23527
|
+
y: i.attribute.y + (lastLineHeight - i.attribute.height) / ("middle" === verticalAlign ? 2 : 1)
|
|
23528
|
+
});
|
|
23529
|
+
}), this._itemContext.doWrap = doWrap, this._itemContext.startX = startX, this._itemContext.startY = startY, this._itemContext.maxWidthInCol = maxWidthInCol, this._itemContext.pages = pages, this._itemContext.maxPages = maxPages, isScrollbar && (this._itemContext.totalPage = pages), lazyload || (this._itemContext.startIndex = legendItems.length), this._itemContext;
|
|
23461
23530
|
}
|
|
23462
23531
|
_renderContent() {
|
|
23463
23532
|
const {
|
|
@@ -34715,8 +34784,7 @@
|
|
|
34715
34784
|
for (let col = 0; col < scene.table.colCount; col++) {
|
|
34716
34785
|
const distHeight = maxHeight,
|
|
34717
34786
|
cell = scene.highPerformanceGetCell(col, row);
|
|
34718
|
-
|
|
34719
|
-
updateCellHeightForRow(scene, cell, col, row, distHeight, distHeight - cell.attribute.height, scene.table.isHeader(col, row));
|
|
34787
|
+
"empty" !== cell.role && updateCellHeightForRow(scene, cell, col, row, distHeight, distHeight - cell.attribute.height, scene.table.isHeader(col, row));
|
|
34720
34788
|
}
|
|
34721
34789
|
}
|
|
34722
34790
|
|
|
@@ -36495,22 +36563,22 @@
|
|
|
36495
36563
|
if (strokeTop) {
|
|
36496
36564
|
const deltaLeft = (isWidthNumber ? widthInfo.width : strokeArrayWidth[0]) / 2,
|
|
36497
36565
|
deltaRight = (isWidthNumber ? widthInfo.width : strokeArrayWidth[0]) / 2;
|
|
36498
|
-
isPart && Array.isArray(part[0]) ? (context.moveTo(x - deltaLeft + (width + deltaLeft + deltaRight) * part[0][0], y), context.lineTo(x - deltaLeft + (width + deltaLeft + deltaRight) * (part[0][1] - part[0][0]), y), context.moveTo(x + width + deltaRight, y)) : (context.moveTo(x - deltaLeft, y), context.lineTo(x + width + deltaRight, y)), (isSplitDraw || isDash) && (strokeArrayColor && strokeArrayColor[0] ? context.strokeStyle = strokeArrayColor[0] : context.strokeStyle = "transparent", isWidthNumber || (context.lineWidth = strokeArrayWidth[0]), context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a, isDash && context.setLineDash(null !== (_a = lineDash[0]) && void 0 !== _a ? _a : []), context.stroke(), context.beginPath(), context.moveTo(x + width, y));
|
|
36566
|
+
isPart && Array.isArray(part[0]) ? (context.moveTo(x - deltaLeft + (width + deltaLeft + deltaRight) * part[0][0], y), context.lineTo(x - deltaLeft + (width + deltaLeft + deltaRight) * (part[0][1] - part[0][0]), y), context.moveTo(x + width + deltaRight, y)) : (context.moveTo(x - deltaLeft, y), context.lineTo(x + width + deltaRight, y)), (isSplitDraw || isDash) && (strokeArrayColor && strokeArrayColor[0] ? context.strokeStyle = strokeArrayColor[0] : strokeArrayColor && !strokeArrayColor[0] && (context.strokeStyle = "transparent"), isWidthNumber || (context.lineWidth = strokeArrayWidth[0]), context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a, isDash && context.setLineDash(null !== (_a = lineDash[0]) && void 0 !== _a ? _a : []), context.stroke(), context.beginPath(), context.moveTo(x + width, y));
|
|
36499
36567
|
} else context.moveTo(x + width, y);
|
|
36500
36568
|
if (strokeRight) {
|
|
36501
36569
|
const deltaTop = (isWidthNumber ? widthInfo.width : strokeArrayWidth[1]) / 2,
|
|
36502
36570
|
deltaBottom = (isWidthNumber ? widthInfo.width : strokeArrayWidth[1]) / 2;
|
|
36503
|
-
isPart && Array.isArray(part[1]) ? (context.moveTo(x + width, y - deltaTop + height * part[1][0]), context.lineTo(x + width, y - deltaTop + (height + deltaTop + deltaBottom) * (part[1][1] - part[1][0])), context.moveTo(x + width, y + height + deltaBottom)) : (context.moveTo(x + width, y - deltaTop), context.lineTo(x + width, y + height + deltaBottom)), (isSplitDraw || isDash) && (strokeArrayColor && strokeArrayColor[1] ? context.strokeStyle = strokeArrayColor[1] : context.strokeStyle = "transparent", isWidthNumber || (context.lineWidth = strokeArrayWidth[1]), context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d, isDash && context.setLineDash(null !== (_b = lineDash[1]) && void 0 !== _b ? _b : []), context.stroke(), context.beginPath(), context.moveTo(x + width, y + height));
|
|
36571
|
+
isPart && Array.isArray(part[1]) ? (context.moveTo(x + width, y - deltaTop + height * part[1][0]), context.lineTo(x + width, y - deltaTop + (height + deltaTop + deltaBottom) * (part[1][1] - part[1][0])), context.moveTo(x + width, y + height + deltaBottom)) : (context.moveTo(x + width, y - deltaTop), context.lineTo(x + width, y + height + deltaBottom)), (isSplitDraw || isDash) && (strokeArrayColor && strokeArrayColor[1] ? context.strokeStyle = strokeArrayColor[1] : strokeArrayColor && !strokeArrayColor[1] && (context.strokeStyle = "transparent"), isWidthNumber || (context.lineWidth = strokeArrayWidth[1]), context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d, isDash && context.setLineDash(null !== (_b = lineDash[1]) && void 0 !== _b ? _b : []), context.stroke(), context.beginPath(), context.moveTo(x + width, y + height));
|
|
36504
36572
|
} else context.moveTo(x + width, y + height);
|
|
36505
36573
|
if (strokeBottom) {
|
|
36506
36574
|
const deltaLeft = (isWidthNumber ? widthInfo.width : strokeArrayWidth[2]) / 2,
|
|
36507
36575
|
deltaRight = (isWidthNumber ? widthInfo.width : strokeArrayWidth[2]) / 2;
|
|
36508
|
-
isPart && Array.isArray(part[2]) ? (context.moveTo(x - deltaLeft + (width + deltaLeft + deltaRight) * part[2][0], y + height), context.lineTo(x - deltaLeft + (width + deltaLeft + deltaRight) * (part[2][1] - part[2][0]), y + height), context.moveTo(x - deltaLeft, y + height)) : (context.moveTo(x - deltaLeft, y + height), context.lineTo(x + width + deltaRight, y + height)), (isSplitDraw || isDash) && (strokeArrayColor && strokeArrayColor[2] ? context.strokeStyle = strokeArrayColor[2] : context.strokeStyle = "transparent", isWidthNumber || (context.lineWidth = strokeArrayWidth[2]), context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a, isDash && context.setLineDash(null !== (_c = lineDash[2]) && void 0 !== _c ? _c : []), context.stroke(), context.beginPath(), context.moveTo(x, y + height));
|
|
36576
|
+
isPart && Array.isArray(part[2]) ? (context.moveTo(x - deltaLeft + (width + deltaLeft + deltaRight) * part[2][0], y + height), context.lineTo(x - deltaLeft + (width + deltaLeft + deltaRight) * (part[2][1] - part[2][0]), y + height), context.moveTo(x - deltaLeft, y + height)) : (context.moveTo(x - deltaLeft, y + height), context.lineTo(x + width + deltaRight, y + height)), (isSplitDraw || isDash) && (strokeArrayColor && strokeArrayColor[2] ? context.strokeStyle = strokeArrayColor[2] : strokeArrayColor && !strokeArrayColor[2] && (context.strokeStyle = "transparent"), isWidthNumber || (context.lineWidth = strokeArrayWidth[2]), context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a, isDash && context.setLineDash(null !== (_c = lineDash[2]) && void 0 !== _c ? _c : []), context.stroke(), context.beginPath(), context.moveTo(x, y + height));
|
|
36509
36577
|
} else context.moveTo(x, y + height);
|
|
36510
36578
|
if (strokeLeft) {
|
|
36511
36579
|
const deltaTop = (isWidthNumber ? widthInfo.width : strokeArrayWidth[3]) / 2,
|
|
36512
36580
|
deltaBottom = (isWidthNumber ? widthInfo.width : strokeArrayWidth[3]) / 2;
|
|
36513
|
-
isPart && Array.isArray(part[3]) ? (context.moveTo(x, y - deltaTop + (height + deltaTop + deltaBottom) * part[3][0]), context.lineTo(x, y - deltaTop + (height + deltaTop + deltaBottom) * (part[3][1] - part[3][0])), context.moveTo(x, y - deltaTop)) : (context.moveTo(x, y - deltaTop), context.lineTo(x, y + height + deltaBottom)), (isSplitDraw || isDash) && (strokeArrayColor && strokeArrayColor[3] ? context.strokeStyle = strokeArrayColor[3] : context.strokeStyle = "transparent", isWidthNumber || (context.lineWidth = strokeArrayWidth[3]), context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d, isDash && context.setLineDash(null !== (_d = lineDash[3]) && void 0 !== _d ? _d : []), context.stroke(), context.beginPath(), context.moveTo(x, y));
|
|
36581
|
+
isPart && Array.isArray(part[3]) ? (context.moveTo(x, y - deltaTop + (height + deltaTop + deltaBottom) * part[3][0]), context.lineTo(x, y - deltaTop + (height + deltaTop + deltaBottom) * (part[3][1] - part[3][0])), context.moveTo(x, y - deltaTop)) : (context.moveTo(x, y - deltaTop), context.lineTo(x, y + height + deltaBottom)), (isSplitDraw || isDash) && (strokeArrayColor && strokeArrayColor[3] ? context.strokeStyle = strokeArrayColor[3] : strokeArrayColor && !strokeArrayColor[3] && (context.strokeStyle = "transparent"), isWidthNumber || (context.lineWidth = strokeArrayWidth[3]), context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d, isDash && context.setLineDash(null !== (_d = lineDash[3]) && void 0 !== _d ? _d : []), context.stroke(), context.beginPath(), context.moveTo(x, y));
|
|
36514
36582
|
} else context.moveTo(x, y);
|
|
36515
36583
|
isSplitDraw || isDash || (!isWidthNumber && widthInfo.width && (context.lineWidth = widthInfo.width), context.stroke()), context.lineDashOffset = 0, context.setLineDash([]);
|
|
36516
36584
|
}
|
|
@@ -36781,19 +36849,19 @@
|
|
|
36781
36849
|
strokeLeft = (isStrokeTrue || stroke[3]) && (isWidthNumber || strokeArrayWidth[3]);
|
|
36782
36850
|
if (strokeTop && 0 === i) {
|
|
36783
36851
|
isWidthNumber ? widthInfo.width : strokeArrayWidth[0], isWidthNumber ? widthInfo.width : strokeArrayWidth[0];
|
|
36784
|
-
context.moveTo(x1, y1), context.lineTo(x2, y2), (isSplitDraw || isDash) && (strokeArrayColor && strokeArrayColor[0] ? context.strokeStyle = strokeArrayColor[0] : context.strokeStyle = "transparent", isWidthNumber || (context.lineWidth = strokeArrayWidth[0]), context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a, isDash && context.setLineDash(null !== (_a = lineDash[0]) && void 0 !== _a ? _a : []), context.stroke(), context.beginPath());
|
|
36852
|
+
context.moveTo(x1, y1), context.lineTo(x2, y2), (isSplitDraw || isDash) && (strokeArrayColor && strokeArrayColor[0] ? context.strokeStyle = strokeArrayColor[0] : strokeArrayColor && !strokeArrayColor[0] && (context.strokeStyle = "transparent"), isWidthNumber || (context.lineWidth = strokeArrayWidth[0]), context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a, isDash && context.setLineDash(null !== (_a = lineDash[0]) && void 0 !== _a ? _a : []), context.stroke(), context.beginPath());
|
|
36785
36853
|
} else 0 === i && context.moveTo(x + width, y);
|
|
36786
36854
|
if (strokeRight && 1 === i) {
|
|
36787
36855
|
isWidthNumber ? widthInfo.width : strokeArrayWidth[1], isWidthNumber ? widthInfo.width : strokeArrayWidth[1];
|
|
36788
|
-
context.moveTo(x1, y1), context.lineTo(x2, y2), (isSplitDraw || isDash) && (strokeArrayColor && strokeArrayColor[1] ? context.strokeStyle = strokeArrayColor[1] : context.strokeStyle = "transparent", isWidthNumber || (context.lineWidth = strokeArrayWidth[1]), context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d, isDash && context.setLineDash(null !== (_b = lineDash[1]) && void 0 !== _b ? _b : []), context.stroke(), context.beginPath(), context.moveTo(x + width, y + height));
|
|
36856
|
+
context.moveTo(x1, y1), context.lineTo(x2, y2), (isSplitDraw || isDash) && (strokeArrayColor && strokeArrayColor[1] ? context.strokeStyle = strokeArrayColor[1] : strokeArrayColor && !strokeArrayColor[1] && (context.strokeStyle = "transparent"), isWidthNumber || (context.lineWidth = strokeArrayWidth[1]), context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d, isDash && context.setLineDash(null !== (_b = lineDash[1]) && void 0 !== _b ? _b : []), context.stroke(), context.beginPath(), context.moveTo(x + width, y + height));
|
|
36789
36857
|
} else 1 === i && context.moveTo(x + width, y + height);
|
|
36790
36858
|
if (strokeBottom && 2 === i) {
|
|
36791
36859
|
isWidthNumber ? widthInfo.width : strokeArrayWidth[2], isWidthNumber ? widthInfo.width : strokeArrayWidth[2];
|
|
36792
|
-
context.moveTo(x1, y1), context.lineTo(x2, y2), (isSplitDraw || isDash) && (strokeArrayColor && strokeArrayColor[2] ? context.strokeStyle = strokeArrayColor[2] : context.strokeStyle = "transparent", isWidthNumber || (context.lineWidth = strokeArrayWidth[2]), context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a, isDash && context.setLineDash(null !== (_c = lineDash[2]) && void 0 !== _c ? _c : []), context.stroke(), context.beginPath(), context.moveTo(x, y + height));
|
|
36860
|
+
context.moveTo(x1, y1), context.lineTo(x2, y2), (isSplitDraw || isDash) && (strokeArrayColor && strokeArrayColor[2] ? context.strokeStyle = strokeArrayColor[2] : strokeArrayColor && !strokeArrayColor[2] && (context.strokeStyle = "transparent"), isWidthNumber || (context.lineWidth = strokeArrayWidth[2]), context.lineDashOffset = context.currentMatrix.e / context.currentMatrix.a, isDash && context.setLineDash(null !== (_c = lineDash[2]) && void 0 !== _c ? _c : []), context.stroke(), context.beginPath(), context.moveTo(x, y + height));
|
|
36793
36861
|
} else 2 === i && context.moveTo(x, y + height);
|
|
36794
36862
|
if (strokeLeft && 3 === i) {
|
|
36795
36863
|
isWidthNumber ? widthInfo.width : strokeArrayWidth[3], isWidthNumber ? widthInfo.width : strokeArrayWidth[3];
|
|
36796
|
-
context.moveTo(x1, y1), context.lineTo(x2, y2), (isSplitDraw || isDash) && (strokeArrayColor && strokeArrayColor[3] ? context.strokeStyle = strokeArrayColor[3] : context.strokeStyle = "transparent", isWidthNumber || (context.lineWidth = strokeArrayWidth[3]), context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d, isDash && context.setLineDash(null !== (_d = lineDash[3]) && void 0 !== _d ? _d : []), context.stroke(), context.beginPath(), context.moveTo(x, y));
|
|
36864
|
+
context.moveTo(x1, y1), context.lineTo(x2, y2), (isSplitDraw || isDash) && (strokeArrayColor && strokeArrayColor[3] ? context.strokeStyle = strokeArrayColor[3] : strokeArrayColor && !strokeArrayColor[3] && (context.strokeStyle = "transparent"), isWidthNumber || (context.lineWidth = strokeArrayWidth[3]), context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d, isDash && context.setLineDash(null !== (_d = lineDash[3]) && void 0 !== _d ? _d : []), context.stroke(), context.beginPath(), context.moveTo(x, y));
|
|
36797
36865
|
} else 3 === i && context.moveTo(x, y);
|
|
36798
36866
|
isSplitDraw || isDash || (!isWidthNumber && widthInfo.width && (context.lineWidth = widthInfo.width), context.stroke()), context.lineDashOffset = 0, context.setLineDash([]), context.closePath();
|
|
36799
36867
|
}
|
|
@@ -37436,7 +37504,7 @@
|
|
|
37436
37504
|
rightBottomCornerGroup: rightBottomCornerGroup
|
|
37437
37505
|
} = table.scenegraph;
|
|
37438
37506
|
let distCol, distRow, distColForCompute, distRowForCompute;
|
|
37439
|
-
proxy.setParamsForRow(), proxy.setParamsForColumn(), "adaptive" === table.widthMode || table.options.autoWrapText && ("adaptive" === table.heightMode || table.isAutoRowHeight()) ? (distColForCompute = table.colCount - 1, distCol = Math.min(proxy.firstScreenColLimit, table.colCount - 1)) : distCol = Math.min(proxy.firstScreenColLimit, table.colCount - 1), "adaptive" === table.heightMode ? (distRowForCompute = table.rowCount - 1, distRow = Math.min(proxy.firstScreenRowLimit, table.rowCount - 1)) : distRow = Math.min(proxy.firstScreenRowLimit, table.rowCount - 1), 0 === table.internalProps._widthResizedColMap.size && computeColsWidth(table, 0, null != distColForCompute ? distColForCompute : distCol), 0 === table.internalProps._heightResizedRowMap.size && computeRowsHeight(table, 0, null != distRowForCompute ? distRowForCompute : distRow), distCol < table.colCount - table.rightFrozenColCount && computeColsWidth(table, table.colCount - table.rightFrozenColCount, table.colCount - 1), distRow < table.rowCount - table.bottomFrozenRowCount && computeRowsHeight(table, table.rowCount - table.bottomFrozenRowCount, table.rowCount - 1), table.scenegraph.colHeaderGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rowHeaderGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bottomFrozenGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rightFrozenGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bodyGroup.setAttributes({
|
|
37507
|
+
proxy.setParamsForRow(), proxy.setParamsForColumn(), "adaptive" === table.widthMode || table.options.autoWrapText && ("adaptive" === table.heightMode || table.isAutoRowHeight()) ? (distColForCompute = table.colCount - 1, distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1)) : distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1), "adaptive" === table.heightMode ? (distRowForCompute = table.rowCount - 1, distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1)) : distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1), 0 === table.internalProps._widthResizedColMap.size && computeColsWidth(table, 0, null != distColForCompute ? distColForCompute : distCol), 0 === table.internalProps._heightResizedRowMap.size && computeRowsHeight(table, 0, null != distRowForCompute ? distRowForCompute : distRow), distCol < table.colCount - table.rightFrozenColCount && computeColsWidth(table, table.colCount - table.rightFrozenColCount, table.colCount - 1), distRow < table.rowCount - table.bottomFrozenRowCount && computeRowsHeight(table, table.rowCount - table.bottomFrozenRowCount, table.rowCount - 1), table.scenegraph.colHeaderGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rowHeaderGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bottomFrozenGroup.setAttribute("x", table.getFrozenColsWidth()), table.scenegraph.rightFrozenGroup.setAttribute("y", table.getFrozenRowsHeight()), table.scenegraph.bodyGroup.setAttributes({
|
|
37440
37508
|
x: table.getFrozenColsWidth(),
|
|
37441
37509
|
y: table.getFrozenRowsHeight()
|
|
37442
37510
|
}), createColGroup(cornerHeaderGroup, xOrigin, yOrigin, 0, table.frozenColCount - 1, 0, table.frozenRowCount - 1, table.isListTable() ? "columnHeader" : "cornerHeader", table), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(colHeaderGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, 0, table.frozenRowCount - 1, "columnHeader", table), table.frozenColCount > 0 && (table.leftRowSeriesNumberCount > 0 && createColGroup(rowHeaderGroup, xOrigin, yOrigin, 0, table.leftRowSeriesNumberCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "rowHeader", table), table.rowHeaderLevelCount > 0 && createColGroup(rowHeaderGroup, xOrigin, yOrigin, table.leftRowSeriesNumberCount, table.leftRowSeriesNumberCount + table.rowHeaderLevelCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "rowHeader", table), table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount && createColGroup(rowHeaderGroup, xOrigin, yOrigin, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, table.frozenColCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "body", table)), table.bottomFrozenRowCount > 0 && (table.frozenColCount > 0 && (table.leftRowSeriesNumberCount > 0 && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, 0, table.leftRowSeriesNumberCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "rowHeader", table), table.rowHeaderLevelCount > 0 && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, table.leftRowSeriesNumberCount, table.leftRowSeriesNumberCount + table.rowHeaderLevelCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "rowHeader", table), table.frozenColCount > table.rowHeaderLevelCount + table.leftRowSeriesNumberCount && createColGroup(leftBottomCornerGroup, xOrigin, yOrigin, table.rowHeaderLevelCount + table.leftRowSeriesNumberCount, table.frozenColCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table)), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(bottomFrozenGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, table.isPivotChart() ? "rowHeader" : "body", table)), table.rightFrozenColCount > 0 && (createColGroup(rightTopCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, 0, table.frozenRowCount - 1, "columnHeader", table), createColGroup(rightFrozenGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.frozenRowCount, distRow - table.bottomFrozenRowCount, table.isPivotChart() ? "rowHeader" : "body", table)), table.bottomFrozenRowCount > 0 && table.rightFrozenColCount > 0 && createColGroup(rightBottomCornerGroup, xOrigin, yOrigin, table.colCount - 1 - table.rightFrozenColCount + 1, table.colCount - 1, table.rowCount - 1 - table.bottomFrozenRowCount + 1, table.rowCount - 1, "body", table), distCol - table.rightFrozenColCount >= table.frozenColCount && createColGroup(bodyGroup, xOrigin, yOrigin, table.frozenColCount, distCol - table.rightFrozenColCount, table.frozenRowCount, distRow - table.bottomFrozenRowCount, "body", table), bodyGroup.firstChild || colHeaderGroup.firstChild || cornerHeaderGroup.firstChild || rowHeaderGroup.firstChild ? (proxy.currentRow = null !== (_d = null !== (_b = null === (_a = bodyGroup.firstChild) || void 0 === _a ? void 0 : _a.rowNumber) && void 0 !== _b ? _b : null === (_c = rowHeaderGroup.firstChild) || void 0 === _c ? void 0 : _c.rowNumber) && void 0 !== _d ? _d : proxy.totalRow, proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.currentCol = null !== (_m = null !== (_k = null !== (_h = null !== (_f = null === (_e = bodyGroup.lastChild) || void 0 === _e ? void 0 : _e.col) && void 0 !== _f ? _f : null === (_g = colHeaderGroup.lastChild) || void 0 === _g ? void 0 : _g.col) && void 0 !== _h ? _h : null === (_j = rowHeaderGroup.lastChild) || void 0 === _j ? void 0 : _j.col) && void 0 !== _k ? _k : null === (_l = cornerHeaderGroup.lastChild) || void 0 === _l ? void 0 : _l.col) && void 0 !== _m ? _m : proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2), proxy.progress()) : (proxy.currentRow = proxy.totalRow, proxy.rowEnd = proxy.currentRow, proxy.rowUpdatePos = proxy.rowEnd + 1, proxy.referenceRow = proxy.rowStart + Math.floor((proxy.rowEnd - proxy.rowStart) / 2), proxy.currentCol = proxy.totalCol, proxy.colEnd = proxy.currentCol, proxy.colUpdatePos = proxy.colEnd + 1, proxy.referenceCol = proxy.colStart + Math.floor((proxy.colEnd - proxy.colStart) / 2));
|
|
@@ -37444,12 +37512,12 @@
|
|
|
37444
37512
|
|
|
37445
37513
|
function getFirstChild(containerGroup) {
|
|
37446
37514
|
let child = containerGroup.firstChild;
|
|
37447
|
-
for (; "group" !== child.type;) child = child._next;
|
|
37515
|
+
for (; child && "group" !== child.type;) child = child._next;
|
|
37448
37516
|
return child;
|
|
37449
37517
|
}
|
|
37450
37518
|
function getLastChild(containerGroup) {
|
|
37451
37519
|
let child = containerGroup.lastChild;
|
|
37452
|
-
for (; "group" !== child.type;) child = child._prev;
|
|
37520
|
+
for (; child && "group" !== child.type;) child = child._prev;
|
|
37453
37521
|
return child;
|
|
37454
37522
|
}
|
|
37455
37523
|
function getPrevGroup(group) {
|
|
@@ -37611,7 +37679,7 @@
|
|
|
37611
37679
|
const colGroup = proxy.table.scenegraph.getColGroup(col);
|
|
37612
37680
|
colGroup && updateColGroupContentAsync(colGroup, proxy);
|
|
37613
37681
|
}
|
|
37614
|
-
proxy.progress();
|
|
37682
|
+
updateColumnContainerWidth(proxy.table.scenegraph.colHeaderGroup), updateColumnContainerWidth(proxy.table.scenegraph.bottomFrozenGroup), updateColumnContainerWidth(proxy.table.scenegraph.bodyGroup), proxy.progress();
|
|
37615
37683
|
}
|
|
37616
37684
|
function updateAllColPosition(distStartColY, count, direction, proxy) {
|
|
37617
37685
|
proxy.table.scenegraph.colHeaderGroup.forEachChildren((colGroup, index) => {
|
|
@@ -37622,6 +37690,11 @@
|
|
|
37622
37690
|
"group" === colGroup.type && updateColGroupPosition(colGroup, "left" === direction ? colGroup.col + count : colGroup.col - count, 0 === index ? distStartColY : colGroup._prev.attribute.x + proxy.table.getColWidth(colGroup._prev.col));
|
|
37623
37691
|
});
|
|
37624
37692
|
}
|
|
37693
|
+
function updateColumnContainerWidth(containerGroup) {
|
|
37694
|
+
var _a;
|
|
37695
|
+
const lastColGroup = getLastChild(containerGroup);
|
|
37696
|
+
lastColGroup && (containerGroup.setAttribute("width", lastColGroup.attribute.x + lastColGroup.attribute.width), null === (_a = containerGroup.border) || void 0 === _a || _a.setAttribute("width", lastColGroup.attribute.x + lastColGroup.attribute.width));
|
|
37697
|
+
}
|
|
37625
37698
|
|
|
37626
37699
|
function updateAutoRow(colStart, colEnd, rowStart, rowEnd, table) {
|
|
37627
37700
|
let direction = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : "up";
|
|
@@ -40017,7 +40090,7 @@
|
|
|
40017
40090
|
var _a, _b;
|
|
40018
40091
|
this.table.animationManager.clear(), (this.table.isPivotChart() || this.table._hasCustomRenderOrLayout()) && this.stage.pluginService.findPluginsByName("poptipForText").forEach(plugin => {
|
|
40019
40092
|
plugin.deactivate(this.stage.pluginService);
|
|
40020
|
-
}), this.clear = !0, this.hasFrozen = !1, this.mergeMap.clear(), this.colHeaderGroup.clear(), this.rowHeaderGroup.clear(), this.cornerHeaderGroup.clear(), this.bodyGroup.clear(), this.bottomFrozenGroup.clear(), this.rightFrozenGroup.clear(), this.rightTopCornerGroup.clear(), this.rightBottomCornerGroup.clear(), this.leftBottomCornerGroup.clear(), this.colHeaderGroup.setAttributes({
|
|
40093
|
+
}), this.clear = !0, this.hasFrozen = !1, this.mergeMap.clear(), this.colHeaderGroup.clear(), delete this.colHeaderGroup.border, this.rowHeaderGroup.clear(), delete this.rowHeaderGroup.border, this.cornerHeaderGroup.clear(), delete this.cornerHeaderGroup.border, this.bodyGroup.clear(), delete this.bodyGroup.border, this.bottomFrozenGroup.clear(), delete this.bottomFrozenGroup.border, this.rightFrozenGroup.clear(), delete this.rightFrozenGroup.border, this.rightTopCornerGroup.clear(), delete this.rightTopCornerGroup.border, this.rightBottomCornerGroup.clear(), delete this.rightBottomCornerGroup.border, this.leftBottomCornerGroup.clear(), delete this.leftBottomCornerGroup.border, this.colHeaderGroup.setAttributes({
|
|
40021
40094
|
x: 0,
|
|
40022
40095
|
y: 0,
|
|
40023
40096
|
width: 0,
|
|
@@ -40253,13 +40326,13 @@
|
|
|
40253
40326
|
if (this.table.transpose) null === (_a = this.bodyGroup.children) || void 0 === _a || _a.forEach(columnGroup => {
|
|
40254
40327
|
var _a;
|
|
40255
40328
|
null === (_a = columnGroup.getChildAt(row)) || void 0 === _a || _a.getChildren().forEach(node => {
|
|
40256
|
-
"checkbox" === node.name && node.setAttribute("checked", checked);
|
|
40329
|
+
"checkbox" === node.name && ("indeterminate" === checked ? (node.setAttribute("indeterminate", !0), node.setAttribute("checked", void 0)) : (node.setAttribute("indeterminate", void 0), node.setAttribute("checked", checked)));
|
|
40257
40330
|
});
|
|
40258
40331
|
});else {
|
|
40259
40332
|
const columnGroup = this.getColGroup(col);
|
|
40260
40333
|
null === (_b = null == columnGroup ? void 0 : columnGroup.children) || void 0 === _b || _b.forEach(cellNode => {
|
|
40261
40334
|
cellNode.getChildren().find(node => {
|
|
40262
|
-
"checkbox" === node.name && node.setAttribute("checked", checked);
|
|
40335
|
+
"checkbox" === node.name && ("indeterminate" === checked ? (node.setAttribute("indeterminate", !0), node.setAttribute("checked", void 0)) : (node.setAttribute("indeterminate", void 0), node.setAttribute("checked", checked)));
|
|
40263
40336
|
});
|
|
40264
40337
|
});
|
|
40265
40338
|
}
|
|
@@ -41601,12 +41674,12 @@
|
|
|
41601
41674
|
allUnChecked = !0,
|
|
41602
41675
|
hasChecked = !1;
|
|
41603
41676
|
return state.checkedState.forEach((check_state, index) => {
|
|
41604
|
-
var _a;
|
|
41677
|
+
var _a, _b;
|
|
41605
41678
|
index = index.includes(",") ? index.split(",").map(item => Number(item)) : Number(index);
|
|
41606
41679
|
const tableIndex = state.table.getTableIndexByRecordIndex(index),
|
|
41607
41680
|
mergeCell = state.table.transpose ? state.table.getCustomMerge(tableIndex, row) : state.table.getCustomMerge(col, tableIndex),
|
|
41608
41681
|
data = null === (_a = state.table.dataSource) || void 0 === _a ? void 0 : _a.get(index);
|
|
41609
|
-
mergeCell || data.vtableMerge || (!0 !== (null == check_state ? void 0 : check_state[field]) ? allChecked = !1 : (allUnChecked = !1, hasChecked = !0));
|
|
41682
|
+
mergeCell || !(null === (_b = state.table.internalProps.rowSeriesNumber) || void 0 === _b ? void 0 : _b.enableTreeCheckbox) && data.vtableMerge || (!0 !== (null == check_state ? void 0 : check_state[field]) ? allChecked = !1 : (allUnChecked = !1, hasChecked = !0));
|
|
41610
41683
|
}), allChecked ? (state.headerCheckedState[field] = !0, allChecked) : allUnChecked ? (state.headerCheckedState[field] = !1, !1) : !!hasChecked && (state.headerCheckedState[field] = "indeterminate", "indeterminate");
|
|
41611
41684
|
}
|
|
41612
41685
|
function initLeftRecordsCheckState(records, state) {
|
|
@@ -41645,6 +41718,11 @@
|
|
|
41645
41718
|
} = checkbox.attribute;
|
|
41646
41719
|
indeterminate ? (checked || checkbox._handlePointerUp(), checkbox._handlePointerUp()) : oldChecked ? checked || checkbox._handlePointerUp() : checked && checkbox._handlePointerUp();
|
|
41647
41720
|
}
|
|
41721
|
+
function setCellCheckboxStateByAttribute(col, row, checked, table) {
|
|
41722
|
+
const cellGroup = table.scenegraph.getCell(col, row),
|
|
41723
|
+
checkbox = null == cellGroup ? void 0 : cellGroup.getChildByName("checkbox");
|
|
41724
|
+
checkbox && ("indeterminate" === checked ? (checkbox.setAttribute("indeterminate", !0), checkbox.setAttribute("checked", void 0)) : (checkbox.setAttribute("indeterminate", void 0), checkbox.setAttribute("checked", checked)));
|
|
41725
|
+
}
|
|
41648
41726
|
function changeCheckboxOrder(sourceIndex, targetIndex, state) {
|
|
41649
41727
|
const {
|
|
41650
41728
|
checkedState: checkedState,
|
|
@@ -43742,6 +43820,69 @@
|
|
|
43742
43820
|
return "bottom";
|
|
43743
43821
|
}
|
|
43744
43822
|
|
|
43823
|
+
function bindGroupTitleCheckboxChange(table) {
|
|
43824
|
+
table.on("checkbox_state_change", args => {
|
|
43825
|
+
var _a;
|
|
43826
|
+
if (!0 !== (null === (_a = table.internalProps.rowSeriesNumber) || void 0 === _a ? void 0 : _a.enableTreeCheckbox)) return;
|
|
43827
|
+
const {
|
|
43828
|
+
col: col,
|
|
43829
|
+
row: row,
|
|
43830
|
+
checked: checked
|
|
43831
|
+
} = args,
|
|
43832
|
+
record = table.getCellOriginRecord(col, row),
|
|
43833
|
+
indexedData = table.dataSource.currentPagerIndexedData,
|
|
43834
|
+
titleShowIndex = table.getRecordShowIndexByCell(col, row);
|
|
43835
|
+
let titleIndex = indexedData[titleShowIndex];
|
|
43836
|
+
if (isNumber$2(titleIndex) && (titleIndex = [titleIndex]), record.vtableMerge) {
|
|
43837
|
+
if (checked) setAllChildrenCheckboxState(!0, titleShowIndex, titleIndex, indexedData, table), updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table);else {
|
|
43838
|
+
setAllChildrenCheckboxState(!1, titleShowIndex, titleIndex, indexedData, table), updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table);
|
|
43839
|
+
const oldHeaderCheckedState = table.stateManager.headerCheckedState._vtable_rowSeries_number,
|
|
43840
|
+
newHeaderCheckedState = table.stateManager.updateHeaderCheckedState("_vtable_rowSeries_number", col, row);
|
|
43841
|
+
oldHeaderCheckedState !== newHeaderCheckedState && table.scenegraph.updateHeaderCheckboxCellState(col, row, newHeaderCheckedState);
|
|
43842
|
+
}
|
|
43843
|
+
} else updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table);
|
|
43844
|
+
});
|
|
43845
|
+
}
|
|
43846
|
+
function setAllChildrenCheckboxState(state, titleShowIndex, titleIndex, indexedData, table) {
|
|
43847
|
+
var _a;
|
|
43848
|
+
let i = titleShowIndex + 1;
|
|
43849
|
+
for (; isArray$1(indexedData[i]) && (null === (_a = indexedData[i]) || void 0 === _a ? void 0 : _a.length) > titleIndex.length;) {
|
|
43850
|
+
const row = table.columnHeaderLevelCount + i;
|
|
43851
|
+
table.stateManager.setCheckedState(0, row, "_vtable_rowSeries_number", state), setCellCheckboxStateByAttribute(0, row, state, table), i++;
|
|
43852
|
+
}
|
|
43853
|
+
}
|
|
43854
|
+
function updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table) {
|
|
43855
|
+
var _a;
|
|
43856
|
+
let parentLength = titleIndex.length - 1;
|
|
43857
|
+
if (parentLength > 0) {
|
|
43858
|
+
let i = titleShowIndex - 1;
|
|
43859
|
+
for (; parentLength > 0 && i >= 0;) {
|
|
43860
|
+
if (isArray$1(indexedData[i]) && (null === (_a = indexedData[i]) || void 0 === _a ? void 0 : _a.length) === parentLength || 1 === parentLength && isNumber$2(indexedData[i])) {
|
|
43861
|
+
updateParentCheckboxState(0, table.columnHeaderLevelCount + i, indexedData[i], table), parentLength--;
|
|
43862
|
+
}
|
|
43863
|
+
i--;
|
|
43864
|
+
}
|
|
43865
|
+
}
|
|
43866
|
+
}
|
|
43867
|
+
function updateParentCheckboxState(col, row, currentIndex, table) {
|
|
43868
|
+
const {
|
|
43869
|
+
checkedState: checkedState
|
|
43870
|
+
} = table.stateManager,
|
|
43871
|
+
key = currentIndex.toString(),
|
|
43872
|
+
currentIndexLength = isArray$1(currentIndex) ? currentIndex.length : 1;
|
|
43873
|
+
let start = !1;
|
|
43874
|
+
const result = [];
|
|
43875
|
+
if (checkedState.forEach((value, index) => {
|
|
43876
|
+
if (start) {
|
|
43877
|
+
index.split(",").length === currentIndexLength ? start = !1 : result.push(value._vtable_rowSeries_number);
|
|
43878
|
+
}
|
|
43879
|
+
index === key && (start = !0);
|
|
43880
|
+
}), 0 === result.length) return;
|
|
43881
|
+
const allChecked = result.every(item => !!item),
|
|
43882
|
+
allUnChecked = result.every(item => !item);
|
|
43883
|
+
allChecked ? (table.stateManager.setCheckedState(col, row, "_vtable_rowSeries_number", !0), setCellCheckboxStateByAttribute(col, row, !0, table)) : allUnChecked ? (table.stateManager.setCheckedState(col, row, "_vtable_rowSeries_number", !1), setCellCheckboxStateByAttribute(col, row, !1, table)) : (table.stateManager.setCheckedState(col, row, "_vtable_rowSeries_number", "indeterminate"), setCellCheckboxStateByAttribute(col, row, "indeterminate", table));
|
|
43884
|
+
}
|
|
43885
|
+
|
|
43745
43886
|
class EventManager {
|
|
43746
43887
|
constructor(table) {
|
|
43747
43888
|
this.isDown = !1, this.isDraging = !1, this.globalEventListeners = [], this._enableTableScroll = !0, this.table = table, this.handleTextStickBindId = [], this.inertiaScroll = new InertiaScroll(table.stateManager), "node" === Env.mode || table.options.disableInteraction || (this.bindOuterEvent(), setTimeout(() => {
|
|
@@ -43802,7 +43943,7 @@
|
|
|
43802
43943
|
});
|
|
43803
43944
|
}
|
|
43804
43945
|
}
|
|
43805
|
-
}), this.table.isPivotTable() && checkHaveDrill(this.table) && bindDrillEvent(this.table), bindSparklineHoverEvent(this.table), bindAxisClickEvent(this.table), bindAxisHoverEvent(this.table);
|
|
43946
|
+
}), this.table.isPivotTable() && checkHaveDrill(this.table) && bindDrillEvent(this.table), bindSparklineHoverEvent(this.table), bindAxisClickEvent(this.table), bindAxisHoverEvent(this.table), bindGroupTitleCheckboxChange(this.table);
|
|
43806
43947
|
}
|
|
43807
43948
|
dealTableHover(eventArgsSet) {
|
|
43808
43949
|
if (!eventArgsSet) return void this.table.stateManager.updateHoverPos(-1, -1);
|
|
@@ -44854,7 +44995,12 @@
|
|
|
44854
44995
|
showSort: showSort,
|
|
44855
44996
|
sort: sort
|
|
44856
44997
|
} = this._table.internalProps.layoutMap.getHeader(col, row);
|
|
44857
|
-
|
|
44998
|
+
let _showSort;
|
|
44999
|
+
if (_showSort = "function" == typeof showSort ? showSort({
|
|
45000
|
+
col: col,
|
|
45001
|
+
row: row,
|
|
45002
|
+
table: this._table
|
|
45003
|
+
}) : showSort, _showSort) {
|
|
44858
45004
|
let order = this._table.getPivotSortState(col, row);
|
|
44859
45005
|
order && (order = order.toUpperCase());
|
|
44860
45006
|
const sortIcon = "ASC" === order ? this.upIcon : "DESC" === order ? this.downIcon : this.normalIcon;
|
|
@@ -44933,11 +45079,21 @@
|
|
|
44933
45079
|
getSortIcon(order, _table, col, row) {
|
|
44934
45080
|
const icon = "asc" === order ? this.upIcon : "desc" === order ? this.downIcon : this.normalIcon,
|
|
44935
45081
|
headerC = _table.getHeaderDefine(col, row);
|
|
44936
|
-
|
|
45082
|
+
let _showSort;
|
|
45083
|
+
return headerC && (_showSort = "function" == typeof headerC.showSort ? headerC.showSort({
|
|
45084
|
+
col: col,
|
|
45085
|
+
row: row,
|
|
45086
|
+
table: this._table
|
|
45087
|
+
}) : headerC.showSort), !headerC || !1 === _showSort || !isValid$1(_showSort) && !headerC.sort || headerC.columns && headerC.columns.length > 0 ? null : icon;
|
|
44937
45088
|
}
|
|
44938
45089
|
getSortIconForPivotTable(order, _table, col, row) {
|
|
44939
45090
|
const headerC = _table.getHeaderDefine(col, row);
|
|
44940
|
-
|
|
45091
|
+
let _showSort;
|
|
45092
|
+
if (headerC && (_showSort = "function" == typeof headerC.showSort ? headerC.showSort({
|
|
45093
|
+
col: col,
|
|
45094
|
+
row: row,
|
|
45095
|
+
table: this._table
|
|
45096
|
+
}) : headerC.showSort), !headerC || !1 === _showSort || !isValid$1(_showSort) && !headerC.sort || headerC.columns && headerC.columns.length > 0) return null;
|
|
44941
45097
|
return "ASC" === (null == order ? void 0 : order.toUpperCase()) ? this.upIcon : "DESC" === (null == order ? void 0 : order.toUpperCase()) ? this.downIcon : this.normalIcon;
|
|
44942
45098
|
}
|
|
44943
45099
|
getDropDownStateIcons(_table, col, row) {
|
|
@@ -45272,7 +45428,7 @@
|
|
|
45272
45428
|
constructor(tree, sharedVar) {
|
|
45273
45429
|
let hierarchyType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "grid";
|
|
45274
45430
|
let rowExpandLevel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : void 0;
|
|
45275
|
-
this.sizeIncludeParent = !1, this.tree = {
|
|
45431
|
+
this.hasHideNode = !1, this.sizeIncludeParent = !1, this.tree = {
|
|
45276
45432
|
id: 0,
|
|
45277
45433
|
dimensionKey: "",
|
|
45278
45434
|
value: "",
|
|
@@ -45286,11 +45442,11 @@
|
|
|
45286
45442
|
}, this.totalLevel = 0, this.dimensionKeys = new NumberMap(), this.dimensionKeysIncludeVirtual = new NumberMap(), this.cache = new Map(), this.sizeIncludeParent = null != rowExpandLevel, this.rowExpandLevel = rowExpandLevel, this.hierarchyType = hierarchyType, this.sharedVar = sharedVar, this.reset(tree);
|
|
45287
45443
|
}
|
|
45288
45444
|
reset(tree) {
|
|
45289
|
-
this.cache.clear(), this.dimensionKeys = new NumberMap(), this.dimensionKeysIncludeVirtual = new NumberMap(), this.tree.children = tree, this.setTreeNode(this.tree, 0, this.tree);
|
|
45445
|
+
this.hasHideNode = !1, this.cache.clear(), this.dimensionKeys = new NumberMap(), this.dimensionKeysIncludeVirtual = new NumberMap(), this.tree.children = tree, this.setTreeNode(this.tree, 0, this.tree);
|
|
45290
45446
|
}
|
|
45291
45447
|
setTreeNode(node, startIndex, parent) {
|
|
45292
45448
|
var _a, _b;
|
|
45293
|
-
node.startIndex = startIndex, node.startInTotal = (null !== (_a = parent.startInTotal) && void 0 !== _a ? _a : 0) + node.startIndex, (null !== (_b = node.dimensionKey) && void 0 !== _b ? _b : node.indicatorKey) && (node.virtual || this.dimensionKeys.contain(node.indicatorKey ? IndicatorDimensionKeyPlaceholder : node.dimensionKey) || this.dimensionKeys.put(node.level, node.indicatorKey ? IndicatorDimensionKeyPlaceholder : node.dimensionKey), this.dimensionKeysIncludeVirtual.contain(node.indicatorKey ? IndicatorDimensionKeyPlaceholder : node.dimensionKey) || this.dimensionKeysIncludeVirtual.put(node.level, node.indicatorKey ? IndicatorDimensionKeyPlaceholder : node.dimensionKey), node.id || (node.id = ++this.sharedVar.seqId));
|
|
45449
|
+
node.startIndex = startIndex, node.startInTotal = (null !== (_a = parent.startInTotal) && void 0 !== _a ? _a : 0) + node.startIndex, node.hide && (this.hasHideNode = !0), (null !== (_b = node.dimensionKey) && void 0 !== _b ? _b : node.indicatorKey) && (node.virtual || this.dimensionKeys.contain(node.indicatorKey ? IndicatorDimensionKeyPlaceholder : node.dimensionKey) || this.dimensionKeys.put(node.level, node.indicatorKey ? IndicatorDimensionKeyPlaceholder : node.dimensionKey), this.dimensionKeysIncludeVirtual.contain(node.indicatorKey ? IndicatorDimensionKeyPlaceholder : node.dimensionKey) || this.dimensionKeysIncludeVirtual.put(node.level, node.indicatorKey ? IndicatorDimensionKeyPlaceholder : node.dimensionKey), node.id || (node.id = ++this.sharedVar.seqId));
|
|
45294
45450
|
let size = node.dimensionKey && this.sizeIncludeParent ? 1 : 0;
|
|
45295
45451
|
const children = node.children || node.columns;
|
|
45296
45452
|
return "grid" === this.hierarchyType ? (null == children ? void 0 : children.length) >= 1 ? children.forEach(n => {
|
|
@@ -46481,7 +46637,7 @@
|
|
|
46481
46637
|
constructor(container) {
|
|
46482
46638
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
46483
46639
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
46484
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.14.
|
|
46640
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.14.3", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
46485
46641
|
const {
|
|
46486
46642
|
frozenColCount = 0,
|
|
46487
46643
|
frozenRowCount: frozenRowCount,
|
|
@@ -47278,11 +47434,13 @@
|
|
|
47278
47434
|
customRender: customRender,
|
|
47279
47435
|
renderChartAsync: renderChartAsync,
|
|
47280
47436
|
renderChartAsyncBatchCount: renderChartAsyncBatchCount,
|
|
47437
|
+
canvasWidth: canvasWidth,
|
|
47438
|
+
canvasHeight: canvasHeight,
|
|
47281
47439
|
overscrollBehavior: overscrollBehavior,
|
|
47282
47440
|
limitMinWidth: limitMinWidth,
|
|
47283
47441
|
limitMinHeight: limitMinHeight
|
|
47284
47442
|
} = options;
|
|
47285
|
-
pixelRatio && pixelRatio !== this.internalProps.pixelRatio && (this.internalProps.pixelRatio = pixelRatio), padding && ("number" == typeof padding ? (this.padding.top = padding, this.padding.left = padding, this.padding.bottom = padding, this.padding.right = padding) : (padding.top && (this.padding.top = padding.top), padding.bottom && (this.padding.bottom = padding.bottom), padding.left && (this.padding.left = padding.left), padding.right && (this.padding.right = padding.right))), this.showFrozenIcon = "boolean" != typeof showFrozenIcon || showFrozenIcon, "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1), this.widthMode = null != widthMode ? widthMode : "standard", this.heightMode = null != heightMode ? heightMode : "standard", this._widthAdaptiveMode = null != widthAdaptiveMode ? widthAdaptiveMode : "only-body", this._heightAdaptiveMode = null != heightAdaptiveMode ? heightAdaptiveMode : "only-body", this.autoFillWidth = null != autoFillWidth && autoFillWidth, this.autoFillHeight = null != autoFillHeight && autoFillHeight, this.customRender = customRender;
|
|
47443
|
+
pixelRatio && pixelRatio !== this.internalProps.pixelRatio && (this.internalProps.pixelRatio = pixelRatio), padding && ("number" == typeof padding ? (this.padding.top = padding, this.padding.left = padding, this.padding.bottom = padding, this.padding.right = padding) : (padding.top && (this.padding.top = padding.top), padding.bottom && (this.padding.bottom = padding.bottom), padding.left && (this.padding.left = padding.left), padding.right && (this.padding.right = padding.right))), this.showFrozenIcon = "boolean" != typeof showFrozenIcon || showFrozenIcon, "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1), this.widthMode = null != widthMode ? widthMode : "standard", this.heightMode = null != heightMode ? heightMode : "standard", this._widthAdaptiveMode = null != widthAdaptiveMode ? widthAdaptiveMode : "only-body", this._heightAdaptiveMode = null != heightAdaptiveMode ? heightAdaptiveMode : "only-body", this.autoFillWidth = null != autoFillWidth && autoFillWidth, this.autoFillHeight = null != autoFillHeight && autoFillHeight, this.customRender = customRender, this.canvasWidth = canvasWidth, this.canvasHeight = canvasHeight;
|
|
47286
47444
|
const internalProps = this.internalProps;
|
|
47287
47445
|
if ("node" === Env.mode || options.canvas || updateRootElementPadding(internalProps.element, this.padding), this.columnWidthComputeMode = null !== (_a = options.columnWidthComputeMode) && void 0 !== _a ? _a : "normal", internalProps.frozenColCount = frozenColCount, internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight, internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth, internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions, internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.columnResizeMode = columnResizeMode, internalProps.rowResizeMode = rowResizeMode, internalProps.dragHeaderMode = null != dragHeaderMode ? dragHeaderMode : "none", internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount), internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto", internalProps.cellTextOverflows = {}, internalProps._rowHeightsMap = new NumberRangeMap(this), internalProps._rowRangeHeightsMap = new Map(), internalProps._colRangeWidthsMap = new Map(), internalProps._widthResizedColMap = new Set(), internalProps._heightResizedRowMap = new Set(), this.colWidthsMap = new NumberMap(), this.colContentWidthsMap = new NumberMap(), this.colWidthsLimit = {}, internalProps.stick.changedCells.clear(), internalProps.theme = themes.of(null !== (_b = options.theme) && void 0 !== _b ? _b : themes.DEFAULT), internalProps.theme.isPivot = this.isPivotTable(), setIconColor(internalProps.theme.functionalIconsStyle), this.scenegraph.updateStageBackground(), internalProps.autoWrapText = options.autoWrapText, internalProps.enableLineBreak = options.enableLineBreak, internalProps.allowFrozenColCount = null !== (_c = options.allowFrozenColCount) && void 0 !== _c ? _c : 0, internalProps.limitMaxAutoWidth = null !== (_d = options.limitMaxAutoWidth) && void 0 !== _d ? _d : 450, internalProps.limitMinWidth = null != limitMinWidth ? "number" == typeof limitMinWidth ? limitMinWidth : limitMinWidth ? 10 : 0 : 10, internalProps.limitMinHeight = null != limitMinHeight ? "number" == typeof limitMinHeight ? limitMinHeight : limitMinHeight ? 10 : 0 : 10, null === (_e = internalProps.legends) || void 0 === _e || _e.forEach(legend => {
|
|
47288
47446
|
null == legend || legend.release();
|
|
@@ -48896,9 +49054,10 @@
|
|
|
48896
49054
|
return layout._cellRangeMap.set(`$${col}$${row}`, cellRange), cellRange;
|
|
48897
49055
|
}
|
|
48898
49056
|
function getTreeTitleMerge(col, row, cellRange, layout) {
|
|
49057
|
+
var _a;
|
|
48899
49058
|
if ("tree" !== layout.rowHierarchyType) return;
|
|
48900
49059
|
const cellRecord = layout._table.getCellRawRecord(col, row);
|
|
48901
|
-
(null == cellRecord ? void 0 : cellRecord.vtableMerge) && (cellRange.start.col = layout.rowHeaderLevelCount, cellRange.end.col = layout.colCount - 1, cellRange.start.row = cellRange.end.row = row);
|
|
49060
|
+
(null === (_a = layout._table.internalProps.rowSeriesNumber) || void 0 === _a ? void 0 : _a.enableTreeCheckbox) ? (null == cellRecord ? void 0 : cellRecord.vtableMerge) && col >= layout.leftRowSeriesNumberColumnCount && (cellRange.start.col = layout.rowHeaderLevelCount + layout.leftRowSeriesNumberColumnCount, cellRange.end.col = layout.colCount - 1, cellRange.start.row = cellRange.end.row = row) : (null == cellRecord ? void 0 : cellRecord.vtableMerge) && (cellRange.start.col = layout.rowHeaderLevelCount, cellRange.end.col = layout.colCount - 1, cellRange.start.row = cellRange.end.row = row);
|
|
48902
49061
|
}
|
|
48903
49062
|
function getCellRangeTranspose(col, row, layout) {
|
|
48904
49063
|
var _a, _b, _c, _d;
|
|
@@ -50290,12 +50449,13 @@
|
|
|
50290
50449
|
row: cellRow
|
|
50291
50450
|
}), rowEnd++);
|
|
50292
50451
|
}
|
|
50293
|
-
const newRowEnd = Math.min(rowStart + rowLimit, table.rowCount - 1 - table.bottomFrozenRowCount)
|
|
50452
|
+
const newRowEnd = Math.min(rowStart + rowLimit, table.rowCount - 1 - table.bottomFrozenRowCount),
|
|
50453
|
+
notFullRow = newRowEnd < rowStart + rowLimit;
|
|
50294
50454
|
for (let i = 0; i < removeCellPositions.length; i++) {
|
|
50295
50455
|
const {
|
|
50296
50456
|
row: cellRow
|
|
50297
50457
|
} = removeCellPositions[removeCellPositions.length - i - 1];
|
|
50298
|
-
cellRow < rowStart || cellRow > rowEnd || (cellRow > newRowEnd ? (removeCells.push({
|
|
50458
|
+
cellRow < rowStart || cellRow > rowEnd || (cellRow > newRowEnd || notFullRow ? (removeCells.push({
|
|
50299
50459
|
col: col,
|
|
50300
50460
|
row: cellRow
|
|
50301
50461
|
}), updateRow--) : updateRow = Math.min(updateRow, cellRow));
|
|
@@ -50391,16 +50551,17 @@
|
|
|
50391
50551
|
} = table.internalProps.layoutMap.getSeriesNumberHeader(col, row);
|
|
50392
50552
|
return title;
|
|
50393
50553
|
}
|
|
50554
|
+
let value;
|
|
50394
50555
|
if (this.options.groupBy) {
|
|
50395
50556
|
const record = table.getCellRawRecord(col, row);
|
|
50396
50557
|
if (null == record ? void 0 : record.vtableMerge) return "";
|
|
50397
50558
|
const indexs = this.dataSource.currentIndexedData[row - this.columnHeaderLevelCount];
|
|
50398
|
-
|
|
50399
|
-
}
|
|
50559
|
+
value = indexs[indexs.length - 1] + 1;
|
|
50560
|
+
} else value = row - this.columnHeaderLevelCount + 1;
|
|
50400
50561
|
const {
|
|
50401
50562
|
format: format
|
|
50402
50563
|
} = table.internalProps.layoutMap.getSeriesNumberBody(col, row);
|
|
50403
|
-
return "function" == typeof format ? format(col, row, this) :
|
|
50564
|
+
return "function" == typeof format ? format(col, row, this, value) : value;
|
|
50404
50565
|
}
|
|
50405
50566
|
if (table.internalProps.layoutMap.isHeader(col, row)) {
|
|
50406
50567
|
const {
|