Fix input type name mapping

This commit is contained in:
Sipke Schoorstra 2022-11-27 13:28:00 +01:00
parent b5a2e95ed3
commit b1fac2e24d

View file

@ -1,6 +1,6 @@
import {Component, Event, EventEmitter, h, Method, Prop, State} from '@stencil/core';
import {camelCase} from 'lodash';
import {Activity, ActivityDescriptor, ActivityKind, ActivityOutput, InputDescriptor, OutputDescriptor, PropertyDescriptor, RenderActivityInputContext, RenderActivityPropsContext, TabChangedArgs, TabDefinition, Variable} from '../../../models';
import {Activity, ActivityDescriptor, ActivityInput, ActivityKind, ActivityOutput, InputDescriptor, OutputDescriptor, PropertyDescriptor, RenderActivityInputContext, RenderActivityPropsContext, TabChangedArgs, TabDefinition, Variable} from '../../../models';
import {InputDriverRegistry} from "../../../services";
import {Container} from "typedi";
import {ActivityInputContext} from "../../../services/node-input-driver";
@ -226,13 +226,15 @@ export class ActivityPropertiesEditor {
const camelCasePropertyName = camelCase(propertyName);
if (isWrapped) {
activity[camelCasePropertyName] = {
type: inputDescriptor.typeName,
const input: ActivityInput = {
typeName: inputDescriptor.typeName,
expression: {
type: syntax,
value: propertyValue // TODO: The "value" field is currently hardcoded, but we should be able to be more flexible and potentially have different fields for a given syntax.
}
};
activity[camelCasePropertyName] = input;
} else {
activity[camelCasePropertyName] = propertyValue;
}