@visactor/vtable-gantt 1.22.7-alpha.3 → 1.22.7-alpha.4
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 +104 -80
- 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.4";
|
|
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.4\";\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
|
+
}), this.finalAttribute && Object.assign(this.finalAttribute, attrs);
|
|
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 ? 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];
|
|
9585
|
+
return this.animates && this.animates.size ? 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,9 +38768,7 @@
|
|
|
38768
38768
|
DELETE_RECORD: "delete_record",
|
|
38769
38769
|
UPDATE_RECORD: "update_record",
|
|
38770
38770
|
ADD_COLUMN: "add_column",
|
|
38771
|
-
DELETE_COLUMN: "delete_column"
|
|
38772
|
-
FILTER_MENU_SHOW: "filter_menu_show",
|
|
38773
|
-
FILTER_MENU_HIDE: "filter_menu_hide"
|
|
38771
|
+
DELETE_COLUMN: "delete_column"
|
|
38774
38772
|
};
|
|
38775
38773
|
|
|
38776
38774
|
const judgeType$1 = value => {
|
|
@@ -47638,39 +47636,53 @@
|
|
|
47638
47636
|
for (let i = rowStart; i <= rowEnd; i++) {
|
|
47639
47637
|
const cellGroup = table.scenegraph.getCell(col, i),
|
|
47640
47638
|
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
47641
|
-
chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListColumnByColumnDirection[col][i] || isValid$3(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListColumnByColumnDirection[col][i] = chartNode.activeChartInstance),
|
|
47642
|
-
var _a, _b, _c, _d;
|
|
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, _e, _f;
|
|
47643
47641
|
if (null === (_a = chartInstanceListColumnByColumnDirection[col]) || void 0 === _a ? void 0 : _a[i]) {
|
|
47644
|
-
const
|
|
47645
|
-
chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
47642
|
+
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
47646
47643
|
let isShowTooltip = !isScatter;
|
|
47647
|
-
if (!isScatter && "object" == typeof chartDimensionLinkage
|
|
47648
|
-
const
|
|
47644
|
+
if (!isScatter && "object" == typeof chartDimensionLinkage) if (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === rowEnd && isShowTooltip) {
|
|
47645
|
+
const heightLimitToShowTooltipForEdgeRow = null !== (_c = chartDimensionLinkage.heightLimitToShowTooltipForEdgeRow) && void 0 !== _c ? _c : 0,
|
|
47649
47646
|
{
|
|
47650
47647
|
rowEnd: rowEnd1
|
|
47651
|
-
} = table.getBodyVisibleRowRange(-
|
|
47648
|
+
} = table.getBodyVisibleRowRange(0, -heightLimitToShowTooltipForEdgeRow);
|
|
47652
47649
|
if (rowEnd1 === rowEnd) isShowTooltip = !0;else {
|
|
47653
47650
|
const {
|
|
47654
47651
|
rowEnd: rowEnd2
|
|
47655
|
-
} = table.getBodyVisibleRowRange(5);
|
|
47652
|
+
} = table.getBodyVisibleRowRange(0, 5);
|
|
47656
47653
|
isShowTooltip = rowEnd2 !== rowEnd;
|
|
47657
47654
|
}
|
|
47658
|
-
}
|
|
47659
|
-
|
|
47660
|
-
|
|
47661
|
-
|
|
47662
|
-
|
|
47663
|
-
|
|
47664
|
-
|
|
47665
|
-
|
|
47666
|
-
|
|
47667
|
-
|
|
47668
|
-
showTooltipOption: {
|
|
47669
|
-
x: canvasXY.x,
|
|
47670
|
-
y: absolutePosition.top + 3,
|
|
47671
|
-
activeType: "dimension"
|
|
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;
|
|
47672
47665
|
}
|
|
47673
|
-
}
|
|
47666
|
+
}
|
|
47667
|
+
if (isScatter) 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
|
+
}
|
|
47674
47686
|
}
|
|
47675
47687
|
}, 0), table.scenegraph.updateNextFrame();
|
|
47676
47688
|
}
|
|
@@ -47702,39 +47714,53 @@
|
|
|
47702
47714
|
for (let i = colStart; i <= colEnd; i++) {
|
|
47703
47715
|
const cellGroup = table.scenegraph.getCell(i, row),
|
|
47704
47716
|
chartNode = null === (_a = null == cellGroup ? void 0 : cellGroup.getChildren()) || void 0 === _a ? void 0 : _a[0];
|
|
47705
|
-
chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListRowByRowDirection[row][i] || isValid$3(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance),
|
|
47717
|
+
chartNode.addUpdateShapeAndBoundsTag(), chartInstanceListRowByRowDirection[row][i] || isValid$3(chartNode) && (chartNode.activeChartInstance || chartNode.activate(table), chartInstanceListRowByRowDirection[row][i] = chartNode.activeChartInstance), setTimeout(() => {
|
|
47706
47718
|
var _a, _b, _c, _d;
|
|
47707
47719
|
if (null === (_a = chartInstanceListRowByRowDirection[row]) || void 0 === _a ? void 0 : _a[i]) {
|
|
47708
|
-
const
|
|
47709
|
-
chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
47720
|
+
const chartDimensionLinkage = table.options.chartDimensionLinkage;
|
|
47710
47721
|
let isShowTooltip = !isScatter;
|
|
47711
|
-
if (!isScatter && "object" == typeof chartDimensionLinkage
|
|
47712
|
-
const
|
|
47722
|
+
if (!isScatter && "object" == typeof chartDimensionLinkage) if (isShowTooltip = null === (_b = chartDimensionLinkage.showTooltip) || void 0 === _b || _b, i === colEnd && isShowTooltip) {
|
|
47723
|
+
const widthLimitToShowTooltipForEdgeColumn = chartDimensionLinkage.widthLimitToShowTooltipForEdgeColumn,
|
|
47713
47724
|
{
|
|
47714
47725
|
colEnd: colEnd1
|
|
47715
|
-
} = table.getBodyVisibleColRange(-
|
|
47726
|
+
} = table.getBodyVisibleColRange(0, -widthLimitToShowTooltipForEdgeColumn);
|
|
47716
47727
|
if (colEnd1 === colEnd) isShowTooltip = !0;else {
|
|
47717
47728
|
const {
|
|
47718
47729
|
colEnd: colEnd2
|
|
47719
|
-
} = table.getBodyVisibleColRange(5);
|
|
47730
|
+
} = table.getBodyVisibleColRange(0, 5);
|
|
47720
47731
|
isShowTooltip = colEnd2 !== colEnd;
|
|
47721
47732
|
}
|
|
47722
|
-
}
|
|
47723
|
-
|
|
47724
|
-
|
|
47725
|
-
|
|
47726
|
-
|
|
47727
|
-
|
|
47728
|
-
|
|
47729
|
-
|
|
47730
|
-
|
|
47731
|
-
|
|
47732
|
-
showTooltipOption: {
|
|
47733
|
-
x: absolutePosition.left + 3,
|
|
47734
|
-
y: canvasXY.y,
|
|
47735
|
-
activeType: "dimension"
|
|
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;
|
|
47736
47743
|
}
|
|
47737
|
-
}
|
|
47744
|
+
}
|
|
47745
|
+
if (isScatter) 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
|
+
}
|
|
47738
47764
|
}
|
|
47739
47765
|
}, 0), table.scenegraph.updateNextFrame();
|
|
47740
47766
|
}
|
|
@@ -48458,7 +48484,14 @@
|
|
|
48458
48484
|
} = drawParams;
|
|
48459
48485
|
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());
|
|
48460
48486
|
}
|
|
48461
|
-
}
|
|
48487
|
+
},
|
|
48488
|
+
componentShowContent: table.options.chartDimensionLinkage ? {
|
|
48489
|
+
tooltip: {
|
|
48490
|
+
dimension: !1,
|
|
48491
|
+
mark: !0
|
|
48492
|
+
},
|
|
48493
|
+
crosshair: !1
|
|
48494
|
+
} : void 0
|
|
48462
48495
|
}));
|
|
48463
48496
|
const chartStage = this.activeChartInstance.getStage(),
|
|
48464
48497
|
matrix = this.globalTransMatrix.clone(),
|
|
@@ -48496,7 +48529,7 @@
|
|
|
48496
48529
|
indicatorsAsCol ? generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1) : generateChartInstanceListByColumnDirection(col, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1);
|
|
48497
48530
|
}, 100)) : indicatorsAsCol ? generateChartInstanceListByRowDirection(row, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1) : generateChartInstanceListByColumnDirection(col, dimensionValue, null, canvasXY, table, justShowMarkTooltip, !1), indicatorsAsCol) {
|
|
48498
48531
|
const series = dimensionInfo.data[0].series,
|
|
48499
|
-
width = "histogram" === this.attribute.spec.type || "
|
|
48532
|
+
width = "histogram" === this.attribute.spec.type || "line" === series.type || "area" === series.type ? 0 : series.getYAxisHelper().getBandwidth(0);
|
|
48500
48533
|
let y = series.valueToPositionY(dimensionValue);
|
|
48501
48534
|
const axisConfig = getAxisConfigInPivotChart(table.rowHeaderLevelCount - 1, row, table.internalProps.layoutMap);
|
|
48502
48535
|
let hoverOnLabelValue = yValue;
|
|
@@ -48514,7 +48547,7 @@
|
|
|
48514
48547
|
axisConfig.labelHoverOnAxis && table.scenegraph.getCell(table.rowHeaderLevelCount - 1, row).firstChild.showLabelHoverOnAxis(y + ("line" === series.type || "area" === series.type ? 0 : width / 2), hoverOnLabelValue);
|
|
48515
48548
|
} else {
|
|
48516
48549
|
const series = dimensionInfo.data[0].series,
|
|
48517
|
-
width = "histogram" === this.attribute.spec.type || "
|
|
48550
|
+
width = "histogram" === this.attribute.spec.type || "line" === series.type || "area" === series.type ? 0 : series.getXAxisHelper().getBandwidth(0);
|
|
48518
48551
|
let x = series.valueToPositionX(dimensionValue);
|
|
48519
48552
|
const axisConfig = getAxisConfigInPivotChart(col, table.rowCount - table.bottomFrozenRowCount, table.internalProps.layoutMap);
|
|
48520
48553
|
let hoverOnLabelValue = dimensionValue;
|
|
@@ -59829,7 +59862,7 @@
|
|
|
59829
59862
|
let PluginManager$1 = class PluginManager {
|
|
59830
59863
|
constructor(table, options) {
|
|
59831
59864
|
var _a;
|
|
59832
|
-
this.plugins = new Map(), this.
|
|
59865
|
+
this.plugins = new Map(), this.table = table, null === (_a = options.plugins) || void 0 === _a || _a.map(plugin => {
|
|
59833
59866
|
this.register(plugin), this._bindTableEventForPlugin(plugin);
|
|
59834
59867
|
});
|
|
59835
59868
|
}
|
|
@@ -59848,30 +59881,23 @@
|
|
|
59848
59881
|
_bindTableEventForPlugin(plugin) {
|
|
59849
59882
|
var _a;
|
|
59850
59883
|
null === (_a = plugin.runTime) || void 0 === _a || _a.forEach(runTime => {
|
|
59851
|
-
|
|
59884
|
+
this.table.on(runTime, (...args) => {
|
|
59852
59885
|
var _a;
|
|
59853
59886
|
null === (_a = plugin.run) || void 0 === _a || _a.call(plugin, ...args, runTime, this.table);
|
|
59854
59887
|
});
|
|
59855
|
-
this.pluginEventMap.set(plugin.id, [...(this.pluginEventMap.get(plugin.id) || []), id]);
|
|
59856
59888
|
});
|
|
59857
59889
|
}
|
|
59858
|
-
|
|
59890
|
+
updatePlugins(plugins) {
|
|
59859
59891
|
Array.from(this.plugins.values()).filter(plugin => !(null == plugins ? void 0 : plugins.some(p => p.id === plugin.id))).forEach(plugin => {
|
|
59860
|
-
|
|
59861
|
-
|
|
59862
|
-
|
|
59863
|
-
}), this.release(), this.plugins.delete(plugin.id);
|
|
59892
|
+
this.release(), this.plugins.delete(plugin.id);
|
|
59893
|
+
}), this.plugins.forEach(plugin => {
|
|
59894
|
+
plugin.update && plugin.update();
|
|
59864
59895
|
});
|
|
59865
59896
|
const addedPlugins = null == plugins ? void 0 : plugins.filter(plugin => !this.plugins.has(plugin.id));
|
|
59866
59897
|
null == addedPlugins || addedPlugins.forEach(plugin => {
|
|
59867
59898
|
this.register(plugin), this._bindTableEventForPlugin(plugin);
|
|
59868
59899
|
});
|
|
59869
59900
|
}
|
|
59870
|
-
updatePlugins(plugins) {
|
|
59871
|
-
null == plugins || plugins.forEach(plugin => {
|
|
59872
|
-
plugin.update && plugin.update();
|
|
59873
|
-
});
|
|
59874
|
-
}
|
|
59875
59901
|
release() {
|
|
59876
59902
|
this.plugins.forEach(plugin => {
|
|
59877
59903
|
var _a;
|
|
@@ -59894,7 +59920,7 @@
|
|
|
59894
59920
|
}
|
|
59895
59921
|
constructor(container, options = {}) {
|
|
59896
59922
|
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;
|
|
59897
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.22.7-alpha.
|
|
59923
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.22.7-alpha.4", 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");
|
|
59898
59924
|
this.pluginManager = new PluginManager$1(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
59899
59925
|
options: options,
|
|
59900
59926
|
container: container
|
|
@@ -60510,13 +60536,11 @@
|
|
|
60510
60536
|
this.colContentWidthsMap.put(col, width);
|
|
60511
60537
|
}
|
|
60512
60538
|
getAllRowsHeight() {
|
|
60513
|
-
|
|
60514
|
-
if (!(null === (_a = this.internalProps) || void 0 === _a ? void 0 : _a.rowCount) || this.internalProps.rowCount <= 0) return 0;
|
|
60539
|
+
if (this.internalProps.rowCount <= 0) return 0;
|
|
60515
60540
|
return this.getRowsHeight(0, this.internalProps.rowCount - 1);
|
|
60516
60541
|
}
|
|
60517
60542
|
getAllColsWidth() {
|
|
60518
|
-
|
|
60519
|
-
if (!(null === (_a = this.internalProps) || void 0 === _a ? void 0 : _a.colCount) || this.internalProps.colCount <= 0) return 0;
|
|
60543
|
+
if (this.internalProps.colCount <= 0) return 0;
|
|
60520
60544
|
return this.getColsWidth(0, this.internalProps.colCount - 1);
|
|
60521
60545
|
}
|
|
60522
60546
|
getColsWidths() {
|
|
@@ -60737,7 +60761,7 @@
|
|
|
60737
60761
|
colEnd: colEnd
|
|
60738
60762
|
};
|
|
60739
60763
|
}
|
|
60740
|
-
getBodyVisibleRowRange(
|
|
60764
|
+
getBodyVisibleRowRange(start_deltaY = 0, end_deltaY = 0) {
|
|
60741
60765
|
const {
|
|
60742
60766
|
scrollTop: scrollTop
|
|
60743
60767
|
} = this,
|
|
@@ -60745,14 +60769,14 @@
|
|
|
60745
60769
|
bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight(),
|
|
60746
60770
|
{
|
|
60747
60771
|
row: rowStart
|
|
60748
|
-
} = this.getRowAt(scrollTop + frozenRowsHeight + 1),
|
|
60749
|
-
rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight +
|
|
60772
|
+
} = this.getRowAt(scrollTop + frozenRowsHeight + 1 + start_deltaY),
|
|
60773
|
+
rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight ? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight + end_deltaY).row : this.rowCount - 1;
|
|
60750
60774
|
return rowEnd < 0 ? null : {
|
|
60751
60775
|
rowStart: rowStart,
|
|
60752
60776
|
rowEnd: rowEnd
|
|
60753
60777
|
};
|
|
60754
60778
|
}
|
|
60755
|
-
getBodyVisibleColRange(
|
|
60779
|
+
getBodyVisibleColRange(start_deltaX = 0, end_deltaX = 0) {
|
|
60756
60780
|
const {
|
|
60757
60781
|
scrollLeft: scrollLeft
|
|
60758
60782
|
} = this,
|
|
@@ -60760,8 +60784,8 @@
|
|
|
60760
60784
|
rightFrozenColsWidth = this.getRightFrozenColsWidth(),
|
|
60761
60785
|
{
|
|
60762
60786
|
col: colStart
|
|
60763
|
-
} = this.getColAt(scrollLeft + frozenColsWidth + 1),
|
|
60764
|
-
colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth +
|
|
60787
|
+
} = this.getColAt(scrollLeft + frozenColsWidth + 1 + start_deltaX),
|
|
60788
|
+
colEnd = this.getAllColsWidth() > this.tableNoFrameWidth ? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth + end_deltaX).col : this.colCount - 1;
|
|
60765
60789
|
return colEnd < 0 ? null : {
|
|
60766
60790
|
colStart: colStart,
|
|
60767
60791
|
colEnd: colEnd
|
|
@@ -65364,7 +65388,7 @@
|
|
|
65364
65388
|
}) {
|
|
65365
65389
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
65366
65390
|
const internalProps = this.internalProps;
|
|
65367
|
-
if (
|
|
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) : {
|
|
65368
65392
|
addRecordRule: options.addRecordRule
|
|
65369
65393
|
}, 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--) {
|
|
65370
65394
|
const releaseObj = internalProps.releaseList[i];
|
|
@@ -65610,7 +65634,7 @@
|
|
|
65610
65634
|
}).map(key => this.stateManager.checkedState.get(key));
|
|
65611
65635
|
return this.options.groupBy && (stateArr = getGroupCheckboxState(this)), Array.from(stateArr, state => state && state[field]);
|
|
65612
65636
|
}
|
|
65613
|
-
return
|
|
65637
|
+
return new Array(...this.stateManager.checkedState.values());
|
|
65614
65638
|
}
|
|
65615
65639
|
getCellCheckboxState(col, row) {
|
|
65616
65640
|
var _a;
|
|
@@ -77823,7 +77847,7 @@
|
|
|
77823
77847
|
PluginManager: PluginManager
|
|
77824
77848
|
});
|
|
77825
77849
|
|
|
77826
|
-
const version = "1.22.7-alpha.
|
|
77850
|
+
const version = "1.22.7-alpha.4";
|
|
77827
77851
|
|
|
77828
77852
|
exports.Gantt = Gantt;
|
|
77829
77853
|
exports.TYPES = index$4;
|