@sunspirytus/xflow-extension 1.0.52-1 → 1.0.52-2
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 +5 -5
- package/dist/index.umd.js.map +1 -1
- package/es/base-panel/context.d.ts +2 -1
- package/es/canvas-collapse-panel/interface.d.ts +2 -0
- package/es/canvas-collapse-panel/interface.js.map +1 -1
- package/es/canvas-collapse-panel/panel-body/dnd-hook.d.ts +7 -5
- package/es/canvas-collapse-panel/panel-body/index.js +5 -3
- package/es/canvas-collapse-panel/panel-body/index.js.map +1 -1
- package/es/canvas-collapse-panel/panel-body/panel-node.d.ts +1 -1
- package/es/canvas-collapse-panel/service.d.ts +3 -3
- package/es/canvas-collapse-panel/utils.d.ts +4 -3
- package/es/canvas-context-menu/components/menu-render.d.ts +2 -1
- package/es/canvas-context-menu/index.d.ts +1 -1
- package/es/canvas-json-schema-form/schema-form/common/tooltip/index.d.ts +1 -1
- package/es/canvas-json-schema-form/schema-form/control-map/index.d.ts +1 -1
- package/es/canvas-json-schema-form/service.d.ts +2 -2
- package/es/canvas-json-schema-form/utils.d.ts +4 -3
- package/es/canvas-node-tree-panel/panel-body.d.ts +2 -2
- package/es/canvas-node-tree-panel/service.d.ts +3 -3
- package/es/canvas-node-tree-panel/utils.d.ts +4 -3
- package/es/canvas-scale-toolbar/config.d.ts +1 -1
- package/es/canvas-toolbar/index.d.ts +1 -1
- package/es/canvas-toolbar/render-components/index.d.ts +3 -1
- package/es/demo-utils/form-builder/index.d.ts +1 -1
- package/es/flowchart-canvas/config-graph.d.ts +1 -1
- package/es/flowchart-canvas/utils/util.d.ts +2 -1
- package/es/flowchart-editor-panel/control-map-service/components/fields/color.d.ts +2 -1
- package/es/flowchart-editor-panel/control-map-service/components/fields/position.d.ts +1 -1
- package/es/flowchart-editor-panel/control-map-service/index.d.ts +5 -4
- package/es/flowchart-editor-panel/useAsync.d.ts +4 -1
- package/es/flowchart-node-panel/context.d.ts +2 -1
- package/es/flowchart-node-panel/service.d.ts +1 -1
- package/lib/base-panel/context.d.ts +2 -1
- package/lib/canvas-collapse-panel/interface.d.ts +2 -0
- package/lib/canvas-collapse-panel/interface.js.map +1 -1
- package/lib/canvas-collapse-panel/panel-body/dnd-hook.d.ts +7 -5
- package/lib/canvas-collapse-panel/panel-body/index.js +5 -3
- package/lib/canvas-collapse-panel/panel-body/index.js.map +1 -1
- package/lib/canvas-collapse-panel/panel-body/panel-node.d.ts +1 -1
- package/lib/canvas-collapse-panel/service.d.ts +3 -3
- package/lib/canvas-collapse-panel/utils.d.ts +4 -3
- package/lib/canvas-context-menu/components/menu-render.d.ts +2 -1
- package/lib/canvas-context-menu/index.d.ts +1 -1
- package/lib/canvas-json-schema-form/schema-form/common/tooltip/index.d.ts +1 -1
- package/lib/canvas-json-schema-form/schema-form/control-map/index.d.ts +1 -1
- package/lib/canvas-json-schema-form/service.d.ts +2 -2
- package/lib/canvas-json-schema-form/utils.d.ts +4 -3
- package/lib/canvas-node-tree-panel/panel-body.d.ts +2 -2
- package/lib/canvas-node-tree-panel/service.d.ts +3 -3
- package/lib/canvas-node-tree-panel/utils.d.ts +4 -3
- package/lib/canvas-scale-toolbar/config.d.ts +1 -1
- package/lib/canvas-toolbar/index.d.ts +1 -1
- package/lib/canvas-toolbar/render-components/index.d.ts +3 -1
- package/lib/demo-utils/form-builder/index.d.ts +1 -1
- package/lib/flowchart-canvas/config-graph.d.ts +1 -1
- package/lib/flowchart-canvas/utils/util.d.ts +2 -1
- package/lib/flowchart-editor-panel/control-map-service/components/fields/color.d.ts +2 -1
- package/lib/flowchart-editor-panel/control-map-service/components/fields/position.d.ts +1 -1
- package/lib/flowchart-editor-panel/control-map-service/index.d.ts +5 -4
- package/lib/flowchart-editor-panel/useAsync.d.ts +4 -1
- package/lib/flowchart-node-panel/context.d.ts +2 -1
- package/lib/flowchart-node-panel/service.d.ts +1 -1
- package/package.json +4 -4
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { IGraphCommandService, IModelService } from '@sunspirytus/xflow-core';
|
|
2
3
|
import type { PropsProxy } from './config';
|
|
3
4
|
interface IContext<T = any> {
|
|
@@ -5,6 +6,6 @@ interface IContext<T = any> {
|
|
|
5
6
|
commandService: IGraphCommandService;
|
|
6
7
|
modelService: IModelService;
|
|
7
8
|
}
|
|
8
|
-
export declare const PanelContext: any
|
|
9
|
+
export declare const PanelContext: React.Context<IContext<any>>;
|
|
9
10
|
export declare const usePanelContext: <T extends unknown>() => IContext<T>;
|
|
10
11
|
export {};
|
|
@@ -54,6 +54,8 @@ export interface IProps extends Partial<ILayoutProps> {
|
|
|
54
54
|
onCollapseChange?: (isCollapsed: boolean) => void;
|
|
55
55
|
/** collapseBtn 的样式 */
|
|
56
56
|
collapseButtonStyle?: React.CSSProperties;
|
|
57
|
+
/** 是否正在加载中 */
|
|
58
|
+
bodyLoading?: boolean;
|
|
57
59
|
}
|
|
58
60
|
/** drop节点的回调,通过回调创建画布的节点 */
|
|
59
61
|
export interface IOnNodeDrop {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../src/canvas-collapse-panel/interface.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../src/canvas-collapse-panel/interface.tsx"],"names":[],"mappings":";AAyIA,MAAM,KAAW,oBAAoB,CAiBpC;AAjBD,WAAiB,oBAAoB;IACtB,uBAAE,GAAG,qBAAqB,CAAA;IAa1B,6BAAQ,GAAG,CAAO,KAAoB,EAAE,EAAE;QACrD,OAAO,KAAK,CAAC,UAAU,CAAS,qBAAA,EAAE,CAAC,CAAA;IACrC,CAAC,CAAA,CAAA;AACH,CAAC,EAjBgB,oBAAoB,KAApB,oBAAoB,QAiBpC"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IGraphConfig } from '@sunspirytus/xflow-core';
|
|
3
|
+
import type { IProps, NsCollapsePanelModel, IOnActiveKeyChange, IPanelNode, INodeFactoryArgs } from '../interface';
|
|
2
4
|
export interface IBodyProps extends IProps {
|
|
3
5
|
state: NsCollapsePanelModel.IState;
|
|
4
6
|
onActiveKeyChange: IOnActiveKeyChange;
|
|
5
7
|
}
|
|
6
8
|
export declare const defaultNodeFactory: (args: INodeFactoryArgs) => import("@antv/x6").Node<import("@antv/x6").Node.Properties>;
|
|
7
9
|
export declare const useGraphDnd: (props: IBodyProps) => {
|
|
8
|
-
graphConfig:
|
|
9
|
-
onMouseDown:
|
|
10
|
-
modelService:
|
|
11
|
-
commandService:
|
|
10
|
+
graphConfig: IGraphConfig;
|
|
11
|
+
onMouseDown: (nodeConfig: IPanelNode) => (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
12
|
+
modelService: import("@sunspirytus/xflow-core").IModelService;
|
|
13
|
+
commandService: import("@sunspirytus/xflow-core").IGraphCommandService;
|
|
12
14
|
};
|
|
@@ -2,12 +2,14 @@ import React from 'react';
|
|
|
2
2
|
import { useGraphDnd } from './dnd-hook';
|
|
3
3
|
import { SearchResult } from './panel-search-list';
|
|
4
4
|
import { CollapseList } from './collapse';
|
|
5
|
+
import { Spin } from 'antd';
|
|
5
6
|
export const CollapsePanelBody = props => {
|
|
6
|
-
const { state, prefixClz, onActiveKeyChange } = props;
|
|
7
|
+
const { state, bodyLoading, prefixClz, onActiveKeyChange } = props;
|
|
7
8
|
const { graphConfig, onMouseDown, modelService, commandService } = useGraphDnd(props);
|
|
8
9
|
const { searchResult, collapseData, keyword } = state;
|
|
9
10
|
return (React.createElement("div", { className: `${prefixClz}-body`, style: props.style },
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
React.createElement(Spin, { spinning: bodyLoading === true ? true : false },
|
|
12
|
+
keyword.length === 0 && (React.createElement(CollapseList, { onActiveKeyChange: onActiveKeyChange, collapseData: collapseData, onMouseDown: onMouseDown, modelService: modelService, commandService: commandService, graphConfig: graphConfig, prefixClz: prefixClz })),
|
|
13
|
+
keyword.length > 0 && (React.createElement(SearchResult, { searchResult: searchResult, onMouseDown: onMouseDown, modelService: modelService, commandService: commandService, graphConfig: graphConfig, prefixClz: prefixClz })))));
|
|
12
14
|
};
|
|
13
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/canvas-collapse-panel/panel-body/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/canvas-collapse-panel/panel-body/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAEzC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,MAAM,CAAC,MAAM,iBAAiB,GAAyB,KAAK,CAAC,EAAE;IAC7D,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,iBAAiB,EAAE,GAAG,KAAK,CAAA;IAClE,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,WAAW,CAAC,KAAK,CAAC,CAAA;IACrF,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,GAAG,KAAK,CAAA;IAErD,OAAO,CACL,6BAAK,SAAS,EAAE,GAAG,SAAS,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK;QACrD,oBAAC,IAAI,IAAC,QAAQ,EAAE,WAAW,KAAK,IAAI,CAAA,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;YAC/C,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,CACvB,oBAAC,YAAY,IACX,iBAAiB,EAAE,iBAAiB,EACpC,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,GACpB,CACH;YACA,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,CACrB,oBAAC,YAAY,IACX,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,GACpB,CACH,CACI,CACH,CACP,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -8,7 +8,7 @@ interface INodeRenderOptions {
|
|
|
8
8
|
commandService: IGraphCommandService;
|
|
9
9
|
onMouseDown: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
10
10
|
}
|
|
11
|
-
export declare const renderNode: (props: INodeRenderOptions) =>
|
|
11
|
+
export declare const renderNode: (props: INodeRenderOptions) => React.JSX.Element;
|
|
12
12
|
interface INodeProps {
|
|
13
13
|
prefixClz: string;
|
|
14
14
|
item: IPanelNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IGraphCommandService } from '@sunspirytus/xflow-core';
|
|
2
|
-
import type { IProps } from './interface';
|
|
2
|
+
import type { IPanelNode, IProps } from './interface';
|
|
3
3
|
import { NsCollapsePanelModel } from './interface';
|
|
4
4
|
/** 方便其他组件执行Command改变Panel内部状态 */
|
|
5
5
|
export declare const executeCollapsePanelCommand: (cmds: IGraphCommandService, updateModel: (state: NsCollapsePanelModel.IState) => Promise<void>) => void;
|
|
@@ -8,7 +8,7 @@ export declare const useCollapsePanelData: (props: IProps) => {
|
|
|
8
8
|
state: NsCollapsePanelModel.IState;
|
|
9
9
|
collapsible: boolean;
|
|
10
10
|
setState: import("@sunspirytus/xflow-core").NsModel.ISetValue<NsCollapsePanelModel.IState>;
|
|
11
|
-
onKeywordChange:
|
|
12
|
-
onActiveKeyChange:
|
|
11
|
+
onKeywordChange: (keyword: string, panelNodes: IPanelNode[]) => Promise<void>;
|
|
12
|
+
onActiveKeyChange: (activeKey: string) => void;
|
|
13
13
|
onCollapseChange: (isCollapsed: boolean) => void;
|
|
14
14
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { ILayoutProps } from './interface';
|
|
2
3
|
export declare const usePanelLyaoutStyle: (config: ILayoutProps) => {
|
|
3
|
-
headerStyle:
|
|
4
|
-
bodyStyle:
|
|
5
|
-
footerStyle:
|
|
4
|
+
headerStyle: import("react").CSSProperties;
|
|
5
|
+
bodyStyle: import("react").CSSProperties;
|
|
6
|
+
footerStyle: import("react").CSSProperties;
|
|
6
7
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { IMenuTarget, IMenuOptions, IModelService, IGraphCommandService } from '@sunspirytus/xflow-core';
|
|
2
3
|
export interface IRenderProps {
|
|
3
4
|
idx: number;
|
|
@@ -7,4 +8,4 @@ export interface IRenderProps {
|
|
|
7
8
|
modelService: IModelService;
|
|
8
9
|
commandService: IGraphCommandService;
|
|
9
10
|
}
|
|
10
|
-
export declare const renderMenuOptions: (props: IRenderProps) =>
|
|
11
|
+
export declare const renderMenuOptions: (props: IRenderProps) => React.JSX.Element;
|
|
@@ -8,4 +8,4 @@ export { IProps as ICanvasContextMenuProps };
|
|
|
8
8
|
export declare const CanvasContextMenu: React.FC<IProps>;
|
|
9
9
|
export declare const createCtxMenuConfig: <T extends unknown = any>(addOptions: (config: ContextMenuConfig, proxy: {
|
|
10
10
|
getValue: () => T;
|
|
11
|
-
}) => void) => (props?: T) =>
|
|
11
|
+
}) => void) => (props?: T) => ContextMenuConfig;
|
|
@@ -4,5 +4,5 @@ interface Props extends AbstractTooltipProps {
|
|
|
4
4
|
text: React.ReactNode;
|
|
5
5
|
}
|
|
6
6
|
export declare const Tooltip: React.FC<Props>;
|
|
7
|
-
export declare function renderFormItemExtra(text?: string):
|
|
7
|
+
export declare function renderFormItemExtra(text?: string): React.JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -3,4 +3,4 @@ import type { IControlProps } from '../../interface';
|
|
|
3
3
|
export declare const xflowDefaultControls: [string, React.FC<IControlProps>][];
|
|
4
4
|
export type IControlMap = Map<string, React.FC<IControlProps>>;
|
|
5
5
|
export declare const makeControlMap: (controls: [string, React.FC<IControlProps>][]) => Map<string, React.FC<IControlProps>>;
|
|
6
|
-
export declare const getControlFromMap: (key: string, controlMap: Map<string, React.FC<IControlProps>>, defaultControl?: React.ComponentType<IControlProps>) => any
|
|
6
|
+
export declare const getControlFromMap: (key: string, controlMap: Map<string, React.FC<IControlProps>>, defaultControl?: React.ComponentType<IControlProps>) => React.FC<IControlProps> | React.ComponentClass<IControlProps, any>;
|
|
@@ -15,8 +15,8 @@ export declare namespace NsJsonSchemaFormModel {
|
|
|
15
15
|
/** 方便其他组件执行Command改变Panel内部状态 */
|
|
16
16
|
export declare const executeJsonSchemaFormCommand: (cmds: IGraphCommandService, updateModel: (state: NsJsonSchemaFormModel.IState) => Promise<void>) => void;
|
|
17
17
|
export declare const useJsonSchemaFormModel: (props: IProps) => {
|
|
18
|
-
commandService:
|
|
19
|
-
modelService:
|
|
18
|
+
commandService: IGraphCommandService;
|
|
19
|
+
modelService: IModelService;
|
|
20
20
|
state: NsJsonSchemaFormModel.IState;
|
|
21
21
|
setState: import("@sunspirytus/xflow-core").NsModel.ISetValue<NsJsonSchemaFormModel.IState>;
|
|
22
22
|
model: import("@sunspirytus/xflow-core").RxModel<NsJsonSchemaFormModel.IState>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { IPanelProps } from './interface';
|
|
2
3
|
export declare const usePanelLyaoutStyle: (config: IPanelProps, noSchema: boolean) => {
|
|
3
|
-
headerStyle:
|
|
4
|
-
bodyStyle:
|
|
5
|
-
footerStyle:
|
|
4
|
+
headerStyle: import("react").CSSProperties;
|
|
5
|
+
bodyStyle: import("react").CSSProperties;
|
|
6
|
+
footerStyle: import("react").CSSProperties;
|
|
6
7
|
};
|
|
@@ -9,7 +9,7 @@ interface IConfigRenderOptions {
|
|
|
9
9
|
commandService: IGraphCommandService;
|
|
10
10
|
onMouseDown: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
11
11
|
}
|
|
12
|
-
export declare const renderNode: (props: IConfigRenderOptions) =>
|
|
12
|
+
export declare const renderNode: (props: IConfigRenderOptions) => React.JSX.Element;
|
|
13
13
|
interface ITitleProps {
|
|
14
14
|
prefixClz: string;
|
|
15
15
|
item: ITreeNode;
|
|
@@ -19,7 +19,7 @@ interface ITitleProps {
|
|
|
19
19
|
popoverContent: React.ReactNode;
|
|
20
20
|
onMouseDown: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
21
21
|
}
|
|
22
|
-
export declare const NodeTitle: (props: ITitleProps) =>
|
|
22
|
+
export declare const NodeTitle: (props: ITitleProps) => React.JSX.Element;
|
|
23
23
|
export interface IBodyProps extends IProps {
|
|
24
24
|
state: NsTreePanelData.IState;
|
|
25
25
|
onFolderExpand: IOnFolderExpand;
|
|
@@ -17,10 +17,10 @@ export declare const executeNodeDndTreeCommand: (cmds: IGraphCommandService, upd
|
|
|
17
17
|
export declare const useTreePanelData: (props: IProps) => {
|
|
18
18
|
state: NsNodeTreePanelModel.IState;
|
|
19
19
|
setState: import("@sunspirytus/xflow-core").NsModel.ISetValue<NsNodeTreePanelModel.IState>;
|
|
20
|
-
onKeywordChange:
|
|
21
|
-
onFolderExpand:
|
|
20
|
+
onKeywordChange: (keyword: string) => Promise<void>;
|
|
21
|
+
onFolderExpand: (expandedKeys: string[]) => void;
|
|
22
22
|
};
|
|
23
23
|
export declare function NodeList2Tree(treeNodes?: ITreeNode[]): {
|
|
24
24
|
treeData: ITreeNode[];
|
|
25
|
-
rootNodes:
|
|
25
|
+
rootNodes: ITreeNode[];
|
|
26
26
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { IPanelProps } from './interface';
|
|
2
3
|
export declare const usePanelLyaoutStyle: (config: IPanelProps) => {
|
|
3
|
-
headerStyle:
|
|
4
|
-
bodyStyle:
|
|
5
|
-
footerStyle:
|
|
4
|
+
headerStyle: import("react").CSSProperties;
|
|
5
|
+
bodyStyle: import("react").CSSProperties;
|
|
6
|
+
footerStyle: import("react").CSSProperties;
|
|
6
7
|
};
|
|
@@ -17,4 +17,4 @@ export declare namespace CANVAS_SCALE_TOOLBAR_CONFIG {
|
|
|
17
17
|
}) => IToolbarGroupOptions[];
|
|
18
18
|
}
|
|
19
19
|
export declare const TOOLBAR_TYPE = "CANVAS_SCALE_TOOLBAR";
|
|
20
|
-
export declare const useConfig: (value?: any) =>
|
|
20
|
+
export declare const useConfig: (value?: any) => import("../canvas-toolbar/config").ToolbarConfig;
|
|
@@ -5,5 +5,5 @@ export declare const CanvasToolbar: React.FC<IToolbarProps>;
|
|
|
5
5
|
interface IValueProxy<T> {
|
|
6
6
|
getValue: () => T;
|
|
7
7
|
}
|
|
8
|
-
export declare const createToolbarConfig: <T extends unknown = any>(addOptions: (config: ToolbarConfig, proxy: IValueProxy<T>) => void) => (value?: T) =>
|
|
8
|
+
export declare const createToolbarConfig: <T extends unknown = any>(addOptions: (config: ToolbarConfig, proxy: IValueProxy<T>) => void) => (value?: T) => ToolbarConfig;
|
|
9
9
|
export { IToolbarProps };
|
|
@@ -13,4 +13,4 @@ export declare namespace NsAddEdgeEvent {
|
|
|
13
13
|
attrs?: NsGraph.IEdgeConfig['attrs'];
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
export declare const useGraphConfig: (props?: IFlowchartGraphProps) =>
|
|
16
|
+
export declare const useGraphConfig: (props?: IFlowchartGraphProps) => import("@sunspirytus/xflow-core").GraphConfig;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="lodash" />
|
|
1
2
|
import type { IApplication } from '@sunspirytus/xflow-core';
|
|
2
3
|
import type { Graph } from '@antv/x6';
|
|
3
4
|
export declare const globalProps: {
|
|
@@ -13,4 +14,4 @@ export declare const getGraphData: () => Promise<{
|
|
|
13
14
|
edges: import("@sunspirytus/xflow-core").NsGraph.IEdgeConfig[];
|
|
14
15
|
}>;
|
|
15
16
|
/** 更新配置时通知上传执行保存 */
|
|
16
|
-
export declare const onConfigChange: any
|
|
17
|
+
export declare const onConfigChange: import("lodash").DebouncedFunc<(config: any) => any>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { EditorPanels } from './components/fields';
|
|
2
3
|
/** 默认支持修改标签和重命名功能 */
|
|
3
4
|
export declare const defaultControlMapService: (controlMap: any) => any;
|
|
4
5
|
export { EditorPanels };
|
|
5
6
|
export declare const FlowchartService: {
|
|
6
|
-
NodeService:
|
|
7
|
-
EdgeService:
|
|
8
|
-
GroupService:
|
|
9
|
-
CanvasService:
|
|
7
|
+
NodeService: import("react").FC<any>;
|
|
8
|
+
EdgeService: import("react").FC<any>;
|
|
9
|
+
GroupService: import("react").FC<any>;
|
|
10
|
+
CanvasService: import("react").FC<{}>;
|
|
10
11
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export type PromiseType<P extends Promise<any>> = P extends Promise<infer T> ? T : never;
|
|
2
2
|
export type FunctionReturningPromise = (...args: any[]) => Promise<any>;
|
|
3
|
-
export default function useAsync<T extends FunctionReturningPromise>(fn: T):
|
|
3
|
+
export default function useAsync<T extends FunctionReturningPromise>(fn: T): {
|
|
4
|
+
loading: boolean;
|
|
5
|
+
data?: unknown;
|
|
6
|
+
};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const FlowchartContext: import("react").Context<{}>;
|
|
@@ -11,5 +11,5 @@ export declare namespace NsPanelData {
|
|
|
11
11
|
export declare const usePanelData: (props: IProps) => {
|
|
12
12
|
state: NsPanelData.IState;
|
|
13
13
|
setState: import("@sunspirytus/xflow-core").NsModel.ISetValue<NsPanelData.IState>;
|
|
14
|
-
onKeywordChange:
|
|
14
|
+
onKeywordChange: (keyword: string) => Promise<void>;
|
|
15
15
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { IGraphCommandService, IModelService } from '@sunspirytus/xflow-core';
|
|
2
3
|
import type { PropsProxy } from './config';
|
|
3
4
|
interface IContext<T = any> {
|
|
@@ -5,6 +6,6 @@ interface IContext<T = any> {
|
|
|
5
6
|
commandService: IGraphCommandService;
|
|
6
7
|
modelService: IModelService;
|
|
7
8
|
}
|
|
8
|
-
export declare const PanelContext: any
|
|
9
|
+
export declare const PanelContext: React.Context<IContext<any>>;
|
|
9
10
|
export declare const usePanelContext: <T extends unknown>() => IContext<T>;
|
|
10
11
|
export {};
|
|
@@ -54,6 +54,8 @@ export interface IProps extends Partial<ILayoutProps> {
|
|
|
54
54
|
onCollapseChange?: (isCollapsed: boolean) => void;
|
|
55
55
|
/** collapseBtn 的样式 */
|
|
56
56
|
collapseButtonStyle?: React.CSSProperties;
|
|
57
|
+
/** 是否正在加载中 */
|
|
58
|
+
bodyLoading?: boolean;
|
|
57
59
|
}
|
|
58
60
|
/** drop节点的回调,通过回调创建画布的节点 */
|
|
59
61
|
export interface IOnNodeDrop {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../src/canvas-collapse-panel/interface.tsx"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../src/canvas-collapse-panel/interface.tsx"],"names":[],"mappings":";;;;AAyIA,IAAiB,oBAAoB,CAiBpC;AAjBD,WAAiB,oBAAoB;;IACtB,uBAAE,GAAG,qBAAqB,CAAA;IAa1B,6BAAQ,GAAG,UAAO,KAAoB;;YACjD,sBAAO,KAAK,CAAC,UAAU,CAAS,qBAAA,EAAE,CAAC,EAAA;;SACpC,CAAA;AACH,CAAC,EAjBgB,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAiBpC"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IGraphConfig } from '@sunspirytus/xflow-core';
|
|
3
|
+
import type { IProps, NsCollapsePanelModel, IOnActiveKeyChange, IPanelNode, INodeFactoryArgs } from '../interface';
|
|
2
4
|
export interface IBodyProps extends IProps {
|
|
3
5
|
state: NsCollapsePanelModel.IState;
|
|
4
6
|
onActiveKeyChange: IOnActiveKeyChange;
|
|
5
7
|
}
|
|
6
8
|
export declare const defaultNodeFactory: (args: INodeFactoryArgs) => import("@antv/x6").Node<import("@antv/x6").Node.Properties>;
|
|
7
9
|
export declare const useGraphDnd: (props: IBodyProps) => {
|
|
8
|
-
graphConfig:
|
|
9
|
-
onMouseDown:
|
|
10
|
-
modelService:
|
|
11
|
-
commandService:
|
|
10
|
+
graphConfig: IGraphConfig;
|
|
11
|
+
onMouseDown: (nodeConfig: IPanelNode) => (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
12
|
+
modelService: import("@sunspirytus/xflow-core").IModelService;
|
|
13
|
+
commandService: import("@sunspirytus/xflow-core").IGraphCommandService;
|
|
12
14
|
};
|
|
@@ -6,13 +6,15 @@ var react_1 = tslib_1.__importDefault(require("react"));
|
|
|
6
6
|
var dnd_hook_1 = require("./dnd-hook");
|
|
7
7
|
var panel_search_list_1 = require("./panel-search-list");
|
|
8
8
|
var collapse_1 = require("./collapse");
|
|
9
|
+
var antd_1 = require("antd");
|
|
9
10
|
var CollapsePanelBody = function (props) {
|
|
10
|
-
var state = props.state, prefixClz = props.prefixClz, onActiveKeyChange = props.onActiveKeyChange;
|
|
11
|
+
var state = props.state, bodyLoading = props.bodyLoading, prefixClz = props.prefixClz, onActiveKeyChange = props.onActiveKeyChange;
|
|
11
12
|
var _a = (0, dnd_hook_1.useGraphDnd)(props), graphConfig = _a.graphConfig, onMouseDown = _a.onMouseDown, modelService = _a.modelService, commandService = _a.commandService;
|
|
12
13
|
var searchResult = state.searchResult, collapseData = state.collapseData, keyword = state.keyword;
|
|
13
14
|
return (react_1.default.createElement("div", { className: "".concat(prefixClz, "-body"), style: props.style },
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
react_1.default.createElement(antd_1.Spin, { spinning: bodyLoading === true ? true : false },
|
|
16
|
+
keyword.length === 0 && (react_1.default.createElement(collapse_1.CollapseList, { onActiveKeyChange: onActiveKeyChange, collapseData: collapseData, onMouseDown: onMouseDown, modelService: modelService, commandService: commandService, graphConfig: graphConfig, prefixClz: prefixClz })),
|
|
17
|
+
keyword.length > 0 && (react_1.default.createElement(panel_search_list_1.SearchResult, { searchResult: searchResult, onMouseDown: onMouseDown, modelService: modelService, commandService: commandService, graphConfig: graphConfig, prefixClz: prefixClz })))));
|
|
16
18
|
};
|
|
17
19
|
exports.CollapsePanelBody = CollapsePanelBody;
|
|
18
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/canvas-collapse-panel/panel-body/index.tsx"],"names":[],"mappings":";;;;AAAA,wDAAyB;AACzB,uCAAwC;AACxC,yDAAkD;AAClD,uCAAyC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/canvas-collapse-panel/panel-body/index.tsx"],"names":[],"mappings":";;;;AAAA,wDAAyB;AACzB,uCAAwC;AACxC,yDAAkD;AAClD,uCAAyC;AAEzC,6BAA2B;AAEpB,IAAM,iBAAiB,GAAyB,UAAA,KAAK;IAClD,IAAA,KAAK,GAAgD,KAAK,MAArD,EAAE,WAAW,GAAmC,KAAK,YAAxC,EAAE,SAAS,GAAwB,KAAK,UAA7B,EAAE,iBAAiB,GAAK,KAAK,kBAAV,CAAU;IAC5D,IAAA,KAA6D,IAAA,sBAAW,EAAC,KAAK,CAAC,EAA7E,WAAW,iBAAA,EAAE,WAAW,iBAAA,EAAE,YAAY,kBAAA,EAAE,cAAc,oBAAuB,CAAA;IAC7E,IAAA,YAAY,GAA4B,KAAK,aAAjC,EAAE,YAAY,GAAc,KAAK,aAAnB,EAAE,OAAO,GAAK,KAAK,QAAV,CAAU;IAErD,OAAO,CACL,uCAAK,SAAS,EAAE,UAAG,SAAS,UAAO,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK;QACrD,8BAAC,WAAI,IAAC,QAAQ,EAAE,WAAW,KAAK,IAAI,CAAA,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK;YAC/C,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,CACvB,8BAAC,uBAAY,IACX,iBAAiB,EAAE,iBAAiB,EACpC,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,GACpB,CACH;YACA,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,CACrB,8BAAC,gCAAY,IACX,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,GACpB,CACH,CACI,CACH,CACP,CAAA;AACH,CAAC,CAAA;AAhCY,QAAA,iBAAiB,qBAgC7B"}
|
|
@@ -8,7 +8,7 @@ interface INodeRenderOptions {
|
|
|
8
8
|
commandService: IGraphCommandService;
|
|
9
9
|
onMouseDown: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
10
10
|
}
|
|
11
|
-
export declare const renderNode: (props: INodeRenderOptions) =>
|
|
11
|
+
export declare const renderNode: (props: INodeRenderOptions) => React.JSX.Element;
|
|
12
12
|
interface INodeProps {
|
|
13
13
|
prefixClz: string;
|
|
14
14
|
item: IPanelNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IGraphCommandService } from '@sunspirytus/xflow-core';
|
|
2
|
-
import type { IProps } from './interface';
|
|
2
|
+
import type { IPanelNode, IProps } from './interface';
|
|
3
3
|
import { NsCollapsePanelModel } from './interface';
|
|
4
4
|
/** 方便其他组件执行Command改变Panel内部状态 */
|
|
5
5
|
export declare const executeCollapsePanelCommand: (cmds: IGraphCommandService, updateModel: (state: NsCollapsePanelModel.IState) => Promise<void>) => void;
|
|
@@ -8,7 +8,7 @@ export declare const useCollapsePanelData: (props: IProps) => {
|
|
|
8
8
|
state: NsCollapsePanelModel.IState;
|
|
9
9
|
collapsible: boolean;
|
|
10
10
|
setState: import("@sunspirytus/xflow-core").NsModel.ISetValue<NsCollapsePanelModel.IState>;
|
|
11
|
-
onKeywordChange:
|
|
12
|
-
onActiveKeyChange:
|
|
11
|
+
onKeywordChange: (keyword: string, panelNodes: IPanelNode[]) => Promise<void>;
|
|
12
|
+
onActiveKeyChange: (activeKey: string) => void;
|
|
13
13
|
onCollapseChange: (isCollapsed: boolean) => void;
|
|
14
14
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { ILayoutProps } from './interface';
|
|
2
3
|
export declare const usePanelLyaoutStyle: (config: ILayoutProps) => {
|
|
3
|
-
headerStyle:
|
|
4
|
-
bodyStyle:
|
|
5
|
-
footerStyle:
|
|
4
|
+
headerStyle: import("react").CSSProperties;
|
|
5
|
+
bodyStyle: import("react").CSSProperties;
|
|
6
|
+
footerStyle: import("react").CSSProperties;
|
|
6
7
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { IMenuTarget, IMenuOptions, IModelService, IGraphCommandService } from '@sunspirytus/xflow-core';
|
|
2
3
|
export interface IRenderProps {
|
|
3
4
|
idx: number;
|
|
@@ -7,4 +8,4 @@ export interface IRenderProps {
|
|
|
7
8
|
modelService: IModelService;
|
|
8
9
|
commandService: IGraphCommandService;
|
|
9
10
|
}
|
|
10
|
-
export declare const renderMenuOptions: (props: IRenderProps) =>
|
|
11
|
+
export declare const renderMenuOptions: (props: IRenderProps) => React.JSX.Element;
|
|
@@ -8,4 +8,4 @@ export { IProps as ICanvasContextMenuProps };
|
|
|
8
8
|
export declare const CanvasContextMenu: React.FC<IProps>;
|
|
9
9
|
export declare const createCtxMenuConfig: <T extends unknown = any>(addOptions: (config: ContextMenuConfig, proxy: {
|
|
10
10
|
getValue: () => T;
|
|
11
|
-
}) => void) => (props?: T) =>
|
|
11
|
+
}) => void) => (props?: T) => ContextMenuConfig;
|
|
@@ -4,5 +4,5 @@ interface Props extends AbstractTooltipProps {
|
|
|
4
4
|
text: React.ReactNode;
|
|
5
5
|
}
|
|
6
6
|
export declare const Tooltip: React.FC<Props>;
|
|
7
|
-
export declare function renderFormItemExtra(text?: string):
|
|
7
|
+
export declare function renderFormItemExtra(text?: string): React.JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -3,4 +3,4 @@ import type { IControlProps } from '../../interface';
|
|
|
3
3
|
export declare const xflowDefaultControls: [string, React.FC<IControlProps>][];
|
|
4
4
|
export type IControlMap = Map<string, React.FC<IControlProps>>;
|
|
5
5
|
export declare const makeControlMap: (controls: [string, React.FC<IControlProps>][]) => Map<string, React.FC<IControlProps>>;
|
|
6
|
-
export declare const getControlFromMap: (key: string, controlMap: Map<string, React.FC<IControlProps>>, defaultControl?: React.ComponentType<IControlProps>) => any
|
|
6
|
+
export declare const getControlFromMap: (key: string, controlMap: Map<string, React.FC<IControlProps>>, defaultControl?: React.ComponentType<IControlProps>) => React.FC<IControlProps> | React.ComponentClass<IControlProps, any>;
|
|
@@ -15,8 +15,8 @@ export declare namespace NsJsonSchemaFormModel {
|
|
|
15
15
|
/** 方便其他组件执行Command改变Panel内部状态 */
|
|
16
16
|
export declare const executeJsonSchemaFormCommand: (cmds: IGraphCommandService, updateModel: (state: NsJsonSchemaFormModel.IState) => Promise<void>) => void;
|
|
17
17
|
export declare const useJsonSchemaFormModel: (props: IProps) => {
|
|
18
|
-
commandService:
|
|
19
|
-
modelService:
|
|
18
|
+
commandService: IGraphCommandService;
|
|
19
|
+
modelService: IModelService;
|
|
20
20
|
state: NsJsonSchemaFormModel.IState;
|
|
21
21
|
setState: import("@sunspirytus/xflow-core").NsModel.ISetValue<NsJsonSchemaFormModel.IState>;
|
|
22
22
|
model: import("@sunspirytus/xflow-core").RxModel<NsJsonSchemaFormModel.IState>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { IPanelProps } from './interface';
|
|
2
3
|
export declare const usePanelLyaoutStyle: (config: IPanelProps, noSchema: boolean) => {
|
|
3
|
-
headerStyle:
|
|
4
|
-
bodyStyle:
|
|
5
|
-
footerStyle:
|
|
4
|
+
headerStyle: import("react").CSSProperties;
|
|
5
|
+
bodyStyle: import("react").CSSProperties;
|
|
6
|
+
footerStyle: import("react").CSSProperties;
|
|
6
7
|
};
|
|
@@ -9,7 +9,7 @@ interface IConfigRenderOptions {
|
|
|
9
9
|
commandService: IGraphCommandService;
|
|
10
10
|
onMouseDown: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
11
11
|
}
|
|
12
|
-
export declare const renderNode: (props: IConfigRenderOptions) =>
|
|
12
|
+
export declare const renderNode: (props: IConfigRenderOptions) => React.JSX.Element;
|
|
13
13
|
interface ITitleProps {
|
|
14
14
|
prefixClz: string;
|
|
15
15
|
item: ITreeNode;
|
|
@@ -19,7 +19,7 @@ interface ITitleProps {
|
|
|
19
19
|
popoverContent: React.ReactNode;
|
|
20
20
|
onMouseDown: (e: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
21
21
|
}
|
|
22
|
-
export declare const NodeTitle: (props: ITitleProps) =>
|
|
22
|
+
export declare const NodeTitle: (props: ITitleProps) => React.JSX.Element;
|
|
23
23
|
export interface IBodyProps extends IProps {
|
|
24
24
|
state: NsTreePanelData.IState;
|
|
25
25
|
onFolderExpand: IOnFolderExpand;
|
|
@@ -17,10 +17,10 @@ export declare const executeNodeDndTreeCommand: (cmds: IGraphCommandService, upd
|
|
|
17
17
|
export declare const useTreePanelData: (props: IProps) => {
|
|
18
18
|
state: NsNodeTreePanelModel.IState;
|
|
19
19
|
setState: import("@sunspirytus/xflow-core").NsModel.ISetValue<NsNodeTreePanelModel.IState>;
|
|
20
|
-
onKeywordChange:
|
|
21
|
-
onFolderExpand:
|
|
20
|
+
onKeywordChange: (keyword: string) => Promise<void>;
|
|
21
|
+
onFolderExpand: (expandedKeys: string[]) => void;
|
|
22
22
|
};
|
|
23
23
|
export declare function NodeList2Tree(treeNodes?: ITreeNode[]): {
|
|
24
24
|
treeData: ITreeNode[];
|
|
25
|
-
rootNodes:
|
|
25
|
+
rootNodes: ITreeNode[];
|
|
26
26
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { IPanelProps } from './interface';
|
|
2
3
|
export declare const usePanelLyaoutStyle: (config: IPanelProps) => {
|
|
3
|
-
headerStyle:
|
|
4
|
-
bodyStyle:
|
|
5
|
-
footerStyle:
|
|
4
|
+
headerStyle: import("react").CSSProperties;
|
|
5
|
+
bodyStyle: import("react").CSSProperties;
|
|
6
|
+
footerStyle: import("react").CSSProperties;
|
|
6
7
|
};
|
|
@@ -17,4 +17,4 @@ export declare namespace CANVAS_SCALE_TOOLBAR_CONFIG {
|
|
|
17
17
|
}) => IToolbarGroupOptions[];
|
|
18
18
|
}
|
|
19
19
|
export declare const TOOLBAR_TYPE = "CANVAS_SCALE_TOOLBAR";
|
|
20
|
-
export declare const useConfig: (value?: any) =>
|
|
20
|
+
export declare const useConfig: (value?: any) => import("../canvas-toolbar/config").ToolbarConfig;
|
|
@@ -5,5 +5,5 @@ export declare const CanvasToolbar: React.FC<IToolbarProps>;
|
|
|
5
5
|
interface IValueProxy<T> {
|
|
6
6
|
getValue: () => T;
|
|
7
7
|
}
|
|
8
|
-
export declare const createToolbarConfig: <T extends unknown = any>(addOptions: (config: ToolbarConfig, proxy: IValueProxy<T>) => void) => (value?: T) =>
|
|
8
|
+
export declare const createToolbarConfig: <T extends unknown = any>(addOptions: (config: ToolbarConfig, proxy: IValueProxy<T>) => void) => (value?: T) => ToolbarConfig;
|
|
9
9
|
export { IToolbarProps };
|
|
@@ -13,4 +13,4 @@ export declare namespace NsAddEdgeEvent {
|
|
|
13
13
|
attrs?: NsGraph.IEdgeConfig['attrs'];
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
export declare const useGraphConfig: (props?: IFlowchartGraphProps) =>
|
|
16
|
+
export declare const useGraphConfig: (props?: IFlowchartGraphProps) => import("@sunspirytus/xflow-core").GraphConfig;
|