sequential-workflow-designer-react 0.16.9 → 0.17.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 +7 -7
- package/lib/cjs/index.cjs +33 -23
- package/lib/esm/index.js +32 -23
- package/lib/index.d.ts +21 -9
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
import {
|
|
35
35
|
SequentialWorkflowDesigner,
|
|
36
36
|
wrapDefinition,
|
|
37
|
-
|
|
37
|
+
useRootEditor,
|
|
38
38
|
useStepEditor
|
|
39
39
|
} from 'sequential-workflow-designer-react';
|
|
40
40
|
```
|
|
@@ -59,11 +59,11 @@ const stepsConfiguration: StepsConfiguration = { /* ... */ };
|
|
|
59
59
|
const validatorConfiguration: ValidatorConfiguration = { /* ... */ };
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
Create the
|
|
62
|
+
Create the root editor component:
|
|
63
63
|
|
|
64
64
|
```tsx
|
|
65
|
-
function
|
|
66
|
-
const { properties, setProperty, definition } =
|
|
65
|
+
function RootEditor() {
|
|
66
|
+
const { properties, setProperty, definition, isReadonly } = useRootEditor();
|
|
67
67
|
|
|
68
68
|
function onSpeedChanged(e) {
|
|
69
69
|
setProperty('speed', e.target.value);
|
|
@@ -82,7 +82,7 @@ Create the step editor component:
|
|
|
82
82
|
|
|
83
83
|
```tsx
|
|
84
84
|
function StepEditor() {
|
|
85
|
-
const { type, componentType, name, setName, properties, setProperty, definition } = useStepEditor();
|
|
85
|
+
const { type, componentType, name, setName, properties, setProperty, definition, isReadonly } = useStepEditor();
|
|
86
86
|
|
|
87
87
|
function onNameChanged(e) {
|
|
88
88
|
setName(e.target.value);
|
|
@@ -108,7 +108,7 @@ At the end attach the designer.
|
|
|
108
108
|
toolboxConfiguration={toolboxConfiguration}
|
|
109
109
|
controlBar={true}
|
|
110
110
|
contextMenu={true}
|
|
111
|
-
|
|
111
|
+
rootEditor={<RootEditor />}
|
|
112
112
|
stepEditor={<StepEditor />}>
|
|
113
113
|
/>
|
|
114
114
|
```
|
|
@@ -121,7 +121,7 @@ You can hide any UI component.
|
|
|
121
121
|
toolboxConfiguration={false}
|
|
122
122
|
controlBar={false}
|
|
123
123
|
contextMenu={false}
|
|
124
|
-
|
|
124
|
+
rootEditor={false}
|
|
125
125
|
stepEditor={false}>
|
|
126
126
|
/>
|
|
127
127
|
```
|
package/lib/cjs/index.cjs
CHANGED
|
@@ -52,23 +52,28 @@ var __assign = function() {
|
|
|
52
52
|
return __assign.apply(this, arguments);
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
if (!window.
|
|
56
|
-
window.
|
|
55
|
+
if (!window.sqdRootEditorContext) {
|
|
56
|
+
window.sqdRootEditorContext = react.createContext(null);
|
|
57
57
|
}
|
|
58
|
-
var
|
|
59
|
-
function
|
|
60
|
-
var wrapper = react.useContext(
|
|
58
|
+
var rootEditorContext = window.sqdRootEditorContext;
|
|
59
|
+
function useRootEditor() {
|
|
60
|
+
var wrapper = react.useContext(rootEditorContext);
|
|
61
61
|
if (!wrapper) {
|
|
62
|
-
throw new Error('Cannot find
|
|
62
|
+
throw new Error('Cannot find root editor context');
|
|
63
63
|
}
|
|
64
64
|
return wrapper;
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
/**
|
|
67
|
+
* @deprecated Use `useRootEditor` instead.
|
|
68
|
+
*/
|
|
69
|
+
var useGlobalEditor = useRootEditor;
|
|
70
|
+
function RootEditorWrapperContext(props) {
|
|
67
71
|
var _a = react.useState(function () { return createWrapper(); }), wrapper = _a[0], setWrapper = _a[1];
|
|
68
72
|
function createWrapper() {
|
|
69
73
|
return {
|
|
70
74
|
properties: props.definition.properties,
|
|
71
75
|
definition: props.definition,
|
|
76
|
+
isReadonly: props.isReadonly,
|
|
72
77
|
setProperty: setProperty
|
|
73
78
|
};
|
|
74
79
|
}
|
|
@@ -80,7 +85,7 @@ function GlobalEditorWrapperContext(props) {
|
|
|
80
85
|
props.context.notifyPropertiesChanged();
|
|
81
86
|
forward();
|
|
82
87
|
}
|
|
83
|
-
return jsxRuntime.jsx(
|
|
88
|
+
return jsxRuntime.jsx(rootEditorContext.Provider, __assign({ value: wrapper }, { children: props.children }));
|
|
84
89
|
}
|
|
85
90
|
|
|
86
91
|
if (!window.sqdStepEditorContext) {
|
|
@@ -105,6 +110,7 @@ function StepEditorWrapperContext(props) {
|
|
|
105
110
|
properties: props.step.properties,
|
|
106
111
|
step: props.step,
|
|
107
112
|
definition: props.definition,
|
|
113
|
+
isReadonly: props.isReadonly,
|
|
108
114
|
setName: setName,
|
|
109
115
|
setProperty: setProperty,
|
|
110
116
|
notifyPropertiesChanged: notifyPropertiesChanged,
|
|
@@ -151,7 +157,7 @@ function SequentialWorkflowDesigner(props) {
|
|
|
151
157
|
var onSelectedStepIdChangedRef = react.useRef(props.onSelectedStepIdChanged);
|
|
152
158
|
var onIsEditorCollapsedChangedRef = react.useRef(props.onIsEditorCollapsedChanged);
|
|
153
159
|
var onIsToolboxCollapsedChangedRef = react.useRef(props.onIsToolboxCollapsedChanged);
|
|
154
|
-
var
|
|
160
|
+
var rootEditorRef = react.useRef(props.rootEditor);
|
|
155
161
|
var stepEditorRef = react.useRef(props.stepEditor);
|
|
156
162
|
var controllerRef = react.useRef(props.controller);
|
|
157
163
|
var customActionHandlerRef = react.useRef(props.customActionHandler);
|
|
@@ -174,29 +180,32 @@ function SequentialWorkflowDesigner(props) {
|
|
|
174
180
|
if (props.controlBar === undefined) {
|
|
175
181
|
throw new Error('The "controlBar" property is not set');
|
|
176
182
|
}
|
|
183
|
+
if (props.globalEditor) {
|
|
184
|
+
throw new Error('The "globalEditor" property is renamed to "rootEditor"');
|
|
185
|
+
}
|
|
177
186
|
function forwardDefinition() {
|
|
178
187
|
if (designerRef.current) {
|
|
179
188
|
var def = wrapDefinition(designerRef.current.getDefinition(), designerRef.current.isValid());
|
|
180
189
|
onDefinitionChangeRef.current(def);
|
|
181
190
|
}
|
|
182
191
|
}
|
|
183
|
-
function
|
|
184
|
-
if (!
|
|
185
|
-
throw new Error('
|
|
192
|
+
function rootEditorProvider(def, context, isReadonly) {
|
|
193
|
+
if (!rootEditorRef.current) {
|
|
194
|
+
throw new Error('Root editor is not provided');
|
|
186
195
|
}
|
|
187
|
-
if (react.isValidElement(
|
|
188
|
-
return Presenter.render(externalEditorClassName, editorRootRef, jsxRuntime.jsx(
|
|
196
|
+
if (react.isValidElement(rootEditorRef.current)) {
|
|
197
|
+
return Presenter.render(externalEditorClassName, editorRootRef, jsxRuntime.jsx(RootEditorWrapperContext, __assign({ definition: def, context: context, isReadonly: isReadonly }, { children: rootEditorRef.current })));
|
|
189
198
|
}
|
|
190
|
-
return
|
|
199
|
+
return rootEditorRef.current(def, context, isReadonly);
|
|
191
200
|
}
|
|
192
|
-
function stepEditorProvider(step, context, def) {
|
|
201
|
+
function stepEditorProvider(step, context, def, isReadonly) {
|
|
193
202
|
if (!stepEditorRef.current) {
|
|
194
203
|
throw new Error('Step editor is not provided');
|
|
195
204
|
}
|
|
196
205
|
if (react.isValidElement(stepEditorRef.current)) {
|
|
197
|
-
return Presenter.render(externalEditorClassName, editorRootRef, jsxRuntime.jsx(StepEditorWrapperContext, __assign({ step: step, definition: def, context: context }, { children: stepEditorRef.current })));
|
|
206
|
+
return Presenter.render(externalEditorClassName, editorRootRef, jsxRuntime.jsx(StepEditorWrapperContext, __assign({ step: step, definition: def, context: context, isReadonly: isReadonly }, { children: stepEditorRef.current })));
|
|
198
207
|
}
|
|
199
|
-
return stepEditorRef.current(step, context, def);
|
|
208
|
+
return stepEditorRef.current(step, context, def, isReadonly);
|
|
200
209
|
}
|
|
201
210
|
function customActionHandler(action, step, sequence, context) {
|
|
202
211
|
if (customActionHandlerRef.current) {
|
|
@@ -227,8 +236,8 @@ function SequentialWorkflowDesigner(props) {
|
|
|
227
236
|
onIsToolboxCollapsedChangedRef.current = props.onIsToolboxCollapsedChanged;
|
|
228
237
|
}, [props.onIsToolboxCollapsedChanged]);
|
|
229
238
|
react.useEffect(function () {
|
|
230
|
-
|
|
231
|
-
}, [props.
|
|
239
|
+
rootEditorRef.current = props.rootEditor;
|
|
240
|
+
}, [props.rootEditor]);
|
|
232
241
|
react.useEffect(function () {
|
|
233
242
|
stepEditorRef.current = props.stepEditor;
|
|
234
243
|
}, [props.stepEditor]);
|
|
@@ -277,10 +286,10 @@ function SequentialWorkflowDesigner(props) {
|
|
|
277
286
|
controlBar: controlBar,
|
|
278
287
|
contextMenu: contextMenu,
|
|
279
288
|
keyboard: keyboard,
|
|
280
|
-
editors:
|
|
289
|
+
editors: rootEditorRef.current && stepEditorRef.current
|
|
281
290
|
? {
|
|
282
291
|
isCollapsed: isEditorCollapsed,
|
|
283
|
-
|
|
292
|
+
rootEditorProvider: rootEditorProvider,
|
|
284
293
|
stepEditorProvider: stepEditorProvider
|
|
285
294
|
}
|
|
286
295
|
: false,
|
|
@@ -387,12 +396,13 @@ function useSequentialWorkflowDesignerController(deps) {
|
|
|
387
396
|
return react.useMemo(function () { return SequentialWorkflowDesignerController.create(); }, deps || []);
|
|
388
397
|
}
|
|
389
398
|
|
|
390
|
-
exports.GlobalEditorWrapperContext = GlobalEditorWrapperContext;
|
|
391
399
|
exports.Presenter = Presenter;
|
|
400
|
+
exports.RootEditorWrapperContext = RootEditorWrapperContext;
|
|
392
401
|
exports.SequentialWorkflowDesigner = SequentialWorkflowDesigner;
|
|
393
402
|
exports.SequentialWorkflowDesignerController = SequentialWorkflowDesignerController;
|
|
394
403
|
exports.StepEditorWrapperContext = StepEditorWrapperContext;
|
|
395
404
|
exports.useGlobalEditor = useGlobalEditor;
|
|
405
|
+
exports.useRootEditor = useRootEditor;
|
|
396
406
|
exports.useSequentialWorkflowDesignerController = useSequentialWorkflowDesignerController;
|
|
397
407
|
exports.useStepEditor = useStepEditor;
|
|
398
408
|
exports.wrapDefinition = wrapDefinition;
|
package/lib/esm/index.js
CHANGED
|
@@ -50,23 +50,28 @@ var __assign = function() {
|
|
|
50
50
|
return __assign.apply(this, arguments);
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
-
if (!window.
|
|
54
|
-
window.
|
|
53
|
+
if (!window.sqdRootEditorContext) {
|
|
54
|
+
window.sqdRootEditorContext = createContext(null);
|
|
55
55
|
}
|
|
56
|
-
var
|
|
57
|
-
function
|
|
58
|
-
var wrapper = useContext(
|
|
56
|
+
var rootEditorContext = window.sqdRootEditorContext;
|
|
57
|
+
function useRootEditor() {
|
|
58
|
+
var wrapper = useContext(rootEditorContext);
|
|
59
59
|
if (!wrapper) {
|
|
60
|
-
throw new Error('Cannot find
|
|
60
|
+
throw new Error('Cannot find root editor context');
|
|
61
61
|
}
|
|
62
62
|
return wrapper;
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated Use `useRootEditor` instead.
|
|
66
|
+
*/
|
|
67
|
+
var useGlobalEditor = useRootEditor;
|
|
68
|
+
function RootEditorWrapperContext(props) {
|
|
65
69
|
var _a = useState(function () { return createWrapper(); }), wrapper = _a[0], setWrapper = _a[1];
|
|
66
70
|
function createWrapper() {
|
|
67
71
|
return {
|
|
68
72
|
properties: props.definition.properties,
|
|
69
73
|
definition: props.definition,
|
|
74
|
+
isReadonly: props.isReadonly,
|
|
70
75
|
setProperty: setProperty
|
|
71
76
|
};
|
|
72
77
|
}
|
|
@@ -78,7 +83,7 @@ function GlobalEditorWrapperContext(props) {
|
|
|
78
83
|
props.context.notifyPropertiesChanged();
|
|
79
84
|
forward();
|
|
80
85
|
}
|
|
81
|
-
return jsx(
|
|
86
|
+
return jsx(rootEditorContext.Provider, __assign({ value: wrapper }, { children: props.children }));
|
|
82
87
|
}
|
|
83
88
|
|
|
84
89
|
if (!window.sqdStepEditorContext) {
|
|
@@ -103,6 +108,7 @@ function StepEditorWrapperContext(props) {
|
|
|
103
108
|
properties: props.step.properties,
|
|
104
109
|
step: props.step,
|
|
105
110
|
definition: props.definition,
|
|
111
|
+
isReadonly: props.isReadonly,
|
|
106
112
|
setName: setName,
|
|
107
113
|
setProperty: setProperty,
|
|
108
114
|
notifyPropertiesChanged: notifyPropertiesChanged,
|
|
@@ -149,7 +155,7 @@ function SequentialWorkflowDesigner(props) {
|
|
|
149
155
|
var onSelectedStepIdChangedRef = useRef(props.onSelectedStepIdChanged);
|
|
150
156
|
var onIsEditorCollapsedChangedRef = useRef(props.onIsEditorCollapsedChanged);
|
|
151
157
|
var onIsToolboxCollapsedChangedRef = useRef(props.onIsToolboxCollapsedChanged);
|
|
152
|
-
var
|
|
158
|
+
var rootEditorRef = useRef(props.rootEditor);
|
|
153
159
|
var stepEditorRef = useRef(props.stepEditor);
|
|
154
160
|
var controllerRef = useRef(props.controller);
|
|
155
161
|
var customActionHandlerRef = useRef(props.customActionHandler);
|
|
@@ -172,29 +178,32 @@ function SequentialWorkflowDesigner(props) {
|
|
|
172
178
|
if (props.controlBar === undefined) {
|
|
173
179
|
throw new Error('The "controlBar" property is not set');
|
|
174
180
|
}
|
|
181
|
+
if (props.globalEditor) {
|
|
182
|
+
throw new Error('The "globalEditor" property is renamed to "rootEditor"');
|
|
183
|
+
}
|
|
175
184
|
function forwardDefinition() {
|
|
176
185
|
if (designerRef.current) {
|
|
177
186
|
var def = wrapDefinition(designerRef.current.getDefinition(), designerRef.current.isValid());
|
|
178
187
|
onDefinitionChangeRef.current(def);
|
|
179
188
|
}
|
|
180
189
|
}
|
|
181
|
-
function
|
|
182
|
-
if (!
|
|
183
|
-
throw new Error('
|
|
190
|
+
function rootEditorProvider(def, context, isReadonly) {
|
|
191
|
+
if (!rootEditorRef.current) {
|
|
192
|
+
throw new Error('Root editor is not provided');
|
|
184
193
|
}
|
|
185
|
-
if (isValidElement(
|
|
186
|
-
return Presenter.render(externalEditorClassName, editorRootRef, jsx(
|
|
194
|
+
if (isValidElement(rootEditorRef.current)) {
|
|
195
|
+
return Presenter.render(externalEditorClassName, editorRootRef, jsx(RootEditorWrapperContext, __assign({ definition: def, context: context, isReadonly: isReadonly }, { children: rootEditorRef.current })));
|
|
187
196
|
}
|
|
188
|
-
return
|
|
197
|
+
return rootEditorRef.current(def, context, isReadonly);
|
|
189
198
|
}
|
|
190
|
-
function stepEditorProvider(step, context, def) {
|
|
199
|
+
function stepEditorProvider(step, context, def, isReadonly) {
|
|
191
200
|
if (!stepEditorRef.current) {
|
|
192
201
|
throw new Error('Step editor is not provided');
|
|
193
202
|
}
|
|
194
203
|
if (isValidElement(stepEditorRef.current)) {
|
|
195
|
-
return Presenter.render(externalEditorClassName, editorRootRef, jsx(StepEditorWrapperContext, __assign({ step: step, definition: def, context: context }, { children: stepEditorRef.current })));
|
|
204
|
+
return Presenter.render(externalEditorClassName, editorRootRef, jsx(StepEditorWrapperContext, __assign({ step: step, definition: def, context: context, isReadonly: isReadonly }, { children: stepEditorRef.current })));
|
|
196
205
|
}
|
|
197
|
-
return stepEditorRef.current(step, context, def);
|
|
206
|
+
return stepEditorRef.current(step, context, def, isReadonly);
|
|
198
207
|
}
|
|
199
208
|
function customActionHandler(action, step, sequence, context) {
|
|
200
209
|
if (customActionHandlerRef.current) {
|
|
@@ -225,8 +234,8 @@ function SequentialWorkflowDesigner(props) {
|
|
|
225
234
|
onIsToolboxCollapsedChangedRef.current = props.onIsToolboxCollapsedChanged;
|
|
226
235
|
}, [props.onIsToolboxCollapsedChanged]);
|
|
227
236
|
useEffect(function () {
|
|
228
|
-
|
|
229
|
-
}, [props.
|
|
237
|
+
rootEditorRef.current = props.rootEditor;
|
|
238
|
+
}, [props.rootEditor]);
|
|
230
239
|
useEffect(function () {
|
|
231
240
|
stepEditorRef.current = props.stepEditor;
|
|
232
241
|
}, [props.stepEditor]);
|
|
@@ -275,10 +284,10 @@ function SequentialWorkflowDesigner(props) {
|
|
|
275
284
|
controlBar: controlBar,
|
|
276
285
|
contextMenu: contextMenu,
|
|
277
286
|
keyboard: keyboard,
|
|
278
|
-
editors:
|
|
287
|
+
editors: rootEditorRef.current && stepEditorRef.current
|
|
279
288
|
? {
|
|
280
289
|
isCollapsed: isEditorCollapsed,
|
|
281
|
-
|
|
290
|
+
rootEditorProvider: rootEditorProvider,
|
|
282
291
|
stepEditorProvider: stepEditorProvider
|
|
283
292
|
}
|
|
284
293
|
: false,
|
|
@@ -385,4 +394,4 @@ function useSequentialWorkflowDesignerController(deps) {
|
|
|
385
394
|
return useMemo(function () { return SequentialWorkflowDesignerController.create(); }, deps || []);
|
|
386
395
|
}
|
|
387
396
|
|
|
388
|
-
export {
|
|
397
|
+
export { Presenter, RootEditorWrapperContext, SequentialWorkflowDesigner, SequentialWorkflowDesignerController, StepEditorWrapperContext, useGlobalEditor, useRootEditor, useSequentialWorkflowDesignerController, useStepEditor, wrapDefinition };
|
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { MutableRefObject, Context, ReactNode, DependencyList } from 'react';
|
|
3
3
|
import ReactDOM from 'react-dom/client';
|
|
4
|
-
import { Definition,
|
|
4
|
+
import { Definition, RootEditorContext, Designer, ToolboxConfiguration, RootEditorProvider, StepEditorProvider, StepsConfiguration, ValidatorConfiguration, KeyboardConfiguration, 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;
|
|
@@ -10,21 +10,31 @@ declare class Presenter {
|
|
|
10
10
|
|
|
11
11
|
declare global {
|
|
12
12
|
interface Window {
|
|
13
|
-
|
|
13
|
+
sqdRootEditorContext?: Context<RootEditorWrapper<Definition> | null>;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
interface
|
|
16
|
+
interface RootEditorWrapper<TDefinition extends Definition> {
|
|
17
17
|
readonly properties: TDefinition['properties'];
|
|
18
18
|
readonly definition: TDefinition;
|
|
19
|
+
readonly isReadonly: boolean;
|
|
19
20
|
setProperty(name: keyof TDefinition['properties'], value: TDefinition['properties'][typeof name]): void;
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Use `RootEditorWrapper` instead.
|
|
24
|
+
*/
|
|
25
|
+
type GlobalEditorWrapper<TDefinition extends Definition> = RootEditorWrapper<TDefinition>;
|
|
26
|
+
declare function useRootEditor<TDefinition extends Definition = Definition>(): RootEditorWrapper<TDefinition>;
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Use `useRootEditor` instead.
|
|
29
|
+
*/
|
|
30
|
+
declare const useGlobalEditor: typeof useRootEditor;
|
|
31
|
+
interface RootEditorWrapperContextProps {
|
|
23
32
|
children: ReactNode;
|
|
24
33
|
definition: Definition;
|
|
25
|
-
context:
|
|
34
|
+
context: RootEditorContext;
|
|
35
|
+
isReadonly: boolean;
|
|
26
36
|
}
|
|
27
|
-
declare function
|
|
37
|
+
declare function RootEditorWrapperContext(props: RootEditorWrapperContextProps): JSX.Element;
|
|
28
38
|
|
|
29
39
|
interface WrappedDefinition<TDefinition extends Definition = Definition> {
|
|
30
40
|
readonly value: TDefinition;
|
|
@@ -64,7 +74,7 @@ interface SequentialWorkflowDesignerProps<TDefinition extends Definition> {
|
|
|
64
74
|
selectedStepId?: string | null;
|
|
65
75
|
onSelectedStepIdChanged?: (stepId: string | null) => void;
|
|
66
76
|
isReadonly?: boolean;
|
|
67
|
-
|
|
77
|
+
rootEditor: false | JSX.Element | RootEditorProvider;
|
|
68
78
|
stepEditor: false | JSX.Element | StepEditorProvider;
|
|
69
79
|
isEditorCollapsed?: boolean;
|
|
70
80
|
onIsEditorCollapsedChanged?: (isCollapsed: boolean) => void;
|
|
@@ -100,6 +110,7 @@ interface StepEditorWrapper<TStep extends Step = Step, TDefinition extends Defin
|
|
|
100
110
|
readonly properties: TStep['properties'];
|
|
101
111
|
readonly step: TStep;
|
|
102
112
|
readonly definition: TDefinition;
|
|
113
|
+
readonly isReadonly: boolean;
|
|
103
114
|
setName(name: string): void;
|
|
104
115
|
setProperty(name: keyof TStep['properties'], value: TStep['properties'][typeof name]): void;
|
|
105
116
|
notifyPropertiesChanged(): void;
|
|
@@ -111,7 +122,8 @@ interface StepEditorWrapperContextProps {
|
|
|
111
122
|
step: Step;
|
|
112
123
|
definition: Definition;
|
|
113
124
|
context: StepEditorContext;
|
|
125
|
+
isReadonly: boolean;
|
|
114
126
|
}
|
|
115
127
|
declare function StepEditorWrapperContext(props: StepEditorWrapperContextProps): JSX.Element;
|
|
116
128
|
|
|
117
|
-
export { GlobalEditorWrapper,
|
|
129
|
+
export { GlobalEditorWrapper, Presenter, ReactToolboxConfiguration, RootEditorWrapper, RootEditorWrapperContext, RootEditorWrapperContextProps, SequentialWorkflowDesigner, SequentialWorkflowDesignerController, SequentialWorkflowDesignerProps, StepEditorWrapper, StepEditorWrapperContext, StepEditorWrapperContextProps, WrappedDefinition, useGlobalEditor, useRootEditor, useSequentialWorkflowDesignerController, useStepEditor, wrapDefinition };
|
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.17.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.17.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.17.0",
|
|
67
67
|
"rollup": "^3.18.0",
|
|
68
68
|
"rollup-plugin-dts": "^5.2.0",
|
|
69
69
|
"rollup-plugin-typescript2": "^0.34.1",
|