ronds-metadata 1.3.30 → 1.3.31

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,7 +16,7 @@ import _Input from "antd/es/input";
16
16
  /*
17
17
  * @Author: wangxian
18
18
  * @Date: 2021-09-18 14:15:04
19
- * @LastEditTime: 2023-10-18 15:23:06
19
+ * @LastEditTime: 2024-02-26 10:19:47
20
20
  */
21
21
  import React from 'react';
22
22
  import { UploadOutlined } from '@ant-design/icons';
@@ -24,6 +24,7 @@ import { MetadataFormContext, MetadataRefContext } from '../interface';
24
24
  import { useGetExtraInfo } from '../hooks';
25
25
  import useObservable from '../../../framework/rxjs-hooks/useObservable';
26
26
  import NumberRange from './plugin/NumberRange';
27
+ import { tr } from '../../../framework/locale';
27
28
  var TextArea = _Input.TextArea;
28
29
  function Index(props) {
29
30
  var _extraInfo$addonAfter7;
@@ -210,7 +211,8 @@ function Index(props) {
210
211
  } : undefined,
211
212
  name: (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$addonAfter7 = extraInfo.addonAfter) === null || _extraInfo$addonAfter7 === void 0 ? void 0 : _extraInfo$addonAfter7.key) ? [].concat(_toConsumableArray(name), ['value']) : name,
212
213
  rules: [{
213
- required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
214
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
215
+ message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
214
216
  }].concat(_toConsumableArray(rules)),
215
217
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
216
218
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -222,7 +224,8 @@ function Index(props) {
222
224
  },
223
225
  name: [field === null || field === void 0 ? void 0 : field.name],
224
226
  rules: [{
225
- required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
227
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
228
+ message: "".concat(tr('请输入'), "\"").concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id, "\"")
226
229
  }].concat(_toConsumableArray(rules)),
227
230
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
228
231
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -8,11 +8,12 @@ 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: 2023-03-08 15:51:28
11
+ * @LastEditTime: 2024-02-26 10:21:57
12
12
  */
13
13
  import React from 'react';
14
14
  import { MetadataFormContext, MetadataRefContext } from '../interface';
15
15
  import { useGetExtraInfo } from '../hooks';
16
+ import { tr } from '../../../framework/locale';
16
17
  function Index(props) {
17
18
  var _extraInfo$disabled2, _extraInfo$disabled3;
18
19
  var id = props.id,
@@ -100,7 +101,8 @@ function Index(props) {
100
101
  } : undefined,
101
102
  name: name,
102
103
  rules: [{
103
- required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
104
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
105
+ message: "".concat(tr('请输入'), "\"").concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id, "\"")
104
106
  }].concat(_toConsumableArray(rules)),
105
107
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
106
108
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -114,7 +116,8 @@ function Index(props) {
114
116
  },
115
117
  name: [field === null || field === void 0 ? void 0 : field.name],
116
118
  rules: [{
117
- required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
119
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
120
+ message: "".concat(tr('请输入'), "\"").concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id, "\"")
118
121
  }].concat(_toConsumableArray(rules)),
119
122
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
120
123
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -21,6 +21,7 @@ import { MetadataFormContext, MetadataRefContext } from '../interface';
21
21
  import { useGetExtraInfo } from '../hooks';
22
22
  import { renderForm } from '../utils';
23
23
  import { JsonMetadataProvider } from '../../../framework/metadata';
24
+ import { tr } from '../../../framework/locale';
24
25
  function Index(props) {
25
26
  var _extraInfo$disabled, _extraInfo$disabled2;
26
27
  var id = props.id,
@@ -247,7 +248,8 @@ function Index(props) {
247
248
  },
248
249
  name: id,
249
250
  rules: [{
250
- required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
251
+ required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
252
+ message: "".concat(tr('请输入'), "\"").concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id, "\"")
251
253
  }],
252
254
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
253
255
  tooltip: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip) || help
@@ -269,7 +271,8 @@ function Index(props) {
269
271
  },
270
272
  name: [field === null || field === void 0 ? void 0 : field.name],
271
273
  rules: [{
272
- required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
274
+ required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
275
+ message: "".concat(tr('请输入'), "\"").concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id, "\"")
273
276
  }],
274
277
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
275
278
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -37,7 +37,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
37
37
  /*
38
38
  * @Author:wangxian
39
39
  * @Date: 2021-09-18 14:15:04
40
- * @LastEditTime: 2023-11-27 10:51:07
40
+ * @LastEditTime: 2024-02-26 10:27:57
41
41
  */
42
42
  import React from 'react';
43
43
  import { MetadataFormContext, MetadataRefContext } from '../interface';
@@ -560,7 +560,8 @@ function Index(props) {
560
560
  } : undefined,
561
561
  name: [field === null || field === void 0 ? void 0 : field.name].concat(_toConsumableArray(name)),
562
562
  rules: [{
563
- required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
563
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
564
+ message: "".concat(tr('请输入'), "\"").concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id, "\"")
564
565
  }],
565
566
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
566
567
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -590,7 +591,8 @@ function Index(props) {
590
591
  } : undefined,
591
592
  name: name,
592
593
  rules: [{
593
- required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
594
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
595
+ message: "".concat(tr('请输入'), "\"").concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id, "\"")
594
596
  }],
595
597
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
596
598
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -601,7 +603,8 @@ function Index(props) {
601
603
  },
602
604
  name: [field === null || field === void 0 ? void 0 : field.name],
603
605
  rules: [{
604
- required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
606
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
607
+ message: "".concat(tr('请输入'), "\"").concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id, "\"")
605
608
  }],
606
609
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
607
610
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -7,11 +7,12 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
7
7
  /*
8
8
  * @Author: wangxian
9
9
  * @Date: 2021-09-18 14:15:04
10
- * @LastEditTime: 2023-03-08 15:52:49
10
+ * @LastEditTime: 2024-02-26 10:23:37
11
11
  */
12
12
  import React from 'react';
13
13
  import { MetadataFormContext, MetadataRefContext } from '../interface';
14
14
  import { useGetExtraInfo } from '../hooks';
15
+ import { tr } from '../../../framework/locale';
15
16
  function Index(props) {
16
17
  var _extraInfo$disabled2, _extraInfo$disabled3;
17
18
  var id = props.id,
@@ -51,7 +52,8 @@ function Index(props) {
51
52
  name: [field === null || field === void 0 ? void 0 : field.name].concat(_toConsumableArray(name)),
52
53
  valuePropName: "checked",
53
54
  rules: [{
54
- required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
55
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
56
+ message: "".concat(tr('请输入'), "\"").concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id, "\"")
55
57
  }],
56
58
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
57
59
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -86,7 +88,8 @@ function Index(props) {
86
88
  name: name,
87
89
  valuePropName: "checked",
88
90
  rules: [{
89
- required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
91
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
92
+ message: "".concat(tr('请输入'), "\"").concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id, "\"")
90
93
  }],
91
94
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
92
95
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -102,7 +105,8 @@ function Index(props) {
102
105
  name: [field === null || field === void 0 ? void 0 : field.name],
103
106
  valuePropName: "checked",
104
107
  rules: [{
105
- required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
108
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
109
+ message: "".concat(tr('请输入'), "\"").concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id, "\"")
106
110
  }],
107
111
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
108
112
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "public": true,
3
3
  "name": "ronds-metadata",
4
- "version": "1.3.30",
4
+ "version": "1.3.31",
5
5
  "scripts": {
6
6
  "start": "dumi dev",
7
7
  "docs:build": "dumi build",