ronds-metadata 1.1.19 → 1.1.20

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.
@@ -3,7 +3,7 @@ import React from "react";
3
3
  /*
4
4
  * @Author: wangxian
5
5
  * @Date: 2022-05-26 08:50:06
6
- * @LastEditTime: 2022-06-25 10:32:57
6
+ * @LastEditTime: 2022-06-25 10:46:48
7
7
  */
8
8
  import { DragSource } from 'react-dnd';
9
9
  import { GlobalOutlined } from '@ant-design/icons';
@@ -18,7 +18,7 @@ var InnerNodeTitle = function InnerNodeTitle(props) {
18
18
  return /*#__PURE__*/React.createElement("div", null, connectDragPreview(connectDragSource( /*#__PURE__*/React.createElement("div", {
19
19
  className: "node-element",
20
20
  style: {
21
- width: '100% !important'
21
+ width: '100%'
22
22
  }
23
23
  }, /*#__PURE__*/React.createElement("div", {
24
24
  className: "icon"
@@ -29,7 +29,7 @@ declare class DPGraph extends GraphCore<BaseNode, BaseEdge> {
29
29
  factory$: IFactory$;
30
30
  dpGraphSub?: Subscription;
31
31
  constructor(graphData?: NDPGraph.GraphData);
32
- initialize(graphData: NDPGraph.GraphData): Promise<void>;
32
+ initialize(graphData?: NDPGraph.GraphData): Promise<void>;
33
33
  loadDPGraph(graphData: any): Promise<void>;
34
34
  isGraphReady(): boolean;
35
35
  renderGraph: (wrapper: HTMLElement, container: HTMLElement) => void;
@@ -58,6 +58,6 @@ declare class DPGraph extends GraphCore<BaseNode, BaseEdge> {
58
58
  dispose(): void;
59
59
  }
60
60
  export declare let gDPGraph: DPGraph;
61
- export declare const useDPGraph: (graphData: NDPGraph.GraphData) => DPGraph;
61
+ export declare const useDPGraph: (graphData?: NDPGraph.GraphData) => DPGraph;
62
62
  export declare const useUnmountDPGraph: () => void;
63
63
  export {};
@@ -239,7 +239,10 @@ var DPGraph = /*#__PURE__*/function (_GraphCore) {
239
239
  this.factory$.loading.next(true);
240
240
  _context.prev = 1;
241
241
  _context.next = 4;
242
- return this.loadDPGraph(graphData);
242
+ return this.loadDPGraph(graphData || {
243
+ nodes: [],
244
+ edges: []
245
+ });
243
246
 
244
247
  case 4:
245
248
  this.factory$.loading.next(false);
@@ -4,7 +4,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
4
  /*
5
5
  * @Author: wangxian
6
6
  * @Date: 2022-05-16 18:53:31
7
- * @LastEditTime: 2022-05-27 14:24:06
7
+ * @LastEditTime: 2022-06-25 11:10:31
8
8
  */
9
9
  import React from 'react';
10
10
  import { filter } from 'rxjs';
@@ -57,7 +57,7 @@ var DynamicPorts = function DynamicPorts(props) {
57
57
 
58
58
  firstLoadRef.current = false;
59
59
  }
60
- }, []); // 处理组件拖拽落下事件
60
+ }, [defaultValue]); // 处理组件拖拽落下事件
61
61
 
62
62
  var _useDrop = useDrop({
63
63
  accept: [DRAGGABLE_COMPONENT, DRAGGABLE_MODEL],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "public": true,
3
3
  "name": "ronds-metadata",
4
- "version": "1.1.19",
4
+ "version": "1.1.20",
5
5
  "scripts": {
6
6
  "start": "dumi dev",
7
7
  "docs:build": "dumi build",