This PR adds support for the internationalization of options in the choice value model #53.
Added an index argument to the itemComponentFactory callback in the dynamicListComponent function.
Added comments to describe the BranchedStepModelBuilder, SequentialStepModelBuilder and RootModelBuilder classes.
Added comments to describe the EditorProvider class.
This version exposes the ToolboxGroup interface in the sequential-workflow-editor package #46.
This version provides the ability to sort the steps in the toolbox in a custom way. By default, the steps are sorted alphabetically.
EditorProvider.create(definitionModel, {
// ...
toolboxSorter(groups: ToolboxGroup[]) {
// ...
}
});You can also hide certain steps from the toolbox by using the hidden method in the step builder.
createStepModel<MyStep>('myStep', 'task', step => {
step.toolbox(false);
});This version adds the formatPropertyValue method to the PropertyValidatorContext class.
This version adds the formatPropertyValue method to: PropertyContext, DefaultValueContext, ScopedPropertyContext and ValueContext classes.
From now, the nullable any variable editor and the nullable variable editor display the expected variable types to select. This version also allows changes to the labels in the dropdown menu of the dynamic value editor.
This version adds missing translations for the variableDefinitions value editor.
This version adds missing translations for the variableNameValidator function #37.
This version introduces several internal changes that allowed for the creation of a new type of editor in the pro version: the hidden dependent value editor.
This version normalizes translations.
This version introduces the localization feature. Now you can localize the editor to any language you want.
This version improves the behavior of the Dynamic value editor, when the sub editor contains a control visible in the property header.
This version adds a generic type to the ChoiceValueModel interface.
This version improves support for UMD bundles.
This version normalizes names of functions in ValueContext and PropertyValidatorContext classes.
The CustomValidatorContext class is deleted now, please use the PropertyValidatorContext class instead.
The PropertyModelBuilder class has deleted the customValidator function, please use the validator function instead.
This version deletes all deprecated *ValueModel functions. From now, use only create*ValueModel functions.
Added hasVariable and hasVariables methods to the PropertyValidatorContext class.
This version fixes a bug in the ValueEditorFactoryResolver class. Now, when an editor is not found, the resolver throws an error.
This version exports the variableNameValidator function in the sequential-workflow-editor-model package.
- Improved validation for the
booleanvalue model. - Improved validation for the
branchesvalue model. - Internal changes preparing for the upcoming pro version.
Updated the sequential-workflow-model dependency to the version 0.2.0.
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:
- the
CustomValidatorContextclass toPropertyValidatorContext, - the
customValidatormethod of thePropertyModelBuilderclass tovalidator.
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.
This version changes the license to the MIT license. 🎉
- This version brings small visual improvements.
- Added a new value model: string dictionary (
stringDictionaryValueModel({ ... })). This value model allows you to specify a dictionary of string values. - The string value model now supports multiline mode.
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.
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:
- Renamed the
ModelValidatorclass toDefinitionValidator.
- The model validator is improved. Now the validator validates the
namefield of the step as well. - Adjusted CSS styles.
- Added a new value model:
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. - The
StepModelinterface has one new property:label. The label is used to display a step name in the editor and the toolbox.
Breaking changes:
- The
ValueModelFactorytype is changed to the interface. - The
ValueModelContextclass is renamed toValueContext. - The
VariablesProviderclass skips variables from own step.
- The
StepModelinterface has two new properties:categoryanddescription. The category is used to group steps in the toolbox. The description is used to display an additional information about a step in the editor. - The
PropertyModelinterface has one new property:hint. The hint is used to display an additional information about a property in the editor.
Added new value model: boolean (booleanValueModel({ ... })).
- Added a new value model: nullable any variable (
nullableAnyVariableValueModel({ ... })). This value model allows you to select any variable. Additionally, you can specify a variable type that can be selected by a user. - Added new optional property:
valueTypestoVariableDefinitionsValueModelConfigurationinterface. Now it's possible to force the types of variables during creation of variables by a user.
Breaking changes:
- Renamed the
variableTypeproperty tovalueTypein theNullableVariableValueModelConfigurationinterface. - Renamed the
variableTypeproperty tovalueTypein theNullableVariableDefinitionValueModelConfigurationinterface.
Fixed bug with removing a message about an empty list.
Breaking changes:
- The editor displays variables with dollar prefix (
$). - The
choicesproperty is renamed tomodelsin theDynamicValueModelConfigurationinterface.
First release! 🚀