ronds-metadata 1.3.29 → 1.3.31
Sign up to get free protection for your applications and to get access to all the features.
- package/es/comps/DynamicPorts/comps/NodeElement.js +1 -1
- package/es/comps/DynamicPorts/comps/NodeStatus.js +6 -2
- package/es/comps/DynamicPorts/graph.d.ts +1 -1
- package/es/comps/DynamicPorts/graph.js +4 -2
- package/es/comps/DynamicPorts/index.js +2 -2
- package/es/comps/DynamicPorts/index.less +1 -0
- package/es/comps/MetadataForm/DataCell/Input.js +6 -3
- package/es/comps/MetadataForm/DataCell/Number.js +6 -3
- package/es/comps/MetadataForm/DataCell/Ref.js +5 -2
- package/es/comps/MetadataForm/DataCell/Select.js +7 -4
- package/es/comps/MetadataForm/DataCell/Switch.js +8 -4
- package/es/framework/graph/index.less +1 -0
- package/package.json +2 -2
@@ -7,7 +7,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
7
7
|
/*
|
8
8
|
* @Author: wangxian
|
9
9
|
* @Date: 2022-05-24 08:50:16
|
10
|
-
* @LastEditTime:
|
10
|
+
* @LastEditTime: 2024-02-01 15:14:11
|
11
11
|
*/
|
12
12
|
import { GlobalOutlined } from '@ant-design/icons';
|
13
13
|
import { filter } from 'rxjs/operators';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/*
|
2
2
|
* @Author: wangxian
|
3
3
|
* @Date: 2023-08-22 14:00:47
|
4
|
-
* @LastEditTime:
|
4
|
+
* @LastEditTime: 2024-02-01 14:02:14
|
5
5
|
*/
|
6
6
|
import React from 'react';
|
7
7
|
import { CheckCircleOutlined, CloseCircleOutlined, SyncOutlined, LineChartOutlined } from '@ant-design/icons';
|
@@ -33,7 +33,11 @@ export var NodeStatus = function NodeStatus(props) {
|
|
33
33
|
var color = '#2ecc71';
|
34
34
|
return /*#__PURE__*/React.createElement("div", {
|
35
35
|
className: className,
|
36
|
-
onClick: onClick
|
36
|
+
onClick: onClick,
|
37
|
+
style: {
|
38
|
+
zIndex: 1000,
|
39
|
+
cursor: 'pointer'
|
40
|
+
}
|
37
41
|
}, /*#__PURE__*/React.createElement(CheckCircleOutlined, {
|
38
42
|
style: {
|
39
43
|
color: color
|
@@ -85,4 +85,4 @@ declare class DPGraph extends GraphCore<BaseNode, BaseEdge> {
|
|
85
85
|
export declare let gDPGraph: DPGraph;
|
86
86
|
export default DPGraph;
|
87
87
|
export declare const useDPGraph: (graphData?: NDPGraph.GraphData) => DPGraph;
|
88
|
-
export declare const useUnmountDPGraph: (dispose: boolean) => void;
|
88
|
+
export declare const useUnmountDPGraph: (dispose: boolean, dpGraph: any) => void;
|
@@ -16,7 +16,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
16
16
|
/*
|
17
17
|
* @Author: wangxian
|
18
18
|
* @Date: 2022-05-24 14:31:01
|
19
|
-
* @LastEditTime: 2024-01
|
19
|
+
* @LastEditTime: 2024-02-01 15:08:03
|
20
20
|
*/
|
21
21
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
22
22
|
import produce from 'immer';
|
@@ -903,12 +903,14 @@ export var useDPGraph = function useDPGraph(graphData) {
|
|
903
903
|
gDPGraph = new DPGraph(graphData);
|
904
904
|
return gDPGraph;
|
905
905
|
};
|
906
|
-
export var useUnmountDPGraph = function useUnmountDPGraph(dispose) {
|
906
|
+
export var useUnmountDPGraph = function useUnmountDPGraph(dispose, dpGraph) {
|
907
907
|
React.useEffect(function () {
|
908
908
|
return function () {
|
909
909
|
if (dispose) {
|
910
910
|
gDPGraph.dispose();
|
911
911
|
}
|
912
|
+
dpGraph === null || dpGraph === void 0 ? void 0 : dpGraph.factory$.executionStatus.next({});
|
913
|
+
dpGraph === null || dpGraph === void 0 ? void 0 : dpGraph.stopRunGraph();
|
912
914
|
};
|
913
915
|
}, [dispose]);
|
914
916
|
};
|
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
3
|
/*
|
4
4
|
* @Author: wangxian
|
5
5
|
* @Date: 2022-05-16 18:53:31
|
6
|
-
* @LastEditTime:
|
6
|
+
* @LastEditTime: 2024-02-01 14:44:28
|
7
7
|
*/
|
8
8
|
import React from 'react';
|
9
9
|
import { filter } from 'rxjs';
|
@@ -36,7 +36,7 @@ var DynamicPorts = function DynamicPorts(props) {
|
|
36
36
|
var dpGraphRef = React.useRef();
|
37
37
|
var firstLoadRef = React.useRef(true);
|
38
38
|
// 处理画布卸载
|
39
|
-
useUnmountDPGraph(dispose);
|
39
|
+
useUnmountDPGraph(dispose, dpGraphRef.current);
|
40
40
|
var resizeSensorRef = React.useRef(null);
|
41
41
|
var onResizeStrategy = function onResizeStrategy() {
|
42
42
|
var _dpGraphRef$current, _dpGraphRef$current2;
|
@@ -16,7 +16,7 @@ import _Input from "antd/es/input";
|
|
16
16
|
/*
|
17
17
|
* @Author: wangxian
|
18
18
|
* @Date: 2021-09-18 14:15:04
|
19
|
-
* @LastEditTime:
|
19
|
+
* @LastEditTime: 2024-02-26 10:19:47
|
20
20
|
*/
|
21
21
|
import React from 'react';
|
22
22
|
import { UploadOutlined } from '@ant-design/icons';
|
@@ -24,6 +24,7 @@ import { MetadataFormContext, MetadataRefContext } from '../interface';
|
|
24
24
|
import { useGetExtraInfo } from '../hooks';
|
25
25
|
import useObservable from '../../../framework/rxjs-hooks/useObservable';
|
26
26
|
import NumberRange from './plugin/NumberRange';
|
27
|
+
import { tr } from '../../../framework/locale';
|
27
28
|
var TextArea = _Input.TextArea;
|
28
29
|
function Index(props) {
|
29
30
|
var _extraInfo$addonAfter7;
|
@@ -210,7 +211,8 @@ function Index(props) {
|
|
210
211
|
} : undefined,
|
211
212
|
name: (extraInfo === null || extraInfo === void 0 ? void 0 : (_extraInfo$addonAfter7 = extraInfo.addonAfter) === null || _extraInfo$addonAfter7 === void 0 ? void 0 : _extraInfo$addonAfter7.key) ? [].concat(_toConsumableArray(name), ['value']) : name,
|
212
213
|
rules: [{
|
213
|
-
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
|
214
|
+
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
|
215
|
+
message: "".concat(tr('请输入')).concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id)
|
214
216
|
}].concat(_toConsumableArray(rules)),
|
215
217
|
help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
|
216
218
|
tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
|
@@ -222,7 +224,8 @@ function Index(props) {
|
|
222
224
|
},
|
223
225
|
name: [field === null || field === void 0 ? void 0 : field.name],
|
224
226
|
rules: [{
|
225
|
-
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
|
227
|
+
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
|
228
|
+
message: "".concat(tr('请输入'), "\"").concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id, "\"")
|
226
229
|
}].concat(_toConsumableArray(rules)),
|
227
230
|
help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
|
228
231
|
tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
|
@@ -8,11 +8,12 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
8
8
|
/*
|
9
9
|
* @Author: wangxian
|
10
10
|
* @Date: 2021-09-18 14:15:04
|
11
|
-
* @LastEditTime:
|
11
|
+
* @LastEditTime: 2024-02-26 10:21:57
|
12
12
|
*/
|
13
13
|
import React from 'react';
|
14
14
|
import { MetadataFormContext, MetadataRefContext } from '../interface';
|
15
15
|
import { useGetExtraInfo } from '../hooks';
|
16
|
+
import { tr } from '../../../framework/locale';
|
16
17
|
function Index(props) {
|
17
18
|
var _extraInfo$disabled2, _extraInfo$disabled3;
|
18
19
|
var id = props.id,
|
@@ -100,7 +101,8 @@ function Index(props) {
|
|
100
101
|
} : undefined,
|
101
102
|
name: name,
|
102
103
|
rules: [{
|
103
|
-
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
|
104
|
+
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
|
105
|
+
message: "".concat(tr('请输入'), "\"").concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id, "\"")
|
104
106
|
}].concat(_toConsumableArray(rules)),
|
105
107
|
help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
|
106
108
|
tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
|
@@ -114,7 +116,8 @@ function Index(props) {
|
|
114
116
|
},
|
115
117
|
name: [field === null || field === void 0 ? void 0 : field.name],
|
116
118
|
rules: [{
|
117
|
-
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
|
119
|
+
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
|
120
|
+
message: "".concat(tr('请输入'), "\"").concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id, "\"")
|
118
121
|
}].concat(_toConsumableArray(rules)),
|
119
122
|
help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
|
120
123
|
tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
|
@@ -21,6 +21,7 @@ import { MetadataFormContext, MetadataRefContext } from '../interface';
|
|
21
21
|
import { useGetExtraInfo } from '../hooks';
|
22
22
|
import { renderForm } from '../utils';
|
23
23
|
import { JsonMetadataProvider } from '../../../framework/metadata';
|
24
|
+
import { tr } from '../../../framework/locale';
|
24
25
|
function Index(props) {
|
25
26
|
var _extraInfo$disabled, _extraInfo$disabled2;
|
26
27
|
var id = props.id,
|
@@ -247,7 +248,8 @@ function Index(props) {
|
|
247
248
|
},
|
248
249
|
name: id,
|
249
250
|
rules: [{
|
250
|
-
required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
|
251
|
+
required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
|
252
|
+
message: "".concat(tr('请输入'), "\"").concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id, "\"")
|
251
253
|
}],
|
252
254
|
help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
|
253
255
|
tooltip: (extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip) || help
|
@@ -269,7 +271,8 @@ function Index(props) {
|
|
269
271
|
},
|
270
272
|
name: [field === null || field === void 0 ? void 0 : field.name],
|
271
273
|
rules: [{
|
272
|
-
required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
|
274
|
+
required: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
|
275
|
+
message: "".concat(tr('请输入'), "\"").concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id, "\"")
|
273
276
|
}],
|
274
277
|
help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
|
275
278
|
tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
|
@@ -37,7 +37,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
37
37
|
/*
|
38
38
|
* @Author:wangxian
|
39
39
|
* @Date: 2021-09-18 14:15:04
|
40
|
-
* @LastEditTime:
|
40
|
+
* @LastEditTime: 2024-02-26 10:27:57
|
41
41
|
*/
|
42
42
|
import React from 'react';
|
43
43
|
import { MetadataFormContext, MetadataRefContext } from '../interface';
|
@@ -560,7 +560,8 @@ function Index(props) {
|
|
560
560
|
} : undefined,
|
561
561
|
name: [field === null || field === void 0 ? void 0 : field.name].concat(_toConsumableArray(name)),
|
562
562
|
rules: [{
|
563
|
-
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
|
563
|
+
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
|
564
|
+
message: "".concat(tr('请输入'), "\"").concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id, "\"")
|
564
565
|
}],
|
565
566
|
help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
|
566
567
|
tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
|
@@ -590,7 +591,8 @@ function Index(props) {
|
|
590
591
|
} : undefined,
|
591
592
|
name: name,
|
592
593
|
rules: [{
|
593
|
-
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
|
594
|
+
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
|
595
|
+
message: "".concat(tr('请输入'), "\"").concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id, "\"")
|
594
596
|
}],
|
595
597
|
help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
|
596
598
|
tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
|
@@ -601,7 +603,8 @@ function Index(props) {
|
|
601
603
|
},
|
602
604
|
name: [field === null || field === void 0 ? void 0 : field.name],
|
603
605
|
rules: [{
|
604
|
-
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
|
606
|
+
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
|
607
|
+
message: "".concat(tr('请输入'), "\"").concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id, "\"")
|
605
608
|
}],
|
606
609
|
help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
|
607
610
|
tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
|
@@ -7,11 +7,12 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
7
7
|
/*
|
8
8
|
* @Author: wangxian
|
9
9
|
* @Date: 2021-09-18 14:15:04
|
10
|
-
* @LastEditTime:
|
10
|
+
* @LastEditTime: 2024-02-26 10:23:37
|
11
11
|
*/
|
12
12
|
import React from 'react';
|
13
13
|
import { MetadataFormContext, MetadataRefContext } from '../interface';
|
14
14
|
import { useGetExtraInfo } from '../hooks';
|
15
|
+
import { tr } from '../../../framework/locale';
|
15
16
|
function Index(props) {
|
16
17
|
var _extraInfo$disabled2, _extraInfo$disabled3;
|
17
18
|
var id = props.id,
|
@@ -51,7 +52,8 @@ function Index(props) {
|
|
51
52
|
name: [field === null || field === void 0 ? void 0 : field.name].concat(_toConsumableArray(name)),
|
52
53
|
valuePropName: "checked",
|
53
54
|
rules: [{
|
54
|
-
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
|
55
|
+
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
|
56
|
+
message: "".concat(tr('请输入'), "\"").concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id, "\"")
|
55
57
|
}],
|
56
58
|
help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
|
57
59
|
tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
|
@@ -86,7 +88,8 @@ function Index(props) {
|
|
86
88
|
name: name,
|
87
89
|
valuePropName: "checked",
|
88
90
|
rules: [{
|
89
|
-
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
|
91
|
+
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
|
92
|
+
message: "".concat(tr('请输入'), "\"").concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id, "\"")
|
90
93
|
}],
|
91
94
|
help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
|
92
95
|
tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
|
@@ -102,7 +105,8 @@ function Index(props) {
|
|
102
105
|
name: [field === null || field === void 0 ? void 0 : field.name],
|
103
106
|
valuePropName: "checked",
|
104
107
|
rules: [{
|
105
|
-
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require
|
108
|
+
required: notRequire ? !notRequire : extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.require,
|
109
|
+
message: "".concat(tr('请输入'), "\"").concat((extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.label) || id, "\"")
|
106
110
|
}],
|
107
111
|
help: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.help,
|
108
112
|
tooltip: extraInfo === null || extraInfo === void 0 ? void 0 : extraInfo.tooltip
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"public": true,
|
3
3
|
"name": "ronds-metadata",
|
4
|
-
"version": "1.3.
|
4
|
+
"version": "1.3.31",
|
5
5
|
"scripts": {
|
6
6
|
"start": "dumi dev",
|
7
7
|
"docs:build": "dumi build",
|
@@ -112,4 +112,4 @@
|
|
112
112
|
"webpack-cli": "^3.3.12",
|
113
113
|
"yorkie": "^2.0.0"
|
114
114
|
}
|
115
|
-
}
|
115
|
+
}
|