@relation-graph/vue3 3.0.4
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/LICENSE +21 -0
- package/package.json +65 -0
- package/relation-graph.js +284 -0
- package/relation-graph.mjs +9626 -0
- package/relation-graph.umd.js +284 -0
- package/types/components.d.ts +5 -0
- package/types/packages/platforms/react/src/constants.d.ts +1 -0
- package/types/packages/platforms/react/src/index.d.ts +224 -0
- package/types/packages/platforms/react/src/relation-graph/RGProvider.d.ts +4 -0
- package/types/packages/platforms/react/src/relation-graph/RelationGraph.d.ts +9 -0
- package/types/packages/platforms/react/src/relation-graph/RelationLinker.d.ts +4 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGCanvas.d.ts +13 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGCanvasContent.d.ts +18 -0
- 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/RGEasyView.d.ts +4 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGFakeNode.d.ts +6 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGGraphRefs.d.ts +5 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGLineContent.d.ts +4 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGLinePath.d.ts +7 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGLinePeel.d.ts +6 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGLineText.d.ts +6 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGNodeExpandHolder.d.ts +4 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGNodePeel.d.ts +13 -0
- 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 +7 -0
- 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 +4 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/editing/RGConnectTarget.d.ts +4 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/editing/RGEditingConnectController.d.ts +3 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/editing/RGEditingConnectPoints.d.ts +7 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/editing/RGEditingLineController.d.ts +4 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/editing/RGEditingNearNodeWidget.d.ts +4 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/editing/RGEditingNodeController.d.ts +3 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/editing/RGEditingReferenceLine.d.ts +6 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/editing/RGEditingResize.d.ts +7 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/editing/RGMiniView.d.ts +4 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/slots/RGSlotOnCanvas.d.ts +3 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/slots/RGSlotOnCanvasAbove.d.ts +3 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/slots/RGSlotOnLine.d.ts +6 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/slots/RGSlotOnLineText.d.ts +6 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/slots/RGSlotOnNode.d.ts +6 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/slots/RGSlotOnNodeExpandHandle.d.ts +3 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/slots/RGSlotOnView.d.ts +3 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/store/index.d.ts +4 -0
- 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 +4 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/widgets/GraphLoading.d.ts +3 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/widgets/GraphMoveOperator.d.ts +3 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/widgets/GraphOperateStuff.d.ts +7 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/widgets/GraphToolBar.d.ts +4 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/widgets/GraphWatermark.d.ts +4 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/widgets/GraphXsToolBar.d.ts +4 -0
- 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/core4react/widgets/RGIcons.d.ts +6 -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 +30 -0
- package/types/packages/platforms/react/src/relation-graph/src/hooks/useFakeNodesState.d.ts +8 -0
- package/types/packages/platforms/react/src/relation-graph/src/hooks/useGraphInstance.d.ts +3 -0
- 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 +35 -0
- 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/RelationGraphWithProvider.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 +9 -0
- package/types/packages/platforms/vue2/src/core4vue/RGCanvasContent.vue.d.ts +10 -0
- 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 +7 -0
- package/types/packages/platforms/vue2/src/core4vue/RGFakeNode.vue.d.ts +18 -0
- package/types/packages/platforms/vue2/src/core4vue/RGGraphDefs.vue.d.ts +19 -0
- package/types/packages/platforms/vue2/src/core4vue/RGLineContent.vue.d.ts +23 -0
- package/types/packages/platforms/vue2/src/core4vue/RGLinePath.vue.d.ts +14 -0
- package/types/packages/platforms/vue2/src/core4vue/RGLinePeel.vue.d.ts +9 -0
- package/types/packages/platforms/vue2/src/core4vue/RGNodeExpandHolder.vue.d.ts +30 -0
- package/types/packages/platforms/vue2/src/core4vue/RGNodePeel.vue.d.ts +17 -0
- package/types/packages/platforms/vue2/src/core4vue/RGProvider.vue.d.ts +50 -0
- package/types/packages/platforms/vue2/src/core4vue/RelationGraph.vue.d.ts +52 -0
- package/types/packages/platforms/vue2/src/core4vue/RelationGraphUI.vue.d.ts +46 -0
- package/types/packages/platforms/vue2/src/core4vue/RelationLinker.vue.d.ts +46 -0
- package/types/packages/platforms/vue2/src/core4vue/RelationLinkerCanvas.vue.d.ts +12 -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 +31 -0
- package/types/packages/platforms/vue2/src/core4vue/editing/RGConnectTarget.vue.d.ts +85 -0
- package/types/packages/platforms/vue2/src/core4vue/editing/RGEditingConnectController.vue.d.ts +9 -0
- package/types/packages/platforms/vue2/src/core4vue/editing/RGEditingConnectPoints.vue.d.ts +25 -0
- package/types/packages/platforms/vue2/src/core4vue/editing/RGEditingLineController.vue.d.ts +43 -0
- package/types/packages/platforms/vue2/src/core4vue/editing/RGEditingNearNodeWidget.vue.d.ts +21 -0
- package/types/packages/platforms/vue2/src/core4vue/editing/RGEditingNodeController.vue.d.ts +5 -0
- package/types/packages/platforms/vue2/src/core4vue/editing/RGEditingReferenceLine.vue.d.ts +30 -0
- package/types/packages/platforms/vue2/src/core4vue/editing/RGEditingResize.vue.d.ts +32 -0
- package/types/packages/platforms/vue2/src/core4vue/editing/RGMiniView.vue.d.ts +40 -0
- package/types/packages/platforms/vue2/src/core4vue/widgets/GraphBackground.vue.d.ts +33 -0
- package/types/packages/platforms/vue2/src/core4vue/widgets/GraphLoading.vue.d.ts +5 -0
- package/types/packages/platforms/vue2/src/core4vue/widgets/GraphMoveOperator.vue.d.ts +8 -0
- package/types/packages/platforms/vue2/src/core4vue/widgets/GraphOperateStuff.vue.d.ts +5 -0
- package/types/packages/platforms/vue2/src/core4vue/widgets/GraphToolBar.vue.d.ts +46 -0
- package/types/packages/platforms/vue2/src/core4vue/widgets/GraphWatermark.vue.d.ts +58 -0
- package/types/packages/platforms/vue2/src/core4vue/widgets/GraphXsToolBar.vue.d.ts +46 -0
- 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 +944 -0
- package/types/packages/platforms/vue2/src/types-vue2.d.ts +3 -0
- package/types/packages/platforms/vue2/vite.config.d.ts +2 -0
- package/types/packages/platforms/vue3/src/constants.d.ts +3 -0
- package/types/packages/platforms/vue3/src/index.d.ts +188 -0
- package/types/packages/platforms/vue3/src/relation-graph/src/hooks/RGHooks.d.ts +32 -0
- 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 +2 -0
- 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 +122 -0
- package/types/packages/platforms/vue3/src/types.d.ts +3 -0
- package/types/packages/platforms/vue3/vite.config.d.ts +2 -0
- package/types/packages/relation-graph-models/RGObjectsForExport.d.ts +140 -0
- package/types/packages/relation-graph-models/constants.d.ts +1 -0
- 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 +17 -0
- package/types/packages/relation-graph-models/data/RGOptionsDataUtils.d.ts +7 -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 +82 -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 +28 -0
- package/types/packages/relation-graph-models/layouts/analyzers/RGNetworkAnalyzer.d.ts +27 -0
- package/types/packages/relation-graph-models/layouts/tmp/old.d.ts +1 -0
- package/types/packages/relation-graph-models/models/RelationGraphBase.d.ts +80 -0
- package/types/packages/relation-graph-models/models/RelationGraphCore.d.ts +46 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith1View.d.ts +96 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith2Data.d.ts +53 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith2Data1Getter.d.ts +85 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith2Data2Analysis.d.ts +177 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith2Data3Update.d.ts +259 -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 +112 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith5Zoom.d.ts +29 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith6Effect.d.ts +72 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith6Layout.d.ts +85 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith7Event.d.ts +270 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith91Editing.d.ts +210 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith92MiniView.d.ts +107 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith93Image.d.ts +38 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith93Image_codes.d.ts +36 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith95Dom.d.ts +112 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith99API.d.ts +125 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith9EasyView.d.ts +74 -0
- package/types/packages/relation-graph-models/utils/RGCanvasImpl2D.d.ts +58 -0
- package/types/packages/relation-graph-models/utils/RGCanvasImplWebGL.d.ts +47 -0
- package/types/packages/relation-graph-models/utils/RGCommon.d.ts +31 -0
- package/types/packages/relation-graph-models/utils/RGDragUtils.d.ts +20 -0
- package/types/packages/relation-graph-models/utils/RGFullscreenUtils.d.ts +3 -0
- package/types/packages/relation-graph-models/utils/RGGraphMath.d.ts +131 -0
- package/types/packages/relation-graph-models/utils/RGIconsData.d.ts +41 -0
- package/types/packages/relation-graph-models/utils/RGIntergration.d.ts +45 -0
- package/types/packages/relation-graph-models/utils/RGNodesAnalytic.d.ts +29 -0
- package/types/packages/relation-graph-models/utils/RGTips.d.ts +7 -0
- package/types/packages/relation-graph-models/utils/line/RGLinePath.d.ts +105 -0
- package/types/packages/relation-graph-models/utils/line/RGLinePathUtils.d.ts +54 -0
- package/types/packages/relation-graph-models/utils/line/RGPathGeneratorFor1.d.ts +2 -0
- package/types/packages/relation-graph-models/utils/line/RGPathGeneratorFor4.d.ts +2 -0
- package/types/packages/relation-graph-models/utils/line/RGPathGeneratorFor44.d.ts +2 -0
- package/types/packages/relation-graph-models/utils/line/RGPathGeneratorFor49.d.ts +2 -0
- package/types/packages/relation-graph-models/utils/line/RGPathGeneratorFor6.d.ts +6 -0
- package/types/packages/relation-graph-models/utils/line/RGPathGeneratorFor8.d.ts +2 -0
- package/types/packages/relation-graph-models/utils/line/RGPathGeneratorForCurve.d.ts +2 -0
- package/types/packages/types.d.ts +1467 -0
- package/types/packages/types.ts +1480 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { RGLine, RGLink, RGNode, RGNodeShape, RGUserEvent } from '../../types';
|
|
2
|
+
import { RelationGraphWith91Editing } from './RelationGraphWith91Editing';
|
|
3
|
+
/**
|
|
4
|
+
* Functionality related to the mini view(<RGMiniView />) in the relation-graph component
|
|
5
|
+
*/
|
|
6
|
+
export declare class RelationGraphWith92MiniView extends RelationGraphWith91Editing {
|
|
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
|
+
*/
|
|
15
|
+
setMiniViewCanvas(canvas: HTMLCanvasElement): void;
|
|
16
|
+
/**
|
|
17
|
+
* relation-graph internal call, please do not use externally
|
|
18
|
+
* @inner
|
|
19
|
+
*/
|
|
20
|
+
updateMiniView(): void;
|
|
21
|
+
/**
|
|
22
|
+
* @private
|
|
23
|
+
* @inner
|
|
24
|
+
*/
|
|
25
|
+
private _updateMiniView;
|
|
26
|
+
private _canvasDomScale;
|
|
27
|
+
/**
|
|
28
|
+
* @private
|
|
29
|
+
* @inner
|
|
30
|
+
*/
|
|
31
|
+
protected mvDosomethingBeforeDraw(): void;
|
|
32
|
+
/**
|
|
33
|
+
* @private
|
|
34
|
+
* @inner
|
|
35
|
+
*/
|
|
36
|
+
private updateMiniViewVisibleArea;
|
|
37
|
+
protected miniViewBox: {
|
|
38
|
+
visibleAreaStart: {
|
|
39
|
+
x: number;
|
|
40
|
+
y: number;
|
|
41
|
+
};
|
|
42
|
+
visibleAreaEnd: {
|
|
43
|
+
x: number;
|
|
44
|
+
y: number;
|
|
45
|
+
};
|
|
46
|
+
canvas_start_x: number;
|
|
47
|
+
canvas_start_y: number;
|
|
48
|
+
canvas_end_x: number;
|
|
49
|
+
canvas_end_y: number;
|
|
50
|
+
canvas_width: number;
|
|
51
|
+
canvas_height: number;
|
|
52
|
+
miniview_width: number;
|
|
53
|
+
miniview_height: number;
|
|
54
|
+
};
|
|
55
|
+
protected visibleArea: {
|
|
56
|
+
x: number;
|
|
57
|
+
y: number;
|
|
58
|
+
};
|
|
59
|
+
private _canvasItemMiniSizeLimit;
|
|
60
|
+
/**
|
|
61
|
+
* @private
|
|
62
|
+
* @inner
|
|
63
|
+
*/
|
|
64
|
+
protected mvDrawAllNodes(): void;
|
|
65
|
+
/**
|
|
66
|
+
* @private
|
|
67
|
+
* @inner
|
|
68
|
+
*/
|
|
69
|
+
protected mvDrawNode(node: RGNode, nodeShape: RGNodeShape, nodeWidth: number, nodeHeight: number): void;
|
|
70
|
+
/**
|
|
71
|
+
* @private
|
|
72
|
+
* @inner
|
|
73
|
+
*/
|
|
74
|
+
protected mvDrawNode4Rect(node: RGNode, nodeWidth: number, nodeHeight: number): void;
|
|
75
|
+
/**
|
|
76
|
+
* @private
|
|
77
|
+
* @inner
|
|
78
|
+
*/
|
|
79
|
+
protected mvDrawNode4Circle(node: RGNode, nodeWidth: number, nodeHeight: number): void;
|
|
80
|
+
/**
|
|
81
|
+
* @private
|
|
82
|
+
* @inner
|
|
83
|
+
*/
|
|
84
|
+
protected mvDrawAllLines(): void;
|
|
85
|
+
/**
|
|
86
|
+
* @private
|
|
87
|
+
* @inner
|
|
88
|
+
*/
|
|
89
|
+
protected mvDrawLine(link: RGLink, line: RGLine): void;
|
|
90
|
+
/**
|
|
91
|
+
* @private
|
|
92
|
+
* @inner
|
|
93
|
+
*/
|
|
94
|
+
protected mvDrawSvgPathOnCanvas(ctx: any, svgPath: any): void;
|
|
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
|
+
*/
|
|
106
|
+
resetByVisiableView(e: RGUserEvent): void;
|
|
107
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
private graphStatusBeforeImageGeneration;
|
|
33
|
+
/**
|
|
34
|
+
* After the image is generated, let relation-graph return to the previous state
|
|
35
|
+
*/
|
|
36
|
+
restoreAfterImageGeneration(): Promise<void>;
|
|
37
|
+
private moveItemsAndFitContent;
|
|
38
|
+
}
|
|
@@ -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,112 @@
|
|
|
1
|
+
import { RGRectTarget } from 'packages/platforms/vue2/dd/types/packages/types';
|
|
2
|
+
import { RGNode } from '../../types';
|
|
3
|
+
import { RelationGraphWith93Image } from './RelationGraphWith93Image';
|
|
4
|
+
/**
|
|
5
|
+
* Enhancement class for relation-graph component to interact with DOM, monitor changes in the view and elements within the view, and respond accordingly
|
|
6
|
+
*/
|
|
7
|
+
export declare class RelationGraphWith95Dom extends RelationGraphWith93Image {
|
|
8
|
+
protected resizeObserver: ResizeObserver;
|
|
9
|
+
protected resizeListenerMap: WeakMap<object, any>;
|
|
10
|
+
protected domToNodeIdMap: WeakMap<Element, string>;
|
|
11
|
+
constructor();
|
|
12
|
+
/**
|
|
13
|
+
* [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).
|
|
14
|
+
* @param relationGraphDom:HTMLDivElement RelationGraph container DOM
|
|
15
|
+
*/
|
|
16
|
+
setDom(relationGraphDom: HTMLDivElement): void;
|
|
17
|
+
/**
|
|
18
|
+
* [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).
|
|
19
|
+
* @param relationGraphDom:HTMLDivElement canvas DOM
|
|
20
|
+
*/
|
|
21
|
+
setCanvasDom(canvasDom: HTMLDivElement): void;
|
|
22
|
+
/**
|
|
23
|
+
* @inner
|
|
24
|
+
* @private
|
|
25
|
+
*/
|
|
26
|
+
private getResizeObserver;
|
|
27
|
+
/**
|
|
28
|
+
* @inner
|
|
29
|
+
* @private
|
|
30
|
+
*/
|
|
31
|
+
protected initDom(): void;
|
|
32
|
+
updateCanvasConnectTargetsPosition(reson?: string): void;
|
|
33
|
+
private mutationObserver4Nodes?;
|
|
34
|
+
private mutationObserver4CanvasSlotBehind?;
|
|
35
|
+
private mutationObserver4CanvasSlotAbove?;
|
|
36
|
+
/**
|
|
37
|
+
* @inner
|
|
38
|
+
* @private
|
|
39
|
+
*/
|
|
40
|
+
private reinitMutationObservers;
|
|
41
|
+
private _updateCanvasConnectTargetsTask;
|
|
42
|
+
/**
|
|
43
|
+
* @inner
|
|
44
|
+
* @private
|
|
45
|
+
*/
|
|
46
|
+
protected destroyMutationObserver(): void;
|
|
47
|
+
private onKeyDownHanlder;
|
|
48
|
+
private onKeyUpHanlder;
|
|
49
|
+
/**
|
|
50
|
+
* @inner
|
|
51
|
+
* @private
|
|
52
|
+
*/
|
|
53
|
+
protected addKeyboardListener(): void;
|
|
54
|
+
/**
|
|
55
|
+
* @inner
|
|
56
|
+
* @private
|
|
57
|
+
*/
|
|
58
|
+
protected removeKeyboardListener(): void;
|
|
59
|
+
/**
|
|
60
|
+
* Monitor the size changes of a DOM element using ResizeObserver
|
|
61
|
+
* @inner
|
|
62
|
+
* @param dom
|
|
63
|
+
* @param callback
|
|
64
|
+
* @protected
|
|
65
|
+
*/
|
|
66
|
+
protected addResizeListener(dom: HTMLElement, callback: (width: number, height: number) => void): void;
|
|
67
|
+
/**
|
|
68
|
+
* Node DOM resize event handler
|
|
69
|
+
* @inner
|
|
70
|
+
* @param dom
|
|
71
|
+
* @param width
|
|
72
|
+
* @param height
|
|
73
|
+
* @private
|
|
74
|
+
*/
|
|
75
|
+
private _onNodeDomResize;
|
|
76
|
+
/**
|
|
77
|
+
* Node DOM resize event handler
|
|
78
|
+
* @inner
|
|
79
|
+
* @param dom
|
|
80
|
+
* @param node
|
|
81
|
+
* @param width
|
|
82
|
+
* @param height
|
|
83
|
+
* @private
|
|
84
|
+
*/
|
|
85
|
+
private _onNodeResize;
|
|
86
|
+
/**
|
|
87
|
+
* [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.
|
|
88
|
+
* @param dom The DOM element corresponding to the Node component
|
|
89
|
+
* @param node The JS data object of the Node
|
|
90
|
+
* @inner
|
|
91
|
+
*/
|
|
92
|
+
addNodeResizeListener(dom: HTMLElement, node: RGNode): void;
|
|
93
|
+
/**
|
|
94
|
+
* [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.
|
|
95
|
+
* @param dom The DOM element corresponding to the Node component
|
|
96
|
+
* @inner
|
|
97
|
+
*/
|
|
98
|
+
removeNodeResizeListener(dom: HTMLElement): void;
|
|
99
|
+
/**
|
|
100
|
+
* Remove size change monitoring for the DOM element
|
|
101
|
+
* @param dom
|
|
102
|
+
* @protected
|
|
103
|
+
*/
|
|
104
|
+
protected removeResizeListener(dom: HTMLElement): void;
|
|
105
|
+
/**
|
|
106
|
+
* @inner
|
|
107
|
+
* @protected
|
|
108
|
+
*/
|
|
109
|
+
protected destroyResizeObserver(): void;
|
|
110
|
+
private getCanvasSlotList;
|
|
111
|
+
getCanvasSlotRectItems(): RGRectTarget[];
|
|
112
|
+
}
|
|
@@ -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(): RGLine | 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
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { RGNode, RGNodeShape } from '../../types';
|
|
2
|
+
import { default as RGCanvasImplWebGL } from '../utils/RGCanvasImplWebGL';
|
|
3
|
+
import { default as RGCanvasImpl2D } from '../utils/RGCanvasImpl2D';
|
|
4
|
+
import { RelationGraphWith7Event } from './RelationGraphWith7Event';
|
|
5
|
+
/**
|
|
6
|
+
* In performance mode, the relation-graph component provides WebGL-based simple view rendering capabilities
|
|
7
|
+
*/
|
|
8
|
+
export declare class RelationGraphWith9EasyView extends RelationGraphWith7Event {
|
|
9
|
+
protected $easyViewCanvas: HTMLCanvasElement;
|
|
10
|
+
protected $rgWebglPainter: RGCanvasImplWebGL | RGCanvasImpl2D;
|
|
11
|
+
constructor();
|
|
12
|
+
/**
|
|
13
|
+
* relation-graph internal call, please do not use externally
|
|
14
|
+
* @inner
|
|
15
|
+
* @private
|
|
16
|
+
*/
|
|
17
|
+
setEasyViewCanvas(canvas: HTMLCanvasElement): void;
|
|
18
|
+
/**
|
|
19
|
+
* relation-graph internal call, please do not use externally
|
|
20
|
+
* @inner
|
|
21
|
+
* @private
|
|
22
|
+
*/
|
|
23
|
+
updateEasyView(): void;
|
|
24
|
+
private _updateEasyViewRequested;
|
|
25
|
+
/**
|
|
26
|
+
* @inner
|
|
27
|
+
* @protected
|
|
28
|
+
*/
|
|
29
|
+
protected _updateEasyView(time: number): void;
|
|
30
|
+
/**
|
|
31
|
+
* @inner
|
|
32
|
+
* @protected
|
|
33
|
+
*/
|
|
34
|
+
protected evDosomethingBeforeDraw(): void;
|
|
35
|
+
_easyViewOffset: {
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* @inner
|
|
41
|
+
* @protected
|
|
42
|
+
*/
|
|
43
|
+
protected evDrawAllNodes(): void;
|
|
44
|
+
/**
|
|
45
|
+
* @inner
|
|
46
|
+
* @protected
|
|
47
|
+
*/
|
|
48
|
+
protected evDrawNode(node: RGNode, nodeShape: RGNodeShape): void;
|
|
49
|
+
/**
|
|
50
|
+
* @inner
|
|
51
|
+
* @protected
|
|
52
|
+
*/
|
|
53
|
+
protected getNodeColor(node: RGNode): string;
|
|
54
|
+
/**
|
|
55
|
+
* @inner
|
|
56
|
+
* @protected
|
|
57
|
+
*/
|
|
58
|
+
private evDrawNode4Rect;
|
|
59
|
+
/**
|
|
60
|
+
* @inner
|
|
61
|
+
* @protected
|
|
62
|
+
*/
|
|
63
|
+
private evDrawNode4Circle;
|
|
64
|
+
/**
|
|
65
|
+
* @inner
|
|
66
|
+
* @protected
|
|
67
|
+
*/
|
|
68
|
+
protected evDrawAllLines(): void;
|
|
69
|
+
/**
|
|
70
|
+
* @inner
|
|
71
|
+
* @protected
|
|
72
|
+
*/
|
|
73
|
+
private evDrawLine;
|
|
74
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export default class RGCanvasImpl2D {
|
|
2
|
+
protected $evCanvasCtx: CanvasRenderingContext2D;
|
|
3
|
+
private viewScale;
|
|
4
|
+
offset: {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
};
|
|
8
|
+
constructor(canvas: HTMLCanvasElement);
|
|
9
|
+
/**
|
|
10
|
+
* 设置Canvas的逻辑尺寸,并根据DPR调整物理渲染尺寸。
|
|
11
|
+
* @param logicalCanvasWidth Canvas期望的CSS宽度
|
|
12
|
+
* @param logicalCanvasHeight Canvas期望的CSS高度
|
|
13
|
+
*/
|
|
14
|
+
setSize(logicalCanvasWidth: number, logicalCanvasHeight: number): void;
|
|
15
|
+
/**
|
|
16
|
+
* 设置视图的缩放级别(用户操作的放大/缩小)。
|
|
17
|
+
* @param scale 视图缩放级别
|
|
18
|
+
*/
|
|
19
|
+
setScale(scale: number): void;
|
|
20
|
+
/**
|
|
21
|
+
* 应用当前的DPR和视图缩放/平移到Canvas上下文。
|
|
22
|
+
* 这是一个辅助方法,用于统一处理变换。
|
|
23
|
+
*/
|
|
24
|
+
private applyCurrentViewTransform;
|
|
25
|
+
/**
|
|
26
|
+
* 设置视图的偏移量(用户操作的平移)。
|
|
27
|
+
* offsetX 和 offsetY 是基于当前视图缩放的屏幕像素偏移。
|
|
28
|
+
* this.offset 将存储转换到逻辑坐标系下的偏移。
|
|
29
|
+
* @param offsetX 屏幕X轴偏移量
|
|
30
|
+
* @param offsetY 屏幕Y轴偏移量
|
|
31
|
+
*/
|
|
32
|
+
setViewOffset(offsetX: number, offsetY: number): void;
|
|
33
|
+
beforeDraw(): void;
|
|
34
|
+
evDrawNode4Rect(nodeX: number, nodeY: number, nodeWidth: number, nodeHeight: number, nodeColor: string, nodeOpacity: number, borderRadius?: number, borderColor?: string): void;
|
|
35
|
+
evDrawNode4Circle(nodeX: number, nodeY: number, nodeWidth: number, nodeHeight: number, nodeColor: string, nodeOpacity: number, borderColor?: string): void;
|
|
36
|
+
evDrawLine(svgPathData: string, lineWidth: number, lineColor: string, lineOpacity: number): void;
|
|
37
|
+
private getPointValue;
|
|
38
|
+
private evDrawSvgPathOnCanvas;
|
|
39
|
+
/**
|
|
40
|
+
* 辅助函数:将SVG的A/a弧形命令参数转换为Canvas可以理解的绘图操作。
|
|
41
|
+
* 这是SVG路径解析中最复杂的部分之一。
|
|
42
|
+
* 一个完整的实现会涉及端点到中心点参数的转换,以及计算起始和终止角度。
|
|
43
|
+
* 通常这会转换为一系列的 ctx.bezierCurveTo 调用,或者如果角度和旋转简单,
|
|
44
|
+
* 可能会使用 ctx.ellipse (如果可用且参数匹配)。
|
|
45
|
+
*
|
|
46
|
+
* @param ctx Canvas 2D 上下文
|
|
47
|
+
* @param x0 当前点 X (绝对坐标, 未偏移)
|
|
48
|
+
* @param y0 当前点 Y (绝对坐标, 未偏移)
|
|
49
|
+
* @param rx X轴半径
|
|
50
|
+
* @param ry Y轴半径
|
|
51
|
+
* @param xAxisRotation X轴旋转角度 (度)
|
|
52
|
+
* @param largeArcFlag 0 表示小弧, 1 表示大弧
|
|
53
|
+
* @param sweepFlag 0 表示逆时针, 1 表示顺时针
|
|
54
|
+
* @param x 弧的终点 X (绝对坐标, 未偏移)
|
|
55
|
+
* @param y 弧的终点 Y (绝对坐标, 未偏移)
|
|
56
|
+
*/
|
|
57
|
+
private drawArc;
|
|
58
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export default class RGCanvasImplWebGL {
|
|
2
|
+
protected gl: WebGLRenderingContext;
|
|
3
|
+
protected genericProgram: WebGLProgram;
|
|
4
|
+
protected lineProgram: WebGLProgram;
|
|
5
|
+
protected genericPositionAttributeLocation: number;
|
|
6
|
+
protected genericColorAttributeLocation: number;
|
|
7
|
+
protected genericProjectionMatrixUniformLocation: WebGLUniformLocation | null;
|
|
8
|
+
protected genericModelViewMatrixUniformLocation: WebGLUniformLocation | null;
|
|
9
|
+
protected linePositionAttributeLocation: number;
|
|
10
|
+
protected lineColorUniformLocation: WebGLUniformLocation | null;
|
|
11
|
+
protected lineProjectionMatrixUniformLocation: WebGLUniformLocation | null;
|
|
12
|
+
protected lineModelViewMatrixUniformLocation: WebGLUniformLocation | null;
|
|
13
|
+
protected positionBuffer: WebGLBuffer | null;
|
|
14
|
+
protected colorBuffer: WebGLBuffer | null;
|
|
15
|
+
protected projectionMatrix: number[];
|
|
16
|
+
protected modelViewMatrix: number[];
|
|
17
|
+
protected canvasWidth: number;
|
|
18
|
+
protected canvasHeight: number;
|
|
19
|
+
offset: {
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
};
|
|
23
|
+
protected currentScaleX: number;
|
|
24
|
+
protected currentScaleY: number;
|
|
25
|
+
constructor(canvas: HTMLCanvasElement);
|
|
26
|
+
private setupWebGLState;
|
|
27
|
+
private createIdentityMatrix;
|
|
28
|
+
private createProjectionMatrix;
|
|
29
|
+
private createTranslationMatrix;
|
|
30
|
+
private createScaleMatrix;
|
|
31
|
+
private multiplyMatrices;
|
|
32
|
+
setSize(canvasWidth: number, canvasHeight: number): void;
|
|
33
|
+
setScale(scale: number): void;
|
|
34
|
+
setViewOffset(offsetX: number, offsetY: number): void;
|
|
35
|
+
beforeDraw(): void;
|
|
36
|
+
/**
|
|
37
|
+
* 解析颜色字符串 (hex, rgb, rgba) 为归一化的 RGBA 对象。
|
|
38
|
+
* @param colorString 颜色字符串。
|
|
39
|
+
* @returns ParsedColor 对象 {r, g, b, a} (0-1范围),或在解析失败时返回 null。
|
|
40
|
+
*/
|
|
41
|
+
private parseColor;
|
|
42
|
+
evDrawNode4Rect(nodeX: number, nodeY: number, nodeWidth: number, nodeHeight: number, nodeColorStr: string, nodeOpacity: number, borderRadius?: number): void;
|
|
43
|
+
evDrawNode4Circle(nodeX: number, nodeY: number, nodeWidth: number, nodeHeight: number, nodeColorStr: string, nodeOpacity: number): void;
|
|
44
|
+
evDrawLine(svgPathData: string, lineWidth: number, lineColorStr: string, lineOpacity: number): void;
|
|
45
|
+
private getSvgCoordValue;
|
|
46
|
+
private parseSvgPathToVertices;
|
|
47
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { RGUserEvent } from '../../types';
|
|
2
|
+
export declare const getScreenWidth: () => number;
|
|
3
|
+
export declare const getScreenHeight: () => number;
|
|
4
|
+
export declare const getColorId: (color: string) => string;
|
|
5
|
+
export declare const getLightColor: (col: string) => string;
|
|
6
|
+
export declare const getTextSize: (text: string) => number;
|
|
7
|
+
export declare const mergeRGObject: (oldObj: Record<string, any>, newObj: Record<string, any>) => Record<string, any>;
|
|
8
|
+
export declare const isSupportTouch: (e: MouseEvent | TouchEvent) => boolean;
|
|
9
|
+
export declare const getClientCoordinate: (e: MouseEvent | TouchEvent) => {
|
|
10
|
+
clientX: any;
|
|
11
|
+
clientY: any;
|
|
12
|
+
};
|
|
13
|
+
export declare const devLog: (...args: any[]) => void;
|
|
14
|
+
export declare const deprecatedWaring: (...args: any[]) => void;
|
|
15
|
+
export declare const findParentByClassName: (el: HTMLElement | null, className: string, stopClass: string) => HTMLElement | null;
|
|
16
|
+
export declare const sleep: (time: number) => Promise<void>;
|
|
17
|
+
export declare const getNumberOption: (v: any) => any;
|
|
18
|
+
/**
|
|
19
|
+
* 注意:
|
|
20
|
+
* 根据MIT许可证的规定,允许您自由地使用、修改和分发源代码。您可以根据自己的需求对源代码进行更改。
|
|
21
|
+
* 然而,您仍然需要遵守MIT许可证的其他规定,如保留版权声明和免责声明等
|
|
22
|
+
* relation-graph和relation-graph的网址是它的版权声明,请勿注释掉这一行信息
|
|
23
|
+
* @param platform
|
|
24
|
+
*/
|
|
25
|
+
export declare const relationGraphVersionInfo: (platform?: string) => void;
|
|
26
|
+
export declare const isDescendantElementByClass: (child: HTMLElement, parentClassName: string | string[]) => boolean;
|
|
27
|
+
export declare const isInputFocused: (e: MouseEvent | KeyboardEvent | TouchEvent | ClipboardEvent) => boolean;
|
|
28
|
+
export declare const isReactiveVue2: (obj: any) => boolean;
|
|
29
|
+
export declare const initRawProperty4Vue2: (item: any, propertyName: string, initialValue: any) => any;
|
|
30
|
+
export declare const generateNewUUID: (idLength?: number) => string;
|
|
31
|
+
export declare const isRightMouseEvent: (event: RGUserEvent | undefined) => boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { RGCoordinate } from '../../types';
|
|
2
|
+
export type RGDraggedCallback = (buffX: number, buffY: number, e: MouseEvent | TouchEvent) => void;
|
|
3
|
+
export type RGDraggingCallback = (offsetX: number, offsetY: number, startNodeInfo: RGCoordinate, startEventInfo: RGCoordinate, event: MouseEvent | TouchEvent) => void;
|
|
4
|
+
export type RGDragging = (ex: number, ey: number, event: MouseEvent | TouchEvent) => void;
|
|
5
|
+
/**
|
|
6
|
+
* Dragging utility functions
|
|
7
|
+
*/
|
|
8
|
+
declare const RGDragUtils: {
|
|
9
|
+
/**
|
|
10
|
+
* Start dragging operation
|
|
11
|
+
* @param e
|
|
12
|
+
* @param startPositionOrModel When onDragging is empty, it indicates the position model reference at the start of the drag, used to update the position; when onDragging is not empty, it indicates the position data at the start of the drag, and its value will be directly modified during the drag.
|
|
13
|
+
* @param onDragged
|
|
14
|
+
* @param onDragging
|
|
15
|
+
*/
|
|
16
|
+
startDrag(e: MouseEvent | TouchEvent, startPositionOrModel: RGCoordinate, onDragged: RGDraggedCallback, onDragging?: RGDraggingCallback): void;
|
|
17
|
+
onNodeMove(e: MouseEvent | TouchEvent): void;
|
|
18
|
+
onNodeDragend(e: MouseEvent | TouchEvent): void;
|
|
19
|
+
};
|
|
20
|
+
export default RGDragUtils;
|