sequential-workflow-designer-react 0.11.0 → 0.13.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.
- package/README.md +4 -1
- package/lib/cjs/index.cjs +3 -1
- package/lib/esm/index.js +3 -1
- package/lib/index.d.ts +2 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -28,7 +28,8 @@ Import types:
|
|
|
28
28
|
import {
|
|
29
29
|
Definition,
|
|
30
30
|
ToolboxConfiguration,
|
|
31
|
-
StepsConfiguration
|
|
31
|
+
StepsConfiguration,
|
|
32
|
+
ValidatorConfiguration
|
|
32
33
|
} from 'sequential-workflow-designer';
|
|
33
34
|
import {
|
|
34
35
|
SequentialWorkflowDesigner,
|
|
@@ -55,6 +56,7 @@ Configure the designer.
|
|
|
55
56
|
```ts
|
|
56
57
|
const toolboxConfiguration: ToolboxConfiguration = { /* ... */ };
|
|
57
58
|
const stepsConfiguration: StepsConfiguration = { /* ... */ };
|
|
59
|
+
const validatorConfiguration: ValidatorConfiguration = { /* ... */ };
|
|
58
60
|
```
|
|
59
61
|
|
|
60
62
|
Create the global editor component:
|
|
@@ -102,6 +104,7 @@ At the end attach the designer.
|
|
|
102
104
|
definition={definition}
|
|
103
105
|
onDefinitionChange={setDefinition}
|
|
104
106
|
stepsConfiguration={stepsConfiguration}
|
|
107
|
+
validatorConfiguration={validatorConfiguration}
|
|
105
108
|
toolboxConfiguration={toolboxConfiguration}
|
|
106
109
|
controlBar={true}
|
|
107
110
|
globalEditor={<GlobalEditor />}
|
package/lib/cjs/index.cjs
CHANGED
|
@@ -159,6 +159,7 @@ function SequentialWorkflowDesigner(props) {
|
|
|
159
159
|
var theme = props.theme;
|
|
160
160
|
var undoStackSize = props.undoStackSize;
|
|
161
161
|
var steps = props.stepsConfiguration;
|
|
162
|
+
var validator = props.validatorConfiguration;
|
|
162
163
|
var toolbox = props.toolboxConfiguration;
|
|
163
164
|
var controlBar = props.controlBar;
|
|
164
165
|
var extensions = props.extensions;
|
|
@@ -243,6 +244,7 @@ function SequentialWorkflowDesigner(props) {
|
|
|
243
244
|
undoStackSize: undoStackSize,
|
|
244
245
|
toolbox: toolbox,
|
|
245
246
|
steps: steps,
|
|
247
|
+
validator: validator,
|
|
246
248
|
controlBar: controlBar,
|
|
247
249
|
editors: globalEditorRef.current && stepEditorRef.current
|
|
248
250
|
? {
|
|
@@ -271,7 +273,7 @@ function SequentialWorkflowDesigner(props) {
|
|
|
271
273
|
}
|
|
272
274
|
});
|
|
273
275
|
designerRef.current = designer;
|
|
274
|
-
}, [placeholder, definition, selectedStepId, isReadonly, theme, undoStackSize, toolbox, controlBar, steps, extensions]);
|
|
276
|
+
}, [placeholder, definition, selectedStepId, isReadonly, theme, undoStackSize, toolbox, controlBar, steps, validator, extensions]);
|
|
275
277
|
react.useEffect(function () {
|
|
276
278
|
return tryDestroy;
|
|
277
279
|
}, []);
|
package/lib/esm/index.js
CHANGED
|
@@ -157,6 +157,7 @@ function SequentialWorkflowDesigner(props) {
|
|
|
157
157
|
var theme = props.theme;
|
|
158
158
|
var undoStackSize = props.undoStackSize;
|
|
159
159
|
var steps = props.stepsConfiguration;
|
|
160
|
+
var validator = props.validatorConfiguration;
|
|
160
161
|
var toolbox = props.toolboxConfiguration;
|
|
161
162
|
var controlBar = props.controlBar;
|
|
162
163
|
var extensions = props.extensions;
|
|
@@ -241,6 +242,7 @@ function SequentialWorkflowDesigner(props) {
|
|
|
241
242
|
undoStackSize: undoStackSize,
|
|
242
243
|
toolbox: toolbox,
|
|
243
244
|
steps: steps,
|
|
245
|
+
validator: validator,
|
|
244
246
|
controlBar: controlBar,
|
|
245
247
|
editors: globalEditorRef.current && stepEditorRef.current
|
|
246
248
|
? {
|
|
@@ -269,7 +271,7 @@ function SequentialWorkflowDesigner(props) {
|
|
|
269
271
|
}
|
|
270
272
|
});
|
|
271
273
|
designerRef.current = designer;
|
|
272
|
-
}, [placeholder, definition, selectedStepId, isReadonly, theme, undoStackSize, toolbox, controlBar, steps, extensions]);
|
|
274
|
+
}, [placeholder, definition, selectedStepId, isReadonly, theme, undoStackSize, toolbox, controlBar, steps, validator, extensions]);
|
|
273
275
|
useEffect(function () {
|
|
274
276
|
return tryDestroy;
|
|
275
277
|
}, []);
|
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { MutableRefObject, Context, DependencyList } from 'react';
|
|
3
3
|
import ReactDOM from 'react-dom/client';
|
|
4
|
-
import { Definition, GlobalEditorContext, Designer, StepsConfiguration, ToolboxConfiguration, CustomActionHandler, DesignerExtension, Step, StepEditorContext } from 'sequential-workflow-designer';
|
|
4
|
+
import { Definition, GlobalEditorContext, Designer, StepsConfiguration, ValidatorConfiguration, ToolboxConfiguration, CustomActionHandler, DesignerExtension, Step, StepEditorContext } from 'sequential-workflow-designer';
|
|
5
5
|
|
|
6
6
|
declare class Presenter {
|
|
7
7
|
static render(className: string, rootRef: MutableRefObject<ReactDOM.Root | null>, element: JSX.Element): HTMLElement;
|
|
@@ -66,6 +66,7 @@ interface SequentialWorkflowDesignerProps<TDefinition extends Definition> {
|
|
|
66
66
|
theme?: string;
|
|
67
67
|
undoStackSize?: number;
|
|
68
68
|
stepsConfiguration: StepsConfiguration;
|
|
69
|
+
validatorConfiguration?: ValidatorConfiguration;
|
|
69
70
|
toolboxConfiguration: false | ToolboxConfiguration;
|
|
70
71
|
/**
|
|
71
72
|
* @description If true, the control bar will be displayed.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.13.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/esm/index.js",
|
|
7
7
|
"types": "./lib/index.d.ts",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"react": "^18.2.0",
|
|
49
49
|
"react-dom": "^18.2.0",
|
|
50
|
-
"sequential-workflow-designer": "^0.
|
|
50
|
+
"sequential-workflow-designer": "^0.13.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"prettier": "^2.8.2",
|
|
64
64
|
"react": "^18.2.0",
|
|
65
65
|
"react-dom": "^18.2.0",
|
|
66
|
-
"sequential-workflow-designer": "^0.
|
|
66
|
+
"sequential-workflow-designer": "^0.13.0",
|
|
67
67
|
"rollup": "^3.18.0",
|
|
68
68
|
"rollup-plugin-dts": "^5.2.0",
|
|
69
69
|
"rollup-plugin-typescript2": "^0.34.1",
|