Releases: nocode-js/sequential-workflow-designer
0.14.0
This version introduces the context menu, providing a new and interactive way to engage with the designer. If you want, you can disable this feature using the contextMenu
property in the configuration.
const configuration = {
contextMenu: false,
// ...
};
Introducing a new feature: step duplication! Now, you have the ability to duplicate any step in your definition along with its children. This convenient option can be accessed from the context menu. Please note that the feature is disabled by default. To enable it, you must set your own callback for the isDuplicable
property.
const configuration = {
steps: {
isDuplicable: (step, parentSequence) => {
return true;
},
},
// ...
};
0.13.7
This version fixes change detection in the Angular package. Thanks @wildercarrot!
0.13.6
0.13.5
0.13.4
The getStepParents
method of the Designer
class supports now a step id as an argument. It is possible to get parents of a step by its id. The method still supports a step object or a sequence as an argument.
designer.getStepParents('eb4f481ee1b90c6e3fc9b42dd010d2a5');
0.13.3
This version introduces 4 new features:
- The custom label provider for the toolbox. By default, the toolbox displays a label of a step from the
name
field. You may override this behaviour and pass own label provider now.
const configuration = {
toolbox: {
labelProvider: (step) => `** ${step.name} **`,
// ...
},
// ...
};
- Control the collapse of the toolbox.
const configuration = {
toolbox: {
isCollapsed: true, // or false
// ...
},
// ...
};
designer.isToolboxCollapsed(); // returns true or false
designer.setIsToolboxCollapsed(true);
- Control the collapse of the editor.
const configuration = {
editors: {
isCollapsed: true, // or false
// ...
},
// ...
};
designer.isEditorCollapsed(); // returns true or false
designer.setIsEditorCollapsed(true);
- It's possible now to replace the default unique identifier generator by a custom one.
const configuration = {
uidGenerator: () => Math.random().toString(),
// ...
};
0.13.2
The react package supports two types of editor providers. Now it's possible to use a provider that returns native DOM elements. We don't want to depreciate the previous approach, this change increases flexibility of the react package.
// 1. custom react component
<SequentialWorkflowDesigner stepEditor={<StepEditor />} ... />
// 2. native editor provider
function stepEditorProvider(step) {
const editor = document.createElement('div'); /* ... */
return editor;
}
<SequentialWorkflowDesigner stepEditor={stepEditorProvider}> ... />
0.13.1
The canMoveStep
callback is not called when the step is moved to the same position.
🤩 We launched a new project: Sequential Workflow Editor. Don't write step editors manually, build them.
0.13.0
0.12.0
The designer has allowed only the validation of the steps so far. The root of the definition could be edited by the global editor, but the validation was not possible. This version adds a new type of the validator: the root validator. The new validator affects on the result of the definition validation (designer.isValid()
).
Breaking Changes
- The
validator
property in thesteps
group of the configuration is deleted. Use thestep
property in thevalidator
group instead. - The step validator has a new parameter:
definition
. - Added the root validator.
const configuration = {
steps: {
validator: /* DEPRECIATED */,
},
validator: {
step: (step, parentSequence, definition) => { /* ... */ },
root: (definition) => { /* ... */ }
},
// ...
};