Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into 2210-bug-vtable-pi…
Browse files Browse the repository at this point in the history
…votChart-selectenable
  • Loading branch information
fangsmile committed Nov 11, 2024
2 parents 3375faf + 8d2ebcb commit 06fd8e9
Show file tree
Hide file tree
Showing 59 changed files with 1,046 additions and 131 deletions.
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":"1.10.3","mainProject":"@visactor/vtable","nextBump":"patch"}]
[{"definitionName":"lockStepVersion","policyName":"vtableMain","version":"1.10.4","mainProject":"@visactor/vtable","nextBump":"patch"}]
17 changes: 17 additions & 0 deletions docs/assets/api/en/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,20 @@ If it is a table in tree mode, an array will be returned, such as [1,2], the 3rd
**ListTable proprietary**
```

## getTaskShowIndexByRecordIndex(Function)

Get the row number that should be displayed in the body according to the index of the data. Both the parameter and the return value start from 0. If it is a table in tree mode, the parameter supports arrays, such as [1,2]

**ListTable Proprietary**

```
/**
* Get the row number of the body that should be displayed according to the index of the data. Both the parameter and the return value start from 0.
* @param {number} index The record index.
*/
getBodyRowIndexByRecordIndex: (index: number | number[]) => number;
```

## getTableIndexByField(Function)

Get the index row number or column number displayed in the table according to the field of the data source (Related to transposition, the non-transposition obtains the row number, and the transposed table obtains the column number).
Expand Down Expand Up @@ -681,6 +695,7 @@ Note: The logic distinguishes between flat and tree hierarchies.
*/
getLayoutRowTreeCount() : number
```

## getLayoutColumnTree(Function)

**PivotTable Exclusive**
Expand Down Expand Up @@ -748,6 +763,7 @@ Update sort status, The vtable itself does not perform sorting logic. PivotTable
order: SortOrder;
}[])
```

The table will not be redrawn automatically after updating, and the interface renderWithRecreateCells needs to be configured to refresh

## setDropDownMenuHighlight(Function)
Expand Down Expand Up @@ -816,6 +832,7 @@ updateFilterRules(filterRules: FilterRules) => void
use case: For the PivotChart scene, after clicking the legend item, update the filter rules to update the chart

## getFilteredRecords(Function)

Get filtered data

**Exclusive to PivotTable**
Expand Down
20 changes: 18 additions & 2 deletions docs/assets/api/zh/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,20 @@ setRecords(records: Array<any>)
**ListTable 专有**
```

## getTaskShowIndexByRecordIndex(Function)

根据数据的索引获取应该显示在 body 的第几行, 参数和返回值的碎银均从 0 开始。如果是树形模式的表格,参数支持数组,如[1,2]

**ListTable 专有**

```
/**
* 根据数据的索引获取应该显示在body的第几行 参数和返回值的碎银均从0开始
* @param {number} index The record index.
*/
getBodyRowIndexByRecordIndex: (index: number | number[]) => number;
```

## getTableIndexByField(Function)

根据数据源的 field 获取显示到表格中的 index 行号或者列号(与转置相关,非转置获取的是行号,转置表获取的是列号)。
Expand Down Expand Up @@ -734,7 +748,7 @@ enum HierarchyState {

## updatePivotSortState(Function)

更新排序状态,vtable本身不执行排序逻辑。PivotTable 专有。
更新排序状态,vtable 本身不执行排序逻辑。PivotTable 专有。

```
/**
Expand All @@ -746,7 +760,8 @@ enum HierarchyState {
order: SortOrder;
}[])
```
更新后不会主动重绘表格,需要配置接口renderWithRecreateCells刷新

更新后不会主动重绘表格,需要配置接口 renderWithRecreateCells 刷新

## setDropDownMenuHighlight(Function)

Expand Down Expand Up @@ -814,6 +829,7 @@ updateFilterRules(filterRules: FilterRules) => void
use case: 对于透视图的场景上,点击图例项后 更新过滤规则 来更新图表

## getFilteredRecords(Function)

获取过滤后的数据

**PivotTable 专有**
Expand Down
27 changes: 27 additions & 0 deletions docs/assets/changelog/en/release.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
# v1.10.4

2024-11-07


**🆕 New feature**

- **@visactor/vtable**: gantt dependency line support tree node [#2701](https://github.com/VisActor/VTable/issues/2701)
- **@visactor/vtable**: when drag on header can select cells continuous [#2751](https://github.com/VisActor/VTable/issues/2751)

**🐛 Bug fix**

- **@visactor/vtable**: when markline date less then minDate should not show [#2689](https://github.com/VisActor/VTable/issues/2689)
- **@visactor/vtable**: pivot table header icon display incorrect [#2735](https://github.com/VisActor/VTable/issues/2735)
- **@visactor/vtable**: parse axes config error when user set axes [#2749](https://github.com/VisActor/VTable/issues/2749)
- **@visactor/vtable**: cellType set funciton occor error [#2754](https://github.com/VisActor/VTable/issues/2754)
- **@visactor/vtable**: when pivot cell type set chart not data cell render error [#2758](https://github.com/VisActor/VTable/issues/2758)
- **@visactor/vtable**: legend problems [#2764](https://github.com/VisActor/VTable/issues/2764) [#2755](https://github.com/VisActor/VTable/issues/2755)
- **@visactor/vtable**: create task shedule date error [#2771](https://github.com/VisActor/VTable/issues/2771)
- **@visactor/vtable**: fix cellLocation in pivot-table [#2694](https://github.com/VisActor/VTable/issues/2694)
- **@visactor/vtable**: fix menu scale pos problem [#2734](https://github.com/VisActor/VTable/issues/2734)
- **@visactor/vtable**: fix tree frozen row problem [#2619](https://github.com/VisActor/VTable/issues/2619)



[more detail about v1.10.4](https://github.com/VisActor/VTable/releases/tag/v1.10.4)

# v1.10.3

2024-11-01
Expand Down
27 changes: 27 additions & 0 deletions docs/assets/changelog/zh/release.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
# v1.10.4

2024-11-07


**🆕 新增功能**

- **@visactor/vtable**: gantt dependency line support tree node [#2701](https://github.com/VisActor/VTable/issues/2701)
- **@visactor/vtable**: when drag on header can select cells continuous [#2751](https://github.com/VisActor/VTable/issues/2751)

**🐛 功能修复**

- **@visactor/vtable**: when markline date less then minDate should not show [#2689](https://github.com/VisActor/VTable/issues/2689)
- **@visactor/vtable**: pivot table header icon display incorrect [#2735](https://github.com/VisActor/VTable/issues/2735)
- **@visactor/vtable**: parse axes config error when user set axes [#2749](https://github.com/VisActor/VTable/issues/2749)
- **@visactor/vtable**: cellType set funciton occor error [#2754](https://github.com/VisActor/VTable/issues/2754)
- **@visactor/vtable**: when pivot cell type set chart not data cell render error [#2758](https://github.com/VisActor/VTable/issues/2758)
- **@visactor/vtable**: legend problems [#2764](https://github.com/VisActor/VTable/issues/2764) [#2755](https://github.com/VisActor/VTable/issues/2755)
- **@visactor/vtable**: create task shedule date error [#2771](https://github.com/VisActor/VTable/issues/2771)
- **@visactor/vtable**: fix cellLocation in pivot-table [#2694](https://github.com/VisActor/VTable/issues/2694)
- **@visactor/vtable**: fix menu scale pos problem [#2734](https://github.com/VisActor/VTable/issues/2734)
- **@visactor/vtable**: fix tree frozen row problem [#2619](https://github.com/VisActor/VTable/issues/2619)



[更多详情请查看 v1.10.4](https://github.com/VisActor/VTable/releases/tag/v1.10.4)

# v1.10.3

2024-11-01
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/guide/en/Contribution_Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ git checkout -b docs/add-funnel-demo

- Now we can make changes to the code on the branch.
- Let's say we've added some code and committed it to the repository.
- `git commit -a -m "docs: add custom funnel demo and related docs"`. The commit message for VisActor follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification:
- `git commit -a -m "docs: add custom funnel demo and related docs" / "fix: solve which problem #xxxx_issue_id" `. The commit message for VisActor follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification:

- `<type>[optional scope]: <description>`.
- Common `type` include docs (documentation, log changes), feat (new features), fix (bug fixes), refactor (code refactoring), etc. Please choose according to the actual situation.
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/guide/zh/Contribution_Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ git checkout -b docs/add-funnel-demo

- 现在我们可以在分支上更改代码了
- 假设我们已经添加了一些代码,提交到代码库
- git commit -a -m "docs: add custom funnel demo and related docs" 。VisActor 的 commit 提交信息遵循 [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) 规范
- `git commit -a -m "docs: add custom funnel demo and related docs" / "fix: solve which problem #xxxx_issue_id"`。VisActor 的 commit 提交信息遵循 [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) 规范

- `<type>[optional scope]: <description>`
- 其中常用 `type`包括 docs(文档、日志修改)、feat(新功能)、fix(问题修复)、refactor(代码重构)等,请根据实际情况选择。
Expand Down
4 changes: 4 additions & 0 deletions docs/assets/option/en/column/chart-column-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ Corresponding to the injected chart library component name
**Chart type exclusive configuration options**

Set the spec of the chart, or set it to a function that returns a different spec. The data displayed in the chart is provided by records.

##${prefix} noDataRenderNothing(boolean) = false

Do not render the chart when there is no data. Defaults to false
4 changes: 4 additions & 0 deletions docs/assets/option/en/common/option-secondary.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ Separately set the header not to respond to mouse hover interaction.

Cell selection interaction configuration, specific configuration items as follows:

##${prefix} highlightMode ('cross' | 'column' | 'row' | 'cell') = 'cell'

Highlight range mode: cross, whole column, whole row or single cell. Default is `cell`

##${prefix} headerSelectMode ('inline' | 'cell' | 'body') = 'inline'

When clicking on a header cell, whether the entire row or column needs to be selected along with the body.
Expand Down
67 changes: 66 additions & 1 deletion docs/assets/option/en/common/row-series-number.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,69 @@ Body cell style, please refer to: [style](../option/ListTable-columns-text#style

${prefix} disableColumnResize(boolean)

Whether to disable row serial number width adjustment.The default is false.
Whether to disable row serial number width adjustment.The default is false.

${prefix} headerIcon(string|Object|Array)

Table header cell icon configuration. The configurable types are:

```
string | ColumnIconOption | (string | ColumnIconOption)[];
```

For detailed configuration of ColumnIconOption, please refer to [Definition](/zh/option.html#ListTable-columns-text.icon.ColumnIconOptionDefinition:)

${prefix} icon(string|Object|Array|Funciton)

Body cell icon configuration.

```
icon?:
| string
| ColumnIconOption
| (string | ColumnIconOption)[]
| ((args: CellInfo) => string | ColumnIconOption | (string | ColumnIconOption)[]);
```

#${prefix}ColumnIconOption

```
type ColumnIconOption = ImageIcon | SvgIcon;
```

#${prefix}ImageIcon(Object)
type is set to 'image'. The image address needs to be set in src
{{ use: image-icon( prefix = '##' + ${prefix}) }}

#${prefix}SvgIcon(Object)
type is set to 'svg'. You need to configure the svg address or the complete svg file string in svg
{{ use: svg-icon( prefix = '##' + ${prefix}) }}

${prefix} headerCustomLayout(Function)
The header cell custom layout element definition, this custom form is suitable for cells with complex content layout.

```
(args: CustomRenderFunctionArg) => ICustomLayoutObj;
```

{{ use: common-CustomRenderFunctionArg() }}

{{ use: custom-layout(
prefix = '#'+${prefix},
) }}

${prefix} customLayout(Function)

The body cell custom layout element definition is suitable for cells with complex content layout.

Defined as the following function:

```
(args: CustomRenderFunctionArg) => ICustomLayoutObj;
```

{{ use: common-CustomRenderFunctionArg() }}

{{ use: custom-layout(
prefix = '#'+${prefix},
) }}
4 changes: 4 additions & 0 deletions docs/assets/option/en/indicator/chart-indicator-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ Set the spec of the chart, or set it to a function that returns a different spec
{{ use: base-indicator-type(
prefix = '##'+${prefix}
) }}

##${prefix} noDataRenderNothing(boolean) = false

Do not render the chart when there is no data. Defaults to false
6 changes: 5 additions & 1 deletion docs/assets/option/zh/column/chart-column-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@

**chart 类型专属配置项**

设置图表的 spec,或者设置成函数返回不同的spec。其中显示在图表的数据是对应在 records 中提供。
设置图表的 spec,或者设置成函数返回不同的 spec。其中显示在图表的数据是对应在 records 中提供。

##${prefix} noDataRenderNothing(boolean) = false

没有数据时不渲染图表 默认为 false
4 changes: 4 additions & 0 deletions docs/assets/option/zh/common/option-secondary.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@ hover 交互响应模式:十字交叉、整列、整行或者单个单元格

选择单元格交互配置,具体配置项如下:

##${prefix} highlightMode ('cross' | 'column' | 'row' | 'cell') = 'cell'

高亮范围模式:十字交叉 整列 整行 或者单个单元格。默认`cell`

##${prefix} headerSelectMode ('inline' | 'cell' | 'body') = 'inline'

点击表头单元格时连带 body 是否需要整行或整列选中。
Expand Down
67 changes: 66 additions & 1 deletion docs/assets/option/zh/common/row-series-number.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,69 @@ body 单元格样式,可参考:[style](../option/ListTable-columns-text#styl

${prefix} disableColumnResize(boolean)

是否禁止列宽调整,默认为 false
是否禁止列宽调整,默认为 false

${prefix} headerIcon(string|Object|Array)

表头单元格图标配置。可配置类型有:

```
string | ColumnIconOption | (string | ColumnIconOption)[];
```

ColumnIconOption 具体配置可参考[定义](/zh/option.html#ListTable-columns-text.icon.ColumnIconOption定义:)

${prefix} icon(string|Object|Array|Funciton)

body 单元格图标配置。

```
icon?:
| string
| ColumnIconOption
| (string | ColumnIconOption)[]
| ((args: CellInfo) => string | ColumnIconOption | (string | ColumnIconOption)[]);
```

#${prefix}ColumnIconOption

```
type ColumnIconOption = ImageIcon | SvgIcon;
```

#${prefix}ImageIcon(Object)
type 配置成 'image'。需要配置图片地址在 src 中
{{ use: image-icon( prefix = '##' + ${prefix}) }}

#${prefix}SvgIcon(Object)
type 配置成 'svg'。需要配置 svg 地址或者 svg 完整文件字符串在 svg 中
{{ use: svg-icon( prefix = '##' + ${prefix}) }}

${prefix} headerCustomLayout(Function)
表头单元格自定义布局元素定义,该自定义形式适合内容复杂布局的单元格。

```
(args: CustomRenderFunctionArg) => ICustomLayoutObj;
```

{{ use: common-CustomRenderFunctionArg() }}

{{ use: custom-layout(
prefix = '#'+${prefix},
) }}

${prefix} customLayout(Function)

body 单元格自定义布局元素定义,该自定义形式适合内容复杂布局的单元格。

定义为如下函数:

```
(args: CustomRenderFunctionArg) => ICustomLayoutObj;
```

{{ use: common-CustomRenderFunctionArg() }}

{{ use: custom-layout(
prefix = '#'+${prefix},
) }}
6 changes: 5 additions & 1 deletion docs/assets/option/zh/indicator/chart-indicator-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@

**chart 类型专属配置项**

设置图表的 spec,或者设置成函数返回不同的spec。其中显示在图表的数据由 records 提供。
设置图表的 spec,或者设置成函数返回不同的 spec。其中显示在图表的数据由 records 提供。

{{ use: base-indicator-type(
prefix = '##'+${prefix}
) }}

##${prefix} noDataRenderNothing(boolean) = false

没有数据时不渲染图表 默认为 false
2 changes: 1 addition & 1 deletion packages/openinula-vtable/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/openinula-vtable",
"version": "1.10.3",
"version": "1.10.4",
"description": "The openinula version of VTable",
"keywords": [
"openinula",
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": "1.10.3",
"version": "1.10.4",
"description": "The react version of VTable",
"keywords": [
"react",
Expand Down
Loading

0 comments on commit 06fd8e9

Please sign in to comment.