@visactor/vtable 1.22.2 → 1.22.3
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/ListTable.d.ts +3 -1
- package/cjs/ListTable.js +15 -8
- package/cjs/ListTable.js.map +1 -1
- package/cjs/PivotChart.js +10 -8
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/PivotTable.d.ts +1 -0
- package/cjs/PivotTable.js +3 -0
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/body-helper/style/ButtonStyle.d.ts +10 -1
- package/cjs/body-helper/style/ButtonStyle.js.map +1 -1
- package/cjs/body-helper/style/CheckboxStyle.d.ts +14 -1
- package/cjs/body-helper/style/CheckboxStyle.js.map +1 -1
- package/cjs/body-helper/style/RadioStyle.d.ts +8 -1
- package/cjs/body-helper/style/RadioStyle.js.map +1 -1
- package/cjs/body-helper/style/SwitchStyle.d.ts +13 -1
- package/cjs/body-helper/style/SwitchStyle.js.map +1 -1
- package/cjs/core/BaseTable.js +2 -2
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/record-helper.js.map +1 -1
- package/cjs/data/DataSource.js +1 -1
- package/cjs/data/DataSource.js.map +1 -1
- package/cjs/dataset/dataset.js +5 -1
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/event/listener/touch.js +2 -1
- package/cjs/event/listener/touch.js.map +1 -1
- package/cjs/event/scroll.d.ts +2 -0
- package/cjs/event/scroll.js +12 -3
- package/cjs/event/scroll.js.map +1 -1
- package/cjs/index.d.ts +2 -1
- package/cjs/index.js +18 -4
- package/cjs/index.js.map +1 -1
- package/cjs/layout/chart-helper/get-axis-config.d.ts +1 -0
- package/cjs/layout/chart-helper/get-axis-config.js +11 -8
- package/cjs/layout/chart-helper/get-axis-config.js.map +1 -1
- package/cjs/layout/chart-helper/get-chart-spec.js +7 -7
- package/cjs/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/cjs/layout/index.js +2 -1
- package/cjs/layout/pivot-header-layout.d.ts +2 -1
- package/cjs/layout/pivot-header-layout.js +38 -4
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/pivot-layout.js +2 -0
- package/cjs/layout/row-height-map.js +1 -1
- package/cjs/layout/simple-header-layout.js +4 -4
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/layout/tree-helper.js +1 -1
- package/cjs/plugins/custom-cell-style.js +1 -2
- package/cjs/plugins/index.js +1 -1
- package/cjs/plugins/interface.js +1 -1
- package/cjs/plugins/invert-highlight.js +1 -1
- package/cjs/plugins/list-tree-stick-cell.js +1 -1
- package/cjs/plugins/plugin-manager.js +1 -1
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js +1 -1
- package/cjs/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js +1 -1
- package/cjs/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +7 -3
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +1 -1
- package/cjs/state/cell-move/adjust-header.d.ts +13 -0
- package/cjs/state/cell-move/adjust-header.js +50 -3
- package/cjs/state/cell-move/adjust-header.js.map +1 -1
- package/cjs/state/cell-move/index.js +2 -1
- package/cjs/state/cell-move/index.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +7 -2
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/ts-types/list-table/define/basic-define.d.ts +1 -1
- package/cjs/ts-types/list-table/define/basic-define.js.map +1 -1
- package/cjs/ts-types/new-data-set.d.ts +1 -0
- package/cjs/ts-types/new-data-set.js.map +1 -1
- package/cjs/ts-types/table-engine.d.ts +9 -2
- package/cjs/ts-types/table-engine.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +297 -48
- package/dist/vtable.min.js +2 -2
- package/es/ListTable.d.ts +3 -1
- package/es/ListTable.js +17 -10
- package/es/ListTable.js.map +1 -1
- package/es/PivotChart.js +10 -8
- package/es/PivotChart.js.map +1 -1
- package/es/PivotTable.d.ts +1 -0
- package/es/PivotTable.js +3 -0
- package/es/PivotTable.js.map +1 -1
- package/es/body-helper/style/ButtonStyle.d.ts +10 -1
- package/es/body-helper/style/ButtonStyle.js.map +1 -1
- package/es/body-helper/style/CheckboxStyle.d.ts +14 -1
- package/es/body-helper/style/CheckboxStyle.js.map +1 -1
- package/es/body-helper/style/RadioStyle.d.ts +8 -1
- package/es/body-helper/style/RadioStyle.js.map +1 -1
- package/es/body-helper/style/SwitchStyle.d.ts +13 -1
- package/es/body-helper/style/SwitchStyle.js.map +1 -1
- package/es/core/BaseTable.js +2 -2
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/record-helper.js.map +1 -1
- package/es/data/DataSource.js +1 -1
- package/es/data/DataSource.js.map +1 -1
- package/es/dataset/dataset.js +5 -1
- package/es/dataset/dataset.js.map +1 -1
- package/es/event/listener/touch.js +2 -2
- package/es/event/listener/touch.js.map +1 -1
- package/es/event/scroll.d.ts +2 -0
- package/es/event/scroll.js +9 -1
- package/es/event/scroll.js.map +1 -1
- package/es/index.d.ts +2 -1
- package/es/index.js +3 -1
- package/es/index.js.map +1 -1
- package/es/layout/chart-helper/get-axis-config.d.ts +1 -0
- package/es/layout/chart-helper/get-axis-config.js +11 -8
- package/es/layout/chart-helper/get-axis-config.js.map +1 -1
- package/es/layout/chart-helper/get-chart-spec.js +6 -7
- package/es/layout/chart-helper/get-chart-spec.js.map +1 -1
- package/es/layout/index.js +2 -1
- package/es/layout/pivot-header-layout.d.ts +2 -1
- package/es/layout/pivot-header-layout.js +38 -4
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/pivot-layout.js +2 -0
- package/es/layout/row-height-map.js +1 -1
- package/es/layout/simple-header-layout.js +4 -4
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/layout/tree-helper.js +1 -1
- package/es/plugins/custom-cell-style.js +1 -2
- package/es/plugins/index.js +1 -1
- package/es/plugins/interface.js +1 -1
- package/es/plugins/invert-highlight.js +1 -1
- package/es/plugins/list-tree-stick-cell.js +1 -1
- package/es/plugins/plugin-manager.js +1 -1
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js +1 -1
- package/es/scenegraph/graphic/contributions/rect-contribution-render.js.map +1 -1
- package/es/scenegraph/group-creater/cell-helper.js +2 -2
- package/es/scenegraph/group-creater/cell-helper.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +7 -3
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/scenegraph.js +1 -1
- package/es/state/cell-move/adjust-header.d.ts +13 -0
- package/es/state/cell-move/adjust-header.js +46 -2
- package/es/state/cell-move/adjust-header.js.map +1 -1
- package/es/state/cell-move/index.js +2 -1
- package/es/state/cell-move/index.js.map +1 -1
- package/es/ts-types/base-table.d.ts +7 -2
- package/es/ts-types/base-table.js.map +1 -1
- package/es/ts-types/list-table/define/basic-define.d.ts +1 -1
- package/es/ts-types/list-table/define/basic-define.js.map +1 -1
- package/es/ts-types/new-data-set.d.ts +1 -0
- package/es/ts-types/new-data-set.js.map +1 -1
- package/es/ts-types/table-engine.d.ts +9 -2
- package/es/ts-types/table-engine.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +4 -4
|
@@ -994,6 +994,25 @@ class PivotHeaderLayoutMap {
|
|
|
994
994
|
}
|
|
995
995
|
})), headerPaths;
|
|
996
996
|
}
|
|
997
|
+
getCellRowHeaderFullPaths(col) {
|
|
998
|
+
const headerPaths = [];
|
|
999
|
+
if ("grid" === this.rowHierarchyType) {
|
|
1000
|
+
for (let i = 0; i <= Math.min(this.rowsDefine.length - 1, col); i++) {
|
|
1001
|
+
const rowDefine = this.rowsDefine[i];
|
|
1002
|
+
"string" == typeof rowDefine ? headerPaths.push({
|
|
1003
|
+
dimensionKey: rowDefine
|
|
1004
|
+
}) : headerPaths.push({
|
|
1005
|
+
dimensionKey: rowDefine.dimensionKey
|
|
1006
|
+
});
|
|
1007
|
+
}
|
|
1008
|
+
col >= this.rowsDefine.length && !1 === this.indicatorsAsCol && this.indicatorsDefine.length > 0 && ("string" == typeof this.indicatorsDefine[0] ? headerPaths.push({
|
|
1009
|
+
indicatorKey: this.indicatorsDefine[0]
|
|
1010
|
+
}) : headerPaths.push({
|
|
1011
|
+
indicatorKey: this.indicatorsDefine[0].indicatorKey
|
|
1012
|
+
}));
|
|
1013
|
+
}
|
|
1014
|
+
return headerPaths;
|
|
1015
|
+
}
|
|
997
1016
|
getIndicatorInfoByIndicatorKey(indicatorKey) {
|
|
998
1017
|
var _a;
|
|
999
1018
|
return null === (_a = this.indicatorsDefine) || void 0 === _a ? void 0 : _a.find((indicator => "string" != typeof indicator && (!!indicatorKey && indicator.indicatorKey === indicatorKey)));
|
|
@@ -1441,17 +1460,31 @@ class PivotHeaderLayoutMap {
|
|
|
1441
1460
|
if (rowDimensionFinded || forceBody) {
|
|
1442
1461
|
row = this.columnHeaderLevelCount;
|
|
1443
1462
|
const {startInTotal: startInTotal, afterSpanLevel: afterSpanLevel} = null !== (_g = rowDimensionFinded) && void 0 !== _g ? _g : defaultDimension;
|
|
1444
|
-
row += null != startInTotal ? startInTotal : 0,
|
|
1463
|
+
if (row += null != startInTotal ? startInTotal : 0, "grid" === this.rowHierarchyType) {
|
|
1464
|
+
if (rowHeaderPaths.every(((path, index) => this.rowDimensionKeys[index] === path.dimensionKey))) {
|
|
1465
|
+
const col = rowHeaderPaths.length - 1;
|
|
1466
|
+
defaultCol = (this.rowHeaderTitle ? col + 1 : col) + this.leftRowSeriesNumberColumnCount;
|
|
1467
|
+
} else defaultCol = (this.rowHeaderTitle ? afterSpanLevel + 1 : afterSpanLevel) + this.leftRowSeriesNumberColumnCount;
|
|
1468
|
+
} else defaultCol = 0;
|
|
1445
1469
|
}
|
|
1446
1470
|
if (colDimensionFinded || forceBody) {
|
|
1447
1471
|
col = this.rowHeaderLevelCount + this.leftRowSeriesNumberColumnCount;
|
|
1448
1472
|
const {startInTotal: startInTotal, afterSpanLevel: afterSpanLevel} = null !== (_h = colDimensionFinded) && void 0 !== _h ? _h : defaultDimension;
|
|
1449
1473
|
col += null != startInTotal ? startInTotal : 0, defaultRow = this.columnHeaderTitle ? afterSpanLevel + 1 : afterSpanLevel;
|
|
1450
1474
|
}
|
|
1451
|
-
|
|
1475
|
+
if ((0, vutils_1.isValid)(col) || (0, vutils_1.isValid)(row)) return {
|
|
1452
1476
|
col: null != col ? col : defaultCol,
|
|
1453
1477
|
row: null != row ? row : defaultRow
|
|
1454
|
-
}
|
|
1478
|
+
};
|
|
1479
|
+
if (rowHeaderPaths.length > 0) {
|
|
1480
|
+
if (rowHeaderPaths.every(((path, index) => this.rowDimensionKeys[index] === path.dimensionKey))) {
|
|
1481
|
+
const col = rowHeaderPaths.length - 1;
|
|
1482
|
+
return {
|
|
1483
|
+
col: (this.rowHeaderTitle ? col + 1 : col) + this.leftRowSeriesNumberColumnCount,
|
|
1484
|
+
row: void 0
|
|
1485
|
+
};
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1455
1488
|
}
|
|
1456
1489
|
}
|
|
1457
1490
|
setChartInstance(_col, _row, chartInstance) {
|
|
@@ -1676,6 +1709,7 @@ class PivotHeaderLayoutMap {
|
|
|
1676
1709
|
getIndicatorKeyInChartSpec(_col, _row) {
|
|
1677
1710
|
const chartSpec = this.getRawChartSpec(_col, _row), indicatorKeys = [];
|
|
1678
1711
|
if (chartSpec) {
|
|
1712
|
+
if ("boxPlot" === chartSpec.type) return [ chartSpec.maxField ];
|
|
1679
1713
|
if (chartSpec.series || chartSpec.xField || chartSpec.yField) return !1 === this.indicatorsAsCol ? chartSpec.series ? chartSpec.series.forEach((chartSeries => {
|
|
1680
1714
|
const yField = chartSeries.yField;
|
|
1681
1715
|
indicatorKeys.push(yField);
|
|
@@ -1940,5 +1974,5 @@ function bandSpace(count, paddingInner, paddingOuter) {
|
|
|
1940
1974
|
count ? space > 0 ? space : 1 : 0;
|
|
1941
1975
|
}
|
|
1942
1976
|
|
|
1977
|
+
exports.PivotHeaderLayoutMap = PivotHeaderLayoutMap;
|
|
1943
1978
|
//# sourceMappingURL=pivot-header-layout.js.map
|
|
1944
|
-
exports.PivotHeaderLayoutMap = PivotHeaderLayoutMap;
|