@visactor/vtable-sheet 1.22.11-alpha.4 → 1.22.11-alpha.6
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/formula/formula-engine.js +2 -1
- package/cjs/formula/formula-paste-processor.js +1 -2
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/vtable-sheet.js +308 -126
- package/dist/vtable-sheet.min.js +1 -1
- package/es/formula/formula-engine.js +2 -1
- package/es/formula/formula-paste-processor.js +1 -2
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +6 -6
package/dist/vtable-sheet.js
CHANGED
|
@@ -37856,6 +37856,24 @@
|
|
|
37856
37856
|
}, delay));
|
|
37857
37857
|
};
|
|
37858
37858
|
}
|
|
37859
|
+
function cancellableThrottle(func, delay) {
|
|
37860
|
+
let timer = null,
|
|
37861
|
+
lastArgs = null,
|
|
37862
|
+
context = null;
|
|
37863
|
+
return {
|
|
37864
|
+
throttled: function (...args) {
|
|
37865
|
+
lastArgs = args, context = this, timer || (timer = setTimeout(() => {
|
|
37866
|
+
lastArgs && func.apply(context, lastArgs), timer = null, lastArgs = null, context = null;
|
|
37867
|
+
}, delay));
|
|
37868
|
+
},
|
|
37869
|
+
cancel: () => {
|
|
37870
|
+
timer && (clearTimeout(timer), timer = null, lastArgs = null, context = null);
|
|
37871
|
+
},
|
|
37872
|
+
flush: () => {
|
|
37873
|
+
timer && lastArgs && (clearTimeout(timer), func.apply(context, lastArgs), timer = null, lastArgs = null, context = null);
|
|
37874
|
+
}
|
|
37875
|
+
};
|
|
37876
|
+
}
|
|
37859
37877
|
function pad(num, totalChars) {
|
|
37860
37878
|
for (num = `${num}`; num.length < totalChars;) num = "0" + num;
|
|
37861
37879
|
return num;
|
|
@@ -39848,6 +39866,9 @@
|
|
|
39848
39866
|
var _a;
|
|
39849
39867
|
return null !== (_a = defaultStyle.textAlign) && void 0 !== _a ? _a : "left";
|
|
39850
39868
|
},
|
|
39869
|
+
get textStickBaseOnAlign() {
|
|
39870
|
+
return defaultStyle.textStickBaseOnAlign;
|
|
39871
|
+
},
|
|
39851
39872
|
get textBaseline() {
|
|
39852
39873
|
var _a;
|
|
39853
39874
|
return null !== (_a = defaultStyle.textBaseline) && void 0 !== _a ? _a : "middle";
|
|
@@ -40531,6 +40552,9 @@
|
|
|
40531
40552
|
get textStick() {
|
|
40532
40553
|
return style.textStick;
|
|
40533
40554
|
},
|
|
40555
|
+
get textStickBaseOnAlign() {
|
|
40556
|
+
return style.textStickBaseOnAlign;
|
|
40557
|
+
},
|
|
40534
40558
|
get marked() {
|
|
40535
40559
|
return style.marked;
|
|
40536
40560
|
},
|
|
@@ -47698,11 +47722,35 @@
|
|
|
47698
47722
|
return hoverMode;
|
|
47699
47723
|
}
|
|
47700
47724
|
|
|
47725
|
+
let brushingChartInstance,
|
|
47726
|
+
brushingChartInstanceCellPos = {
|
|
47727
|
+
col: -1,
|
|
47728
|
+
row: -1
|
|
47729
|
+
};
|
|
47730
|
+
function setBrushingChartInstance(chartInstance, col, row) {
|
|
47731
|
+
brushingChartInstance = chartInstance, brushingChartInstanceCellPos = {
|
|
47732
|
+
col: col,
|
|
47733
|
+
row: row
|
|
47734
|
+
};
|
|
47735
|
+
}
|
|
47736
|
+
function clearBrushingChartInstance() {
|
|
47737
|
+
brushingChartInstance = void 0, brushingChartInstanceCellPos = {
|
|
47738
|
+
col: -1,
|
|
47739
|
+
row: -1
|
|
47740
|
+
};
|
|
47741
|
+
}
|
|
47742
|
+
function getBrushingChartInstance() {
|
|
47743
|
+
return brushingChartInstance;
|
|
47744
|
+
}
|
|
47745
|
+
function getBrushingChartInstanceCellPos() {
|
|
47746
|
+
return brushingChartInstanceCellPos;
|
|
47747
|
+
}
|
|
47701
47748
|
const chartInstanceListColumnByColumnDirection = {};
|
|
47702
47749
|
const chartInstanceListRowByRowDirection = {};
|
|
47750
|
+
const delayRunDimensionHoverTimer = [];
|
|
47703
47751
|
function generateChartInstanceListByColumnDirection(col, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = !1, isScatter = !1) {
|
|
47704
47752
|
var _a;
|
|
47705
|
-
isValid$2(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
|
|
47753
|
+
clearDelayRunDimensionHoverTimers(), isValid$2(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
|
|
47706
47754
|
const {
|
|
47707
47755
|
rowStart: rowStart
|
|
47708
47756
|
} = table.getBodyVisibleRowRange();
|
|
@@ -47711,76 +47759,40 @@
|
|
|
47711
47759
|
for (let i = rowStart; i <= rowEnd; i++) {
|
|
47712
47760
|
const cellGroup = table.scenegraph.getCell(col, i),
|
|
47713
47761
|
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
47714
|
-
|
|
47715
|
-
|
|
47762
|
+
chartInstanceListColumnByColumnDirection[col][i] || isValid$2(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance);
|
|
47763
|
+
const timer = setTimeout(() => {
|
|
47764
|
+
var _a, _b, _c, _d;
|
|
47716
47765
|
if (null === (_a = chartInstanceListColumnByColumnDirection[col]) || void 0 === _a ? void 0 : _a[i]) {
|
|
47717
47766
|
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
47718
47767
|
let isShowTooltip = !isScatter;
|
|
47719
|
-
if (
|
|
47720
|
-
const
|
|
47721
|
-
|
|
47722
|
-
rowEnd: rowEnd1
|
|
47723
|
-
} = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
|
|
47724
|
-
if (rowEnd1 === rowEnd) isShowTooltip = !0;else {
|
|
47725
|
-
const {
|
|
47726
|
-
rowEnd: rowEnd2
|
|
47727
|
-
} = table.getBodyVisibleRowRange(0, 5);
|
|
47728
|
-
isShowTooltip = rowEnd2 !== rowEnd;
|
|
47729
|
-
}
|
|
47730
|
-
} else if (i === rowStart && isShowTooltip) {
|
|
47731
|
-
const heightLimitToShowTooltipForEdgeRow = null !== (_d = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _d ? _d : 0,
|
|
47732
|
-
{
|
|
47733
|
-
rowStart: rowStart1
|
|
47734
|
-
} = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
|
|
47735
|
-
if (rowStart1 === rowStart) isShowTooltip = !0;else {
|
|
47736
|
-
const {
|
|
47737
|
-
rowStart: rowStart2
|
|
47738
|
-
} = table.getBodyVisibleRowRange(0, -5);
|
|
47739
|
-
isShowTooltip = rowStart2 !== rowStart;
|
|
47740
|
-
}
|
|
47741
|
-
}
|
|
47742
|
-
if (isScatter) table.stateManager.hover.cellPos.col === col && table.stateManager.hover.cellPos.row === i || null === (_f = (_e = chartInstanceListColumnByColumnDirection[col][i]).showCrosshair) || void 0 === _f || _f.call(_e, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue);else {
|
|
47743
|
-
const bodyBoundryTop = table.frozenRowCount ? table.getCellRelativeRect(col, table.frozenRowCount - 1).bottom : 0,
|
|
47768
|
+
if (isScatter || "object" != typeof chartDimensionLinkage || (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeRow(i, table)), isScatter) table.stateManager.hover.cellPos.col === col && table.stateManager.hover.cellPos.row === i || null === (_d = (_c = chartInstanceListColumnByColumnDirection[col][i]).showCrosshair) || void 0 === _d || _d.call(_c, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue);else {
|
|
47769
|
+
const cellBoundry = table.getCellRelativeRect(col, i),
|
|
47770
|
+
bodyBoundryTop = table.frozenRowCount ? table.getCellRelativeRect(col, table.frozenRowCount - 1).bottom : 0,
|
|
47744
47771
|
absolutePositionTop = Math.max(bodyBoundryTop, table.getCellRelativeRect(col, i).top);
|
|
47745
47772
|
hideTooltip ? (table.stateManager.hover.cellPos.col === col && table.stateManager.hover.cellPos.row === i || chartInstanceListColumnByColumnDirection[col][i].hideTooltip(), chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
47746
47773
|
tooltip: !1,
|
|
47747
47774
|
showTooltipOption: {
|
|
47748
|
-
x: canvasXY.x,
|
|
47749
|
-
y: absolutePositionTop,
|
|
47775
|
+
x: canvasXY.x - cellBoundry.left,
|
|
47776
|
+
y: absolutePositionTop - cellBoundry.top,
|
|
47750
47777
|
activeType: "dimension"
|
|
47751
47778
|
}
|
|
47752
47779
|
})) : chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
47753
47780
|
tooltip: isShowTooltip,
|
|
47754
47781
|
showTooltipOption: {
|
|
47755
|
-
x: canvasXY.x,
|
|
47756
|
-
y: absolutePositionTop,
|
|
47782
|
+
x: canvasXY.x - cellBoundry.left,
|
|
47783
|
+
y: absolutePositionTop - cellBoundry.top,
|
|
47757
47784
|
activeType: "dimension"
|
|
47758
47785
|
}
|
|
47759
47786
|
});
|
|
47760
47787
|
}
|
|
47761
47788
|
}
|
|
47762
|
-
}, 0)
|
|
47763
|
-
|
|
47764
|
-
}
|
|
47765
|
-
function clearChartInstanceListByColumnDirection(col, excludedRow, table) {
|
|
47766
|
-
var _a;
|
|
47767
|
-
if (isValid$2(chartInstanceListColumnByColumnDirection[col])) {
|
|
47768
|
-
for (const i in chartInstanceListColumnByColumnDirection[col]) {
|
|
47769
|
-
if (isValid$2(excludedRow) && Number(i) === excludedRow) continue;
|
|
47770
|
-
const cellGroup = table.scenegraph.getCell(col, Number(i)),
|
|
47771
|
-
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
47772
|
-
chartNode.addUpdateShapeAndBoundsTag(), isValid$2(chartNode) && (chartNode.deactivate(table, {
|
|
47773
|
-
releaseChartInstance: !0,
|
|
47774
|
-
releaseColumnChartInstance: !1,
|
|
47775
|
-
releaseRowChartInstance: !1
|
|
47776
|
-
}), chartInstanceListColumnByColumnDirection[col][i] = null);
|
|
47777
|
-
}
|
|
47778
|
-
delete chartInstanceListColumnByColumnDirection[col];
|
|
47789
|
+
}, 0);
|
|
47790
|
+
delayRunDimensionHoverTimer.push(timer), table.scenegraph.updateNextFrame();
|
|
47779
47791
|
}
|
|
47780
47792
|
}
|
|
47781
47793
|
function generateChartInstanceListByRowDirection(row, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = !1, isScatter = !1) {
|
|
47782
47794
|
var _a;
|
|
47783
|
-
isValid$2(chartInstanceListRowByRowDirection[row]) || (chartInstanceListRowByRowDirection[row] = {});
|
|
47795
|
+
clearDelayRunDimensionHoverTimers(), isValid$2(chartInstanceListRowByRowDirection[row]) || (chartInstanceListRowByRowDirection[row] = {});
|
|
47784
47796
|
const {
|
|
47785
47797
|
colStart: colStart
|
|
47786
47798
|
} = table.getBodyVisibleColRange();
|
|
@@ -47789,64 +47801,162 @@
|
|
|
47789
47801
|
for (let i = colStart; i <= colEnd; i++) {
|
|
47790
47802
|
const cellGroup = table.scenegraph.getCell(i, row),
|
|
47791
47803
|
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
47792
|
-
|
|
47804
|
+
chartInstanceListRowByRowDirection[row][i] || isValid$2(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance);
|
|
47805
|
+
const timer = setTimeout(() => {
|
|
47793
47806
|
var _a, _b, _c, _d;
|
|
47794
47807
|
if (null === (_a = chartInstanceListRowByRowDirection[row]) || void 0 === _a ? void 0 : _a[i]) {
|
|
47795
47808
|
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
47796
47809
|
let isShowTooltip = !isScatter;
|
|
47797
|
-
if (
|
|
47798
|
-
const
|
|
47799
|
-
|
|
47800
|
-
colEnd: colEnd1
|
|
47801
|
-
} = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
|
|
47802
|
-
if (colEnd1 === colEnd) isShowTooltip = !0;else {
|
|
47803
|
-
const {
|
|
47804
|
-
colEnd: colEnd2
|
|
47805
|
-
} = table.getBodyVisibleColRange(0, 5);
|
|
47806
|
-
isShowTooltip = colEnd2 !== colEnd;
|
|
47807
|
-
}
|
|
47808
|
-
} else if (i === colStart && isShowTooltip) {
|
|
47809
|
-
const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
|
|
47810
|
-
{
|
|
47811
|
-
colStart: colStart1
|
|
47812
|
-
} = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
|
|
47813
|
-
if (colStart1 === colStart) isShowTooltip = !0;else {
|
|
47814
|
-
const {
|
|
47815
|
-
colStart: colStart2
|
|
47816
|
-
} = table.getBodyVisibleColRange(0, -5);
|
|
47817
|
-
isShowTooltip = colStart2 !== colStart;
|
|
47818
|
-
}
|
|
47819
|
-
}
|
|
47820
|
-
if (isScatter) table.stateManager.hover.cellPos.col === i && table.stateManager.hover.cellPos.row === row || null === (_d = (_c = chartInstanceListRowByRowDirection[row][i]).showCrosshair) || void 0 === _d || _d.call(_c, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue);else {
|
|
47821
|
-
const bodyBoundryLeft = table.frozenColCount ? table.getCellRelativeRect(table.frozenColCount - 1, row).right : 0,
|
|
47810
|
+
if (isScatter || "object" != typeof chartDimensionLinkage || (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeColumn(i, table)), isScatter) table.stateManager.hover.cellPos.col === i && table.stateManager.hover.cellPos.row === row || null === (_d = (_c = chartInstanceListRowByRowDirection[row][i]).showCrosshair) || void 0 === _d || _d.call(_c, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue);else {
|
|
47811
|
+
const cellBoundry = table.getCellRelativeRect(i, row),
|
|
47812
|
+
bodyBoundryLeft = table.frozenColCount ? table.getCellRelativeRect(table.frozenColCount - 1, row).right : 0,
|
|
47822
47813
|
absolutePositionLeft = Math.max(bodyBoundryLeft, table.getCellRelativeRect(i, row).left);
|
|
47823
47814
|
hideTooltip ? (table.stateManager.hover.cellPos.col === i && table.stateManager.hover.cellPos.row === row || chartInstanceListRowByRowDirection[row][i].hideTooltip(), chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
47824
47815
|
tooltip: !1,
|
|
47825
47816
|
showTooltipOption: {
|
|
47826
|
-
x: absolutePositionLeft,
|
|
47827
|
-
y: canvasXY.y,
|
|
47817
|
+
x: absolutePositionLeft - cellBoundry.left,
|
|
47818
|
+
y: canvasXY.y - cellBoundry.top,
|
|
47828
47819
|
activeType: "dimension"
|
|
47829
47820
|
}
|
|
47830
47821
|
})) : chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
47831
47822
|
tooltip: isShowTooltip,
|
|
47832
47823
|
showTooltipOption: {
|
|
47833
|
-
x: absolutePositionLeft,
|
|
47834
|
-
y: canvasXY.y,
|
|
47824
|
+
x: absolutePositionLeft - cellBoundry.left,
|
|
47825
|
+
y: canvasXY.y - cellBoundry.top,
|
|
47835
47826
|
activeType: "dimension"
|
|
47836
47827
|
}
|
|
47837
47828
|
});
|
|
47838
47829
|
}
|
|
47839
47830
|
}
|
|
47840
|
-
}, 0)
|
|
47831
|
+
}, 0);
|
|
47832
|
+
delayRunDimensionHoverTimer.push(timer), table.scenegraph.updateNextFrame();
|
|
47833
|
+
}
|
|
47834
|
+
}
|
|
47835
|
+
function generateChartInstanceListByViewRange(datum, table, deactivate = !1) {
|
|
47836
|
+
var _a;
|
|
47837
|
+
clearDelayRunDimensionHoverTimers();
|
|
47838
|
+
const {
|
|
47839
|
+
rowStart: rowStart
|
|
47840
|
+
} = table.getBodyVisibleRowRange();
|
|
47841
|
+
let rowEnd = table.getBodyVisibleRowRange().rowEnd;
|
|
47842
|
+
rowEnd = Math.min(table.rowCount - 1 - table.bottomFrozenRowCount, rowEnd);
|
|
47843
|
+
const {
|
|
47844
|
+
colStart: colStart
|
|
47845
|
+
} = table.getBodyVisibleColRange();
|
|
47846
|
+
let colEnd = table.getBodyVisibleColRange().colEnd;
|
|
47847
|
+
colEnd = Math.min(table.colCount - 1 - table.rightFrozenColCount, colEnd);
|
|
47848
|
+
for (let col = colStart; col <= colEnd; col++) {
|
|
47849
|
+
isValid$2(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
|
|
47850
|
+
for (let i = rowStart; i <= rowEnd; i++) {
|
|
47851
|
+
const cellGroup = table.scenegraph.getCell(col, i),
|
|
47852
|
+
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
47853
|
+
chartInstanceListColumnByColumnDirection[col][i] || isValid$2(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.activeChartInstance ? chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance : "pie" === chartNode.attribute.spec.type && (chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance));
|
|
47854
|
+
const timer = setTimeout(() => {
|
|
47855
|
+
var _a, _b;
|
|
47856
|
+
if (null === (_a = chartInstanceListColumnByColumnDirection[col]) || void 0 === _a ? void 0 : _a[i]) {
|
|
47857
|
+
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
47858
|
+
let isShowTooltip = !0;
|
|
47859
|
+
"object" == typeof chartDimensionLinkage && (deactivate ? (chartInstanceListColumnByColumnDirection[col][i].setHovered(), chartInstanceListColumnByColumnDirection[col][i].hideTooltip()) : (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeRow(i, table), isShowTooltip = isShowTooltip && checkIsShowTooltipForEdgeColumn(col, table), chartInstanceListColumnByColumnDirection[col][i].setHovered(datum), isShowTooltip && chartInstanceListColumnByColumnDirection[col][i].showTooltip(datum, {
|
|
47860
|
+
activeType: "mark"
|
|
47861
|
+
})));
|
|
47862
|
+
}
|
|
47863
|
+
}, 0);
|
|
47864
|
+
delayRunDimensionHoverTimer.push(timer), table.scenegraph.updateNextFrame();
|
|
47865
|
+
}
|
|
47866
|
+
}
|
|
47867
|
+
}
|
|
47868
|
+
function checkIsShowTooltipForEdgeRow(row, table) {
|
|
47869
|
+
var _a, _b;
|
|
47870
|
+
let isShowTooltip = !0;
|
|
47871
|
+
const {
|
|
47872
|
+
rowStart: rowStart
|
|
47873
|
+
} = table.getBodyVisibleRowRange();
|
|
47874
|
+
let rowEnd = table.getBodyVisibleRowRange().rowEnd;
|
|
47875
|
+
rowEnd = Math.min(table.rowCount - 1 - table.bottomFrozenRowCount, rowEnd);
|
|
47876
|
+
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
47877
|
+
if (row === rowEnd && isShowTooltip) {
|
|
47878
|
+
const heightLimitToShowTooltipForEdgeRow = null !== (_a = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _a ? _a : 0,
|
|
47879
|
+
{
|
|
47880
|
+
rowEnd: rowEnd1
|
|
47881
|
+
} = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
|
|
47882
|
+
if (rowEnd1 === rowEnd) isShowTooltip = !0;else {
|
|
47883
|
+
const {
|
|
47884
|
+
rowEnd: rowEnd2
|
|
47885
|
+
} = table.getBodyVisibleRowRange(0, 5);
|
|
47886
|
+
isShowTooltip = rowEnd2 !== rowEnd;
|
|
47887
|
+
}
|
|
47888
|
+
} else if (row === rowStart && isShowTooltip) {
|
|
47889
|
+
const heightLimitToShowTooltipForEdgeRow = null !== (_b = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _b ? _b : 0,
|
|
47890
|
+
{
|
|
47891
|
+
rowStart: rowStart1
|
|
47892
|
+
} = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
|
|
47893
|
+
if (rowStart1 === rowStart) isShowTooltip = !0;else {
|
|
47894
|
+
const {
|
|
47895
|
+
rowStart: rowStart2
|
|
47896
|
+
} = table.getBodyVisibleRowRange(0, -5);
|
|
47897
|
+
isShowTooltip = rowStart2 !== rowStart;
|
|
47898
|
+
}
|
|
47841
47899
|
}
|
|
47900
|
+
return isShowTooltip;
|
|
47842
47901
|
}
|
|
47843
|
-
function
|
|
47902
|
+
function checkIsShowTooltipForEdgeColumn(col, table) {
|
|
47903
|
+
let isShowTooltip = !0;
|
|
47904
|
+
const {
|
|
47905
|
+
colStart: colStart
|
|
47906
|
+
} = table.getBodyVisibleColRange();
|
|
47907
|
+
let colEnd = table.getBodyVisibleColRange().colEnd;
|
|
47908
|
+
colEnd = Math.min(table.colCount - 1 - table.rightFrozenColCount, colEnd);
|
|
47909
|
+
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
47910
|
+
if (col === colEnd && isShowTooltip) {
|
|
47911
|
+
const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
|
|
47912
|
+
{
|
|
47913
|
+
colEnd: colEnd1
|
|
47914
|
+
} = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
|
|
47915
|
+
if (colEnd1 === colEnd) isShowTooltip = !0;else {
|
|
47916
|
+
const {
|
|
47917
|
+
colEnd: colEnd2
|
|
47918
|
+
} = table.getBodyVisibleColRange(0, 5);
|
|
47919
|
+
isShowTooltip = colEnd2 !== colEnd;
|
|
47920
|
+
}
|
|
47921
|
+
} else if (col === colStart && isShowTooltip) {
|
|
47922
|
+
const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
|
|
47923
|
+
{
|
|
47924
|
+
colStart: colStart1
|
|
47925
|
+
} = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
|
|
47926
|
+
if (colStart1 === colStart) isShowTooltip = !0;else {
|
|
47927
|
+
const {
|
|
47928
|
+
colStart: colStart2
|
|
47929
|
+
} = table.getBodyVisibleColRange(0, -5);
|
|
47930
|
+
isShowTooltip = colStart2 !== colStart;
|
|
47931
|
+
}
|
|
47932
|
+
}
|
|
47933
|
+
return isShowTooltip;
|
|
47934
|
+
}
|
|
47935
|
+
function clearChartInstanceListByColumnDirection(col, excludedRow, table, forceRelease = !1) {
|
|
47936
|
+
var _a;
|
|
47937
|
+
if (isValid$2(chartInstanceListColumnByColumnDirection[col])) {
|
|
47938
|
+
for (const i in chartInstanceListColumnByColumnDirection[col]) {
|
|
47939
|
+
if (isValid$2(excludedRow) && Number(i) === excludedRow) continue;
|
|
47940
|
+
const cellGroup = table.scenegraph.getCell(col, Number(i)),
|
|
47941
|
+
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
47942
|
+
isValid$2(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.deactivate(table, {
|
|
47943
|
+
forceRelease: forceRelease,
|
|
47944
|
+
releaseChartInstance: !0,
|
|
47945
|
+
releaseColumnChartInstance: !1,
|
|
47946
|
+
releaseRowChartInstance: !1
|
|
47947
|
+
}), chartInstanceListColumnByColumnDirection[col][i] = null);
|
|
47948
|
+
}
|
|
47949
|
+
delete chartInstanceListColumnByColumnDirection[col];
|
|
47950
|
+
}
|
|
47951
|
+
}
|
|
47952
|
+
function clearChartInstanceListByRowDirection(row, excludedCol, table, forceRelease = !1) {
|
|
47844
47953
|
var _a;
|
|
47845
47954
|
if (isValid$2(chartInstanceListRowByRowDirection[row])) for (const i in chartInstanceListRowByRowDirection[row]) {
|
|
47846
47955
|
if (isValid$2(excludedCol) && Number(i) === excludedCol) continue;
|
|
47847
47956
|
const cellGroup = table.scenegraph.getCell(Number(i), row),
|
|
47848
47957
|
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
47849
|
-
|
|
47958
|
+
isValid$2(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.deactivate(table, {
|
|
47959
|
+
forceRelease: forceRelease,
|
|
47850
47960
|
releaseChartInstance: !0,
|
|
47851
47961
|
releaseColumnChartInstance: !1,
|
|
47852
47962
|
releaseRowChartInstance: !1
|
|
@@ -47854,6 +47964,15 @@
|
|
|
47854
47964
|
}
|
|
47855
47965
|
delete chartInstanceListRowByRowDirection[row];
|
|
47856
47966
|
}
|
|
47967
|
+
function clearDelayRunDimensionHoverTimers() {
|
|
47968
|
+
for (const timer of delayRunDimensionHoverTimer) clearTimeout(timer);
|
|
47969
|
+
delayRunDimensionHoverTimer.length = 0;
|
|
47970
|
+
}
|
|
47971
|
+
function clearAllChartInstanceList(table, forceRelease = !1) {
|
|
47972
|
+
clearDelayRunDimensionHoverTimers();
|
|
47973
|
+
for (const col in chartInstanceListColumnByColumnDirection) clearChartInstanceListByColumnDirection(Number(col), void 0, table, forceRelease);
|
|
47974
|
+
for (const row in chartInstanceListRowByRowDirection) clearChartInstanceListByRowDirection(Number(row), void 0, table, forceRelease);
|
|
47975
|
+
}
|
|
47857
47976
|
|
|
47858
47977
|
function isValidAlignDomain(domain) {
|
|
47859
47978
|
return 2 === domain.length && isValidNumber$1(domain[0]) && isValidNumber$1(domain[1]) && domain[1] >= domain[0];
|
|
@@ -48487,7 +48606,7 @@
|
|
|
48487
48606
|
const CHART_NUMBER_TYPE = genNumberType();
|
|
48488
48607
|
class Chart extends Rect$2 {
|
|
48489
48608
|
constructor(isShareChartSpec, params) {
|
|
48490
|
-
if (super(params), this.type = "chart", this.activeChartInstanceHoverOnMark = null, this.justShowMarkTooltip = void 0, this.justShowMarkTooltipTimer = Date.now(), this.delayRunDimensionHoverTimer = void 0, this.numberType = CHART_NUMBER_TYPE, this.isShareChartSpec = isShareChartSpec, params.chartInstance) this.chartInstance = params.chartInstance;else {
|
|
48609
|
+
if (super(params), this.type = "chart", this.activeChartInstanceLastViewBox = null, this.activeChartInstanceHoverOnMark = null, this.justShowMarkTooltip = void 0, this.justShowMarkTooltipTimer = Date.now(), this.delayRunDimensionHoverTimer = void 0, this.numberType = CHART_NUMBER_TYPE, this.isShareChartSpec = isShareChartSpec, params.chartInstance) this.chartInstance = params.chartInstance;else {
|
|
48491
48610
|
const chartInstance = this.chartInstance = new params.ClassType(params.spec, merge({}, this.attribute.tableChartOption, {
|
|
48492
48611
|
renderCanvas: params.canvas,
|
|
48493
48612
|
mode: "node" === this.attribute.mode ? "node" : "desktop-browser",
|
|
@@ -48508,7 +48627,7 @@
|
|
|
48508
48627
|
}
|
|
48509
48628
|
}
|
|
48510
48629
|
activate(table) {
|
|
48511
|
-
var _a, _b, _c, _d, _e;
|
|
48630
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
48512
48631
|
if (this.activeChartInstance) return;
|
|
48513
48632
|
const {
|
|
48514
48633
|
col: col,
|
|
@@ -48527,7 +48646,7 @@
|
|
|
48527
48646
|
y1: y1 - table.scrollTop,
|
|
48528
48647
|
y2: y2 - table.scrollTop
|
|
48529
48648
|
});
|
|
48530
|
-
|
|
48649
|
+
this.attribute.ClassType.globalConfig.uniqueTooltip = !1, this.activeChartInstance = new this.attribute.ClassType(this.attribute.spec, merge({}, this.attribute.tableChartOption, {
|
|
48531
48650
|
renderCanvas: this.attribute.canvas,
|
|
48532
48651
|
mode: "desktop-browser",
|
|
48533
48652
|
canvasControled: !1,
|
|
@@ -48561,7 +48680,7 @@
|
|
|
48561
48680
|
layer.main && drawParams.clear && hoverColor && (context.beginPath(), context.fillStyle = hoverColor, context.rect(viewBox.x1, viewBox.y1, viewBox.x2 - viewBox.x1, viewBox.y2 - viewBox.y1), context.fill());
|
|
48562
48681
|
}
|
|
48563
48682
|
},
|
|
48564
|
-
componentShowContent: table.options.chartDimensionLinkage && "scatter" !== this.attribute.spec.type ? {
|
|
48683
|
+
componentShowContent: (null === (_a = table.options.chartDimensionLinkage) || void 0 === _a ? void 0 : _a.showTooltip) && "scatter" !== this.attribute.spec.type ? {
|
|
48565
48684
|
tooltip: {
|
|
48566
48685
|
dimension: !1,
|
|
48567
48686
|
mark: !0
|
|
@@ -48572,15 +48691,40 @@
|
|
|
48572
48691
|
const chartStage = this.activeChartInstance.getStage(),
|
|
48573
48692
|
matrix = this.globalTransMatrix.clone(),
|
|
48574
48693
|
stageMatrix = this.stage.window.getViewBoxTransform();
|
|
48694
|
+
let brushChangeThrottle;
|
|
48575
48695
|
matrix.multiply(stageMatrix.a, stageMatrix.b, stageMatrix.c, stageMatrix.d, stageMatrix.e, stageMatrix.f), chartStage.window.setViewBoxTransform && chartStage.window.setViewBoxTransform(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f), this.activeChartInstance.renderSync(), null === (_c = null === (_b = table.internalProps.layoutMap) || void 0 === _b ? void 0 : _b.updateDataStateToActiveChartInstance) || void 0 === _c || _c.call(_b, this.activeChartInstance), this.activeChartInstance.on("click", params => {
|
|
48576
48696
|
var _a;
|
|
48577
|
-
!1 === (null === (_a = this.attribute.spec.select) || void 0 === _a ? void 0 : _a.enable) ? table.scenegraph.updateChartState(null) : Chart.temp && table.scenegraph.updateChartState(null == params ? void 0 : params.datum);
|
|
48697
|
+
!1 === (null === (_a = this.attribute.spec.select) || void 0 === _a ? void 0 : _a.enable) ? table.scenegraph.updateChartState(null, void 0) : Chart.temp && table.scenegraph.updateChartState(null == params ? void 0 : params.datum, "click");
|
|
48698
|
+
}), (null === (_d = table.options.chartDimensionLinkage) || void 0 === _d ? void 0 : _d.listenBrushChange) && (brushChangeThrottle = cancellableThrottle(table.scenegraph.updateChartState.bind(table.scenegraph), null !== (_f = null === (_e = table.options.chartDimensionLinkage) || void 0 === _e ? void 0 : _e.brushChangeDelay) && void 0 !== _f ? _f : 100), this.activeChartInstance.on("brushChange", params => {
|
|
48699
|
+
var _a;
|
|
48700
|
+
brushChangeThrottle.throttled(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData, "brush");
|
|
48701
|
+
})), this.activeChartInstance.on("brushStart", params => {
|
|
48702
|
+
const brushingChartInstance = getBrushingChartInstance();
|
|
48703
|
+
brushingChartInstance !== this.activeChartInstance && (brushingChartInstance && brushingChartInstance.getChart().getComponentsByKey("brush")[0].clearBrushStateAndMask(), setBrushingChartInstance(this.activeChartInstance, col, row));
|
|
48578
48704
|
}), this.activeChartInstance.on("brushEnd", params => {
|
|
48579
48705
|
var _a;
|
|
48580
|
-
table.scenegraph.updateChartState(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData), Chart.temp = 0, setTimeout(() => {
|
|
48706
|
+
null == brushChangeThrottle || brushChangeThrottle.cancel(), table.scenegraph.updateChartState(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData, "brush"), Chart.temp = 0, setTimeout(() => {
|
|
48581
48707
|
Chart.temp = 1;
|
|
48582
48708
|
}, 0);
|
|
48583
|
-
}), table.options.chartDimensionLinkage && this.activeChartInstance.on("
|
|
48709
|
+
}), (null === (_g = table.options.chartDimensionLinkage) || void 0 === _g ? void 0 : _g.showTooltip) && ("pie" === this.attribute.spec.type && (this.activeChartInstance.on("pointerover", {
|
|
48710
|
+
markName: "pie"
|
|
48711
|
+
}, params => {
|
|
48712
|
+
var _a;
|
|
48713
|
+
const categoryField = this.attribute.spec.categoryField,
|
|
48714
|
+
datum = {
|
|
48715
|
+
[categoryField]: null === (_a = null == params ? void 0 : params.datum) || void 0 === _a ? void 0 : _a[categoryField]
|
|
48716
|
+
};
|
|
48717
|
+
generateChartInstanceListByViewRange(datum, table, !1);
|
|
48718
|
+
}), this.activeChartInstance.on("pointerout", {
|
|
48719
|
+
markName: "pie"
|
|
48720
|
+
}, params => {
|
|
48721
|
+
var _a;
|
|
48722
|
+
const categoryField = this.attribute.spec.categoryField,
|
|
48723
|
+
datum = {
|
|
48724
|
+
[categoryField]: null === (_a = null == params ? void 0 : params.datum) || void 0 === _a ? void 0 : _a[categoryField]
|
|
48725
|
+
};
|
|
48726
|
+
generateChartInstanceListByViewRange(datum, table, !0);
|
|
48727
|
+
})), this.activeChartInstance.on("dimensionHover", params => {
|
|
48584
48728
|
var _a, _b;
|
|
48585
48729
|
const dimensionInfo = null == params ? void 0 : params.dimensionInfo[0],
|
|
48586
48730
|
canvasXY = null === (_a = null == params ? void 0 : params.event) || void 0 === _a ? void 0 : _a.canvas,
|
|
@@ -48643,21 +48787,23 @@
|
|
|
48643
48787
|
}
|
|
48644
48788
|
}
|
|
48645
48789
|
}
|
|
48646
|
-
}), null === (
|
|
48790
|
+
})), null === (_j = (_h = table)._bindChartEvent) || void 0 === _j || _j.call(_h, this.activeChartInstance);
|
|
48647
48791
|
}
|
|
48648
48792
|
deactivate(table, {
|
|
48793
|
+
forceRelease = !1,
|
|
48649
48794
|
releaseChartInstance = !0,
|
|
48650
48795
|
releaseColumnChartInstance = !0,
|
|
48651
|
-
releaseRowChartInstance = !0
|
|
48796
|
+
releaseRowChartInstance = !0,
|
|
48797
|
+
releaseAllChartInstance = !1
|
|
48652
48798
|
} = {}) {
|
|
48653
48799
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
48654
48800
|
if (this.activeChartInstanceHoverOnMark = null, this.justShowMarkTooltip = void 0, this.justShowMarkTooltipTimer = Date.now(), clearTimeout(this.delayRunDimensionHoverTimer), this.delayRunDimensionHoverTimer = void 0, releaseChartInstance) {
|
|
48655
|
-
null === (_a = this.activeChartInstance) || void 0 === _a || _a.updateViewBox({
|
|
48801
|
+
!forceRelease && getBrushingChartInstance() && getBrushingChartInstance() === this.activeChartInstance || (null === (_a = this.activeChartInstance) || void 0 === _a || _a.updateViewBox({
|
|
48656
48802
|
x1: -1e3,
|
|
48657
48803
|
x2: -800,
|
|
48658
48804
|
y1: -1e3,
|
|
48659
48805
|
y2: -800
|
|
48660
|
-
}, !1, !1), null === (_b = this.activeChartInstance) || void 0 === _b || _b.release(), this.activeChartInstance = null;
|
|
48806
|
+
}, !1, !1), null === (_b = this.activeChartInstance) || void 0 === _b || _b.release(), this.activeChartInstance = null);
|
|
48661
48807
|
const {
|
|
48662
48808
|
col: col,
|
|
48663
48809
|
row: row
|
|
@@ -48670,7 +48816,7 @@
|
|
|
48670
48816
|
} = this.parent;
|
|
48671
48817
|
releaseColumnChartInstance && table.internalProps.layoutMap.isAxisCell(col, table.rowCount - table.bottomFrozenRowCount) && (null === (_h = null === (_g = table.scenegraph.getCell(col, table.rowCount - table.bottomFrozenRowCount).firstChild) || void 0 === _g ? void 0 : _g.hideLabelHoverOnAxis) || void 0 === _h || _h.call(_g)), releaseRowChartInstance && table.internalProps.layoutMap.isAxisCell(table.rowHeaderLevelCount - 1, row) && (null === (_k = null === (_j = table.scenegraph.getCell(table.rowHeaderLevelCount - 1, row).firstChild) || void 0 === _j ? void 0 : _j.hideLabelHoverOnAxis) || void 0 === _k || _k.call(_j));
|
|
48672
48818
|
}
|
|
48673
|
-
releaseColumnChartInstance && clearChartInstanceListByColumnDirection(this.parent.col, "scatter" === this.attribute.spec.type ? this.parent.row : void 0, table), releaseRowChartInstance && clearChartInstanceListByRowDirection(this.parent.row, "scatter" === this.attribute.spec.type ? this.parent.col : void 0, table);
|
|
48819
|
+
releaseAllChartInstance ? clearAllChartInstanceList(table, forceRelease) : (releaseColumnChartInstance && clearChartInstanceListByColumnDirection(this.parent.col, "scatter" === this.attribute.spec.type ? this.parent.row : void 0, table, forceRelease), releaseRowChartInstance && clearChartInstanceListByRowDirection(this.parent.row, "scatter" === this.attribute.spec.type ? this.parent.col : void 0, table, forceRelease));
|
|
48674
48820
|
}
|
|
48675
48821
|
updateData(data) {
|
|
48676
48822
|
this.attribute.data = data;
|
|
@@ -48685,13 +48831,14 @@
|
|
|
48685
48831
|
y1: y1,
|
|
48686
48832
|
x2: x2,
|
|
48687
48833
|
y2: y2
|
|
48688
|
-
} = cellGroup.globalAABBBounds
|
|
48689
|
-
|
|
48690
|
-
|
|
48691
|
-
|
|
48692
|
-
|
|
48693
|
-
|
|
48694
|
-
|
|
48834
|
+
} = cellGroup.globalAABBBounds,
|
|
48835
|
+
viewBox = {
|
|
48836
|
+
x1: Math.ceil(x1 + padding[3] + table.scrollLeft + (null !== (_b = null === (_a = table.options.viewBox) || void 0 === _a ? void 0 : _a.x1) && void 0 !== _b ? _b : 0)),
|
|
48837
|
+
x2: Math.ceil(x1 + cellGroup.attribute.width - padding[1] + table.scrollLeft + (null !== (_d = null === (_c = table.options.viewBox) || void 0 === _c ? void 0 : _c.x1) && void 0 !== _d ? _d : 0)),
|
|
48838
|
+
y1: Math.ceil(y1 + padding[0] + table.scrollTop + (null !== (_f = null === (_e = table.options.viewBox) || void 0 === _e ? void 0 : _e.y1) && void 0 !== _f ? _f : 0)),
|
|
48839
|
+
y2: Math.ceil(y1 + cellGroup.attribute.height - padding[2] + table.scrollTop + (null !== (_h = null === (_g = table.options.viewBox) || void 0 === _g ? void 0 : _g.y1) && void 0 !== _h ? _h : 0))
|
|
48840
|
+
};
|
|
48841
|
+
return this.activeChartInstance ? this.activeChartInstanceLastViewBox = viewBox : this.activeChartInstanceLastViewBox = null, viewBox;
|
|
48695
48842
|
}
|
|
48696
48843
|
}
|
|
48697
48844
|
function getTableBounds(col, row, table) {
|
|
@@ -48906,7 +49053,7 @@
|
|
|
48906
49053
|
{
|
|
48907
49054
|
width = groupAttribute.width,
|
|
48908
49055
|
height = groupAttribute.height
|
|
48909
|
-
} =
|
|
49056
|
+
} = chart.attribute,
|
|
48910
49057
|
{
|
|
48911
49058
|
table: table
|
|
48912
49059
|
} = chart.getRootNode(),
|
|
@@ -48934,8 +49081,9 @@
|
|
|
48934
49081
|
});
|
|
48935
49082
|
}
|
|
48936
49083
|
}
|
|
48937
|
-
const
|
|
48938
|
-
|
|
49084
|
+
const lastViewBox = chart.activeChartInstanceLastViewBox,
|
|
49085
|
+
viewBox = chart.getViewBox();
|
|
49086
|
+
lastViewBox && viewBox.x1 === lastViewBox.x1 && viewBox.x2 === lastViewBox.x2 && viewBox.y1 === lastViewBox.y1 && viewBox.y2 === lastViewBox.y2 || activeChartInstance.updateViewBox({
|
|
48939
49087
|
x1: 0,
|
|
48940
49088
|
x2: viewBox.x2 - viewBox.x1,
|
|
48941
49089
|
y1: 0,
|
|
@@ -52453,9 +52601,10 @@
|
|
|
52453
52601
|
});
|
|
52454
52602
|
}
|
|
52455
52603
|
}
|
|
52456
|
-
function updateChartState(scenegraph, datum) {
|
|
52604
|
+
function updateChartState(scenegraph, datum, selectedDataMode) {
|
|
52457
52605
|
const table = scenegraph.table;
|
|
52458
52606
|
if (table.isPivotChart()) {
|
|
52607
|
+
table._selectedDataMode = selectedDataMode;
|
|
52459
52608
|
const preSelectItemsCount = table._selectedDataItemsInChart.length;
|
|
52460
52609
|
if ((null == datum || 0 === (null == datum ? void 0 : datum.length) || 0 === Object.keys(datum).length) && 0 === preSelectItemsCount) return;
|
|
52461
52610
|
const newSelectedDataItemsInChart = [];
|
|
@@ -53203,16 +53352,36 @@
|
|
|
53203
53352
|
resetResidentHoverIcon(col, row) {
|
|
53204
53353
|
resetResidentHoverIcon(col, row, this);
|
|
53205
53354
|
}
|
|
53206
|
-
deactivateChart(col, row) {
|
|
53207
|
-
var _a, _b, _c;
|
|
53208
|
-
if (-1 === col || -1 === row)
|
|
53355
|
+
deactivateChart(col, row, forceRelease = !1) {
|
|
53356
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
53357
|
+
if (-1 === col || -1 === row) {
|
|
53358
|
+
if (forceRelease) {
|
|
53359
|
+
const brushingChartInstanceCellPos = getBrushingChartInstanceCellPos(),
|
|
53360
|
+
cellGroup = this.getCell(brushingChartInstanceCellPos.col, brushingChartInstanceCellPos.row);
|
|
53361
|
+
(null === (_a = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _a ? void 0 : _a.deactivate) && (clearBrushingChartInstance(), null === (_c = null === (_b = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _b ? void 0 : _b.deactivate) || void 0 === _c || _c.call(_b, this.table, {
|
|
53362
|
+
forceRelease: !0,
|
|
53363
|
+
releaseChartInstance: !0,
|
|
53364
|
+
releaseColumnChartInstance: !0,
|
|
53365
|
+
releaseRowChartInstance: !0,
|
|
53366
|
+
releaseAllChartInstance: !0
|
|
53367
|
+
}));
|
|
53368
|
+
}
|
|
53369
|
+
return;
|
|
53370
|
+
}
|
|
53209
53371
|
const cellGroup = this.getCell(col, row);
|
|
53210
|
-
if (null === (
|
|
53372
|
+
if (null === (_d = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _d ? void 0 : _d.deactivate) {
|
|
53373
|
+
if (forceRelease) return clearBrushingChartInstance(), void (null === (_f = null === (_e = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _e ? void 0 : _e.deactivate) || void 0 === _f || _f.call(_e, this.table, {
|
|
53374
|
+
forceRelease: !0,
|
|
53375
|
+
releaseChartInstance: !0,
|
|
53376
|
+
releaseColumnChartInstance: !0,
|
|
53377
|
+
releaseRowChartInstance: !0,
|
|
53378
|
+
releaseAllChartInstance: !0
|
|
53379
|
+
}));
|
|
53211
53380
|
const chartType = (null == cellGroup ? void 0 : cellGroup.firstChild).attribute.spec.type;
|
|
53212
|
-
null === (
|
|
53213
|
-
releaseChartInstance: "scatter" === chartType ? col !== this.table.stateManager.hover.cellPos.col && row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount : this.table.options.indicatorsAsCol ? row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount : col !== this.table.stateManager.hover.cellPos.col || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount,
|
|
53214
|
-
releaseColumnChartInstance: col !== this.table.stateManager.hover.cellPos.col || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount,
|
|
53215
|
-
releaseRowChartInstance: row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount
|
|
53381
|
+
null === (_h = null === (_g = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _g ? void 0 : _g.deactivate) || void 0 === _h || _h.call(_g, this.table, (null === (_j = this.table.options.chartDimensionLinkage) || void 0 === _j ? void 0 : _j.showTooltip) ? {
|
|
53382
|
+
releaseChartInstance: "pie" !== chartType && ("scatter" === chartType ? col !== this.table.stateManager.hover.cellPos.col && row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount : this.table.options.indicatorsAsCol ? row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount : col !== this.table.stateManager.hover.cellPos.col || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount),
|
|
53383
|
+
releaseColumnChartInstance: "pie" !== chartType && (col !== this.table.stateManager.hover.cellPos.col || this.table.stateManager.hover.cellPos.row < this.table.frozenRowCount || this.table.stateManager.hover.cellPos.row > this.table.rowCount - 1 - this.table.bottomFrozenRowCount),
|
|
53384
|
+
releaseRowChartInstance: "pie" !== chartType && (row !== this.table.stateManager.hover.cellPos.row || this.table.stateManager.hover.cellPos.col < this.table.frozenColCount || this.table.stateManager.hover.cellPos.col > this.table.colCount - 1 - this.table.rightFrozenColCount)
|
|
53216
53385
|
} : void 0);
|
|
53217
53386
|
}
|
|
53218
53387
|
}
|
|
@@ -53260,8 +53429,15 @@
|
|
|
53260
53429
|
updateChartSizeForResizeRowHeight(row) {
|
|
53261
53430
|
updateChartSizeForResizeRowHeight(this, row);
|
|
53262
53431
|
}
|
|
53263
|
-
updateChartState(datum) {
|
|
53264
|
-
|
|
53432
|
+
updateChartState(datum, selectedDataMode) {
|
|
53433
|
+
var _a, _b;
|
|
53434
|
+
if (this.table.isPivotChart()) {
|
|
53435
|
+
if (null == datum || 0 === (null == datum ? void 0 : datum.length) || 0 === Object.keys(datum).length) {
|
|
53436
|
+
const brushingChartInstance = getBrushingChartInstance();
|
|
53437
|
+
brushingChartInstance && brushingChartInstance.getChart().getComponentsByKey("brush")[0].clearBrushStateAndMask(), null === (_b = null === (_a = this.table.options.chartDimensionLinkage) || void 0 === _a ? void 0 : _a.clearChartState) || void 0 === _b || _b.call(_a);
|
|
53438
|
+
}
|
|
53439
|
+
updateChartState(this, datum, selectedDataMode);
|
|
53440
|
+
}
|
|
53265
53441
|
}
|
|
53266
53442
|
updateCheckboxCellState(col, row, checked) {
|
|
53267
53443
|
var _a, _b;
|
|
@@ -56288,7 +56464,7 @@
|
|
|
56288
56464
|
}, 0 !== e.button) return;
|
|
56289
56465
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
56290
56466
|
if (eventManager.downIcon = void 0, stateManager.interactionState !== InteractionState.default) return;
|
|
56291
|
-
if (table.isPivotChart() && "chart" !== (null === (_a = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target.type) && table.scenegraph.updateChartState(null), (null === (_b = eventArgsSet.eventArgs) || void 0 === _b ? void 0 : _b.target) !== (null === (_c = stateManager.residentHoverIcon) || void 0 === _c ? void 0 : _c.icon) && stateManager.hideMenu(), "chart" === (null === (_d = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.target.type)) return;
|
|
56467
|
+
if (table.isPivotChart() && "chart" !== (null === (_a = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target.type) && table.scenegraph.updateChartState(null, void 0), (null === (_b = eventArgsSet.eventArgs) || void 0 === _b ? void 0 : _b.target) !== (null === (_c = stateManager.residentHoverIcon) || void 0 === _c ? void 0 : _c.icon) && stateManager.hideMenu(), "chart" === (null === (_d = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.target.type)) return;
|
|
56292
56468
|
const isCompleteEdit = null === (_e = table.editorManager) || void 0 === _e ? void 0 : _e.completeEdit(e.nativeEvent);
|
|
56293
56469
|
getPromiseValue(isCompleteEdit, isCompleteEdit => {
|
|
56294
56470
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
@@ -56316,7 +56492,7 @@
|
|
|
56316
56492
|
}
|
|
56317
56493
|
eventManager.dealTableHover(eventArgsSet);
|
|
56318
56494
|
} else {
|
|
56319
|
-
if (!eventManager.checkCellFillhandle(eventArgsSet) && (eventManager.checkColumnResize(eventArgsSet, !0) || eventManager.checkRowResize(eventArgsSet, !0))) return table.scenegraph.updateChartState(null), void stateManager.updateInteractionState(InteractionState.grabing);
|
|
56495
|
+
if (!eventManager.checkCellFillhandle(eventArgsSet) && (eventManager.checkColumnResize(eventArgsSet, !0) || eventManager.checkRowResize(eventArgsSet, !0))) return table.scenegraph.updateChartState(null, void 0), void stateManager.updateInteractionState(InteractionState.grabing);
|
|
56320
56496
|
if (eventManager.checkColumnMover(eventArgsSet)) return void stateManager.updateInteractionState(InteractionState.grabing);
|
|
56321
56497
|
if (eventManager.checkCellFillhandle(eventArgsSet, !0) && eventManager.dealFillSelect(eventArgsSet)) return void stateManager.updateInteractionState(InteractionState.grabing);
|
|
56322
56498
|
eventManager.dealTableSelect(eventArgsSet) && stateManager.updateInteractionState(InteractionState.grabing);
|
|
@@ -56468,7 +56644,7 @@
|
|
|
56468
56644
|
if (!(null === (_a = table.options.customConfig) || void 0 === _a ? void 0 : _a.selectCellWhenCellEditorNotExists) && !1 === isCompleteEdit) return;
|
|
56469
56645
|
const hitIcon = (null === (_b = e.target.role) || void 0 === _b ? void 0 : _b.startsWith("icon")) ? e.target : void 0;
|
|
56470
56646
|
if (eventManager.downIcon = hitIcon, "touch" === e.pointerType || hitIcon || eventManager.checkCellFillhandle(eventArgsSet) || stateManager.columnResize.resizing || !eventManager.checkColumnResize(eventArgsSet, !0)) ;else {
|
|
56471
|
-
table.scenegraph.updateChartState(null), stateManager.updateInteractionState(InteractionState.grabing);
|
|
56647
|
+
table.scenegraph.updateChartState(null, void 0), stateManager.updateInteractionState(InteractionState.grabing);
|
|
56472
56648
|
const {
|
|
56473
56649
|
eventArgs: eventArgs
|
|
56474
56650
|
} = eventArgsSet;
|
|
@@ -56487,7 +56663,7 @@
|
|
|
56487
56663
|
if (table.eventManager.isDraging || !target || !target.isDescendantsOf(table.scenegraph.stage) && target.stage !== target || target.isDescendantsOf(table.scenegraph.tableGroup)) table.eventManager.isDraging && stateManager.isSelecting() && stateManager.endSelectCells();else {
|
|
56488
56664
|
stateManager.updateInteractionState(InteractionState.default), eventManager.dealTableHover();
|
|
56489
56665
|
const isHasSelected = !!(null === (_a = stateManager.select.ranges) || void 0 === _a ? void 0 : _a.length);
|
|
56490
|
-
(null === (_b = table.options.customConfig) || void 0 === _b ? void 0 : _b.cancelSelectCellHook) ? (null === (_c = table.options.customConfig) || void 0 === _c ? void 0 : _c.cancelSelectCellHook(e)) && eventManager.dealTableSelect() : (null === (_e = null === (_d = table.options.select) || void 0 === _d ? void 0 : _d.blankAreaClickDeselect) || void 0 === _e || _e) && eventManager.dealTableSelect(), stateManager.endSelectCells(!0, isHasSelected), stateManager.updateCursor(), table.scenegraph.updateChartState(null);
|
|
56666
|
+
(null === (_b = table.options.customConfig) || void 0 === _b ? void 0 : _b.cancelSelectCellHook) ? (null === (_c = table.options.customConfig) || void 0 === _c ? void 0 : _c.cancelSelectCellHook(e)) && eventManager.dealTableSelect() : (null === (_e = null === (_d = table.options.select) || void 0 === _d ? void 0 : _d.blankAreaClickDeselect) || void 0 === _e || _e) && eventManager.dealTableSelect(), stateManager.endSelectCells(!0, isHasSelected), stateManager.updateCursor(), table.scenegraph.updateChartState(null, void 0);
|
|
56491
56667
|
}
|
|
56492
56668
|
}), table.scenegraph.stage.addEventListener("pointermove", e => {
|
|
56493
56669
|
var _a, _b, _c;
|
|
@@ -56605,7 +56781,15 @@
|
|
|
56605
56781
|
table.stateManager.setCheckedState(col, row, cellInfo.field, e.detail.checked), table.fireListeners(TABLE_EVENT_TYPE.SWITCH_STATE_CHANGE, cellsEvent), table.scenegraph.updateNextFrame();
|
|
56606
56782
|
}), table.scenegraph.stage.addEventListener("wheel", e => {
|
|
56607
56783
|
var _a;
|
|
56608
|
-
e.path.find(node => "legend" === node.name)
|
|
56784
|
+
if (!e.path.find(node => "legend" === node.name)) {
|
|
56785
|
+
null === (_a = table.editorManager) || void 0 === _a || _a.completeEdit();
|
|
56786
|
+
const {
|
|
56787
|
+
cellPos: cellPos
|
|
56788
|
+
} = table.stateManager.hover,
|
|
56789
|
+
prevHoverCellCol = cellPos.col,
|
|
56790
|
+
prevHoverCellRow = cellPos.row;
|
|
56791
|
+
table.scenegraph.deactivateChart(prevHoverCellCol, prevHoverCellRow, !0), table.eventManager._enableTableScroll && handleWhell(e, stateManager);
|
|
56792
|
+
}
|
|
56609
56793
|
});
|
|
56610
56794
|
}
|
|
56611
56795
|
function bindGesture(eventManager) {
|
|
@@ -60017,7 +60201,7 @@
|
|
|
60017
60201
|
}
|
|
60018
60202
|
constructor(container, options = {}) {
|
|
60019
60203
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
60020
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.22.11-alpha.
|
|
60204
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.22.11-alpha.6", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env$1.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
60021
60205
|
this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
60022
60206
|
options: options,
|
|
60023
60207
|
container: container
|
|
@@ -81673,9 +81857,7 @@
|
|
|
81673
81857
|
} else (runtime === TABLE_EVENT_TYPE.UPDATE_RECORD || runtime === TABLE_EVENT_TYPE.ADD_RECORD || runtime === TABLE_EVENT_TYPE.DELETE_RECORD) && this.syncFilterWithTableData();
|
|
81674
81858
|
}
|
|
81675
81859
|
updatePluginOptions(pluginOptions) {
|
|
81676
|
-
this.pluginOptions = lodashExports.merge(this.pluginOptions, pluginOptions), this.filterToolbar.updateStyles(this.pluginOptions.styles)
|
|
81677
|
-
clearRowHeightCache: !1
|
|
81678
|
-
});
|
|
81860
|
+
this.pluginOptions = lodashExports.merge(this.pluginOptions, pluginOptions), this.filterToolbar.updateStyles(this.pluginOptions.styles);
|
|
81679
81861
|
}
|
|
81680
81862
|
update() {
|
|
81681
81863
|
this.filterStateManager && this.reapplyActiveFilters();
|
|
@@ -91004,7 +91186,7 @@
|
|
|
91004
91186
|
importStyle();
|
|
91005
91187
|
}
|
|
91006
91188
|
|
|
91007
|
-
const version = "1.22.11-alpha.
|
|
91189
|
+
const version = "1.22.11-alpha.6";
|
|
91008
91190
|
importStyles();
|
|
91009
91191
|
|
|
91010
91192
|
exports.TYPES = index;
|