@relation-graph/react 3.0.1 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/relation-graph.js +6 -6
- package/relation-graph.mjs +1826 -1644
- package/relation-graph.umd.js +6 -6
- package/types/packages/platforms/react/src/index.d.ts +10 -2
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGCanvasContent.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGCanvasContent4CreatingLine.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGCanvasContent4FakeLines.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGCanvasContent4Lines.d.ts +1 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGLinePath.d.ts +1 -0
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RGLineText.d.ts +3 -1
- package/types/packages/platforms/vue2/src/core4vue/RGLineContent.vue.d.ts +5 -4
- package/types/packages/platforms/vue2/src/core4vue/RGLinePath.vue.d.ts +1 -2
- package/types/packages/platforms/vue2/src/core4vue/editing/RGConnectTarget.vue.d.ts +32 -2
- package/types/packages/platforms/vue2/src/core4vue/editing/RGEditingLineController.vue.d.ts +7 -0
- package/types/packages/platforms/vue2/src/index.d.ts +39 -4
- package/types/packages/relation-graph-models/data/RGDataDefine.d.ts +2 -2
- package/types/packages/relation-graph-models/data/RGDataGetter.d.ts +3 -3
- package/types/packages/relation-graph-models/data/RGDataProvider.d.ts +3 -3
- package/types/packages/relation-graph-models/data/RGNodeDataUtils.d.ts +5 -2
- package/types/packages/relation-graph-models/layouts/RGForceLayout.d.ts +18 -13
- package/types/packages/relation-graph-models/layouts/analyzers/BasicNetworkAnalyzer.d.ts +1 -0
- package/types/packages/relation-graph-models/layouts/tmp/old.d.ts +1 -0
- package/types/packages/relation-graph-models/models/RelationGraphBase.d.ts +2 -2
- package/types/packages/relation-graph-models/models/RelationGraphWith2Data1Getter.d.ts +15 -7
- package/types/packages/relation-graph-models/models/RelationGraphWith2Data2Analysis.d.ts +6 -1
- package/types/packages/relation-graph-models/models/RelationGraphWith2Data3Update.d.ts +2 -0
- package/types/packages/relation-graph-models/models/RelationGraphWith2Data4ConnectTarget.d.ts +3 -3
- package/types/packages/relation-graph-models/models/RelationGraphWith4Line.d.ts +6 -2
- package/types/packages/relation-graph-models/models/RelationGraphWith6Layout.d.ts +5 -1
- package/types/packages/relation-graph-models/models/RelationGraphWith7Event.d.ts +2 -3
- package/types/packages/relation-graph-models/models/RelationGraphWith95Dom.d.ts +3 -0
- package/types/packages/types.ts +36 -32
- package/types/packages/platforms/react/src/relation-graph/RGPovider.d.ts +0 -7
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RelationLinkerContent.d.ts +0 -4
- package/types/packages/platforms/react/src/relation-graph/src/core4react/RelationView.d.ts +0 -4
- package/types/packages/platforms/react/src/relation-graph/src/core4react/slots/NewCanvas.d.ts +0 -20
- package/types/packages/platforms/react/src/relation-graph/src/core4react/slots/NewCanvasV2.d.ts +0 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/slots/NewCanvasV3.d.ts +0 -1
- package/types/packages/platforms/react/src/relation-graph/src/core4react/slots/RGSlotOnSVGDefs.d.ts +0 -3
- package/types/packages/platforms/react/src/relation-graph/src/core4react/slots/RGSlotOnToolbar.d.ts +0 -3
- package/types/packages/platforms/react/src/relation-graph/src/core4react/store/reducers/StockStore.d.ts +0 -8
- package/types/packages/platforms/react/src/relation-graph/src/core4react/widgets/GraphDebugPanel.d.ts +0 -3
- package/types/packages/platforms/react/src/types.d.ts +0 -1
- package/types/packages/platforms/react/vite.config.d.ts +0 -2
- package/types/packages/platforms/vue2/src/core4vue/RGLineText.vue.d.ts +0 -33
- package/types/packages/platforms/vue2/src/core4vue/widgets/GraphDebugPanel.vue.d.ts +0 -12
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/RGCanvas.vue.d.ts +0 -34
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/RGCanvasContent.vue.d.ts +0 -37
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/RGEasyView.vue.d.ts +0 -2
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/RGFakeNode.vue.d.ts +0 -32
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/RGGraphDefs.vue.d.ts +0 -29
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/RGLineContent.vue.d.ts +0 -12
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/RGLinePath.vue.d.ts +0 -16
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/RGLinePeel.vue.d.ts +0 -29
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/RGLineText.vue.d.ts +0 -27
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/RGNodeExpandHolder.vue.d.ts +0 -18
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/RGNodePeel.vue.d.ts +0 -40
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/RGProvider.vue.d.ts +0 -34
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/RelationGraph.vue.d.ts +0 -39
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/RelationLinker.vue.d.ts +0 -130
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/RelationLinkerCanvas.vue.d.ts +0 -23
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/RelationLinkerView.vue.d.ts +0 -24
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/editing/RGConnectSource.vue.d.ts +0 -45
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/editing/RGConnectTarget.vue.d.ts +0 -46
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/editing/RGEditingConnectController.vue.d.ts +0 -23
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/editing/RGEditingConnectPoints.vue.d.ts +0 -16
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/editing/RGEditingLineController.vue.d.ts +0 -56
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/editing/RGEditingNearNodeWidget.vue.d.ts +0 -30
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/editing/RGEditingNodeController.vue.d.ts +0 -17
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/editing/RGEditingReferenceLine.vue.d.ts +0 -15
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/editing/RGEditingResize.vue.d.ts +0 -19
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/editing/RGMiniView.vue.d.ts +0 -17
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/index.vue.d.ts +0 -143
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/widgets/GraphBackground.vue.d.ts +0 -49
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/widgets/GraphDebugPanel.vue.d.ts +0 -2
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/widgets/GraphLoading.vue.d.ts +0 -2
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/widgets/GraphMoveOperator.vue.d.ts +0 -2
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/widgets/GraphOperateStuff.vue.d.ts +0 -19
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/widgets/GraphToolBar.vue.d.ts +0 -31
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/widgets/GraphWatermark.vue.d.ts +0 -56
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/widgets/GraphXsToolBar.vue.d.ts +0 -31
- package/types/packages/platforms/vue3/src/relation-graph/src/core4vue3/widgets/RGIcons.vue.d.ts +0 -15
- package/types/packages/relation-graph-models/layouters/RGBaseLayouter.d.ts +0 -36
- package/types/packages/relation-graph-models/layouters/RGCenterLayouter.d.ts +0 -12
- package/types/packages/relation-graph-models/layouters/RGCircleLayouter.d.ts +0 -8
- package/types/packages/relation-graph-models/layouters/RGFixedLayouter.d.ts +0 -11
- package/types/packages/relation-graph-models/layouters/RGFolderLayouter.d.ts +0 -17
- package/types/packages/relation-graph-models/layouters/RGForceLayouter.d.ts +0 -71
- package/types/packages/relation-graph-models/layouters/RGForceLayouterV2.d.ts +0 -59
- package/types/packages/relation-graph-models/layouters/RGSmartTreeLayouter.d.ts +0 -16
- package/types/packages/relation-graph-models/layouters/RGTreeLayouter.d.ts +0 -18
- package/types/packages/relation-graph-models/models/RGLineDataUtils.d.ts +0 -9
- package/types/packages/relation-graph-models/models/RGNodeDataUtils.d.ts +0 -14
- package/types/packages/relation-graph-models/models/RGOptionsDataUtils.d.ts +0 -11
- package/types/packages/relation-graph-models/models/RelationGraphFinal.d.ts +0 -11
- package/types/packages/relation-graph-models/models/RelationGraphReact.d.ts +0 -5
- package/types/packages/relation-graph-models/models/RelationGraphWith1Dom.d.ts +0 -76
- package/types/packages/relation-graph-models/models/RelationGraphWith3Image.d.ts +0 -20
- package/types/packages/relation-graph-models/models/RelationGraphWith8Update.d.ts +0 -23
- package/types/packages/relation-graph-models/types.d.ts +0 -903
- package/types/react.d.ts +0 -201
- package/types/svelte.d.ts +0 -170
- package/types/vue2.d.ts +0 -862
- package/types/vue3.d.ts +0 -1246
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { JsonLine, RGLine, RGLink } from '../types';
|
|
2
|
-
export declare const json2Line: (originData: JsonLine) => RGLine;
|
|
3
|
-
export declare const transLineToJson: (line: RGLine) => JsonLine | undefined;
|
|
4
|
-
export declare const transLinkToJson: (link: RGLink, lineJsonArray: JsonLine[]) => void;
|
|
5
|
-
declare const _default: {
|
|
6
|
-
json2Line: (originData: JsonLine) => RGLine;
|
|
7
|
-
transLinkToJson: (link: RGLink, lineJsonArray: JsonLine[]) => void;
|
|
8
|
-
};
|
|
9
|
-
export default _default;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { JsonNode, RGNode, RGOptions } from '../types';
|
|
2
|
-
export declare const newNodeTemplate: {
|
|
3
|
-
id: string;
|
|
4
|
-
x: number;
|
|
5
|
-
y: number;
|
|
6
|
-
text: string;
|
|
7
|
-
};
|
|
8
|
-
export declare const json2Node: (originData: JsonNode, graphOptions?: RGOptions) => RGNode;
|
|
9
|
-
export declare const transNodeToJson: (node: RGNode) => JsonNode | undefined;
|
|
10
|
-
declare const _default: {
|
|
11
|
-
json2Node: (originData: JsonNode, graphOptions?: RGOptions) => RGNode;
|
|
12
|
-
transNodeToJson: (node: RGNode) => JsonNode | undefined;
|
|
13
|
-
};
|
|
14
|
-
export default _default;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { RGLayoutOptions, RGOptions, RGOptionsFull } from '../types';
|
|
2
|
-
export declare const createDefaultConfig: (userOptions: RGOptions) => RGOptionsFull;
|
|
3
|
-
export declare const applyDefaultOptionsByLayout: (thisLayout: RGLayoutOptions, _options: RGOptionsFull) => void;
|
|
4
|
-
export declare const appendDefaultOptions4Layout: (layoutOptions: RGLayoutOptions) => void;
|
|
5
|
-
export declare const newInstanceOptions: (options: RGOptions) => RGOptionsFull;
|
|
6
|
-
declare const _default: {
|
|
7
|
-
newInstanceOptions: (options: RGOptions) => RGOptionsFull;
|
|
8
|
-
createDefaultConfig: (userOptions: RGOptions) => RGOptionsFull;
|
|
9
|
-
applyDefaultOptionsByLayout: (thisLayout: RGLayoutOptions, _options: RGOptionsFull) => void;
|
|
10
|
-
};
|
|
11
|
-
export default _default;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { RGListeners, RGOptions } from '../types';
|
|
2
|
-
import { RelationGraphWith92MiniView } from './RelationGraphWith92MiniView';
|
|
3
|
-
export declare class RelationGraphFinal extends RelationGraphWith92MiniView {
|
|
4
|
-
constructor(options: RGOptions, listeners: RGListeners);
|
|
5
|
-
setListeners(listeners: RGListeners): void;
|
|
6
|
-
/**
|
|
7
|
-
* [Used internally by relation-graph], this method will be called to initialize some configurations based on options (such as creating a layouter based on the options.layout configuration), and to obtain information such as viewport size.
|
|
8
|
-
*/
|
|
9
|
-
ready(): void;
|
|
10
|
-
beforeUnmount(): void;
|
|
11
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { RelationGraphBase } from './RelationGraphBase';
|
|
2
|
-
import { RGLine, RGListeners, RGNode, RGOptions } from '../types';
|
|
3
|
-
export declare class RelationGraphWith1Dom extends RelationGraphBase {
|
|
4
|
-
$dom: HTMLDivElement;
|
|
5
|
-
$canvasDom: HTMLDivElement;
|
|
6
|
-
protected resizeObserver: ResizeObserver;
|
|
7
|
-
protected resizeListenerMap: WeakMap<object, any>;
|
|
8
|
-
protected domToNodeIdMap: WeakMap<Element, string>;
|
|
9
|
-
constructor(options: RGOptions, listeners: RGListeners);
|
|
10
|
-
protected initDom(): void;
|
|
11
|
-
_rgAsConnectArea: boolean;
|
|
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
|
-
private onKeyDownHanlder;
|
|
18
|
-
private onKeyUpHanlder;
|
|
19
|
-
protected addKeyboardListener(): void;
|
|
20
|
-
protected removeKeyboardListener(): void;
|
|
21
|
-
/**
|
|
22
|
-
* [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).
|
|
23
|
-
* @param relationGraphDom:HTMLDivElement canvas DOM
|
|
24
|
-
*/
|
|
25
|
-
setCanvasDom(canvasDom: HTMLDivElement): void;
|
|
26
|
-
$lineTextContainer4NormalLine: HTMLDivElement;
|
|
27
|
-
$lineTextContainer4FakeLine: HTMLDivElement;
|
|
28
|
-
getLineTextContainer(line: RGLine): HTMLDivElement | undefined;
|
|
29
|
-
/**
|
|
30
|
-
* Get the RelationGraph component DOM
|
|
31
|
-
* @return relationGraphDom:HTMLDivElement RelationGraph container DOM
|
|
32
|
-
*/
|
|
33
|
-
getBoundingClientRect(): DOMRect;
|
|
34
|
-
/**
|
|
35
|
-
* Monitor the size changes of a DOM element using ResizeObserver
|
|
36
|
-
* @param dom
|
|
37
|
-
* @param callback
|
|
38
|
-
* @protected
|
|
39
|
-
*/
|
|
40
|
-
protected addResizeListener(dom: HTMLElement, callback: (width: number, height: number) => void): void;
|
|
41
|
-
/**
|
|
42
|
-
* Node DOM resize event handler
|
|
43
|
-
* @param dom
|
|
44
|
-
* @param width
|
|
45
|
-
* @param height
|
|
46
|
-
* @private
|
|
47
|
-
*/
|
|
48
|
-
private _onNodeDomResize;
|
|
49
|
-
/**
|
|
50
|
-
* Node DOM resize event handler
|
|
51
|
-
* @param dom
|
|
52
|
-
* @param node
|
|
53
|
-
* @param width
|
|
54
|
-
* @param height
|
|
55
|
-
* @private
|
|
56
|
-
*/
|
|
57
|
-
private _onNodeResize;
|
|
58
|
-
/**
|
|
59
|
-
* [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.
|
|
60
|
-
* @param dom The DOM element corresponding to the Node component
|
|
61
|
-
* @param node The JS data object of the Node
|
|
62
|
-
*/
|
|
63
|
-
addNodeResizeListener(dom: HTMLElement, node: RGNode): void;
|
|
64
|
-
/**
|
|
65
|
-
* [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.
|
|
66
|
-
* @param dom The DOM element corresponding to the Node component
|
|
67
|
-
*/
|
|
68
|
-
removeNodeResizeListener(dom: HTMLElement): void;
|
|
69
|
-
/**
|
|
70
|
-
* Remove size change monitoring for the DOM element
|
|
71
|
-
* @param dom
|
|
72
|
-
* @protected
|
|
73
|
-
*/
|
|
74
|
-
protected removeResizeListener(dom: HTMLElement): void;
|
|
75
|
-
protected destroyResizeObserver(): void;
|
|
76
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { RGListeners, RGOptions } from '../types';
|
|
2
|
-
import { RelationGraphWith2Data } from './RelationGraphWith2Data';
|
|
3
|
-
export declare class RelationGraphWith3Image extends RelationGraphWith2Data {
|
|
4
|
-
constructor(options: RGOptions, listeners: RGListeners);
|
|
5
|
-
private $watermarkDom;
|
|
6
|
-
private $watermarkPosition;
|
|
7
|
-
private $backgroundDom;
|
|
8
|
-
setWatermarkDom(watermarkDom: HTMLDivElement | null, forImage?: boolean, forDisplay?: boolean, position?: string): void;
|
|
9
|
-
setBackgroundDom(backgroundDom: HTMLDivElement | null, forImage?: boolean, forDisplay?: boolean): void;
|
|
10
|
-
dataURLToBlob(dataurl: string): Blob | undefined;
|
|
11
|
-
createGraphCanvas(format?: string): Promise<HTMLCanvasElement>;
|
|
12
|
-
private mergeCanvas;
|
|
13
|
-
private createGraphBackgroundCanvas;
|
|
14
|
-
private createGraphWatermarkCanvas;
|
|
15
|
-
private createGraphMainCanvas;
|
|
16
|
-
createImage(exportDom: HTMLDivElement, opts: any, format: string, fileName: string): Promise<any>;
|
|
17
|
-
getImageBase64(format?: string): Promise<void>;
|
|
18
|
-
downloadAsImage(format?: string, fileName?: string): Promise<void>;
|
|
19
|
-
downloadImageAsFile(canvas: HTMLCanvasElement, format: string, fileName: string): Promise<void>;
|
|
20
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { RGJsonData, RGListeners, RGOptions } from '../types';
|
|
2
|
-
import { RelationGraphWith7Event } from './RelationGraphWith7Event';
|
|
3
|
-
export declare class RelationGraphWith8Update extends RelationGraphWith7Event {
|
|
4
|
-
constructor(options: RGOptions, listeners: RGListeners);
|
|
5
|
-
dataUpdated(): void;
|
|
6
|
-
setOptions(options: RGOptions): void;
|
|
7
|
-
setRootNodeId(rootNodeId: string): void;
|
|
8
|
-
getRootNode(): import('../types').RGNode | undefined;
|
|
9
|
-
setCheckedNode(nodeId: string): void;
|
|
10
|
-
getCheckedNode(): import('../types').RGNode | undefined;
|
|
11
|
-
getCheckedLine(): import('../types').RGFakeLine | undefined;
|
|
12
|
-
getSelectedNodes(): import('../types').RGNode[];
|
|
13
|
-
getEditingNodes(): import('../types').RGNode[];
|
|
14
|
-
setJsonData(jsonData: RGJsonData): Promise<void>;
|
|
15
|
-
/**
|
|
16
|
-
* Append data to the graph
|
|
17
|
-
* @param jsonData
|
|
18
|
-
* @param isRelayout Whether to re-layout after appending data
|
|
19
|
-
*/
|
|
20
|
-
appendJsonData(jsonData: RGJsonData, isRelayout?: boolean): Promise<void>;
|
|
21
|
-
applyInitialData(initialData: RGJsonData): Promise<void>;
|
|
22
|
-
fitContentHeight(padding?: number): void;
|
|
23
|
-
}
|