@teamias/rex-design 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -65
- package/dist/components/tiptap-editor/modules/plugin-variable-node/index.js +4 -4
- package/dist/components/tiptap-editor/tiptap-editor.js +2 -2
- package/dist/context/request-fields-container/request-fields-container-context-provider.js +3 -3
- package/dist/locales/en-US.json +60 -60
- package/dist/locales/zh-CN.json +60 -60
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
# @teamias/rex-design
|
|
2
|
-
|
|
3
|
-
[](https://npmjs.org/package/@teamias/rex-design)
|
|
4
|
-
[](https://npmjs.org/package/@teamias/rex-design)
|
|
5
|
-
|
|
6
|
-
用 dumi 开发的 react 库
|
|
7
|
-
|
|
8
|
-
## Usage
|
|
9
|
-
|
|
10
|
-
### 安装组件库
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
# 安装组件库
|
|
14
|
-
$ pnpm add @teamias/rex-design
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
### 代码引用
|
|
19
|
-
|
|
20
|
-
```ts
|
|
21
|
-
import { ActionButtons } from '@teamias/rex-design';
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Options
|
|
25
|
-
|
|
26
|
-
TODO
|
|
27
|
-
|
|
28
|
-
## Development
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
# 安装依赖项
|
|
32
|
-
$ pnpm install
|
|
33
|
-
|
|
34
|
-
# 通过文档演示开发库
|
|
35
|
-
$ pnpm start
|
|
36
|
-
|
|
37
|
-
# 构建库源代码
|
|
38
|
-
$ pnpm run build
|
|
39
|
-
|
|
40
|
-
# 在监视模式下构建库源代码
|
|
41
|
-
$ pnpm run build:watch
|
|
42
|
-
|
|
43
|
-
# 生成文档
|
|
44
|
-
$ pnpm run docs:build
|
|
45
|
-
|
|
46
|
-
# 本地预览生产构建。
|
|
47
|
-
$ pnpm run docs:preview
|
|
48
|
-
|
|
49
|
-
# 检查项目的潜在问题
|
|
50
|
-
$ pnpm run doctor
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## Publish
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
# 首次发包前,进行用户添加
|
|
57
|
-
$ pnpm adduser
|
|
58
|
-
|
|
59
|
-
# 发布新版本
|
|
60
|
-
$ pnpm run deploy
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## LICENSE
|
|
64
|
-
|
|
65
|
-
MIT
|
|
1
|
+
# @teamias/rex-design
|
|
2
|
+
|
|
3
|
+
[](https://npmjs.org/package/@teamias/rex-design)
|
|
4
|
+
[](https://npmjs.org/package/@teamias/rex-design)
|
|
5
|
+
|
|
6
|
+
用 dumi 开发的 react 库
|
|
7
|
+
|
|
8
|
+
## Usage
|
|
9
|
+
|
|
10
|
+
### 安装组件库
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# 安装组件库
|
|
14
|
+
$ pnpm add @teamias/rex-design
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### 代码引用
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
import { ActionButtons } from '@teamias/rex-design';
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Options
|
|
25
|
+
|
|
26
|
+
TODO
|
|
27
|
+
|
|
28
|
+
## Development
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# 安装依赖项
|
|
32
|
+
$ pnpm install
|
|
33
|
+
|
|
34
|
+
# 通过文档演示开发库
|
|
35
|
+
$ pnpm start
|
|
36
|
+
|
|
37
|
+
# 构建库源代码
|
|
38
|
+
$ pnpm run build
|
|
39
|
+
|
|
40
|
+
# 在监视模式下构建库源代码
|
|
41
|
+
$ pnpm run build:watch
|
|
42
|
+
|
|
43
|
+
# 生成文档
|
|
44
|
+
$ pnpm run docs:build
|
|
45
|
+
|
|
46
|
+
# 本地预览生产构建。
|
|
47
|
+
$ pnpm run docs:preview
|
|
48
|
+
|
|
49
|
+
# 检查项目的潜在问题
|
|
50
|
+
$ pnpm run doctor
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Publish
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# 首次发包前,进行用户添加
|
|
57
|
+
$ pnpm adduser
|
|
58
|
+
|
|
59
|
+
# 发布新版本
|
|
60
|
+
$ pnpm run deploy
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## LICENSE
|
|
64
|
+
|
|
65
|
+
MIT
|
|
@@ -56,10 +56,10 @@ export var PluginVariableBNode = Node.create({
|
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
|
|
59
|
-
/**
|
|
60
|
-
* 提取 tiptap 编辑器内容中的所有 <react-variable-node selected="label"></react-variable-node> 占位符
|
|
61
|
-
* @param text 编辑器内容字符串
|
|
62
|
-
* @param source 匹配对象
|
|
59
|
+
/**
|
|
60
|
+
* 提取 tiptap 编辑器内容中的所有 <react-variable-node selected="label"></react-variable-node> 占位符
|
|
61
|
+
* @param text 编辑器内容字符串
|
|
62
|
+
* @param source 匹配对象
|
|
63
63
|
*/
|
|
64
64
|
export var matchTiptapVariables = function matchTiptapVariables(text) {
|
|
65
65
|
var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
@@ -26,8 +26,8 @@ import { Link } from "./modules/plugin-link-node";
|
|
|
26
26
|
import { PluginVariableBNode } from "./modules/plugin-variable-node";
|
|
27
27
|
import { Box } from "./styles";
|
|
28
28
|
|
|
29
|
-
/**
|
|
30
|
-
* https://v2.tiptap.dev/docs/editor/extensions/nodes/task-item
|
|
29
|
+
/**
|
|
30
|
+
* https://v2.tiptap.dev/docs/editor/extensions/nodes/task-item
|
|
31
31
|
*/
|
|
32
32
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
33
33
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
@@ -9,9 +9,9 @@ import { useRexProConfigProvider } from "../rex-pro-config-provider/use-rex-pro-
|
|
|
9
9
|
import { RequestFieldsContainerContext } from "./request-fields-container-context";
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
12
|
-
/**
|
|
13
|
-
* 用于收集所有包含(requestFields)组件加载完成
|
|
14
|
-
* TODO: 需要组件(requestFields),去实现这部分逻辑
|
|
12
|
+
/**
|
|
13
|
+
* 用于收集所有包含(requestFields)组件加载完成
|
|
14
|
+
* TODO: 需要组件(requestFields),去实现这部分逻辑
|
|
15
15
|
*/
|
|
16
16
|
export var RequestFieldsContainer = function RequestFieldsContainer(_ref) {
|
|
17
17
|
var children = _ref.children,
|
package/dist/locales/en-US.json
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
{
|
|
2
|
-
"rex": {
|
|
3
|
-
"components": {
|
|
4
|
-
"tiptap-editor": {
|
|
5
|
-
"undo": "Undo",
|
|
6
|
-
"redo": "Redo",
|
|
7
|
-
"divider": "Divider",
|
|
8
|
-
"font-color": "Font Color",
|
|
9
|
-
"background-color": "Background Color",
|
|
10
|
-
"bold": "Bold",
|
|
11
|
-
"italic": "Italic",
|
|
12
|
-
"strike": "Strike",
|
|
13
|
-
"superscript": "Superscript",
|
|
14
|
-
"subscript": "Subscript",
|
|
15
|
-
"align-left": "Align Left",
|
|
16
|
-
"align-center": "Align Center",
|
|
17
|
-
"align-right": "Align Right",
|
|
18
|
-
"set-link": "Set Link",
|
|
19
|
-
"unset-link": "Unset Link",
|
|
20
|
-
"upload-image": "Upload Image",
|
|
21
|
-
"enter-link-url": "Please enter link URL:",
|
|
22
|
-
"bullet-list": "Ordered list",
|
|
23
|
-
"ordered-list": "Unordered list"
|
|
24
|
-
},
|
|
25
|
-
"base-list-table": {
|
|
26
|
-
"expand-more-data": "There are still {count} pieces of data not displayed",
|
|
27
|
-
"expand-more-data-hide": "Close"
|
|
28
|
-
},
|
|
29
|
-
"base-table": {
|
|
30
|
-
"column-serial-number-title": "Serial number"
|
|
31
|
-
},
|
|
32
|
-
"base-form": {
|
|
33
|
-
"placeholder": {
|
|
34
|
-
"input": "Please enter",
|
|
35
|
-
"select": "Please select",
|
|
36
|
-
"date-range": {
|
|
37
|
-
"start": "Start time",
|
|
38
|
-
"end": "End time"
|
|
39
|
-
},
|
|
40
|
-
"input-number-range": {
|
|
41
|
-
"min": "Minimum value",
|
|
42
|
-
"max": "Maximum value"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"value-type-match-error": "Not matched"
|
|
46
|
-
},
|
|
47
|
-
"action-buttons": {
|
|
48
|
-
"item-label-fallback": "Unconfigured button label",
|
|
49
|
-
"group-label-fallback": "Unconfigured group label"
|
|
50
|
-
},
|
|
51
|
-
"icons": {
|
|
52
|
-
"loader-error": "Icon loading failed",
|
|
53
|
-
"not-found": "Icon not found",
|
|
54
|
-
"type-not-matched": "Icon type not supported"
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"context": {},
|
|
58
|
-
"hooks": {}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"rex": {
|
|
3
|
+
"components": {
|
|
4
|
+
"tiptap-editor": {
|
|
5
|
+
"undo": "Undo",
|
|
6
|
+
"redo": "Redo",
|
|
7
|
+
"divider": "Divider",
|
|
8
|
+
"font-color": "Font Color",
|
|
9
|
+
"background-color": "Background Color",
|
|
10
|
+
"bold": "Bold",
|
|
11
|
+
"italic": "Italic",
|
|
12
|
+
"strike": "Strike",
|
|
13
|
+
"superscript": "Superscript",
|
|
14
|
+
"subscript": "Subscript",
|
|
15
|
+
"align-left": "Align Left",
|
|
16
|
+
"align-center": "Align Center",
|
|
17
|
+
"align-right": "Align Right",
|
|
18
|
+
"set-link": "Set Link",
|
|
19
|
+
"unset-link": "Unset Link",
|
|
20
|
+
"upload-image": "Upload Image",
|
|
21
|
+
"enter-link-url": "Please enter link URL:",
|
|
22
|
+
"bullet-list": "Ordered list",
|
|
23
|
+
"ordered-list": "Unordered list"
|
|
24
|
+
},
|
|
25
|
+
"base-list-table": {
|
|
26
|
+
"expand-more-data": "There are still {count} pieces of data not displayed",
|
|
27
|
+
"expand-more-data-hide": "Close"
|
|
28
|
+
},
|
|
29
|
+
"base-table": {
|
|
30
|
+
"column-serial-number-title": "Serial number"
|
|
31
|
+
},
|
|
32
|
+
"base-form": {
|
|
33
|
+
"placeholder": {
|
|
34
|
+
"input": "Please enter",
|
|
35
|
+
"select": "Please select",
|
|
36
|
+
"date-range": {
|
|
37
|
+
"start": "Start time",
|
|
38
|
+
"end": "End time"
|
|
39
|
+
},
|
|
40
|
+
"input-number-range": {
|
|
41
|
+
"min": "Minimum value",
|
|
42
|
+
"max": "Maximum value"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"value-type-match-error": "Not matched"
|
|
46
|
+
},
|
|
47
|
+
"action-buttons": {
|
|
48
|
+
"item-label-fallback": "Unconfigured button label",
|
|
49
|
+
"group-label-fallback": "Unconfigured group label"
|
|
50
|
+
},
|
|
51
|
+
"icons": {
|
|
52
|
+
"loader-error": "Icon loading failed",
|
|
53
|
+
"not-found": "Icon not found",
|
|
54
|
+
"type-not-matched": "Icon type not supported"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"context": {},
|
|
58
|
+
"hooks": {}
|
|
59
|
+
}
|
|
60
|
+
}
|
package/dist/locales/zh-CN.json
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
{
|
|
2
|
-
"rex": {
|
|
3
|
-
"components": {
|
|
4
|
-
"tiptap-editor": {
|
|
5
|
-
"undo": "撤回",
|
|
6
|
-
"redo": "恢复",
|
|
7
|
-
"divider": "分割",
|
|
8
|
-
"font-color": "字体颜色",
|
|
9
|
-
"background-color": "背景颜色",
|
|
10
|
-
"bold": "加粗",
|
|
11
|
-
"italic": "斜体",
|
|
12
|
-
"strike": "划线",
|
|
13
|
-
"superscript": "上标",
|
|
14
|
-
"subscript": "下标",
|
|
15
|
-
"align-left": "左对齐",
|
|
16
|
-
"align-center": "居中",
|
|
17
|
-
"align-right": "右对齐",
|
|
18
|
-
"set-link": "设置链接",
|
|
19
|
-
"unset-link": "取消链接",
|
|
20
|
-
"upload-image": "上传图片",
|
|
21
|
-
"enter-link-url": "请输入链接地址:",
|
|
22
|
-
"bullet-list": "有序列表",
|
|
23
|
-
"ordered-list": "无序列表"
|
|
24
|
-
},
|
|
25
|
-
"base-list-table": {
|
|
26
|
-
"expand-more-data-hide": "收起",
|
|
27
|
-
"expand-more-data": "还有{count}条数据未展示"
|
|
28
|
-
},
|
|
29
|
-
"base-table": {
|
|
30
|
-
"column-serial-number-title": "序号"
|
|
31
|
-
},
|
|
32
|
-
"base-form": {
|
|
33
|
-
"placeholder": {
|
|
34
|
-
"input": "请输入",
|
|
35
|
-
"select": "请选择",
|
|
36
|
-
"date-range": {
|
|
37
|
-
"start": "开始时间",
|
|
38
|
-
"end": "结束时间"
|
|
39
|
-
},
|
|
40
|
-
"input-number-range": {
|
|
41
|
-
"min": "最小值",
|
|
42
|
-
"max": "最大值"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"value-type-match-error": "匹配不到"
|
|
46
|
-
},
|
|
47
|
-
"action-buttons": {
|
|
48
|
-
"item-label-fallback": "未配置按钮标签",
|
|
49
|
-
"group-label-fallback": "未配置分组标签"
|
|
50
|
-
},
|
|
51
|
-
"icons": {
|
|
52
|
-
"loader-error": "图标加载失败",
|
|
53
|
-
"not-found": "图标未找到",
|
|
54
|
-
"type-not-matched": "图标类型不支持"
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"context": {},
|
|
58
|
-
"hooks": {}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"rex": {
|
|
3
|
+
"components": {
|
|
4
|
+
"tiptap-editor": {
|
|
5
|
+
"undo": "撤回",
|
|
6
|
+
"redo": "恢复",
|
|
7
|
+
"divider": "分割",
|
|
8
|
+
"font-color": "字体颜色",
|
|
9
|
+
"background-color": "背景颜色",
|
|
10
|
+
"bold": "加粗",
|
|
11
|
+
"italic": "斜体",
|
|
12
|
+
"strike": "划线",
|
|
13
|
+
"superscript": "上标",
|
|
14
|
+
"subscript": "下标",
|
|
15
|
+
"align-left": "左对齐",
|
|
16
|
+
"align-center": "居中",
|
|
17
|
+
"align-right": "右对齐",
|
|
18
|
+
"set-link": "设置链接",
|
|
19
|
+
"unset-link": "取消链接",
|
|
20
|
+
"upload-image": "上传图片",
|
|
21
|
+
"enter-link-url": "请输入链接地址:",
|
|
22
|
+
"bullet-list": "有序列表",
|
|
23
|
+
"ordered-list": "无序列表"
|
|
24
|
+
},
|
|
25
|
+
"base-list-table": {
|
|
26
|
+
"expand-more-data-hide": "收起",
|
|
27
|
+
"expand-more-data": "还有{count}条数据未展示"
|
|
28
|
+
},
|
|
29
|
+
"base-table": {
|
|
30
|
+
"column-serial-number-title": "序号"
|
|
31
|
+
},
|
|
32
|
+
"base-form": {
|
|
33
|
+
"placeholder": {
|
|
34
|
+
"input": "请输入",
|
|
35
|
+
"select": "请选择",
|
|
36
|
+
"date-range": {
|
|
37
|
+
"start": "开始时间",
|
|
38
|
+
"end": "结束时间"
|
|
39
|
+
},
|
|
40
|
+
"input-number-range": {
|
|
41
|
+
"min": "最小值",
|
|
42
|
+
"max": "最大值"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"value-type-match-error": "匹配不到"
|
|
46
|
+
},
|
|
47
|
+
"action-buttons": {
|
|
48
|
+
"item-label-fallback": "未配置按钮标签",
|
|
49
|
+
"group-label-fallback": "未配置分组标签"
|
|
50
|
+
},
|
|
51
|
+
"icons": {
|
|
52
|
+
"loader-error": "图标加载失败",
|
|
53
|
+
"not-found": "图标未找到",
|
|
54
|
+
"type-not-matched": "图标类型不支持"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"context": {},
|
|
58
|
+
"hooks": {}
|
|
59
|
+
}
|
|
60
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamias/rex-design",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "A react library developed with dumi",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -81,7 +81,8 @@
|
|
|
81
81
|
"@changesets/cli": "^2.29.5",
|
|
82
82
|
"@commitlint/cli": "^17.1.2",
|
|
83
83
|
"@commitlint/config-conventional": "^17.1.0",
|
|
84
|
-
"@teamias/umi-loader-source-plugin": "^0.0.
|
|
84
|
+
"@teamias/umi-loader-source-plugin": "^0.0.11",
|
|
85
|
+
"@teamias/umi-plugin-upload-build": "^0.0.2",
|
|
85
86
|
"@types/lodash": "^4.17.20",
|
|
86
87
|
"@types/react": "^18.0.0",
|
|
87
88
|
"@types/react-dom": "^18.0.0",
|
|
@@ -96,8 +97,7 @@
|
|
|
96
97
|
"prettier-plugin-packagejson": "^2.2.18",
|
|
97
98
|
"react": "^18.0.0",
|
|
98
99
|
"react-dom": "^18.0.0",
|
|
99
|
-
"stylelint": "^14.9.1"
|
|
100
|
-
"umi-plugin-upload-build": "^1.1.0"
|
|
100
|
+
"stylelint": "^14.9.1"
|
|
101
101
|
},
|
|
102
102
|
"peerDependencies": {
|
|
103
103
|
"@ant-design/icons": ">=5.0.0",
|