ronds-metadata 1.2.80 → 1.2.82

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. package/es/comps/DynamicPorts/comps/DragNode.d.ts +1 -1
  2. package/es/comps/DynamicPorts/comps/NodeElement.d.ts +1 -1
  3. package/es/comps/DynamicPorts/comps/contextMenu/NodeContextMenu/index.d.ts +2 -1
  4. package/es/comps/DynamicPorts/index.d.ts +2 -1
  5. package/es/comps/Editable/DataCell/ButtonCell.d.ts +1 -1
  6. package/es/comps/Editable/DataCell/ColorPicker.d.ts +1 -1
  7. package/es/comps/Editable/DataCell/Input.d.ts +1 -1
  8. package/es/comps/Editable/DataCell/Number.d.ts +1 -1
  9. package/es/comps/Editable/DataCell/Select.d.ts +1 -1
  10. package/es/comps/Editable/DataCell/Switch.d.ts +1 -1
  11. package/es/comps/Editable/comps/EditableAction.d.ts +2 -1
  12. package/es/comps/Editable/comps/Texty.d.ts +1 -1
  13. package/es/comps/Editable/index.d.ts +2 -1
  14. package/es/comps/Editable/utils.d.ts +2 -1
  15. package/es/comps/FileView/index.d.ts +2 -1
  16. package/es/comps/FormGenerator/comps/Canvas/Preview.d.ts +6 -0
  17. package/es/comps/FormGenerator/comps/Canvas/Preview.js +58 -0
  18. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Checkbox.d.ts +2 -1
  19. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Color.d.ts +1 -1
  20. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Date.d.ts +1 -1
  21. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Input.d.ts +1 -1
  22. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/List.d.ts +2 -1
  23. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/MutiSelect.d.ts +2 -1
  24. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Number.d.ts +1 -1
  25. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/NumberRange.d.ts +1 -1
  26. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Obj.d.ts +2 -1
  27. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Password.d.ts +1 -1
  28. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Radio.d.ts +2 -1
  29. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Select.d.ts +2 -1
  30. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Switch.d.ts +1 -1
  31. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Table.d.ts +2 -1
  32. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/TextArea.d.ts +1 -1
  33. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Upload.d.ts +1 -1
  34. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/HOC/index.d.ts +2 -1
  35. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/index.d.ts +2 -1
  36. package/es/comps/FormGenerator/comps/Canvas/core/index.d.ts +1 -1
  37. package/es/comps/FormGenerator/comps/Canvas/index.d.ts +2 -1
  38. package/es/comps/FormGenerator/comps/Canvas/index.js +28 -13
  39. package/es/comps/FormGenerator/comps/Settings/index.d.ts +2 -1
  40. package/es/comps/FormGenerator/comps/Sidebar/Elements.d.ts +1 -1
  41. package/es/comps/FormGenerator/comps/Sidebar/JsonSchema.d.ts +1 -1
  42. package/es/comps/FormGenerator/comps/Sidebar/index.d.ts +2 -1
  43. package/es/comps/FormGenerator/comps/Sidebar/index.js +30 -4
  44. package/es/comps/FormGenerator/index.d.ts +2 -1
  45. package/es/comps/FormGenerator/interface.d.ts +5 -1
  46. package/es/comps/FormGenerator/interface.js +1 -1
  47. package/es/comps/FormGenerator/settings/index.d.ts +1 -0
  48. package/es/comps/FormGenerator/settings/index.js +3 -2
  49. package/es/comps/JsonEdit/index.d.ts +2 -1
  50. package/es/comps/JsonView/index.d.ts +2 -1
  51. package/es/comps/JsonView/index.less +41 -41
  52. package/es/comps/MdEdit/index.d.ts +2 -1
  53. package/es/comps/MdEdit/index.less +6 -6
  54. package/es/comps/MdEditPro/index.d.ts +2 -1
  55. package/es/comps/MdNavbar/index.d.ts +2 -1
  56. package/es/comps/MdView/index.d.ts +1 -1
  57. package/es/comps/MetadataEdit/components/MetaFieldsEdit.d.ts +2 -1
  58. package/es/comps/MetadataEdit/components/MetaPropsEdit.d.ts +2 -1
  59. package/es/comps/MetadataEdit/index.d.ts +2 -1
  60. package/es/comps/MetadataEdit/index.less +10 -10
  61. package/es/comps/MetadataEdit/type.d.ts +20 -20
  62. package/es/comps/MetadataEditV2/components/MetaFieldsEdit.d.ts +2 -1
  63. package/es/comps/MetadataEditV2/components/MetaPropsEdit.d.ts +2 -1
  64. package/es/comps/MetadataEditV2/index.d.ts +2 -1
  65. package/es/comps/MetadataForm/DataCell/Array.d.ts +1 -1
  66. package/es/comps/MetadataForm/DataCell/Input.d.ts +1 -1
  67. package/es/comps/MetadataForm/DataCell/Number.d.ts +1 -1
  68. package/es/comps/MetadataForm/DataCell/Ref.d.ts +1 -1
  69. package/es/comps/MetadataForm/DataCell/Select.d.ts +1 -1
  70. package/es/comps/MetadataForm/DataCell/Select.js +1 -1
  71. package/es/comps/MetadataForm/DataCell/Switch.d.ts +1 -1
  72. package/es/comps/MetadataForm/DataCell/layout/TableArray.d.ts +2 -1
  73. package/es/comps/MetadataForm/DataCell/plugin/NumberRange.d.ts +2 -1
  74. package/es/comps/MetadataForm/HOC/index.d.ts +2 -1
  75. package/es/comps/MetadataForm/HOC/index.less +41 -41
  76. package/es/comps/MetadataForm/index.d.ts +2 -1
  77. package/es/comps/MetadataForm/utils.d.ts +3 -2
  78. package/es/comps/Split/index.d.ts +1 -1
  79. package/es/framework/RxStore/demo/index.d.ts +2 -1
  80. package/es/framework/metadata/types.d.ts +98 -98
  81. package/es/utils.js +6 -4
  82. package/package.json +103 -103
@@ -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/utils.js CHANGED
@@ -6,7 +6,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
6
6
  /*
7
7
  * @Author: wangxian
8
8
  * @Date: 2021-09-18 14:15:04
9
- * @LastEditTime: 2023-06-12 16:44:46
9
+ * @LastEditTime: 2023-07-07 15:47:59
10
10
  */
11
11
  import saveAs from 'file-saver';
12
12
  import { asBlob } from 'html-docx-js-typescript';
@@ -207,13 +207,15 @@ function _handleMd2Doc() {
207
207
  if (isFirstLineCenter && idx === 0 && token.tag === 'h1') {
208
208
  return "<h1 style=\"text-align:center\" >\n";
209
209
  }
210
- return '';
210
+ return "<".concat(token.tag, ">\n");
211
211
  };
212
212
  html = md.render(mdText);
213
- commonHtml = "\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\">\n <style>\n .doc-table {\n border-collapse:collapse;\n width: 100%;\n border: 1px solid #ccc;\n border-style: hidden;\n overflow: hidden;\n }\n th {\n background: #f9fafb;\n border: 1px solid #f3f4f5;\n font-weight: 600;\n color: rgba(0, 0, 0, 0.85);\n padding:8px;\n text-align:left;\n }\n tr {\n border: 1px solid #f3f4f5;\n }\n td {\n border: 1px solid #f3f4f5;\n padding:4px\n }\n blockquote {\n border-left: 4px solid #f3f4f5; \n overflow: hidden;\n }\n </style>\n </head>\n <body>\n ".concat(!isFirstLineCenter ? "<div style='text-align:center;font-weight:blod'><h1>".concat(fileName, "</h1></div>") : '', "\n <div>\n ").concat(html, "\n </div>\n </body>\n </html>\n ");
213
+ commonHtml = "\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <meta charset=\"UTF-8\">\n <style>\n .doc-table {\n border-collapse:collapse;\n width: 100%;\n border: 1px solid #ccc;\n border-style: hidden;\n overflow: hidden;\n }\n p {\n margin: 0;\n }\n th {\n background: #f9fafb;\n border: 1px solid #f3f4f5;\n font-weight: 600;\n color: rgba(0, 0, 0, 0.85);\n padding:8px;\n text-align:left;\n }\n tr {\n border: 1px solid #f3f4f5;\n }\n td {\n border: 1px solid #f3f4f5;\n padding:4px\n }\n blockquote {\n border-left: 4px solid #f3f4f5; \n overflow: hidden;\n }\n </style>\n </head>\n <body>\n ".concat(!isFirstLineCenter ? "<div style='text-align:center;font-weight:blod'><h1>".concat(fileName, "</h1></div>") : '', "\n <div>\n ").concat(html, "\n </div>\n </body>\n </html>\n ");
214
214
  opt = {
215
215
  margin: {
216
- top: 100
216
+ top: 0,
217
+ bottom: 0,
218
+ gutter: 0
217
219
  },
218
220
  orientation: 'portrait'
219
221
  };
package/package.json CHANGED
@@ -1,104 +1,104 @@
1
- {
2
- "public": true,
3
- "name": "ronds-metadata",
4
- "version": "1.2.80",
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/file-saver": "^2.0.5",
41
- "@types/markdown-it": "^12.2.3",
42
- "@types/markdown-navbar": "^1.4.0",
43
- "ahooks": "^3.4.0",
44
- "axios": "^0.21.4",
45
- "babel-plugin-import": "^1.13.3",
46
- "babel-plugin-transform-remove-console": "^6.9.4",
47
- "bl": "^5.0.0",
48
- "codemirror": "^5.63.0",
49
- "codepage": "^1.15.0",
50
- "css-element-queries": "^1.2.3",
51
- "file-saver": "^2.0.5",
52
- "github-markdown-css": "^5.1.0",
53
- "html-docx-js-typescript": "^0.1.5",
54
- "immer": "^9.0.14",
55
- "lodash": "^4.17.21",
56
- "markdown-it": "^13.0.1",
57
- "markdown-navbar": "^1.4.3",
58
- "qs": "^6.10.1",
59
- "react": "^17.0.2",
60
- "react-contenteditable": "^3.3.7",
61
- "react-dnd": "^11.1.3",
62
- "react-dnd-html5-backend": "^11.1.3",
63
- "react-jexcel": "^1.0.2",
64
- "react-markdown": "^8.0.3",
65
- "react-markdown-editor-lite": "^1.3.2",
66
- "react-popper": "^2.2.3",
67
- "react-split": "^2.0.14",
68
- "react-syntax-highlighter": "^15.5.0",
69
- "rehype-raw": "^6.1.1",
70
- "remark-gfm": "^3.0.1",
71
- "ronds-react-markdown": "^1.0.12",
72
- "rxjs": "^7.5.4",
73
- "xlsx": "^0.18.5"
74
- },
75
- "peerDependencies": {
76
- "antd": ">=4.1.5",
77
- "react": ">=16.14.0",
78
- "react-dom": ">=16.14.0",
79
- "react-router": ">=5.0.0",
80
- "styled-components": ">=4.1.1"
81
- },
82
- "devDependencies": {
83
- "@types/react": "^17.0.2",
84
- "@types/react-dom": "^17.0.2",
85
- "@types/react-router": "^5.1.8",
86
- "@types/react-window": "^1.8.2",
87
- "@types/styled-components": "^5.1.2",
88
- "@umijs/test": "^3.0.5",
89
- "antd": "^4.18.1",
90
- "babel-loader": "^8.1.0",
91
- "copy-to-clipboard": "^3.3.1",
92
- "css-loader": "^4.2.2",
93
- "dumi": "^1.0.16",
94
- "father-build": "^1.17.2",
95
- "file-loader": "^6.2.0",
96
- "gh-pages": "^3.0.0",
97
- "less-loader": "^7.0.0",
98
- "lint-staged": "^10.0.7",
99
- "prettier": "^2.2.1",
100
- "style-loader": "^1.2.1",
101
- "webpack-cli": "^3.3.12",
102
- "yorkie": "^2.0.0"
103
- }
1
+ {
2
+ "public": true,
3
+ "name": "ronds-metadata",
4
+ "version": "1.2.82",
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/file-saver": "^2.0.5",
41
+ "@types/markdown-it": "^12.2.3",
42
+ "@types/markdown-navbar": "^1.4.0",
43
+ "ahooks": "^3.4.0",
44
+ "axios": "^0.21.4",
45
+ "babel-plugin-import": "^1.13.3",
46
+ "babel-plugin-transform-remove-console": "^6.9.4",
47
+ "bl": "^5.0.0",
48
+ "codemirror": "^5.63.0",
49
+ "codepage": "^1.15.0",
50
+ "css-element-queries": "^1.2.3",
51
+ "file-saver": "^2.0.5",
52
+ "github-markdown-css": "^5.1.0",
53
+ "html-docx-js-typescript": "^0.1.5",
54
+ "immer": "^9.0.14",
55
+ "lodash": "^4.17.21",
56
+ "markdown-it": "^13.0.1",
57
+ "markdown-navbar": "^1.4.3",
58
+ "qs": "^6.10.1",
59
+ "react": "^17.0.2",
60
+ "react-contenteditable": "^3.3.7",
61
+ "react-dnd": "^11.1.3",
62
+ "react-dnd-html5-backend": "^11.1.3",
63
+ "react-jexcel": "^1.0.2",
64
+ "react-markdown": "^8.0.3",
65
+ "react-markdown-editor-lite": "^1.3.2",
66
+ "react-popper": "^2.2.3",
67
+ "react-split": "^2.0.14",
68
+ "react-syntax-highlighter": "^15.5.0",
69
+ "rehype-raw": "^6.1.1",
70
+ "remark-gfm": "^3.0.1",
71
+ "ronds-react-markdown": "^1.0.12",
72
+ "rxjs": "^7.5.4",
73
+ "xlsx": "^0.18.5"
74
+ },
75
+ "peerDependencies": {
76
+ "antd": ">=4.1.5",
77
+ "react": ">=16.14.0",
78
+ "react-dom": ">=16.14.0",
79
+ "react-router": ">=5.0.0",
80
+ "styled-components": ">=4.1.1"
81
+ },
82
+ "devDependencies": {
83
+ "@types/react": "^17.0.2",
84
+ "@types/react-dom": "^17.0.2",
85
+ "@types/react-router": "^5.1.8",
86
+ "@types/react-window": "^1.8.2",
87
+ "@types/styled-components": "^5.1.2",
88
+ "@umijs/test": "^3.0.5",
89
+ "antd": "^4.18.1",
90
+ "babel-loader": "^8.1.0",
91
+ "copy-to-clipboard": "^3.3.1",
92
+ "css-loader": "^4.2.2",
93
+ "dumi": "^1.0.16",
94
+ "father-build": "^1.17.2",
95
+ "file-loader": "^6.2.0",
96
+ "gh-pages": "^3.0.0",
97
+ "less-loader": "^7.0.0",
98
+ "lint-staged": "^10.0.7",
99
+ "prettier": "^2.2.1",
100
+ "style-loader": "^1.2.1",
101
+ "webpack-cli": "^3.3.12",
102
+ "yorkie": "^2.0.0"
103
+ }
104
104
  }