@relation-graph/react 3.0.0 → 3.0.1
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/package.json +2 -2
- package/relation-graph.js +251 -23
- package/relation-graph.mjs +7368 -5902
- package/relation-graph.umd.js +251 -23
- package/types/packages/platforms/react/src/index.d.ts +98 -64
- package/types/packages/platforms/react/src/relation-graph/RGProvider.d.ts +4 -0
- package/types/packages/platforms/react/src/relation-graph/RelationGraph.d.ts +7 -3
- package/types/packages/platforms/react/src/relation-graph/RelationLinker.d.ts +4 -5
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGCanvas.d.ts +2 -3
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGCanvasContent.d.ts +10 -3
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGCanvasContent4CreatingLine.d.ts +10 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGCanvasContent4FakeLines.d.ts +11 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGCanvasContent4Lines.d.ts +12 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGCanvasContent4Nodes.d.ts +13 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGFakeNode.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGGraphRefs.d.ts +0 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGLineContent.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGLinePath.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGLinePeel.d.ts +2 -3
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGLineText.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGNodePeel.d.ts +10 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RelationGraphUI.d.ts +4 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RelationGraphView.d.ts +4 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RelationLinkerCanvas.d.ts +4 -5
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RelationLinkerUI.d.ts +4 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RelationLinkerView.d.ts +4 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/editing/RGConnectSource.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/editing/RGConnectTarget.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/editing/RGEditingConnectPoints.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/editing/RGEditingLineController.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/editing/RGEditingNearNodeWidget.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/editing/RGMiniView.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/slots/RGSlotOnLine.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/slots/RGSlotOnLineText.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/slots/RGSlotOnNode.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/store/index.d.ts +3 -2
- package/types/packages/platforms/react/src/relation-graph/src/core4react/store/reducers/RGStore.d.ts +10 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/widgets/GraphBackground.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/widgets/GraphOperateStuff.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/widgets/GraphToolBar.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/widgets/GraphWatermark.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/widgets/GraphXsToolBar.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/widgets/RGDebugView.d.ts +3 -0
- package/types/packages/platforms/react/src/relation-graph/src/hooks/RGDataProvider.d.ts +17 -0
- package/types/packages/platforms/react/src/relation-graph/src/hooks/RGHooks.d.ts +24 -1
- package/types/packages/platforms/react/src/relation-graph/src/hooks/useFakeNodesState.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/hooks/useGraphInstance.d.ts +2 -12
- package/types/packages/platforms/react/src/relation-graph/src/hooks/useGraphStore.d.ts +13 -0
- package/types/packages/platforms/react/src/relation-graph/src/hooks/useRelationGraph.d.ts +11 -0
- package/types/packages/platforms/react/src/relation-graph/src/hooks/useRelationLinker.d.ts +17 -0
- package/types/packages/platforms/react/src/types-react.d.ts +24 -24
- package/types/packages/platforms/svelte/src/RGProvider.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/context.d.ts +4 -0
- package/types/packages/platforms/svelte/src/core4svelte/RGCanvas.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/RGCanvasContent.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/RGCanvasContent4CreatingLine.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/RGCanvasContent4FakeLines.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/RGCanvasContent4Lines.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/RGCanvasContent4Nodes.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/RGEasyView.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/RGFakeNode.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/RGGraphDefs.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/RGLineContent.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/RGLinePath.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/RGLinePeel.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/RGLineText.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/RGNodeExpandHolder.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/RGNodePeel.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/RGProvider4Instance.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/RelationGraph.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/RelationGraphUI.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/RelationLinker.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/RelationLinkerCanvas.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/RelationLinkerUI.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/editing/RGConnectSource.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/editing/RGConnectTarget.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/editing/RGConnectTargetUI.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/editing/RGEditingConnectController.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/editing/RGEditingConnectPoints.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/editing/RGEditingLineController.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/editing/RGEditingLineControllerUI.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/editing/RGEditingNearNodeWidget.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/editing/RGEditingNodeController.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/editing/RGEditingNodeControllerUI.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/editing/RGEditingReferenceLine.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/editing/RGEditingResize.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/editing/RGEditingResizeUI.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/editing/RGMiniView.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/editing/RGMiniViewContent.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/web-components/RGConnectTarget.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/web-components/RGEditingConnectController.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/web-components/RGEditingLineController.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/web-components/RGEditingNearNodeWidget.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/web-components/RGEditingNodeController.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/web-components/RGEditingReferenceLine.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/web-components/RGEditingResize.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/web-components/RGMiniView.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/web-components/RelationGraphWithProvider.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/web-components/WebComponentUtils.d.ts +11 -0
- package/types/packages/platforms/svelte/src/core4svelte/widgets/GraphBackground.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/widgets/GraphLoading.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/widgets/GraphMoveOperator.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/widgets/GraphOperateStuff.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/widgets/GraphWatermark.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/widgets/GraphXsToolBar.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/core4svelte/widgets/RGIcons.svelte.d.ts +1 -0
- package/types/packages/platforms/svelte/src/hooks/RGHooks.d.ts +27 -0
- package/types/packages/platforms/svelte/src/hooks/useGraphInstance.d.ts +2 -0
- package/types/packages/platforms/svelte/src/hooks/useGraphStore.d.ts +14 -0
- package/types/packages/platforms/svelte/src/hooks/useRGDataProvider.d.ts +19 -0
- package/types/packages/platforms/svelte/src/hooks/useRelationGraph.d.ts +48 -0
- package/types/packages/platforms/svelte/src/index.d.ts +194 -0
- package/types/packages/platforms/svelte/src/types-svelte.d.ts +85 -0
- package/types/packages/platforms/vue2/src/core4vue/RGCanvas.vue.d.ts +2 -6
- package/types/packages/platforms/vue2/src/core4vue/RGCanvasContent.vue.d.ts +6 -6
- package/types/packages/platforms/vue2/src/core4vue/RGCanvasContent4CreatingLine.vue.d.ts +9 -0
- package/types/packages/platforms/vue2/src/core4vue/RGCanvasContent4FakeLines.vue.d.ts +9 -0
- package/types/packages/platforms/vue2/src/core4vue/RGCanvasContent4Lines.vue.d.ts +9 -0
- package/types/packages/platforms/vue2/src/core4vue/RGCanvasContent4Nodes.vue.d.ts +9 -0
- package/types/packages/platforms/vue2/src/core4vue/RGEasyView.vue.d.ts +1 -0
- package/types/packages/platforms/vue2/src/core4vue/RGGraphDefs.vue.d.ts +1 -0
- package/types/packages/platforms/vue2/src/core4vue/RGLineContent.vue.d.ts +18 -18
- package/types/packages/platforms/vue2/src/core4vue/RGLinePath.vue.d.ts +4 -28
- package/types/packages/platforms/vue2/src/core4vue/RGLinePeel.vue.d.ts +4 -15
- package/types/packages/platforms/vue2/src/core4vue/RGNodeExpandHolder.vue.d.ts +3 -9
- package/types/packages/platforms/vue2/src/core4vue/RGNodePeel.vue.d.ts +5 -20
- package/types/packages/platforms/vue2/src/core4vue/RGProvider.vue.d.ts +50 -0
- package/types/packages/platforms/vue2/src/core4vue/RelationGraph.vue.d.ts +5 -773
- package/types/packages/platforms/vue2/src/core4vue/RelationGraphUI.vue.d.ts +46 -0
- package/types/packages/platforms/vue2/src/core4vue/RelationLinker.vue.d.ts +8 -24
- package/types/packages/platforms/vue2/src/core4vue/RelationLinkerCanvas.vue.d.ts +1 -0
- package/types/packages/platforms/vue2/src/core4vue/RelationLinkerUI.vue.d.ts +23 -0
- package/types/packages/platforms/vue2/src/core4vue/editing/RGConnectSource.vue.d.ts +3 -1
- package/types/packages/platforms/vue2/src/core4vue/editing/RGConnectTarget.vue.d.ts +1 -0
- package/types/packages/platforms/vue2/src/core4vue/editing/RGEditingConnectController.vue.d.ts +2 -1
- package/types/packages/platforms/vue2/src/core4vue/editing/RGEditingConnectPoints.vue.d.ts +1 -0
- package/types/packages/platforms/vue2/src/core4vue/editing/RGEditingLineController.vue.d.ts +12 -2
- package/types/packages/platforms/vue2/src/core4vue/editing/RGEditingNearNodeWidget.vue.d.ts +1 -0
- package/types/packages/platforms/vue2/src/core4vue/editing/RGEditingNodeController.vue.d.ts +1 -0
- package/types/packages/platforms/vue2/src/core4vue/editing/RGEditingReferenceLine.vue.d.ts +1 -0
- package/types/packages/platforms/vue2/src/core4vue/editing/RGEditingResize.vue.d.ts +1 -0
- package/types/packages/platforms/vue2/src/core4vue/editing/RGMiniView.vue.d.ts +3 -1
- package/types/packages/platforms/vue2/src/core4vue/widgets/GraphBackground.vue.d.ts +1 -0
- package/types/packages/platforms/vue2/src/core4vue/widgets/GraphLoading.vue.d.ts +1 -0
- package/types/packages/platforms/vue2/src/core4vue/widgets/GraphMoveOperator.vue.d.ts +1 -1
- package/types/packages/platforms/vue2/src/core4vue/widgets/GraphOperateStuff.vue.d.ts +1 -0
- package/types/packages/platforms/vue2/src/core4vue/widgets/GraphToolBar.vue.d.ts +1 -1
- package/types/packages/platforms/vue2/src/core4vue/widgets/GraphWatermark.vue.d.ts +1 -0
- package/types/packages/platforms/vue2/src/core4vue/widgets/GraphXsToolBar.vue.d.ts +1 -1
- package/types/packages/platforms/vue2/src/core4vue/widgets/RGDebugView.vue.d.ts +12 -0
- package/types/packages/platforms/vue2/src/hooks/GraphStoreMixin.d.ts +40 -0
- package/types/packages/platforms/vue2/src/index.d.ts +138 -1692
- package/types/packages/platforms/vue2/src/types-vue2.d.ts +3 -0
- package/types/packages/platforms/vue3/src/constants.d.ts +0 -1
- package/types/packages/platforms/vue3/src/index.d.ts +97 -1404
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/editing/RGConnectSource.vue.d.ts +2 -2
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/editing/RGConnectTarget.vue.d.ts +4 -4
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/editing/RGEditingLineController.vue.d.ts +2 -2
- package/types/packages/platforms/vue3/src/relation-graph/src/hooks/RGHooks.d.ts +27 -2
- package/types/packages/platforms/vue3/src/relation-graph/src/hooks/useGraphData.d.ts +2 -0
- package/types/packages/platforms/vue3/src/relation-graph/src/hooks/useGraphInstance.d.ts +1 -12
- package/types/packages/platforms/vue3/src/relation-graph/src/hooks/useGraphStore.d.ts +16 -0
- package/types/packages/platforms/vue3/src/relation-graph/src/hooks/useRGDataProvider.d.ts +17 -0
- package/types/packages/platforms/vue3/src/relation-graph/src/hooks/useRelationGraph.d.ts +131 -0
- package/types/packages/platforms/vue3/src/relation-graph/src/hooks/useRelationLinker.d.ts +39 -0
- package/types/packages/platforms/vue3/src/types-vue3.d.ts +104 -4
- package/types/packages/platforms/vue3/src/types.d.ts +3 -1
- package/types/packages/relation-graph-models/RGObjectsForExport.d.ts +40 -32
- package/types/packages/relation-graph-models/data/RGDataDefine.d.ts +23 -0
- package/types/packages/relation-graph-models/data/RGDataGetter.d.ts +36 -0
- package/types/packages/relation-graph-models/data/RGDataProvider.d.ts +66 -0
- package/types/packages/relation-graph-models/data/RGDataProvider4React.d.ts +9 -0
- package/types/packages/relation-graph-models/data/RGDataProvider4Svelte.d.ts +10 -0
- package/types/packages/relation-graph-models/data/RGDataProvider4Vue2.d.ts +9 -0
- package/types/packages/relation-graph-models/data/RGDataProvider4Vue3.d.ts +10 -0
- package/types/packages/relation-graph-models/data/RGDataProvider4Vue3V1.d.ts +10 -0
- package/types/packages/relation-graph-models/data/RGLineDataUtils.d.ts +9 -0
- package/types/packages/relation-graph-models/data/RGNodeDataUtils.d.ts +14 -0
- package/types/packages/relation-graph-models/data/RGOptionsDataUtils.d.ts +9 -0
- package/types/packages/relation-graph-models/data/utils/EdgeCounter.d.ts +8 -0
- package/types/packages/relation-graph-models/layouts/RGBaseLayout.d.ts +37 -0
- package/types/packages/relation-graph-models/layouts/RGCenterLayout.d.ts +9 -0
- package/types/packages/relation-graph-models/layouts/RGCircleLayout.d.ts +7 -0
- package/types/packages/relation-graph-models/layouts/RGFixedLayout.d.ts +10 -0
- package/types/packages/relation-graph-models/layouts/RGFolderLayout.d.ts +15 -0
- package/types/packages/relation-graph-models/layouts/RGForceLayout.d.ts +77 -0
- package/types/packages/relation-graph-models/layouts/RGIOTreeLayout.d.ts +18 -0
- package/types/packages/relation-graph-models/layouts/RGSmartTreeLayout.d.ts +14 -0
- package/types/packages/relation-graph-models/layouts/RGTreeLayout.d.ts +17 -0
- package/types/packages/relation-graph-models/layouts/analyzers/BasicNetworkAnalyzer.d.ts +27 -0
- package/types/packages/relation-graph-models/layouts/analyzers/RGNetworkAnalyzer.d.ts +27 -0
- package/types/packages/relation-graph-models/models/RelationGraphBase.d.ts +31 -18
- package/types/packages/relation-graph-models/models/RelationGraphCore.d.ts +46 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith1View.d.ts +91 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith2Data.d.ts +34 -381
- package/types/packages/relation-graph-models/models/RelationGraphWith2Data1Getter.d.ts +77 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith2Data2Analysis.d.ts +172 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith2Data3Update.d.ts +257 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith2Data4ConnectTarget.d.ts +85 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith2Data5LineConfig.d.ts +35 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith3Options1Update.d.ts +75 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith3Options2API.d.ts +39 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith4Line.d.ts +81 -21
- package/types/packages/relation-graph-models/models/RelationGraphWith5Zoom.d.ts +19 -21
- package/types/packages/relation-graph-models/models/RelationGraphWith6Effect.d.ts +56 -4
- package/types/packages/relation-graph-models/models/RelationGraphWith6Layout.d.ts +60 -12
- package/types/packages/relation-graph-models/models/RelationGraphWith7Event.d.ts +233 -36
- package/types/packages/relation-graph-models/models/RelationGraphWith91Editing.d.ts +176 -25
- package/types/packages/relation-graph-models/models/RelationGraphWith92MiniView.d.ts +70 -13
- package/types/packages/relation-graph-models/models/RelationGraphWith93Image.d.ts +36 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith93Image_codes.d.ts +36 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith95Dom.d.ts +108 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith99API.d.ts +125 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith9EasyView.d.ts +57 -11
- package/types/packages/relation-graph-models/utils/RGCanvasImpl2D.d.ts +2 -3
- package/types/packages/relation-graph-models/utils/RGCommon.d.ts +6 -1
- package/types/packages/relation-graph-models/utils/RGDragUtils.d.ts +14 -11
- package/types/packages/relation-graph-models/utils/RGFullscreenUtils.d.ts +1 -1
- package/types/packages/relation-graph-models/utils/RGGraphMath.d.ts +27 -0
- package/types/packages/relation-graph-models/utils/RGIntergration.d.ts +32 -34
- package/types/packages/relation-graph-models/utils/RGNodesAnalytic.d.ts +6 -15
- package/types/packages/relation-graph-models/utils/RGTips.d.ts +7 -0
- package/types/packages/relation-graph-models/utils/line/RGLinePath.d.ts +16 -1
- package/types/packages/relation-graph-models/utils/line/RGLinePathUtils.d.ts +1 -1
- package/types/packages/relation-graph-models/utils/line/RGPathGeneratorFor1.d.ts +1 -1
- package/types/packages/relation-graph-models/utils/line/RGPathGeneratorFor4.d.ts +1 -1
- package/types/packages/relation-graph-models/utils/line/RGPathGeneratorFor44.d.ts +1 -1
- package/types/packages/relation-graph-models/utils/line/RGPathGeneratorFor49.d.ts +1 -1
- package/types/packages/relation-graph-models/utils/line/RGPathGeneratorFor6.d.ts +1 -1
- package/types/packages/relation-graph-models/utils/line/RGPathGeneratorForCurve.d.ts +1 -1
- package/types/packages/types.d.ts +1467 -0
- package/types/packages/types.ts +1472 -0
- package/types/react.d.ts +38 -38
- package/types/vue3.d.ts +229 -229
|
@@ -1,59 +1,210 @@
|
|
|
1
1
|
import { RelationGraphWith9EasyView } from './RelationGraphWith9EasyView';
|
|
2
|
-
import { JsonLineLike, RGCtrlPointForLine44, RGJunctionPoint, RGLine, RGLineConnectEventHandler, RGLineVertexBeDroppedEventHandler,
|
|
2
|
+
import { JsonLineLike, RGCtrlPointForLine44, RGJunctionPoint, RGLine, RGLineConnectEventHandler, RGLineVertexBeDroppedEventHandler, RGNode, RGResizeHandlePosition, RGUserEvent } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Capability extension class related to the editor of the relation-graph component
|
|
5
|
+
*/
|
|
3
6
|
export declare class RelationGraphWith91Editing extends RelationGraphWith9EasyView {
|
|
4
|
-
|
|
7
|
+
constructor();
|
|
8
|
+
/**
|
|
9
|
+
* Set the nodes being edited
|
|
10
|
+
* - Set to null or an empty array to cancel all nodes being edited
|
|
11
|
+
* - After setting, the position and size of the editing controller (<RGEditingNodeController>) will be automatically updated. If there are no editing nodes, the controller will be hidden.
|
|
12
|
+
* @param nodes
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
setEditingNodes(nodes: RGNode[] | null): void;
|
|
16
|
+
/**
|
|
17
|
+
* Add a node to the editing nodes
|
|
18
|
+
* @param node
|
|
19
|
+
*/
|
|
5
20
|
addEditingNode(node: RGNode): void;
|
|
21
|
+
/**
|
|
22
|
+
* Remove a node from the editing nodes
|
|
23
|
+
* @param node
|
|
24
|
+
*/
|
|
6
25
|
removeEditingNode(node: RGNode): void;
|
|
26
|
+
/**
|
|
27
|
+
* Toggle the editing state of a node
|
|
28
|
+
* @param node
|
|
29
|
+
*/
|
|
7
30
|
toggleEditingNode(node: RGNode): void;
|
|
31
|
+
/**
|
|
32
|
+
* Update the view of the editing controller
|
|
33
|
+
* - This method is automatically called when the editing nodes are set or changed.
|
|
34
|
+
*/
|
|
8
35
|
updateEditingControllerView(): void;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
36
|
+
/**
|
|
37
|
+
* @inner
|
|
38
|
+
* @protected
|
|
39
|
+
*/
|
|
40
|
+
protected _updateEditingControllerView(): void;
|
|
13
41
|
protected _onResizing: any;
|
|
14
42
|
protected _onResizeEnd: any;
|
|
15
43
|
protected _startPoint: {
|
|
16
44
|
x: number;
|
|
17
45
|
y: number;
|
|
18
46
|
};
|
|
47
|
+
protected _startEventCanvasXy: {
|
|
48
|
+
x: number;
|
|
49
|
+
y: number;
|
|
50
|
+
};
|
|
51
|
+
protected _startSizeCanvasXy: {
|
|
52
|
+
x: number;
|
|
53
|
+
y: number;
|
|
54
|
+
};
|
|
19
55
|
protected _startSize: {
|
|
20
56
|
x: number;
|
|
21
57
|
y: number;
|
|
22
58
|
width: number;
|
|
23
59
|
height: number;
|
|
60
|
+
widthOnCanvas: number;
|
|
61
|
+
heightOnCanvas: number;
|
|
24
62
|
};
|
|
25
63
|
protected _resizeType: RGResizeHandlePosition;
|
|
26
|
-
protected
|
|
27
|
-
protected
|
|
64
|
+
protected _nodeStartSizeMap: WeakMap<RGNode, any>;
|
|
65
|
+
protected resizeMinLimit: {
|
|
28
66
|
width: number;
|
|
29
67
|
height: number;
|
|
30
68
|
};
|
|
69
|
+
/**
|
|
70
|
+
* User starts resizing the editing controller
|
|
71
|
+
* @param type User handles the resize handle position: "t" | "r" | "b" | "l" | "tl" | "tr" | "bl" | "br"
|
|
72
|
+
* @param e
|
|
73
|
+
*/
|
|
31
74
|
onResizeStart(type: RGResizeHandlePosition, e: RGUserEvent): void;
|
|
32
|
-
|
|
75
|
+
private _resizeDraggingTimer;
|
|
76
|
+
private _resizeDraggingEvent;
|
|
77
|
+
private _resizeDraggingStoped;
|
|
78
|
+
/**
|
|
79
|
+
* @inner
|
|
80
|
+
* @private
|
|
81
|
+
*/
|
|
82
|
+
private onResizing;
|
|
83
|
+
/**
|
|
84
|
+
* @inner
|
|
85
|
+
* @private
|
|
86
|
+
*/
|
|
87
|
+
private onResizingRequest;
|
|
88
|
+
/**
|
|
89
|
+
* @inner
|
|
90
|
+
* @private
|
|
91
|
+
*/
|
|
33
92
|
private _applyResizeScale;
|
|
34
|
-
|
|
93
|
+
/**
|
|
94
|
+
* @inner
|
|
95
|
+
* @private
|
|
96
|
+
*/
|
|
97
|
+
private onResizeEnd;
|
|
98
|
+
/**
|
|
99
|
+
* When dragging a node, update the position of the dragged node and other nodes being edited
|
|
100
|
+
* - This method is called internally by relation-graph and does not need to be called by the user
|
|
101
|
+
* @inner
|
|
102
|
+
* @private
|
|
103
|
+
*/
|
|
35
104
|
protected draggingSelectedNodes(draggedNode: RGNode, newX: number, newY: number, buff_x: number, buff_y: number): void;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
105
|
+
/**
|
|
106
|
+
* @inner
|
|
107
|
+
* @private
|
|
108
|
+
*/
|
|
109
|
+
protected _updateEditingConnectControllerView(): void;
|
|
110
|
+
/**
|
|
111
|
+
* Set the line being edited
|
|
112
|
+
* - When set to null, the line being edited is canceled
|
|
113
|
+
* - When the line being edited is not null, the <RGEditingLineController> controller will automatically display and update its position
|
|
114
|
+
* @param line The line being edited
|
|
115
|
+
*/
|
|
116
|
+
setEditingLine(line: RGLine | null): void;
|
|
117
|
+
/**
|
|
118
|
+
* @inner
|
|
119
|
+
* @private
|
|
120
|
+
*/
|
|
121
|
+
private updateReferenceLineView;
|
|
122
|
+
/**
|
|
123
|
+
* Hide the editing line view
|
|
124
|
+
* - Generally used in this scenario: when editing a line, the line editing controller may block the display of the line. When modifying the appearance of the line (such as arrows, etc.), this method can be called to hide the line editing controller view, allowing users to preview the final effect of the line in time.
|
|
125
|
+
*/
|
|
45
126
|
hideEditingLineView(): void;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
127
|
+
/**
|
|
128
|
+
* Update the view of the editing line controller
|
|
129
|
+
* - This method is automatically called when the editing line is set or changed.
|
|
130
|
+
*/
|
|
131
|
+
updateEditingLineView(): void;
|
|
132
|
+
/**
|
|
133
|
+
* @inner
|
|
134
|
+
* @private
|
|
135
|
+
*/
|
|
136
|
+
protected _updateEditingLineView(): void;
|
|
137
|
+
/**
|
|
138
|
+
* Start dragging the start or end point of the line to reselect the start or end point of the line
|
|
139
|
+
* - During the process of changing the start or end point of the line, the line will be removed. When reconnecting, you can get the new line information (the new line information id and other attributes will be retained) through onLineConnectEventHandler(or through the onLineBeCreated event of the <RelationGraph> component). You need to complete the data change through graphInstance.addLines([newJsonLine]) to finally complete the modification of the line endpoint.
|
|
140
|
+
* @param type Choose to drag the start point or end point of the line, 'start' means dragging the start point, 'end' means dragging the end point
|
|
141
|
+
* @param $event
|
|
142
|
+
* @param onLineConnectEventHandler Callback function after line connection is completed, you can get the new line information through the parameters, you need to complete the data change through graphInstance.addLines([newJsonLine])
|
|
143
|
+
*
|
|
144
|
+
*/
|
|
49
145
|
startMoveLineVertex(type: 'start' | 'end', $event: RGUserEvent, onLineConnectEventHandler: RGLineConnectEventHandler): void;
|
|
50
146
|
private _startCreateLineFromNodeTime;
|
|
51
|
-
|
|
147
|
+
/**
|
|
148
|
+
* Start creating a line from a specified starting point
|
|
149
|
+
* - The <RGConnectSource> and <RGConnectTarget> components will use this method, and you can call this method yourself to create a line from a specified node
|
|
150
|
+
* - It is worth noting that: fromNode can be empty. If it is empty, it will try to automatically find the starting point. The logic is:
|
|
151
|
+
* - 1. Determine whether lineTemplate.from is empty. If it is not empty, use the node corresponding to lineTemplate.from as the starting point
|
|
152
|
+
* - 2. Find the only node from the currently edited nodes as the starting node.
|
|
153
|
+
* - 3. If the starting node still cannot be found, an exception is thrown
|
|
154
|
+
* - When the user completes the connection of the line, the onLineConnectEventHandler callback will be triggered (or through the onLineBeCreated event of the <RelationGraph> component), and you need to add the line data in the callback, through
|
|
155
|
+
*
|
|
156
|
+
* @param fromNode
|
|
157
|
+
* @param useLineTemplate
|
|
158
|
+
* @param $event
|
|
159
|
+
* @param onLineConnectEventHandler
|
|
160
|
+
*/
|
|
161
|
+
startCreateLineFromNode(fromNode: RGNode | null | undefined, useLineTemplate: JsonLineLike, $event: RGUserEvent, onLineConnectEventHandler: RGLineConnectEventHandler): void;
|
|
162
|
+
/**
|
|
163
|
+
* When the start or end point of the line is connected to the junction point of a node, this method is called
|
|
164
|
+
* - This method is called internally by relation-graph and does not need to be called by the user
|
|
165
|
+
* @param type
|
|
166
|
+
* @param $event
|
|
167
|
+
* @param junctionPointOffset
|
|
168
|
+
* @param onLineVertexBeDropped
|
|
169
|
+
* @inner
|
|
170
|
+
*/
|
|
52
171
|
onLineVertexBeDropped(type: RGJunctionPoint, $event: RGUserEvent, junctionPointOffset?: {
|
|
53
172
|
x: number;
|
|
54
173
|
y: number;
|
|
55
174
|
}, onLineVertexBeDropped?: RGLineVertexBeDroppedEventHandler): void;
|
|
175
|
+
/**
|
|
176
|
+
* Start dragging the line text position
|
|
177
|
+
* - This method is called internally by relation-graph and does not need to be called by the user
|
|
178
|
+
* @param $event
|
|
179
|
+
* @param moveEndCallback
|
|
180
|
+
* @inner
|
|
181
|
+
*/
|
|
56
182
|
startMoveLineText($event: RGUserEvent, moveEndCallback: () => void): void;
|
|
57
|
-
|
|
58
|
-
|
|
183
|
+
/**
|
|
184
|
+
* Start dragging the line control point (applicable to lines with curved line types)
|
|
185
|
+
* - This method is called internally by relation-graph and does not need to be called by the user
|
|
186
|
+
* @param ctrlPointIndex
|
|
187
|
+
* @param $event
|
|
188
|
+
* @param onLinePathChanged
|
|
189
|
+
* @inner
|
|
190
|
+
*/
|
|
191
|
+
startMoveLine6CtrlPoint(ctrlPointIndex: number, $event: RGUserEvent, onLinePathChanged: (line: RGLine) => void): void;
|
|
192
|
+
/**
|
|
193
|
+
* Start dragging the line control point (applicable to lines with line type RGLineShape.StandardOrthogonal)
|
|
194
|
+
* - This method is called internally by relation-graph and does not need to be called by the user
|
|
195
|
+
* @param split
|
|
196
|
+
* @param $event
|
|
197
|
+
* @param onLinePathChanged
|
|
198
|
+
*/
|
|
199
|
+
startMoveLine44CtrlPoint(split: RGCtrlPointForLine44, $event: RGUserEvent, onLinePathChanged: (line: RGLine) => void): void;
|
|
200
|
+
/**
|
|
201
|
+
* When the start or end point of the line is dropped onto the connection point on the node connection controller (<RGEditingConnectController />), this method is called
|
|
202
|
+
* - This method is called internally by relation-graph and does not need to be called by the user
|
|
203
|
+
* @param junctionPoint
|
|
204
|
+
* @param $event
|
|
205
|
+
* @param connectBoxDom
|
|
206
|
+
* @param lineVertexBeDroppedEventHandler
|
|
207
|
+
* @inner
|
|
208
|
+
*/
|
|
209
|
+
onLineVertexBeDroppedOnConnectController(junctionPoint: RGJunctionPoint, $event: RGUserEvent, connectBoxDom?: HTMLElement, lineVertexBeDroppedEventHandler?: RGLineVertexBeDroppedEventHandler): void;
|
|
59
210
|
}
|
|
@@ -1,19 +1,39 @@
|
|
|
1
|
-
import { RGLine, RGLink,
|
|
1
|
+
import { RGLine, RGLink, RGNode, RGNodeShape, RGUserEvent } from '../../types';
|
|
2
2
|
import { RelationGraphWith91Editing } from './RelationGraphWith91Editing';
|
|
3
|
+
/**
|
|
4
|
+
* Functionality related to the mini view(<RGMiniView />) in the relation-graph component
|
|
5
|
+
*/
|
|
3
6
|
export declare class RelationGraphWith92MiniView extends RelationGraphWith91Editing {
|
|
4
|
-
$miniViewCanvas
|
|
5
|
-
$mvCanvasCtx
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
private $miniViewCanvas;
|
|
8
|
+
private $mvCanvasCtx;
|
|
9
|
+
constructor();
|
|
10
|
+
/**
|
|
11
|
+
* relation-graph internal call, please do not use externally
|
|
12
|
+
* @inner
|
|
13
|
+
* @param canvas
|
|
14
|
+
*/
|
|
9
15
|
setMiniViewCanvas(canvas: HTMLCanvasElement): void;
|
|
16
|
+
/**
|
|
17
|
+
* relation-graph internal call, please do not use externally
|
|
18
|
+
* @inner
|
|
19
|
+
*/
|
|
10
20
|
updateMiniView(): void;
|
|
11
|
-
|
|
12
|
-
|
|
21
|
+
/**
|
|
22
|
+
* @private
|
|
23
|
+
* @inner
|
|
24
|
+
*/
|
|
13
25
|
private _updateMiniView;
|
|
14
|
-
private
|
|
26
|
+
private _canvasDomScale;
|
|
27
|
+
/**
|
|
28
|
+
* @private
|
|
29
|
+
* @inner
|
|
30
|
+
*/
|
|
15
31
|
protected mvDosomethingBeforeDraw(): void;
|
|
16
|
-
|
|
32
|
+
/**
|
|
33
|
+
* @private
|
|
34
|
+
* @inner
|
|
35
|
+
*/
|
|
36
|
+
private updateMiniViewVisibleArea;
|
|
17
37
|
protected miniViewBox: {
|
|
18
38
|
visibleAreaStart: {
|
|
19
39
|
x: number;
|
|
@@ -37,14 +57,51 @@ export declare class RelationGraphWith92MiniView extends RelationGraphWith91Edit
|
|
|
37
57
|
y: number;
|
|
38
58
|
};
|
|
39
59
|
private _canvasItemMiniSizeLimit;
|
|
60
|
+
/**
|
|
61
|
+
* @private
|
|
62
|
+
* @inner
|
|
63
|
+
*/
|
|
40
64
|
protected mvDrawAllNodes(): void;
|
|
41
|
-
|
|
65
|
+
/**
|
|
66
|
+
* @private
|
|
67
|
+
* @inner
|
|
68
|
+
*/
|
|
69
|
+
protected mvDrawNode(node: RGNode, nodeShape: RGNodeShape, nodeWidth: number, nodeHeight: number): void;
|
|
70
|
+
/**
|
|
71
|
+
* @private
|
|
72
|
+
* @inner
|
|
73
|
+
*/
|
|
42
74
|
protected mvDrawNode4Rect(node: RGNode, nodeWidth: number, nodeHeight: number): void;
|
|
75
|
+
/**
|
|
76
|
+
* @private
|
|
77
|
+
* @inner
|
|
78
|
+
*/
|
|
43
79
|
protected mvDrawNode4Circle(node: RGNode, nodeWidth: number, nodeHeight: number): void;
|
|
80
|
+
/**
|
|
81
|
+
* @private
|
|
82
|
+
* @inner
|
|
83
|
+
*/
|
|
44
84
|
protected mvDrawAllLines(): void;
|
|
85
|
+
/**
|
|
86
|
+
* @private
|
|
87
|
+
* @inner
|
|
88
|
+
*/
|
|
45
89
|
protected mvDrawLine(link: RGLink, line: RGLine): void;
|
|
90
|
+
/**
|
|
91
|
+
* @private
|
|
92
|
+
* @inner
|
|
93
|
+
*/
|
|
46
94
|
protected mvDrawSvgPathOnCanvas(ctx: any, svgPath: any): void;
|
|
47
|
-
|
|
48
|
-
|
|
95
|
+
/**
|
|
96
|
+
* Triggered when dragging the visible area indicator in the MiniView
|
|
97
|
+
* @inner
|
|
98
|
+
* @param e
|
|
99
|
+
*/
|
|
100
|
+
onVisibleViewHandleDragStart(e: RGUserEvent): void;
|
|
101
|
+
/**
|
|
102
|
+
* Triggered when the reset function in the MiniView is clicked
|
|
103
|
+
* @inner
|
|
104
|
+
* @param e
|
|
105
|
+
*/
|
|
49
106
|
resetByVisiableView(e: RGUserEvent): void;
|
|
50
107
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { RelationGraphWith92MiniView } from './RelationGraphWith92MiniView';
|
|
2
|
+
/**
|
|
3
|
+
* API methods related to generating images in the relation-graph component,
|
|
4
|
+
* - The methods here are just to prepare for generating images, making the dom reach a state suitable for generating images, and then letting the user get the dom and call third-party libraries to generate images
|
|
5
|
+
* - Specific content includes: setting watermark dom, setting background dom, moving canvas position, adjusting node positions as necessary, adjusting canvas size, etc.
|
|
6
|
+
*/
|
|
7
|
+
export declare class RelationGraphWith93Image extends RelationGraphWith92MiniView {
|
|
8
|
+
constructor();
|
|
9
|
+
private $watermarkDom;
|
|
10
|
+
private $watermarkPosition;
|
|
11
|
+
private $backgroundDom;
|
|
12
|
+
/**
|
|
13
|
+
* Set the watermark dom element, which will be automatically called when using the <RGWatermark> component to set the watermark dom
|
|
14
|
+
* - Note that this is an internal method, please do not use it externally
|
|
15
|
+
* @inner
|
|
16
|
+
*/
|
|
17
|
+
setWatermarkDom(watermarkDom: HTMLDivElement | null, forImage?: boolean, forDisplay?: boolean, position?: string): void;
|
|
18
|
+
private _originBackgroundColor;
|
|
19
|
+
/**
|
|
20
|
+
* Set the background dom element, which will be automatically called when using the <RGBackground> component to set the background dom
|
|
21
|
+
* - Note that this is an internal method, please do not use it externally
|
|
22
|
+
* @inner
|
|
23
|
+
*/
|
|
24
|
+
setBackgroundDom(backgroundDom: HTMLDivElement | null, forImage?: boolean, forDisplay?: boolean): void;
|
|
25
|
+
/**
|
|
26
|
+
* Switch to a state suitable for generating images, allowing relation-graph to enter a state suitable for generating images
|
|
27
|
+
* - Note that this is an asynchronous method
|
|
28
|
+
* @return Returns the dom element used to generate the image
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
prepareForImageGeneration(): Promise<HTMLElement>;
|
|
32
|
+
/**
|
|
33
|
+
* After the image is generated, let relation-graph return to the previous state
|
|
34
|
+
*/
|
|
35
|
+
restoreAfterImageGeneration(): Promise<void>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { RelationGraphWith92MiniView } from './RelationGraphWith92MiniView';
|
|
2
|
+
/**
|
|
3
|
+
* API methods related to generating images in the relation-graph component,
|
|
4
|
+
* - The methods here are just to prepare for generating images, making the dom reach a state suitable for generating images, and then letting the user get the dom and call third-party libraries to generate images
|
|
5
|
+
* - Specific content includes: setting watermark dom, setting background dom, moving canvas position, adjusting node positions as necessary, adjusting canvas size, etc.
|
|
6
|
+
*/
|
|
7
|
+
export declare class RelationGraphWith93Image extends RelationGraphWith92MiniView {
|
|
8
|
+
constructor();
|
|
9
|
+
private $watermarkDom;
|
|
10
|
+
private $watermarkPosition;
|
|
11
|
+
private $backgroundDom;
|
|
12
|
+
/**
|
|
13
|
+
* Set the watermark dom element, which will be automatically called when using the <RGWatermark> component to set the watermark dom
|
|
14
|
+
* - Note that this is an internal method, please do not use it externally
|
|
15
|
+
* @inner
|
|
16
|
+
*/
|
|
17
|
+
setWatermarkDom(watermarkDom: HTMLDivElement | null, forImage?: boolean, forDisplay?: boolean, position?: string): void;
|
|
18
|
+
private _originBackgroundColor;
|
|
19
|
+
/**
|
|
20
|
+
* Set the background dom element, which will be automatically called when using the <RGBackground> component to set the background dom
|
|
21
|
+
* - Note that this is an internal method, please do not use it externally
|
|
22
|
+
* @inner
|
|
23
|
+
*/
|
|
24
|
+
setBackgroundDom(backgroundDom: HTMLDivElement | null, forImage?: boolean, forDisplay?: boolean): void;
|
|
25
|
+
/**
|
|
26
|
+
* Switch to a state suitable for generating images, allowing relation-graph to enter a state suitable for generating images
|
|
27
|
+
* - Note that this is an asynchronous method
|
|
28
|
+
* @return Returns the dom element used to generate the image
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
prepareForImageGeneration(): Promise<HTMLElement>;
|
|
32
|
+
/**
|
|
33
|
+
* After the image is generated, let relation-graph return to the previous state
|
|
34
|
+
*/
|
|
35
|
+
restoreAfterImageGeneration(): Promise<void>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { RGNode } from '../../types';
|
|
2
|
+
import { RelationGraphWith93Image } from './RelationGraphWith93Image';
|
|
3
|
+
/**
|
|
4
|
+
* Enhancement class for relation-graph component to interact with DOM, monitor changes in the view and elements within the view, and respond accordingly
|
|
5
|
+
*/
|
|
6
|
+
export declare class RelationGraphWith95Dom extends RelationGraphWith93Image {
|
|
7
|
+
protected resizeObserver: ResizeObserver;
|
|
8
|
+
protected resizeListenerMap: WeakMap<object, any>;
|
|
9
|
+
protected domToNodeIdMap: WeakMap<Element, string>;
|
|
10
|
+
constructor();
|
|
11
|
+
/**
|
|
12
|
+
* [Used internally by relation-graph] This method will be called after the RelationGraph component is mounted, to facilitate DOM operations in the JS instance object (this will only obtain visual information of the DOM and monitor changes in size and position).
|
|
13
|
+
* @param relationGraphDom:HTMLDivElement RelationGraph container DOM
|
|
14
|
+
*/
|
|
15
|
+
setDom(relationGraphDom: HTMLDivElement): void;
|
|
16
|
+
/**
|
|
17
|
+
* [Used internally by relation-graph] This method will be called after the RelationGraph component's canvas element is mounted, to facilitate DOM operations in the JS instance object (this will only obtain visual information of the DOM and monitor changes in size and position).
|
|
18
|
+
* @param relationGraphDom:HTMLDivElement canvas DOM
|
|
19
|
+
*/
|
|
20
|
+
setCanvasDom(canvasDom: HTMLDivElement): void;
|
|
21
|
+
/**
|
|
22
|
+
* @inner
|
|
23
|
+
* @private
|
|
24
|
+
*/
|
|
25
|
+
private getResizeObserver;
|
|
26
|
+
/**
|
|
27
|
+
* @inner
|
|
28
|
+
* @private
|
|
29
|
+
*/
|
|
30
|
+
protected initDom(): void;
|
|
31
|
+
private mutationObserver4Nodes?;
|
|
32
|
+
private mutationObserver4CanvasSlotBehind?;
|
|
33
|
+
private mutationObserver4CanvasSlotAbove?;
|
|
34
|
+
/**
|
|
35
|
+
* @inner
|
|
36
|
+
* @private
|
|
37
|
+
*/
|
|
38
|
+
private reinitMutationObservers;
|
|
39
|
+
private _updateCanvasConnectTargetsTask;
|
|
40
|
+
/**
|
|
41
|
+
* @inner
|
|
42
|
+
* @private
|
|
43
|
+
*/
|
|
44
|
+
protected destroyMutationObserver(): void;
|
|
45
|
+
private onKeyDownHanlder;
|
|
46
|
+
private onKeyUpHanlder;
|
|
47
|
+
/**
|
|
48
|
+
* @inner
|
|
49
|
+
* @private
|
|
50
|
+
*/
|
|
51
|
+
protected addKeyboardListener(): void;
|
|
52
|
+
/**
|
|
53
|
+
* @inner
|
|
54
|
+
* @private
|
|
55
|
+
*/
|
|
56
|
+
protected removeKeyboardListener(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Monitor the size changes of a DOM element using ResizeObserver
|
|
59
|
+
* @inner
|
|
60
|
+
* @param dom
|
|
61
|
+
* @param callback
|
|
62
|
+
* @protected
|
|
63
|
+
*/
|
|
64
|
+
protected addResizeListener(dom: HTMLElement, callback: (width: number, height: number) => void): void;
|
|
65
|
+
/**
|
|
66
|
+
* Node DOM resize event handler
|
|
67
|
+
* @inner
|
|
68
|
+
* @param dom
|
|
69
|
+
* @param width
|
|
70
|
+
* @param height
|
|
71
|
+
* @private
|
|
72
|
+
*/
|
|
73
|
+
private _onNodeDomResize;
|
|
74
|
+
/**
|
|
75
|
+
* Node DOM resize event handler
|
|
76
|
+
* @inner
|
|
77
|
+
* @param dom
|
|
78
|
+
* @param node
|
|
79
|
+
* @param width
|
|
80
|
+
* @param height
|
|
81
|
+
* @private
|
|
82
|
+
*/
|
|
83
|
+
private _onNodeResize;
|
|
84
|
+
/**
|
|
85
|
+
* [Used internally by relation-graph] This method is called when the Node component is mounted to monitor changes in the size of the Node's DOM element.
|
|
86
|
+
* @param dom The DOM element corresponding to the Node component
|
|
87
|
+
* @param node The JS data object of the Node
|
|
88
|
+
* @inner
|
|
89
|
+
*/
|
|
90
|
+
addNodeResizeListener(dom: HTMLElement, node: RGNode): void;
|
|
91
|
+
/**
|
|
92
|
+
* [Used internally by relation-graph] This method is called when the Node component is destroyed to remove monitoring of the corresponding DOM element of the Node.
|
|
93
|
+
* @param dom The DOM element corresponding to the Node component
|
|
94
|
+
* @inner
|
|
95
|
+
*/
|
|
96
|
+
removeNodeResizeListener(dom: HTMLElement): void;
|
|
97
|
+
/**
|
|
98
|
+
* Remove size change monitoring for the DOM element
|
|
99
|
+
* @param dom
|
|
100
|
+
* @protected
|
|
101
|
+
*/
|
|
102
|
+
protected removeResizeListener(dom: HTMLElement): void;
|
|
103
|
+
/**
|
|
104
|
+
* @inner
|
|
105
|
+
* @protected
|
|
106
|
+
*/
|
|
107
|
+
protected destroyResizeObserver(): void;
|
|
108
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { JsonLine, JsonNode, RGJsonData, RGLine, RGLink, RGNode, RGOptions, RGRectTarget } from '../../types';
|
|
2
|
+
import { RelationGraphWith95Dom } from './RelationGraphWith95Dom';
|
|
3
|
+
/**
|
|
4
|
+
* Additional API methods provided by the relation-graph component
|
|
5
|
+
*/
|
|
6
|
+
export declare class RelationGraphWith99API extends RelationGraphWith95Dom {
|
|
7
|
+
constructor();
|
|
8
|
+
/**
|
|
9
|
+
* Call this method to notify the relation-graph component to update when the data changes
|
|
10
|
+
* - In general, there is no need to call this method manually, the relation-graph component will automatically monitor data changes and update, but in some special cases, you may need to call this method manually to ensure that the relation-graph component updates the display correctly.
|
|
11
|
+
*/
|
|
12
|
+
dataUpdated(): void;
|
|
13
|
+
/**
|
|
14
|
+
* Set the configuration options of the relation-graph component, you need to set the configuration items you want to modify through options
|
|
15
|
+
* @param options RGOptions The configuration items that need to be modified, no need to pass in a complete object
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
setOptions(options: RGOptions): void;
|
|
19
|
+
/**
|
|
20
|
+
* Update the configuration options of the relation-graph component, you only need to pass in the configuration items you want to modify
|
|
21
|
+
* @param options Partial<RGOptions> The configuration items that need to be modified, no need to pass in a complete object
|
|
22
|
+
*/
|
|
23
|
+
updateOptions(options: Partial<RGOptions>): void;
|
|
24
|
+
/**
|
|
25
|
+
* Move the canvas to the center position based on the distribution of nodes
|
|
26
|
+
* @param nodes Optional parameter, specify a group of nodes or rectangle target objects. If this parameter is not passed in, all nodes in the current graph are used by default.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
moveToCenter(nodes?: (RGNode | RGRectTarget)[]): void;
|
|
30
|
+
/**
|
|
31
|
+
* relation-graph internal call, please do not use externally
|
|
32
|
+
* @inner
|
|
33
|
+
*/
|
|
34
|
+
transToLinker(newValue?: boolean): void;
|
|
35
|
+
/**
|
|
36
|
+
* Set the root node ID of the graph
|
|
37
|
+
* - After setting the root node, it only affects the layout starting point when calling the graphInstance.doLayout() method subsequently.
|
|
38
|
+
* @param rootNodeId The specified root node ID
|
|
39
|
+
*/
|
|
40
|
+
setRootNodeId(rootNodeId: string): void;
|
|
41
|
+
/**
|
|
42
|
+
* Get the root node object set in the current graph
|
|
43
|
+
*/
|
|
44
|
+
getRootNode(): RGNode | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Get the currently selected node object in the graph
|
|
47
|
+
*/
|
|
48
|
+
getCheckedNode(): RGNode | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Get the currently selected line object in the graph
|
|
51
|
+
*/
|
|
52
|
+
getCheckedLine(): import('../../types').RGFakeLine | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Get all selected nodes in the graph
|
|
55
|
+
*/
|
|
56
|
+
getSelectedNodes(): RGNode[];
|
|
57
|
+
/**
|
|
58
|
+
* Get all editing nodes in the graph
|
|
59
|
+
*/
|
|
60
|
+
getEditingNodes(): RGNode[];
|
|
61
|
+
/**
|
|
62
|
+
* Set the entire data of the graph, and perform layout based on the rootId in the data
|
|
63
|
+
* - Use options.layout as the layout options
|
|
64
|
+
* @param jsonData
|
|
65
|
+
*/
|
|
66
|
+
setJsonData(jsonData: RGJsonData): Promise<void>;
|
|
67
|
+
/**
|
|
68
|
+
* Append data to the graph
|
|
69
|
+
* @param jsonData
|
|
70
|
+
* @param isRelayout Whether to re-layout after appending data
|
|
71
|
+
*/
|
|
72
|
+
appendJsonData(jsonData: RGJsonData, isRelayout?: boolean): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* Apply initial data to the graph, centering and zooming to fit
|
|
75
|
+
* @param initialData
|
|
76
|
+
*/
|
|
77
|
+
applyInitialData(initialData: RGJsonData): Promise<void>;
|
|
78
|
+
/**
|
|
79
|
+
* Get all nodes and lines json data in the current graph.
|
|
80
|
+
* @param graphJsonData: RGJsonData
|
|
81
|
+
*/
|
|
82
|
+
getGraphJsonData(): RGJsonData;
|
|
83
|
+
/**
|
|
84
|
+
* Convert an RGNode object to a JSON-serializable object
|
|
85
|
+
* @param nodeJson: JsonNode
|
|
86
|
+
*/
|
|
87
|
+
transRGNodeToJsonObject(node: RGNode): JsonNode;
|
|
88
|
+
/**
|
|
89
|
+
* Convert an RGLink object to a JSON-serializable object
|
|
90
|
+
* @param lines: JsonLine
|
|
91
|
+
*/
|
|
92
|
+
transRGLinkToJsonObject(link: RGLink): JsonLine;
|
|
93
|
+
/**
|
|
94
|
+
* Convert an RGLine object to a JSON-serializable object
|
|
95
|
+
* @param lineJson: JsonLine
|
|
96
|
+
*/
|
|
97
|
+
transRGLineToJsonObject(line: RGLine): JsonLine;
|
|
98
|
+
/**
|
|
99
|
+
* Get the configuration information of the current graph
|
|
100
|
+
*/
|
|
101
|
+
getGraphJsonOptions(): {};
|
|
102
|
+
/**
|
|
103
|
+
* Clear the current graph data
|
|
104
|
+
* - Including:
|
|
105
|
+
* - All node data
|
|
106
|
+
* - All line data
|
|
107
|
+
* - All fake line data
|
|
108
|
+
* - Reset root node ID
|
|
109
|
+
* - Reset selected elements
|
|
110
|
+
* - Reset editing elements
|
|
111
|
+
*/
|
|
112
|
+
clearGraph(): void;
|
|
113
|
+
/**
|
|
114
|
+
* Print the current graph configuration information to the console
|
|
115
|
+
*/
|
|
116
|
+
printOptions(): void;
|
|
117
|
+
/**
|
|
118
|
+
* Print all data of the current graph to the console
|
|
119
|
+
*/
|
|
120
|
+
printData(): void;
|
|
121
|
+
/**
|
|
122
|
+
* Print the current graph configuration and JSON data to the console
|
|
123
|
+
*/
|
|
124
|
+
printGraphJsonData(): void;
|
|
125
|
+
}
|