Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Auto release] release 0.17.5 #849

Merged
merged 33 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f5703a2
fix: click sort error when set customMerge #832
fangsmile Jan 2, 2024
0dfa9f9
feat: support edit header title #819
fangsmile Jan 2, 2024
70d6734
docs: update changlog of rush
fangsmile Jan 2, 2024
4f920d8
docs: header edit title
fangsmile Jan 2, 2024
8d9a7b8
fix: arrow key to move select cell not work
fangsmile Jan 1, 2024
618f4c3
fix: remove unused code
fangsmile Jan 2, 2024
e7bcc44
fix: remove unused code
fangsmile Jan 2, 2024
2210ce9
refactor: list table bottom row can not use bottomFrozenStyle #836
fangsmile Jan 2, 2024
fa05312
docs: update changlog of rush
fangsmile Jan 2, 2024
8e39ba5
Merge pull request #838 from VisActor/main
fangsmile Jan 2, 2024
2d7f26a
Merge remote-tracking branch 'origin/develop' into 819-feature-suppor…
fangsmile Jan 2, 2024
dd5a164
feat: add api getCellHeaderTreeNodes for pivotTable #839
fangsmile Jan 2, 2024
e38133a
docs: update changlog of rush
fangsmile Jan 2, 2024
1385cd3
docs: update getCellHeaderTreeNodes api
fangsmile Jan 2, 2024
d1d270f
workFlow add release changelog
fangsmile Jan 3, 2024
eb0e650
Merge pull request #840 from VisActor/839-feature-api-getcellheadertr…
fangsmile Jan 3, 2024
e9b8476
Merge pull request #837 from VisActor/836-refactor-listtable-use-bott…
fangsmile Jan 3, 2024
c23ae8e
refactor: add onVChartEvent for BaseTable #843
fangsmile Jan 3, 2024
f345121
docs: update changlog of rush
fangsmile Jan 3, 2024
b26f291
fix: setRecords process scrollTop update scenegraph #831
fangsmile Jan 3, 2024
0e6d7a6
docs: update changlog of rush
fangsmile Jan 3, 2024
b8360b4
fix: add group clip in body
Rui-Sun Jan 2, 2024
d36f718
fix: fix clip group bounds
Rui-Sun Jan 3, 2024
343d3f1
fix: add corner group clip
Rui-Sun Jan 3, 2024
6458258
fix: add clip attribute in corner header group
Rui-Sun Jan 3, 2024
ee7024f
Merge pull request #834 from VisActor/819-feature-support-edit-header
fangsmile Jan 3, 2024
694173e
fix: setRecords process scrollTop update scenegraph #831
fangsmile Jan 3, 2024
c0353d4
Merge pull request #844 from VisActor/843-feature-add-api-onvcharteve…
fangsmile Jan 3, 2024
d8e6ed9
Merge remote-tracking branch 'origin/develop' into 831-bug-setRecords…
fangsmile Jan 3, 2024
d275670
fix: setRecords process scrollTop update scenegraph #831
fangsmile Jan 3, 2024
1a5ca56
fix: setRecords process scrollTop update scenegraph #831
fangsmile Jan 3, 2024
36e1a04
Merge pull request #846 from VisActor/831-bug-setRecords-performance
fangsmile Jan 3, 2024
a7c66eb
build: prelease version 0.17.5
github-actions[bot] Jan 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/release-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Release changelog

on:
release:
types: [published]

jobs:
update-changelog-after-publish-a-release:
name: GitHub Actions Test
runs-on: macOS-latest

strategy:
matrix:
node-version: [18.x]

steps:
- name: Checkout
id: checkout
uses: actions/checkout@v3
- run: |
git config user.name ${{ github.actor }}
git config user.email ${{ github.actor }}@users.noreply.github.com

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: './common/config/rush/pnpm-lock.yaml'

# Install rush
- name: Install rush
run: node common/scripts/install-run-rush.js install --bypass-policy

- name: Create branch
run: |
git status
git fetch origin develop:develop
git checkout develop
git status
git checkout -b docs/generate-changelog-${{ github.event.release.tag_name }}

- name: generate changelog
id: generate-changelog
uses: xile611/collect-release-changelog@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
folder: ./docs/assets/changelog
langs: 'en,zh'
tag_name: ${{github.event.release.tag_name}}
file_name: changelog.md

- name: Push branch
run: |
git add .
git commit -m "docs: generate changelog of release ${{ github.event.release.tag_name }}" -n
git push origin docs/generate-changelog-${{ github.event.release.tag_name }}

- name: Create Pull Request
uses: dustinirving/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: '[Auto changelog] changlog of ${{ github.event.release.tag_name }}'
base: develop
head: 'docs/generate-changelog-${{ github.event.release.tag_name }}'
labels: changelog
body: 'update changelog of ${{ github.event.release.tag_name }}'
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.17.4","mainProject":"@visactor/vtable","nextBump":"patch"}]
[{"definitionName":"lockStepVersion","policyName":"vtableMain","version":"0.17.5","mainProject":"@visactor/vtable","nextBump":"patch"}]
23 changes: 19 additions & 4 deletions docs/assets/api/en/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,21 @@ Get the path to the row list header

{{ use: ICellHeaderPaths() }}


## getCellHeaderTreeNodes(Function)

Obtain the header tree node based on the row and column number, which includes the user's custom attributes on the custom tree rowTree and columnTree trees (it is also the node of the internal layout tree, please do not modify it at will after obtaining it).Under normal circumstances, just use getCellHeaderPaths.

```
/**
* Obtain the header tree node based on the row and column number, which includes the user's custom attributes on the custom tree rowTree and columnTree trees (it is also the node of the internal layout tree, please do not modify it at will after obtaining it)
* @param col
* @param row
* @returns ICellHeaderPaths
*/
getCellHeaderTreeNodes(col: number, row: number)=> ICellHeaderPaths
```

## getCellAddress(Function)

Get the row and column number of a piece of data in the body based on the data and field attribute field names. Currently only the basic table ListTable is supported.
Expand Down Expand Up @@ -513,7 +528,7 @@ enum HierarchyState {
none = 'none'
}
```
## getLayouRowTree(Function)
## getLayoutRowTree(Function)
** PivotTable Proprietary **

Get the table row header tree structure
Expand All @@ -522,10 +537,10 @@ Get the table row header tree structure
* Get the table row tree structure
* @returns
*/
getLayouRowTree() : LayoutTreeNode[]
getLayoutRowTree() : LayoutTreeNode[]
```

## getLayouRowTreeCount(Function)
## getLayoutRowTreeCount(Function)
** PivotTable Proprietary **

Get the total number of nodes occupying the table row header tree structure.
Expand All @@ -536,7 +551,7 @@ Note: The logic distinguishes between flat and tree hierarchies.
* Get the total number of nodes occupying the table row header tree structure.
* @returns
*/
getLayouRowTreeCount() : number
getLayoutRowTreeCount() : number
```

## updateSortState(Function)
Expand Down
22 changes: 18 additions & 4 deletions docs/assets/api/zh/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,20 @@ setRecords(records: Array<any>, sort?: SortState | SortState[]) //** 基本表

{{ use: ICellHeaderPaths() }}

## getCellHeaderTreeNodes(Function)

根据行列号获取表头tree节点,包含了用户在自定义树rowTree及columnTree树上的自定义属性(也是内部布局树的节点,获取后请不要随意修改)。一般情况下用getCellHeaderPaths即可。

```
/**
* 根据行列号获取表头tree节点,包含了用户在自定义树rowTree及columnTree树上的自定义属性(也是内部布局树的节点,获取后请不要随意修改)
* @param col
* @param row
* @returns ICellHeaderPaths
*/
getCellHeaderTreeNodes(col: number, row: number)=> ICellHeaderPaths
```

## getCellAddress(Function)

根据数据和 field 属性字段名称获取 body 中某条数据的行列号。目前仅支持基本表格ListTable
Expand Down Expand Up @@ -507,7 +521,7 @@ enum HierarchyState {
}
```

## getLayouRowTree(Function)
## getLayoutRowTree(Function)
** PivotTable 专有 **

获取表格行头树形结构
Expand All @@ -516,10 +530,10 @@ enum HierarchyState {
* 获取表格行树状结构
* @returns
*/
getLayouRowTree() : LayouTreeNode[]
getLayoutRowTree() : LayouTreeNode[]
```

## getLayouRowTreeCount(Function)
## getLayoutRowTreeCount(Function)
** PivotTable 专有 **

获取表格行头树形结构的占位的总节点数。
Expand All @@ -530,7 +544,7 @@ enum HierarchyState {
* 获取表格行头树形结构的占位的总节点数。
* @returns
*/
getLayouRowTreeCount() : number
getLayoutRowTreeCount() : number
```

## updateSortState(Function)
Expand Down
4 changes: 4 additions & 0 deletions docs/assets/guide/en/edit/edit_cell.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,4 +228,8 @@ Editing trigger timing support: double-click a cell to enter editing, click a ce
completeEditCell: () => void;
```

## Header Editing

The basic table supports editing the display title in the header. You can enable this by configuring `headerEditor` globally or within a column. The usage is the same as `editor`.

Through the above steps, you can create a table with editing functions, select the appropriate editor type according to business needs, customize the editor, listen to editing events, and obtain edited data. In this way, users can easily edit the data in the table, and you can process the edited data accordingly.
3 changes: 3 additions & 0 deletions docs/assets/guide/zh/edit/edit_cell.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,5 +234,8 @@ tableInstance.records;
/** 结束编辑 */
completeEditCell: () => void;
```
## 表头编辑

基本表格可支持编辑表头显示标题title,在全局或者在column中配置`headerEditor`来开启,具体用法同`editor`。

通过以上步骤,你可以创建一个具有编辑功能的表格,并根据业务需求选择合适的编辑器类型、自定义编辑器、监听编辑事件以及获取编辑后的数据。这样,用户就可以方便地编辑表格中的数据,并且你可以对编辑后的数据进行相应的处理。
8 changes: 8 additions & 0 deletions docs/assets/option/en/column/base-column-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,5 +209,13 @@ editor?: string | IEditor | ((args: BaseCellInfo & { table: BaseTableAPI }) => s
```
Among them, IEditor is the editor interface defined in @visactor/vtable-editors. For details, please refer to the source code: https://github.com/VisActor/VTable/blob/feat/editCell/packages/vtable-editors/src/types.ts .


${prefix} headerEditor (string|Object|Function)

Configure the display title of this column header
```
headerEditor?: string | IEditor | ((args: BaseCellInfo & { table: BaseTableAPI }) => string | IEditor);
```

${prefix} columns (Array)
Configure arrays with upper columns, nesting structures to describe column grouping relationships.
7 changes: 7 additions & 0 deletions docs/assets/option/en/table/listTable.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ editor?: string | IEditor | ((args: BaseCellInfo & { table: BaseTableAPI }) => s
```
Among them, IEditor is the editor interface defined in @visactor/vtable-editors. For details, please refer to the source code: https://github.com/VisActor/VTable/blob/feat/editCell/packages/vtable-editors/src/types.ts .

${prefix} headerEditor (string|Object|Function)

Global configuration for the editor of the display title in the table header
```
headerEditor?: string | IEditor | ((args: BaseCellInfo & { table: BaseTableAPI }) => string | IEditor);
```

{{ use: common-option-secondary(
prefix = '#',
tableType = 'listTable'
Expand Down
7 changes: 7 additions & 0 deletions docs/assets/option/zh/column/base-column-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,5 +219,12 @@ editor?: string | IEditor | ((args: BaseCellInfo & { table: BaseTableAPI }) => s
```
其中IEditor是@visactor/vtable-editors中定义的编辑器接口,具体可以参看源码:https://github.com/VisActor/VTable/blob/feat/editCell/packages/vtable-editors/src/types.ts。

${prefix} headerEditor (string|Object|Function)

配置该列表头显示标题title
```
headerEditor?: string | IEditor | ((args: BaseCellInfo & { table: BaseTableAPI }) => string | IEditor);
```

${prefix} columns (Array)
同上层的列配置数组,嵌套结构来描述列分组关系。
7 changes: 7 additions & 0 deletions docs/assets/option/zh/table/listTable.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ editor?: string | IEditor | ((args: BaseCellInfo & { table: BaseTableAPI }) => s
```
其中IEditor是@visactor/vtable-editors中定义的编辑器接口,具体可以参看源码:https://github.com/VisActor/VTable/blob/feat/editCell/packages/vtable-editors/src/types.ts。

${prefix} headerEditor (string|Object|Function)

全局配置表头显示标题title的编辑器
```
headerEditor?: string | IEditor | ((args: BaseCellInfo & { table: BaseTableAPI }) => string | IEditor);
```

{{ use: common-option-secondary(
prefix = '#',
tableType = 'listTable'
Expand Down
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.17.4",
"version": "0.17.5",
"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.17.4",
"version": "0.17.5",
"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.17.4",
"version": "0.17.5",
"description": "The export util of VTable",
"author": {
"name": "VisActor",
Expand Down
27 changes: 27 additions & 0 deletions packages/vtable/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,33 @@
{
"name": "@visactor/vtable",
"entries": [
{
"version": "0.17.5",
"tag": "@visactor/vtable_v0.17.5",
"date": "Wed, 03 Jan 2024 12:50:32 GMT",
"comments": {
"none": [
{
"comment": "feat: support edit header title #819\n\n"
},
{
"comment": "fix: setRecords process scrollTop update scenegraph #831\n\n"
},
{
"comment": "refactor: list table bottom row can not use bottomFrozenStyle #836\n\n"
},
{
"comment": "feat: add api getCellHeaderTreeNodes for pivotTable #839\n\n"
},
{
"comment": "refactor: add onVChartEvent for BaseTable #843\n\n"
},
{
"comment": "fix: add group clip in body"
}
]
}
},
{
"version": "0.17.4",
"tag": "@visactor/vtable_v0.17.4",
Expand Down
24 changes: 23 additions & 1 deletion packages/vtable/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
# Change Log - @visactor/vtable

This log was last generated on Tue, 02 Jan 2024 09:23:54 GMT and should not be manually modified.
This log was last generated on Wed, 03 Jan 2024 12:50:32 GMT and should not be manually modified.

## 0.17.5
Wed, 03 Jan 2024 12:50:32 GMT

### Updates

- feat: support edit header title #819


- fix: setRecords process scrollTop update scenegraph #831


- refactor: list table bottom row can not use bottomFrozenStyle #836


- feat: add api getCellHeaderTreeNodes for pivotTable #839


- refactor: add onVChartEvent for BaseTable #843


- fix: add group clip in body

## 0.17.4
Tue, 02 Jan 2024 09:23:54 GMT
Expand Down
26 changes: 26 additions & 0 deletions packages/vtable/examples/editor/custom-date-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ export function createTable() {
title: 'email',
width: 'auto',
sort: true,
headerEditor: 'input',
editor: 'input'
},
{
Expand Down Expand Up @@ -341,11 +342,36 @@ export function createTable() {
}),
autoWrapText: true,
limitMaxAutoWidth: 600,
menu: {
contextMenuItems: ['向下插入数据', '向下插入空行', '向右插入空列', '修改值', '删除该行']
},
dragHeaderMode: 'all',
heightMode: 'autoHeight'
};
const tableInstance = new VTable.ListTable(option);
tableInstance.on('initialized', args => {
console.log('initialized');
});
tableInstance.on('change_cell_value', arg => {
console.log(arg);
});
window.tableInstance = tableInstance;
tableInstance.on('dropdown_menu_click', args => {
console.log('dropdown_menu_click', args);
if (args.menuKey === '向下插入数据') {
const recordIndex = tableInstance.getRecordShowIndexByCell(args.col, args.row);
tableInstance.addRecords(generatePersons(1), recordIndex + 1);
} else if (args.menuKey === '向下插入空行') {
const recordIndex = tableInstance.getRecordShowIndexByCell(args.col, args.row);
tableInstance.addRecord({}, recordIndex + 1);
} else if (args.menuKey === '向右插入空列') {
columns.splice(args.col + 1, 0, { field: Date.now().toString(), headerEditor: 'input', editor: 'input' });
tableInstance.updateColumns(columns);
} else if (args.menuKey === '删除该行') {
const recordIndex = tableInstance.getRecordShowIndexByCell(args.col, args.row);
tableInstance.deleteRecords([recordIndex]);
} else if (args.menuKey === '修改值') {
tableInstance.startEditCell(args.col, args.row);
}
});
}
6 changes: 6 additions & 0 deletions packages/vtable/examples/list/list-chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -606,4 +606,10 @@ export function createTable() {

const tableInstance = new VTable.ListTable(option);
window.tableInstance = tableInstance;
tableInstance.onVChartEvent('click', args => {
console.log('onVChartEvent click', args);
});
tableInstance.onVChartEvent('mouseover', args => {
console.log('onVChartEvent mouseover', args);
});
}
Loading