@visactor/vtable-calendar 1.22.11 → 1.22.12-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/dist/vtable-calendar.js +351 -132
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +5 -5
package/dist/vtable-calendar.js
CHANGED
|
@@ -34616,6 +34616,24 @@
|
|
|
34616
34616
|
}, delay));
|
|
34617
34617
|
};
|
|
34618
34618
|
}
|
|
34619
|
+
function cancellableThrottle(func, delay) {
|
|
34620
|
+
let timer = null,
|
|
34621
|
+
lastArgs = null,
|
|
34622
|
+
context = null;
|
|
34623
|
+
return {
|
|
34624
|
+
throttled: function (...args) {
|
|
34625
|
+
lastArgs = args, context = this, timer || (timer = setTimeout(() => {
|
|
34626
|
+
lastArgs && func.apply(context, lastArgs), timer = null, lastArgs = null, context = null;
|
|
34627
|
+
}, delay));
|
|
34628
|
+
},
|
|
34629
|
+
cancel: () => {
|
|
34630
|
+
timer && (clearTimeout(timer), timer = null, lastArgs = null, context = null);
|
|
34631
|
+
},
|
|
34632
|
+
flush: () => {
|
|
34633
|
+
timer && lastArgs && (clearTimeout(timer), func.apply(context, lastArgs), timer = null, lastArgs = null, context = null);
|
|
34634
|
+
}
|
|
34635
|
+
};
|
|
34636
|
+
}
|
|
34619
34637
|
function pad(num, totalChars) {
|
|
34620
34638
|
for (num = `${num}`; num.length < totalChars;) num = "0" + num;
|
|
34621
34639
|
return num;
|
|
@@ -43741,11 +43759,46 @@
|
|
|
43741
43759
|
return hoverMode;
|
|
43742
43760
|
}
|
|
43743
43761
|
|
|
43762
|
+
let brushingChartInstance,
|
|
43763
|
+
brushingChartInstanceCellPos = {
|
|
43764
|
+
col: -1,
|
|
43765
|
+
row: -1
|
|
43766
|
+
};
|
|
43767
|
+
function setBrushingChartInstance(chartInstance, col, row) {
|
|
43768
|
+
brushingChartInstance = chartInstance, brushingChartInstanceCellPos = {
|
|
43769
|
+
col: col,
|
|
43770
|
+
row: row
|
|
43771
|
+
};
|
|
43772
|
+
}
|
|
43773
|
+
function clearAndReleaseBrushingChartInstance(scenegraph) {
|
|
43774
|
+
var _a, _b, _c;
|
|
43775
|
+
enableTooltipToAllChartInstances();
|
|
43776
|
+
const cellGroup = scenegraph.getCell(brushingChartInstanceCellPos.col, brushingChartInstanceCellPos.row);
|
|
43777
|
+
(null === (_a = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _a ? void 0 : _a.deactivate) && (null === (_c = null === (_b = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _b ? void 0 : _b.deactivate) || void 0 === _c || _c.call(_b, scenegraph.table, {
|
|
43778
|
+
forceRelease: !0,
|
|
43779
|
+
releaseChartInstance: !0,
|
|
43780
|
+
releaseColumnChartInstance: !1,
|
|
43781
|
+
releaseRowChartInstance: !1,
|
|
43782
|
+
releaseAllChartInstance: !1
|
|
43783
|
+
})), isValid$1(chartInstanceListColumnByColumnDirection[brushingChartInstanceCellPos.col]) && delete chartInstanceListColumnByColumnDirection[brushingChartInstanceCellPos.col][brushingChartInstanceCellPos.row], isValid$1(chartInstanceListRowByRowDirection[brushingChartInstanceCellPos.row]) && delete chartInstanceListRowByRowDirection[brushingChartInstanceCellPos.row][brushingChartInstanceCellPos.col], brushingChartInstance = void 0, brushingChartInstanceCellPos = {
|
|
43784
|
+
col: -1,
|
|
43785
|
+
row: -1
|
|
43786
|
+
};
|
|
43787
|
+
}
|
|
43788
|
+
function getBrushingChartInstance() {
|
|
43789
|
+
return brushingChartInstance;
|
|
43790
|
+
}
|
|
43791
|
+
function getBrushingChartInstanceCellPos() {
|
|
43792
|
+
return brushingChartInstanceCellPos;
|
|
43793
|
+
}
|
|
43744
43794
|
const chartInstanceListColumnByColumnDirection = {};
|
|
43745
43795
|
const chartInstanceListRowByRowDirection = {};
|
|
43796
|
+
const delayRunDimensionHoverTimerForColumnDirection = [],
|
|
43797
|
+
delayRunDimensionHoverTimerForRowDirection = [],
|
|
43798
|
+
delayRunDimensionHoverTimerForViewRange = [];
|
|
43746
43799
|
function generateChartInstanceListByColumnDirection(col, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = !1, isScatter = !1) {
|
|
43747
43800
|
var _a;
|
|
43748
|
-
isValid$1(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
|
|
43801
|
+
clearDelayRunDimensionHoverTimerForColumnDirection(), isValid$1(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
|
|
43749
43802
|
const {
|
|
43750
43803
|
rowStart: rowStart
|
|
43751
43804
|
} = table.getBodyVisibleRowRange();
|
|
@@ -43754,76 +43807,40 @@
|
|
|
43754
43807
|
for (let i = rowStart; i <= rowEnd; i++) {
|
|
43755
43808
|
const cellGroup = table.scenegraph.getCell(col, i),
|
|
43756
43809
|
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
43757
|
-
|
|
43758
|
-
|
|
43810
|
+
chartInstanceListColumnByColumnDirection[col][i] || isValid$1(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance);
|
|
43811
|
+
const timer = setTimeout(() => {
|
|
43812
|
+
var _a, _b, _c, _d;
|
|
43759
43813
|
if (null === (_a = chartInstanceListColumnByColumnDirection[col]) || void 0 === _a ? void 0 : _a[i]) {
|
|
43760
43814
|
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
43761
43815
|
let isShowTooltip = !isScatter;
|
|
43762
|
-
if (
|
|
43763
|
-
const
|
|
43764
|
-
|
|
43765
|
-
rowEnd: rowEnd1
|
|
43766
|
-
} = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
|
|
43767
|
-
if (rowEnd1 === rowEnd) isShowTooltip = !0;else {
|
|
43768
|
-
const {
|
|
43769
|
-
rowEnd: rowEnd2
|
|
43770
|
-
} = table.getBodyVisibleRowRange(0, 5);
|
|
43771
|
-
isShowTooltip = rowEnd2 !== rowEnd;
|
|
43772
|
-
}
|
|
43773
|
-
} else if (i === rowStart && isShowTooltip) {
|
|
43774
|
-
const heightLimitToShowTooltipForEdgeRow = null !== (_d = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _d ? _d : 0,
|
|
43775
|
-
{
|
|
43776
|
-
rowStart: rowStart1
|
|
43777
|
-
} = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
|
|
43778
|
-
if (rowStart1 === rowStart) isShowTooltip = !0;else {
|
|
43779
|
-
const {
|
|
43780
|
-
rowStart: rowStart2
|
|
43781
|
-
} = table.getBodyVisibleRowRange(0, -5);
|
|
43782
|
-
isShowTooltip = rowStart2 !== rowStart;
|
|
43783
|
-
}
|
|
43784
|
-
}
|
|
43785
|
-
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 {
|
|
43786
|
-
const bodyBoundryTop = table.frozenRowCount ? table.getCellRelativeRect(col, table.frozenRowCount - 1).bottom : 0,
|
|
43816
|
+
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 {
|
|
43817
|
+
const cellBoundry = table.getCellRelativeRect(col, i),
|
|
43818
|
+
bodyBoundryTop = table.frozenRowCount ? table.getCellRelativeRect(col, table.frozenRowCount - 1).bottom : 0,
|
|
43787
43819
|
absolutePositionTop = Math.max(bodyBoundryTop, table.getCellRelativeRect(col, i).top);
|
|
43788
43820
|
hideTooltip ? (table.stateManager.hover.cellPos.col === col && table.stateManager.hover.cellPos.row === i || chartInstanceListColumnByColumnDirection[col][i].hideTooltip(), chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
43789
43821
|
tooltip: !1,
|
|
43790
43822
|
showTooltipOption: {
|
|
43791
|
-
x: canvasXY.x,
|
|
43792
|
-
y: absolutePositionTop,
|
|
43823
|
+
x: canvasXY.x - cellBoundry.left,
|
|
43824
|
+
y: absolutePositionTop - cellBoundry.top,
|
|
43793
43825
|
activeType: "dimension"
|
|
43794
43826
|
}
|
|
43795
43827
|
})) : chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
43796
43828
|
tooltip: isShowTooltip,
|
|
43797
43829
|
showTooltipOption: {
|
|
43798
|
-
x: canvasXY.x,
|
|
43799
|
-
y: absolutePositionTop,
|
|
43830
|
+
x: canvasXY.x - cellBoundry.left,
|
|
43831
|
+
y: absolutePositionTop - cellBoundry.top,
|
|
43800
43832
|
activeType: "dimension"
|
|
43801
43833
|
}
|
|
43802
43834
|
});
|
|
43803
43835
|
}
|
|
43804
43836
|
}
|
|
43805
|
-
}, 0)
|
|
43806
|
-
|
|
43807
|
-
}
|
|
43808
|
-
function clearChartInstanceListByColumnDirection(col, excludedRow, table) {
|
|
43809
|
-
var _a;
|
|
43810
|
-
if (isValid$1(chartInstanceListColumnByColumnDirection[col])) {
|
|
43811
|
-
for (const i in chartInstanceListColumnByColumnDirection[col]) {
|
|
43812
|
-
if (isValid$1(excludedRow) && Number(i) === excludedRow) continue;
|
|
43813
|
-
const cellGroup = table.scenegraph.getCell(col, Number(i)),
|
|
43814
|
-
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
43815
|
-
chartNode.addUpdateShapeAndBoundsTag(), isValid$1(chartNode) && (chartNode.deactivate(table, {
|
|
43816
|
-
releaseChartInstance: !0,
|
|
43817
|
-
releaseColumnChartInstance: !1,
|
|
43818
|
-
releaseRowChartInstance: !1
|
|
43819
|
-
}), chartInstanceListColumnByColumnDirection[col][i] = null);
|
|
43820
|
-
}
|
|
43821
|
-
delete chartInstanceListColumnByColumnDirection[col];
|
|
43837
|
+
}, 0);
|
|
43838
|
+
delayRunDimensionHoverTimerForColumnDirection.push(timer), table.scenegraph.updateNextFrame();
|
|
43822
43839
|
}
|
|
43823
43840
|
}
|
|
43824
43841
|
function generateChartInstanceListByRowDirection(row, dimensionValueOrXValue, positionValueOrYValue, canvasXY, table, hideTooltip = !1, isScatter = !1) {
|
|
43825
43842
|
var _a;
|
|
43826
|
-
isValid$1(chartInstanceListRowByRowDirection[row]) || (chartInstanceListRowByRowDirection[row] = {});
|
|
43843
|
+
clearDelayRunDimensionHoverTimerForRowDirection(), isValid$1(chartInstanceListRowByRowDirection[row]) || (chartInstanceListRowByRowDirection[row] = {});
|
|
43827
43844
|
const {
|
|
43828
43845
|
colStart: colStart
|
|
43829
43846
|
} = table.getBodyVisibleColRange();
|
|
@@ -43832,64 +43849,162 @@
|
|
|
43832
43849
|
for (let i = colStart; i <= colEnd; i++) {
|
|
43833
43850
|
const cellGroup = table.scenegraph.getCell(i, row),
|
|
43834
43851
|
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
43835
|
-
|
|
43852
|
+
chartInstanceListRowByRowDirection[row][i] || isValid$1(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance);
|
|
43853
|
+
const timer = setTimeout(() => {
|
|
43836
43854
|
var _a, _b, _c, _d;
|
|
43837
43855
|
if (null === (_a = chartInstanceListRowByRowDirection[row]) || void 0 === _a ? void 0 : _a[i]) {
|
|
43838
43856
|
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
43839
43857
|
let isShowTooltip = !isScatter;
|
|
43840
|
-
if (
|
|
43841
|
-
const
|
|
43842
|
-
|
|
43843
|
-
colEnd: colEnd1
|
|
43844
|
-
} = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
|
|
43845
|
-
if (colEnd1 === colEnd) isShowTooltip = !0;else {
|
|
43846
|
-
const {
|
|
43847
|
-
colEnd: colEnd2
|
|
43848
|
-
} = table.getBodyVisibleColRange(0, 5);
|
|
43849
|
-
isShowTooltip = colEnd2 !== colEnd;
|
|
43850
|
-
}
|
|
43851
|
-
} else if (i === colStart && isShowTooltip) {
|
|
43852
|
-
const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
|
|
43853
|
-
{
|
|
43854
|
-
colStart: colStart1
|
|
43855
|
-
} = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
|
|
43856
|
-
if (colStart1 === colStart) isShowTooltip = !0;else {
|
|
43857
|
-
const {
|
|
43858
|
-
colStart: colStart2
|
|
43859
|
-
} = table.getBodyVisibleColRange(0, -5);
|
|
43860
|
-
isShowTooltip = colStart2 !== colStart;
|
|
43861
|
-
}
|
|
43862
|
-
}
|
|
43863
|
-
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 {
|
|
43864
|
-
const bodyBoundryLeft = table.frozenColCount ? table.getCellRelativeRect(table.frozenColCount - 1, row).right : 0,
|
|
43858
|
+
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 {
|
|
43859
|
+
const cellBoundry = table.getCellRelativeRect(i, row),
|
|
43860
|
+
bodyBoundryLeft = table.frozenColCount ? table.getCellRelativeRect(table.frozenColCount - 1, row).right : 0,
|
|
43865
43861
|
absolutePositionLeft = Math.max(bodyBoundryLeft, table.getCellRelativeRect(i, row).left);
|
|
43866
43862
|
hideTooltip ? (table.stateManager.hover.cellPos.col === i && table.stateManager.hover.cellPos.row === row || chartInstanceListRowByRowDirection[row][i].hideTooltip(), chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
43867
43863
|
tooltip: !1,
|
|
43868
43864
|
showTooltipOption: {
|
|
43869
|
-
x: absolutePositionLeft,
|
|
43870
|
-
y: canvasXY.y,
|
|
43865
|
+
x: absolutePositionLeft - cellBoundry.left,
|
|
43866
|
+
y: canvasXY.y - cellBoundry.top,
|
|
43871
43867
|
activeType: "dimension"
|
|
43872
43868
|
}
|
|
43873
43869
|
})) : chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
43874
43870
|
tooltip: isShowTooltip,
|
|
43875
43871
|
showTooltipOption: {
|
|
43876
|
-
x: absolutePositionLeft,
|
|
43877
|
-
y: canvasXY.y,
|
|
43872
|
+
x: absolutePositionLeft - cellBoundry.left,
|
|
43873
|
+
y: canvasXY.y - cellBoundry.top,
|
|
43878
43874
|
activeType: "dimension"
|
|
43879
43875
|
}
|
|
43880
43876
|
});
|
|
43881
43877
|
}
|
|
43882
43878
|
}
|
|
43883
|
-
}, 0)
|
|
43879
|
+
}, 0);
|
|
43880
|
+
delayRunDimensionHoverTimerForRowDirection.push(timer), table.scenegraph.updateNextFrame();
|
|
43881
|
+
}
|
|
43882
|
+
}
|
|
43883
|
+
function generateChartInstanceListByViewRange(datum, table, deactivate = !1) {
|
|
43884
|
+
var _a;
|
|
43885
|
+
clearDelayRunDimensionHoverTimerForViewRange();
|
|
43886
|
+
const {
|
|
43887
|
+
rowStart: rowStart
|
|
43888
|
+
} = table.getBodyVisibleRowRange();
|
|
43889
|
+
let rowEnd = table.getBodyVisibleRowRange().rowEnd;
|
|
43890
|
+
rowEnd = Math.min(table.rowCount - 1 - table.bottomFrozenRowCount, rowEnd);
|
|
43891
|
+
const {
|
|
43892
|
+
colStart: colStart
|
|
43893
|
+
} = table.getBodyVisibleColRange();
|
|
43894
|
+
let colEnd = table.getBodyVisibleColRange().colEnd;
|
|
43895
|
+
colEnd = Math.min(table.colCount - 1 - table.rightFrozenColCount, colEnd);
|
|
43896
|
+
for (let col = colStart; col <= colEnd; col++) {
|
|
43897
|
+
isValid$1(chartInstanceListColumnByColumnDirection[col]) || (chartInstanceListColumnByColumnDirection[col] = {});
|
|
43898
|
+
for (let i = rowStart; i <= rowEnd; i++) {
|
|
43899
|
+
const cellGroup = table.scenegraph.getCell(col, i),
|
|
43900
|
+
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
43901
|
+
chartInstanceListColumnByColumnDirection[col][i] || isValid$1(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.activeChartInstance ? chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance : "pie" === chartNode.attribute.spec.type && (chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance));
|
|
43902
|
+
const timer = setTimeout(() => {
|
|
43903
|
+
var _a, _b;
|
|
43904
|
+
if (null === (_a = chartInstanceListColumnByColumnDirection[col]) || void 0 === _a ? void 0 : _a[i]) {
|
|
43905
|
+
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
43906
|
+
let isShowTooltip = !0;
|
|
43907
|
+
"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, {
|
|
43908
|
+
activeType: "mark"
|
|
43909
|
+
})));
|
|
43910
|
+
}
|
|
43911
|
+
}, 0);
|
|
43912
|
+
delayRunDimensionHoverTimerForViewRange.push(timer), table.scenegraph.updateNextFrame();
|
|
43913
|
+
}
|
|
43914
|
+
}
|
|
43915
|
+
}
|
|
43916
|
+
function checkIsShowTooltipForEdgeRow(row, table) {
|
|
43917
|
+
var _a, _b;
|
|
43918
|
+
let isShowTooltip = !0;
|
|
43919
|
+
const {
|
|
43920
|
+
rowStart: rowStart
|
|
43921
|
+
} = table.getBodyVisibleRowRange();
|
|
43922
|
+
let rowEnd = table.getBodyVisibleRowRange().rowEnd;
|
|
43923
|
+
rowEnd = Math.min(table.rowCount - 1 - table.bottomFrozenRowCount, rowEnd);
|
|
43924
|
+
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
43925
|
+
if (row === rowEnd && isShowTooltip) {
|
|
43926
|
+
const heightLimitToShowTooltipForEdgeRow = null !== (_a = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _a ? _a : 0,
|
|
43927
|
+
{
|
|
43928
|
+
rowEnd: rowEnd1
|
|
43929
|
+
} = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
|
|
43930
|
+
if (rowEnd1 === rowEnd) isShowTooltip = !0;else {
|
|
43931
|
+
const {
|
|
43932
|
+
rowEnd: rowEnd2
|
|
43933
|
+
} = table.getBodyVisibleRowRange(0, 5);
|
|
43934
|
+
isShowTooltip = rowEnd2 !== rowEnd;
|
|
43935
|
+
}
|
|
43936
|
+
} else if (row === rowStart && isShowTooltip) {
|
|
43937
|
+
const heightLimitToShowTooltipForEdgeRow = null !== (_b = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _b ? _b : 0,
|
|
43938
|
+
{
|
|
43939
|
+
rowStart: rowStart1
|
|
43940
|
+
} = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
|
|
43941
|
+
if (rowStart1 === rowStart) isShowTooltip = !0;else {
|
|
43942
|
+
const {
|
|
43943
|
+
rowStart: rowStart2
|
|
43944
|
+
} = table.getBodyVisibleRowRange(0, -5);
|
|
43945
|
+
isShowTooltip = rowStart2 !== rowStart;
|
|
43946
|
+
}
|
|
43947
|
+
}
|
|
43948
|
+
return isShowTooltip;
|
|
43949
|
+
}
|
|
43950
|
+
function checkIsShowTooltipForEdgeColumn(col, table) {
|
|
43951
|
+
let isShowTooltip = !0;
|
|
43952
|
+
const {
|
|
43953
|
+
colStart: colStart
|
|
43954
|
+
} = table.getBodyVisibleColRange();
|
|
43955
|
+
let colEnd = table.getBodyVisibleColRange().colEnd;
|
|
43956
|
+
colEnd = Math.min(table.colCount - 1 - table.rightFrozenColCount, colEnd);
|
|
43957
|
+
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
43958
|
+
if (col === colEnd && isShowTooltip) {
|
|
43959
|
+
const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
|
|
43960
|
+
{
|
|
43961
|
+
colEnd: colEnd1
|
|
43962
|
+
} = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
|
|
43963
|
+
if (colEnd1 === colEnd) isShowTooltip = !0;else {
|
|
43964
|
+
const {
|
|
43965
|
+
colEnd: colEnd2
|
|
43966
|
+
} = table.getBodyVisibleColRange(0, 5);
|
|
43967
|
+
isShowTooltip = colEnd2 !== colEnd;
|
|
43968
|
+
}
|
|
43969
|
+
} else if (col === colStart && isShowTooltip) {
|
|
43970
|
+
const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
|
|
43971
|
+
{
|
|
43972
|
+
colStart: colStart1
|
|
43973
|
+
} = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
|
|
43974
|
+
if (colStart1 === colStart) isShowTooltip = !0;else {
|
|
43975
|
+
const {
|
|
43976
|
+
colStart: colStart2
|
|
43977
|
+
} = table.getBodyVisibleColRange(0, -5);
|
|
43978
|
+
isShowTooltip = colStart2 !== colStart;
|
|
43979
|
+
}
|
|
43980
|
+
}
|
|
43981
|
+
return isShowTooltip;
|
|
43982
|
+
}
|
|
43983
|
+
function clearChartInstanceListByColumnDirection(col, excludedRow, table, forceRelease = !1) {
|
|
43984
|
+
var _a;
|
|
43985
|
+
if (isValid$1(chartInstanceListColumnByColumnDirection[col])) {
|
|
43986
|
+
for (const i in chartInstanceListColumnByColumnDirection[col]) {
|
|
43987
|
+
if (isValid$1(excludedRow) && Number(i) === excludedRow) continue;
|
|
43988
|
+
const cellGroup = table.scenegraph.getCell(col, Number(i)),
|
|
43989
|
+
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
43990
|
+
isValid$1(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.deactivate(table, {
|
|
43991
|
+
forceRelease: forceRelease,
|
|
43992
|
+
releaseChartInstance: !0,
|
|
43993
|
+
releaseColumnChartInstance: !1,
|
|
43994
|
+
releaseRowChartInstance: !1
|
|
43995
|
+
}), chartInstanceListColumnByColumnDirection[col][i] = null);
|
|
43996
|
+
}
|
|
43997
|
+
delete chartInstanceListColumnByColumnDirection[col];
|
|
43884
43998
|
}
|
|
43885
43999
|
}
|
|
43886
|
-
function clearChartInstanceListByRowDirection(row, excludedCol, table) {
|
|
44000
|
+
function clearChartInstanceListByRowDirection(row, excludedCol, table, forceRelease = !1) {
|
|
43887
44001
|
var _a;
|
|
43888
44002
|
if (isValid$1(chartInstanceListRowByRowDirection[row])) for (const i in chartInstanceListRowByRowDirection[row]) {
|
|
43889
44003
|
if (isValid$1(excludedCol) && Number(i) === excludedCol) continue;
|
|
43890
44004
|
const cellGroup = table.scenegraph.getCell(Number(i), row),
|
|
43891
44005
|
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
43892
|
-
|
|
44006
|
+
isValid$1(chartNode) && (chartNode.addUpdateShapeAndBoundsTag(), chartNode.deactivate(table, {
|
|
44007
|
+
forceRelease: forceRelease,
|
|
43893
44008
|
releaseChartInstance: !0,
|
|
43894
44009
|
releaseColumnChartInstance: !1,
|
|
43895
44010
|
releaseRowChartInstance: !1
|
|
@@ -43897,6 +44012,40 @@
|
|
|
43897
44012
|
}
|
|
43898
44013
|
delete chartInstanceListRowByRowDirection[row];
|
|
43899
44014
|
}
|
|
44015
|
+
function clearDelayRunDimensionHoverTimerForColumnDirection() {
|
|
44016
|
+
for (const timer of delayRunDimensionHoverTimerForColumnDirection) clearTimeout(timer);
|
|
44017
|
+
delayRunDimensionHoverTimerForColumnDirection.length = 0;
|
|
44018
|
+
}
|
|
44019
|
+
function clearDelayRunDimensionHoverTimerForRowDirection() {
|
|
44020
|
+
for (const timer of delayRunDimensionHoverTimerForRowDirection) clearTimeout(timer);
|
|
44021
|
+
delayRunDimensionHoverTimerForRowDirection.length = 0;
|
|
44022
|
+
}
|
|
44023
|
+
function clearDelayRunDimensionHoverTimerForViewRange() {
|
|
44024
|
+
for (const timer of delayRunDimensionHoverTimerForViewRange) clearTimeout(timer);
|
|
44025
|
+
delayRunDimensionHoverTimerForViewRange.length = 0;
|
|
44026
|
+
}
|
|
44027
|
+
function clearDelayRunDimensionHoverTimers() {
|
|
44028
|
+
for (const timer of delayRunDimensionHoverTimerForColumnDirection) clearTimeout(timer);
|
|
44029
|
+
delayRunDimensionHoverTimerForColumnDirection.length = 0;
|
|
44030
|
+
for (const timer of delayRunDimensionHoverTimerForRowDirection) clearTimeout(timer);
|
|
44031
|
+
delayRunDimensionHoverTimerForRowDirection.length = 0;
|
|
44032
|
+
for (const timer of delayRunDimensionHoverTimerForViewRange) clearTimeout(timer);
|
|
44033
|
+
delayRunDimensionHoverTimerForViewRange.length = 0;
|
|
44034
|
+
}
|
|
44035
|
+
function clearAllChartInstanceList(table, forceRelease = !1) {
|
|
44036
|
+
clearDelayRunDimensionHoverTimers();
|
|
44037
|
+
for (const col in chartInstanceListColumnByColumnDirection) clearChartInstanceListByColumnDirection(Number(col), void 0, table, forceRelease);
|
|
44038
|
+
for (const row in chartInstanceListRowByRowDirection) clearChartInstanceListByRowDirection(Number(row), void 0, table, forceRelease);
|
|
44039
|
+
}
|
|
44040
|
+
let disabledTooltipToAllChartInstances = !1;
|
|
44041
|
+
function isDisabledTooltipToAllChartInstances() {
|
|
44042
|
+
return disabledTooltipToAllChartInstances;
|
|
44043
|
+
}
|
|
44044
|
+
function enableTooltipToAllChartInstances() {
|
|
44045
|
+
disabledTooltipToAllChartInstances = !1;
|
|
44046
|
+
for (const col in chartInstanceListColumnByColumnDirection) for (const row in chartInstanceListColumnByColumnDirection[col]) chartInstanceListColumnByColumnDirection[col][row].disableTooltip(!1);
|
|
44047
|
+
for (const row in chartInstanceListRowByRowDirection) for (const col in chartInstanceListRowByRowDirection[row]) chartInstanceListRowByRowDirection[row][col].disableTooltip(!1);
|
|
44048
|
+
}
|
|
43900
44049
|
|
|
43901
44050
|
function isValidAlignDomain(domain) {
|
|
43902
44051
|
return 2 === domain.length && isValidNumber$1(domain[0]) && isValidNumber$1(domain[1]) && domain[1] >= domain[0];
|
|
@@ -44530,7 +44679,7 @@
|
|
|
44530
44679
|
const CHART_NUMBER_TYPE = genNumberType();
|
|
44531
44680
|
class Chart extends Rect$1 {
|
|
44532
44681
|
constructor(isShareChartSpec, params) {
|
|
44533
|
-
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 {
|
|
44682
|
+
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 {
|
|
44534
44683
|
const chartInstance = this.chartInstance = new params.ClassType(params.spec, merge({}, this.attribute.tableChartOption, {
|
|
44535
44684
|
renderCanvas: params.canvas,
|
|
44536
44685
|
mode: "node" === this.attribute.mode ? "node" : "desktop-browser",
|
|
@@ -44551,7 +44700,7 @@
|
|
|
44551
44700
|
}
|
|
44552
44701
|
}
|
|
44553
44702
|
activate(table) {
|
|
44554
|
-
var _a, _b, _c, _d, _e;
|
|
44703
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
44555
44704
|
if (this.activeChartInstance) return;
|
|
44556
44705
|
const {
|
|
44557
44706
|
col: col,
|
|
@@ -44570,7 +44719,7 @@
|
|
|
44570
44719
|
y1: y1 - table.scrollTop,
|
|
44571
44720
|
y2: y2 - table.scrollTop
|
|
44572
44721
|
});
|
|
44573
|
-
|
|
44722
|
+
this.attribute.ClassType.globalConfig.uniqueTooltip = !1, this.activeChartInstance = new this.attribute.ClassType(this.attribute.spec, merge({}, this.attribute.tableChartOption, {
|
|
44574
44723
|
renderCanvas: this.attribute.canvas,
|
|
44575
44724
|
mode: "desktop-browser",
|
|
44576
44725
|
canvasControled: !1,
|
|
@@ -44604,7 +44753,7 @@
|
|
|
44604
44753
|
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());
|
|
44605
44754
|
}
|
|
44606
44755
|
},
|
|
44607
|
-
componentShowContent: table.options.chartDimensionLinkage && "scatter" !== this.attribute.spec.type ? {
|
|
44756
|
+
componentShowContent: (null === (_a = table.options.chartDimensionLinkage) || void 0 === _a ? void 0 : _a.showTooltip) && "scatter" !== this.attribute.spec.type ? {
|
|
44608
44757
|
tooltip: {
|
|
44609
44758
|
dimension: !1,
|
|
44610
44759
|
mark: !0
|
|
@@ -44615,16 +44764,43 @@
|
|
|
44615
44764
|
const chartStage = this.activeChartInstance.getStage(),
|
|
44616
44765
|
matrix = this.globalTransMatrix.clone(),
|
|
44617
44766
|
stageMatrix = this.stage.window.getViewBoxTransform();
|
|
44767
|
+
let brushChangeThrottle;
|
|
44618
44768
|
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 => {
|
|
44769
|
+
var _a, _b, _c;
|
|
44770
|
+
!1 === (null === (_a = this.attribute.spec.select) || void 0 === _a ? void 0 : _a.enable) ? this.attribute.spec.interactions.find(interaction => "element-select" === interaction.type && interaction.isMultiple) ? table.scenegraph.updateChartState(null == params ? void 0 : params.datum, "multiple-select") : table.scenegraph.updateChartState(null, void 0) : !0 === (null === (_b = this.attribute.spec.select) || void 0 === _b ? void 0 : _b.enable) && "multiple" === (null === (_c = this.attribute.spec.select) || void 0 === _c ? void 0 : _c.mode) ? table.scenegraph.updateChartState(null == params ? void 0 : params.datum, "multiple-select") : Chart.temp && (table.scenegraph.updateChartState(null, "brush"), table.scenegraph.updateChartState(null == params ? void 0 : params.datum, "click"));
|
|
44771
|
+
}), (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 => {
|
|
44619
44772
|
var _a;
|
|
44620
|
-
|
|
44773
|
+
brushChangeThrottle.throttled(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData, "brush");
|
|
44774
|
+
})), this.activeChartInstance.on("brushStart", params => {
|
|
44775
|
+
const brushingChartInstance = getBrushingChartInstance();
|
|
44776
|
+
brushingChartInstance !== this.activeChartInstance && (brushingChartInstance && clearAndReleaseBrushingChartInstance(table.scenegraph), setBrushingChartInstance(this.activeChartInstance, col, row));
|
|
44621
44777
|
}), this.activeChartInstance.on("brushEnd", params => {
|
|
44622
44778
|
var _a;
|
|
44623
|
-
table.scenegraph.updateChartState(null === (_a = null == params ? void 0 : params.value) || void 0 === _a ? void 0 : _a.inBrushData), Chart.temp = 0, setTimeout(() => {
|
|
44779
|
+
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(() => {
|
|
44624
44780
|
Chart.temp = 1;
|
|
44625
44781
|
}, 0);
|
|
44626
|
-
}), table.options.chartDimensionLinkage && this.activeChartInstance.on("
|
|
44782
|
+
}), (null === (_g = table.options.chartDimensionLinkage) || void 0 === _g ? void 0 : _g.showTooltip) && ("pie" === this.attribute.spec.type && (this.activeChartInstance.on("pointerover", {
|
|
44783
|
+
markName: "pie"
|
|
44784
|
+
}, params => {
|
|
44785
|
+
var _a;
|
|
44786
|
+
const categoryField = this.attribute.spec.categoryField,
|
|
44787
|
+
datum = {
|
|
44788
|
+
[categoryField]: null === (_a = null == params ? void 0 : params.datum) || void 0 === _a ? void 0 : _a[categoryField]
|
|
44789
|
+
};
|
|
44790
|
+
generateChartInstanceListByViewRange(datum, table, !1);
|
|
44791
|
+
}), this.activeChartInstance.on("pointerout", {
|
|
44792
|
+
markName: "pie"
|
|
44793
|
+
}, params => {
|
|
44794
|
+
var _a;
|
|
44795
|
+
const categoryField = this.attribute.spec.categoryField,
|
|
44796
|
+
datum = {
|
|
44797
|
+
[categoryField]: null === (_a = null == params ? void 0 : params.datum) || void 0 === _a ? void 0 : _a[categoryField]
|
|
44798
|
+
};
|
|
44799
|
+
generateChartInstanceListByViewRange(datum, table, !0);
|
|
44800
|
+
})), this.activeChartInstance.on("dimensionHover", params => {
|
|
44627
44801
|
var _a, _b;
|
|
44802
|
+
if (isDisabledTooltipToAllChartInstances()) return;
|
|
44803
|
+
this.activeChartInstance.disableTooltip(!1);
|
|
44628
44804
|
const dimensionInfo = null == params ? void 0 : params.dimensionInfo[0],
|
|
44629
44805
|
canvasXY = null === (_a = null == params ? void 0 : params.event) || void 0 === _a ? void 0 : _a.canvas,
|
|
44630
44806
|
viewport = null === (_b = null == params ? void 0 : params.event) || void 0 === _b ? void 0 : _b.viewport;
|
|
@@ -44641,11 +44817,11 @@
|
|
|
44641
44817
|
prev_justShowMarkTooltip = this.justShowMarkTooltip;
|
|
44642
44818
|
params.mark && params.datum && !Array.isArray(params.datum) ? (this.activeChartInstanceHoverOnMark = params.mark, justShowMarkTooltip = !0) : (this.activeChartInstanceHoverOnMark = null, justShowMarkTooltip = !1), this.justShowMarkTooltip = justShowMarkTooltip;
|
|
44643
44819
|
let delayRunDimensionHover = !1;
|
|
44644
|
-
if (!1 !== prev_justShowMarkTooltip && !1 === justShowMarkTooltip ? (this.justShowMarkTooltipTimer = Date.now(), delayRunDimensionHover = !0) : !1 === prev_justShowMarkTooltip && !1 === justShowMarkTooltip ? delayRunDimensionHover = Date.now() - this.justShowMarkTooltipTimer < 100 : (!1 === prev_justShowMarkTooltip && !0 === justShowMarkTooltip || !0 === prev_justShowMarkTooltip && !0 === justShowMarkTooltip) && (delayRunDimensionHover = !1,
|
|
44820
|
+
if (!1 !== prev_justShowMarkTooltip && !1 === justShowMarkTooltip ? (this.justShowMarkTooltipTimer = Date.now(), delayRunDimensionHover = !0) : !1 === prev_justShowMarkTooltip && !1 === justShowMarkTooltip ? delayRunDimensionHover = Date.now() - this.justShowMarkTooltipTimer < 100 : (!1 === prev_justShowMarkTooltip && !0 === justShowMarkTooltip || !0 === prev_justShowMarkTooltip && !0 === justShowMarkTooltip) && (delayRunDimensionHover = !1, this.clearDelayRunDimensionHoverTimer()), "enter" === params.action || "move" === params.action || preMark !== this.activeChartInstanceHoverOnMark) {
|
|
44645
44821
|
const dimensionValue = dimensionInfo.value,
|
|
44646
44822
|
indicatorsAsCol = table.options.indicatorsAsCol;
|
|
44647
|
-
if (delayRunDimensionHover ? (
|
|
44648
|
-
indicatorsAsCol ? generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1) : generateChartInstanceListByColumnDirection(col, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1);
|
|
44823
|
+
if (delayRunDimensionHover ? (this.clearDelayRunDimensionHoverTimer(), this.delayRunDimensionHoverTimer = setTimeout(() => {
|
|
44824
|
+
isDisabledTooltipToAllChartInstances() || (indicatorsAsCol ? generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1) : generateChartInstanceListByColumnDirection(col, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1));
|
|
44649
44825
|
}, 100)) : indicatorsAsCol ? generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1) : generateChartInstanceListByColumnDirection(col, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1), indicatorsAsCol) {
|
|
44650
44826
|
const series = dimensionInfo.data[0].series,
|
|
44651
44827
|
width = "histogram" === this.attribute.spec.type || "line" === series.type || "area" === series.type ? 0 : series.getYAxisHelper().getBandwidth(0);
|
|
@@ -44686,21 +44862,26 @@
|
|
|
44686
44862
|
}
|
|
44687
44863
|
}
|
|
44688
44864
|
}
|
|
44689
|
-
}), null === (
|
|
44865
|
+
})), null === (_j = (_h = table)._bindChartEvent) || void 0 === _j || _j.call(_h, this.activeChartInstance), isDisabledTooltipToAllChartInstances() && this.activeChartInstance.disableTooltip(!0);
|
|
44866
|
+
}
|
|
44867
|
+
clearDelayRunDimensionHoverTimer() {
|
|
44868
|
+
clearTimeout(this.delayRunDimensionHoverTimer), this.delayRunDimensionHoverTimer = void 0;
|
|
44690
44869
|
}
|
|
44691
44870
|
deactivate(table, {
|
|
44871
|
+
forceRelease = !1,
|
|
44692
44872
|
releaseChartInstance = !0,
|
|
44693
44873
|
releaseColumnChartInstance = !0,
|
|
44694
|
-
releaseRowChartInstance = !0
|
|
44874
|
+
releaseRowChartInstance = !0,
|
|
44875
|
+
releaseAllChartInstance = !1
|
|
44695
44876
|
} = {}) {
|
|
44696
44877
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
44697
|
-
if (this.activeChartInstanceHoverOnMark = null, this.justShowMarkTooltip = void 0, this.justShowMarkTooltipTimer = Date.now(),
|
|
44698
|
-
null === (_a = this.activeChartInstance) || void 0 === _a || _a.updateViewBox({
|
|
44878
|
+
if (this.activeChartInstanceHoverOnMark = null, this.justShowMarkTooltip = void 0, this.justShowMarkTooltipTimer = Date.now(), this.clearDelayRunDimensionHoverTimer(), releaseChartInstance) {
|
|
44879
|
+
!this.activeChartInstance || !forceRelease && getBrushingChartInstance() && getBrushingChartInstance() === this.activeChartInstance || (null === (_a = this.activeChartInstance) || void 0 === _a || _a.updateViewBox({
|
|
44699
44880
|
x1: -1e3,
|
|
44700
44881
|
x2: -800,
|
|
44701
44882
|
y1: -1e3,
|
|
44702
44883
|
y2: -800
|
|
44703
|
-
}, !1, !1), null === (_b = this.activeChartInstance) || void 0 === _b || _b.release(), this.activeChartInstance = null;
|
|
44884
|
+
}, !1, !1), null === (_b = this.activeChartInstance) || void 0 === _b || _b.release(), this.activeChartInstance = null);
|
|
44704
44885
|
const {
|
|
44705
44886
|
col: col,
|
|
44706
44887
|
row: row
|
|
@@ -44713,7 +44894,7 @@
|
|
|
44713
44894
|
} = this.parent;
|
|
44714
44895
|
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));
|
|
44715
44896
|
}
|
|
44716
|
-
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);
|
|
44897
|
+
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));
|
|
44717
44898
|
}
|
|
44718
44899
|
updateData(data) {
|
|
44719
44900
|
this.attribute.data = data;
|
|
@@ -44728,13 +44909,14 @@
|
|
|
44728
44909
|
y1: y1,
|
|
44729
44910
|
x2: x2,
|
|
44730
44911
|
y2: y2
|
|
44731
|
-
} = cellGroup.globalAABBBounds
|
|
44732
|
-
|
|
44733
|
-
|
|
44734
|
-
|
|
44735
|
-
|
|
44736
|
-
|
|
44737
|
-
|
|
44912
|
+
} = cellGroup.globalAABBBounds,
|
|
44913
|
+
viewBox = {
|
|
44914
|
+
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)),
|
|
44915
|
+
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)),
|
|
44916
|
+
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)),
|
|
44917
|
+
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))
|
|
44918
|
+
};
|
|
44919
|
+
return this.activeChartInstance ? this.activeChartInstanceLastViewBox = viewBox : this.activeChartInstanceLastViewBox = null, viewBox;
|
|
44738
44920
|
}
|
|
44739
44921
|
}
|
|
44740
44922
|
function getTableBounds(col, row, table) {
|
|
@@ -44949,7 +45131,7 @@
|
|
|
44949
45131
|
{
|
|
44950
45132
|
width = groupAttribute.width,
|
|
44951
45133
|
height = groupAttribute.height
|
|
44952
|
-
} =
|
|
45134
|
+
} = chart.attribute,
|
|
44953
45135
|
{
|
|
44954
45136
|
table: table
|
|
44955
45137
|
} = chart.getRootNode(),
|
|
@@ -44977,8 +45159,9 @@
|
|
|
44977
45159
|
});
|
|
44978
45160
|
}
|
|
44979
45161
|
}
|
|
44980
|
-
const
|
|
44981
|
-
|
|
45162
|
+
const lastViewBox = chart.activeChartInstanceLastViewBox,
|
|
45163
|
+
viewBox = chart.getViewBox();
|
|
45164
|
+
lastViewBox && viewBox.x1 === lastViewBox.x1 && viewBox.x2 === lastViewBox.x2 && viewBox.y1 === lastViewBox.y1 && viewBox.y2 === lastViewBox.y2 || activeChartInstance.updateViewBox({
|
|
44982
45165
|
x1: 0,
|
|
44983
45166
|
x2: viewBox.x2 - viewBox.x1,
|
|
44984
45167
|
y1: 0,
|
|
@@ -48506,18 +48689,25 @@
|
|
|
48506
48689
|
}
|
|
48507
48690
|
function clearChartCacheImage(scenegraph) {
|
|
48508
48691
|
var _a;
|
|
48692
|
+
const brushingCellPos = getBrushingChartInstanceCellPos();
|
|
48509
48693
|
for (let c = scenegraph.proxy.colStart; c <= scenegraph.proxy.colEnd; c++) {
|
|
48510
48694
|
const columnGroup = scenegraph.getColGroup(c);
|
|
48511
48695
|
null === (_a = null == columnGroup ? void 0 : columnGroup.getChildren()) || void 0 === _a || _a.forEach(cellNode => {
|
|
48512
|
-
cellNode.children.forEach(node => {
|
|
48696
|
+
brushingCellPos && brushingCellPos.col === cellNode.col && brushingCellPos.row === cellNode.row || cellNode.children.forEach(node => {
|
|
48513
48697
|
"chart" === node.type && (node.cacheCanvas = null, node.addUpdateBoundTag());
|
|
48514
48698
|
});
|
|
48515
48699
|
});
|
|
48516
48700
|
}
|
|
48517
48701
|
}
|
|
48518
|
-
function
|
|
48702
|
+
function clearCellChartCacheImage(col, row, scenegraph) {
|
|
48703
|
+
scenegraph.getCell(col, row).children.forEach(node => {
|
|
48704
|
+
"chart" === node.type && (node.cacheCanvas = null, node.addUpdateBoundTag());
|
|
48705
|
+
});
|
|
48706
|
+
}
|
|
48707
|
+
function updateChartState(scenegraph, datum, selectedDataMode) {
|
|
48519
48708
|
const table = scenegraph.table;
|
|
48520
48709
|
if (table.isPivotChart()) {
|
|
48710
|
+
table._selectedDataMode = selectedDataMode;
|
|
48521
48711
|
const preSelectItemsCount = table._selectedDataItemsInChart.length;
|
|
48522
48712
|
if ((null == datum || 0 === (null == datum ? void 0 : datum.length) || 0 === Object.keys(datum).length) && 0 === preSelectItemsCount) return;
|
|
48523
48713
|
const newSelectedDataItemsInChart = [];
|
|
@@ -48532,7 +48722,7 @@
|
|
|
48532
48722
|
for (const itemKey in datum) itemKey.startsWith("VGRAMMAR_") || itemKey.startsWith("__VCHART") || (selectedState[itemKey] = datum[itemKey]);
|
|
48533
48723
|
newSelectedDataItemsInChart.push(selectedState);
|
|
48534
48724
|
}
|
|
48535
|
-
isEqual(table._selectedDataItemsInChart, newSelectedDataItemsInChart) || (table._selectedDataItemsInChart = newSelectedDataItemsInChart, table.internalProps.layoutMap.updateDataStateToChartInstance(), clearChartCacheImage(scenegraph), table.scenegraph.updateNextFrame());
|
|
48725
|
+
"multiple-select" === selectedDataMode ? (null == datum || 0 === (null == datum ? void 0 : datum.length) || 0 === Object.keys(datum).length ? table._selectedDataItemsInChart = [] : table._selectedDataItemsInChart.push(...newSelectedDataItemsInChart), table.internalProps.layoutMap.updateDataStateToChartInstance(), clearChartCacheImage(scenegraph), table.scenegraph.updateNextFrame()) : isEqual(table._selectedDataItemsInChart, newSelectedDataItemsInChart) || (table._selectedDataItemsInChart = newSelectedDataItemsInChart, table.internalProps.layoutMap.updateDataStateToChartInstance(), clearChartCacheImage(scenegraph), table.scenegraph.updateNextFrame());
|
|
48536
48726
|
}
|
|
48537
48727
|
}
|
|
48538
48728
|
function updateChartGraphicSize(cellNode, width, height) {
|
|
@@ -49265,16 +49455,28 @@
|
|
|
49265
49455
|
resetResidentHoverIcon(col, row) {
|
|
49266
49456
|
resetResidentHoverIcon(col, row, this);
|
|
49267
49457
|
}
|
|
49268
|
-
deactivateChart(col, row) {
|
|
49269
|
-
var _a, _b, _c;
|
|
49458
|
+
deactivateChart(col, row, forceRelease = !1) {
|
|
49459
|
+
var _a, _b, _c, _d, _e, _f;
|
|
49460
|
+
if (forceRelease) {
|
|
49461
|
+
const brushingChartInstanceCellPos = getBrushingChartInstanceCellPos(),
|
|
49462
|
+
brushingChartInstance = getBrushingChartInstance();
|
|
49463
|
+
brushingChartInstanceCellPos && brushingChartInstance && (clearAndReleaseBrushingChartInstance(this), clearCellChartCacheImage(brushingChartInstanceCellPos.col, brushingChartInstanceCellPos.row, this));
|
|
49464
|
+
}
|
|
49270
49465
|
if (-1 === col || -1 === row) return;
|
|
49271
49466
|
const cellGroup = this.getCell(col, row);
|
|
49272
49467
|
if (null === (_a = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _a ? void 0 : _a.deactivate) {
|
|
49468
|
+
if (forceRelease) return void (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, {
|
|
49469
|
+
forceRelease: !0,
|
|
49470
|
+
releaseChartInstance: !0,
|
|
49471
|
+
releaseColumnChartInstance: !0,
|
|
49472
|
+
releaseRowChartInstance: !0,
|
|
49473
|
+
releaseAllChartInstance: !0
|
|
49474
|
+
}));
|
|
49273
49475
|
const chartType = (null == cellGroup ? void 0 : cellGroup.firstChild).attribute.spec.type;
|
|
49274
|
-
null === (
|
|
49275
|
-
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,
|
|
49276
|
-
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,
|
|
49277
|
-
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
|
|
49476
|
+
null === (_e = null === (_d = null == cellGroup ? void 0 : cellGroup.firstChild) || void 0 === _d ? void 0 : _d.deactivate) || void 0 === _e || _e.call(_d, this.table, (null === (_f = this.table.options.chartDimensionLinkage) || void 0 === _f ? void 0 : _f.showTooltip) ? {
|
|
49477
|
+
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),
|
|
49478
|
+
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),
|
|
49479
|
+
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)
|
|
49278
49480
|
} : void 0);
|
|
49279
49481
|
}
|
|
49280
49482
|
}
|
|
@@ -49322,8 +49524,15 @@
|
|
|
49322
49524
|
updateChartSizeForResizeRowHeight(row) {
|
|
49323
49525
|
updateChartSizeForResizeRowHeight(this, row);
|
|
49324
49526
|
}
|
|
49325
|
-
updateChartState(datum) {
|
|
49326
|
-
|
|
49527
|
+
updateChartState(datum, selectedDataMode) {
|
|
49528
|
+
var _a, _b, _c;
|
|
49529
|
+
if (this.table.isPivotChart()) {
|
|
49530
|
+
if (null == datum || 0 === (null == datum ? void 0 : datum.length) || 0 === Object.keys(datum).length) {
|
|
49531
|
+
const brushingChartInstance = getBrushingChartInstance();
|
|
49532
|
+
brushingChartInstance && (null === (_a = brushingChartInstance.getChart()) || void 0 === _a || _a.getComponentsByKey("brush")[0].clearBrushStateAndMask()), null === (_c = null === (_b = this.table.options.chartDimensionLinkage) || void 0 === _b ? void 0 : _b.clearChartState) || void 0 === _c || _c.call(_b);
|
|
49533
|
+
}
|
|
49534
|
+
updateChartState(this, datum, selectedDataMode);
|
|
49535
|
+
}
|
|
49327
49536
|
}
|
|
49328
49537
|
updateCheckboxCellState(col, row, checked) {
|
|
49329
49538
|
var _a, _b;
|
|
@@ -52350,7 +52559,7 @@
|
|
|
52350
52559
|
}, 0 !== e.button) return;
|
|
52351
52560
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
52352
52561
|
if (eventManager.downIcon = void 0, stateManager.interactionState !== InteractionState.default) return;
|
|
52353
|
-
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;
|
|
52562
|
+
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), table.scenegraph.deactivateChart(-1, -1, !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;
|
|
52354
52563
|
const isCompleteEdit = null === (_e = table.editorManager) || void 0 === _e ? void 0 : _e.completeEdit(e.nativeEvent);
|
|
52355
52564
|
getPromiseValue(isCompleteEdit, isCompleteEdit => {
|
|
52356
52565
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
@@ -52378,7 +52587,7 @@
|
|
|
52378
52587
|
}
|
|
52379
52588
|
eventManager.dealTableHover(eventArgsSet);
|
|
52380
52589
|
} else {
|
|
52381
|
-
if (!eventManager.checkCellFillhandle(eventArgsSet) && (eventManager.checkColumnResize(eventArgsSet, !0) || eventManager.checkRowResize(eventArgsSet, !0))) return table.scenegraph.updateChartState(null), void stateManager.updateInteractionState(InteractionState.grabing);
|
|
52590
|
+
if (!eventManager.checkCellFillhandle(eventArgsSet) && (eventManager.checkColumnResize(eventArgsSet, !0) || eventManager.checkRowResize(eventArgsSet, !0))) return table.scenegraph.updateChartState(null, void 0), table.scenegraph.deactivateChart(-1, -1, !0), void stateManager.updateInteractionState(InteractionState.grabing);
|
|
52382
52591
|
if (eventManager.checkColumnMover(eventArgsSet)) return void stateManager.updateInteractionState(InteractionState.grabing);
|
|
52383
52592
|
if (eventManager.checkCellFillhandle(eventArgsSet, !0) && eventManager.dealFillSelect(eventArgsSet)) return void stateManager.updateInteractionState(InteractionState.grabing);
|
|
52384
52593
|
eventManager.dealTableSelect(eventArgsSet) && stateManager.updateInteractionState(InteractionState.grabing);
|
|
@@ -52530,7 +52739,7 @@
|
|
|
52530
52739
|
if (!(null === (_a = table.options.customConfig) || void 0 === _a ? void 0 : _a.selectCellWhenCellEditorNotExists) && !1 === isCompleteEdit) return;
|
|
52531
52740
|
const hitIcon = (null === (_b = e.target.role) || void 0 === _b ? void 0 : _b.startsWith("icon")) ? e.target : void 0;
|
|
52532
52741
|
if (eventManager.downIcon = hitIcon, "touch" === e.pointerType || hitIcon || eventManager.checkCellFillhandle(eventArgsSet) || stateManager.columnResize.resizing || !eventManager.checkColumnResize(eventArgsSet, !0)) ;else {
|
|
52533
|
-
table.scenegraph.updateChartState(null), stateManager.updateInteractionState(InteractionState.grabing);
|
|
52742
|
+
table.scenegraph.updateChartState(null, void 0), table.scenegraph.deactivateChart(-1, -1, !0), stateManager.updateInteractionState(InteractionState.grabing);
|
|
52534
52743
|
const {
|
|
52535
52744
|
eventArgs: eventArgs
|
|
52536
52745
|
} = eventArgsSet;
|
|
@@ -52549,7 +52758,7 @@
|
|
|
52549
52758
|
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 {
|
|
52550
52759
|
stateManager.updateInteractionState(InteractionState.default), eventManager.dealTableHover();
|
|
52551
52760
|
const isHasSelected = !!(null === (_a = stateManager.select.ranges) || void 0 === _a ? void 0 : _a.length);
|
|
52552
|
-
(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);
|
|
52761
|
+
(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), table.scenegraph.deactivateChart(-1, -1, !0);
|
|
52553
52762
|
}
|
|
52554
52763
|
}), table.scenegraph.stage.addEventListener("pointermove", e => {
|
|
52555
52764
|
var _a, _b, _c;
|
|
@@ -52667,7 +52876,15 @@
|
|
|
52667
52876
|
table.stateManager.setCheckedState(col, row, cellInfo.field, e.detail.checked), table.fireListeners(TABLE_EVENT_TYPE.SWITCH_STATE_CHANGE, cellsEvent), table.scenegraph.updateNextFrame();
|
|
52668
52877
|
}), table.scenegraph.stage.addEventListener("wheel", e => {
|
|
52669
52878
|
var _a;
|
|
52670
|
-
e.path.find(node => "legend" === node.name)
|
|
52879
|
+
if (!e.path.find(node => "legend" === node.name)) {
|
|
52880
|
+
null === (_a = table.editorManager) || void 0 === _a || _a.completeEdit();
|
|
52881
|
+
const {
|
|
52882
|
+
cellPos: cellPos
|
|
52883
|
+
} = table.stateManager.hover,
|
|
52884
|
+
prevHoverCellCol = cellPos.col,
|
|
52885
|
+
prevHoverCellRow = cellPos.row;
|
|
52886
|
+
table.scenegraph.deactivateChart(prevHoverCellCol, prevHoverCellRow, !0), table.eventManager._enableTableScroll && handleWhell(e, stateManager);
|
|
52887
|
+
}
|
|
52671
52888
|
});
|
|
52672
52889
|
}
|
|
52673
52890
|
function bindGesture(eventManager) {
|
|
@@ -52782,11 +52999,13 @@
|
|
|
52782
52999
|
const throttleVerticalWheel = throttle(stateManager.updateVerticalScrollBar, 20),
|
|
52783
53000
|
throttleHorizontalWheel = throttle(stateManager.updateHorizontalScrollBar, 20);
|
|
52784
53001
|
scenegraph.component.vScrollBar.addEventListener("scrollDrag", e => {
|
|
52785
|
-
|
|
53002
|
+
var _a;
|
|
53003
|
+
scenegraph.table.eventManager.isDown && (scenegraph.table.eventManager.isDraging = !0), stateManager.fastScrolling = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling), scenegraph.table.stateManager.hideMenu(), null === (_a = scenegraph.table.editorManager) || void 0 === _a || _a.completeEdit(), table.scenegraph.deactivateChart(-1, -1, !0);
|
|
52786
53004
|
const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
|
|
52787
53005
|
throttleVerticalWheel(ratio, e);
|
|
52788
53006
|
}), scenegraph.component.hScrollBar.addEventListener("scrollDrag", e => {
|
|
52789
|
-
|
|
53007
|
+
var _a;
|
|
53008
|
+
scenegraph.table.eventManager.isDown && (scenegraph.table.eventManager.isDraging = !0), stateManager.fastScrolling = !0, stateManager.interactionState !== InteractionState.scrolling && stateManager.updateInteractionState(InteractionState.scrolling), scenegraph.table.stateManager.hideMenu(), null === (_a = scenegraph.table.editorManager) || void 0 === _a || _a.completeEdit(), table.scenegraph.deactivateChart(-1, -1, !0);
|
|
52790
53009
|
const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
|
|
52791
53010
|
throttleHorizontalWheel(ratio);
|
|
52792
53011
|
});
|
|
@@ -52921,22 +53140,22 @@
|
|
|
52921
53140
|
table.isReleased || 0 === e.width && 0 === e.height || ((table.autoFillWidth || table.autoFillHeight || "adaptive" === table.widthMode || "adaptive" === table.heightMode) && (null === (_a = table.editorManager) || void 0 === _a || _a.completeEdit()), isValid$1(table.options.pixelRatio) || table.setPixelRatio(getPixelRatio()), e.windowSizeNotChange || table.resize());
|
|
52922
53141
|
});
|
|
52923
53142
|
const globalPointerdownCallback = e => {
|
|
52924
|
-
var _a;
|
|
53143
|
+
var _a, _b, _c, _d;
|
|
52925
53144
|
if (table.isReleased) return;
|
|
52926
53145
|
table.eventManager.LastBodyPointerXY = {
|
|
52927
53146
|
x: e.x,
|
|
52928
53147
|
y: e.y
|
|
52929
53148
|
}, table.eventManager.isDown = !0;
|
|
52930
53149
|
const target = e.target;
|
|
52931
|
-
if (!table.getElement().contains(target) && !table.internalProps.menuHandler.containElement(target)) {
|
|
52932
|
-
const isCompleteEdit = null === (
|
|
53150
|
+
if (!table.getElement().contains(target) && !table.internalProps.menuHandler.containElement(target) && (!(null === (_a = table.options.customConfig) || void 0 === _a ? void 0 : _a.shouldTreatAsClickOnTable) || (null === (_b = table.options.customConfig) || void 0 === _b ? void 0 : _b.shouldTreatAsClickOnTable) && !(null === (_c = table.options.customConfig) || void 0 === _c ? void 0 : _c.shouldTreatAsClickOnTable(e)))) {
|
|
53151
|
+
const isCompleteEdit = null === (_d = table.editorManager) || void 0 === _d ? void 0 : _d.completeEdit(e);
|
|
52933
53152
|
getPromiseValue(isCompleteEdit, isCompleteEdit => {
|
|
52934
53153
|
var _a, _b;
|
|
52935
53154
|
if (!1 !== isCompleteEdit && (null === (_a = table.options.select) || void 0 === _a ? void 0 : _a.outsideClickDeselect)) {
|
|
52936
53155
|
const isHasSelected = !!(null === (_b = stateManager.select.ranges) || void 0 === _b ? void 0 : _b.length);
|
|
52937
53156
|
eventManager.dealTableSelect(), stateManager.endSelectCells(!0, isHasSelected);
|
|
52938
53157
|
}
|
|
52939
|
-
});
|
|
53158
|
+
}), table.scenegraph.updateChartState(null, void 0), table.scenegraph.deactivateChart(-1, -1, !0);
|
|
52940
53159
|
}
|
|
52941
53160
|
};
|
|
52942
53161
|
eventManager.globalEventListeners.push({
|
|
@@ -56122,7 +56341,7 @@
|
|
|
56122
56341
|
}
|
|
56123
56342
|
constructor(container, options = {}) {
|
|
56124
56343
|
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;
|
|
56125
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.22.
|
|
56344
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.22.12-alpha.0", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "node" === Env.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");
|
|
56126
56345
|
this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
56127
56346
|
options: options,
|
|
56128
56347
|
container: container
|