Fix certain default values breaking VFC
[sdc.git] / catalog-ui / src / app / view-models / forms / property-forms / component-property-form / property-form-view-model.ts
index 39f008a..fc0581a 100644 (file)
@@ -46,16 +46,16 @@ export interface IEditPropertyModel {
 }
 
 interface IPropertyFormViewModelScope extends ng.IScope {
-    forms:any;
-    editForm:ng.IFormController;
-    footerButtons:Array<any>;
-    isNew:boolean;
-    nameMaxLength:number;
-    isLoading:boolean;
-    componentMetadata: { isService: boolean, isVfc: boolean }
-    validationPattern:RegExp;
-    propertyNameValidationPattern:RegExp;
-    commentValidationPattern:RegExp;
+    forms: any;
+    editForm: ng.IFormController;
+    footerButtons: Array<any>;
+    isNew: boolean;
+    nameMaxLength: number;
+    isLoading: boolean;
+    componentMetadata: { isService: boolean, isVfc: boolean };
+    validationPattern: RegExp;
+    propertyNameValidationPattern: RegExp;
+    commentValidationPattern: RegExp;
     editPropertyModel: IEditPropertyModel;
     componentInstanceMap: Map<string, InstanceFeDetails>;
     customToscaFunctions: Array<CustomToscaFunction>;
@@ -75,19 +75,19 @@ interface IPropertyFormViewModelScope extends ng.IScope {
     isGetFunctionValueType: boolean;
     invalidMandatoryFields: boolean;
 
-    validateJson(json:string):boolean;
-    save(doNotCloseModal?:boolean):void;
-    getValidationPattern(type:string):RegExp;
-    validateIntRange(value:string):boolean;
-    close():void;
-    onSchemaTypeChange():void;
-    onTypeChange(resetSchema:boolean):void;
-    showSchema():boolean;
-    delete(property:PropertyModel):void;
-    getPrev():void;
-    getNext():void;
-    isSimpleType(typeName:string):boolean;
-    getDefaultValue():any;
+    validateJson(json: string): boolean;
+    save(doNotCloseModal?: boolean): void;
+    getValidationPattern(type: string): RegExp;
+    validateIntRange(value: string): boolean;
+    close(): void;
+    onSchemaTypeChange(): void;
+    onTypeChange(resetSchema: boolean): void;
+    showSchema(): boolean;
+    delete(property: PropertyModel): void;
+    getPrev(): void;
+    getNext(): void;
+    isSimpleType(typeName: string): boolean;
+    getDefaultValue(): any;
     onValueTypeChange(): void;
 }
 
@@ -436,19 +436,19 @@ export class PropertyFormViewModel {
             return typeName && this.$scope.editPropertyModel.simpleTypes.indexOf(typeName) != -1;
         };
 
-        this.$scope.showSchema = ():boolean => {
+        this.$scope.showSchema = (): boolean => {
             return [PROPERTY_TYPES.LIST, PROPERTY_TYPES.MAP].indexOf(this.$scope.editPropertyModel.property.type) > -1;
         };
 
-        this.$scope.getValidationPattern = (type:string):RegExp => {
+        this.$scope.getValidationPattern = (type: string): RegExp => {
             return this.ValidationUtils.getValidationPattern(type);
         };
 
-        this.$scope.validateIntRange = (value:string):boolean => {
+        this.$scope.validateIntRange = (value: string): boolean => {
             return !value || this.ValidationUtils.validateIntRange(value);
         };
 
-        this.$scope.close = ():void => {
+        this.$scope.close = (): void => {
             this.$uibModalInstance.close();
         };