ronds-metadata 1.3.88 → 1.3.90
Sign up to get free protection for your applications and to get access to all the features.
@@ -4,13 +4,17 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
4
|
/*
|
5
5
|
* @Author: wangxian
|
6
6
|
* @Date: 2023-09-08 10:02:20
|
7
|
-
* @LastEditTime: 2024-
|
7
|
+
* @LastEditTime: 2024-09-06 09:18:26
|
8
8
|
*/
|
9
|
-
import Editor, { useMonaco } from '@monaco-editor/react';
|
9
|
+
import Editor, { useMonaco, loader } from '@monaco-editor/react';
|
10
|
+
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
|
10
11
|
import React from 'react';
|
11
12
|
// 引入所需的语言库
|
12
13
|
import 'monaco-editor/esm/vs/basic-languages/pgsql/pgsql.contribution.js';
|
13
14
|
import './index.less';
|
15
|
+
loader.config({
|
16
|
+
monaco: monaco
|
17
|
+
});
|
14
18
|
var CodeEdit = function CodeEdit(props) {
|
15
19
|
var value = props.value,
|
16
20
|
width = props.width,
|
@@ -133,16 +133,25 @@ var MapTable = function MapTable(props) {
|
|
133
133
|
if (disableArray) {
|
134
134
|
var _mapping = [];
|
135
135
|
disableArray.forEach(function (_, idx) {
|
136
|
-
if (
|
137
|
-
var
|
136
|
+
if (idx > tableDataSource.length - 1) {
|
137
|
+
var _tableDataTarget$idx, _tableDataTarget$idx2;
|
138
|
+
_mapping.push({
|
139
|
+
src: null,
|
140
|
+
dst: {
|
141
|
+
name: (_tableDataTarget$idx = tableDataTarget[idx]) === null || _tableDataTarget$idx === void 0 ? void 0 : _tableDataTarget$idx.name,
|
142
|
+
dataType: (_tableDataTarget$idx2 = tableDataTarget[idx]) === null || _tableDataTarget$idx2 === void 0 ? void 0 : _tableDataTarget$idx2.type
|
143
|
+
}
|
144
|
+
});
|
145
|
+
} else if (disableArray[idx]) {
|
146
|
+
var _tableDataSource$idx, _tableDataSource$idx2, _tableDataTarget$idx3, _tableDataTarget$idx4;
|
138
147
|
_mapping.push({
|
139
148
|
src: {
|
140
149
|
name: (_tableDataSource$idx = tableDataSource[idx]) === null || _tableDataSource$idx === void 0 ? void 0 : _tableDataSource$idx.name,
|
141
150
|
dataType: (_tableDataSource$idx2 = tableDataSource[idx]) === null || _tableDataSource$idx2 === void 0 ? void 0 : _tableDataSource$idx2.type
|
142
151
|
},
|
143
152
|
dst: {
|
144
|
-
name: (_tableDataTarget$
|
145
|
-
dataType: (_tableDataTarget$
|
153
|
+
name: (_tableDataTarget$idx3 = tableDataTarget[idx]) === null || _tableDataTarget$idx3 === void 0 ? void 0 : _tableDataTarget$idx3.name,
|
154
|
+
dataType: (_tableDataTarget$idx4 = tableDataTarget[idx]) === null || _tableDataTarget$idx4 === void 0 ? void 0 : _tableDataTarget$idx4.type
|
146
155
|
}
|
147
156
|
});
|
148
157
|
}
|
@@ -167,8 +176,8 @@ var MapTable = function MapTable(props) {
|
|
167
176
|
}
|
168
177
|
(values === null || values === void 0 ? void 0 : values.options) && setOptions(values.options);
|
169
178
|
if (!disableArray && (values === null || values === void 0 ? void 0 : values.dataSource) && (values === null || values === void 0 ? void 0 : values.dataTarget)) {
|
170
|
-
var _values$
|
171
|
-
var valueArray = new Array(
|
179
|
+
var _values$dataTarget;
|
180
|
+
var valueArray = new Array((_values$dataTarget = values.dataTarget) === null || _values$dataTarget === void 0 ? void 0 : _values$dataTarget.length).fill(true);
|
172
181
|
setDisableArray(valueArray);
|
173
182
|
}
|
174
183
|
}, [form.getFieldsValue(), disableArray]);
|
@@ -215,7 +224,7 @@ var MapTable = function MapTable(props) {
|
|
215
224
|
marginTop: '39px',
|
216
225
|
marginRight: '6px'
|
217
226
|
}
|
218
|
-
}, _toConsumableArray(Array(
|
227
|
+
}, _toConsumableArray(new Array(tableDataTarget === null || tableDataTarget === void 0 ? void 0 : tableDataTarget.length).fill(true)).map(function (_, index) {
|
219
228
|
return /*#__PURE__*/React.createElement("div", {
|
220
229
|
key: index,
|
221
230
|
style: {
|
@@ -24,7 +24,7 @@ var SparkSqlTable = function SparkSqlTable(props) {
|
|
24
24
|
extraInfo = props.extraInfo,
|
25
25
|
onChange = props.onChange,
|
26
26
|
disabled = props.disabled;
|
27
|
-
var _React$useState = React.useState('
|
27
|
+
var _React$useState = React.useState('origin'),
|
28
28
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
29
29
|
view = _React$useState2[0],
|
30
30
|
setView = _React$useState2[1];
|
@@ -45,18 +45,21 @@ var SparkSqlTable = function SparkSqlTable(props) {
|
|
45
45
|
var formContext = React.useContext(MetadataFormContext) || {};
|
46
46
|
useObservable(function (p) {
|
47
47
|
if ((p === null || p === void 0 ? void 0 : p.type) === STREAM_EVENT_TYPE.ON_VALUES_CHANGE) {
|
48
|
-
var _p$payload, _val$datasource, _val$
|
48
|
+
var _p$payload, _val$datasource, _val$datasource2, _val$datasource3, _val$datasource7;
|
49
49
|
var val = p === null || p === void 0 ? void 0 : (_p$payload = p.payload) === null || _p$payload === void 0 ? void 0 : _p$payload.val;
|
50
50
|
var _selected;
|
51
51
|
var _array = [];
|
52
|
-
if (val === null || val === void 0 ? void 0 : (_val$datasource = val.datasource) === null || _val$datasource === void 0 ? void 0 : _val$datasource.topics) {
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
52
|
+
if (!(val === null || val === void 0 ? void 0 : (_val$datasource = val.datasource) === null || _val$datasource === void 0 ? void 0 : _val$datasource.topics) || !(val === null || val === void 0 ? void 0 : (_val$datasource2 = val.datasource) === null || _val$datasource2 === void 0 ? void 0 : _val$datasource2.dt)) {
|
53
|
+
setSelected([]);
|
54
|
+
}
|
55
|
+
if (val === null || val === void 0 ? void 0 : (_val$datasource3 = val.datasource) === null || _val$datasource3 === void 0 ? void 0 : _val$datasource3.topics) {
|
56
|
+
var _val$datasource4;
|
57
|
+
if (!Array.isArray(val === null || val === void 0 ? void 0 : (_val$datasource4 = val.datasource) === null || _val$datasource4 === void 0 ? void 0 : _val$datasource4.topics)) {
|
58
|
+
var _val$datasource5;
|
59
|
+
_array = [val === null || val === void 0 ? void 0 : (_val$datasource5 = val.datasource) === null || _val$datasource5 === void 0 ? void 0 : _val$datasource5.topics];
|
57
60
|
} else {
|
58
|
-
var _val$
|
59
|
-
_array = val === null || val === void 0 ? void 0 : (_val$
|
61
|
+
var _val$datasource6;
|
62
|
+
_array = val === null || val === void 0 ? void 0 : (_val$datasource6 = val.datasource) === null || _val$datasource6 === void 0 ? void 0 : _val$datasource6.topics;
|
60
63
|
}
|
61
64
|
_selected = _array.map(function (p) {
|
62
65
|
var _JSON$parse;
|
@@ -64,14 +67,14 @@ var SparkSqlTable = function SparkSqlTable(props) {
|
|
64
67
|
});
|
65
68
|
setSelected(_toConsumableArray(_selected));
|
66
69
|
}
|
67
|
-
if (val === null || val === void 0 ? void 0 : (_val$
|
68
|
-
var _val$
|
69
|
-
if (!Array.isArray(val === null || val === void 0 ? void 0 : (_val$
|
70
|
-
var _val$
|
71
|
-
_array = [val === null || val === void 0 ? void 0 : (_val$
|
70
|
+
if (val === null || val === void 0 ? void 0 : (_val$datasource7 = val.datasource) === null || _val$datasource7 === void 0 ? void 0 : _val$datasource7.dt) {
|
71
|
+
var _val$datasource8;
|
72
|
+
if (!Array.isArray(val === null || val === void 0 ? void 0 : (_val$datasource8 = val.datasource) === null || _val$datasource8 === void 0 ? void 0 : _val$datasource8.dt)) {
|
73
|
+
var _val$datasource9;
|
74
|
+
_array = [val === null || val === void 0 ? void 0 : (_val$datasource9 = val.datasource) === null || _val$datasource9 === void 0 ? void 0 : _val$datasource9.dt];
|
72
75
|
} else {
|
73
|
-
var _val$
|
74
|
-
_array = val === null || val === void 0 ? void 0 : (_val$
|
76
|
+
var _val$datasource10;
|
77
|
+
_array = val === null || val === void 0 ? void 0 : (_val$datasource10 = val.datasource) === null || _val$datasource10 === void 0 ? void 0 : _val$datasource10.dt;
|
75
78
|
}
|
76
79
|
_selected = _array.map(function (p) {
|
77
80
|
var _JSON$parse2;
|
package/es/config.js
CHANGED
@@ -2,7 +2,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
/*
|
3
3
|
* @Author: wangxian
|
4
4
|
* @Date: 2021-09-18 14:15:04
|
5
|
-
* @LastEditTime: 2024-
|
5
|
+
* @LastEditTime: 2024-09-06 10:39:27
|
6
6
|
*/
|
7
7
|
import { BehaviorSubject, map, distinctUntilChanged } from 'rxjs';
|
8
8
|
import { setLocale } from './comps/locales/index';
|