ronds-metadata 1.0.90 → 1.0.94
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/es/comps/MetadataEdit/components/MetaPropsEdit.js +4 -0
- package/es/comps/MetadataForm/DataCell/Array.js +2 -2
- package/es/comps/MetadataForm/DataCell/Input.js +4 -42
- package/es/comps/MetadataForm/DataCell/Ref.js +1 -1
- package/es/comps/MetadataForm/DataCell/layout/TableArray.js +8 -6
- package/es/comps/RzGraph/index.d.ts +2 -0
- package/es/comps/RzGraph/index.js +7 -0
- package/package.json +1 -2
@@ -252,6 +252,10 @@ var MetaPropsEdit = function MetaPropsEdit(props) {
|
|
252
252
|
width: '180px'
|
253
253
|
},
|
254
254
|
options: metaType || [],
|
255
|
+
showSearch: true,
|
256
|
+
filterOption: function filterOption(input, option) {
|
257
|
+
return (option === null || option === void 0 ? void 0 : option.label.indexOf(input)) >= 0;
|
258
|
+
},
|
255
259
|
getPopupContainer: function getPopupContainer(triggerNode) {
|
256
260
|
return triggerNode.parentNode;
|
257
261
|
}
|
@@ -8,7 +8,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
8
8
|
/*
|
9
9
|
* @Author: wangxian
|
10
10
|
* @Date: 2021-09-18 14:15:04
|
11
|
-
* @LastEditTime: 2022-05-
|
11
|
+
* @LastEditTime: 2022-05-16 17:20:54
|
12
12
|
*/
|
13
13
|
import React from 'react';
|
14
14
|
import { MinusCircleOutlined, PlusOutlined } from '@ant-design/icons';
|
@@ -55,7 +55,7 @@ function Index(props) {
|
|
55
55
|
setHelp(arr[arr.length - 1]);
|
56
56
|
}
|
57
57
|
}, [items]);
|
58
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
58
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, !(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.titleHidden) && /*#__PURE__*/React.createElement("div", {
|
59
59
|
style: {
|
60
60
|
position: 'relative',
|
61
61
|
width: '100%'
|
@@ -8,21 +8,15 @@ import "antd/es/button/style";
|
|
8
8
|
import _Button from "antd/es/button";
|
9
9
|
import "antd/es/date-picker/style";
|
10
10
|
import _DatePicker from "antd/es/date-picker";
|
11
|
-
import "antd/es/popover/style";
|
12
|
-
import _Popover from "antd/es/popover";
|
13
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
14
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
15
11
|
import "antd/es/input/style";
|
16
12
|
import _Input from "antd/es/input";
|
17
13
|
|
18
14
|
/*
|
19
15
|
* @Author: wangxian
|
20
16
|
* @Date: 2021-09-18 14:15:04
|
21
|
-
* @LastEditTime: 2022-05-
|
17
|
+
* @LastEditTime: 2022-05-17 08:53:22
|
22
18
|
*/
|
23
19
|
import React from 'react';
|
24
|
-
import { BgColorsOutlined } from '@ant-design/icons';
|
25
|
-
import { SketchPicker } from 'react-color';
|
26
20
|
import { UploadOutlined } from '@ant-design/icons';
|
27
21
|
import { MetadataFormContext, MetadataRefContext } from '../interface';
|
28
22
|
import { useGetExtraInfo } from '../hooks';
|
@@ -39,27 +33,6 @@ function Index(props) {
|
|
39
33
|
var formRefContext = React.useContext(MetadataRefContext);
|
40
34
|
var extraInfo = useGetExtraInfo(formRefContext ? formRefContext.fields : formContext.fields, id, formContext.form, props.type);
|
41
35
|
|
42
|
-
var _React$useState = React.useState(''),
|
43
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
44
|
-
color = _React$useState2[0],
|
45
|
-
setColor = _React$useState2[1];
|
46
|
-
|
47
|
-
React.useEffect(function () {
|
48
|
-
if ((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.type) === 'colorPicker') {
|
49
|
-
setColor(formContext.form.getFieldValue(id));
|
50
|
-
}
|
51
|
-
}, [extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.type, formContext.form]);
|
52
|
-
|
53
|
-
var onColorChange = function onColorChange(e) {
|
54
|
-
formContext.form.setFieldsValue(_defineProperty({}, id, e.hex));
|
55
|
-
setColor(e.hex);
|
56
|
-
};
|
57
|
-
|
58
|
-
var colorPicker = /*#__PURE__*/React.createElement(SketchPicker, {
|
59
|
-
color: color,
|
60
|
-
onChange: onColorChange
|
61
|
-
});
|
62
|
-
|
63
36
|
var processInputType = function processInputType(_type) {
|
64
37
|
var _extraInfo$disabled, _extraInfo$disabled2, _extraInfo$disabled3, _extraInfo$disabled4, _extraInfo$disabled5;
|
65
38
|
|
@@ -78,22 +51,11 @@ function Index(props) {
|
|
78
51
|
});
|
79
52
|
|
80
53
|
case 'colorPicker':
|
81
|
-
return /*#__PURE__*/React.createElement(
|
82
|
-
|
83
|
-
}, /*#__PURE__*/React.createElement(_Input, {
|
84
|
-
value: color,
|
54
|
+
return /*#__PURE__*/React.createElement(_Input, {
|
55
|
+
type: "color",
|
85
56
|
disabled: (_extraInfo$disabled3 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled3 !== void 0 ? _extraInfo$disabled3 : disabled,
|
86
57
|
placeholder: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder
|
87
|
-
})
|
88
|
-
style: {
|
89
|
-
position: 'absolute',
|
90
|
-
right: '5px',
|
91
|
-
top: '5px',
|
92
|
-
zIndex: 888
|
93
|
-
}
|
94
|
-
}, /*#__PURE__*/React.createElement(_Popover, {
|
95
|
-
content: colorPicker
|
96
|
-
}, /*#__PURE__*/React.createElement(BgColorsOutlined, null))));
|
58
|
+
});
|
97
59
|
|
98
60
|
case 'datePicker':
|
99
61
|
return /*#__PURE__*/React.createElement(_DatePicker, {
|
@@ -181,7 +181,7 @@ function Index(props) {
|
|
181
181
|
border: '1px solid var(--ronds-metadata-color-border-1)',
|
182
182
|
width: '100%',
|
183
183
|
borderRadius: '4px',
|
184
|
-
display: "".concat(isFold ? 'none' : 'block')
|
184
|
+
display: "".concat(formContext.isFoldForm && isFold ? 'none' : 'block')
|
185
185
|
}
|
186
186
|
}, /*#__PURE__*/React.createElement(MetadataRefContext.Provider, {
|
187
187
|
value: {
|
@@ -89,12 +89,14 @@ var TableArray = function TableArray(props) {
|
|
89
89
|
dataIndex: it.id,
|
90
90
|
width: 100,
|
91
91
|
editable: true,
|
92
|
-
type: it.type
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
92
|
+
type: it.type,
|
93
|
+
enum: it.type === 'enum' ? it.enum.map(function (v) {
|
94
|
+
return {
|
95
|
+
label: v.value,
|
96
|
+
value: v.value
|
97
|
+
};
|
98
|
+
}) : undefined
|
99
|
+
};
|
98
100
|
|
99
101
|
_columns.push(obj);
|
100
102
|
}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"public": true,
|
3
3
|
"name": "ronds-metadata",
|
4
|
-
"version": "1.0.
|
4
|
+
"version": "1.0.94",
|
5
5
|
"scripts": {
|
6
6
|
"start": "dumi dev",
|
7
7
|
"docs:build": "dumi build",
|
@@ -45,7 +45,6 @@
|
|
45
45
|
"markdown-it-emoji": "^2.0.0",
|
46
46
|
"qs": "^6.10.1",
|
47
47
|
"react": "^17.0.2",
|
48
|
-
"react-color": "^2.19.3",
|
49
48
|
"react-markdown-editor-lite": "^1.3.2",
|
50
49
|
"react-popper": "^2.2.3",
|
51
50
|
"rxjs": "^7.5.4"
|