ronds-metadata 1.0.86 → 1.0.89
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/MetaFieldsEdit.js +1 -1
- package/es/comps/MetadataForm/DataCell/Array.js +3 -2
- package/es/comps/MetadataForm/DataCell/Ref.js +1 -4
- package/es/comps/MetadataForm/hooks/index.js +12 -5
- package/es/comps/MetadataForm/index.d.ts +0 -1
- package/es/comps/MetadataForm/index.js +0 -1
- package/es/comps/locales/en-US.d.ts +1 -0
- package/es/comps/locales/en-US.js +1 -0
- package/es/comps/locales/zh-CN.d.ts +1 -0
- package/es/comps/locales/zh-CN.js +1 -0
- package/package.json +1 -1
@@ -72,7 +72,7 @@ var MetaFieldsEdit = function MetaFieldsEdit(props) {
|
|
72
72
|
|
73
73
|
if (_refId === 'com.ronds.schema.default.Rule.Form') {
|
74
74
|
_properties = _properties.filter(function (it) {
|
75
|
-
return it.id === 'common' || it.id === type;
|
75
|
+
return it.id === 'common' || it.id === 'common-en-US' || it.id === type;
|
76
76
|
});
|
77
77
|
}
|
78
78
|
|
@@ -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-11 11:13:58
|
12
12
|
*/
|
13
13
|
import React from 'react';
|
14
14
|
import { MinusCircleOutlined, PlusOutlined } from '@ant-design/icons';
|
@@ -16,6 +16,7 @@ import { MetadataFormContext } from '../interface';
|
|
16
16
|
import { useGetExtraInfo } from '../hooks';
|
17
17
|
import { getDataCell } from '../utils';
|
18
18
|
import { deepClone } from '../../../utils';
|
19
|
+
import { tr } from '../../../framework/locale';
|
19
20
|
|
20
21
|
function Index(props) {
|
21
22
|
var _fieldRule$, _fieldRule$$value;
|
@@ -116,7 +117,7 @@ function Index(props) {
|
|
116
117
|
return add();
|
117
118
|
},
|
118
119
|
icon: /*#__PURE__*/React.createElement(PlusOutlined, null)
|
119
|
-
},
|
120
|
+
}, tr('添加'))));
|
120
121
|
})));
|
121
122
|
}
|
122
123
|
|
@@ -48,10 +48,7 @@ function Index(props) {
|
|
48
48
|
var _React$useState7 = React.useState(''),
|
49
49
|
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
50
50
|
help = _React$useState8[0],
|
51
|
-
setHelp = _React$useState8[1];
|
52
|
-
// debugger;
|
53
|
-
// }
|
54
|
-
|
51
|
+
setHelp = _React$useState8[1];
|
55
52
|
|
56
53
|
var onSearch = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
57
54
|
var param, server, res, _options, i, obj;
|
@@ -5,13 +5,19 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
5
|
/*
|
6
6
|
* @Author: your name
|
7
7
|
* @Date: 2021-09-18 14:15:04
|
8
|
-
* @LastEditTime: 2022-05-
|
8
|
+
* @LastEditTime: 2022-05-11 10:36:05
|
9
9
|
* @LastEditors: Please set LastEditors
|
10
10
|
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
11
11
|
* @FilePath: \ronds.metadata\src\comps\MetadataForm\hooks\index.tsx
|
12
12
|
*/
|
13
|
+
import { getLocale } from '../../../framework/locale';
|
13
14
|
import moment from 'moment';
|
14
|
-
import React from 'react';
|
15
|
+
import React from 'react'; // 主题样式名映射
|
16
|
+
|
17
|
+
var languageMap = {
|
18
|
+
'zh-CN': 'common',
|
19
|
+
'en-US': 'common-en-US'
|
20
|
+
};
|
15
21
|
export var useGetExtraInfo = function useGetExtraInfo(fields, id, form, type) {
|
16
22
|
var _React$useState = React.useState({}),
|
17
23
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
@@ -28,11 +34,12 @@ export var useGetExtraInfo = function useGetExtraInfo(fields, id, form, type) {
|
|
28
34
|
|
29
35
|
for (var k in extraInfo) {
|
30
36
|
_extraInfo[k] = extraInfo[k];
|
31
|
-
}
|
32
|
-
|
37
|
+
}
|
33
38
|
|
34
|
-
|
39
|
+
// 兼容 common公共的属性
|
40
|
+
_extraInfo = _objectSpread(_objectSpread(_objectSpread({}, _extraInfo), _extraInfo[languageMap[getLocale()]]), _extraInfo[type]);
|
35
41
|
delete _extraInfo.common;
|
42
|
+
delete _extraInfo['common-en-US'];
|
36
43
|
delete _extraInfo[type];
|
37
44
|
|
38
45
|
// 时间格式转化
|
@@ -11,7 +11,6 @@ import { JsonMetadataProvider } from '../../framework/metadata';
|
|
11
11
|
import { MetadataService } from '../../framework/metadata/MetadataService';
|
12
12
|
import useMemoSubject from '../../framework/rxjs-hooks/useMemoSubject';
|
13
13
|
import useObservable from '../../framework/rxjs-hooks/useObservable';
|
14
|
-
import "../../theme.css";
|
15
14
|
|
16
15
|
var MetadataForm = function MetadataForm(props) {
|
17
16
|
var _Form$useForm = _Form.useForm(),
|