ronds-metadata 1.0.37 → 1.0.38

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.
@@ -1,87 +1,87 @@
1
- export type IMetaType = 'object' | 'ref' | 'bool' | 'number' | 'text' | 'enum' | 'array' | string;
2
-
3
- export type IMetaData = {
4
- /**
5
- * 类名称/属性名称
6
- */
7
- id: string;
8
- /**
9
- * 类型
10
- */
11
- type: IMetaType;
12
- /**
13
- * 属性
14
- */
15
- properties?: IMetaProperties[];
16
-
17
- /**
18
- * 引用id
19
- */
20
- refId?: string;
21
- /**
22
- * 静态的变量
23
- */
24
- fields?: IMetaFileds[];
25
- };
26
-
27
- export type IMetaProperties = {
28
- /**
29
- * 类规则名称
30
- */
31
- id: string;
32
-
33
- /**
34
- * 类型
35
- */
36
- type: IMetaType;
37
-
38
- /**
39
- * 引用id
40
- */
41
- refId?: string;
42
- /**
43
- * 静态的变量
44
- */
45
- fields?: IMetaFileds[];
46
- /**
47
- * 枚举值
48
- */
49
- enum?: { value: string }[];
50
- /**
51
- * 数组类型
52
- */
53
- items?: { type: IMetaType; refId?: string };
54
- };
55
-
56
- export type IMetaFileds = {
57
- /**
58
- * 规则名称
59
- */
60
- id: string;
61
-
62
- /**
63
- * 类型
64
- */
65
- type: IMetaType;
66
-
67
- /**
68
- * 引用id
69
- */
70
- refId?: string;
71
-
72
- /**
73
- * 规则值
74
- */
75
- value: any;
76
- };
77
-
78
- export interface IAPI {
79
- // 获取元数据列表
80
- GetMetadataList(keyWords?: string[]): Promise<{ id: string; name: string; schema: string }[]>;
81
- // 通过元数据Id获取元数据详情
82
- GetMetadataDetailById(metadataId: string): Promise<any>;
83
- // 新增元数据
84
- SaveMetadata(data: any, metadataTag: string): Promise<any>;
85
- // 获取元数据的值
86
- GetMetadataObjList(data: any): Promise<any[]>;
87
- }
1
+ export type IMetaType = 'object' | 'ref' | 'bool' | 'number' | 'text' | 'enum' | 'array' | string;
2
+
3
+ export type IMetaData = {
4
+ /**
5
+ * 类名称/属性名称
6
+ */
7
+ id: string;
8
+ /**
9
+ * 类型
10
+ */
11
+ type: IMetaType;
12
+ /**
13
+ * 属性
14
+ */
15
+ properties?: IMetaProperties[];
16
+
17
+ /**
18
+ * 引用id
19
+ */
20
+ refId?: string;
21
+ /**
22
+ * 静态的变量
23
+ */
24
+ fields?: IMetaFileds[];
25
+ };
26
+
27
+ export type IMetaProperties = {
28
+ /**
29
+ * 类规则名称
30
+ */
31
+ id: string;
32
+
33
+ /**
34
+ * 类型
35
+ */
36
+ type: IMetaType;
37
+
38
+ /**
39
+ * 引用id
40
+ */
41
+ refId?: string;
42
+ /**
43
+ * 静态的变量
44
+ */
45
+ fields?: IMetaFileds[];
46
+ /**
47
+ * 枚举值
48
+ */
49
+ enum?: { value: string }[];
50
+ /**
51
+ * 数组类型
52
+ */
53
+ items?: { type: IMetaType; refId?: string };
54
+ };
55
+
56
+ export type IMetaFileds = {
57
+ /**
58
+ * 规则名称
59
+ */
60
+ id: string;
61
+
62
+ /**
63
+ * 类型
64
+ */
65
+ type: IMetaType;
66
+
67
+ /**
68
+ * 引用id
69
+ */
70
+ refId?: string;
71
+
72
+ /**
73
+ * 规则值
74
+ */
75
+ value: any;
76
+ };
77
+
78
+ export interface IAPI {
79
+ // 获取元数据列表
80
+ GetMetadataList(keyWords?: string[]): Promise<{ id: string; name: string; schema: string }[]>;
81
+ // 通过元数据Id获取元数据详情
82
+ GetMetadataDetailById(metadataId: string): Promise<any>;
83
+ // 新增元数据
84
+ SaveMetadata(data: any, metadataTag: string): Promise<any>;
85
+ // 获取元数据的值
86
+ GetMetadataObjList(data: any): Promise<any[]>;
87
+ }
package/es/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { default as MetadataEdit } from './comps/MetadataEdit';
2
+ export { default as MetadataEditV2 } from './comps/MetadataEditV2';
2
3
  export { default as MetadataForm } from './comps/MetadataForm';
3
4
  export { default as JsonView } from './comps/JsonView';
4
5
  export { default as JsonEdit } from './comps/JsonEdit';
package/es/index.js CHANGED
@@ -1,11 +1,12 @@
1
1
  /*
2
2
  * @Author:wangxian
3
3
  * @Date: 2021-09-18 14:15:04
4
- * @LastEditTime: 2021-12-14 09:08:16
5
- * @LastEditors: wangxain
4
+ * @LastEditTime: 2022-03-03 17:12:29
5
+ * @LastEditors: Please set LastEditors
6
6
  * @FilePath: \ronds.metadata\src\index.ts
7
7
  */
8
8
  export { default as MetadataEdit } from './comps/MetadataEdit';
9
+ export { default as MetadataEditV2 } from './comps/MetadataEditV2';
9
10
  export { default as MetadataForm } from './comps/MetadataForm';
10
11
  export { default as JsonView } from './comps/JsonView';
11
12
  export { default as JsonEdit } from './comps/JsonEdit';
package/package.json CHANGED
@@ -1,75 +1,74 @@
1
1
  {
2
- "public": true,
3
- "name": "ronds-metadata",
4
- "version": "1.0.37",
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
- },
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"
2
+ "public": true,
3
+ "name": "ronds-metadata",
4
+ "version": "1.0.38",
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
+ },
16
+ "main": "es",
17
+ "module": "es",
18
+ "types": "es/index.d.ts",
19
+ "gitHooks": {
20
+ "pre-commit": "lint-staged"
21
+ },
22
+ "lint-staged": {
23
+ "*.{js,jsx,less,md,json}": [
24
+ "prettier --write"
25
+ ],
26
+ "*.ts?(x)": [
27
+ "prettier --parser=typescript --write"
28
+ ]
29
+ },
30
+ "files": [
31
+ "/es"
26
32
  ],
27
- "*.ts?(x)": [
28
- "prettier --parser=typescript --write"
29
- ]
30
- },
31
- "files": [
32
- "/es"
33
- ],
34
- "dependencies": {
35
- "@babel/helper-create-regexp-features-plugin": "^7.12.13",
36
- "@babel/runtime": "^7.11.2",
37
- "@popperjs/core": "^2.4.4",
38
- "axios": "^0.21.4",
39
- "babel-plugin-import": "^1.13.3",
40
- "babel-plugin-transform-remove-console": "^6.9.4",
41
- "bl": "^5.0.0",
42
- "codemirror": "^5.63.0",
43
- "lodash": "^4.17.21",
44
- "qs": "^6.10.1",
45
- "react": "^16.12.0",
46
- "react-color": "^2.19.3"
47
- },
48
- "peerDependencies": {
49
- "antd": ">=4.1.5",
50
- "react": ">=16.12.0",
51
- "react-dom": ">=16.12.0",
52
- "react-router": ">=5.0.0",
53
- "styled-components": ">=4.1.1"
54
- },
55
- "devDependencies": {
56
- "@types/react": "^16.9.48",
57
- "@types/react-dom": "^16.9.8",
58
- "@types/react-router": "^5.1.8",
59
- "@types/react-window": "^1.8.2",
60
- "@types/styled-components": "^5.1.2",
61
- "@umijs/test": "^3.0.5",
62
- "antd": "^4.16.6",
63
- "babel-loader": "^8.1.0",
64
- "css-loader": "^4.2.2",
65
- "dumi": "^1.0.16",
66
- "father-build": "^1.17.2",
67
- "gh-pages": "^3.0.0",
68
- "less-loader": "^7.0.0",
69
- "lint-staged": "^10.0.7",
70
- "prettier": "^2.2.1",
71
- "style-loader": "^1.2.1",
72
- "webpack-cli": "^3.3.12",
73
- "yorkie": "^2.0.0"
74
- }
75
- }
33
+ "dependencies": {
34
+ "@babel/helper-create-regexp-features-plugin": "^7.12.13",
35
+ "@babel/runtime": "^7.11.2",
36
+ "@popperjs/core": "^2.4.4",
37
+ "axios": "^0.21.4",
38
+ "babel-plugin-import": "^1.13.3",
39
+ "babel-plugin-transform-remove-console": "^6.9.4",
40
+ "bl": "^5.0.0",
41
+ "codemirror": "^5.63.0",
42
+ "lodash": "^4.17.21",
43
+ "qs": "^6.10.1",
44
+ "react": "^16.12.0",
45
+ "react-color": "^2.19.3"
46
+ },
47
+ "peerDependencies": {
48
+ "antd": ">=4.1.5",
49
+ "react": ">=16.12.0",
50
+ "react-dom": ">=16.12.0",
51
+ "react-router": ">=5.0.0",
52
+ "styled-components": ">=4.1.1"
53
+ },
54
+ "devDependencies": {
55
+ "@types/react": "^16.9.48",
56
+ "@types/react-dom": "^16.9.8",
57
+ "@types/react-router": "^5.1.8",
58
+ "@types/react-window": "^1.8.2",
59
+ "@types/styled-components": "^5.1.2",
60
+ "@umijs/test": "^3.0.5",
61
+ "antd": "^4.16.6",
62
+ "babel-loader": "^8.1.0",
63
+ "css-loader": "^4.2.2",
64
+ "dumi": "^1.0.16",
65
+ "father-build": "^1.17.2",
66
+ "gh-pages": "^3.0.0",
67
+ "less-loader": "^7.0.0",
68
+ "lint-staged": "^10.0.7",
69
+ "prettier": "^2.2.1",
70
+ "style-loader": "^1.2.1",
71
+ "webpack-cli": "^3.3.12",
72
+ "yorkie": "^2.0.0"
73
+ }
74
+ }