ronds-metadata 1.3.65 → 1.3.67

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.
package/es/api/index.js CHANGED
@@ -10,7 +10,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
10
10
  import { guid, md5 } from '../utils';
11
11
  import { addInterceptor, HttpHelper } from '../framework/http';
12
12
  var http = new HttpHelper();
13
- var token = 'Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkMyMTJFMjI1NTcwNjRDQTE3M0U2NjkxRjM4QzFDOEEyIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE3MjE3MzM1NTMsImV4cCI6MTcyMTk5Mjc1MywiaXNzIjoiaHR0cDovL2ZhYmlvOjk5OTkvc3VwZXJjYXJlY29yZSIsImF1ZCI6ImVwbSIsImNsaWVudF9pZCI6ImVwbSIsInN1YiI6IjNhMTIxZDJiLWYwZDUtZDQ3OC0xN2Q3LWQwODEwZDgzZDViMSIsImF1dGhfdGltZSI6MTcyMTczMzU1MywiaWRwIjoibG9jYWwiLCJuYW1lIjoicGhtIiwiZW1haWwiOiJwaG1AYWJwLmlvIiwicm9sZSI6WyJhZG1pbiIsInBobV9hZG1pbiJdLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9naXZlbm5hbWUiOiJwaG3ov5Dnu7TotKblj7ciLCJwaG9uZV9udW1iZXIiOiIxMzYwMDAwMDAwMCIsInBob25lX251bWJlcl92ZXJpZmllZCI6IlRydWUiLCJlbWFpbF92ZXJpZmllZCI6IlRydWUiLCJpYXQiOjE3MjE3MzM1NTMsInNjb3BlIjpbImFkZHJlc3MiLCJlbWFpbCIsImVwbSIsIm9wZW5pZCIsInBob25lIiwicHJvZmlsZSIsInJvbGUiLCJvZmZsaW5lX2FjY2VzcyJdLCJhbXIiOlsicHdkIl19.KqDd_VKMll9xS7h3WbC8K2jVgtX7mcgAr2g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InJvbGUiLCJvZmZsaW5lX2FjY2VzcyJdLCJhbXIiOlsicHdkIl19.W_5480G2iW6ua9EzViDFCDN6nUnUvbsBi9uL_ChHOmnTXojVUn8qJEK-Z3TdIe22_E1Jjn_AZrvZ7JZpjV5RiUM77pOSpRwTx8zfZFApeiKVFtv6UdM0Amkvbh5eFw8xnVPDQhNCWe0oBpFbq4YEos2pXafr2nCYvAyPPfvToRolPDlKQ9-Fi-afjcFDzckNzLd5f-Gcdx3YOUcbhq2PxJpYGEmCHmUzp8chsZ09dMfejZdRbhy1_BWHu9SLsU4N1hjq3VjSd-QhgPzCvC1kzx1Ovd9NkwO4Jot8wn3GoycWYAjkYXoymWFzWPs-KRG5pZgAqO-vCSBIZ4Y_KEO_Rw';
14
14
  addInterceptor(function (httpClient) {
15
15
  httpClient.interceptors.request.use(function (_config) {
16
16
  if (!_config.headers) {
@@ -1,8 +1,6 @@
1
1
  import React from 'react';
2
2
  interface IMapTableProps {
3
- columnSource: any;
4
3
  dataSource: any;
5
- columnTarget: any;
6
4
  dataTarget: any;
7
5
  options: any;
8
6
  value?: any;
@@ -1,3 +1,5 @@
1
+ import "antd/es/checkbox/style";
2
+ import _Checkbox from "antd/es/checkbox";
1
3
  import "antd/es/table/style";
2
4
  import _Table from "antd/es/table";
3
5
  import "antd/es/button/style";
@@ -11,9 +13,7 @@ import { CloseCircleFilled, ArrowRightOutlined } from '@ant-design/icons';
11
13
  import React from 'react';
12
14
  import Editable from '../../../../comps/Editable';
13
15
  var MapTable = function MapTable(props) {
14
- var columnSource = props.columnSource,
15
- dataSource = props.dataSource,
16
- columnTarget = props.columnTarget,
16
+ var dataSource = props.dataSource,
17
17
  dataTarget = props.dataTarget,
18
18
  options = props.options,
19
19
  value = props.value,
@@ -24,8 +24,12 @@ var MapTable = function MapTable(props) {
24
24
  setMapping = _React$useState2[1];
25
25
  var _React$useState3 = React.useState(),
26
26
  _React$useState4 = _slicedToArray(_React$useState3, 2),
27
- disableArray = _React$useState4[0],
28
- setDisableArray = _React$useState4[1];
27
+ output = _React$useState4[0],
28
+ setOutput = _React$useState4[1];
29
+ var _React$useState5 = React.useState(),
30
+ _React$useState6 = _slicedToArray(_React$useState5, 2),
31
+ disableArray = _React$useState6[0],
32
+ setDisableArray = _React$useState6[1];
29
33
  var editableStreamRef = React.useRef();
30
34
  var triggerChange = function triggerChange(changedValue) {
31
35
  onChange && onChange(_objectSpread({
@@ -37,6 +41,12 @@ var MapTable = function MapTable(props) {
37
41
  _disableArray[index] = !_disableArray[index];
38
42
  setDisableArray(_disableArray);
39
43
  };
44
+ var onOutputChange = function onOutputChange(value) {
45
+ setOutput(value);
46
+ triggerChange({
47
+ output: value
48
+ });
49
+ };
40
50
  React.useEffect(function () {
41
51
  if (value) {
42
52
  if (value[mapping]) {
@@ -45,21 +55,22 @@ var MapTable = function MapTable(props) {
45
55
  }
46
56
  }, [value]);
47
57
  React.useEffect(function () {
48
- setDisableArray(new Array(Math.min(dataSource.length, dataTarget.length)).fill(true));
58
+ setDisableArray(new Array(Math.min(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length, dataTarget === null || dataTarget === void 0 ? void 0 : dataTarget.length)).fill(true));
49
59
  }, []);
50
60
  React.useEffect(function () {
51
61
  if (disableArray) {
52
62
  var _mapping = [];
53
63
  disableArray.forEach(function (_, idx) {
54
64
  if (disableArray[idx]) {
65
+ var _dataSource$idx, _dataSource$idx2, _dataTarget$idx, _dataTarget$idx2;
55
66
  _mapping.push({
56
67
  source: {
57
- name: dataSource[idx].source,
58
- dataType: dataSource[idx].type
68
+ name: (_dataSource$idx = dataSource[idx]) === null || _dataSource$idx === void 0 ? void 0 : _dataSource$idx.source,
69
+ dataType: (_dataSource$idx2 = dataSource[idx]) === null || _dataSource$idx2 === void 0 ? void 0 : _dataSource$idx2.type
59
70
  },
60
71
  target: {
61
- name: dataTarget[idx].source,
62
- dataType: dataTarget[idx].type
72
+ name: (_dataTarget$idx = dataTarget[idx]) === null || _dataTarget$idx === void 0 ? void 0 : _dataTarget$idx.source,
73
+ dataType: (_dataTarget$idx2 = dataTarget[idx]) === null || _dataTarget$idx2 === void 0 ? void 0 : _dataTarget$idx2.type
63
74
  }
64
75
  });
65
76
  }
@@ -81,7 +92,8 @@ var MapTable = function MapTable(props) {
81
92
  }
82
93
  }, /*#__PURE__*/React.createElement(_Select, {
83
94
  defaultValue: "a1",
84
- onChange: function onChange() {},
95
+ onChange: onOutputChange,
96
+ value: output,
85
97
  style: {
86
98
  width: 150
87
99
  },
@@ -97,6 +109,7 @@ var MapTable = function MapTable(props) {
97
109
  width: '40%'
98
110
  }
99
111
  }, /*#__PURE__*/React.createElement(Editable, {
112
+ readonly: true,
100
113
  type: "single",
101
114
  columns: columnSource,
102
115
  dataSource: dataSource,
@@ -111,7 +124,7 @@ var MapTable = function MapTable(props) {
111
124
  style: {
112
125
  marginTop: '40px'
113
126
  }
114
- }, _toConsumableArray(Array(Math.min(dataSource.length, dataTarget.length))).map(function (_, index) {
127
+ }, _toConsumableArray(Array(Math.min(dataSource === null || dataSource === void 0 ? void 0 : dataSource.length, dataTarget === null || dataTarget === void 0 ? void 0 : dataTarget.length))).map(function (_, index) {
115
128
  return /*#__PURE__*/React.createElement("div", {
116
129
  key: index,
117
130
  style: {
@@ -140,4 +153,48 @@ var MapTable = function MapTable(props) {
140
153
  size: "small"
141
154
  })))));
142
155
  };
143
- export default MapTable;
156
+ export default MapTable;
157
+ var columnSource = [{
158
+ title: '来源表字段',
159
+ dataIndex: 'name',
160
+ key: 'name'
161
+ }, {
162
+ title: '类型',
163
+ dataIndex: 'type',
164
+ key: 'type'
165
+ }, {
166
+ title: '注释',
167
+ dataIndex: 'label',
168
+ key: 'label'
169
+ }];
170
+ var columnTarget = [{
171
+ title: '来源表字段',
172
+ dataIndex: 'name',
173
+ key: 'name'
174
+ }, {
175
+ title: '类型',
176
+ dataIndex: 'type',
177
+ key: 'type'
178
+ }, {
179
+ title: '注释',
180
+ dataIndex: 'label',
181
+ key: 'label'
182
+ }, {
183
+ title: '主键',
184
+ dataIndex: 'key',
185
+ key: 'key',
186
+ render: function render(val) {
187
+ return /*#__PURE__*/React.createElement(_Checkbox, {
188
+ checked: val
189
+ });
190
+ }
191
+ }, {
192
+ title: '非空',
193
+ dataIndex: 'require',
194
+ key: 'require',
195
+ render: function render(val) {
196
+ return /*#__PURE__*/React.createElement(_Checkbox, {
197
+ checked: val
198
+ });
199
+ }
200
+ }];
@@ -1,10 +1,6 @@
1
1
  import React from 'react';
2
2
  interface ISourceConfigProps {
3
3
  configType: string;
4
- sourceHttp?: any[];
5
- sourceEnums?: any[];
6
- targetHttp?: any[];
7
- targetEnums?: any[];
8
4
  }
9
5
  declare const SourceConfig: (props: ISourceConfigProps) => React.JSX.Element;
10
6
  export default SourceConfig;