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,368 +0,0 @@
1
- import "antd/es/space/style";
2
- import _Space from "antd/es/space";
3
- import "antd/es/tooltip/style";
4
- import _Tooltip from "antd/es/tooltip";
5
- import "antd/es/button/style";
6
- import _Button from "antd/es/button";
7
- import "antd/es/select/style";
8
- import _Select from "antd/es/select";
9
- import "antd/es/form/style";
10
- import _Form from "antd/es/form";
11
- import _extends from "@babel/runtime/helpers/esm/extends";
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';
19
- import { guid } from '../../../utils';
20
-
21
- var MetaPropsEdit = function MetaPropsEdit(props) {
22
- var form = props.form,
23
- id = props.id,
24
- metadataTag = props.metadataTag,
25
- name = props.name,
26
- _props$isAddFields = props.isAddFields,
27
- isAddFields = _props$isAddFields === void 0 ? true : _props$isAddFields,
28
- onAddFields = props.onAddFields,
29
- onNewRefClick = props.onNewRefClick;
30
-
31
- var _React$useState = React.useState(true),
32
- _React$useState2 = _slicedToArray(_React$useState, 2),
33
- refresh = _React$useState2[0],
34
- setRefresh = _React$useState2[1];
35
-
36
- var metaType = useMetaType(metadataTag, refresh);
37
-
38
- var onTypeChange = function onTypeChange(idx) {
39
- var _properties$idx, _properties$idx2;
40
-
41
- var _properties = form.getFieldValue('properties') || [];
42
-
43
- var __properties = {
44
- id: (_properties$idx = _properties[idx]) === null || _properties$idx === void 0 ? void 0 : _properties$idx.id,
45
- type: (_properties$idx2 = _properties[idx]) === null || _properties$idx2 === void 0 ? void 0 : _properties$idx2.type
46
- };
47
- _properties[idx] = __properties;
48
- form.setFieldsValue({
49
- properties: _properties
50
- });
51
- };
52
-
53
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Form.List, {
54
- name: name
55
- }, function (fields, _ref) {
56
- var add = _ref.add,
57
- remove = _ref.remove;
58
- return /*#__PURE__*/React.createElement(React.Fragment, null, fields.map(function (field, index) {
59
- return /*#__PURE__*/React.createElement("div", {
60
- key: guid()
61
- }, /*#__PURE__*/React.createElement("div", {
62
- style: {
63
- display: 'flex',
64
- alignItems: 'flex-end'
65
- }
66
- }, /*#__PURE__*/React.createElement(_Form.Item, _extends({
67
- key: field.key,
68
- className: "pr-10"
69
- }, field, {
70
- label: "\u5C5E\u6027\u540D\u79F0",
71
- name: [field.name, 'id'],
72
- fieldKey: [field.fieldKey, 'id'],
73
- rules: [{
74
- required: true
75
- }]
76
- }), /*#__PURE__*/React.createElement(_Input, null)), /*#__PURE__*/React.createElement(_Form.Item, _extends({
77
- key: field.key
78
- }, field, {
79
- label: "\u5C5E\u6027\u7C7B\u578B",
80
- name: [field.name, 'type'],
81
- fieldKey: [field.fieldKey, 'type'],
82
- rules: [{
83
- required: true
84
- }]
85
- }), /*#__PURE__*/React.createElement(_Select, {
86
- style: {
87
- width: '120px'
88
- },
89
- options: BASIC_TYPES_OPTIONS,
90
- onChange: function onChange() {
91
- onTypeChange(index);
92
- },
93
- getPopupContainer: function getPopupContainer(triggerNode) {
94
- return triggerNode.parentNode;
95
- }
96
- })), /*#__PURE__*/React.createElement("div", {
97
- style: {
98
- lineHeight: '88px',
99
- paddingLeft: '15px'
100
- }
101
- }, /*#__PURE__*/React.createElement(MinusCircleOutlined, {
102
- onClick: function onClick() {
103
- return remove(field.name);
104
- }
105
- })), onAddFields && /*#__PURE__*/React.createElement(_Form.Item, {
106
- style: {
107
- flex: 1,
108
- textAlign: 'right'
109
- }
110
- }, /*#__PURE__*/React.createElement(_Tooltip, {
111
- title: "\u6DFB\u52A0\u6269\u5C55\u89C4\u5219"
112
- }, /*#__PURE__*/React.createElement(_Button, {
113
- shape: "circle",
114
- size: "small",
115
- type: "primary",
116
- onClick: function onClick() {
117
- onAddFields(index);
118
- },
119
- icon: /*#__PURE__*/React.createElement(PlusOutlined, null)
120
- })))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(_Form.Item, {
121
- noStyle: true,
122
- shouldUpdate: function shouldUpdate(prevValues, currentValues) {
123
- var _prevValues$name$inde, _currentValues$name$i, _prevValues$name$inde2, _currentValues$name$i2;
124
-
125
- 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);
126
- }
127
- }, function (_ref2) {
128
- var _properties$index, _properties$index2, _properties$index2$it, _properties$index3, _properties$index3$it;
129
-
130
- var getFieldValue = _ref2.getFieldValue;
131
-
132
- var _properties = getFieldValue(name);
133
-
134
- switch ((_properties$index = _properties[index]) === null || _properties$index === void 0 ? void 0 : _properties$index.type) {
135
- case 'number':
136
- return /*#__PURE__*/React.createElement("div", {
137
- style: {
138
- border: 'var(--ronds-metadata-color-border-1)',
139
- padding: '10px',
140
- marginBottom: '10px'
141
- }
142
- }, /*#__PURE__*/React.createElement(_Form.Item, _extends({}, field, {
143
- label: "format",
144
- name: [field.name, 'format'],
145
- fieldKey: [field.fieldKey, 'format'],
146
- rules: [{
147
- required: true
148
- }]
149
- }), /*#__PURE__*/React.createElement(_Select, {
150
- style: {
151
- width: '180px'
152
- },
153
- options: NUMBER_FORMAT_OPTIONS,
154
- getPopupContainer: function getPopupContainer(triggerNode) {
155
- return triggerNode.parentNode;
156
- }
157
- })));
158
-
159
- case 'ref':
160
- return /*#__PURE__*/React.createElement("div", {
161
- style: {
162
- border: '1px solid var(--ronds-metadata-color-border-1)',
163
- padding: '10px',
164
- display: 'flex',
165
- alignItems: 'center',
166
- marginBottom: '10px'
167
- }
168
- }, /*#__PURE__*/React.createElement(_Form.Item, _extends({}, field, {
169
- label: "Ref",
170
- name: [field.name, 'refId'],
171
- fieldKey: [field.fieldKey, 'refId'],
172
- rules: [{
173
- required: true
174
- }]
175
- }), /*#__PURE__*/React.createElement(_Select, {
176
- style: {
177
- width: '180px'
178
- },
179
- options: metaType || [],
180
- showSearch: true,
181
- filterOption: function filterOption(input, option) {
182
- return (option === null || option === void 0 ? void 0 : option.label.indexOf(input)) >= 0;
183
- },
184
- getPopupContainer: function getPopupContainer(triggerNode) {
185
- return triggerNode.parentNode;
186
- },
187
- allowClear: true
188
- })), /*#__PURE__*/React.createElement("div", {
189
- style: {
190
- padding: '0 10px'
191
- }
192
- }, /*#__PURE__*/React.createElement(_Tooltip, {
193
- title: "\u6DFB\u52A0\u5F15\u7528\u7C7B\u578B"
194
- }, /*#__PURE__*/React.createElement(_Button, {
195
- shape: "circle",
196
- size: "small",
197
- type: "primary",
198
- onClick: function onClick() {
199
- onNewRefClick && onNewRefClick();
200
- },
201
- icon: /*#__PURE__*/React.createElement(PlusOutlined, null)
202
- })), /*#__PURE__*/React.createElement(_Tooltip, {
203
- title: "\u5237\u65B0"
204
- }, /*#__PURE__*/React.createElement(_Button, {
205
- shape: "circle",
206
- size: "small",
207
- style: {
208
- marginLeft: '10px'
209
- },
210
- onClick: function onClick() {
211
- setRefresh(false);
212
- setTimeout(function () {
213
- setRefresh(true);
214
- }, 100);
215
- },
216
- icon: /*#__PURE__*/React.createElement(ReloadOutlined, null)
217
- }))));
218
-
219
- case 'array':
220
- return /*#__PURE__*/React.createElement("div", {
221
- style: {
222
- border: '1px solid var(--ronds-metadata-color-border-1)',
223
- borderRadius: '5px',
224
- padding: '10px',
225
- marginBottom: '10px',
226
- display: 'flex',
227
- alignItems: 'center'
228
- }
229
- }, /*#__PURE__*/React.createElement(_Form.Item, _extends({}, field, {
230
- label: "Array",
231
- className: "pr-10",
232
- name: [field.name, 'items', 'type'],
233
- fieldKey: [field.fieldKey, 'items', 'type'],
234
- rules: [{
235
- required: true
236
- }]
237
- }), /*#__PURE__*/React.createElement(_Select, {
238
- style: {
239
- width: '180px'
240
- },
241
- options: ARRAY_TYPES_OPTIONS,
242
- getPopupContainer: function getPopupContainer(triggerNode) {
243
- return triggerNode.parentNode;
244
- }
245
- })), _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, {
246
- label: "Ref",
247
- name: [field.name, 'items', 'refId'],
248
- fieldKey: [field.fieldKey, 'items', 'refId'],
249
- rules: [{
250
- required: true
251
- }]
252
- }), /*#__PURE__*/React.createElement(_Select, {
253
- style: {
254
- width: '180px'
255
- },
256
- options: metaType || [],
257
- showSearch: true,
258
- filterOption: function filterOption(input, option) {
259
- return (option === null || option === void 0 ? void 0 : option.label.indexOf(input)) >= 0;
260
- },
261
- getPopupContainer: function getPopupContainer(triggerNode) {
262
- return triggerNode.parentNode;
263
- }
264
- })), /*#__PURE__*/React.createElement("div", {
265
- style: {
266
- padding: '0 10px'
267
- }
268
- }, /*#__PURE__*/React.createElement(_Tooltip, {
269
- title: "\u6DFB\u52A0\u5F15\u7528\u7C7B\u578B"
270
- }, /*#__PURE__*/React.createElement(_Button, {
271
- shape: "circle",
272
- size: "small",
273
- type: "primary",
274
- onClick: function onClick() {
275
- onNewRefClick && onNewRefClick();
276
- },
277
- icon: /*#__PURE__*/React.createElement(PlusOutlined, null)
278
- })), /*#__PURE__*/React.createElement(_Tooltip, {
279
- title: "\u5237\u65B0"
280
- }, /*#__PURE__*/React.createElement(_Button, {
281
- shape: "circle",
282
- size: "small",
283
- style: {
284
- marginLeft: '10px'
285
- },
286
- onClick: function onClick() {
287
- setRefresh(false);
288
- setTimeout(function () {
289
- setRefresh(true);
290
- }, 100);
291
- },
292
- icon: /*#__PURE__*/React.createElement(ReloadOutlined, null)
293
- })))), _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, {
294
- label: "format",
295
- name: [field.name, 'items', 'format'],
296
- fieldKey: [field.fieldKey, 'items', 'format'],
297
- rules: [{
298
- required: true
299
- }]
300
- }), /*#__PURE__*/React.createElement(_Select, {
301
- style: {
302
- width: '180px'
303
- },
304
- options: NUMBER_FORMAT_OPTIONS,
305
- getPopupContainer: function getPopupContainer(triggerNode) {
306
- return triggerNode.parentNode;
307
- }
308
- }))));
309
-
310
- case 'enum':
311
- return /*#__PURE__*/React.createElement("div", {
312
- style: {
313
- border: '1px solid var(--ronds-metadata-color-border-1)',
314
- padding: '10px',
315
- marginBottom: '10px'
316
- }
317
- }, /*#__PURE__*/React.createElement(_Form.List, {
318
- name: [field.name, 'enum']
319
- }, function (enumFields, operation) {
320
- return /*#__PURE__*/React.createElement(React.Fragment, null, enumFields.map(function (enumField) {
321
- return /*#__PURE__*/React.createElement(_Space, {
322
- key: "enumField-".concat(enumField.key),
323
- align: "baseline"
324
- }, /*#__PURE__*/React.createElement(_Form.Item, _extends({}, field, {
325
- className: "pr-10",
326
- label: "Enum",
327
- name: [enumField.name, 'value'],
328
- fieldKey: [enumField.fieldKey, 'value'],
329
- rules: [{
330
- required: true
331
- }]
332
- }), /*#__PURE__*/React.createElement(_Input, null)), /*#__PURE__*/React.createElement(MinusCircleOutlined, {
333
- onClick: function onClick() {
334
- return operation.remove(enumField.name);
335
- }
336
- }));
337
- }), /*#__PURE__*/React.createElement(_Form.Item, null, /*#__PURE__*/React.createElement(_Button, {
338
- type: "dashed",
339
- onClick: function onClick() {
340
- return operation.add();
341
- },
342
- icon: /*#__PURE__*/React.createElement(PlusOutlined, null)
343
- }, "\u6DFB\u52A0Enum")));
344
- }));
345
-
346
- default:
347
- return null;
348
- }
349
- })));
350
- }), /*#__PURE__*/React.createElement(_Form.Item, null, /*#__PURE__*/React.createElement(_Button, {
351
- type: "dashed",
352
- onClick: function onClick() {
353
- return add();
354
- },
355
- block: true,
356
- icon: /*#__PURE__*/React.createElement(PlusOutlined, null)
357
- }, "\u6DFB\u52A0".concat(name, "\u540D\u79F0"))), isAddFields && /*#__PURE__*/React.createElement(_Form.Item, null, /*#__PURE__*/React.createElement(_Button, {
358
- type: "dashed",
359
- onClick: function onClick() {
360
- onAddFields(-1);
361
- },
362
- block: true,
363
- icon: /*#__PURE__*/React.createElement(PlusOutlined, null)
364
- }, "\u6DFB\u52A0\u6269\u5C55\u89C4\u5219")));
365
- }));
366
- };
367
-
368
- 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: 2021-09-18 14:15:04
6
- * @LastEditTime: 2022-03-28 14:30:25
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 = [];
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
- };