Skip to content

Commit

Permalink
Merge branch 'ruilisi:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
cybermerlin authored Aug 14, 2024
2 parents c8cf4b4 + 3debb19 commit 190269f
Show file tree
Hide file tree
Showing 227 changed files with 39,625 additions and 10,888 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
"airbnb",
"plugin:prettier/recommended",
"plugin:jest/recommended",
"plugin:storybook/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
Expand Down
13 changes: 13 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# These are supported funding model platforms

# github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: RuilisiTech
# open_collective: # Replace with a single Open Collective username
# ko_fi: # Replace with a single Ko-fi username
# tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
# liberapay: # Replace with a single Liberapay username
# issuehunt: # Replace with a single IssueHunt username
# otechie: # Replace with a single Otechie username
# lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
# custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: CI
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "yarn"
- run: yarn install --frozen-lockfile
- run: yarn tsc
- run: yarn lint
- run: yarn test
23 changes: 0 additions & 23 deletions .github/workflows/node.js.yml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release

on:
release:
types: [published]

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
cache: "yarn"
- run: yarn install --frozen-lockfile
- run: yarn tsc
- run: yarn lint
- run: yarn test
- run: yarn build
- run: cd packages/core && npm pack
- run: cd packages/react && npm pack
- run: cd packages/formula-parser && npm pack
- uses: actions/upload-artifact@v4
with:
name: packages
path: |
packages/core/fortune-sheet-core-*.tgz
packages/react/fortune-sheet-react-*.tgz
packages/formula-parser/fortune-sheet-formula-parser-*.tgz
- run: cd packages/core && npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: cd packages/react && npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: cd packages/formula-parser && npm publish || true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
12 changes: 11 additions & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,20 @@ module.exports = {
"../stories/**/*.stories.mdx",
"../stories/**/*.stories.@(js|jsx|ts|tsx)",
],

addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
],
framework: "@storybook/react",

framework: {
name: "@storybook/react-webpack5",
options: {}
},

docs: {
autodocs: "tag"
}
};

40 changes: 31 additions & 9 deletions README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@

我们的目标是让`FortuneSheet`越来越强大,同时易于维护。

## 交流
* [Discord](https://discord.gg/vHGwMB77w5) 英文社群
* [QQ](https://jq.qq.com/?_wv=1027&k=iHaSN47J) 中文社群
* [Xiemala](https://xiemala.com/s/ctJmUn)

## 在线样例

项目的在线Demo:[fortune-sheet-demo](https://ruilisi.github.io/fortune-sheet-demo/)
Expand Down Expand Up @@ -63,7 +68,7 @@
- ✅ 增加测试代码.
- 更多基础功能:
- ✅ 下拉填充
- 字体
- 字体
- ✅ 格式刷
- ✅ 评论
- ✅ 插入图片
Expand All @@ -74,13 +79,13 @@
- ✅ 排序
- ✅ 筛选
- ✅ 事件钩子
- 条件格式
- 条件格式
- ✅ 拖拽
- ✅ 查找和替换
- 定位
- 数据验证
- 数据验证
- ✅ 冻结
- 隐藏、冻结,文本分列
- 隐藏、冻结,文本分列
- 更多高级功能:
- 数据透视表
- 图表
Expand All @@ -94,13 +99,30 @@
## 快速开始 (react)

### 安装库

<details open>
<summary>使用 npm</summary>

```shell
yarn add @fortune-sheet/react
npm install @fortune-sheet/react
```
或使用 npm:
</details>

<details>
<summary>使用 pnpm</summary>

```shell
npm install @fortune-sheet/react
pnpm install @fortune-sheet/react
```
</details>

<details>
<summary>使用 yarn</summary>

```shell
yarn add @fortune-sheet/react
```
</details>

### 创建一个HTML容器
```html
Expand Down Expand Up @@ -150,7 +172,7 @@ op对后端数据修改和同步在线协同数据非常有用。

通过 `node index.js` 运行后端服务器,然后访问 [Collabration example](https://ruilisi.github.io/fortune-sheet-demo/?path=/story/collabration--example) 即可体验。(可通过 http://localhost:8081/init 初始化数据)

详细的 `Op` 文档, 请参考 [fortune-sheet-doc](https://ruilisi.github.io/fortune-sheet-docs/zh/guide/op.html)
详细的 `Op` 文档, 请参考 [fortune-sheet-doc](./docs/zh/guide/op.md)

## 迁移Luckysheet数据
FortuneSheet的总体数据结构与Luckysheet相同,只有几处命名的区别:
Expand All @@ -161,7 +183,7 @@ FortuneSheet的总体数据结构与Luckysheet相同,只有几处命名的区
## 贡献
期望的工作流程为: Fork -> Patch -> Push -> Pull Request

请确保仔细阅读 [贡献指南](https://ruilisi.github.io/fortune-sheet-docs/zh/guide/contribute.html)
请确保仔细阅读 [贡献指南](./docs/zh/guide/contribute.md)


## 开发
Expand Down
40 changes: 31 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ This project is originated from [Luckysheet](https://github.com/mengshukeji/Luck

We aim to make FortuneSheet powerful yet easy to maintain.

## Communication
* [Discord](https://discord.gg/vHGwMB77w5) English community
* [QQ](https://jq.qq.com/?_wv=1027&k=iHaSN47J) Chinese community
* [Xiemala](https://xiemala.com/s/ctJmUn)

## Live demo

Take a look at the live demo at [fortune-sheet-demo](https://ruilisi.github.io/fortune-sheet-demo/)
Expand Down Expand Up @@ -67,7 +72,7 @@ Before stable release of 1.0, input data structure and APIs may change during de
- ✅ Add tests.
- More basic features:
- ✅ fill handle
- fonts
- fonts
- ✅ format painter
- ✅ comments
- ✅ insert images
Expand All @@ -78,13 +83,13 @@ Before stable release of 1.0, input data structure and APIs may change during de
- ✅ sort
- ✅ filter
- ✅ hooks
- conditional formatting
- conditional formatting
- ✅ drag and drop
- ✅ find and replace
- location
- data verification
- data verification
- ✅ freeze
- hide, and split text
- hide, and split text
- More advanced features:
- pivot tables
- charts
Expand All @@ -97,13 +102,30 @@ See detailed documentation at [fortune-sheet-doc](https://ruilisi.github.io/fort
## Get started (react)

### Download and install the library

<details open>
<summary>Using npm</summary>

```shell
yarn add @fortune-sheet/react
npm install @fortune-sheet/react
```
or using npm:
</details>

<details>
<summary>Using pnpm</summary>

```shell
npm install @fortune-sheet/react
pnpm install @fortune-sheet/react
```
</details>

<details>
<summary>Using yarn</summary>

```shell
yarn add @fortune-sheet/react
```
</details>

### Create an HTML placeholder
```html
Expand Down Expand Up @@ -153,7 +175,7 @@ A working example with `Express` (backend server) and `MongoDB` (data persistenc

Run it with `node index.js` and visit [Collabration example](https://ruilisi.github.io/fortune-sheet-demo/?path=/story/collabration--example) (initialize data by visiting http://localhost:8081/init)

For detailed doc about `Op`, refer to [fortune-sheet-doc](https://ruilisi.github.io/fortune-sheet-docs/guide/op.html)
For detailed doc about `Op`, refer to [fortune-sheet-doc](./docs/guide/op.md)

## Migrating data from Luckysheet
The overall data structure of FortuneSheet is the same as Luckysheet, with some naming differences:
Expand All @@ -164,7 +186,7 @@ The overall data structure of FortuneSheet is the same as Luckysheet, with some
## Contributing
Expected workflow is: Fork -> Patch -> Push -> Pull Request

Please make sure to read the [Contributing Guide](https://ruilisi.github.io/fortune-sheet-docs/guide/contribute.html) before making a pull request.
Please make sure to read the [Contributing Guide](./docs/guide/contribute.md) before making a pull request.


## Development
Expand Down
17 changes: 17 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"chrome": 100,
"safari": 15,
"firefox": 91
}
}
],
"@babel/preset-flow",
"@babel/preset-typescript",
"@babel/preset-react"
]
}
Loading

0 comments on commit 190269f

Please sign in to comment.