@visactor/vtable 1.22.13-alpha.0 → 1.23.0
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/PivotTable.js +12 -5
- package/cjs/PivotTable.js.map +1 -1
- package/cjs/core/BaseTable.js +1 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/dataset/dataset.d.ts +4 -1
- package/cjs/dataset/dataset.js +40 -10
- package/cjs/dataset/dataset.js.map +1 -1
- package/cjs/event/media-click.js +2 -2
- package/cjs/event/media-click.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/pivot-header-layout.js +2 -1
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +4 -2
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/state/hover/col.js.map +1 -1
- package/cjs/state/hover/is-cell-hover.js.map +1 -1
- package/cjs/state/hover/update-cell.js.map +1 -1
- package/cjs/tools/join.js +1 -0
- package/cjs/tools/join.js.map +1 -1
- package/cjs/ts-types/pivot-table/corner.d.ts +1 -1
- package/cjs/ts-types/pivot-table/corner.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +146 -25
- package/dist/vtable.min.js +2 -2
- package/es/PivotTable.js +12 -5
- package/es/PivotTable.js.map +1 -1
- package/es/core/BaseTable.js +1 -1
- package/es/core/BaseTable.js.map +1 -1
- package/es/dataset/dataset.d.ts +4 -1
- package/es/dataset/dataset.js +40 -10
- package/es/dataset/dataset.js.map +1 -1
- package/es/event/media-click.js +2 -2
- package/es/event/media-click.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/pivot-header-layout.js +2 -1
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +4 -2
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/state/hover/col.js.map +1 -1
- package/es/state/hover/is-cell-hover.js.map +1 -1
- package/es/state/hover/update-cell.js.map +1 -1
- package/es/tools/join.js +1 -0
- package/es/tools/join.js.map +1 -1
- package/es/ts-types/pivot-table/corner.d.ts +1 -1
- package/es/ts-types/pivot-table/corner.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +9 -9
package/cjs/PivotTable.js
CHANGED
|
@@ -884,14 +884,21 @@ class PivotTable extends BaseTable_1.BaseTable {
|
|
|
884
884
|
const cellDimensionPath = this.internalProps.layoutMap.getCellHeaderPaths(col, row);
|
|
885
885
|
if (this.isCornerHeader(col, row)) this.internalProps.layoutMap.changeCornerTitle(col, row, newValue); else if (this.isHeader(col, row)) this.internalProps.layoutMap.changeTreeNodeTitle(col, row, newValue),
|
|
886
886
|
!this.isCornerHeader(col, row) && this.dataset.changeRecordFieldValue((null === (_a = cellDimensionPath.colHeaderPaths) || void 0 === _a ? void 0 : _a.length) ? null !== (_b = cellDimensionPath.colHeaderPaths[cellDimensionPath.colHeaderPaths.length - 1].indicatorKey) && void 0 !== _b ? _b : cellDimensionPath.colHeaderPaths[cellDimensionPath.colHeaderPaths.length - 1].dimensionKey : null !== (_c = cellDimensionPath.rowHeaderPaths[cellDimensionPath.rowHeaderPaths.length - 1].indicatorKey) && void 0 !== _c ? _c : cellDimensionPath.rowHeaderPaths[cellDimensionPath.rowHeaderPaths.length - 1].dimensionKey, oldValue, newValue); else {
|
|
887
|
-
|
|
887
|
+
let indicatorPosition;
|
|
888
|
+
const colKeys = null === (_d = cellDimensionPath.colHeaderPaths) || void 0 === _d ? void 0 : _d.filter((path => !path.virtual)).map(((colPath, index) => {
|
|
888
889
|
var _a;
|
|
889
|
-
return
|
|
890
|
-
|
|
890
|
+
return colPath.indicatorKey && (indicatorPosition = {
|
|
891
|
+
position: "col",
|
|
892
|
+
index: index
|
|
893
|
+
}), null !== (_a = colPath.indicatorKey) && void 0 !== _a ? _a : colPath.value;
|
|
894
|
+
})), rowKeys = null === (_e = cellDimensionPath.rowHeaderPaths) || void 0 === _e ? void 0 : _e.filter((path => !path.virtual)).map(((rowPath, index) => {
|
|
891
895
|
var _a;
|
|
892
|
-
return
|
|
896
|
+
return rowPath.indicatorKey && (indicatorPosition = {
|
|
897
|
+
position: "row",
|
|
898
|
+
index: index
|
|
899
|
+
}), null !== (_a = rowPath.indicatorKey) && void 0 !== _a ? _a : rowPath.value;
|
|
893
900
|
}));
|
|
894
|
-
this.dataset.changeTreeNodeValue(
|
|
901
|
+
this.dataset.changeTreeNodeValue(rowKeys, colKeys, this.internalProps.layoutMap.getIndicatorKey(col, row), newValue, indicatorPosition);
|
|
895
902
|
}
|
|
896
903
|
} else if (this.flatDataToObjects) {
|
|
897
904
|
const cellDimensionPath = this.internalProps.layoutMap.getCellHeaderPaths(col, row);
|