sequential-workflow-editor
Advanced tools
Comparing version 0.10.0 to 0.11.0
@@ -143,2 +143,5 @@ import { SimpleEvent, DefaultValueContext, GeneratedStringContext, stringDictionaryValueModelId, sequenceValueModelId, branchesValueModelId, ValueContext, PropertyValidatorContext, ModelActivator, DefinitionValidator, DefinitionContext, StepValidatorContext } from 'sequential-workflow-editor-model'; | ||
} | ||
function forEach(callback) { | ||
components.forEach(callback); | ||
} | ||
function reloadList() { | ||
@@ -187,3 +190,4 @@ if (emptyRow) { | ||
view, | ||
add | ||
add, | ||
forEach | ||
}; | ||
@@ -725,3 +729,3 @@ } | ||
const newModel = subModels[subModelSelect.getSelectedIndex()]; | ||
const defaultValueContext = DefaultValueContext.createFromValueContext(services.activator, context); | ||
const defaultValueContext = DefaultValueContext.create(services.activator, context.scopedPropertyContext.propertyContext); | ||
const defaultValue = { | ||
@@ -1038,3 +1042,3 @@ modelId: newModel.id, | ||
static create(propertyModel, definitionContext, editorServices) { | ||
const valueContext = ValueContext.create(propertyModel.value, propertyModel, definitionContext); | ||
const valueContext = ValueContext.createFromDefinitionContext(propertyModel.value, propertyModel, definitionContext); | ||
const valueEditorFactory = editorServices.valueEditorFactoryResolver.resolve(propertyModel.value.id, propertyModel.value.editorId); | ||
@@ -1077,3 +1081,4 @@ const valueEditor = valueEditorFactory(valueContext, editorServices); | ||
if (propertyModel.validator) { | ||
const validatorContext = PropertyValidatorContext.create(propertyModel, definitionContext); | ||
const valueContext = ValueContext.createFromDefinitionContext(propertyModel.value, propertyModel, definitionContext); | ||
const validatorContext = PropertyValidatorContext.create(valueContext); | ||
validationError = propertyValidationErrorComponent(propertyModel.validator, validatorContext); | ||
@@ -1080,0 +1085,0 @@ view.appendChild(validationError.view); |
@@ -20,5 +20,6 @@ import { SimpleEvent, ValueContext, ValidationResult, ValueType, SimpleEventListener, ValueModel, ModelActivator, UidGenerator, DefinitionModel } from 'sequential-workflow-editor-model'; | ||
interface DynamicListComponent<TItem> extends Component { | ||
interface DynamicListComponent<TItem, TItemComponent extends DynamicListItemComponent<TItem> = DynamicListItemComponent<TItem>> extends Component { | ||
onChanged: SimpleEvent<TItem[]>; | ||
add(item: TItem): void; | ||
forEach(callback: (component: TItemComponent) => void): void; | ||
} | ||
@@ -34,3 +35,3 @@ interface DynamicListComponentConfiguration<TItem> { | ||
} | ||
declare function dynamicListComponent<TItem>(initialItems: TItem[], itemComponentFactory: (item: TItem) => DynamicListItemComponent<TItem>, context: ValueContext, configuration?: DynamicListComponentConfiguration<TItem>): DynamicListComponent<TItem>; | ||
declare function dynamicListComponent<TItem, TItemComponent extends DynamicListItemComponent<TItem> = DynamicListItemComponent<TItem>>(initialItems: TItem[], itemComponentFactory: (item: TItem) => TItemComponent, context: ValueContext, configuration?: DynamicListComponentConfiguration<TItem>): DynamicListComponent<TItem, TItemComponent>; | ||
@@ -37,0 +38,0 @@ interface InputComponent extends Component { |
{ | ||
"name": "sequential-workflow-editor", | ||
"version": "0.10.0", | ||
"version": "0.11.0", | ||
"type": "module", | ||
@@ -49,7 +49,7 @@ "main": "./lib/esm/index.js", | ||
"dependencies": { | ||
"sequential-workflow-editor-model": "^0.10.0", | ||
"sequential-workflow-editor-model": "^0.11.0", | ||
"sequential-workflow-model": "^0.2.0" | ||
}, | ||
"peerDependencies": { | ||
"sequential-workflow-editor-model": "^0.10.0", | ||
"sequential-workflow-editor-model": "^0.11.0", | ||
"sequential-workflow-model": "^0.2.0" | ||
@@ -56,0 +56,0 @@ }, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
192012
4805
+ Addedsequential-workflow-editor-model@0.11.3(transitive)
- Removedsequential-workflow-editor-model@0.10.0(transitive)