Merge pull request #7541 from nkovacic/angular-formly

Angular Formly IFormlyConfig added missing properties.
This commit is contained in:
Masahiro Wakame
2016-01-11 23:05:22 +09:00
2 changed files with 35 additions and 9 deletions
+12
View File
@@ -20,6 +20,18 @@ class FormConfig {
name: 'customInput',
extends: 'input'
});
formlyConfig.disableWarnings = true;
formlyConfig.templateManipulators = undefined;
formlyConfig.extras.apiCheckInstance = null;
formlyConfig.extras.defaultHideDirective = 'ng-if';
formlyConfig.extras.disableNgModelAttrsManipulator = true;
formlyConfig.extras.errorExistsAndShouldBeVisibleExpression = angular.noop;
formlyConfig.extras.explicitAsync = true;
formlyConfig.extras.fieldTransform = angular.noop;
formlyConfig.extras.getFieldId = angular.noop;
formlyConfig.extras.ngModelAttrsManipulatorPreferUnbound = true;
}
}
+23 -9
View File
@@ -16,15 +16,15 @@ declare module 'angular-formly' {
declare module AngularFormly {
interface IFieldArray extends Array<IFieldConfigurationObject|IFieldGroup> {
interface IFieldArray extends Array<IFieldConfigurationObject | IFieldGroup> {
}
interface IFieldGroup {
data?: Object;
className?: string;
elementAttributes?: string;
fieldGroup: IFieldArray;
fieldGroup?: IFieldArray;
form?: Object;
hide?: boolean;
hideExpression?: string | IExpressionFunction;
@@ -160,7 +160,7 @@ declare module AngularFormly {
*/
asyncValidators?: {
[key: string]: string | IExpressionFunction | IValidator;
}
};
/**
* This is a great way to add custom behavior to a specific field. It is injectable with the $scope of the
@@ -210,7 +210,7 @@ declare module AngularFormly {
*/
expressionProperties?: {
[key: string]: string | IExpressionFunction | IValidator;
}
};
/**
@@ -219,7 +219,7 @@ declare module AngularFormly {
*
* see http://docs.angular-formly.com/docs/field-configuration-object#hide-boolean
*/
hide?: boolean
hide?: boolean;
/**
@@ -432,7 +432,7 @@ declare module AngularFormly {
*/
show?: boolean;
}
};
/**
@@ -446,7 +446,7 @@ declare module AngularFormly {
*/
validators?: {
[key: string]: string | IExpressionFunction | IValidator;
}
};
/**
@@ -558,10 +558,24 @@ declare module AngularFormly {
validateOptions?: Function;
}
interface IFormlyConfigExtras {
disableNgModelAttrsManipulator: boolean;
apiCheckInstance: any;
ngModelAttrsManipulatorPreferUnbound: boolean;
removeChromeAutoComplete: boolean;
defaultHideDirective: string;
errorExistsAndShouldBeVisibleExpression: any;
getFieldId: Function;
fieldTransform: Function;
explicitAsync: boolean;
}
interface IFormlyConfig {
disableWarnings: boolean;
extras: IFormlyConfigExtras;
setType(typeOptions: ITypeOptions): void;
setWrapper(wrapperOptions: IWrapperOptions): void;
templateManipulators: ITemplateManipulators;
}
interface ITemplateScopeOptions {