@visactor/vtable-calendar 1.22.7-alpha.5 → 1.22.7-alpha.7
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 +92 -115
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +4 -4
package/dist/vtable-calendar.js
CHANGED
|
@@ -9498,7 +9498,7 @@
|
|
|
9498
9498
|
}
|
|
9499
9499
|
}]), noAnimateAttrs && this.setAttributesAndPreventAnimate(noAnimateAttrs, !1, {
|
|
9500
9500
|
type: AttributeUpdateType.STATE
|
|
9501
|
-
})
|
|
9501
|
+
});
|
|
9502
9502
|
} else this.stopStateAnimates(), this.setAttributesAndPreventAnimate(attrs, !1, {
|
|
9503
9503
|
type: AttributeUpdateType.STATE
|
|
9504
9504
|
}), this.finalAttribute && Object.assign(this.finalAttribute, attrs);
|
|
@@ -9524,7 +9524,7 @@
|
|
|
9524
9524
|
getNormalAttribute(key) {
|
|
9525
9525
|
var _a, _b;
|
|
9526
9526
|
const value = this.attribute[key];
|
|
9527
|
-
return this.animates
|
|
9527
|
+
return this.animates ? null === (_a = this.finalAttribute) || void 0 === _a ? void 0 : _a[key] : null != value ? value : null === (_b = this.finalAttribute) || void 0 === _b ? void 0 : _b[key];
|
|
9528
9528
|
}
|
|
9529
9529
|
clearStates(hasAnimation) {
|
|
9530
9530
|
this.hasState() && this.normalAttrs ? (this.currentStates = [], this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0)) : this.currentStates = [], this.normalAttrs = null;
|
|
@@ -34932,7 +34932,9 @@
|
|
|
34932
34932
|
DELETE_RECORD: "delete_record",
|
|
34933
34933
|
UPDATE_RECORD: "update_record",
|
|
34934
34934
|
ADD_COLUMN: "add_column",
|
|
34935
|
-
DELETE_COLUMN: "delete_column"
|
|
34935
|
+
DELETE_COLUMN: "delete_column",
|
|
34936
|
+
FILTER_MENU_SHOW: "filter_menu_show",
|
|
34937
|
+
FILTER_MENU_HIDE: "filter_menu_hide"
|
|
34936
34938
|
};
|
|
34937
34939
|
|
|
34938
34940
|
const judgeType = value => {
|
|
@@ -37236,9 +37238,9 @@
|
|
|
37236
37238
|
length: this._sourceLength
|
|
37237
37239
|
}, (_, i) => i), "tree" === this.rowHierarchyType && this.initTreeHierarchyState(), this.userPagination || (this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength);
|
|
37238
37240
|
}
|
|
37239
|
-
updateFilterRules(filterRules) {
|
|
37241
|
+
updateFilterRules(filterRules, onFilterRecordsEnd) {
|
|
37240
37242
|
var _a, _b, _c;
|
|
37241
|
-
this.lastFilterRules = this.dataConfig.filterRules, this.dataConfig.filterRules = filterRules, this._source = this.processRecords(null !== (_b = null === (_a = this.dataSourceObj) || void 0 === _a ? void 0 : _a.records) && void 0 !== _b ? _b : this.dataSourceObj), this._sourceLength = (null === (_c = this._source) || void 0 === _c ? void 0 : _c.length) || 0, this.currentIndexedData = Array.from({
|
|
37243
|
+
this.lastFilterRules = this.dataConfig.filterRules, this.dataConfig.filterRules = filterRules, this._source = this.processRecords(null !== (_b = null === (_a = this.dataSourceObj) || void 0 === _a ? void 0 : _a.records) && void 0 !== _b ? _b : this.dataSourceObj), onFilterRecordsEnd && (this._source = onFilterRecordsEnd(this._source)), this._sourceLength = (null === (_c = this._source) || void 0 === _c ? void 0 : _c.length) || 0, this.currentIndexedData = Array.from({
|
|
37242
37244
|
length: this._sourceLength
|
|
37243
37245
|
}, (_, i) => i), this.userPagination || (this.pagination.perPageCount = this._sourceLength, this.pagination.totalCount = this._sourceLength, "tree" === this.rowHierarchyType && this.initTreeHierarchyState()), this.updatePagerData();
|
|
37244
37246
|
}
|
|
@@ -43786,53 +43788,39 @@
|
|
|
43786
43788
|
for (let i = rowStart; i <= rowEnd; i++) {
|
|
43787
43789
|
const cellGroup = table.scenegraph.getCell(col, i),
|
|
43788
43790
|
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
43789
|
-
chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListColumnByColumnDirection[col][i] || isValid$3(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance), setTimeout(() => {
|
|
43790
|
-
var _a, _b, _c, _d
|
|
43791
|
+
chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListColumnByColumnDirection[col][i] || isValid$3(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance), table.stateManager.hover.cellPos.col === col && table.stateManager.hover.cellPos.row === i || setTimeout(() => {
|
|
43792
|
+
var _a, _b, _c, _d;
|
|
43791
43793
|
if (null === (_a = chartInstanceListColumnByColumnDirection[col]) || void 0 === _a ? void 0 : _a[i]) {
|
|
43792
|
-
const
|
|
43794
|
+
const absolutePosition = table.getCellRelativeRect(col, i),
|
|
43795
|
+
chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
43793
43796
|
let isShowTooltip = !isScatter;
|
|
43794
|
-
if (!isScatter && "object" == typeof chartDimensionLinkage
|
|
43795
|
-
const
|
|
43797
|
+
if (!isScatter && "object" == typeof chartDimensionLinkage && (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === rowEnd && isShowTooltip)) {
|
|
43798
|
+
const heightLimitToShowTooltipForLastRow = chartDimensionLinkage.heightLimitToShowTooltipForLastRow,
|
|
43796
43799
|
{
|
|
43797
43800
|
rowEnd: rowEnd1
|
|
43798
|
-
} = table.getBodyVisibleRowRange(
|
|
43801
|
+
} = table.getBodyVisibleRowRange(-heightLimitToShowTooltipForLastRow);
|
|
43799
43802
|
if (rowEnd1 === rowEnd) isShowTooltip = !0;else {
|
|
43800
43803
|
const {
|
|
43801
43804
|
rowEnd: rowEnd2
|
|
43802
|
-
} = table.getBodyVisibleRowRange(
|
|
43805
|
+
} = table.getBodyVisibleRowRange(5);
|
|
43803
43806
|
isShowTooltip = rowEnd2 !== rowEnd;
|
|
43804
43807
|
}
|
|
43805
|
-
} else if (i === rowStart && isShowTooltip) {
|
|
43806
|
-
const heightLimitToShowTooltipForEdgeRow = null !== (_d = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _d ? _d : 0,
|
|
43807
|
-
{
|
|
43808
|
-
rowStart: rowStart1
|
|
43809
|
-
} = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
|
|
43810
|
-
if (rowStart1 === rowStart) isShowTooltip = !0;else {
|
|
43811
|
-
const {
|
|
43812
|
-
rowStart: rowStart2
|
|
43813
|
-
} = table.getBodyVisibleRowRange(0, -5);
|
|
43814
|
-
isShowTooltip = rowStart2 !== rowStart;
|
|
43815
|
-
}
|
|
43816
|
-
}
|
|
43817
|
-
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 {
|
|
43818
|
-
const bodyBoundryTop = table.frozenRowCount ? table.getCellRelativeRect(col, table.frozenRowCount - 1).bottom : 0,
|
|
43819
|
-
absolutePositionTop = Math.max(bodyBoundryTop, table.getCellRelativeRect(col, i).top);
|
|
43820
|
-
hideTooltip ? (table.stateManager.hover.cellPos.col === col && table.stateManager.hover.cellPos.row === i || chartInstanceListColumnByColumnDirection[col][i].hideTooltip(), chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
43821
|
-
tooltip: !1,
|
|
43822
|
-
showTooltipOption: {
|
|
43823
|
-
x: canvasXY.x,
|
|
43824
|
-
y: absolutePositionTop,
|
|
43825
|
-
activeType: "dimension"
|
|
43826
|
-
}
|
|
43827
|
-
})) : chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
43828
|
-
tooltip: isShowTooltip,
|
|
43829
|
-
showTooltipOption: {
|
|
43830
|
-
x: canvasXY.x,
|
|
43831
|
-
y: absolutePositionTop,
|
|
43832
|
-
activeType: "dimension"
|
|
43833
|
-
}
|
|
43834
|
-
});
|
|
43835
43808
|
}
|
|
43809
|
+
isScatter ? null === (_d = (_c = chartInstanceListColumnByColumnDirection[col][i]).showCrosshair) || void 0 === _d || _d.call(_c, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue) : hideTooltip ? (chartInstanceListColumnByColumnDirection[col][i].hideTooltip(), chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
43810
|
+
tooltip: !1,
|
|
43811
|
+
showTooltipOption: {
|
|
43812
|
+
x: canvasXY.x,
|
|
43813
|
+
y: absolutePosition.top + 3,
|
|
43814
|
+
activeType: "dimension"
|
|
43815
|
+
}
|
|
43816
|
+
})) : chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
43817
|
+
tooltip: isShowTooltip,
|
|
43818
|
+
showTooltipOption: {
|
|
43819
|
+
x: canvasXY.x,
|
|
43820
|
+
y: absolutePosition.top + 3,
|
|
43821
|
+
activeType: "dimension"
|
|
43822
|
+
}
|
|
43823
|
+
});
|
|
43836
43824
|
}
|
|
43837
43825
|
}, 0), table.scenegraph.updateNextFrame();
|
|
43838
43826
|
}
|
|
@@ -43864,53 +43852,39 @@
|
|
|
43864
43852
|
for (let i = colStart; i <= colEnd; i++) {
|
|
43865
43853
|
const cellGroup = table.scenegraph.getCell(i, row),
|
|
43866
43854
|
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
43867
|
-
chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListRowByRowDirection[row][i] || isValid$3(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance), setTimeout(() => {
|
|
43855
|
+
chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListRowByRowDirection[row][i] || isValid$3(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance), table.stateManager.hover.cellPos.col === i && table.stateManager.hover.cellPos.row === row || setTimeout(() => {
|
|
43868
43856
|
var _a, _b, _c, _d;
|
|
43869
43857
|
if (null === (_a = chartInstanceListRowByRowDirection[row]) || void 0 === _a ? void 0 : _a[i]) {
|
|
43870
|
-
const
|
|
43858
|
+
const absolutePosition = table.getCellRelativeRect(i, row),
|
|
43859
|
+
chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
43871
43860
|
let isShowTooltip = !isScatter;
|
|
43872
|
-
if (!isScatter && "object" == typeof chartDimensionLinkage
|
|
43873
|
-
const
|
|
43861
|
+
if (!isScatter && "object" == typeof chartDimensionLinkage && (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === colEnd && isShowTooltip)) {
|
|
43862
|
+
const widthLimitToShowTooltipForLastColumn = chartDimensionLinkage.widthLimitToShowTooltipForLastColumn,
|
|
43874
43863
|
{
|
|
43875
43864
|
colEnd: colEnd1
|
|
43876
|
-
} = table.getBodyVisibleColRange(
|
|
43865
|
+
} = table.getBodyVisibleColRange(-widthLimitToShowTooltipForLastColumn);
|
|
43877
43866
|
if (colEnd1 === colEnd) isShowTooltip = !0;else {
|
|
43878
43867
|
const {
|
|
43879
43868
|
colEnd: colEnd2
|
|
43880
|
-
} = table.getBodyVisibleColRange(
|
|
43869
|
+
} = table.getBodyVisibleColRange(5);
|
|
43881
43870
|
isShowTooltip = colEnd2 !== colEnd;
|
|
43882
43871
|
}
|
|
43883
|
-
} else if (i === colStart && isShowTooltip) {
|
|
43884
|
-
const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
|
|
43885
|
-
{
|
|
43886
|
-
colStart: colStart1
|
|
43887
|
-
} = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
|
|
43888
|
-
if (colStart1 === colStart) isShowTooltip = !0;else {
|
|
43889
|
-
const {
|
|
43890
|
-
colStart: colStart2
|
|
43891
|
-
} = table.getBodyVisibleColRange(0, -5);
|
|
43892
|
-
isShowTooltip = colStart2 !== colStart;
|
|
43893
|
-
}
|
|
43894
|
-
}
|
|
43895
|
-
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 {
|
|
43896
|
-
const bodyBoundryLeft = table.frozenColCount ? table.getCellRelativeRect(table.frozenColCount - 1, row).right : 0,
|
|
43897
|
-
absolutePositionLeft = Math.max(bodyBoundryLeft, table.getCellRelativeRect(i, row).left);
|
|
43898
|
-
hideTooltip ? (table.stateManager.hover.cellPos.col === i && table.stateManager.hover.cellPos.row === row || chartInstanceListRowByRowDirection[row][i].hideTooltip(), chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
43899
|
-
tooltip: !1,
|
|
43900
|
-
showTooltipOption: {
|
|
43901
|
-
x: absolutePositionLeft,
|
|
43902
|
-
y: canvasXY.y,
|
|
43903
|
-
activeType: "dimension"
|
|
43904
|
-
}
|
|
43905
|
-
})) : chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
43906
|
-
tooltip: isShowTooltip,
|
|
43907
|
-
showTooltipOption: {
|
|
43908
|
-
x: absolutePositionLeft,
|
|
43909
|
-
y: canvasXY.y,
|
|
43910
|
-
activeType: "dimension"
|
|
43911
|
-
}
|
|
43912
|
-
});
|
|
43913
43872
|
}
|
|
43873
|
+
isScatter ? null === (_d = (_c = chartInstanceListRowByRowDirection[row][i]).showCrosshair) || void 0 === _d || _d.call(_c, axis => "left" === axis.layoutOrient ? positionValueOrYValue : dimensionValueOrXValue) : hideTooltip ? (chartInstanceListRowByRowDirection[row][i].hideTooltip(), chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
43874
|
+
tooltip: !1,
|
|
43875
|
+
showTooltipOption: {
|
|
43876
|
+
x: absolutePosition.left + 3,
|
|
43877
|
+
y: canvasXY.y,
|
|
43878
|
+
activeType: "dimension"
|
|
43879
|
+
}
|
|
43880
|
+
})) : chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
43881
|
+
tooltip: isShowTooltip,
|
|
43882
|
+
showTooltipOption: {
|
|
43883
|
+
x: absolutePosition.left + 3,
|
|
43884
|
+
y: canvasXY.y,
|
|
43885
|
+
activeType: "dimension"
|
|
43886
|
+
}
|
|
43887
|
+
});
|
|
43914
43888
|
}
|
|
43915
43889
|
}, 0), table.scenegraph.updateNextFrame();
|
|
43916
43890
|
}
|
|
@@ -44634,14 +44608,7 @@
|
|
|
44634
44608
|
} = drawParams;
|
|
44635
44609
|
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());
|
|
44636
44610
|
}
|
|
44637
|
-
}
|
|
44638
|
-
componentShowContent: table.options.chartDimensionLinkage && "scatter" !== this.attribute.spec.type ? {
|
|
44639
|
-
tooltip: {
|
|
44640
|
-
dimension: !1,
|
|
44641
|
-
mark: !0
|
|
44642
|
-
},
|
|
44643
|
-
crosshair: !1
|
|
44644
|
-
} : void 0
|
|
44611
|
+
}
|
|
44645
44612
|
}));
|
|
44646
44613
|
const chartStage = this.activeChartInstance.getStage(),
|
|
44647
44614
|
matrix = this.globalTransMatrix.clone(),
|
|
@@ -44679,7 +44646,7 @@
|
|
|
44679
44646
|
indicatorsAsCol ? generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1) : generateChartInstanceListByColumnDirection(col, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1);
|
|
44680
44647
|
}, 100)) : indicatorsAsCol ? generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1) : generateChartInstanceListByColumnDirection(col, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1), indicatorsAsCol) {
|
|
44681
44648
|
const series = dimensionInfo.data[0].series,
|
|
44682
|
-
width = "histogram" === this.attribute.spec.type || "line" === series.type || "area" === series.type ? 0 : series.getYAxisHelper().getBandwidth(0);
|
|
44649
|
+
width = "histogram" === this.attribute.spec.type || "boxPlot" === this.attribute.spec.type || "line" === series.type || "area" === series.type ? 0 : series.getYAxisHelper().getBandwidth(0);
|
|
44683
44650
|
let y = series.valueToPositionY(dimensionValue);
|
|
44684
44651
|
const axisConfig = getAxisConfigInPivotChart(table.rowHeaderLevelCount - 1, row, table.internalProps.layoutMap);
|
|
44685
44652
|
let hoverOnLabelValue = yValue;
|
|
@@ -44697,7 +44664,7 @@
|
|
|
44697
44664
|
axisConfig.labelHoverOnAxis && table.scenegraph.getCell(table.rowHeaderLevelCount - 1, row).firstChild.showLabelHoverOnAxis(y + ("line" === series.type || "area" === series.type ? 0 : width / 2), hoverOnLabelValue);
|
|
44698
44665
|
} else {
|
|
44699
44666
|
const series = dimensionInfo.data[0].series,
|
|
44700
|
-
width = "histogram" === this.attribute.spec.type || "line" === series.type || "area" === series.type ? 0 : series.getXAxisHelper().getBandwidth(0);
|
|
44667
|
+
width = "histogram" === this.attribute.spec.type || "boxPlot" === this.attribute.spec.type || "line" === series.type || "area" === series.type ? 0 : series.getXAxisHelper().getBandwidth(0);
|
|
44701
44668
|
let x = series.valueToPositionX(dimensionValue);
|
|
44702
44669
|
const axisConfig = getAxisConfigInPivotChart(col, table.rowCount - table.bottomFrozenRowCount, table.internalProps.layoutMap);
|
|
44703
44670
|
let hoverOnLabelValue = dimensionValue;
|
|
@@ -51637,13 +51604,13 @@
|
|
|
51637
51604
|
}), oldHorizontalBarPos !== this.scroll.horizontalBarPos && this.checkHorizontalScrollBarEnd();
|
|
51638
51605
|
}
|
|
51639
51606
|
setScrollTop(top, event, triggerEvent = !0) {
|
|
51640
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
51607
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
51641
51608
|
const totalHeight = this.table.getAllRowsHeight(),
|
|
51642
51609
|
sizeTolerance = (null === (_a = this.table.options.customConfig) || void 0 === _a ? void 0 : _a._disableColumnAndRowSizeRound) ? 1 : 0;
|
|
51643
|
-
top = Math.max(0, Math.min(top, totalHeight - this.table.scenegraph.height - sizeTolerance)), top = Math.ceil(top);
|
|
51610
|
+
top = Math.max(0, Math.min(top, totalHeight - (null !== (_c = null === (_b = this.table.scenegraph) || void 0 === _b ? void 0 : _b.height) && void 0 !== _c ? _c : 0) - sizeTolerance)), top = Math.ceil(top);
|
|
51644
51611
|
const oldVerticalBarPos = this.scroll.verticalBarPos,
|
|
51645
|
-
yRatio = top / (totalHeight - this.table.scenegraph.height);
|
|
51646
|
-
if ((oldVerticalBarPos !== top || !0 === (null === (
|
|
51612
|
+
yRatio = top / (totalHeight - (null !== (_e = null === (_d = this.table.scenegraph) || void 0 === _d ? void 0 : _d.height) && void 0 !== _e ? _e : 0));
|
|
51613
|
+
if ((oldVerticalBarPos !== top || !0 === (null === (_g = null === (_f = this.table.options) || void 0 === _f ? void 0 : _f.customConfig) || void 0 === _g ? void 0 : _g.scrollEventAlwaysTrigger)) && triggerEvent) {
|
|
51647
51614
|
let verticalBarPos = top;
|
|
51648
51615
|
isValid$3(verticalBarPos) && !isNaN(verticalBarPos) || (verticalBarPos = 0);
|
|
51649
51616
|
const dy = verticalBarPos - oldVerticalBarPos;
|
|
@@ -51651,15 +51618,15 @@
|
|
|
51651
51618
|
event: null == event ? void 0 : event.nativeEvent,
|
|
51652
51619
|
scrollTop: verticalBarPos,
|
|
51653
51620
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
51654
|
-
scrollHeight: null === (
|
|
51655
|
-
scrollWidth: null === (
|
|
51621
|
+
scrollHeight: null === (_h = this.table.theme.scrollStyle) || void 0 === _h ? void 0 : _h.width,
|
|
51622
|
+
scrollWidth: null === (_j = this.table.theme.scrollStyle) || void 0 === _j ? void 0 : _j.width,
|
|
51656
51623
|
viewHeight: this.table.tableNoFrameHeight,
|
|
51657
51624
|
viewWidth: this.table.tableNoFrameWidth,
|
|
51658
51625
|
scrollDirection: "vertical",
|
|
51659
51626
|
scrollRatioY: yRatio,
|
|
51660
51627
|
dy: dy
|
|
51661
51628
|
}).some(value => !1 === value)) {
|
|
51662
|
-
const yRatio = this.scroll.verticalBarPos / (totalHeight - this.table.scenegraph.height);
|
|
51629
|
+
const yRatio = this.scroll.verticalBarPos / (totalHeight - (null !== (_l = null === (_k = this.table.scenegraph) || void 0 === _k ? void 0 : _k.height) && void 0 !== _l ? _l : 0));
|
|
51663
51630
|
return void this.table.scenegraph.component.updateVerticalScrollBarPos(yRatio);
|
|
51664
51631
|
}
|
|
51665
51632
|
}
|
|
@@ -51669,8 +51636,8 @@
|
|
|
51669
51636
|
event: null == event ? void 0 : event.nativeEvent,
|
|
51670
51637
|
scrollTop: this.scroll.verticalBarPos,
|
|
51671
51638
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
51672
|
-
scrollHeight: null === (
|
|
51673
|
-
scrollWidth: null === (
|
|
51639
|
+
scrollHeight: null === (_m = this.table.theme.scrollStyle) || void 0 === _m ? void 0 : _m.width,
|
|
51640
|
+
scrollWidth: null === (_o = this.table.theme.scrollStyle) || void 0 === _o ? void 0 : _o.width,
|
|
51674
51641
|
viewHeight: this.table.tableNoFrameHeight,
|
|
51675
51642
|
viewWidth: this.table.tableNoFrameWidth,
|
|
51676
51643
|
scrollDirection: "vertical",
|
|
@@ -56012,7 +55979,7 @@
|
|
|
56012
55979
|
class PluginManager {
|
|
56013
55980
|
constructor(table, options) {
|
|
56014
55981
|
var _a;
|
|
56015
|
-
this.plugins = new Map(), this.table = table, null === (_a = options.plugins) || void 0 === _a || _a.map(plugin => {
|
|
55982
|
+
this.plugins = new Map(), this.pluginEventMap = new Map(), this.table = table, null === (_a = options.plugins) || void 0 === _a || _a.map(plugin => {
|
|
56016
55983
|
this.register(plugin), this._bindTableEventForPlugin(plugin);
|
|
56017
55984
|
});
|
|
56018
55985
|
}
|
|
@@ -56031,23 +55998,30 @@
|
|
|
56031
55998
|
_bindTableEventForPlugin(plugin) {
|
|
56032
55999
|
var _a;
|
|
56033
56000
|
null === (_a = plugin.runTime) || void 0 === _a || _a.forEach(runTime => {
|
|
56034
|
-
this.table.on(runTime, (...args) => {
|
|
56001
|
+
const id = this.table.on(runTime, (...args) => {
|
|
56035
56002
|
var _a;
|
|
56036
56003
|
null === (_a = plugin.run) || void 0 === _a || _a.call(plugin, ...args, runTime, this.table);
|
|
56037
56004
|
});
|
|
56005
|
+
this.pluginEventMap.set(plugin.id, [...(this.pluginEventMap.get(plugin.id) || []), id]);
|
|
56038
56006
|
});
|
|
56039
56007
|
}
|
|
56040
|
-
|
|
56008
|
+
removeOrAddPlugins(plugins) {
|
|
56041
56009
|
Array.from(this.plugins.values()).filter(plugin => !(null == plugins ? void 0 : plugins.some(p => p.id === plugin.id))).forEach(plugin => {
|
|
56042
|
-
|
|
56043
|
-
|
|
56044
|
-
|
|
56010
|
+
var _a;
|
|
56011
|
+
null === (_a = this.pluginEventMap.get(plugin.id)) || void 0 === _a || _a.forEach(id => {
|
|
56012
|
+
this.table.off(id);
|
|
56013
|
+
}), this.release(), this.plugins.delete(plugin.id);
|
|
56045
56014
|
});
|
|
56046
56015
|
const addedPlugins = null == plugins ? void 0 : plugins.filter(plugin => !this.plugins.has(plugin.id));
|
|
56047
56016
|
null == addedPlugins || addedPlugins.forEach(plugin => {
|
|
56048
56017
|
this.register(plugin), this._bindTableEventForPlugin(plugin);
|
|
56049
56018
|
});
|
|
56050
56019
|
}
|
|
56020
|
+
updatePlugins(plugins) {
|
|
56021
|
+
null == plugins || plugins.forEach(plugin => {
|
|
56022
|
+
plugin.update && plugin.update();
|
|
56023
|
+
});
|
|
56024
|
+
}
|
|
56051
56025
|
release() {
|
|
56052
56026
|
this.plugins.forEach(plugin => {
|
|
56053
56027
|
var _a;
|
|
@@ -56070,7 +56044,7 @@
|
|
|
56070
56044
|
}
|
|
56071
56045
|
constructor(container, options = {}) {
|
|
56072
56046
|
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;
|
|
56073
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.22.7-alpha.
|
|
56047
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.22.7-alpha.7", 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");
|
|
56074
56048
|
this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
56075
56049
|
options: options,
|
|
56076
56050
|
container: container
|
|
@@ -56686,11 +56660,13 @@
|
|
|
56686
56660
|
this.colContentWidthsMap.put(col, width);
|
|
56687
56661
|
}
|
|
56688
56662
|
getAllRowsHeight() {
|
|
56689
|
-
|
|
56663
|
+
var _a;
|
|
56664
|
+
if (!(null === (_a = this.internalProps) || void 0 === _a ? void 0 : _a.rowCount) || this.internalProps.rowCount <= 0) return 0;
|
|
56690
56665
|
return this.getRowsHeight(0, this.internalProps.rowCount - 1);
|
|
56691
56666
|
}
|
|
56692
56667
|
getAllColsWidth() {
|
|
56693
|
-
|
|
56668
|
+
var _a;
|
|
56669
|
+
if (!(null === (_a = this.internalProps) || void 0 === _a ? void 0 : _a.colCount) || this.internalProps.colCount <= 0) return 0;
|
|
56694
56670
|
return this.getColsWidth(0, this.internalProps.colCount - 1);
|
|
56695
56671
|
}
|
|
56696
56672
|
getColsWidths() {
|
|
@@ -56911,7 +56887,7 @@
|
|
|
56911
56887
|
colEnd: colEnd
|
|
56912
56888
|
};
|
|
56913
56889
|
}
|
|
56914
|
-
getBodyVisibleRowRange(
|
|
56890
|
+
getBodyVisibleRowRange(deltaY = 0) {
|
|
56915
56891
|
const {
|
|
56916
56892
|
scrollTop: scrollTop
|
|
56917
56893
|
} = this,
|
|
@@ -56919,14 +56895,14 @@
|
|
|
56919
56895
|
bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight(),
|
|
56920
56896
|
{
|
|
56921
56897
|
row: rowStart
|
|
56922
|
-
} = this.getRowAt(scrollTop + frozenRowsHeight + 1
|
|
56923
|
-
rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight +
|
|
56898
|
+
} = this.getRowAt(scrollTop + frozenRowsHeight + 1),
|
|
56899
|
+
rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight + deltaY).row : this.rowCount - 1;
|
|
56924
56900
|
return rowEnd < 0 ? null : {
|
|
56925
56901
|
rowStart: rowStart,
|
|
56926
56902
|
rowEnd: rowEnd
|
|
56927
56903
|
};
|
|
56928
56904
|
}
|
|
56929
|
-
getBodyVisibleColRange(
|
|
56905
|
+
getBodyVisibleColRange(deltaX = 0) {
|
|
56930
56906
|
const {
|
|
56931
56907
|
scrollLeft: scrollLeft
|
|
56932
56908
|
} = this,
|
|
@@ -56934,8 +56910,8 @@
|
|
|
56934
56910
|
rightFrozenColsWidth = this.getRightFrozenColsWidth(),
|
|
56935
56911
|
{
|
|
56936
56912
|
col: colStart
|
|
56937
|
-
} = this.getColAt(scrollLeft + frozenColsWidth + 1
|
|
56938
|
-
colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth +
|
|
56913
|
+
} = this.getColAt(scrollLeft + frozenColsWidth + 1),
|
|
56914
|
+
colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth + deltaX).col : this.colCount - 1;
|
|
56939
56915
|
return colEnd < 0 ? null : {
|
|
56940
56916
|
colStart: colStart,
|
|
56941
56917
|
colEnd: colEnd
|
|
@@ -61502,7 +61478,7 @@
|
|
|
61502
61478
|
}) {
|
|
61503
61479
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
61504
61480
|
const internalProps = this.internalProps;
|
|
61505
|
-
if (super.updateOption(options, updateConfig), internalProps.frozenColDragHeaderMode = null !== (_b = null === (_a = options.dragOrder) || void 0 === _a ? void 0 : _a.frozenColDragHeaderMode) && void 0 !== _b ? _b : options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.dataConfig = this.internalProps.groupBy ? getGroupByDataConfig(this.internalProps.groupBy, options.addRecordRule) : {
|
|
61481
|
+
if (this.pluginManager.removeOrAddPlugins(options.plugins), super.updateOption(options, updateConfig), internalProps.frozenColDragHeaderMode = null !== (_b = null === (_a = options.dragOrder) || void 0 === _a ? void 0 : _a.frozenColDragHeaderMode) && void 0 !== _b ? _b : options.frozenColDragHeaderMode, this.pagination = options.pagination, internalProps.sortState = options.sortState, internalProps.dataConfig = this.internalProps.groupBy ? getGroupByDataConfig(this.internalProps.groupBy, options.addRecordRule) : {
|
|
61506
61482
|
addRecordRule: options.addRecordRule
|
|
61507
61483
|
}, this.showHeader = null === (_c = options.showHeader) || void 0 === _c || _c, internalProps.columns = options.columns ? cloneDeepSpec(options.columns, ["children"]) : options.header ? cloneDeepSpec(options.header, ["children"]) : [], generateAggregationForColumn(this), internalProps.enableTreeNodeMerge = null !== (_e = null !== (_d = options.enableTreeNodeMerge) && void 0 !== _d ? _d : isValid$3(this.internalProps.groupBy)) && void 0 !== _e && _e, this.internalProps.headerHelper.setTableColumnsEditor(), this.transpose = null !== (_f = options.transpose) && void 0 !== _f && _f, this.refreshHeader(), this.internalProps.useOneRowHeightFillAll = !1, this.internalProps.columnWidthConfig = options.columnWidthConfig, this.internalProps.rowHeightConfig = options.rowHeightConfig, internalProps.releaseList) for (let i = internalProps.releaseList.length - 1; i >= 0; i--) {
|
|
61508
61484
|
const releaseObj = internalProps.releaseList[i];
|
|
@@ -61727,7 +61703,8 @@
|
|
|
61727
61703
|
updateFilterRules(filterRules, options = {
|
|
61728
61704
|
clearRowHeightCache: !0
|
|
61729
61705
|
}) {
|
|
61730
|
-
|
|
61706
|
+
var _a;
|
|
61707
|
+
this.scenegraph.clearCells(), this.sortState ? (this.dataSource.updateFilterRulesForSorted(filterRules), sortRecords(this)) : this.dataSource.updateFilterRules(filterRules, null == options ? void 0 : options.onFilterRecordsEnd), this.refreshRowColCount(), this.stateManager.initCheckedState(this.records), this.scenegraph.createSceneGraph(!(null == options ? void 0 : options.clearRowHeightCache)), null === (_a = this.internalProps.emptyTip) || void 0 === _a || _a.resetVisible(), this.resize();
|
|
61731
61708
|
}
|
|
61732
61709
|
getFilteredRecords() {
|
|
61733
61710
|
return this.dataSource.records;
|
|
@@ -61748,7 +61725,7 @@
|
|
|
61748
61725
|
}).map(key => this.stateManager.checkedState.get(key));
|
|
61749
61726
|
return this.options.groupBy && (stateArr = getGroupCheckboxState(this)), Array.from(stateArr, state => state && state[field]);
|
|
61750
61727
|
}
|
|
61751
|
-
return
|
|
61728
|
+
return [...this.stateManager.checkedState.values()];
|
|
61752
61729
|
}
|
|
61753
61730
|
getCellCheckboxState(col, row) {
|
|
61754
61731
|
var _a;
|