Releases: nocode-js/sequential-workflow-designer
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) => { /* ... */ }
},
// ...
};
0.11.0
Breaking Changes
- This version introduces a few changes in the
customActionHandler
handler:- the first parameter is an object now, previously it was a string. To read action type you need to read the
type
property from the object, - the
step
parameter is nullable now, - we added a
context
parameter that allows to notify about changes in the definition.
- the first parameter is an object now, previously it was a string. To read action type you need to read the
- Added new classes for label components:
sqd-label-primary
andsqd-label-secondary
.