ronds-metadata 1.1.50 → 1.1.52

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,41 +1,41 @@
1
- pre {
2
- margin: 0;
3
- font-weight: 900;
4
- font-size: 14px;
5
- }
6
- .string {
7
- color: #3ab54a;
8
- }
9
- .number {
10
- color: #25aae2;
11
- }
12
- .boolean {
13
- color: #f98280;
14
- }
15
- .null {
16
- color: #f1592a;
17
- }
18
- .width-10 {
19
- width: 10px;
20
- }
21
- .key {
22
- color: #92278f;
23
- }
24
- .open {
25
- display: inline-block;
26
- width: 12px;
27
- height: 12px;
28
- background: url('./icon/close.png') no-repeat;
29
- background-size: 100% 100%;
30
- vertical-align: middle;
31
- cursor: pointer;
32
- }
33
- .close {
34
- display: inline-block;
35
- width: 12px;
36
- height: 12px;
37
- background: url('./icon/open.png') no-repeat;
38
- background-size: 100% 100%;
39
- vertical-align: middle;
40
- cursor: pointer;
41
- }
1
+ pre {
2
+ margin: 0;
3
+ font-weight: 900;
4
+ font-size: 14px;
5
+ }
6
+ .string {
7
+ color: #3ab54a;
8
+ }
9
+ .number {
10
+ color: #25aae2;
11
+ }
12
+ .boolean {
13
+ color: #f98280;
14
+ }
15
+ .null {
16
+ color: #f1592a;
17
+ }
18
+ .width-10 {
19
+ width: 10px;
20
+ }
21
+ .key {
22
+ color: #92278f;
23
+ }
24
+ .open {
25
+ display: inline-block;
26
+ width: 12px;
27
+ height: 12px;
28
+ background: url('./icon/close.png') no-repeat;
29
+ background-size: 100% 100%;
30
+ vertical-align: middle;
31
+ cursor: pointer;
32
+ }
33
+ .close {
34
+ display: inline-block;
35
+ width: 12px;
36
+ height: 12px;
37
+ background: url('./icon/open.png') no-repeat;
38
+ background-size: 100% 100%;
39
+ vertical-align: middle;
40
+ cursor: pointer;
41
+ }
@@ -1,10 +1,10 @@
1
- .metadata-edit {
2
- height: 100%;
3
- width: 100%;
4
- .ant-row {
5
- display: block;
6
- }
7
- .pr-10 {
8
- padding-right: 10px;
9
- }
10
- }
1
+ .metadata-edit {
2
+ height: 100%;
3
+ width: 100%;
4
+ .ant-row {
5
+ display: block;
6
+ }
7
+ .pr-10 {
8
+ padding-right: 10px;
9
+ }
10
+ }
@@ -1,20 +1,20 @@
1
- export interface IMetaFileds {
2
- id: string;
3
- type: 'object';
4
- properties: any[];
5
- value: any;
6
- }
7
-
8
- export type ITypeStatus = 'object' | 'ref' | 'bool' | 'number' | 'text' | 'enum' | 'array';
9
-
10
- export type IMetaProperty = {
11
- /**
12
- * 属性的名称
13
- */
14
- id: string;
15
- /**
16
- * 类型
17
- */
18
- type: string;
19
- enum?: any[];
20
- };
1
+ export interface IMetaFileds {
2
+ id: string;
3
+ type: 'object';
4
+ properties: any[];
5
+ value: any;
6
+ }
7
+
8
+ export type ITypeStatus = 'object' | 'ref' | 'bool' | 'number' | 'text' | 'enum' | 'array';
9
+
10
+ export type IMetaProperty = {
11
+ /**
12
+ * 属性的名称
13
+ */
14
+ id: string;
15
+ /**
16
+ * 类型
17
+ */
18
+ type: string;
19
+ enum?: any[];
20
+ };
@@ -232,7 +232,7 @@ function Index(props) {
232
232
  value: {
233
233
  fields: refFieldsRef.current
234
234
  }
235
- }, renderForm(schema, formOptions, formContext.stream$))));
235
+ }, renderForm(schema, formOptions, formContext.colSpan))));
236
236
  }
237
237
 
238
238
  if (isRefForm && field && schema.length > 0) {
@@ -247,7 +247,7 @@ function Index(props) {
247
247
  value: {
248
248
  fields: refFieldsRef.current
249
249
  }
250
- }, renderForm(schema, formOptions, formContext.stream$))));
250
+ }, renderForm(schema, formOptions, formContext.colSpan))));
251
251
  }
252
252
 
253
253
  return !field ? /*#__PURE__*/React.createElement(_Form.Item, {
@@ -190,6 +190,7 @@ var MetadataForm = function MetadataForm(props) {
190
190
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(MetadataFormContext.Provider, {
191
191
  value: {
192
192
  fields: fields,
193
+ colSpan: colSpan,
193
194
  form: form,
194
195
  stream$: stream$,
195
196
  initialValues: initialValues,
@@ -3,6 +3,7 @@ import { FormInstance } from 'antd/lib/form/hooks/useForm';
3
3
  import { IMetaData } from '../../framework/metadata/types';
4
4
  export interface IMetadataFormContextProps {
5
5
  fields: any;
6
+ colSpan: number;
6
7
  form: FormInstance;
7
8
  stream$: any;
8
9
  initialValues: any;
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  * @Author:wangxian
3
3
  * @Date: 2021-09-18 14:15:04
4
- * @LastEditTime: 2022-06-08 15:45:36
4
+ * @LastEditTime: 2022-11-02 10:58:49
5
5
  */
6
6
  import React from 'react';
7
7
  export var MetadataFormContext = /*#__PURE__*/React.createContext(null);
package/package.json CHANGED
@@ -1,90 +1,90 @@
1
- {
2
- "public": true,
3
- "name": "ronds-metadata",
4
- "version": "1.1.50",
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
- "github-markdown-css": "^5.1.0",
48
- "immer": "^9.0.14",
49
- "lodash": "^4.17.21",
50
- "markdown-navbar": "^1.4.3",
51
- "qs": "^6.10.1",
52
- "react": "^17.0.2",
53
- "react-dnd": "^11.1.3",
54
- "react-dnd-html5-backend": "^11.1.3",
55
- "react-markdown": "^8.0.3",
56
- "react-markdown-editor-lite": "^1.3.2",
57
- "react-popper": "^2.2.3",
58
- "rehype-raw": "^6.1.1",
59
- "remark-gfm": "^3.0.1",
60
- "rxjs": "^7.5.4"
61
- },
62
- "peerDependencies": {
63
- "antd": ">=4.1.5",
64
- "react": ">=16.14.0",
65
- "react-dom": ">=16.14.0",
66
- "react-router": ">=5.0.0",
67
- "styled-components": ">=4.1.1"
68
- },
69
- "devDependencies": {
70
- "@types/react": "^17.0.2",
71
- "@types/react-dom": "^17.0.2",
72
- "@types/react-router": "^5.1.8",
73
- "@types/react-window": "^1.8.2",
74
- "@types/styled-components": "^5.1.2",
75
- "@umijs/test": "^3.0.5",
76
- "antd": "^4.18.1",
77
- "babel-loader": "^8.1.0",
78
- "copy-to-clipboard": "^3.3.1",
79
- "css-loader": "^4.2.2",
80
- "dumi": "^1.0.16",
81
- "father-build": "^1.17.2",
82
- "gh-pages": "^3.0.0",
83
- "less-loader": "^7.0.0",
84
- "lint-staged": "^10.0.7",
85
- "prettier": "^2.2.1",
86
- "style-loader": "^1.2.1",
87
- "webpack-cli": "^3.3.12",
88
- "yorkie": "^2.0.0"
89
- }
90
- }
1
+ {
2
+ "public": true,
3
+ "name": "ronds-metadata",
4
+ "version": "1.1.52",
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
+ "github-markdown-css": "^5.1.0",
48
+ "immer": "^9.0.14",
49
+ "lodash": "^4.17.21",
50
+ "markdown-navbar": "^1.4.3",
51
+ "qs": "^6.10.1",
52
+ "react": "^17.0.2",
53
+ "react-dnd": "^11.1.3",
54
+ "react-dnd-html5-backend": "^11.1.3",
55
+ "react-markdown": "^8.0.3",
56
+ "react-markdown-editor-lite": "^1.3.2",
57
+ "react-popper": "^2.2.3",
58
+ "rehype-raw": "^6.1.1",
59
+ "remark-gfm": "^3.0.1",
60
+ "rxjs": "^7.5.4"
61
+ },
62
+ "peerDependencies": {
63
+ "antd": ">=4.1.5",
64
+ "react": ">=16.14.0",
65
+ "react-dom": ">=16.14.0",
66
+ "react-router": ">=5.0.0",
67
+ "styled-components": ">=4.1.1"
68
+ },
69
+ "devDependencies": {
70
+ "@types/react": "^17.0.2",
71
+ "@types/react-dom": "^17.0.2",
72
+ "@types/react-router": "^5.1.8",
73
+ "@types/react-window": "^1.8.2",
74
+ "@types/styled-components": "^5.1.2",
75
+ "@umijs/test": "^3.0.5",
76
+ "antd": "^4.18.1",
77
+ "babel-loader": "^8.1.0",
78
+ "copy-to-clipboard": "^3.3.1",
79
+ "css-loader": "^4.2.2",
80
+ "dumi": "^1.0.16",
81
+ "father-build": "^1.17.2",
82
+ "gh-pages": "^3.0.0",
83
+ "less-loader": "^7.0.0",
84
+ "lint-staged": "^10.0.7",
85
+ "prettier": "^2.2.1",
86
+ "style-loader": "^1.2.1",
87
+ "webpack-cli": "^3.3.12",
88
+ "yorkie": "^2.0.0"
89
+ }
90
+ }