+ private processSubtoscaFunction(checkedProperty : PropertyDeclareAPIModel, toscaFunction: ToscaFunction) {
+ const instancesIds = this.keysPipe.transform(this.instanceFePropertiesMap, []);
+ const instanceId: string = instancesIds[0];
+ this.instanceFePropertiesMap[instanceId].forEach(prop => {
+ if (prop.flattenedChildren) {
+ prop.flattenedChildren.forEach((child) => {
+ if (child.isSelected && !child.isDeclared && !child.isDisabled) {
+ prop.subPropertyToscaFunctions = checkedProperty.subPropertyToscaFunctions;
+ if (toscaFunction) {
+ child.value = toscaFunction.buildValueString();
+ child.valueObj = toscaFunction.buildValueObject();
+ child.toscaFunction = toscaFunction;
+ this.hasChangedData = true;
+ if (this.changedData.length == 0) {
+ this.changedData.push(prop);
+ }
+ } else {
+ child.valueObj = null;
+ child.toscaFunction = null;
+ }
+ child.isSelected = false;
+ this.togggleToscaBtn(false);
+ }
+ });
+ }
+ });
+ }
+