@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
|
@@ -1003,6 +1003,25 @@ export class PivotHeaderLayoutMap {
|
|
|
1003
1003
|
}
|
|
1004
1004
|
})), headerPaths;
|
|
1005
1005
|
}
|
|
1006
|
+
getCellRowHeaderFullPaths(col) {
|
|
1007
|
+
const headerPaths = [];
|
|
1008
|
+
if ("grid" === this.rowHierarchyType) {
|
|
1009
|
+
for (let i = 0; i <= Math.min(this.rowsDefine.length - 1, col); i++) {
|
|
1010
|
+
const rowDefine = this.rowsDefine[i];
|
|
1011
|
+
"string" == typeof rowDefine ? headerPaths.push({
|
|
1012
|
+
dimensionKey: rowDefine
|
|
1013
|
+
}) : headerPaths.push({
|
|
1014
|
+
dimensionKey: rowDefine.dimensionKey
|
|
1015
|
+
});
|
|
1016
|
+
}
|
|
1017
|
+
col >= this.rowsDefine.length && !1 === this.indicatorsAsCol && this.indicatorsDefine.length > 0 && ("string" == typeof this.indicatorsDefine[0] ? headerPaths.push({
|
|
1018
|
+
indicatorKey: this.indicatorsDefine[0]
|
|
1019
|
+
}) : headerPaths.push({
|
|
1020
|
+
indicatorKey: this.indicatorsDefine[0].indicatorKey
|
|
1021
|
+
}));
|
|
1022
|
+
}
|
|
1023
|
+
return headerPaths;
|
|
1024
|
+
}
|
|
1006
1025
|
getIndicatorInfoByIndicatorKey(indicatorKey) {
|
|
1007
1026
|
var _a;
|
|
1008
1027
|
return null === (_a = this.indicatorsDefine) || void 0 === _a ? void 0 : _a.find((indicator => "string" != typeof indicator && (!!indicatorKey && indicator.indicatorKey === indicatorKey)));
|
|
@@ -1440,17 +1459,31 @@ export class PivotHeaderLayoutMap {
|
|
|
1440
1459
|
if (rowDimensionFinded || forceBody) {
|
|
1441
1460
|
row = this.columnHeaderLevelCount;
|
|
1442
1461
|
const {startInTotal: startInTotal, afterSpanLevel: afterSpanLevel} = null !== (_g = rowDimensionFinded) && void 0 !== _g ? _g : defaultDimension;
|
|
1443
|
-
row += null != startInTotal ? startInTotal : 0,
|
|
1462
|
+
if (row += null != startInTotal ? startInTotal : 0, "grid" === this.rowHierarchyType) {
|
|
1463
|
+
if (rowHeaderPaths.every(((path, index) => this.rowDimensionKeys[index] === path.dimensionKey))) {
|
|
1464
|
+
const col = rowHeaderPaths.length - 1;
|
|
1465
|
+
defaultCol = (this.rowHeaderTitle ? col + 1 : col) + this.leftRowSeriesNumberColumnCount;
|
|
1466
|
+
} else defaultCol = (this.rowHeaderTitle ? afterSpanLevel + 1 : afterSpanLevel) + this.leftRowSeriesNumberColumnCount;
|
|
1467
|
+
} else defaultCol = 0;
|
|
1444
1468
|
}
|
|
1445
1469
|
if (colDimensionFinded || forceBody) {
|
|
1446
1470
|
col = this.rowHeaderLevelCount + this.leftRowSeriesNumberColumnCount;
|
|
1447
1471
|
const {startInTotal: startInTotal, afterSpanLevel: afterSpanLevel} = null !== (_h = colDimensionFinded) && void 0 !== _h ? _h : defaultDimension;
|
|
1448
1472
|
col += null != startInTotal ? startInTotal : 0, defaultRow = this.columnHeaderTitle ? afterSpanLevel + 1 : afterSpanLevel;
|
|
1449
1473
|
}
|
|
1450
|
-
|
|
1474
|
+
if (isValid(col) || isValid(row)) return {
|
|
1451
1475
|
col: null != col ? col : defaultCol,
|
|
1452
1476
|
row: null != row ? row : defaultRow
|
|
1453
|
-
}
|
|
1477
|
+
};
|
|
1478
|
+
if (rowHeaderPaths.length > 0) {
|
|
1479
|
+
if (rowHeaderPaths.every(((path, index) => this.rowDimensionKeys[index] === path.dimensionKey))) {
|
|
1480
|
+
const col = rowHeaderPaths.length - 1;
|
|
1481
|
+
return {
|
|
1482
|
+
col: (this.rowHeaderTitle ? col + 1 : col) + this.leftRowSeriesNumberColumnCount,
|
|
1483
|
+
row: void 0
|
|
1484
|
+
};
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1454
1487
|
}
|
|
1455
1488
|
}
|
|
1456
1489
|
setChartInstance(_col, _row, chartInstance) {
|
|
@@ -1665,6 +1698,7 @@ export class PivotHeaderLayoutMap {
|
|
|
1665
1698
|
getIndicatorKeyInChartSpec(_col, _row) {
|
|
1666
1699
|
const chartSpec = this.getRawChartSpec(_col, _row), indicatorKeys = [];
|
|
1667
1700
|
if (chartSpec) {
|
|
1701
|
+
if ("boxPlot" === chartSpec.type) return [ chartSpec.maxField ];
|
|
1668
1702
|
if (chartSpec.series || chartSpec.xField || chartSpec.yField) return !1 === this.indicatorsAsCol ? chartSpec.series ? chartSpec.series.forEach((chartSeries => {
|
|
1669
1703
|
const yField = chartSeries.yField;
|
|
1670
1704
|
indicatorKeys.push(yField);
|
|
@@ -1928,4 +1962,4 @@ function bandSpace(count, paddingInner, paddingOuter) {
|
|
|
1928
1962
|
return space = 1 === count ? count + 2 * paddingOuter : count - paddingInner + 2 * paddingOuter,
|
|
1929
1963
|
count ? space > 0 ? space : 1 : 0;
|
|
1930
1964
|
}
|
|
1931
|
-
//# sourceMappingURL=pivot-header-layout.js.map
|
|
1965
|
+
//# sourceMappingURL=pivot-header-layout.js.map
|