ronds-metadata 1.1.63 → 1.1.65
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/comps/FileView/index.d.ts +2 -0
- package/es/comps/FileView/index.js +19 -0
- package/es/comps/MdView/index.js +7 -9
- package/es/comps/MdView/index.less +6 -2
- package/es/comps/MetadataForm/DataCell/Select.js +23 -7
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/package.json +2 -1
@@ -0,0 +1,19 @@
|
|
1
|
+
import React from "react";
|
2
|
+
|
3
|
+
/*
|
4
|
+
* @Author: wangxian
|
5
|
+
* @Date: 2022-11-25 14:14:50
|
6
|
+
* @LastEditTime: 2022-11-25 14:30:35
|
7
|
+
*/
|
8
|
+
import FileViewer from 'react-file-viewer';
|
9
|
+
|
10
|
+
var FileView = function FileView() {
|
11
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FileViewer, {
|
12
|
+
fileType: "xslx" //文件类型
|
13
|
+
,
|
14
|
+
filePath: 'http://192.168.1.186:9006/experiment//1fc9b9e3-51a3-79c0-de28-5ddff261d8fd/%E8%A1%A8%E6%A0%BC/%E6%B5%8B%E8%AF%95/test.xlsx?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minio%2F20221125%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221125T061952Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=97b63c66f7d2e9181d3b1486e360bdd7000e3104fc486a1d8fafd8db3d0623b4' //文件地址(后台给返的二进制流也可以)
|
15
|
+
|
16
|
+
}));
|
17
|
+
};
|
18
|
+
|
19
|
+
export default FileView;
|
package/es/comps/MdView/index.js
CHANGED
@@ -6,7 +6,7 @@ import React from "react";
|
|
6
6
|
/*
|
7
7
|
* @Author: wangxian
|
8
8
|
* @Date: 2022-09-02 16:17:38
|
9
|
-
* @LastEditTime: 2022-11-23
|
9
|
+
* @LastEditTime: 2022-11-23 09:09:46
|
10
10
|
*/
|
11
11
|
import ReactMarkdown from 'react-markdown';
|
12
12
|
import remarkGfm from 'remark-gfm';
|
@@ -41,18 +41,16 @@ var MdView = function MdView(props) {
|
|
41
41
|
children = _ref.children,
|
42
42
|
props = _objectWithoutProperties(_ref, _excluded);
|
43
43
|
|
44
|
-
var match = /language-(\w+)/.exec(className || '');
|
44
|
+
var match = /language-(\w+)/.exec(className || 'javascript');
|
45
45
|
return !inline && match ? /*#__PURE__*/React.createElement(SyntaxHighlighter, _extends({
|
46
46
|
showLineNumbers: true,
|
47
47
|
style: oneLight,
|
48
48
|
language: match[1],
|
49
|
-
PreTag: "div"
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
PreTag: "div"
|
55
|
-
}, props), String(children).replace(/\n$/, ''));
|
49
|
+
PreTag: "div",
|
50
|
+
className: "self-highlighter"
|
51
|
+
}, props), String(children).replace(/\n$/, '')) : /*#__PURE__*/React.createElement("code", _extends({
|
52
|
+
className: className
|
53
|
+
}, props), children);
|
56
54
|
}
|
57
55
|
}
|
58
56
|
}, source)), isMarkNav && /*#__PURE__*/React.createElement("div", {
|
@@ -219,12 +219,16 @@
|
|
219
219
|
}
|
220
220
|
}
|
221
221
|
pre {
|
222
|
-
padding:
|
223
|
-
background-color:
|
222
|
+
padding: 10px !important;
|
223
|
+
background-color: rgb(250, 250, 250);
|
224
224
|
code {
|
225
225
|
font-weight: 300;
|
226
226
|
background-color: transparent;
|
227
227
|
}
|
228
|
+
.self-highlighter {
|
229
|
+
padding: 0 !important;
|
230
|
+
margin: 0 !important;
|
231
|
+
}
|
228
232
|
}
|
229
233
|
|
230
234
|
// list
|
@@ -26,7 +26,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
26
26
|
/*
|
27
27
|
* @Author:wangxian
|
28
28
|
* @Date: 2021-09-18 14:15:04
|
29
|
-
* @LastEditTime: 2022-11-
|
29
|
+
* @LastEditTime: 2022-11-28 16:28:25
|
30
30
|
*/
|
31
31
|
import React from 'react';
|
32
32
|
import { MetadataFormContext, MetadataRefContext } from '../interface';
|
@@ -116,10 +116,18 @@ function Index(props) {
|
|
116
116
|
totalRef.current = res === null || res === void 0 ? void 0 : res.total;
|
117
117
|
|
118
118
|
if (!(_res && _res.length > 0)) {
|
119
|
-
_context.next =
|
119
|
+
_context.next = 15;
|
120
120
|
break;
|
121
121
|
}
|
122
122
|
|
123
|
+
if (!((http === null || http === void 0 ? void 0 : http.isCascader) && http.url.indexOf('{pid}') === -1)) {
|
124
|
+
_context.next = 12;
|
125
|
+
break;
|
126
|
+
}
|
127
|
+
|
128
|
+
return _context.abrupt("return", _res);
|
129
|
+
|
130
|
+
case 12:
|
123
131
|
return _context.abrupt("return", _res.map(function (it) {
|
124
132
|
if (http === null || http === void 0 ? void 0 : http.isCascader) {
|
125
133
|
return {
|
@@ -135,11 +143,11 @@ function Index(props) {
|
|
135
143
|
}
|
136
144
|
}));
|
137
145
|
|
138
|
-
case
|
146
|
+
case 15:
|
139
147
|
console.warn("".concat(_url, " is not return success result"));
|
140
148
|
return _context.abrupt("return", []);
|
141
149
|
|
142
|
-
case
|
150
|
+
case 17:
|
143
151
|
case "end":
|
144
152
|
return _context.stop();
|
145
153
|
}
|
@@ -219,6 +227,8 @@ function Index(props) {
|
|
219
227
|
|
220
228
|
var loadData = /*#__PURE__*/function () {
|
221
229
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(selectedOptions) {
|
230
|
+
var _targetOption$childre;
|
231
|
+
|
222
232
|
var targetOption, _children;
|
223
233
|
|
224
234
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
@@ -227,10 +237,16 @@ function Index(props) {
|
|
227
237
|
case 0:
|
228
238
|
targetOption = selectedOptions[selectedOptions.length - 1];
|
229
239
|
targetOption.loading = true;
|
230
|
-
|
240
|
+
|
241
|
+
if (!(!targetOption.isLeaf && (!(targetOption === null || targetOption === void 0 ? void 0 : targetOption.children) || ((_targetOption$childre = targetOption.children) === null || _targetOption$childre === void 0 ? void 0 : _targetOption$childre.length) === 0))) {
|
242
|
+
_context3.next = 7;
|
243
|
+
break;
|
244
|
+
}
|
245
|
+
|
246
|
+
_context3.next = 5;
|
231
247
|
return getEnumDataByUrl(extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.http, targetOption.value);
|
232
248
|
|
233
|
-
case
|
249
|
+
case 5:
|
234
250
|
_children = _context3.sent;
|
235
251
|
setTimeout(function () {
|
236
252
|
targetOption.loading = false;
|
@@ -238,7 +254,7 @@ function Index(props) {
|
|
238
254
|
setCascaderOption(_toConsumableArray(cascaderOption));
|
239
255
|
}, 500);
|
240
256
|
|
241
|
-
case
|
257
|
+
case 7:
|
242
258
|
case "end":
|
243
259
|
return _context3.stop();
|
244
260
|
}
|
package/es/index.d.ts
CHANGED
@@ -7,6 +7,7 @@ export { default as JsonView } from './comps/JsonView';
|
|
7
7
|
export { default as JsonEdit } from './comps/JsonEdit';
|
8
8
|
export { default as MdEditor } from './comps/MdEdit';
|
9
9
|
export { default as MdView } from './comps/MdView';
|
10
|
+
export { default as FileView } from './comps/FileView';
|
10
11
|
export { default as Editable } from './comps/Editable';
|
11
12
|
export { default as DynamicPorts } from './comps/DynamicPorts';
|
12
13
|
export { default as DragNode } from './comps/DynamicPorts/comps/DragNode';
|
package/es/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
* @Author:wangxian
|
3
3
|
* @Date: 2021-09-18 14:15:04
|
4
|
-
* @LastEditTime: 2022-
|
4
|
+
* @LastEditTime: 2022-11-25 14:17:34
|
5
5
|
*/
|
6
6
|
import './theme.less';
|
7
7
|
export { default as MetadataEdit } from './comps/MetadataEdit';
|
@@ -12,6 +12,7 @@ export { default as JsonView } from './comps/JsonView';
|
|
12
12
|
export { default as JsonEdit } from './comps/JsonEdit';
|
13
13
|
export { default as MdEditor } from './comps/MdEdit';
|
14
14
|
export { default as MdView } from './comps/MdView';
|
15
|
+
export { default as FileView } from './comps/FileView';
|
15
16
|
export { default as Editable } from './comps/Editable';
|
16
17
|
export { default as DynamicPorts } from './comps/DynamicPorts';
|
17
18
|
export { default as DragNode } from './comps/DynamicPorts/comps/DragNode';
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"public": true,
|
3
3
|
"name": "ronds-metadata",
|
4
|
-
"version": "1.1.
|
4
|
+
"version": "1.1.65",
|
5
5
|
"scripts": {
|
6
6
|
"start": "dumi dev",
|
7
7
|
"docs:build": "dumi build",
|
@@ -52,6 +52,7 @@
|
|
52
52
|
"react": "^17.0.2",
|
53
53
|
"react-dnd": "^11.1.3",
|
54
54
|
"react-dnd-html5-backend": "^11.1.3",
|
55
|
+
"react-file-viewer": "^1.2.1",
|
55
56
|
"react-markdown": "^8.0.3",
|
56
57
|
"react-markdown-editor-lite": "^1.3.2",
|
57
58
|
"react-popper": "^2.2.3",
|