ronds-metadata 1.2.20 → 1.2.22

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,98 +1,98 @@
1
- /*
2
- * @Author: wangxian
3
- * @Date: 2021-09-18 14:15:04
4
- * @LastEditTime: 2023-02-09 18:37:15
5
- */
6
- export type IMetaType = 'object' | 'ref' | 'bool' | 'number' | 'text' | 'enum' | 'array' | string;
7
-
8
- export type IMetaData = {
9
- /**
10
- * 类名称/属性名称
11
- */
12
- id: string;
13
- /**
14
- * 类型
15
- */
16
- type: IMetaType;
17
- /**
18
- * 属性
19
- */
20
- properties?: IMetaProperties[];
21
-
22
- /**
23
- * 引用id
24
- */
25
- refId?: string;
26
- /**
27
- * 静态的变量
28
- */
29
- fields?: IMetaFileds[];
30
- /**
31
- * 内部类
32
- */
33
- types?: IMetaData[];
34
- };
35
-
36
- export type IMetaProperties = {
37
- /**
38
- * 类规则名称
39
- */
40
- id: string;
41
-
42
- /**
43
- * 类型
44
- */
45
- type: IMetaType;
46
-
47
- /**
48
- * 引用id
49
- */
50
- refId?: string;
51
- /**
52
- * 静态的变量
53
- */
54
- fields?: IMetaFileds[];
55
- /**
56
- * 枚举值
57
- */
58
- enum?: { value: string }[];
59
- /**
60
- * 数组类型
61
- */
62
- items?: { type: IMetaType; refId?: string };
63
- };
64
-
65
- export type IMetaFileds = {
66
- /**
67
- * 规则名称
68
- */
69
- id: string;
70
-
71
- /**
72
- * 类型
73
- */
74
- type: IMetaType;
75
-
76
- /**
77
- * 引用id
78
- */
79
- refId?: string;
80
-
81
- /**
82
- * 规则值
83
- */
84
- value: any;
85
- };
86
-
87
- export interface IAPI {
88
- // 获取元数据列表
89
- GetMetadataList(keyWords?: string[]): Promise<{ id: string; name: string; schema: string }[]>;
90
- // 通过元数据Id获取元数据详情
91
- GetMetadataDetailById(metadataId: string): Promise<any>;
92
- // 新增元数据
93
- SaveMetadata(data: any, metadataTag: string): Promise<any>;
94
- // 获取元数据的值
95
- GetMetadataObjList(data: any): Promise<any[]>;
96
- /** 通过扩展规则获取枚举类型的值 */
97
- GetEnumDataByUrl(url: string, method: 'get' | 'post', body: any): Promise<any>;
98
- }
1
+ /*
2
+ * @Author: wangxian
3
+ * @Date: 2021-09-18 14:15:04
4
+ * @LastEditTime: 2023-02-09 18:37:15
5
+ */
6
+ export type IMetaType = 'object' | 'ref' | 'bool' | 'number' | 'text' | 'enum' | 'array' | string;
7
+
8
+ export type IMetaData = {
9
+ /**
10
+ * 类名称/属性名称
11
+ */
12
+ id: string;
13
+ /**
14
+ * 类型
15
+ */
16
+ type: IMetaType;
17
+ /**
18
+ * 属性
19
+ */
20
+ properties?: IMetaProperties[];
21
+
22
+ /**
23
+ * 引用id
24
+ */
25
+ refId?: string;
26
+ /**
27
+ * 静态的变量
28
+ */
29
+ fields?: IMetaFileds[];
30
+ /**
31
+ * 内部类
32
+ */
33
+ types?: IMetaData[];
34
+ };
35
+
36
+ export type IMetaProperties = {
37
+ /**
38
+ * 类规则名称
39
+ */
40
+ id: string;
41
+
42
+ /**
43
+ * 类型
44
+ */
45
+ type: IMetaType;
46
+
47
+ /**
48
+ * 引用id
49
+ */
50
+ refId?: string;
51
+ /**
52
+ * 静态的变量
53
+ */
54
+ fields?: IMetaFileds[];
55
+ /**
56
+ * 枚举值
57
+ */
58
+ enum?: { value: string }[];
59
+ /**
60
+ * 数组类型
61
+ */
62
+ items?: { type: IMetaType; refId?: string };
63
+ };
64
+
65
+ export type IMetaFileds = {
66
+ /**
67
+ * 规则名称
68
+ */
69
+ id: string;
70
+
71
+ /**
72
+ * 类型
73
+ */
74
+ type: IMetaType;
75
+
76
+ /**
77
+ * 引用id
78
+ */
79
+ refId?: string;
80
+
81
+ /**
82
+ * 规则值
83
+ */
84
+ value: any;
85
+ };
86
+
87
+ export interface IAPI {
88
+ // 获取元数据列表
89
+ GetMetadataList(keyWords?: string[]): Promise<{ id: string; name: string; schema: string }[]>;
90
+ // 通过元数据Id获取元数据详情
91
+ GetMetadataDetailById(metadataId: string): Promise<any>;
92
+ // 新增元数据
93
+ SaveMetadata(data: any, metadataTag: string): Promise<any>;
94
+ // 获取元数据的值
95
+ GetMetadataObjList(data: any): Promise<any[]>;
96
+ /** 通过扩展规则获取枚举类型的值 */
97
+ GetEnumDataByUrl(url: string, method: 'get' | 'post', body: any): Promise<any>;
98
+ }
package/es/theme.less CHANGED
@@ -1,77 +1,77 @@
1
- .ronds-metadata-dark {
2
- --ronds-metadata-color-border-1: #314162;
3
- --ronds-metadata-color-border-2: #0d9af3;
4
- --ronds-metadata-color-bg-2: #0d1f40;
5
- --ronds-metadata-color-bg-3: #0d1f40;
6
- --ronds-metadata-color-bg-4: #1c3771;
7
- --ronds-metadata-color-text-1: #ffffff;
8
- --ronds-metadata-color-text-2: #ffffff;
9
- --ronds-metadata-color-text-3: #ffffff;
10
-
11
- ::-webkit-scrollbar {
12
- width: 6px;
13
- height: 6px;
14
- overflow: auto;
15
- }
16
- ::-webkit-scrollbar-corner {
17
- background-color: transparent;
18
- color: transparent;
19
- }
20
-
21
- ::-webkit-scrollbar-thumb {
22
- box-shadow: inset 0 0 5px var(--scrollbar-bg-color);
23
- background: var(--scrollbar-color);
24
- min-height: 25px;
25
- min-width: 25px;
26
- border-radius: 3px;
27
-
28
- &:hover {
29
- border-radius: 2px;
30
- // box-shadow: inset 0 0 5px var(--scrollbar-color-hover);
31
- background: var(--scrollbar-color-hover);
32
- }
33
-
34
- &:active {
35
- // box-shadow: inset 0 0 5px var(--scrollbar-bg-color);
36
- background: var(--scrollbar-color-hover);
37
- }
38
- }
39
- }
40
-
41
- .ronds-metadata-normal {
42
- --ronds-metadata-color-border-1: #d9d9d9;
43
- --ronds-metadata-color-border-2: #165dff;
44
- --ronds-metadata-color-bg-2: rgba(229, 238, 255, 0.85);
45
- --ronds-metadata-color-bg-3: #f6f5f6;
46
- --ronds-metadata-color-bg-4: #ffffff;
47
- --ronds-metadata-color-text-1: #1d2129;
48
- --ronds-metadata-color-text-2: #24292f;
49
- --ronds-metadata-color-text-3: #f2f3f5;
50
-
51
- ::-webkit-scrollbar {
52
- width: 6px;
53
- height: 6px;
54
- overflow: auto;
55
- }
56
-
57
- ::-webkit-scrollbar-thumb {
58
- background-color: var(--scrollbar-color);
59
- min-height: 25px;
60
- min-width: 25px;
61
- border-radius: 3px;
62
-
63
- &:hover {
64
- background-color: #a8a8a8;
65
- }
66
-
67
- &:active {
68
- background-color: #787878;
69
- }
70
-
71
- /* border: 1px solid #e0e0e0; */
72
- }
73
-
74
- ::-webkit-scrollbar-track {
75
- background-color: #f7f7f7;
76
- }
77
- }
1
+ .ronds-metadata-dark {
2
+ --ronds-metadata-color-border-1: #314162;
3
+ --ronds-metadata-color-border-2: #0d9af3;
4
+ --ronds-metadata-color-bg-2: #0d1f40;
5
+ --ronds-metadata-color-bg-3: #0d1f40;
6
+ --ronds-metadata-color-bg-4: #1c3771;
7
+ --ronds-metadata-color-text-1: #ffffff;
8
+ --ronds-metadata-color-text-2: #ffffff;
9
+ --ronds-metadata-color-text-3: #ffffff;
10
+
11
+ ::-webkit-scrollbar {
12
+ width: 6px;
13
+ height: 6px;
14
+ overflow: auto;
15
+ }
16
+ ::-webkit-scrollbar-corner {
17
+ background-color: transparent;
18
+ color: transparent;
19
+ }
20
+
21
+ ::-webkit-scrollbar-thumb {
22
+ box-shadow: inset 0 0 5px var(--scrollbar-bg-color);
23
+ background: var(--scrollbar-color);
24
+ min-height: 25px;
25
+ min-width: 25px;
26
+ border-radius: 3px;
27
+
28
+ &:hover {
29
+ border-radius: 2px;
30
+ // box-shadow: inset 0 0 5px var(--scrollbar-color-hover);
31
+ background: var(--scrollbar-color-hover);
32
+ }
33
+
34
+ &:active {
35
+ // box-shadow: inset 0 0 5px var(--scrollbar-bg-color);
36
+ background: var(--scrollbar-color-hover);
37
+ }
38
+ }
39
+ }
40
+
41
+ .ronds-metadata-normal {
42
+ --ronds-metadata-color-border-1: #d9d9d9;
43
+ --ronds-metadata-color-border-2: #165dff;
44
+ --ronds-metadata-color-bg-2: rgba(229, 238, 255, 0.85);
45
+ --ronds-metadata-color-bg-3: #f6f5f6;
46
+ --ronds-metadata-color-bg-4: #ffffff;
47
+ --ronds-metadata-color-text-1: #1d2129;
48
+ --ronds-metadata-color-text-2: #24292f;
49
+ --ronds-metadata-color-text-3: #f2f3f5;
50
+
51
+ ::-webkit-scrollbar {
52
+ width: 6px;
53
+ height: 6px;
54
+ overflow: auto;
55
+ }
56
+
57
+ ::-webkit-scrollbar-thumb {
58
+ background-color: var(--scrollbar-color);
59
+ min-height: 25px;
60
+ min-width: 25px;
61
+ border-radius: 3px;
62
+
63
+ &:hover {
64
+ background-color: #a8a8a8;
65
+ }
66
+
67
+ &:active {
68
+ background-color: #787878;
69
+ }
70
+
71
+ /* border: 1px solid #e0e0e0; */
72
+ }
73
+
74
+ ::-webkit-scrollbar-track {
75
+ background-color: #f7f7f7;
76
+ }
77
+ }
package/package.json CHANGED
@@ -1,94 +1,94 @@
1
- {
2
- "public": true,
3
- "name": "ronds-metadata",
4
- "version": "1.2.20",
5
- "scripts": {
6
- "start": "dumi dev",
7
- "docs:build": "dumi build",
8
- "docs:deploy": "gh-pages -d docs-dist",
9
- "build": "father-build",
10
- "deploy": "npm run docs:build && npm run docs:deploy",
11
- "release": "npm run build && npm publish",
12
- "prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
13
- "test": "umi-test",
14
- "test:coverage": "umi-test --coverage",
15
- "prepublishOnly": "npm run build"
16
- },
17
- "main": "es",
18
- "module": "es",
19
- "types": "es/index.d.ts",
20
- "gitHooks": {
21
- "pre-commit": "lint-staged"
22
- },
23
- "lint-staged": {
24
- "*.{js,jsx,less,md,json}": [
25
- "prettier --write"
26
- ],
27
- "*.ts?(x)": [
28
- "prettier --parser=typescript --write"
29
- ]
30
- },
31
- "files": [
32
- "/es"
33
- ],
34
- "dependencies": {
35
- "@antv/x6": "^1.32.2",
36
- "@antv/x6-react-shape": "^1.6.0",
37
- "@babel/helper-create-regexp-features-plugin": "^7.12.13",
38
- "@babel/runtime": "^7.11.2",
39
- "@popperjs/core": "^2.4.4",
40
- "@types/markdown-navbar": "^1.4.0",
41
- "ahooks": "^3.4.0",
42
- "axios": "^0.21.4",
43
- "babel-plugin-import": "^1.13.3",
44
- "babel-plugin-transform-remove-console": "^6.9.4",
45
- "bl": "^5.0.0",
46
- "codemirror": "^5.63.0",
47
- "codepage": "^1.15.0",
48
- "github-markdown-css": "^5.1.0",
49
- "immer": "^9.0.14",
50
- "lodash": "^4.17.21",
51
- "markdown-navbar": "^1.4.3",
52
- "qs": "^6.10.1",
53
- "react": "^17.0.2",
54
- "react-dnd": "^11.1.3",
55
- "react-dnd-html5-backend": "^11.1.3",
56
- "react-jexcel": "^1.0.2",
57
- "react-markdown": "^8.0.3",
58
- "react-markdown-editor-lite": "^1.3.2",
59
- "react-popper": "^2.2.3",
60
- "react-syntax-highlighter": "^15.5.0",
61
- "rehype-raw": "^6.1.1",
62
- "remark-gfm": "^3.0.1",
63
- "rxjs": "^7.5.4",
64
- "xlsx": "^0.18.5"
65
- },
66
- "peerDependencies": {
67
- "antd": ">=4.1.5",
68
- "react": ">=16.14.0",
69
- "react-dom": ">=16.14.0",
70
- "react-router": ">=5.0.0",
71
- "styled-components": ">=4.1.1"
72
- },
73
- "devDependencies": {
74
- "@types/react": "^17.0.2",
75
- "@types/react-dom": "^17.0.2",
76
- "@types/react-router": "^5.1.8",
77
- "@types/react-window": "^1.8.2",
78
- "@types/styled-components": "^5.1.2",
79
- "@umijs/test": "^3.0.5",
80
- "antd": "^4.18.1",
81
- "babel-loader": "^8.1.0",
82
- "copy-to-clipboard": "^3.3.1",
83
- "css-loader": "^4.2.2",
84
- "dumi": "^1.0.16",
85
- "father-build": "^1.17.2",
86
- "gh-pages": "^3.0.0",
87
- "less-loader": "^7.0.0",
88
- "lint-staged": "^10.0.7",
89
- "prettier": "^2.2.1",
90
- "style-loader": "^1.2.1",
91
- "webpack-cli": "^3.3.12",
92
- "yorkie": "^2.0.0"
93
- }
1
+ {
2
+ "public": true,
3
+ "name": "ronds-metadata",
4
+ "version": "1.2.22",
5
+ "scripts": {
6
+ "start": "dumi dev",
7
+ "docs:build": "dumi build",
8
+ "docs:deploy": "gh-pages -d docs-dist",
9
+ "build": "father-build",
10
+ "deploy": "npm run docs:build && npm run docs:deploy",
11
+ "release": "npm run build && npm publish",
12
+ "prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"",
13
+ "test": "umi-test",
14
+ "test:coverage": "umi-test --coverage",
15
+ "prepublishOnly": "npm run build"
16
+ },
17
+ "main": "es",
18
+ "module": "es",
19
+ "types": "es/index.d.ts",
20
+ "gitHooks": {
21
+ "pre-commit": "lint-staged"
22
+ },
23
+ "lint-staged": {
24
+ "*.{js,jsx,less,md,json}": [
25
+ "prettier --write"
26
+ ],
27
+ "*.ts?(x)": [
28
+ "prettier --parser=typescript --write"
29
+ ]
30
+ },
31
+ "files": [
32
+ "/es"
33
+ ],
34
+ "dependencies": {
35
+ "@antv/x6": "^1.32.2",
36
+ "@antv/x6-react-shape": "^1.6.0",
37
+ "@babel/helper-create-regexp-features-plugin": "^7.12.13",
38
+ "@babel/runtime": "^7.11.2",
39
+ "@popperjs/core": "^2.4.4",
40
+ "@types/markdown-navbar": "^1.4.0",
41
+ "ahooks": "^3.4.0",
42
+ "axios": "^0.21.4",
43
+ "babel-plugin-import": "^1.13.3",
44
+ "babel-plugin-transform-remove-console": "^6.9.4",
45
+ "bl": "^5.0.0",
46
+ "codemirror": "^5.63.0",
47
+ "codepage": "^1.15.0",
48
+ "github-markdown-css": "^5.1.0",
49
+ "immer": "^9.0.14",
50
+ "lodash": "^4.17.21",
51
+ "markdown-navbar": "^1.4.3",
52
+ "qs": "^6.10.1",
53
+ "react": "^17.0.2",
54
+ "react-dnd": "^11.1.3",
55
+ "react-dnd-html5-backend": "^11.1.3",
56
+ "react-jexcel": "^1.0.2",
57
+ "react-markdown": "^8.0.3",
58
+ "react-markdown-editor-lite": "^1.3.2",
59
+ "react-popper": "^2.2.3",
60
+ "react-syntax-highlighter": "^15.5.0",
61
+ "rehype-raw": "^6.1.1",
62
+ "remark-gfm": "^3.0.1",
63
+ "rxjs": "^7.5.4",
64
+ "xlsx": "^0.18.5"
65
+ },
66
+ "peerDependencies": {
67
+ "antd": ">=4.1.5",
68
+ "react": ">=16.14.0",
69
+ "react-dom": ">=16.14.0",
70
+ "react-router": ">=5.0.0",
71
+ "styled-components": ">=4.1.1"
72
+ },
73
+ "devDependencies": {
74
+ "@types/react": "^17.0.2",
75
+ "@types/react-dom": "^17.0.2",
76
+ "@types/react-router": "^5.1.8",
77
+ "@types/react-window": "^1.8.2",
78
+ "@types/styled-components": "^5.1.2",
79
+ "@umijs/test": "^3.0.5",
80
+ "antd": "^4.18.1",
81
+ "babel-loader": "^8.1.0",
82
+ "copy-to-clipboard": "^3.3.1",
83
+ "css-loader": "^4.2.2",
84
+ "dumi": "^1.0.16",
85
+ "father-build": "^1.17.2",
86
+ "gh-pages": "^3.0.0",
87
+ "less-loader": "^7.0.0",
88
+ "lint-staged": "^10.0.7",
89
+ "prettier": "^2.2.1",
90
+ "style-loader": "^1.2.1",
91
+ "webpack-cli": "^3.3.12",
92
+ "yorkie": "^2.0.0"
93
+ }
94
94
  }