ronds-metadata 1.3.73 → 1.3.75

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. package/es/api/index.js +2 -2
  2. package/es/comps/MetadataForm/DataCell/Input.js +33 -9
  3. package/es/comps/MetadataForm/DataCell/business/config.d.ts +286 -0
  4. package/es/comps/MetadataForm/DataCell/business/config.js +322 -0
  5. package/es/comps/MetadataForm/DataCell/business/index.d.ts +9 -0
  6. package/es/comps/MetadataForm/DataCell/business/index.js +31 -0
  7. package/es/comps/MetadataForm/DataCell/plugin/Datasource/Cassandra.d.ts +10 -0
  8. package/es/comps/MetadataForm/DataCell/plugin/Datasource/Cassandra.js +103 -0
  9. package/es/comps/MetadataForm/DataCell/plugin/Datasource/Kafka.d.ts +9 -0
  10. package/es/comps/MetadataForm/DataCell/plugin/Datasource/Kafka.js +47 -0
  11. package/es/comps/MetadataForm/DataCell/plugin/Datasource/PostgreSQL.d.ts +10 -0
  12. package/es/comps/MetadataForm/DataCell/plugin/Datasource/PostgreSQL.js +123 -0
  13. package/es/comps/MetadataForm/DataCell/plugin/Datasource/SqlServer.d.ts +10 -0
  14. package/es/comps/MetadataForm/DataCell/plugin/Datasource/SqlServer.js +118 -0
  15. package/es/comps/MetadataForm/DataCell/plugin/Datasource/hooks.d.ts +3 -0
  16. package/es/comps/MetadataForm/DataCell/plugin/Datasource/hooks.js +129 -0
  17. package/es/comps/MetadataForm/DataCell/plugin/Datasource/index.d.ts +9 -0
  18. package/es/comps/MetadataForm/DataCell/plugin/Datasource/index.js +155 -0
  19. package/es/comps/MetadataForm/DataCell/plugin/MapTable.d.ts +1 -0
  20. package/es/comps/MetadataForm/DataCell/plugin/MapTable.js +30 -22
  21. package/es/comps/MetadataForm/DataCell/plugin/SparkSqlTable.d.ts +1 -2
  22. package/es/comps/MetadataForm/DataCell/plugin/SparkSqlTable.js +20 -3
  23. package/es/comps/MetadataForm/HOC/index.js +1 -1
  24. package/es/comps/MetadataForm/hooks/index.js +6 -1
  25. package/es/comps/MetadataForm/index.less +29 -26
  26. package/package.json +1 -1
package/es/api/index.js CHANGED
@@ -5,12 +5,12 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
5
5
  /*
6
6
  * @Author:wangxian
7
7
  * @Date: 2021-09-18 14:15:04
8
- * @LastEditTime: 2024-07-23 19:54:50
8
+ * @LastEditTime: 2024-08-20 11:46:17
9
9
  */
10
10
  import { guid, md5 } from '../utils';
11
11
  import { addInterceptor, HttpHelper } from '../framework/http';
12
12
  var http = new HttpHelper();
13
- var token = 'eyJhbGciOiJSUzI1NiIsImtpZCI6IkMyMTJFMjI1NTcwNjRDQTE3M0U2NjkxRjM4QzFDOEEyIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE3MjQxNDAxNzYsImV4cCI6MTcyNDM5OTM3NiwiaXNzIjoiaHR0cDovL2ZhYmlvOjk5OTkvc3VwZXJjYXJlY29yZSIsImF1ZCI6ImVwbSIsImNsaWVudF9pZCI6ImVwbSIsInN1YiI6IjNhMTIxZDJiLWYwZDUtZDQ3OC0xN2Q3LWQwODEwZDgzZDViMSIsImF1dGhfdGltZSI6MTcyNDE0MDE3NiwiaWRwIjoibG9jYWwiLCJuYW1lIjoicGhtIiwiZW1haWwiOiJwaG1AYWJwLmlvIiwicm9sZSI6WyJhZG1pbiIsInBobV9hZG1pbiJdLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9naXZlbm5hbWUiOiJwaG3ov5Dnu7TotKblj7ciLCJwaG9uZV9udW1iZXIiOiIxMzYwMDAwMDAwMCIsInBob25lX251bWJlcl92ZXJpZmllZCI6IlRydWUiLCJlbWFpbF92ZXJpZmllZCI6IlRydWUiLCJpYXQiOjE3MjQxNDAxNzYsInNjb3BlIjpbImFkZHJlc3MiLCJlbWFpbCIsImVwbSIsIm9wZW5pZCIsInBob25lIiwicHJvZmlsZSIsInJvbGUiLCJvZmZsaW5lX2FjY2VzcyJdLCJhbXIiOlsicHdkIl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bSIsIm9wZW5pZCIsInBob25lIiwicHJvZmlsZSIsInJvbGUiLCJvZmZsaW5lX2FjY2VzcyJdLCJhbXIiOlsicHdkIl19.t-AeiGQDr2N4PgLGHI6HRjwhTlSAt7TjtDVQgMBCVJgf31L9lKzuiakfXukTNzeXz0qHTeJOBmJL8Q-Lhlz_Khd-pr4fsaBP6qI8NWcLan1hZPWgms5mbsJukLOIvUVWxZGxJ501yxdQLJIZPwX6CfvXzCWfIeF8SQJ8c4d_zXWrpdJBHfmX8vl4Ut7hOX5IC9Sn79uoe-0-96aI8Ltv07iHdTAJSH3Y4svh_jwEt34-oBmT3daZ0iWvfuNx0QFYGiW6lN-kALIbnEOpphA3mHtwtUpB2RtG6BGCTJZGraT-7Fmboks34y6C1ApJzO221x4-_VZGa5hwwvZttkxzlw';
14
14
  addInterceptor(function (httpClient) {
15
15
  httpClient.interceptors.request.use(function (_config) {
16
16
  if (!_config.headers) {
@@ -2,6 +2,7 @@ import "antd/es/form/style";
2
2
  import _Form from "antd/es/form";
3
3
  import "antd/es/select/style";
4
4
  import _Select from "antd/es/select";
5
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
5
6
  import _extends from "@babel/runtime/helpers/esm/extends";
6
7
  import "antd/es/upload/style";
7
8
  import _Upload from "antd/es/upload";
@@ -20,7 +21,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
20
21
  /*
21
22
  * @Author: wangxian
22
23
  * @Date: 2021-09-18 14:15:04
23
- * @LastEditTime: 2024-07-16 15:37:30
24
+ * @LastEditTime: 2024-08-21 08:47:42
24
25
  */
25
26
  import React from 'react';
26
27
  import { UploadOutlined } from '@ant-design/icons';
@@ -33,7 +34,8 @@ import { useAsyncMemo } from '../../../framework/hooks/use-async-memo';
33
34
  import { MetadataService } from '../../../framework/metadata/MetadataService';
34
35
  import SparkSqlTable from './plugin/SparkSqlTable';
35
36
  import MapTable from './plugin/MapTable';
36
- import SourceConfig from './plugin/SourceConfig';
37
+ import DataSource from './plugin/Datasource';
38
+ import BusinessForm from './business';
37
39
  var TextArea = _Input.TextArea;
38
40
  function Index(props) {
39
41
  var _extraInfo$addonAfter7;
@@ -131,7 +133,7 @@ function Index(props) {
131
133
  }, _callee);
132
134
  })), [extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.autoComplete]);
133
135
  var processInputType = function processInputType(_type) {
134
- var _extraInfo$disabled, _extraInfo$disabled2, _extraInfo$disabled3, _extraInfo$disabled4, _extraInfo$disabled5, _extraInfo$disabled6, _extraInfo$disabled7, _extraInfo$addonAfter2, _extraInfo$addonAfter3, _extraInfo$addonAfter4, _extraInfo$addonAfter5, _extraInfo$disabled8;
136
+ var _extraInfo$disabled, _extraInfo$disabled2, _extraInfo$disabled3, _extraInfo$disabled4, _extraInfo$disabled5, _extraInfo$disabled6, _extraInfo$disabled7, _extraInfo$disabled8, _extraInfo$disabled9, _extraInfo$addonAfter2, _extraInfo$addonAfter3, _extraInfo$addonAfter4, _extraInfo$addonAfter5, _extraInfo$disabled10;
135
137
  switch (_type) {
136
138
  case 'autoComplete':
137
139
  return /*#__PURE__*/React.createElement(_AutoComplete, {
@@ -191,12 +193,26 @@ function Index(props) {
191
193
  return /*#__PURE__*/React.createElement(NumberRange, _extends({}, extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.numberRange, {
192
194
  disabled: (_extraInfo$disabled7 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled7 !== void 0 ? _extraInfo$disabled7 : disabled
193
195
  }));
196
+ case 'datasource':
197
+ return /*#__PURE__*/React.createElement(DataSource, {
198
+ extraInfo: _objectSpread(_objectSpread({}, extraInfo), {}, {
199
+ labelSpan: formContext === null || formContext === void 0 ? void 0 : formContext.labelSpan,
200
+ layout: formContext === null || formContext === void 0 ? void 0 : formContext.layout
201
+ }),
202
+ disabled: (_extraInfo$disabled8 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled8 !== void 0 ? _extraInfo$disabled8 : disabled
203
+ });
204
+ case 'bussiness':
205
+ return /*#__PURE__*/React.createElement(BusinessForm, {
206
+ extraInfo: _objectSpread(_objectSpread({}, extraInfo), {}, {
207
+ labelSpan: formContext === null || formContext === void 0 ? void 0 : formContext.labelSpan,
208
+ layout: formContext === null || formContext === void 0 ? void 0 : formContext.layout
209
+ }),
210
+ disabled: (_extraInfo$disabled9 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled9 !== void 0 ? _extraInfo$disabled9 : disabled
211
+ });
194
212
  case 'sparkSqlTable':
195
213
  return /*#__PURE__*/React.createElement(SparkSqlTable, extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.sparkSqlTable);
196
214
  case 'mapTable':
197
215
  return /*#__PURE__*/React.createElement(MapTable, extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.mapTable);
198
- case 'sourceConfig':
199
- return /*#__PURE__*/React.createElement(SourceConfig, extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.sourceConfig);
200
216
  default:
201
217
  return /*#__PURE__*/React.createElement(_Input, {
202
218
  addonAfter: ((_extraInfo$addonAfter2 = extraInfo.addonAfter) === null || _extraInfo$addonAfter2 === void 0 ? void 0 : _extraInfo$addonAfter2.key) ? /*#__PURE__*/React.createElement(_Form.Item, {
@@ -211,7 +227,7 @@ function Index(props) {
211
227
  }))) : undefined,
212
228
  showCount: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.showCount,
213
229
  maxLength: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.maxLength,
214
- disabled: (_extraInfo$disabled8 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled8 !== void 0 ? _extraInfo$disabled8 : disabled,
230
+ disabled: (_extraInfo$disabled10 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled10 !== void 0 ? _extraInfo$disabled10 : disabled,
215
231
  placeholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder),
216
232
  title: tr(valueTitle),
217
233
  allowClear: true
@@ -267,11 +283,19 @@ function Index(props) {
267
283
  color: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.color
268
284
  } : {}
269
285
  }, (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.titleHidden) ? '' : tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id),
270
- labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
286
+ labelCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.titleHidden) ? {
287
+ flex: 0,
288
+ offset: 0
289
+ } : {
271
290
  flex: "0 0 ".concat(labelSpan * 100 / 24, "%"),
272
291
  offset: 0
273
292
  } : undefined,
274
- wrapperCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? {
293
+ wrapperCol: labelSpan && (formContext === null || formContext === void 0 ? void 0 : formContext.layout) === 'horizontal' ? (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.titleHidden) ? {
294
+ style: {
295
+ width: '100%',
296
+ flex: 1
297
+ }
298
+ } : {
275
299
  style: {
276
300
  width: "".concat((24 - labelSpan) * 100 / 24, "%")
277
301
  },
@@ -280,7 +304,7 @@ function Index(props) {
280
304
  } : undefined,
281
305
  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,
282
306
  rules: [{
283
- required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
307
+ required: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.titleHidden) ? false : notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
284
308
  message: "".concat(tr('请输入'), " ").concat(tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
285
309
  }].concat(_toConsumableArray(rules)),
286
310
  help: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help),
@@ -0,0 +1,286 @@
1
+ export declare const BusinessSchema: {
2
+ etl_source: {
3
+ id: string;
4
+ type: string;
5
+ properties: ({
6
+ id: string;
7
+ type: string;
8
+ fields: {
9
+ id: string;
10
+ type: string;
11
+ refId: string;
12
+ value: {
13
+ common: {
14
+ label: string;
15
+ require: boolean;
16
+ titleHidden: boolean;
17
+ borderHidden: boolean;
18
+ colSpan: number;
19
+ };
20
+ 'common-en-US': {};
21
+ text: {
22
+ type: string;
23
+ datasource: {
24
+ type: string[];
25
+ kafka: {
26
+ isMutiple: boolean;
27
+ };
28
+ };
29
+ };
30
+ };
31
+ }[];
32
+ enum?: undefined;
33
+ items?: undefined;
34
+ } | {
35
+ id: string;
36
+ type: string;
37
+ enum: {
38
+ value: string;
39
+ }[];
40
+ fields: {
41
+ id: string;
42
+ type: string;
43
+ refId: string;
44
+ value: {
45
+ common: {
46
+ label: string;
47
+ require: boolean;
48
+ depend: {
49
+ show: string;
50
+ };
51
+ };
52
+ 'common-en-US': {};
53
+ };
54
+ }[];
55
+ items?: undefined;
56
+ } | {
57
+ id: string;
58
+ type: string;
59
+ fields: {
60
+ id: string;
61
+ type: string;
62
+ refId: string;
63
+ value: {
64
+ common: {
65
+ label: string;
66
+ require: boolean;
67
+ depend: {
68
+ show: string;
69
+ };
70
+ };
71
+ 'common-en-US': {};
72
+ };
73
+ }[];
74
+ enum?: undefined;
75
+ items?: undefined;
76
+ } | {
77
+ id: string;
78
+ type: string;
79
+ fields: {
80
+ id: string;
81
+ type: string;
82
+ refId: string;
83
+ value: {
84
+ common: {
85
+ label: string;
86
+ require: boolean;
87
+ labelSpan: number;
88
+ depend: {
89
+ show: string;
90
+ };
91
+ };
92
+ 'common-en-US': {};
93
+ };
94
+ }[];
95
+ enum?: undefined;
96
+ items?: undefined;
97
+ } | {
98
+ id: string;
99
+ type: string;
100
+ fields: {
101
+ id: string;
102
+ type: string;
103
+ refId: string;
104
+ value: {
105
+ common: {
106
+ id: string;
107
+ label: string;
108
+ depend: {
109
+ show: string;
110
+ };
111
+ };
112
+ text: {
113
+ type: string;
114
+ };
115
+ };
116
+ }[];
117
+ enum?: undefined;
118
+ items?: undefined;
119
+ } | {
120
+ id: string;
121
+ type: string;
122
+ fields: {
123
+ id: string;
124
+ type: string;
125
+ refId: string;
126
+ value: {
127
+ common: {
128
+ id: string;
129
+ label: string;
130
+ colSpan: number;
131
+ depend: {
132
+ show: string;
133
+ };
134
+ };
135
+ array: {
136
+ layout: string;
137
+ };
138
+ };
139
+ }[];
140
+ items: {
141
+ type: string;
142
+ refId: string;
143
+ };
144
+ enum?: undefined;
145
+ } | {
146
+ id: string;
147
+ type: string;
148
+ fields: {
149
+ id: string;
150
+ type: string;
151
+ refId: string;
152
+ value: {
153
+ common: {
154
+ label: string;
155
+ colSpan: number;
156
+ labelSpan: number;
157
+ require: boolean;
158
+ };
159
+ 'common-en-US': {};
160
+ text: {
161
+ type: string;
162
+ sparkSqlTable: {
163
+ extraDico: any[];
164
+ initSql: string;
165
+ };
166
+ };
167
+ };
168
+ }[];
169
+ enum?: undefined;
170
+ items?: undefined;
171
+ })[];
172
+ fields: {
173
+ id: string;
174
+ type: string;
175
+ refId: string;
176
+ value: {
177
+ colSpan: number;
178
+ labelSpan: number;
179
+ layout: string;
180
+ };
181
+ }[];
182
+ types: {
183
+ id: string;
184
+ type: string;
185
+ properties: {
186
+ id: string;
187
+ type: string;
188
+ fields: {
189
+ id: string;
190
+ type: string;
191
+ refId: string;
192
+ value: {
193
+ common: {
194
+ id: string;
195
+ label: string;
196
+ depend: {};
197
+ };
198
+ text: {};
199
+ };
200
+ }[];
201
+ }[];
202
+ }[];
203
+ }[];
204
+ etl_direction: {
205
+ id: string;
206
+ type: string;
207
+ properties: ({
208
+ id: string;
209
+ type: string;
210
+ fields: {
211
+ id: string;
212
+ type: string;
213
+ refId: string;
214
+ value: {
215
+ common: {
216
+ label: string;
217
+ require: boolean;
218
+ titleHidden: boolean;
219
+ borderHidden: boolean;
220
+ colSpan: number;
221
+ };
222
+ 'common-en-US': {};
223
+ text: {
224
+ type: string;
225
+ datasource: {
226
+ type: string[];
227
+ kafka: {
228
+ isMutiple: boolean;
229
+ };
230
+ };
231
+ };
232
+ };
233
+ }[];
234
+ } | {
235
+ id: string;
236
+ type: string;
237
+ fields: {
238
+ id: string;
239
+ type: string;
240
+ refId: string;
241
+ value: {
242
+ common: {
243
+ label: string;
244
+ require: boolean;
245
+ labelSpan: number;
246
+ colSpan: number;
247
+ depend: {
248
+ show: string;
249
+ };
250
+ };
251
+ 'common-en-US': {};
252
+ };
253
+ }[];
254
+ } | {
255
+ id: string;
256
+ type: string;
257
+ fields: {
258
+ id: string;
259
+ type: string;
260
+ refId: string;
261
+ value: {
262
+ common: {
263
+ label: string;
264
+ colSpan: number;
265
+ labelSpan: number;
266
+ };
267
+ 'common-en-US': {};
268
+ text: {
269
+ type: string;
270
+ mapTable: {};
271
+ };
272
+ };
273
+ }[];
274
+ })[];
275
+ fields: {
276
+ id: string;
277
+ type: string;
278
+ refId: string;
279
+ value: {
280
+ colSpan: number;
281
+ labelSpan: number;
282
+ layout: string;
283
+ };
284
+ }[];
285
+ }[];
286
+ };