sequential-workflow-designer-react 0.7.0 → 0.8.0
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.
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Definition, GlobalEditorContext
|
|
3
|
-
export interface GlobalEditorWrapper {
|
|
4
|
-
readonly properties:
|
|
5
|
-
setProperty(name:
|
|
2
|
+
import { Definition, GlobalEditorContext } from 'sequential-workflow-designer';
|
|
3
|
+
export interface GlobalEditorWrapper<TDefinition extends Definition> {
|
|
4
|
+
readonly properties: TDefinition['properties'];
|
|
5
|
+
setProperty(name: keyof TDefinition['properties'], value: TDefinition['properties'][typeof name]): void;
|
|
6
6
|
}
|
|
7
|
-
export declare function useGlobalEditor(): GlobalEditorWrapper
|
|
7
|
+
export declare function useGlobalEditor<TDefinition extends Definition = Definition>(): GlobalEditorWrapper<TDefinition>;
|
|
8
8
|
export declare function GlobalEditorWrapperContext(props: {
|
|
9
9
|
children: JSX.Element;
|
|
10
10
|
definition: Definition;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ToolboxConfiguration, StepsConfiguration, DesignerExtension } from 'sequential-workflow-designer';
|
|
2
|
+
import { Definition, ToolboxConfiguration, StepsConfiguration, DesignerExtension } from 'sequential-workflow-designer';
|
|
3
3
|
import { WrappedDefinition } from './WrappedDefinition';
|
|
4
|
-
export interface SequentialWorkflowDesignerProps {
|
|
5
|
-
definition: WrappedDefinition
|
|
6
|
-
onDefinitionChange: (state: WrappedDefinition) => void;
|
|
4
|
+
export interface SequentialWorkflowDesignerProps<TDefinition extends Definition> {
|
|
5
|
+
definition: WrappedDefinition<TDefinition>;
|
|
6
|
+
onDefinitionChange: (state: WrappedDefinition<TDefinition>) => void;
|
|
7
7
|
selectedStepId?: string | null;
|
|
8
8
|
onSelectedStepIdChanged?: (stepId: string | null) => void;
|
|
9
9
|
isReadonly?: boolean;
|
|
@@ -15,4 +15,4 @@ export interface SequentialWorkflowDesignerProps {
|
|
|
15
15
|
toolboxConfiguration: ToolboxConfiguration;
|
|
16
16
|
extensions?: DesignerExtension[];
|
|
17
17
|
}
|
|
18
|
-
export declare function SequentialWorkflowDesigner(props: SequentialWorkflowDesignerProps): JSX.Element;
|
|
18
|
+
export declare function SequentialWorkflowDesigner<TDefinition extends Definition>(props: SequentialWorkflowDesignerProps<TDefinition>): JSX.Element;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
export interface StepEditorWrapper {
|
|
2
|
+
import { StepEditorContext, Step } from 'sequential-workflow-designer';
|
|
3
|
+
export interface StepEditorWrapper<TStep extends Step> {
|
|
4
4
|
readonly id: string;
|
|
5
|
-
readonly type:
|
|
6
|
-
readonly componentType:
|
|
5
|
+
readonly type: TStep['type'];
|
|
6
|
+
readonly componentType: TStep['componentType'];
|
|
7
7
|
readonly name: string;
|
|
8
|
-
readonly properties:
|
|
9
|
-
readonly step:
|
|
8
|
+
readonly properties: TStep['properties'];
|
|
9
|
+
readonly step: TStep;
|
|
10
10
|
setName(name: string): void;
|
|
11
|
-
setProperty(name:
|
|
11
|
+
setProperty(name: keyof TStep['properties'], value: TStep['properties'][typeof name]): void;
|
|
12
12
|
notifyPropertiesChanged(): void;
|
|
13
13
|
notifyChildrenChanged(): void;
|
|
14
14
|
}
|
|
15
|
-
export declare function useStepEditor(): StepEditorWrapper
|
|
15
|
+
export declare function useStepEditor<TStep extends Step = Step>(): StepEditorWrapper<TStep>;
|
|
16
16
|
export declare function StepEditorWrapperContext(props: {
|
|
17
17
|
children: JSX.Element;
|
|
18
18
|
step: Step;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Definition } from 'sequential-workflow-designer';
|
|
2
|
-
export interface WrappedDefinition {
|
|
3
|
-
readonly value:
|
|
2
|
+
export interface WrappedDefinition<TDefinition extends Definition = Definition> {
|
|
3
|
+
readonly value: TDefinition;
|
|
4
4
|
readonly isValid: boolean | undefined;
|
|
5
5
|
}
|
|
6
|
-
export declare function wrapDefinition(value:
|
|
6
|
+
export declare function wrapDefinition<TDefinition extends Definition = Definition>(value: TDefinition, isValid?: boolean): WrappedDefinition<TDefinition>;
|
package/package.json
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sequential-workflow-designer-react",
|
|
3
3
|
"description": "React wrapper for Sequential Workflow Designer component.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.8.0",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "NoCode JS",
|
|
9
|
+
"url": "https://nocode-js.com/"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://nocode-js.com/",
|
|
12
|
+
"license": "MIT",
|
|
7
13
|
"repository": {
|
|
8
14
|
"type": "git",
|
|
9
15
|
"url": "https://github.com/nocode-js/sequential-workflow-designer.git"
|
|
@@ -14,8 +20,6 @@
|
|
|
14
20
|
"publishConfig": {
|
|
15
21
|
"registry": "https://registry.npmjs.org/"
|
|
16
22
|
},
|
|
17
|
-
"author": "N4NO.com",
|
|
18
|
-
"license": "MIT",
|
|
19
23
|
"scripts": {
|
|
20
24
|
"prepare": "cp ../LICENSE LICENSE",
|
|
21
25
|
"clean": "rm -rf lib",
|
|
@@ -32,7 +36,7 @@
|
|
|
32
36
|
"react-dom": "^18.2.0"
|
|
33
37
|
},
|
|
34
38
|
"peerDependencies": {
|
|
35
|
-
"sequential-workflow-designer": "^0.
|
|
39
|
+
"sequential-workflow-designer": "^0.8.0"
|
|
36
40
|
},
|
|
37
41
|
"devDependencies": {
|
|
38
42
|
"@typescript-eslint/eslint-plugin": "^5.47.0",
|