Skip to content

Commit

Permalink
Merge pull request #997 from VisActor/release/0.18.2
Browse files Browse the repository at this point in the history
[Auto release] release 0.18.2
  • Loading branch information
fangsmile authored Jan 24, 2024
2 parents 2166dff + de326ab commit d5216e1
Show file tree
Hide file tree
Showing 23 changed files with 293 additions and 74 deletions.
66 changes: 33 additions & 33 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion common/config/rush/version-policies.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"definitionName":"lockStepVersion","policyName":"vtableMain","version":"0.18.1","mainProject":"@visactor/vtable","nextBump":"patch"}]
[{"definitionName":"lockStepVersion","policyName":"vtableMain","version":"0.18.2","mainProject":"@visactor/vtable","nextBump":"patch"}]
2 changes: 1 addition & 1 deletion packages/react-vtable/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/react-vtable",
"version": "0.18.1",
"version": "0.18.2",
"description": "The react version of VTable",
"keywords": [
"react",
Expand Down
2 changes: 1 addition & 1 deletion packages/vtable-editors/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/vtable-editors",
"version": "0.18.1",
"version": "0.18.2",
"description": "",
"sideEffects": false,
"main": "cjs/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/vtable-export/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/vtable-export",
"version": "0.18.1",
"version": "0.18.2",
"description": "The export util of VTable",
"author": {
"name": "VisActor",
Expand Down
33 changes: 33 additions & 0 deletions packages/vtable/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,39 @@
{
"name": "@visactor/vtable",
"entries": [
{
"version": "0.18.2",
"tag": "@visactor/vtable_v0.18.2",
"date": "Wed, 24 Jan 2024 12:12:36 GMT",
"comments": {
"none": [
{
"comment": "fix: fix rowHeaderGroup attribute y when has no colHeaderGroup #971\n\n"
},
{
"comment": "fix: transpose bottomFrozenRow cell layout error #978\n\n"
},
{
"comment": "fix: passte value to last row occur error #979\n\n"
},
{
"comment": "fix: use updateColumns api click state not right #975\n\n"
},
{
"comment": "fix: record has nan string value pivotchart cell value parse handle this case #993\n\n"
},
{
"comment": "fix: row Height compute for axis\n\n"
},
{
"comment": "fix: fix deltaY col number in moveCell()"
},
{
"comment": "feat: add component update"
}
]
}
},
{
"version": "0.18.1",
"tag": "@visactor/vtable_v0.18.1",
Expand Down
28 changes: 27 additions & 1 deletion packages/vtable/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,32 @@
# Change Log - @visactor/vtable

This log was last generated on Fri, 19 Jan 2024 11:43:14 GMT and should not be manually modified.
This log was last generated on Wed, 24 Jan 2024 12:12:36 GMT and should not be manually modified.

## 0.18.2
Wed, 24 Jan 2024 12:12:36 GMT

### Updates

- fix: fix rowHeaderGroup attribute y when has no colHeaderGroup #971


- fix: transpose bottomFrozenRow cell layout error #978


- fix: passte value to last row occur error #979


- fix: use updateColumns api click state not right #975


- fix: record has nan string value pivotchart cell value parse handle this case #993


- fix: row Height compute for axis


- fix: fix deltaY col number in moveCell()
- feat: add component update

## 0.18.1
Fri, 19 Jan 2024 11:43:14 GMT
Expand Down
3 changes: 3 additions & 0 deletions packages/vtable/examples/list/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ export function createTable() {
tableInstance.on('change_cell_value', arg => {
console.log(arg);
});
setTimeout(() => {
tableInstance.addRecord({ id: 333 }, 6);
}, 3000);
// tableInstance.on('sort_click', args => {
// tableInstance.updateSortState(
// {
Expand Down
8 changes: 4 additions & 4 deletions packages/vtable/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/vtable",
"version": "0.18.1",
"version": "0.18.2",
"description": "canvas table width high performance",
"keywords": [
"grid",
Expand Down Expand Up @@ -50,9 +50,9 @@
},
"dependencies": {
"@visactor/vtable-editors": "workspace:*",
"@visactor/vrender-core": "0.17.17-alpha.1",
"@visactor/vrender-kits": "0.17.17-alpha.1",
"@visactor/vrender-components": "0.17.17-alpha.1",
"@visactor/vrender-core": "0.17.19-alpha.1",
"@visactor/vrender-kits": "0.17.19-alpha.1",
"@visactor/vrender-components": "0.17.19-alpha.1",
"@visactor/vutils-extension": "~1.8.5",
"@visactor/vutils": "~0.17.1",
"@visactor/vscale": "~0.17.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/vtable/src/ListTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -971,14 +971,14 @@ export class ListTable extends BaseTable implements ListTableAPI {
let pasteRowEnd = startRow;
// const rowCount = values.length;
for (let i = 0; i < values.length; i++) {
if (pasteRowEnd >= this.rowCount - 1) {
if (startRow + i > this.rowCount - 1) {
break;
}
pasteRowEnd = startRow + i;
const rowValues = values[i];
let thisRowPasteColEnd = startCol;
for (let j = 0; j < rowValues.length; j++) {
if (thisRowPasteColEnd >= this.colCount - 1) {
if (startCol + j > this.colCount - 1) {
break;
}
thisRowPasteColEnd = startCol + j;
Expand Down
4 changes: 2 additions & 2 deletions packages/vtable/src/PivotTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1107,14 +1107,14 @@ export class PivotTable extends BaseTable implements PivotTableAPI {
let pasteRowEnd = startRow;
// const rowCount = values.length;
for (let i = 0; i < values.length; i++) {
if (pasteRowEnd >= this.rowCount - 1) {
if (startRow + i > this.rowCount - 1) {
break;
}
pasteRowEnd = startRow + i;
const rowValues = values[i];
let thisRowPasteColEnd = startCol;
for (let j = 0; j < rowValues.length; j++) {
if (thisRowPasteColEnd >= this.colCount - 1) {
if (startCol + j > this.colCount - 1) {
break;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export function computeAxisComponentWidth(config: ICellAxisOption, table: BaseTa
titleWidth += attribute.title.space ?? 4;
}

return tickWidth + labelWidth + titleWidth + 2; // 2 is buffer
return tickWidth + labelWidth + titleWidth + 1; // 2 is buffer
}

/**
Expand Down Expand Up @@ -170,7 +170,7 @@ export function computeAxisComponentHeight(config: ICellAxisOption, table: BaseT
titleHeight += attribute.title.space ?? 4;
}

return tickHeight + labelHeight + titleHeight + 2; // 2 is buffer
return tickHeight + labelHeight + titleHeight + 1; // 2 is buffer
}

// 保留一位有效数字
Expand Down
2 changes: 2 additions & 0 deletions packages/vtable/src/core/BaseTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1967,6 +1967,7 @@ export abstract class BaseTable extends EventTarget implements BaseTableAPI {
internalProps.title?.release();
internalProps.layoutMap.release();
this.scenegraph.clearCells();
this.scenegraph.updateComponent();
this.stateManager.updateOptionSetState();

this._updateSize();
Expand Down Expand Up @@ -2477,6 +2478,7 @@ export abstract class BaseTable extends EventTarget implements BaseTableAPI {
const oldHoverState = { col: this.stateManager.hover.cellPos.col, row: this.stateManager.hover.cellPos.row };
this.internalProps.theme = themes.of(theme ?? themes.DEFAULT);
this.options.theme = theme;
this.scenegraph.updateComponent();
this.scenegraph.updateStageBackground();
this.scenegraph.clearCells();
this.clearCellStyleCache();
Expand Down
8 changes: 6 additions & 2 deletions packages/vtable/src/dataset/dataset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,12 @@ export class Dataset {
max: number;
min: number;
};
fieldRange.max = Math.max(record[field], fieldRange.max);
fieldRange.min = Math.min(record[field], fieldRange.min);
const max = Math.max(record[field], fieldRange.max);
const min = Math.min(record[field], fieldRange.min);
if (!isNaN(max)) {
fieldRange.max = max;
fieldRange.min = min;
}
} else {
const fieldRange = this.collectedValues[field][collectKeys] as Array<string>;
if (fieldRange.indexOf(record[field]) === -1) {
Expand Down
3 changes: 2 additions & 1 deletion packages/vtable/src/event/listener/table-group.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { IEventTarget } from '@src/vrender';
import type { IEventTarget, INode } from '@src/vrender';
import { Gesture, type FederatedPointerEvent } from '@src/vrender';
import type {
ListTableAPI,
Expand Down Expand Up @@ -625,6 +625,7 @@ export function bindTableGroupListener(eventManager: EventManager) {
// 如果是鼠标点击到canvas空白区域 则取消选中状态
!table.eventManager.isDraging &&
target &&
target.isDescendantsOf(table.scenegraph.stage) && //防止已经被删除掉了
!target.isDescendantsOf(table.scenegraph.tableGroup)
// &&
// (target as any) !== table.scenegraph.tableGroup &&
Expand Down
2 changes: 1 addition & 1 deletion packages/vtable/src/layout/pivot-header-layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ export class PivotHeaderLayoutMap implements LayoutMapAPI {
}
} else {
row = col;
if (this.frozenRowCount > 0 && row >= this.rowCount - this.bottomFrozenRowCount) {
if (this.bottomFrozenRowCount > 0 && row >= this.rowCount - this.bottomFrozenRowCount) {
return true;
}
}
Expand Down
Loading

0 comments on commit d5216e1

Please sign in to comment.