@visactor/vtable 1.23.3 → 1.24.0-alpha.0
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 +1 -0
- package/cjs/ListTable.js +182 -24
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotTable.d.ts +1 -0
- package/cjs/PivotTable.js +10 -2
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +9 -0
- package/cjs/core/BaseTable.js +64 -15
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.d.ts +2 -0
- package/cjs/core/TABLE_EVENT_TYPE.js +2 -0
- package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/core/animation.js +5 -3
- package/cjs/core/animation.js.map +1 -1
- package/cjs/core/record-helper.js +83 -13
- package/cjs/core/record-helper.js.map +1 -1
- package/cjs/data/DataSource.js +3 -2
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/dataset/DataStatistics.js +1 -2
- package/cjs/edit/edit-manager.js +21 -15
- package/cjs/edit/edit-manager.js.map +1 -1
- package/cjs/index.d.ts +3 -3
- package/cjs/index.js +51 -12
- package/cjs/index.js.map +1 -1
- package/cjs/layout/cell-range/simple-cell-range.js +14 -4
- package/cjs/layout/cell-range/simple-cell-range.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/group-creater/init-scenegraph.js +1 -1
- package/cjs/scenegraph/group-creater/init-scenegraph.js.map +1 -1
- package/cjs/state/state.js +14 -11
- package/cjs/state/state.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +5 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/events.d.ts +16 -0
- package/cjs/ts-types/events.js.map +1 -1
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +906 -218
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +1 -0
- package/es/ListTable.js +177 -24
- package/es/ListTable.js.map +1 -1
- package/es/PivotTable.d.ts +1 -0
- package/es/PivotTable.js +8 -2
- package/es/PivotTable.js.map +1 -1
- package/es/core/BaseTable.d.ts +9 -0
- package/es/core/BaseTable.js +64 -15
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/TABLE_EVENT_TYPE.d.ts +2 -0
- package/es/core/TABLE_EVENT_TYPE.js +2 -0
- package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/es/core/animation.js +5 -3
- package/es/core/animation.js.map +1 -1
- package/es/core/record-helper.js +83 -12
- package/es/core/record-helper.js.map +1 -1
- package/es/data/DataSource.js +3 -2
- package/es/data/DataSource.js.map +1 -1
- package/es/dataset/DataStatistics.js +1 -2
- package/es/edit/edit-manager.js +20 -16
- package/es/edit/edit-manager.js.map +1 -1
- package/es/index.d.ts +3 -3
- package/es/index.js +5 -3
- package/es/index.js.map +1 -1
- package/es/layout/cell-range/simple-cell-range.js +14 -4
- package/es/layout/cell-range/simple-cell-range.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +1 -1
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/group-creater/init-scenegraph.js +1 -1
- package/es/scenegraph/group-creater/init-scenegraph.js.map +1 -1
- package/es/state/state.js +14 -11
- package/es/state/state.js.map +1 -1
- package/es/ts-types/base-table.d.ts +5 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/events.d.ts +16 -0
- package/es/ts-types/events.js.map +1 -1
- 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
|
@@ -1307,13 +1307,13 @@
|
|
|
1307
1307
|
const isDate = value => isType$1(value, "Date");
|
|
1308
1308
|
var isDate$1 = isDate;
|
|
1309
1309
|
|
|
1310
|
-
const isNumber$
|
|
1310
|
+
const isNumber$2 = (value, fuzzy = !1) => {
|
|
1311
1311
|
const type = typeof value;
|
|
1312
1312
|
return fuzzy ? "number" === type : "number" === type || isType$1(value, "Number");
|
|
1313
1313
|
};
|
|
1314
|
-
var isNumber$
|
|
1314
|
+
var isNumber$3 = isNumber$2;
|
|
1315
1315
|
|
|
1316
|
-
const isValidNumber = value => isNumber$
|
|
1316
|
+
const isValidNumber = value => isNumber$3(value) && Number.isFinite(value);
|
|
1317
1317
|
var isValidNumber$1 = isValidNumber;
|
|
1318
1318
|
|
|
1319
1319
|
const isValidUrl = value => new RegExp(/^(http(s)?:\/\/)\w+[^\s]+(\.[^\s]+){1,}$/).test(value);
|
|
@@ -1359,7 +1359,7 @@
|
|
|
1359
1359
|
if (!isValid$1(value) || "object" != typeof value || ignoreWhen && ignoreWhen(value)) return value;
|
|
1360
1360
|
const isArr = isArray$5(value),
|
|
1361
1361
|
length = value.length;
|
|
1362
|
-
result = isArr ? new Array(length) : "object" == typeof value ? {} : isBoolean$2(value) || isNumber$
|
|
1362
|
+
result = isArr ? new Array(length) : "object" == typeof value ? {} : isBoolean$2(value) || isNumber$3(value) || isString$2(value) ? value : isDate$1(value) ? new Date(+value) : void 0;
|
|
1363
1363
|
const props = isArr ? void 0 : Object.keys(Object(value));
|
|
1364
1364
|
let index = -1;
|
|
1365
1365
|
if (result) for (; ++index < (props || value).length;) {
|
|
@@ -1556,7 +1556,7 @@
|
|
|
1556
1556
|
}(LoggerLevel || (LoggerLevel = {}));
|
|
1557
1557
|
class Logger {
|
|
1558
1558
|
static getInstance(level, method) {
|
|
1559
|
-
return Logger._instance && isNumber$
|
|
1559
|
+
return Logger._instance && isNumber$3(level) ? Logger._instance.level(level) : Logger._instance || (Logger._instance = new Logger(level, method)), Logger._instance;
|
|
1560
1560
|
}
|
|
1561
1561
|
static setInstance(logger) {
|
|
1562
1562
|
return Logger._instance = logger;
|
|
@@ -1804,10 +1804,10 @@
|
|
|
1804
1804
|
return this.x = x, this.y = y, this;
|
|
1805
1805
|
}
|
|
1806
1806
|
add(point) {
|
|
1807
|
-
return isNumber$
|
|
1807
|
+
return isNumber$3(point) ? (this.x += point, void (this.y += point)) : (this.x += point.x, this.y += point.y, this);
|
|
1808
1808
|
}
|
|
1809
1809
|
sub(point) {
|
|
1810
|
-
return isNumber$
|
|
1810
|
+
return isNumber$3(point) ? (this.x -= point, void (this.y -= point)) : (this.x -= point.x, this.y -= point.y, this);
|
|
1811
1811
|
}
|
|
1812
1812
|
multi(point) {
|
|
1813
1813
|
throw new Error("暂不支持");
|
|
@@ -2814,10 +2814,10 @@
|
|
|
2814
2814
|
return ((value = Math.max(0, Math.min(255, Math.round(value) || 0))) < 16 ? "0" : "") + value.toString(16);
|
|
2815
2815
|
}
|
|
2816
2816
|
function rgb(value) {
|
|
2817
|
-
return isNumber$
|
|
2817
|
+
return isNumber$3(value) ? new RGB(value >> 16, value >> 8 & 255, 255 & value, 1) : isArray$5(value) ? new RGB(value[0], value[1], value[2]) : new RGB(255, 255, 255);
|
|
2818
2818
|
}
|
|
2819
2819
|
function rgba(value) {
|
|
2820
|
-
return isNumber$
|
|
2820
|
+
return isNumber$3(value) ? new RGB(value >>> 24, value >>> 16 & 255, value >>> 8 & 255, 255 & value) : isArray$5(value) ? new RGB(value[0], value[1], value[2], value[3]) : new RGB(255, 255, 255, 1);
|
|
2821
2821
|
}
|
|
2822
2822
|
function SRGBToLinear(c) {
|
|
2823
2823
|
return c < .04045 ? .0773993808 * c : Math.pow(.9478672986 * c + .0521327014, 2.4);
|
|
@@ -5631,6 +5631,9 @@
|
|
|
5631
5631
|
function isNotAroundZero(val) {
|
|
5632
5632
|
return val > EPSILON || val < -EPSILON;
|
|
5633
5633
|
}
|
|
5634
|
+
function isNumber$1(data) {
|
|
5635
|
+
return "number" == typeof data && Number.isFinite(data);
|
|
5636
|
+
}
|
|
5634
5637
|
const _v0 = [0, 0],
|
|
5635
5638
|
_v1 = [0, 0],
|
|
5636
5639
|
_v2 = [0, 0];
|
|
@@ -7633,13 +7636,13 @@
|
|
|
7633
7636
|
|
|
7634
7637
|
class BaseSymbol {
|
|
7635
7638
|
bounds(size, bounds) {
|
|
7636
|
-
if (isNumber$
|
|
7639
|
+
if (isNumber$3(size)) {
|
|
7637
7640
|
const halfS = size / 2;
|
|
7638
7641
|
bounds.x1 = -halfS, bounds.x2 = halfS, bounds.y1 = -halfS, bounds.y2 = halfS;
|
|
7639
7642
|
} else bounds.x1 = -size[0] / 2, bounds.x2 = size[0] / 2, bounds.y1 = -size[1] / 2, bounds.y2 = size[1] / 2;
|
|
7640
7643
|
}
|
|
7641
7644
|
parseSize(size) {
|
|
7642
|
-
return isNumber$
|
|
7645
|
+
return isNumber$3(size) ? size : Math.min(size[0], size[1]);
|
|
7643
7646
|
}
|
|
7644
7647
|
}
|
|
7645
7648
|
|
|
@@ -8055,10 +8058,10 @@
|
|
|
8055
8058
|
super(...arguments), this.type = "rect", this.pathStr = "M -0.5,0.25 L 0.5,0.25 L 0.5,-0.25,L -0.5,-0.25 Z";
|
|
8056
8059
|
}
|
|
8057
8060
|
draw(ctx, size, x, y) {
|
|
8058
|
-
return isNumber$
|
|
8061
|
+
return isNumber$3(size) ? rectSize(ctx, size, x, y) : rectSizeArray(ctx, size, x, y);
|
|
8059
8062
|
}
|
|
8060
8063
|
drawWithClipRange(ctx, size, x, y, clipRange, z, cb) {
|
|
8061
|
-
isNumber$
|
|
8064
|
+
isNumber$3(size) && (size = [size, size / 2]);
|
|
8062
8065
|
const drawLength = 2 * (size[0] + size[1]) * clipRange,
|
|
8063
8066
|
points = [{
|
|
8064
8067
|
x: x + size[0] / 2,
|
|
@@ -8090,7 +8093,7 @@
|
|
|
8090
8093
|
return !1;
|
|
8091
8094
|
}
|
|
8092
8095
|
drawOffset(ctx, size, x, y, offset) {
|
|
8093
|
-
return isNumber$
|
|
8096
|
+
return isNumber$3(size) ? rectSize(ctx, size + 2 * offset, x, y) : rectSizeArray(ctx, [size[0] + 2 * offset, size[1] + 2 * offset], x, y);
|
|
8094
8097
|
}
|
|
8095
8098
|
}
|
|
8096
8099
|
var rect = new RectSymbol();
|
|
@@ -8109,7 +8112,7 @@
|
|
|
8109
8112
|
return size = this.parseSize(size), this.drawOffset(ctx, size, x, y, 0, z, cb);
|
|
8110
8113
|
}
|
|
8111
8114
|
parseSize(size) {
|
|
8112
|
-
return isNumber$
|
|
8115
|
+
return isNumber$3(size) ? size : Math.min(size[0], size[1]);
|
|
8113
8116
|
}
|
|
8114
8117
|
drawWithClipRange(ctx, size, x, y, clipRange, z, cb) {
|
|
8115
8118
|
return size = this.parseSize(size), this.isSvg ? !!this.svgCache && (this.svgCache.forEach(item => {
|
|
@@ -8921,10 +8924,10 @@
|
|
|
8921
8924
|
ColorStore.store255 = {}, ColorStore.store1 = {};
|
|
8922
8925
|
|
|
8923
8926
|
function colorArrayToString(color, alphaChannel = !1) {
|
|
8924
|
-
return Array.isArray(color) && isNumber$
|
|
8927
|
+
return Array.isArray(color) && isNumber$3(color[0]) ? alphaChannel ? `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])},${color[3].toFixed(2)})` : `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])})` : color;
|
|
8925
8928
|
}
|
|
8926
8929
|
function interpolateColor(from, to, ratio, alphaChannel, cb) {
|
|
8927
|
-
if (Array.isArray(from) && !isNumber$
|
|
8930
|
+
if (Array.isArray(from) && !isNumber$3(from[0]) || Array.isArray(to) && !isNumber$3(to[0])) {
|
|
8928
8931
|
return new Array(4).fill(0).map((_, index) => {
|
|
8929
8932
|
var _a, _b;
|
|
8930
8933
|
return _interpolateColor(isArray$5(from) ? null !== (_a = from[index]) && void 0 !== _a ? _a : from[0] : from, isArray$5(to) ? null !== (_b = to[index]) && void 0 !== _b ? _b : to[0] : to, ratio, alphaChannel);
|
|
@@ -10533,12 +10536,12 @@
|
|
|
10533
10536
|
textBaseline: textBaseline
|
|
10534
10537
|
} = attribute;
|
|
10535
10538
|
if (null != attribute.forceBoundsHeight) {
|
|
10536
|
-
const h = isNumber$
|
|
10539
|
+
const h = isNumber$3(attribute.forceBoundsHeight) ? attribute.forceBoundsHeight : attribute.forceBoundsHeight(),
|
|
10537
10540
|
dy = textLayoutOffsetY(textBaseline, h, h);
|
|
10538
10541
|
aabbBounds.set(aabbBounds.x1, dy, aabbBounds.x2, dy + h);
|
|
10539
10542
|
}
|
|
10540
10543
|
if (null != attribute.forceBoundsWidth) {
|
|
10541
|
-
const w = isNumber$
|
|
10544
|
+
const w = isNumber$3(attribute.forceBoundsWidth) ? attribute.forceBoundsWidth : attribute.forceBoundsWidth(),
|
|
10542
10545
|
dx = textDrawOffsetX(textAlign, w);
|
|
10543
10546
|
aabbBounds.set(dx, aabbBounds.y1, dx + w, aabbBounds.y2);
|
|
10544
10547
|
}
|
|
@@ -12470,7 +12473,7 @@
|
|
|
12470
12473
|
}
|
|
12471
12474
|
} else {
|
|
12472
12475
|
const richTextConfig = this.combinedStyleToCharacter(textConfig[i]);
|
|
12473
|
-
if (isNumber$
|
|
12476
|
+
if (isNumber$3(richTextConfig.text) && (richTextConfig.text = `${richTextConfig.text}`), richTextConfig.text && richTextConfig.text.includes("\n")) {
|
|
12474
12477
|
const textParts = richTextConfig.text.split("\n");
|
|
12475
12478
|
for (let j = 0; j < textParts.length; j++) if (0 === j) paragraphs.push(new Paragraph(textParts[j], !1, richTextConfig, ascentDescentMode));else if (textParts[j] || i === textConfig.length - 1) paragraphs.push(new Paragraph(textParts[j], !0, richTextConfig, ascentDescentMode));else {
|
|
12476
12479
|
const nextRichTextConfig = this.combinedStyleToCharacter(textConfig[i + 1]);
|
|
@@ -12661,7 +12664,7 @@
|
|
|
12661
12664
|
} = this.attribute;
|
|
12662
12665
|
if (outerRadius += outerPadding, innerRadius -= innerPadding, 0 === cornerRadius || "0%" === cornerRadius) return 0;
|
|
12663
12666
|
const deltaRadius = Math.abs(outerRadius - innerRadius),
|
|
12664
|
-
parseCR = cornerRadius => Math.min(isNumber$
|
|
12667
|
+
parseCR = cornerRadius => Math.min(isNumber$3(cornerRadius, !0) ? cornerRadius : deltaRadius * parseFloat(cornerRadius) / 100, deltaRadius / 2);
|
|
12665
12668
|
if (isArray$5(cornerRadius)) {
|
|
12666
12669
|
const crList = cornerRadius.map(cr => parseCR(cr) || 0);
|
|
12667
12670
|
return 0 === crList.length ? [crList[0], crList[0], crList[0], crList[0]] : 2 === crList.length ? [crList[0], crList[1], crList[0], crList[1]] : (3 === crList.length && crList.push(0), crList);
|
|
@@ -13452,7 +13455,7 @@
|
|
|
13452
13455
|
const halfPi = pi / 2;
|
|
13453
13456
|
function createRectPath(path, x, y, width, height, rectCornerRadius, roundCorner = !0, edgeCb) {
|
|
13454
13457
|
let cornerRadius;
|
|
13455
|
-
if (Array.isArray(roundCorner) && (edgeCb = roundCorner, roundCorner = !0), width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$
|
|
13458
|
+
if (Array.isArray(roundCorner) && (edgeCb = roundCorner, roundCorner = !0), width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$3(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius = abs(rectCornerRadius), rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
|
|
13456
13459
|
const cornerRadiusArr = rectCornerRadius;
|
|
13457
13460
|
let cr0, cr1;
|
|
13458
13461
|
switch (cornerRadiusArr.length) {
|
|
@@ -17583,6 +17586,77 @@
|
|
|
17583
17586
|
return diffObj;
|
|
17584
17587
|
}
|
|
17585
17588
|
|
|
17589
|
+
function isIdentityMatrix(matrix) {
|
|
17590
|
+
return 1 === matrix.a && 0 === matrix.b && 0 === matrix.c && 1 === matrix.d && 0 === matrix.e && 0 === matrix.f;
|
|
17591
|
+
}
|
|
17592
|
+
function createEventTransformer(containerElement, getMatrix, getRect, transformPoint) {
|
|
17593
|
+
return event => {
|
|
17594
|
+
if (!(event instanceof MouseEvent || event instanceof TouchEvent || event instanceof PointerEvent)) return event;
|
|
17595
|
+
const transformMatrix = getMatrix();
|
|
17596
|
+
if (isIdentityMatrix(transformMatrix)) return event;
|
|
17597
|
+
const containerRect = getRect(),
|
|
17598
|
+
transformedEvent = new event.constructor(event.type, event);
|
|
17599
|
+
if (Object.defineProperties(transformedEvent, {
|
|
17600
|
+
target: {
|
|
17601
|
+
value: event.target
|
|
17602
|
+
},
|
|
17603
|
+
currentTarget: {
|
|
17604
|
+
value: event.currentTarget
|
|
17605
|
+
}
|
|
17606
|
+
}), event instanceof MouseEvent || event instanceof PointerEvent) transformPoint(event.clientX, event.clientY, transformMatrix, containerRect, transformedEvent);else if (event instanceof TouchEvent) {
|
|
17607
|
+
if (event.touches.length > 0) {
|
|
17608
|
+
const touch = transformedEvent.touches[0];
|
|
17609
|
+
transformPoint(touch.clientX, touch.clientY, transformMatrix, containerRect, touch);
|
|
17610
|
+
}
|
|
17611
|
+
if (event.changedTouches.length > 0) {
|
|
17612
|
+
const touch = transformedEvent.changedTouches[0];
|
|
17613
|
+
transformPoint(touch.clientX, touch.clientY, transformMatrix, containerRect, touch);
|
|
17614
|
+
}
|
|
17615
|
+
}
|
|
17616
|
+
return transformedEvent;
|
|
17617
|
+
};
|
|
17618
|
+
}
|
|
17619
|
+
function registerWindowEventTransformer(window, container, getMatrix, getRect, transformPoint) {
|
|
17620
|
+
const transformer = createEventTransformer(container, getMatrix, getRect, transformPoint);
|
|
17621
|
+
window.setEventListenerTransformer(transformer);
|
|
17622
|
+
}
|
|
17623
|
+
function registerGlobalEventTransformer(global, container, getMatrix, getRect, transformPoint) {
|
|
17624
|
+
const transformer = createEventTransformer(container, getMatrix, getRect, transformPoint);
|
|
17625
|
+
global.setEventListenerTransformer(transformer);
|
|
17626
|
+
}
|
|
17627
|
+
function transformPointForCanvas(clientX, clientY, matrix, rect, transformedEvent) {
|
|
17628
|
+
const transformedPoint = {
|
|
17629
|
+
x: clientX,
|
|
17630
|
+
y: clientY
|
|
17631
|
+
};
|
|
17632
|
+
matrix.transformPoint(transformedPoint, transformedPoint), Object.defineProperties(transformedEvent, {
|
|
17633
|
+
_canvasX: {
|
|
17634
|
+
value: transformedPoint.x
|
|
17635
|
+
},
|
|
17636
|
+
_canvasY: {
|
|
17637
|
+
value: transformedPoint.y
|
|
17638
|
+
}
|
|
17639
|
+
});
|
|
17640
|
+
}
|
|
17641
|
+
function mapToCanvasPointForCanvas(nativeEvent) {
|
|
17642
|
+
var _a;
|
|
17643
|
+
if (isNumber$1(nativeEvent._canvasX) && isNumber$1(nativeEvent._canvasY)) return {
|
|
17644
|
+
x: nativeEvent._canvasX,
|
|
17645
|
+
y: nativeEvent._canvasY
|
|
17646
|
+
};
|
|
17647
|
+
if (nativeEvent.changedTouches) {
|
|
17648
|
+
const data = null !== (_a = nativeEvent.changedTouches[0]) && void 0 !== _a ? _a : {};
|
|
17649
|
+
return {
|
|
17650
|
+
x: data._canvasX,
|
|
17651
|
+
y: data._canvasY
|
|
17652
|
+
};
|
|
17653
|
+
}
|
|
17654
|
+
return {
|
|
17655
|
+
x: nativeEvent._canvasX || 0,
|
|
17656
|
+
y: nativeEvent._canvasY || 0
|
|
17657
|
+
};
|
|
17658
|
+
}
|
|
17659
|
+
|
|
17586
17660
|
let loadArcModule = !1;
|
|
17587
17661
|
const arcModule = new ContainerModule(bind => {
|
|
17588
17662
|
loadArcModule || (loadArcModule = !0, bind(DefaultCanvasArcRender).toSelf().inSingletonScope(), bind(ArcRender).to(DefaultCanvasArcRender).inSingletonScope(), bind(GraphicRender).toService(ArcRender), bind(ArcRenderContribution).toService(DefaultBaseInteractiveRenderContribution), bindContributionProvider(bind, ArcRenderContribution));
|
|
@@ -19795,7 +19869,7 @@
|
|
|
19795
19869
|
x += point.x, y += point.y, pickContext.setTransformForCurrent();
|
|
19796
19870
|
} else x = 0, y = 0, onlyTranslate = !1, pickContext.transformFromMatrix(rect.transMatrix, !0);
|
|
19797
19871
|
let picked = !0;
|
|
19798
|
-
if (!onlyTranslate || rect.shadowRoot || isNumber$
|
|
19872
|
+
if (!onlyTranslate || rect.shadowRoot || isNumber$3(cornerRadius, !0) && 0 !== cornerRadius || isArray$5(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
|
|
19799
19873
|
if (picked) return !0;
|
|
19800
19874
|
const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth,
|
|
19801
19875
|
pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
|
|
@@ -21712,7 +21786,7 @@
|
|
|
21712
21786
|
shapeStyle = __rest$3(shape, ["visible"]);
|
|
21713
21787
|
if (isBoolean$2(shapeVisible)) {
|
|
21714
21788
|
const size = (null == shapeStyle ? void 0 : shapeStyle.size) || 10,
|
|
21715
|
-
maxSize = isNumber$
|
|
21789
|
+
maxSize = isNumber$3(size) ? size : Math.max(size[0], size[1]);
|
|
21716
21790
|
symbol = group.createOrUpdateChild("tag-shape", Object.assign(Object.assign({
|
|
21717
21791
|
symbolType: "circle",
|
|
21718
21792
|
size: size,
|
|
@@ -21752,7 +21826,7 @@
|
|
|
21752
21826
|
}
|
|
21753
21827
|
tagWidth += textWidth;
|
|
21754
21828
|
const size = null !== (_c = shape.size) && void 0 !== _c ? _c : 10,
|
|
21755
|
-
maxSize = isNumber$
|
|
21829
|
+
maxSize = isNumber$3(size) ? size : Math.max(size[0], size[1]);
|
|
21756
21830
|
tagHeight += Math.max(textHeight, shape.visible ? maxSize : 0);
|
|
21757
21831
|
const {
|
|
21758
21832
|
textAlign: textAlign,
|
|
@@ -25211,7 +25285,7 @@
|
|
|
25211
25285
|
growAngleInOverall = (graphic, options, animationParameters) => {
|
|
25212
25286
|
const attrs = graphic.getFinalAttribute();
|
|
25213
25287
|
if (options && "anticlockwise" === options.orient) {
|
|
25214
|
-
const overallValue = isNumber$
|
|
25288
|
+
const overallValue = isNumber$3(options.overall) ? options.overall : 2 * Math.PI;
|
|
25215
25289
|
return {
|
|
25216
25290
|
from: {
|
|
25217
25291
|
startAngle: overallValue,
|
|
@@ -25223,7 +25297,7 @@
|
|
|
25223
25297
|
}
|
|
25224
25298
|
};
|
|
25225
25299
|
}
|
|
25226
|
-
const overallValue = isNumber$
|
|
25300
|
+
const overallValue = isNumber$3(null == options ? void 0 : options.overall) ? options.overall : 0;
|
|
25227
25301
|
return {
|
|
25228
25302
|
from: {
|
|
25229
25303
|
startAngle: overallValue,
|
|
@@ -25260,7 +25334,7 @@
|
|
|
25260
25334
|
growAngleOutOverall = (graphic, options, animationParameters) => {
|
|
25261
25335
|
const attrs = graphic.attribute;
|
|
25262
25336
|
if (options && "anticlockwise" === options.orient) {
|
|
25263
|
-
const overallValue = isNumber$
|
|
25337
|
+
const overallValue = isNumber$3(options.overall) ? options.overall : 2 * Math.PI;
|
|
25264
25338
|
return {
|
|
25265
25339
|
from: {
|
|
25266
25340
|
startAngle: attrs.startAngle,
|
|
@@ -25272,7 +25346,7 @@
|
|
|
25272
25346
|
}
|
|
25273
25347
|
};
|
|
25274
25348
|
}
|
|
25275
|
-
const overallValue = isNumber$
|
|
25349
|
+
const overallValue = isNumber$3(null == options ? void 0 : options.overall) ? options.overall : 0;
|
|
25276
25350
|
return {
|
|
25277
25351
|
from: {
|
|
25278
25352
|
startAngle: attrs.startAngle,
|
|
@@ -25548,7 +25622,7 @@
|
|
|
25548
25622
|
y1 = attrs.y1,
|
|
25549
25623
|
height = attrs.height;
|
|
25550
25624
|
let overallValue;
|
|
25551
|
-
return options && "negative" === options.orient ? isNumber$
|
|
25625
|
+
return options && "negative" === options.orient ? isNumber$3(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_c = null !== (_a = animationParameters.groupHeight) && void 0 !== _a ? _a : null === (_b = options.layoutRect) || void 0 === _b ? void 0 : _b.height) && void 0 !== _c ? _c : animationParameters.group.getBounds().height(), animationParameters.groupHeight = overallValue) : overallValue = animationParameters.height : overallValue = isNumber$3(null == options ? void 0 : options.overall) ? options.overall : 0, {
|
|
25552
25626
|
from: {
|
|
25553
25627
|
y: overallValue,
|
|
25554
25628
|
y1: isNil$1(y1) ? void 0 : overallValue,
|
|
@@ -25621,7 +25695,7 @@
|
|
|
25621
25695
|
y1 = attrs.y1,
|
|
25622
25696
|
height = attrs.height;
|
|
25623
25697
|
let overallValue;
|
|
25624
|
-
return options && "negative" === options.orient ? isNumber$
|
|
25698
|
+
return options && "negative" === options.orient ? isNumber$3(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_c = null !== (_a = animationParameters.groupHeight) && void 0 !== _a ? _a : null === (_b = options.layoutRect) || void 0 === _b ? void 0 : _b.height) && void 0 !== _c ? _c : animationParameters.group.getBounds().height(), animationParameters.groupHeight = overallValue) : overallValue = animationParameters.height : overallValue = isNumber$3(null == options ? void 0 : options.overall) ? options.overall : 0, {
|
|
25625
25699
|
to: {
|
|
25626
25700
|
y: overallValue,
|
|
25627
25701
|
y1: isNil$1(y1) ? void 0 : overallValue,
|
|
@@ -25867,7 +25941,7 @@
|
|
|
25867
25941
|
},
|
|
25868
25942
|
growRadiusInOverall = (graphic, options, animationParameters) => {
|
|
25869
25943
|
const attrs = graphic.getFinalAttribute(),
|
|
25870
|
-
overallValue = isNumber$
|
|
25944
|
+
overallValue = isNumber$3(null == options ? void 0 : options.overall) ? options.overall : 0;
|
|
25871
25945
|
return {
|
|
25872
25946
|
from: {
|
|
25873
25947
|
innerRadius: overallValue,
|
|
@@ -25903,7 +25977,7 @@
|
|
|
25903
25977
|
},
|
|
25904
25978
|
growRadiusOutOverall = (graphic, options, animationParameters) => {
|
|
25905
25979
|
const attrs = graphic.getFinalAttribute(),
|
|
25906
|
-
overallValue = isNumber$
|
|
25980
|
+
overallValue = isNumber$3(null == options ? void 0 : options.overall) ? options.overall : 0;
|
|
25907
25981
|
return {
|
|
25908
25982
|
from: {
|
|
25909
25983
|
innerRadius: null == attrs ? void 0 : attrs.innerRadius,
|
|
@@ -25992,7 +26066,7 @@
|
|
|
25992
26066
|
x1 = attrs.x1,
|
|
25993
26067
|
width = attrs.width;
|
|
25994
26068
|
let overallValue;
|
|
25995
|
-
return options && "negative" === options.orient ? isNumber$
|
|
26069
|
+
return options && "negative" === options.orient ? isNumber$3(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_a = animationParameters.groupWidth) && void 0 !== _a ? _a : animationParameters.group.getBounds().width(), animationParameters.groupWidth = overallValue) : overallValue = animationParameters.width : overallValue = isNumber$3(null == options ? void 0 : options.overall) ? null == options ? void 0 : options.overall : 0, {
|
|
25996
26070
|
from: {
|
|
25997
26071
|
x: overallValue,
|
|
25998
26072
|
x1: isNil$1(x1) ? void 0 : overallValue,
|
|
@@ -26039,7 +26113,7 @@
|
|
|
26039
26113
|
x1 = attrs.x1,
|
|
26040
26114
|
width = attrs.width;
|
|
26041
26115
|
let overallValue;
|
|
26042
|
-
return options && "negative" === options.orient ? isNumber$
|
|
26116
|
+
return options && "negative" === options.orient ? isNumber$3(options.overall) ? overallValue = options.overall : animationParameters.group ? (overallValue = null !== (_a = animationParameters.groupWidth) && void 0 !== _a ? _a : animationParameters.group.getBounds().width(), animationParameters.groupWidth = overallValue) : overallValue = animationParameters.width : overallValue = isNumber$3(null == options ? void 0 : options.overall) ? options.overall : 0, {
|
|
26043
26117
|
to: {
|
|
26044
26118
|
x: overallValue,
|
|
26045
26119
|
x1: isNil$1(x1) ? void 0 : overallValue,
|
|
@@ -30191,7 +30265,7 @@
|
|
|
30191
30265
|
return this._isFixed && !!this._bandwidth;
|
|
30192
30266
|
}
|
|
30193
30267
|
_isBandwidthFixedByUser() {
|
|
30194
|
-
return this._isFixed && this._userBandwidth && isNumber$
|
|
30268
|
+
return this._isFixed && this._userBandwidth && isNumber$3(this._userBandwidth);
|
|
30195
30269
|
}
|
|
30196
30270
|
clone() {
|
|
30197
30271
|
var _a, _b, _c;
|
|
@@ -30455,13 +30529,13 @@
|
|
|
30455
30529
|
}
|
|
30456
30530
|
}
|
|
30457
30531
|
function parseNiceOptions(originalDomain, option) {
|
|
30458
|
-
const hasForceMin = isNumber$
|
|
30459
|
-
hasForceMax = isNumber$
|
|
30532
|
+
const hasForceMin = isNumber$3(option.forceMin),
|
|
30533
|
+
hasForceMax = isNumber$3(option.forceMax);
|
|
30460
30534
|
let niceType = null;
|
|
30461
30535
|
const niceMinMax = [];
|
|
30462
30536
|
let niceDomain = null;
|
|
30463
30537
|
const domainValidator = hasForceMin && hasForceMax ? x => x >= option.forceMin && x <= option.forceMax : hasForceMin ? x => x >= option.forceMin : hasForceMax ? x => x <= option.forceMax : null;
|
|
30464
|
-
return hasForceMin ? niceMinMax[0] = option.forceMin : isNumber$
|
|
30538
|
+
return hasForceMin ? niceMinMax[0] = option.forceMin : isNumber$3(option.min) && option.min <= Math.min(originalDomain[0], originalDomain[originalDomain.length - 1]) && (niceMinMax[0] = option.min), hasForceMax ? niceMinMax[1] = option.forceMax : isNumber$3(option.max) && option.max >= Math.max(originalDomain[0], originalDomain[originalDomain.length - 1]) && (niceMinMax[1] = option.max), isNumber$3(niceMinMax[0]) && isNumber$3(niceMinMax[1]) ? (niceDomain = originalDomain.slice(), niceDomain[0] = niceMinMax[0], niceDomain[niceDomain.length - 1] = niceMinMax[1]) : niceType = isNumber$3(niceMinMax[0]) || isNumber$3(niceMinMax[1]) ? isNumber$3(niceMinMax[0]) ? "max" : "min" : "all", {
|
|
30465
30539
|
niceType: niceType,
|
|
30466
30540
|
niceDomain: niceDomain,
|
|
30467
30541
|
niceMinMax: niceMinMax,
|
|
@@ -31150,8 +31224,8 @@
|
|
|
31150
31224
|
textAlign: "center",
|
|
31151
31225
|
textBaseline: "middle"
|
|
31152
31226
|
}, textStyle), null === (_c = null === (_b = this.stage) || void 0 === _b ? void 0 : _b.getTheme()) || void 0 === _c ? void 0 : _c.text),
|
|
31153
|
-
handlerSizeX = isNumber$
|
|
31154
|
-
handlerSizeY = isNumber$
|
|
31227
|
+
handlerSizeX = isNumber$3(handlerSize) ? handlerSize : handlerSize[0],
|
|
31228
|
+
handlerSizeY = isNumber$3(handlerSize) ? handlerSize : handlerSize[1],
|
|
31155
31229
|
text = graphicCreator.text(Object.assign({
|
|
31156
31230
|
x: isHorizontal ? handlerSizeX / 2 + handlerSpace + maxTextWidth / 2 : 0,
|
|
31157
31231
|
y: isHorizontal ? 0 : handlerSizeY / 2 + handlerSpace + maxTextHeight / 2,
|
|
@@ -36481,6 +36555,8 @@
|
|
|
36481
36555
|
RESIZE_COLUMN_END: 'resize_column_end',
|
|
36482
36556
|
RESIZE_ROW: 'resize_row',
|
|
36483
36557
|
RESIZE_ROW_END: 'resize_row_end',
|
|
36558
|
+
MERGE_CELLS: 'merge_cells',
|
|
36559
|
+
UNMERGE_CELLS: 'unmerge_cells',
|
|
36484
36560
|
CHANGE_HEADER_POSITION_START: 'change_header_position_start',
|
|
36485
36561
|
CHANGE_HEADER_POSITION: 'change_header_position',
|
|
36486
36562
|
CHANGING_HEADER_POSITION: 'changing_header_position',
|
|
@@ -39616,6 +39692,7 @@
|
|
|
39616
39692
|
}
|
|
39617
39693
|
clearFilteredChildren(record) {
|
|
39618
39694
|
record.filteredChildren = undefined;
|
|
39695
|
+
delete record.filteredChildren;
|
|
39619
39696
|
for (let i = 0; i < (record.children?.length ?? 0); i++) {
|
|
39620
39697
|
this.clearFilteredChildren(record.children[i]);
|
|
39621
39698
|
}
|
|
@@ -39823,6 +39900,9 @@
|
|
|
39823
39900
|
if ((this.dataSourceObj?.canChangeOrder)) {
|
|
39824
39901
|
return this.dataSourceObj.canChangeOrder(sourceIndex, targetIndex);
|
|
39825
39902
|
}
|
|
39903
|
+
if (this.lastSortStates?.some(state => state.order === 'asc' || state.order === 'desc')) {
|
|
39904
|
+
return false;
|
|
39905
|
+
}
|
|
39826
39906
|
if (this.hasHierarchyStateExpand) {
|
|
39827
39907
|
let sourceIndexs = this.currentPagerIndexedData[sourceIndex];
|
|
39828
39908
|
let targetIndexs = this.currentPagerIndexedData[targetIndex];
|
|
@@ -40054,10 +40134,10 @@
|
|
|
40054
40134
|
}
|
|
40055
40135
|
function sortRecordIndexs(recordIndexs, sort) {
|
|
40056
40136
|
const result = recordIndexs.sort((a, b) => {
|
|
40057
|
-
if (isNumber$
|
|
40137
|
+
if (isNumber$3(a)) {
|
|
40058
40138
|
a = [a];
|
|
40059
40139
|
}
|
|
40060
|
-
if (isNumber$
|
|
40140
|
+
if (isNumber$3(b)) {
|
|
40061
40141
|
b = [b];
|
|
40062
40142
|
}
|
|
40063
40143
|
const length = Math.max(a.length, b.length);
|
|
@@ -41326,7 +41406,7 @@
|
|
|
41326
41406
|
this._fieldCache = {};
|
|
41327
41407
|
}
|
|
41328
41408
|
getOriginalRecord(index) {
|
|
41329
|
-
if (isNumber$
|
|
41409
|
+
if (isNumber$3(index) && this._recordCache && this._recordCache[index]) {
|
|
41330
41410
|
return this._recordCache[index];
|
|
41331
41411
|
}
|
|
41332
41412
|
return super.getOriginalRecord(index);
|
|
@@ -41344,7 +41424,7 @@
|
|
|
41344
41424
|
return this.beforeChangedRecordsMap?.get(index.toString());
|
|
41345
41425
|
}
|
|
41346
41426
|
}
|
|
41347
|
-
if (isNumber$
|
|
41427
|
+
if (isNumber$3(index) && this._recordCache && this._recordCache[index]) {
|
|
41348
41428
|
return this._recordCache[index];
|
|
41349
41429
|
}
|
|
41350
41430
|
let data;
|
|
@@ -41475,7 +41555,7 @@
|
|
|
41475
41555
|
const recordIndexsMaxToMin = sortRecordIndexs(recordIndexs, -1);
|
|
41476
41556
|
for (let index = 0; index < recordIndexsMaxToMin.length; index++) {
|
|
41477
41557
|
const recordIndex = recordIndexsMaxToMin[index];
|
|
41478
|
-
if (isNumber$
|
|
41558
|
+
if (isNumber$3(recordIndex) && (recordIndex >= this.sourceLength || recordIndex < 0)) {
|
|
41479
41559
|
continue;
|
|
41480
41560
|
}
|
|
41481
41561
|
const originRecordIndex = this.getOriginRecordIndexForGroup(recordIndex);
|
|
@@ -41489,7 +41569,7 @@
|
|
|
41489
41569
|
updateRecordsForGroup(records, recordIndexs) {
|
|
41490
41570
|
for (let index = 0; index < recordIndexs.length; index++) {
|
|
41491
41571
|
const recordIndex = recordIndexs[index];
|
|
41492
|
-
if (isNumber$
|
|
41572
|
+
if (isNumber$3(recordIndex) && (recordIndex >= this.sourceLength || recordIndex < 0)) {
|
|
41493
41573
|
continue;
|
|
41494
41574
|
}
|
|
41495
41575
|
const originRecordIndex = this.getOriginRecordIndexForGroup(recordIndex);
|
|
@@ -41503,7 +41583,7 @@
|
|
|
41503
41583
|
return;
|
|
41504
41584
|
}
|
|
41505
41585
|
this.adjustBeforeChangedRecordsMap(recordIndex, recordArr.length);
|
|
41506
|
-
if (isNumber$
|
|
41586
|
+
if (isNumber$3(recordIndex)) {
|
|
41507
41587
|
this.dataSourceObj.records.splice(recordIndex, 0, ...recordArr);
|
|
41508
41588
|
}
|
|
41509
41589
|
else {
|
|
@@ -41528,11 +41608,11 @@
|
|
|
41528
41608
|
const deletedRecordIndexs = [];
|
|
41529
41609
|
for (let index = 0; index < recordIndexsMaxToMin.length; index++) {
|
|
41530
41610
|
const recordIndex = recordIndexsMaxToMin[index];
|
|
41531
|
-
if (isNumber$
|
|
41611
|
+
if (isNumber$3(recordIndex) && (recordIndex >= this.sourceLength || recordIndex < 0)) {
|
|
41532
41612
|
continue;
|
|
41533
41613
|
}
|
|
41534
41614
|
this.beforeChangedRecordsMap.delete(recordIndex.toString());
|
|
41535
|
-
if (isNumber$
|
|
41615
|
+
if (isNumber$3(recordIndex)) {
|
|
41536
41616
|
this.dataSourceObj.records.splice(recordIndex, 1);
|
|
41537
41617
|
}
|
|
41538
41618
|
else {
|
|
@@ -41552,11 +41632,11 @@
|
|
|
41552
41632
|
for (let index = 0; index < recordIndexs.length; index++) {
|
|
41553
41633
|
const recordIndex = recordIndexs[index];
|
|
41554
41634
|
const record = records[index];
|
|
41555
|
-
if (isNumber$
|
|
41635
|
+
if (isNumber$3(recordIndex) && (recordIndex >= this.sourceLength || recordIndex < 0)) {
|
|
41556
41636
|
continue;
|
|
41557
41637
|
}
|
|
41558
41638
|
this.beforeChangedRecordsMap.delete(recordIndex.toString());
|
|
41559
|
-
if (isNumber$
|
|
41639
|
+
if (isNumber$3(recordIndex)) {
|
|
41560
41640
|
this.dataSourceObj.records.splice(recordIndex, 1, record);
|
|
41561
41641
|
}
|
|
41562
41642
|
else {
|
|
@@ -41572,7 +41652,7 @@
|
|
|
41572
41652
|
adjustBeforeChangedRecordsMap(insertIndex, insertCount, type = 'add') {
|
|
41573
41653
|
if (this.rowHierarchyType === 'tree') {
|
|
41574
41654
|
let insertIndexArr;
|
|
41575
|
-
if (isNumber$
|
|
41655
|
+
if (isNumber$3(insertIndex)) {
|
|
41576
41656
|
insertIndexArr = [insertIndex];
|
|
41577
41657
|
}
|
|
41578
41658
|
else {
|
|
@@ -41622,7 +41702,7 @@
|
|
|
41622
41702
|
let i = 1;
|
|
41623
41703
|
for (; recordIndexLength > parentRecordIndexLength; i++) {
|
|
41624
41704
|
const index = this.dataSource.currentIndexedData[showIndex - i];
|
|
41625
|
-
recordIndexLength = isNumber$
|
|
41705
|
+
recordIndexLength = isNumber$3(index) ? 1 : index.length;
|
|
41626
41706
|
}
|
|
41627
41707
|
return i - 1;
|
|
41628
41708
|
}
|
|
@@ -41845,7 +41925,7 @@
|
|
|
41845
41925
|
}
|
|
41846
41926
|
|
|
41847
41927
|
function getQuadProps(paddingOrigin) {
|
|
41848
|
-
if (isNumber$
|
|
41928
|
+
if (isNumber$3(paddingOrigin) || isString$2(paddingOrigin) || isArray$5(paddingOrigin)) {
|
|
41849
41929
|
let padding = parsePadding(paddingOrigin);
|
|
41850
41930
|
if (typeof padding === 'number' || typeof padding === 'string') {
|
|
41851
41931
|
padding = [padding, padding, padding, padding];
|
|
@@ -42111,7 +42191,7 @@
|
|
|
42111
42191
|
if (isNil$1(v)) {
|
|
42112
42192
|
return false;
|
|
42113
42193
|
}
|
|
42114
|
-
if (isNumber$
|
|
42194
|
+
if (isNumber$3(v)) {
|
|
42115
42195
|
return true;
|
|
42116
42196
|
}
|
|
42117
42197
|
return +v === +v;
|
|
@@ -44449,7 +44529,7 @@
|
|
|
44449
44529
|
? getHierarchyOffset(range.start.col, range.start.row, table)
|
|
44450
44530
|
: getHierarchyOffset(cellGroup.col, cellGroup.row, table);
|
|
44451
44531
|
let _contentOffset = 0;
|
|
44452
|
-
if (isNumber$
|
|
44532
|
+
if (isNumber$3(table.theme._contentOffset)) {
|
|
44453
44533
|
if (textAlign === 'left') {
|
|
44454
44534
|
_contentOffset = table.theme._contentOffset;
|
|
44455
44535
|
}
|
|
@@ -44495,7 +44575,7 @@
|
|
|
44495
44575
|
let textMark;
|
|
44496
44576
|
if (inlineFrontIcons.length === 0 && inlineEndIcons.length === 0) {
|
|
44497
44577
|
let _contentOffset = 0;
|
|
44498
|
-
if (isNumber$
|
|
44578
|
+
if (isNumber$3(table.theme._contentOffset)) {
|
|
44499
44579
|
if (textAlign === 'left') {
|
|
44500
44580
|
_contentOffset = table.theme._contentOffset;
|
|
44501
44581
|
}
|
|
@@ -44682,8 +44762,8 @@
|
|
|
44682
44762
|
iconAttribute.isGif = icon.isGif;
|
|
44683
44763
|
let hierarchyOffset = 0;
|
|
44684
44764
|
if ((!dealWithIconComputeVar || dealWithIconComputeVar?.addedHierarchyOffset === 0) &&
|
|
44685
|
-
isNumber$
|
|
44686
|
-
isNumber$
|
|
44765
|
+
isNumber$3(col) &&
|
|
44766
|
+
isNumber$3(row) &&
|
|
44687
44767
|
table &&
|
|
44688
44768
|
(icon.funcType === IconFuncTypeEnum.collapse ||
|
|
44689
44769
|
icon.funcType === IconFuncTypeEnum.expand ||
|
|
@@ -45656,7 +45736,7 @@
|
|
|
45656
45736
|
}
|
|
45657
45737
|
function updateCell$1(col, row, table, addNew, isShadow, forceFastUpdate) {
|
|
45658
45738
|
const oldCellGroup = table.scenegraph.highPerformanceGetCell(col, row, true);
|
|
45659
|
-
if (oldCellGroup.role !== 'cell' && !addNew) {
|
|
45739
|
+
if (oldCellGroup.role !== 'cell' && oldCellGroup.role !== 'shadow-cell' && !addNew) {
|
|
45660
45740
|
return undefined;
|
|
45661
45741
|
}
|
|
45662
45742
|
const cellLocation = table.getCellLocation(col, row);
|
|
@@ -45879,7 +45959,7 @@
|
|
|
45879
45959
|
const reactGroup = oldCellGroup.getChildByName(CUSTOM_CONTAINER_NAME);
|
|
45880
45960
|
if (reactGroup) {
|
|
45881
45961
|
const { col, row } = reactGroup;
|
|
45882
|
-
if (isNumber$
|
|
45962
|
+
if (isNumber$3(col) && isNumber$3(row)) {
|
|
45883
45963
|
table.reactCustomLayout.removeCustomCell(col, row);
|
|
45884
45964
|
}
|
|
45885
45965
|
}
|
|
@@ -46061,10 +46141,10 @@
|
|
|
46061
46141
|
|
|
46062
46142
|
function isMergeCellGroup(cellGroup) {
|
|
46063
46143
|
if (cellGroup.role === 'cell' &&
|
|
46064
|
-
isNumber$
|
|
46065
|
-
isNumber$
|
|
46066
|
-
isNumber$
|
|
46067
|
-
isNumber$
|
|
46144
|
+
isNumber$3(cellGroup.mergeStartCol) &&
|
|
46145
|
+
isNumber$3(cellGroup.mergeStartRow) &&
|
|
46146
|
+
isNumber$3(cellGroup.mergeEndCol) &&
|
|
46147
|
+
isNumber$3(cellGroup.mergeEndRow)) {
|
|
46068
46148
|
return true;
|
|
46069
46149
|
}
|
|
46070
46150
|
return false;
|
|
@@ -46143,12 +46223,12 @@
|
|
|
46143
46223
|
const cellWidth = table.getColsWidth(col, endCol);
|
|
46144
46224
|
const size = getProp('size', actStyle, col, row, table);
|
|
46145
46225
|
let outerRadius = getProp('outerRadius', actStyle, col, row, table);
|
|
46146
|
-
const circleSize = isNumber$
|
|
46226
|
+
const circleSize = isNumber$3(outerRadius) ? outerRadius * 2 : size;
|
|
46147
46227
|
let maxHeight = 0;
|
|
46148
46228
|
if (autoWrapText) {
|
|
46149
46229
|
const spaceBetweenTextAndIcon = getProp('spaceBetweenTextAndIcon', actStyle, col, row, table);
|
|
46150
46230
|
const maxLineWidth = cellWidth - (padding[1] + padding[3]) - iconWidth - circleSize - spaceBetweenTextAndIcon;
|
|
46151
|
-
if (!isNumber$
|
|
46231
|
+
if (!isNumber$3(outerRadius)) {
|
|
46152
46232
|
outerRadius = Math.round(size / 2);
|
|
46153
46233
|
}
|
|
46154
46234
|
utilRadioMark.setAttributes({
|
|
@@ -46675,7 +46755,7 @@
|
|
|
46675
46755
|
}
|
|
46676
46756
|
else {
|
|
46677
46757
|
const defaultHeight = table.getDefaultRowHeight(row);
|
|
46678
|
-
if (isNumber$
|
|
46758
|
+
if (isNumber$3(defaultHeight)) {
|
|
46679
46759
|
return defaultHeight;
|
|
46680
46760
|
}
|
|
46681
46761
|
}
|
|
@@ -46713,7 +46793,7 @@
|
|
|
46713
46793
|
return maxHeight;
|
|
46714
46794
|
}
|
|
46715
46795
|
const defaultHeight = table.getDefaultRowHeight(row);
|
|
46716
|
-
return isNumber$
|
|
46796
|
+
return isNumber$3(defaultHeight) ? defaultHeight : table.defaultRowHeight;
|
|
46717
46797
|
}
|
|
46718
46798
|
function checkFixedStyleAndNoWrap(table, rowStart) {
|
|
46719
46799
|
const { layoutMap } = table.internalProps;
|
|
@@ -50040,13 +50120,13 @@
|
|
|
50040
50120
|
const chartCellStyle = layout._table._getCellStyle(col, row + 1);
|
|
50041
50121
|
const bodyChartCellPadding = getQuadProps(getProp('padding', chartCellStyle, col, row + 1, layout._table));
|
|
50042
50122
|
const { range, ticks, axisOption, targetTicks, targetRange, index, theme } = axisRange;
|
|
50043
|
-
if (isNumber$
|
|
50123
|
+
if (isNumber$3(axisOption?.min)) {
|
|
50044
50124
|
range.min = axisOption.min;
|
|
50045
50125
|
if (range.min > 0) {
|
|
50046
50126
|
axisOption.zero = false;
|
|
50047
50127
|
}
|
|
50048
50128
|
}
|
|
50049
|
-
if (isNumber$
|
|
50129
|
+
if (isNumber$3(axisOption?.max)) {
|
|
50050
50130
|
range.max = axisOption.max;
|
|
50051
50131
|
if (range.max < 0) {
|
|
50052
50132
|
axisOption.zero = false;
|
|
@@ -50087,7 +50167,7 @@
|
|
|
50087
50167
|
const chartCellStyle = layout._table._getCellStyle(col, row - 1);
|
|
50088
50168
|
const bodyChartCellPadding = getQuadProps(getProp('padding', chartCellStyle, col, row - 1, layout._table));
|
|
50089
50169
|
const { range, ticks, axisOption, index, targetTicks, targetRange, theme } = axisRange;
|
|
50090
|
-
if (isNumber$
|
|
50170
|
+
if (isNumber$3(axisOption?.max)) {
|
|
50091
50171
|
range.max = axisOption.max;
|
|
50092
50172
|
if (range.max < 0) {
|
|
50093
50173
|
axisOption.zero = false;
|
|
@@ -50096,7 +50176,7 @@
|
|
|
50096
50176
|
else if (chartType === 'boxPlot') {
|
|
50097
50177
|
range.max += (range.max - range.min) / 20;
|
|
50098
50178
|
}
|
|
50099
|
-
if (isNumber$
|
|
50179
|
+
if (isNumber$3(axisOption?.min)) {
|
|
50100
50180
|
range.min = axisOption.min;
|
|
50101
50181
|
if (range.min > 0) {
|
|
50102
50182
|
axisOption.zero = false;
|
|
@@ -50188,7 +50268,7 @@
|
|
|
50188
50268
|
const chartCellStyle = layout._table._getCellStyle(col + 1, row);
|
|
50189
50269
|
const bodyChartCellPadding = getQuadProps(getProp('padding', chartCellStyle, col + 1, row, layout._table));
|
|
50190
50270
|
const { range, ticks, axisOption, index, targetTicks, targetRange, theme } = axisRange;
|
|
50191
|
-
if (isNumber$
|
|
50271
|
+
if (isNumber$3(axisOption?.max)) {
|
|
50192
50272
|
range.max = axisOption.max;
|
|
50193
50273
|
if (range.max < 0) {
|
|
50194
50274
|
axisOption.zero = false;
|
|
@@ -50197,7 +50277,7 @@
|
|
|
50197
50277
|
else if (chartType === 'boxPlot') {
|
|
50198
50278
|
range.max += (range.max - range.min) / 20;
|
|
50199
50279
|
}
|
|
50200
|
-
if (isNumber$
|
|
50280
|
+
if (isNumber$3(axisOption?.min)) {
|
|
50201
50281
|
range.min = axisOption.min;
|
|
50202
50282
|
if (range.min > 0) {
|
|
50203
50283
|
axisOption.zero = false;
|
|
@@ -50251,13 +50331,13 @@
|
|
|
50251
50331
|
const chartCellStyle = layout._table._getCellStyle(col - 1, row);
|
|
50252
50332
|
const bodyChartCellPadding = getQuadProps(getProp('padding', chartCellStyle, col - 1, row, layout._table));
|
|
50253
50333
|
const { range, ticks, index, targetTicks, targetRange, theme } = axisRange;
|
|
50254
|
-
if (isNumber$
|
|
50334
|
+
if (isNumber$3(axisOption?.min)) {
|
|
50255
50335
|
range.min = axisOption.min;
|
|
50256
50336
|
if (range.min > 0) {
|
|
50257
50337
|
axisOption.zero = false;
|
|
50258
50338
|
}
|
|
50259
50339
|
}
|
|
50260
|
-
if (isNumber$
|
|
50340
|
+
if (isNumber$3(axisOption?.max)) {
|
|
50261
50341
|
range.max = axisOption.max;
|
|
50262
50342
|
if (range.max < 0) {
|
|
50263
50343
|
axisOption.zero = false;
|
|
@@ -50339,7 +50419,7 @@
|
|
|
50339
50419
|
});
|
|
50340
50420
|
if (axisOption) {
|
|
50341
50421
|
if (axisOption.zero) {
|
|
50342
|
-
if (isNumber$
|
|
50422
|
+
if (isNumber$3(axisOption.range?.min)) {
|
|
50343
50423
|
axisOption.zero = false;
|
|
50344
50424
|
}
|
|
50345
50425
|
}
|
|
@@ -50377,7 +50457,7 @@
|
|
|
50377
50457
|
return axisOption.orient === orient;
|
|
50378
50458
|
}) ?? {};
|
|
50379
50459
|
if (axisOption.zero) {
|
|
50380
|
-
if (isNumber$
|
|
50460
|
+
if (isNumber$3(axisOption.range?.min)) {
|
|
50381
50461
|
axisOption.zero = false;
|
|
50382
50462
|
}
|
|
50383
50463
|
}
|
|
@@ -50675,10 +50755,10 @@
|
|
|
50675
50755
|
range.max = axisRange[1];
|
|
50676
50756
|
}
|
|
50677
50757
|
const ticks = selfTicks;
|
|
50678
|
-
if (isNumber$
|
|
50758
|
+
if (isNumber$3(axisOption?.min)) {
|
|
50679
50759
|
range.min = axisOption.min;
|
|
50680
50760
|
}
|
|
50681
|
-
if (isNumber$
|
|
50761
|
+
if (isNumber$3(axisOption?.max)) {
|
|
50682
50762
|
range.max = axisOption.max;
|
|
50683
50763
|
}
|
|
50684
50764
|
return {
|
|
@@ -53293,7 +53373,7 @@
|
|
|
53293
53373
|
else if (cellType === 'radio') {
|
|
53294
53374
|
const size = getProp('size', actStyle, col, row, table);
|
|
53295
53375
|
const outerRadius = getProp('outerRadius', actStyle, col, row, table);
|
|
53296
|
-
const circleSize = isNumber$
|
|
53376
|
+
const circleSize = isNumber$3(outerRadius) ? outerRadius * 2 : size;
|
|
53297
53377
|
const spaceBetweenTextAndIcon = getProp('spaceBetweenTextAndIcon', actStyle, col, row, table);
|
|
53298
53378
|
if (isArray$5(cellValue)) {
|
|
53299
53379
|
const define = table.getBodyColumnDefine(col, row);
|
|
@@ -53782,7 +53862,7 @@
|
|
|
53782
53862
|
columnGroup.role = 'column';
|
|
53783
53863
|
columnGroup.col = i;
|
|
53784
53864
|
containerGroup.addChild(columnGroup);
|
|
53785
|
-
const { width: default2Width, height: default2Height } = createComplexColumn(columnGroup, col, colWidth, rowStart, rowEnd, table.scenegraph.mergeMap, cellLocation === 'columnHeader' && isNumber$
|
|
53865
|
+
const { width: default2Width, height: default2Height } = createComplexColumn(columnGroup, col, colWidth, rowStart, rowEnd, table.scenegraph.mergeMap, cellLocation === 'columnHeader' && isNumber$3(defaultHeaderRowHeight)
|
|
53786
53866
|
? defaultHeaderRowHeight
|
|
53787
53867
|
: defaultRowHeight, table, rowLimit);
|
|
53788
53868
|
x += default2Width;
|
|
@@ -54738,10 +54818,10 @@
|
|
|
54738
54818
|
}
|
|
54739
54819
|
}
|
|
54740
54820
|
function adjustCellContentVerticalLayout(cellGroup, minTop, maxTop, changedCells, textStickBaseOnAlign, table) {
|
|
54741
|
-
if (isNumber$
|
|
54742
|
-
isNumber$
|
|
54743
|
-
isNumber$
|
|
54744
|
-
isNumber$
|
|
54821
|
+
if (isNumber$3(cellGroup.mergeStartCol) &&
|
|
54822
|
+
isNumber$3(cellGroup.mergeStartRow) &&
|
|
54823
|
+
isNumber$3(cellGroup.mergeEndCol) &&
|
|
54824
|
+
isNumber$3(cellGroup.mergeEndRow)) {
|
|
54745
54825
|
const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);
|
|
54746
54826
|
for (let col = colStart; col <= colEnd; col++) {
|
|
54747
54827
|
for (let row = rowStart; row <= rowEnd; row++) {
|
|
@@ -54823,10 +54903,10 @@
|
|
|
54823
54903
|
}
|
|
54824
54904
|
}
|
|
54825
54905
|
function adjustCellContentHorizontalLayout(cellGroup, minLeft, maxLeft, changedCells, textStickBaseOnAlign, table) {
|
|
54826
|
-
if (isNumber$
|
|
54827
|
-
isNumber$
|
|
54828
|
-
isNumber$
|
|
54829
|
-
isNumber$
|
|
54906
|
+
if (isNumber$3(cellGroup.mergeStartCol) &&
|
|
54907
|
+
isNumber$3(cellGroup.mergeStartRow) &&
|
|
54908
|
+
isNumber$3(cellGroup.mergeEndCol) &&
|
|
54909
|
+
isNumber$3(cellGroup.mergeEndRow)) {
|
|
54830
54910
|
const { colStart, colEnd, rowStart, rowEnd } = getCellMergeRange(cellGroup, table.scenegraph);
|
|
54831
54911
|
for (let col = colStart; col <= colEnd; col++) {
|
|
54832
54912
|
for (let row = rowStart; row <= rowEnd; row++) {
|
|
@@ -55172,7 +55252,7 @@
|
|
|
55172
55252
|
this.colEnd = endCol;
|
|
55173
55253
|
for (let row = 0; row < this.table.rowCount; row++) {
|
|
55174
55254
|
const cellGroup = this.highPerformanceGetCell(this.currentCol, row);
|
|
55175
|
-
if (cellGroup.role === 'cell' && isNumber$
|
|
55255
|
+
if (cellGroup.role === 'cell' && isNumber$3(cellGroup.mergeStartCol) && cellGroup.mergeStartCol > this.currentCol) {
|
|
55176
55256
|
this.table.scenegraph.updateCellContent(cellGroup.col, cellGroup.row);
|
|
55177
55257
|
}
|
|
55178
55258
|
}
|
|
@@ -56303,7 +56383,7 @@
|
|
|
56303
56383
|
const pos = _getUpdateRowIndex(beforeRow, afterRow, scene);
|
|
56304
56384
|
rowUpdatePos = isValid$1(rowUpdatePos) ? (isValid$1(pos) ? Math.min(rowUpdatePos, pos) : rowUpdatePos) : pos;
|
|
56305
56385
|
}
|
|
56306
|
-
if (isNumber$
|
|
56386
|
+
if (isNumber$3(updateAfter)) {
|
|
56307
56387
|
for (let col = 0; col < Math.max(table.colCount, table.internalProps._oldColCount ?? table.colCount); col++) {
|
|
56308
56388
|
for (let row = updateAfter; row < Math.max(table.rowCount, table.internalProps._oldRowCount ?? table.rowCount); row++) {
|
|
56309
56389
|
const cellGroup = scene.highPerformanceGetCell(col, row, true);
|
|
@@ -56316,9 +56396,9 @@
|
|
|
56316
56396
|
: rowUpdatePos
|
|
56317
56397
|
: updateAfter;
|
|
56318
56398
|
}
|
|
56319
|
-
isNumber$
|
|
56399
|
+
isNumber$3(rowUpdatePos) && (scene.proxy.rowUpdatePos = Math.min(scene.proxy.rowUpdatePos, rowUpdatePos));
|
|
56320
56400
|
if (addRows.length) {
|
|
56321
|
-
if (!isNumber$
|
|
56401
|
+
if (!isNumber$3(updateAfter)) {
|
|
56322
56402
|
const minRow = Math.min(...addRows);
|
|
56323
56403
|
scene.proxy.rowUpdatePos = Math.min(minRow, scene.proxy.rowUpdatePos);
|
|
56324
56404
|
}
|
|
@@ -57698,7 +57778,7 @@
|
|
|
57698
57778
|
const colHeaderGroup = createContainerGroup(0, 0, !scene.table.internalProps.enableTreeStickCell);
|
|
57699
57779
|
colHeaderGroup.role = 'col-header';
|
|
57700
57780
|
scene.colHeaderGroup = colHeaderGroup;
|
|
57701
|
-
const cornerHeaderGroup = createContainerGroup(0, 0, !scene.table.
|
|
57781
|
+
const cornerHeaderGroup = createContainerGroup(0, 0, !scene.table.internalProps.enableTreeStickCell);
|
|
57702
57782
|
cornerHeaderGroup.role = 'corner-header';
|
|
57703
57783
|
scene.cornerHeaderGroup = cornerHeaderGroup;
|
|
57704
57784
|
const rowHeaderGroup = createContainerGroup(0, 0, true);
|
|
@@ -58106,7 +58186,7 @@
|
|
|
58106
58186
|
}
|
|
58107
58187
|
}
|
|
58108
58188
|
});
|
|
58109
|
-
if (isNumber$
|
|
58189
|
+
if (isNumber$3(updateAfter)) {
|
|
58110
58190
|
for (let col = updateAfter; col < Math.max(table.colCount, table.internalProps._oldColCount ?? table.colCount); col++) {
|
|
58111
58191
|
for (let row = 0; row < Math.max(table.rowCount, table.internalProps._oldRowCount ?? table.rowCount); row++) {
|
|
58112
58192
|
const cellGroup = scene.highPerformanceGetCell(col, row, true);
|
|
@@ -58116,7 +58196,7 @@
|
|
|
58116
58196
|
scene.proxy.colUpdatePos = updateAfter;
|
|
58117
58197
|
}
|
|
58118
58198
|
if (addCols.length) {
|
|
58119
|
-
if (!isNumber$
|
|
58199
|
+
if (!isNumber$3(updateAfter)) {
|
|
58120
58200
|
const minCol = Math.min(...addCols);
|
|
58121
58201
|
scene.proxy.colUpdatePos = minCol;
|
|
58122
58202
|
}
|
|
@@ -61647,7 +61727,7 @@
|
|
|
61647
61727
|
if (recordIndex >= 0) {
|
|
61648
61728
|
const dataIndex = state.table.dataSource.getIndexKey(recordIndex);
|
|
61649
61729
|
if (type === 'column') {
|
|
61650
|
-
if (isNumber$
|
|
61730
|
+
if (isNumber$3(indexInCell)) {
|
|
61651
61731
|
state.radioState[field] = {};
|
|
61652
61732
|
state.radioState[field][dataIndex] = indexInCell;
|
|
61653
61733
|
}
|
|
@@ -61659,7 +61739,7 @@
|
|
|
61659
61739
|
if (!state.radioState[field]) {
|
|
61660
61740
|
state.radioState[field] = {};
|
|
61661
61741
|
}
|
|
61662
|
-
if (isNumber$
|
|
61742
|
+
if (isNumber$3(indexInCell)) {
|
|
61663
61743
|
state.radioState[field][dataIndex] = indexInCell;
|
|
61664
61744
|
}
|
|
61665
61745
|
else {
|
|
@@ -61675,14 +61755,14 @@
|
|
|
61675
61755
|
if (isValid$1(field) && cellType === 'radio') {
|
|
61676
61756
|
const dataIndex = table.dataSource.getIndexKey(table.getRecordShowIndexByCell(col, row));
|
|
61677
61757
|
const columnState = table.stateManager.radioState?.[field];
|
|
61678
|
-
if (isNumber$
|
|
61758
|
+
if (isNumber$3(columnState)) {
|
|
61679
61759
|
if (columnState === dataIndex) {
|
|
61680
61760
|
return true;
|
|
61681
61761
|
}
|
|
61682
61762
|
}
|
|
61683
61763
|
else if (isObject$7(columnState)) {
|
|
61684
61764
|
const cellState = columnState[dataIndex];
|
|
61685
|
-
if (isNumber$
|
|
61765
|
+
if (isNumber$3(cellState)) {
|
|
61686
61766
|
return cellState;
|
|
61687
61767
|
}
|
|
61688
61768
|
}
|
|
@@ -61695,7 +61775,7 @@
|
|
|
61695
61775
|
const dataIndex = state.table.dataSource.getIndexKey(recordIndex);
|
|
61696
61776
|
if (type === 'column') {
|
|
61697
61777
|
if (!isValid$1(state.radioState[field]) && isChecked) {
|
|
61698
|
-
if (isNumber$
|
|
61778
|
+
if (isNumber$3(indexInCell)) {
|
|
61699
61779
|
state.radioState[field] = {};
|
|
61700
61780
|
state.radioState[field][dataIndex] = indexInCell;
|
|
61701
61781
|
}
|
|
@@ -61704,23 +61784,23 @@
|
|
|
61704
61784
|
}
|
|
61705
61785
|
return true;
|
|
61706
61786
|
}
|
|
61707
|
-
else if (isNumber$
|
|
61787
|
+
else if (isNumber$3(state.radioState[field]) && !isNumber$3(indexInCell)) {
|
|
61708
61788
|
return state.radioState[field] === dataIndex;
|
|
61709
61789
|
}
|
|
61710
|
-
else if (isNumber$
|
|
61790
|
+
else if (isNumber$3(state.radioState[field]) && isNumber$3(indexInCell)) {
|
|
61711
61791
|
return false;
|
|
61712
61792
|
}
|
|
61713
|
-
else if (isObject$7(state.radioState[field]) && !isNumber$
|
|
61793
|
+
else if (isObject$7(state.radioState[field]) && !isNumber$3(indexInCell)) {
|
|
61714
61794
|
return false;
|
|
61715
61795
|
}
|
|
61716
|
-
else if (isObject$7(state.radioState[field]) && isNumber$
|
|
61796
|
+
else if (isObject$7(state.radioState[field]) && isNumber$3(indexInCell)) {
|
|
61717
61797
|
return state.radioState[field][dataIndex] === indexInCell;
|
|
61718
61798
|
}
|
|
61719
61799
|
}
|
|
61720
61800
|
else if (type === 'cell') {
|
|
61721
61801
|
if (!isValid$1(state.radioState[field]) && isChecked) {
|
|
61722
61802
|
state.radioState[field] = {};
|
|
61723
|
-
if (isNumber$
|
|
61803
|
+
if (isNumber$3(indexInCell)) {
|
|
61724
61804
|
state.radioState[field][dataIndex] = indexInCell;
|
|
61725
61805
|
}
|
|
61726
61806
|
else {
|
|
@@ -61729,7 +61809,7 @@
|
|
|
61729
61809
|
return true;
|
|
61730
61810
|
}
|
|
61731
61811
|
else if (!isValid$1(state.radioState[field]?.[dataIndex]) && isChecked) {
|
|
61732
|
-
if (isNumber$
|
|
61812
|
+
if (isNumber$3(indexInCell)) {
|
|
61733
61813
|
state.radioState[field][dataIndex] = indexInCell;
|
|
61734
61814
|
}
|
|
61735
61815
|
else {
|
|
@@ -61737,16 +61817,16 @@
|
|
|
61737
61817
|
}
|
|
61738
61818
|
return true;
|
|
61739
61819
|
}
|
|
61740
|
-
else if (isBoolean$2(state.radioState[field]?.[dataIndex]) && !isNumber$
|
|
61820
|
+
else if (isBoolean$2(state.radioState[field]?.[dataIndex]) && !isNumber$3(indexInCell)) {
|
|
61741
61821
|
return state.radioState[field][dataIndex];
|
|
61742
61822
|
}
|
|
61743
|
-
else if (isBoolean$2(state.radioState[field]?.[dataIndex]) && isNumber$
|
|
61823
|
+
else if (isBoolean$2(state.radioState[field]?.[dataIndex]) && isNumber$3(indexInCell)) {
|
|
61744
61824
|
return false;
|
|
61745
61825
|
}
|
|
61746
|
-
else if (isNumber$
|
|
61826
|
+
else if (isNumber$3(state.radioState[field]?.[dataIndex]) && !isNumber$3(indexInCell)) {
|
|
61747
61827
|
return false;
|
|
61748
61828
|
}
|
|
61749
|
-
else if (isNumber$
|
|
61829
|
+
else if (isNumber$3(state.radioState[field]?.[dataIndex]) && isNumber$3(indexInCell)) {
|
|
61750
61830
|
return state.radioState[field][dataIndex] === indexInCell;
|
|
61751
61831
|
}
|
|
61752
61832
|
}
|
|
@@ -61758,7 +61838,7 @@
|
|
|
61758
61838
|
if (!cellGoup) {
|
|
61759
61839
|
return;
|
|
61760
61840
|
}
|
|
61761
|
-
if (isNumber$
|
|
61841
|
+
if (isNumber$3(index)) {
|
|
61762
61842
|
const radio = cellGoup.getChildAt(index);
|
|
61763
61843
|
radio?._handlePointerUp();
|
|
61764
61844
|
}
|
|
@@ -62054,7 +62134,7 @@
|
|
|
62054
62134
|
source = table.isPivotTable() ? undefined : table.getRecordIndexByCell(0, sourceIndex);
|
|
62055
62135
|
target = table.isPivotTable() ? undefined : table.getRecordIndexByCell(0, targetIndex);
|
|
62056
62136
|
}
|
|
62057
|
-
if (isNumber$
|
|
62137
|
+
if (isNumber$3(source) && isNumber$3(target)) {
|
|
62058
62138
|
sourceIndex = source;
|
|
62059
62139
|
targetIndex = target;
|
|
62060
62140
|
if (sourceIndex > targetIndex) {
|
|
@@ -62701,7 +62781,7 @@
|
|
|
62701
62781
|
function flatten(cols, parentStartIndex = 0) {
|
|
62702
62782
|
cols.forEach((col) => {
|
|
62703
62783
|
const startIndex = col.startInTotal
|
|
62704
|
-
? col.startInTotal + state.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount ?? 0
|
|
62784
|
+
? col.startInTotal + (state.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount ?? 0)
|
|
62705
62785
|
: parentStartIndex;
|
|
62706
62786
|
if (col.columns) {
|
|
62707
62787
|
flatten(col.columns, startIndex);
|
|
@@ -62724,7 +62804,7 @@
|
|
|
62724
62804
|
prev.push({
|
|
62725
62805
|
field: item.field,
|
|
62726
62806
|
order: item.order,
|
|
62727
|
-
row: column?.startInTotal + this.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount ?? 0,
|
|
62807
|
+
row: (column?.startInTotal ?? 0) + (this.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount ?? 0),
|
|
62728
62808
|
col: column?.level
|
|
62729
62809
|
});
|
|
62730
62810
|
}
|
|
@@ -62732,7 +62812,7 @@
|
|
|
62732
62812
|
prev.push({
|
|
62733
62813
|
field: item.field,
|
|
62734
62814
|
order: item.order,
|
|
62735
|
-
col: column?.startInTotal + this.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount ?? 0,
|
|
62815
|
+
col: (column?.startInTotal ?? 0) + (this.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount ?? 0),
|
|
62736
62816
|
row: column?.level
|
|
62737
62817
|
});
|
|
62738
62818
|
}
|
|
@@ -63537,11 +63617,12 @@
|
|
|
63537
63617
|
}
|
|
63538
63618
|
updateSortState(sortState) {
|
|
63539
63619
|
sortState = Array.isArray(sortState) ? sortState : [sortState];
|
|
63620
|
+
const isSame = sortState.length === this.sort.length &&
|
|
63621
|
+
sortState.every((item, index) => item?.field === this.sort[index]?.field && item?.order === this.sort[index]?.order);
|
|
63622
|
+
if (isSame) {
|
|
63623
|
+
return;
|
|
63624
|
+
}
|
|
63540
63625
|
for (let index = 0; index < sortState.length; index++) {
|
|
63541
|
-
if (sortState[index].field === this.sort[index]?.field &&
|
|
63542
|
-
sortState[sortState.length - 1].order === this.sort[index]?.order) {
|
|
63543
|
-
return;
|
|
63544
|
-
}
|
|
63545
63626
|
const oldSortCol = this.table.internalProps.multipleSort ? null : this.sort[index]?.col || null;
|
|
63546
63627
|
const oldSortRow = this.table.internalProps.multipleSort ? null : this.sort[index]?.row || null;
|
|
63547
63628
|
this.sort[index]?.order === 'asc'
|
|
@@ -63585,7 +63666,7 @@
|
|
|
63585
63666
|
row: null,
|
|
63586
63667
|
iconMark: null,
|
|
63587
63668
|
order: null,
|
|
63588
|
-
oldSortCol: column.startInTotal + this.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount ?? 0,
|
|
63669
|
+
oldSortCol: (column.startInTotal ?? 0) + (this.table.internalProps.layoutMap.leftRowSeriesNumberColumnCount ?? 0),
|
|
63589
63670
|
oldSortRow: column.level,
|
|
63590
63671
|
oldIconMark: null
|
|
63591
63672
|
});
|
|
@@ -65878,7 +65959,7 @@
|
|
|
65878
65959
|
const indexedData = table.dataSource.currentPagerIndexedData;
|
|
65879
65960
|
const titleShowIndex = table.getRecordShowIndexByCell(col, row);
|
|
65880
65961
|
let titleIndex = indexedData[titleShowIndex];
|
|
65881
|
-
if (isNumber$
|
|
65962
|
+
if (isNumber$3(titleIndex)) {
|
|
65882
65963
|
titleIndex = [titleIndex];
|
|
65883
65964
|
}
|
|
65884
65965
|
if (record.vtableMerge || record.children?.length) {
|
|
@@ -65929,7 +66010,7 @@
|
|
|
65929
66010
|
const indexedData = table.dataSource.currentPagerIndexedData;
|
|
65930
66011
|
const titleShowIndex = table.getRecordShowIndexByCell(col, row);
|
|
65931
66012
|
let titleIndex = indexedData[titleShowIndex];
|
|
65932
|
-
if (isNumber$
|
|
66013
|
+
if (isNumber$3(titleIndex)) {
|
|
65933
66014
|
titleIndex = [titleIndex];
|
|
65934
66015
|
}
|
|
65935
66016
|
if (record.vtableMerge || record.children?.length) {
|
|
@@ -65978,7 +66059,7 @@
|
|
|
65978
66059
|
let i = titleShowIndex - 1;
|
|
65979
66060
|
while (parentLength > 0 && i >= 0) {
|
|
65980
66061
|
if ((isArray$5(indexedData[i]) && indexedData[i]?.length === parentLength) ||
|
|
65981
|
-
(parentLength === 1 && isNumber$
|
|
66062
|
+
(parentLength === 1 && isNumber$3(indexedData[i]))) {
|
|
65982
66063
|
const row = table.columnHeaderLevelCount + i;
|
|
65983
66064
|
updateParentCheckboxState(col, row, indexedData[i], table, field);
|
|
65984
66065
|
parentLength--;
|
|
@@ -70864,10 +70945,16 @@
|
|
|
70864
70945
|
if (this.from.x !== this.to.x) {
|
|
70865
70946
|
const x = end ? this.to.x : this.from.x + Math.floor((this.to.x - this.from.x) * ratio);
|
|
70866
70947
|
this.params.table.scrollLeft = x;
|
|
70948
|
+
if (ratio === 1 && this.to.targetCol !== -1) {
|
|
70949
|
+
this.params.table.scrollToCol(this.to.targetCol, false);
|
|
70950
|
+
}
|
|
70867
70951
|
}
|
|
70868
70952
|
if (this.from.y !== this.to.y) {
|
|
70869
70953
|
const y = end ? this.to.y : this.from.y + Math.floor((this.to.y - this.from.y) * ratio);
|
|
70870
70954
|
this.params.table.scrollTop = y;
|
|
70955
|
+
if (ratio === 1 && this.to.targetRow !== -1) {
|
|
70956
|
+
this.params.table.scrollToRow(this.to.targetRow, false);
|
|
70957
|
+
}
|
|
70871
70958
|
}
|
|
70872
70959
|
}
|
|
70873
70960
|
}
|
|
@@ -70896,11 +70983,11 @@
|
|
|
70896
70983
|
let rowInt = row;
|
|
70897
70984
|
let colDecimal;
|
|
70898
70985
|
let rowDecimal;
|
|
70899
|
-
if (isNumber$
|
|
70986
|
+
if (isNumber$3(col) && !isInteger(col)) {
|
|
70900
70987
|
colInt = Math.floor(col);
|
|
70901
70988
|
colDecimal = col - colInt;
|
|
70902
70989
|
}
|
|
70903
|
-
if (isNumber$
|
|
70990
|
+
if (isNumber$3(row) && !isInteger(row)) {
|
|
70904
70991
|
rowInt = Math.floor(row);
|
|
70905
70992
|
rowDecimal = row - rowInt;
|
|
70906
70993
|
}
|
|
@@ -70913,8 +71000,10 @@
|
|
|
70913
71000
|
top += rowDecimal * cellRect.height;
|
|
70914
71001
|
}
|
|
70915
71002
|
const to = {
|
|
70916
|
-
x: isNumber$
|
|
70917
|
-
y: isNumber$
|
|
71003
|
+
x: isNumber$3(col) ? left - this.table.getFrozenColsWidth() : this.table.scrollLeft,
|
|
71004
|
+
y: isNumber$3(row) ? top - this.table.getFrozenRowsHeight() : this.table.scrollTop,
|
|
71005
|
+
targetRow: rowInt ?? -1,
|
|
71006
|
+
targetCol: colInt ?? -1
|
|
70918
71007
|
};
|
|
70919
71008
|
const duration = !isBoolean$2(animationOption) ? animationOption?.duration ?? 3000 : animationOption ? 3000 : 0;
|
|
70920
71009
|
const easing = !isBoolean$2(animationOption) ? animationOption?.easing ?? 'linear' : animationOption ? 'linear' : '';
|
|
@@ -71014,6 +71103,7 @@
|
|
|
71014
71103
|
class BaseTable extends EventTarget$1 {
|
|
71015
71104
|
internalProps;
|
|
71016
71105
|
showFrozenIcon = true;
|
|
71106
|
+
_scrollToRowCorrectTimer = null;
|
|
71017
71107
|
padding;
|
|
71018
71108
|
globalDropDownMenu;
|
|
71019
71109
|
tableNoFrameWidth;
|
|
@@ -71048,7 +71138,7 @@
|
|
|
71048
71138
|
return TABLE_EVENT_TYPE;
|
|
71049
71139
|
}
|
|
71050
71140
|
options;
|
|
71051
|
-
version = "1.
|
|
71141
|
+
version = "1.24.0-alpha.0";
|
|
71052
71142
|
pagination;
|
|
71053
71143
|
id = `VTable${Date.now()}`;
|
|
71054
71144
|
headerStyleCache;
|
|
@@ -71135,8 +71225,8 @@
|
|
|
71135
71225
|
this.tableNoFrameHeight = 0;
|
|
71136
71226
|
this.contentOffsetX = translateX ?? 0;
|
|
71137
71227
|
this.contentOffsetY = translateY ?? 0;
|
|
71138
|
-
this.canvasWidth = isNumber$
|
|
71139
|
-
this.canvasHeight = isNumber$
|
|
71228
|
+
this.canvasWidth = isNumber$3(canvasWidth) ? canvasWidth : undefined;
|
|
71229
|
+
this.canvasHeight = isNumber$3(canvasHeight) ? canvasHeight : undefined;
|
|
71140
71230
|
this.columnWidthComputeMode = options.columnWidthComputeMode ?? 'normal';
|
|
71141
71231
|
const internalProps = (this.internalProps = {});
|
|
71142
71232
|
showFrozenIcon !== undefined && (this.showFrozenIcon = showFrozenIcon);
|
|
@@ -71163,7 +71253,7 @@
|
|
|
71163
71253
|
}
|
|
71164
71254
|
}
|
|
71165
71255
|
internalProps.handler = new EventHandler();
|
|
71166
|
-
if (isNumber$
|
|
71256
|
+
if (isNumber$3(this.options.resizeTime)) {
|
|
71167
71257
|
internalProps.handler.resizeTime = this.options.resizeTime;
|
|
71168
71258
|
}
|
|
71169
71259
|
internalProps.pixelRatio = pixelRatio;
|
|
@@ -71509,7 +71599,7 @@
|
|
|
71509
71599
|
this.scenegraph.dealWidthBottomFrozen(bottomFrozenRowCount);
|
|
71510
71600
|
}
|
|
71511
71601
|
get defaultRowHeight() {
|
|
71512
|
-
if (isNumber$
|
|
71602
|
+
if (isNumber$3(this.internalProps.defaultRowHeight)) {
|
|
71513
71603
|
return this.internalProps.defaultRowHeight;
|
|
71514
71604
|
}
|
|
71515
71605
|
return 40;
|
|
@@ -71948,7 +72038,7 @@
|
|
|
71948
72038
|
return this.rowHeightsMap.get(row);
|
|
71949
72039
|
}
|
|
71950
72040
|
const defaultHeight = this.getDefaultRowHeight(row);
|
|
71951
|
-
if (isNumber$
|
|
72041
|
+
if (isNumber$3(defaultHeight)) {
|
|
71952
72042
|
return defaultHeight;
|
|
71953
72043
|
}
|
|
71954
72044
|
return this.defaultRowHeight;
|
|
@@ -72639,6 +72729,12 @@
|
|
|
72639
72729
|
dispose() {
|
|
72640
72730
|
this.release();
|
|
72641
72731
|
}
|
|
72732
|
+
clearCorrectTimer() {
|
|
72733
|
+
if (this._scrollToRowCorrectTimer) {
|
|
72734
|
+
clearTimeout(this._scrollToRowCorrectTimer);
|
|
72735
|
+
this._scrollToRowCorrectTimer = null;
|
|
72736
|
+
}
|
|
72737
|
+
}
|
|
72642
72738
|
release() {
|
|
72643
72739
|
this.scenegraph?.component?.vScrollBar?.release();
|
|
72644
72740
|
this.scenegraph?.component?.hScrollBar?.release();
|
|
@@ -72649,6 +72745,7 @@
|
|
|
72649
72745
|
if (this.isReleased) {
|
|
72650
72746
|
return;
|
|
72651
72747
|
}
|
|
72748
|
+
this.clearCorrectTimer();
|
|
72652
72749
|
internalProps.tooltipHandler?.release?.();
|
|
72653
72750
|
internalProps.menuHandler?.release?.();
|
|
72654
72751
|
super.release?.();
|
|
@@ -72738,8 +72835,8 @@
|
|
|
72738
72835
|
this.customRender = customRender;
|
|
72739
72836
|
this.contentOffsetX = translateX ?? 0;
|
|
72740
72837
|
this.contentOffsetY = translateY ?? 0;
|
|
72741
|
-
this.canvasWidth = isNumber$
|
|
72742
|
-
this.canvasHeight = isNumber$
|
|
72838
|
+
this.canvasWidth = isNumber$3(canvasWidth) ? canvasWidth : undefined;
|
|
72839
|
+
this.canvasHeight = isNumber$3(canvasHeight) ? canvasHeight : undefined;
|
|
72743
72840
|
const internalProps = this.internalProps;
|
|
72744
72841
|
if (Env.mode !== 'node' && !options.canvas) {
|
|
72745
72842
|
updateRootElementPadding(internalProps.element, this.padding);
|
|
@@ -73112,6 +73209,86 @@
|
|
|
73112
73209
|
this.stateManager.updateSelectPos(this.colCount - 1, rowIndex, false, isCtrl, false, makeSelectCellVisible, true);
|
|
73113
73210
|
this.stateManager.select.selecting = false;
|
|
73114
73211
|
}
|
|
73212
|
+
changeHeaderPosition(args) {
|
|
73213
|
+
if (!('canMoveHeaderPosition' in this.internalProps.layoutMap) ||
|
|
73214
|
+
this.options.customConfig?.notUpdateInColumnRowMove === true) {
|
|
73215
|
+
return false;
|
|
73216
|
+
}
|
|
73217
|
+
const prevMoving = this.stateManager.columnMove.movingColumnOrRow;
|
|
73218
|
+
this.stateManager.columnMove.movingColumnOrRow = args.movingColumnOrRow;
|
|
73219
|
+
try {
|
|
73220
|
+
if (this.internalProps.layoutMap.canMoveHeaderPosition?.(args.source, args.target) === false) {
|
|
73221
|
+
return false;
|
|
73222
|
+
}
|
|
73223
|
+
const oldSourceMergeInfo = this.getCellRange(args.source.col, args.source.row);
|
|
73224
|
+
const oldTargetMergeInfo = this.getCellRange(args.target.col, args.target.row);
|
|
73225
|
+
const moveContext = this._moveHeaderPosition(args.source, args.target);
|
|
73226
|
+
if (!moveContext || moveContext.targetIndex === moveContext.sourceIndex) {
|
|
73227
|
+
return false;
|
|
73228
|
+
}
|
|
73229
|
+
this.internalProps.useOneRowHeightFillAll = false;
|
|
73230
|
+
this.internalProps.layoutMap.clearCellRangeMap();
|
|
73231
|
+
const sourceMergeInfo = this.getCellRange(args.source.col, args.source.row);
|
|
73232
|
+
const targetMergeInfo = this.getCellRange(args.target.col, args.target.row);
|
|
73233
|
+
const colMin = Math.min(sourceMergeInfo.start.col, targetMergeInfo.start.col, oldSourceMergeInfo.start.col, oldTargetMergeInfo.start.col);
|
|
73234
|
+
const colMax = Math.max(sourceMergeInfo.end.col, targetMergeInfo.end.col, oldSourceMergeInfo.end.col, oldTargetMergeInfo.end.col);
|
|
73235
|
+
const rowMin = Math.min(sourceMergeInfo.start.row, targetMergeInfo.start.row, oldSourceMergeInfo.start.row, oldTargetMergeInfo.start.row);
|
|
73236
|
+
let rowMax = Math.max(sourceMergeInfo.end.row, targetMergeInfo.end.row, oldSourceMergeInfo.end.row, oldTargetMergeInfo.end.row);
|
|
73237
|
+
if (moveContext.moveType === 'row' &&
|
|
73238
|
+
this.internalProps.layoutMap.rowHierarchyType === 'tree') {
|
|
73239
|
+
if (moveContext.targetIndex > moveContext.sourceIndex) {
|
|
73240
|
+
rowMax = rowMax + moveContext.targetSize - 1;
|
|
73241
|
+
}
|
|
73242
|
+
else {
|
|
73243
|
+
rowMax = rowMax + moveContext.sourceSize - 1;
|
|
73244
|
+
}
|
|
73245
|
+
}
|
|
73246
|
+
if (!this.transpose &&
|
|
73247
|
+
(this.isSeriesNumberInBody(args.source.col, args.source.row) || args.movingColumnOrRow === 'row')) {
|
|
73248
|
+
this.changeRecordOrder(moveContext.sourceIndex, moveContext.targetIndex);
|
|
73249
|
+
this.stateManager.changeCheckboxAndRadioOrder(moveContext.sourceIndex, moveContext.targetIndex);
|
|
73250
|
+
}
|
|
73251
|
+
if (moveContext.moveType === 'column') {
|
|
73252
|
+
for (let col = colMin; col <= colMax; col++) {
|
|
73253
|
+
this._clearColRangeWidthsMap(col);
|
|
73254
|
+
}
|
|
73255
|
+
}
|
|
73256
|
+
else {
|
|
73257
|
+
for (let row = rowMin; row <= rowMax; row++) {
|
|
73258
|
+
this._clearRowRangeHeightsMap(row);
|
|
73259
|
+
}
|
|
73260
|
+
}
|
|
73261
|
+
this.clearCellStyleCache();
|
|
73262
|
+
if (this.isSeriesNumberInBody(args.source.col, args.source.row) || args.movingColumnOrRow === 'row') {
|
|
73263
|
+
this.scenegraph.updateHeaderPosition(this.scenegraph.proxy.colStart, this.scenegraph.proxy.colEnd, this.scenegraph.proxy.rowStart, this.scenegraph.proxy.rowEnd, moveContext.moveType);
|
|
73264
|
+
}
|
|
73265
|
+
else if (moveContext.moveType === 'column') {
|
|
73266
|
+
this.scenegraph.updateHeaderPosition(colMin, colMax, 0, -1, moveContext.moveType);
|
|
73267
|
+
}
|
|
73268
|
+
else {
|
|
73269
|
+
this.scenegraph.updateHeaderPosition(0, -1, rowMin, rowMax, moveContext.moveType);
|
|
73270
|
+
}
|
|
73271
|
+
if (this.internalProps.frozenColDragHeaderMode === 'adjustFrozenCount' && this.isListTable()) {
|
|
73272
|
+
if (this.isLeftFrozenColumn(args.target.col) && !this.isLeftFrozenColumn(args.source.col)) {
|
|
73273
|
+
this.frozenColCount += sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1;
|
|
73274
|
+
}
|
|
73275
|
+
else if (this.isLeftFrozenColumn(args.source.col) && !this.isLeftFrozenColumn(args.target.col)) {
|
|
73276
|
+
this.frozenColCount -= sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1;
|
|
73277
|
+
}
|
|
73278
|
+
if (this.isRightFrozenColumn(args.target.col) && !this.isRightFrozenColumn(args.source.col)) {
|
|
73279
|
+
this.rightFrozenColCount += sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1;
|
|
73280
|
+
}
|
|
73281
|
+
else if (this.isRightFrozenColumn(args.source.col) && !this.isRightFrozenColumn(args.target.col)) {
|
|
73282
|
+
this.rightFrozenColCount -= sourceMergeInfo.end.col - sourceMergeInfo.start.col + 1;
|
|
73283
|
+
}
|
|
73284
|
+
}
|
|
73285
|
+
this.scenegraph.updateNextFrame?.();
|
|
73286
|
+
return true;
|
|
73287
|
+
}
|
|
73288
|
+
finally {
|
|
73289
|
+
this.stateManager.columnMove.movingColumnOrRow = prevMoving;
|
|
73290
|
+
}
|
|
73291
|
+
}
|
|
73115
73292
|
get recordsCount() {
|
|
73116
73293
|
return this.records?.length;
|
|
73117
73294
|
}
|
|
@@ -73297,8 +73474,7 @@
|
|
|
73297
73474
|
if (this.internalProps.customMergeCell) {
|
|
73298
73475
|
const customMerge = this.internalProps.customMergeCell(col, row, this);
|
|
73299
73476
|
if (customMerge &&
|
|
73300
|
-
customMerge.range
|
|
73301
|
-
(isValid$1(customMerge.text) || customMerge.customLayout || this.customRender)) {
|
|
73477
|
+
customMerge.range) {
|
|
73302
73478
|
if (customMerge.style) {
|
|
73303
73479
|
const styleClass = this.internalProps.bodyHelper.getStyleClass('text');
|
|
73304
73480
|
const style = customMerge.style;
|
|
@@ -74246,12 +74422,39 @@
|
|
|
74246
74422
|
getGroupTitleLevel(col, row) {
|
|
74247
74423
|
return undefined;
|
|
74248
74424
|
}
|
|
74425
|
+
getTargetScrollTop(row) {
|
|
74426
|
+
const drawRange = this.getDrawRange();
|
|
74427
|
+
const frozenHeight = this.getFrozenRowsHeight();
|
|
74428
|
+
const rowsHeight = Math.ceil(this.rowHeightsMap.getSumInRange(0, row - 1));
|
|
74429
|
+
const allRowsHeight = this.getAllRowsHeight();
|
|
74430
|
+
return Math.max(0, Math.min(rowsHeight - frozenHeight, allRowsHeight - drawRange.height));
|
|
74431
|
+
}
|
|
74432
|
+
_scheduleScrollToRowCorrect(row, delay = 0) {
|
|
74433
|
+
this._scrollToRowCorrectTimer = setTimeout(() => {
|
|
74434
|
+
this.clearCorrectTimer();
|
|
74435
|
+
const targetScrollTop = this.getTargetScrollTop(row);
|
|
74436
|
+
if (targetScrollTop !== this.scrollTop) {
|
|
74437
|
+
this.scrollTop = targetScrollTop;
|
|
74438
|
+
const correctedTargetScrollTop = this.getTargetScrollTop(row);
|
|
74439
|
+
if (correctedTargetScrollTop !== this.scrollTop) {
|
|
74440
|
+
this.scrollTop = correctedTargetScrollTop;
|
|
74441
|
+
}
|
|
74442
|
+
}
|
|
74443
|
+
}, delay);
|
|
74444
|
+
}
|
|
74249
74445
|
scrollToRow(row, animationOption) {
|
|
74446
|
+
const targetRow = Math.min(Math.max(Math.floor(row), 0), this.rowCount - 1);
|
|
74447
|
+
this.clearCorrectTimer();
|
|
74250
74448
|
if (!animationOption) {
|
|
74251
|
-
this.scrollToCell({ row });
|
|
74449
|
+
this.scrollToCell({ row: targetRow });
|
|
74450
|
+
this._scheduleScrollToRowCorrect(targetRow);
|
|
74252
74451
|
return;
|
|
74253
74452
|
}
|
|
74254
|
-
|
|
74453
|
+
const duration = !isBoolean$2(animationOption) ? animationOption?.duration ?? 3000 : 3000;
|
|
74454
|
+
this.animationManager.scrollTo({ row: targetRow }, animationOption);
|
|
74455
|
+
this._scrollToRowCorrectTimer = setTimeout(() => {
|
|
74456
|
+
this.scrollToRow(targetRow, false);
|
|
74457
|
+
}, duration);
|
|
74255
74458
|
}
|
|
74256
74459
|
scrollToCol(col, animationOption) {
|
|
74257
74460
|
if (!animationOption) {
|
|
@@ -74273,8 +74476,8 @@
|
|
|
74273
74476
|
}
|
|
74274
74477
|
if (isValid$1(cellAddr.row) && cellAddr.row >= this.frozenRowCount) {
|
|
74275
74478
|
const frozenHeight = this.getFrozenRowsHeight();
|
|
74276
|
-
const top = this.
|
|
74277
|
-
this.scrollTop = Math.min(top - frozenHeight, this.
|
|
74479
|
+
const top = this.rowHeightsMap.getSumInRange(0, cellAddr.row - 1);
|
|
74480
|
+
this.scrollTop = Math.min(top - frozenHeight, this.rowHeightsMap.getSumInRange(0, this.rowCount - 1) - drawRange.height);
|
|
74278
74481
|
}
|
|
74279
74482
|
this.render();
|
|
74280
74483
|
}
|
|
@@ -75193,13 +75396,13 @@
|
|
|
75193
75396
|
const colPath = layout.getColKeysPath(col, row);
|
|
75194
75397
|
indicatorKeys.forEach((key, index) => {
|
|
75195
75398
|
const { range, targetTicks, targetRange, axisOption, chartType } = getAxisRangeAndTicks(col, row, index, index === 0 ? 'bottom' : 'top', index === 0 ? 'top' : 'bottom', indicatorKeys, colPath, layout);
|
|
75196
|
-
if (isNumber$
|
|
75399
|
+
if (isNumber$3(axisOption?.max)) {
|
|
75197
75400
|
range.max = axisOption.max;
|
|
75198
75401
|
}
|
|
75199
75402
|
else if (chartType === 'boxPlot') {
|
|
75200
75403
|
range.max += (range.max - range.min) / 20;
|
|
75201
75404
|
}
|
|
75202
|
-
if (isNumber$
|
|
75405
|
+
if (isNumber$3(axisOption?.min)) {
|
|
75203
75406
|
range.min = axisOption.min;
|
|
75204
75407
|
}
|
|
75205
75408
|
else if (chartType === 'boxPlot') {
|
|
@@ -75263,13 +75466,13 @@
|
|
|
75263
75466
|
indicatorKeys.forEach((key, index) => {
|
|
75264
75467
|
const { range, targetTicks, targetRange, axisOption } = getAxisRangeAndTicks(col, row, index, index === 0 ? 'left' : 'right', index === 0 ? 'right' : 'left', indicatorKeys, rowPath, layout);
|
|
75265
75468
|
const { chartType } = getAxisOption(col, row, index === 0 ? 'left' : 'right', layout);
|
|
75266
|
-
if (isNumber$
|
|
75469
|
+
if (isNumber$3(axisOption?.max)) {
|
|
75267
75470
|
range.max = axisOption.max;
|
|
75268
75471
|
}
|
|
75269
75472
|
else if (chartType === 'boxPlot') {
|
|
75270
75473
|
range.max += (range.max - range.min) / 20;
|
|
75271
75474
|
}
|
|
75272
|
-
if (isNumber$
|
|
75475
|
+
if (isNumber$3(axisOption?.min)) {
|
|
75273
75476
|
range.min = axisOption.min;
|
|
75274
75477
|
}
|
|
75275
75478
|
else if (chartType === 'boxPlot') {
|
|
@@ -75497,19 +75700,35 @@
|
|
|
75497
75700
|
if (layout.rowHierarchyType !== 'tree') {
|
|
75498
75701
|
return;
|
|
75499
75702
|
}
|
|
75500
|
-
const
|
|
75501
|
-
|
|
75502
|
-
|
|
75503
|
-
|
|
75504
|
-
|
|
75505
|
-
|
|
75506
|
-
}
|
|
75703
|
+
const table = layout._table;
|
|
75704
|
+
const internalProps = table.internalProps || {};
|
|
75705
|
+
const isGroupMode = !!internalProps.groupBy;
|
|
75706
|
+
const cellRecord = table.getCellRawRecord(col, row);
|
|
75707
|
+
if (!cellRecord?.vtableMerge) {
|
|
75708
|
+
return;
|
|
75507
75709
|
}
|
|
75508
|
-
|
|
75509
|
-
|
|
75510
|
-
|
|
75511
|
-
|
|
75512
|
-
|
|
75710
|
+
const treeTitleStartCol = internalProps.groupTitleCheckbox && internalProps.rowSeriesNumber
|
|
75711
|
+
? layout.rowHeaderLevelCount + layout.leftRowSeriesNumberColumnCount
|
|
75712
|
+
: layout.rowHeaderLevelCount;
|
|
75713
|
+
if (col < treeTitleStartCol) {
|
|
75714
|
+
return;
|
|
75715
|
+
}
|
|
75716
|
+
cellRange.start.col = treeTitleStartCol;
|
|
75717
|
+
cellRange.end.col = layout.colCount - 1;
|
|
75718
|
+
cellRange.start.row = cellRange.end.row = row;
|
|
75719
|
+
if (isGroupMode && layout.columnObjects?.length === 1) {
|
|
75720
|
+
const onlyColumn = layout.columnObjects[0];
|
|
75721
|
+
const field = onlyColumn?.field;
|
|
75722
|
+
if (field != null) {
|
|
75723
|
+
let text = cellRecord.vtableMergeName;
|
|
75724
|
+
const groupTitleFieldFormat = internalProps.groupTitleFieldFormat;
|
|
75725
|
+
if (typeof groupTitleFieldFormat === 'function') {
|
|
75726
|
+
text = groupTitleFieldFormat(cellRecord, col, row, table);
|
|
75727
|
+
}
|
|
75728
|
+
const current = cellRecord[field];
|
|
75729
|
+
if (current == null && text != null) {
|
|
75730
|
+
cellRecord[field] = text;
|
|
75731
|
+
}
|
|
75513
75732
|
}
|
|
75514
75733
|
}
|
|
75515
75734
|
}
|
|
@@ -76981,7 +77200,12 @@
|
|
|
76981
77200
|
}
|
|
76982
77201
|
this.table._makeVisibleCell(col, row);
|
|
76983
77202
|
this.editingEditor = editor;
|
|
76984
|
-
const
|
|
77203
|
+
const customMergeText = this.table.getCustomMerge(col, row)?.text;
|
|
77204
|
+
const dataValue = isValid$1(value)
|
|
77205
|
+
? value
|
|
77206
|
+
: isValid$1(customMergeText)
|
|
77207
|
+
? customMergeText
|
|
77208
|
+
: this.table.getCellOriginValue(col, row);
|
|
76985
77209
|
const rect = this.table.getCellRangeRelativeRect(this.table.getCellRange(col, row));
|
|
76986
77210
|
const referencePosition = { rect: { left: rect.left, top: rect.top, width: rect.width, height: rect.height } };
|
|
76987
77211
|
if (col === this.table.colCount - 1) {
|
|
@@ -77039,7 +77263,10 @@
|
|
|
77039
77263
|
if (this.editingEditor.validateValue) {
|
|
77040
77264
|
this.isValidatingValue = true;
|
|
77041
77265
|
const newValue = this.editingEditor.getValue();
|
|
77042
|
-
const
|
|
77266
|
+
const customMergeText = this.table.getCustomMerge(this.editCell.col, this.editCell.row)?.text;
|
|
77267
|
+
const oldValue = isValid$1(customMergeText)
|
|
77268
|
+
? customMergeText
|
|
77269
|
+
: this.table.getCellOriginValue(this.editCell.col, this.editCell.row);
|
|
77043
77270
|
const target = e?.target;
|
|
77044
77271
|
const maybePromiseOrValue = this.editingEditor.validateValue?.(newValue, oldValue, this.editCell, this.table, !!this.table.getElement().contains(target));
|
|
77045
77272
|
if (isPromise(maybePromiseOrValue)) {
|
|
@@ -77063,16 +77290,21 @@
|
|
|
77063
77290
|
doExit() {
|
|
77064
77291
|
const changedValue = this.editingEditor.getValue?.();
|
|
77065
77292
|
const range = this.table.getCellRange(this.editCell.col, this.editCell.row);
|
|
77066
|
-
|
|
77067
|
-
|
|
77068
|
-
|
|
77069
|
-
|
|
77070
|
-
|
|
77293
|
+
this.editingEditor.beforeEnd?.();
|
|
77294
|
+
if (range.isCustom) {
|
|
77295
|
+
this.table.changeCellValue(range.start.col, range.start.row, changedValue);
|
|
77296
|
+
}
|
|
77297
|
+
else {
|
|
77298
|
+
const changedValues = [];
|
|
77299
|
+
for (let row = range.start.row; row <= range.end.row; row++) {
|
|
77300
|
+
const rowChangedValues = [];
|
|
77301
|
+
for (let col = range.start.col; col <= range.end.col; col++) {
|
|
77302
|
+
rowChangedValues.push(changedValue);
|
|
77303
|
+
}
|
|
77304
|
+
changedValues.push(rowChangedValues);
|
|
77071
77305
|
}
|
|
77072
|
-
|
|
77306
|
+
this.table.changeCellValues(range.start.col, range.start.row, changedValues);
|
|
77073
77307
|
}
|
|
77074
|
-
this.editingEditor.beforeEnd?.();
|
|
77075
|
-
this.table.changeCellValues(range.start.col, range.start.row, changedValues);
|
|
77076
77308
|
this.editingEditor.exit && (void 0);
|
|
77077
77309
|
this.editingEditor.exit?.();
|
|
77078
77310
|
this.editingEditor.onEnd?.();
|
|
@@ -77141,6 +77373,24 @@
|
|
|
77141
77373
|
return { addRecordRule };
|
|
77142
77374
|
}
|
|
77143
77375
|
|
|
77376
|
+
function refreshCustomMergeCellGroups(table) {
|
|
77377
|
+
if (!Array.isArray(table.options.customMergeCell)) {
|
|
77378
|
+
return;
|
|
77379
|
+
}
|
|
77380
|
+
table.internalProps.customMergeCell = getCustomMergeCellFunc(table.options.customMergeCell);
|
|
77381
|
+
const merges = table.options.customMergeCell;
|
|
77382
|
+
for (let i = 0; i < merges.length; i++) {
|
|
77383
|
+
const r = merges[i]?.range;
|
|
77384
|
+
if (!r?.start) {
|
|
77385
|
+
continue;
|
|
77386
|
+
}
|
|
77387
|
+
for (let col = r.start.col; col <= r.end.col; col++) {
|
|
77388
|
+
for (let row = r.start.row; row <= r.end.row; row++) {
|
|
77389
|
+
table.scenegraph.updateCellContent(col, row);
|
|
77390
|
+
}
|
|
77391
|
+
}
|
|
77392
|
+
}
|
|
77393
|
+
}
|
|
77144
77394
|
function listTableChangeCellValue(col, row, value, workOnEditableCell, triggerEvent, table, noTriggerChangeCellValuesEvent) {
|
|
77145
77395
|
if ((workOnEditableCell && table.isHasEditorDefine(col, row)) || workOnEditableCell === false) {
|
|
77146
77396
|
const recordShowIndex = table.getRecordShowIndexByCell(col, row);
|
|
@@ -77155,6 +77405,16 @@
|
|
|
77155
77405
|
table.dataSource.changeFieldValue(value, recordShowIndex, field, col, row, table);
|
|
77156
77406
|
}
|
|
77157
77407
|
const range = table.getCellRange(col, row);
|
|
77408
|
+
if (range.isCustom &&
|
|
77409
|
+
range.start.col === col &&
|
|
77410
|
+
range.start.row === row &&
|
|
77411
|
+
Array.isArray(table.options.customMergeCell) &&
|
|
77412
|
+
typeof table.getCellValue === 'function') {
|
|
77413
|
+
const customMerge = table.internalProps?.customMergeCell?.(col, row, table);
|
|
77414
|
+
if (customMerge) {
|
|
77415
|
+
customMerge.text = value;
|
|
77416
|
+
}
|
|
77417
|
+
}
|
|
77158
77418
|
const aggregators = table.internalProps.layoutMap.getAggregatorsByCell(col, row);
|
|
77159
77419
|
if (aggregators) {
|
|
77160
77420
|
if (Array.isArray(aggregators)) {
|
|
@@ -77534,10 +77794,15 @@
|
|
|
77534
77794
|
table.dataSource.addRecord(record, recordIndex, syncToOriginalRecords);
|
|
77535
77795
|
adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, 1);
|
|
77536
77796
|
if (syncToOriginalRecords) {
|
|
77797
|
+
if (!table.transpose) {
|
|
77798
|
+
const topAggregationCount = table.internalProps.layoutMap.hasAggregationOnTopCount;
|
|
77799
|
+
const insertRowIndex = recordIndex + headerCount + topAggregationCount;
|
|
77800
|
+
table.rowHeightsMap.insert(insertRowIndex);
|
|
77801
|
+
}
|
|
77537
77802
|
table.refreshRowColCount();
|
|
77538
77803
|
table.internalProps.layoutMap.clearCellRangeMap();
|
|
77539
77804
|
table.scenegraph.clearCells();
|
|
77540
|
-
table.scenegraph.createSceneGraph();
|
|
77805
|
+
table.scenegraph.createSceneGraph(true);
|
|
77541
77806
|
return true;
|
|
77542
77807
|
}
|
|
77543
77808
|
const oldRowCount = table.rowCount;
|
|
@@ -77676,10 +77941,17 @@
|
|
|
77676
77941
|
table.dataSource.addRecords(records, recordIndex, syncToOriginalRecords);
|
|
77677
77942
|
adjustCheckBoxStateMapWithAddRecordIndex(table, recordIndex, records.length);
|
|
77678
77943
|
if (syncToOriginalRecords) {
|
|
77944
|
+
if (!table.transpose) {
|
|
77945
|
+
const topAggregationCount = table.internalProps.layoutMap.hasAggregationOnTopCount;
|
|
77946
|
+
const insertRowIndex = recordIndex + headerCount + topAggregationCount;
|
|
77947
|
+
for (let i = 0; i < records.length; i++) {
|
|
77948
|
+
table.rowHeightsMap.insert(insertRowIndex);
|
|
77949
|
+
}
|
|
77950
|
+
}
|
|
77679
77951
|
table.refreshRowColCount();
|
|
77680
77952
|
table.internalProps.layoutMap.clearCellRangeMap();
|
|
77681
77953
|
table.scenegraph.clearCells();
|
|
77682
|
-
table.scenegraph.createSceneGraph();
|
|
77954
|
+
table.scenegraph.createSceneGraph(true);
|
|
77683
77955
|
return true;
|
|
77684
77956
|
}
|
|
77685
77957
|
const oldRowCount = table.transpose ? table.colCount : table.rowCount;
|
|
@@ -77815,14 +78087,25 @@
|
|
|
77815
78087
|
if (deletedRecordIndexs.length === 0) {
|
|
77816
78088
|
return;
|
|
77817
78089
|
}
|
|
78090
|
+
if (Array.isArray(table.options.customMergeCell)) {
|
|
78091
|
+
table.internalProps.customMergeCell = getCustomMergeCellFunc(table.options.customMergeCell);
|
|
78092
|
+
}
|
|
77818
78093
|
for (let index = 0; index < deletedRecordIndexs.length; index++) {
|
|
77819
78094
|
adjustCheckBoxStateMapWithDeleteRecordIndex(table, deletedRecordIndexs[index], 1);
|
|
77820
78095
|
}
|
|
77821
78096
|
if (syncToOriginalRecords) {
|
|
78097
|
+
if (!table.transpose) {
|
|
78098
|
+
const headerCount = table.transpose ? table.rowHeaderLevelCount : table.columnHeaderLevelCount;
|
|
78099
|
+
const topAggregationCount = table.internalProps.layoutMap.hasAggregationOnTopCount;
|
|
78100
|
+
const sorted = [...deletedRecordIndexs].sort((a, b) => b - a);
|
|
78101
|
+
for (let i = 0; i < sorted.length; i++) {
|
|
78102
|
+
table.rowHeightsMap.delete(sorted[i] + headerCount + topAggregationCount);
|
|
78103
|
+
}
|
|
78104
|
+
}
|
|
77822
78105
|
table.refreshRowColCount();
|
|
77823
78106
|
table.internalProps.layoutMap.clearCellRangeMap();
|
|
77824
78107
|
table.scenegraph.clearCells();
|
|
77825
|
-
table.scenegraph.createSceneGraph();
|
|
78108
|
+
table.scenegraph.createSceneGraph(true);
|
|
77826
78109
|
return;
|
|
77827
78110
|
}
|
|
77828
78111
|
const oldRowCount = table.transpose ? table.colCount : table.rowCount;
|
|
@@ -77879,6 +78162,7 @@
|
|
|
77879
78162
|
? table.scenegraph.updateCol(delRows, [], updateRows)
|
|
77880
78163
|
: table.scenegraph.updateRow(delRows, [], updateRows);
|
|
77881
78164
|
table.reactCustomLayout?.updateAllCustomCell();
|
|
78165
|
+
refreshCustomMergeCellGroups(table);
|
|
77882
78166
|
}
|
|
77883
78167
|
}
|
|
77884
78168
|
}
|
|
@@ -77898,6 +78182,46 @@
|
|
|
77898
78182
|
}
|
|
77899
78183
|
}
|
|
77900
78184
|
const updateRows = [];
|
|
78185
|
+
if (table.internalProps.customMergeCell) {
|
|
78186
|
+
const proxy = table.scenegraph.proxy;
|
|
78187
|
+
recordIndexsMinToMax[0];
|
|
78188
|
+
const deletedIndexNums = recordIndexsMinToMax.map(recordIndex => recordIndex + headerCount + topAggregationCount);
|
|
78189
|
+
const minIndexNum = deletedIndexNums[0];
|
|
78190
|
+
let updateMin = minIndexNum;
|
|
78191
|
+
let updateMax = minIndexNum;
|
|
78192
|
+
if (Array.isArray(table.options.customMergeCell)) {
|
|
78193
|
+
const merges = table.options.customMergeCell;
|
|
78194
|
+
const axis = table.transpose ? 'col' : 'row';
|
|
78195
|
+
merges.forEach(m => {
|
|
78196
|
+
const r = m?.range;
|
|
78197
|
+
if (!r?.start || !r?.end) {
|
|
78198
|
+
return;
|
|
78199
|
+
}
|
|
78200
|
+
for (let i = 0; i < deletedIndexNums.length; i++) {
|
|
78201
|
+
const deleteIndex = deletedIndexNums[i];
|
|
78202
|
+
if (r.end[axis] >= deleteIndex - 1) {
|
|
78203
|
+
updateMin = Math.min(updateMin, r.start[axis]);
|
|
78204
|
+
updateMax = Math.max(updateMax, r.end[axis]);
|
|
78205
|
+
break;
|
|
78206
|
+
}
|
|
78207
|
+
}
|
|
78208
|
+
});
|
|
78209
|
+
}
|
|
78210
|
+
if (table.transpose) {
|
|
78211
|
+
const start = Math.max(updateMin, proxy?.colStart ?? updateMin);
|
|
78212
|
+
const end = Math.min(updateMax, proxy?.colEnd ?? updateMax);
|
|
78213
|
+
for (let col = start; col <= end; col++) {
|
|
78214
|
+
updateRows.push({ col, row: 0 });
|
|
78215
|
+
}
|
|
78216
|
+
}
|
|
78217
|
+
else {
|
|
78218
|
+
const start = Math.max(updateMin, proxy?.rowStart ?? updateMin);
|
|
78219
|
+
const end = Math.min(updateMax, proxy?.rowEnd ?? updateMax);
|
|
78220
|
+
for (let row = start; row <= end; row++) {
|
|
78221
|
+
updateRows.push({ col: 0, row });
|
|
78222
|
+
}
|
|
78223
|
+
}
|
|
78224
|
+
}
|
|
77901
78225
|
for (let row = headerCount; row < headerCount + topAggregationCount; row++) {
|
|
77902
78226
|
if (table.transpose) {
|
|
77903
78227
|
updateRows.push({ col: row, row: 0 });
|
|
@@ -77919,6 +78243,7 @@
|
|
|
77919
78243
|
? table.scenegraph.updateCol(delRows, [], updateRows)
|
|
77920
78244
|
: table.scenegraph.updateRow(delRows, [], updateRows);
|
|
77921
78245
|
table.reactCustomLayout?.updateAllCustomCell();
|
|
78246
|
+
refreshCustomMergeCellGroups(table);
|
|
77922
78247
|
}
|
|
77923
78248
|
}
|
|
77924
78249
|
}
|
|
@@ -77964,7 +78289,7 @@
|
|
|
77964
78289
|
table.refreshRowColCount();
|
|
77965
78290
|
table.internalProps.layoutMap.clearCellRangeMap();
|
|
77966
78291
|
table.scenegraph.clearCells();
|
|
77967
|
-
table.scenegraph.createSceneGraph();
|
|
78292
|
+
table.scenegraph.createSceneGraph(true);
|
|
77968
78293
|
return;
|
|
77969
78294
|
}
|
|
77970
78295
|
const bodyRowIndex = updateRecordIndexs.map((index) => table.getBodyRowIndexByRecordIndex(index));
|
|
@@ -78055,7 +78380,7 @@
|
|
|
78055
78380
|
}
|
|
78056
78381
|
if (table.dataSource.rowHierarchyType === 'tree') {
|
|
78057
78382
|
let toOperateIndexArr;
|
|
78058
|
-
if (isNumber$
|
|
78383
|
+
if (isNumber$3(recordIndex)) {
|
|
78059
78384
|
toOperateIndexArr = [recordIndex];
|
|
78060
78385
|
}
|
|
78061
78386
|
else {
|
|
@@ -78146,7 +78471,7 @@
|
|
|
78146
78471
|
}
|
|
78147
78472
|
if (table.dataSource.rowHierarchyType === 'tree') {
|
|
78148
78473
|
let toOperateIndexArr;
|
|
78149
|
-
if (isNumber$
|
|
78474
|
+
if (isNumber$3(recordIndex)) {
|
|
78150
78475
|
toOperateIndexArr = [recordIndex];
|
|
78151
78476
|
}
|
|
78152
78477
|
else {
|
|
@@ -78416,6 +78741,53 @@
|
|
|
78416
78741
|
}
|
|
78417
78742
|
addColumns(toAddColumns, colIndex, isMaintainArrayData = true) {
|
|
78418
78743
|
const columns = this.options.columns;
|
|
78744
|
+
if (Array.isArray(this.options.customMergeCell) && toAddColumns?.length) {
|
|
78745
|
+
const axis = this.transpose ? 'row' : 'col';
|
|
78746
|
+
let insertIndex = colIndex;
|
|
78747
|
+
if (insertIndex === undefined) {
|
|
78748
|
+
insertIndex = columns.length;
|
|
78749
|
+
}
|
|
78750
|
+
else if (insertIndex < 0) {
|
|
78751
|
+
insertIndex = 0;
|
|
78752
|
+
}
|
|
78753
|
+
else if (insertIndex > columns.length) {
|
|
78754
|
+
insertIndex = columns.length;
|
|
78755
|
+
}
|
|
78756
|
+
const toAddCount = toAddColumns.length;
|
|
78757
|
+
const merges = this.options.customMergeCell.map(m => ({
|
|
78758
|
+
...m,
|
|
78759
|
+
range: { start: { ...m.range.start }, end: { ...m.range.end } }
|
|
78760
|
+
}));
|
|
78761
|
+
for (let i = 0; i < merges.length; i++) {
|
|
78762
|
+
const r = merges[i]?.range;
|
|
78763
|
+
if (!r?.start || !r?.end) {
|
|
78764
|
+
continue;
|
|
78765
|
+
}
|
|
78766
|
+
const start = r.start[axis];
|
|
78767
|
+
const end = r.end[axis];
|
|
78768
|
+
if (end < insertIndex) {
|
|
78769
|
+
continue;
|
|
78770
|
+
}
|
|
78771
|
+
if (start > insertIndex) {
|
|
78772
|
+
r.start[axis] = start + toAddCount;
|
|
78773
|
+
r.end[axis] = end + toAddCount;
|
|
78774
|
+
}
|
|
78775
|
+
else {
|
|
78776
|
+
r.end[axis] = end + toAddCount;
|
|
78777
|
+
}
|
|
78778
|
+
}
|
|
78779
|
+
this.options.customMergeCell = merges.filter((m) => {
|
|
78780
|
+
const r = m?.range;
|
|
78781
|
+
if (!r?.start || !r?.end) {
|
|
78782
|
+
return false;
|
|
78783
|
+
}
|
|
78784
|
+
if (r.end.row < r.start.row || r.end.col < r.start.col) {
|
|
78785
|
+
return false;
|
|
78786
|
+
}
|
|
78787
|
+
return !(r.start.row === r.end.row && r.start.col === r.end.col);
|
|
78788
|
+
});
|
|
78789
|
+
this.internalProps.customMergeCell = getCustomMergeCellFunc(this.options.customMergeCell);
|
|
78790
|
+
}
|
|
78419
78791
|
if (colIndex === undefined) {
|
|
78420
78792
|
colIndex = columns.length;
|
|
78421
78793
|
columns.push(...toAddColumns);
|
|
@@ -78446,6 +78818,21 @@
|
|
|
78446
78818
|
}
|
|
78447
78819
|
}
|
|
78448
78820
|
this.updateColumns(columns, { clearRowHeightCache: false });
|
|
78821
|
+
if (Array.isArray(this.options.customMergeCell)) {
|
|
78822
|
+
this.internalProps.customMergeCell = getCustomMergeCellFunc(this.options.customMergeCell);
|
|
78823
|
+
this.options.customMergeCell.forEach(m => {
|
|
78824
|
+
const r = m?.range;
|
|
78825
|
+
if (!r?.start) {
|
|
78826
|
+
return;
|
|
78827
|
+
}
|
|
78828
|
+
for (let col = r.start.col; col <= r.end.col; col++) {
|
|
78829
|
+
for (let row = r.start.row; row <= r.end.row; row++) {
|
|
78830
|
+
this.scenegraph.updateCellContent(col, row);
|
|
78831
|
+
}
|
|
78832
|
+
}
|
|
78833
|
+
});
|
|
78834
|
+
this.scenegraph.updateNextFrame();
|
|
78835
|
+
}
|
|
78449
78836
|
this.fireListeners(TABLE_EVENT_TYPE.ADD_COLUMN, {
|
|
78450
78837
|
columnIndex: colIndex,
|
|
78451
78838
|
columnCount: toAddColumns.length,
|
|
@@ -78455,6 +78842,65 @@
|
|
|
78455
78842
|
deleteColumns(deleteColIndexs, isMaintainArrayData = true) {
|
|
78456
78843
|
const columns = this.options.columns;
|
|
78457
78844
|
deleteColIndexs.sort((a, b) => b - a);
|
|
78845
|
+
const deletedColumns = deleteColIndexs.map(idx => cloneDeepSpec(columns[idx], ['children']));
|
|
78846
|
+
let deletedRecordValues;
|
|
78847
|
+
if (Array.isArray(this.options.customMergeCell) && deleteColIndexs?.length) {
|
|
78848
|
+
const axis = this.transpose ? 'row' : 'col';
|
|
78849
|
+
const deleteIndexNums = deleteColIndexs
|
|
78850
|
+
.slice()
|
|
78851
|
+
.sort((a, b) => a - b)
|
|
78852
|
+
.map((idx, i) => idx - i);
|
|
78853
|
+
const merges = this.options.customMergeCell.map(m => ({
|
|
78854
|
+
...m,
|
|
78855
|
+
range: {
|
|
78856
|
+
start: { ...m.range.start },
|
|
78857
|
+
end: { ...m.range.end }
|
|
78858
|
+
}
|
|
78859
|
+
}));
|
|
78860
|
+
for (let i = 0; i < deleteIndexNums.length; i++) {
|
|
78861
|
+
const deleteIndex = deleteIndexNums[i];
|
|
78862
|
+
for (let j = 0; j < merges.length; j++) {
|
|
78863
|
+
const r = merges[j]?.range;
|
|
78864
|
+
if (!r?.start || !r?.end) {
|
|
78865
|
+
continue;
|
|
78866
|
+
}
|
|
78867
|
+
const start = r.start[axis];
|
|
78868
|
+
const end = r.end[axis];
|
|
78869
|
+
if (end < deleteIndex) {
|
|
78870
|
+
continue;
|
|
78871
|
+
}
|
|
78872
|
+
if (start > deleteIndex) {
|
|
78873
|
+
r.start[axis] = start - 1;
|
|
78874
|
+
r.end[axis] = end - 1;
|
|
78875
|
+
}
|
|
78876
|
+
else {
|
|
78877
|
+
r.end[axis] = end - 1;
|
|
78878
|
+
}
|
|
78879
|
+
}
|
|
78880
|
+
}
|
|
78881
|
+
this.options.customMergeCell = merges.filter((m) => {
|
|
78882
|
+
const r = m?.range;
|
|
78883
|
+
if (!r?.start || !r?.end) {
|
|
78884
|
+
return false;
|
|
78885
|
+
}
|
|
78886
|
+
if (r.end.row < r.start.row || r.end.col < r.start.col) {
|
|
78887
|
+
return false;
|
|
78888
|
+
}
|
|
78889
|
+
return !(r.start.row === r.end.row && r.start.col === r.end.col);
|
|
78890
|
+
});
|
|
78891
|
+
this.internalProps.customMergeCell = getCustomMergeCellFunc(this.options.customMergeCell);
|
|
78892
|
+
}
|
|
78893
|
+
if (isMaintainArrayData && Array.isArray(this.records) && this.records.length) {
|
|
78894
|
+
deletedRecordValues = this.records.map(record => {
|
|
78895
|
+
if (Array.isArray(record)) {
|
|
78896
|
+
return deleteColIndexs.map(idx => record[idx]);
|
|
78897
|
+
}
|
|
78898
|
+
return [];
|
|
78899
|
+
});
|
|
78900
|
+
if (deletedRecordValues.every(v => v.length === 0)) {
|
|
78901
|
+
deletedRecordValues = undefined;
|
|
78902
|
+
}
|
|
78903
|
+
}
|
|
78458
78904
|
for (let i = 0; i < deleteColIndexs.length; i++) {
|
|
78459
78905
|
columns.splice(deleteColIndexs[i], 1);
|
|
78460
78906
|
this.colWidthsMap.delAndReorder(deleteColIndexs[i]);
|
|
@@ -78487,7 +78933,9 @@
|
|
|
78487
78933
|
this.updateColumns(columns, { clearRowHeightCache: false });
|
|
78488
78934
|
this.fireListeners(TABLE_EVENT_TYPE.DELETE_COLUMN, {
|
|
78489
78935
|
deleteColIndexs: deleteColIndexs,
|
|
78490
|
-
columns
|
|
78936
|
+
columns,
|
|
78937
|
+
deletedColumns,
|
|
78938
|
+
deletedRecordValues
|
|
78491
78939
|
});
|
|
78492
78940
|
}
|
|
78493
78941
|
get columns() {
|
|
@@ -79104,47 +79552,54 @@
|
|
|
79104
79552
|
return undefined;
|
|
79105
79553
|
}
|
|
79106
79554
|
updateSortState(sortState, executeSort = true) {
|
|
79107
|
-
|
|
79108
|
-
|
|
79109
|
-
|
|
79110
|
-
for (let i = 0; i < this.internalProps.sortState.length; i++) {
|
|
79111
|
-
sortState = this.internalProps.sortState?.[i];
|
|
79112
|
-
sortState && (sortState.order = 'normal');
|
|
79113
|
-
}
|
|
79114
|
-
}
|
|
79115
|
-
else {
|
|
79116
|
-
this.internalProps.sortState.order = 'normal';
|
|
79117
|
-
sortState = this.internalProps.sortState;
|
|
79118
|
-
}
|
|
79119
|
-
}
|
|
79120
|
-
}
|
|
79121
|
-
else {
|
|
79555
|
+
const nextSortState = Array.isArray(sortState) ? sortState : sortState ? [sortState] : [];
|
|
79556
|
+
const normalizedSortState = nextSortState.filter(Boolean);
|
|
79557
|
+
if (normalizedSortState.length) {
|
|
79122
79558
|
this.internalProps.sortState = sortState;
|
|
79123
79559
|
}
|
|
79124
|
-
|
|
79125
|
-
|
|
79126
|
-
|
|
79127
|
-
|
|
79128
|
-
|
|
79129
|
-
|
|
79130
|
-
|
|
79131
|
-
|
|
79132
|
-
|
|
79133
|
-
|
|
79134
|
-
|
|
79135
|
-
|
|
79560
|
+
else {
|
|
79561
|
+
this.internalProps.sortState = null;
|
|
79562
|
+
}
|
|
79563
|
+
if (executeSort) {
|
|
79564
|
+
if (normalizedSortState.length) {
|
|
79565
|
+
if (this.internalProps.layoutMap.headerObjects.some(item => item.define.sort !== false)) {
|
|
79566
|
+
this.dataSource.sort(normalizedSortState.map((item) => {
|
|
79567
|
+
const sortFunc = this._getSortFuncFromHeaderOption(this.internalProps.columns, item.field);
|
|
79568
|
+
this.internalProps.layoutMap.headerObjects.find((col) => col && col.field === item.field);
|
|
79569
|
+
return {
|
|
79570
|
+
field: item.field,
|
|
79571
|
+
order: item.order,
|
|
79572
|
+
orderFn: sortFunc ?? defaultOrderFn
|
|
79573
|
+
};
|
|
79574
|
+
}));
|
|
79575
|
+
this.internalProps.layoutMap.clearCellRangeMap();
|
|
79576
|
+
this.internalProps.useOneRowHeightFillAll = false;
|
|
79577
|
+
this.scenegraph.sortCell();
|
|
79578
|
+
}
|
|
79579
|
+
}
|
|
79580
|
+
else {
|
|
79581
|
+
const ds = this.dataSource;
|
|
79582
|
+
const sourceLength = ds?.sourceLength ?? ds?._sourceLength ?? ds?.length ?? 0;
|
|
79583
|
+
if (ds?.sortedIndexMap?.clear) {
|
|
79584
|
+
ds.sortedIndexMap.clear();
|
|
79585
|
+
}
|
|
79586
|
+
if (typeof ds.currentIndexedData !== 'undefined') {
|
|
79587
|
+
ds.currentIndexedData = Array.from({ length: sourceLength }, (_, i) => i);
|
|
79588
|
+
}
|
|
79589
|
+
ds.lastSortStates = [];
|
|
79590
|
+
ds.updatePagination?.(ds.pagination);
|
|
79136
79591
|
this.internalProps.layoutMap.clearCellRangeMap();
|
|
79137
79592
|
this.internalProps.useOneRowHeightFillAll = false;
|
|
79138
79593
|
this.scenegraph.sortCell();
|
|
79139
79594
|
}
|
|
79140
79595
|
}
|
|
79141
|
-
|
|
79142
|
-
this.stateManager.updateSortState(sortState);
|
|
79143
|
-
}
|
|
79596
|
+
this.stateManager.updateSortState(normalizedSortState);
|
|
79144
79597
|
}
|
|
79145
79598
|
updateFilterRules(filterRules, options = { clearRowHeightCache: true }) {
|
|
79146
79599
|
this.scenegraph.clearCells();
|
|
79147
|
-
|
|
79600
|
+
if (options?.clearForceVisibleRecords !== false) {
|
|
79601
|
+
this.dataSource.clearForceVisibleRecords?.();
|
|
79602
|
+
}
|
|
79148
79603
|
if (this.sortState) {
|
|
79149
79604
|
this.dataSource.updateFilterRulesForSorted(filterRules);
|
|
79150
79605
|
sortRecords(this);
|
|
@@ -79548,9 +80003,70 @@
|
|
|
79548
80003
|
this.resize();
|
|
79549
80004
|
}
|
|
79550
80005
|
addRecord(record, recordIndex, triggerEvent = true) {
|
|
80006
|
+
if (Array.isArray(this.options.customMergeCell) && typeof recordIndex === 'number') {
|
|
80007
|
+
const axis = this.transpose ? 'col' : 'row';
|
|
80008
|
+
const headerCount = this.transpose ? this.rowHeaderLevelCount : this.columnHeaderLevelCount;
|
|
80009
|
+
const topAggregationCount = this.internalProps.layoutMap.hasAggregationOnTopCount;
|
|
80010
|
+
let insertIndex = recordIndex;
|
|
80011
|
+
if (insertIndex === undefined || insertIndex > this.dataSource.sourceLength) {
|
|
80012
|
+
insertIndex = this.dataSource.sourceLength;
|
|
80013
|
+
}
|
|
80014
|
+
else if (insertIndex < 0) {
|
|
80015
|
+
insertIndex = 0;
|
|
80016
|
+
}
|
|
80017
|
+
const insertIndexNum = insertIndex + headerCount + topAggregationCount;
|
|
80018
|
+
const merges = this.options.customMergeCell.map(m => ({
|
|
80019
|
+
...m,
|
|
80020
|
+
range: { start: { ...m.range.start }, end: { ...m.range.end } }
|
|
80021
|
+
}));
|
|
80022
|
+
for (let i = 0; i < merges.length; i++) {
|
|
80023
|
+
const r = merges[i]?.range;
|
|
80024
|
+
if (!r?.start || !r?.end) {
|
|
80025
|
+
continue;
|
|
80026
|
+
}
|
|
80027
|
+
const start = r.start[axis];
|
|
80028
|
+
const end = r.end[axis];
|
|
80029
|
+
if (end < insertIndexNum) {
|
|
80030
|
+
continue;
|
|
80031
|
+
}
|
|
80032
|
+
if (start > insertIndexNum) {
|
|
80033
|
+
r.start[axis] = start + 1;
|
|
80034
|
+
r.end[axis] = end + 1;
|
|
80035
|
+
}
|
|
80036
|
+
else {
|
|
80037
|
+
r.end[axis] = end + 1;
|
|
80038
|
+
}
|
|
80039
|
+
}
|
|
80040
|
+
this.options.customMergeCell = merges.filter((m) => {
|
|
80041
|
+
const r = m?.range;
|
|
80042
|
+
if (!r?.start || !r?.end) {
|
|
80043
|
+
return false;
|
|
80044
|
+
}
|
|
80045
|
+
if (r.end.row < r.start.row || r.end.col < r.start.col) {
|
|
80046
|
+
return false;
|
|
80047
|
+
}
|
|
80048
|
+
return !(r.start.row === r.end.row && r.start.col === r.end.col);
|
|
80049
|
+
});
|
|
80050
|
+
this.internalProps.customMergeCell = getCustomMergeCellFunc(this.options.customMergeCell);
|
|
80051
|
+
}
|
|
79551
80052
|
const success = listTableAddRecord(record, recordIndex, this);
|
|
79552
80053
|
adjustHeightResizedRowMapWithAddRecordIndex(this, recordIndex, [record]);
|
|
79553
80054
|
this.internalProps.emptyTip?.resetVisible();
|
|
80055
|
+
if (success && Array.isArray(this.options.customMergeCell)) {
|
|
80056
|
+
this.internalProps.customMergeCell = getCustomMergeCellFunc(this.options.customMergeCell);
|
|
80057
|
+
this.options.customMergeCell.forEach(m => {
|
|
80058
|
+
const r = m?.range;
|
|
80059
|
+
if (!r?.start) {
|
|
80060
|
+
return;
|
|
80061
|
+
}
|
|
80062
|
+
for (let col = r.start.col; col <= r.end.col; col++) {
|
|
80063
|
+
for (let row = r.start.row; row <= r.end.row; row++) {
|
|
80064
|
+
this.scenegraph.updateCellContent(col, row);
|
|
80065
|
+
}
|
|
80066
|
+
}
|
|
80067
|
+
});
|
|
80068
|
+
this.scenegraph.updateNextFrame();
|
|
80069
|
+
}
|
|
79554
80070
|
if (triggerEvent && success) {
|
|
79555
80071
|
this.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, {
|
|
79556
80072
|
records: [record],
|
|
@@ -79560,11 +80076,73 @@
|
|
|
79560
80076
|
}
|
|
79561
80077
|
}
|
|
79562
80078
|
addRecords(records, recordIndex, triggerEvent = true) {
|
|
80079
|
+
if (Array.isArray(this.options.customMergeCell) && typeof recordIndex === 'number' && records?.length) {
|
|
80080
|
+
const axis = this.transpose ? 'col' : 'row';
|
|
80081
|
+
const headerCount = this.transpose ? this.rowHeaderLevelCount : this.columnHeaderLevelCount;
|
|
80082
|
+
const topAggregationCount = this.internalProps.layoutMap.hasAggregationOnTopCount;
|
|
80083
|
+
let insertIndex = recordIndex;
|
|
80084
|
+
if (insertIndex === undefined || insertIndex > this.dataSource.sourceLength) {
|
|
80085
|
+
insertIndex = this.dataSource.sourceLength;
|
|
80086
|
+
}
|
|
80087
|
+
else if (insertIndex < 0) {
|
|
80088
|
+
insertIndex = 0;
|
|
80089
|
+
}
|
|
80090
|
+
const insertIndexNum = insertIndex + headerCount + topAggregationCount;
|
|
80091
|
+
const toAddCount = records.length;
|
|
80092
|
+
const merges = this.options.customMergeCell.map(m => ({
|
|
80093
|
+
...m,
|
|
80094
|
+
range: { start: { ...m.range.start }, end: { ...m.range.end } }
|
|
80095
|
+
}));
|
|
80096
|
+
for (let i = 0; i < merges.length; i++) {
|
|
80097
|
+
const r = merges[i]?.range;
|
|
80098
|
+
if (!r?.start || !r?.end) {
|
|
80099
|
+
continue;
|
|
80100
|
+
}
|
|
80101
|
+
const start = r.start[axis];
|
|
80102
|
+
const end = r.end[axis];
|
|
80103
|
+
if (end < insertIndexNum) {
|
|
80104
|
+
continue;
|
|
80105
|
+
}
|
|
80106
|
+
if (start > insertIndexNum) {
|
|
80107
|
+
r.start[axis] = start + toAddCount;
|
|
80108
|
+
r.end[axis] = end + toAddCount;
|
|
80109
|
+
}
|
|
80110
|
+
else {
|
|
80111
|
+
r.end[axis] = end + toAddCount;
|
|
80112
|
+
}
|
|
80113
|
+
}
|
|
80114
|
+
this.options.customMergeCell = merges.filter((m) => {
|
|
80115
|
+
const r = m?.range;
|
|
80116
|
+
if (!r?.start || !r?.end) {
|
|
80117
|
+
return false;
|
|
80118
|
+
}
|
|
80119
|
+
if (r.end.row < r.start.row || r.end.col < r.start.col) {
|
|
80120
|
+
return false;
|
|
80121
|
+
}
|
|
80122
|
+
return !(r.start.row === r.end.row && r.start.col === r.end.col);
|
|
80123
|
+
});
|
|
80124
|
+
this.internalProps.customMergeCell = getCustomMergeCellFunc(this.options.customMergeCell);
|
|
80125
|
+
}
|
|
79563
80126
|
const success = listTableAddRecords(records, recordIndex, this);
|
|
79564
80127
|
if (typeof recordIndex === 'number') {
|
|
79565
80128
|
adjustHeightResizedRowMapWithAddRecordIndex(this, recordIndex, records);
|
|
79566
80129
|
}
|
|
79567
80130
|
this.internalProps.emptyTip?.resetVisible();
|
|
80131
|
+
if (success && Array.isArray(this.options.customMergeCell)) {
|
|
80132
|
+
this.internalProps.customMergeCell = getCustomMergeCellFunc(this.options.customMergeCell);
|
|
80133
|
+
this.options.customMergeCell.forEach(m => {
|
|
80134
|
+
const r = m?.range;
|
|
80135
|
+
if (!r?.start) {
|
|
80136
|
+
return;
|
|
80137
|
+
}
|
|
80138
|
+
for (let col = r.start.col; col <= r.end.col; col++) {
|
|
80139
|
+
for (let row = r.start.row; row <= r.end.row; row++) {
|
|
80140
|
+
this.scenegraph.updateCellContent(col, row);
|
|
80141
|
+
}
|
|
80142
|
+
}
|
|
80143
|
+
});
|
|
80144
|
+
this.scenegraph.updateNextFrame();
|
|
80145
|
+
}
|
|
79568
80146
|
if (triggerEvent && success) {
|
|
79569
80147
|
this.fireListeners(TABLE_EVENT_TYPE.ADD_RECORD, {
|
|
79570
80148
|
records,
|
|
@@ -79574,6 +80152,15 @@
|
|
|
79574
80152
|
}
|
|
79575
80153
|
}
|
|
79576
80154
|
deleteRecords(recordIndexs, triggerEvent = true) {
|
|
80155
|
+
const prevMergeRanges = Array.isArray(this.options.customMergeCell)
|
|
80156
|
+
? this.options.customMergeCell
|
|
80157
|
+
.map(m => m?.range)
|
|
80158
|
+
.filter(Boolean)
|
|
80159
|
+
.map((r) => ({
|
|
80160
|
+
start: { ...r.start },
|
|
80161
|
+
end: { ...r.end }
|
|
80162
|
+
}))
|
|
80163
|
+
: [];
|
|
79577
80164
|
const deletedRecords = [];
|
|
79578
80165
|
if (recordIndexs?.length > 0) {
|
|
79579
80166
|
recordIndexs.forEach(index => {
|
|
@@ -79587,6 +80174,47 @@
|
|
|
79587
80174
|
deletedRecords.push(record);
|
|
79588
80175
|
});
|
|
79589
80176
|
}
|
|
80177
|
+
if (Array.isArray(this.options.customMergeCell) && recordIndexs?.length && typeof recordIndexs[0] === 'number') {
|
|
80178
|
+
const axis = this.transpose ? 'col' : 'row';
|
|
80179
|
+
const headerCount = this.transpose ? this.rowHeaderLevelCount : this.columnHeaderLevelCount;
|
|
80180
|
+
const topAggregationCount = this.internalProps.layoutMap.hasAggregationOnTopCount;
|
|
80181
|
+
const deleteIndexNums = recordIndexs
|
|
80182
|
+
.slice()
|
|
80183
|
+
.sort((a, b) => a - b)
|
|
80184
|
+
.map((index, i) => index + headerCount + topAggregationCount - i);
|
|
80185
|
+
const merges = this.options.customMergeCell;
|
|
80186
|
+
for (let i = 0; i < deleteIndexNums.length; i++) {
|
|
80187
|
+
const deleteIndex = deleteIndexNums[i];
|
|
80188
|
+
for (let j = 0; j < merges.length; j++) {
|
|
80189
|
+
const r = merges[j]?.range;
|
|
80190
|
+
if (!r?.start || !r?.end) {
|
|
80191
|
+
continue;
|
|
80192
|
+
}
|
|
80193
|
+
const start = r.start[axis];
|
|
80194
|
+
const end = r.end[axis];
|
|
80195
|
+
if (end < deleteIndex) {
|
|
80196
|
+
continue;
|
|
80197
|
+
}
|
|
80198
|
+
if (start > deleteIndex) {
|
|
80199
|
+
r.start[axis] = start - 1;
|
|
80200
|
+
r.end[axis] = end - 1;
|
|
80201
|
+
}
|
|
80202
|
+
else {
|
|
80203
|
+
r.end[axis] = end - 1;
|
|
80204
|
+
}
|
|
80205
|
+
}
|
|
80206
|
+
}
|
|
80207
|
+
this.options.customMergeCell = merges.filter((m) => {
|
|
80208
|
+
const r = m?.range;
|
|
80209
|
+
if (!r?.start || !r?.end) {
|
|
80210
|
+
return false;
|
|
80211
|
+
}
|
|
80212
|
+
if (r.end.row < r.start.row || r.end.col < r.start.col) {
|
|
80213
|
+
return false;
|
|
80214
|
+
}
|
|
80215
|
+
return !(r.start.row === r.end.row && r.start.col === r.end.col);
|
|
80216
|
+
});
|
|
80217
|
+
}
|
|
79590
80218
|
listTableDeleteRecords(recordIndexs, this);
|
|
79591
80219
|
adjustHeightResizedRowMapWithDeleteRecordIndex(this, recordIndexs);
|
|
79592
80220
|
this.internalProps.emptyTip?.resetVisible();
|
|
@@ -79604,6 +80232,46 @@
|
|
|
79604
80232
|
: recordIndexs.length
|
|
79605
80233
|
});
|
|
79606
80234
|
}
|
|
80235
|
+
if (Array.isArray(this.options.customMergeCell)) {
|
|
80236
|
+
this.internalProps.customMergeCell = getCustomMergeCellFunc(this.options.customMergeCell);
|
|
80237
|
+
this.options.customMergeCell.forEach(m => {
|
|
80238
|
+
const r = m?.range;
|
|
80239
|
+
if (!r?.start) {
|
|
80240
|
+
return;
|
|
80241
|
+
}
|
|
80242
|
+
for (let col = r.start.col; col <= r.end.col; col++) {
|
|
80243
|
+
for (let row = r.start.row; row <= r.end.row; row++) {
|
|
80244
|
+
this.scenegraph.updateCellContent(col, row);
|
|
80245
|
+
}
|
|
80246
|
+
}
|
|
80247
|
+
});
|
|
80248
|
+
this.scenegraph.updateNextFrame();
|
|
80249
|
+
setTimeout(() => {
|
|
80250
|
+
if (!this.internalProps || !this.options || !this.scenegraph) {
|
|
80251
|
+
return;
|
|
80252
|
+
}
|
|
80253
|
+
if (Array.isArray(this.options.customMergeCell)) {
|
|
80254
|
+
this.internalProps.customMergeCell = getCustomMergeCellFunc(this.options.customMergeCell);
|
|
80255
|
+
}
|
|
80256
|
+
const refreshRanges = [
|
|
80257
|
+
...prevMergeRanges,
|
|
80258
|
+
...(Array.isArray(this.options.customMergeCell)
|
|
80259
|
+
? this.options.customMergeCell.map(m => m?.range)
|
|
80260
|
+
: [])
|
|
80261
|
+
].filter(Boolean);
|
|
80262
|
+
refreshRanges.forEach(r => {
|
|
80263
|
+
if (!r?.start) {
|
|
80264
|
+
return;
|
|
80265
|
+
}
|
|
80266
|
+
for (let col = r.start.col; col <= r.end.col; col++) {
|
|
80267
|
+
for (let row = r.start.row; row <= r.end.row; row++) {
|
|
80268
|
+
this.scenegraph.updateCellContent(col, row);
|
|
80269
|
+
}
|
|
80270
|
+
}
|
|
80271
|
+
});
|
|
80272
|
+
this.scenegraph.updateNextFrame();
|
|
80273
|
+
}, 0);
|
|
80274
|
+
}
|
|
79607
80275
|
}
|
|
79608
80276
|
updateRecords(records, recordIndexs, triggerEvent = true) {
|
|
79609
80277
|
listTableUpdateRecords(records, recordIndexs, this);
|
|
@@ -79760,6 +80428,7 @@
|
|
|
79760
80428
|
}
|
|
79761
80429
|
}
|
|
79762
80430
|
this.scenegraph.updateNextFrame();
|
|
80431
|
+
this.fireListeners(TABLE_EVENT_TYPE.MERGE_CELLS, { startCol, startRow, endCol, endRow });
|
|
79763
80432
|
}
|
|
79764
80433
|
unmergeCells(startCol, startRow, endCol, endRow) {
|
|
79765
80434
|
if (!this.options.customMergeCell) {
|
|
@@ -79779,6 +80448,7 @@
|
|
|
79779
80448
|
}
|
|
79780
80449
|
}
|
|
79781
80450
|
this.scenegraph.updateNextFrame();
|
|
80451
|
+
this.fireListeners(TABLE_EVENT_TYPE.UNMERGE_CELLS, { startCol, startRow, endCol, endRow });
|
|
79782
80452
|
}
|
|
79783
80453
|
}
|
|
79784
80454
|
|
|
@@ -83556,13 +84226,13 @@
|
|
|
83556
84226
|
const checkedStroke = getProp('checkedStroke', style, col, row, table);
|
|
83557
84227
|
const disableCheckedFill = getProp('disableCheckedFill', style, col, row, table);
|
|
83558
84228
|
const disableCheckedStroke = getProp('disableCheckedStroke', style, col, row, table);
|
|
83559
|
-
if (isNumber$
|
|
84229
|
+
if (isNumber$3(outerRadius)) {
|
|
83560
84230
|
size = outerRadius * 2;
|
|
83561
84231
|
}
|
|
83562
84232
|
else {
|
|
83563
84233
|
outerRadius = Math.round(size / 2);
|
|
83564
84234
|
}
|
|
83565
|
-
if (!isNumber$
|
|
84235
|
+
if (!isNumber$3(innerRadius) || innerRadius < 0) {
|
|
83566
84236
|
innerRadius = Math.round((outerRadius / 7) * 3);
|
|
83567
84237
|
}
|
|
83568
84238
|
const value = table.getCellValue(col, row);
|
|
@@ -84657,7 +85327,7 @@
|
|
|
84657
85327
|
let contentWidth = width;
|
|
84658
85328
|
let contentHeight = height;
|
|
84659
85329
|
let _contentOffset = 0;
|
|
84660
|
-
if (isNumber$
|
|
85330
|
+
if (isNumber$3(table.theme._contentOffset)) {
|
|
84661
85331
|
_contentOffset = table.theme._contentOffset;
|
|
84662
85332
|
}
|
|
84663
85333
|
const percentCompleteBarGroup = new Group$1({
|
|
@@ -85116,10 +85786,10 @@
|
|
|
85116
85786
|
max = domainMax + (domainMax - domainMin) * axisOption.expand.max;
|
|
85117
85787
|
}
|
|
85118
85788
|
}
|
|
85119
|
-
if (isNumber$
|
|
85789
|
+
if (isNumber$3(axisOption?.min)) {
|
|
85120
85790
|
min = axisOption.min;
|
|
85121
85791
|
}
|
|
85122
|
-
if (isNumber$
|
|
85792
|
+
if (isNumber$3(axisOption?.max)) {
|
|
85123
85793
|
max = axisOption.max;
|
|
85124
85794
|
}
|
|
85125
85795
|
let scale;
|
|
@@ -85167,7 +85837,7 @@
|
|
|
85167
85837
|
scaleTicks = scale.forceTicks(target?.targetTicks?.length ?? axisOption?.tick?.forceTickCount);
|
|
85168
85838
|
}
|
|
85169
85839
|
else {
|
|
85170
|
-
scaleTicks = scale.ticks(isNumber$
|
|
85840
|
+
scaleTicks = scale.ticks(isNumber$3(axisOption?.tick?.tickCount) ? axisOption.tick.tickCount : DEFAULT_CONTINUOUS_TICK_COUNT, {
|
|
85171
85841
|
noDecimals: axisOption?.tick?.noDecimals
|
|
85172
85842
|
});
|
|
85173
85843
|
}
|
|
@@ -92068,10 +92738,11 @@
|
|
|
92068
92738
|
}
|
|
92069
92739
|
this.dataset.updateSortRules(sortRules);
|
|
92070
92740
|
this._changePivotSortStateBySortRules();
|
|
92741
|
+
this._filterHideIndicatorNode();
|
|
92071
92742
|
const { layoutMap } = this.internalProps;
|
|
92072
92743
|
layoutMap.resetHeaderTree();
|
|
92073
92744
|
this.scenegraph.clearCells();
|
|
92074
|
-
if (isNumber$
|
|
92745
|
+
if (isNumber$3(col) && isNumber$3(row)) {
|
|
92075
92746
|
if (this.isRowHeader(col, row)) {
|
|
92076
92747
|
this.setMinMaxLimitWidth(true);
|
|
92077
92748
|
this.internalProps._widthResizedColMap.clear();
|
|
@@ -92134,6 +92805,15 @@
|
|
|
92134
92805
|
});
|
|
92135
92806
|
}
|
|
92136
92807
|
}
|
|
92808
|
+
_filterHideIndicatorNode() {
|
|
92809
|
+
const options = this.options;
|
|
92810
|
+
if (options.indicatorsAsCol !== false && options.indicators && this.dataset.colHeaderTree) {
|
|
92811
|
+
deleteHideIndicatorNode(this.dataset.colHeaderTree, options.indicators, false, this);
|
|
92812
|
+
}
|
|
92813
|
+
if (options.indicatorsAsCol === false && this.dataset.rowHeaderTree && options.indicators) {
|
|
92814
|
+
deleteHideIndicatorNode(this.dataset.rowHeaderTree, options.indicators, false, this);
|
|
92815
|
+
}
|
|
92816
|
+
}
|
|
92137
92817
|
updatePivotSortState(pivotSortStateConfig) {
|
|
92138
92818
|
this.pivotSortState = pivotSortStateConfig;
|
|
92139
92819
|
}
|
|
@@ -92877,6 +93557,7 @@
|
|
|
92877
93557
|
this.internalProps.dataConfig.filterRules = filterRules;
|
|
92878
93558
|
if (isResetTree) {
|
|
92879
93559
|
this.dataset.updateFilterRules(filterRules, true);
|
|
93560
|
+
this._filterHideIndicatorNode();
|
|
92880
93561
|
this.internalProps.layoutMap.resetHeaderTree();
|
|
92881
93562
|
}
|
|
92882
93563
|
else {
|
|
@@ -93898,7 +94579,7 @@
|
|
|
93898
94579
|
this.render();
|
|
93899
94580
|
}
|
|
93900
94581
|
clearChartCacheImage(col, row) {
|
|
93901
|
-
if (isNumber$
|
|
94582
|
+
if (isNumber$3(col) && isNumber$3(row)) {
|
|
93902
94583
|
clearCellChartCacheImage(col, row, this.scenegraph);
|
|
93903
94584
|
}
|
|
93904
94585
|
else {
|
|
@@ -94820,7 +95501,7 @@
|
|
|
94820
95501
|
}
|
|
94821
95502
|
|
|
94822
95503
|
registerForVrender();
|
|
94823
|
-
const version = "1.
|
|
95504
|
+
const version = "1.24.0-alpha.0";
|
|
94824
95505
|
function getIcons() {
|
|
94825
95506
|
return get$2();
|
|
94826
95507
|
}
|
|
@@ -94833,6 +95514,7 @@
|
|
|
94833
95514
|
exports.CustomLayout = index;
|
|
94834
95515
|
exports.DataStatistics = DataStatistics;
|
|
94835
95516
|
exports.EventTarget = EventTarget$1;
|
|
95517
|
+
exports.Group = Group$2;
|
|
94836
95518
|
exports.Icon = Icon$1;
|
|
94837
95519
|
exports.ListTable = ListTableAll;
|
|
94838
95520
|
exports.ListTableSimple = ListTableSimple;
|
|
@@ -94866,6 +95548,8 @@
|
|
|
94866
95548
|
exports.getTargetCell = getTargetCell;
|
|
94867
95549
|
exports.graphicUtil = graphicUtil;
|
|
94868
95550
|
exports.jsx = jsx;
|
|
95551
|
+
exports.mapToCanvasPointForCanvas = mapToCanvasPointForCanvas;
|
|
95552
|
+
exports.matrixAllocate = matrixAllocate;
|
|
94869
95553
|
exports.pluginsDefinition = index$1;
|
|
94870
95554
|
exports.register = register$1;
|
|
94871
95555
|
exports.registerAnimation = registerAnimation;
|
|
@@ -94874,6 +95558,7 @@
|
|
|
94874
95558
|
exports.registerChartCell = registerChartCell;
|
|
94875
95559
|
exports.registerCheckboxCell = registerCheckboxCell;
|
|
94876
95560
|
exports.registerEmptyTip = registerEmptyTip;
|
|
95561
|
+
exports.registerGlobalEventTransformer = registerGlobalEventTransformer;
|
|
94877
95562
|
exports.registerImageCell = registerImageCell;
|
|
94878
95563
|
exports.registerLegend = registerLegend;
|
|
94879
95564
|
exports.registerMenu = registerMenu;
|
|
@@ -94885,13 +95570,16 @@
|
|
|
94885
95570
|
exports.registerTitle = registerTitle;
|
|
94886
95571
|
exports.registerTooltip = registerTooltip;
|
|
94887
95572
|
exports.registerVideoCell = registerVideoCell;
|
|
95573
|
+
exports.registerWindowEventTransformer = registerWindowEventTransformer;
|
|
94888
95574
|
exports.renderChart = renderChart;
|
|
94889
95575
|
exports.restoreMeasureText = restoreMeasureText;
|
|
94890
95576
|
exports.setCustomAlphabetCharSet = setCustomAlphabetCharSet;
|
|
94891
95577
|
exports.textMeasure = textMeasure;
|
|
94892
95578
|
exports.themes = themes$1;
|
|
94893
95579
|
exports.toBoxArray = toBoxArray$1;
|
|
95580
|
+
exports.transformPointForCanvas = transformPointForCanvas;
|
|
94894
95581
|
exports.updateCell = updateCell$1;
|
|
94895
95582
|
exports.version = version;
|
|
95583
|
+
exports.vglobal = vglobal;
|
|
94896
95584
|
|
|
94897
95585
|
}));
|