ronds-metadata 1.3.84 → 1.3.85

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,6 +15,7 @@ interface ICodeEditProps {
15
15
  * 编辑框输入值改变回调
16
16
  */
17
17
  onChange?: (txt: string) => void;
18
+ readOnly?: boolean;
18
19
  }
19
20
  declare const CodeEdit: (props: ICodeEditProps) => React.JSX.Element;
20
21
  export default CodeEdit;
@@ -19,7 +19,8 @@ var CodeEdit = function CodeEdit(props) {
19
19
  theme = _props$theme === void 0 ? 'light' : _props$theme,
20
20
  _props$mode = props.mode,
21
21
  mode = _props$mode === void 0 ? 'javascript' : _props$mode,
22
- onChange = props.onChange;
22
+ onChange = props.onChange,
23
+ readOnly = props.readOnly;
23
24
  var editorRef = React.useRef(null);
24
25
  var firstLoadRef = React.useRef(true);
25
26
  var monaco = useMonaco();
@@ -131,7 +132,7 @@ var CodeEdit = function CodeEdit(props) {
131
132
  editorRef.current = editor;
132
133
  },
133
134
  options: {
134
- readOnly: false,
135
+ readOnly: readOnly,
135
136
  automaticLayout: true,
136
137
  wordWrap: 'on',
137
138
  quickSuggestions: true,
@@ -133,7 +133,7 @@ function Index(props) {
133
133
  }, _callee);
134
134
  })), [extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.autoComplete]);
135
135
  var processInputType = function processInputType(_type) {
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;
136
+ var _extraInfo$disabled, _extraInfo$disabled2, _extraInfo$disabled3, _extraInfo$disabled4, _extraInfo$disabled5, _extraInfo$disabled6, _extraInfo$disabled7, _extraInfo$disabled8, _extraInfo$disabled9, _extraInfo$disabled10, _extraInfo$disabled11, _extraInfo$addonAfter2, _extraInfo$addonAfter3, _extraInfo$addonAfter4, _extraInfo$addonAfter5, _extraInfo$disabled12;
137
137
  switch (_type) {
138
138
  case 'autoComplete':
139
139
  return /*#__PURE__*/React.createElement(_AutoComplete, {
@@ -210,9 +210,13 @@ function Index(props) {
210
210
  disabled: (_extraInfo$disabled9 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled9 !== void 0 ? _extraInfo$disabled9 : disabled
211
211
  });
212
212
  case 'sparkSqlTable':
213
- return /*#__PURE__*/React.createElement(SparkSqlTable, extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.sparkSqlTable);
213
+ return /*#__PURE__*/React.createElement(SparkSqlTable, _extends({}, extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.sparkSqlTable, {
214
+ disabled: (_extraInfo$disabled10 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled10 !== void 0 ? _extraInfo$disabled10 : disabled
215
+ }));
214
216
  case 'mapTable':
215
- return /*#__PURE__*/React.createElement(MapTable, extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.mapTable);
217
+ return /*#__PURE__*/React.createElement(MapTable, _extends({}, extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.mapTable, {
218
+ disabled: (_extraInfo$disabled11 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled11 !== void 0 ? _extraInfo$disabled11 : disabled
219
+ }));
216
220
  default:
217
221
  return /*#__PURE__*/React.createElement(_Input, {
218
222
  addonAfter: ((_extraInfo$addonAfter2 = extraInfo.addonAfter) === null || _extraInfo$addonAfter2 === void 0 ? void 0 : _extraInfo$addonAfter2.key) ? /*#__PURE__*/React.createElement(_Form.Item, {
@@ -227,7 +231,7 @@ function Index(props) {
227
231
  }))) : undefined,
228
232
  showCount: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.showCount,
229
233
  maxLength: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.maxLength,
230
- disabled: (_extraInfo$disabled10 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled10 !== void 0 ? _extraInfo$disabled10 : disabled,
234
+ disabled: (_extraInfo$disabled12 = extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.disabled) !== null && _extraInfo$disabled12 !== void 0 ? _extraInfo$disabled12 : disabled,
231
235
  placeholder: tr(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.placeholder),
232
236
  title: tr(valueTitle),
233
237
  allowClear: true
@@ -27,6 +27,7 @@ var BusinessForm = function BusinessForm(props) {
27
27
  triggerChange(values);
28
28
  };
29
29
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(MetadataForm, {
30
+ disabled: disabled,
30
31
  schema: schema,
31
32
  getFormInstance: function getFormInstance(form) {
32
33
  formRef.current = form;
@@ -6,6 +6,7 @@ interface ICassandraDatasourceProps {
6
6
  labelCol: string;
7
7
  onChange?: any;
8
8
  initialValue?: any;
9
+ disabled?: any;
9
10
  }
10
11
  declare const CassandraDatasource: (props: ICassandraDatasourceProps) => React.JSX.Element;
11
12
  export default CassandraDatasource;
@@ -20,7 +20,8 @@ var CassandraDatasource = function CassandraDatasource(props) {
20
20
  onChange = props.onChange,
21
21
  wrapperCol = props.wrapperCol,
22
22
  labelCol = props.labelCol,
23
- initialValue = props.initialValue;
23
+ initialValue = props.initialValue,
24
+ disabled = props.disabled;
24
25
  var _React$useState = React.useState(),
25
26
  _React$useState2 = _slicedToArray(_React$useState, 2),
26
27
  keySpace = _React$useState2[0],
@@ -78,7 +79,8 @@ var CassandraDatasource = function CassandraDatasource(props) {
78
79
  allowClear: true,
79
80
  value: keySpace,
80
81
  options: keySpaceOpts,
81
- onChange: onKeySpaceChange
82
+ onChange: onKeySpaceChange,
83
+ disabled: disabled
82
84
  })), /*#__PURE__*/React.createElement(_Col, {
83
85
  span: !(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.labelSpan) && (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.layout) === 'vertical' && 24,
84
86
  flex: labelCol
@@ -108,7 +110,8 @@ var CassandraDatasource = function CassandraDatasource(props) {
108
110
  onChange: onDataTableChange,
109
111
  style: {
110
112
  width: 'calc(100% - 32px)'
111
- }
113
+ },
114
+ disabled: disabled
112
115
  }), /*#__PURE__*/React.createElement(_Tooltip, {
113
116
  title: tr('手动建表'),
114
117
  style: {
@@ -116,13 +119,15 @@ var CassandraDatasource = function CassandraDatasource(props) {
116
119
  }
117
120
  }, /*#__PURE__*/React.createElement(_Button, {
118
121
  icon: /*#__PURE__*/React.createElement(PlusOutlined, null),
119
- onClick: onPlusClick
122
+ onClick: onPlusClick,
123
+ disabled: disabled
120
124
  }))) : /*#__PURE__*/React.createElement(_Select, {
121
125
  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
126
  allowClear: true,
123
127
  value: dataTable,
124
128
  options: dataTableOpts,
125
- onChange: onDataTableChange
129
+ onChange: onDataTableChange,
130
+ disabled: disabled
126
131
  })));
127
132
  };
128
133
  export default CassandraDatasource;
@@ -6,6 +6,7 @@ interface IKafkaDatasourceProps {
6
6
  labelCol: string;
7
7
  onChange?: any;
8
8
  initialValue?: any;
9
+ disabled?: any;
9
10
  }
10
11
  declare const KafkaDatasource: (props: IKafkaDatasourceProps) => React.JSX.Element;
11
12
  export default KafkaDatasource;
@@ -20,7 +20,8 @@ var KafkaDatasource = function KafkaDatasource(props) {
20
20
  onChange = props.onChange,
21
21
  wrapperCol = props.wrapperCol,
22
22
  labelCol = props.labelCol,
23
- initialValue = props.initialValue;
23
+ initialValue = props.initialValue,
24
+ disabled = props.disabled;
24
25
  var _React$useState = React.useState(),
25
26
  _React$useState2 = _slicedToArray(_React$useState, 2),
26
27
  topic = _React$useState2[0],
@@ -71,7 +72,8 @@ var KafkaDatasource = function KafkaDatasource(props) {
71
72
  onChange: onTopicChange,
72
73
  style: {
73
74
  width: 'calc(100% - 32px)'
74
- }
75
+ },
76
+ disabled: disabled
75
77
  }), /*#__PURE__*/React.createElement(_Tooltip, {
76
78
  title: tr('手动建表'),
77
79
  style: {
@@ -79,13 +81,15 @@ var KafkaDatasource = function KafkaDatasource(props) {
79
81
  }
80
82
  }, /*#__PURE__*/React.createElement(_Button, {
81
83
  icon: /*#__PURE__*/React.createElement(PlusOutlined, null),
82
- onClick: onPlusClick
84
+ onClick: onPlusClick,
85
+ disabled: disabled
83
86
  }))) : /*#__PURE__*/React.createElement(_Select, {
84
87
  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,
85
88
  value: topic,
86
89
  allowClear: true,
87
90
  options: topicOpts,
88
- onChange: onTopicChange
91
+ onChange: onTopicChange,
92
+ disabled: disabled
89
93
  })));
90
94
  };
91
95
  export default KafkaDatasource;
@@ -6,6 +6,7 @@ interface IPostgreSQLDatasourceProps {
6
6
  datasource?: any;
7
7
  onChange?: any;
8
8
  initialValue?: any;
9
+ disabled?: boolean;
9
10
  }
10
11
  declare const PostgreSQLDatasource: (props: IPostgreSQLDatasourceProps) => React.JSX.Element;
11
12
  export default PostgreSQLDatasource;
@@ -25,7 +25,8 @@ var PostgreSQLDatasource = function PostgreSQLDatasource(props) {
25
25
  labelCol = props.labelCol,
26
26
  datasource = props.datasource,
27
27
  onChange = props.onChange,
28
- initialValue = props.initialValue;
28
+ initialValue = props.initialValue,
29
+ disabled = props.disabled;
29
30
  var _React$useState = React.useState(),
30
31
  _React$useState2 = _slicedToArray(_React$useState, 2),
31
32
  dataBase = _React$useState2[0],
@@ -95,7 +96,8 @@ var PostgreSQLDatasource = function PostgreSQLDatasource(props) {
95
96
  allowClear: true,
96
97
  value: dataBase,
97
98
  options: dataBaseOpts,
98
- onChange: onDataBaseChange
99
+ onChange: onDataBaseChange,
100
+ disabled: disabled
99
101
  })), /*#__PURE__*/React.createElement(_Col, {
100
102
  span: !(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.labelSpan) && (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.layout) === 'vertical' && 24,
101
103
  flex: labelCol
@@ -120,7 +122,8 @@ var PostgreSQLDatasource = function PostgreSQLDatasource(props) {
120
122
  allowClear: true,
121
123
  value: schema,
122
124
  options: schemaOpts,
123
- onChange: onSchemaChange
125
+ onChange: onSchemaChange,
126
+ disabled: disabled
124
127
  })), /*#__PURE__*/React.createElement(_Col, {
125
128
  span: !(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.labelSpan) && (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.layout) === 'vertical' && 24,
126
129
  flex: labelCol
@@ -150,7 +153,8 @@ var PostgreSQLDatasource = function PostgreSQLDatasource(props) {
150
153
  onChange: onDataTableChange,
151
154
  style: {
152
155
  width: 'calc(100% - 32px)'
153
- }
156
+ },
157
+ disabled: disabled
154
158
  }), /*#__PURE__*/React.createElement(_Tooltip, {
155
159
  title: tr('手动建表'),
156
160
  style: {
@@ -158,13 +162,15 @@ var PostgreSQLDatasource = function PostgreSQLDatasource(props) {
158
162
  }
159
163
  }, /*#__PURE__*/React.createElement(_Button, {
160
164
  icon: /*#__PURE__*/React.createElement(PlusOutlined, null),
161
- onClick: onPlusClick
165
+ onClick: onPlusClick,
166
+ disabled: disabled
162
167
  }))) : /*#__PURE__*/React.createElement(_Select, {
163
168
  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,
164
169
  allowClear: true,
165
170
  value: dataTable,
166
171
  options: dataTableOpts,
167
- onChange: onDataTableChange
172
+ onChange: onDataTableChange,
173
+ disabled: disabled
168
174
  })));
169
175
  };
170
176
  export default PostgreSQLDatasource;
@@ -6,6 +6,7 @@ interface ISqlServerDatasourceProps {
6
6
  labelCol: string;
7
7
  onChange?: any;
8
8
  initialValue?: any;
9
+ disabled?: any;
9
10
  }
10
11
  declare const SqlServerDatasource: (props: ISqlServerDatasourceProps) => React.JSX.Element;
11
12
  export default SqlServerDatasource;
@@ -20,7 +20,8 @@ var SqlServerDatasource = function SqlServerDatasource(props) {
20
20
  wrapperCol = props.wrapperCol,
21
21
  labelCol = props.labelCol,
22
22
  onChange = props.onChange,
23
- initialValue = props.initialValue;
23
+ initialValue = props.initialValue,
24
+ disabled = props.disabled;
24
25
  var _React$useState = React.useState(),
25
26
  _React$useState2 = _slicedToArray(_React$useState, 2),
26
27
  dataBase = _React$useState2[0],
@@ -90,7 +91,8 @@ var SqlServerDatasource = function SqlServerDatasource(props) {
90
91
  allowClear: true,
91
92
  value: dataBase,
92
93
  options: dataBaseOpts,
93
- onChange: onDataBaseChange
94
+ onChange: onDataBaseChange,
95
+ disabled: disabled
94
96
  })), /*#__PURE__*/React.createElement(_Col, {
95
97
  span: !(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.labelSpan) && (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.layout) === 'vertical' && 24,
96
98
  flex: labelCol
@@ -115,7 +117,8 @@ var SqlServerDatasource = function SqlServerDatasource(props) {
115
117
  allowClear: true,
116
118
  value: schema,
117
119
  options: schemaOpts,
118
- onChange: onSchemaChange
120
+ onChange: onSchemaChange,
121
+ disabled: disabled
119
122
  })), /*#__PURE__*/React.createElement(_Col, {
120
123
  span: !(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.labelSpan) && (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.layout) === 'vertical' && 24,
121
124
  flex: labelCol
@@ -145,7 +148,8 @@ var SqlServerDatasource = function SqlServerDatasource(props) {
145
148
  onChange: onDataTableChange,
146
149
  style: {
147
150
  width: 'calc(100% - 32px)'
148
- }
151
+ },
152
+ disabled: disabled
149
153
  }), /*#__PURE__*/React.createElement(_Tooltip, {
150
154
  title: tr('手动建表'),
151
155
  style: {
@@ -153,13 +157,15 @@ var SqlServerDatasource = function SqlServerDatasource(props) {
153
157
  }
154
158
  }, /*#__PURE__*/React.createElement(_Button, {
155
159
  icon: /*#__PURE__*/React.createElement(PlusOutlined, null),
156
- onClick: onPlusClick
160
+ onClick: onPlusClick,
161
+ disabled: disabled
157
162
  }))) : /*#__PURE__*/React.createElement(_Select, {
158
163
  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,
159
164
  allowClear: true,
160
165
  value: dataTable,
161
166
  options: dataTableOpts,
162
- onChange: onDataTableChange
167
+ onChange: onDataTableChange,
168
+ disabled: disabled
163
169
  })));
164
170
  };
165
171
  export default SqlServerDatasource;
@@ -120,6 +120,16 @@ var DataSource = function DataSource(props) {
120
120
  datasource: value.datasource
121
121
  });
122
122
  }
123
+ if (value.link) {
124
+ triggerChange({
125
+ link: value.link
126
+ });
127
+ }
128
+ if (value.plus) {
129
+ triggerChange({
130
+ plus: value.plus
131
+ });
132
+ }
123
133
  switch (value === null || value === void 0 ? void 0 : value.dsType) {
124
134
  case 'Kafka':
125
135
  setKafkaInitValue(value);
@@ -174,7 +184,8 @@ var DataSource = function DataSource(props) {
174
184
  },
175
185
  value: dsType,
176
186
  options: datasourceTypeOpts,
177
- onChange: onDatasourceTypeChange
187
+ onChange: onDatasourceTypeChange,
188
+ disabled: disabled
178
189
  }), /*#__PURE__*/React.createElement(_Select, {
179
190
  id: 'datasource',
180
191
  style: {
@@ -182,7 +193,8 @@ var DataSource = function DataSource(props) {
182
193
  },
183
194
  value: datasource,
184
195
  options: datasourceOpts,
185
- onChange: onDatasourceChange
196
+ onChange: onDatasourceChange,
197
+ disabled: disabled
186
198
  }), /*#__PURE__*/React.createElement(_Tooltip, {
187
199
  title: tr('测试链接'),
188
200
  style: {
@@ -190,35 +202,40 @@ var DataSource = function DataSource(props) {
190
202
  }
191
203
  }, /*#__PURE__*/React.createElement(_Button, {
192
204
  icon: /*#__PURE__*/React.createElement(LinkOutlined, null),
193
- onClick: onLinkClick
205
+ onClick: onLinkClick,
206
+ disabled: disabled
194
207
  })))), dsType === 'Kafka' && /*#__PURE__*/React.createElement(KafkaDatasource, {
195
208
  wrapperCol: wrapperCol,
196
209
  labelCol: labelCol,
197
210
  extraInfo: extraInfo,
198
211
  datasource: datasource,
199
212
  onChange: onKafkaChange,
200
- initialValue: kafkaInitValue
213
+ initialValue: kafkaInitValue,
214
+ disabled: disabled
201
215
  }), dsType === 'PostgreSql' && /*#__PURE__*/React.createElement(PostgreSQLDatasource, {
202
216
  wrapperCol: wrapperCol,
203
217
  labelCol: labelCol,
204
218
  extraInfo: extraInfo,
205
219
  datasource: datasource,
206
220
  onChange: onPgSqlChange,
207
- initialValue: postgreSQLInitValue
221
+ initialValue: postgreSQLInitValue,
222
+ disabled: disabled
208
223
  }), dsType === 'Cassandra' && /*#__PURE__*/React.createElement(CassandraDatasource, {
209
224
  wrapperCol: wrapperCol,
210
225
  labelCol: labelCol,
211
226
  extraInfo: extraInfo,
212
227
  datasource: datasource,
213
228
  onChange: onCassandraChange,
214
- initialValue: cassandraInitValue
229
+ initialValue: cassandraInitValue,
230
+ disabled: disabled
215
231
  }), dsType === 'SqlServer' && /*#__PURE__*/React.createElement(SqlServerDatasource, {
216
232
  wrapperCol: wrapperCol,
217
233
  labelCol: labelCol,
218
234
  extraInfo: extraInfo,
219
235
  datasource: datasource,
220
236
  onChange: onSqlServerChange,
221
- initialValue: sqlServerInitValue
237
+ initialValue: sqlServerInitValue,
238
+ disabled: disabled
222
239
  }))));
223
240
  };
224
241
  export default DataSource;
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  interface IMapTableProps {
3
3
  extraInfo?: any;
4
4
  value?: any;
5
+ disabled?: boolean;
5
6
  onChange?: (value: any) => void;
6
7
  }
7
8
  declare const MapTable: (props: IMapTableProps) => React.JSX.Element;
@@ -21,7 +21,8 @@ import { STREAM_EVENT_TYPE } from '../../constants';
21
21
  var MapTable = function MapTable(props) {
22
22
  var value = props.value,
23
23
  onChange = props.onChange,
24
- extraInfo = props.extraInfo;
24
+ extraInfo = props.extraInfo,
25
+ disabled = props.disabled;
25
26
  var _React$useState = React.useState([]),
26
27
  _React$useState2 = _slicedToArray(_React$useState, 2),
27
28
  tableDataSource = _React$useState2[0],
@@ -184,7 +185,8 @@ var MapTable = function MapTable(props) {
184
185
  }, /*#__PURE__*/React.createElement(_Select, {
185
186
  onChange: onOutputChange,
186
187
  value: output,
187
- options: options
188
+ options: options,
189
+ disabled: disabled
188
190
  })), /*#__PURE__*/React.createElement("div", {
189
191
  style: {
190
192
  display: 'flex',
@@ -197,7 +199,7 @@ var MapTable = function MapTable(props) {
197
199
  width: '40%'
198
200
  }
199
201
  }, /*#__PURE__*/React.createElement(Editable, {
200
- readonly: true,
202
+ readonly: disabled,
201
203
  type: "single",
202
204
  columns: columnSource,
203
205
  dataSource: tableDataSource,
@@ -210,7 +212,7 @@ var MapTable = function MapTable(props) {
210
212
  onMove: onSourceMove
211
213
  })), /*#__PURE__*/React.createElement("div", {
212
214
  style: {
213
- marginTop: '40px',
215
+ marginTop: '39px',
214
216
  marginRight: '6px'
215
217
  }
216
218
  }, _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) {
@@ -219,8 +221,7 @@ var MapTable = function MapTable(props) {
219
221
  style: {
220
222
  marginLeft: '6px',
221
223
  marginRight: '6px',
222
- marginBottom: '-2px',
223
- lineHeight: '30px'
224
+ lineHeight: '33px'
224
225
  }
225
226
  }, /*#__PURE__*/React.createElement(_Button, {
226
227
  key: index,
@@ -228,14 +229,15 @@ var MapTable = function MapTable(props) {
228
229
  icon: disableArray && disableArray[index] ? /*#__PURE__*/React.createElement(ArrowRightOutlined, null) : /*#__PURE__*/React.createElement(CloseCircleFilled, null),
229
230
  onClick: function onClick() {
230
231
  return onBtnClick(index);
231
- }
232
+ },
233
+ disabled: disabled
232
234
  }));
233
235
  })), /*#__PURE__*/React.createElement("div", {
234
236
  style: {
235
237
  width: '40%'
236
238
  }
237
239
  }, /*#__PURE__*/React.createElement(Editable, {
238
- readonly: true,
240
+ readonly: disabled,
239
241
  type: "single",
240
242
  columns: columnTarget,
241
243
  dataSource: tableDataTarget,
@@ -256,17 +258,11 @@ var columnSource = [{
256
258
  }, {
257
259
  title: '类型',
258
260
  dataIndex: 'type',
259
- key: 'type',
260
- render: function render(val) {
261
- return val !== null && val !== void 0 ? val : 'null';
262
- }
261
+ key: 'type'
263
262
  }, {
264
263
  title: '注释',
265
264
  dataIndex: 'label',
266
- key: 'label',
267
- render: function render(val) {
268
- return val !== null && val !== void 0 ? val : 'null';
269
- }
265
+ key: 'label'
270
266
  }];
271
267
  var columnTarget = [{
272
268
  title: '目标表字段',
@@ -4,6 +4,7 @@ interface ISparkSqlTableProps {
4
4
  initSql?: string;
5
5
  value?: any;
6
6
  extraInfo?: any;
7
+ disabled?: boolean;
7
8
  onChange?: (value: any) => void;
8
9
  }
9
10
  declare const SparkSqlTable: (props: ISparkSqlTableProps) => React.JSX.Element;
@@ -22,7 +22,8 @@ import { STREAM_EVENT_TYPE } from '../../constants';
22
22
  var SparkSqlTable = function SparkSqlTable(props) {
23
23
  var value = props.value,
24
24
  extraInfo = props.extraInfo,
25
- onChange = props.onChange;
25
+ onChange = props.onChange,
26
+ disabled = props.disabled;
26
27
  var _React$useState = React.useState('orgin'),
27
28
  _React$useState2 = _slicedToArray(_React$useState, 2),
28
29
  view = _React$useState2[0],
@@ -176,7 +177,8 @@ var SparkSqlTable = function SparkSqlTable(props) {
176
177
  marginRight: '8px'
177
178
  },
178
179
  value: view,
179
- onChange: onViewChange
180
+ onChange: onViewChange,
181
+ disabled: true
180
182
  })), /*#__PURE__*/React.createElement("span", {
181
183
  style: {
182
184
  display: 'flex',
@@ -232,7 +234,8 @@ var SparkSqlTable = function SparkSqlTable(props) {
232
234
  value: item.alias,
233
235
  onChange: function onChange(val) {
234
236
  onListChange(val.target.value, idx, 'alias');
235
- }
237
+ },
238
+ disabled: disabled
236
239
  })), /*#__PURE__*/React.createElement("span", null, tr('输出视图'), ' ', /*#__PURE__*/React.createElement(_Input, {
237
240
  style: {
238
241
  width: '160px',
@@ -242,7 +245,8 @@ var SparkSqlTable = function SparkSqlTable(props) {
242
245
  value: item.outputView,
243
246
  onChange: function onChange(val) {
244
247
  return onListChange(val.target.value, idx, 'outputView');
245
- }
248
+ },
249
+ disabled: disabled
246
250
  }))), /*#__PURE__*/React.createElement("div", {
247
251
  style: {
248
252
  padding: '4px',
@@ -256,7 +260,8 @@ var SparkSqlTable = function SparkSqlTable(props) {
256
260
  theme: ((_getConfig = getConfig()) === null || _getConfig === void 0 ? void 0 : _getConfig.theme) === 'normal' ? 'light' : 'vs-dark',
257
261
  onChange: function onChange(val) {
258
262
  return onListChange(val, idx, 'sqlEdit');
259
- }
263
+ },
264
+ readOnly: disabled
260
265
  }))), /*#__PURE__*/React.createElement(MinusCircleOutlined, {
261
266
  style: {
262
267
  marginLeft: 'auto'
@@ -268,7 +273,8 @@ var SparkSqlTable = function SparkSqlTable(props) {
268
273
  }), /*#__PURE__*/React.createElement(_Button, {
269
274
  type: "dashed",
270
275
  onClick: handleAddItem,
271
- icon: /*#__PURE__*/React.createElement(PlusOutlined, null)
276
+ icon: /*#__PURE__*/React.createElement(PlusOutlined, null),
277
+ disabled: disabled
272
278
  }, tr('添加SQL语句')))))));
273
279
  };
274
280
  export default SparkSqlTable;
package/es/config.js CHANGED
@@ -61,6 +61,7 @@ globalSettingStream.pipe(map(function (p) {
61
61
  export function getConfigByKey(key) {
62
62
  return config[key];
63
63
  }
64
+ debugger;
64
65
  /** 获取全部配置 */
65
66
  export var getConfig = function getConfig() {
66
67
  return config;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "public": true,
3
3
  "name": "ronds-metadata",
4
- "version": "1.3.84",
4
+ "version": "1.3.85",
5
5
  "scripts": {
6
6
  "start": "dumi dev",
7
7
  "docs:build": "dumi build",