ronds-metadata 1.2.14 → 1.2.16

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,8 +4,11 @@ import React from "react";
4
4
  import { withFieldCellWrapper } from '../HOC';
5
5
 
6
6
  var Index = function Index(props) {
7
+ var _setting$text;
8
+
7
9
  var setting = props.setting;
8
10
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Input.TextArea, {
11
+ rows: (setting === null || setting === void 0 ? void 0 : (_setting$text = setting.text) === null || _setting$text === void 0 ? void 0 : _setting$text.textareaRows) || 4,
9
12
  placeholder: setting === null || setting === void 0 ? void 0 : setting.placeholder,
10
13
  disabled: setting === null || setting === void 0 ? void 0 : setting.disabled
11
14
  }));
@@ -1,23 +1,23 @@
1
- .canvas-wrapper {
2
- .drag-item {
3
- position: relative;
4
- border: 1px dashed var(--ronds-metadata-color-border-1);
5
- background: var(--ronds-metadata-color-bg-4);
6
- margin-bottom: 8px;
7
- }
8
-
9
- .drag-item-selected {
10
- border: 1px solid var(--ronds-metadata-color-border-2);
11
- }
12
-
13
- .ant-form-item {
14
- margin-bottom: '4px' !important;
15
- }
16
- .ant-form-item-label {
17
- padding: 0 0 2px !important;
18
- }
19
- .ant-input-number,
20
- .ant-picker {
21
- width: 100%;
22
- }
23
- }
1
+ .canvas-wrapper {
2
+ .drag-item {
3
+ position: relative;
4
+ border: 1px dashed var(--ronds-metadata-color-border-1);
5
+ background: var(--ronds-metadata-color-bg-4);
6
+ margin-bottom: 8px;
7
+ }
8
+
9
+ .drag-item-selected {
10
+ border: 1px solid var(--ronds-metadata-color-border-2);
11
+ }
12
+
13
+ .ant-form-item {
14
+ margin-bottom: '4px' !important;
15
+ }
16
+ .ant-form-item-label {
17
+ padding: 0 0 2px !important;
18
+ }
19
+ .ant-input-number,
20
+ .ant-picker {
21
+ width: 100%;
22
+ }
23
+ }
@@ -455,7 +455,7 @@ export declare const uploadSchema: {
455
455
  }[];
456
456
  }[];
457
457
  }[];
458
- export declare const checkboxSchema: {
458
+ export declare const objSchema: {
459
459
  id: string;
460
460
  type: string;
461
461
  properties: ({
@@ -484,14 +484,7 @@ export declare const checkboxSchema: {
484
484
  };
485
485
  }[];
486
486
  })[];
487
- types: {
488
- id: string;
489
- type: string;
490
- properties: {
491
- id: string;
492
- type: string;
493
- }[];
494
- }[];
487
+ types: any[];
495
488
  }[];
496
489
  export declare const settingSchema: {
497
490
  input: {
@@ -951,6 +944,99 @@ export declare const settingSchema: {
951
944
  }[];
952
945
  }[];
953
946
  }[];
947
+ obj: {
948
+ id: string;
949
+ type: string;
950
+ properties: ({
951
+ id: string;
952
+ type: string;
953
+ fields: {
954
+ id: string;
955
+ type: string;
956
+ refId: string;
957
+ value: {
958
+ label: string;
959
+ };
960
+ }[];
961
+ } | {
962
+ id: string;
963
+ type: string;
964
+ fields: {
965
+ id: string;
966
+ type: string;
967
+ refId: string;
968
+ value: {
969
+ common: {
970
+ label: string;
971
+ };
972
+ 'common-en-US': {};
973
+ };
974
+ }[];
975
+ })[];
976
+ types: any[];
977
+ }[];
978
+ list: {
979
+ id: string;
980
+ type: string;
981
+ properties: ({
982
+ id: string;
983
+ type: string;
984
+ fields: {
985
+ id: string;
986
+ type: string;
987
+ refId: string;
988
+ value: {
989
+ label: string;
990
+ };
991
+ }[];
992
+ } | {
993
+ id: string;
994
+ type: string;
995
+ fields: {
996
+ id: string;
997
+ type: string;
998
+ refId: string;
999
+ value: {
1000
+ common: {
1001
+ label: string;
1002
+ };
1003
+ 'common-en-US': {};
1004
+ };
1005
+ }[];
1006
+ })[];
1007
+ types: any[];
1008
+ }[];
1009
+ table: {
1010
+ id: string;
1011
+ type: string;
1012
+ properties: ({
1013
+ id: string;
1014
+ type: string;
1015
+ fields: {
1016
+ id: string;
1017
+ type: string;
1018
+ refId: string;
1019
+ value: {
1020
+ label: string;
1021
+ };
1022
+ }[];
1023
+ } | {
1024
+ id: string;
1025
+ type: string;
1026
+ fields: {
1027
+ id: string;
1028
+ type: string;
1029
+ refId: string;
1030
+ value: {
1031
+ common: {
1032
+ label: string;
1033
+ };
1034
+ 'common-en-US': {};
1035
+ };
1036
+ }[];
1037
+ })[];
1038
+ types: any[];
1039
+ }[];
954
1040
  };
955
1041
  export declare const inputParam: {
956
1042
  type: string;
@@ -1709,26 +1795,7 @@ export declare const objParam: {
1709
1795
  };
1710
1796
  }[];
1711
1797
  })[];
1712
- types: {
1713
- id: string;
1714
- type: string;
1715
- properties: {
1716
- id: string;
1717
- type: string;
1718
- fields: {
1719
- id: string;
1720
- type: string;
1721
- refId: string;
1722
- value: {
1723
- text: {};
1724
- common: {
1725
- label: string;
1726
- };
1727
- 'common-en-US': {};
1728
- };
1729
- }[];
1730
- }[];
1731
- }[];
1798
+ types: any[];
1732
1799
  }[];
1733
1800
  };
1734
1801
  export declare const listParam: {
@@ -1762,26 +1829,7 @@ export declare const listParam: {
1762
1829
  };
1763
1830
  }[];
1764
1831
  })[];
1765
- types: {
1766
- id: string;
1767
- type: string;
1768
- properties: {
1769
- id: string;
1770
- type: string;
1771
- fields: {
1772
- id: string;
1773
- type: string;
1774
- refId: string;
1775
- value: {
1776
- text: {};
1777
- common: {
1778
- label: string;
1779
- };
1780
- 'common-en-US': {};
1781
- };
1782
- }[];
1783
- }[];
1784
- }[];
1832
+ types: any[];
1785
1833
  }[];
1786
1834
  };
1787
1835
  export declare const tableParam: {
@@ -1815,26 +1863,7 @@ export declare const tableParam: {
1815
1863
  };
1816
1864
  }[];
1817
1865
  })[];
1818
- types: {
1819
- id: string;
1820
- type: string;
1821
- properties: {
1822
- id: string;
1823
- type: string;
1824
- fields: {
1825
- id: string;
1826
- type: string;
1827
- refId: string;
1828
- value: {
1829
- text: {};
1830
- common: {
1831
- label: string;
1832
- };
1833
- 'common-en-US': {};
1834
- };
1835
- }[];
1836
- }[];
1837
- }[];
1866
+ types: any[];
1838
1867
  }[];
1839
1868
  rule: {
1840
1869
  layout: string;
@@ -1875,26 +1904,7 @@ export declare const layoutComps: {
1875
1904
  };
1876
1905
  }[];
1877
1906
  })[];
1878
- types: {
1879
- id: string;
1880
- type: string;
1881
- properties: {
1882
- id: string;
1883
- type: string;
1884
- fields: {
1885
- id: string;
1886
- type: string;
1887
- refId: string;
1888
- value: {
1889
- text: {};
1890
- common: {
1891
- label: string;
1892
- };
1893
- 'common-en-US': {};
1894
- };
1895
- }[];
1896
- }[];
1897
- }[];
1907
+ types: any[];
1898
1908
  }[];
1899
1909
  };
1900
1910
  }[];
@@ -1935,14 +1945,7 @@ export declare const sidebarCtx: {
1935
1945
  };
1936
1946
  }[];
1937
1947
  })[];
1938
- types: {
1939
- id: string;
1940
- type: string;
1941
- properties: {
1942
- id: string;
1943
- type: string;
1944
- }[];
1945
- }[];
1948
+ types: any[];
1946
1949
  }[];
1947
1950
  };
1948
1951
  }[];
@@ -3,7 +3,7 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
3
  /*
4
4
  * @Author: wangxian
5
5
  * @Date: 2023-02-06 08:24:17
6
- * @LastEditTime: 2023-02-28 14:13:40
6
+ * @LastEditTime: 2023-02-28 16:43:15
7
7
  */
8
8
  import { RefRule, Rule } from './ruleConfig';
9
9
  export var inputSchema = [{
@@ -15,8 +15,8 @@ export var inputSchema = [{
15
15
  export var textareaSchema = [{
16
16
  id: 'textareaSchema',
17
17
  type: 'object',
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.br, Rule.common.hidden, RefRule.common.depend.props, RefRule.common.rules.props],
19
- types: [].concat(_toConsumableArray(RefRule.common.depend.types), _toConsumableArray(RefRule.common.rules.types))
18
+ properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, RefRule.textarea.props, Rule.common.defaultValue, Rule.common.help, Rule.common.tooltip, Rule.common.placeholder, Rule.common.require, Rule.common.disabled, Rule.common.br, Rule.common.hidden, RefRule.common.depend.props, RefRule.common.rules.props],
19
+ types: [].concat(_toConsumableArray(RefRule.common.depend.types), _toConsumableArray(RefRule.textarea.types), _toConsumableArray(RefRule.common.rules.types))
20
20
  }];
21
21
  export var dateSchema = [{
22
22
  id: 'dateSchema',
@@ -62,11 +62,11 @@ export var uploadSchema = [{
62
62
  properties: [Rule.common.id, Rule.common.label, Rule.common.color, Rule.common.colSpan, Rule.common.help, Rule.common.tooltip, Rule.common.require, Rule.common.disabled, Rule.common.br, RefRule.common.depend.props],
63
63
  types: _toConsumableArray(RefRule.common.depend.types)
64
64
  }];
65
- export var checkboxSchema = [{
66
- id: 'checkboxSchema',
65
+ export var objSchema = [{
66
+ id: 'objSchema',
67
67
  type: 'object',
68
- 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.br, Rule.common.hidden, RefRule.common.depend.props],
69
- types: [].concat(_toConsumableArray(RefRule.common.depend.types), _toConsumableArray(RefRule.enum.types))
68
+ properties: [Rule.common.id, Rule.common.label, Rule.common.colSpan, Rule.common.help, Rule.common.tooltip, Rule.common.hidden],
69
+ types: []
70
70
  }];
71
71
  export var settingSchema = {
72
72
  input: inputSchema,
@@ -77,7 +77,10 @@ export var settingSchema = {
77
77
  select: selectSchema,
78
78
  color: colorSchema,
79
79
  password: passwordSchema,
80
- upload: uploadSchema
80
+ upload: uploadSchema,
81
+ obj: objSchema,
82
+ list: objSchema,
83
+ table: objSchema
81
84
  };
82
85
  export var inputParam = {
83
86
  type: 'text',
@@ -217,15 +220,15 @@ export var complexComps = [{
217
220
  }];
218
221
  export var objParam = {
219
222
  type: 'ref',
220
- schema: settingSchema.input
223
+ schema: settingSchema.obj
221
224
  };
222
225
  export var listParam = {
223
226
  type: 'array',
224
- schema: settingSchema.input
227
+ schema: settingSchema.list
225
228
  };
226
229
  export var tableParam = {
227
230
  type: 'array',
228
- schema: settingSchema.input,
231
+ schema: settingSchema.table,
229
232
  rule: {
230
233
  layout: 'table'
231
234
  }
@@ -252,6 +252,22 @@ export declare const Rule: {
252
252
  };
253
253
  }[];
254
254
  };
255
+ textareaRows: {
256
+ id: string;
257
+ type: string;
258
+ fields: {
259
+ id: string;
260
+ type: string;
261
+ refId: string;
262
+ value: {
263
+ text: {};
264
+ common: {
265
+ label: string;
266
+ };
267
+ 'common-en-US': {};
268
+ };
269
+ }[];
270
+ };
255
271
  };
256
272
  rules: {
257
273
  regExp: {
@@ -411,6 +427,44 @@ export declare const RefRule: {
411
427
  }[];
412
428
  }[];
413
429
  };
430
+ textarea: {
431
+ props: {
432
+ id: string;
433
+ type: string;
434
+ refId: string;
435
+ fields: {
436
+ id: string;
437
+ type: string;
438
+ refId: string;
439
+ value: {
440
+ common: {
441
+ label: string;
442
+ };
443
+ 'common-en-US': {};
444
+ };
445
+ }[];
446
+ };
447
+ types: {
448
+ id: string;
449
+ type: string;
450
+ properties: {
451
+ id: string;
452
+ type: string;
453
+ fields: {
454
+ id: string;
455
+ type: string;
456
+ refId: string;
457
+ value: {
458
+ text: {};
459
+ common: {
460
+ label: string;
461
+ };
462
+ 'common-en-US': {};
463
+ };
464
+ }[];
465
+ }[];
466
+ }[];
467
+ };
414
468
  enum: {
415
469
  props: {
416
470
  id: string;
@@ -3,7 +3,7 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
3
3
  /*
4
4
  * @Author: wangxian
5
5
  * @Date: 2023-02-08 10:36:25
6
- * @LastEditTime: 2023-02-28 13:48:31
6
+ * @LastEditTime: 2023-02-28 16:11:14
7
7
  */
8
8
  import { DEFAULT_DATE_FORMAT } from '../../../comps/MetadataForm/DataCell/Input';
9
9
  export var Rule = {
@@ -279,6 +279,22 @@ export var Rule = {
279
279
  'common-en-US': {}
280
280
  }
281
281
  }]
282
+ },
283
+ textareaRows: {
284
+ id: 'textareaRows',
285
+ type: 'number',
286
+ fields: [{
287
+ id: 'Rule.Form',
288
+ type: 'ref',
289
+ refId: 'com.ronds.schema.default.Rule.Form',
290
+ value: {
291
+ text: {},
292
+ common: {
293
+ label: '默认高度'
294
+ },
295
+ 'common-en-US': {}
296
+ }
297
+ }]
282
298
  }
283
299
  },
284
300
  rules: {
@@ -420,11 +436,14 @@ var Ref2Rule = {
420
436
  type: 'ref',
421
437
  refId: 'com.ronds.schema.default.Rule.Form',
422
438
  value: {
423
- text: {},
439
+ text: {
440
+ type: 'textarea'
441
+ },
424
442
  common: {
425
443
  label: 'Body参数',
426
444
  help: '支持Json字符串,系统会自动序列化',
427
- depend: {// show: `method=='post'`,
445
+ depend: {
446
+ show: "method=='post'"
428
447
  }
429
448
  },
430
449
  'common-en-US': {}
@@ -558,6 +577,29 @@ export var RefRule = {
558
577
  properties: [Rule.text.format]
559
578
  }]
560
579
  },
580
+ textarea: {
581
+ props: {
582
+ id: 'text',
583
+ type: 'ref',
584
+ refId: 'textareaRule',
585
+ fields: [{
586
+ id: 'Rule.Form',
587
+ type: 'ref',
588
+ refId: 'com.ronds.schema.default.Rule.Form',
589
+ value: {
590
+ common: {
591
+ label: '高级设置'
592
+ },
593
+ 'common-en-US': {}
594
+ }
595
+ }]
596
+ },
597
+ types: [{
598
+ id: 'textareaRule',
599
+ type: 'object',
600
+ properties: [Rule.text.textareaRows]
601
+ }]
602
+ },
561
603
  enum: {
562
604
  props: {
563
605
  id: 'enum',
@@ -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-28 09:22:50
7
+ * @LastEditTime: 2023-03-01 15:53:54
8
8
  */
9
9
  import { deepClone } from '../../utils';
10
10
  import { basicComps, complexComps, layoutComps } from './settings';
@@ -139,6 +139,7 @@ var renderJson = function renderJson(comps, type, id, field) {
139
139
  };
140
140
 
141
141
  var getTypeJson = function getTypeJson(id, type, field) {
142
+ /* */
142
143
  var res = {
143
144
  node: {},
144
145
  setting: {}
@@ -1,41 +1,41 @@
1
- pre {
2
- margin: 0;
3
- font-weight: 900;
4
- font-size: 14px;
5
- }
6
- .string {
7
- color: #3ab54a;
8
- }
9
- .number {
10
- color: #25aae2;
11
- }
12
- .boolean {
13
- color: #f98280;
14
- }
15
- .null {
16
- color: #f1592a;
17
- }
18
- .width-10 {
19
- width: 10px;
20
- }
21
- .key {
22
- color: #92278f;
23
- }
24
- .open {
25
- display: inline-block;
26
- width: 12px;
27
- height: 12px;
28
- background: url('./icon/close.png') no-repeat;
29
- background-size: 100% 100%;
30
- vertical-align: middle;
31
- cursor: pointer;
32
- }
33
- .close {
34
- display: inline-block;
35
- width: 12px;
36
- height: 12px;
37
- background: url('./icon/open.png') no-repeat;
38
- background-size: 100% 100%;
39
- vertical-align: middle;
40
- cursor: pointer;
41
- }
1
+ pre {
2
+ margin: 0;
3
+ font-weight: 900;
4
+ font-size: 14px;
5
+ }
6
+ .string {
7
+ color: #3ab54a;
8
+ }
9
+ .number {
10
+ color: #25aae2;
11
+ }
12
+ .boolean {
13
+ color: #f98280;
14
+ }
15
+ .null {
16
+ color: #f1592a;
17
+ }
18
+ .width-10 {
19
+ width: 10px;
20
+ }
21
+ .key {
22
+ color: #92278f;
23
+ }
24
+ .open {
25
+ display: inline-block;
26
+ width: 12px;
27
+ height: 12px;
28
+ background: url('./icon/close.png') no-repeat;
29
+ background-size: 100% 100%;
30
+ vertical-align: middle;
31
+ cursor: pointer;
32
+ }
33
+ .close {
34
+ display: inline-block;
35
+ width: 12px;
36
+ height: 12px;
37
+ background: url('./icon/open.png') no-repeat;
38
+ background-size: 100% 100%;
39
+ vertical-align: middle;
40
+ cursor: pointer;
41
+ }