ronds-metadata 1.3.81 → 1.3.82
Sign up to get free protection for your applications and to get access to all the features.
- package/es/comps/MetadataForm/DataCell/business/config.d.ts +8 -2
- package/es/comps/MetadataForm/DataCell/business/config.js +8 -2
- package/es/comps/MetadataForm/DataCell/business/index.js +0 -1
- package/es/comps/MetadataForm/DataCell/plugin/Datasource/Cassandra.js +10 -4
- package/es/comps/MetadataForm/DataCell/plugin/Datasource/Kafka.js +33 -2
- package/es/comps/MetadataForm/DataCell/plugin/Datasource/PostgreSQL.js +33 -2
- package/es/comps/MetadataForm/DataCell/plugin/Datasource/SqlServer.js +33 -2
- package/es/comps/MetadataForm/DataCell/plugin/MapTable.js +9 -2
- package/es/comps/MetadataForm/DataCell/plugin/SparkSqlTable.js +27 -14
- package/package.json +1 -1
@@ -246,8 +246,14 @@ export declare const BusinessSchema: {
|
|
246
246
|
type: string;
|
247
247
|
datasource: {
|
248
248
|
type: string[];
|
249
|
-
|
250
|
-
|
249
|
+
cassandra: {
|
250
|
+
isPlusTable: boolean;
|
251
|
+
};
|
252
|
+
postgreSql: {
|
253
|
+
isPlusTable: boolean;
|
254
|
+
};
|
255
|
+
sqlServer: {
|
256
|
+
isPlusTable: boolean;
|
251
257
|
};
|
252
258
|
};
|
253
259
|
};
|
@@ -277,8 +277,14 @@ var ETL_DIRECTION_SCHEMA = [{
|
|
277
277
|
type: 'datasource',
|
278
278
|
datasource: {
|
279
279
|
type: ['Cassandra', 'PostgreSql', 'Minio', 'SqlServer'],
|
280
|
-
|
281
|
-
|
280
|
+
cassandra: {
|
281
|
+
isPlusTable: true
|
282
|
+
},
|
283
|
+
postgreSql: {
|
284
|
+
isPlusTable: true
|
285
|
+
},
|
286
|
+
sqlServer: {
|
287
|
+
isPlusTable: true
|
282
288
|
}
|
283
289
|
}
|
284
290
|
}
|
@@ -14,7 +14,7 @@ import React from 'react';
|
|
14
14
|
import { useGetDatasource } from './hooks';
|
15
15
|
import { PlusOutlined } from '@ant-design/icons';
|
16
16
|
var CassandraDatasource = function CassandraDatasource(props) {
|
17
|
-
var _extraInfo$datasource, _extraInfo$datasource2, _extraInfo$datasource3, _extraInfo$datasource4;
|
17
|
+
var _extraInfo$datasource, _extraInfo$datasource2, _extraInfo$datasource3, _extraInfo$datasource4, _extraInfo$datasource5, _extraInfo$datasource6, _extraInfo$datasource7, _extraInfo$datasource8;
|
18
18
|
var extraInfo = props.extraInfo,
|
19
19
|
datasource = props.datasource,
|
20
20
|
onChange = props.onChange,
|
@@ -98,10 +98,10 @@ var CassandraDatasource = function CassandraDatasource(props) {
|
|
98
98
|
style: {
|
99
99
|
paddingBottom: '8px'
|
100
100
|
}
|
101
|
-
}, /*#__PURE__*/React.createElement(_Input.Group, {
|
101
|
+
}, (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$datasource3 = extraInfo.datasource) === null || _extraInfo$datasource3 === void 0 ? void 0 : (_extraInfo$datasource4 = _extraInfo$datasource3.cassandra) === null || _extraInfo$datasource4 === void 0 ? void 0 : _extraInfo$datasource4.isPlusTable) ? /*#__PURE__*/React.createElement(_Input.Group, {
|
102
102
|
compact: true
|
103
103
|
}, /*#__PURE__*/React.createElement(_Select, {
|
104
|
-
mode: (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$
|
104
|
+
mode: (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$datasource5 = extraInfo.datasource) === null || _extraInfo$datasource5 === void 0 ? void 0 : (_extraInfo$datasource6 = _extraInfo$datasource5.cassandra) === null || _extraInfo$datasource6 === void 0 ? void 0 : _extraInfo$datasource6.isMutiple) ? 'multiple' : undefined,
|
105
105
|
allowClear: true,
|
106
106
|
value: dataTable,
|
107
107
|
options: dataTableOpts,
|
@@ -117,6 +117,12 @@ var CassandraDatasource = function CassandraDatasource(props) {
|
|
117
117
|
}, /*#__PURE__*/React.createElement(_Button, {
|
118
118
|
icon: /*#__PURE__*/React.createElement(PlusOutlined, null),
|
119
119
|
onClick: onPlusClick
|
120
|
-
})))
|
120
|
+
}))) : /*#__PURE__*/React.createElement(_Select, {
|
121
|
+
mode: (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$datasource7 = extraInfo.datasource) === null || _extraInfo$datasource7 === void 0 ? void 0 : (_extraInfo$datasource8 = _extraInfo$datasource7.cassandra) === null || _extraInfo$datasource8 === void 0 ? void 0 : _extraInfo$datasource8.isMutiple) ? 'multiple' : undefined,
|
122
|
+
allowClear: true,
|
123
|
+
value: dataTable,
|
124
|
+
options: dataTableOpts,
|
125
|
+
onChange: onDataTableChange
|
126
|
+
})));
|
121
127
|
};
|
122
128
|
export default CassandraDatasource;
|
@@ -1,3 +1,9 @@
|
|
1
|
+
import "antd/es/input/style";
|
2
|
+
import _Input from "antd/es/input";
|
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";
|
1
7
|
import "antd/es/select/style";
|
2
8
|
import _Select from "antd/es/select";
|
3
9
|
import "antd/es/col/style";
|
@@ -5,9 +11,10 @@ import _Col from "antd/es/col";
|
|
5
11
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
6
12
|
import { tr } from '../../../../../framework/locale';
|
7
13
|
import { useGetDatasource } from './hooks';
|
14
|
+
import { PlusOutlined } from '@ant-design/icons';
|
8
15
|
import React from 'react';
|
9
16
|
var KafkaDatasource = function KafkaDatasource(props) {
|
10
|
-
var _extraInfo$datasource, _extraInfo$datasource2;
|
17
|
+
var _extraInfo$datasource, _extraInfo$datasource2, _extraInfo$datasource3, _extraInfo$datasource4, _extraInfo$datasource5, _extraInfo$datasource6;
|
11
18
|
var extraInfo = props.extraInfo,
|
12
19
|
datasource = props.datasource,
|
13
20
|
onChange = props.onChange,
|
@@ -25,6 +32,11 @@ var KafkaDatasource = function KafkaDatasource(props) {
|
|
25
32
|
topics: value
|
26
33
|
});
|
27
34
|
};
|
35
|
+
var onPlusClick = function onPlusClick() {
|
36
|
+
onChange && onChange({
|
37
|
+
plus: true
|
38
|
+
});
|
39
|
+
};
|
28
40
|
React.useEffect(function () {
|
29
41
|
if (initialValue) {
|
30
42
|
onTopicChange(initialValue.topics);
|
@@ -49,8 +61,27 @@ var KafkaDatasource = function KafkaDatasource(props) {
|
|
49
61
|
style: {
|
50
62
|
paddingBottom: '8px'
|
51
63
|
}
|
64
|
+
}, (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$datasource = extraInfo.datasource) === null || _extraInfo$datasource === void 0 ? void 0 : (_extraInfo$datasource2 = _extraInfo$datasource.kafka) === null || _extraInfo$datasource2 === void 0 ? void 0 : _extraInfo$datasource2.isPlusTable) ? /*#__PURE__*/React.createElement(_Input.Group, {
|
65
|
+
compact: true
|
52
66
|
}, /*#__PURE__*/React.createElement(_Select, {
|
53
|
-
mode: (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$
|
67
|
+
mode: (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$datasource3 = extraInfo.datasource) === null || _extraInfo$datasource3 === void 0 ? void 0 : (_extraInfo$datasource4 = _extraInfo$datasource3.kafka) === null || _extraInfo$datasource4 === void 0 ? void 0 : _extraInfo$datasource4.isMutiple) ? 'multiple' : undefined,
|
68
|
+
value: topic,
|
69
|
+
allowClear: true,
|
70
|
+
options: topicOpts,
|
71
|
+
onChange: onTopicChange,
|
72
|
+
style: {
|
73
|
+
width: 'calc(100% - 32px)'
|
74
|
+
}
|
75
|
+
}), /*#__PURE__*/React.createElement(_Tooltip, {
|
76
|
+
title: tr('手动建表'),
|
77
|
+
style: {
|
78
|
+
width: '32px'
|
79
|
+
}
|
80
|
+
}, /*#__PURE__*/React.createElement(_Button, {
|
81
|
+
icon: /*#__PURE__*/React.createElement(PlusOutlined, null),
|
82
|
+
onClick: onPlusClick
|
83
|
+
}))) : /*#__PURE__*/React.createElement(_Select, {
|
84
|
+
mode: (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$datasource5 = extraInfo.datasource) === null || _extraInfo$datasource5 === void 0 ? void 0 : (_extraInfo$datasource6 = _extraInfo$datasource5.kafka) === null || _extraInfo$datasource6 === void 0 ? void 0 : _extraInfo$datasource6.isMutiple) ? 'multiple' : undefined,
|
54
85
|
value: topic,
|
55
86
|
allowClear: true,
|
56
87
|
options: topicOpts,
|
@@ -1,3 +1,9 @@
|
|
1
|
+
import "antd/es/input/style";
|
2
|
+
import _Input from "antd/es/input";
|
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";
|
1
7
|
import "antd/es/select/style";
|
2
8
|
import _Select from "antd/es/select";
|
3
9
|
import "antd/es/col/style";
|
@@ -10,9 +16,10 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
10
16
|
*/
|
11
17
|
import { tr } from '../../../../../framework/locale';
|
12
18
|
import { useGetDatasource } from './hooks';
|
19
|
+
import { PlusOutlined } from '@ant-design/icons';
|
13
20
|
import React from 'react';
|
14
21
|
var PostgreSQLDatasource = function PostgreSQLDatasource(props) {
|
15
|
-
var _extraInfo$datasource, _extraInfo$datasource2, _extraInfo$datasource3, _extraInfo$datasource4, _extraInfo$datasource5, _extraInfo$datasource6;
|
22
|
+
var _extraInfo$datasource, _extraInfo$datasource2, _extraInfo$datasource3, _extraInfo$datasource4, _extraInfo$datasource5, _extraInfo$datasource6, _extraInfo$datasource7, _extraInfo$datasource8, _extraInfo$datasource9, _extraInfo$datasource10;
|
16
23
|
var extraInfo = props.extraInfo,
|
17
24
|
wrapperCol = props.wrapperCol,
|
18
25
|
labelCol = props.labelCol,
|
@@ -52,6 +59,11 @@ var PostgreSQLDatasource = function PostgreSQLDatasource(props) {
|
|
52
59
|
dt: value
|
53
60
|
});
|
54
61
|
};
|
62
|
+
var onPlusClick = function onPlusClick() {
|
63
|
+
onChange && onChange({
|
64
|
+
plus: true
|
65
|
+
});
|
66
|
+
};
|
55
67
|
React.useEffect(function () {
|
56
68
|
if (initialValue) {
|
57
69
|
onDataBaseChange(initialValue.db);
|
@@ -128,8 +140,27 @@ var PostgreSQLDatasource = function PostgreSQLDatasource(props) {
|
|
128
140
|
style: {
|
129
141
|
paddingBottom: '8px'
|
130
142
|
}
|
143
|
+
}, (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$datasource5 = extraInfo.datasource) === null || _extraInfo$datasource5 === void 0 ? void 0 : (_extraInfo$datasource6 = _extraInfo$datasource5.postgreSql) === null || _extraInfo$datasource6 === void 0 ? void 0 : _extraInfo$datasource6.isPlusTable) ? /*#__PURE__*/React.createElement(_Input.Group, {
|
144
|
+
compact: true
|
131
145
|
}, /*#__PURE__*/React.createElement(_Select, {
|
132
|
-
mode: (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$
|
146
|
+
mode: (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$datasource7 = extraInfo.datasource) === null || _extraInfo$datasource7 === void 0 ? void 0 : (_extraInfo$datasource8 = _extraInfo$datasource7.postgreSql) === null || _extraInfo$datasource8 === void 0 ? void 0 : _extraInfo$datasource8.isMutiple) ? 'multiple' : undefined,
|
147
|
+
allowClear: true,
|
148
|
+
value: dataTable,
|
149
|
+
options: dataTableOpts,
|
150
|
+
onChange: onDataTableChange,
|
151
|
+
style: {
|
152
|
+
width: 'calc(100% - 32px)'
|
153
|
+
}
|
154
|
+
}), /*#__PURE__*/React.createElement(_Tooltip, {
|
155
|
+
title: tr('手动建表'),
|
156
|
+
style: {
|
157
|
+
width: '32px'
|
158
|
+
}
|
159
|
+
}, /*#__PURE__*/React.createElement(_Button, {
|
160
|
+
icon: /*#__PURE__*/React.createElement(PlusOutlined, null),
|
161
|
+
onClick: onPlusClick
|
162
|
+
}))) : /*#__PURE__*/React.createElement(_Select, {
|
163
|
+
mode: (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$datasource9 = extraInfo.datasource) === null || _extraInfo$datasource9 === void 0 ? void 0 : (_extraInfo$datasource10 = _extraInfo$datasource9.postgreSql) === null || _extraInfo$datasource10 === void 0 ? void 0 : _extraInfo$datasource10.isMutiple) ? 'multiple' : undefined,
|
133
164
|
allowClear: true,
|
134
165
|
value: dataTable,
|
135
166
|
options: dataTableOpts,
|
@@ -1,13 +1,20 @@
|
|
1
|
+
import "antd/es/input/style";
|
2
|
+
import _Input from "antd/es/input";
|
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";
|
1
7
|
import "antd/es/select/style";
|
2
8
|
import _Select from "antd/es/select";
|
3
9
|
import "antd/es/col/style";
|
4
10
|
import _Col from "antd/es/col";
|
5
11
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
12
|
+
import { PlusOutlined } from '@ant-design/icons';
|
6
13
|
import { tr } from '../../../../../framework/locale';
|
7
14
|
import { useGetDatasource } from './hooks';
|
8
15
|
import React from 'react';
|
9
16
|
var SqlServerDatasource = function SqlServerDatasource(props) {
|
10
|
-
var _extraInfo$datasource, _extraInfo$datasource2, _extraInfo$datasource3, _extraInfo$datasource4, _extraInfo$datasource5, _extraInfo$datasource6;
|
17
|
+
var _extraInfo$datasource, _extraInfo$datasource2, _extraInfo$datasource3, _extraInfo$datasource4, _extraInfo$datasource5, _extraInfo$datasource6, _extraInfo$datasource7, _extraInfo$datasource8, _extraInfo$datasource9, _extraInfo$datasource10;
|
11
18
|
var extraInfo = props.extraInfo,
|
12
19
|
datasource = props.datasource,
|
13
20
|
wrapperCol = props.wrapperCol,
|
@@ -47,6 +54,11 @@ var SqlServerDatasource = function SqlServerDatasource(props) {
|
|
47
54
|
dt: value
|
48
55
|
});
|
49
56
|
};
|
57
|
+
var onPlusClick = function onPlusClick() {
|
58
|
+
onChange && onChange({
|
59
|
+
plus: true
|
60
|
+
});
|
61
|
+
};
|
50
62
|
React.useEffect(function () {
|
51
63
|
if (initialValue) {
|
52
64
|
onDataBaseChange(initialValue.db);
|
@@ -123,8 +135,27 @@ var SqlServerDatasource = function SqlServerDatasource(props) {
|
|
123
135
|
style: {
|
124
136
|
paddingBottom: '8px'
|
125
137
|
}
|
138
|
+
}, (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$datasource5 = extraInfo.datasource) === null || _extraInfo$datasource5 === void 0 ? void 0 : (_extraInfo$datasource6 = _extraInfo$datasource5.sqlServer) === null || _extraInfo$datasource6 === void 0 ? void 0 : _extraInfo$datasource6.isPlusTable) ? /*#__PURE__*/React.createElement(_Input.Group, {
|
139
|
+
compact: true
|
126
140
|
}, /*#__PURE__*/React.createElement(_Select, {
|
127
|
-
mode: (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$
|
141
|
+
mode: (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$datasource7 = extraInfo.datasource) === null || _extraInfo$datasource7 === void 0 ? void 0 : (_extraInfo$datasource8 = _extraInfo$datasource7.sqlServer) === null || _extraInfo$datasource8 === void 0 ? void 0 : _extraInfo$datasource8.isMutiple) ? 'multiple' : undefined,
|
142
|
+
allowClear: true,
|
143
|
+
value: dataTable,
|
144
|
+
options: dataTableOpts,
|
145
|
+
onChange: onDataTableChange,
|
146
|
+
style: {
|
147
|
+
width: 'calc(100% - 32px)'
|
148
|
+
}
|
149
|
+
}), /*#__PURE__*/React.createElement(_Tooltip, {
|
150
|
+
title: tr('手动建表'),
|
151
|
+
style: {
|
152
|
+
width: '32px'
|
153
|
+
}
|
154
|
+
}, /*#__PURE__*/React.createElement(_Button, {
|
155
|
+
icon: /*#__PURE__*/React.createElement(PlusOutlined, null),
|
156
|
+
onClick: onPlusClick
|
157
|
+
}))) : /*#__PURE__*/React.createElement(_Select, {
|
158
|
+
mode: (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$datasource9 = extraInfo.datasource) === null || _extraInfo$datasource9 === void 0 ? void 0 : (_extraInfo$datasource10 = _extraInfo$datasource9.sqlServer) === null || _extraInfo$datasource10 === void 0 ? void 0 : _extraInfo$datasource10.isMutiple) ? 'multiple' : undefined,
|
128
159
|
allowClear: true,
|
129
160
|
value: dataTable,
|
130
161
|
options: dataTableOpts,
|
@@ -16,6 +16,8 @@ import React from 'react';
|
|
16
16
|
import Editable from '../../../../comps/Editable';
|
17
17
|
import { MetadataFormContext } from '../../interface';
|
18
18
|
import { useGetLabelCol, useGetWrapperCol } from './Datasource/hooks';
|
19
|
+
import useObservable from '@/framework/rxjs-hooks/useObservable';
|
20
|
+
import { STREAM_EVENT_TYPE } from '../../constants';
|
19
21
|
var MapTable = function MapTable(props) {
|
20
22
|
var value = props.value,
|
21
23
|
onChange = props.onChange,
|
@@ -52,6 +54,10 @@ var MapTable = function MapTable(props) {
|
|
52
54
|
form = _React$useContext.form;
|
53
55
|
var labelCol = useGetLabelCol(extraInfo);
|
54
56
|
var wrapperCol = useGetWrapperCol(extraInfo);
|
57
|
+
var formContext = React.useContext(MetadataFormContext) || {};
|
58
|
+
useObservable(function (p) {
|
59
|
+
if ((p === null || p === void 0 ? void 0 : p.type) === STREAM_EVENT_TYPE.ON_VALUES_CHANGE) {}
|
60
|
+
}, [formContext === null || formContext === void 0 ? void 0 : formContext.stream$]);
|
55
61
|
var triggerChange = function triggerChange(changedValue) {
|
56
62
|
onChange && onChange(_objectSpread({
|
57
63
|
mapping: mapping,
|
@@ -186,7 +192,7 @@ var MapTable = function MapTable(props) {
|
|
186
192
|
height: '100%',
|
187
193
|
marginTop: '2px'
|
188
194
|
}
|
189
|
-
},
|
195
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
190
196
|
style: {
|
191
197
|
width: '40%'
|
192
198
|
}
|
@@ -204,7 +210,8 @@ var MapTable = function MapTable(props) {
|
|
204
210
|
onMove: onSourceMove
|
205
211
|
})), /*#__PURE__*/React.createElement("div", {
|
206
212
|
style: {
|
207
|
-
marginTop: '40px'
|
213
|
+
marginTop: '40px',
|
214
|
+
marginRight: '6px'
|
208
215
|
}
|
209
216
|
}, _toConsumableArray(Array(Math.min(tableDataSource === null || tableDataSource === void 0 ? void 0 : tableDataSource.length, tableDataTarget === null || tableDataTarget === void 0 ? void 0 : tableDataTarget.length))).map(function (_, index) {
|
210
217
|
return /*#__PURE__*/React.createElement("div", {
|
@@ -16,6 +16,9 @@ import { useGetWrapperCol } from './Datasource/hooks';
|
|
16
16
|
import CodeEdit from '../../../../comps/CodeEdit';
|
17
17
|
import { getConfig } from '../../../../config';
|
18
18
|
import { modifyComment } from '../../utils';
|
19
|
+
import { MetadataFormContext } from '../../interface';
|
20
|
+
import useObservable from '@/framework/rxjs-hooks/useObservable';
|
21
|
+
import { STREAM_EVENT_TYPE } from '../../constants';
|
19
22
|
var SparkSqlTable = function SparkSqlTable(props) {
|
20
23
|
var value = props.value,
|
21
24
|
extraInfo = props.extraInfo,
|
@@ -34,6 +37,30 @@ var SparkSqlTable = function SparkSqlTable(props) {
|
|
34
37
|
setList = _React$useState6[1];
|
35
38
|
var listRef = React.useRef([]);
|
36
39
|
var wrapperCol = useGetWrapperCol(extraInfo);
|
40
|
+
var formContext = React.useContext(MetadataFormContext) || {};
|
41
|
+
useObservable(function (p) {
|
42
|
+
if ((p === null || p === void 0 ? void 0 : p.type) === STREAM_EVENT_TYPE.ON_VALUES_CHANGE) {
|
43
|
+
var _p$payload, _val$datasource, _val$datasource3;
|
44
|
+
var val = p === null || p === void 0 ? void 0 : (_p$payload = p.payload) === null || _p$payload === void 0 ? void 0 : _p$payload.val;
|
45
|
+
var _selected;
|
46
|
+
if (val === null || val === void 0 ? void 0 : (_val$datasource = val.datasource) === null || _val$datasource === void 0 ? void 0 : _val$datasource.topics) {
|
47
|
+
var _val$datasource2, _val$datasource2$topi;
|
48
|
+
_selected = val === null || val === void 0 ? void 0 : (_val$datasource2 = val.datasource) === null || _val$datasource2 === void 0 ? void 0 : (_val$datasource2$topi = _val$datasource2.topics) === null || _val$datasource2$topi === void 0 ? void 0 : _val$datasource2$topi.map(function (p) {
|
49
|
+
var _JSON$parse;
|
50
|
+
return (_JSON$parse = JSON.parse(p)) === null || _JSON$parse === void 0 ? void 0 : _JSON$parse.name;
|
51
|
+
});
|
52
|
+
setSelected(_toConsumableArray(_selected));
|
53
|
+
}
|
54
|
+
if (val === null || val === void 0 ? void 0 : (_val$datasource3 = val.datasource) === null || _val$datasource3 === void 0 ? void 0 : _val$datasource3.dt) {
|
55
|
+
var _val$datasource4, _val$datasource4$dt;
|
56
|
+
_selected = val === null || val === void 0 ? void 0 : (_val$datasource4 = val.datasource) === null || _val$datasource4 === void 0 ? void 0 : (_val$datasource4$dt = _val$datasource4.dt) === null || _val$datasource4$dt === void 0 ? void 0 : _val$datasource4$dt.map(function (p) {
|
57
|
+
var _JSON$parse2;
|
58
|
+
return (_JSON$parse2 = JSON.parse(p)) === null || _JSON$parse2 === void 0 ? void 0 : _JSON$parse2.name;
|
59
|
+
});
|
60
|
+
setSelected(_toConsumableArray(_selected));
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}, [formContext === null || formContext === void 0 ? void 0 : formContext.stream$]);
|
37
64
|
var handleAddItem = function handleAddItem() {
|
38
65
|
var item = {
|
39
66
|
alias: "tbl".concat(listRef.current.length + 1),
|
@@ -60,7 +87,6 @@ var SparkSqlTable = function SparkSqlTable(props) {
|
|
60
87
|
var triggerChange = function triggerChange(changedValue) {
|
61
88
|
onChange && onChange(_objectSpread({
|
62
89
|
view: view,
|
63
|
-
selected: selected,
|
64
90
|
list: list
|
65
91
|
}, changedValue));
|
66
92
|
};
|
@@ -70,12 +96,6 @@ var SparkSqlTable = function SparkSqlTable(props) {
|
|
70
96
|
view: v.target.value
|
71
97
|
});
|
72
98
|
};
|
73
|
-
var onSelectedChange = function onSelectedChange(v) {
|
74
|
-
setSelected(v.target.value);
|
75
|
-
triggerChange({
|
76
|
-
selected: v.target.value
|
77
|
-
});
|
78
|
-
};
|
79
99
|
var onListChange = function onListChange(v, index, key) {
|
80
100
|
var _list = listRef.current;
|
81
101
|
if (key === 'alias' || key === 'outputView') {
|
@@ -96,12 +116,6 @@ var SparkSqlTable = function SparkSqlTable(props) {
|
|
96
116
|
view: value.view
|
97
117
|
});
|
98
118
|
}
|
99
|
-
if (value.selected) {
|
100
|
-
setSelected(value.selected);
|
101
|
-
triggerChange({
|
102
|
-
selected: value.selected
|
103
|
-
});
|
104
|
-
}
|
105
119
|
if (value.list) {
|
106
120
|
setList(value.list);
|
107
121
|
listRef.current = value.list;
|
@@ -164,7 +178,6 @@ var SparkSqlTable = function SparkSqlTable(props) {
|
|
164
178
|
},
|
165
179
|
addonAfter: /*#__PURE__*/React.createElement(EyeOutlined, null),
|
166
180
|
value: p,
|
167
|
-
onChange: onSelectedChange,
|
168
181
|
disabled: true
|
169
182
|
});
|
170
183
|
}))), /*#__PURE__*/React.createElement("div", {
|