app-v3-scripts-editor 1.7.0 → 1.7.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.
|
@@ -21,7 +21,7 @@ type GlobalSettingData = {
|
|
|
21
21
|
};
|
|
22
22
|
export interface ScriptEditorInterface {
|
|
23
23
|
getFlowJson: () => ReactFlowJsonObject | undefined;
|
|
24
|
-
loadFlowJson: (flow: ReactFlowJsonObject) =>
|
|
24
|
+
loadFlowJson: (flow: ReactFlowJsonObject) => boolean;
|
|
25
25
|
moveToNode: (nodeId: string) => void;
|
|
26
26
|
globalSettingData: () => GlobalSettingData | undefined;
|
|
27
27
|
openGlobalSetting: (data: GlobalSettingData) => void;
|
|
@@ -29,7 +29,7 @@ export interface ScriptEditorInterface {
|
|
|
29
29
|
nodes: Node[];
|
|
30
30
|
edges: Edge[];
|
|
31
31
|
viewport: Viewport;
|
|
32
|
-
}) => void) => void;
|
|
32
|
+
}) => void, enabled?: boolean) => void;
|
|
33
33
|
}
|
|
34
34
|
export interface ScriptEditorProps {
|
|
35
35
|
onAlertsChange?: (values: UseErrorsAndInfosReturn) => void;
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
+
import { useStoreApi } from '@xyflow/react';
|
|
2
|
+
declare function getFlowState(storeApi: ReturnType<typeof useStoreApi>): {
|
|
3
|
+
nodes: import('@xyflow/react').Node[];
|
|
4
|
+
edges: import('@xyflow/react').Edge[];
|
|
5
|
+
viewport: {
|
|
6
|
+
x: number;
|
|
7
|
+
y: number;
|
|
8
|
+
zoom: number;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
1
11
|
export type FlowChangeType = {
|
|
2
|
-
cb: (data:
|
|
3
|
-
nodes: any[];
|
|
4
|
-
edges: any[];
|
|
5
|
-
viewport: {
|
|
6
|
-
x: number;
|
|
7
|
-
y: number;
|
|
8
|
-
zoom: number;
|
|
9
|
-
};
|
|
10
|
-
}) => void | Promise<void>;
|
|
12
|
+
cb: (data: ReturnType<typeof getFlowState>) => void | Promise<void>;
|
|
11
13
|
delay?: number;
|
|
14
|
+
enabled?: boolean;
|
|
12
15
|
};
|
|
13
|
-
export declare function useFlowChange({ cb, delay }: FlowChangeType): {
|
|
16
|
+
export declare function useFlowChange({ cb, delay, enabled }: FlowChangeType): {
|
|
14
17
|
commit: import('lodash').DebouncedFunc<() => void>;
|
|
18
|
+
resetCommitState: () => void;
|
|
15
19
|
};
|
|
20
|
+
export {};
|