ronds-metadata 1.2.99 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
package/es/api/index.js
CHANGED
@@ -5,7 +5,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
5
5
|
/*
|
6
6
|
* @Author:wangxian
|
7
7
|
* @Date: 2021-09-18 14:15:04
|
8
|
-
* @LastEditTime: 2023-08-22
|
8
|
+
* @LastEditTime: 2023-08-22 17:22:47
|
9
9
|
*/
|
10
10
|
import { guid, md5 } from '../utils';
|
11
11
|
import { addInterceptor, HttpHelper } from '../framework/http';
|
@@ -210,7 +210,7 @@ var Api = /*#__PURE__*/function () {
|
|
210
210
|
_instStatus = {};
|
211
211
|
for (i = 0; i < nodes.length; i++) {
|
212
212
|
obj = {
|
213
|
-
jobStatus: idx === 2 ? '
|
213
|
+
jobStatus: idx === 2 ? 'success' : 'running',
|
214
214
|
id: nodes[i].id
|
215
215
|
};
|
216
216
|
_execInfo[nodes[i].id] = obj;
|
@@ -79,4 +79,4 @@ declare class DPGraph extends GraphCore<BaseNode, BaseEdge> {
|
|
79
79
|
export declare let gDPGraph: DPGraph;
|
80
80
|
export default DPGraph;
|
81
81
|
export declare const useDPGraph: (graphData?: NDPGraph.GraphData) => DPGraph;
|
82
|
-
export declare const useUnmountDPGraph: () => void;
|
82
|
+
export declare const useUnmountDPGraph: (dispose: boolean) => void;
|
@@ -13,7 +13,7 @@ import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
13
13
|
/*
|
14
14
|
* @Author: wangxian
|
15
15
|
* @Date: 2022-05-24 14:31:01
|
16
|
-
* @LastEditTime: 2023-08-
|
16
|
+
* @LastEditTime: 2023-08-28 17:02:15
|
17
17
|
*/
|
18
18
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
19
19
|
import produce from 'immer';
|
@@ -561,7 +561,7 @@ var DPGraph = /*#__PURE__*/function (_GraphCore) {
|
|
561
561
|
} else {
|
562
562
|
nextGraph.edges = oldGraph.edges.filter(function (edge) {
|
563
563
|
return !edges.find(function (delEdge) {
|
564
|
-
return delEdge.inPortId.toString() === edge.inPortId.toString() && delEdge.outPortId.toString() === edge.outPortId.toString();
|
564
|
+
return delEdge.inPortId.toString() === edge.inPortId.toString() && delEdge.outPortId.toString() === edge.outPortId.toString() && delEdge.source.toString() === edge.source.toString() && delEdge.target.toString() === edge.target.toString();
|
565
565
|
});
|
566
566
|
});
|
567
567
|
}
|
@@ -797,10 +797,12 @@ export var useDPGraph = function useDPGraph(graphData) {
|
|
797
797
|
gDPGraph = new DPGraph(graphData);
|
798
798
|
return gDPGraph;
|
799
799
|
};
|
800
|
-
export var useUnmountDPGraph = function useUnmountDPGraph() {
|
800
|
+
export var useUnmountDPGraph = function useUnmountDPGraph(dispose) {
|
801
801
|
React.useEffect(function () {
|
802
802
|
return function () {
|
803
|
-
|
803
|
+
if (dispose) {
|
804
|
+
gDPGraph.dispose();
|
805
|
+
}
|
804
806
|
};
|
805
|
-
}, []);
|
807
|
+
}, [dispose]);
|
806
808
|
};
|
@@ -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: 2023-08-
|
6
|
+
* @LastEditTime: 2023-08-28 17:02:54
|
7
7
|
*/
|
8
8
|
import React from 'react';
|
9
9
|
import { filter } from 'rxjs';
|
@@ -18,6 +18,8 @@ import ContextMenu from './comps/ContextMenu';
|
|
18
18
|
import { GraphHandler } from './comps/GraphHandler';
|
19
19
|
var DynamicPorts = function DynamicPorts(props) {
|
20
20
|
var defaultValue = props.defaultValue,
|
21
|
+
_props$dispose = props.dispose,
|
22
|
+
dispose = _props$dispose === void 0 ? true : _props$dispose,
|
21
23
|
onChange = props.onChange,
|
22
24
|
onNodeSelect = props.onNodeSelect,
|
23
25
|
onStatusClick = props.onStatusClick,
|
@@ -31,7 +33,7 @@ var DynamicPorts = function DynamicPorts(props) {
|
|
31
33
|
var dpGraphRef = React.useRef();
|
32
34
|
var firstLoadRef = React.useRef(true);
|
33
35
|
// 处理画布卸载
|
34
|
-
useUnmountDPGraph();
|
36
|
+
useUnmountDPGraph(dispose);
|
35
37
|
var resizeSensorRef = React.useRef(null);
|
36
38
|
var onResizeStrategy = function onResizeStrategy() {
|
37
39
|
var _dpGraphRef$current, _dpGraphRef$current2;
|
@@ -6,7 +6,7 @@ var _excluded = ["wrapper", "container", "nodes", "edges"];
|
|
6
6
|
/*
|
7
7
|
* @Author: wangxian
|
8
8
|
* @Date: 2022-05-24 13:55:44
|
9
|
-
* @LastEditTime: 2023-
|
9
|
+
* @LastEditTime: 2023-08-25 16:03:45
|
10
10
|
*/
|
11
11
|
import { Graph } from '@antv/x6';
|
12
12
|
import { debounceTime, fromEventPattern, map, merge, scan, tap } from 'rxjs';
|