ronds-metadata 1.3.30 → 1.3.32

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-27 09:45: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;
@@ -177,7 +178,8 @@ function Index(props) {
177
178
  } : undefined,
178
179
  name: (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$addonAfter6 = extraInfo.addonAfter) === null || _extraInfo$addonAfter6 === void 0 ? void 0 : _extraInfo$addonAfter6.key) ? [field === null || field === void 0 ? void 0 : field.name].concat(_toConsumableArray(name), ['value']) : [field === null || field === void 0 ? void 0 : field.name].concat(_toConsumableArray(name)),
179
180
  rules: [{
180
- required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
181
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
182
+ message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
181
183
  }].concat(_toConsumableArray(rules)),
182
184
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
183
185
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -210,7 +212,8 @@ function Index(props) {
210
212
  } : undefined,
211
213
  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
214
  rules: [{
213
- required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
215
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
216
+ message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
214
217
  }].concat(_toConsumableArray(rules)),
215
218
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
216
219
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -222,7 +225,8 @@ function Index(props) {
222
225
  },
223
226
  name: [field === null || field === void 0 ? void 0 : field.name],
224
227
  rules: [{
225
- required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
228
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
229
+ message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
226
230
  }].concat(_toConsumableArray(rules)),
227
231
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
228
232
  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-27 09:45:28
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,
@@ -67,7 +68,8 @@ function Index(props) {
67
68
  offset: 0
68
69
  } : undefined,
69
70
  rules: [{
70
- required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
71
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
72
+ message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
71
73
  }].concat(_toConsumableArray(rules)),
72
74
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
73
75
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -100,7 +102,8 @@ function Index(props) {
100
102
  } : undefined,
101
103
  name: name,
102
104
  rules: [{
103
- required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
105
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
106
+ message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
104
107
  }].concat(_toConsumableArray(rules)),
105
108
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
106
109
  tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
@@ -114,7 +117,8 @@ function Index(props) {
114
117
  },
115
118
  name: [field === null || field === void 0 ? void 0 : field.name],
116
119
  rules: [{
117
- required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
120
+ required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
121
+ message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
118
122
  }].concat(_toConsumableArray(rules)),
119
123
  help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
120
124
  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-27 09:47:00
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.32",
5
5
  "scripts": {
6
6
  "start": "dumi dev",
7
7
  "docs:build": "dumi build",