ronds-metadata 1.3.89 → 1.3.90

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.
@@ -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 (disableArray[idx]) {
137
- var _tableDataSource$idx, _tableDataSource$idx2, _tableDataTarget$idx, _tableDataTarget$idx2;
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$idx = tableDataTarget[idx]) === null || _tableDataTarget$idx === void 0 ? void 0 : _tableDataTarget$idx.name,
145
- dataType: (_tableDataTarget$idx2 = tableDataTarget[idx]) === null || _tableDataTarget$idx2 === void 0 ? void 0 : _tableDataTarget$idx2.type
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$dataSource, _values$dataTarget;
171
- var valueArray = new Array(Math.min((_values$dataSource = values.dataSource) === null || _values$dataSource === void 0 ? void 0 : _values$dataSource.length, (_values$dataTarget = values.dataTarget) === null || _values$dataTarget === void 0 ? void 0 : _values$dataTarget.length)).fill(true);
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(Math.min(tableDataSource === null || tableDataSource === void 0 ? void 0 : tableDataSource.length, tableDataTarget === null || tableDataTarget === void 0 ? void 0 : tableDataTarget.length))).map(function (_, index) {
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: {
@@ -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$datasource5;
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
- var _val$datasource2;
54
- if (!Array.isArray(val === null || val === void 0 ? void 0 : (_val$datasource2 = val.datasource) === null || _val$datasource2 === void 0 ? void 0 : _val$datasource2.topics)) {
55
- var _val$datasource3;
56
- _array = [val === null || val === void 0 ? void 0 : (_val$datasource3 = val.datasource) === null || _val$datasource3 === void 0 ? void 0 : _val$datasource3.topics];
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$datasource4;
59
- _array = val === null || val === void 0 ? void 0 : (_val$datasource4 = val.datasource) === null || _val$datasource4 === void 0 ? void 0 : _val$datasource4.topics;
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$datasource5 = val.datasource) === null || _val$datasource5 === void 0 ? void 0 : _val$datasource5.dt) {
68
- var _val$datasource6;
69
- if (!Array.isArray(val === null || val === void 0 ? void 0 : (_val$datasource6 = val.datasource) === null || _val$datasource6 === void 0 ? void 0 : _val$datasource6.dt)) {
70
- var _val$datasource7;
71
- _array = [val === null || val === void 0 ? void 0 : (_val$datasource7 = val.datasource) === null || _val$datasource7 === void 0 ? void 0 : _val$datasource7.dt];
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$datasource8;
74
- _array = val === null || val === void 0 ? void 0 : (_val$datasource8 = val.datasource) === null || _val$datasource8 === void 0 ? void 0 : _val$datasource8.dt;
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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "public": true,
3
3
  "name": "ronds-metadata",
4
- "version": "1.3.89",
4
+ "version": "1.3.90",
5
5
  "scripts": {
6
6
  "start": "dumi dev",
7
7
  "docs:build": "dumi build",