ronds-metadata 1.1.88 → 1.1.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/FormGenerator/comps/Canvas/core/RenderField/Cell/Date.js +3 -2
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/List.d.ts +2 -0
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/List.js +17 -0
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/MutiSelect.js +45 -3
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Number.js +5 -2
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Obj.d.ts +2 -0
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Obj.js +22 -0
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Select.js +47 -3
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Switch.js +4 -2
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/TextArea.js +5 -2
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/HOC/index.js +122 -2
- package/es/comps/FormGenerator/comps/Canvas/core/RenderField/index.js +6 -2
- package/es/comps/FormGenerator/comps/Canvas/core/index.js +53 -11
- package/es/comps/FormGenerator/comps/Canvas/core/index.less +0 -1
- package/es/comps/FormGenerator/comps/Settings/index.js +1 -1
- package/es/comps/FormGenerator/comps/Sidebar/index.js +1 -1
- package/es/comps/FormGenerator/settings/index.d.ts +83 -70
- package/es/comps/FormGenerator/settings/index.js +22 -15
- package/es/comps/FormGenerator/settings/ruleConfig.d.ts +32 -2
- package/es/comps/FormGenerator/settings/ruleConfig.js +201 -7
- package/es/comps/FormGenerator/transformer.js +2 -2
- package/es/comps/MetadataForm/DataCell/Array.js +18 -4
- package/es/comps/MetadataForm/DataCell/Select.js +38 -11
- package/es/comps/MetadataForm/DataCell/layout/TableArray.d.ts +1 -1
- package/es/comps/MetadataForm/DataCell/layout/TableArray.js +75 -28
- package/es/comps/MetadataForm/utils.d.ts +1 -0
- package/es/comps/MetadataForm/utils.js +13 -1
- package/es/utils.d.ts +3 -0
- package/es/utils.js +28 -2
- package/package.json +1 -1
@@ -283,18 +283,6 @@ export declare const selectSchema: {
|
|
283
283
|
properties: {
|
284
284
|
id: string;
|
285
285
|
type: string;
|
286
|
-
fields: {
|
287
|
-
id: string;
|
288
|
-
type: string;
|
289
|
-
refId: string;
|
290
|
-
value: {
|
291
|
-
text: {};
|
292
|
-
common: {
|
293
|
-
label: string;
|
294
|
-
};
|
295
|
-
'common-en-US': {};
|
296
|
-
};
|
297
|
-
}[];
|
298
286
|
}[];
|
299
287
|
}[];
|
300
288
|
}[];
|
@@ -333,18 +321,6 @@ export declare const mutiSelectSchema: {
|
|
333
321
|
properties: {
|
334
322
|
id: string;
|
335
323
|
type: string;
|
336
|
-
fields: {
|
337
|
-
id: string;
|
338
|
-
type: string;
|
339
|
-
refId: string;
|
340
|
-
value: {
|
341
|
-
text: {};
|
342
|
-
common: {
|
343
|
-
label: string;
|
344
|
-
};
|
345
|
-
'common-en-US': {};
|
346
|
-
};
|
347
|
-
}[];
|
348
324
|
}[];
|
349
325
|
}[];
|
350
326
|
}[];
|
@@ -634,18 +610,6 @@ export declare const settingSchema: {
|
|
634
610
|
properties: {
|
635
611
|
id: string;
|
636
612
|
type: string;
|
637
|
-
fields: {
|
638
|
-
id: string;
|
639
|
-
type: string;
|
640
|
-
refId: string;
|
641
|
-
value: {
|
642
|
-
text: {};
|
643
|
-
common: {
|
644
|
-
label: string;
|
645
|
-
};
|
646
|
-
'common-en-US': {};
|
647
|
-
};
|
648
|
-
}[];
|
649
613
|
}[];
|
650
614
|
}[];
|
651
615
|
}[];
|
@@ -684,18 +648,6 @@ export declare const settingSchema: {
|
|
684
648
|
properties: {
|
685
649
|
id: string;
|
686
650
|
type: string;
|
687
|
-
fields: {
|
688
|
-
id: string;
|
689
|
-
type: string;
|
690
|
-
refId: string;
|
691
|
-
value: {
|
692
|
-
text: {};
|
693
|
-
common: {
|
694
|
-
label: string;
|
695
|
-
};
|
696
|
-
'common-en-US': {};
|
697
|
-
};
|
698
|
-
}[];
|
699
651
|
}[];
|
700
652
|
}[];
|
701
653
|
}[];
|
@@ -1008,18 +960,6 @@ export declare const selectParam: {
|
|
1008
960
|
properties: {
|
1009
961
|
id: string;
|
1010
962
|
type: string;
|
1011
|
-
fields: {
|
1012
|
-
id: string;
|
1013
|
-
type: string;
|
1014
|
-
refId: string;
|
1015
|
-
value: {
|
1016
|
-
text: {};
|
1017
|
-
common: {
|
1018
|
-
label: string;
|
1019
|
-
};
|
1020
|
-
'common-en-US': {};
|
1021
|
-
};
|
1022
|
-
}[];
|
1023
963
|
}[];
|
1024
964
|
}[];
|
1025
965
|
}[];
|
@@ -1061,26 +1001,60 @@ export declare const mutiSelectParam: {
|
|
1061
1001
|
properties: {
|
1062
1002
|
id: string;
|
1063
1003
|
type: string;
|
1004
|
+
}[];
|
1005
|
+
}[];
|
1006
|
+
}[];
|
1007
|
+
rule: {
|
1008
|
+
isMutiple: boolean;
|
1009
|
+
};
|
1010
|
+
};
|
1011
|
+
export declare const basicComps: {
|
1012
|
+
id: string;
|
1013
|
+
name: string;
|
1014
|
+
type: string;
|
1015
|
+
param: {
|
1016
|
+
type: string;
|
1017
|
+
schema: {
|
1018
|
+
id: string;
|
1019
|
+
type: string;
|
1020
|
+
properties: ({
|
1021
|
+
id: string;
|
1022
|
+
type: string;
|
1023
|
+
fields: {
|
1024
|
+
id: string;
|
1025
|
+
type: string;
|
1026
|
+
refId: string;
|
1027
|
+
value: {
|
1028
|
+
label: string;
|
1029
|
+
};
|
1030
|
+
}[];
|
1031
|
+
} | {
|
1032
|
+
id: string;
|
1033
|
+
type: string;
|
1064
1034
|
fields: {
|
1065
1035
|
id: string;
|
1066
1036
|
type: string;
|
1067
1037
|
refId: string;
|
1068
1038
|
value: {
|
1069
|
-
text: {};
|
1070
1039
|
common: {
|
1071
1040
|
label: string;
|
1072
1041
|
};
|
1073
1042
|
'common-en-US': {};
|
1074
1043
|
};
|
1075
1044
|
}[];
|
1045
|
+
})[];
|
1046
|
+
types: {
|
1047
|
+
id: string;
|
1048
|
+
type: string;
|
1049
|
+
properties: {
|
1050
|
+
id: string;
|
1051
|
+
type: string;
|
1052
|
+
}[];
|
1076
1053
|
}[];
|
1077
1054
|
}[];
|
1078
|
-
}[];
|
1079
|
-
rule: {
|
1080
|
-
isMutiple: boolean;
|
1081
1055
|
};
|
1082
|
-
};
|
1083
|
-
export declare const
|
1056
|
+
}[];
|
1057
|
+
export declare const layoutComps: {
|
1084
1058
|
id: string;
|
1085
1059
|
name: string;
|
1086
1060
|
type: string;
|
@@ -1138,15 +1112,53 @@ export declare const basicComps: {
|
|
1138
1112
|
}[];
|
1139
1113
|
};
|
1140
1114
|
}[];
|
1141
|
-
export declare const layoutComps: {
|
1142
|
-
id: string;
|
1143
|
-
name: string;
|
1144
|
-
}[];
|
1145
1115
|
export declare const sidebarCtx: {
|
1146
1116
|
name: string;
|
1147
1117
|
children: {
|
1148
1118
|
id: string;
|
1149
1119
|
name: string;
|
1120
|
+
type: string;
|
1121
|
+
param: {
|
1122
|
+
type: string;
|
1123
|
+
schema: {
|
1124
|
+
id: string;
|
1125
|
+
type: string;
|
1126
|
+
properties: ({
|
1127
|
+
id: string;
|
1128
|
+
type: string;
|
1129
|
+
fields: {
|
1130
|
+
id: string;
|
1131
|
+
type: string;
|
1132
|
+
refId: string;
|
1133
|
+
value: {
|
1134
|
+
label: string;
|
1135
|
+
};
|
1136
|
+
}[];
|
1137
|
+
} | {
|
1138
|
+
id: string;
|
1139
|
+
type: string;
|
1140
|
+
fields: {
|
1141
|
+
id: string;
|
1142
|
+
type: string;
|
1143
|
+
refId: string;
|
1144
|
+
value: {
|
1145
|
+
common: {
|
1146
|
+
label: string;
|
1147
|
+
};
|
1148
|
+
'common-en-US': {};
|
1149
|
+
};
|
1150
|
+
}[];
|
1151
|
+
})[];
|
1152
|
+
types: {
|
1153
|
+
id: string;
|
1154
|
+
type: string;
|
1155
|
+
properties: {
|
1156
|
+
id: string;
|
1157
|
+
type: string;
|
1158
|
+
}[];
|
1159
|
+
}[];
|
1160
|
+
}[];
|
1161
|
+
};
|
1150
1162
|
}[];
|
1151
1163
|
}[];
|
1152
1164
|
export declare const dragItemType = "fg-drag";
|
@@ -1314,4 +1326,5 @@ export declare const streamEventType: {
|
|
1314
1326
|
onNodeCopy: string;
|
1315
1327
|
onClearCanvas: string;
|
1316
1328
|
onSettingValueChange: string;
|
1329
|
+
onDropOver: string;
|
1317
1330
|
};
|
@@ -1,50 +1,52 @@
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
2
|
+
|
1
3
|
/*
|
2
4
|
* @Author: wangxian
|
3
5
|
* @Date: 2023-02-06 08:24:17
|
4
|
-
* @LastEditTime: 2023-02-
|
6
|
+
* @LastEditTime: 2023-02-14 14:30:30
|
5
7
|
*/
|
6
8
|
import { RefRule, Rule } from './ruleConfig';
|
7
9
|
export var inputSchema = [{
|
8
10
|
id: 'inputSchema',
|
9
11
|
type: 'object',
|
10
12
|
properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.placeholder, Rule.common.require, Rule.common.disabled, Rule.common.hidden, RefRule.common.depend.props, RefRule.common.rules.props],
|
11
|
-
types: [RefRule.common.depend.types, RefRule.common.rules.types
|
13
|
+
types: [].concat(_toConsumableArray(RefRule.common.depend.types), _toConsumableArray(RefRule.common.rules.types))
|
12
14
|
}];
|
13
15
|
export var textareaSchema = [{
|
14
16
|
id: 'textareaSchema',
|
15
17
|
type: 'object',
|
16
18
|
properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.placeholder, Rule.common.require, Rule.common.disabled, Rule.common.hidden, RefRule.common.depend.props, RefRule.common.rules.props],
|
17
|
-
types: [RefRule.common.depend.types, RefRule.common.rules.types
|
19
|
+
types: [].concat(_toConsumableArray(RefRule.common.depend.types), _toConsumableArray(RefRule.common.rules.types))
|
18
20
|
}];
|
19
21
|
export var dateSchema = [{
|
20
22
|
id: 'dateSchema',
|
21
23
|
type: 'object',
|
22
24
|
properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.placeholder, Rule.common.require, Rule.common.disabled, Rule.common.hidden, RefRule.common.depend.props, RefRule.common.rules.props, RefRule.text.props],
|
23
|
-
types: [RefRule.common.depend.types, RefRule.text.types, RefRule.common.rules.types
|
25
|
+
types: [].concat(_toConsumableArray(RefRule.common.depend.types), _toConsumableArray(RefRule.text.types), _toConsumableArray(RefRule.common.rules.types))
|
24
26
|
}];
|
25
27
|
export var numberSchema = [{
|
26
28
|
id: 'numberSchema',
|
27
29
|
type: 'object',
|
28
30
|
properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.placeholder, Rule.common.require, Rule.common.disabled, Rule.common.hidden, RefRule.common.depend.props, RefRule.common.rules.props],
|
29
|
-
types: [RefRule.common.depend.types, RefRule.common.rules.types
|
31
|
+
types: [].concat(_toConsumableArray(RefRule.common.depend.types), _toConsumableArray(RefRule.common.rules.types))
|
30
32
|
}];
|
31
33
|
export var switchSchema = [{
|
32
34
|
id: 'switchSchema',
|
33
35
|
type: 'object',
|
34
36
|
properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.require, Rule.common.disabled, Rule.common.hidden, RefRule.common.depend.props],
|
35
|
-
types:
|
37
|
+
types: _toConsumableArray(RefRule.common.depend.types)
|
36
38
|
}];
|
37
39
|
export var selectSchema = [{
|
38
|
-
id: '
|
40
|
+
id: 'selectSchema',
|
39
41
|
type: 'object',
|
40
|
-
properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.require, Rule.common.disabled, Rule.common.hidden, RefRule.common.depend.props],
|
41
|
-
types: [RefRule.common.depend.types
|
42
|
+
properties: [Rule.common.id, Rule.common.label, RefRule.enum.props, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.require, Rule.common.disabled, Rule.common.hidden, RefRule.common.depend.props],
|
43
|
+
types: [].concat(_toConsumableArray(RefRule.common.depend.types), _toConsumableArray(RefRule.enum.types))
|
42
44
|
}];
|
43
45
|
export var mutiSelectSchema = [{
|
44
|
-
id: '
|
46
|
+
id: 'mutiSelectSchema',
|
45
47
|
type: 'object',
|
46
|
-
properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.require, Rule.common.disabled, Rule.common.hidden, RefRule.common.depend.props],
|
47
|
-
types: [RefRule.common.depend.types
|
48
|
+
properties: [Rule.common.id, Rule.common.label, RefRule.enum.props, Rule.common.color, Rule.common.colSpan, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.require, Rule.common.disabled, Rule.common.hidden, RefRule.common.depend.props],
|
49
|
+
types: [].concat(_toConsumableArray(RefRule.common.depend.types), _toConsumableArray(RefRule.enum.types))
|
48
50
|
}];
|
49
51
|
export var settingSchema = {
|
50
52
|
input: inputSchema,
|
@@ -132,10 +134,14 @@ export var basicComps = [{
|
|
132
134
|
|
133
135
|
export var layoutComps = [{
|
134
136
|
id: 'obj',
|
135
|
-
name: '对象'
|
137
|
+
name: '对象',
|
138
|
+
type: 'obj',
|
139
|
+
param: inputParam
|
136
140
|
}, {
|
137
141
|
id: 'list',
|
138
|
-
name: '常规列表'
|
142
|
+
name: '常规列表',
|
143
|
+
type: 'list',
|
144
|
+
param: inputParam
|
139
145
|
}]; // Sidebar 内容配置
|
140
146
|
|
141
147
|
export var sidebarCtx = [{
|
@@ -249,5 +255,6 @@ export var streamEventType = {
|
|
249
255
|
onNodeDelete: 'onNodeDelete',
|
250
256
|
onNodeCopy: 'onNodeCopy',
|
251
257
|
onClearCanvas: 'onClearCanvas',
|
252
|
-
onSettingValueChange: 'onSettingValueChange'
|
258
|
+
onSettingValueChange: 'onSettingValueChange',
|
259
|
+
onDropOver: 'onDropOver'
|
253
260
|
};
|
@@ -257,6 +257,7 @@ export declare const Rule: {
|
|
257
257
|
}[];
|
258
258
|
};
|
259
259
|
};
|
260
|
+
enum: {};
|
260
261
|
};
|
261
262
|
export declare const RefRule: {
|
262
263
|
common: {
|
@@ -296,7 +297,7 @@ export declare const RefRule: {
|
|
296
297
|
};
|
297
298
|
}[];
|
298
299
|
}[];
|
299
|
-
};
|
300
|
+
}[];
|
300
301
|
};
|
301
302
|
rules: {
|
302
303
|
props: {
|
@@ -338,7 +339,7 @@ export declare const RefRule: {
|
|
338
339
|
};
|
339
340
|
}[];
|
340
341
|
}[];
|
341
|
-
};
|
342
|
+
}[];
|
342
343
|
};
|
343
344
|
};
|
344
345
|
text: {
|
@@ -378,6 +379,35 @@ export declare const RefRule: {
|
|
378
379
|
};
|
379
380
|
}[];
|
380
381
|
}[];
|
382
|
+
}[];
|
383
|
+
};
|
384
|
+
enum: {
|
385
|
+
props: {
|
386
|
+
id: string;
|
387
|
+
type: string;
|
388
|
+
refId: string;
|
389
|
+
fields: {
|
390
|
+
id: string;
|
391
|
+
type: string;
|
392
|
+
refId: string;
|
393
|
+
value: {
|
394
|
+
common: {
|
395
|
+
label: string;
|
396
|
+
};
|
397
|
+
ref: {
|
398
|
+
titleHidden: boolean;
|
399
|
+
};
|
400
|
+
'common-en-US': {};
|
401
|
+
};
|
402
|
+
}[];
|
381
403
|
};
|
404
|
+
types: {
|
405
|
+
id: string;
|
406
|
+
type: string;
|
407
|
+
properties: {
|
408
|
+
id: string;
|
409
|
+
type: string;
|
410
|
+
}[];
|
411
|
+
}[];
|
382
412
|
};
|
383
413
|
};
|
@@ -1,7 +1,9 @@
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
2
|
+
|
1
3
|
/*
|
2
4
|
* @Author: wangxian
|
3
5
|
* @Date: 2023-02-08 10:36:25
|
4
|
-
* @LastEditTime: 2023-02-
|
6
|
+
* @LastEditTime: 2023-02-10 19:38:32
|
5
7
|
*/
|
6
8
|
import { DEFAULT_DATE_FORMAT } from '../../../comps/MetadataForm/DataCell/Input';
|
7
9
|
export var Rule = {
|
@@ -284,6 +286,172 @@ export var Rule = {
|
|
284
286
|
}
|
285
287
|
}]
|
286
288
|
}
|
289
|
+
},
|
290
|
+
enum: {}
|
291
|
+
};
|
292
|
+
var Ref2Rule = {
|
293
|
+
enum: {
|
294
|
+
value: {
|
295
|
+
props: {
|
296
|
+
id: 'value',
|
297
|
+
type: 'array',
|
298
|
+
items: {
|
299
|
+
type: 'ref',
|
300
|
+
refId: 'enumValueRule'
|
301
|
+
},
|
302
|
+
fields: [{
|
303
|
+
id: 'com.ronds.schema.default.Rule.Form.Common',
|
304
|
+
type: 'ref',
|
305
|
+
refId: 'com.ronds.schema.default.Rule.Form.Common',
|
306
|
+
value: {
|
307
|
+
common: {
|
308
|
+
label: '枚举值'
|
309
|
+
},
|
310
|
+
'common-en-US': {},
|
311
|
+
array: {
|
312
|
+
layout: 'table',
|
313
|
+
rowNumber: 4
|
314
|
+
}
|
315
|
+
}
|
316
|
+
}]
|
317
|
+
},
|
318
|
+
types: [{
|
319
|
+
id: 'enumValueRule',
|
320
|
+
type: 'object',
|
321
|
+
properties: [{
|
322
|
+
id: 'key',
|
323
|
+
type: 'text'
|
324
|
+
}, {
|
325
|
+
id: 'value',
|
326
|
+
type: 'text'
|
327
|
+
}]
|
328
|
+
}]
|
329
|
+
},
|
330
|
+
http: {
|
331
|
+
props: {
|
332
|
+
id: 'http',
|
333
|
+
type: 'ref',
|
334
|
+
refId: 'httpRef',
|
335
|
+
fields: [{
|
336
|
+
id: 'Rule.Form',
|
337
|
+
type: 'ref',
|
338
|
+
refId: 'com.ronds.schema.default.Rule.Form',
|
339
|
+
value: {
|
340
|
+
common: {
|
341
|
+
label: '动态枚举值',
|
342
|
+
tooltip: '通过接口调用获取枚举值'
|
343
|
+
},
|
344
|
+
'common-en-US': {}
|
345
|
+
}
|
346
|
+
}]
|
347
|
+
},
|
348
|
+
types: [{
|
349
|
+
id: 'httpRef',
|
350
|
+
type: 'object',
|
351
|
+
properties: [{
|
352
|
+
id: 'url',
|
353
|
+
type: 'text',
|
354
|
+
fields: [{
|
355
|
+
id: 'Rule.Form',
|
356
|
+
type: 'ref',
|
357
|
+
refId: 'com.ronds.schema.default.Rule.Form',
|
358
|
+
value: {
|
359
|
+
text: {},
|
360
|
+
common: {
|
361
|
+
label: '请求URL'
|
362
|
+
},
|
363
|
+
'common-en-US': {}
|
364
|
+
}
|
365
|
+
}]
|
366
|
+
}, {
|
367
|
+
id: 'method',
|
368
|
+
type: 'enum',
|
369
|
+
enum: [{
|
370
|
+
value: 'get'
|
371
|
+
}, {
|
372
|
+
value: 'post'
|
373
|
+
}],
|
374
|
+
fields: [{
|
375
|
+
id: 'Rule.Form',
|
376
|
+
type: 'ref',
|
377
|
+
refId: 'com.ronds.schema.default.Rule.Form',
|
378
|
+
value: {
|
379
|
+
text: {},
|
380
|
+
common: {
|
381
|
+
label: '请求方法',
|
382
|
+
defaultValue: 'get'
|
383
|
+
},
|
384
|
+
'common-en-US': {}
|
385
|
+
}
|
386
|
+
}]
|
387
|
+
}, {
|
388
|
+
id: 'body',
|
389
|
+
type: 'text',
|
390
|
+
fields: [{
|
391
|
+
id: 'Rule.Form',
|
392
|
+
type: 'ref',
|
393
|
+
refId: 'com.ronds.schema.default.Rule.Form',
|
394
|
+
value: {
|
395
|
+
text: {},
|
396
|
+
common: {
|
397
|
+
label: 'Body参数',
|
398
|
+
help: '支持Json字符串,系统会自动序列化',
|
399
|
+
depend: {// show: `method=='post'`,
|
400
|
+
}
|
401
|
+
},
|
402
|
+
'common-en-US': {}
|
403
|
+
}
|
404
|
+
}]
|
405
|
+
}, {
|
406
|
+
id: 'key',
|
407
|
+
type: 'text',
|
408
|
+
fields: [{
|
409
|
+
id: 'Rule.Form',
|
410
|
+
type: 'ref',
|
411
|
+
refId: 'com.ronds.schema.default.Rule.Form',
|
412
|
+
value: {
|
413
|
+
text: {},
|
414
|
+
common: {
|
415
|
+
label: 'Key的替换属性'
|
416
|
+
},
|
417
|
+
'common-en-US': {}
|
418
|
+
}
|
419
|
+
}]
|
420
|
+
}, {
|
421
|
+
id: 'value',
|
422
|
+
type: 'text',
|
423
|
+
fields: [{
|
424
|
+
id: 'Rule.Form',
|
425
|
+
type: 'ref',
|
426
|
+
refId: 'com.ronds.schema.default.Rule.Form',
|
427
|
+
value: {
|
428
|
+
text: {},
|
429
|
+
common: {
|
430
|
+
label: 'Vaule的替换属性'
|
431
|
+
},
|
432
|
+
'common-en-US': {}
|
433
|
+
}
|
434
|
+
}]
|
435
|
+
}, {
|
436
|
+
id: 'watch',
|
437
|
+
type: 'text',
|
438
|
+
fields: [{
|
439
|
+
id: 'Rule.Form',
|
440
|
+
type: 'ref',
|
441
|
+
refId: 'com.ronds.schema.default.Rule.Form',
|
442
|
+
value: {
|
443
|
+
text: {},
|
444
|
+
common: {
|
445
|
+
label: '监听',
|
446
|
+
help: '监听多个属性,用英文逗号隔开',
|
447
|
+
placeholder: 'id,name'
|
448
|
+
},
|
449
|
+
'common-en-US': {}
|
450
|
+
}
|
451
|
+
}]
|
452
|
+
}]
|
453
|
+
}]
|
454
|
+
}
|
287
455
|
}
|
288
456
|
};
|
289
457
|
export var RefRule = {
|
@@ -305,11 +473,11 @@ export var RefRule = {
|
|
305
473
|
}
|
306
474
|
}]
|
307
475
|
},
|
308
|
-
types: {
|
476
|
+
types: [{
|
309
477
|
id: 'dependRule',
|
310
478
|
type: 'object',
|
311
479
|
properties: [Rule.depend.show, Rule.depend.hidden]
|
312
|
-
}
|
480
|
+
}]
|
313
481
|
},
|
314
482
|
rules: {
|
315
483
|
props: {
|
@@ -332,11 +500,11 @@ export var RefRule = {
|
|
332
500
|
}
|
333
501
|
}]
|
334
502
|
},
|
335
|
-
types: {
|
503
|
+
types: [{
|
336
504
|
id: 'rulesRule',
|
337
505
|
type: 'object',
|
338
506
|
properties: [Rule.rules.regExp, Rule.rules.message]
|
339
|
-
}
|
507
|
+
}]
|
340
508
|
}
|
341
509
|
},
|
342
510
|
text: {
|
@@ -356,10 +524,36 @@ export var RefRule = {
|
|
356
524
|
}
|
357
525
|
}]
|
358
526
|
},
|
359
|
-
types: {
|
527
|
+
types: [{
|
360
528
|
id: 'textRule',
|
361
529
|
type: 'object',
|
362
530
|
properties: [Rule.text.format]
|
363
|
-
}
|
531
|
+
}]
|
532
|
+
},
|
533
|
+
enum: {
|
534
|
+
props: {
|
535
|
+
id: 'enum',
|
536
|
+
type: 'ref',
|
537
|
+
refId: 'enumRule',
|
538
|
+
fields: [{
|
539
|
+
id: 'Rule.Form',
|
540
|
+
type: 'ref',
|
541
|
+
refId: 'com.ronds.schema.default.Rule.Form',
|
542
|
+
value: {
|
543
|
+
common: {
|
544
|
+
label: '高级设置'
|
545
|
+
},
|
546
|
+
ref: {
|
547
|
+
titleHidden: true
|
548
|
+
},
|
549
|
+
'common-en-US': {}
|
550
|
+
}
|
551
|
+
}]
|
552
|
+
},
|
553
|
+
types: [{
|
554
|
+
id: 'enumRule',
|
555
|
+
type: 'object',
|
556
|
+
properties: [Ref2Rule.enum.value.props, Ref2Rule.enum.http.props]
|
557
|
+
}].concat(_toConsumableArray(Ref2Rule.enum.value.types), _toConsumableArray(Ref2Rule.enum.http.types))
|
364
558
|
}
|
365
559
|
};
|
@@ -4,7 +4,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
/*
|
5
5
|
* @Author: wangxian
|
6
6
|
* @Date: 2023-02-08 14:45:46
|
7
|
-
* @LastEditTime: 2023-02-
|
7
|
+
* @LastEditTime: 2023-02-10 18:18:23
|
8
8
|
*/
|
9
9
|
import { deepClone } from '../../utils';
|
10
10
|
var EMPTY_OBJ = [{
|
@@ -39,7 +39,7 @@ var renderProp = function renderProp(node, setting) {
|
|
39
39
|
_prop.type = node.param.type;
|
40
40
|
_prop.fields[0].value = _objectSpread(_objectSpread({}, _setting), {}, _defineProperty({
|
41
41
|
label: (_setting === null || _setting === void 0 ? void 0 : _setting.label) || node.name
|
42
|
-
}, node.param.type, _objectSpread({}, node.param.rule || {})));
|
42
|
+
}, node.param.type, _objectSpread({}, node.param.rule || _objectSpread({}, _setting[node.param.type]))));
|
43
43
|
return _prop;
|
44
44
|
}; // FG配置生成 metedata
|
45
45
|
|
@@ -12,11 +12,11 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
12
12
|
/*
|
13
13
|
* @Author: wangxian
|
14
14
|
* @Date: 2021-09-18 14:15:04
|
15
|
-
* @LastEditTime: 2023-02-
|
15
|
+
* @LastEditTime: 2023-02-10 14:10:03
|
16
16
|
*/
|
17
17
|
import React from 'react';
|
18
18
|
import { MinusCircleOutlined, PlusOutlined } from '@ant-design/icons';
|
19
|
-
import { MetadataFormContext } from '../interface';
|
19
|
+
import { MetadataFormContext, MetadataRefContext } from '../interface';
|
20
20
|
import { useGetExtraInfo, useWatchDepend } from '../hooks';
|
21
21
|
import { getDataCell } from '../utils';
|
22
22
|
import { deepClone } from '../../../utils';
|
@@ -34,7 +34,21 @@ function Index(props) {
|
|
34
34
|
name = props.name,
|
35
35
|
disabled = props.disabled;
|
36
36
|
var formContext = React.useContext(MetadataFormContext) || {};
|
37
|
-
var
|
37
|
+
var refContext = React.useContext(MetadataRefContext) || {};
|
38
|
+
|
39
|
+
var _fileds = React.useMemo(function () {
|
40
|
+
var ff = formContext === null || formContext === void 0 ? void 0 : formContext.fields;
|
41
|
+
|
42
|
+
if (refContext === null || refContext === void 0 ? void 0 : refContext.fields) {
|
43
|
+
refContext === null || refContext === void 0 ? void 0 : refContext.fields.forEach(function (v, k) {
|
44
|
+
ff.set(k, v);
|
45
|
+
});
|
46
|
+
}
|
47
|
+
|
48
|
+
return ff;
|
49
|
+
}, [formContext === null || formContext === void 0 ? void 0 : formContext.fields, refContext === null || refContext === void 0 ? void 0 : refContext.fields]);
|
50
|
+
|
51
|
+
var extraInfo = useGetExtraInfo(formContext === null || formContext === void 0 ? void 0 : formContext.fields, id, formContext.form, props.type);
|
38
52
|
|
39
53
|
var _React$useState = React.useState(),
|
40
54
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
@@ -99,7 +113,7 @@ function Index(props) {
|
|
99
113
|
rowNumber: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.rowNumber) || 10,
|
100
114
|
refId: items.refId,
|
101
115
|
form: formContext.form,
|
102
|
-
name:
|
116
|
+
name: myName
|
103
117
|
}) : /*#__PURE__*/React.createElement("div", {
|
104
118
|
style: {
|
105
119
|
padding: '10px',
|