@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.
Files changed (234) hide show
  1. package/package.json +2 -2
  2. package/relation-graph.js +251 -23
  3. package/relation-graph.mjs +7368 -5902
  4. package/relation-graph.umd.js +251 -23
  5. package/types/packages/platforms/react/src/index.d.ts +98 -64
  6. package/types/packages/platforms/react/src/relation-graph/RGProvider.d.ts +4 -0
  7. package/types/packages/platforms/react/src/relation-graph/RelationGraph.d.ts +7 -3
  8. package/types/packages/platforms/react/src/relation-graph/RelationLinker.d.ts +4 -5
  9. package/types/packages/platforms/react/src/relation-graph/src/core4react/RGCanvas.d.ts +2 -3
  10. package/types/packages/platforms/react/src/relation-graph/src/core4react/RGCanvasContent.d.ts +10 -3
  11. package/types/packages/platforms/react/src/relation-graph/src/core4react/RGCanvasContent4CreatingLine.d.ts +10 -0
  12. package/types/packages/platforms/react/src/relation-graph/src/core4react/RGCanvasContent4FakeLines.d.ts +11 -0
  13. package/types/packages/platforms/react/src/relation-graph/src/core4react/RGCanvasContent4Lines.d.ts +12 -0
  14. package/types/packages/platforms/react/src/relation-graph/src/core4react/RGCanvasContent4Nodes.d.ts +13 -0
  15. package/types/packages/platforms/react/src/relation-graph/src/core4react/RGFakeNode.d.ts +1 -1
  16. package/types/packages/platforms/react/src/relation-graph/src/core4react/RGGraphRefs.d.ts +0 -1
  17. package/types/packages/platforms/react/src/relation-graph/src/core4react/RGLineContent.d.ts +1 -1
  18. package/types/packages/platforms/react/src/relation-graph/src/core4react/RGLinePath.d.ts +1 -1
  19. package/types/packages/platforms/react/src/relation-graph/src/core4react/RGLinePeel.d.ts +2 -3
  20. package/types/packages/platforms/react/src/relation-graph/src/core4react/RGLineText.d.ts +1 -1
  21. package/types/packages/platforms/react/src/relation-graph/src/core4react/RGNodePeel.d.ts +10 -1
  22. package/types/packages/platforms/react/src/relation-graph/src/core4react/RelationGraphUI.d.ts +4 -0
  23. package/types/packages/platforms/react/src/relation-graph/src/core4react/RelationGraphView.d.ts +4 -0
  24. package/types/packages/platforms/react/src/relation-graph/src/core4react/RelationLinkerCanvas.d.ts +4 -5
  25. package/types/packages/platforms/react/src/relation-graph/src/core4react/RelationLinkerUI.d.ts +4 -0
  26. package/types/packages/platforms/react/src/relation-graph/src/core4react/RelationLinkerView.d.ts +4 -0
  27. package/types/packages/platforms/react/src/relation-graph/src/core4react/editing/RGConnectSource.d.ts +1 -1
  28. package/types/packages/platforms/react/src/relation-graph/src/core4react/editing/RGConnectTarget.d.ts +1 -1
  29. package/types/packages/platforms/react/src/relation-graph/src/core4react/editing/RGEditingConnectPoints.d.ts +1 -1
  30. package/types/packages/platforms/react/src/relation-graph/src/core4react/editing/RGEditingLineController.d.ts +1 -1
  31. package/types/packages/platforms/react/src/relation-graph/src/core4react/editing/RGEditingNearNodeWidget.d.ts +1 -1
  32. package/types/packages/platforms/react/src/relation-graph/src/core4react/editing/RGMiniView.d.ts +1 -1
  33. package/types/packages/platforms/react/src/relation-graph/src/core4react/slots/RGSlotOnLine.d.ts +1 -1
  34. package/types/packages/platforms/react/src/relation-graph/src/core4react/slots/RGSlotOnLineText.d.ts +1 -1
  35. package/types/packages/platforms/react/src/relation-graph/src/core4react/slots/RGSlotOnNode.d.ts +1 -1
  36. package/types/packages/platforms/react/src/relation-graph/src/core4react/store/index.d.ts +3 -2
  37. package/types/packages/platforms/react/src/relation-graph/src/core4react/store/reducers/RGStore.d.ts +10 -0
  38. package/types/packages/platforms/react/src/relation-graph/src/core4react/widgets/GraphBackground.d.ts +1 -1
  39. package/types/packages/platforms/react/src/relation-graph/src/core4react/widgets/GraphOperateStuff.d.ts +1 -1
  40. package/types/packages/platforms/react/src/relation-graph/src/core4react/widgets/GraphToolBar.d.ts +1 -1
  41. package/types/packages/platforms/react/src/relation-graph/src/core4react/widgets/GraphWatermark.d.ts +1 -1
  42. package/types/packages/platforms/react/src/relation-graph/src/core4react/widgets/GraphXsToolBar.d.ts +1 -1
  43. package/types/packages/platforms/react/src/relation-graph/src/core4react/widgets/RGDebugView.d.ts +3 -0
  44. package/types/packages/platforms/react/src/relation-graph/src/hooks/RGDataProvider.d.ts +17 -0
  45. package/types/packages/platforms/react/src/relation-graph/src/hooks/RGHooks.d.ts +24 -1
  46. package/types/packages/platforms/react/src/relation-graph/src/hooks/useFakeNodesState.d.ts +1 -1
  47. package/types/packages/platforms/react/src/relation-graph/src/hooks/useGraphInstance.d.ts +2 -12
  48. package/types/packages/platforms/react/src/relation-graph/src/hooks/useGraphStore.d.ts +13 -0
  49. package/types/packages/platforms/react/src/relation-graph/src/hooks/useRelationGraph.d.ts +11 -0
  50. package/types/packages/platforms/react/src/relation-graph/src/hooks/useRelationLinker.d.ts +17 -0
  51. package/types/packages/platforms/react/src/types-react.d.ts +24 -24
  52. package/types/packages/platforms/svelte/src/RGProvider.svelte.d.ts +1 -0
  53. package/types/packages/platforms/svelte/src/context.d.ts +4 -0
  54. package/types/packages/platforms/svelte/src/core4svelte/RGCanvas.svelte.d.ts +1 -0
  55. package/types/packages/platforms/svelte/src/core4svelte/RGCanvasContent.svelte.d.ts +1 -0
  56. package/types/packages/platforms/svelte/src/core4svelte/RGCanvasContent4CreatingLine.svelte.d.ts +1 -0
  57. package/types/packages/platforms/svelte/src/core4svelte/RGCanvasContent4FakeLines.svelte.d.ts +1 -0
  58. package/types/packages/platforms/svelte/src/core4svelte/RGCanvasContent4Lines.svelte.d.ts +1 -0
  59. package/types/packages/platforms/svelte/src/core4svelte/RGCanvasContent4Nodes.svelte.d.ts +1 -0
  60. package/types/packages/platforms/svelte/src/core4svelte/RGEasyView.svelte.d.ts +1 -0
  61. package/types/packages/platforms/svelte/src/core4svelte/RGFakeNode.svelte.d.ts +1 -0
  62. package/types/packages/platforms/svelte/src/core4svelte/RGGraphDefs.svelte.d.ts +1 -0
  63. package/types/packages/platforms/svelte/src/core4svelte/RGLineContent.svelte.d.ts +1 -0
  64. package/types/packages/platforms/svelte/src/core4svelte/RGLinePath.svelte.d.ts +1 -0
  65. package/types/packages/platforms/svelte/src/core4svelte/RGLinePeel.svelte.d.ts +1 -0
  66. package/types/packages/platforms/svelte/src/core4svelte/RGLineText.svelte.d.ts +1 -0
  67. package/types/packages/platforms/svelte/src/core4svelte/RGNodeExpandHolder.svelte.d.ts +1 -0
  68. package/types/packages/platforms/svelte/src/core4svelte/RGNodePeel.svelte.d.ts +1 -0
  69. package/types/packages/platforms/svelte/src/core4svelte/RGProvider4Instance.svelte.d.ts +1 -0
  70. package/types/packages/platforms/svelte/src/core4svelte/RelationGraph.svelte.d.ts +1 -0
  71. package/types/packages/platforms/svelte/src/core4svelte/RelationGraphUI.svelte.d.ts +1 -0
  72. package/types/packages/platforms/svelte/src/core4svelte/RelationLinker.svelte.d.ts +1 -0
  73. package/types/packages/platforms/svelte/src/core4svelte/RelationLinkerCanvas.svelte.d.ts +1 -0
  74. package/types/packages/platforms/svelte/src/core4svelte/RelationLinkerUI.svelte.d.ts +1 -0
  75. package/types/packages/platforms/svelte/src/core4svelte/editing/RGConnectSource.svelte.d.ts +1 -0
  76. package/types/packages/platforms/svelte/src/core4svelte/editing/RGConnectTarget.svelte.d.ts +1 -0
  77. package/types/packages/platforms/svelte/src/core4svelte/editing/RGConnectTargetUI.svelte.d.ts +1 -0
  78. package/types/packages/platforms/svelte/src/core4svelte/editing/RGEditingConnectController.svelte.d.ts +1 -0
  79. package/types/packages/platforms/svelte/src/core4svelte/editing/RGEditingConnectPoints.svelte.d.ts +1 -0
  80. package/types/packages/platforms/svelte/src/core4svelte/editing/RGEditingLineController.svelte.d.ts +1 -0
  81. package/types/packages/platforms/svelte/src/core4svelte/editing/RGEditingLineControllerUI.svelte.d.ts +1 -0
  82. package/types/packages/platforms/svelte/src/core4svelte/editing/RGEditingNearNodeWidget.svelte.d.ts +1 -0
  83. package/types/packages/platforms/svelte/src/core4svelte/editing/RGEditingNodeController.svelte.d.ts +1 -0
  84. package/types/packages/platforms/svelte/src/core4svelte/editing/RGEditingNodeControllerUI.svelte.d.ts +1 -0
  85. package/types/packages/platforms/svelte/src/core4svelte/editing/RGEditingReferenceLine.svelte.d.ts +1 -0
  86. package/types/packages/platforms/svelte/src/core4svelte/editing/RGEditingResize.svelte.d.ts +1 -0
  87. package/types/packages/platforms/svelte/src/core4svelte/editing/RGEditingResizeUI.svelte.d.ts +1 -0
  88. package/types/packages/platforms/svelte/src/core4svelte/editing/RGMiniView.svelte.d.ts +1 -0
  89. package/types/packages/platforms/svelte/src/core4svelte/editing/RGMiniViewContent.svelte.d.ts +1 -0
  90. package/types/packages/platforms/svelte/src/core4svelte/web-components/RGConnectTarget.svelte.d.ts +1 -0
  91. package/types/packages/platforms/svelte/src/core4svelte/web-components/RGEditingConnectController.svelte.d.ts +1 -0
  92. package/types/packages/platforms/svelte/src/core4svelte/web-components/RGEditingLineController.svelte.d.ts +1 -0
  93. package/types/packages/platforms/svelte/src/core4svelte/web-components/RGEditingNearNodeWidget.svelte.d.ts +1 -0
  94. package/types/packages/platforms/svelte/src/core4svelte/web-components/RGEditingNodeController.svelte.d.ts +1 -0
  95. package/types/packages/platforms/svelte/src/core4svelte/web-components/RGEditingReferenceLine.svelte.d.ts +1 -0
  96. package/types/packages/platforms/svelte/src/core4svelte/web-components/RGEditingResize.svelte.d.ts +1 -0
  97. package/types/packages/platforms/svelte/src/core4svelte/web-components/RGMiniView.svelte.d.ts +1 -0
  98. package/types/packages/platforms/svelte/src/core4svelte/web-components/RelationGraphWithProvider.svelte.d.ts +1 -0
  99. package/types/packages/platforms/svelte/src/core4svelte/web-components/WebComponentUtils.d.ts +11 -0
  100. package/types/packages/platforms/svelte/src/core4svelte/widgets/GraphBackground.svelte.d.ts +1 -0
  101. package/types/packages/platforms/svelte/src/core4svelte/widgets/GraphLoading.svelte.d.ts +1 -0
  102. package/types/packages/platforms/svelte/src/core4svelte/widgets/GraphMoveOperator.svelte.d.ts +1 -0
  103. package/types/packages/platforms/svelte/src/core4svelte/widgets/GraphOperateStuff.svelte.d.ts +1 -0
  104. package/types/packages/platforms/svelte/src/core4svelte/widgets/GraphWatermark.svelte.d.ts +1 -0
  105. package/types/packages/platforms/svelte/src/core4svelte/widgets/GraphXsToolBar.svelte.d.ts +1 -0
  106. package/types/packages/platforms/svelte/src/core4svelte/widgets/RGIcons.svelte.d.ts +1 -0
  107. package/types/packages/platforms/svelte/src/hooks/RGHooks.d.ts +27 -0
  108. package/types/packages/platforms/svelte/src/hooks/useGraphInstance.d.ts +2 -0
  109. package/types/packages/platforms/svelte/src/hooks/useGraphStore.d.ts +14 -0
  110. package/types/packages/platforms/svelte/src/hooks/useRGDataProvider.d.ts +19 -0
  111. package/types/packages/platforms/svelte/src/hooks/useRelationGraph.d.ts +48 -0
  112. package/types/packages/platforms/svelte/src/index.d.ts +194 -0
  113. package/types/packages/platforms/svelte/src/types-svelte.d.ts +85 -0
  114. package/types/packages/platforms/vue2/src/core4vue/RGCanvas.vue.d.ts +2 -6
  115. package/types/packages/platforms/vue2/src/core4vue/RGCanvasContent.vue.d.ts +6 -6
  116. package/types/packages/platforms/vue2/src/core4vue/RGCanvasContent4CreatingLine.vue.d.ts +9 -0
  117. package/types/packages/platforms/vue2/src/core4vue/RGCanvasContent4FakeLines.vue.d.ts +9 -0
  118. package/types/packages/platforms/vue2/src/core4vue/RGCanvasContent4Lines.vue.d.ts +9 -0
  119. package/types/packages/platforms/vue2/src/core4vue/RGCanvasContent4Nodes.vue.d.ts +9 -0
  120. package/types/packages/platforms/vue2/src/core4vue/RGEasyView.vue.d.ts +1 -0
  121. package/types/packages/platforms/vue2/src/core4vue/RGGraphDefs.vue.d.ts +1 -0
  122. package/types/packages/platforms/vue2/src/core4vue/RGLineContent.vue.d.ts +18 -18
  123. package/types/packages/platforms/vue2/src/core4vue/RGLinePath.vue.d.ts +4 -28
  124. package/types/packages/platforms/vue2/src/core4vue/RGLinePeel.vue.d.ts +4 -15
  125. package/types/packages/platforms/vue2/src/core4vue/RGNodeExpandHolder.vue.d.ts +3 -9
  126. package/types/packages/platforms/vue2/src/core4vue/RGNodePeel.vue.d.ts +5 -20
  127. package/types/packages/platforms/vue2/src/core4vue/RGProvider.vue.d.ts +50 -0
  128. package/types/packages/platforms/vue2/src/core4vue/RelationGraph.vue.d.ts +5 -773
  129. package/types/packages/platforms/vue2/src/core4vue/RelationGraphUI.vue.d.ts +46 -0
  130. package/types/packages/platforms/vue2/src/core4vue/RelationLinker.vue.d.ts +8 -24
  131. package/types/packages/platforms/vue2/src/core4vue/RelationLinkerCanvas.vue.d.ts +1 -0
  132. package/types/packages/platforms/vue2/src/core4vue/RelationLinkerUI.vue.d.ts +23 -0
  133. package/types/packages/platforms/vue2/src/core4vue/editing/RGConnectSource.vue.d.ts +3 -1
  134. package/types/packages/platforms/vue2/src/core4vue/editing/RGConnectTarget.vue.d.ts +1 -0
  135. package/types/packages/platforms/vue2/src/core4vue/editing/RGEditingConnectController.vue.d.ts +2 -1
  136. package/types/packages/platforms/vue2/src/core4vue/editing/RGEditingConnectPoints.vue.d.ts +1 -0
  137. package/types/packages/platforms/vue2/src/core4vue/editing/RGEditingLineController.vue.d.ts +12 -2
  138. package/types/packages/platforms/vue2/src/core4vue/editing/RGEditingNearNodeWidget.vue.d.ts +1 -0
  139. package/types/packages/platforms/vue2/src/core4vue/editing/RGEditingNodeController.vue.d.ts +1 -0
  140. package/types/packages/platforms/vue2/src/core4vue/editing/RGEditingReferenceLine.vue.d.ts +1 -0
  141. package/types/packages/platforms/vue2/src/core4vue/editing/RGEditingResize.vue.d.ts +1 -0
  142. package/types/packages/platforms/vue2/src/core4vue/editing/RGMiniView.vue.d.ts +3 -1
  143. package/types/packages/platforms/vue2/src/core4vue/widgets/GraphBackground.vue.d.ts +1 -0
  144. package/types/packages/platforms/vue2/src/core4vue/widgets/GraphLoading.vue.d.ts +1 -0
  145. package/types/packages/platforms/vue2/src/core4vue/widgets/GraphMoveOperator.vue.d.ts +1 -1
  146. package/types/packages/platforms/vue2/src/core4vue/widgets/GraphOperateStuff.vue.d.ts +1 -0
  147. package/types/packages/platforms/vue2/src/core4vue/widgets/GraphToolBar.vue.d.ts +1 -1
  148. package/types/packages/platforms/vue2/src/core4vue/widgets/GraphWatermark.vue.d.ts +1 -0
  149. package/types/packages/platforms/vue2/src/core4vue/widgets/GraphXsToolBar.vue.d.ts +1 -1
  150. package/types/packages/platforms/vue2/src/core4vue/widgets/RGDebugView.vue.d.ts +12 -0
  151. package/types/packages/platforms/vue2/src/hooks/GraphStoreMixin.d.ts +40 -0
  152. package/types/packages/platforms/vue2/src/index.d.ts +138 -1692
  153. package/types/packages/platforms/vue2/src/types-vue2.d.ts +3 -0
  154. package/types/packages/platforms/vue3/src/constants.d.ts +0 -1
  155. package/types/packages/platforms/vue3/src/index.d.ts +97 -1404
  156. package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/editing/RGConnectSource.vue.d.ts +2 -2
  157. package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/editing/RGConnectTarget.vue.d.ts +4 -4
  158. package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/editing/RGEditingLineController.vue.d.ts +2 -2
  159. package/types/packages/platforms/vue3/src/relation-graph/src/hooks/RGHooks.d.ts +27 -2
  160. package/types/packages/platforms/vue3/src/relation-graph/src/hooks/useGraphData.d.ts +2 -0
  161. package/types/packages/platforms/vue3/src/relation-graph/src/hooks/useGraphInstance.d.ts +1 -12
  162. package/types/packages/platforms/vue3/src/relation-graph/src/hooks/useGraphStore.d.ts +16 -0
  163. package/types/packages/platforms/vue3/src/relation-graph/src/hooks/useRGDataProvider.d.ts +17 -0
  164. package/types/packages/platforms/vue3/src/relation-graph/src/hooks/useRelationGraph.d.ts +131 -0
  165. package/types/packages/platforms/vue3/src/relation-graph/src/hooks/useRelationLinker.d.ts +39 -0
  166. package/types/packages/platforms/vue3/src/types-vue3.d.ts +104 -4
  167. package/types/packages/platforms/vue3/src/types.d.ts +3 -1
  168. package/types/packages/relation-graph-models/RGObjectsForExport.d.ts +40 -32
  169. package/types/packages/relation-graph-models/data/RGDataDefine.d.ts +23 -0
  170. package/types/packages/relation-graph-models/data/RGDataGetter.d.ts +36 -0
  171. package/types/packages/relation-graph-models/data/RGDataProvider.d.ts +66 -0
  172. package/types/packages/relation-graph-models/data/RGDataProvider4React.d.ts +9 -0
  173. package/types/packages/relation-graph-models/data/RGDataProvider4Svelte.d.ts +10 -0
  174. package/types/packages/relation-graph-models/data/RGDataProvider4Vue2.d.ts +9 -0
  175. package/types/packages/relation-graph-models/data/RGDataProvider4Vue3.d.ts +10 -0
  176. package/types/packages/relation-graph-models/data/RGDataProvider4Vue3V1.d.ts +10 -0
  177. package/types/packages/relation-graph-models/data/RGLineDataUtils.d.ts +9 -0
  178. package/types/packages/relation-graph-models/data/RGNodeDataUtils.d.ts +14 -0
  179. package/types/packages/relation-graph-models/data/RGOptionsDataUtils.d.ts +9 -0
  180. package/types/packages/relation-graph-models/data/utils/EdgeCounter.d.ts +8 -0
  181. package/types/packages/relation-graph-models/layouts/RGBaseLayout.d.ts +37 -0
  182. package/types/packages/relation-graph-models/layouts/RGCenterLayout.d.ts +9 -0
  183. package/types/packages/relation-graph-models/layouts/RGCircleLayout.d.ts +7 -0
  184. package/types/packages/relation-graph-models/layouts/RGFixedLayout.d.ts +10 -0
  185. package/types/packages/relation-graph-models/layouts/RGFolderLayout.d.ts +15 -0
  186. package/types/packages/relation-graph-models/layouts/RGForceLayout.d.ts +77 -0
  187. package/types/packages/relation-graph-models/layouts/RGIOTreeLayout.d.ts +18 -0
  188. package/types/packages/relation-graph-models/layouts/RGSmartTreeLayout.d.ts +14 -0
  189. package/types/packages/relation-graph-models/layouts/RGTreeLayout.d.ts +17 -0
  190. package/types/packages/relation-graph-models/layouts/analyzers/BasicNetworkAnalyzer.d.ts +27 -0
  191. package/types/packages/relation-graph-models/layouts/analyzers/RGNetworkAnalyzer.d.ts +27 -0
  192. package/types/packages/relation-graph-models/models/RelationGraphBase.d.ts +31 -18
  193. package/types/packages/relation-graph-models/models/RelationGraphCore.d.ts +46 -0
  194. package/types/packages/relation-graph-models/models/RelationGraphWith1View.d.ts +91 -0
  195. package/types/packages/relation-graph-models/models/RelationGraphWith2Data.d.ts +34 -381
  196. package/types/packages/relation-graph-models/models/RelationGraphWith2Data1Getter.d.ts +77 -0
  197. package/types/packages/relation-graph-models/models/RelationGraphWith2Data2Analysis.d.ts +172 -0
  198. package/types/packages/relation-graph-models/models/RelationGraphWith2Data3Update.d.ts +257 -0
  199. package/types/packages/relation-graph-models/models/RelationGraphWith2Data4ConnectTarget.d.ts +85 -0
  200. package/types/packages/relation-graph-models/models/RelationGraphWith2Data5LineConfig.d.ts +35 -0
  201. package/types/packages/relation-graph-models/models/RelationGraphWith3Options1Update.d.ts +75 -0
  202. package/types/packages/relation-graph-models/models/RelationGraphWith3Options2API.d.ts +39 -0
  203. package/types/packages/relation-graph-models/models/RelationGraphWith4Line.d.ts +81 -21
  204. package/types/packages/relation-graph-models/models/RelationGraphWith5Zoom.d.ts +19 -21
  205. package/types/packages/relation-graph-models/models/RelationGraphWith6Effect.d.ts +56 -4
  206. package/types/packages/relation-graph-models/models/RelationGraphWith6Layout.d.ts +60 -12
  207. package/types/packages/relation-graph-models/models/RelationGraphWith7Event.d.ts +233 -36
  208. package/types/packages/relation-graph-models/models/RelationGraphWith91Editing.d.ts +176 -25
  209. package/types/packages/relation-graph-models/models/RelationGraphWith92MiniView.d.ts +70 -13
  210. package/types/packages/relation-graph-models/models/RelationGraphWith93Image.d.ts +36 -0
  211. package/types/packages/relation-graph-models/models/RelationGraphWith93Image_codes.d.ts +36 -0
  212. package/types/packages/relation-graph-models/models/RelationGraphWith95Dom.d.ts +108 -0
  213. package/types/packages/relation-graph-models/models/RelationGraphWith99API.d.ts +125 -0
  214. package/types/packages/relation-graph-models/models/RelationGraphWith9EasyView.d.ts +57 -11
  215. package/types/packages/relation-graph-models/utils/RGCanvasImpl2D.d.ts +2 -3
  216. package/types/packages/relation-graph-models/utils/RGCommon.d.ts +6 -1
  217. package/types/packages/relation-graph-models/utils/RGDragUtils.d.ts +14 -11
  218. package/types/packages/relation-graph-models/utils/RGFullscreenUtils.d.ts +1 -1
  219. package/types/packages/relation-graph-models/utils/RGGraphMath.d.ts +27 -0
  220. package/types/packages/relation-graph-models/utils/RGIntergration.d.ts +32 -34
  221. package/types/packages/relation-graph-models/utils/RGNodesAnalytic.d.ts +6 -15
  222. package/types/packages/relation-graph-models/utils/RGTips.d.ts +7 -0
  223. package/types/packages/relation-graph-models/utils/line/RGLinePath.d.ts +16 -1
  224. package/types/packages/relation-graph-models/utils/line/RGLinePathUtils.d.ts +1 -1
  225. package/types/packages/relation-graph-models/utils/line/RGPathGeneratorFor1.d.ts +1 -1
  226. package/types/packages/relation-graph-models/utils/line/RGPathGeneratorFor4.d.ts +1 -1
  227. package/types/packages/relation-graph-models/utils/line/RGPathGeneratorFor44.d.ts +1 -1
  228. package/types/packages/relation-graph-models/utils/line/RGPathGeneratorFor49.d.ts +1 -1
  229. package/types/packages/relation-graph-models/utils/line/RGPathGeneratorFor6.d.ts +1 -1
  230. package/types/packages/relation-graph-models/utils/line/RGPathGeneratorForCurve.d.ts +1 -1
  231. package/types/packages/types.d.ts +1467 -0
  232. package/types/packages/types.ts +1472 -0
  233. package/types/react.d.ts +38 -38
  234. package/types/vue3.d.ts +229 -229
@@ -1,29 +1,84 @@
1
- import { RelationGraphWith3Image } from './RelationGraphWith3Image';
2
- import { RGJunctionPoint, RGElementLine, RGGenerateLineConfig, RGGenerateLinePrams, RGLine, RGLinePathInfo, RGLineTextPosition, RGLink, RGListeners, RGOptions, RGUserEvent } from '../types';
3
- import { RGLineVertexBeDroppedEventHandler } from '../../../types/types/relation-graph-models/types';
4
- export declare class RelationGraphWith4Line extends RelationGraphWith3Image {
5
- constructor(options: RGOptions, listeners: RGListeners);
1
+ import { RGElementLine, RGGenerateLineConfig, RGLine, RGLinePathInfo, RGLineTextPosition, RGLink } from '../../types';
2
+ import { RelationGraphWith3Options2API } from './RelationGraphWith3Options2API';
3
+ /**
4
+ * Methods related to line drawing in relation-graph component
5
+ */
6
+ export declare class RelationGraphWith4Line extends RelationGraphWith3Options2API {
7
+ constructor();
8
+ /**
9
+ * Get the specific coordinate position of the junction point according to the junction point style
10
+ * @param junctionPointStyle Junction point position definition, type: RGJunctionPoint
11
+ * @param createJunctionPointParams Parameters required to create junction points
12
+ * @return Returns the coordinate position of the junction point
13
+ *
14
+ */
6
15
  private _getJunctionPoint;
16
+ /**
17
+ * @deprecated This method has been removed, please use createLineDrawInfo() instead.
18
+ */
7
19
  createLinePath(link: RGLink | RGElementLine, line: RGLine, ri: number): void;
20
+ /**
21
+ * Generate line drawing information based on line information
22
+ * - This method is generally used internally by components, but can also be called for external custom rendering of lines to obtain line drawing information.
23
+ * @param link The connection line object that contains the starting and ending point object information
24
+ * @param line The line object
25
+ * @return Returns the line drawing information object
26
+ *
27
+ */
8
28
  createLineDrawInfo(link: RGLink | RGElementLine, line: RGLine): RGLinePathInfo | undefined;
29
+ /**
30
+ * Generate line path data
31
+ * - This method is generally used internally by components, but can also be called for external custom rendering of lines to obtain line drawing information.
32
+ * @param generateConfig Data configuration for generating line paths
33
+ * @return Returns the line path information object
34
+ *
35
+ */
9
36
  generateLinePath(generateConfig: RGGenerateLineConfig): RGLinePathInfo;
10
- throwLineError(errorCode: string, x: number, y: number): {
11
- rgError: boolean;
12
- errorCode: string;
13
- x: number;
14
- y: number;
15
- };
16
- createErrorLineValue(errorCode: string, x: number, y: number): RGLinePathInfo;
17
- /**
18
- this.options.layout.layoutDirection || 'h';
19
- this.options.multiLineDistance
20
- this.options.defaultJunctionPoint
21
- lineRadius: this.options.defaultPolyLineRadius
22
- **/
23
- withLineJunctionPoints({ line, from, to, totalLinesBetweenNodes, currentLineIndex, defaultOptions }: RGGenerateLineConfig): RGGenerateLinePrams;
24
- createLinePathData(linePathGenerateParmas: RGGenerateLinePrams): RGLinePathInfo;
37
+ /**
38
+ * @inner
39
+ * @private
40
+ */
41
+ private throwLineError;
42
+ /**
43
+ * @inner
44
+ * @private
45
+ */
46
+ private createErrorLineValue;
47
+ /**
48
+ * @inner
49
+ * @private
50
+ */
51
+ private withLineJunctionPoints;
52
+ /**
53
+ * @inner
54
+ * @private
55
+ */
56
+ private createLinePathData;
57
+ /**
58
+ * Get the arrow marker ID based on the line information, used to set the SVG marker-start or marker-end attribute value
59
+ * @param line The line object
60
+ * @param isStartArrow Whether it is the start arrow, the default value is false, indicating the end arrow
61
+ * @return Returns the arrow marker ID string, or undefined if the arrow is not displayed
62
+ *
63
+ */
25
64
  getArrowMarkerId(line: RGLine, isStartArrow?: boolean): string | undefined;
65
+ /**
66
+ * @inner
67
+ * @private
68
+ */
69
+ private getLineArrow;
70
+ /**
71
+ * @deprecated Will be removed in future versions
72
+ * @inner
73
+ */
26
74
  getTextTransform(line: RGLine, textPosition: RGLineTextPosition): string;
75
+ /**
76
+ * English: Generate text style information on the line, including position, alignment, rotation, and other CSS styles
77
+ * @param lineConfig RGGenerateLineConfig object, configuration information when generating the line
78
+ * @param linePathInfo RGLinePathInfo object, line path information
79
+ * @return Returns an object containing text content and CSS styles
80
+ *
81
+ */
27
82
  generateLineTextStyle(lineConfig: RGGenerateLineConfig, linePathInfo: RGLinePathInfo): {
28
83
  cssStyles: {
29
84
  transform: string;
@@ -37,6 +92,12 @@ export declare class RelationGraphWith4Line extends RelationGraphWith3Image {
37
92
  transformOrigin: string;
38
93
  };
39
94
  };
95
+ /**
96
+ * Generate text style information for textPath on the line, including position, alignment, rotation, and other CSS styles
97
+ * @param lineConfig RGGenerateLineConfig object, configuration information when generating the line
98
+ * @return Returns an object containing text content and CSS styles
99
+ *
100
+ */
40
101
  generateLineTextStyle4TextPath(lineConfig: RGGenerateLineConfig): {
41
102
  text: string;
42
103
  textOffset: string;
@@ -44,5 +105,4 @@ export declare class RelationGraphWith4Line extends RelationGraphWith3Image {
44
105
  onPathStartOffset: string;
45
106
  textRotate: number;
46
107
  } | null;
47
- onLineVertexBeDroppedOnConnectController(junctionPoint: RGJunctionPoint, $event: RGUserEvent, connectBoxDom?: HTMLElement, lineVertexBeDroppedEventHandler?: RGLineVertexBeDroppedEventHandler): void;
48
108
  }
@@ -1,31 +1,29 @@
1
- import { RGListeners, RGOptions } from '../types';
1
+ import { RGCoordinate } from '../../types';
2
2
  import { RelationGraphWith4Line } from './RelationGraphWith4Line';
3
- export type RGCoordinate = {
4
- x: number;
5
- y: number;
6
- };
7
3
  export type RGClientXy = RGCoordinate;
8
- export type RGCViewXy = RGCoordinate;
9
- export type RGCanvasXy = RGCoordinate;
4
+ /**
5
+ * Class related to zoom functionality in the relation-graph component
6
+ */
10
7
  export declare class RelationGraphWith5Zoom extends RelationGraphWith4Line {
11
- constructor(options: RGOptions, listeners: RGListeners);
12
- private _zooming;
13
- zoom(buff: number, userZoomCenter?: RGClientXy, e?: WheelEvent): Promise<void>;
14
- protected _zoomEnd(oldZoomValue: number, newZoomValue: number): boolean;
15
- setZoom(finalZoom: number, userZoomCenter?: RGClientXy): void;
8
+ constructor();
16
9
  /**
17
- * Get the coordinates mapped on the "relation-graph Component viewport" from the canvas coordinates
18
- * @param clientXY = {x: e.clientX, y: e.clientY}
10
+ * Zoom based on the current zoom level
11
+ * @param buff The additional zoom level to be added based on the current zoom level. A positive number indicates zooming in, and a negative number indicates zooming out, in percentage. For example: 10 means zoom in by 10%, -10 means zoom out by 10%
12
+ * @param userZoomCenter User zoom center point coordinates, default is the center point of the view
13
+ * @param e Mouse wheel event object, optional
14
+ *
19
15
  */
20
- getCanvasXyByClientXy(clientXY: RGCoordinate): RGCoordinate;
16
+ zoom(buff: number, userZoomCenter?: RGClientXy, e?: WheelEvent): void;
21
17
  /**
22
- * Get the coordinates mapped on the "relation-graph Component viewport" from the canvas coordinates
23
- * @param viewXy = {x: e.clientX - relationGraphViewBox.left, y: e.clientY - relationGraphViewBox.top}
18
+ * @inner
19
+ * @protected
24
20
  */
25
- getCanvasXyByViewXy(viewXy: RGCoordinate): RGCoordinate;
21
+ protected _performanceModeLogicHook(oldZoomValue: number, newZoomValue: number): void;
26
22
  /**
27
- * Get the coordinates mapped on the canvas from the "relation-graph Component viewport" coordinates
28
- * @param canvasCoordinate = {x: node.x, y: node.y}
23
+ * Set the canvas zoom to the specified zoom level
24
+ * @param finalZoom Target zoom level, expressed as a percentage, for example: 100 means 100%
25
+ * @param userZoomCenter User zoom center point coordinates, default is the center point of the view
26
+ *
29
27
  */
30
- getViewXyByCanvasXy(canvasCoordinate: RGCoordinate): RGCoordinate;
28
+ setZoom(finalZoom: number, userZoomCenter?: RGClientXy): void;
31
29
  }
@@ -1,18 +1,70 @@
1
- import { RGListeners, RGNode, RGRectTarget, RGOptions } from '../types';
1
+ import { RGNode, RGRectTarget } from '../../types';
2
2
  import { RelationGraphWith5Zoom } from './RelationGraphWith5Zoom';
3
+ /**
4
+ * Methods related to effects in the relation-graph component
5
+ */
3
6
  export declare class RelationGraphWith6Effect extends RelationGraphWith5Zoom {
4
- constructor(options: RGOptions, listeners: RGListeners);
7
+ constructor();
5
8
  /**
6
- * Move the center of the canvas to the center of the viewport. Note: The center of the canvas refers to the center calculated based on the distribution of nodes, not the center point of the canvas.
9
+ * <RelationGraph/> Automatically adjust the height of the canvas to fit the content, while maintaining the width of the canvas unchanged.
10
+ * - By default, the height of the <RelationGraph/> component is the height of the parent element. Sometimes we want to automatically adjust the height according to the amount of content to fit the content. This method can achieve this function.
11
+ * - Note: This method will modify the height attribute of the canvas. Please ensure that the parent element allows the height of the child element to change, otherwise it may not achieve the expected effect.
12
+ * - Note: This method is suitable for scenarios where there is less content and you want the canvas height to adapt to the content. If there is more content, it is recommended to use the zoomToFit method to ensure that the content is fully displayed.
13
+ * @param padding Padding around the content, default is 20px
14
+ *
7
15
  */
8
- moveToCenter(nodes?: (RGNode | RGRectTarget)[]): void;
16
+ fitContentHeight(padding?: number): void;
17
+ /**
18
+ * Move the specified nodes to the center of the visible area
19
+ * @param nodes Optional, defaults to all nodes in the graph
20
+ * @inner
21
+ * @protected
22
+ */
23
+ protected _moveToCenter(nodes?: (RGNode | RGRectTarget)[]): void;
24
+ /**
25
+ * Move the specified coordinates on the canvas to the center of the visible area
26
+ * @param x X coordinate on the canvas
27
+ * @param y Y coordinate on the canvas
28
+ */
29
+ setCanvasCenter(x: number, y: number): void;
9
30
  /**
10
31
  * Zoom to fit the appropriate size, which means making the specified nodes visible in the view and occupying the view as much as possible.
11
32
  * @param nodes Optional, defaults to all nodes in the graph
12
33
  */
13
34
  zoomToFit(nodes?: (RGNode | RGRectTarget)[]): void;
35
+ /**
36
+ * Enable node position animation
37
+ * - After enabling, when the node position changes, there will be a smooth transition animation effect.
38
+ */
14
39
  enableNodeXYAnimation(): void;
40
+ /**
41
+ * Disable node position animation
42
+ * - After disabling, when the node position changes, it will directly jump to the new position without animation.
43
+ */
15
44
  disableNodeXYAnimation(): void;
45
+ /**
46
+ * Enable canvas transformation animation
47
+ * - After enabling, when the canvas is panned or zoomed, there will be a smooth transition animation effect.
48
+ */
16
49
  enableCanvasAnimation(): void;
50
+ /**
51
+ * Disable canvas transformation animation
52
+ * - After disabling, when the canvas is panned or zoomed, it will directly jump to the new position or scale without animation.
53
+ */
17
54
  disableCanvasAnimation(): void;
55
+ /**
56
+ * Focus on the specified node by its ID
57
+ * @param nodeId The ID of the node to focus on
58
+ */
59
+ focusNodeById(nodeId: string): void;
60
+ /**
61
+ * @deprecated
62
+ */
63
+ focusRootNode(): void;
64
+ /**
65
+ * @inner
66
+ * @param thisNode
67
+ * @private
68
+ */
69
+ private focusNode;
18
70
  }
@@ -1,24 +1,58 @@
1
- import { RGLayouter, RGLayoutOptions, RGListeners, RGNode, RGOptions } from '../types';
1
+ import { RGLayout, RGLayoutOptions, RGNode } from '../../types';
2
2
  import { RelationGraphWith6Effect } from './RelationGraphWith6Effect';
3
+ /**
4
+ * Methods related to layout in the relation-graph component
5
+ */
3
6
  export declare class RelationGraphWith6Layout extends RelationGraphWith6Effect {
4
- constructor(options: RGOptions, listeners: RGListeners);
7
+ constructor();
5
8
  /**
6
9
  * Assign positions to the nodes in the current graph based on the layout configuration set in the options
10
+ * - By default, the first node in the graph is used as the root node for layout. You can also specify a custom root node by passing a node object or node id as a parameter.
11
+ * - If nodes were added to the graph shortly before calling this method, it will wait for a short time to ensure that the addition of nodes is completed before performing the layout.
12
+ * @param customRootNode Optional, specify a custom root node for layout, can be a node object or node id
13
+ * @return Promise<void>
7
14
  */
8
15
  doLayout(customRootNode?: RGNode | string): Promise<void>;
16
+ /**
17
+ * @inner
18
+ * @private
19
+ */
9
20
  private _doLayout;
10
- refresh(doLayout?: boolean): void;
11
- private _mainGroupNodes;
12
- placeOtherNodes(): void;
13
- placeSingleNodes(singleNodes: RGNode[]): void;
14
- placeOtherGroup(notPlacedNodes: RGNode[], placedNodes: RGNode[]): void;
15
21
  /**
16
- * If the current layout is force, you can call this method to start or stop the real-time force-directed calculation
22
+ * @inner
23
+ * @protected
24
+ * @param doLayout
25
+ */
26
+ refresh(doLayout?: boolean): Promise<void>;
27
+ /**
28
+ * @inner
29
+ * @private
30
+ */
31
+ private placeOtherNodes;
32
+ /**
33
+ * @inner
34
+ * @private
35
+ */
36
+ private placeSingleNodes;
37
+ /**
38
+ * @inner
39
+ * @private
40
+ */
41
+ private sortGroups;
42
+ /**
43
+ * @inner
44
+ * @private
45
+ */
46
+ private placeNextNetwork;
47
+ /**
48
+ * If the current layout is force-directed, you can call this method to start or stop the real-time force-directed calculation
49
+ * - Note: The center layout inherits the force layout and also supports auto layout functionality.
17
50
  */
18
51
  toggleAutoLayout(): void;
19
- private layouter;
52
+ private layoutor;
20
53
  /**
21
54
  * If the current layout is force, you can call this method to start the force-directed calculation
55
+ * - Note: The center layout inherits the force layout and also supports auto layout functionality.
22
56
  */
23
57
  startAutoLayout(): void;
24
58
  /**
@@ -26,8 +60,22 @@ export declare class RelationGraphWith6Layout extends RelationGraphWith6Effect {
26
60
  */
27
61
  stopAutoLayout(): void;
28
62
  /**
29
- * Create a layouter
30
- * @param layoutOptions
63
+ * Create a layout instance. After creating the layout instance, you can use the placeNodes method of the layout instance to layout nodes.
64
+ * - Through this method, you can create multiple layout instances with different configurations to layout different nodes of the same graph in different ways, forming a composite layout effect.
65
+ * - Example:
66
+ * ```ts
67
+ * const layoutor = graphInstance.createLayout({
68
+ * layoutName: 'tree',
69
+ * from: 'left', // left, right, top, bottom
70
+ * treeNodeGapH: 200, // Horizontal spacing between nodes
71
+ * treeNodeGapV: 50, // Vertical spacing between nodes
72
+ * });
73
+ * layoutor.placeNodes(nodes, rootNode);
74
+ * ```
75
+ * @param layoutOptions Layout configuration items, type: RGLayoutOptions. When isMainLayout is true, the configuration items here will override the layout configuration items in the overall configuration items of the graph.
76
+ * @param isMainLayout Whether it is the main layout instance. The main layout instance will affect the layout-related configuration items of the graph, and can control the auto layout function through the startAutoLayout and stopAutoLayout methods of the graph. Default value: false
77
+ * @return Layout instance A layout instance with a placeNodes method
78
+ *
31
79
  */
32
- createLayout(layoutOptions: RGLayoutOptions, isMainLayout?: boolean): RGLayouter;
80
+ createLayout<Layout extends RGLayout>(layoutOptions: RGLayoutOptions, isMainLayout?: boolean): Layout;
33
81
  }
@@ -1,54 +1,187 @@
1
- import { CreatingLinePlotOptions, CreatingNodePlotOptions, RGLine, RGLineConnectEventHandler, RGLineTarget, RGLink, RGListeners, RGNode, RGOptions, RGPosition, RGSelectionView, RGUserEvent } from '../types';
1
+ import { CreatingLinePlotOptions, CreatingNodePlotOptions, RGLine, RGLineConnectEventHandler, RGLineTarget, RGLink, RGNode, RGPosition, RGUserEvent, RGCoordinate, JsonLine } from '../../types';
2
2
  import { RelationGraphWith6Layout } from './RelationGraphWith6Layout';
3
+ /**
4
+ * The relation-graph component UI and graphInstance event bus handle user interaction events.
5
+ * - Most of the events handled here are user interaction events, while some other events are handled by the following classes:
6
+ * - Editor-related events are handled in RelationGraphWith91Editing
7
+ * - MiniView-related events are handled in RelationGraphWith92MiniView
8
+ *
9
+ */
3
10
  export declare class RelationGraphWith7Event extends RelationGraphWith6Layout {
4
- constructor(options: RGOptions, listeners: RGListeners);
5
- setCheckedNode(nodeId: string): void;
6
- setCheckedLinkAndLine(link: RGLink, line: RGLine): void;
7
- setCheckedLine(line: RGLine): void;
8
- clearChecked(): void;
9
- clearSelected(): void;
10
- updateNodeOffsetSize(nodeId: string, width: number, height: number): void;
11
- prevClickTime: number;
11
+ constructor();
12
+ private _prevClickNodeTime;
13
+ /**
14
+ * Triggered when the user clicks on a node
15
+ * @param node The clicked node object
16
+ * @param e MouseDown or TouchStart event
17
+ *
18
+ */
12
19
  onNodeClick(node: RGNode, e: RGUserEvent): void;
13
- protected nodeXYBeforeDrag: {
20
+ protected _nodeXYMappingBeforeDrag: {
14
21
  [nodeId: string]: {
15
22
  x: number;
16
23
  y: number;
17
24
  };
18
25
  };
26
+ /**
27
+ * Triggered when the user starts dragging a node
28
+ * - When the user starts dragging but does not move the node, it is considered as clicking the node, and the onNodeClick event will be triggered instead.
29
+ * @param willMoveNode The node object that will be moved
30
+ * @param e MouseDown or TouchStart event
31
+ */
19
32
  onNodeDragStart(willMoveNode: RGNode, e: RGUserEvent): void;
20
- onNodeDraged(node: RGNode, x_buff: number, y_buff: number, e: RGUserEvent): void;
21
- onNodeDragEnd(node: RGNode, e: RGUserEvent, x_buff: number, y_buff: number): void;
33
+ /**
34
+ * @inner
35
+ * @protected
36
+ */
37
+ protected canvasAutoMoving: (draggingEventXy: RGCoordinate) => boolean;
38
+ private _canvasMovingTimer;
39
+ /**
40
+ * @inner
41
+ * @protected
42
+ */
43
+ private _onNodeDragEnd;
44
+ /**
45
+ * Triggered when the user clicks on a line
46
+ * - Triggered when the user clicks on a line path or line text
47
+ * @param line The clicked line object
48
+ * @param link The link object that the line belongs to
49
+ * @param e MouseDown or TouchStart event
50
+ */
22
51
  onLineClick(line: RGLine, link: RGLink, e: RGUserEvent): void;
52
+ /**
53
+ * Triggered when the node's expand/collapse button is clicked.
54
+ * - This method will expand or collapse all descendant nodes of the node.
55
+ * - If the node is collapsed, it will be expanded; if it is expanded, it will be collapsed.
56
+ * @param node The node object to be expanded or collapsed
57
+ * @param e
58
+ */
23
59
  expandOrCollapseNode(node: RGNode, e: RGUserEvent): void;
60
+ /**
61
+ * Expand the specified node
62
+ * - This method will expand the specified node and make its child nodes visible.
63
+ * @param node The node object to be expanded
64
+ * @param e
65
+ */
24
66
  expandNode(node: RGNode, e?: RGUserEvent): void;
67
+ /**
68
+ * Collapse the specified node
69
+ * - This method will collapse the specified node and hide its child nodes.
70
+ * @param node The node object to be collapsed
71
+ * @param e
72
+ */
25
73
  collapseNode(node: RGNode, e?: RGUserEvent): void;
26
- private doLayoutWhenExpandedOrCollapsed;
27
- onCanvasDragEnd(e: RGUserEvent): void;
74
+ private _relayoutTaskTimer;
75
+ /**
76
+ * After the node is expanded or collapsed, the visibility of the related nodes needs to be recalculated, and re-layout may be required.
77
+ * @inner
78
+ * @private
79
+ */
80
+ private _effectWhenExpandedOrCollapsed;
81
+ /**
82
+ * @inner
83
+ * @private
84
+ */
85
+ private onCanvasDragEnd;
86
+ /**
87
+ * User clicks on the canvas
88
+ * @param e
89
+ */
28
90
  onCanvasClick(e: RGUserEvent): void;
29
- onCanvasSelectionEnd(selectionView: RGSelectionView, e: RGUserEvent): void;
91
+ /**
92
+ * @inner
93
+ * @private
94
+ */
95
+ private getNodeAtEvent;
96
+ /**
97
+ * @inner
98
+ * @private
99
+ */
100
+ private onCanvasSelectionEnd;
101
+ /**
102
+ * Start the "creating node" interaction state
103
+ * - You can set the callback function onCreateNode in the setting, and add the node to the graph data through graphInstance.addNodes([newNodeJson]); in the callback function.
104
+ * - You can also set templateMove in the setting to get the move event of the node during placement, so as to achieve complex logic (such as highlighting an existing node when moving to it, and recording the id of this highlighted node, so that in the onCreateNode callback function, you can directly create a new node associated with the highlighted node)
105
+ * @param e
106
+ * @param setting Settings used to set the template information of the node being created, the callback function when the creation is completed, etc.
107
+ */
30
108
  startCreatingNodePlot(e: RGUserEvent, setting: CreatingNodePlotOptions): void;
109
+ /**
110
+ * Start the "creating line" interaction state
111
+ * - When the line creation is completed, you need to call graphInstance.addLines([newLineJson]); in the onCreateLine callback function (or through the onLineBeCreated event of the <RelationGraph> component) to add the new line to the graph data.
112
+ * - You can also set fromNode in the setting to specify the starting node of the line.
113
+ * @param e
114
+ * @param setting Settings used to set the template information of the line being created, the callback function when the creation is completed, etc.
115
+ *
116
+ */
31
117
  startCreatingLinePlot(e: RGUserEvent, setting: CreatingLinePlotOptions): void;
32
- movingListener: any;
118
+ private _onMovingWhenCreatingLine;
119
+ /**
120
+ * Stop the "creating line" interaction state
121
+ * - This method is generally called by relation-graph itself, and users do not need to call this method manually. Unless the user needs to complete complex special interaction logic.
122
+ *
123
+ */
33
124
  stopCreatingLinePlot(): void;
34
- _currentMovingLineTarget: RGLineTarget | null;
35
- onMovingWhenCreatingLinePlot($event: MouseEvent): void;
36
- onCanvasClickWhenCreatingLinePlot($event: RGUserEvent): void;
37
- step1EventTime: number;
38
- onNodeClickWhenCreatingLinePlot(node: RGNode): void;
39
- onCreateLineCallback: RGLineConnectEventHandler | undefined;
40
- onCreateLine(from: RGNode, to: RGNode | RGPosition): boolean | import('../types').RGCoordinate | undefined;
41
- isNode(el: HTMLElement): RGNode | undefined;
42
- isLine(el: HTMLElement): RGLink | undefined;
43
- isLink(el: HTMLElement): RGLink | undefined;
125
+ /**
126
+ * @inner
127
+ * @private
128
+ */
129
+ private onMovingWhenCreatingLinePlot;
130
+ /**
131
+ * @inner
132
+ * @private
133
+ */
134
+ private onCanvasClickWhenCreatingLinePlot;
135
+ _step1EventTime: number;
136
+ /**
137
+ * @inner
138
+ * @private
139
+ */
140
+ private onNodeClickWhenCreatingLinePlot;
141
+ _onCreateLineCallback: RGLineConnectEventHandler | undefined;
142
+ /**
143
+ * Triggered when the creation of a line is ready. You can modify the line data in this event, or return true to prevent the line from being created (for example, if the user selects a node that is not allowed to be connected and requires the user to select another node).
144
+ * - This method will ultimately trigger the `onLineBeCreated` event of the <RelationGraph /> component. In this event, users can obtain the line data and use the graphInstance.addLines([newLineJson]) method to complete the data change and add the line to the graph.
145
+ * @param from Current line start node, may be null
146
+ * @param to Current line end node, may be null or RGPosition, Position type means the user did not select a node to connect to, but clicked on the canvas to create a line to that position.
147
+ * @returns Return true to prevent the line from being created.
148
+ * @protected
149
+ */
150
+ protected onReadyToCreateLine(from: RGNode, to: RGNode | RGPosition): false | RGCoordinate | undefined;
151
+ /**
152
+ * User right-click context menu event
153
+ * - Finally, you can get this event through the onContextmenu event, and you can get the position where the user right-clicked and the type of object clicked (canvas | line | node) and the object through this event.
154
+ * @param e
155
+ */
44
156
  onContextmenu(e: RGUserEvent): void;
157
+ /**
158
+ * Toggle fullscreen mode
159
+ - If newValue is true, enter fullscreen mode
160
+ - If newValue is false, exit fullscreen mode
161
+ - If newValue is not provided, toggle fullscreen mode
162
+ * @param newValue
163
+ */
45
164
  fullscreen(newValue?: boolean): Promise<void>;
46
- focusNodeById(nodeId: string): void;
47
- focusRootNode(): void;
48
- handleSelect(thisNode: RGNode): void;
49
- private _wheelAction;
50
- private _wheelBuff;
165
+ /**
166
+ * User scroll mouse wheel event
167
+ * - Supports touchpad and mouse wheel
168
+ * - This event will determine whether to zoom the canvas or scroll the canvas based on whether the user presses the Ctrl/Cmd key and options.wheelEventAction
169
+ * - When options.disableWheelEvent is true, there will be no response
170
+ * @param e
171
+ */
51
172
  onMouseWheel(e: WheelEvent): true | undefined;
173
+ /**
174
+ * @inner
175
+ * @private
176
+ */
177
+ private _applyWheelEvent;
178
+ private _mouseWheelTimer;
179
+ private _mouseWheelEventPrevApplyTime;
180
+ private _mouseWheelForce;
181
+ /**
182
+ * @inner
183
+ * @private
184
+ */
52
185
  private _onMouseWheel;
53
186
  /**
54
187
  * Scroll the canvas
@@ -56,19 +189,83 @@ export declare class RelationGraphWith7Event extends RelationGraphWith6Layout {
56
189
  * @param buffY - The amount to scroll
57
190
  */
58
191
  scrollView(buffX: number, buffY: number): void;
59
- onLineDragStart(line: RGLine, e: RGUserEvent): void;
192
+ /**
193
+ * @inner
194
+ * @private
195
+ */
196
+ private onLineDragStart;
60
197
  onLineDragEnd(x_buff: number, y_buff: number, e: RGUserEvent): void;
198
+ /**
199
+ * User Start Drag Canvas
200
+ * - This method will determine whether to create a selection area or move the canvas based on whether the user is holding down the Shift key or the configuration item options.dragEventAction.
201
+ * - When options.dragEventAction is set to 'none', clicking and dragging on the canvas will only trigger a click event and will not create a selection area or move the canvas.
202
+ * @param e
203
+ */
61
204
  onCanvasDragStart(e: RGUserEvent): void;
205
+ /**
206
+ * User Start Move Canvas
207
+ *
208
+ * @param e
209
+ * @param forceStartMove
210
+ */
62
211
  startMoveCanvas(e: RGUserEvent, forceStartMove?: boolean): void;
212
+ /**
213
+ * @inner
214
+ * @private
215
+ */
63
216
  protected onCanvasDragging(newX: number, newY: number, buffX: number, buffY: number): void;
64
- onCanvasDragStop(x_buff: number, y_buff: number, e: RGUserEvent): void;
65
- startCreateSelection(e: RGUserEvent): void;
217
+ /**
218
+ * @inner
219
+ * @param e
220
+ */
221
+ private onCanvasDragStop;
222
+ /**
223
+ * @inner
224
+ * @param e
225
+ */
226
+ private startCreateSelection;
66
227
  private _fullscreenchangeHandler;
67
- addFullscreenListener(): void;
68
- removeFullscreenListener(): void;
228
+ /**
229
+ * Monitor fullscreen changes
230
+ * @inner
231
+ * @private
232
+ */
233
+ protected addFullscreenListener(): void;
234
+ /**
235
+ * Remove fullscreen change monitoring
236
+ * @inner
237
+ * @private
238
+ */
239
+ protected removeFullscreenListener(): void;
240
+ /**
241
+ * Default line connect end handler for <RGConnectTarget /> component
242
+ * - This method does not make any data changes. Users need to obtain the line information through the onLineConnectEnd event of the <RGConnectTarget /> component, and use the graphInstance.addLines([newLineJson]) method to complete the data change.
243
+ *
244
+ * @inner
245
+ * @private
246
+ */
247
+ defaultLineConnectEndHandler(from: RGNode | RGLineTarget | RGPosition, to: RGNode | RGLineTarget | RGPosition, newLine?: JsonLine): void;
248
+ /**
249
+ * Default line vertex change handler
250
+ * - This method does not make any data changes. Users need to obtain the line information through the onLineBeCreated event when the line is created or the line vertex is changed, and use the graphInstance.addLines([newLineJson]) method to complete the data change.
251
+ * - Why does the line vertex change also need to be added through addLines to add data?
252
+ * - Because the implementation of line vertex change is to delete the original line data first, and then add a new line data to achieve it. However, the line data obtained through the onLineBeCreated event will be a line data with an id and all information identical to the original line.
253
+ *
254
+ * @inner
255
+ * @param from
256
+ * @param to
257
+ * @param newLine
258
+ */
259
+ defaultLineVertexBeChangedHandler(from: RGNode | RGLineTarget | RGPosition, to: RGNode | RGLineTarget | RGPosition, newLine?: JsonLine): void;
69
260
  /**
70
261
  * Sleep for a specified amount of time
71
262
  * @param time - The time to sleep in milliseconds
72
263
  */
73
264
  sleep(time: number): Promise<void>;
265
+ /**
266
+ * This method is called by the force layout engine to update the view after each iteration of the force layout calculation is completed.
267
+ * @inner
268
+ * @private
269
+ */
270
+ forceLayoutTickCallback(): void;
74
271
  }