@sunspirytus/xflow-core 1.0.52-1 → 1.0.52-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/README.md +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/es/command/graph-command.d.ts +12 -12
- package/es/command-contributions/components/context.d.ts +13 -6
- package/es/command-contributions/components/index.d.ts +1 -1
- package/es/command-contributions/graph/graph-render.d.ts +2 -2
- package/es/command-contributions/node/node-add.d.ts +1 -1
- package/es/common/position.d.ts +2 -1
- package/es/common/rx-model-hook.d.ts +2 -1
- package/es/common/uuid.js +2 -1
- package/es/common/uuid.js.map +1 -1
- package/es/hooks/components/index.d.ts +1 -1
- package/es/hooks/config.d.ts +4 -4
- package/es/hooks/interface.d.ts +2 -2
- package/es/keybinding/components/index.d.ts +1 -1
- package/es/model-service/components/index.d.ts +1 -1
- package/es/toolbar/toolbar-registry.d.ts +2 -1
- package/es/xflow-main/application.d.ts +4 -4
- package/es/xflow-main/application.js +1 -1
- package/es/xflow-main/application.js.map +1 -1
- package/es/xflow-main/components/app-context.d.ts +11 -3
- package/es/xflow-main/components/app-extension-module.d.ts +2 -1
- package/es/xflow-main/components/extension-context.d.ts +3 -2
- package/es/xflow-main/components/extension-registry.d.ts +2 -2
- package/es/xflow-main/components/global-config-context.d.ts +14 -3
- package/es/xflow-main/graph/config.d.ts +5 -5
- package/lib/command/graph-command.d.ts +12 -12
- package/lib/command-contributions/components/context.d.ts +13 -6
- package/lib/command-contributions/components/index.d.ts +1 -1
- package/lib/command-contributions/graph/graph-render.d.ts +2 -2
- package/lib/command-contributions/node/node-add.d.ts +1 -1
- package/lib/common/position.d.ts +2 -1
- package/lib/common/rx-model-hook.d.ts +2 -1
- package/lib/common/uuid.js +2 -1
- package/lib/common/uuid.js.map +1 -1
- package/lib/hooks/components/index.d.ts +1 -1
- package/lib/hooks/config.d.ts +4 -4
- package/lib/hooks/interface.d.ts +2 -2
- package/lib/keybinding/components/index.d.ts +1 -1
- package/lib/model-service/components/index.d.ts +1 -1
- package/lib/toolbar/toolbar-registry.d.ts +2 -1
- package/lib/xflow-main/application.d.ts +4 -4
- package/lib/xflow-main/application.js +0 -1
- package/lib/xflow-main/application.js.map +1 -1
- package/lib/xflow-main/components/app-context.d.ts +11 -3
- package/lib/xflow-main/components/app-extension-module.d.ts +2 -1
- package/lib/xflow-main/components/extension-context.d.ts +3 -2
- package/lib/xflow-main/components/extension-registry.d.ts +2 -2
- package/lib/xflow-main/components/global-config-context.d.ts +14 -3
- package/lib/xflow-main/graph/config.d.ts +5 -5
- package/package.json +8 -4
|
@@ -37,8 +37,8 @@ export declare class GraphCommandRegistry implements IGraphCommandService, IFron
|
|
|
37
37
|
*/
|
|
38
38
|
protected readonly factories: Map<string, ICommandFactory<any, any, {
|
|
39
39
|
graphOptions: import("@sunspirytus/xflow-hook").HookHub<import("@antv/x6").Graph.Options, import("@antv/x6").Graph.Options>;
|
|
40
|
-
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
41
|
-
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
40
|
+
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.INodeRender<any>>, Map<string, import("..").NsGraph.INodeRender<any>>>;
|
|
41
|
+
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.IEdgeRender<any>>, Map<string, import("..").NsGraph.IEdgeRender<any>>>;
|
|
42
42
|
afterGraphInit: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
43
43
|
beforeGraphDestroy: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
44
44
|
x6Events: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IEventCollection, import("../hooks/interface").IEventSubscription>;
|
|
@@ -67,8 +67,8 @@ export declare class GraphCommandRegistry implements IGraphCommandService, IFron
|
|
|
67
67
|
onStart(): void;
|
|
68
68
|
executeCommandPipeline(cmdOptions: IGraphPipelineCommand[]): Promise<ICommandHandler<any, any, {
|
|
69
69
|
graphOptions: import("@sunspirytus/xflow-hook").HookHub<import("@antv/x6").Graph.Options, import("@antv/x6").Graph.Options>;
|
|
70
|
-
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
71
|
-
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
70
|
+
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.INodeRender<any>>, Map<string, import("..").NsGraph.INodeRender<any>>>;
|
|
71
|
+
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.IEdgeRender<any>>, Map<string, import("..").NsGraph.IEdgeRender<any>>>;
|
|
72
72
|
afterGraphInit: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
73
73
|
beforeGraphDestroy: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
74
74
|
x6Events: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IEventCollection, import("../hooks/interface").IEventSubscription>;
|
|
@@ -76,8 +76,8 @@ export declare class GraphCommandRegistry implements IGraphCommandService, IFron
|
|
|
76
76
|
/** 执行 Command:会在undo stack中push cmd */
|
|
77
77
|
executeCommand<Args = any, Result = any>(commandId: string, cmdArgs: Args, hook?: IRuntimeHook<Args, Result>): Promise<ICommandHandler<Args, Result, {
|
|
78
78
|
graphOptions: import("@sunspirytus/xflow-hook").HookHub<import("@antv/x6").Graph.Options, import("@antv/x6").Graph.Options>;
|
|
79
|
-
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
80
|
-
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
79
|
+
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.INodeRender<any>>, Map<string, import("..").NsGraph.INodeRender<any>>>;
|
|
80
|
+
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.IEdgeRender<any>>, Map<string, import("..").NsGraph.IEdgeRender<any>>>;
|
|
81
81
|
afterGraphInit: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
82
82
|
beforeGraphDestroy: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
83
83
|
x6Events: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IEventCollection, import("../hooks/interface").IEventSubscription>;
|
|
@@ -85,8 +85,8 @@ export declare class GraphCommandRegistry implements IGraphCommandService, IFron
|
|
|
85
85
|
/** 执行 unod Command:不会在undo stack中push新的command记录 */
|
|
86
86
|
executeUndoCommand<T = any>(commandId: string, cmdArgs: T, hook?: IRuntimeHook<T, any>): Promise<ICommandHandler<any, any, {
|
|
87
87
|
graphOptions: import("@sunspirytus/xflow-hook").HookHub<import("@antv/x6").Graph.Options, import("@antv/x6").Graph.Options>;
|
|
88
|
-
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
89
|
-
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
88
|
+
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.INodeRender<any>>, Map<string, import("..").NsGraph.INodeRender<any>>>;
|
|
89
|
+
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.IEdgeRender<any>>, Map<string, import("..").NsGraph.IEdgeRender<any>>>;
|
|
90
90
|
afterGraphInit: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
91
91
|
beforeGraphDestroy: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
92
92
|
x6Events: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IEventCollection, import("../hooks/interface").IEventSubscription>;
|
|
@@ -98,8 +98,8 @@ export declare class GraphCommandRegistry implements IGraphCommandService, IFron
|
|
|
98
98
|
*/
|
|
99
99
|
createCommand<T = any>(commandId: string, cmdArgs: T, hook?: IRuntimeHook<T, any>): Promise<ICommandHandler<any, any, {
|
|
100
100
|
graphOptions: import("@sunspirytus/xflow-hook").HookHub<import("@antv/x6").Graph.Options, import("@antv/x6").Graph.Options>;
|
|
101
|
-
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
102
|
-
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
101
|
+
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.INodeRender<any>>, Map<string, import("..").NsGraph.INodeRender<any>>>;
|
|
102
|
+
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.IEdgeRender<any>>, Map<string, import("..").NsGraph.IEdgeRender<any>>>;
|
|
103
103
|
afterGraphInit: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
104
104
|
beforeGraphDestroy: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
105
105
|
x6Events: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IEventCollection, import("../hooks/interface").IEventSubscription>;
|
|
@@ -168,8 +168,8 @@ export declare class GraphCommandRegistry implements IGraphCommandService, IFron
|
|
|
168
168
|
*/
|
|
169
169
|
getAllFactories(): [string, ICommandFactory<any, any, {
|
|
170
170
|
graphOptions: import("@sunspirytus/xflow-hook").HookHub<import("@antv/x6").Graph.Options, import("@antv/x6").Graph.Options>;
|
|
171
|
-
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
172
|
-
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
171
|
+
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.INodeRender<any>>, Map<string, import("..").NsGraph.INodeRender<any>>>;
|
|
172
|
+
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.IEdgeRender<any>>, Map<string, import("..").NsGraph.IEdgeRender<any>>>;
|
|
173
173
|
afterGraphInit: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
174
174
|
beforeGraphDestroy: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
175
175
|
x6Events: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IEventCollection, import("../hooks/interface").IEventSubscription>;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { IGraphCommandService } from '../../command';
|
|
3
3
|
import type { IModelService } from '../../model-service';
|
|
4
|
-
import type { Node as X6Node, Edge as X6Edge } from '@antv/x6';
|
|
4
|
+
import type { Graph as X6Graph, Node as X6Node, Edge as X6Edge } from '@antv/x6';
|
|
5
5
|
import type { NsGraph } from '../../interface';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
interface IAppContext {
|
|
7
|
+
cell: X6Node | X6Edge;
|
|
8
|
+
x6Graph: X6Graph;
|
|
9
|
+
commands: IGraphCommandService;
|
|
10
|
+
modelService: IModelService;
|
|
11
|
+
}
|
|
12
|
+
export declare const AppContext: React.Context<IAppContext>;
|
|
13
|
+
export declare const useAppContext: () => IAppContext;
|
|
14
|
+
export declare function getNodeReactComponent(Component: React.ComponentType<NsGraph.IReactNodeProps>, commands: IGraphCommandService, modelService: IModelService): (x6Node: X6Node) => React.JSX.Element;
|
|
15
|
+
export declare function getEdgeReactComponent(Component: React.ComponentType<NsGraph.IReactEdgeProps>, commands: IGraphCommandService, modelService: IModelService): (x6Edge: X6Edge) => React.JSX.Element;
|
|
10
16
|
/** 获取节点选中状态 */
|
|
11
|
-
export declare const useIsNodeSelected: () =>
|
|
17
|
+
export declare const useIsNodeSelected: () => boolean[];
|
|
18
|
+
export {};
|
|
@@ -7,5 +7,5 @@ export declare const CommandsRegistry: React.FC<IProps>;
|
|
|
7
7
|
interface IValueProxy<T> {
|
|
8
8
|
getValue: () => T;
|
|
9
9
|
}
|
|
10
|
-
export declare const createCmdConfig: <T extends unknown = any>(addOptions: (config: CommandConfig, container: IValueProxy<T>) => void) => (value?: T) =>
|
|
10
|
+
export declare const createCmdConfig: <T extends unknown = any>(addOptions: (config: CommandConfig, container: IValueProxy<T>) => void) => (value?: T) => CommandConfig;
|
|
11
11
|
export {};
|
|
@@ -5,8 +5,8 @@ import type { IContext, IArgsBase } from '../../command/interface';
|
|
|
5
5
|
import { ICommandHandler } from '../../command/interface';
|
|
6
6
|
type ICommand = ICommandHandler<NsGraphRender.IArgs, NsGraphRender.IResult, NsGraphRender.ICmdHooks>;
|
|
7
7
|
export declare namespace NsGraphUtils {
|
|
8
|
-
function isNodeEqual(curNodeConfig: NsGraph.INodeConfig, nextNodeConfig: NsGraph.INodeConfig):
|
|
9
|
-
function isEdgeEqual(curEdgeConfig: NsGraph.IEdgeConfig, nextEdgeConfig: NsGraph.IEdgeConfig):
|
|
8
|
+
function isNodeEqual(curNodeConfig: NsGraph.INodeConfig, nextNodeConfig: NsGraph.INodeConfig): boolean;
|
|
9
|
+
function isEdgeEqual(curEdgeConfig: NsGraph.IEdgeConfig, nextEdgeConfig: NsGraph.IEdgeConfig): boolean;
|
|
10
10
|
}
|
|
11
11
|
export declare namespace NsGraphRender {
|
|
12
12
|
/** Command: 用于注册named factory */
|
|
@@ -48,7 +48,7 @@ export declare class AddNodeCommand implements ICommand {
|
|
|
48
48
|
/** 执行Cmd */
|
|
49
49
|
execute: () => Promise<this>;
|
|
50
50
|
processNodeConfig: (nodeConfig: NsGraph.INodeConfig) => Promise<NsGraph.INodeConfig>;
|
|
51
|
-
getNodeReactComponent: (nodeConfig: NsGraph.INodeConfig) => Promise<
|
|
51
|
+
getNodeReactComponent: (nodeConfig: NsGraph.INodeConfig) => Promise<NsGraph.INodeRender<any>>;
|
|
52
52
|
/** undo cmd */
|
|
53
53
|
undo: () => Promise<this>;
|
|
54
54
|
/** redo cmd */
|
package/es/common/position.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type React from 'react';
|
|
1
2
|
export interface IPosition {
|
|
2
3
|
width?: number;
|
|
3
4
|
height?: number;
|
|
@@ -7,4 +8,4 @@ export interface IPosition {
|
|
|
7
8
|
right?: number;
|
|
8
9
|
bottom?: number;
|
|
9
10
|
}
|
|
10
|
-
export declare const usePositionStyle: (conf?: IPosition) =>
|
|
11
|
+
export declare const usePositionStyle: (conf?: IPosition) => React.CSSProperties;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { RxModel, NsModel } from './rx-model';
|
|
2
3
|
/** 用于判断model是否Mount */
|
|
3
|
-
export declare const useIsMountedRef: () =>
|
|
4
|
+
export declare const useIsMountedRef: () => React.MutableRefObject<boolean>;
|
|
4
5
|
/** 判断model是否Mount */
|
|
5
6
|
export declare const useModel: <T>(model: RxModel<T>) => [T, NsModel.ISetValue<T>, boolean];
|
|
6
7
|
/** 在组件内部新建一个model */
|
package/es/common/uuid.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/** https://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid#answer-2117523 */
|
|
2
2
|
export function uuidv4() {
|
|
3
|
-
|
|
3
|
+
const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
4
4
|
const r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;
|
|
5
5
|
return v.toString(16);
|
|
6
6
|
});
|
|
7
|
+
return 'uuidv4_' + uuid.replace(/-/g, '_');
|
|
7
8
|
}
|
|
8
9
|
//# sourceMappingURL=uuid.js.map
|
package/es/common/uuid.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uuid.js","sourceRoot":"","sources":["../../src/common/uuid.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,MAAM,UAAU,MAAM;IACpB,
|
|
1
|
+
{"version":3,"file":"uuid.js","sourceRoot":"","sources":["../../src/common/uuid.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,MAAM,UAAU,MAAM;IACpB,MAAM,IAAI,GAAG,sCAAsC,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC;QAC9E,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAChC,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,CAAA;QACpC,OAAO,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;IACvB,CAAC,CAAC,CAAA;IACF,OAAO,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;AAC5C,CAAC"}
|
|
@@ -9,5 +9,5 @@ export declare const HookRegistry: React.FC<IProps>;
|
|
|
9
9
|
interface IValueProxy<T> {
|
|
10
10
|
getValue: () => T;
|
|
11
11
|
}
|
|
12
|
-
export declare const createHookConfig: <T extends unknown = any>(addOptions: (config: HookConfig, container: IValueProxy<T>) => void) => (value?: T) =>
|
|
12
|
+
export declare const createHookConfig: <T extends unknown = any>(addOptions: (config: HookConfig, container: IValueProxy<T>) => void) => (value?: T) => XFlowHookConfig;
|
|
13
13
|
export {};
|
package/es/hooks/config.d.ts
CHANGED
|
@@ -22,16 +22,16 @@ export declare class HookConfig implements IModuleConfig {
|
|
|
22
22
|
CONFIG_TYPE: string;
|
|
23
23
|
hookRegisterFn: IRegisterHookFn<{
|
|
24
24
|
graphOptions: import("@sunspirytus/xflow-hook").HookHub<import("@antv/x6").Graph.Options, import("@antv/x6").Graph.Options>;
|
|
25
|
-
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
26
|
-
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
25
|
+
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.INodeRender<any>>, Map<string, import("..").NsGraph.INodeRender<any>>>;
|
|
26
|
+
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.IEdgeRender<any>>, Map<string, import("..").NsGraph.IEdgeRender<any>>>;
|
|
27
27
|
afterGraphInit: import("@sunspirytus/xflow-hook").HookHub<import("./interface").IGeneralAppService, import("./interface").IGeneralAppService>;
|
|
28
28
|
beforeGraphDestroy: import("@sunspirytus/xflow-hook").HookHub<import("./interface").IGeneralAppService, import("./interface").IGeneralAppService>;
|
|
29
29
|
x6Events: import("@sunspirytus/xflow-hook").HookHub<import("./interface").IEventCollection, import("./interface").IEventSubscription>;
|
|
30
30
|
}>;
|
|
31
31
|
hookhubRegisterFn: IRegisterHookHubFn<{
|
|
32
32
|
graphOptions: import("@sunspirytus/xflow-hook").HookHub<import("@antv/x6").Graph.Options, import("@antv/x6").Graph.Options>;
|
|
33
|
-
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
34
|
-
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
33
|
+
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.INodeRender<any>>, Map<string, import("..").NsGraph.INodeRender<any>>>;
|
|
34
|
+
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.IEdgeRender<any>>, Map<string, import("..").NsGraph.IEdgeRender<any>>>;
|
|
35
35
|
afterGraphInit: import("@sunspirytus/xflow-hook").HookHub<import("./interface").IGeneralAppService, import("./interface").IGeneralAppService>;
|
|
36
36
|
beforeGraphDestroy: import("@sunspirytus/xflow-hook").HookHub<import("./interface").IGeneralAppService, import("./interface").IGeneralAppService>;
|
|
37
37
|
x6Events: import("@sunspirytus/xflow-hook").HookHub<import("./interface").IEventCollection, import("./interface").IEventSubscription>;
|
package/es/hooks/interface.d.ts
CHANGED
|
@@ -53,8 +53,8 @@ export interface IGeneralAppService {
|
|
|
53
53
|
}
|
|
54
54
|
export declare const initHooks: () => {
|
|
55
55
|
graphOptions: HookHub<Graph.Options, Graph.Options>;
|
|
56
|
-
reactNodeRender: HookHub<Map<string,
|
|
57
|
-
reactEdgeLabelRender: HookHub<Map<string,
|
|
56
|
+
reactNodeRender: HookHub<Map<string, NsGraph.INodeRender<any>>, Map<string, NsGraph.INodeRender<any>>>;
|
|
57
|
+
reactEdgeLabelRender: HookHub<Map<string, NsGraph.IEdgeRender<any>>, Map<string, NsGraph.IEdgeRender<any>>>;
|
|
58
58
|
afterGraphInit: HookHub<IGeneralAppService, IGeneralAppService>;
|
|
59
59
|
beforeGraphDestroy: HookHub<IGeneralAppService, IGeneralAppService>;
|
|
60
60
|
x6Events: HookHub<IEventCollection, IEventSubscription>;
|
|
@@ -9,5 +9,5 @@ export declare const KeyBindings: React.FC<IProps>;
|
|
|
9
9
|
interface IValueProxy<T> {
|
|
10
10
|
getValue: () => T;
|
|
11
11
|
}
|
|
12
|
-
export declare const createKeybindingConfig: <T extends unknown = any>(addOptions: (config: KeybindingConfig, container: IValueProxy<T>) => void) => (value?: T) =>
|
|
12
|
+
export declare const createKeybindingConfig: <T extends unknown = any>(addOptions: (config: KeybindingConfig, container: IValueProxy<T>) => void) => (value?: T) => KeybindingConfig;
|
|
13
13
|
export {};
|
|
@@ -8,5 +8,5 @@ export declare const ModelServiceRegistry: React.FC<IProps>;
|
|
|
8
8
|
interface IValueProxy<T> {
|
|
9
9
|
getValue: () => T;
|
|
10
10
|
}
|
|
11
|
-
export declare const createModelServiceConfig: <T extends unknown = any>(addOptions: (config: ModelServiceConfig, proxy: IValueProxy<TextDecoderOptions>) => void) => (value?: T) =>
|
|
11
|
+
export declare const createModelServiceConfig: <T extends unknown = any>(addOptions: (config: ModelServiceConfig, proxy: IValueProxy<TextDecoderOptions>) => void) => (value?: T) => ModelServiceConfig;
|
|
12
12
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="lodash" />
|
|
1
2
|
import 'reflect-metadata';
|
|
2
3
|
import { Contribution } from 'mana-syringe';
|
|
3
4
|
import { DisposableCollection } from '../common/disposable';
|
|
@@ -27,7 +28,7 @@ export declare class ToolbarRegistry implements IFrontendApplicationContribution
|
|
|
27
28
|
/** 通过ToolbarRegistry.onDidChange监听ToolbarRegistry items的变化 */
|
|
28
29
|
readonly onDidChange: NsModel.IWatch<void>;
|
|
29
30
|
/** debounce in order to avoid to fire more than once in the same tick */
|
|
30
|
-
protected fireOnDidChange:
|
|
31
|
+
protected fireOnDidChange: import("lodash").DebouncedFunc<() => void>;
|
|
31
32
|
/** App启动时,收集Toolbar扩展点的注册项 */
|
|
32
33
|
onStart(): void;
|
|
33
34
|
/**
|
|
@@ -46,8 +46,8 @@ export declare class FrontendApplication {
|
|
|
46
46
|
/** 暴露命令的执行接口 */
|
|
47
47
|
executeCommand<Args = any, Result = any>(commandId: string, cmdArgs: Args, hook?: IRuntimeHook<Args, Result>): Promise<import("../command/interface").ICommandHandler<Args, Result, {
|
|
48
48
|
graphOptions: import("@sunspirytus/xflow-hook").HookHub<import("@antv/x6").Graph.Options, import("@antv/x6").Graph.Options>;
|
|
49
|
-
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
50
|
-
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
49
|
+
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.INodeRender<any>>, Map<string, import("..").NsGraph.INodeRender<any>>>;
|
|
50
|
+
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.IEdgeRender<any>>, Map<string, import("..").NsGraph.IEdgeRender<any>>>;
|
|
51
51
|
afterGraphInit: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
52
52
|
beforeGraphDestroy: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
53
53
|
x6Events: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IEventCollection, import("../hooks/interface").IEventSubscription>;
|
|
@@ -55,8 +55,8 @@ export declare class FrontendApplication {
|
|
|
55
55
|
/** 暴露命令的批量执行接口 */
|
|
56
56
|
executeCommandPipeline(cmdOptions: IGraphPipelineCommand[]): Promise<import("../command/interface").ICommandHandler<any, any, {
|
|
57
57
|
graphOptions: import("@sunspirytus/xflow-hook").HookHub<import("@antv/x6").Graph.Options, import("@antv/x6").Graph.Options>;
|
|
58
|
-
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
59
|
-
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
58
|
+
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.INodeRender<any>>, Map<string, import("..").NsGraph.INodeRender<any>>>;
|
|
59
|
+
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.IEdgeRender<any>>, Map<string, import("..").NsGraph.IEdgeRender<any>>>;
|
|
60
60
|
afterGraphInit: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
61
61
|
beforeGraphDestroy: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
62
62
|
x6Events: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IEventCollection, import("../hooks/interface").IEventSubscription>;
|
|
@@ -103,7 +103,7 @@ let FrontendApplication = class FrontendApplication {
|
|
|
103
103
|
*/
|
|
104
104
|
startContributions() {
|
|
105
105
|
return __awaiter(this, void 0, void 0, function* () {
|
|
106
|
-
console.log(this.contributions.getContributions())
|
|
106
|
+
//console.log(this.contributions.getContributions())
|
|
107
107
|
for (const contribution of this.contributions.getContributions()) {
|
|
108
108
|
if (contribution.onStart) {
|
|
109
109
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.js","sourceRoot":"","sources":["../../src/xflow-main/application.ts"],"names":[],"mappings":";AAAA,oDAAoD;AACpD,qCAAqC;AACrC,yCAAyC;AACzC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAEvE,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA;AAIzD,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,gCAAgC,EAAE,MAAM,aAAa,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAEnD,OAAO,EAAE,gCAAgC,EAAE,MAAM,aAAa,CAAA;AAE9D,MAAM,uBAAuB,GAAG,GAAG,CAAA;AAG5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-
export declare const XFlowAppContext:
|
|
4
|
+
export declare const XFlowAppContext: React.Context<IAppContainer>;
|
|
5
5
|
/** AppContext:获取 app */
|
|
6
|
-
export declare const useXFlowApp: () =>
|
|
6
|
+
export declare const useXFlowApp: () => FrontendApplication;
|
|
7
7
|
/** AppContext: 获取 appContainer */
|
|
8
|
-
export declare const useXFlowAppContainer: () =>
|
|
8
|
+
export declare const useXFlowAppContainer: () => IAppContainer;
|
|
9
|
+
interface IAppContainer {
|
|
10
|
+
getApp: () => FrontendApplication | null;
|
|
11
|
+
setApp: (app: FrontendApplication) => void;
|
|
12
|
+
onAppChange: (callback: (app: FrontendApplication) => void) => void;
|
|
13
|
+
isUserDefined: () => boolean;
|
|
14
|
+
dispose: () => void;
|
|
15
|
+
}
|
|
9
16
|
/** XFlow内部使用 */
|
|
10
17
|
export declare const XFlowAppInternalProvider: React.FC<{
|
|
11
18
|
app: FrontendApplication;
|
|
12
19
|
}>;
|
|
13
20
|
/** XFlow外部使用 */
|
|
14
21
|
export declare const XFlowAppProvider: React.FC;
|
|
22
|
+
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { PropsWithChildren } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import type { IExtensionModule } from '../interface';
|
|
3
4
|
export interface IProps {
|
|
4
5
|
config: IExtensionModule['config'];
|
|
5
6
|
createModule: IExtensionModule['createModule'];
|
|
6
7
|
}
|
|
7
|
-
export declare function XFlowAppExtensionModule<T>(props: PropsWithChildren<IProps>):
|
|
8
|
+
export declare function XFlowAppExtensionModule<T>(props: PropsWithChildren<IProps>): React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { ExtensionRegistry } from './extension-registry';
|
|
2
3
|
/** 通过context收集extension的配置 */
|
|
3
|
-
export declare const ExtensionRegistryContext:
|
|
4
|
-
export declare const useExtensionRegistry: () =>
|
|
4
|
+
export declare const ExtensionRegistryContext: React.Context<ExtensionRegistry>;
|
|
5
|
+
export declare const useExtensionRegistry: () => ExtensionRegistry;
|
|
5
6
|
export { ExtensionRegistry };
|
|
@@ -9,7 +9,7 @@ export declare class ExtensionRegistry {
|
|
|
9
9
|
constructor();
|
|
10
10
|
addCoreModule: (extension: IExtensionModule) => Disposable;
|
|
11
11
|
addExtension: (extension: IExtensionModule) => Disposable;
|
|
12
|
-
getExtension: (config_type: string) => any
|
|
12
|
+
getExtension: (config_type: string) => IExtensionModule<any>;
|
|
13
13
|
removeExtension: (extension: IExtensionModule) => void;
|
|
14
14
|
getInstanceId: () => string;
|
|
15
15
|
addContainerClassNames: (clz: string) => Set<string>;
|
|
@@ -19,4 +19,4 @@ export declare class ExtensionRegistry {
|
|
|
19
19
|
getAllExtensionConfigs: () => import("../interface").IModuleConfig<any>[];
|
|
20
20
|
}
|
|
21
21
|
/** 获取Xflow extension,用于收集React组件的配置 */
|
|
22
|
-
export declare const createExtensionRegistry: () =>
|
|
22
|
+
export declare const createExtensionRegistry: () => ExtensionRegistry;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/** xflow classname prefix context */
|
|
3
|
+
declare class ConfigProvider {
|
|
4
|
+
private xflowPrefixCls;
|
|
5
|
+
getXflowPrefixCls: (pkgName: string) => string;
|
|
6
|
+
setXflowPrefixCls: (prefixCls: string) => string;
|
|
7
|
+
}
|
|
8
|
+
interface IContext {
|
|
9
|
+
configProvider: ConfigProvider;
|
|
10
|
+
}
|
|
11
|
+
export declare const XFlowConfigProviderContext: React.Context<IContext>;
|
|
12
|
+
export declare const useConfigContext: () => IContext;
|
|
13
|
+
export declare const useXflowPrefixCls: (pkgName: string) => string;
|
|
14
|
+
export {};
|
|
@@ -52,10 +52,10 @@ export declare class GraphConfig {
|
|
|
52
52
|
setRootContainer: (ele: HTMLElement | null) => void;
|
|
53
53
|
setGraphContainer: (ele: HTMLElement | null) => void;
|
|
54
54
|
setEvents: (events: NsGraph.IEvent[]) => void;
|
|
55
|
-
setDefaultNodeRender: (component:
|
|
56
|
-
setDefaultEdgeRender: (component:
|
|
57
|
-
setNodeRender: (renderKey: string, component:
|
|
58
|
-
setEdgeRender: (renderKey: string, component:
|
|
55
|
+
setDefaultNodeRender: (component: NsGraph.INodeRender) => void;
|
|
56
|
+
setDefaultEdgeRender: (component: NsGraph.IEdgeRender) => void;
|
|
57
|
+
setNodeRender: (renderKey: string, component: NsGraph.INodeRender) => void;
|
|
58
|
+
setEdgeRender: (renderKey: string, component: NsGraph.IEdgeRender) => void;
|
|
59
59
|
/** 设置解析node render key的 parser */
|
|
60
60
|
setNodeTypeParser: (parser: (nodeConfig: NsGraph.INodeConfig) => string) => void;
|
|
61
61
|
/** 设置解析edge render key的 parser */
|
|
@@ -98,5 +98,5 @@ export declare const registerGraphConfig: (register: Syringe.Register, graphConf
|
|
|
98
98
|
interface IValueProxy<T> {
|
|
99
99
|
getValue: () => T;
|
|
100
100
|
}
|
|
101
|
-
export declare const createGraphConfig: <T = any>(addOptions: (config: GraphConfig, proxy: IValueProxy<T>) => void) => (props?: T) =>
|
|
101
|
+
export declare const createGraphConfig: <T = any>(addOptions: (config: GraphConfig, proxy: IValueProxy<T>) => void) => (props?: T) => GraphConfig;
|
|
102
102
|
export {};
|
|
@@ -37,8 +37,8 @@ export declare class GraphCommandRegistry implements IGraphCommandService, IFron
|
|
|
37
37
|
*/
|
|
38
38
|
protected readonly factories: Map<string, ICommandFactory<any, any, {
|
|
39
39
|
graphOptions: import("@sunspirytus/xflow-hook").HookHub<import("@antv/x6").Graph.Options, import("@antv/x6").Graph.Options>;
|
|
40
|
-
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
41
|
-
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
40
|
+
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.INodeRender<any>>, Map<string, import("..").NsGraph.INodeRender<any>>>;
|
|
41
|
+
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.IEdgeRender<any>>, Map<string, import("..").NsGraph.IEdgeRender<any>>>;
|
|
42
42
|
afterGraphInit: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
43
43
|
beforeGraphDestroy: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
44
44
|
x6Events: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IEventCollection, import("../hooks/interface").IEventSubscription>;
|
|
@@ -67,8 +67,8 @@ export declare class GraphCommandRegistry implements IGraphCommandService, IFron
|
|
|
67
67
|
onStart(): void;
|
|
68
68
|
executeCommandPipeline(cmdOptions: IGraphPipelineCommand[]): Promise<ICommandHandler<any, any, {
|
|
69
69
|
graphOptions: import("@sunspirytus/xflow-hook").HookHub<import("@antv/x6").Graph.Options, import("@antv/x6").Graph.Options>;
|
|
70
|
-
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
71
|
-
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
70
|
+
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.INodeRender<any>>, Map<string, import("..").NsGraph.INodeRender<any>>>;
|
|
71
|
+
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.IEdgeRender<any>>, Map<string, import("..").NsGraph.IEdgeRender<any>>>;
|
|
72
72
|
afterGraphInit: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
73
73
|
beforeGraphDestroy: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
74
74
|
x6Events: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IEventCollection, import("../hooks/interface").IEventSubscription>;
|
|
@@ -76,8 +76,8 @@ export declare class GraphCommandRegistry implements IGraphCommandService, IFron
|
|
|
76
76
|
/** 执行 Command:会在undo stack中push cmd */
|
|
77
77
|
executeCommand<Args = any, Result = any>(commandId: string, cmdArgs: Args, hook?: IRuntimeHook<Args, Result>): Promise<ICommandHandler<Args, Result, {
|
|
78
78
|
graphOptions: import("@sunspirytus/xflow-hook").HookHub<import("@antv/x6").Graph.Options, import("@antv/x6").Graph.Options>;
|
|
79
|
-
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
80
|
-
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
79
|
+
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.INodeRender<any>>, Map<string, import("..").NsGraph.INodeRender<any>>>;
|
|
80
|
+
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.IEdgeRender<any>>, Map<string, import("..").NsGraph.IEdgeRender<any>>>;
|
|
81
81
|
afterGraphInit: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
82
82
|
beforeGraphDestroy: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
83
83
|
x6Events: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IEventCollection, import("../hooks/interface").IEventSubscription>;
|
|
@@ -85,8 +85,8 @@ export declare class GraphCommandRegistry implements IGraphCommandService, IFron
|
|
|
85
85
|
/** 执行 unod Command:不会在undo stack中push新的command记录 */
|
|
86
86
|
executeUndoCommand<T = any>(commandId: string, cmdArgs: T, hook?: IRuntimeHook<T, any>): Promise<ICommandHandler<any, any, {
|
|
87
87
|
graphOptions: import("@sunspirytus/xflow-hook").HookHub<import("@antv/x6").Graph.Options, import("@antv/x6").Graph.Options>;
|
|
88
|
-
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
89
|
-
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
88
|
+
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.INodeRender<any>>, Map<string, import("..").NsGraph.INodeRender<any>>>;
|
|
89
|
+
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.IEdgeRender<any>>, Map<string, import("..").NsGraph.IEdgeRender<any>>>;
|
|
90
90
|
afterGraphInit: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
91
91
|
beforeGraphDestroy: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
92
92
|
x6Events: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IEventCollection, import("../hooks/interface").IEventSubscription>;
|
|
@@ -98,8 +98,8 @@ export declare class GraphCommandRegistry implements IGraphCommandService, IFron
|
|
|
98
98
|
*/
|
|
99
99
|
createCommand<T = any>(commandId: string, cmdArgs: T, hook?: IRuntimeHook<T, any>): Promise<ICommandHandler<any, any, {
|
|
100
100
|
graphOptions: import("@sunspirytus/xflow-hook").HookHub<import("@antv/x6").Graph.Options, import("@antv/x6").Graph.Options>;
|
|
101
|
-
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
102
|
-
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
101
|
+
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.INodeRender<any>>, Map<string, import("..").NsGraph.INodeRender<any>>>;
|
|
102
|
+
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.IEdgeRender<any>>, Map<string, import("..").NsGraph.IEdgeRender<any>>>;
|
|
103
103
|
afterGraphInit: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
104
104
|
beforeGraphDestroy: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
105
105
|
x6Events: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IEventCollection, import("../hooks/interface").IEventSubscription>;
|
|
@@ -168,8 +168,8 @@ export declare class GraphCommandRegistry implements IGraphCommandService, IFron
|
|
|
168
168
|
*/
|
|
169
169
|
getAllFactories(): [string, ICommandFactory<any, any, {
|
|
170
170
|
graphOptions: import("@sunspirytus/xflow-hook").HookHub<import("@antv/x6").Graph.Options, import("@antv/x6").Graph.Options>;
|
|
171
|
-
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
172
|
-
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string,
|
|
171
|
+
reactNodeRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.INodeRender<any>>, Map<string, import("..").NsGraph.INodeRender<any>>>;
|
|
172
|
+
reactEdgeLabelRender: import("@sunspirytus/xflow-hook").HookHub<Map<string, import("..").NsGraph.IEdgeRender<any>>, Map<string, import("..").NsGraph.IEdgeRender<any>>>;
|
|
173
173
|
afterGraphInit: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
174
174
|
beforeGraphDestroy: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IGeneralAppService, import("../hooks/interface").IGeneralAppService>;
|
|
175
175
|
x6Events: import("@sunspirytus/xflow-hook").HookHub<import("../hooks/interface").IEventCollection, import("../hooks/interface").IEventSubscription>;
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { IGraphCommandService } from '../../command';
|
|
3
3
|
import type { IModelService } from '../../model-service';
|
|
4
|
-
import type { Node as X6Node, Edge as X6Edge } from '@antv/x6';
|
|
4
|
+
import type { Graph as X6Graph, Node as X6Node, Edge as X6Edge } from '@antv/x6';
|
|
5
5
|
import type { NsGraph } from '../../interface';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
interface IAppContext {
|
|
7
|
+
cell: X6Node | X6Edge;
|
|
8
|
+
x6Graph: X6Graph;
|
|
9
|
+
commands: IGraphCommandService;
|
|
10
|
+
modelService: IModelService;
|
|
11
|
+
}
|
|
12
|
+
export declare const AppContext: React.Context<IAppContext>;
|
|
13
|
+
export declare const useAppContext: () => IAppContext;
|
|
14
|
+
export declare function getNodeReactComponent(Component: React.ComponentType<NsGraph.IReactNodeProps>, commands: IGraphCommandService, modelService: IModelService): (x6Node: X6Node) => React.JSX.Element;
|
|
15
|
+
export declare function getEdgeReactComponent(Component: React.ComponentType<NsGraph.IReactEdgeProps>, commands: IGraphCommandService, modelService: IModelService): (x6Edge: X6Edge) => React.JSX.Element;
|
|
10
16
|
/** 获取节点选中状态 */
|
|
11
|
-
export declare const useIsNodeSelected: () =>
|
|
17
|
+
export declare const useIsNodeSelected: () => boolean[];
|
|
18
|
+
export {};
|
|
@@ -7,5 +7,5 @@ export declare const CommandsRegistry: React.FC<IProps>;
|
|
|
7
7
|
interface IValueProxy<T> {
|
|
8
8
|
getValue: () => T;
|
|
9
9
|
}
|
|
10
|
-
export declare const createCmdConfig: <T extends unknown = any>(addOptions: (config: CommandConfig, container: IValueProxy<T>) => void) => (value?: T) =>
|
|
10
|
+
export declare const createCmdConfig: <T extends unknown = any>(addOptions: (config: CommandConfig, container: IValueProxy<T>) => void) => (value?: T) => CommandConfig;
|
|
11
11
|
export {};
|
|
@@ -5,8 +5,8 @@ import type { IContext, IArgsBase } from '../../command/interface';
|
|
|
5
5
|
import { ICommandHandler } from '../../command/interface';
|
|
6
6
|
type ICommand = ICommandHandler<NsGraphRender.IArgs, NsGraphRender.IResult, NsGraphRender.ICmdHooks>;
|
|
7
7
|
export declare namespace NsGraphUtils {
|
|
8
|
-
function isNodeEqual(curNodeConfig: NsGraph.INodeConfig, nextNodeConfig: NsGraph.INodeConfig):
|
|
9
|
-
function isEdgeEqual(curEdgeConfig: NsGraph.IEdgeConfig, nextEdgeConfig: NsGraph.IEdgeConfig):
|
|
8
|
+
function isNodeEqual(curNodeConfig: NsGraph.INodeConfig, nextNodeConfig: NsGraph.INodeConfig): boolean;
|
|
9
|
+
function isEdgeEqual(curEdgeConfig: NsGraph.IEdgeConfig, nextEdgeConfig: NsGraph.IEdgeConfig): boolean;
|
|
10
10
|
}
|
|
11
11
|
export declare namespace NsGraphRender {
|
|
12
12
|
/** Command: 用于注册named factory */
|
|
@@ -48,7 +48,7 @@ export declare class AddNodeCommand implements ICommand {
|
|
|
48
48
|
/** 执行Cmd */
|
|
49
49
|
execute: () => Promise<this>;
|
|
50
50
|
processNodeConfig: (nodeConfig: NsGraph.INodeConfig) => Promise<NsGraph.INodeConfig>;
|
|
51
|
-
getNodeReactComponent: (nodeConfig: NsGraph.INodeConfig) => Promise<
|
|
51
|
+
getNodeReactComponent: (nodeConfig: NsGraph.INodeConfig) => Promise<NsGraph.INodeRender<any>>;
|
|
52
52
|
/** undo cmd */
|
|
53
53
|
undo: () => Promise<this>;
|
|
54
54
|
/** redo cmd */
|
package/lib/common/position.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type React from 'react';
|
|
1
2
|
export interface IPosition {
|
|
2
3
|
width?: number;
|
|
3
4
|
height?: number;
|
|
@@ -7,4 +8,4 @@ export interface IPosition {
|
|
|
7
8
|
right?: number;
|
|
8
9
|
bottom?: number;
|
|
9
10
|
}
|
|
10
|
-
export declare const usePositionStyle: (conf?: IPosition) =>
|
|
11
|
+
export declare const usePositionStyle: (conf?: IPosition) => React.CSSProperties;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { RxModel, NsModel } from './rx-model';
|
|
2
3
|
/** 用于判断model是否Mount */
|
|
3
|
-
export declare const useIsMountedRef: () =>
|
|
4
|
+
export declare const useIsMountedRef: () => React.MutableRefObject<boolean>;
|
|
4
5
|
/** 判断model是否Mount */
|
|
5
6
|
export declare const useModel: <T>(model: RxModel<T>) => [T, NsModel.ISetValue<T>, boolean];
|
|
6
7
|
/** 在组件内部新建一个model */
|