@visactor/vtable-gantt 1.22.7-alpha.5 → 1.22.7-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/vtable-gantt.js +91 -114
- package/dist/vtable-gantt.min.js +2 -2
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +5 -5
package/cjs/index.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ import * as tools from './tools';
|
|
|
6
6
|
import * as VRender from './vrender';
|
|
7
7
|
import * as VTable from './vtable';
|
|
8
8
|
import * as plugins from './plugins';
|
|
9
|
-
export declare const version = "1.22.7-alpha.
|
|
9
|
+
export declare const version = "1.22.7-alpha.6";
|
|
10
10
|
export { TYPES, GanttConstructorOptions, Gantt, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, tools, VRender, VTable, plugins };
|
package/cjs/index.js
CHANGED
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAwBlC,sBAAK;AAVP,mCAAgC;AAY9B,sFAZO,aAAK,OAYP;AAXP,+CAAiC;AAuB/B,sBAAK;AAtBP,mDAAqC;AAuBnC,0BAAO;AAtBT,iDAAmC;AAuBjC,wBAAM;AAtBR,mDAAqC;AAuBnC,0BAAO;AAtBI,QAAA,OAAO,GAAG,gBAAgB,CAAC","file":"index.js","sourcesContent":["import type { GanttConstructorOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType\n} from '@visactor/vtable';\nimport { Gantt } from './Gantt';\nimport * as tools from './tools';\nimport * as VRender from './vrender';\nimport * as VTable from './vtable';\nimport * as plugins from './plugins';\nexport const version = \"1.22.7-alpha.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAwBlC,sBAAK;AAVP,mCAAgC;AAY9B,sFAZO,aAAK,OAYP;AAXP,+CAAiC;AAuB/B,sBAAK;AAtBP,mDAAqC;AAuBnC,0BAAO;AAtBT,iDAAmC;AAuBjC,wBAAM;AAtBR,mDAAqC;AAuBnC,0BAAO;AAtBI,QAAA,OAAO,GAAG,gBAAgB,CAAC","file":"index.js","sourcesContent":["import type { GanttConstructorOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType\n} from '@visactor/vtable';\nimport { Gantt } from './Gantt';\nimport * as tools from './tools';\nimport * as VRender from './vrender';\nimport * as VTable from './vtable';\nimport * as plugins from './plugins';\nexport const version = \"1.22.7-alpha.6\";\n/**\n * @namespace VTableGantt\n */\nexport {\n TYPES,\n GanttConstructorOptions,\n Gantt,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n tools,\n VRender,\n VTable,\n plugins\n};\n"]}
|
package/dist/vtable-gantt.js
CHANGED
|
@@ -9556,7 +9556,7 @@
|
|
|
9556
9556
|
}
|
|
9557
9557
|
}]), noAnimateAttrs && this.setAttributesAndPreventAnimate(noAnimateAttrs, !1, {
|
|
9558
9558
|
type: AttributeUpdateType.STATE
|
|
9559
|
-
})
|
|
9559
|
+
});
|
|
9560
9560
|
} else this.stopStateAnimates(), this.setAttributesAndPreventAnimate(attrs, !1, {
|
|
9561
9561
|
type: AttributeUpdateType.STATE
|
|
9562
9562
|
}), this.finalAttribute && Object.assign(this.finalAttribute, attrs);
|
|
@@ -9582,7 +9582,7 @@
|
|
|
9582
9582
|
getNormalAttribute(key) {
|
|
9583
9583
|
var _a, _b;
|
|
9584
9584
|
const value = this.attribute[key];
|
|
9585
|
-
return this.animates
|
|
9585
|
+
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];
|
|
9586
9586
|
}
|
|
9587
9587
|
clearStates(hasAnimation) {
|
|
9588
9588
|
this.hasState() && this.normalAttrs ? (this.currentStates = [], this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0)) : this.currentStates = [], this.normalAttrs = null;
|
|
@@ -38768,7 +38768,9 @@
|
|
|
38768
38768
|
DELETE_RECORD: "delete_record",
|
|
38769
38769
|
UPDATE_RECORD: "update_record",
|
|
38770
38770
|
ADD_COLUMN: "add_column",
|
|
38771
|
-
DELETE_COLUMN: "delete_column"
|
|
38771
|
+
DELETE_COLUMN: "delete_column",
|
|
38772
|
+
FILTER_MENU_SHOW: "filter_menu_show",
|
|
38773
|
+
FILTER_MENU_HIDE: "filter_menu_hide"
|
|
38772
38774
|
};
|
|
38773
38775
|
|
|
38774
38776
|
const judgeType$1 = value => {
|
|
@@ -47636,53 +47638,39 @@
|
|
|
47636
47638
|
for (let i = rowStart; i <= rowEnd; i++) {
|
|
47637
47639
|
const cellGroup = table.scenegraph.getCell(col, i),
|
|
47638
47640
|
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
47639
|
-
chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListColumnByColumnDirection[col][i] || isValid$3(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance), setTimeout(() => {
|
|
47640
|
-
var _a, _b, _c, _d
|
|
47641
|
+
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(() => {
|
|
47642
|
+
var _a, _b, _c, _d;
|
|
47641
47643
|
if (null === (_a = chartInstanceListColumnByColumnDirection[col]) || void 0 === _a ? void 0 : _a[i]) {
|
|
47642
|
-
const
|
|
47644
|
+
const absolutePosition = table.getCellRelativeRect(col, i),
|
|
47645
|
+
chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
47643
47646
|
let isShowTooltip = !isScatter;
|
|
47644
|
-
if (!isScatter && "object" == typeof chartDimensionLinkage
|
|
47645
|
-
const
|
|
47647
|
+
if (!isScatter && "object" == typeof chartDimensionLinkage && (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === rowEnd && isShowTooltip)) {
|
|
47648
|
+
const heightLimitToShowTooltipForLastRow = chartDimensionLinkage.heightLimitToShowTooltipForLastRow,
|
|
47646
47649
|
{
|
|
47647
47650
|
rowEnd: rowEnd1
|
|
47648
|
-
} = table.getBodyVisibleRowRange(
|
|
47651
|
+
} = table.getBodyVisibleRowRange(-heightLimitToShowTooltipForLastRow);
|
|
47649
47652
|
if (rowEnd1 === rowEnd) isShowTooltip = !0;else {
|
|
47650
47653
|
const {
|
|
47651
47654
|
rowEnd: rowEnd2
|
|
47652
|
-
} = table.getBodyVisibleRowRange(
|
|
47655
|
+
} = table.getBodyVisibleRowRange(5);
|
|
47653
47656
|
isShowTooltip = rowEnd2 !== rowEnd;
|
|
47654
47657
|
}
|
|
47655
|
-
} else if (i === rowStart && isShowTooltip) {
|
|
47656
|
-
const heightLimitToShowTooltipForEdgeRow = null !== (_d = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _d ? _d : 0,
|
|
47657
|
-
{
|
|
47658
|
-
rowStart: rowStart1
|
|
47659
|
-
} = table.getBodyVisibleRowRange(heightLimitToShowTooltipForEdgeRow, 0);
|
|
47660
|
-
if (rowStart1 === rowStart) isShowTooltip = !0;else {
|
|
47661
|
-
const {
|
|
47662
|
-
rowStart: rowStart2
|
|
47663
|
-
} = table.getBodyVisibleRowRange(0, -5);
|
|
47664
|
-
isShowTooltip = rowStart2 !== rowStart;
|
|
47665
|
-
}
|
|
47666
|
-
}
|
|
47667
|
-
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 {
|
|
47668
|
-
const bodyBoundryTop = table.frozenRowCount ? table.getCellRelativeRect(col, table.frozenRowCount - 1).bottom : 0,
|
|
47669
|
-
absolutePositionTop = Math.max(bodyBoundryTop, table.getCellRelativeRect(col, i).top);
|
|
47670
|
-
hideTooltip ? (table.stateManager.hover.cellPos.col === col && table.stateManager.hover.cellPos.row === i || chartInstanceListColumnByColumnDirection[col][i].hideTooltip(), chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
47671
|
-
tooltip: !1,
|
|
47672
|
-
showTooltipOption: {
|
|
47673
|
-
x: canvasXY.x,
|
|
47674
|
-
y: absolutePositionTop,
|
|
47675
|
-
activeType: "dimension"
|
|
47676
|
-
}
|
|
47677
|
-
})) : chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
47678
|
-
tooltip: isShowTooltip,
|
|
47679
|
-
showTooltipOption: {
|
|
47680
|
-
x: canvasXY.x,
|
|
47681
|
-
y: absolutePositionTop,
|
|
47682
|
-
activeType: "dimension"
|
|
47683
|
-
}
|
|
47684
|
-
});
|
|
47685
47658
|
}
|
|
47659
|
+
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, {
|
|
47660
|
+
tooltip: !1,
|
|
47661
|
+
showTooltipOption: {
|
|
47662
|
+
x: canvasXY.x,
|
|
47663
|
+
y: absolutePosition.top + 3,
|
|
47664
|
+
activeType: "dimension"
|
|
47665
|
+
}
|
|
47666
|
+
})) : chartInstanceListColumnByColumnDirection[col][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
47667
|
+
tooltip: isShowTooltip,
|
|
47668
|
+
showTooltipOption: {
|
|
47669
|
+
x: canvasXY.x,
|
|
47670
|
+
y: absolutePosition.top + 3,
|
|
47671
|
+
activeType: "dimension"
|
|
47672
|
+
}
|
|
47673
|
+
});
|
|
47686
47674
|
}
|
|
47687
47675
|
}, 0), table.scenegraph.updateNextFrame();
|
|
47688
47676
|
}
|
|
@@ -47714,53 +47702,39 @@
|
|
|
47714
47702
|
for (let i = colStart; i <= colEnd; i++) {
|
|
47715
47703
|
const cellGroup = table.scenegraph.getCell(i, row),
|
|
47716
47704
|
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
47717
|
-
chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListRowByRowDirection[row][i] || isValid$3(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance), setTimeout(() => {
|
|
47705
|
+
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(() => {
|
|
47718
47706
|
var _a, _b, _c, _d;
|
|
47719
47707
|
if (null === (_a = chartInstanceListRowByRowDirection[row]) || void 0 === _a ? void 0 : _a[i]) {
|
|
47720
|
-
const
|
|
47708
|
+
const absolutePosition = table.getCellRelativeRect(i, row),
|
|
47709
|
+
chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
47721
47710
|
let isShowTooltip = !isScatter;
|
|
47722
|
-
if (!isScatter && "object" == typeof chartDimensionLinkage
|
|
47723
|
-
const
|
|
47711
|
+
if (!isScatter && "object" == typeof chartDimensionLinkage && (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === colEnd && isShowTooltip)) {
|
|
47712
|
+
const widthLimitToShowTooltipForLastColumn = chartDimensionLinkage.widthLimitToShowTooltipForLastColumn,
|
|
47724
47713
|
{
|
|
47725
47714
|
colEnd: colEnd1
|
|
47726
|
-
} = table.getBodyVisibleColRange(
|
|
47715
|
+
} = table.getBodyVisibleColRange(-widthLimitToShowTooltipForLastColumn);
|
|
47727
47716
|
if (colEnd1 === colEnd) isShowTooltip = !0;else {
|
|
47728
47717
|
const {
|
|
47729
47718
|
colEnd: colEnd2
|
|
47730
|
-
} = table.getBodyVisibleColRange(
|
|
47719
|
+
} = table.getBodyVisibleColRange(5);
|
|
47731
47720
|
isShowTooltip = colEnd2 !== colEnd;
|
|
47732
47721
|
}
|
|
47733
|
-
} else if (i === colStart && isShowTooltip) {
|
|
47734
|
-
const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
|
|
47735
|
-
{
|
|
47736
|
-
colStart: colStart1
|
|
47737
|
-
} = table.getBodyVisibleColRange(widthLimitToShowTooltipForEdgeColumn, 0);
|
|
47738
|
-
if (colStart1 === colStart) isShowTooltip = !0;else {
|
|
47739
|
-
const {
|
|
47740
|
-
colStart: colStart2
|
|
47741
|
-
} = table.getBodyVisibleColRange(0, -5);
|
|
47742
|
-
isShowTooltip = colStart2 !== colStart;
|
|
47743
|
-
}
|
|
47744
|
-
}
|
|
47745
|
-
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 {
|
|
47746
|
-
const bodyBoundryLeft = table.frozenColCount ? table.getCellRelativeRect(table.frozenColCount - 1, row).right : 0,
|
|
47747
|
-
absolutePositionLeft = Math.max(bodyBoundryLeft, table.getCellRelativeRect(i, row).left);
|
|
47748
|
-
hideTooltip ? (table.stateManager.hover.cellPos.col === i && table.stateManager.hover.cellPos.row === row || chartInstanceListRowByRowDirection[row][i].hideTooltip(), chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
47749
|
-
tooltip: !1,
|
|
47750
|
-
showTooltipOption: {
|
|
47751
|
-
x: absolutePositionLeft,
|
|
47752
|
-
y: canvasXY.y,
|
|
47753
|
-
activeType: "dimension"
|
|
47754
|
-
}
|
|
47755
|
-
})) : chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
47756
|
-
tooltip: isShowTooltip,
|
|
47757
|
-
showTooltipOption: {
|
|
47758
|
-
x: absolutePositionLeft,
|
|
47759
|
-
y: canvasXY.y,
|
|
47760
|
-
activeType: "dimension"
|
|
47761
|
-
}
|
|
47762
|
-
});
|
|
47763
47722
|
}
|
|
47723
|
+
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, {
|
|
47724
|
+
tooltip: !1,
|
|
47725
|
+
showTooltipOption: {
|
|
47726
|
+
x: absolutePosition.left + 3,
|
|
47727
|
+
y: canvasXY.y,
|
|
47728
|
+
activeType: "dimension"
|
|
47729
|
+
}
|
|
47730
|
+
})) : chartInstanceListRowByRowDirection[row][i].setDimensionIndex(dimensionValueOrXValue, {
|
|
47731
|
+
tooltip: isShowTooltip,
|
|
47732
|
+
showTooltipOption: {
|
|
47733
|
+
x: absolutePosition.left + 3,
|
|
47734
|
+
y: canvasXY.y,
|
|
47735
|
+
activeType: "dimension"
|
|
47736
|
+
}
|
|
47737
|
+
});
|
|
47764
47738
|
}
|
|
47765
47739
|
}, 0), table.scenegraph.updateNextFrame();
|
|
47766
47740
|
}
|
|
@@ -48484,14 +48458,7 @@
|
|
|
48484
48458
|
} = drawParams;
|
|
48485
48459
|
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());
|
|
48486
48460
|
}
|
|
48487
|
-
}
|
|
48488
|
-
componentShowContent: table.options.chartDimensionLinkage && "scatter" !== this.attribute.spec.type ? {
|
|
48489
|
-
tooltip: {
|
|
48490
|
-
dimension: !1,
|
|
48491
|
-
mark: !0
|
|
48492
|
-
},
|
|
48493
|
-
crosshair: !1
|
|
48494
|
-
} : void 0
|
|
48461
|
+
}
|
|
48495
48462
|
}));
|
|
48496
48463
|
const chartStage = this.activeChartInstance.getStage(),
|
|
48497
48464
|
matrix = this.globalTransMatrix.clone(),
|
|
@@ -48529,7 +48496,7 @@
|
|
|
48529
48496
|
indicatorsAsCol ? generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1) : generateChartInstanceListByColumnDirection(col, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1);
|
|
48530
48497
|
}, 100)) : indicatorsAsCol ? generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1) : generateChartInstanceListByColumnDirection(col, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1), indicatorsAsCol) {
|
|
48531
48498
|
const series = dimensionInfo.data[0].series,
|
|
48532
|
-
width = "histogram" === this.attribute.spec.type || "line" === series.type || "area" === series.type ? 0 : series.getYAxisHelper().getBandwidth(0);
|
|
48499
|
+
width = "histogram" === this.attribute.spec.type || "boxPlot" === this.attribute.spec.type || "line" === series.type || "area" === series.type ? 0 : series.getYAxisHelper().getBandwidth(0);
|
|
48533
48500
|
let y = series.valueToPositionY(dimensionValue);
|
|
48534
48501
|
const axisConfig = getAxisConfigInPivotChart(table.rowHeaderLevelCount - 1, row, table.internalProps.layoutMap);
|
|
48535
48502
|
let hoverOnLabelValue = yValue;
|
|
@@ -48547,7 +48514,7 @@
|
|
|
48547
48514
|
axisConfig.labelHoverOnAxis && table.scenegraph.getCell(table.rowHeaderLevelCount - 1, row).firstChild.showLabelHoverOnAxis(y + ("line" === series.type || "area" === series.type ? 0 : width / 2), hoverOnLabelValue);
|
|
48548
48515
|
} else {
|
|
48549
48516
|
const series = dimensionInfo.data[0].series,
|
|
48550
|
-
width = "histogram" === this.attribute.spec.type || "line" === series.type || "area" === series.type ? 0 : series.getXAxisHelper().getBandwidth(0);
|
|
48517
|
+
width = "histogram" === this.attribute.spec.type || "boxPlot" === this.attribute.spec.type || "line" === series.type || "area" === series.type ? 0 : series.getXAxisHelper().getBandwidth(0);
|
|
48551
48518
|
let x = series.valueToPositionX(dimensionValue);
|
|
48552
48519
|
const axisConfig = getAxisConfigInPivotChart(col, table.rowCount - table.bottomFrozenRowCount, table.internalProps.layoutMap);
|
|
48553
48520
|
let hoverOnLabelValue = dimensionValue;
|
|
@@ -55487,13 +55454,13 @@
|
|
|
55487
55454
|
}), oldHorizontalBarPos !== this.scroll.horizontalBarPos && this.checkHorizontalScrollBarEnd();
|
|
55488
55455
|
}
|
|
55489
55456
|
setScrollTop(top, event, triggerEvent = !0) {
|
|
55490
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
55457
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
55491
55458
|
const totalHeight = this.table.getAllRowsHeight(),
|
|
55492
55459
|
sizeTolerance = (null === (_a = this.table.options.customConfig) || void 0 === _a ? void 0 : _a._disableColumnAndRowSizeRound) ? 1 : 0;
|
|
55493
|
-
top = Math.max(0, Math.min(top, totalHeight - this.table.scenegraph.height - sizeTolerance)), top = Math.ceil(top);
|
|
55460
|
+
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);
|
|
55494
55461
|
const oldVerticalBarPos = this.scroll.verticalBarPos,
|
|
55495
|
-
yRatio = top / (totalHeight - this.table.scenegraph.height);
|
|
55496
|
-
if ((oldVerticalBarPos !== top || !0 === (null === (
|
|
55462
|
+
yRatio = top / (totalHeight - (null !== (_e = null === (_d = this.table.scenegraph) || void 0 === _d ? void 0 : _d.height) && void 0 !== _e ? _e : 0));
|
|
55463
|
+
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) {
|
|
55497
55464
|
let verticalBarPos = top;
|
|
55498
55465
|
isValid$3(verticalBarPos) && !isNaN(verticalBarPos) || (verticalBarPos = 0);
|
|
55499
55466
|
const dy = verticalBarPos - oldVerticalBarPos;
|
|
@@ -55501,15 +55468,15 @@
|
|
|
55501
55468
|
event: null == event ? void 0 : event.nativeEvent,
|
|
55502
55469
|
scrollTop: verticalBarPos,
|
|
55503
55470
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
55504
|
-
scrollHeight: null === (
|
|
55505
|
-
scrollWidth: null === (
|
|
55471
|
+
scrollHeight: null === (_h = this.table.theme.scrollStyle) || void 0 === _h ? void 0 : _h.width,
|
|
55472
|
+
scrollWidth: null === (_j = this.table.theme.scrollStyle) || void 0 === _j ? void 0 : _j.width,
|
|
55506
55473
|
viewHeight: this.table.tableNoFrameHeight,
|
|
55507
55474
|
viewWidth: this.table.tableNoFrameWidth,
|
|
55508
55475
|
scrollDirection: "vertical",
|
|
55509
55476
|
scrollRatioY: yRatio,
|
|
55510
55477
|
dy: dy
|
|
55511
55478
|
}).some(value => !1 === value)) {
|
|
55512
|
-
const yRatio = this.scroll.verticalBarPos / (totalHeight - this.table.scenegraph.height);
|
|
55479
|
+
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));
|
|
55513
55480
|
return void this.table.scenegraph.component.updateVerticalScrollBarPos(yRatio);
|
|
55514
55481
|
}
|
|
55515
55482
|
}
|
|
@@ -55519,8 +55486,8 @@
|
|
|
55519
55486
|
event: null == event ? void 0 : event.nativeEvent,
|
|
55520
55487
|
scrollTop: this.scroll.verticalBarPos,
|
|
55521
55488
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
55522
|
-
scrollHeight: null === (
|
|
55523
|
-
scrollWidth: null === (
|
|
55489
|
+
scrollHeight: null === (_m = this.table.theme.scrollStyle) || void 0 === _m ? void 0 : _m.width,
|
|
55490
|
+
scrollWidth: null === (_o = this.table.theme.scrollStyle) || void 0 === _o ? void 0 : _o.width,
|
|
55524
55491
|
viewHeight: this.table.tableNoFrameHeight,
|
|
55525
55492
|
viewWidth: this.table.tableNoFrameWidth,
|
|
55526
55493
|
scrollDirection: "vertical",
|
|
@@ -59862,7 +59829,7 @@
|
|
|
59862
59829
|
let PluginManager$1 = class PluginManager {
|
|
59863
59830
|
constructor(table, options) {
|
|
59864
59831
|
var _a;
|
|
59865
|
-
this.plugins = new Map(), this.table = table, null === (_a = options.plugins) || void 0 === _a || _a.map(plugin => {
|
|
59832
|
+
this.plugins = new Map(), this.pluginEventMap = new Map(), this.table = table, null === (_a = options.plugins) || void 0 === _a || _a.map(plugin => {
|
|
59866
59833
|
this.register(plugin), this._bindTableEventForPlugin(plugin);
|
|
59867
59834
|
});
|
|
59868
59835
|
}
|
|
@@ -59881,23 +59848,30 @@
|
|
|
59881
59848
|
_bindTableEventForPlugin(plugin) {
|
|
59882
59849
|
var _a;
|
|
59883
59850
|
null === (_a = plugin.runTime) || void 0 === _a || _a.forEach(runTime => {
|
|
59884
|
-
this.table.on(runTime, (...args) => {
|
|
59851
|
+
const id = this.table.on(runTime, (...args) => {
|
|
59885
59852
|
var _a;
|
|
59886
59853
|
null === (_a = plugin.run) || void 0 === _a || _a.call(plugin, ...args, runTime, this.table);
|
|
59887
59854
|
});
|
|
59855
|
+
this.pluginEventMap.set(plugin.id, [...(this.pluginEventMap.get(plugin.id) || []), id]);
|
|
59888
59856
|
});
|
|
59889
59857
|
}
|
|
59890
|
-
|
|
59858
|
+
removeOrAddPlugins(plugins) {
|
|
59891
59859
|
Array.from(this.plugins.values()).filter(plugin => !(null == plugins ? void 0 : plugins.some(p => p.id === plugin.id))).forEach(plugin => {
|
|
59892
|
-
|
|
59893
|
-
|
|
59894
|
-
|
|
59860
|
+
var _a;
|
|
59861
|
+
null === (_a = this.pluginEventMap.get(plugin.id)) || void 0 === _a || _a.forEach(id => {
|
|
59862
|
+
this.table.off(id);
|
|
59863
|
+
}), this.release(), this.plugins.delete(plugin.id);
|
|
59895
59864
|
});
|
|
59896
59865
|
const addedPlugins = null == plugins ? void 0 : plugins.filter(plugin => !this.plugins.has(plugin.id));
|
|
59897
59866
|
null == addedPlugins || addedPlugins.forEach(plugin => {
|
|
59898
59867
|
this.register(plugin), this._bindTableEventForPlugin(plugin);
|
|
59899
59868
|
});
|
|
59900
59869
|
}
|
|
59870
|
+
updatePlugins(plugins) {
|
|
59871
|
+
null == plugins || plugins.forEach(plugin => {
|
|
59872
|
+
plugin.update && plugin.update();
|
|
59873
|
+
});
|
|
59874
|
+
}
|
|
59901
59875
|
release() {
|
|
59902
59876
|
this.plugins.forEach(plugin => {
|
|
59903
59877
|
var _a;
|
|
@@ -59920,7 +59894,7 @@
|
|
|
59920
59894
|
}
|
|
59921
59895
|
constructor(container, options = {}) {
|
|
59922
59896
|
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;
|
|
59923
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.22.7-alpha.
|
|
59897
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.22.7-alpha.6", 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");
|
|
59924
59898
|
this.pluginManager = new PluginManager$1(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
59925
59899
|
options: options,
|
|
59926
59900
|
container: container
|
|
@@ -60536,11 +60510,13 @@
|
|
|
60536
60510
|
this.colContentWidthsMap.put(col, width);
|
|
60537
60511
|
}
|
|
60538
60512
|
getAllRowsHeight() {
|
|
60539
|
-
|
|
60513
|
+
var _a;
|
|
60514
|
+
if (!(null === (_a = this.internalProps) || void 0 === _a ? void 0 : _a.rowCount) || this.internalProps.rowCount <= 0) return 0;
|
|
60540
60515
|
return this.getRowsHeight(0, this.internalProps.rowCount - 1);
|
|
60541
60516
|
}
|
|
60542
60517
|
getAllColsWidth() {
|
|
60543
|
-
|
|
60518
|
+
var _a;
|
|
60519
|
+
if (!(null === (_a = this.internalProps) || void 0 === _a ? void 0 : _a.colCount) || this.internalProps.colCount <= 0) return 0;
|
|
60544
60520
|
return this.getColsWidth(0, this.internalProps.colCount - 1);
|
|
60545
60521
|
}
|
|
60546
60522
|
getColsWidths() {
|
|
@@ -60761,7 +60737,7 @@
|
|
|
60761
60737
|
colEnd: colEnd
|
|
60762
60738
|
};
|
|
60763
60739
|
}
|
|
60764
|
-
getBodyVisibleRowRange(
|
|
60740
|
+
getBodyVisibleRowRange(deltaY = 0) {
|
|
60765
60741
|
const {
|
|
60766
60742
|
scrollTop: scrollTop
|
|
60767
60743
|
} = this,
|
|
@@ -60769,14 +60745,14 @@
|
|
|
60769
60745
|
bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight(),
|
|
60770
60746
|
{
|
|
60771
60747
|
row: rowStart
|
|
60772
|
-
} = this.getRowAt(scrollTop + frozenRowsHeight + 1
|
|
60773
|
-
rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight +
|
|
60748
|
+
} = this.getRowAt(scrollTop + frozenRowsHeight + 1),
|
|
60749
|
+
rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight + deltaY).row : this.rowCount - 1;
|
|
60774
60750
|
return rowEnd < 0 ? null : {
|
|
60775
60751
|
rowStart: rowStart,
|
|
60776
60752
|
rowEnd: rowEnd
|
|
60777
60753
|
};
|
|
60778
60754
|
}
|
|
60779
|
-
getBodyVisibleColRange(
|
|
60755
|
+
getBodyVisibleColRange(deltaX = 0) {
|
|
60780
60756
|
const {
|
|
60781
60757
|
scrollLeft: scrollLeft
|
|
60782
60758
|
} = this,
|
|
@@ -60784,8 +60760,8 @@
|
|
|
60784
60760
|
rightFrozenColsWidth = this.getRightFrozenColsWidth(),
|
|
60785
60761
|
{
|
|
60786
60762
|
col: colStart
|
|
60787
|
-
} = this.getColAt(scrollLeft + frozenColsWidth + 1
|
|
60788
|
-
colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth +
|
|
60763
|
+
} = this.getColAt(scrollLeft + frozenColsWidth + 1),
|
|
60764
|
+
colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth + deltaX).col : this.colCount - 1;
|
|
60789
60765
|
return colEnd < 0 ? null : {
|
|
60790
60766
|
colStart: colStart,
|
|
60791
60767
|
colEnd: colEnd
|
|
@@ -65388,7 +65364,7 @@
|
|
|
65388
65364
|
}) {
|
|
65389
65365
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
65390
65366
|
const internalProps = this.internalProps;
|
|
65391
|
-
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) : {
|
|
65367
|
+
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) : {
|
|
65392
65368
|
addRecordRule: options.addRecordRule
|
|
65393
65369
|
}, 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--) {
|
|
65394
65370
|
const releaseObj = internalProps.releaseList[i];
|
|
@@ -65613,7 +65589,8 @@
|
|
|
65613
65589
|
updateFilterRules(filterRules, options = {
|
|
65614
65590
|
clearRowHeightCache: !0
|
|
65615
65591
|
}) {
|
|
65616
|
-
|
|
65592
|
+
var _a;
|
|
65593
|
+
this.scenegraph.clearCells(), this.sortState ? (this.dataSource.updateFilterRulesForSorted(filterRules), sortRecords(this)) : this.dataSource.updateFilterRules(filterRules), 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();
|
|
65617
65594
|
}
|
|
65618
65595
|
getFilteredRecords() {
|
|
65619
65596
|
return this.dataSource.records;
|
|
@@ -65634,7 +65611,7 @@
|
|
|
65634
65611
|
}).map(key => this.stateManager.checkedState.get(key));
|
|
65635
65612
|
return this.options.groupBy && (stateArr = getGroupCheckboxState(this)), Array.from(stateArr, state => state && state[field]);
|
|
65636
65613
|
}
|
|
65637
|
-
return
|
|
65614
|
+
return [...this.stateManager.checkedState.values()];
|
|
65638
65615
|
}
|
|
65639
65616
|
getCellCheckboxState(col, row) {
|
|
65640
65617
|
var _a;
|
|
@@ -77847,7 +77824,7 @@
|
|
|
77847
77824
|
PluginManager: PluginManager
|
|
77848
77825
|
});
|
|
77849
77826
|
|
|
77850
|
-
const version = "1.22.7-alpha.
|
|
77827
|
+
const version = "1.22.7-alpha.6";
|
|
77851
77828
|
|
|
77852
77829
|
exports.Gantt = Gantt;
|
|
77853
77830
|
exports.TYPES = index$4;
|