@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
package/lib/common/uuid.js
CHANGED
|
@@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.uuidv4 = void 0;
|
|
4
4
|
/** https://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid#answer-2117523 */
|
|
5
5
|
function uuidv4() {
|
|
6
|
-
|
|
6
|
+
var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
7
7
|
var r = (Math.random() * 16) | 0, v = c == 'x' ? r : (r & 0x3) | 0x8;
|
|
8
8
|
return v.toString(16);
|
|
9
9
|
});
|
|
10
|
+
return 'uuidv4_' + uuid.replace(/-/g, '_');
|
|
10
11
|
}
|
|
11
12
|
exports.uuidv4 = uuidv4;
|
|
12
13
|
//# sourceMappingURL=uuid.js.map
|
package/lib/common/uuid.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uuid.js","sourceRoot":"","sources":["../../src/common/uuid.ts"],"names":[],"mappings":";;;AAAA,0FAA0F;AAC1F,SAAgB,MAAM;IACpB,
|
|
1
|
+
{"version":3,"file":"uuid.js","sourceRoot":"","sources":["../../src/common/uuid.ts"],"names":[],"mappings":";;;AAAA,0FAA0F;AAC1F,SAAgB,MAAM;IACpB,IAAM,IAAI,GAAG,sCAAsC,CAAC,OAAO,CAAC,OAAO,EAAE,UAAU,CAAC;QAC9E,IAAM,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;AAPD,wBAOC"}
|
|
@@ -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/lib/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/lib/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>;
|
|
@@ -181,7 +181,6 @@ var FrontendApplication = /** @class */ (function () {
|
|
|
181
181
|
return tslib_1.__generator(this, function (_b) {
|
|
182
182
|
switch (_b.label) {
|
|
183
183
|
case 0:
|
|
184
|
-
console.log(this.contributions.getContributions());
|
|
185
184
|
_loop_1 = function (contribution) {
|
|
186
185
|
var error_1;
|
|
187
186
|
return tslib_1.__generator(this, function (_c) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"application.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wBAAS,GAAE;OACC,mBAAmB,CAwK/B;IAAD,0BAAC;CAAA,AAxKD,IAwKC;AAxKY,kDAAmB"}
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { FrontendApplication } from '../application';
|
|
3
3
|
/** AppContext */
|
|
4
|
-
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 {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@sunspirytus/xflow-core",
|
|
4
|
-
"version": "1.0.52-
|
|
4
|
+
"version": "1.0.52-3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -24,13 +24,17 @@
|
|
|
24
24
|
"registry": "https://registry.npmjs.org"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@sunspirytus/xflow-hook": "1.0.52-
|
|
27
|
+
"@sunspirytus/xflow-hook": "1.0.52-3",
|
|
28
28
|
"classnames": "^2.3.1",
|
|
29
29
|
"immer": "^9.0.7",
|
|
30
30
|
"mana-common": "^0.3.1",
|
|
31
31
|
"mana-syringe": "^0.2.2",
|
|
32
32
|
"reflect-metadata": "^0.1.13",
|
|
33
|
-
"rxjs": "^6.6.7"
|
|
33
|
+
"rxjs": "^6.6.7",
|
|
34
|
+
"antd": "^4.17.4",
|
|
35
|
+
"react": "^17.0.2",
|
|
36
|
+
"react-dom": "^17.0.2",
|
|
37
|
+
"@types/jest": "^27.0.0"
|
|
34
38
|
},
|
|
35
39
|
"devDependencies": {
|
|
36
40
|
"@antv/layout": "^0.1.22",
|
|
@@ -115,5 +119,5 @@
|
|
|
115
119
|
"test": "jest src --verbose true",
|
|
116
120
|
"test:coverage": "jest src --coverage"
|
|
117
121
|
},
|
|
118
|
-
"readme": "# @
|
|
122
|
+
"readme": "# @sunspirytus/xflow-core\n\n## Getting Started\n\nInstall dependencies\n\n```bash\n$ npm i\n```\n\nwatch file change\n\n```bash\n$ npm start\n```\n\nrelease version\n\n```bash\n$ npm run release\n```\n"
|
|
119
123
|
}
|