ronds-metadata 1.2.9 → 1.2.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Table.d.ts +2 -0
  2. package/es/comps/FormGenerator/comps/Canvas/core/index.less +23 -23
  3. package/es/comps/FormGenerator/settings/index.d.ts +652 -86
  4. package/es/comps/MetadataForm/index.less +1 -1
  5. package/package.json +1 -1
  6. package/es/api/index.js +0 -249
  7. package/es/comps/DynamicPorts/comps/ContextMenu.js +0 -44
  8. package/es/comps/DynamicPorts/comps/DragNode.js +0 -55
  9. package/es/comps/DynamicPorts/comps/GraphHandler/index.js +0 -51
  10. package/es/comps/DynamicPorts/comps/NodeElement.js +0 -30
  11. package/es/comps/DynamicPorts/comps/contextMenu/EdgeContextMenu/index.js +0 -42
  12. package/es/comps/DynamicPorts/comps/contextMenu/GraphContextMenu/index.js +0 -40
  13. package/es/comps/DynamicPorts/comps/contextMenu/NodeContextMenu/index.js +0 -55
  14. package/es/comps/DynamicPorts/comps/shape/connector.js +0 -19
  15. package/es/comps/DynamicPorts/comps/shape/edge.js +0 -91
  16. package/es/comps/DynamicPorts/comps/shape/node.js +0 -190
  17. package/es/comps/DynamicPorts/constant/index.js +0 -19
  18. package/es/comps/DynamicPorts/graph.js +0 -697
  19. package/es/comps/DynamicPorts/index.js +0 -143
  20. package/es/comps/DynamicPorts/interface.js +0 -6
  21. package/es/comps/DynamicPorts/utils.js +0 -127
  22. package/es/comps/Editable/DataCell/ButtonCell.js +0 -45
  23. package/es/comps/Editable/DataCell/ColorPicker.js +0 -33
  24. package/es/comps/Editable/DataCell/Input.js +0 -54
  25. package/es/comps/Editable/DataCell/Number.js +0 -44
  26. package/es/comps/Editable/DataCell/Select.js +0 -48
  27. package/es/comps/Editable/DataCell/Switch.js +0 -33
  28. package/es/comps/Editable/comps/EditableAction.js +0 -110
  29. package/es/comps/Editable/comps/EditableCell.js +0 -108
  30. package/es/comps/Editable/comps/EditableHeardCell.js +0 -172
  31. package/es/comps/Editable/comps/EditableRow.js +0 -118
  32. package/es/comps/Editable/comps/Texty.js +0 -277
  33. package/es/comps/Editable/index.js +0 -385
  34. package/es/comps/Editable/interface.js +0 -8
  35. package/es/comps/Editable/utils.js +0 -46
  36. package/es/comps/FileView/index.js +0 -198
  37. package/es/comps/FormGenerator/Provider.js +0 -8
  38. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Checkbox.js +0 -17
  39. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Color.js +0 -17
  40. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Date.js +0 -16
  41. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Input.js +0 -17
  42. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/List.js +0 -50
  43. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/MutiSelect.js +0 -55
  44. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Number.js +0 -14
  45. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Obj.js +0 -50
  46. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Password.js +0 -17
  47. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Radio.js +0 -17
  48. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Select.js +0 -55
  49. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Switch.js +0 -13
  50. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/TextArea.js +0 -14
  51. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/Cell/Upload.js +0 -17
  52. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/HOC/index.js +0 -250
  53. package/es/comps/FormGenerator/comps/Canvas/core/RenderField/index.js +0 -60
  54. package/es/comps/FormGenerator/comps/Canvas/core/index.js +0 -313
  55. package/es/comps/FormGenerator/comps/Canvas/index.js +0 -118
  56. package/es/comps/FormGenerator/comps/Settings/index.js +0 -150
  57. package/es/comps/FormGenerator/comps/Sidebar/Elements.js +0 -48
  58. package/es/comps/FormGenerator/comps/Sidebar/index.js +0 -37
  59. package/es/comps/FormGenerator/index.js +0 -67
  60. package/es/comps/FormGenerator/settings/index.js +0 -307
  61. package/es/comps/FormGenerator/settings/ruleConfig.js +0 -557
  62. package/es/comps/FormGenerator/transformer.js +0 -223
  63. package/es/comps/Icons/index.js +0 -23
  64. package/es/comps/JsonEdit/constant/index.js +0 -87
  65. package/es/comps/JsonEdit/index.js +0 -221
  66. package/es/comps/JsonView/index.js +0 -109
  67. package/es/comps/MdEdit/index.js +0 -41
  68. package/es/comps/MdNavbar/index.js +0 -180
  69. package/es/comps/MdNavbar/utils.js +0 -34
  70. package/es/comps/MdView/index.js +0 -70
  71. package/es/comps/MetadataEdit/components/MetaFieldsEdit.js +0 -419
  72. package/es/comps/MetadataEdit/components/MetaPropsEdit.js +0 -368
  73. package/es/comps/MetadataEdit/constant/index.js +0 -69
  74. package/es/comps/MetadataEdit/hooks/index.js +0 -43
  75. package/es/comps/MetadataEdit/index.js +0 -255
  76. package/es/comps/MetadataEditV2/components/MetaFieldsEdit.js +0 -237
  77. package/es/comps/MetadataEditV2/components/MetaPropsEdit.js +0 -367
  78. package/es/comps/MetadataEditV2/constant/index.js +0 -69
  79. package/es/comps/MetadataEditV2/hooks/index.js +0 -43
  80. package/es/comps/MetadataEditV2/index.js +0 -298
  81. package/es/comps/MetadataForm/DataCell/Array.js +0 -147
  82. package/es/comps/MetadataForm/DataCell/Input.js +0 -199
  83. package/es/comps/MetadataForm/DataCell/Number.js +0 -130
  84. package/es/comps/MetadataForm/DataCell/Ref.js +0 -325
  85. package/es/comps/MetadataForm/DataCell/Select.js +0 -518
  86. package/es/comps/MetadataForm/DataCell/Switch.js +0 -115
  87. package/es/comps/MetadataForm/DataCell/layout/TableArray.js +0 -359
  88. package/es/comps/MetadataForm/HOC/index.js +0 -125
  89. package/es/comps/MetadataForm/constants.js +0 -11
  90. package/es/comps/MetadataForm/hooks/index.js +0 -128
  91. package/es/comps/MetadataForm/index.js +0 -268
  92. package/es/comps/MetadataForm/interface.js +0 -8
  93. package/es/comps/MetadataForm/utils.js +0 -112
  94. package/es/comps/locales/en-US.js +0 -24
  95. package/es/comps/locales/index.js +0 -8
  96. package/es/comps/locales/zh-CN.js +0 -24
  97. package/es/config.js +0 -50
  98. package/es/framework/graph/index.js +0 -515
  99. package/es/framework/hooks/use-async-memo.js +0 -32
  100. package/es/framework/hooks/use-sync-scroll.js +0 -106
  101. package/es/framework/http/cache.js +0 -137
  102. package/es/framework/http/cancel.js +0 -44
  103. package/es/framework/http/index.js +0 -392
  104. package/es/framework/http/msgpack.js +0 -34
  105. package/es/framework/http/msgpack5/index.js +0 -84
  106. package/es/framework/http/msgpack5/lib/codecs/DateCodec.js +0 -71
  107. package/es/framework/http/msgpack5/lib/decoder.js +0 -287
  108. package/es/framework/http/msgpack5/lib/encoder.js +0 -252
  109. package/es/framework/http/msgpack5/lib/helpers.js +0 -23
  110. package/es/framework/http/msgpack5/lib/streams.js +0 -93
  111. package/es/framework/http/types.js +0 -1
  112. package/es/framework/libs/jquery.min.js +0 -4022
  113. package/es/framework/locale/dil8/di18n.js +0 -132
  114. package/es/framework/locale/dil8/index.js +0 -3
  115. package/es/framework/locale/dil8/translate.js +0 -76
  116. package/es/framework/locale/dil8/util.js +0 -17
  117. package/es/framework/locale/index.js +0 -26
  118. package/es/framework/metadata/MetadataService.js +0 -169
  119. package/es/framework/metadata/index.js +0 -384
  120. package/es/framework/rxjs-hooks/useMemoSubject.js +0 -16
  121. package/es/framework/rxjs-hooks/useObservable.js +0 -22
  122. package/es/framework/rxjs-hooks/useObservableState.js +0 -45
  123. package/es/index.js +0 -27
  124. package/es/utils.js +0 -138
@@ -1,367 +0,0 @@
1
- import "antd/es/space/style";
2
- import _Space from "antd/es/space";
3
- import _extends from "@babel/runtime/helpers/esm/extends";
4
- import "antd/es/tooltip/style";
5
- import _Tooltip from "antd/es/tooltip";
6
- import "antd/es/button/style";
7
- import _Button from "antd/es/button";
8
- import "antd/es/select/style";
9
- import _Select from "antd/es/select";
10
- import "antd/es/form/style";
11
- import _Form from "antd/es/form";
12
- import "antd/es/input/style";
13
- import _Input from "antd/es/input";
14
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
15
- import React from 'react';
16
- import { MinusCircleOutlined, PlusOutlined, ReloadOutlined } from '@ant-design/icons';
17
- import { ARRAY_TYPES_OPTIONS, BASIC_TYPES_OPTIONS, NUMBER_FORMAT_OPTIONS } from '../constant';
18
- import { useMetaType } from '../hooks'; // import { guid } from '../../../utils';
19
-
20
- import TextArea from "antd/es/input/TextArea";
21
-
22
- var MetaPropsEdit = function MetaPropsEdit(props) {
23
- var form = props.form,
24
- id = props.id,
25
- metadataTag = props.metadataTag,
26
- name = props.name,
27
- onAddFields = props.onAddFields,
28
- onNewRefClick = props.onNewRefClick;
29
-
30
- var _React$useState = React.useState(true),
31
- _React$useState2 = _slicedToArray(_React$useState, 2),
32
- refresh = _React$useState2[0],
33
- setRefresh = _React$useState2[1];
34
-
35
- var metaType = useMetaType(metadataTag, refresh); // console.log('metaType', metaType, id);
36
- // 赋值
37
-
38
- var onTypeChange = function onTypeChange(idx) {
39
- var _properties = form.getFieldValue('properties'); // console.log('_propertie=========', _properties, idx);
40
-
41
-
42
- var __properties = {
43
- id: _properties[idx].id,
44
- type: _properties[idx].type,
45
- name: _properties[idx].name,
46
- code: _properties[idx].code,
47
- desc: _properties[idx].desc
48
- };
49
- _properties[idx] = __properties;
50
- form.setFieldsValue({
51
- properties: _properties
52
- });
53
- };
54
-
55
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Form.List, {
56
- name: name
57
- }, function (fields, _ref) {
58
- var add = _ref.add,
59
- remove = _ref.remove;
60
- return /*#__PURE__*/React.createElement(React.Fragment, null, fields.map(function (field, index) {
61
- // console.log('field=============', field);
62
- return /*#__PURE__*/React.createElement("div", {
63
- key: Math.random()
64
- }, /*#__PURE__*/React.createElement("div", {
65
- key: Math.random(),
66
- style: {
67
- display: 'flex',
68
- alignItems: 'flex-end',
69
- flexWrap: 'wrap'
70
- }
71
- }, /*#__PURE__*/React.createElement(_Form.Item, {
72
- className: "pr-10",
73
- label: "\u540D\u79F0",
74
- name: [field.name, 'name'],
75
- fieldKey: [field === null || field === void 0 ? void 0 : field.fieldKey, 'name'],
76
- rules: [{
77
- required: true
78
- }]
79
- }, /*#__PURE__*/React.createElement(_Input, null)), /*#__PURE__*/React.createElement(_Form.Item, {
80
- className: "pr-10",
81
- label: "\u7F16\u7801",
82
- name: [field.name, 'code'],
83
- fieldKey: [field === null || field === void 0 ? void 0 : field.fieldKey, 'code'],
84
- rules: [{
85
- required: true
86
- }]
87
- }, /*#__PURE__*/React.createElement(_Input, null)), /*#__PURE__*/React.createElement(_Form.Item, {
88
- className: "pr-10",
89
- label: "\u5B57\u6BB5\u540D\u79F0",
90
- name: [field === null || field === void 0 ? void 0 : field.name, 'id'],
91
- fieldKey: [field === null || field === void 0 ? void 0 : field.fieldKey, 'id'],
92
- rules: [{
93
- required: true
94
- }]
95
- }, /*#__PURE__*/React.createElement(_Input, null)), /*#__PURE__*/React.createElement(_Form.Item, {
96
- className: "pr-10",
97
- label: "\u5B57\u6BB5\u7C7B\u578B",
98
- name: [field === null || field === void 0 ? void 0 : field.name, 'type'],
99
- fieldKey: [field === null || field === void 0 ? void 0 : field.fieldKey, 'type'],
100
- rules: [{
101
- required: true
102
- }]
103
- }, /*#__PURE__*/React.createElement(_Select, {
104
- style: {
105
- width: '100%'
106
- },
107
- options: BASIC_TYPES_OPTIONS,
108
- onChange: function onChange() {
109
- onTypeChange(index);
110
- }
111
- })), /*#__PURE__*/React.createElement(_Form.Item, {
112
- className: "pr-10",
113
- label: "\u63CF\u8FF0",
114
- style: {
115
- width: '80%'
116
- },
117
- name: [field.name, 'desc'],
118
- fieldKey: [field.fieldKey, 'desc']
119
- }, /*#__PURE__*/React.createElement(TextArea, null)), /*#__PURE__*/React.createElement("div", {
120
- style: {
121
- lineHeight: '88px',
122
- paddingLeft: '15px'
123
- }
124
- }, /*#__PURE__*/React.createElement(MinusCircleOutlined, {
125
- onClick: function onClick() {
126
- return remove(field.name);
127
- }
128
- })), onAddFields && /*#__PURE__*/React.createElement(_Form.Item, {
129
- style: {
130
- flex: 1,
131
- textAlign: 'right'
132
- }
133
- }, /*#__PURE__*/React.createElement(_Tooltip, {
134
- title: "\u6DFB\u52A0\u6269\u5C55\u89C4\u5219"
135
- }, /*#__PURE__*/React.createElement(_Button, {
136
- shape: "circle",
137
- size: "small",
138
- type: "primary",
139
- onClick: function onClick() {
140
- onAddFields(index);
141
- },
142
- icon: /*#__PURE__*/React.createElement(PlusOutlined, null)
143
- })))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_Form.Item, {
144
- noStyle: true,
145
- shouldUpdate: function shouldUpdate(prevValues, currentValues) {
146
- var _prevValues$name$inde, _currentValues$name$i, _prevValues$name$inde2, _currentValues$name$i2;
147
-
148
- return (prevValues === null || prevValues === void 0 ? void 0 : (_prevValues$name$inde = prevValues[name][index]) === null || _prevValues$name$inde === void 0 ? void 0 : _prevValues$name$inde.type) !== (currentValues === null || currentValues === void 0 ? void 0 : (_currentValues$name$i = currentValues[name][index]) === null || _currentValues$name$i === void 0 ? void 0 : _currentValues$name$i.type) || (prevValues === null || prevValues === void 0 ? void 0 : (_prevValues$name$inde2 = prevValues[name][index]) === null || _prevValues$name$inde2 === void 0 ? void 0 : _prevValues$name$inde2.items) !== (currentValues === null || currentValues === void 0 ? void 0 : (_currentValues$name$i2 = currentValues[name][index]) === null || _currentValues$name$i2 === void 0 ? void 0 : _currentValues$name$i2.items);
149
- }
150
- }, function (_ref2) {
151
- var _properties$index, _properties$index2, _properties$index2$it, _properties$index3, _properties$index3$it;
152
-
153
- var getFieldValue = _ref2.getFieldValue;
154
-
155
- var _properties = getFieldValue(name);
156
-
157
- switch ((_properties$index = _properties[index]) === null || _properties$index === void 0 ? void 0 : _properties$index.type) {
158
- case 'number':
159
- return /*#__PURE__*/React.createElement("div", {
160
- style: {
161
- border: '1px solid var(--ronds-metadata-color-border-1)',
162
- padding: '10px',
163
- marginBottom: '10px'
164
- }
165
- }, /*#__PURE__*/React.createElement(_Form.Item, _extends({}, field, {
166
- label: "format",
167
- name: [field.name, 'format'],
168
- fieldKey: [field.fieldKey, 'format'],
169
- rules: [{
170
- required: true
171
- }]
172
- }), /*#__PURE__*/React.createElement(_Select, {
173
- style: {
174
- width: '180px'
175
- },
176
- options: NUMBER_FORMAT_OPTIONS
177
- })));
178
-
179
- case 'ref':
180
- return /*#__PURE__*/React.createElement("div", {
181
- style: {
182
- border: '1px solid var(--ronds-metadata-color-border-1)',
183
- padding: '10px',
184
- display: 'flex',
185
- alignItems: 'center',
186
- marginBottom: '10px'
187
- }
188
- }, /*#__PURE__*/React.createElement(_Form.Item, _extends({}, field, {
189
- label: "Ref",
190
- name: [field.name, 'refId'],
191
- fieldKey: [field.fieldKey, 'refId'],
192
- rules: [{
193
- required: true
194
- }]
195
- }), /*#__PURE__*/React.createElement(_Select, {
196
- style: {
197
- width: '180px'
198
- },
199
- options: metaType || []
200
- })), /*#__PURE__*/React.createElement("div", {
201
- style: {
202
- padding: '0 10px'
203
- }
204
- }, /*#__PURE__*/React.createElement(_Tooltip, {
205
- title: "\u6DFB\u52A0\u5F15\u7528\u7C7B\u578B"
206
- }, /*#__PURE__*/React.createElement(_Button, {
207
- shape: "circle",
208
- size: "small",
209
- type: "primary",
210
- onClick: function onClick() {
211
- onNewRefClick && onNewRefClick();
212
- },
213
- icon: /*#__PURE__*/React.createElement(PlusOutlined, null)
214
- })), /*#__PURE__*/React.createElement(_Tooltip, {
215
- title: "\u5237\u65B0"
216
- }, /*#__PURE__*/React.createElement(_Button, {
217
- shape: "circle",
218
- size: "small",
219
- style: {
220
- marginLeft: '10px'
221
- },
222
- onClick: function onClick() {
223
- setRefresh(false);
224
- setTimeout(function () {
225
- setRefresh(true);
226
- }, 100);
227
- },
228
- icon: /*#__PURE__*/React.createElement(ReloadOutlined, null)
229
- }))));
230
-
231
- case 'array':
232
- return /*#__PURE__*/React.createElement("div", {
233
- style: {
234
- border: '1px solid var(--ronds-metadata-color-border-1)',
235
- borderRadius: '5px',
236
- padding: '10px',
237
- marginBottom: '10px',
238
- display: 'flex',
239
- alignItems: 'center'
240
- }
241
- }, /*#__PURE__*/React.createElement(_Form.Item, _extends({}, field, {
242
- label: "Array",
243
- className: "pr-10",
244
- name: [field.name, 'items', 'type'],
245
- fieldKey: [field.fieldKey, 'items', 'type'],
246
- rules: [{
247
- required: true
248
- }]
249
- }), /*#__PURE__*/React.createElement(_Select, {
250
- style: {
251
- width: '180px'
252
- },
253
- options: ARRAY_TYPES_OPTIONS
254
- })), _properties && ((_properties$index2 = _properties[index]) === null || _properties$index2 === void 0 ? void 0 : (_properties$index2$it = _properties$index2.items) === null || _properties$index2$it === void 0 ? void 0 : _properties$index2$it.type) === 'ref' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Form.Item, _extends({}, field, {
255
- label: "Ref",
256
- name: [field.name, 'items', 'refId'],
257
- fieldKey: [field.fieldKey, 'items', 'refId'],
258
- rules: [{
259
- required: true
260
- }]
261
- }), /*#__PURE__*/React.createElement(_Select, {
262
- style: {
263
- width: '180px'
264
- },
265
- options: metaType || []
266
- })), /*#__PURE__*/React.createElement("div", {
267
- style: {
268
- padding: '0 10px'
269
- }
270
- }, /*#__PURE__*/React.createElement(_Tooltip, {
271
- title: "\u6DFB\u52A0\u5F15\u7528\u7C7B\u578B"
272
- }, /*#__PURE__*/React.createElement(_Button, {
273
- shape: "circle",
274
- size: "small",
275
- type: "primary",
276
- onClick: function onClick() {
277
- onNewRefClick && onNewRefClick();
278
- },
279
- icon: /*#__PURE__*/React.createElement(PlusOutlined, null)
280
- })), /*#__PURE__*/React.createElement(_Tooltip, {
281
- title: "\u5237\u65B0"
282
- }, /*#__PURE__*/React.createElement(_Button, {
283
- shape: "circle",
284
- size: "small",
285
- style: {
286
- marginLeft: '10px'
287
- },
288
- onClick: function onClick() {
289
- setRefresh(false);
290
- setTimeout(function () {
291
- setRefresh(true);
292
- }, 100);
293
- },
294
- icon: /*#__PURE__*/React.createElement(ReloadOutlined, null)
295
- })))), _properties && ((_properties$index3 = _properties[index]) === null || _properties$index3 === void 0 ? void 0 : (_properties$index3$it = _properties$index3.items) === null || _properties$index3$it === void 0 ? void 0 : _properties$index3$it.type) === 'number' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Form.Item, _extends({}, field, {
296
- label: "format",
297
- name: [field.name, 'items', 'format'],
298
- fieldKey: [field.fieldKey, 'items', 'format'],
299
- rules: [{
300
- required: true
301
- }]
302
- }), /*#__PURE__*/React.createElement(_Select, {
303
- style: {
304
- width: '180px'
305
- },
306
- options: NUMBER_FORMAT_OPTIONS
307
- }))));
308
-
309
- case 'enum':
310
- return /*#__PURE__*/React.createElement("div", {
311
- style: {
312
- border: '1px solid var(--ronds-metadata-color-border-1)',
313
- padding: '10px',
314
- marginBottom: '10px'
315
- }
316
- }, /*#__PURE__*/React.createElement(_Form.List, {
317
- name: [field.name, 'enum']
318
- }, function (enumFields, operation) {
319
- return /*#__PURE__*/React.createElement(React.Fragment, null, enumFields.map(function (enumField) {
320
- return /*#__PURE__*/React.createElement(_Space, {
321
- key: "enumField-".concat(enumField.key),
322
- align: "baseline"
323
- }, /*#__PURE__*/React.createElement(_Form.Item, _extends({}, field, {
324
- className: "pr-10",
325
- label: "Enum",
326
- name: [enumField.name, 'value'],
327
- fieldKey: [enumField.fieldKey, 'value'],
328
- rules: [{
329
- required: true
330
- }]
331
- }), /*#__PURE__*/React.createElement(_Input, null)), /*#__PURE__*/React.createElement(MinusCircleOutlined, {
332
- onClick: function onClick() {
333
- return operation.remove(enumField.name);
334
- }
335
- }));
336
- }), /*#__PURE__*/React.createElement(_Form.Item, null, /*#__PURE__*/React.createElement(_Button, {
337
- type: "dashed",
338
- onClick: function onClick() {
339
- return operation.add();
340
- },
341
- icon: /*#__PURE__*/React.createElement(PlusOutlined, null)
342
- }, "\u6DFB\u52A0Enum")));
343
- }));
344
-
345
- default:
346
- return null;
347
- }
348
- })));
349
- }), /*#__PURE__*/React.createElement(_Form.Item, null, /*#__PURE__*/React.createElement(_Button, {
350
- type: "dashed",
351
- onClick: function onClick() {
352
- return add();
353
- },
354
- block: true,
355
- icon: /*#__PURE__*/React.createElement(PlusOutlined, null)
356
- }, "\u6DFB\u52A0".concat(name, "\u540D\u79F0"))), /*#__PURE__*/React.createElement(_Form.Item, null, /*#__PURE__*/React.createElement(_Button, {
357
- type: "dashed",
358
- onClick: function onClick() {
359
- onAddFields(-1);
360
- },
361
- block: true,
362
- icon: /*#__PURE__*/React.createElement(PlusOutlined, null)
363
- }, "\u6DFB\u52A0\u6269\u5C55\u89C4\u5219")));
364
- }));
365
- };
366
-
367
- export default MetaPropsEdit;
@@ -1,69 +0,0 @@
1
- export var BASIC_TYPES_OPTIONS = [{
2
- label: '数字',
3
- value: 'number'
4
- }, {
5
- label: '文本',
6
- value: 'text'
7
- }, {
8
- label: '布尔类型',
9
- value: 'bool'
10
- }, {
11
- label: '枚举类型',
12
- value: 'enum'
13
- }, {
14
- label: '数组',
15
- value: 'array'
16
- }, {
17
- label: '引用类型',
18
- value: 'ref'
19
- }];
20
- export var ARRAY_TYPES_OPTIONS = [{
21
- label: '数字',
22
- value: 'number'
23
- }, {
24
- label: '文本',
25
- value: 'text'
26
- }, {
27
- label: '布尔类型',
28
- value: 'bool'
29
- }, {
30
- label: '引用类型',
31
- value: 'ref'
32
- }];
33
- export var OUTERMOST_TYPES_OPTIONS = [{
34
- label: '对象',
35
- value: 'object'
36
- }, {
37
- label: '数字',
38
- value: 'number'
39
- }, {
40
- label: '文本',
41
- value: 'text'
42
- }, {
43
- label: '布尔类型',
44
- value: 'bool'
45
- }];
46
- export var RULE_TYPES_OPTIONS = [{
47
- label: '引用',
48
- value: 'ref'
49
- }, {
50
- label: '数字',
51
- value: 'number'
52
- }, {
53
- label: '文本',
54
- value: 'text'
55
- }, {
56
- label: '布尔类型',
57
- value: 'bool'
58
- }];
59
- export var NUMBER_FORMAT_OPTIONS = [{
60
- label: 'int',
61
- value: 'int'
62
- }, {
63
- label: 'double',
64
- value: 'double'
65
- }];
66
- export var REF_OPTIONS = [{
67
- label: '表单扩展规则',
68
- value: 'FormRules'
69
- }];
@@ -1,43 +0,0 @@
1
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
-
3
- /*
4
- * @Author:wangxian
5
- * @Date: 2022-03-03 16:12:34
6
- * @LastEditTime: 2022-03-28 11:56:36
7
- */
8
- import { MetadataService } from './../../../framework/metadata/MetadataService';
9
- import React from 'react';
10
- export var useMetaType = function useMetaType(tag) {
11
- var isFresh = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
12
-
13
- var _React$useState = React.useState([]),
14
- _React$useState2 = _slicedToArray(_React$useState, 2),
15
- metaType = _React$useState2[0],
16
- setMetaType = _React$useState2[1];
17
-
18
- React.useEffect(function () {
19
- if (isFresh) {
20
- var service = new MetadataService();
21
-
22
- var _tag = tag ? [tag] : [];
23
-
24
- service.GetMetadataList(_tag).then(function (res) {
25
- var _metaType = []; // console.log('res', res);
26
-
27
- if (res) {
28
- for (var i = 0; i < res.length; i++) {
29
- var obj = {
30
- label: res[i].name,
31
- value: res[i].id
32
- };
33
-
34
- _metaType.push(obj);
35
- }
36
- }
37
-
38
- setMetaType([].concat(_metaType));
39
- });
40
- }
41
- }, [tag, isFresh]);
42
- return metaType;
43
- };