Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into feat/viewbox
Browse files Browse the repository at this point in the history
  • Loading branch information
Rui-Sun committed Apr 3, 2024
2 parents fed9406 + 8751379 commit 851fef6
Show file tree
Hide file tree
Showing 467 changed files with 58,290 additions and 9,728 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ jobs:
langs: 'en,zh'
tag_name: ${{github.event.release.tag_name}}
file_name: release.md

- name: Build packages
env:
NODE_OPTIONS: "--max_old_space_size=4096"
run: node common/scripts/install-run-rush.js build --only tag:package

- name: Push branch
run: |
git add .
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ jobs:
- name: Build
env:
NODE_OPTIONS: "--max_old_space_size=4096"
run: node common/scripts/install-run-rush.js build --only tag:package
run: node common/scripts/install-run-rush.js build -t @visactor/vtable
- name: Test
run: node common/scripts/install-run-rush.js test --only tag:package
run: node common/scripts/install-run-rush.js test -t @visactor/vtable
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ module.exports = {
"arrowParens": "avoid",
"proseWrap": "preserve",
"htmlWhitespaceSensitivity": "css",
"endOfLine": "lf"
"endOfLine": "auto"
};
83 changes: 45 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,52 +79,51 @@ yarn add @visactor/vtable
// this demo you can run on codesanbox https://codesandbox.io/s/vtable-simple-demo-g8q738
import * as VTable from '@visactor/vtable';

const columns =[
{
"field": "Order ID",
"caption": "Order ID",
},
{
"field": "Customer ID",
"caption": "Customer ID",
},
{
"field": "Product Name",
"caption": "Product Name",
},
{
"field": "Sales",
"caption": "Sales",
},
{
"field": "Profit",
"caption": "Profit",
}
const columns = [
{
field: 'Order ID',
caption: 'Order ID'
},
{
field: 'Customer ID',
caption: 'Customer ID'
},
{
field: 'Product Name',
caption: 'Product Name'
},
{
field: 'Sales',
caption: 'Sales'
},
{
field: 'Profit',
caption: 'Profit'
}
];

const option = {
container: document.getElementById(CONTAINER_ID),
records:[
records: [
{
"Order ID": "CA-2018-156720",
"Customer ID": "JM-15580",
"Product Name": "Bagged Rubber Bands",
"Sales": "3.024",
"Profit": "-0.605"
'Order ID': 'CA-2018-156720',
'Customer ID': 'JM-15580',
'Product Name': 'Bagged Rubber Bands',
Sales: '3.024',
Profit: '-0.605'
},
{
"Order ID": "CA-2018-115427",
"Customer ID": "EB-13975",
"Product Name": "GBC Binding covers",
"Sales": "20.72",
"Profit": "6.475"
},
'Order ID': 'CA-2018-115427',
'Customer ID': 'EB-13975',
'Product Name': 'GBC Binding covers',
Sales: '20.72',
Profit: '6.475'
}
// ...
],
columns,
columns
};
const tableInstance = new VTable.ListTable(option);

```

##
Expand Down Expand Up @@ -153,7 +152,10 @@ $ cd packages/vtable
$ rushx demo
# start site development server, execute in file path: ./
$ rush docs
# after execut git commit, please run the following command to update the change log. Please execute in file path: ./
$ rush change-all
```

# 📖 Documents

After installation & clone & update, run docs to preview VTable documents locally.
Expand All @@ -162,16 +164,21 @@ After installation & clone & update, run docs to preview VTable documents locall
# start vtable document server. execute in file path: ./
$ rush docs
```

## 🔗 Related Links

- [Official website](https://visactor.io/vtable)
- [Usage Trend](https://npm-compare.com/@visactor/vtable)

# 💫 Ecosystem

| Project | Description |
| ----------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| [AI-generated Components](https://visactor.io/ai-vtable) | AI-generated table component. |
| Project | Description |
| ---------------------------------------------------------------------------- | ------------------------- |
| [React-VTable](https://www.visactor.io/vtable/guide/Developer_Ecology/react) | VTable in React component |

# ⭐️ Star History

[![Star History Chart](https://api.star-history.com/svg?repos=visactor/vtable&type=Date)](https://star-history.com/#visactor/vtable&Date)

# 🤝 Contribution

Expand Down
89 changes: 49 additions & 40 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ VTable,不只是一款高性能的多维数据分析表格,更是一个在

VTable 是 VisActor 可视化体系中的表格组件库,基于可视化渲染引擎 [VRender](https://github.com/VisActor/VRender) 进行封装。
核心能力如下:

1. 性能极致:支持百万级数据快速运算与渲染
2. 多维分析:多维数据自动分析与呈现
3. 表现力强:提供灵活强大的图形能力,无缝融合[VChart](https://github.com/VisActor/VChart)
Expand All @@ -57,7 +58,7 @@ VTable 是 VisActor 可视化体系中的表格组件库,基于可视化渲染
1. packages/vtable:表格组件代码
2. docs: 教程文档

# Usage使用
# Usage 使用

## 安装

Expand All @@ -77,57 +78,57 @@ yarn add @visactor/vtable
// this demo you can run on codesanbox https://codesandbox.io/s/vtable-simple-demo-g8q738
import * as VTable from '@visactor/vtable';

const columns =[
{
"field": "Order ID",
"caption": "Order ID",
},
{
"field": "Customer ID",
"caption": "Customer ID",
},
{
"field": "Product Name",
"caption": "Product Name",
},
{
"field": "Sales",
"caption": "Sales",
},
{
"field": "Profit",
"caption": "Profit",
}
const columns = [
{
field: 'Order ID',
caption: 'Order ID'
},
{
field: 'Customer ID',
caption: 'Customer ID'
},
{
field: 'Product Name',
caption: 'Product Name'
},
{
field: 'Sales',
caption: 'Sales'
},
{
field: 'Profit',
caption: 'Profit'
}
];

const option = {
container: document.getElementById(CONTAINER_ID),
records:[
records: [
{
"Order ID": "CA-2018-156720",
"Customer ID": "JM-15580",
"Product Name": "Bagged Rubber Bands",
"Sales": "3.024",
"Profit": "-0.605"
'Order ID': 'CA-2018-156720',
'Customer ID': 'JM-15580',
'Product Name': 'Bagged Rubber Bands',
Sales: '3.024',
Profit: '-0.605'
},
{
"Order ID": "CA-2018-115427",
"Customer ID": "EB-13975",
"Product Name": "GBC Binding covers",
"Sales": "20.72",
"Profit": "6.475"
},
'Order ID': 'CA-2018-115427',
'Customer ID': 'EB-13975',
'Product Name': 'GBC Binding covers',
Sales: '20.72',
Profit: '6.475'
}
// ...
],
columns,
columns
};
const tableInstance = new VTable.ListTable(option);

```

##

[更多 demo 和详细教程](https://visactor.io/vtable)

# ⌨️ 开发

首先,全局安装 [@microsoft/rush](https://rushjs.io/pages/intro/get_started/)
Expand All @@ -150,7 +151,10 @@ $ cd packages/vtable
$ rushx demo
# start site development server, execute in file path: ./
$ rush docs
# after execut git commit, please run the following command to update the change log. Please execute in file path: ./
$ rush change-all
```

# 📖 Documents

安装并且更新依赖后,可以执行 docs 命令,开启 VTable 的本地文档预览
Expand All @@ -159,16 +163,21 @@ $ rush docs
# start vtable document server. execute in file path: ./
$ rush docs
```

# 🔗 相关链接

- [官网](https://visactor.io/vtable)
- [使用趋势](https://npm-compare.com/@visactor/vtable)

# 💫 生态
# 💫 Ecosystem

| Project | Description |
| ---------------------------------------------------------------------------- | ----------------- |
| [React-VTable](https://www.visactor.io/vtable/guide/Developer_Ecology/react) | VTable React 组件 |

# ⭐️ Star History

| 项目 | 介绍 |
| ------------------------------------------------ | ------------------------------------------------------------------------- |
| [智能生成组件](https://visactor.io/ai-vtable) | 基于 AI 的智能表格生成组件 | |
[![Star History Chart](https://api.star-history.com/svg?repos=visactor/vtable&type=Date)](https://star-history.com/#visactor/vtable&Date)

# 🤝 参与贡献

Expand Down
30 changes: 14 additions & 16 deletions common/autoinstallers/lint/commit-lint.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
const path = require("path");
const fs = require("fs");
const child_process = require("child_process");
const path = require('path');
const fs = require('fs');
const child_process = require('child_process');

const gitPath = path.resolve(__dirname, "../../../.git");
const configPath = path.resolve(__dirname, "./commitlint.config.js");
const commitlintBinPath = path.resolve(__dirname, "./node_modules/.bin/commitlint");
const gitPath = path.resolve(__dirname, '../../../.git');
const configPath = path.resolve(__dirname, './commitlint.config.js');
const commitlintBinPath = path.resolve(__dirname, './node_modules/.bin/commitlint');

if (!fs.existsSync(gitPath)) {
console.error("no valid .git path");
console.error('no valid .git path');
process.exit(1);
}

const result = child_process.spawnSync(
"sh",
["-c", `${commitlintBinPath} --config ${configPath} --cwd ${path.dirname(gitPath)} --edit`],
{
stdio: "inherit",
},
);

if (result.status !== 0) {
try {
child_process.execSync(`${commitlintBinPath} --config ${configPath} --cwd ${path.dirname(gitPath)} --edit`, {
stdio: 'inherit',
windowsHide: true
});
} catch (e) {
process.exit(1);
}

29 changes: 11 additions & 18 deletions common/autoinstallers/lint/prettier.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import minimist, { ParsedArgs } from "minimist";
import { spawnSync } from "child_process";
import { RushConfiguration } from "@microsoft/rush-lib";
import minimist, { ParsedArgs } from 'minimist';
import { execSync, spawnSync } from 'child_process';
import { RushConfiguration } from '@microsoft/rush-lib';

interface PrettierScriptArgv extends ParsedArgs {
dir?: string;
Expand All @@ -12,12 +12,12 @@ function run() {
const rushConfiguration = RushConfiguration.loadFromDefaultLocation({ startingFolder: cwd });

const argv: PrettierScriptArgv = minimist(process.argv.slice(2));
const configFilePath = rushConfiguration.rushJsonFolder + "/.prettierrc.js";
const ignoreFilePath = rushConfiguration.rushJsonFolder + "/.prettierignore";
const configFilePath = rushConfiguration.rushJsonFolder + '/.prettierrc.js';
const ignoreFilePath = rushConfiguration.rushJsonFolder + '/.prettierignore';

let ext = "{ts,tsx,less}";
let ext = '{ts,tsx,less}';
if (argv.ext) {
const length = argv.ext.split(",").length;
const length = argv.ext.split(',').length;
ext = length === 1 ? `${argv.ext}` : `{${argv.ext}}`;
}

Expand All @@ -28,17 +28,10 @@ function run() {

console.log(patterns);

spawnSync(
"sh",
[
"-c",
`prettier --config ${configFilePath} --ignore-path ${ignoreFilePath} --write ${patterns}`,
],
{
shell: false,
stdio: [0, 1, 2],
},
);
execSync(`prettier --config ${configFilePath} --ignore-path ${ignoreFilePath} --write ${patterns}`, {
stdio: [0, 1, 2],
windowsHide: true
});
}

run();
Loading

0 comments on commit 851fef6

Please sign in to comment.