sequential-workflow-editor
Advanced tools
Changelog
0.9.1
This version exports the variableNameValidator
function in the sequential-workflow-editor-model
package.
Changelog
0.9.0
boolean
value model.branches
value model.Changelog
0.7.2
We added a new type of a validator: step validator. It allows to restrict a placement of a step in a definition. For example, you can enforce that a step can be placed only inside a specific step.
createStepModel<WriteSocketStep>('writeSocket', 'task', step => {
step.validator({
validate(context: StepValidatorContext) {
const parentTypes = context.getParentStepTypes();
return parentTypes.includes('socket');
? null // No errors
: 'The write socket step must be inside a socket.';
}
});
});
Additionally we've renamed:
CustomValidatorContext
class to PropertyValidatorContext
,customValidator
method of the PropertyModelBuilder
class to validator
.Changelog
0.7.1
This version renames all *ValueModel
functions to create*ValueModel
, adding the create
prefix.
// Old
stringValueModel({ ... });
// New
createStringValueModel({ ... });
This version doesn't introduce breaking changes. The old functions are still available, but they are deprecated.
Changelog
0.6.0
stringDictionaryValueModel({ ... })
). This value model allows you to specify a dictionary of string values.stringValueModel({ multiline: true })
stringValueModel({ multiline: 10 })
Breaking changes:
The createStepEditorProvider() method of the EditorProvider class now returns a new type of editor provider. This method no longer accepts any arguments.
type StepEditorProvider = (step: Step, context: StepEditorContext, definition: Definition) => HTMLElement;
EditorProvider.createStepEditorProvider(): StepEditorProvider;
The ValueKnownType
enum is renamed to WellKnownValueType
.
Changelog
0.5.0
The DefinitionValidator
class supports the validation of the whole definition. Use the validate
method to validate a definition deeply. This method will validate all steps in the definition at once. Now you may easily validate a definition in the back-end before saving it to the storage.
const validator = DefinitionValidator.create(definitionModel, definitionWalker);
if (validator.validate(definition)) {
throw new Error('Invalid definition');
}
Breaking changes:
ModelValidator
class to DefinitionValidator
.Changelog
0.4.1
name
field of the step as well.Changelog
0.4.0
generatedString
(generatedStringValueEditor({ ... })
). The new value model allows you to generate a string value for some property, depending on the values of other properties. Mainly this feature is designed to generate a step name automatically.StepModel
interface has one new property: label
. The label is used to display a step name in the editor and the toolbox.Breaking changes:
ValueModelFactory
type is changed to the interface.ValueModelContext
class is renamed to ValueContext
.VariablesProvider
class skips variables from own step.