@visactor/vtable 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/cjs/ListTable.d.ts +2 -2
- package/cjs/ListTable.js +4 -3
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotTable.js +22 -6
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/core/BaseTable.js +3 -3
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/event/event.js +3 -2
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/list-table/checkbox.d.ts +2 -0
- package/cjs/event/list-table/checkbox.js +70 -0
- package/cjs/event/list-table/checkbox.js.map +1 -0
- package/cjs/header-helper/header-helper.js +18 -3
- package/cjs/header-helper/header-helper.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/layout/cell-range/simple-cell-range.js +3 -1
- package/cjs/layout/cell-range/simple-cell-range.js.map +1 -1
- package/cjs/layout/layout-helper.d.ts +2 -0
- package/cjs/layout/layout-helper.js +12 -2
- package/cjs/layout/layout-helper.js.map +1 -1
- package/cjs/layout/pivot-header-layout.js +6 -6
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/tree-helper.d.ts +6 -2
- package/cjs/layout/tree-helper.js +36 -17
- package/cjs/layout/tree-helper.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +4 -4
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js +4 -4
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js +2 -2
- package/cjs/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +9 -1
- package/cjs/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/util.js +2 -2
- package/cjs/scenegraph/group-creater/progress/update-position/util.js.map +1 -1
- package/cjs/scenegraph/layout/update-width.js +1 -2
- package/cjs/scenegraph/layout/update-width.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +1 -1
- package/cjs/scenegraph/scenegraph.js +12 -5
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/state/checkbox/checkbox.d.ts +4 -3
- package/cjs/state/checkbox/checkbox.js +12 -5
- package/cjs/state/checkbox/checkbox.js.map +1 -1
- package/cjs/state/state.d.ts +3 -3
- package/cjs/state/state.js.map +1 -1
- package/cjs/tools/update-row.js +2 -2
- package/cjs/tools/update-row.js.map +1 -1
- package/cjs/ts-types/list-table/layout-map/api.d.ts +6 -2
- package/cjs/ts-types/list-table/layout-map/api.js.map +1 -1
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.d.ts +5 -1
- package/cjs/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.d.ts +10 -2
- package/cjs/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +2 -0
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +560 -207
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +2 -2
- package/es/ListTable.js +4 -3
- package/es/ListTable.js.map +1 -1
- package/es/PivotTable.js +17 -7
- package/es/PivotTable.js.map +1 -1
- package/es/core/BaseTable.js +3 -3
- package/es/core/BaseTable.js.map +1 -1
- package/es/event/event.js +4 -1
- package/es/event/event.js.map +1 -1
- package/es/event/list-table/checkbox.d.ts +2 -0
- package/es/event/list-table/checkbox.js +62 -0
- package/es/event/list-table/checkbox.js.map +1 -0
- package/es/header-helper/header-helper.js +18 -3
- package/es/header-helper/header-helper.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/layout/cell-range/simple-cell-range.js +3 -1
- package/es/layout/cell-range/simple-cell-range.js.map +1 -1
- package/es/layout/layout-helper.d.ts +2 -0
- package/es/layout/layout-helper.js +10 -1
- package/es/layout/layout-helper.js.map +1 -1
- package/es/layout/pivot-header-layout.js +6 -6
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/tree-helper.d.ts +6 -2
- package/es/layout/tree-helper.js +30 -13
- package/es/layout/tree-helper.js.map +1 -1
- package/es/scenegraph/graphic/contributions/group-contribution-render.js +4 -4
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js +4 -4
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js +2 -2
- package/es/scenegraph/group-creater/progress/create-group-for-first-screen.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js +9 -1
- package/es/scenegraph/group-creater/progress/update-position/dynamic-set-x.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/util.js +2 -2
- package/es/scenegraph/group-creater/progress/update-position/util.js.map +1 -1
- package/es/scenegraph/layout/update-width.js +1 -2
- package/es/scenegraph/layout/update-width.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +1 -1
- package/es/scenegraph/scenegraph.js +12 -5
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/state/checkbox/checkbox.d.ts +4 -3
- package/es/state/checkbox/checkbox.js +9 -2
- package/es/state/checkbox/checkbox.js.map +1 -1
- package/es/state/state.d.ts +3 -3
- package/es/state/state.js.map +1 -1
- package/es/tools/update-row.js +2 -2
- package/es/tools/update-row.js.map +1 -1
- package/es/ts-types/list-table/layout-map/api.d.ts +6 -2
- package/es/ts-types/list-table/layout-map/api.js.map +1 -1
- package/es/ts-types/pivot-table/dimension/basic-dimension.d.ts +5 -1
- package/es/ts-types/pivot-table/dimension/basic-dimension.js.map +1 -1
- package/es/ts-types/pivot-table/indicator/basic-indicator.d.ts +10 -2
- package/es/ts-types/pivot-table/indicator/basic-indicator.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +2 -0
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +5 -5
package/dist/vtable.js
CHANGED
|
@@ -591,6 +591,31 @@
|
|
|
591
591
|
return function (target, key) {
|
|
592
592
|
decorator(target, key, paramIndex);
|
|
593
593
|
};
|
|
594
|
+
},
|
|
595
|
+
__awaiter$5 = 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$5(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$4 = 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$4(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$3 = 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$3(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 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
15737
|
+
__awaiter$2 = 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(this, void 0, void 0, function* () {
|
|
15772
|
+
return __awaiter$2(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(this, void 0, void 0, function* () {
|
|
15793
|
+
return __awaiter$2(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(this, void 0, void 0, function* () {
|
|
15798
|
+
return __awaiter$2(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(this, void 0, void 0, function* () {
|
|
15801
|
+
drawingCb: () => __awaiter$2(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(this, void 0, void 0, function* () {
|
|
15822
|
+
return __awaiter$2(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(this, void 0, void 0, function* () {
|
|
15831
|
+
return __awaiter$2(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(this, void 0, void 0, function* () {
|
|
15837
|
+
return __awaiter$2(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(this, void 0, void 0, function* () {
|
|
15849
|
+
return __awaiter$2(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(this, void 0, void 0, function* () {
|
|
15891
|
-
yield foreachAsync(group, DefaultAttribute.zIndex, item => __awaiter(this, void 0, void 0, function* () {
|
|
15852
|
+
drawingCb: () => __awaiter$2(this, void 0, void 0, function* () {
|
|
15853
|
+
yield foreachAsync(group, DefaultAttribute.zIndex, item => __awaiter$2(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$z = 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$1 = 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$1(this, void 0, void 0, function* () {
|
|
16754
|
+
return {
|
|
16755
|
+
loadState: "fail"
|
|
16756
|
+
};
|
|
16757
|
+
});
|
|
16758
|
+
}
|
|
16765
16759
|
};
|
|
16766
16760
|
BaseEnvContribution = __decorate$z([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
|
}
|
|
@@ -17775,6 +17776,7 @@
|
|
|
17775
17776
|
});
|
|
17776
17777
|
}
|
|
17777
17778
|
emitEvent(type, e) {
|
|
17779
|
+
if (!this.element) return;
|
|
17778
17780
|
const listeners = this.element._events[WILDCARD];
|
|
17779
17781
|
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);
|
|
17780
17782
|
this.emit(type, e);
|
|
@@ -18651,6 +18653,31 @@
|
|
|
18651
18653
|
},
|
|
18652
18654
|
__metadata$j = undefined && undefined.__metadata || function (k, v) {
|
|
18653
18655
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
18656
|
+
},
|
|
18657
|
+
__awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
18658
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18659
|
+
function fulfilled(value) {
|
|
18660
|
+
try {
|
|
18661
|
+
step(generator.next(value));
|
|
18662
|
+
} catch (e) {
|
|
18663
|
+
reject(e);
|
|
18664
|
+
}
|
|
18665
|
+
}
|
|
18666
|
+
function rejected(value) {
|
|
18667
|
+
try {
|
|
18668
|
+
step(generator.throw(value));
|
|
18669
|
+
} catch (e) {
|
|
18670
|
+
reject(e);
|
|
18671
|
+
}
|
|
18672
|
+
}
|
|
18673
|
+
function step(result) {
|
|
18674
|
+
var value;
|
|
18675
|
+
result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P(function (resolve) {
|
|
18676
|
+
resolve(value);
|
|
18677
|
+
})).then(fulfilled, rejected);
|
|
18678
|
+
}
|
|
18679
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18680
|
+
});
|
|
18654
18681
|
};
|
|
18655
18682
|
class DynamicB {
|
|
18656
18683
|
get x1() {
|
|
@@ -18846,6 +18873,19 @@
|
|
|
18846
18873
|
left: actualLeft
|
|
18847
18874
|
};
|
|
18848
18875
|
}
|
|
18876
|
+
loadFont(font, source, descriptors) {
|
|
18877
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
18878
|
+
return new FontFace(font, isString$4(source) ? `url(${source})` : source, descriptors).load().then(function (loadedFont) {
|
|
18879
|
+
return document.fonts.add(loadedFont), {
|
|
18880
|
+
loadState: "success"
|
|
18881
|
+
};
|
|
18882
|
+
}).catch(function (error) {
|
|
18883
|
+
return {
|
|
18884
|
+
loadState: "fail"
|
|
18885
|
+
};
|
|
18886
|
+
});
|
|
18887
|
+
});
|
|
18888
|
+
}
|
|
18849
18889
|
};
|
|
18850
18890
|
BrowserEnvContribution = __decorate$q([injectable(), __metadata$j("design:paramtypes", [])], BrowserEnvContribution);
|
|
18851
18891
|
|
|
@@ -21194,6 +21234,52 @@
|
|
|
21194
21234
|
zIndex: 1
|
|
21195
21235
|
};
|
|
21196
21236
|
|
|
21237
|
+
function genNormalBounds(item) {
|
|
21238
|
+
const bounds = item.AABBBounds;
|
|
21239
|
+
return {
|
|
21240
|
+
x1: bounds.x1,
|
|
21241
|
+
x2: bounds.x2,
|
|
21242
|
+
y1: bounds.y1,
|
|
21243
|
+
y2: bounds.y2,
|
|
21244
|
+
centerX: item.attribute.x,
|
|
21245
|
+
centerY: item.attribute.y,
|
|
21246
|
+
angle: item.attribute.angle
|
|
21247
|
+
};
|
|
21248
|
+
}
|
|
21249
|
+
function genRotateBounds(items) {
|
|
21250
|
+
items.forEach(item => {
|
|
21251
|
+
if (item.rotatedBounds || !item.attribute.angle) return;
|
|
21252
|
+
const bounds = genNormalBounds(item),
|
|
21253
|
+
rotatedCenter = rotatePoint({
|
|
21254
|
+
x: item.attribute.x,
|
|
21255
|
+
y: item.attribute.y
|
|
21256
|
+
}, bounds.angle, {
|
|
21257
|
+
x: bounds.centerX,
|
|
21258
|
+
y: bounds.centerY
|
|
21259
|
+
}),
|
|
21260
|
+
deltaX = rotatedCenter.x - bounds.centerX,
|
|
21261
|
+
deltaY = rotatedCenter.y - bounds.centerY;
|
|
21262
|
+
bounds.x1 += deltaX, bounds.x2 += deltaX, bounds.y1 += deltaY, bounds.y2 += deltaY, bounds.centerX += deltaX, bounds.centerY += deltaY, item.rotatedBounds = bounds;
|
|
21263
|
+
});
|
|
21264
|
+
}
|
|
21265
|
+
function itemIntersect(item1, item2) {
|
|
21266
|
+
var _a, _b;
|
|
21267
|
+
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);
|
|
21268
|
+
}
|
|
21269
|
+
const DELTA_ANGLE = Math.sin(Math.PI / 10);
|
|
21270
|
+
function isAngleVertical(angle) {
|
|
21271
|
+
let delta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DELTA_ANGLE;
|
|
21272
|
+
const hasAngle = !isNil$3(angle) && 0 !== angle,
|
|
21273
|
+
cos = hasAngle ? Math.cos(angle) : 1;
|
|
21274
|
+
return hasAngle && Math.abs(cos) <= delta;
|
|
21275
|
+
}
|
|
21276
|
+
function isAngleHorizontal(angle) {
|
|
21277
|
+
let delta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DELTA_ANGLE;
|
|
21278
|
+
const hasAngle = !isNil$3(angle) && 0 !== angle,
|
|
21279
|
+
sin = hasAngle ? Math.sin(angle) : 0;
|
|
21280
|
+
return !hasAngle || Math.abs(sin) <= delta;
|
|
21281
|
+
}
|
|
21282
|
+
|
|
21197
21283
|
function getCircleLabelPosition(tickPosition, tickVector) {
|
|
21198
21284
|
return {
|
|
21199
21285
|
x: tickPosition.x + tickVector[0],
|
|
@@ -21241,9 +21327,11 @@
|
|
|
21241
21327
|
return getCircleLabelPosition(labelPoint, getCircleVerticalVector(labelOffset || 1, labelPoint, center, inside));
|
|
21242
21328
|
}
|
|
21243
21329
|
function textIntersect(textA, textB, sep) {
|
|
21244
|
-
|
|
21245
|
-
|
|
21246
|
-
|
|
21330
|
+
var _a;
|
|
21331
|
+
let a, b;
|
|
21332
|
+
const angle = null === (_a = textA.attribute) || void 0 === _a ? void 0 : _a.angle,
|
|
21333
|
+
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));
|
|
21334
|
+
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));
|
|
21247
21335
|
}
|
|
21248
21336
|
function hasOverlap(items, pad) {
|
|
21249
21337
|
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;
|
|
@@ -21413,7 +21501,10 @@
|
|
|
21413
21501
|
isFunction$3(labelState[key]) && (labelState[key] = labelState[key](item, index, data, layer));
|
|
21414
21502
|
}), text.states = labelState;
|
|
21415
21503
|
}
|
|
21416
|
-
|
|
21504
|
+
text.data = Object.assign(Object.assign({}, item), {
|
|
21505
|
+
index: index,
|
|
21506
|
+
layer: layer
|
|
21507
|
+
}), labelGroup.add(text);
|
|
21417
21508
|
}), labelGroup;
|
|
21418
21509
|
}
|
|
21419
21510
|
renderTitle(container) {
|
|
@@ -21627,50 +21718,6 @@
|
|
|
21627
21718
|
});
|
|
21628
21719
|
}
|
|
21629
21720
|
|
|
21630
|
-
function genNormalBounds(item) {
|
|
21631
|
-
const bounds = item.AABBBounds;
|
|
21632
|
-
return {
|
|
21633
|
-
x1: bounds.x1,
|
|
21634
|
-
x2: bounds.x2,
|
|
21635
|
-
y1: bounds.y1,
|
|
21636
|
-
y2: bounds.y2,
|
|
21637
|
-
centerX: item.attribute.x,
|
|
21638
|
-
centerY: item.attribute.y,
|
|
21639
|
-
angle: item.attribute.angle
|
|
21640
|
-
};
|
|
21641
|
-
}
|
|
21642
|
-
function genRotateBounds(items) {
|
|
21643
|
-
items.forEach(item => {
|
|
21644
|
-
if (item.rotatedBounds || !item.attribute.angle) return;
|
|
21645
|
-
const bounds = genNormalBounds(item),
|
|
21646
|
-
rotatedCenter = rotatePoint({
|
|
21647
|
-
x: item.attribute.x,
|
|
21648
|
-
y: item.attribute.y
|
|
21649
|
-
}, bounds.angle, {
|
|
21650
|
-
x: bounds.centerX,
|
|
21651
|
-
y: bounds.centerY
|
|
21652
|
-
}),
|
|
21653
|
-
deltaX = rotatedCenter.x - bounds.centerX,
|
|
21654
|
-
deltaY = rotatedCenter.y - bounds.centerY;
|
|
21655
|
-
bounds.x1 += deltaX, bounds.x2 += deltaX, bounds.y1 += deltaY, bounds.y2 += deltaY, bounds.centerX += deltaX, bounds.centerY += deltaY, item.rotatedBounds = bounds;
|
|
21656
|
-
});
|
|
21657
|
-
}
|
|
21658
|
-
function itemIntersect(item1, item2) {
|
|
21659
|
-
var _a, _b;
|
|
21660
|
-
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);
|
|
21661
|
-
}
|
|
21662
|
-
const DELTA_ANGLE = Math.sin(Math.PI / 10);
|
|
21663
|
-
function isAngleVertical(angle) {
|
|
21664
|
-
const hasAngle = !isNil$3(angle) && 0 !== angle,
|
|
21665
|
-
cos = hasAngle ? Math.cos(angle) : 1;
|
|
21666
|
-
return hasAngle && Math.abs(cos) <= DELTA_ANGLE;
|
|
21667
|
-
}
|
|
21668
|
-
function isAngleHorizontal(angle) {
|
|
21669
|
-
const hasAngle = !isNil$3(angle) && 0 !== angle,
|
|
21670
|
-
sin = hasAngle ? Math.sin(angle) : 0;
|
|
21671
|
-
return !hasAngle || Math.abs(sin) <= DELTA_ANGLE;
|
|
21672
|
-
}
|
|
21673
|
-
|
|
21674
21721
|
function autoRotate(items, rotateConfig) {
|
|
21675
21722
|
if (isEmpty$1(items)) return;
|
|
21676
21723
|
const {
|
|
@@ -22906,7 +22953,7 @@
|
|
|
22906
22953
|
breakData: breakData
|
|
22907
22954
|
} = op;
|
|
22908
22955
|
let scaleTicks;
|
|
22909
|
-
if (isValid$3(tickStep))
|
|
22956
|
+
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) {
|
|
22910
22957
|
const count = null !== (_a = isFunction$3(tickCount) ? tickCount({
|
|
22911
22958
|
axisLength: rangeSize,
|
|
22912
22959
|
labelStyle: labelStyle
|
|
@@ -22930,19 +22977,30 @@
|
|
|
22930
22977
|
customTicks: customTicks
|
|
22931
22978
|
}));
|
|
22932
22979
|
}
|
|
22980
|
+
var ticks, breakDomains;
|
|
22933
22981
|
const domain = scale.domain();
|
|
22934
22982
|
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)) {
|
|
22935
22983
|
const {
|
|
22936
|
-
|
|
22937
|
-
|
|
22938
|
-
|
|
22939
|
-
|
|
22984
|
+
labelGap = 4,
|
|
22985
|
+
labelFlush: labelFlush
|
|
22986
|
+
} = op,
|
|
22987
|
+
MIN_FONT_SIZE = 6;
|
|
22988
|
+
let items;
|
|
22989
|
+
if (scaleTicks.length * MIN_FONT_SIZE > rangeSize) {
|
|
22990
|
+
const samplingScaleTicks = [],
|
|
22991
|
+
step = Math.floor(scaleTicks.length * MIN_FONT_SIZE / rangeSize);
|
|
22992
|
+
scaleTicks.forEach((tick, index) => {
|
|
22993
|
+
index % step != 0 && index !== scaleTicks.length - 1 || samplingScaleTicks.push(tick);
|
|
22994
|
+
}), items = getCartesianLabelBounds(scale, samplingScaleTicks, op).map((bounds, i) => ({
|
|
22995
|
+
AABBBounds: bounds,
|
|
22996
|
+
value: samplingScaleTicks[i]
|
|
22997
|
+
}));
|
|
22998
|
+
} else items = getCartesianLabelBounds(scale, scaleTicks, op).map((bounds, i) => ({
|
|
22940
22999
|
AABBBounds: bounds,
|
|
22941
23000
|
value: scaleTicks[i]
|
|
22942
23001
|
}));
|
|
22943
|
-
const
|
|
22944
|
-
|
|
22945
|
-
lastSourceItem = last$1(source),
|
|
23002
|
+
const firstSourceItem = items[0],
|
|
23003
|
+
lastSourceItem = last$1(items),
|
|
22946
23004
|
samplingMethod = breakData && breakData() ? methods.greedy : methods.parity;
|
|
22947
23005
|
for (; items.length >= 3 && hasOverlap(items, labelGap);) items = samplingMethod(items, labelGap);
|
|
22948
23006
|
const checkFirst = op.labelFirstVisible;
|
|
@@ -23512,7 +23570,8 @@
|
|
|
23512
23570
|
} = this.attribute,
|
|
23513
23571
|
{
|
|
23514
23572
|
spaceCol = DEFAULT_ITEM_SPACE_COL,
|
|
23515
|
-
spaceRow = DEFAULT_ITEM_SPACE_ROW
|
|
23573
|
+
spaceRow = DEFAULT_ITEM_SPACE_ROW,
|
|
23574
|
+
verticalAlign = "middle"
|
|
23516
23575
|
} = itemAttrs,
|
|
23517
23576
|
itemsContainer = this._itemsContainer,
|
|
23518
23577
|
{
|
|
@@ -23531,7 +23590,9 @@
|
|
|
23531
23590
|
startY: startY,
|
|
23532
23591
|
pages: pages
|
|
23533
23592
|
} = this._itemContext,
|
|
23534
|
-
lastItemWidth = 0
|
|
23593
|
+
lastItemWidth = 0,
|
|
23594
|
+
lastLineHeight = 0;
|
|
23595
|
+
const lastLineItemGroup = [];
|
|
23535
23596
|
for (let index = startIndex, len = legendItems.length; index < len && !(lazyload && pages > this._itemContext.currentPage * maxPages); index++) {
|
|
23536
23597
|
lazyload && (this._itemContext.startIndex = index + 1), item = legendItems[index], item.id || (item.id = item.label), item.index = index;
|
|
23537
23598
|
let isSelected = !0;
|
|
@@ -23539,15 +23600,23 @@
|
|
|
23539
23600
|
const itemGroup = this._renderEachItem(item, isSelected, index, legendItems),
|
|
23540
23601
|
itemWidth = itemGroup.attribute.width,
|
|
23541
23602
|
itemHeight = itemGroup.attribute.height;
|
|
23542
|
-
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 && (
|
|
23603
|
+
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 => {
|
|
23604
|
+
i.setAttributes({
|
|
23605
|
+
y: i.attribute.y + (lastLineHeight - i.attribute.height) / ("middle" === verticalAlign ? 2 : 1)
|
|
23606
|
+
});
|
|
23607
|
+
}), pages += 1, startX = 0, startY += lastLineHeight + spaceRow, lastLineHeight = 0, lastLineItemGroup.length = 0))), 0 === startX && 0 === startY || itemGroup.setAttributes({
|
|
23543
23608
|
x: startX,
|
|
23544
23609
|
y: startY
|
|
23545
|
-
}), 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({
|
|
23610
|
+
}), 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({
|
|
23546
23611
|
x: startX,
|
|
23547
23612
|
y: startY
|
|
23548
23613
|
}), startY += spaceRow + itemHeight), itemsContainer.add(itemGroup), lastItemWidth = itemWidth;
|
|
23549
23614
|
}
|
|
23550
|
-
return
|
|
23615
|
+
return !isHorizontal || "middle" !== verticalAlign && "bottom" !== verticalAlign || lastLineItemGroup.forEach(i => {
|
|
23616
|
+
i.setAttributes({
|
|
23617
|
+
y: i.attribute.y + (lastLineHeight - i.attribute.height) / ("middle" === verticalAlign ? 2 : 1)
|
|
23618
|
+
});
|
|
23619
|
+
}), 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;
|
|
23551
23620
|
}
|
|
23552
23621
|
_renderContent() {
|
|
23553
23622
|
const {
|
|
@@ -38774,7 +38843,7 @@
|
|
|
38774
38843
|
const distHeight = maxHeight;
|
|
38775
38844
|
const cell = scene.highPerformanceGetCell(col, row);
|
|
38776
38845
|
if (cell.role === 'empty') {
|
|
38777
|
-
|
|
38846
|
+
continue;
|
|
38778
38847
|
}
|
|
38779
38848
|
updateCellHeightForRow(scene, cell, col, row, distHeight, distHeight - cell.attribute.height, scene.table.isHeader(col, row));
|
|
38780
38849
|
}
|
|
@@ -41272,7 +41341,7 @@
|
|
|
41272
41341
|
if (strokeArrayColor && strokeArrayColor[0]) {
|
|
41273
41342
|
context.strokeStyle = strokeArrayColor[0];
|
|
41274
41343
|
}
|
|
41275
|
-
else {
|
|
41344
|
+
else if (strokeArrayColor && !strokeArrayColor[0]) {
|
|
41276
41345
|
context.strokeStyle = 'transparent';
|
|
41277
41346
|
}
|
|
41278
41347
|
if (!isWidthNumber) {
|
|
@@ -41306,7 +41375,7 @@
|
|
|
41306
41375
|
if (strokeArrayColor && strokeArrayColor[1]) {
|
|
41307
41376
|
context.strokeStyle = strokeArrayColor[1];
|
|
41308
41377
|
}
|
|
41309
|
-
else {
|
|
41378
|
+
else if (strokeArrayColor && !strokeArrayColor[1]) {
|
|
41310
41379
|
context.strokeStyle = 'transparent';
|
|
41311
41380
|
}
|
|
41312
41381
|
if (!isWidthNumber) {
|
|
@@ -41340,7 +41409,7 @@
|
|
|
41340
41409
|
if (strokeArrayColor && strokeArrayColor[2]) {
|
|
41341
41410
|
context.strokeStyle = strokeArrayColor[2];
|
|
41342
41411
|
}
|
|
41343
|
-
else {
|
|
41412
|
+
else if (strokeArrayColor && !strokeArrayColor[2]) {
|
|
41344
41413
|
context.strokeStyle = 'transparent';
|
|
41345
41414
|
}
|
|
41346
41415
|
if (!isWidthNumber) {
|
|
@@ -41374,7 +41443,7 @@
|
|
|
41374
41443
|
if (strokeArrayColor && strokeArrayColor[3]) {
|
|
41375
41444
|
context.strokeStyle = strokeArrayColor[3];
|
|
41376
41445
|
}
|
|
41377
|
-
else {
|
|
41446
|
+
else if (strokeArrayColor && !strokeArrayColor[3]) {
|
|
41378
41447
|
context.strokeStyle = 'transparent';
|
|
41379
41448
|
}
|
|
41380
41449
|
if (!isWidthNumber) {
|
|
@@ -41851,7 +41920,7 @@
|
|
|
41851
41920
|
if (strokeArrayColor && strokeArrayColor[0]) {
|
|
41852
41921
|
context.strokeStyle = strokeArrayColor[0];
|
|
41853
41922
|
}
|
|
41854
|
-
else {
|
|
41923
|
+
else if (strokeArrayColor && !strokeArrayColor[0]) {
|
|
41855
41924
|
context.strokeStyle = 'transparent';
|
|
41856
41925
|
}
|
|
41857
41926
|
if (!isWidthNumber) {
|
|
@@ -41877,7 +41946,7 @@
|
|
|
41877
41946
|
if (strokeArrayColor && strokeArrayColor[1]) {
|
|
41878
41947
|
context.strokeStyle = strokeArrayColor[1];
|
|
41879
41948
|
}
|
|
41880
|
-
else {
|
|
41949
|
+
else if (strokeArrayColor && !strokeArrayColor[1]) {
|
|
41881
41950
|
context.strokeStyle = 'transparent';
|
|
41882
41951
|
}
|
|
41883
41952
|
if (!isWidthNumber) {
|
|
@@ -41904,7 +41973,7 @@
|
|
|
41904
41973
|
if (strokeArrayColor && strokeArrayColor[2]) {
|
|
41905
41974
|
context.strokeStyle = strokeArrayColor[2];
|
|
41906
41975
|
}
|
|
41907
|
-
else {
|
|
41976
|
+
else if (strokeArrayColor && !strokeArrayColor[2]) {
|
|
41908
41977
|
context.strokeStyle = 'transparent';
|
|
41909
41978
|
}
|
|
41910
41979
|
if (!isWidthNumber) {
|
|
@@ -41931,7 +42000,7 @@
|
|
|
41931
42000
|
if (strokeArrayColor && strokeArrayColor[3]) {
|
|
41932
42001
|
context.strokeStyle = strokeArrayColor[3];
|
|
41933
42002
|
}
|
|
41934
|
-
else {
|
|
42003
|
+
else if (strokeArrayColor && !strokeArrayColor[3]) {
|
|
41935
42004
|
context.strokeStyle = 'transparent';
|
|
41936
42005
|
}
|
|
41937
42006
|
if (!isWidthNumber) {
|
|
@@ -42984,17 +43053,17 @@
|
|
|
42984
43053
|
if (table.widthMode === 'adaptive' ||
|
|
42985
43054
|
(table.options.autoWrapText && (table.heightMode === 'adaptive' || table.isAutoRowHeight()))) {
|
|
42986
43055
|
distColForCompute = table.colCount - 1;
|
|
42987
|
-
distCol = Math.min(proxy.firstScreenColLimit, table.colCount - 1);
|
|
43056
|
+
distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1);
|
|
42988
43057
|
}
|
|
42989
43058
|
else {
|
|
42990
|
-
distCol = Math.min(proxy.firstScreenColLimit, table.colCount - 1);
|
|
43059
|
+
distCol = Math.min(proxy.firstScreenColLimit - 1, table.colCount - 1);
|
|
42991
43060
|
}
|
|
42992
43061
|
if (table.heightMode === 'adaptive') {
|
|
42993
43062
|
distRowForCompute = table.rowCount - 1;
|
|
42994
|
-
distRow = Math.min(proxy.firstScreenRowLimit, table.rowCount - 1);
|
|
43063
|
+
distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1);
|
|
42995
43064
|
}
|
|
42996
43065
|
else {
|
|
42997
|
-
distRow = Math.min(proxy.firstScreenRowLimit, table.rowCount - 1);
|
|
43066
|
+
distRow = Math.min(proxy.firstScreenRowLimit - 1, table.rowCount - 1);
|
|
42998
43067
|
}
|
|
42999
43068
|
if (table.internalProps._widthResizedColMap.size === 0) {
|
|
43000
43069
|
computeColsWidth(table, 0, distColForCompute ?? distCol);
|
|
@@ -43088,14 +43157,14 @@
|
|
|
43088
43157
|
|
|
43089
43158
|
function getFirstChild(containerGroup) {
|
|
43090
43159
|
let child = containerGroup.firstChild;
|
|
43091
|
-
while (child.type !== 'group') {
|
|
43160
|
+
while (child && child.type !== 'group') {
|
|
43092
43161
|
child = child._next;
|
|
43093
43162
|
}
|
|
43094
43163
|
return child;
|
|
43095
43164
|
}
|
|
43096
43165
|
function getLastChild(containerGroup) {
|
|
43097
43166
|
let child = containerGroup.lastChild;
|
|
43098
|
-
while (child.type !== 'group') {
|
|
43167
|
+
while (child && child.type !== 'group') {
|
|
43099
43168
|
child = child._prev;
|
|
43100
43169
|
}
|
|
43101
43170
|
return child;
|
|
@@ -43343,6 +43412,9 @@
|
|
|
43343
43412
|
const colGroup = proxy.table.scenegraph.getColGroup(col);
|
|
43344
43413
|
colGroup && updateColGroupContentAsync(colGroup, proxy);
|
|
43345
43414
|
}
|
|
43415
|
+
updateColumnContainerWidth(proxy.table.scenegraph.colHeaderGroup);
|
|
43416
|
+
updateColumnContainerWidth(proxy.table.scenegraph.bottomFrozenGroup);
|
|
43417
|
+
updateColumnContainerWidth(proxy.table.scenegraph.bodyGroup);
|
|
43346
43418
|
proxy.progress();
|
|
43347
43419
|
}
|
|
43348
43420
|
function updateAllColPosition(distStartColY, count, direction, proxy) {
|
|
@@ -43368,6 +43440,14 @@
|
|
|
43368
43440
|
}
|
|
43369
43441
|
});
|
|
43370
43442
|
}
|
|
43443
|
+
function updateColumnContainerWidth(containerGroup) {
|
|
43444
|
+
const lastColGroup = getLastChild(containerGroup);
|
|
43445
|
+
if (!lastColGroup) {
|
|
43446
|
+
return;
|
|
43447
|
+
}
|
|
43448
|
+
containerGroup.setAttribute('width', lastColGroup.attribute.x + lastColGroup.attribute.width);
|
|
43449
|
+
containerGroup.border?.setAttribute('width', lastColGroup.attribute.x + lastColGroup.attribute.width);
|
|
43450
|
+
}
|
|
43371
43451
|
|
|
43372
43452
|
function updateAutoRow(colStart, colEnd, rowStart, rowEnd, table, direction = 'up', part) {
|
|
43373
43453
|
if (direction === 'up') {
|
|
@@ -47404,14 +47484,23 @@
|
|
|
47404
47484
|
this.hasFrozen = false;
|
|
47405
47485
|
this.mergeMap.clear();
|
|
47406
47486
|
this.colHeaderGroup.clear();
|
|
47487
|
+
delete this.colHeaderGroup.border;
|
|
47407
47488
|
this.rowHeaderGroup.clear();
|
|
47489
|
+
delete this.rowHeaderGroup.border;
|
|
47408
47490
|
this.cornerHeaderGroup.clear();
|
|
47491
|
+
delete this.cornerHeaderGroup.border;
|
|
47409
47492
|
this.bodyGroup.clear();
|
|
47493
|
+
delete this.bodyGroup.border;
|
|
47410
47494
|
this.bottomFrozenGroup.clear();
|
|
47495
|
+
delete this.bottomFrozenGroup.border;
|
|
47411
47496
|
this.rightFrozenGroup.clear();
|
|
47497
|
+
delete this.rightFrozenGroup.border;
|
|
47412
47498
|
this.rightTopCornerGroup.clear();
|
|
47499
|
+
delete this.rightTopCornerGroup.border;
|
|
47413
47500
|
this.rightBottomCornerGroup.clear();
|
|
47501
|
+
delete this.rightBottomCornerGroup.border;
|
|
47414
47502
|
this.leftBottomCornerGroup.clear();
|
|
47503
|
+
delete this.leftBottomCornerGroup.border;
|
|
47415
47504
|
this.colHeaderGroup.setAttributes({
|
|
47416
47505
|
x: 0,
|
|
47417
47506
|
y: 0,
|
|
@@ -47747,7 +47836,14 @@
|
|
|
47747
47836
|
?.getChildren()
|
|
47748
47837
|
.forEach((node) => {
|
|
47749
47838
|
if (node.name === 'checkbox') {
|
|
47750
|
-
|
|
47839
|
+
if (checked === 'indeterminate') {
|
|
47840
|
+
node.setAttribute('indeterminate', true);
|
|
47841
|
+
node.setAttribute('checked', undefined);
|
|
47842
|
+
}
|
|
47843
|
+
else {
|
|
47844
|
+
node.setAttribute('indeterminate', undefined);
|
|
47845
|
+
node.setAttribute('checked', checked);
|
|
47846
|
+
}
|
|
47751
47847
|
}
|
|
47752
47848
|
});
|
|
47753
47849
|
});
|
|
@@ -47757,7 +47853,14 @@
|
|
|
47757
47853
|
columnGroup?.children?.forEach((cellNode) => {
|
|
47758
47854
|
cellNode.getChildren().find(node => {
|
|
47759
47855
|
if (node.name === 'checkbox') {
|
|
47760
|
-
|
|
47856
|
+
if (checked === 'indeterminate') {
|
|
47857
|
+
node.setAttribute('indeterminate', true);
|
|
47858
|
+
node.setAttribute('checked', undefined);
|
|
47859
|
+
}
|
|
47860
|
+
else {
|
|
47861
|
+
node.setAttribute('indeterminate', undefined);
|
|
47862
|
+
node.setAttribute('checked', checked);
|
|
47863
|
+
}
|
|
47761
47864
|
}
|
|
47762
47865
|
});
|
|
47763
47866
|
});
|
|
@@ -50243,7 +50346,7 @@
|
|
|
50243
50346
|
? state.table.getCustomMerge(tableIndex, row)
|
|
50244
50347
|
: state.table.getCustomMerge(col, tableIndex);
|
|
50245
50348
|
const data = state.table.dataSource?.get(index);
|
|
50246
|
-
if (mergeCell || data.vtableMerge) {
|
|
50349
|
+
if (mergeCell || (!state.table.internalProps.rowSeriesNumber?.enableTreeCheckbox && data.vtableMerge)) {
|
|
50247
50350
|
return;
|
|
50248
50351
|
}
|
|
50249
50352
|
if (check_state?.[field] !== true) {
|
|
@@ -50335,6 +50438,20 @@
|
|
|
50335
50438
|
}
|
|
50336
50439
|
}
|
|
50337
50440
|
}
|
|
50441
|
+
function setCellCheckboxStateByAttribute(col, row, checked, table) {
|
|
50442
|
+
const cellGroup = table.scenegraph.getCell(col, row);
|
|
50443
|
+
const checkbox = cellGroup?.getChildByName('checkbox');
|
|
50444
|
+
if (checkbox) {
|
|
50445
|
+
if (checked === 'indeterminate') {
|
|
50446
|
+
checkbox.setAttribute('indeterminate', true);
|
|
50447
|
+
checkbox.setAttribute('checked', undefined);
|
|
50448
|
+
}
|
|
50449
|
+
else {
|
|
50450
|
+
checkbox.setAttribute('indeterminate', undefined);
|
|
50451
|
+
checkbox.setAttribute('checked', checked);
|
|
50452
|
+
}
|
|
50453
|
+
}
|
|
50454
|
+
}
|
|
50338
50455
|
function changeCheckboxOrder(sourceIndex, targetIndex, state) {
|
|
50339
50456
|
const { checkedState, table } = state;
|
|
50340
50457
|
let source;
|
|
@@ -53857,6 +53974,102 @@
|
|
|
53857
53974
|
return 'bottom';
|
|
53858
53975
|
}
|
|
53859
53976
|
|
|
53977
|
+
function bindGroupTitleCheckboxChange(table) {
|
|
53978
|
+
table.on('checkbox_state_change', args => {
|
|
53979
|
+
if (table.internalProps.rowSeriesNumber?.enableTreeCheckbox !== true) {
|
|
53980
|
+
return;
|
|
53981
|
+
}
|
|
53982
|
+
const { col, row, checked } = args;
|
|
53983
|
+
const record = table.getCellOriginRecord(col, row);
|
|
53984
|
+
const indexedData = table.dataSource.currentPagerIndexedData;
|
|
53985
|
+
const titleShowIndex = table.getRecordShowIndexByCell(col, row);
|
|
53986
|
+
let titleIndex = indexedData[titleShowIndex];
|
|
53987
|
+
if (isNumber$2(titleIndex)) {
|
|
53988
|
+
titleIndex = [titleIndex];
|
|
53989
|
+
}
|
|
53990
|
+
if (record.vtableMerge) {
|
|
53991
|
+
if (checked) {
|
|
53992
|
+
setAllChildrenCheckboxState(true, titleShowIndex, titleIndex, indexedData, table);
|
|
53993
|
+
updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table);
|
|
53994
|
+
}
|
|
53995
|
+
else {
|
|
53996
|
+
setAllChildrenCheckboxState(false, titleShowIndex, titleIndex, indexedData, table);
|
|
53997
|
+
updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table);
|
|
53998
|
+
const oldHeaderCheckedState = table.stateManager.headerCheckedState._vtable_rowSeries_number;
|
|
53999
|
+
const newHeaderCheckedState = table.stateManager.updateHeaderCheckedState('_vtable_rowSeries_number', col, row);
|
|
54000
|
+
if (oldHeaderCheckedState !== newHeaderCheckedState) {
|
|
54001
|
+
table.scenegraph.updateHeaderCheckboxCellState(col, row, newHeaderCheckedState);
|
|
54002
|
+
}
|
|
54003
|
+
}
|
|
54004
|
+
}
|
|
54005
|
+
else {
|
|
54006
|
+
updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table);
|
|
54007
|
+
}
|
|
54008
|
+
});
|
|
54009
|
+
}
|
|
54010
|
+
function setAllChildrenCheckboxState(state, titleShowIndex, titleIndex, indexedData, table) {
|
|
54011
|
+
let i = titleShowIndex + 1;
|
|
54012
|
+
while (isArray$1(indexedData[i]) && indexedData[i]?.length > titleIndex.length) {
|
|
54013
|
+
const row = table.columnHeaderLevelCount + i;
|
|
54014
|
+
table.stateManager.setCheckedState(0, row, '_vtable_rowSeries_number', state);
|
|
54015
|
+
setCellCheckboxStateByAttribute(0, row, state, table);
|
|
54016
|
+
i++;
|
|
54017
|
+
}
|
|
54018
|
+
}
|
|
54019
|
+
function updateGroupTitleCheckboxState(titleShowIndex, titleIndex, indexedData, table) {
|
|
54020
|
+
let parentLength = titleIndex.length - 1;
|
|
54021
|
+
if (parentLength > 0) {
|
|
54022
|
+
let i = titleShowIndex - 1;
|
|
54023
|
+
while (parentLength > 0 && i >= 0) {
|
|
54024
|
+
if ((isArray$1(indexedData[i]) && indexedData[i]?.length === parentLength) ||
|
|
54025
|
+
(parentLength === 1 && isNumber$2(indexedData[i]))) {
|
|
54026
|
+
const row = table.columnHeaderLevelCount + i;
|
|
54027
|
+
updateParentCheckboxState(0, row, indexedData[i], table);
|
|
54028
|
+
parentLength--;
|
|
54029
|
+
}
|
|
54030
|
+
i--;
|
|
54031
|
+
}
|
|
54032
|
+
}
|
|
54033
|
+
}
|
|
54034
|
+
function updateParentCheckboxState(col, row, currentIndex, table) {
|
|
54035
|
+
const { checkedState } = table.stateManager;
|
|
54036
|
+
const key = currentIndex.toString();
|
|
54037
|
+
const currentIndexLength = isArray$1(currentIndex) ? currentIndex.length : 1;
|
|
54038
|
+
let start = false;
|
|
54039
|
+
const result = [];
|
|
54040
|
+
checkedState.forEach((value, index) => {
|
|
54041
|
+
if (start) {
|
|
54042
|
+
const indexData = index.split(',');
|
|
54043
|
+
if (indexData.length === currentIndexLength) {
|
|
54044
|
+
start = false;
|
|
54045
|
+
}
|
|
54046
|
+
else {
|
|
54047
|
+
result.push(value._vtable_rowSeries_number);
|
|
54048
|
+
}
|
|
54049
|
+
}
|
|
54050
|
+
if (index === key) {
|
|
54051
|
+
start = true;
|
|
54052
|
+
}
|
|
54053
|
+
});
|
|
54054
|
+
if (result.length === 0) {
|
|
54055
|
+
return;
|
|
54056
|
+
}
|
|
54057
|
+
const allChecked = result.every(item => !!item);
|
|
54058
|
+
const allUnChecked = result.every(item => !item);
|
|
54059
|
+
if (allChecked) {
|
|
54060
|
+
table.stateManager.setCheckedState(col, row, '_vtable_rowSeries_number', true);
|
|
54061
|
+
setCellCheckboxStateByAttribute(col, row, true, table);
|
|
54062
|
+
}
|
|
54063
|
+
else if (allUnChecked) {
|
|
54064
|
+
table.stateManager.setCheckedState(col, row, '_vtable_rowSeries_number', false);
|
|
54065
|
+
setCellCheckboxStateByAttribute(col, row, false, table);
|
|
54066
|
+
}
|
|
54067
|
+
else {
|
|
54068
|
+
table.stateManager.setCheckedState(col, row, '_vtable_rowSeries_number', 'indeterminate');
|
|
54069
|
+
setCellCheckboxStateByAttribute(col, row, 'indeterminate', table);
|
|
54070
|
+
}
|
|
54071
|
+
}
|
|
54072
|
+
|
|
53860
54073
|
class EventManager {
|
|
53861
54074
|
table;
|
|
53862
54075
|
isTouchdown;
|
|
@@ -53986,6 +54199,7 @@
|
|
|
53986
54199
|
bindSparklineHoverEvent(this.table);
|
|
53987
54200
|
bindAxisClickEvent(this.table);
|
|
53988
54201
|
bindAxisHoverEvent(this.table);
|
|
54202
|
+
bindGroupTitleCheckboxChange(this.table);
|
|
53989
54203
|
}
|
|
53990
54204
|
dealTableHover(eventArgsSet) {
|
|
53991
54205
|
if (!eventArgsSet) {
|
|
@@ -55605,7 +55819,14 @@
|
|
|
55605
55819
|
const icons = [];
|
|
55606
55820
|
if (this._table.isPivotTable()) {
|
|
55607
55821
|
const { showSort, sort } = this._table.internalProps.layoutMap.getHeader(col, row);
|
|
55608
|
-
|
|
55822
|
+
let _showSort;
|
|
55823
|
+
if (typeof showSort === 'function') {
|
|
55824
|
+
_showSort = showSort({ col, row, table: this._table });
|
|
55825
|
+
}
|
|
55826
|
+
else {
|
|
55827
|
+
_showSort = showSort;
|
|
55828
|
+
}
|
|
55829
|
+
if (_showSort) {
|
|
55609
55830
|
let order = this._table.getPivotSortState(col, row);
|
|
55610
55831
|
if (order) {
|
|
55611
55832
|
order = order.toUpperCase();
|
|
@@ -55731,9 +55952,18 @@
|
|
|
55731
55952
|
getSortIcon(order, _table, col, row) {
|
|
55732
55953
|
const icon = order === 'asc' ? this.upIcon : order === 'desc' ? this.downIcon : this.normalIcon;
|
|
55733
55954
|
const headerC = _table.getHeaderDefine(col, row);
|
|
55955
|
+
let _showSort;
|
|
55956
|
+
if (headerC) {
|
|
55957
|
+
if (typeof headerC.showSort === 'function') {
|
|
55958
|
+
_showSort = headerC.showSort({ col, row, table: this._table });
|
|
55959
|
+
}
|
|
55960
|
+
else {
|
|
55961
|
+
_showSort = headerC.showSort;
|
|
55962
|
+
}
|
|
55963
|
+
}
|
|
55734
55964
|
if (!headerC ||
|
|
55735
|
-
|
|
55736
|
-
(!isValid$1(
|
|
55965
|
+
_showSort === false ||
|
|
55966
|
+
(!isValid$1(_showSort) && !headerC.sort) ||
|
|
55737
55967
|
(headerC.columns && headerC.columns.length > 0)) {
|
|
55738
55968
|
return null;
|
|
55739
55969
|
}
|
|
@@ -55741,9 +55971,18 @@
|
|
|
55741
55971
|
}
|
|
55742
55972
|
getSortIconForPivotTable(order, _table, col, row) {
|
|
55743
55973
|
const headerC = _table.getHeaderDefine(col, row);
|
|
55974
|
+
let _showSort;
|
|
55975
|
+
if (headerC) {
|
|
55976
|
+
if (typeof headerC.showSort === 'function') {
|
|
55977
|
+
_showSort = headerC.showSort({ col, row, table: this._table });
|
|
55978
|
+
}
|
|
55979
|
+
else {
|
|
55980
|
+
_showSort = headerC.showSort;
|
|
55981
|
+
}
|
|
55982
|
+
}
|
|
55744
55983
|
if (!headerC ||
|
|
55745
|
-
|
|
55746
|
-
(!isValid$1(
|
|
55984
|
+
_showSort === false ||
|
|
55985
|
+
(!isValid$1(_showSort) && !headerC.sort) ||
|
|
55747
55986
|
(headerC.columns && headerC.columns.length > 0)) {
|
|
55748
55987
|
return null;
|
|
55749
55988
|
}
|
|
@@ -56275,6 +56514,7 @@
|
|
|
56275
56514
|
|
|
56276
56515
|
class DimensionTree {
|
|
56277
56516
|
sharedVar;
|
|
56517
|
+
hasHideNode = false;
|
|
56278
56518
|
sizeIncludeParent = false;
|
|
56279
56519
|
rowExpandLevel;
|
|
56280
56520
|
hierarchyType;
|
|
@@ -56301,7 +56541,8 @@
|
|
|
56301
56541
|
this.sharedVar = sharedVar;
|
|
56302
56542
|
this.reset(tree);
|
|
56303
56543
|
}
|
|
56304
|
-
reset(tree
|
|
56544
|
+
reset(tree) {
|
|
56545
|
+
this.hasHideNode = false;
|
|
56305
56546
|
this.cache.clear();
|
|
56306
56547
|
this.dimensionKeys = new NumberMap();
|
|
56307
56548
|
this.dimensionKeysIncludeVirtual = new NumberMap();
|
|
@@ -56311,6 +56552,9 @@
|
|
|
56311
56552
|
setTreeNode(node, startIndex, parent) {
|
|
56312
56553
|
node.startIndex = startIndex;
|
|
56313
56554
|
node.startInTotal = (parent.startInTotal ?? 0) + node.startIndex;
|
|
56555
|
+
if (node.hide) {
|
|
56556
|
+
this.hasHideNode = true;
|
|
56557
|
+
}
|
|
56314
56558
|
if (node.dimensionKey ?? node.indicatorKey) {
|
|
56315
56559
|
if (!node.virtual &&
|
|
56316
56560
|
!this.dimensionKeys.contain(node.indicatorKey ? IndicatorDimensionKeyPlaceholder : node.dimensionKey)) {
|
|
@@ -56659,7 +56903,9 @@
|
|
|
56659
56903
|
headerCustomLayout: (indicatorInfo ?? dimensionInfo)?.headerCustomLayout,
|
|
56660
56904
|
dragHeader: dimensionInfo?.dragHeader,
|
|
56661
56905
|
disableHeaderHover: !!(indicatorInfo ?? dimensionInfo)?.disableHeaderHover,
|
|
56662
|
-
disableHeaderSelect: !!(indicatorInfo ?? dimensionInfo)?.disableHeaderSelect
|
|
56906
|
+
disableHeaderSelect: !!(indicatorInfo ?? dimensionInfo)?.disableHeaderSelect,
|
|
56907
|
+
showSort: indicatorInfo?.showSort ?? dimensionInfo?.showSort,
|
|
56908
|
+
hide: indicatorInfo?.hide
|
|
56663
56909
|
}),
|
|
56664
56910
|
fieldFormat: indicatorInfo?.headerFormat ?? dimensionInfo?.headerFormat,
|
|
56665
56911
|
dropDownMenu: indicatorInfo?.dropDownMenu ?? dimensionInfo?.dropDownMenu,
|
|
@@ -56746,6 +56992,30 @@
|
|
|
56746
56992
|
}
|
|
56747
56993
|
}
|
|
56748
56994
|
}
|
|
56995
|
+
function deleteTreeHideNode(tree_children, dimensionPath, indicators, hasHideNode, table) {
|
|
56996
|
+
for (let i = tree_children.length - 1; i >= 0; i--) {
|
|
56997
|
+
const node = tree_children[i];
|
|
56998
|
+
dimensionPath.push(node);
|
|
56999
|
+
if (hasHideNode && node.hide) {
|
|
57000
|
+
tree_children.splice(i, 1);
|
|
57001
|
+
}
|
|
57002
|
+
else if (node.indicatorKey) {
|
|
57003
|
+
const hide = indicators?.find(indicator => indicator.indicatorKey === node.indicatorKey)?.hide;
|
|
57004
|
+
if (typeof hide === 'function') {
|
|
57005
|
+
if (hide({ dimensionPaths: dimensionPath, table })) {
|
|
57006
|
+
tree_children.splice(i, 1);
|
|
57007
|
+
}
|
|
57008
|
+
}
|
|
57009
|
+
else if (hide) {
|
|
57010
|
+
tree_children.splice(i, 1);
|
|
57011
|
+
}
|
|
57012
|
+
}
|
|
57013
|
+
else if (node.children && node.children.length > 0) {
|
|
57014
|
+
deleteTreeHideNode(node.children, dimensionPath, indicators, hasHideNode, table);
|
|
57015
|
+
}
|
|
57016
|
+
dimensionPath.pop();
|
|
57017
|
+
}
|
|
57018
|
+
}
|
|
56749
57019
|
|
|
56750
57020
|
function checkHasAggregation(layoutMap) {
|
|
56751
57021
|
const columnObjects = layoutMap.columnObjects;
|
|
@@ -57003,6 +57273,18 @@
|
|
|
57003
57273
|
}
|
|
57004
57274
|
return customTree;
|
|
57005
57275
|
}
|
|
57276
|
+
function deleteHideIndicatorNode(treeNodeChildren, indicators, hasHideNode, table) {
|
|
57277
|
+
const hasHideSettingIndicators = [];
|
|
57278
|
+
for (let i = 0; i < indicators?.length; i++) {
|
|
57279
|
+
const indicator = indicators[i];
|
|
57280
|
+
if (indicator?.hide) {
|
|
57281
|
+
hasHideSettingIndicators.push(indicator);
|
|
57282
|
+
}
|
|
57283
|
+
}
|
|
57284
|
+
if (hasHideSettingIndicators.length || hasHideNode) {
|
|
57285
|
+
deleteTreeHideNode(treeNodeChildren, [], hasHideSettingIndicators, hasHideNode, table);
|
|
57286
|
+
}
|
|
57287
|
+
}
|
|
57006
57288
|
|
|
57007
57289
|
function getRowAt(absoluteY, _this) {
|
|
57008
57290
|
const frozen = _getTargetFrozenRowAt(_this, absoluteY);
|
|
@@ -58526,7 +58808,7 @@
|
|
|
58526
58808
|
return TABLE_EVENT_TYPE;
|
|
58527
58809
|
}
|
|
58528
58810
|
options;
|
|
58529
|
-
version = "1.14.
|
|
58811
|
+
version = "1.14.3";
|
|
58530
58812
|
pagination;
|
|
58531
58813
|
id = `VTable${Date.now()}`;
|
|
58532
58814
|
headerStyleCache;
|
|
@@ -59818,7 +60100,7 @@
|
|
|
59818
60100
|
updateOption(options) {
|
|
59819
60101
|
this.options = options;
|
|
59820
60102
|
this._hasAutoImageColumn = undefined;
|
|
59821
|
-
const { frozenColCount = 0, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth = 80, keyboardOptions, eventOptions, rowSeriesNumber, columnResizeMode, rowResizeMode = 'none', dragHeaderMode, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, pixelRatio, widthMode, heightMode, autoFillWidth, autoFillHeight, widthAdaptiveMode, heightAdaptiveMode, customRender, renderChartAsync, renderChartAsyncBatchCount, overscrollBehavior, limitMinWidth, limitMinHeight } = options;
|
|
60103
|
+
const { frozenColCount = 0, defaultRowHeight = 40, defaultHeaderRowHeight, defaultColWidth = 80, defaultHeaderColWidth = 80, keyboardOptions, eventOptions, rowSeriesNumber, columnResizeMode, rowResizeMode = 'none', dragHeaderMode, showFrozenIcon, allowFrozenColCount, padding, hover, menu, select: click, pixelRatio, widthMode, heightMode, autoFillWidth, autoFillHeight, widthAdaptiveMode, heightAdaptiveMode, customRender, renderChartAsync, renderChartAsyncBatchCount, canvasWidth, canvasHeight, overscrollBehavior, limitMinWidth, limitMinHeight } = options;
|
|
59822
60104
|
if (pixelRatio && pixelRatio !== this.internalProps.pixelRatio) {
|
|
59823
60105
|
this.internalProps.pixelRatio = pixelRatio;
|
|
59824
60106
|
}
|
|
@@ -59847,6 +60129,8 @@
|
|
|
59847
60129
|
this.autoFillWidth = autoFillWidth ?? false;
|
|
59848
60130
|
this.autoFillHeight = autoFillHeight ?? false;
|
|
59849
60131
|
this.customRender = customRender;
|
|
60132
|
+
this.canvasWidth = canvasWidth;
|
|
60133
|
+
this.canvasHeight = canvasHeight;
|
|
59850
60134
|
const internalProps = this.internalProps;
|
|
59851
60135
|
if (Env.mode !== 'node' && !options.canvas) {
|
|
59852
60136
|
updateRootElementPadding(internalProps.element, this.padding);
|
|
@@ -62342,10 +62626,19 @@
|
|
|
62342
62626
|
return;
|
|
62343
62627
|
}
|
|
62344
62628
|
const cellRecord = layout._table.getCellRawRecord(col, row);
|
|
62345
|
-
if (
|
|
62346
|
-
|
|
62347
|
-
|
|
62348
|
-
|
|
62629
|
+
if (layout._table.internalProps.rowSeriesNumber?.enableTreeCheckbox) {
|
|
62630
|
+
if (cellRecord?.vtableMerge && col >= layout.leftRowSeriesNumberColumnCount) {
|
|
62631
|
+
cellRange.start.col = layout.rowHeaderLevelCount + layout.leftRowSeriesNumberColumnCount;
|
|
62632
|
+
cellRange.end.col = layout.colCount - 1;
|
|
62633
|
+
cellRange.start.row = cellRange.end.row = row;
|
|
62634
|
+
}
|
|
62635
|
+
}
|
|
62636
|
+
else {
|
|
62637
|
+
if (cellRecord?.vtableMerge) {
|
|
62638
|
+
cellRange.start.col = layout.rowHeaderLevelCount;
|
|
62639
|
+
cellRange.end.col = layout.colCount - 1;
|
|
62640
|
+
cellRange.start.row = cellRange.end.row = row;
|
|
62641
|
+
}
|
|
62349
62642
|
}
|
|
62350
62643
|
}
|
|
62351
62644
|
function getCellRangeTranspose(col, row, layout) {
|
|
@@ -64505,6 +64798,7 @@
|
|
|
64505
64798
|
}
|
|
64506
64799
|
}
|
|
64507
64800
|
const newRowEnd = Math.min(rowStart + rowLimit, table.rowCount - 1 - table.bottomFrozenRowCount);
|
|
64801
|
+
const notFullRow = newRowEnd < rowStart + rowLimit;
|
|
64508
64802
|
for (let i = 0; i < removeCellPositions.length; i++) {
|
|
64509
64803
|
const { row: cellRow } = removeCellPositions[removeCellPositions.length - i - 1];
|
|
64510
64804
|
if (cellRow < rowStart || cellRow > rowEnd) {
|
|
@@ -64517,6 +64811,13 @@
|
|
|
64517
64811
|
});
|
|
64518
64812
|
updateRow--;
|
|
64519
64813
|
}
|
|
64814
|
+
else if (notFullRow) {
|
|
64815
|
+
removeCells.push({
|
|
64816
|
+
col,
|
|
64817
|
+
row: cellRow
|
|
64818
|
+
});
|
|
64819
|
+
updateRow--;
|
|
64820
|
+
}
|
|
64520
64821
|
else {
|
|
64521
64822
|
updateRow = Math.min(updateRow, cellRow);
|
|
64522
64823
|
}
|
|
@@ -64693,16 +64994,20 @@
|
|
|
64693
64994
|
const { title } = table.internalProps.layoutMap.getSeriesNumberHeader(col, row);
|
|
64694
64995
|
return title;
|
|
64695
64996
|
}
|
|
64997
|
+
let value;
|
|
64696
64998
|
if (this.options.groupBy) {
|
|
64697
64999
|
const record = table.getCellRawRecord(col, row);
|
|
64698
65000
|
if (record?.vtableMerge) {
|
|
64699
65001
|
return '';
|
|
64700
65002
|
}
|
|
64701
65003
|
const indexs = this.dataSource.currentIndexedData[row - this.columnHeaderLevelCount];
|
|
64702
|
-
|
|
65004
|
+
value = indexs[indexs.length - 1] + 1;
|
|
65005
|
+
}
|
|
65006
|
+
else {
|
|
65007
|
+
value = row - this.columnHeaderLevelCount + 1;
|
|
64703
65008
|
}
|
|
64704
65009
|
const { format } = table.internalProps.layoutMap.getSeriesNumberBody(col, row);
|
|
64705
|
-
return typeof format === 'function' ? format(col, row, this) :
|
|
65010
|
+
return typeof format === 'function' ? format(col, row, this, value) : value;
|
|
64706
65011
|
}
|
|
64707
65012
|
else if (table.internalProps.layoutMap.isHeader(col, row)) {
|
|
64708
65013
|
const { title } = table.internalProps.layoutMap.getHeader(col, row);
|
|
@@ -71914,7 +72219,7 @@
|
|
|
71914
72219
|
}
|
|
71915
72220
|
let rowExtensionDimensionTree;
|
|
71916
72221
|
if (this._rowHeaderExtensionTree[key]) {
|
|
71917
|
-
this._rowHeaderExtensionTree[key].reset(this._rowHeaderExtensionTree[key].tree.children
|
|
72222
|
+
this._rowHeaderExtensionTree[key].reset(this._rowHeaderExtensionTree[key].tree.children);
|
|
71918
72223
|
rowExtensionDimensionTree = this._rowHeaderExtensionTree[key];
|
|
71919
72224
|
}
|
|
71920
72225
|
else {
|
|
@@ -72373,7 +72678,7 @@
|
|
|
72373
72678
|
this._table.isPivotChart() ||
|
|
72374
72679
|
this.dataset.records?.length > 0 ||
|
|
72375
72680
|
(this.dataset.records && !Array.isArray(this.dataset.records))
|
|
72376
|
-
? this.columnDimensionTree.tree.size
|
|
72681
|
+
? this._columnHeaderCellIds[0]?.length ?? this.columnDimensionTree.tree.size
|
|
72377
72682
|
: 0) +
|
|
72378
72683
|
this.rowHeaderLevelCount +
|
|
72379
72684
|
this.rightHeaderColCount +
|
|
@@ -72849,7 +73154,7 @@
|
|
|
72849
73154
|
const hd = this.getHeader(col, row);
|
|
72850
73155
|
hd.define.hierarchyState =
|
|
72851
73156
|
hd.define.hierarchyState === HierarchyState.collapse ? HierarchyState.expand : HierarchyState.collapse;
|
|
72852
|
-
this.rowDimensionTree.reset(this.rowDimensionTree.tree.children
|
|
73157
|
+
this.rowDimensionTree.reset(this.rowDimensionTree.tree.children);
|
|
72853
73158
|
this._rowHeaderCellFullPathIds_FULL = [];
|
|
72854
73159
|
this.rowDimensionKeys = this.rowDimensionTree.dimensionKeysIncludeVirtual.valueArr();
|
|
72855
73160
|
this.fullRowDimensionKeys = [];
|
|
@@ -73131,7 +73436,7 @@
|
|
|
73131
73436
|
sourceColumns.unshift((targetIndex - this.leftRowSeriesNumberColumnCount), 0);
|
|
73132
73437
|
Array.prototype.splice.apply(this._columnWidths, sourceColumns);
|
|
73133
73438
|
this.columnDimensionTree.movePosition(this.getCellHeaderPathsWithTreeNode(source.col, source.row).colHeaderPaths.length - 1, sourceCellRange.start.col - this.rowHeaderLevelCount - this.leftRowSeriesNumberColumnCount, targetCellRange.start.col - this.rowHeaderLevelCount - this.leftRowSeriesNumberColumnCount);
|
|
73134
|
-
this.columnDimensionTree.reset(this.columnDimensionTree.tree.children
|
|
73439
|
+
this.columnDimensionTree.reset(this.columnDimensionTree.tree.children);
|
|
73135
73440
|
this._CellHeaderPathMap = new Map();
|
|
73136
73441
|
this._largeCellRangeCache.length = 0;
|
|
73137
73442
|
return {
|
|
@@ -73172,7 +73477,7 @@
|
|
|
73172
73477
|
sourceIds_FULL0.unshift(targetIndex, 0);
|
|
73173
73478
|
Array.prototype.splice.apply(this._rowHeaderCellFullPathIds_FULL, sourceIds_FULL0);
|
|
73174
73479
|
this.rowDimensionTree.movePosition(sourceRowHeaderPaths.length - 1, sourceCellRange.start.row - this.columnHeaderLevelCount, targetIndex + (target.row > source.row ? sourceRowHeaderNode.size - 1 : 0));
|
|
73175
|
-
this.rowDimensionTree.reset(this.rowDimensionTree.tree.children
|
|
73480
|
+
this.rowDimensionTree.reset(this.rowDimensionTree.tree.children);
|
|
73176
73481
|
this._CellHeaderPathMap = new Map();
|
|
73177
73482
|
this._largeCellRangeCache.length = 0;
|
|
73178
73483
|
return {
|
|
@@ -76020,14 +76325,34 @@
|
|
|
76020
76325
|
if (options.indicatorsAsCol !== false) {
|
|
76021
76326
|
this.dataset.colHeaderTree = supplementIndicatorNodesForCustomTree(this.dataset.colHeaderTree, options.indicators);
|
|
76022
76327
|
}
|
|
76328
|
+
options.indicatorsAsCol !== false &&
|
|
76329
|
+
options.indicators &&
|
|
76330
|
+
this.dataset.colHeaderTree &&
|
|
76331
|
+
deleteHideIndicatorNode(this.dataset.colHeaderTree, options.indicators, false, this);
|
|
76023
76332
|
columnDimensionTree = new DimensionTree(this.dataset.colHeaderTree ?? [], this.layoutNodeId);
|
|
76024
76333
|
}
|
|
76334
|
+
else {
|
|
76335
|
+
if (columnDimensionTree.hasHideNode) {
|
|
76336
|
+
deleteHideIndicatorNode(columnDimensionTree.tree.children, options.indicators, true, this);
|
|
76337
|
+
columnDimensionTree.reset(columnDimensionTree.tree.children);
|
|
76338
|
+
}
|
|
76339
|
+
}
|
|
76025
76340
|
if (!options.rowTree) {
|
|
76026
76341
|
if (options.indicatorsAsCol === false) {
|
|
76027
76342
|
this.dataset.rowHeaderTree = supplementIndicatorNodesForCustomTree(this.dataset.rowHeaderTree, options.indicators);
|
|
76028
76343
|
}
|
|
76344
|
+
options.indicatorsAsCol === false &&
|
|
76345
|
+
this.dataset.rowHeaderTree &&
|
|
76346
|
+
options.indicators &&
|
|
76347
|
+
deleteHideIndicatorNode(this.dataset.rowHeaderTree, options.indicators, false, this);
|
|
76029
76348
|
rowDimensionTree = new DimensionTree(this.dataset.rowHeaderTree ?? [], this.layoutNodeId, this.options.rowHierarchyType, this.options.rowHierarchyType === 'tree' ? this.options.rowExpandLevel ?? 1 : undefined);
|
|
76030
76349
|
}
|
|
76350
|
+
else {
|
|
76351
|
+
if (rowDimensionTree.hasHideNode) {
|
|
76352
|
+
deleteHideIndicatorNode(rowDimensionTree.tree.children, options.indicators, true, this);
|
|
76353
|
+
rowDimensionTree.reset(rowDimensionTree.tree.children);
|
|
76354
|
+
}
|
|
76355
|
+
}
|
|
76031
76356
|
this.internalProps.layoutMap = new PivotHeaderLayoutMap(this, this.dataset, columnDimensionTree, rowDimensionTree);
|
|
76032
76357
|
}
|
|
76033
76358
|
this._changePivotSortStateBySortRules();
|
|
@@ -76162,14 +76487,34 @@
|
|
|
76162
76487
|
if (options.indicatorsAsCol !== false) {
|
|
76163
76488
|
this.dataset.colHeaderTree = supplementIndicatorNodesForCustomTree(this.dataset.colHeaderTree, options.indicators);
|
|
76164
76489
|
}
|
|
76490
|
+
options.indicatorsAsCol !== false &&
|
|
76491
|
+
options.indicators &&
|
|
76492
|
+
this.dataset.colHeaderTree &&
|
|
76493
|
+
deleteHideIndicatorNode(this.dataset.colHeaderTree, options.indicators, false, this);
|
|
76165
76494
|
columnDimensionTree = new DimensionTree(this.dataset.colHeaderTree ?? [], this.layoutNodeId);
|
|
76166
76495
|
}
|
|
76496
|
+
else {
|
|
76497
|
+
if (columnDimensionTree.hasHideNode) {
|
|
76498
|
+
deleteHideIndicatorNode(columnDimensionTree.tree.children, options.indicators, true, this);
|
|
76499
|
+
columnDimensionTree.reset(columnDimensionTree.tree.children);
|
|
76500
|
+
}
|
|
76501
|
+
}
|
|
76167
76502
|
if (!options.rowTree) {
|
|
76168
76503
|
if (options.indicatorsAsCol === false) {
|
|
76169
76504
|
this.dataset.rowHeaderTree = supplementIndicatorNodesForCustomTree(this.dataset.rowHeaderTree, options.indicators);
|
|
76170
76505
|
}
|
|
76506
|
+
options.indicatorsAsCol === false &&
|
|
76507
|
+
this.dataset.rowHeaderTree &&
|
|
76508
|
+
options.indicators &&
|
|
76509
|
+
deleteHideIndicatorNode(this.dataset.rowHeaderTree, options.indicators, false, this);
|
|
76171
76510
|
rowDimensionTree = new DimensionTree(this.dataset.rowHeaderTree ?? [], this.layoutNodeId, this.options.rowHierarchyType, this.options.rowHierarchyType === 'tree' ? this.options.rowExpandLevel ?? 1 : undefined);
|
|
76172
76511
|
}
|
|
76512
|
+
else {
|
|
76513
|
+
if (rowDimensionTree.hasHideNode) {
|
|
76514
|
+
deleteHideIndicatorNode(rowDimensionTree.tree.children, options.indicators, true, this);
|
|
76515
|
+
rowDimensionTree.reset(rowDimensionTree.tree.children);
|
|
76516
|
+
}
|
|
76517
|
+
}
|
|
76173
76518
|
internalProps.layoutMap = new PivotHeaderLayoutMap(this, this.dataset, columnDimensionTree, rowDimensionTree);
|
|
76174
76519
|
}
|
|
76175
76520
|
this._changePivotSortStateBySortRules();
|
|
@@ -77046,12 +77391,20 @@
|
|
|
77046
77391
|
columnDimensionTree = internalProps.layoutMap.columnDimensionTree;
|
|
77047
77392
|
}
|
|
77048
77393
|
else {
|
|
77394
|
+
options.indicatorsAsCol !== false &&
|
|
77395
|
+
options.indicators &&
|
|
77396
|
+
this.dataset.colHeaderTree &&
|
|
77397
|
+
deleteHideIndicatorNode(this.dataset.colHeaderTree, options.indicators, false, this);
|
|
77049
77398
|
columnDimensionTree = new DimensionTree(this.dataset.colHeaderTree ?? [], this.layoutNodeId);
|
|
77050
77399
|
}
|
|
77051
77400
|
if (options.rowTree) {
|
|
77052
77401
|
rowDimensionTree = internalProps.layoutMap.rowDimensionTree;
|
|
77053
77402
|
}
|
|
77054
77403
|
else {
|
|
77404
|
+
options.indicatorsAsCol === false &&
|
|
77405
|
+
this.dataset.rowHeaderTree &&
|
|
77406
|
+
options.indicators &&
|
|
77407
|
+
deleteHideIndicatorNode(this.dataset.rowHeaderTree, options.indicators, false, this);
|
|
77055
77408
|
rowDimensionTree = new DimensionTree(this.dataset.rowHeaderTree ?? [], this.layoutNodeId, this.options.rowHierarchyType, this.options.rowHierarchyType === 'tree' ? this.options.rowExpandLevel ?? 1 : undefined);
|
|
77056
77409
|
}
|
|
77057
77410
|
internalProps.layoutMap = new PivotHeaderLayoutMap(this, this.dataset, columnDimensionTree, rowDimensionTree);
|
|
@@ -79083,7 +79436,7 @@
|
|
|
79083
79436
|
}
|
|
79084
79437
|
|
|
79085
79438
|
registerForVrender();
|
|
79086
|
-
const version = "1.14.
|
|
79439
|
+
const version = "1.14.3";
|
|
79087
79440
|
function getIcons() {
|
|
79088
79441
|
return get$2();
|
|
79089
79442
|
}
|