Revert "Provide tosca function capability to complex type fields in composition view"
[sdc.git] / catalog-ui / src / app / directives / property-types / type-map / type-map-directive.ts
index 456c66a..098b289 100644 (file)
@@ -48,6 +48,7 @@ export interface ITypeMapScope extends ng.IScope {
     showAddBtn: boolean;
     showToscaFunction: boolean[];
     types: DataTypesMap;
+    isService: boolean;
 
     getValidationPattern(type: string): RegExp;
     validateIntRange(value: string): boolean;
@@ -75,7 +76,8 @@ export class TypeMapDirective implements ng.IDirective {
         constraints: '=',
         showAddBtn: '=?',
         parentProperty: '=',
-        types: '='
+        types: '=',
+        isService: '='
     };
 
     restrict = 'E';
@@ -132,7 +134,7 @@ export class TypeMapDirective implements ng.IDirective {
 
         // reset valueObjRef and mapKeys when schema type is changed
         scope.$watchCollection('schemaProperty.type', (newData: any): void => {
-            scope.isSchemaTypeDataType = this.isDataTypeForSchemaType(scope.schemaProperty, scope.types);
+            scope.isSchemaTypeDataType = this.DataTypesService.isDataTypeForSchemaType(scope.schemaProperty);
             if (scope.valueObjRef) {
                 scope.mapKeys = Object.keys(scope.valueObjRef);
                 // keeping another copy of the keys, as the mapKeys gets overridden sometimes