ronds-metadata 1.1.5 → 1.1.8

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.
Files changed (53) hide show
  1. package/es/comps/DynamicPorts/comps/ContextMenu.css +8 -0
  2. package/es/comps/DynamicPorts/comps/ContextMenu.d.ts +7 -0
  3. package/es/comps/DynamicPorts/comps/ContextMenu.js +44 -0
  4. package/es/comps/DynamicPorts/comps/DragNode.d.ts +7 -0
  5. package/es/comps/DynamicPorts/comps/DragNode.js +49 -0
  6. package/es/comps/DynamicPorts/comps/GraphHandler/index.css +27 -0
  7. package/es/comps/DynamicPorts/comps/GraphHandler/index.d.ts +11 -0
  8. package/es/comps/DynamicPorts/comps/GraphHandler/index.js +50 -0
  9. package/es/comps/DynamicPorts/comps/NodeElement.d.ts +6 -0
  10. package/es/comps/DynamicPorts/comps/NodeElement.js +26 -0
  11. package/es/comps/DynamicPorts/comps/contextMenu/EdgeContextMenu/index.css +5 -0
  12. package/es/comps/DynamicPorts/comps/contextMenu/EdgeContextMenu/index.d.ts +8 -0
  13. package/es/comps/DynamicPorts/comps/contextMenu/EdgeContextMenu/index.js +42 -0
  14. package/es/comps/DynamicPorts/comps/contextMenu/GraphContextMenu/index.css +21 -0
  15. package/es/comps/DynamicPorts/comps/contextMenu/GraphContextMenu/index.d.ts +8 -0
  16. package/es/comps/DynamicPorts/comps/contextMenu/GraphContextMenu/index.js +40 -0
  17. package/es/comps/DynamicPorts/comps/contextMenu/NodeContextMenu/index.css +23 -0
  18. package/es/comps/DynamicPorts/comps/contextMenu/NodeContextMenu/index.d.ts +7 -0
  19. package/es/comps/DynamicPorts/comps/contextMenu/NodeContextMenu/index.js +55 -0
  20. package/es/comps/DynamicPorts/comps/shape/connector.d.ts +1 -0
  21. package/es/comps/DynamicPorts/comps/shape/connector.js +19 -0
  22. package/es/comps/DynamicPorts/comps/shape/edge.css +4 -0
  23. package/es/comps/DynamicPorts/comps/shape/edge.d.ts +10 -0
  24. package/es/comps/DynamicPorts/comps/shape/edge.js +91 -0
  25. package/es/comps/DynamicPorts/comps/shape/node.d.ts +11 -0
  26. package/es/comps/DynamicPorts/comps/shape/node.js +190 -0
  27. package/es/comps/DynamicPorts/constant/index.d.ts +7 -0
  28. package/es/comps/DynamicPorts/constant/index.js +19 -0
  29. package/es/comps/DynamicPorts/graph.d.ts +62 -0
  30. package/es/comps/DynamicPorts/graph.js +584 -0
  31. package/es/comps/DynamicPorts/index.css +167 -0
  32. package/es/comps/DynamicPorts/index.d.ts +19 -0
  33. package/es/comps/DynamicPorts/index.js +141 -0
  34. package/es/comps/DynamicPorts/interface.d.ts +34 -0
  35. package/es/comps/DynamicPorts/interface.js +6 -0
  36. package/es/comps/DynamicPorts/utils.d.ts +100 -0
  37. package/es/comps/DynamicPorts/utils.js +127 -0
  38. package/es/comps/MetadataEdit/components/MetaPropsEdit.js +5 -3
  39. package/es/comps/MetadataForm/DataCell/Ref.js +45 -25
  40. package/es/comps/MetadataForm/DataCell/Select.js +7 -22
  41. package/es/comps/MetadataForm/DataCell/layout/TableArray.js +63 -25
  42. package/es/comps/MetadataForm/utils.d.ts +1 -0
  43. package/es/comps/MetadataForm/utils.js +10 -1
  44. package/es/framework/graph/index.css +12 -0
  45. package/es/framework/graph/index.d.ts +60 -0
  46. package/es/framework/graph/index.js +425 -0
  47. package/es/framework/rxjs-hooks/useObservableState.d.ts +3 -0
  48. package/es/framework/rxjs-hooks/useObservableState.js +45 -0
  49. package/es/index.d.ts +2 -0
  50. package/es/index.js +3 -1
  51. package/package.json +7 -1
  52. package/es/comps/RzGraph/index.d.ts +0 -2
  53. package/es/comps/RzGraph/index.js +0 -7
@@ -0,0 +1,8 @@
1
+ .mask {
2
+ position: absolute;
3
+ top: 0;
4
+ bottom: 0;
5
+ right: 0;
6
+ left: 0;
7
+ z-index: 99999;
8
+ }
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import './ContextMenu.less';
3
+ interface IContextMenuProps {
4
+ graph: any;
5
+ }
6
+ declare const ContextMenu: React.FC<IContextMenuProps>;
7
+ export default ContextMenu;
@@ -0,0 +1,44 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+
3
+ /*
4
+ * @Author: wangxian
5
+ * @Date: 2022-05-27 09:56:39
6
+ * @LastEditTime: 2022-05-27 16:16:25
7
+ */
8
+ import useObservable from '@/framework/rxjs-hooks/useObservable';
9
+ import React from 'react';
10
+ import NodeContextMenu from './contextMenu/NodeContextMenu';
11
+ import "./ContextMenu.css";
12
+ import { EdgeContextMenu } from './contextMenu/EdgeContextMenu';
13
+
14
+ var ContextMenu = function ContextMenu(props) {
15
+ var _graph$factory$;
16
+
17
+ var graph = props.graph;
18
+
19
+ var _React$useState = React.useState(),
20
+ _React$useState2 = _slicedToArray(_React$useState, 2),
21
+ menu = _React$useState2[0],
22
+ setMenu = _React$useState2[1];
23
+
24
+ useObservable(function (v) {
25
+ setMenu(v);
26
+ }, [graph === null || graph === void 0 ? void 0 : (_graph$factory$ = graph.factory$) === null || _graph$factory$ === void 0 ? void 0 : _graph$factory$.contextMenuInfo]);
27
+
28
+ // 暂时屏蔽graph的右击菜单
29
+ if (!(menu === null || menu === void 0 ? void 0 : menu.type) || (menu === null || menu === void 0 ? void 0 : menu.type) === 'graph') {
30
+ return null;
31
+ }
32
+
33
+ return /*#__PURE__*/React.createElement("div", {
34
+ className: "mask"
35
+ }, (menu === null || menu === void 0 ? void 0 : menu.type) === 'node' && /*#__PURE__*/React.createElement(NodeContextMenu, {
36
+ graph: graph,
37
+ data: menu.data
38
+ }), (menu === null || menu === void 0 ? void 0 : menu.type) === 'edge' && /*#__PURE__*/React.createElement(EdgeContextMenu, {
39
+ graph: graph,
40
+ data: menu.data
41
+ }));
42
+ };
43
+
44
+ export default ContextMenu;
@@ -0,0 +1,7 @@
1
+ import { NDPGraph } from '../interface';
2
+ import '../index.less';
3
+ interface IDragNodeProps {
4
+ data: NDPGraph.Node;
5
+ }
6
+ declare const DragNode: (props: IDragNodeProps) => JSX.Element;
7
+ export default DragNode;
@@ -0,0 +1,49 @@
1
+ import React from "react";
2
+
3
+ /*
4
+ * @Author: wangxian
5
+ * @Date: 2022-05-26 08:50:06
6
+ * @LastEditTime: 2022-05-26 09:11:54
7
+ */
8
+ import { DragSource } from 'react-dnd';
9
+ import { GlobalOutlined } from '@ant-design/icons';
10
+ import { DRAGGABLE_COMPONENT } from '../constant';
11
+ import "../index.css";
12
+
13
+ var InnerNodeTitle = function InnerNodeTitle(props) {
14
+ var data = props.data,
15
+ connectDragPreview = props.connectDragPreview,
16
+ connectDragSource = props.connectDragSource;
17
+ return /*#__PURE__*/React.createElement("div", null, connectDragPreview(connectDragSource( /*#__PURE__*/React.createElement("div", {
18
+ className: "node-element"
19
+ }, /*#__PURE__*/React.createElement("div", {
20
+ className: "icon"
21
+ }, /*#__PURE__*/React.createElement(GlobalOutlined, null)), /*#__PURE__*/React.createElement("div", {
22
+ className: "notation"
23
+ }, /*#__PURE__*/React.createElement("div", {
24
+ className: "name"
25
+ }, data.name))))));
26
+ };
27
+
28
+ var NodeTitle = DragSource(DRAGGABLE_COMPONENT, {
29
+ beginDrag: function beginDrag(props) {
30
+ return {
31
+ comp: props.data
32
+ };
33
+ }
34
+ }, function (connect, monitor) {
35
+ return {
36
+ connectDragSource: connect.dragSource(),
37
+ connectDragPreview: connect.dragPreview(),
38
+ isDragging: monitor.isDragging()
39
+ };
40
+ })(InnerNodeTitle);
41
+
42
+ var DragNode = function DragNode(props) {
43
+ var data = props.data;
44
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(NodeTitle, {
45
+ data: data
46
+ }));
47
+ };
48
+
49
+ export default DragNode;
@@ -0,0 +1,27 @@
1
+ .handler {
2
+ position: absolute;
3
+ top: 61px;
4
+ right: 14px;
5
+ z-index: 99;
6
+ width: 32px;
7
+ margin: 0;
8
+ padding: 3px 0;
9
+ color: rgba(0, 0, 0, 0.45);
10
+ font-size: 16px;
11
+ list-style-type: none;
12
+ background-color: #fff;
13
+ border: 1px solid rgba(0, 0, 0, 0.04);
14
+ border-radius: 3px;
15
+ box-shadow: 0 0 20px rgba(0, 0, 0, 0.01);
16
+ }
17
+ .handler .item {
18
+ text-align: center;
19
+ cursor: pointer;
20
+ }
21
+ .handler .item:hover {
22
+ color: #000;
23
+ background-color: #e0e0e0;
24
+ }
25
+ .popover :global .ant-popover-inner-content {
26
+ padding: 3px 8px;
27
+ }
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ interface Props {
4
+ className?: string;
5
+ onZoomIn: () => void;
6
+ onZoomOut: () => void;
7
+ onFitContent: () => void;
8
+ onRealContent: () => void;
9
+ }
10
+ export declare const GraphHandler: React.FC<Props>;
11
+ export {};
@@ -0,0 +1,50 @@
1
+ import "antd/es/popover/style";
2
+ import _Popover from "antd/es/popover";
3
+
4
+ /*
5
+ * @Author: wangxian
6
+ * @Date: 2022-05-27 14:21:23
7
+ * @LastEditTime: 2022-05-28 10:10:06
8
+ */
9
+ import React from 'react';
10
+ import { CompressOutlined, OneToOneOutlined, ZoomInOutlined, ZoomOutOutlined } from '@ant-design/icons';
11
+ import classNames from 'classnames';
12
+ import "./index.css";
13
+ export var GraphHandler = function GraphHandler(props) {
14
+ var className = props.className,
15
+ onZoomIn = props.onZoomIn,
16
+ onZoomOut = props.onZoomOut,
17
+ onFitContent = props.onFitContent,
18
+ onRealContent = props.onRealContent;
19
+ return /*#__PURE__*/React.createElement("ul", {
20
+ className: classNames('handler', className)
21
+ }, /*#__PURE__*/React.createElement(_Popover, {
22
+ overlayClassName: "popover",
23
+ content: "\u653E\u5927",
24
+ placement: "left"
25
+ }, /*#__PURE__*/React.createElement("li", {
26
+ onClick: onZoomIn,
27
+ className: "item"
28
+ }, /*#__PURE__*/React.createElement(ZoomInOutlined, null))), /*#__PURE__*/React.createElement(_Popover, {
29
+ overlayClassName: "popover",
30
+ content: "\u7F29\u5C0F",
31
+ placement: "left"
32
+ }, /*#__PURE__*/React.createElement("li", {
33
+ onClick: onZoomOut,
34
+ className: "item"
35
+ }, /*#__PURE__*/React.createElement(ZoomOutOutlined, null))), /*#__PURE__*/React.createElement(_Popover, {
36
+ overlayClassName: "popover",
37
+ content: "\u5B9E\u9645\u5C3A\u5BF8",
38
+ placement: "left"
39
+ }, /*#__PURE__*/React.createElement("li", {
40
+ onClick: onRealContent,
41
+ className: "item"
42
+ }, /*#__PURE__*/React.createElement(OneToOneOutlined, null))), /*#__PURE__*/React.createElement(_Popover, {
43
+ overlayClassName: "popover",
44
+ content: "\u9002\u5E94\u753B\u5E03",
45
+ placement: "left"
46
+ }, /*#__PURE__*/React.createElement("li", {
47
+ onClick: onFitContent,
48
+ className: "item"
49
+ }, /*#__PURE__*/React.createElement(CompressOutlined, null))));
50
+ };
@@ -0,0 +1,6 @@
1
+ import '../index.less';
2
+ interface NodeElementProps {
3
+ node?: Node;
4
+ }
5
+ declare const NodeElement: (props: NodeElementProps) => JSX.Element;
6
+ export default NodeElement;
@@ -0,0 +1,26 @@
1
+ import React from "react";
2
+
3
+ /*
4
+ * @Author: wangxian
5
+ * @Date: 2022-05-24 08:50:16
6
+ * @LastEditTime: 2022-05-26 16:37:24
7
+ */
8
+ import { GlobalOutlined } from '@ant-design/icons';
9
+ import "../index.css";
10
+
11
+ var NodeElement = function NodeElement(props) {
12
+ var node = props.node;
13
+ var data = (node === null || node === void 0 ? void 0 : node.getData()) || {};
14
+ var name = data.name;
15
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
16
+ className: "node-element"
17
+ }, /*#__PURE__*/React.createElement("div", {
18
+ className: 'icon'
19
+ }, /*#__PURE__*/React.createElement(GlobalOutlined, null)), /*#__PURE__*/React.createElement("div", {
20
+ className: "notation"
21
+ }, /*#__PURE__*/React.createElement("div", {
22
+ className: "name"
23
+ }, name))));
24
+ };
25
+
26
+ export default NodeElement;
@@ -0,0 +1,5 @@
1
+ .edgeContextMenu {
2
+ position: absolute;
3
+ z-index: 1;
4
+ background-color: #fff;
5
+ }
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ interface Props {
4
+ graph: any;
5
+ data: any;
6
+ }
7
+ export declare const EdgeContextMenu: React.FC<Props>;
8
+ export {};
@@ -0,0 +1,42 @@
1
+ import "antd/es/menu/style";
2
+ import _Menu from "antd/es/menu";
3
+
4
+ /*
5
+ * @Author: wangxian
6
+ * @Date: 2022-05-27 15:55:57
7
+ * @LastEditTime: 2022-05-28 10:07:16
8
+ */
9
+ import React, { useCallback, useRef } from 'react';
10
+ import { DeleteOutlined } from '@ant-design/icons';
11
+ import { useClickAway } from 'ahooks';
12
+ import { graphPointToOffsetPoint } from '../../../utils';
13
+ import "./index.css";
14
+ import { tr } from '../../../../../framework/locale';
15
+ export var EdgeContextMenu = function EdgeContextMenu(props) {
16
+ var graph = props.graph,
17
+ data = props.data;
18
+ var containerRef = useRef(null);
19
+ useClickAway(function () {
20
+ graph.clearContextMenuInfo();
21
+ }, containerRef);
22
+ var onDeleteEdge = useCallback(function () {
23
+ graph.onDeleteEdges(data.edge);
24
+ graph.clearContextMenuInfo();
25
+ }, [graph, data]);
26
+
27
+ var _graphPointToOffsetPo = graphPointToOffsetPoint(graph.graph, data, graph.wrapper),
28
+ left = _graphPointToOffsetPo.x,
29
+ top = _graphPointToOffsetPo.y;
30
+
31
+ return /*#__PURE__*/React.createElement("div", {
32
+ ref: containerRef,
33
+ className: "edgeContextMenu",
34
+ style: {
35
+ top: top,
36
+ left: left
37
+ }
38
+ }, /*#__PURE__*/React.createElement(_Menu, null, /*#__PURE__*/React.createElement(_Menu.Item, {
39
+ onClick: onDeleteEdge,
40
+ icon: /*#__PURE__*/React.createElement(DeleteOutlined, null)
41
+ }, tr('删除'))));
42
+ };
@@ -0,0 +1,21 @@
1
+ .graphContextMenu {
2
+ position: absolute;
3
+ z-index: 1;
4
+ background-color: #fff;
5
+ }
6
+ .loadExperimentModal :global .ant-modal-title {
7
+ font-size: 14px;
8
+ }
9
+ .loadExperimentModal :global .ant-btn {
10
+ font-size: 12px;
11
+ }
12
+ .loadExperimentModal .versionTable :global .ant-table.ant-table-small {
13
+ font-size: 12px;
14
+ }
15
+ .loadExperimentModal .versionTable .operations :global .ant-btn:first-of-type {
16
+ padding-left: 0;
17
+ border-left: 0;
18
+ }
19
+ .loadExperimentModal .versionTable .operations :global .ant-btn.ant-btn-sm {
20
+ font-size: 12px;
21
+ }
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ interface Props {
4
+ graph: any;
5
+ data: any;
6
+ }
7
+ export declare const GraphContextMenu: React.FC<Props>;
8
+ export {};
@@ -0,0 +1,40 @@
1
+ import "antd/es/menu/style";
2
+ import _Menu from "antd/es/menu";
3
+
4
+ /*
5
+ * @Author: wangxian
6
+ * @Date: 2022-05-27 16:04:27
7
+ * @LastEditTime: 2022-05-28 10:07:54
8
+ */
9
+ import React, { useRef } from 'react';
10
+ import { ReloadOutlined } from '@ant-design/icons';
11
+ import { useClickAway } from 'ahooks';
12
+ import { graphPointToOffsetPoint } from '../../../utils';
13
+ import { tr } from '../../../../../framework/locale';
14
+ import "./index.css";
15
+ export var GraphContextMenu = function GraphContextMenu(props) {
16
+ var graph = props.graph,
17
+ data = props.data;
18
+ var containerRef = useRef(null);
19
+ useClickAway(function () {
20
+ graph.clearContextMenuInfo();
21
+ }, containerRef);
22
+
23
+ var onRefresh = function onRefresh() {};
24
+
25
+ var _graphPointToOffsetPo = graphPointToOffsetPoint(graph.graph, data, graph.wrapper),
26
+ left = _graphPointToOffsetPo.x,
27
+ top = _graphPointToOffsetPo.y;
28
+
29
+ return /*#__PURE__*/React.createElement("div", {
30
+ ref: containerRef,
31
+ className: "graphContextMenu",
32
+ style: {
33
+ top: top,
34
+ left: left
35
+ }
36
+ }, /*#__PURE__*/React.createElement(_Menu, null, /*#__PURE__*/React.createElement(_Menu.Item, {
37
+ onClick: onRefresh,
38
+ icon: /*#__PURE__*/React.createElement(ReloadOutlined, null)
39
+ }, tr('刷新'))));
40
+ };
@@ -0,0 +1,23 @@
1
+ .graphContextMenu {
2
+ position: absolute;
3
+ z-index: 1;
4
+ width: 100px;
5
+ background-color: #fff;
6
+ box-shadow: 0 2px 10px rgb(0 0 0 1);
7
+ }
8
+ .loadExperimentModal :global .ant-modal-title {
9
+ font-size: 14px;
10
+ }
11
+ .loadExperimentModal :global .ant-btn {
12
+ font-size: 12px;
13
+ }
14
+ .loadExperimentModal .versionTable :global .ant-table.ant-table-small {
15
+ font-size: 12px;
16
+ }
17
+ .loadExperimentModal .versionTable .operations :global .ant-btn:first-of-type {
18
+ padding-left: 0;
19
+ border-left: 0;
20
+ }
21
+ .loadExperimentModal .versionTable .operations :global .ant-btn.ant-btn-sm {
22
+ font-size: 12px;
23
+ }
@@ -0,0 +1,7 @@
1
+ import './index.less';
2
+ interface INodeContextMenuProps {
3
+ graph: any;
4
+ data: any;
5
+ }
6
+ declare const NodeContextMenu: (props: INodeContextMenuProps) => JSX.Element;
7
+ export default NodeContextMenu;
@@ -0,0 +1,55 @@
1
+ import "antd/es/menu/style";
2
+ import _Menu from "antd/es/menu";
3
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
4
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
5
+ import { DeleteOutlined } from '@ant-design/icons';
6
+ import React from 'react';
7
+ import { useClickAway } from 'ahooks';
8
+ import { graphPointToOffsetPoint } from '../../../utils';
9
+ import { tr } from '../../../../../framework/locale';
10
+ import "./index.css";
11
+
12
+ var NodeContextMenu = function NodeContextMenu(props) {
13
+ var graph = props.graph,
14
+ data = props.data;
15
+ var containerRef = React.useRef(null);
16
+ useClickAway(function () {
17
+ graph.clearContextMenuInfo();
18
+ }, containerRef);
19
+ var onNodeDel = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
20
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
21
+ while (1) {
22
+ switch (_context.prev = _context.next) {
23
+ case 0:
24
+ _context.next = 2;
25
+ return graph.onDeleteNodes([data.node.id]);
26
+
27
+ case 2:
28
+ graph.clearContextMenuInfo();
29
+
30
+ case 3:
31
+ case "end":
32
+ return _context.stop();
33
+ }
34
+ }
35
+ }, _callee);
36
+ })), [graph]);
37
+
38
+ var _graphPointToOffsetPo = graphPointToOffsetPoint(graph.graph, data, graph.wrapper),
39
+ left = _graphPointToOffsetPo.x,
40
+ top = _graphPointToOffsetPo.y;
41
+
42
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
43
+ ref: containerRef,
44
+ className: "graphContextMenu",
45
+ style: {
46
+ top: top,
47
+ left: left
48
+ }
49
+ }, /*#__PURE__*/React.createElement(_Menu, null, /*#__PURE__*/React.createElement(_Menu.Item, {
50
+ onClick: onNodeDel,
51
+ icon: /*#__PURE__*/React.createElement(DeleteOutlined, null)
52
+ }, tr('删除')))));
53
+ };
54
+
55
+ export default NodeContextMenu;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,19 @@
1
+ /*
2
+ * @Author: wangxian
3
+ * @Date: 2022-05-24 10:53:37
4
+ * @LastEditTime: 2022-05-24 10:53:41
5
+ */
6
+ import { Graph } from '@antv/x6';
7
+ Graph.registerConnector('pai', function (s, t) {
8
+ var offset = 4;
9
+ var control = 80;
10
+ var v1 = {
11
+ x: s.x,
12
+ y: s.y + offset + control
13
+ };
14
+ var v2 = {
15
+ x: t.x,
16
+ y: t.y - offset - control
17
+ };
18
+ return "M ".concat(s.x, " ").concat(s.y, "\n L ").concat(s.x, " ").concat(s.y + offset, "\n C ").concat(v1.x, " ").concat(v1.y, " ").concat(v2.x, " ").concat(v2.y, " ").concat(t.x, " ").concat(t.y - offset, "\n L ").concat(t.x, " ").concat(t.y, "\n ");
19
+ }, true);
@@ -0,0 +1,4 @@
1
+ .x6-edge-selected path[stroke-width='1'],
2
+ .x6-edge:hover path[stroke-width='1'] {
3
+ stroke-width: 3px;
4
+ }
@@ -0,0 +1,10 @@
1
+ import { Shape } from '@antv/x6';
2
+ import './edge.less';
3
+ export declare class BaseEdge extends Shape.Edge {
4
+ isGroupEdge(): boolean;
5
+ }
6
+ export declare class DPEdge extends BaseEdge {
7
+ }
8
+ export declare class DPGroupEdge extends DPEdge {
9
+ isGroupEdge(): boolean;
10
+ }
@@ -0,0 +1,91 @@
1
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
3
+ import _inherits from "@babel/runtime/helpers/esm/inherits";
4
+ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
+
6
+ /*
7
+ * @Author: wangxian
8
+ * @Date: 2022-05-24 09:18:34
9
+ * @LastEditTime: 2022-05-24 10:43:18
10
+ */
11
+ import { Shape, Edge } from '@antv/x6';
12
+ import "./edge.css";
13
+ export var BaseEdge = /*#__PURE__*/function (_Shape$Edge) {
14
+ _inherits(BaseEdge, _Shape$Edge);
15
+
16
+ var _super = _createSuper(BaseEdge);
17
+
18
+ function BaseEdge() {
19
+ _classCallCheck(this, BaseEdge);
20
+
21
+ return _super.apply(this, arguments);
22
+ }
23
+
24
+ _createClass(BaseEdge, [{
25
+ key: "isGroupEdge",
26
+ value: // eslint-disable-next-line class-methods-use-this
27
+ function isGroupEdge() {
28
+ return false;
29
+ }
30
+ }]);
31
+
32
+ return BaseEdge;
33
+ }(Shape.Edge);
34
+ export var DPEdge = /*#__PURE__*/function (_BaseEdge) {
35
+ _inherits(DPEdge, _BaseEdge);
36
+
37
+ var _super2 = _createSuper(DPEdge);
38
+
39
+ function DPEdge() {
40
+ _classCallCheck(this, DPEdge);
41
+
42
+ return _super2.apply(this, arguments);
43
+ }
44
+
45
+ return DPEdge;
46
+ }(BaseEdge);
47
+ DPEdge.config({
48
+ shape: 'DPEdge',
49
+ connector: {
50
+ name: 'pai'
51
+ },
52
+ zIndex: 2,
53
+ attrs: {
54
+ line: {
55
+ stroke: '#808080',
56
+ strokeWidth: 1,
57
+ targetMarker: {
58
+ stroke: 'none',
59
+ fill: 'none'
60
+ }
61
+ }
62
+ }
63
+ });
64
+ export var DPGroupEdge = /*#__PURE__*/function (_DPEdge) {
65
+ _inherits(DPGroupEdge, _DPEdge);
66
+
67
+ var _super3 = _createSuper(DPGroupEdge);
68
+
69
+ function DPGroupEdge() {
70
+ _classCallCheck(this, DPGroupEdge);
71
+
72
+ return _super3.apply(this, arguments);
73
+ }
74
+
75
+ _createClass(DPGroupEdge, [{
76
+ key: "isGroupEdge",
77
+ value: // eslint-disable-next-line class-methods-use-this
78
+ function isGroupEdge() {
79
+ return true;
80
+ }
81
+ }]);
82
+
83
+ return DPGroupEdge;
84
+ }(DPEdge);
85
+ DPGroupEdge.config({
86
+ shape: 'DPGroupEdge'
87
+ });
88
+ Edge.registry.register({
89
+ DPEdge: DPEdge,
90
+ DPGroupEdge: DPGroupEdge
91
+ });
@@ -0,0 +1,11 @@
1
+ import { ReactShape } from '@antv/x6-react-shape';
2
+ export declare class BaseNode extends ReactShape {
3
+ isGroup(): boolean;
4
+ }
5
+ export declare class DPNode extends BaseNode {
6
+ getInPorts(): import("@antv/x6/lib/model/port").PortManager.PortMetadata[];
7
+ getOutPorts(): import("@antv/x6/lib/model/port").PortManager.PortMetadata[];
8
+ }
9
+ export declare class DPGroupNode extends BaseNode {
10
+ isGroup(): boolean;
11
+ }