@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
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { RGNode, RGLine, RGFakeLine, RGConnectTarget4NodePoint, RGCoordinate } from '../../types';
|
|
2
|
+
import { RGDataDefine } from './RGDataDefine';
|
|
3
|
+
/**
|
|
4
|
+
* 数据提供者
|
|
5
|
+
* 专门负责数据的增删改查,并自动触发视图更新
|
|
6
|
+
*/
|
|
7
|
+
export declare class RGDataGetter extends RGDataDefine {
|
|
8
|
+
constructor();
|
|
9
|
+
getOptions(): import('../../types').RGOptionsFull;
|
|
10
|
+
/**
|
|
11
|
+
* Get the node object by node id
|
|
12
|
+
* @param nodeId: RGNode
|
|
13
|
+
*/
|
|
14
|
+
getNodeById(nodeId: string): RGNode | undefined;
|
|
15
|
+
getLineById(lineId: string): RGLine | undefined;
|
|
16
|
+
getLinkByLineId(lineId: string): import('../../types').RGLink | undefined;
|
|
17
|
+
getFakeLineById(lineId: string): RGFakeLine | undefined;
|
|
18
|
+
getNodes(): RGNode[];
|
|
19
|
+
getLinks(): import('../../types').RGLink[];
|
|
20
|
+
getFakeLines(): RGFakeLine[];
|
|
21
|
+
getLines(): RGLine[];
|
|
22
|
+
getRootNode(): RGNode | undefined;
|
|
23
|
+
getShouldRenderNodes(): RGNode[];
|
|
24
|
+
getShouldRenderLines(): RGLine[];
|
|
25
|
+
getShouldRenderFakeLines(): RGFakeLine[];
|
|
26
|
+
isPerformanceMode(): boolean;
|
|
27
|
+
getCanvasScale(): number;
|
|
28
|
+
getConnectTargets(): RGConnectTarget4NodePoint[];
|
|
29
|
+
getConnectTargetById(targetId: string): RGConnectTarget4NodePoint | undefined;
|
|
30
|
+
getElLineTargets(): import('../../types').RGLineTarget[];
|
|
31
|
+
getElLineTargetById(elId: string): import('../../types').RGLineTarget | undefined;
|
|
32
|
+
calcShouldRenderNodes(): RGNode[];
|
|
33
|
+
calcShouldRenderLines(): RGLine[];
|
|
34
|
+
calcShouldRenderFakeLines(): RGFakeLine[];
|
|
35
|
+
findNodeByXy(xy: RGCoordinate): RGNode | null;
|
|
36
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { RGNode, RGLine, RGOptionsFull, JsonLine, RGConnectTarget4NodePoint, RGLineTarget } from '../../types';
|
|
2
|
+
import { RGDataGetter } from './RGDataGetter';
|
|
3
|
+
export type DataCommits = {
|
|
4
|
+
optionsChanged: boolean;
|
|
5
|
+
changedNodes: string[];
|
|
6
|
+
nodesListChanged: boolean;
|
|
7
|
+
changedLines: string[];
|
|
8
|
+
linesListChanged: boolean;
|
|
9
|
+
changedFakeLines: string[];
|
|
10
|
+
fakeLinesListChanged: boolean;
|
|
11
|
+
changedConnectTargets: string[];
|
|
12
|
+
connectTargetsListChanged: boolean;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* 数据提供者
|
|
16
|
+
* 专门负责数据的增删改查,并自动触发视图更新
|
|
17
|
+
*/
|
|
18
|
+
export declare class RGDataProvider extends RGDataGetter {
|
|
19
|
+
private commits;
|
|
20
|
+
constructor();
|
|
21
|
+
/**
|
|
22
|
+
* Clear all data in RelationGraph, including nodes, lines, element lines, and the root node
|
|
23
|
+
*/
|
|
24
|
+
clearReactiveData(): void;
|
|
25
|
+
/**
|
|
26
|
+
* Protected method, For react only
|
|
27
|
+
*/
|
|
28
|
+
updateViewHook: (commits: DataCommits) => void;
|
|
29
|
+
private resetCommints;
|
|
30
|
+
private commitLine;
|
|
31
|
+
private commitNode;
|
|
32
|
+
private commitFakeLine;
|
|
33
|
+
private commitConnectTarget;
|
|
34
|
+
dataUpdated(): void;
|
|
35
|
+
updateOptions(options: Partial<RGOptionsFull>): void;
|
|
36
|
+
clearChecked(): void;
|
|
37
|
+
setCanvasOffset(x: number, y: number): void;
|
|
38
|
+
setCanvasZoom(newValue: number): void;
|
|
39
|
+
setEditingLine(line: RGLine | null): void;
|
|
40
|
+
setEditingNodes(nodes: RGNode[]): void;
|
|
41
|
+
setCanvasCenter(x: number, y: number): void;
|
|
42
|
+
removeNodeById(nodeIds: string[]): void;
|
|
43
|
+
removeLineByIds(lineIds: string[]): void;
|
|
44
|
+
removeFakeLineByIds(lineIds: string[]): void;
|
|
45
|
+
removeLinkByLineIds(lineIds: string[]): void;
|
|
46
|
+
removeConnectTarget(targetId: string): void;
|
|
47
|
+
private updateLinks;
|
|
48
|
+
private beforeNodeBeRemove;
|
|
49
|
+
addFakeLines(lines: JsonLine[]): void;
|
|
50
|
+
clearFakeLines(): void;
|
|
51
|
+
addNodes(newNodes: RGNode[]): void;
|
|
52
|
+
addLines(newLines: RGLine[]): void;
|
|
53
|
+
updateNode(nodeId: string, nodeProperties: Partial<RGNode>): void;
|
|
54
|
+
updateNodeData(nodeId: string, nodeData: Record<string, any>): void;
|
|
55
|
+
updateLine(lineId: string, lineProperties: Partial<RGLine>): void;
|
|
56
|
+
updateLineData(lineId: string, lineData: Record<string, any>): void;
|
|
57
|
+
updateFakeLine(lineId: string, lineProperties: Partial<RGLine>): void;
|
|
58
|
+
updateConnectTarget(connectTargetId: string, connectTargetProperties: Partial<RGConnectTarget4NodePoint>): void;
|
|
59
|
+
updateElLineTarget(elId: string, targetProperties: Partial<RGLineTarget>): void;
|
|
60
|
+
updateNodesVisibleProperty(nodes?: RGNode[]): void;
|
|
61
|
+
private calcLinkVisibility;
|
|
62
|
+
updateShouldRenderGraphData(): void;
|
|
63
|
+
addConnectTarget(newConnectTarget: RGConnectTarget4NodePoint): RGConnectTarget4NodePoint | undefined;
|
|
64
|
+
addElLineTarget(elementTarget: RGLineTarget): void;
|
|
65
|
+
setRootNodeId(rootNodeId: string): void;
|
|
66
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactiveDataStores } from '../../types';
|
|
2
|
+
import { RGDataProvider } from './RGDataProvider';
|
|
3
|
+
/**
|
|
4
|
+
* 数据提供者
|
|
5
|
+
* 专门负责数据的增删改查,并自动触发视图更新
|
|
6
|
+
*/
|
|
7
|
+
export declare class RGDataProvider4React extends RGDataProvider {
|
|
8
|
+
constructor(dataStores: ReactiveDataStores, updateViewHook: () => void);
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactiveDataStores, ReactiveDataUpdaters } from '../../types';
|
|
2
|
+
import { RGDataProvider } from './RGDataProvider';
|
|
3
|
+
/**
|
|
4
|
+
* 数据提供者
|
|
5
|
+
* 专门负责数据的增删改查,并自动触发视图更新
|
|
6
|
+
*/
|
|
7
|
+
export declare class RGDataProvider4Svelte extends RGDataProvider {
|
|
8
|
+
dataStores: ReactiveDataStores;
|
|
9
|
+
constructor(dataStores: ReactiveDataStores, updaters: ReactiveDataUpdaters);
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RGGraphData, RGOptions } from '../../types';
|
|
2
|
+
import { RGDataProvider } from './RGDataProvider';
|
|
3
|
+
/**
|
|
4
|
+
* 数据提供者
|
|
5
|
+
* 专门负责数据的增删改查,并自动触发视图更新
|
|
6
|
+
*/
|
|
7
|
+
export declare class RGDataProvider4Vue2 extends RGDataProvider {
|
|
8
|
+
constructor(graphData: RGGraphData, graphOptions: RGOptions, runtimeData: any);
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RGGraphData, RGOptions, ReactiveDataStores } from '../../types';
|
|
2
|
+
import { RGDataProvider } from './RGDataProvider';
|
|
3
|
+
/**
|
|
4
|
+
* 数据提供者
|
|
5
|
+
* 专门负责数据的增删改查,并自动触发视图更新
|
|
6
|
+
*/
|
|
7
|
+
export declare class RGDataProvider4Vue3 extends RGDataProvider {
|
|
8
|
+
dataStores: ReactiveDataStores;
|
|
9
|
+
constructor(dataStores: ReactiveDataStores, graphData: RGGraphData, graphOptions: RGOptions, runtimeData: any);
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RGGraphData, RGOptions, ReactiveDataStores } from '../../types';
|
|
2
|
+
import { RGDataProvider } from './RGDataProvider';
|
|
3
|
+
/**
|
|
4
|
+
* 数据提供者
|
|
5
|
+
* 专门负责数据的增删改查,并自动触发视图更新
|
|
6
|
+
*/
|
|
7
|
+
export declare class RGDataProvider4Vue3 extends RGDataProvider {
|
|
8
|
+
dataStores: ReactiveDataStores;
|
|
9
|
+
constructor(dataStores: ReactiveDataStores, graphData: RGGraphData, graphOptions: RGOptions, runtimeData: any);
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { JsonLine, RGLine, RGLink, RGOptions } from '../../types';
|
|
2
|
+
export declare const json2Line: (originData: JsonLine, options: RGOptions) => RGLine;
|
|
3
|
+
export declare const transLineToJson: (line: RGLine) => JsonLine | undefined;
|
|
4
|
+
export declare const transLinkToJson: (link: RGLink) => JsonLine | undefined;
|
|
5
|
+
declare const _default: {
|
|
6
|
+
json2Line: (originData: JsonLine, options: Partial<import('../../types').RGOptionsInited>) => RGLine;
|
|
7
|
+
transLinkToJson: (link: RGLink) => JsonLine | undefined;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { JsonNode, RGNode, RGOptions } from '../../types';
|
|
2
|
+
export declare const newNodeTemplate: {
|
|
3
|
+
id: string;
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
text: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const json2Node: (originData: JsonNode, graphOptions?: RGOptions) => RGNode;
|
|
9
|
+
export declare const transNodeToJson: (node: RGNode) => JsonNode | undefined;
|
|
10
|
+
declare const _default: {
|
|
11
|
+
json2Node: (originData: JsonNode, graphOptions?: Partial<import('../../types').RGOptionsInited> | undefined) => RGNode;
|
|
12
|
+
transNodeToJson: (node: RGNode) => JsonNode | undefined;
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RGLayoutOptions, RGOptions, RGOptionsFull } from '../../types';
|
|
2
|
+
export declare const createDefaultConfig: (userOptions?: RGOptions) => RGOptionsFull;
|
|
3
|
+
export declare const applyDefaultOptionsByLayout: (thisLayout: RGLayoutOptions, _options: RGOptionsFull) => void;
|
|
4
|
+
export declare const appendDefaultOptions4Layout: (layoutOptions: RGLayoutOptions) => void;
|
|
5
|
+
declare const _default: {
|
|
6
|
+
createDefaultConfig: (userOptions?: Partial<import('../../types').RGOptionsInited>) => RGOptionsFull;
|
|
7
|
+
applyDefaultOptionsByLayout: (thisLayout: RGLayoutOptions, _options: RGOptionsFull) => void;
|
|
8
|
+
};
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { CalcNode, RelationGraphInstance, RGLayout, RGLayoutOptions, RGLink, RGNode, RGOptionsFull } from '../../types';
|
|
2
|
+
import { BasicNetworkAnalyzer } from './analyzers/BasicNetworkAnalyzer';
|
|
3
|
+
export declare abstract class RGBaseLayout implements RGLayout {
|
|
4
|
+
graphOptions: RGOptionsFull;
|
|
5
|
+
layoutOptions: RGLayoutOptions;
|
|
6
|
+
graphInstance: RelationGraphInstance;
|
|
7
|
+
networkAnalyzer: BasicNetworkAnalyzer;
|
|
8
|
+
allNodes: RGNode[];
|
|
9
|
+
isMainLayouer: boolean;
|
|
10
|
+
requireLinks: boolean;
|
|
11
|
+
allLinks: RGLink[];
|
|
12
|
+
constructor(layoutOptions: RGLayoutOptions, graphOptions: RGOptionsFull, graphInstance: RelationGraphInstance);
|
|
13
|
+
rootNode: RGNode | undefined;
|
|
14
|
+
setLinks(links: RGLink[]): void;
|
|
15
|
+
abstract placeNodes(allNodes: RGNode[], rootNode?: RGNode): void;
|
|
16
|
+
protected generateCalcNodes<CustomCalcNode extends CalcNode>(groupNodes: RGNode[]): {
|
|
17
|
+
calcNodes: CustomCalcNode[];
|
|
18
|
+
calcNodeMap: Map<string, CustomCalcNode>;
|
|
19
|
+
};
|
|
20
|
+
protected generateLevels(groupNodes: RGNode[]): {
|
|
21
|
+
levels: number[];
|
|
22
|
+
levelNodesMap: Map<number, RGNode[]>;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* 修正一排/一列重叠的节点坐标, 并保持固定间距
|
|
26
|
+
* * @param levelNodes 要处理的节点数组。
|
|
27
|
+
* 函数假定此数组的 *顺序* 已经是您期望的布局顺序。
|
|
28
|
+
* @param direction 布局方向 (left, right, top, bottom)
|
|
29
|
+
* @param gap 节点之间的间距
|
|
30
|
+
* @returns 返回一个 *新的* 数组, 包含修正了坐标的节点
|
|
31
|
+
*/
|
|
32
|
+
protected adjustNodePositions(levelNodes: CalcNode[], direction: 'left' | 'right' | 'top' | 'bottom', gap: number): CalcNode[];
|
|
33
|
+
getReverseAlignItems(alignItems: 'start' | 'center' | 'end'): 'start' | 'center' | 'end';
|
|
34
|
+
updateNodePosition(node: RGNode | string, x: number, y: number): void;
|
|
35
|
+
layoutEnd(): void;
|
|
36
|
+
}
|
|
37
|
+
export default RGBaseLayout;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as RGForceLayout } from './RGForceLayout';
|
|
2
|
+
import { RelationGraphInstance, RGCenterLayoutOptions, RGLayoutOptions, RGNode, RGOptionsFull } from '../../types';
|
|
3
|
+
export declare class RGCenterLayout extends RGForceLayout {
|
|
4
|
+
layoutOptions: RGCenterLayoutOptions;
|
|
5
|
+
constructor(layoutOptions: RGLayoutOptions, graphOptions: RGOptionsFull, graphInstance: RelationGraphInstance);
|
|
6
|
+
placeNodes(allNodes: RGNode[], rootNode?: RGNode): void;
|
|
7
|
+
private getLevelDistanceArr;
|
|
8
|
+
}
|
|
9
|
+
export default RGCenterLayout;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as RGForceLayout } from './RGForceLayout';
|
|
2
|
+
import { RelationGraphInstance, RGLayoutOptions, RGNode, RGOptionsFull } from '../../types';
|
|
3
|
+
export declare class RGCircleLayout extends RGForceLayout {
|
|
4
|
+
constructor(layoutOptions: RGLayoutOptions, graphOptions: RGOptionsFull, graphInstance: RelationGraphInstance);
|
|
5
|
+
placeNodes(allNodes: RGNode[], rootNode?: RGNode): void;
|
|
6
|
+
}
|
|
7
|
+
export default RGCircleLayout;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as RGBaseLayout } from './RGBaseLayout';
|
|
2
|
+
import { RelationGraphInstance, RGLayoutOptions, RGNode, RGOptionsFull } from '../../types';
|
|
3
|
+
export declare class RGFixedLayout extends RGBaseLayout {
|
|
4
|
+
constructor(layoutOptions: RGLayoutOptions, graphOptions: RGOptionsFull, graphInstance: RelationGraphInstance);
|
|
5
|
+
graphOptions: RGOptionsFull;
|
|
6
|
+
layoutOptions: RGLayoutOptions;
|
|
7
|
+
allNodes: never[];
|
|
8
|
+
placeNodes(allNodes: RGNode[], rootNode?: RGNode): void;
|
|
9
|
+
}
|
|
10
|
+
export default RGFixedLayout;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as RGBaseLayout } from './RGBaseLayout';
|
|
2
|
+
import { RelationGraphInstance, RGNode, RGOptionsFull, RGTreeLayoutOptions } from '../../types';
|
|
3
|
+
import { NodesAnalyticResult } from './analyzers/RGNetworkAnalyzer';
|
|
4
|
+
export declare class RGFolderLayout extends RGBaseLayout {
|
|
5
|
+
constructor(layoutOptions: RGTreeLayoutOptions, graphOptions: RGOptionsFull, graphInstance: RelationGraphInstance);
|
|
6
|
+
enableGatherNodes: boolean;
|
|
7
|
+
layoutOptions: RGTreeLayoutOptions;
|
|
8
|
+
placeNodes(allNodes: RGNode[], rootNode: RGNode): void;
|
|
9
|
+
placeRelativePosition(rootNode: RGNode, groupNodes: RGNode[], analyticResult: NodesAnalyticResult): void;
|
|
10
|
+
gatherNodes(groupNodes: RGNode[], hv: 'h' | 'v', perSize: number): void;
|
|
11
|
+
getBloomingNearByParent(node: RGNode, parentNode: RGNode, levelNodes: RGNode[], hv: 'h' | 'v'): RGNode | undefined;
|
|
12
|
+
getLevelDistance(level: number, levelMaxWidthMap: Map<number, number>, defaultGap: number): number;
|
|
13
|
+
private getLevelGap;
|
|
14
|
+
}
|
|
15
|
+
export default RGFolderLayout;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { default as RGBaseLayout } from './RGBaseLayout';
|
|
2
|
+
import { CalcNode, RelationGraphInstance, RGEventNames, RGForceLayoutOptions, RGNode, RGOptionsFull } from '../../types';
|
|
3
|
+
import { NodesAnalyticResult } from './analyzers/RGNetworkAnalyzer';
|
|
4
|
+
type CalcNode4Force = CalcNode & {
|
|
5
|
+
Fx: number;
|
|
6
|
+
Fy: number;
|
|
7
|
+
dragging: boolean;
|
|
8
|
+
force_weight: number;
|
|
9
|
+
forceCenterOffset_X: number;
|
|
10
|
+
forceCenterOffset_Y: number;
|
|
11
|
+
fixed: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare class RGForceLayout extends RGBaseLayout {
|
|
14
|
+
layoutOptions: RGForceLayoutOptions;
|
|
15
|
+
fastStart: boolean;
|
|
16
|
+
skipInitLayout: boolean;
|
|
17
|
+
maxLayoutTimes: number;
|
|
18
|
+
byNode: boolean;
|
|
19
|
+
byLine: boolean;
|
|
20
|
+
lockX: boolean;
|
|
21
|
+
lockY: boolean;
|
|
22
|
+
force_node_repulsion: number;
|
|
23
|
+
force_line_elastic: number;
|
|
24
|
+
stopWhenBalanced: boolean;
|
|
25
|
+
instanceId: string;
|
|
26
|
+
constructor(layoutOptions: RGForceLayoutOptions, graphOptions: RGOptionsFull, graphInstance: RelationGraphInstance);
|
|
27
|
+
calcNodes: RGNode[];
|
|
28
|
+
placeNodes(calcNodes: RGNode[], rootNode?: RGNode): void;
|
|
29
|
+
protected getLevelR(levelDistanceArr: number[], level: number): number | undefined;
|
|
30
|
+
protected placeRelativePosition(rootNode: RGNode, groupNodes: RGNode[], analyticResult: NodesAnalyticResult, distance_coefficient: any, levelDistanceArr: any): void;
|
|
31
|
+
protected placeNodesInFanRegion(nodes: RGNode[], startDeg: number, endDeg: number, centerXy: {
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
|
+
}, level: number, parentStrength: number, levelDistanceArr: number[], deep: number, distanceCoefficient?: number): void;
|
|
35
|
+
protected graphEventHandle(eventName: RGEventNames, ...args: any[]): void;
|
|
36
|
+
protected _graphEventHandler: any;
|
|
37
|
+
protected connectToGraphInstance(): void;
|
|
38
|
+
protected disConnectToGraphInstance(): void;
|
|
39
|
+
layoutTimes: number;
|
|
40
|
+
prev10: number[];
|
|
41
|
+
visibleNodes: RGNode[];
|
|
42
|
+
updateVisibleNodes(allNode?: RGNode[]): void;
|
|
43
|
+
protected viewUpdate(): void;
|
|
44
|
+
autoLayout(forceLayout?: boolean): void;
|
|
45
|
+
protected _onFinishCallback: () => void;
|
|
46
|
+
onFinish(onFinishCallback: () => void): void;
|
|
47
|
+
_onTickCallback: () => void;
|
|
48
|
+
onTick(_onTickCallback: () => void): void;
|
|
49
|
+
applyFBuffToNodes(): void;
|
|
50
|
+
applyPositionToNodes(): void;
|
|
51
|
+
protected layoutFinished(): void;
|
|
52
|
+
protected resetCalcNodes(): void;
|
|
53
|
+
protected calcNodeMap: WeakMap<RGNode, CalcNode4Force>;
|
|
54
|
+
protected forCalcNodes: CalcNode4Force[];
|
|
55
|
+
protected recentGraphVelocity: number[];
|
|
56
|
+
protected graphVelocityBalancedValue: number;
|
|
57
|
+
start(): void;
|
|
58
|
+
doForceLayout(useTime: number): void;
|
|
59
|
+
private prevLogTime;
|
|
60
|
+
private animationFrameTimer;
|
|
61
|
+
private prevNodeLevel1Index;
|
|
62
|
+
private prevNodeLevel2Index;
|
|
63
|
+
calcNodesPosition(): boolean;
|
|
64
|
+
private stoped;
|
|
65
|
+
stop(): void;
|
|
66
|
+
addElasticByLine(node1: CalcNode4Force, node2: CalcNode4Force, force_elastic?: number): void;
|
|
67
|
+
maxTractionLength: number;
|
|
68
|
+
zeroForceLength: number;
|
|
69
|
+
maxRepulsionDistance: number;
|
|
70
|
+
nodeCollisionRadius: number;
|
|
71
|
+
maxMoveSpeed: number;
|
|
72
|
+
n2nMaxForce: number;
|
|
73
|
+
addGravityByNode(node1: CalcNode4Force, node2: CalcNode4Force, coefficient?: number): void;
|
|
74
|
+
addFtoNode(node: CalcNode4Force, x: number, y: number): void;
|
|
75
|
+
applyToNodePosition(node: CalcNode4Force): 0 | undefined;
|
|
76
|
+
}
|
|
77
|
+
export default RGForceLayout;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as RGBaseLayout } from './RGBaseLayout';
|
|
2
|
+
import { RelationGraphInstance, RGNode, RGOptionsFull, RGTreeLayoutOptions } from '../../types';
|
|
3
|
+
export declare class RGIOTreeLayout extends RGBaseLayout {
|
|
4
|
+
constructor(layoutOptions: RGTreeLayoutOptions, graphOptions: RGOptionsFull, graphInstance: RelationGraphInstance);
|
|
5
|
+
private rotate;
|
|
6
|
+
enableGatherNodes: boolean;
|
|
7
|
+
layoutOptions: RGTreeLayoutOptions;
|
|
8
|
+
placeNodes(allNodes: RGNode[], rootNode: RGNode): void;
|
|
9
|
+
placeNodesPosition(rootNode: RGNode, groupNodes: RGNode[]): void;
|
|
10
|
+
placeRelativePosition(rootNode: RGNode, _groupNodes: RGNode[]): void;
|
|
11
|
+
private buildNetwork;
|
|
12
|
+
private reduceNodeRect;
|
|
13
|
+
private placeNodeChildrenV;
|
|
14
|
+
private placeNodeChildrenH;
|
|
15
|
+
getLevelDistance(level: number, levelMaxSizeMap: Map<number, number>, defaultGap: number): number;
|
|
16
|
+
private getLevelGap;
|
|
17
|
+
}
|
|
18
|
+
export default RGIOTreeLayout;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as RGBaseLayout } from './RGBaseLayout';
|
|
2
|
+
import { RelationGraphInstance, RGNode, RGOptionsFull, RGTreeLayoutOptions } from '../../types';
|
|
3
|
+
export declare class RGSmartTreeLayout extends RGBaseLayout {
|
|
4
|
+
constructor(layoutOptions: RGTreeLayoutOptions, graphOptions: RGOptionsFull, graphInstance: RelationGraphInstance);
|
|
5
|
+
graphInstance: RelationGraphInstance;
|
|
6
|
+
layoutOptions: RGTreeLayoutOptions;
|
|
7
|
+
levelGaps: number[];
|
|
8
|
+
placeNodes(allNodes: RGNode[], rootNode: RGNode): void;
|
|
9
|
+
placeRelativePosition(rootNode: RGNode, groupNodes: RGNode[], max_strength: number): void;
|
|
10
|
+
applyNodesGap(groupNodes: RGNode[]): void;
|
|
11
|
+
getLevelDistance(level: number, levelMaxSizeMap: Map<number, number>, defaultGap: number): number;
|
|
12
|
+
private getLevelGap;
|
|
13
|
+
}
|
|
14
|
+
export default RGSmartTreeLayout;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as RGBaseLayout } from './RGBaseLayout';
|
|
2
|
+
import { RelationGraphInstance, RGNode, RGOptionsFull, RGTreeLayoutOptions } from '../../types';
|
|
3
|
+
import { NodesAnalyticResult } from './analyzers/RGNetworkAnalyzer';
|
|
4
|
+
export declare class RGTreeLayout extends RGBaseLayout {
|
|
5
|
+
constructor(layoutOptions: RGTreeLayoutOptions, graphOptions: RGOptionsFull, graphInstance: RelationGraphInstance);
|
|
6
|
+
enableGatherNodes: boolean;
|
|
7
|
+
layoutOptions: RGTreeLayoutOptions;
|
|
8
|
+
placeNodes(allNodes: RGNode[], rootNode: RGNode): void;
|
|
9
|
+
placeNodesPosition(rootNode: RGNode, groupNodes: RGNode[], analyticResult: NodesAnalyticResult): void;
|
|
10
|
+
placeRelativePosition(rootNode: RGNode, groupNodes: RGNode[], analyticResult: NodesAnalyticResult): void;
|
|
11
|
+
getLevelDistance(level: number, levelMaxSizeMap: Map<number, number>, defaultGap: number): number;
|
|
12
|
+
private getLevelGap;
|
|
13
|
+
applyNodesGap(groupNodes: RGNode[], hv: 'h' | 'v'): void;
|
|
14
|
+
gatherNodes(groupNodes: RGNode[], hv: 'h' | 'v', perSize: number): void;
|
|
15
|
+
getBloomingNearByParent(node: RGNode, parentNode: RGNode, levelNodes: RGNode[], hv: 'h' | 'v'): RGNode | undefined;
|
|
16
|
+
}
|
|
17
|
+
export default RGTreeLayout;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { NodesAnalyticResult, RGLevelDirection, RGNetworkAnalyzer } from './RGNetworkAnalyzer';
|
|
2
|
+
import { RelationGraphInstance, RGNode } from '../../../types';
|
|
3
|
+
export declare class BasicNetworkAnalyzer implements RGNetworkAnalyzer {
|
|
4
|
+
graphInstance: RelationGraphInstance;
|
|
5
|
+
private initialized;
|
|
6
|
+
constructor(graphInstance: RelationGraphInstance);
|
|
7
|
+
analyzeNetwork(nodes: RGNode[], rootNode: RGNode, bothWay?: boolean, deepBothWay?: boolean): {
|
|
8
|
+
tree: {
|
|
9
|
+
networkNodes: RGNode[];
|
|
10
|
+
analyticResult: NodesAnalyticResult;
|
|
11
|
+
};
|
|
12
|
+
reverseTree: {
|
|
13
|
+
networkNodes: never[];
|
|
14
|
+
analyticResult: NodesAnalyticResult;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
protected markNodeParent(rootNode: RGNode): {
|
|
18
|
+
networkNodes: RGNode[];
|
|
19
|
+
};
|
|
20
|
+
private _markNodeParent;
|
|
21
|
+
private expandLevelNodesWithDirection;
|
|
22
|
+
private _appendNodeChildrenToNextLevelNodes;
|
|
23
|
+
private calcStrengthWithChildsValue;
|
|
24
|
+
calcStrengthFromValue(rootNode: RGNode, deepFindDirect?: RGLevelDirection): void;
|
|
25
|
+
private _calcStrengthFromValue;
|
|
26
|
+
conductStrengthToParents(node: RGNode): void;
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { RGNode } from '../../../types';
|
|
2
|
+
export type NodesAnalyticLevel = {
|
|
3
|
+
level: number;
|
|
4
|
+
all_size: number;
|
|
5
|
+
all_strength: number;
|
|
6
|
+
};
|
|
7
|
+
export type NodesAnalyticResult = {
|
|
8
|
+
direct: number;
|
|
9
|
+
max_deep: number;
|
|
10
|
+
min_deep: number;
|
|
11
|
+
max_length: number;
|
|
12
|
+
max_strength: number;
|
|
13
|
+
levels: Map<number, NodesAnalyticLevel>;
|
|
14
|
+
};
|
|
15
|
+
export type RGLevelDirection = -1 | 0 | 1;
|
|
16
|
+
export interface RGNetworkAnalyzer {
|
|
17
|
+
analyzeNetwork(nodes: RGNode[], rootNode: RGNode, bothWay?: boolean, deepBothWay?: boolean): {
|
|
18
|
+
tree: {
|
|
19
|
+
networkNodes: RGNode[];
|
|
20
|
+
analyticResult: NodesAnalyticResult;
|
|
21
|
+
};
|
|
22
|
+
reverseTree: {
|
|
23
|
+
networkNodes: RGNode[];
|
|
24
|
+
analyticResult: NodesAnalyticResult;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
}
|
|
@@ -1,32 +1,40 @@
|
|
|
1
|
-
import { RGEventEmitHook, RGEventHandler, RGEventNames, RGListeners,
|
|
1
|
+
import { RGEventEmitHook, RGEventHandler, RGEventNames, RGListeners, RGOptionsFull } from '../../types';
|
|
2
|
+
import { RGDataProvider } from '../data/RGDataProvider';
|
|
3
|
+
/**
|
|
4
|
+
* relation-graph component base class, providing common API methods
|
|
5
|
+
*/
|
|
2
6
|
export declare class RelationGraphBase {
|
|
3
|
-
options: RGOptionsFull;
|
|
4
7
|
listeners: RGListeners;
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
private useReactiveDataToAutoUpdateView;
|
|
9
|
+
protected instanceId: string;
|
|
10
|
+
dataProvider: RGDataProvider;
|
|
11
|
+
options: RGOptionsFull;
|
|
12
|
+
constructor();
|
|
13
|
+
/**
|
|
14
|
+
* Generate a highly likely unique id, the probability of non-duplication depends on the parameter idLength (the length of the id)
|
|
15
|
+
* @param idLength The length of the id, default is 5
|
|
16
|
+
*/
|
|
17
|
+
generateNewUUID(idLength?: number): string;
|
|
7
18
|
/**
|
|
8
19
|
* * Enable or disable logging functionality
|
|
9
20
|
* @param enable
|
|
10
21
|
*/
|
|
11
22
|
enableDebugLog(enable: boolean): void;
|
|
12
23
|
/**
|
|
13
|
-
*
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* * Used to trigger the external function for updating the view (currently only for React)
|
|
18
|
-
* @param hook
|
|
24
|
+
* Request view update
|
|
25
|
+
* Used to update canvas drawing, subsequent canvas drawing will be upgraded to use WebGL to improve performance
|
|
26
|
+
* @protected
|
|
19
27
|
*/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
protected _dataUpdatingNext: boolean;
|
|
28
|
+
protected _dataUpdated(): void;
|
|
29
|
+
private _dataUpdatedRequested;
|
|
23
30
|
/**
|
|
24
|
-
*
|
|
31
|
+
* @inner
|
|
32
|
+
* Reuqest Trigger view update
|
|
25
33
|
* @private
|
|
26
34
|
*/
|
|
27
|
-
protected
|
|
35
|
+
protected _requestDataUpdate(): void;
|
|
28
36
|
/**
|
|
29
|
-
* Trigger view update
|
|
37
|
+
* Trigger view update for React/Svelte/Canvas
|
|
30
38
|
* @private
|
|
31
39
|
*/
|
|
32
40
|
private _doSomethingAfterDataUpdated;
|
|
@@ -52,7 +60,7 @@ export declare class RelationGraphBase {
|
|
|
52
60
|
* @param eventName Name of the event
|
|
53
61
|
* @param object Parameters passed to the event handler
|
|
54
62
|
*/
|
|
55
|
-
emitEvent(eventName: RGEventNames, ...args: any[]):
|
|
63
|
+
protected emitEvent(eventName: RGEventNames, ...args: any[]): import('../../types').RGCoordinate | undefined;
|
|
56
64
|
/**
|
|
57
65
|
* Protected Method to trigger the default event handler, i.e., trigger the events set in jsx
|
|
58
66
|
* @param eventName
|
|
@@ -60,8 +68,13 @@ export declare class RelationGraphBase {
|
|
|
60
68
|
* @protected
|
|
61
69
|
*/
|
|
62
70
|
protected defaultEventHandler(eventName: RGEventNames, ...args: any[]): {
|
|
63
|
-
result:
|
|
71
|
+
result: void | import('../../types').RGCoordinate;
|
|
64
72
|
handled: boolean;
|
|
65
73
|
};
|
|
74
|
+
/**
|
|
75
|
+
* * Set event listeners
|
|
76
|
+
* @param handler
|
|
77
|
+
* @inner
|
|
78
|
+
*/
|
|
66
79
|
setEventListener(handler: RGListeners): void;
|
|
67
80
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { RGListeners } from '../../types';
|
|
2
|
+
import { RelationGraphWith99API } from './RelationGraphWith99API';
|
|
3
|
+
/**
|
|
4
|
+
* The final instance class of the relation-graph component, the class that is actually instantiated
|
|
5
|
+
* - Each <RGProvider><RelationGraph /></RGProvider> component creates and binds a RelationGraphCore instance, which allows the component UI and user to call the API for data logic and interaction
|
|
6
|
+
* - It will have all the capabilities of the following classes through integration:
|
|
7
|
+
* - RelationGraphBase.ts
|
|
8
|
+
* - RelationGraphWith1View.ts
|
|
9
|
+
* - RelationGraphWith2Data.ts
|
|
10
|
+
* - RelationGraphWith2Data1Getter.ts
|
|
11
|
+
* - RelationGraphWith2Data2Analysis.ts
|
|
12
|
+
* - RelationGraphWith2Data3Update.ts
|
|
13
|
+
* - RelationGraphWith2Data4ConnectTarget.ts
|
|
14
|
+
* - RelationGraphWith2Data5LineConfig.ts
|
|
15
|
+
* - RelationGraphWith3Options1Update.ts
|
|
16
|
+
* - RelationGraphWith3Options2API.ts
|
|
17
|
+
* - RelationGraphWith4Line.ts
|
|
18
|
+
* - RelationGraphWith5Zoom.ts
|
|
19
|
+
* - RelationGraphWith6Effect.ts
|
|
20
|
+
* - RelationGraphWith6Layout.ts
|
|
21
|
+
* - RelationGraphWith7Event.ts
|
|
22
|
+
* - RelationGraphWith9EasyView.ts
|
|
23
|
+
* - RelationGraphWith91Editing.ts
|
|
24
|
+
* - RelationGraphWith92MiniView.ts
|
|
25
|
+
* - RelationGraphWith93Image.ts
|
|
26
|
+
* - RelationGraphWith95Dom.ts
|
|
27
|
+
* - RelationGraphWith99API.ts
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
export declare class RelationGraphCore extends RelationGraphWith99API {
|
|
31
|
+
constructor();
|
|
32
|
+
setListeners(listeners: RGListeners): void;
|
|
33
|
+
/**
|
|
34
|
+
* [Used internally by relation-graph], this method will be called to initialize some configurations based on options (such as creating a layoutor based on the options.layout configuration), and to obtain information such as viewport size.
|
|
35
|
+
* @inner
|
|
36
|
+
*/
|
|
37
|
+
ready(): void;
|
|
38
|
+
/**
|
|
39
|
+
* @inner
|
|
40
|
+
*/
|
|
41
|
+
viewComponentUnmounted: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* @inner
|
|
44
|
+
*/
|
|
45
|
+
beforeUnmount(): void;
|
|
46
|
+
}
|