Socket
Socket
Sign inDemoInstall

@angular/forms

Package Overview
Dependencies
Maintainers
1
Versions
831
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angular/forms - npm Package Compare versions

Comparing version 2.3.0-beta.0 to 2.3.0-beta.1

src/directives/abstract_control_directive.metadata.json

2

index.js

@@ -13,3 +13,3 @@ /**

*/
export * from './src/forms';
export { AbstractControlDirective, AbstractFormGroupDirective, CheckboxControlValueAccessor, ControlContainer, NG_VALUE_ACCESSOR, DefaultValueAccessor, NgControl, NgControlStatus, NgControlStatusGroup, NgForm, NgModel, NgModelGroup, RadioControlValueAccessor, FormControlDirective, FormControlName, FormGroupDirective, FormArrayName, FormGroupName, NgSelectOption, SelectControlValueAccessor, SelectMultipleControlValueAccessor, MaxLengthValidator, MinLengthValidator, PatternValidator, RequiredValidator, FormBuilder, AbstractControl, FormArray, FormControl, FormGroup, NG_ASYNC_VALIDATORS, NG_VALIDATORS, Validators, FormsModule, ReactiveFormsModule } from './src/forms';
//# sourceMappingURL=index.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./src/forms"}]}
{"__symbolic":"module","version":2,"metadata":{},"exports":[{"from":"./src/forms"}]}
{
"name": "@angular/forms",
"version": "2.3.0-beta.0",
"version": "2.3.0-beta.1",
"description": "Angular - directives and services for creating forms",

@@ -11,4 +11,4 @@ "main": "bundles/forms.umd.js",

"peerDependencies": {
"@angular/core": "2.3.0-beta.0",
"@angular/common": "2.3.0-beta.0"
"@angular/core": "2.3.0-beta.1",
"@angular/common": "2.3.0-beta.1"
},

@@ -15,0 +15,0 @@ "repository": {

@@ -42,3 +42,3 @@ /**

export { MaxLengthValidator, MinLengthValidator, PatternValidator, RequiredValidator } from './directives/validators';
export var SHARED_FORM_DIRECTIVES = [
export var /** @type {?} */ SHARED_FORM_DIRECTIVES = [
NgSelectOption, NgSelectMultipleOption, DefaultValueAccessor, NumberValueAccessor,

@@ -49,6 +49,6 @@ RangeValueAccessor, CheckboxControlValueAccessor, SelectControlValueAccessor,

];
export var TEMPLATE_DRIVEN_DIRECTIVES = [NgModel, NgModelGroup, NgForm];
export var REACTIVE_DRIVEN_DIRECTIVES = [FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName];
export var /** @type {?} */ TEMPLATE_DRIVEN_DIRECTIVES = [NgModel, NgModelGroup, NgForm];
export var /** @type {?} */ REACTIVE_DRIVEN_DIRECTIVES = [FormControlDirective, FormGroupDirective, FormControlName, FormGroupName, FormArrayName];
/**
* Internal module used for sharing directives between FormsModule and ReactiveFormsModule
* Internal module used for sharing directives between FormsModule and ReactiveFormsModule
*/

@@ -65,5 +65,14 @@ export var InternalFormsSharedModule = (function () {

/** @nocollapse */
InternalFormsSharedModule.ctorParameters = [];
InternalFormsSharedModule.ctorParameters = function () { return []; };
return InternalFormsSharedModule;
}());
function InternalFormsSharedModule_tsickle_Closure_declarations() {
/** @type {?} */
InternalFormsSharedModule.decorators;
/**
* @nocollapse
* @type {?}
*/
InternalFormsSharedModule.ctorParameters;
}
//# sourceMappingURL=directives.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"SHARED_FORM_DIRECTIVES":[{"__symbolic":"reference","module":"./directives/select_control_value_accessor","name":"NgSelectOption"},{"__symbolic":"reference","module":"./directives/select_multiple_control_value_accessor","name":"NgSelectMultipleOption"},{"__symbolic":"reference","module":"./directives/default_value_accessor","name":"DefaultValueAccessor"},{"__symbolic":"reference","module":"./directives/number_value_accessor","name":"NumberValueAccessor"},{"__symbolic":"reference","module":"./directives/range_value_accessor","name":"RangeValueAccessor"},{"__symbolic":"reference","module":"./directives/checkbox_value_accessor","name":"CheckboxControlValueAccessor"},{"__symbolic":"reference","module":"./directives/select_control_value_accessor","name":"SelectControlValueAccessor"},{"__symbolic":"reference","module":"./directives/select_multiple_control_value_accessor","name":"SelectMultipleControlValueAccessor"},{"__symbolic":"reference","module":"./directives/radio_control_value_accessor","name":"RadioControlValueAccessor"},{"__symbolic":"reference","module":"./directives/ng_control_status","name":"NgControlStatus"},{"__symbolic":"reference","module":"./directives/ng_control_status","name":"NgControlStatusGroup"},{"__symbolic":"reference","module":"./directives/validators","name":"RequiredValidator"},{"__symbolic":"reference","module":"./directives/validators","name":"MinLengthValidator"},{"__symbolic":"reference","module":"./directives/validators","name":"MaxLengthValidator"},{"__symbolic":"reference","module":"./directives/validators","name":"PatternValidator"}],"TEMPLATE_DRIVEN_DIRECTIVES":[{"__symbolic":"reference","module":"./directives/ng_model","name":"NgModel"},{"__symbolic":"reference","module":"./directives/ng_model_group","name":"NgModelGroup"},{"__symbolic":"reference","module":"./directives/ng_form","name":"NgForm"}],"REACTIVE_DRIVEN_DIRECTIVES":[{"__symbolic":"reference","module":"./directives/reactive_directives/form_control_directive","name":"FormControlDirective"},{"__symbolic":"reference","module":"./directives/reactive_directives/form_group_directive","name":"FormGroupDirective"},{"__symbolic":"reference","module":"./directives/reactive_directives/form_control_name","name":"FormControlName"},{"__symbolic":"reference","module":"./directives/reactive_directives/form_group_name","name":"FormGroupName"},{"__symbolic":"reference","module":"./directives/reactive_directives/form_group_name","name":"FormArrayName"}],"InternalFormsSharedModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":{"__symbolic":"reference","name":"SHARED_FORM_DIRECTIVES"},"exports":{"__symbolic":"reference","name":"SHARED_FORM_DIRECTIVES"}}]}]}},"exports":[{"from":"./directives/checkbox_value_accessor","export":["CheckboxControlValueAccessor"]},{"from":"./directives/control_value_accessor","export":["ControlValueAccessor"]},{"from":"./directives/default_value_accessor","export":["DefaultValueAccessor"]},{"from":"./directives/ng_control","export":["NgControl"]},{"from":"./directives/ng_control_status","export":["NgControlStatus","NgControlStatusGroup"]},{"from":"./directives/ng_form","export":["NgForm"]},{"from":"./directives/ng_model","export":["NgModel"]},{"from":"./directives/ng_model_group","export":["NgModelGroup"]},{"from":"./directives/number_value_accessor","export":["NumberValueAccessor"]},{"from":"./directives/radio_control_value_accessor","export":["RadioControlValueAccessor"]},{"from":"./directives/range_value_accessor","export":["RangeValueAccessor"]},{"from":"./directives/reactive_directives/form_control_directive","export":["FormControlDirective"]},{"from":"./directives/reactive_directives/form_control_name","export":["FormControlName"]},{"from":"./directives/reactive_directives/form_group_directive","export":["FormGroupDirective"]},{"from":"./directives/reactive_directives/form_group_name","export":["FormArrayName","FormGroupName"]},{"from":"./directives/select_control_value_accessor","export":["NgSelectOption","SelectControlValueAccessor"]},{"from":"./directives/select_multiple_control_value_accessor","export":["NgSelectMultipleOption","SelectMultipleControlValueAccessor"]},{"from":"./directives/validators","export":["MaxLengthValidator","MinLengthValidator","PatternValidator","RequiredValidator"]}]}
{"__symbolic":"module","version":2,"metadata":{"SHARED_FORM_DIRECTIVES":[{"__symbolic":"reference","module":"./directives/select_control_value_accessor","name":"NgSelectOption"},{"__symbolic":"reference","module":"./directives/select_multiple_control_value_accessor","name":"NgSelectMultipleOption"},{"__symbolic":"reference","module":"./directives/default_value_accessor","name":"DefaultValueAccessor"},{"__symbolic":"reference","module":"./directives/number_value_accessor","name":"NumberValueAccessor"},{"__symbolic":"reference","module":"./directives/range_value_accessor","name":"RangeValueAccessor"},{"__symbolic":"reference","module":"./directives/checkbox_value_accessor","name":"CheckboxControlValueAccessor"},{"__symbolic":"reference","module":"./directives/select_control_value_accessor","name":"SelectControlValueAccessor"},{"__symbolic":"reference","module":"./directives/select_multiple_control_value_accessor","name":"SelectMultipleControlValueAccessor"},{"__symbolic":"reference","module":"./directives/radio_control_value_accessor","name":"RadioControlValueAccessor"},{"__symbolic":"reference","module":"./directives/ng_control_status","name":"NgControlStatus"},{"__symbolic":"reference","module":"./directives/ng_control_status","name":"NgControlStatusGroup"},{"__symbolic":"reference","module":"./directives/validators","name":"RequiredValidator"},{"__symbolic":"reference","module":"./directives/validators","name":"MinLengthValidator"},{"__symbolic":"reference","module":"./directives/validators","name":"MaxLengthValidator"},{"__symbolic":"reference","module":"./directives/validators","name":"PatternValidator"}],"TEMPLATE_DRIVEN_DIRECTIVES":[{"__symbolic":"reference","module":"./directives/ng_model","name":"NgModel"},{"__symbolic":"reference","module":"./directives/ng_model_group","name":"NgModelGroup"},{"__symbolic":"reference","module":"./directives/ng_form","name":"NgForm"}],"REACTIVE_DRIVEN_DIRECTIVES":[{"__symbolic":"reference","module":"./directives/reactive_directives/form_control_directive","name":"FormControlDirective"},{"__symbolic":"reference","module":"./directives/reactive_directives/form_group_directive","name":"FormGroupDirective"},{"__symbolic":"reference","module":"./directives/reactive_directives/form_control_name","name":"FormControlName"},{"__symbolic":"reference","module":"./directives/reactive_directives/form_group_name","name":"FormGroupName"},{"__symbolic":"reference","module":"./directives/reactive_directives/form_group_name","name":"FormArrayName"}],"InternalFormsSharedModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":{"__symbolic":"reference","name":"SHARED_FORM_DIRECTIVES"},"exports":{"__symbolic":"reference","name":"SHARED_FORM_DIRECTIVES"}}]}]}},"exports":[{"from":"./directives/checkbox_value_accessor","export":["CheckboxControlValueAccessor"]},{"from":"./directives/control_value_accessor","export":["ControlValueAccessor"]},{"from":"./directives/default_value_accessor","export":["DefaultValueAccessor"]},{"from":"./directives/ng_control","export":["NgControl"]},{"from":"./directives/ng_control_status","export":["NgControlStatus","NgControlStatusGroup"]},{"from":"./directives/ng_form","export":["NgForm"]},{"from":"./directives/ng_model","export":["NgModel"]},{"from":"./directives/ng_model_group","export":["NgModelGroup"]},{"from":"./directives/number_value_accessor","export":["NumberValueAccessor"]},{"from":"./directives/radio_control_value_accessor","export":["RadioControlValueAccessor"]},{"from":"./directives/range_value_accessor","export":["RangeValueAccessor"]},{"from":"./directives/reactive_directives/form_control_directive","export":["FormControlDirective"]},{"from":"./directives/reactive_directives/form_control_name","export":["FormControlName"]},{"from":"./directives/reactive_directives/form_group_directive","export":["FormGroupDirective"]},{"from":"./directives/reactive_directives/form_group_name","export":["FormArrayName","FormGroupName"]},{"from":"./directives/select_control_value_accessor","export":["NgSelectOption","SelectControlValueAccessor"]},{"from":"./directives/select_multiple_control_value_accessor","export":["NgSelectMultipleOption","SelectMultipleControlValueAccessor"]},{"from":"./directives/validators","export":["MaxLengthValidator","MinLengthValidator","PatternValidator","RequiredValidator"]}]}

@@ -9,7 +9,7 @@ /**

/**
* Base class for control directives.
*
* Only used internally in the forms module.
*
* @stable
* Base class for control directives.
* *
* Only used internally in the forms module.
* *
* @abstract
*/

@@ -20,2 +20,5 @@ export var AbstractControlDirective = (function () {

Object.defineProperty(AbstractControlDirective.prototype, "control", {
/**
* @return {?}
*/
get: function () { throw new Error('unimplemented'); },

@@ -26,2 +29,5 @@ enumerable: true,

Object.defineProperty(AbstractControlDirective.prototype, "value", {
/**
* @return {?}
*/
get: function () { return this.control ? this.control.value : null; },

@@ -32,2 +38,5 @@ enumerable: true,

Object.defineProperty(AbstractControlDirective.prototype, "valid", {
/**
* @return {?}
*/
get: function () { return this.control ? this.control.valid : null; },

@@ -38,2 +47,5 @@ enumerable: true,

Object.defineProperty(AbstractControlDirective.prototype, "invalid", {
/**
* @return {?}
*/
get: function () { return this.control ? this.control.invalid : null; },

@@ -44,2 +56,5 @@ enumerable: true,

Object.defineProperty(AbstractControlDirective.prototype, "pending", {
/**
* @return {?}
*/
get: function () { return this.control ? this.control.pending : null; },

@@ -50,2 +65,5 @@ enumerable: true,

Object.defineProperty(AbstractControlDirective.prototype, "errors", {
/**
* @return {?}
*/
get: function () { return this.control ? this.control.errors : null; },

@@ -56,2 +74,5 @@ enumerable: true,

Object.defineProperty(AbstractControlDirective.prototype, "pristine", {
/**
* @return {?}
*/
get: function () { return this.control ? this.control.pristine : null; },

@@ -62,2 +83,5 @@ enumerable: true,

Object.defineProperty(AbstractControlDirective.prototype, "dirty", {
/**
* @return {?}
*/
get: function () { return this.control ? this.control.dirty : null; },

@@ -68,2 +92,5 @@ enumerable: true,

Object.defineProperty(AbstractControlDirective.prototype, "touched", {
/**
* @return {?}
*/
get: function () { return this.control ? this.control.touched : null; },

@@ -74,2 +101,5 @@ enumerable: true,

Object.defineProperty(AbstractControlDirective.prototype, "untouched", {
/**
* @return {?}
*/
get: function () { return this.control ? this.control.untouched : null; },

@@ -80,2 +110,5 @@ enumerable: true,

Object.defineProperty(AbstractControlDirective.prototype, "disabled", {
/**
* @return {?}
*/
get: function () { return this.control ? this.control.disabled : null; },

@@ -86,2 +119,5 @@ enumerable: true,

Object.defineProperty(AbstractControlDirective.prototype, "enabled", {
/**
* @return {?}
*/
get: function () { return this.control ? this.control.enabled : null; },

@@ -92,2 +128,5 @@ enumerable: true,

Object.defineProperty(AbstractControlDirective.prototype, "statusChanges", {
/**
* @return {?}
*/
get: function () { return this.control ? this.control.statusChanges : null; },

@@ -98,2 +137,5 @@ enumerable: true,

Object.defineProperty(AbstractControlDirective.prototype, "valueChanges", {
/**
* @return {?}
*/
get: function () { return this.control ? this.control.valueChanges : null; },

@@ -104,2 +146,5 @@ enumerable: true,

Object.defineProperty(AbstractControlDirective.prototype, "path", {
/**
* @return {?}
*/
get: function () { return null; },

@@ -109,2 +154,6 @@ enumerable: true,

});
/**
* @param {?=} value
* @return {?}
*/
AbstractControlDirective.prototype.reset = function (value) {

@@ -115,2 +164,7 @@ if (value === void 0) { value = undefined; }

};
/**
* @param {?} errorCode
* @param {?=} path
* @return {?}
*/
AbstractControlDirective.prototype.hasError = function (errorCode, path) {

@@ -120,2 +174,7 @@ if (path === void 0) { path = null; }

};
/**
* @param {?} errorCode
* @param {?=} path
* @return {?}
*/
AbstractControlDirective.prototype.getError = function (errorCode, path) {

@@ -122,0 +181,0 @@ if (path === void 0) { path = null; }

@@ -16,5 +16,4 @@ /**

/**
* This is a base class for code shared between {@link NgModelGroup} and {@link FormGroupName}.
*
* @stable
* This is a base class for code shared between {@link NgModelGroup} and {@link FormGroupName}.
* *
*/

@@ -26,2 +25,5 @@ export var AbstractFormGroupDirective = (function (_super) {

}
/**
* @return {?}
*/
AbstractFormGroupDirective.prototype.ngOnInit = function () {

@@ -31,2 +33,5 @@ this._checkParentType();

};
/**
* @return {?}
*/
AbstractFormGroupDirective.prototype.ngOnDestroy = function () {

@@ -39,3 +44,4 @@ if (this.formDirective) {

/**
* Get the {@link FormGroup} backing this binding.
* Get the {@link FormGroup} backing this binding.
* @return {?}
*/

@@ -48,3 +54,4 @@ get: function () { return this.formDirective.getFormGroup(this); },

/**
* Get the path to this control group.
* Get the path to this control group.
* @return {?}
*/

@@ -57,3 +64,4 @@ get: function () { return controlPath(this.name, this._parent); },

/**
* Get the {@link Form} to which this group belongs.
* Get the {@link Form} to which this group belongs.
* @return {?}
*/

@@ -65,2 +73,5 @@ get: function () { return this._parent ? this._parent.formDirective : null; },

Object.defineProperty(AbstractFormGroupDirective.prototype, "validator", {
/**
* @return {?}
*/
get: function () { return composeValidators(this._validators); },

@@ -71,2 +82,5 @@ enumerable: true,

Object.defineProperty(AbstractFormGroupDirective.prototype, "asyncValidator", {
/**
* @return {?}
*/
get: function () { return composeAsyncValidators(this._asyncValidators); },

@@ -76,6 +90,16 @@ enumerable: true,

});
/** @internal */
/**
* @return {?}
*/
AbstractFormGroupDirective.prototype._checkParentType = function () { };
return AbstractFormGroupDirective;
}(ControlContainer));
function AbstractFormGroupDirective_tsickle_Closure_declarations() {
/** @type {?} */
AbstractFormGroupDirective.prototype._parent;
/** @type {?} */
AbstractFormGroupDirective.prototype._validators;
/** @type {?} */
AbstractFormGroupDirective.prototype._asyncValidators;
}
//# sourceMappingURL=abstract_form_group_directive.js.map

@@ -10,3 +10,3 @@ /**

import { NG_VALUE_ACCESSOR } from './control_value_accessor';
export var CHECKBOX_VALUE_ACCESSOR = {
export var /** @type {?} */ CHECKBOX_VALUE_ACCESSOR = {
provide: NG_VALUE_ACCESSOR,

@@ -17,12 +17,16 @@ useExisting: forwardRef(function () { return CheckboxControlValueAccessor; }),

/**
* The accessor for writing a value and listening to changes on a checkbox input element.
*
* ### Example
* ```
* <input type="checkbox" name="rememberLogin" ngModel>
* ```
*
* @stable
* The accessor for writing a value and listening to changes on a checkbox input element.
* *
* ### Example
* ```
* <input type="checkbox" name="rememberLogin" ngModel>
* ```
* *
* @stable
*/
export var CheckboxControlValueAccessor = (function () {
/**
* @param {?} _renderer
* @param {?} _elementRef
*/
function CheckboxControlValueAccessor(_renderer, _elementRef) {

@@ -34,7 +38,23 @@ this._renderer = _renderer;

}
/**
* @param {?} value
* @return {?}
*/
CheckboxControlValueAccessor.prototype.writeValue = function (value) {
this._renderer.setElementProperty(this._elementRef.nativeElement, 'checked', value);
};
/**
* @param {?} fn
* @return {?}
*/
CheckboxControlValueAccessor.prototype.registerOnChange = function (fn) { this.onChange = fn; };
/**
* @param {?} fn
* @return {?}
*/
CheckboxControlValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; };
/**
* @param {?} isDisabled
* @return {?}
*/
CheckboxControlValueAccessor.prototype.setDisabledState = function (isDisabled) {

@@ -51,8 +71,25 @@ this._renderer.setElementProperty(this._elementRef.nativeElement, 'disabled', isDisabled);

/** @nocollapse */
CheckboxControlValueAccessor.ctorParameters = [
CheckboxControlValueAccessor.ctorParameters = function () { return [
{ type: Renderer, },
{ type: ElementRef, },
];
]; };
return CheckboxControlValueAccessor;
}());
function CheckboxControlValueAccessor_tsickle_Closure_declarations() {
/** @type {?} */
CheckboxControlValueAccessor.decorators;
/**
* @nocollapse
* @type {?}
*/
CheckboxControlValueAccessor.ctorParameters;
/** @type {?} */
CheckboxControlValueAccessor.prototype.onChange;
/** @type {?} */
CheckboxControlValueAccessor.prototype.onTouched;
/** @type {?} */
CheckboxControlValueAccessor.prototype._renderer;
/** @type {?} */
CheckboxControlValueAccessor.prototype._elementRef;
}
//# sourceMappingURL=checkbox_value_accessor.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"CHECKBOX_VALUE_ACCESSOR":{"provide":{"__symbolic":"reference","module":"./control_value_accessor","name":"NG_VALUE_ACCESSOR"},"useExisting":{"__symbolic":"reference","name":"CheckboxControlValueAccessor"},"multi":true},"CheckboxControlValueAccessor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]","host":{"(change)":"onChange($event.target.checked)","(blur)":"onTouched()"},"providers":[{"__symbolic":"reference","name":"CHECKBOX_VALUE_ACCESSOR"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}]}}}}
{"__symbolic":"module","version":2,"metadata":{"CHECKBOX_VALUE_ACCESSOR":{"provide":{"__symbolic":"reference","module":"./control_value_accessor","name":"NG_VALUE_ACCESSOR"},"useExisting":{"__symbolic":"reference","name":"CheckboxControlValueAccessor"},"multi":true},"CheckboxControlValueAccessor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]","host":{"(change)":"onChange($event.target.checked)","(blur)":"onTouched()"},"providers":[{"__symbolic":"reference","name":"CHECKBOX_VALUE_ACCESSOR"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}]}}}}

@@ -15,7 +15,6 @@ /**

/**
* A directive that contains multiple {@link NgControl}s.
*
* Only used by the forms module.
*
* @stable
* A directive that contains multiple {@link NgControl}s.
* *
* Only used by the forms module.
* *
*/

@@ -29,3 +28,4 @@ export var ControlContainer = (function (_super) {

/**
* Get the form to which this container belongs.
* Get the form to which this container belongs.
* @return {?}
*/

@@ -38,3 +38,4 @@ get: function () { return null; },

/**
* Get the path to this container.
* Get the path to this container.
* @return {?}
*/

@@ -47,2 +48,6 @@ get: function () { return null; },

}(AbstractControlDirective));
function ControlContainer_tsickle_Closure_declarations() {
/** @type {?} */
ControlContainer.prototype.name;
}
//# sourceMappingURL=control_container.js.map

@@ -15,3 +15,3 @@ /**

*/
export var NG_VALUE_ACCESSOR = new OpaqueToken('NgValueAccessor');
export var /** @type {?} */ NG_VALUE_ACCESSOR = new OpaqueToken('NgValueAccessor');
//# sourceMappingURL=control_value_accessor.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"NG_VALUE_ACCESSOR":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["NgValueAccessor"]}}}
{"__symbolic":"module","version":2,"metadata":{"NG_VALUE_ACCESSOR":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["NgValueAccessor"]}}}

@@ -10,3 +10,3 @@ /**

import { NG_VALUE_ACCESSOR } from './control_value_accessor';
export var DEFAULT_VALUE_ACCESSOR = {
export var /** @type {?} */ DEFAULT_VALUE_ACCESSOR = {
provide: NG_VALUE_ACCESSOR,

@@ -17,13 +17,17 @@ useExisting: forwardRef(function () { return DefaultValueAccessor; }),

/**
* The default accessor for writing a value and listening to changes that is used by the
* {@link NgModel}, {@link FormControlDirective}, and {@link FormControlName} directives.
*
* ### Example
* ```
* <input type="text" name="searchQuery" ngModel>
* ```
*
* @stable
* The default accessor for writing a value and listening to changes that is used by the
* {@link NgModel}, {@link FormControlDirective}, and {@link FormControlName} directives.
* *
* ### Example
* ```
* <input type="text" name="searchQuery" ngModel>
* ```
* *
* @stable
*/
export var DefaultValueAccessor = (function () {
/**
* @param {?} _renderer
* @param {?} _elementRef
*/
function DefaultValueAccessor(_renderer, _elementRef) {

@@ -35,8 +39,24 @@ this._renderer = _renderer;

}
/**
* @param {?} value
* @return {?}
*/
DefaultValueAccessor.prototype.writeValue = function (value) {
var normalizedValue = value == null ? '' : value;
var /** @type {?} */ normalizedValue = value == null ? '' : value;
this._renderer.setElementProperty(this._elementRef.nativeElement, 'value', normalizedValue);
};
/**
* @param {?} fn
* @return {?}
*/
DefaultValueAccessor.prototype.registerOnChange = function (fn) { this.onChange = fn; };
/**
* @param {?} fn
* @return {?}
*/
DefaultValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; };
/**
* @param {?} isDisabled
* @return {?}
*/
DefaultValueAccessor.prototype.setDisabledState = function (isDisabled) {

@@ -56,8 +76,25 @@ this._renderer.setElementProperty(this._elementRef.nativeElement, 'disabled', isDisabled);

/** @nocollapse */
DefaultValueAccessor.ctorParameters = [
DefaultValueAccessor.ctorParameters = function () { return [
{ type: Renderer, },
{ type: ElementRef, },
];
]; };
return DefaultValueAccessor;
}());
function DefaultValueAccessor_tsickle_Closure_declarations() {
/** @type {?} */
DefaultValueAccessor.decorators;
/**
* @nocollapse
* @type {?}
*/
DefaultValueAccessor.ctorParameters;
/** @type {?} */
DefaultValueAccessor.prototype.onChange;
/** @type {?} */
DefaultValueAccessor.prototype.onTouched;
/** @type {?} */
DefaultValueAccessor.prototype._renderer;
/** @type {?} */
DefaultValueAccessor.prototype._elementRef;
}
//# sourceMappingURL=default_value_accessor.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"DEFAULT_VALUE_ACCESSOR":{"provide":{"__symbolic":"reference","module":"./control_value_accessor","name":"NG_VALUE_ACCESSOR"},"useExisting":{"__symbolic":"reference","name":"DefaultValueAccessor"},"multi":true},"DefaultValueAccessor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]","host":{"(input)":"onChange($event.target.value)","(blur)":"onTouched()"},"providers":[{"__symbolic":"reference","name":"DEFAULT_VALUE_ACCESSOR"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}]}}}}
{"__symbolic":"module","version":2,"metadata":{"DEFAULT_VALUE_ACCESSOR":{"provide":{"__symbolic":"reference","module":"./control_value_accessor","name":"NG_VALUE_ACCESSOR"},"useExisting":{"__symbolic":"reference","name":"DefaultValueAccessor"},"multi":true},"DefaultValueAccessor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]","host":{"(input)":"onChange($event.target.value)","(blur)":"onTouched()"},"providers":[{"__symbolic":"reference","name":"DEFAULT_VALUE_ACCESSOR"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}]}}}}

@@ -8,3 +8,3 @@ /**

*/
export var FormErrorExamples = {
export var /** @type {?} */ FormErrorExamples = {
formControlName: "\n <div [formGroup]=\"myGroup\">\n <input formControlName=\"firstName\">\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });",

@@ -11,0 +11,0 @@ formGroupName: "\n <div [formGroup]=\"myGroup\">\n <div formGroupName=\"person\">\n <input formControlName=\"firstName\">\n </div>\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });",

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"FormErrorExamples":{"formControlName":"\n <div [formGroup]=\"myGroup\">\n <input formControlName=\"firstName\">\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });","formGroupName":"\n <div [formGroup]=\"myGroup\">\n <div formGroupName=\"person\">\n <input formControlName=\"firstName\">\n </div>\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });","formArrayName":"\n <div [formGroup]=\"myGroup\">\n <div formArrayName=\"cities\">\n <div *ngFor=\"let city of cityArray.controls; let i=index\">\n <input [formControlName]=\"i\">\n </div>\n </div>\n </div>\n\n In your class:\n\n this.cityArray = new FormArray([new FormControl('SF')]);\n this.myGroup = new FormGroup({\n cities: this.cityArray\n });","ngModelGroup":"\n <form>\n <div ngModelGroup=\"person\">\n <input [(ngModel)]=\"person.name\" name=\"firstName\">\n </div>\n </form>","ngModelWithFormGroup":"\n <div [formGroup]=\"myGroup\">\n <input formControlName=\"firstName\">\n <input [(ngModel)]=\"showMoreControls\" [ngModelOptions]=\"{standalone: true}\">\n </div>\n "}}}
{"__symbolic":"module","version":2,"metadata":{"FormErrorExamples":{"formControlName":"\n <div [formGroup]=\"myGroup\">\n <input formControlName=\"firstName\">\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n firstName: new FormControl()\n });","formGroupName":"\n <div [formGroup]=\"myGroup\">\n <div formGroupName=\"person\">\n <input formControlName=\"firstName\">\n </div>\n </div>\n\n In your class:\n\n this.myGroup = new FormGroup({\n person: new FormGroup({ firstName: new FormControl() })\n });","formArrayName":"\n <div [formGroup]=\"myGroup\">\n <div formArrayName=\"cities\">\n <div *ngFor=\"let city of cityArray.controls; let i=index\">\n <input [formControlName]=\"i\">\n </div>\n </div>\n </div>\n\n In your class:\n\n this.cityArray = new FormArray([new FormControl('SF')]);\n this.myGroup = new FormGroup({\n cities: this.cityArray\n });","ngModelGroup":"\n <form>\n <div ngModelGroup=\"person\">\n <input [(ngModel)]=\"person.name\" name=\"firstName\">\n </div>\n </form>","ngModelWithFormGroup":"\n <div [formGroup]=\"myGroup\">\n <input formControlName=\"firstName\">\n <input [(ngModel)]=\"showMoreControls\" [ngModelOptions]=\"{standalone: true}\">\n </div>\n "}}}

@@ -17,2 +17,5 @@ /**

export var AbstractControlStatus = (function () {
/**
* @param {?} cd
*/
function AbstractControlStatus(cd) {

@@ -22,2 +25,5 @@ this._cd = cd;

Object.defineProperty(AbstractControlStatus.prototype, "ngClassUntouched", {
/**
* @return {?}
*/
get: function () { return this._cd.control ? this._cd.control.untouched : false; },

@@ -28,2 +34,5 @@ enumerable: true,

Object.defineProperty(AbstractControlStatus.prototype, "ngClassTouched", {
/**
* @return {?}
*/
get: function () { return this._cd.control ? this._cd.control.touched : false; },

@@ -34,2 +43,5 @@ enumerable: true,

Object.defineProperty(AbstractControlStatus.prototype, "ngClassPristine", {
/**
* @return {?}
*/
get: function () { return this._cd.control ? this._cd.control.pristine : false; },

@@ -40,2 +52,5 @@ enumerable: true,

Object.defineProperty(AbstractControlStatus.prototype, "ngClassDirty", {
/**
* @return {?}
*/
get: function () { return this._cd.control ? this._cd.control.dirty : false; },

@@ -46,2 +61,5 @@ enumerable: true,

Object.defineProperty(AbstractControlStatus.prototype, "ngClassValid", {
/**
* @return {?}
*/
get: function () { return this._cd.control ? this._cd.control.valid : false; },

@@ -52,2 +70,5 @@ enumerable: true,

Object.defineProperty(AbstractControlStatus.prototype, "ngClassInvalid", {
/**
* @return {?}
*/
get: function () { return this._cd.control ? this._cd.control.invalid : false; },

@@ -58,2 +79,5 @@ enumerable: true,

Object.defineProperty(AbstractControlStatus.prototype, "ngClassPending", {
/**
* @return {?}
*/
get: function () { return this._cd.control ? this._cd.control.pending : false; },

@@ -65,3 +89,7 @@ enumerable: true,

}());
export var ngControlStatusHost = {
function AbstractControlStatus_tsickle_Closure_declarations() {
/** @type {?} */
AbstractControlStatus.prototype._cd;
}
export var /** @type {?} */ ngControlStatusHost = {
'[class.ng-untouched]': 'ngClassUntouched',

@@ -76,9 +104,11 @@ '[class.ng-touched]': 'ngClassTouched',

/**
* Directive automatically applied to Angular form controls that sets CSS classes
* based on control status (valid/invalid/dirty/etc).
*
* @stable
* Directive automatically applied to Angular form controls that sets CSS classes
* based on control status (valid/invalid/dirty/etc).
* *
*/
export var NgControlStatus = (function (_super) {
__extends(NgControlStatus, _super);
/**
* @param {?} cd
*/
function NgControlStatus(cd) {

@@ -91,15 +121,26 @@ _super.call(this, cd);

/** @nocollapse */
NgControlStatus.ctorParameters = [
NgControlStatus.ctorParameters = function () { return [
{ type: NgControl, decorators: [{ type: Self },] },
];
]; };
return NgControlStatus;
}(AbstractControlStatus));
function NgControlStatus_tsickle_Closure_declarations() {
/** @type {?} */
NgControlStatus.decorators;
/**
* @nocollapse
* @type {?}
*/
NgControlStatus.ctorParameters;
}
/**
* Directive automatically applied to Angular form groups that sets CSS classes
* based on control status (valid/invalid/dirty/etc).
*
* @stable
* Directive automatically applied to Angular form groups that sets CSS classes
* based on control status (valid/invalid/dirty/etc).
* *
*/
export var NgControlStatusGroup = (function (_super) {
__extends(NgControlStatusGroup, _super);
/**
* @param {?} cd
*/
function NgControlStatusGroup(cd) {

@@ -115,7 +156,16 @@ _super.call(this, cd);

/** @nocollapse */
NgControlStatusGroup.ctorParameters = [
NgControlStatusGroup.ctorParameters = function () { return [
{ type: ControlContainer, decorators: [{ type: Self },] },
];
]; };
return NgControlStatusGroup;
}(AbstractControlStatus));
function NgControlStatusGroup_tsickle_Closure_declarations() {
/** @type {?} */
NgControlStatusGroup.decorators;
/**
* @nocollapse
* @type {?}
*/
NgControlStatusGroup.ctorParameters;
}
//# sourceMappingURL=ng_control_status.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"ngControlStatusHost":{"[class.ng-untouched]":"ngClassUntouched","[class.ng-touched]":"ngClassTouched","[class.ng-pristine]":"ngClassPristine","[class.ng-dirty]":"ngClassDirty","[class.ng-valid]":"ngClassValid","[class.ng-invalid]":"ngClassInvalid","[class.ng-pending]":"ngClassPending"},"NgControlStatus":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[formControlName],[ngModel],[formControl]","host":{"__symbolic":"reference","name":"ngControlStatusHost"}}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}}]],"parameters":[{"__symbolic":"reference","module":"./ng_control","name":"NgControl"}]}]}},"NgControlStatusGroup":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]","host":{"__symbolic":"reference","name":"ngControlStatusHost"}}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}}]],"parameters":[{"__symbolic":"reference","module":"./control_container","name":"ControlContainer"}]}]}}}}
{"__symbolic":"module","version":2,"metadata":{"AbstractControlStatus":{"__symbolic":"class"},"ngControlStatusHost":{"[class.ng-untouched]":"ngClassUntouched","[class.ng-touched]":"ngClassTouched","[class.ng-pristine]":"ngClassPristine","[class.ng-dirty]":"ngClassDirty","[class.ng-valid]":"ngClassValid","[class.ng-invalid]":"ngClassInvalid","[class.ng-pending]":"ngClassPending"},"NgControlStatus":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[formControlName],[ngModel],[formControl]","host":{"__symbolic":"reference","name":"ngControlStatusHost"}}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}}]],"parameters":[{"__symbolic":"reference","module":"./ng_control","name":"NgControl"}]}]}},"NgControlStatusGroup":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]","host":{"__symbolic":"reference","name":"ngControlStatusHost"}}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}}]],"parameters":[{"__symbolic":"reference","module":"./control_container","name":"ControlContainer"}]}]}}}}

@@ -14,2 +14,5 @@ /**

import { AbstractControlDirective } from './abstract_control_directive';
/**
* @return {?}
*/
function unimplemented() {

@@ -19,8 +22,8 @@ throw new Error('unimplemented');

/**
* A base class that all control directive extend.
* It binds a {@link FormControl} object to a DOM element.
*
* Used internally by Angular forms.
*
* @stable
* A base class that all control directive extend.
* It binds a {@link FormControl} object to a DOM element.
* *
* Used internally by Angular forms.
* *
* @abstract
*/

@@ -41,3 +44,6 @@ export var NgControl = (function (_super) {

Object.defineProperty(NgControl.prototype, "validator", {
get: function () { return unimplemented(); },
/**
* @return {?}
*/
get: function () { return (unimplemented()); },
enumerable: true,

@@ -47,8 +53,29 @@ configurable: true

Object.defineProperty(NgControl.prototype, "asyncValidator", {
get: function () { return unimplemented(); },
/**
* @return {?}
*/
get: function () { return (unimplemented()); },
enumerable: true,
configurable: true
});
/**
* @abstract
* @param {?} newValue
* @return {?}
*/
NgControl.prototype.viewToModelUpdate = function (newValue) { };
return NgControl;
}(AbstractControlDirective));
function NgControl_tsickle_Closure_declarations() {
/** @type {?} */
NgControl.prototype._parent;
/** @type {?} */
NgControl.prototype.name;
/** @type {?} */
NgControl.prototype.valueAccessor;
/** @type {?} */
NgControl.prototype._rawValidators;
/** @type {?} */
NgControl.prototype._rawAsyncValidators;
}
//# sourceMappingURL=ng_control.js.map

@@ -19,40 +19,42 @@ /**

import { composeAsyncValidators, composeValidators, setUpControl, setUpFormContainer } from './shared';
export var formDirectiveProvider = {
export var /** @type {?} */ formDirectiveProvider = {
provide: ControlContainer,
useExisting: forwardRef(function () { return NgForm; })
};
var resolvedPromise = Promise.resolve(null);
var /** @type {?} */ resolvedPromise = Promise.resolve(null);
/**
* @whatItDoes Creates a top-level {@link FormGroup} instance and binds it to a form
* to track aggregate form value and validation status.
*
* @howToUse
*
* As soon as you import the `FormsModule`, this directive becomes active by default on
* all `<form>` tags. You don't need to add a special selector.
*
* You can export the directive into a local template variable using `ngForm` as the key
* (ex: `#myForm="ngForm"`). This is optional, but useful. Many properties from the underlying
* {@link FormGroup} instance are duplicated on the directive itself, so a reference to it
* will give you access to the aggregate value and validity status of the form, as well as
* user interaction properties like `dirty` and `touched`.
*
* To register child controls with the form, you'll want to use {@link NgModel} with a
* `name` attribute. You can also use {@link NgModelGroup} if you'd like to create
* sub-groups within the form.
*
* You can listen to the directive's `ngSubmit` event to be notified when the user has
* triggered a form submission. The `ngSubmit` event will be emitted with the original form
* submission event.
*
* {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}
*
* * **npm package**: `@angular/forms`
*
* * **NgModule**: `FormsModule`
*
* @stable
* to track aggregate form value and validation status.
* *
* *
* As soon as you import the `FormsModule`, this directive becomes active by default on
* all `<form>` tags. You don't need to add a special selector.
* *
* You can export the directive into a local template variable using `ngForm` as the key
* (ex: `#myForm="ngForm"`). This is optional, but useful. Many properties from the underlying
* {@link FormGroup} instance are duplicated on the directive itself, so a reference to it
* will give you access to the aggregate value and validity status of the form, as well as
* user interaction properties like `dirty` and `touched`.
* *
* To register child controls with the form, you'll want to use {@link NgModel} with a
* `name` attribute. You can also use {@link NgModelGroup} if you'd like to create
* sub-groups within the form.
* *
* You can listen to the directive's `ngSubmit` event to be notified when the user has
* triggered a form submission. The `ngSubmit` event will be emitted with the original form
* submission event.
* *
* {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}
* *
* * **npm package**: `@angular/forms`
* *
* * **NgModule**: `FormsModule`
* *
* @stable
*/
export var NgForm = (function (_super) {
__extends(NgForm, _super);
/**
* @param {?} validators
* @param {?} asyncValidators
*/
function NgForm(validators, asyncValidators) {

@@ -66,2 +68,5 @@ _super.call(this);

Object.defineProperty(NgForm.prototype, "submitted", {
/**
* @return {?}
*/
get: function () { return this._submitted; },

@@ -72,2 +77,5 @@ enumerable: true,

Object.defineProperty(NgForm.prototype, "formDirective", {
/**
* @return {?}
*/
get: function () { return this; },

@@ -78,2 +86,5 @@ enumerable: true,

Object.defineProperty(NgForm.prototype, "control", {
/**
* @return {?}
*/
get: function () { return this.form; },

@@ -84,2 +95,5 @@ enumerable: true,

Object.defineProperty(NgForm.prototype, "path", {
/**
* @return {?}
*/
get: function () { return []; },

@@ -90,2 +104,5 @@ enumerable: true,

Object.defineProperty(NgForm.prototype, "controls", {
/**
* @return {?}
*/
get: function () { return this.form.controls; },

@@ -95,7 +112,11 @@ enumerable: true,

});
/**
* @param {?} dir
* @return {?}
*/
NgForm.prototype.addControl = function (dir) {
var _this = this;
resolvedPromise.then(function () {
var container = _this._findContainer(dir.path);
dir._control = container.registerControl(dir.name, dir.control);
var /** @type {?} */ container = _this._findContainer(dir.path);
dir._control = (container.registerControl(dir.name, dir.control));
setUpControl(dir.control, dir);

@@ -105,7 +126,15 @@ dir.control.updateValueAndValidity({ emitEvent: false });

};
NgForm.prototype.getControl = function (dir) { return this.form.get(dir.path); };
/**
* @param {?} dir
* @return {?}
*/
NgForm.prototype.getControl = function (dir) { return (this.form.get(dir.path)); };
/**
* @param {?} dir
* @return {?}
*/
NgForm.prototype.removeControl = function (dir) {
var _this = this;
resolvedPromise.then(function () {
var container = _this._findContainer(dir.path);
var /** @type {?} */ container = _this._findContainer(dir.path);
if (container) {

@@ -116,7 +145,11 @@ container.removeControl(dir.name);

};
/**
* @param {?} dir
* @return {?}
*/
NgForm.prototype.addFormGroup = function (dir) {
var _this = this;
resolvedPromise.then(function () {
var container = _this._findContainer(dir.path);
var group = new FormGroup({});
var /** @type {?} */ container = _this._findContainer(dir.path);
var /** @type {?} */ group = new FormGroup({});
setUpFormContainer(group, dir);

@@ -127,6 +160,10 @@ container.registerControl(dir.name, group);

};
/**
* @param {?} dir
* @return {?}
*/
NgForm.prototype.removeFormGroup = function (dir) {
var _this = this;
resolvedPromise.then(function () {
var container = _this._findContainer(dir.path);
var /** @type {?} */ container = _this._findContainer(dir.path);
if (container) {

@@ -137,11 +174,28 @@ container.removeControl(dir.name);

};
NgForm.prototype.getFormGroup = function (dir) { return this.form.get(dir.path); };
/**
* @param {?} dir
* @return {?}
*/
NgForm.prototype.getFormGroup = function (dir) { return (this.form.get(dir.path)); };
/**
* @param {?} dir
* @param {?} value
* @return {?}
*/
NgForm.prototype.updateModel = function (dir, value) {
var _this = this;
resolvedPromise.then(function () {
var ctrl = _this.form.get(dir.path);
var /** @type {?} */ ctrl = (_this.form.get(dir.path));
ctrl.setValue(value);
});
};
/**
* @param {?} value
* @return {?}
*/
NgForm.prototype.setValue = function (value) { this.control.setValue(value); };
/**
* @param {?} $event
* @return {?}
*/
NgForm.prototype.onSubmit = function ($event) {

@@ -152,3 +206,10 @@ this._submitted = true;

};
/**
* @return {?}
*/
NgForm.prototype.onReset = function () { this.resetForm(); };
/**
* @param {?=} value
* @return {?}
*/
NgForm.prototype.resetForm = function (value) {

@@ -159,6 +220,9 @@ if (value === void 0) { value = undefined; }

};
/** @internal */
/**
* @param {?} path
* @return {?}
*/
NgForm.prototype._findContainer = function (path) {
path.pop();
return path.length ? this.form.get(path) : this.form;
return path.length ? (this.form.get(path)) : this.form;
};

@@ -175,8 +239,23 @@ NgForm.decorators = [

/** @nocollapse */
NgForm.ctorParameters = [
NgForm.ctorParameters = function () { return [
{ type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS,] },] },
{ type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS,] },] },
];
]; };
return NgForm;
}(ControlContainer));
function NgForm_tsickle_Closure_declarations() {
/** @type {?} */
NgForm.decorators;
/**
* @nocollapse
* @type {?}
*/
NgForm.ctorParameters;
/** @type {?} */
NgForm.prototype._submitted;
/** @type {?} */
NgForm.prototype.form;
/** @type {?} */
NgForm.prototype.ngSubmit;
}
//# sourceMappingURL=ng_form.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"formDirectiveProvider":{"provide":{"__symbolic":"reference","module":"./control_container","name":"ControlContainer"},"useExisting":{"__symbolic":"reference","name":"NgForm"}},"NgForm":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"form:not([ngNoForm]):not([formGroup]),ngForm,[ngForm]","providers":[{"__symbolic":"reference","name":"formDirectiveProvider"}],"host":{"(submit)":"onSubmit($event)","(reset)":"onReset()"},"outputs":["ngSubmit"],"exportAs":"ngForm"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../validators","name":"NG_VALIDATORS"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../validators","name":"NG_ASYNC_VALIDATORS"}]}]],"parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]}]}],"addControl":[{"__symbolic":"method"}],"getControl":[{"__symbolic":"method"}],"removeControl":[{"__symbolic":"method"}],"addFormGroup":[{"__symbolic":"method"}],"removeFormGroup":[{"__symbolic":"method"}],"getFormGroup":[{"__symbolic":"method"}],"updateModel":[{"__symbolic":"method"}],"setValue":[{"__symbolic":"method"}],"onSubmit":[{"__symbolic":"method"}],"onReset":[{"__symbolic":"method"}],"resetForm":[{"__symbolic":"method"}],"_findContainer":[{"__symbolic":"method"}]}}}}
{"__symbolic":"module","version":2,"metadata":{"formDirectiveProvider":{"provide":{"__symbolic":"reference","module":"./control_container","name":"ControlContainer"},"useExisting":{"__symbolic":"reference","name":"NgForm"}},"NgForm":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"form:not([ngNoForm]):not([formGroup]),ngForm,[ngForm]","providers":[{"__symbolic":"reference","name":"formDirectiveProvider"}],"host":{"(submit)":"onSubmit($event)","(reset)":"onReset()"},"outputs":["ngSubmit"],"exportAs":"ngForm"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../validators","name":"NG_VALIDATORS"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../validators","name":"NG_ASYNC_VALIDATORS"}]}]],"parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]}]}],"addControl":[{"__symbolic":"method"}],"getControl":[{"__symbolic":"method"}],"removeControl":[{"__symbolic":"method"}],"addFormGroup":[{"__symbolic":"method"}],"removeFormGroup":[{"__symbolic":"method"}],"getFormGroup":[{"__symbolic":"method"}],"updateModel":[{"__symbolic":"method"}],"setValue":[{"__symbolic":"method"}],"onSubmit":[{"__symbolic":"method"}],"onReset":[{"__symbolic":"method"}],"resetForm":[{"__symbolic":"method"}],"_findContainer":[{"__symbolic":"method"}]}}}}

@@ -19,3 +19,3 @@ /**

import { TemplateDrivenErrors } from './template_driven_errors';
export var modelGroupProvider = {
export var /** @type {?} */ modelGroupProvider = {
provide: ControlContainer,

@@ -25,28 +25,30 @@ useExisting: forwardRef(function () { return NgModelGroup; })

/**
* @whatItDoes Creates and binds a {@link FormGroup} instance to a DOM element.
*
* @howToUse
*
* This directive can only be used as a child of {@link NgForm} (or in other words,
* within `<form>` tags).
*
* Use this directive if you'd like to create a sub-group within a form. This can
* come in handy if you want to validate a sub-group of your form separately from
* the rest of your form, or if some values in your domain model make more sense to
* consume together in a nested object.
*
* Pass in the name you'd like this sub-group to have and it will become the key
* for the sub-group in the form's full value. You can also export the directive into
* a local template variable using `ngModelGroup` (ex: `#myGroup="ngModelGroup"`).
*
* {@example forms/ts/ngModelGroup/ng_model_group_example.ts region='Component'}
*
* * **npm package**: `@angular/forms`
*
* * **NgModule**: `FormsModule`
*
* @stable
* *
* *
* This directive can only be used as a child of {@link NgForm} (or in other words,
* within `<form>` tags).
* *
* Use this directive if you'd like to create a sub-group within a form. This can
* come in handy if you want to validate a sub-group of your form separately from
* the rest of your form, or if some values in your domain model make more sense to
* consume together in a nested object.
* *
* Pass in the name you'd like this sub-group to have and it will become the key
* for the sub-group in the form's full value. You can also export the directive into
* a local template variable using `ngModelGroup` (ex: `#myGroup="ngModelGroup"`).
* *
* {@example forms/ts/ngModelGroup/ng_model_group_example.ts region='Component'}
* *
* * **npm package**: `@angular/forms`
* *
* * **NgModule**: `FormsModule`
* *
*/
export var NgModelGroup = (function (_super) {
__extends(NgModelGroup, _super);
/**
* @param {?} parent
* @param {?} validators
* @param {?} asyncValidators
*/
function NgModelGroup(parent, validators, asyncValidators) {

@@ -58,3 +60,5 @@ _super.call(this);

}
/** @internal */
/**
* @return {?}
*/
NgModelGroup.prototype._checkParentType = function () {

@@ -69,7 +73,7 @@ if (!(this._parent instanceof NgModelGroup) && !(this._parent instanceof NgForm)) {

/** @nocollapse */
NgModelGroup.ctorParameters = [
NgModelGroup.ctorParameters = function () { return [
{ type: ControlContainer, decorators: [{ type: Host }, { type: SkipSelf },] },
{ type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS,] },] },
{ type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS,] },] },
];
]; };
NgModelGroup.propDecorators = {

@@ -80,2 +84,15 @@ 'name': [{ type: Input, args: ['ngModelGroup',] },],

}(AbstractFormGroupDirective));
function NgModelGroup_tsickle_Closure_declarations() {
/** @type {?} */
NgModelGroup.decorators;
/**
* @nocollapse
* @type {?}
*/
NgModelGroup.ctorParameters;
/** @type {?} */
NgModelGroup.propDecorators;
/** @type {?} */
NgModelGroup.prototype.name;
}
//# sourceMappingURL=ng_model_group.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"modelGroupProvider":{"provide":{"__symbolic":"reference","module":"./control_container","name":"ControlContainer"},"useExisting":{"__symbolic":"reference","name":"NgModelGroup"}},"NgModelGroup":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[ngModelGroup]","providers":[{"__symbolic":"reference","name":"modelGroupProvider"}],"exportAs":"ngModelGroup"}]}],"members":{"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["ngModelGroup"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf"}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../validators","name":"NG_VALIDATORS"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../validators","name":"NG_ASYNC_VALIDATORS"}]}]],"parameters":[{"__symbolic":"reference","module":"./control_container","name":"ControlContainer"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]}]}],"_checkParentType":[{"__symbolic":"method"}]}}}}
{"__symbolic":"module","version":2,"metadata":{"modelGroupProvider":{"provide":{"__symbolic":"reference","module":"./control_container","name":"ControlContainer"},"useExisting":{"__symbolic":"reference","name":"NgModelGroup"}},"NgModelGroup":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[ngModelGroup]","providers":[{"__symbolic":"reference","name":"modelGroupProvider"}],"exportAs":"ngModelGroup"}]}],"members":{"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["ngModelGroup"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf"}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../validators","name":"NG_VALIDATORS"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../validators","name":"NG_ASYNC_VALIDATORS"}]}]],"parameters":[{"__symbolic":"reference","module":"./control_container","name":"ControlContainer"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]}]}],"_checkParentType":[{"__symbolic":"method"}]}}}}

@@ -25,3 +25,3 @@ /**

import { TemplateDrivenErrors } from './template_driven_errors';
export var formControlBinding = {
export var /** @type {?} */ formControlBinding = {
provide: NgControl,

@@ -47,63 +47,67 @@ useExisting: forwardRef(function () { return NgModel; })

*/
var resolvedPromise = Promise.resolve(null);
var /** @type {?} */ resolvedPromise = Promise.resolve(null);
/**
* @whatItDoes Creates a {@link FormControl} instance from a domain model and binds it
* to a form control element.
*
* The {@link FormControl} instance will track the value, user interaction, and
* validation status of the control and keep the view synced with the model. If used
* within a parent form, the directive will also register itself with the form as a child
* control.
*
* @howToUse
*
* This directive can be used by itself or as part of a larger form. All you need is the
* `ngModel` selector to activate it.
*
* It accepts a domain model as an optional {@link @Input}. If you have a one-way binding
* to `ngModel` with `[]` syntax, changing the value of the domain model in the component
* class will set the value in the view. If you have a two-way binding with `[()]` syntax
* (also known as 'banana-box syntax'), the value in the UI will always be synced back to
* the domain model in your class as well.
*
* If you wish to inspect the properties of the associated {@link FormControl} (like
* validity state), you can also export the directive into a local template variable using
* `ngModel` as the key (ex: `#myVar="ngModel"`). You can then access the control using the
* directive's `control` property, but most properties you'll need (like `valid` and `dirty`)
* will fall through to the control anyway, so you can access them directly. You can see a
* full list of properties directly available in {@link AbstractControlDirective}.
*
* The following is an example of a simple standalone control using `ngModel`:
*
* {@example forms/ts/simpleNgModel/simple_ng_model_example.ts region='Component'}
*
* When using the `ngModel` within `<form>` tags, you'll also need to supply a `name` attribute
* so that the control can be registered with the parent form under that name.
*
* It's worth noting that in the context of a parent form, you often can skip one-way or
* two-way binding because the parent form will sync the value for you. You can access
* its properties by exporting it into a local template variable using `ngForm` (ex:
* `#f="ngForm"`). Then you can pass it where it needs to go on submit.
*
* If you do need to populate initial values into your form, using a one-way binding for
* `ngModel` tends to be sufficient as long as you use the exported form's value rather
* than the domain model's value on submit.
*
* Take a look at an example of using `ngModel` within a form:
*
* {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}
*
* To see `ngModel` examples with different form control types, see:
*
* * Radio buttons: {@link RadioControlValueAccessor}
* * Selects: {@link SelectControlValueAccessor}
*
* **npm package**: `@angular/forms`
*
* **NgModule**: `FormsModule`
*
* @stable
* to a form control element.
* *
* The {@link FormControl} instance will track the value, user interaction, and
* validation status of the control and keep the view synced with the model. If used
* within a parent form, the directive will also register itself with the form as a child
* control.
* *
* *
* This directive can be used by itself or as part of a larger form. All you need is the
* `ngModel` selector to activate it.
* *
* It accepts a domain model as an optional {@link @Input}. If you have a one-way binding
* to `ngModel` with `[]` syntax, changing the value of the domain model in the component
* class will set the value in the view. If you have a two-way binding with `[()]` syntax
* (also known as 'banana-box syntax'), the value in the UI will always be synced back to
* the domain model in your class as well.
* *
* If you wish to inspect the properties of the associated {@link FormControl} (like
* validity state), you can also export the directive into a local template variable using
* `ngModel` as the key (ex: `#myVar="ngModel"`). You can then access the control using the
* directive's `control` property, but most properties you'll need (like `valid` and `dirty`)
* will fall through to the control anyway, so you can access them directly. You can see a
* full list of properties directly available in {@link AbstractControlDirective}.
* *
* The following is an example of a simple standalone control using `ngModel`:
* *
* {@example forms/ts/simpleNgModel/simple_ng_model_example.ts region='Component'}
* *
* When using the `ngModel` within `<form>` tags, you'll also need to supply a `name` attribute
* so that the control can be registered with the parent form under that name.
* *
* It's worth noting that in the context of a parent form, you often can skip one-way or
* two-way binding because the parent form will sync the value for you. You can access
* its properties by exporting it into a local template variable using `ngForm` (ex:
* `#f="ngForm"`). Then you can pass it where it needs to go on submit.
* *
* If you do need to populate initial values into your form, using a one-way binding for
* `ngModel` tends to be sufficient as long as you use the exported form's value rather
* than the domain model's value on submit.
* *
* Take a look at an example of using `ngModel` within a form:
* *
* {@example forms/ts/simpleForm/simple_form_example.ts region='Component'}
* *
* To see `ngModel` examples with different form control types, see:
* *
* * Radio buttons: {@link RadioControlValueAccessor}
* * Selects: {@link SelectControlValueAccessor}
* *
* **npm package**: `@angular/forms`
* *
* **NgModule**: `FormsModule`
* *
* @stable
*/
export var NgModel = (function (_super) {
__extends(NgModel, _super);
/**
* @param {?} parent
* @param {?} validators
* @param {?} asyncValidators
* @param {?} valueAccessors
*/
function NgModel(parent, validators, asyncValidators, valueAccessors) {

@@ -121,2 +125,6 @@ _super.call(this);

}
/**
* @param {?} changes
* @return {?}
*/
NgModel.prototype.ngOnChanges = function (changes) {

@@ -134,4 +142,10 @@ this._checkForErrors();

};
/**
* @return {?}
*/
NgModel.prototype.ngOnDestroy = function () { this.formDirective && this.formDirective.removeControl(this); };
Object.defineProperty(NgModel.prototype, "control", {
/**
* @return {?}
*/
get: function () { return this._control; },

@@ -142,2 +156,5 @@ enumerable: true,

Object.defineProperty(NgModel.prototype, "path", {
/**
* @return {?}
*/
get: function () {

@@ -150,2 +167,5 @@ return this._parent ? controlPath(this.name, this._parent) : [this.name];

Object.defineProperty(NgModel.prototype, "formDirective", {
/**
* @return {?}
*/
get: function () { return this._parent ? this._parent.formDirective : null; },

@@ -156,2 +176,5 @@ enumerable: true,

Object.defineProperty(NgModel.prototype, "validator", {
/**
* @return {?}
*/
get: function () { return composeValidators(this._rawValidators); },

@@ -162,2 +185,5 @@ enumerable: true,

Object.defineProperty(NgModel.prototype, "asyncValidator", {
/**
* @return {?}
*/
get: function () {

@@ -169,2 +195,6 @@ return composeAsyncValidators(this._rawAsyncValidators);

});
/**
* @param {?} newValue
* @return {?}
*/
NgModel.prototype.viewToModelUpdate = function (newValue) {

@@ -174,2 +204,5 @@ this.viewModel = newValue;

};
/**
* @return {?}
*/
NgModel.prototype._setUpControl = function () {

@@ -180,5 +213,11 @@ this._isStandalone() ? this._setUpStandalone() :

};
/**
* @return {?}
*/
NgModel.prototype._isStandalone = function () {
return !this._parent || (this.options && this.options.standalone);
};
/**
* @return {?}
*/
NgModel.prototype._setUpStandalone = function () {

@@ -188,2 +227,5 @@ setUpControl(this._control, this);

};
/**
* @return {?}
*/
NgModel.prototype._checkForErrors = function () {

@@ -195,2 +237,5 @@ if (!this._isStandalone()) {

};
/**
* @return {?}
*/
NgModel.prototype._checkParentType = function () {

@@ -205,2 +250,5 @@ if (!(this._parent instanceof NgModelGroup) &&

};
/**
* @return {?}
*/
NgModel.prototype._checkName = function () {

@@ -213,2 +261,6 @@ if (this.options && this.options.name)

};
/**
* @param {?} value
* @return {?}
*/
NgModel.prototype._updateValue = function (value) {

@@ -218,6 +270,10 @@ var _this = this;

};
/**
* @param {?} changes
* @return {?}
*/
NgModel.prototype._updateDisabled = function (changes) {
var _this = this;
var disabledValue = changes['isDisabled'].currentValue;
var isDisabled = disabledValue === '' || (disabledValue && disabledValue !== 'false');
var /** @type {?} */ disabledValue = changes['isDisabled'].currentValue;
var /** @type {?} */ isDisabled = disabledValue === '' || (disabledValue && disabledValue !== 'false');
resolvedPromise.then(function () {

@@ -240,3 +296,3 @@ if (isDisabled && !_this.control.disabled) {

/** @nocollapse */
NgModel.ctorParameters = [
NgModel.ctorParameters = function () { return [
{ type: ControlContainer, decorators: [{ type: Optional }, { type: Host },] },

@@ -246,3 +302,3 @@ { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS,] },] },

{ type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALUE_ACCESSOR,] },] },
];
]; };
NgModel.propDecorators = {

@@ -257,2 +313,29 @@ 'name': [{ type: Input },],

}(NgControl));
function NgModel_tsickle_Closure_declarations() {
/** @type {?} */
NgModel.decorators;
/**
* @nocollapse
* @type {?}
*/
NgModel.ctorParameters;
/** @type {?} */
NgModel.propDecorators;
/** @type {?} */
NgModel.prototype._control;
/** @type {?} */
NgModel.prototype._registered;
/** @type {?} */
NgModel.prototype.viewModel;
/** @type {?} */
NgModel.prototype.name;
/** @type {?} */
NgModel.prototype.isDisabled;
/** @type {?} */
NgModel.prototype.model;
/** @type {?} */
NgModel.prototype.options;
/** @type {?} */
NgModel.prototype.update;
}
//# sourceMappingURL=ng_model.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"formControlBinding":{"provide":{"__symbolic":"reference","module":"./ng_control","name":"NgControl"},"useExisting":{"__symbolic":"reference","name":"NgModel"}},"NgModel":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[ngModel]:not([formControlName]):not([formControl])","providers":[{"__symbolic":"reference","name":"formControlBinding"}],"exportAs":"ngModel"}]}],"members":{"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["disabled"]}]}],"model":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["ngModel"]}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["ngModelOptions"]}]}],"update":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["ngModelChange"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host"}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../validators","name":"NG_VALIDATORS"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../validators","name":"NG_ASYNC_VALIDATORS"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"./control_value_accessor","name":"NG_VALUE_ACCESSOR"}]}]],"parameters":[{"__symbolic":"reference","module":"./control_container","name":"ControlContainer"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"error","message":"Expression form not supported","line":128,"character":86}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"error","message":"Expression form not supported","line":128,"character":86}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","module":"./control_value_accessor","name":"ControlValueAccessor"}]}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"viewToModelUpdate":[{"__symbolic":"method"}],"_setUpControl":[{"__symbolic":"method"}],"_isStandalone":[{"__symbolic":"method"}],"_setUpStandalone":[{"__symbolic":"method"}],"_checkForErrors":[{"__symbolic":"method"}],"_checkParentType":[{"__symbolic":"method"}],"_checkName":[{"__symbolic":"method"}],"_updateValue":[{"__symbolic":"method"}],"_updateDisabled":[{"__symbolic":"method"}]}}}}
{"__symbolic":"module","version":2,"metadata":{"formControlBinding":{"provide":{"__symbolic":"reference","module":"./ng_control","name":"NgControl"},"useExisting":{"__symbolic":"reference","name":"NgModel"}},"NgModel":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[ngModel]:not([formControlName]):not([formControl])","providers":[{"__symbolic":"reference","name":"formControlBinding"}],"exportAs":"ngModel"}]}],"members":{"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"isDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["disabled"]}]}],"model":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["ngModel"]}]}],"options":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["ngModelOptions"]}]}],"update":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["ngModelChange"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host"}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../validators","name":"NG_VALIDATORS"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../validators","name":"NG_ASYNC_VALIDATORS"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"./control_value_accessor","name":"NG_VALUE_ACCESSOR"}]}]],"parameters":[{"__symbolic":"reference","module":"./control_container","name":"ControlContainer"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"error","message":"Expression form not supported","line":128,"character":86}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"error","message":"Expression form not supported","line":128,"character":86}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","module":"./control_value_accessor","name":"ControlValueAccessor"}]}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"viewToModelUpdate":[{"__symbolic":"method"}],"_setUpControl":[{"__symbolic":"method"}],"_isStandalone":[{"__symbolic":"method"}],"_setUpStandalone":[{"__symbolic":"method"}],"_checkForErrors":[{"__symbolic":"method"}],"_checkParentType":[{"__symbolic":"method"}],"_checkName":[{"__symbolic":"method"}],"_updateValue":[{"__symbolic":"method"}],"_updateDisabled":[{"__symbolic":"method"}]}}}}

@@ -8,18 +8,26 @@ /**

*/
/**
* @param {?} validator
* @return {?}
*/
export function normalizeValidator(validator) {
if (validator.validate) {
return function (c) { return validator.validate(c); };
if (((validator)).validate) {
return function (c) { return ((validator)).validate(c); };
}
else {
return validator;
return (validator);
}
}
/**
* @param {?} validator
* @return {?}
*/
export function normalizeAsyncValidator(validator) {
if (validator.validate) {
return function (c) { return validator.validate(c); };
if (((validator)).validate) {
return function (c) { return ((validator)).validate(c); };
}
else {
return validator;
return (validator);
}
}
//# sourceMappingURL=normalize_validator.js.map

@@ -10,3 +10,3 @@ /**

import { NG_VALUE_ACCESSOR } from './control_value_accessor';
export var NUMBER_VALUE_ACCESSOR = {
export var /** @type {?} */ NUMBER_VALUE_ACCESSOR = {
provide: NG_VALUE_ACCESSOR,

@@ -17,11 +17,15 @@ useExisting: forwardRef(function () { return NumberValueAccessor; }),

/**
* The accessor for writing a number value and listening to changes that is used by the
* {@link NgModel}, {@link FormControlDirective}, and {@link FormControlName} directives.
*
* ### Example
* ```
* <input type="number" [(ngModel)]="age">
* ```
* The accessor for writing a number value and listening to changes that is used by the
* {@link NgModel}, {@link FormControlDirective}, and {@link FormControlName} directives.
* *
* ### Example
* ```
* <input type="number" [(ngModel)]="age">
* ```
*/
export var NumberValueAccessor = (function () {
/**
* @param {?} _renderer
* @param {?} _elementRef
*/
function NumberValueAccessor(_renderer, _elementRef) {

@@ -33,11 +37,27 @@ this._renderer = _renderer;

}
/**
* @param {?} value
* @return {?}
*/
NumberValueAccessor.prototype.writeValue = function (value) {
// The value needs to be normalized for IE9, otherwise it is set to 'null' when null
var normalizedValue = value == null ? '' : value;
var /** @type {?} */ normalizedValue = value == null ? '' : value;
this._renderer.setElementProperty(this._elementRef.nativeElement, 'value', normalizedValue);
};
/**
* @param {?} fn
* @return {?}
*/
NumberValueAccessor.prototype.registerOnChange = function (fn) {
this.onChange = function (value) { fn(value == '' ? null : parseFloat(value)); };
};
/**
* @param {?} fn
* @return {?}
*/
NumberValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; };
/**
* @param {?} isDisabled
* @return {?}
*/
NumberValueAccessor.prototype.setDisabledState = function (isDisabled) {

@@ -58,8 +78,25 @@ this._renderer.setElementProperty(this._elementRef.nativeElement, 'disabled', isDisabled);

/** @nocollapse */
NumberValueAccessor.ctorParameters = [
NumberValueAccessor.ctorParameters = function () { return [
{ type: Renderer, },
{ type: ElementRef, },
];
]; };
return NumberValueAccessor;
}());
function NumberValueAccessor_tsickle_Closure_declarations() {
/** @type {?} */
NumberValueAccessor.decorators;
/**
* @nocollapse
* @type {?}
*/
NumberValueAccessor.ctorParameters;
/** @type {?} */
NumberValueAccessor.prototype.onChange;
/** @type {?} */
NumberValueAccessor.prototype.onTouched;
/** @type {?} */
NumberValueAccessor.prototype._renderer;
/** @type {?} */
NumberValueAccessor.prototype._elementRef;
}
//# sourceMappingURL=number_value_accessor.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"NUMBER_VALUE_ACCESSOR":{"provide":{"__symbolic":"reference","module":"./control_value_accessor","name":"NG_VALUE_ACCESSOR"},"useExisting":{"__symbolic":"reference","name":"NumberValueAccessor"},"multi":true},"NumberValueAccessor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]","host":{"(change)":"onChange($event.target.value)","(input)":"onChange($event.target.value)","(blur)":"onTouched()"},"providers":[{"__symbolic":"reference","name":"NUMBER_VALUE_ACCESSOR"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}]}}}}
{"__symbolic":"module","version":2,"metadata":{"NUMBER_VALUE_ACCESSOR":{"provide":{"__symbolic":"reference","module":"./control_value_accessor","name":"NG_VALUE_ACCESSOR"},"useExisting":{"__symbolic":"reference","name":"NumberValueAccessor"},"multi":true},"NumberValueAccessor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]","host":{"(change)":"onChange($event.target.value)","(input)":"onChange($event.target.value)","(blur)":"onTouched()"},"providers":[{"__symbolic":"reference","name":"NUMBER_VALUE_ACCESSOR"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}]}}}}

@@ -11,3 +11,3 @@ /**

import { NgControl } from './ng_control';
export var RADIO_VALUE_ACCESSOR = {
export var /** @type {?} */ RADIO_VALUE_ACCESSOR = {
provide: NG_VALUE_ACCESSOR,

@@ -18,3 +18,3 @@ useExisting: forwardRef(function () { return RadioControlValueAccessor; }),

/**
* Internal class used by Angular to uncheck radio buttons with the matching name.
* Internal class used by Angular to uncheck radio buttons with the matching name.
*/

@@ -25,7 +25,16 @@ export var RadioControlRegistry = (function () {

}
/**
* @param {?} control
* @param {?} accessor
* @return {?}
*/
RadioControlRegistry.prototype.add = function (control, accessor) {
this._accessors.push([control, accessor]);
};
/**
* @param {?} accessor
* @return {?}
*/
RadioControlRegistry.prototype.remove = function (accessor) {
for (var i = this._accessors.length - 1; i >= 0; --i) {
for (var /** @type {?} */ i = this._accessors.length - 1; i >= 0; --i) {
if (this._accessors[i][1] === accessor) {

@@ -37,2 +46,6 @@ this._accessors.splice(i, 1);

};
/**
* @param {?} accessor
* @return {?}
*/
RadioControlRegistry.prototype.select = function (accessor) {

@@ -46,2 +59,7 @@ var _this = this;

};
/**
* @param {?} controlPair
* @param {?} accessor
* @return {?}
*/
RadioControlRegistry.prototype._isSameGroup = function (controlPair, accessor) {

@@ -57,35 +75,50 @@ if (!controlPair[0].control)

/** @nocollapse */
RadioControlRegistry.ctorParameters = [];
RadioControlRegistry.ctorParameters = function () { return []; };
return RadioControlRegistry;
}());
function RadioControlRegistry_tsickle_Closure_declarations() {
/** @type {?} */
RadioControlRegistry.decorators;
/**
* @nocollapse
* @type {?}
*/
RadioControlRegistry.ctorParameters;
/** @type {?} */
RadioControlRegistry.prototype._accessors;
}
/**
* @whatItDoes Writes radio control values and listens to radio control changes.
*
* Used by {@link NgModel}, {@link FormControlDirective}, and {@link FormControlName}
* to keep the view synced with the {@link FormControl} model.
*
* @howToUse
*
* If you have imported the {@link FormsModule} or the {@link ReactiveFormsModule}, this
* value accessor will be active on any radio control that has a form directive. You do
* **not** need to add a special selector to activate it.
*
* ### How to use radio buttons with form directives
*
* To use radio buttons in a template-driven form, you'll want to ensure that radio buttons
* in the same group have the same `name` attribute. Radio buttons with different `name`
* attributes do not affect each other.
*
* {@example forms/ts/radioButtons/radio_button_example.ts region='TemplateDriven'}
*
* When using radio buttons in a reactive form, radio buttons in the same group should have the
* same `formControlName`. You can also add a `name` attribute, but it's optional.
*
* {@example forms/ts/reactiveRadioButtons/reactive_radio_button_example.ts region='Reactive'}
*
* * **npm package**: `@angular/forms`
*
* @stable
* *
* Used by {@link NgModel}, {@link FormControlDirective}, and {@link FormControlName}
* to keep the view synced with the {@link FormControl} model.
* *
* *
* If you have imported the {@link FormsModule} or the {@link ReactiveFormsModule}, this
* value accessor will be active on any radio control that has a form directive. You do
* **not** need to add a special selector to activate it.
* *
* ### How to use radio buttons with form directives
* *
* To use radio buttons in a template-driven form, you'll want to ensure that radio buttons
* in the same group have the same `name` attribute. Radio buttons with different `name`
* attributes do not affect each other.
* *
* {@example forms/ts/radioButtons/radio_button_example.ts region='TemplateDriven'}
* *
* When using radio buttons in a reactive form, radio buttons in the same group should have the
* same `formControlName`. You can also add a `name` attribute, but it's optional.
* *
* {@example forms/ts/reactiveRadioButtons/reactive_radio_button_example.ts region='Reactive'}
* *
* * **npm package**: `@angular/forms`
* *
* @stable
*/
export var RadioControlValueAccessor = (function () {
/**
* @param {?} _renderer
* @param {?} _elementRef
* @param {?} _registry
* @param {?} _injector
*/
function RadioControlValueAccessor(_renderer, _elementRef, _registry, _injector) {

@@ -99,2 +132,5 @@ this._renderer = _renderer;

}
/**
* @return {?}
*/
RadioControlValueAccessor.prototype.ngOnInit = function () {

@@ -105,3 +141,10 @@ this._control = this._injector.get(NgControl);

};
/**
* @return {?}
*/
RadioControlValueAccessor.prototype.ngOnDestroy = function () { this._registry.remove(this); };
/**
* @param {?} value
* @return {?}
*/
RadioControlValueAccessor.prototype.writeValue = function (value) {

@@ -111,2 +154,6 @@ this._state = value === this.value;

};
/**
* @param {?} fn
* @return {?}
*/
RadioControlValueAccessor.prototype.registerOnChange = function (fn) {

@@ -120,7 +167,22 @@ var _this = this;

};
/**
* @param {?} value
* @return {?}
*/
RadioControlValueAccessor.prototype.fireUncheck = function (value) { this.writeValue(value); };
/**
* @param {?} fn
* @return {?}
*/
RadioControlValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; };
/**
* @param {?} isDisabled
* @return {?}
*/
RadioControlValueAccessor.prototype.setDisabledState = function (isDisabled) {
this._renderer.setElementProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
};
/**
* @return {?}
*/
RadioControlValueAccessor.prototype._checkName = function () {

@@ -133,2 +195,5 @@ if (this.name && this.formControlName && this.name !== this.formControlName) {

};
/**
* @return {?}
*/
RadioControlValueAccessor.prototype._throwNameError = function () {

@@ -145,3 +210,3 @@ throw new Error("\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: <input type=\"radio\" formControlName=\"food\" name=\"food\">\n ");

/** @nocollapse */
RadioControlValueAccessor.ctorParameters = [
RadioControlValueAccessor.ctorParameters = function () { return [
{ type: Renderer, },

@@ -151,3 +216,3 @@ { type: ElementRef, },

{ type: Injector, },
];
]; };
RadioControlValueAccessor.propDecorators = {

@@ -160,2 +225,37 @@ 'name': [{ type: Input },],

}());
function RadioControlValueAccessor_tsickle_Closure_declarations() {
/** @type {?} */
RadioControlValueAccessor.decorators;
/**
* @nocollapse
* @type {?}
*/
RadioControlValueAccessor.ctorParameters;
/** @type {?} */
RadioControlValueAccessor.propDecorators;
/** @type {?} */
RadioControlValueAccessor.prototype._state;
/** @type {?} */
RadioControlValueAccessor.prototype._control;
/** @type {?} */
RadioControlValueAccessor.prototype._fn;
/** @type {?} */
RadioControlValueAccessor.prototype.onChange;
/** @type {?} */
RadioControlValueAccessor.prototype.onTouched;
/** @type {?} */
RadioControlValueAccessor.prototype.name;
/** @type {?} */
RadioControlValueAccessor.prototype.formControlName;
/** @type {?} */
RadioControlValueAccessor.prototype.value;
/** @type {?} */
RadioControlValueAccessor.prototype._renderer;
/** @type {?} */
RadioControlValueAccessor.prototype._elementRef;
/** @type {?} */
RadioControlValueAccessor.prototype._registry;
/** @type {?} */
RadioControlValueAccessor.prototype._injector;
}
//# sourceMappingURL=radio_control_value_accessor.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"RADIO_VALUE_ACCESSOR":{"provide":{"__symbolic":"reference","module":"./control_value_accessor","name":"NG_VALUE_ACCESSOR"},"useExisting":{"__symbolic":"reference","name":"RadioControlValueAccessor"},"multi":true},"RadioControlRegistry":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"add":[{"__symbolic":"method"}],"remove":[{"__symbolic":"method"}],"select":[{"__symbolic":"method"}],"_isSameGroup":[{"__symbolic":"method"}]}},"RadioControlValueAccessor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]","host":{"(change)":"onChange()","(blur)":"onTouched()"},"providers":[{"__symbolic":"reference","name":"RADIO_VALUE_ACCESSOR"}]}]}],"members":{"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"formControlName":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","name":"RadioControlRegistry"},{"__symbolic":"reference","module":"@angular/core","name":"Injector"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"fireUncheck":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}],"_checkName":[{"__symbolic":"method"}],"_throwNameError":[{"__symbolic":"method"}]}}}}
{"__symbolic":"module","version":2,"metadata":{"RADIO_VALUE_ACCESSOR":{"provide":{"__symbolic":"reference","module":"./control_value_accessor","name":"NG_VALUE_ACCESSOR"},"useExisting":{"__symbolic":"reference","name":"RadioControlValueAccessor"},"multi":true},"RadioControlRegistry":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"add":[{"__symbolic":"method"}],"remove":[{"__symbolic":"method"}],"select":[{"__symbolic":"method"}],"_isSameGroup":[{"__symbolic":"method"}]}},"RadioControlValueAccessor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]","host":{"(change)":"onChange()","(blur)":"onTouched()"},"providers":[{"__symbolic":"reference","name":"RADIO_VALUE_ACCESSOR"}]}]}],"members":{"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"formControlName":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","name":"RadioControlRegistry"},{"__symbolic":"reference","module":"@angular/core","name":"Injector"}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"fireUncheck":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}],"_checkName":[{"__symbolic":"method"}],"_throwNameError":[{"__symbolic":"method"}]}}}}

@@ -10,3 +10,3 @@ /**

import { NG_VALUE_ACCESSOR } from './control_value_accessor';
export var RANGE_VALUE_ACCESSOR = {
export var /** @type {?} */ RANGE_VALUE_ACCESSOR = {
provide: NG_VALUE_ACCESSOR,

@@ -17,11 +17,15 @@ useExisting: forwardRef(function () { return RangeValueAccessor; }),

/**
* The accessor for writing a range value and listening to changes that is used by the
* {@link NgModel}, {@link FormControlDirective}, and {@link FormControlName} directives.
*
* ### Example
* ```
* <input type="range" [(ngModel)]="age" >
* ```
* The accessor for writing a range value and listening to changes that is used by the
* {@link NgModel}, {@link FormControlDirective}, and {@link FormControlName} directives.
* *
* ### Example
* ```
* <input type="range" [(ngModel)]="age" >
* ```
*/
export var RangeValueAccessor = (function () {
/**
* @param {?} _renderer
* @param {?} _elementRef
*/
function RangeValueAccessor(_renderer, _elementRef) {

@@ -33,9 +37,25 @@ this._renderer = _renderer;

}
/**
* @param {?} value
* @return {?}
*/
RangeValueAccessor.prototype.writeValue = function (value) {
this._renderer.setElementProperty(this._elementRef.nativeElement, 'value', parseFloat(value));
};
/**
* @param {?} fn
* @return {?}
*/
RangeValueAccessor.prototype.registerOnChange = function (fn) {
this.onChange = function (value) { fn(value == '' ? null : parseFloat(value)); };
};
/**
* @param {?} fn
* @return {?}
*/
RangeValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; };
/**
* @param {?} isDisabled
* @return {?}
*/
RangeValueAccessor.prototype.setDisabledState = function (isDisabled) {

@@ -56,8 +76,25 @@ this._renderer.setElementProperty(this._elementRef.nativeElement, 'disabled', isDisabled);

/** @nocollapse */
RangeValueAccessor.ctorParameters = [
RangeValueAccessor.ctorParameters = function () { return [
{ type: Renderer, },
{ type: ElementRef, },
];
]; };
return RangeValueAccessor;
}());
function RangeValueAccessor_tsickle_Closure_declarations() {
/** @type {?} */
RangeValueAccessor.decorators;
/**
* @nocollapse
* @type {?}
*/
RangeValueAccessor.ctorParameters;
/** @type {?} */
RangeValueAccessor.prototype.onChange;
/** @type {?} */
RangeValueAccessor.prototype.onTouched;
/** @type {?} */
RangeValueAccessor.prototype._renderer;
/** @type {?} */
RangeValueAccessor.prototype._elementRef;
}
//# sourceMappingURL=range_value_accessor.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"RANGE_VALUE_ACCESSOR":{"provide":{"__symbolic":"reference","module":"./control_value_accessor","name":"NG_VALUE_ACCESSOR"},"useExisting":{"__symbolic":"reference","name":"RangeValueAccessor"},"multi":true},"RangeValueAccessor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]","host":{"(change)":"onChange($event.target.value)","(input)":"onChange($event.target.value)","(blur)":"onTouched()"},"providers":[{"__symbolic":"reference","name":"RANGE_VALUE_ACCESSOR"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}]}}}}
{"__symbolic":"module","version":2,"metadata":{"RANGE_VALUE_ACCESSOR":{"provide":{"__symbolic":"reference","module":"./control_value_accessor","name":"NG_VALUE_ACCESSOR"},"useExisting":{"__symbolic":"reference","name":"RangeValueAccessor"},"multi":true},"RangeValueAccessor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]","host":{"(change)":"onChange($event.target.value)","(input)":"onChange($event.target.value)","(blur)":"onTouched()"},"providers":[{"__symbolic":"reference","name":"RANGE_VALUE_ACCESSOR"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}]}}}}

@@ -20,3 +20,3 @@ /**

import { composeAsyncValidators, composeValidators, isPropertyUpdated, selectValueAccessor, setUpControl } from '../shared';
export var formControlBinding = {
export var /** @type {?} */ formControlBinding = {
provide: NgControl,

@@ -26,45 +26,48 @@ useExisting: forwardRef(function () { return FormControlDirective; })

/**
* @whatItDoes Syncs a standalone {@link FormControl} instance to a form control element.
*
* In other words, this directive ensures that any values written to the {@link FormControl}
* instance programmatically will be written to the DOM element (model -> view). Conversely,
* any values written to the DOM element through user input will be reflected in the
* {@link FormControl} instance (view -> model).
*
* @howToUse
*
* Use this directive if you'd like to create and manage a {@link FormControl} instance directly.
* Simply create a {@link FormControl}, save it to your component class, and pass it into the
* {@link FormControlDirective}.
*
* This directive is designed to be used as a standalone control. Unlike {@link FormControlName},
* it does not require that your {@link FormControl} instance be part of any parent
* {@link FormGroup}, and it won't be registered to any {@link FormGroupDirective} that
* exists above it.
*
* **Get the value**: the `value` property is always synced and available on the
* {@link FormControl} instance. See a full list of available properties in
* {@link AbstractControl}.
*
* **Set the value**: You can pass in an initial value when instantiating the {@link FormControl},
* or you can set it programmatically later using {@link AbstractControl.setValue} or
* {@link AbstractControl.patchValue}.
*
* **Listen to value**: If you want to listen to changes in the value of the control, you can
* subscribe to the {@link AbstractControl.valueChanges} event. You can also listen to
* {@link AbstractControl.statusChanges} to be notified when the validation status is
* re-calculated.
*
* ### Example
*
* {@example forms/ts/simpleFormControl/simple_form_control_example.ts region='Component'}
*
* * **npm package**: `@angular/forms`
*
* * **NgModule**: `ReactiveFormsModule`
*
* @stable
* *
* In other words, this directive ensures that any values written to the {@link FormControl}
* instance programmatically will be written to the DOM element (model -> view). Conversely,
* any values written to the DOM element through user input will be reflected in the
* {@link FormControl} instance (view -> model).
* *
* *
* Use this directive if you'd like to create and manage a {@link FormControl} instance directly.
* Simply create a {@link FormControl}, save it to your component class, and pass it into the
* {@link FormControlDirective}.
* *
* This directive is designed to be used as a standalone control. Unlike {@link FormControlName},
* it does not require that your {@link FormControl} instance be part of any parent
* {@link FormGroup}, and it won't be registered to any {@link FormGroupDirective} that
* exists above it.
* *
* **Get the value**: the `value` property is always synced and available on the
* {@link FormControl} instance. See a full list of available properties in
* {@link AbstractControl}.
* *
* **Set the value**: You can pass in an initial value when instantiating the {@link FormControl},
* or you can set it programmatically later using {@link AbstractControl.setValue} or
* {@link AbstractControl.patchValue}.
* *
* **Listen to value**: If you want to listen to changes in the value of the control, you can
* subscribe to the {@link AbstractControl.valueChanges} event. You can also listen to
* {@link AbstractControl.statusChanges} to be notified when the validation status is
* re-calculated.
* *
* ### Example
* *
* {@example forms/ts/simpleFormControl/simple_form_control_example.ts region='Component'}
* *
* * **npm package**: `@angular/forms`
* *
* * **NgModule**: `ReactiveFormsModule`
* *
* @stable
*/
export var FormControlDirective = (function (_super) {
__extends(FormControlDirective, _super);
/**
* @param {?} validators
* @param {?} asyncValidators
* @param {?} valueAccessors
*/
function FormControlDirective(validators, asyncValidators, valueAccessors) {

@@ -78,2 +81,6 @@ _super.call(this);

Object.defineProperty(FormControlDirective.prototype, "isDisabled", {
/**
* @param {?} isDisabled
* @return {?}
*/
set: function (isDisabled) { ReactiveErrors.disabledAttrWarning(); },

@@ -83,2 +90,6 @@ enumerable: true,

});
/**
* @param {?} changes
* @return {?}
*/
FormControlDirective.prototype.ngOnChanges = function (changes) {

@@ -98,2 +109,5 @@ if (this._isControlChanged(changes)) {

Object.defineProperty(FormControlDirective.prototype, "path", {
/**
* @return {?}
*/
get: function () { return []; },

@@ -104,2 +118,5 @@ enumerable: true,

Object.defineProperty(FormControlDirective.prototype, "validator", {
/**
* @return {?}
*/
get: function () { return composeValidators(this._rawValidators); },

@@ -110,2 +127,5 @@ enumerable: true,

Object.defineProperty(FormControlDirective.prototype, "asyncValidator", {
/**
* @return {?}
*/
get: function () {

@@ -118,2 +138,5 @@ return composeAsyncValidators(this._rawAsyncValidators);

Object.defineProperty(FormControlDirective.prototype, "control", {
/**
* @return {?}
*/
get: function () { return this.form; },

@@ -123,2 +146,6 @@ enumerable: true,

});
/**
* @param {?} newValue
* @return {?}
*/
FormControlDirective.prototype.viewToModelUpdate = function (newValue) {

@@ -128,2 +155,6 @@ this.viewModel = newValue;

};
/**
* @param {?} changes
* @return {?}
*/
FormControlDirective.prototype._isControlChanged = function (changes) {

@@ -136,7 +167,7 @@ return changes.hasOwnProperty('form');

/** @nocollapse */
FormControlDirective.ctorParameters = [
FormControlDirective.ctorParameters = function () { return [
{ type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS,] },] },
{ type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS,] },] },
{ type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALUE_ACCESSOR,] },] },
];
]; };
FormControlDirective.propDecorators = {

@@ -150,2 +181,21 @@ 'form': [{ type: Input, args: ['formControl',] },],

}(NgControl));
function FormControlDirective_tsickle_Closure_declarations() {
/** @type {?} */
FormControlDirective.decorators;
/**
* @nocollapse
* @type {?}
*/
FormControlDirective.ctorParameters;
/** @type {?} */
FormControlDirective.propDecorators;
/** @type {?} */
FormControlDirective.prototype.viewModel;
/** @type {?} */
FormControlDirective.prototype.form;
/** @type {?} */
FormControlDirective.prototype.model;
/** @type {?} */
FormControlDirective.prototype.update;
}
//# sourceMappingURL=form_control_directive.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"formControlBinding":{"provide":{"__symbolic":"reference","module":"../ng_control","name":"NgControl"},"useExisting":{"__symbolic":"reference","name":"FormControlDirective"}},"FormControlDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[formControl]","providers":[{"__symbolic":"reference","name":"formControlBinding"}],"exportAs":"ngForm"}]}],"members":{"form":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["formControl"]}]}],"model":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["ngModel"]}]}],"update":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["ngModelChange"]}]}],"isDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["disabled"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../../validators","name":"NG_VALIDATORS"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../../validators","name":"NG_ASYNC_VALIDATORS"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../control_value_accessor","name":"NG_VALUE_ACCESSOR"}]}]],"parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"error","message":"Expression form not supported","line":79,"character":86}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"error","message":"Expression form not supported","line":79,"character":86}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","module":"../control_value_accessor","name":"ControlValueAccessor"}]}]}],"ngOnChanges":[{"__symbolic":"method"}],"viewToModelUpdate":[{"__symbolic":"method"}],"_isControlChanged":[{"__symbolic":"method"}]}}}}
{"__symbolic":"module","version":2,"metadata":{"formControlBinding":{"provide":{"__symbolic":"reference","module":"../ng_control","name":"NgControl"},"useExisting":{"__symbolic":"reference","name":"FormControlDirective"}},"FormControlDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[formControl]","providers":[{"__symbolic":"reference","name":"formControlBinding"}],"exportAs":"ngForm"}]}],"members":{"form":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["formControl"]}]}],"model":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["ngModel"]}]}],"update":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["ngModelChange"]}]}],"isDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["disabled"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../../validators","name":"NG_VALIDATORS"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../../validators","name":"NG_ASYNC_VALIDATORS"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../control_value_accessor","name":"NG_VALUE_ACCESSOR"}]}]],"parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"error","message":"Expression form not supported","line":79,"character":86}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"error","message":"Expression form not supported","line":79,"character":86}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","module":"../control_value_accessor","name":"ControlValueAccessor"}]}]}],"ngOnChanges":[{"__symbolic":"method"}],"viewToModelUpdate":[{"__symbolic":"method"}],"_isControlChanged":[{"__symbolic":"method"}]}}}}

@@ -24,3 +24,3 @@ /**

import { FormArrayName, FormGroupName } from './form_group_name';
export var controlNameBinding = {
export var /** @type {?} */ controlNameBinding = {
provide: NgControl,

@@ -30,54 +30,58 @@ useExisting: forwardRef(function () { return FormControlName; })

/**
* @whatItDoes Syncs a {@link FormControl} in an existing {@link FormGroup} to a form control
* element by name.
*
* In other words, this directive ensures that any values written to the {@link FormControl}
* instance programmatically will be written to the DOM element (model -> view). Conversely,
* any values written to the DOM element through user input will be reflected in the
* {@link FormControl} instance (view -> model).
*
* @howToUse
*
* This directive is designed to be used with a parent {@link FormGroupDirective} (selector:
* `[formGroup]`).
*
* It accepts the string name of the {@link FormControl} instance you want to
* link, and will look for a {@link FormControl} registered with that name in the
* closest {@link FormGroup} or {@link FormArray} above it.
*
* **Access the control**: You can access the {@link FormControl} associated with
* this directive by using the {@link AbstractControl.get} method.
* Ex: `this.form.get('first');`
*
* **Get value**: the `value` property is always synced and available on the {@link FormControl}.
* See a full list of available properties in {@link AbstractControl}.
*
* **Set value**: You can set an initial value for the control when instantiating the
* {@link FormControl}, or you can set it programmatically later using
* {@link AbstractControl.setValue} or {@link AbstractControl.patchValue}.
*
* **Listen to value**: If you want to listen to changes in the value of the control, you can
* subscribe to the {@link AbstractControl.valueChanges} event. You can also listen to
* {@link AbstractControl.statusChanges} to be notified when the validation status is
* re-calculated.
*
* ### Example
*
* In this example, we create form controls for first name and last name.
*
* {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}
*
* To see `formControlName` examples with different form control types, see:
*
* * Radio buttons: {@link RadioControlValueAccessor}
* * Selects: {@link SelectControlValueAccessor}
*
* **npm package**: `@angular/forms`
*
* **NgModule**: {@link ReactiveFormsModule}
*
* @stable
* element by name.
* *
* In other words, this directive ensures that any values written to the {@link FormControl}
* instance programmatically will be written to the DOM element (model -> view). Conversely,
* any values written to the DOM element through user input will be reflected in the
* {@link FormControl} instance (view -> model).
* *
* *
* This directive is designed to be used with a parent {@link FormGroupDirective} (selector:
* `[formGroup]`).
* *
* It accepts the string name of the {@link FormControl} instance you want to
* link, and will look for a {@link FormControl} registered with that name in the
* closest {@link FormGroup} or {@link FormArray} above it.
* *
* **Access the control**: You can access the {@link FormControl} associated with
* this directive by using the {@link AbstractControl.get} method.
* Ex: `this.form.get('first');`
* *
* **Get value**: the `value` property is always synced and available on the {@link FormControl}.
* See a full list of available properties in {@link AbstractControl}.
* *
* **Set value**: You can set an initial value for the control when instantiating the
* {@link FormControl}, or you can set it programmatically later using
* {@link AbstractControl.setValue} or {@link AbstractControl.patchValue}.
* *
* **Listen to value**: If you want to listen to changes in the value of the control, you can
* subscribe to the {@link AbstractControl.valueChanges} event. You can also listen to
* {@link AbstractControl.statusChanges} to be notified when the validation status is
* re-calculated.
* *
* ### Example
* *
* In this example, we create form controls for first name and last name.
* *
* {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}
* *
* To see `formControlName` examples with different form control types, see:
* *
* * Radio buttons: {@link RadioControlValueAccessor}
* * Selects: {@link SelectControlValueAccessor}
* *
* **npm package**: `@angular/forms`
* *
* **NgModule**: {@link ReactiveFormsModule}
* *
* @stable
*/
export var FormControlName = (function (_super) {
__extends(FormControlName, _super);
/**
* @param {?} parent
* @param {?} validators
* @param {?} asyncValidators
* @param {?} valueAccessors
*/
function FormControlName(parent, validators, asyncValidators, valueAccessors) {

@@ -93,2 +97,6 @@ _super.call(this);

Object.defineProperty(FormControlName.prototype, "isDisabled", {
/**
* @param {?} isDisabled
* @return {?}
*/
set: function (isDisabled) { ReactiveErrors.disabledAttrWarning(); },

@@ -98,2 +106,6 @@ enumerable: true,

});
/**
* @param {?} changes
* @return {?}
*/
FormControlName.prototype.ngOnChanges = function (changes) {

@@ -107,2 +119,5 @@ if (!this._added)

};
/**
* @return {?}
*/
FormControlName.prototype.ngOnDestroy = function () {

@@ -113,2 +128,6 @@ if (this.formDirective) {

};
/**
* @param {?} newValue
* @return {?}
*/
FormControlName.prototype.viewToModelUpdate = function (newValue) {

@@ -119,2 +138,5 @@ this.viewModel = newValue;

Object.defineProperty(FormControlName.prototype, "path", {
/**
* @return {?}
*/
get: function () { return controlPath(this.name, this._parent); },

@@ -125,2 +147,5 @@ enumerable: true,

Object.defineProperty(FormControlName.prototype, "formDirective", {
/**
* @return {?}
*/
get: function () { return this._parent ? this._parent.formDirective : null; },

@@ -131,2 +156,5 @@ enumerable: true,

Object.defineProperty(FormControlName.prototype, "validator", {
/**
* @return {?}
*/
get: function () { return composeValidators(this._rawValidators); },

@@ -137,2 +165,5 @@ enumerable: true,

Object.defineProperty(FormControlName.prototype, "asyncValidator", {
/**
* @return {?}
*/
get: function () {

@@ -145,2 +176,5 @@ return composeAsyncValidators(this._rawAsyncValidators);

Object.defineProperty(FormControlName.prototype, "control", {
/**
* @return {?}
*/
get: function () { return this._control; },

@@ -150,2 +184,5 @@ enumerable: true,

});
/**
* @return {?}
*/
FormControlName.prototype._checkParentType = function () {

@@ -161,2 +198,5 @@ if (!(this._parent instanceof FormGroupName) &&

};
/**
* @return {?}
*/
FormControlName.prototype._setUpControl = function () {

@@ -174,3 +214,3 @@ this._checkParentType();

/** @nocollapse */
FormControlName.ctorParameters = [
FormControlName.ctorParameters = function () { return [
{ type: ControlContainer, decorators: [{ type: Optional }, { type: Host }, { type: SkipSelf },] },

@@ -180,3 +220,3 @@ { type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS,] },] },

{ type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALUE_ACCESSOR,] },] },
];
]; };
FormControlName.propDecorators = {

@@ -190,2 +230,25 @@ 'name': [{ type: Input, args: ['formControlName',] },],

}(NgControl));
function FormControlName_tsickle_Closure_declarations() {
/** @type {?} */
FormControlName.decorators;
/**
* @nocollapse
* @type {?}
*/
FormControlName.ctorParameters;
/** @type {?} */
FormControlName.propDecorators;
/** @type {?} */
FormControlName.prototype._added;
/** @type {?} */
FormControlName.prototype.viewModel;
/** @type {?} */
FormControlName.prototype._control;
/** @type {?} */
FormControlName.prototype.name;
/** @type {?} */
FormControlName.prototype.model;
/** @type {?} */
FormControlName.prototype.update;
}
//# sourceMappingURL=form_control_name.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"controlNameBinding":{"provide":{"__symbolic":"reference","module":"../ng_control","name":"NgControl"},"useExisting":{"__symbolic":"reference","name":"FormControlName"}},"FormControlName":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[formControlName]","providers":[{"__symbolic":"reference","name":"controlNameBinding"}]}]}],"members":{"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["formControlName"]}]}],"model":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["ngModel"]}]}],"update":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["ngModelChange"]}]}],"isDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["disabled"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf"}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../../validators","name":"NG_VALIDATORS"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../../validators","name":"NG_ASYNC_VALIDATORS"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../control_value_accessor","name":"NG_VALUE_ACCESSOR"}]}]],"parameters":[{"__symbolic":"reference","module":"../control_container","name":"ControlContainer"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"error","message":"Expression form not supported","line":100,"character":16}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"error","message":"Expression form not supported","line":100,"character":16}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","module":"../control_value_accessor","name":"ControlValueAccessor"}]}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"viewToModelUpdate":[{"__symbolic":"method"}],"_checkParentType":[{"__symbolic":"method"}],"_setUpControl":[{"__symbolic":"method"}]}}}}
{"__symbolic":"module","version":2,"metadata":{"controlNameBinding":{"provide":{"__symbolic":"reference","module":"../ng_control","name":"NgControl"},"useExisting":{"__symbolic":"reference","name":"FormControlName"}},"FormControlName":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[formControlName]","providers":[{"__symbolic":"reference","name":"controlNameBinding"}]}]}],"members":{"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["formControlName"]}]}],"model":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["ngModel"]}]}],"update":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"},"arguments":["ngModelChange"]}]}],"isDisabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["disabled"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf"}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../../validators","name":"NG_VALIDATORS"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../../validators","name":"NG_ASYNC_VALIDATORS"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../control_value_accessor","name":"NG_VALUE_ACCESSOR"}]}]],"parameters":[{"__symbolic":"reference","module":"../control_container","name":"ControlContainer"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"error","message":"Expression form not supported","line":100,"character":16}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"error","message":"Expression form not supported","line":100,"character":16}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","module":"../control_value_accessor","name":"ControlValueAccessor"}]}]}],"ngOnChanges":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"viewToModelUpdate":[{"__symbolic":"method"}],"_checkParentType":[{"__symbolic":"method"}],"_setUpControl":[{"__symbolic":"method"}]}}}}

@@ -20,3 +20,3 @@ /**

import { cleanUpControl, composeAsyncValidators, composeValidators, setUpControl, setUpFormContainer } from '../shared';
export var formDirectiveProvider = {
export var /** @type {?} */ formDirectiveProvider = {
provide: ControlContainer,

@@ -26,38 +26,40 @@ useExisting: forwardRef(function () { return FormGroupDirective; })

/**
* @whatItDoes Binds an existing {@link FormGroup} to a DOM element.
*
* @howToUse
*
* This directive accepts an existing {@link FormGroup} instance. It will then use this
* {@link FormGroup} instance to match any child {@link FormControl}, {@link FormGroup},
* and {@link FormArray} instances to child {@link FormControlName}, {@link FormGroupName},
* and {@link FormArrayName} directives.
*
* **Set value**: You can set the form's initial value when instantiating the
* {@link FormGroup}, or you can set it programmatically later using the {@link FormGroup}'s
* {@link AbstractControl.setValue} or {@link AbstractControl.patchValue} methods.
*
* **Listen to value**: If you want to listen to changes in the value of the form, you can subscribe
* to the {@link FormGroup}'s {@link AbstractControl.valueChanges} event. You can also listen to
* its {@link AbstractControl.statusChanges} event to be notified when the validation status is
* re-calculated.
*
* Furthermore, you can listen to the directive's `ngSubmit` event to be notified when the user has
* triggered a form submission. The `ngSubmit` event will be emitted with the original form
* submission event.
*
* ### Example
*
* In this example, we create form controls for first name and last name.
*
* {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}
*
* **npm package**: `@angular/forms`
*
* **NgModule**: {@link ReactiveFormsModule}
*
* @stable
* *
* *
* This directive accepts an existing {@link FormGroup} instance. It will then use this
* {@link FormGroup} instance to match any child {@link FormControl}, {@link FormGroup},
* and {@link FormArray} instances to child {@link FormControlName}, {@link FormGroupName},
* and {@link FormArrayName} directives.
* *
* **Set value**: You can set the form's initial value when instantiating the
* {@link FormGroup}, or you can set it programmatically later using the {@link FormGroup}'s
* {@link AbstractControl.setValue} or {@link AbstractControl.patchValue} methods.
* *
* **Listen to value**: If you want to listen to changes in the value of the form, you can subscribe
* to the {@link FormGroup}'s {@link AbstractControl.valueChanges} event. You can also listen to
* its {@link AbstractControl.statusChanges} event to be notified when the validation status is
* re-calculated.
* *
* Furthermore, you can listen to the directive's `ngSubmit` event to be notified when the user has
* triggered a form submission. The `ngSubmit` event will be emitted with the original form
* submission event.
* *
* ### Example
* *
* In this example, we create form controls for first name and last name.
* *
* {@example forms/ts/simpleFormGroup/simple_form_group_example.ts region='Component'}
* *
* **npm package**: `@angular/forms`
* *
* **NgModule**: {@link ReactiveFormsModule}
* *
* @stable
*/
export var FormGroupDirective = (function (_super) {
__extends(FormGroupDirective, _super);
/**
* @param {?} _validators
* @param {?} _asyncValidators
*/
function FormGroupDirective(_validators, _asyncValidators) {

@@ -72,2 +74,6 @@ _super.call(this);

}
/**
* @param {?} changes
* @return {?}
*/
FormGroupDirective.prototype.ngOnChanges = function (changes) {

@@ -82,2 +88,5 @@ this._checkFormPresent();

Object.defineProperty(FormGroupDirective.prototype, "submitted", {
/**
* @return {?}
*/
get: function () { return this._submitted; },

@@ -88,2 +97,5 @@ enumerable: true,

Object.defineProperty(FormGroupDirective.prototype, "formDirective", {
/**
* @return {?}
*/
get: function () { return this; },

@@ -94,2 +106,5 @@ enumerable: true,

Object.defineProperty(FormGroupDirective.prototype, "control", {
/**
* @return {?}
*/
get: function () { return this.form; },

@@ -100,2 +115,5 @@ enumerable: true,

Object.defineProperty(FormGroupDirective.prototype, "path", {
/**
* @return {?}
*/
get: function () { return []; },

@@ -105,4 +123,8 @@ enumerable: true,

});
/**
* @param {?} dir
* @return {?}
*/
FormGroupDirective.prototype.addControl = function (dir) {
var ctrl = this.form.get(dir.path);
var /** @type {?} */ ctrl = this.form.get(dir.path);
setUpControl(ctrl, dir);

@@ -113,22 +135,63 @@ ctrl.updateValueAndValidity({ emitEvent: false });

};
FormGroupDirective.prototype.getControl = function (dir) { return this.form.get(dir.path); };
/**
* @param {?} dir
* @return {?}
*/
FormGroupDirective.prototype.getControl = function (dir) { return (this.form.get(dir.path)); };
/**
* @param {?} dir
* @return {?}
*/
FormGroupDirective.prototype.removeControl = function (dir) { ListWrapper.remove(this.directives, dir); };
/**
* @param {?} dir
* @return {?}
*/
FormGroupDirective.prototype.addFormGroup = function (dir) {
var ctrl = this.form.get(dir.path);
var /** @type {?} */ ctrl = this.form.get(dir.path);
setUpFormContainer(ctrl, dir);
ctrl.updateValueAndValidity({ emitEvent: false });
};
/**
* @param {?} dir
* @return {?}
*/
FormGroupDirective.prototype.removeFormGroup = function (dir) { };
FormGroupDirective.prototype.getFormGroup = function (dir) { return this.form.get(dir.path); };
/**
* @param {?} dir
* @return {?}
*/
FormGroupDirective.prototype.getFormGroup = function (dir) { return (this.form.get(dir.path)); };
/**
* @param {?} dir
* @return {?}
*/
FormGroupDirective.prototype.addFormArray = function (dir) {
var ctrl = this.form.get(dir.path);
var /** @type {?} */ ctrl = this.form.get(dir.path);
setUpFormContainer(ctrl, dir);
ctrl.updateValueAndValidity({ emitEvent: false });
};
/**
* @param {?} dir
* @return {?}
*/
FormGroupDirective.prototype.removeFormArray = function (dir) { };
FormGroupDirective.prototype.getFormArray = function (dir) { return this.form.get(dir.path); };
/**
* @param {?} dir
* @return {?}
*/
FormGroupDirective.prototype.getFormArray = function (dir) { return (this.form.get(dir.path)); };
/**
* @param {?} dir
* @param {?} value
* @return {?}
*/
FormGroupDirective.prototype.updateModel = function (dir, value) {
var ctrl = this.form.get(dir.path);
var /** @type {?} */ ctrl = (this.form.get(dir.path));
ctrl.setValue(value);
};
/**
* @param {?} $event
* @return {?}
*/
FormGroupDirective.prototype.onSubmit = function ($event) {

@@ -139,3 +202,10 @@ this._submitted = true;

};
/**
* @return {?}
*/
FormGroupDirective.prototype.onReset = function () { this.resetForm(); };
/**
* @param {?=} value
* @return {?}
*/
FormGroupDirective.prototype.resetForm = function (value) {

@@ -146,7 +216,9 @@ if (value === void 0) { value = undefined; }

};
/** @internal */
/**
* @return {?}
*/
FormGroupDirective.prototype._updateDomValue = function () {
var _this = this;
this.directives.forEach(function (dir) {
var newCtrl = _this.form.get(dir.path);
var /** @type {?} */ newCtrl = _this.form.get(dir.path);
if (dir._control !== newCtrl) {

@@ -161,2 +233,5 @@ cleanUpControl(dir._control, dir);

};
/**
* @return {?}
*/
FormGroupDirective.prototype._updateRegistrations = function () {

@@ -169,8 +244,14 @@ var _this = this;

};
/**
* @return {?}
*/
FormGroupDirective.prototype._updateValidators = function () {
var sync = composeValidators(this._validators);
var /** @type {?} */ sync = composeValidators(this._validators);
this.form.validator = Validators.compose([this.form.validator, sync]);
var async = composeAsyncValidators(this._asyncValidators);
var /** @type {?} */ async = composeAsyncValidators(this._asyncValidators);
this.form.asyncValidator = Validators.composeAsync([this.form.asyncValidator, async]);
};
/**
* @return {?}
*/
FormGroupDirective.prototype._checkFormPresent = function () {

@@ -190,6 +271,6 @@ if (!this.form) {

/** @nocollapse */
FormGroupDirective.ctorParameters = [
FormGroupDirective.ctorParameters = function () { return [
{ type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS,] },] },
{ type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS,] },] },
];
]; };
FormGroupDirective.propDecorators = {

@@ -201,2 +282,27 @@ 'form': [{ type: Input, args: ['formGroup',] },],

}(ControlContainer));
function FormGroupDirective_tsickle_Closure_declarations() {
/** @type {?} */
FormGroupDirective.decorators;
/**
* @nocollapse
* @type {?}
*/
FormGroupDirective.ctorParameters;
/** @type {?} */
FormGroupDirective.propDecorators;
/** @type {?} */
FormGroupDirective.prototype._submitted;
/** @type {?} */
FormGroupDirective.prototype._oldForm;
/** @type {?} */
FormGroupDirective.prototype.directives;
/** @type {?} */
FormGroupDirective.prototype.form;
/** @type {?} */
FormGroupDirective.prototype.ngSubmit;
/** @type {?} */
FormGroupDirective.prototype._validators;
/** @type {?} */
FormGroupDirective.prototype._asyncValidators;
}
//# sourceMappingURL=form_group_directive.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"formDirectiveProvider":{"provide":{"__symbolic":"reference","module":"../control_container","name":"ControlContainer"},"useExisting":{"__symbolic":"reference","name":"FormGroupDirective"}},"FormGroupDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[formGroup]","providers":[{"__symbolic":"reference","name":"formDirectiveProvider"}],"host":{"(submit)":"onSubmit($event)","(reset)":"onReset()"},"exportAs":"ngForm"}]}],"members":{"form":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["formGroup"]}]}],"ngSubmit":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../../validators","name":"NG_VALIDATORS"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../../validators","name":"NG_ASYNC_VALIDATORS"}]}]],"parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]}]}],"ngOnChanges":[{"__symbolic":"method"}],"addControl":[{"__symbolic":"method"}],"getControl":[{"__symbolic":"method"}],"removeControl":[{"__symbolic":"method"}],"addFormGroup":[{"__symbolic":"method"}],"removeFormGroup":[{"__symbolic":"method"}],"getFormGroup":[{"__symbolic":"method"}],"addFormArray":[{"__symbolic":"method"}],"removeFormArray":[{"__symbolic":"method"}],"getFormArray":[{"__symbolic":"method"}],"updateModel":[{"__symbolic":"method"}],"onSubmit":[{"__symbolic":"method"}],"onReset":[{"__symbolic":"method"}],"resetForm":[{"__symbolic":"method"}],"_updateDomValue":[{"__symbolic":"method"}],"_updateRegistrations":[{"__symbolic":"method"}],"_updateValidators":[{"__symbolic":"method"}],"_checkFormPresent":[{"__symbolic":"method"}]}}}}
{"__symbolic":"module","version":2,"metadata":{"formDirectiveProvider":{"provide":{"__symbolic":"reference","module":"../control_container","name":"ControlContainer"},"useExisting":{"__symbolic":"reference","name":"FormGroupDirective"}},"FormGroupDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[formGroup]","providers":[{"__symbolic":"reference","name":"formDirectiveProvider"}],"host":{"(submit)":"onSubmit($event)","(reset)":"onReset()"},"exportAs":"ngForm"}]}],"members":{"form":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["formGroup"]}]}],"ngSubmit":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output"}}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../../validators","name":"NG_VALIDATORS"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../../validators","name":"NG_ASYNC_VALIDATORS"}]}]],"parameters":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]}]}],"ngOnChanges":[{"__symbolic":"method"}],"addControl":[{"__symbolic":"method"}],"getControl":[{"__symbolic":"method"}],"removeControl":[{"__symbolic":"method"}],"addFormGroup":[{"__symbolic":"method"}],"removeFormGroup":[{"__symbolic":"method"}],"getFormGroup":[{"__symbolic":"method"}],"addFormArray":[{"__symbolic":"method"}],"removeFormArray":[{"__symbolic":"method"}],"getFormArray":[{"__symbolic":"method"}],"updateModel":[{"__symbolic":"method"}],"onSubmit":[{"__symbolic":"method"}],"onReset":[{"__symbolic":"method"}],"resetForm":[{"__symbolic":"method"}],"_updateDomValue":[{"__symbolic":"method"}],"_updateRegistrations":[{"__symbolic":"method"}],"_updateValidators":[{"__symbolic":"method"}],"_checkFormPresent":[{"__symbolic":"method"}]}}}}

@@ -20,3 +20,3 @@ /**

import { FormGroupDirective } from './form_group_directive';
export var formGroupNameProvider = {
export var /** @type {?} */ formGroupNameProvider = {
provide: ControlContainer,

@@ -26,47 +26,49 @@ useExisting: forwardRef(function () { return FormGroupName; })

/**
* @whatItDoes Syncs a nested {@link FormGroup} to a DOM element.
*
* @howToUse
*
* This directive can only be used with a parent {@link FormGroupDirective} (selector:
* `[formGroup]`).
*
* It accepts the string name of the nested {@link FormGroup} you want to link, and
* will look for a {@link FormGroup} registered with that name in the parent
* {@link FormGroup} instance you passed into {@link FormGroupDirective}.
*
* Nested form groups can come in handy when you want to validate a sub-group of a
* form separately from the rest or when you'd like to group the values of certain
* controls into their own nested object.
*
* **Access the group**: You can access the associated {@link FormGroup} using the
* {@link AbstractControl.get} method. Ex: `this.form.get('name')`.
*
* You can also access individual controls within the group using dot syntax.
* Ex: `this.form.get('name.first')`
*
* **Get the value**: the `value` property is always synced and available on the
* {@link FormGroup}. See a full list of available properties in {@link AbstractControl}.
*
* **Set the value**: You can set an initial value for each child control when instantiating
* the {@link FormGroup}, or you can set it programmatically later using
* {@link AbstractControl.setValue} or {@link AbstractControl.patchValue}.
*
* **Listen to value**: If you want to listen to changes in the value of the group, you can
* subscribe to the {@link AbstractControl.valueChanges} event. You can also listen to
* {@link AbstractControl.statusChanges} to be notified when the validation status is
* re-calculated.
*
* ### Example
*
* {@example forms/ts/nestedFormGroup/nested_form_group_example.ts region='Component'}
*
* * **npm package**: `@angular/forms`
*
* * **NgModule**: `ReactiveFormsModule`
*
* @stable
* *
* *
* This directive can only be used with a parent {@link FormGroupDirective} (selector:
* `[formGroup]`).
* *
* It accepts the string name of the nested {@link FormGroup} you want to link, and
* will look for a {@link FormGroup} registered with that name in the parent
* {@link FormGroup} instance you passed into {@link FormGroupDirective}.
* *
* Nested form groups can come in handy when you want to validate a sub-group of a
* form separately from the rest or when you'd like to group the values of certain
* controls into their own nested object.
* *
* **Access the group**: You can access the associated {@link FormGroup} using the
* {@link AbstractControl.get} method. Ex: `this.form.get('name')`.
* *
* You can also access individual controls within the group using dot syntax.
* Ex: `this.form.get('name.first')`
* *
* **Get the value**: the `value` property is always synced and available on the
* {@link FormGroup}. See a full list of available properties in {@link AbstractControl}.
* *
* **Set the value**: You can set an initial value for each child control when instantiating
* the {@link FormGroup}, or you can set it programmatically later using
* {@link AbstractControl.setValue} or {@link AbstractControl.patchValue}.
* *
* **Listen to value**: If you want to listen to changes in the value of the group, you can
* subscribe to the {@link AbstractControl.valueChanges} event. You can also listen to
* {@link AbstractControl.statusChanges} to be notified when the validation status is
* re-calculated.
* *
* ### Example
* *
* {@example forms/ts/nestedFormGroup/nested_form_group_example.ts region='Component'}
* *
* * **npm package**: `@angular/forms`
* *
* * **NgModule**: `ReactiveFormsModule`
* *
*/
export var FormGroupName = (function (_super) {
__extends(FormGroupName, _super);
/**
* @param {?} parent
* @param {?} validators
* @param {?} asyncValidators
*/
function FormGroupName(parent, validators, asyncValidators) {

@@ -78,3 +80,5 @@ _super.call(this);

}
/** @internal */
/**
* @return {?}
*/
FormGroupName.prototype._checkParentType = function () {

@@ -89,7 +93,7 @@ if (_hasInvalidParent(this._parent)) {

/** @nocollapse */
FormGroupName.ctorParameters = [
FormGroupName.ctorParameters = function () { return [
{ type: ControlContainer, decorators: [{ type: Optional }, { type: Host }, { type: SkipSelf },] },
{ type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS,] },] },
{ type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS,] },] },
];
]; };
FormGroupName.propDecorators = {

@@ -100,3 +104,16 @@ 'name': [{ type: Input, args: ['formGroupName',] },],

}(AbstractFormGroupDirective));
export var formArrayNameProvider = {
function FormGroupName_tsickle_Closure_declarations() {
/** @type {?} */
FormGroupName.decorators;
/**
* @nocollapse
* @type {?}
*/
FormGroupName.ctorParameters;
/** @type {?} */
FormGroupName.propDecorators;
/** @type {?} */
FormGroupName.prototype.name;
}
export var /** @type {?} */ formArrayNameProvider = {
provide: ControlContainer,

@@ -106,50 +123,52 @@ useExisting: forwardRef(function () { return FormArrayName; })

/**
* @whatItDoes Syncs a nested {@link FormArray} to a DOM element.
*
* @howToUse
*
* This directive is designed to be used with a parent {@link FormGroupDirective} (selector:
* `[formGroup]`).
*
* It accepts the string name of the nested {@link FormArray} you want to link, and
* will look for a {@link FormArray} registered with that name in the parent
* {@link FormGroup} instance you passed into {@link FormGroupDirective}.
*
* Nested form arrays can come in handy when you have a group of form controls but
* you're not sure how many there will be. Form arrays allow you to create new
* form controls dynamically.
*
* **Access the array**: You can access the associated {@link FormArray} using the
* {@link AbstractControl.get} method on the parent {@link FormGroup}.
* Ex: `this.form.get('cities')`.
*
* **Get the value**: the `value` property is always synced and available on the
* {@link FormArray}. See a full list of available properties in {@link AbstractControl}.
*
* **Set the value**: You can set an initial value for each child control when instantiating
* the {@link FormArray}, or you can set the value programmatically later using the
* {@link FormArray}'s {@link AbstractControl.setValue} or {@link AbstractControl.patchValue}
* methods.
*
* **Listen to value**: If you want to listen to changes in the value of the array, you can
* subscribe to the {@link FormArray}'s {@link AbstractControl.valueChanges} event. You can also
* listen to its {@link AbstractControl.statusChanges} event to be notified when the validation
* status is re-calculated.
*
* **Add new controls**: You can add new controls to the {@link FormArray} dynamically by
* calling its {@link FormArray.push} method.
* Ex: `this.form.get('cities').push(new FormControl());`
*
* ### Example
*
* {@example forms/ts/nestedFormArray/nested_form_array_example.ts region='Component'}
*
* * **npm package**: `@angular/forms`
*
* * **NgModule**: `ReactiveFormsModule`
*
* @stable
* *
* *
* This directive is designed to be used with a parent {@link FormGroupDirective} (selector:
* `[formGroup]`).
* *
* It accepts the string name of the nested {@link FormArray} you want to link, and
* will look for a {@link FormArray} registered with that name in the parent
* {@link FormGroup} instance you passed into {@link FormGroupDirective}.
* *
* Nested form arrays can come in handy when you have a group of form controls but
* you're not sure how many there will be. Form arrays allow you to create new
* form controls dynamically.
* *
* **Access the array**: You can access the associated {@link FormArray} using the
* {@link AbstractControl.get} method on the parent {@link FormGroup}.
* Ex: `this.form.get('cities')`.
* *
* **Get the value**: the `value` property is always synced and available on the
* {@link FormArray}. See a full list of available properties in {@link AbstractControl}.
* *
* **Set the value**: You can set an initial value for each child control when instantiating
* the {@link FormArray}, or you can set the value programmatically later using the
* {@link FormArray}'s {@link AbstractControl.setValue} or {@link AbstractControl.patchValue}
* methods.
* *
* **Listen to value**: If you want to listen to changes in the value of the array, you can
* subscribe to the {@link FormArray}'s {@link AbstractControl.valueChanges} event. You can also
* listen to its {@link AbstractControl.statusChanges} event to be notified when the validation
* status is re-calculated.
* *
* **Add new controls**: You can add new controls to the {@link FormArray} dynamically by
* calling its {@link FormArray.push} method.
* Ex: `this.form.get('cities').push(new FormControl());`
* *
* ### Example
* *
* {@example forms/ts/nestedFormArray/nested_form_array_example.ts region='Component'}
* *
* * **npm package**: `@angular/forms`
* *
* * **NgModule**: `ReactiveFormsModule`
* *
*/
export var FormArrayName = (function (_super) {
__extends(FormArrayName, _super);
/**
* @param {?} parent
* @param {?} validators
* @param {?} asyncValidators
*/
function FormArrayName(parent, validators, asyncValidators) {

@@ -161,2 +180,5 @@ _super.call(this);

}
/**
* @return {?}
*/
FormArrayName.prototype.ngOnInit = function () {

@@ -166,2 +188,5 @@ this._checkParentType();

};
/**
* @return {?}
*/
FormArrayName.prototype.ngOnDestroy = function () {

@@ -173,2 +198,5 @@ if (this.formDirective) {

Object.defineProperty(FormArrayName.prototype, "control", {
/**
* @return {?}
*/
get: function () { return this.formDirective.getFormArray(this); },

@@ -179,4 +207,7 @@ enumerable: true,

Object.defineProperty(FormArrayName.prototype, "formDirective", {
/**
* @return {?}
*/
get: function () {
return this._parent ? this._parent.formDirective : null;
return this._parent ? (this._parent.formDirective) : null;
},

@@ -187,2 +218,5 @@ enumerable: true,

Object.defineProperty(FormArrayName.prototype, "path", {
/**
* @return {?}
*/
get: function () { return controlPath(this.name, this._parent); },

@@ -193,2 +227,5 @@ enumerable: true,

Object.defineProperty(FormArrayName.prototype, "validator", {
/**
* @return {?}
*/
get: function () { return composeValidators(this._validators); },

@@ -199,2 +236,5 @@ enumerable: true,

Object.defineProperty(FormArrayName.prototype, "asyncValidator", {
/**
* @return {?}
*/
get: function () { return composeAsyncValidators(this._asyncValidators); },

@@ -204,2 +244,5 @@ enumerable: true,

});
/**
* @return {?}
*/
FormArrayName.prototype._checkParentType = function () {

@@ -214,7 +257,7 @@ if (_hasInvalidParent(this._parent)) {

/** @nocollapse */
FormArrayName.ctorParameters = [
FormArrayName.ctorParameters = function () { return [
{ type: ControlContainer, decorators: [{ type: Optional }, { type: Host }, { type: SkipSelf },] },
{ type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_VALIDATORS,] },] },
{ type: Array, decorators: [{ type: Optional }, { type: Self }, { type: Inject, args: [NG_ASYNC_VALIDATORS,] },] },
];
]; };
FormArrayName.propDecorators = {

@@ -225,2 +268,25 @@ 'name': [{ type: Input, args: ['formArrayName',] },],

}(ControlContainer));
function FormArrayName_tsickle_Closure_declarations() {
/** @type {?} */
FormArrayName.decorators;
/**
* @nocollapse
* @type {?}
*/
FormArrayName.ctorParameters;
/** @type {?} */
FormArrayName.propDecorators;
/** @type {?} */
FormArrayName.prototype._parent;
/** @type {?} */
FormArrayName.prototype._validators;
/** @type {?} */
FormArrayName.prototype._asyncValidators;
/** @type {?} */
FormArrayName.prototype.name;
}
/**
* @param {?} parent
* @return {?}
*/
function _hasInvalidParent(parent) {

@@ -227,0 +293,0 @@ return !(parent instanceof FormGroupName) && !(parent instanceof FormGroupDirective) &&

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"formGroupNameProvider":{"provide":{"__symbolic":"reference","module":"../control_container","name":"ControlContainer"},"useExisting":{"__symbolic":"reference","name":"FormGroupName"}},"FormGroupName":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[formGroupName]","providers":[{"__symbolic":"reference","name":"formGroupNameProvider"}]}]}],"members":{"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["formGroupName"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf"}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../../validators","name":"NG_VALIDATORS"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../../validators","name":"NG_ASYNC_VALIDATORS"}]}]],"parameters":[{"__symbolic":"reference","module":"../control_container","name":"ControlContainer"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]}]}],"_checkParentType":[{"__symbolic":"method"}]}},"formArrayNameProvider":{"provide":{"__symbolic":"reference","module":"../control_container","name":"ControlContainer"},"useExisting":{"__symbolic":"reference","name":"FormArrayName"}},"FormArrayName":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[formArrayName]","providers":[{"__symbolic":"reference","name":"formArrayNameProvider"}]}]}],"members":{"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["formArrayName"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf"}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../../validators","name":"NG_VALIDATORS"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../../validators","name":"NG_ASYNC_VALIDATORS"}]}]],"parameters":[{"__symbolic":"reference","module":"../control_container","name":"ControlContainer"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_checkParentType":[{"__symbolic":"method"}]}}}}
{"__symbolic":"module","version":2,"metadata":{"formGroupNameProvider":{"provide":{"__symbolic":"reference","module":"../control_container","name":"ControlContainer"},"useExisting":{"__symbolic":"reference","name":"FormGroupName"}},"FormGroupName":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[formGroupName]","providers":[{"__symbolic":"reference","name":"formGroupNameProvider"}]}]}],"members":{"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["formGroupName"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf"}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../../validators","name":"NG_VALIDATORS"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../../validators","name":"NG_ASYNC_VALIDATORS"}]}]],"parameters":[{"__symbolic":"reference","module":"../control_container","name":"ControlContainer"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]}]}],"_checkParentType":[{"__symbolic":"method"}]}},"formArrayNameProvider":{"provide":{"__symbolic":"reference","module":"../control_container","name":"ControlContainer"},"useExisting":{"__symbolic":"reference","name":"FormArrayName"}},"FormArrayName":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[formArrayName]","providers":[{"__symbolic":"reference","name":"formArrayNameProvider"}]}]}],"members":{"name":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["formArrayName"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"SkipSelf"}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../../validators","name":"NG_VALIDATORS"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Self"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"../../validators","name":"NG_ASYNC_VALIDATORS"}]}]],"parameters":[{"__symbolic":"reference","module":"../control_container","name":"ControlContainer"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]}]}],"ngOnInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_checkParentType":[{"__symbolic":"method"}]}}}}

@@ -12,17 +12,35 @@ /**

}
/**
* @return {?}
*/
ReactiveErrors.controlParentException = function () {
throw new Error("formControlName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n " + Examples.formControlName);
};
/**
* @return {?}
*/
ReactiveErrors.ngModelGroupException = function () {
throw new Error("formControlName cannot be used with an ngModelGroup parent. It is only compatible with parents\n that also have a \"form\" prefix: formGroupName, formArrayName, or formGroup.\n\n Option 1: Update the parent to be formGroupName (reactive form strategy)\n\n " + Examples.formGroupName + "\n\n Option 2: Use ngModel instead of formControlName (template-driven strategy)\n\n " + Examples.ngModelGroup);
};
/**
* @return {?}
*/
ReactiveErrors.missingFormException = function () {
throw new Error("formGroup expects a FormGroup instance. Please pass one in.\n\n Example:\n\n " + Examples.formControlName);
};
/**
* @return {?}
*/
ReactiveErrors.groupParentException = function () {
throw new Error("formGroupName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n " + Examples.formGroupName);
};
/**
* @return {?}
*/
ReactiveErrors.arrayParentException = function () {
throw new Error("formArrayName must be used with a parent formGroup directive. You'll want to add a formGroup\n directive and pass it an existing FormGroup instance (you can create one in your class).\n\n Example:\n\n " + Examples.formArrayName);
};
/**
* @return {?}
*/
ReactiveErrors.disabledAttrWarning = function () {

@@ -29,0 +47,0 @@ console.warn("\n It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true\n when you set up this control in your component class, the disabled attribute will actually be set in the DOM for\n you. We recommend using this approach to avoid 'changed after checked' errors.\n \n Example: \n form = new FormGroup({\n first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),\n last: new FormControl('Drew', Validators.required)\n });\n ");

@@ -11,3 +11,3 @@ /**

import { NG_VALUE_ACCESSOR } from './control_value_accessor';
export var SELECT_VALUE_ACCESSOR = {
export var /** @type {?} */ SELECT_VALUE_ACCESSOR = {
provide: NG_VALUE_ACCESSOR,

@@ -17,2 +17,7 @@ useExisting: forwardRef(function () { return SelectControlValueAccessor; }),

};
/**
* @param {?} id
* @param {?} value
* @return {?}
*/
function _buildValueString(id, value) {

@@ -25,2 +30,6 @@ if (id == null)

}
/**
* @param {?} valueString
* @return {?}
*/
function _extractId(valueString) {

@@ -30,40 +39,41 @@ return valueString.split(':')[0];

/**
* @whatItDoes Writes values and listens to changes on a select element.
*
* Used by {@link NgModel}, {@link FormControlDirective}, and {@link FormControlName}
* to keep the view synced with the {@link FormControl} model.
*
* @howToUse
*
* If you have imported the {@link FormsModule} or the {@link ReactiveFormsModule}, this
* value accessor will be active on any select control that has a form directive. You do
* **not** need to add a special selector to activate it.
*
* ### How to use select controls with form directives
*
* To use a select in a template-driven form, simply add an `ngModel` and a `name`
* attribute to the main `<select>` tag.
*
* If your option values are simple strings, you can bind to the normal `value` property
* on the option. If your option values happen to be objects (and you'd like to save the
* selection in your form as an object), use `ngValue` instead:
*
* {@example forms/ts/selectControl/select_control_example.ts region='Component'}
*
* In reactive forms, you'll also want to add your form directive (`formControlName` or
* `formControl`) on the main `<select>` tag. Like in the former example, you have the
* choice of binding to the `value` or `ngValue` property on the select's options.
*
* {@example forms/ts/reactiveSelectControl/reactive_select_control_example.ts region='Component'}
*
* Note: We listen to the 'change' event because 'input' events aren't fired
* for selects in Firefox and IE:
* https://bugzilla.mozilla.org/show_bug.cgi?id=1024350
* https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/4660045/
*
* * **npm package**: `@angular/forms`
*
* @stable
* *
* Used by {@link NgModel}, {@link FormControlDirective}, and {@link FormControlName}
* to keep the view synced with the {@link FormControl} model.
* *
* *
* If you have imported the {@link FormsModule} or the {@link ReactiveFormsModule}, this
* value accessor will be active on any select control that has a form directive. You do
* **not** need to add a special selector to activate it.
* *
* ### How to use select controls with form directives
* *
* To use a select in a template-driven form, simply add an `ngModel` and a `name`
* attribute to the main `<select>` tag.
* *
* If your option values are simple strings, you can bind to the normal `value` property
* on the option. If your option values happen to be objects (and you'd like to save the
* selection in your form as an object), use `ngValue` instead:
* *
* {@example forms/ts/selectControl/select_control_example.ts region='Component'}
* *
* In reactive forms, you'll also want to add your form directive (`formControlName` or
* `formControl`) on the main `<select>` tag. Like in the former example, you have the
* choice of binding to the `value` or `ngValue` property on the select's options.
* *
* {@example forms/ts/reactiveSelectControl/reactive_select_control_example.ts region='Component'}
* *
* Note: We listen to the 'change' event because 'input' events aren't fired
* for selects in Firefox and IE:
* https://bugzilla.mozilla.org/show_bug.cgi?id=1024350
* https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/4660045/
* *
* * **npm package**: `@angular/forms`
* *
*/
export var SelectControlValueAccessor = (function () {
/**
* @param {?} _renderer
* @param {?} _elementRef
*/
function SelectControlValueAccessor(_renderer, _elementRef) {

@@ -79,7 +89,15 @@ this._renderer = _renderer;

}
/**
* @param {?} value
* @return {?}
*/
SelectControlValueAccessor.prototype.writeValue = function (value) {
this.value = value;
var valueString = _buildValueString(this._getOptionId(value), value);
var /** @type {?} */ valueString = _buildValueString(this._getOptionId(value), value);
this._renderer.setElementProperty(this._elementRef.nativeElement, 'value', valueString);
};
/**
* @param {?} fn
* @return {?}
*/
SelectControlValueAccessor.prototype.registerOnChange = function (fn) {

@@ -92,9 +110,22 @@ var _this = this;

};
/**
* @param {?} fn
* @return {?}
*/
SelectControlValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; };
/**
* @param {?} isDisabled
* @return {?}
*/
SelectControlValueAccessor.prototype.setDisabledState = function (isDisabled) {
this._renderer.setElementProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
};
/** @internal */
/**
* @return {?}
*/
SelectControlValueAccessor.prototype._registerOption = function () { return (this._idCounter++).toString(); };
/** @internal */
/**
* @param {?} value
* @return {?}
*/
SelectControlValueAccessor.prototype._getOptionId = function (value) {

@@ -108,5 +139,8 @@ for (var _i = 0, _a = Array.from(this._optionMap.keys()); _i < _a.length; _i++) {

};
/** @internal */
/**
* @param {?} valueString
* @return {?}
*/
SelectControlValueAccessor.prototype._getOptionValue = function (valueString) {
var id = _extractId(valueString);
var /** @type {?} */ id = _extractId(valueString);
return this._optionMap.has(id) ? this._optionMap.get(id) : valueString;

@@ -122,18 +156,43 @@ };

/** @nocollapse */
SelectControlValueAccessor.ctorParameters = [
SelectControlValueAccessor.ctorParameters = function () { return [
{ type: Renderer, },
{ type: ElementRef, },
];
]; };
return SelectControlValueAccessor;
}());
function SelectControlValueAccessor_tsickle_Closure_declarations() {
/** @type {?} */
SelectControlValueAccessor.decorators;
/**
* @nocollapse
* @type {?}
*/
SelectControlValueAccessor.ctorParameters;
/** @type {?} */
SelectControlValueAccessor.prototype.value;
/** @type {?} */
SelectControlValueAccessor.prototype._optionMap;
/** @type {?} */
SelectControlValueAccessor.prototype._idCounter;
/** @type {?} */
SelectControlValueAccessor.prototype.onChange;
/** @type {?} */
SelectControlValueAccessor.prototype.onTouched;
/** @type {?} */
SelectControlValueAccessor.prototype._renderer;
/** @type {?} */
SelectControlValueAccessor.prototype._elementRef;
}
/**
* @whatItDoes Marks `<option>` as dynamic, so Angular can be notified when options change.
*
* @howToUse
*
* See docs for {@link SelectControlValueAccessor} for usage examples.
*
* @stable
* *
* *
* See docs for {@link SelectControlValueAccessor} for usage examples.
* *
*/
export var NgSelectOption = (function () {
/**
* @param {?} _element
* @param {?} _renderer
* @param {?} _select
*/
function NgSelectOption(_element, _renderer, _select) {

@@ -147,2 +206,6 @@ this._element = _element;

Object.defineProperty(NgSelectOption.prototype, "ngValue", {
/**
* @param {?} value
* @return {?}
*/
set: function (value) {

@@ -159,2 +222,6 @@ if (this._select == null)

Object.defineProperty(NgSelectOption.prototype, "value", {
/**
* @param {?} value
* @return {?}
*/
set: function (value) {

@@ -168,6 +235,12 @@ this._setElementValue(value);

});
/** @internal */
/**
* @param {?} value
* @return {?}
*/
NgSelectOption.prototype._setElementValue = function (value) {
this._renderer.setElementProperty(this._element.nativeElement, 'value', value);
};
/**
* @return {?}
*/
NgSelectOption.prototype.ngOnDestroy = function () {

@@ -183,7 +256,7 @@ if (this._select) {

/** @nocollapse */
NgSelectOption.ctorParameters = [
NgSelectOption.ctorParameters = function () { return [
{ type: ElementRef, },
{ type: Renderer, },
{ type: SelectControlValueAccessor, decorators: [{ type: Optional }, { type: Host },] },
];
]; };
NgSelectOption.propDecorators = {

@@ -195,2 +268,21 @@ 'ngValue': [{ type: Input, args: ['ngValue',] },],

}());
function NgSelectOption_tsickle_Closure_declarations() {
/** @type {?} */
NgSelectOption.decorators;
/**
* @nocollapse
* @type {?}
*/
NgSelectOption.ctorParameters;
/** @type {?} */
NgSelectOption.propDecorators;
/** @type {?} */
NgSelectOption.prototype.id;
/** @type {?} */
NgSelectOption.prototype._element;
/** @type {?} */
NgSelectOption.prototype._renderer;
/** @type {?} */
NgSelectOption.prototype._select;
}
//# sourceMappingURL=select_control_value_accessor.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"SELECT_VALUE_ACCESSOR":{"provide":{"__symbolic":"reference","module":"./control_value_accessor","name":"NG_VALUE_ACCESSOR"},"useExisting":{"__symbolic":"reference","name":"SelectControlValueAccessor"},"multi":true},"SelectControlValueAccessor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]","host":{"(change)":"onChange($event.target.value)","(blur)":"onTouched()"},"providers":[{"__symbolic":"reference","name":"SELECT_VALUE_ACCESSOR"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}],"_registerOption":[{"__symbolic":"method"}],"_getOptionId":[{"__symbolic":"method"}],"_getOptionValue":[{"__symbolic":"method"}]}},"NgSelectOption":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"option"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host"}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","name":"SelectControlValueAccessor"}]}],"ngValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["ngValue"]}]}],"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["value"]}]}],"_setElementValue":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}}}
{"__symbolic":"module","version":2,"metadata":{"SELECT_VALUE_ACCESSOR":{"provide":{"__symbolic":"reference","module":"./control_value_accessor","name":"NG_VALUE_ACCESSOR"},"useExisting":{"__symbolic":"reference","name":"SelectControlValueAccessor"},"multi":true},"SelectControlValueAccessor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]","host":{"(change)":"onChange($event.target.value)","(blur)":"onTouched()"},"providers":[{"__symbolic":"reference","name":"SELECT_VALUE_ACCESSOR"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}],"_registerOption":[{"__symbolic":"method"}],"_getOptionId":[{"__symbolic":"method"}],"_getOptionValue":[{"__symbolic":"method"}]}},"NgSelectOption":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"option"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host"}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","name":"SelectControlValueAccessor"}]}],"ngValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["ngValue"]}]}],"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["value"]}]}],"_setElementValue":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}}}

@@ -11,3 +11,3 @@ /**

import { NG_VALUE_ACCESSOR } from './control_value_accessor';
export var SELECT_MULTIPLE_VALUE_ACCESSOR = {
export var /** @type {?} */ SELECT_MULTIPLE_VALUE_ACCESSOR = {
provide: NG_VALUE_ACCESSOR,

@@ -17,2 +17,7 @@ useExisting: forwardRef(function () { return SelectMultipleControlValueAccessor; }),

};
/**
* @param {?} id
* @param {?} value
* @return {?}
*/
function _buildValueString(id, value) {

@@ -27,17 +32,37 @@ if (id == null)

}
/**
* @param {?} valueString
* @return {?}
*/
function _extractId(valueString) {
return valueString.split(':')[0];
}
/** Mock interface for HTMLCollection */
/**
* Mock interface for HTMLCollection
* @abstract
*/
var HTMLCollection = (function () {
function HTMLCollection() {
}
/**
* @abstract
* @param {?} _
* @return {?}
*/
HTMLCollection.prototype.item = function (_) { };
return HTMLCollection;
}());
function HTMLCollection_tsickle_Closure_declarations() {
/** @type {?} */
HTMLCollection.prototype.length;
}
/**
* The accessor for writing a value and listening to changes on a select element.
*
* @stable
* The accessor for writing a value and listening to changes on a select element.
* *
*/
export var SelectMultipleControlValueAccessor = (function () {
/**
* @param {?} _renderer
* @param {?} _elementRef
*/
function SelectMultipleControlValueAccessor(_renderer, _elementRef) {

@@ -53,2 +78,6 @@ this._renderer = _renderer;

}
/**
* @param {?} value
* @return {?}
*/
SelectMultipleControlValueAccessor.prototype.writeValue = function (value) {

@@ -59,16 +88,20 @@ var _this = this;

return;
var values = value;
var /** @type {?} */ values = (value);
// convert values to ids
var ids = values.map(function (v) { return _this._getOptionId(v); });
var /** @type {?} */ ids = values.map(function (v) { return _this._getOptionId(v); });
this._optionMap.forEach(function (opt, o) { opt._setSelected(ids.indexOf(o.toString()) > -1); });
};
/**
* @param {?} fn
* @return {?}
*/
SelectMultipleControlValueAccessor.prototype.registerOnChange = function (fn) {
var _this = this;
this.onChange = function (_) {
var selected = [];
var /** @type {?} */ selected = [];
if (_.hasOwnProperty('selectedOptions')) {
var options = _.selectedOptions;
for (var i = 0; i < options.length; i++) {
var opt = options.item(i);
var val = _this._getOptionValue(opt.value);
var /** @type {?} */ options = _.selectedOptions;
for (var /** @type {?} */ i = 0; i < options.length; i++) {
var /** @type {?} */ opt = options.item(i);
var /** @type {?} */ val = _this._getOptionValue(opt.value);
selected.push(val);

@@ -78,7 +111,7 @@ }

else {
var options = _.options;
for (var i = 0; i < options.length; i++) {
var opt = options.item(i);
var /** @type {?} */ options = (_.options);
for (var /** @type {?} */ i = 0; i < options.length; i++) {
var /** @type {?} */ opt = options.item(i);
if (opt.selected) {
var val = _this._getOptionValue(opt.value);
var /** @type {?} */ val = _this._getOptionValue(opt.value);
selected.push(val);

@@ -91,13 +124,27 @@ }

};
/**
* @param {?} fn
* @return {?}
*/
SelectMultipleControlValueAccessor.prototype.registerOnTouched = function (fn) { this.onTouched = fn; };
/**
* @param {?} isDisabled
* @return {?}
*/
SelectMultipleControlValueAccessor.prototype.setDisabledState = function (isDisabled) {
this._renderer.setElementProperty(this._elementRef.nativeElement, 'disabled', isDisabled);
};
/** @internal */
/**
* @param {?} value
* @return {?}
*/
SelectMultipleControlValueAccessor.prototype._registerOption = function (value) {
var id = (this._idCounter++).toString();
var /** @type {?} */ id = (this._idCounter++).toString();
this._optionMap.set(id, value);
return id;
};
/** @internal */
/**
* @param {?} value
* @return {?}
*/
SelectMultipleControlValueAccessor.prototype._getOptionId = function (value) {

@@ -111,5 +158,8 @@ for (var _i = 0, _a = Array.from(this._optionMap.keys()); _i < _a.length; _i++) {

};
/** @internal */
/**
* @param {?} valueString
* @return {?}
*/
SelectMultipleControlValueAccessor.prototype._getOptionValue = function (valueString) {
var id = _extractId(valueString);
var /** @type {?} */ id = _extractId(valueString);
return this._optionMap.has(id) ? this._optionMap.get(id)._value : valueString;

@@ -125,20 +175,48 @@ };

/** @nocollapse */
SelectMultipleControlValueAccessor.ctorParameters = [
SelectMultipleControlValueAccessor.ctorParameters = function () { return [
{ type: Renderer, },
{ type: ElementRef, },
];
]; };
return SelectMultipleControlValueAccessor;
}());
function SelectMultipleControlValueAccessor_tsickle_Closure_declarations() {
/** @type {?} */
SelectMultipleControlValueAccessor.decorators;
/**
* @nocollapse
* @type {?}
*/
SelectMultipleControlValueAccessor.ctorParameters;
/** @type {?} */
SelectMultipleControlValueAccessor.prototype.value;
/** @type {?} */
SelectMultipleControlValueAccessor.prototype._optionMap;
/** @type {?} */
SelectMultipleControlValueAccessor.prototype._idCounter;
/** @type {?} */
SelectMultipleControlValueAccessor.prototype.onChange;
/** @type {?} */
SelectMultipleControlValueAccessor.prototype.onTouched;
/** @type {?} */
SelectMultipleControlValueAccessor.prototype._renderer;
/** @type {?} */
SelectMultipleControlValueAccessor.prototype._elementRef;
}
/**
* Marks `<option>` as dynamic, so Angular can be notified when options change.
*
* ### Example
*
* ```
* <select multiple name="city" ngModel>
* <option *ngFor="let c of cities" [value]="c"></option>
* </select>
* ```
* Marks `<option>` as dynamic, so Angular can be notified when options change.
* *
* ### Example
* *
* ```
* <select multiple name="city" ngModel>
* <option *ngFor="let c of cities" [value]="c"></option>
* </select>
* ```
*/
export var NgSelectMultipleOption = (function () {
/**
* @param {?} _element
* @param {?} _renderer
* @param {?} _select
*/
function NgSelectMultipleOption(_element, _renderer, _select) {

@@ -153,2 +231,6 @@ this._element = _element;

Object.defineProperty(NgSelectMultipleOption.prototype, "ngValue", {
/**
* @param {?} value
* @return {?}
*/
set: function (value) {

@@ -165,2 +247,6 @@ if (this._select == null)

Object.defineProperty(NgSelectMultipleOption.prototype, "value", {
/**
* @param {?} value
* @return {?}
*/
set: function (value) {

@@ -179,10 +265,19 @@ if (this._select) {

});
/** @internal */
/**
* @param {?} value
* @return {?}
*/
NgSelectMultipleOption.prototype._setElementValue = function (value) {
this._renderer.setElementProperty(this._element.nativeElement, 'value', value);
};
/** @internal */
/**
* @param {?} selected
* @return {?}
*/
NgSelectMultipleOption.prototype._setSelected = function (selected) {
this._renderer.setElementProperty(this._element.nativeElement, 'selected', selected);
};
/**
* @return {?}
*/
NgSelectMultipleOption.prototype.ngOnDestroy = function () {

@@ -198,7 +293,7 @@ if (this._select) {

/** @nocollapse */
NgSelectMultipleOption.ctorParameters = [
NgSelectMultipleOption.ctorParameters = function () { return [
{ type: ElementRef, },
{ type: Renderer, },
{ type: SelectMultipleControlValueAccessor, decorators: [{ type: Optional }, { type: Host },] },
];
]; };
NgSelectMultipleOption.propDecorators = {

@@ -210,2 +305,23 @@ 'ngValue': [{ type: Input, args: ['ngValue',] },],

}());
function NgSelectMultipleOption_tsickle_Closure_declarations() {
/** @type {?} */
NgSelectMultipleOption.decorators;
/**
* @nocollapse
* @type {?}
*/
NgSelectMultipleOption.ctorParameters;
/** @type {?} */
NgSelectMultipleOption.propDecorators;
/** @type {?} */
NgSelectMultipleOption.prototype.id;
/** @type {?} */
NgSelectMultipleOption.prototype._value;
/** @type {?} */
NgSelectMultipleOption.prototype._element;
/** @type {?} */
NgSelectMultipleOption.prototype._renderer;
/** @type {?} */
NgSelectMultipleOption.prototype._select;
}
//# sourceMappingURL=select_multiple_control_value_accessor.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"SELECT_MULTIPLE_VALUE_ACCESSOR":{"provide":{"__symbolic":"reference","module":"./control_value_accessor","name":"NG_VALUE_ACCESSOR"},"useExisting":{"__symbolic":"reference","name":"SelectMultipleControlValueAccessor"},"multi":true},"SelectMultipleControlValueAccessor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]","host":{"(change)":"onChange($event.target)","(blur)":"onTouched()"},"providers":[{"__symbolic":"reference","name":"SELECT_MULTIPLE_VALUE_ACCESSOR"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}],"_registerOption":[{"__symbolic":"method"}],"_getOptionId":[{"__symbolic":"method"}],"_getOptionValue":[{"__symbolic":"method"}]}},"NgSelectMultipleOption":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"option"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host"}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","name":"SelectMultipleControlValueAccessor"}]}],"ngValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["ngValue"]}]}],"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["value"]}]}],"_setElementValue":[{"__symbolic":"method"}],"_setSelected":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}}}
{"__symbolic":"module","version":2,"metadata":{"SELECT_MULTIPLE_VALUE_ACCESSOR":{"provide":{"__symbolic":"reference","module":"./control_value_accessor","name":"NG_VALUE_ACCESSOR"},"useExisting":{"__symbolic":"reference","name":"SelectMultipleControlValueAccessor"},"multi":true},"SelectMultipleControlValueAccessor":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]","host":{"(change)":"onChange($event.target)","(blur)":"onTouched()"},"providers":[{"__symbolic":"reference","name":"SELECT_MULTIPLE_VALUE_ACCESSOR"}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"}]}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}],"_registerOption":[{"__symbolic":"method"}],"_getOptionId":[{"__symbolic":"method"}],"_getOptionValue":[{"__symbolic":"method"}]}},"NgSelectMultipleOption":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"option"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Host"}}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef"},{"__symbolic":"reference","module":"@angular/core","name":"Renderer"},{"__symbolic":"reference","name":"SelectMultipleControlValueAccessor"}]}],"ngValue":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["ngValue"]}]}],"value":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"},"arguments":["value"]}]}],"_setElementValue":[{"__symbolic":"method"}],"_setSelected":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}}}

@@ -18,5 +18,15 @@ /**

import { SelectMultipleControlValueAccessor } from './select_multiple_control_value_accessor';
/**
* @param {?} name
* @param {?} parent
* @return {?}
*/
export function controlPath(name, parent) {
return parent.path.concat([name]);
}
/**
* @param {?} control
* @param {?} dir
* @return {?}
*/
export function setUpControl(control, dir) {

@@ -50,10 +60,15 @@ if (!control)

dir._rawValidators.forEach(function (validator) {
if (validator.registerOnValidatorChange)
validator.registerOnValidatorChange(function () { return control.updateValueAndValidity(); });
if (((validator)).registerOnValidatorChange)
((validator)).registerOnValidatorChange(function () { return control.updateValueAndValidity(); });
});
dir._rawAsyncValidators.forEach(function (validator) {
if (validator.registerOnValidatorChange)
validator.registerOnValidatorChange(function () { return control.updateValueAndValidity(); });
if (((validator)).registerOnValidatorChange)
((validator)).registerOnValidatorChange(function () { return control.updateValueAndValidity(); });
});
}
/**
* @param {?} control
* @param {?} dir
* @return {?}
*/
export function cleanUpControl(control, dir) {

@@ -75,2 +90,7 @@ dir.valueAccessor.registerOnChange(function () { return _noControlError(dir); });

}
/**
* @param {?} control
* @param {?} dir
* @return {?}
*/
export function setUpFormContainer(control, dir) {

@@ -82,7 +102,16 @@ if (isBlank(control))

}
/**
* @param {?} dir
* @return {?}
*/
function _noControlError(dir) {
return _throwError(dir, 'There is no FormControl instance attached to form control element with');
}
/**
* @param {?} dir
* @param {?} message
* @return {?}
*/
function _throwError(dir, message) {
var messageEnd;
var /** @type {?} */ messageEnd;
if (dir.path.length > 1) {

@@ -99,5 +128,13 @@ messageEnd = "path: '" + dir.path.join(' -> ') + "'";

}
/**
* @param {?} validators
* @return {?}
*/
export function composeValidators(validators) {
return isPresent(validators) ? Validators.compose(validators.map(normalizeValidator)) : null;
}
/**
* @param {?} validators
* @return {?}
*/
export function composeAsyncValidators(validators) {

@@ -107,6 +144,11 @@ return isPresent(validators) ? Validators.composeAsync(validators.map(normalizeAsyncValidator)) :

}
/**
* @param {?} changes
* @param {?} viewModel
* @return {?}
*/
export function isPropertyUpdated(changes, viewModel) {
if (!changes.hasOwnProperty('model'))
return false;
var change = changes['model'];
var /** @type {?} */ change = changes['model'];
if (change.isFirstChange())

@@ -116,3 +158,3 @@ return true;

}
var BUILTIN_ACCESSORS = [
var /** @type {?} */ BUILTIN_ACCESSORS = [
CheckboxControlValueAccessor,

@@ -125,12 +167,20 @@ RangeValueAccessor,

];
/**
* @param {?} valueAccessor
* @return {?}
*/
export function isBuiltInAccessor(valueAccessor) {
return BUILTIN_ACCESSORS.some(function (a) { return valueAccessor.constructor === a; });
}
// TODO: vsavkin remove it once https://github.com/angular/angular/issues/3011 is implemented
/**
* @param {?} dir
* @param {?} valueAccessors
* @return {?}
*/
export function selectValueAccessor(dir, valueAccessors) {
if (!valueAccessors)
return null;
var defaultAccessor;
var builtinAccessor;
var customAccessor;
var /** @type {?} */ defaultAccessor;
var /** @type {?} */ builtinAccessor;
var /** @type {?} */ customAccessor;
valueAccessors.forEach(function (v) {

@@ -137,0 +187,0 @@ if (v.constructor === DefaultValueAccessor) {

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"controlPath":{"__symbolic":"function","parameters":["name","parent"],"value":[{"__symbolic":"spread","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"parent"},"member":"path"}},{"__symbolic":"reference","name":"name"}]},"composeValidators":{"__symbolic":"function","parameters":["validators"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../facade/lang","name":"isPresent"},"arguments":[{"__symbolic":"reference","name":"validators"}]},"thenExpression":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"../validators","name":"Validators"},"member":"compose"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"validators"},"member":"map"},"arguments":[{"__symbolic":"reference","module":"./normalize_validator","name":"normalizeValidator"}]}]},"elseExpression":null}},"composeAsyncValidators":{"__symbolic":"function","parameters":["validators"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../facade/lang","name":"isPresent"},"arguments":[{"__symbolic":"reference","name":"validators"}]},"thenExpression":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"../validators","name":"Validators"},"member":"composeAsync"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"validators"},"member":"map"},"arguments":[{"__symbolic":"reference","module":"./normalize_validator","name":"normalizeAsyncValidator"}]}]},"elseExpression":null}},"isBuiltInAccessor":{"__symbolic":"function","parameters":["valueAccessor"],"value":{"__symbolic":"error","message":"Function call not supported","line":146,"character":32}}}}
{"__symbolic":"module","version":2,"metadata":{"controlPath":{"__symbolic":"function","parameters":["name","parent"],"value":[{"__symbolic":"spread","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"parent"},"member":"path"}},{"__symbolic":"reference","name":"name"}]},"setUpControl":{"__symbolic":"function"},"cleanUpControl":{"__symbolic":"function"},"setUpFormContainer":{"__symbolic":"function"},"composeValidators":{"__symbolic":"function","parameters":["validators"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../facade/lang","name":"isPresent"},"arguments":[{"__symbolic":"reference","name":"validators"}]},"thenExpression":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"../validators","name":"Validators"},"member":"compose"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"validators"},"member":"map"},"arguments":[{"__symbolic":"reference","module":"./normalize_validator","name":"normalizeValidator"}]}]},"elseExpression":null}},"composeAsyncValidators":{"__symbolic":"function","parameters":["validators"],"value":{"__symbolic":"if","condition":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../facade/lang","name":"isPresent"},"arguments":[{"__symbolic":"reference","name":"validators"}]},"thenExpression":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"../validators","name":"Validators"},"member":"composeAsync"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"validators"},"member":"map"},"arguments":[{"__symbolic":"reference","module":"./normalize_validator","name":"normalizeAsyncValidator"}]}]},"elseExpression":null}},"isPropertyUpdated":{"__symbolic":"function"},"isBuiltInAccessor":{"__symbolic":"function","parameters":["valueAccessor"],"value":{"__symbolic":"error","message":"Function call not supported","line":146,"character":32}},"selectValueAccessor":{"__symbolic":"function"}}}

@@ -12,11 +12,23 @@ /**

}
/**
* @return {?}
*/
TemplateDrivenErrors.modelParentException = function () {
throw new Error("\n ngModel cannot be used to register form controls with a parent formGroup directive. Try using\n formGroup's partner directive \"formControlName\" instead. Example:\n\n " + Examples.formControlName + "\n\n Or, if you'd like to avoid registering this form control, indicate that it's standalone in ngModelOptions:\n\n Example:\n\n " + Examples.ngModelWithFormGroup);
};
/**
* @return {?}
*/
TemplateDrivenErrors.formGroupNameException = function () {
throw new Error("\n ngModel cannot be used to register form controls with a parent formGroupName or formArrayName directive.\n\n Option 1: Use formControlName instead of ngModel (reactive strategy):\n\n " + Examples.formGroupName + "\n\n Option 2: Update ngModel's parent be ngModelGroup (template-driven strategy):\n\n " + Examples.ngModelGroup);
};
/**
* @return {?}
*/
TemplateDrivenErrors.missingNameException = function () {
throw new Error("If ngModel is used within a form tag, either the name attribute must be set or the form\n control must be defined as 'standalone' in ngModelOptions.\n\n Example 1: <input [(ngModel)]=\"person.firstName\" name=\"first\">\n Example 2: <input [(ngModel)]=\"person.firstName\" [ngModelOptions]=\"{standalone: true}\">");
};
/**
* @return {?}
*/
TemplateDrivenErrors.modelGroupParentException = function () {

@@ -23,0 +35,0 @@ throw new Error("\n ngModelGroup cannot be used with a parent formGroup directive.\n\n Option 1: Use formGroupName instead of ngModelGroup (reactive strategy):\n\n " + Examples.formGroupName + "\n\n Option 2: Use a regular form tag instead of the formGroup directive (template-driven strategy):\n\n " + Examples.ngModelGroup);

import { Directive, Input, forwardRef } from '@angular/core';
import { NG_VALIDATORS, Validators } from '../validators';
export var REQUIRED_VALIDATOR = {
export var /** @type {?} */ REQUIRED_VALIDATOR = {
provide: NG_VALIDATORS,

@@ -9,12 +9,11 @@ useExisting: forwardRef(function () { return RequiredValidator; }),

/**
* A Directive that adds the `required` validator to any controls marked with the
* `required` attribute, via the {@link NG_VALIDATORS} binding.
*
* ### Example
*
* ```
* <input name="fullName" ngModel required>
* ```
*
* @stable
* A Directive that adds the `required` validator to any controls marked with the
* `required` attribute, via the {@link NG_VALIDATORS} binding.
* *
* ### Example
* *
* ```
* <input name="fullName" ngModel required>
* ```
* *
*/

@@ -25,3 +24,10 @@ export var RequiredValidator = (function () {

Object.defineProperty(RequiredValidator.prototype, "required", {
/**
* @return {?}
*/
get: function () { return this._required; },
/**
* @param {?} value
* @return {?}
*/
set: function (value) {

@@ -35,5 +41,13 @@ this._required = value != null && value !== false && "" + value !== 'false';

});
/**
* @param {?} c
* @return {?}
*/
RequiredValidator.prototype.validate = function (c) {
return this.required ? Validators.required(c) : null;
};
/**
* @param {?} fn
* @return {?}
*/
RequiredValidator.prototype.registerOnValidatorChange = function (fn) { this._onChange = fn; };

@@ -48,3 +62,3 @@ RequiredValidator.decorators = [

/** @nocollapse */
RequiredValidator.ctorParameters = [];
RequiredValidator.ctorParameters = function () { return []; };
RequiredValidator.propDecorators = {

@@ -55,2 +69,17 @@ 'required': [{ type: Input },],

}());
function RequiredValidator_tsickle_Closure_declarations() {
/** @type {?} */
RequiredValidator.decorators;
/**
* @nocollapse
* @type {?}
*/
RequiredValidator.ctorParameters;
/** @type {?} */
RequiredValidator.propDecorators;
/** @type {?} */
RequiredValidator.prototype._required;
/** @type {?} */
RequiredValidator.prototype._onChange;
}
/**

@@ -63,3 +92,3 @@ * Provider which adds {@link MinLengthValidator} to {@link NG_VALIDATORS}.

*/
export var MIN_LENGTH_VALIDATOR = {
export var /** @type {?} */ MIN_LENGTH_VALIDATOR = {
provide: NG_VALIDATORS,

@@ -70,6 +99,5 @@ useExisting: forwardRef(function () { return MinLengthValidator; }),

/**
* A directive which installs the {@link MinLengthValidator} for any `formControlName`,
* `formControl`, or control with `ngModel` that also has a `minlength` attribute.
*
* @stable
* A directive which installs the {@link MinLengthValidator} for any `formControlName`,
* `formControl`, or control with `ngModel` that also has a `minlength` attribute.
* *
*/

@@ -79,2 +107,6 @@ export var MinLengthValidator = (function () {

}
/**
* @param {?} changes
* @return {?}
*/
MinLengthValidator.prototype.ngOnChanges = function (changes) {

@@ -87,6 +119,17 @@ if ('minlength' in changes) {

};
/**
* @param {?} c
* @return {?}
*/
MinLengthValidator.prototype.validate = function (c) {
return this.minlength == null ? null : this._validator(c);
};
/**
* @param {?} fn
* @return {?}
*/
MinLengthValidator.prototype.registerOnValidatorChange = function (fn) { this._onChange = fn; };
/**
* @return {?}
*/
MinLengthValidator.prototype._createValidator = function () {

@@ -103,3 +146,3 @@ this._validator = Validators.minLength(parseInt(this.minlength, 10));

/** @nocollapse */
MinLengthValidator.ctorParameters = [];
MinLengthValidator.ctorParameters = function () { return []; };
MinLengthValidator.propDecorators = {

@@ -110,2 +153,19 @@ 'minlength': [{ type: Input },],

}());
function MinLengthValidator_tsickle_Closure_declarations() {
/** @type {?} */
MinLengthValidator.decorators;
/**
* @nocollapse
* @type {?}
*/
MinLengthValidator.ctorParameters;
/** @type {?} */
MinLengthValidator.propDecorators;
/** @type {?} */
MinLengthValidator.prototype._validator;
/** @type {?} */
MinLengthValidator.prototype._onChange;
/** @type {?} */
MinLengthValidator.prototype.minlength;
}
/**

@@ -118,3 +178,3 @@ * Provider which adds {@link MaxLengthValidator} to {@link NG_VALIDATORS}.

*/
export var MAX_LENGTH_VALIDATOR = {
export var /** @type {?} */ MAX_LENGTH_VALIDATOR = {
provide: NG_VALIDATORS,

@@ -125,7 +185,6 @@ useExisting: forwardRef(function () { return MaxLengthValidator; }),

/**
* A directive which installs the {@link MaxLengthValidator} for any `formControlName,
* `formControl`,
* or control with `ngModel` that also has a `maxlength` attribute.
*
* @stable
* A directive which installs the {@link MaxLengthValidator} for any `formControlName,
* `formControl`,
* or control with `ngModel` that also has a `maxlength` attribute.
* *
*/

@@ -135,2 +194,6 @@ export var MaxLengthValidator = (function () {

}
/**
* @param {?} changes
* @return {?}
*/
MaxLengthValidator.prototype.ngOnChanges = function (changes) {

@@ -143,6 +206,17 @@ if ('maxlength' in changes) {

};
/**
* @param {?} c
* @return {?}
*/
MaxLengthValidator.prototype.validate = function (c) {
return this.maxlength != null ? this._validator(c) : null;
};
/**
* @param {?} fn
* @return {?}
*/
MaxLengthValidator.prototype.registerOnValidatorChange = function (fn) { this._onChange = fn; };
/**
* @return {?}
*/
MaxLengthValidator.prototype._createValidator = function () {

@@ -159,3 +233,3 @@ this._validator = Validators.maxLength(parseInt(this.maxlength, 10));

/** @nocollapse */
MaxLengthValidator.ctorParameters = [];
MaxLengthValidator.ctorParameters = function () { return []; };
MaxLengthValidator.propDecorators = {

@@ -166,3 +240,20 @@ 'maxlength': [{ type: Input },],

}());
export var PATTERN_VALIDATOR = {
function MaxLengthValidator_tsickle_Closure_declarations() {
/** @type {?} */
MaxLengthValidator.decorators;
/**
* @nocollapse
* @type {?}
*/
MaxLengthValidator.ctorParameters;
/** @type {?} */
MaxLengthValidator.propDecorators;
/** @type {?} */
MaxLengthValidator.prototype._validator;
/** @type {?} */
MaxLengthValidator.prototype._onChange;
/** @type {?} */
MaxLengthValidator.prototype.maxlength;
}
export var /** @type {?} */ PATTERN_VALIDATOR = {
provide: NG_VALIDATORS,

@@ -173,13 +264,12 @@ useExisting: forwardRef(function () { return PatternValidator; }),

/**
* A Directive that adds the `pattern` validator to any controls marked with the
* `pattern` attribute, via the {@link NG_VALIDATORS} binding. Uses attribute value
* as the regex to validate Control value against. Follows pattern attribute
* semantics; i.e. regex must match entire Control value.
*
* ### Example
*
* ```
* <input [name]="fullName" pattern="[a-zA-Z ]*" ngModel>
* ```
* @stable
* A Directive that adds the `pattern` validator to any controls marked with the
* `pattern` attribute, via the {@link NG_VALIDATORS} binding. Uses attribute value
* as the regex to validate Control value against. Follows pattern attribute
* semantics; i.e. regex must match entire Control value.
* *
* ### Example
* *
* ```
* <input [name]="fullName" pattern="[a-zA-Z ]*" ngModel>
* ```
*/

@@ -189,2 +279,6 @@ export var PatternValidator = (function () {

}
/**
* @param {?} changes
* @return {?}
*/
PatternValidator.prototype.ngOnChanges = function (changes) {

@@ -197,4 +291,15 @@ if ('pattern' in changes) {

};
/**
* @param {?} c
* @return {?}
*/
PatternValidator.prototype.validate = function (c) { return this._validator(c); };
/**
* @param {?} fn
* @return {?}
*/
PatternValidator.prototype.registerOnValidatorChange = function (fn) { this._onChange = fn; };
/**
* @return {?}
*/
PatternValidator.prototype._createValidator = function () { this._validator = Validators.pattern(this.pattern); };

@@ -209,3 +314,3 @@ PatternValidator.decorators = [

/** @nocollapse */
PatternValidator.ctorParameters = [];
PatternValidator.ctorParameters = function () { return []; };
PatternValidator.propDecorators = {

@@ -216,2 +321,19 @@ 'pattern': [{ type: Input },],

}());
function PatternValidator_tsickle_Closure_declarations() {
/** @type {?} */
PatternValidator.decorators;
/**
* @nocollapse
* @type {?}
*/
PatternValidator.ctorParameters;
/** @type {?} */
PatternValidator.propDecorators;
/** @type {?} */
PatternValidator.prototype._validator;
/** @type {?} */
PatternValidator.prototype._onChange;
/** @type {?} */
PatternValidator.prototype.pattern;
}
//# sourceMappingURL=validators.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"REQUIRED_VALIDATOR":{"provide":{"__symbolic":"reference","module":"../validators","name":"NG_VALIDATORS"},"useExisting":{"__symbolic":"reference","name":"RequiredValidator"},"multi":true},"RequiredValidator":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[required][formControlName],[required][formControl],[required][ngModel]","providers":[{"__symbolic":"reference","name":"REQUIRED_VALIDATOR"}],"host":{"[attr.required]":"required ? \"\" : null"}}]}],"members":{"required":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"validate":[{"__symbolic":"method"}],"registerOnValidatorChange":[{"__symbolic":"method"}]}},"MIN_LENGTH_VALIDATOR":{"provide":{"__symbolic":"reference","module":"../validators","name":"NG_VALIDATORS"},"useExisting":{"__symbolic":"reference","name":"MinLengthValidator"},"multi":true},"MinLengthValidator":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[minlength][formControlName],[minlength][formControl],[minlength][ngModel]","providers":[{"__symbolic":"reference","name":"MIN_LENGTH_VALIDATOR"}],"host":{"[attr.minlength]":"minlength ? minlength : null"}}]}],"members":{"minlength":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"ngOnChanges":[{"__symbolic":"method"}],"validate":[{"__symbolic":"method"}],"registerOnValidatorChange":[{"__symbolic":"method"}],"_createValidator":[{"__symbolic":"method"}]}},"MAX_LENGTH_VALIDATOR":{"provide":{"__symbolic":"reference","module":"../validators","name":"NG_VALIDATORS"},"useExisting":{"__symbolic":"reference","name":"MaxLengthValidator"},"multi":true},"MaxLengthValidator":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]","providers":[{"__symbolic":"reference","name":"MAX_LENGTH_VALIDATOR"}],"host":{"[attr.maxlength]":"maxlength ? maxlength : null"}}]}],"members":{"maxlength":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"ngOnChanges":[{"__symbolic":"method"}],"validate":[{"__symbolic":"method"}],"registerOnValidatorChange":[{"__symbolic":"method"}],"_createValidator":[{"__symbolic":"method"}]}},"PATTERN_VALIDATOR":{"provide":{"__symbolic":"reference","module":"../validators","name":"NG_VALIDATORS"},"useExisting":{"__symbolic":"reference","name":"PatternValidator"},"multi":true},"PatternValidator":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[pattern][formControlName],[pattern][formControl],[pattern][ngModel]","providers":[{"__symbolic":"reference","name":"PATTERN_VALIDATOR"}],"host":{"[attr.pattern]":"pattern ? pattern : null"}}]}],"members":{"pattern":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"ngOnChanges":[{"__symbolic":"method"}],"validate":[{"__symbolic":"method"}],"registerOnValidatorChange":[{"__symbolic":"method"}],"_createValidator":[{"__symbolic":"method"}]}}}}
{"__symbolic":"module","version":2,"metadata":{"REQUIRED_VALIDATOR":{"provide":{"__symbolic":"reference","module":"../validators","name":"NG_VALIDATORS"},"useExisting":{"__symbolic":"reference","name":"RequiredValidator"},"multi":true},"RequiredValidator":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[required][formControlName],[required][formControl],[required][ngModel]","providers":[{"__symbolic":"reference","name":"REQUIRED_VALIDATOR"}],"host":{"[attr.required]":"required ? \"\" : null"}}]}],"members":{"required":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"validate":[{"__symbolic":"method"}],"registerOnValidatorChange":[{"__symbolic":"method"}]}},"MIN_LENGTH_VALIDATOR":{"provide":{"__symbolic":"reference","module":"../validators","name":"NG_VALIDATORS"},"useExisting":{"__symbolic":"reference","name":"MinLengthValidator"},"multi":true},"MinLengthValidator":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[minlength][formControlName],[minlength][formControl],[minlength][ngModel]","providers":[{"__symbolic":"reference","name":"MIN_LENGTH_VALIDATOR"}],"host":{"[attr.minlength]":"minlength ? minlength : null"}}]}],"members":{"minlength":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"ngOnChanges":[{"__symbolic":"method"}],"validate":[{"__symbolic":"method"}],"registerOnValidatorChange":[{"__symbolic":"method"}],"_createValidator":[{"__symbolic":"method"}]}},"MAX_LENGTH_VALIDATOR":{"provide":{"__symbolic":"reference","module":"../validators","name":"NG_VALIDATORS"},"useExisting":{"__symbolic":"reference","name":"MaxLengthValidator"},"multi":true},"MaxLengthValidator":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]","providers":[{"__symbolic":"reference","name":"MAX_LENGTH_VALIDATOR"}],"host":{"[attr.maxlength]":"maxlength ? maxlength : null"}}]}],"members":{"maxlength":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"ngOnChanges":[{"__symbolic":"method"}],"validate":[{"__symbolic":"method"}],"registerOnValidatorChange":[{"__symbolic":"method"}],"_createValidator":[{"__symbolic":"method"}]}},"PATTERN_VALIDATOR":{"provide":{"__symbolic":"reference","module":"../validators","name":"NG_VALIDATORS"},"useExisting":{"__symbolic":"reference","name":"PatternValidator"},"multi":true},"PatternValidator":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive"},"arguments":[{"selector":"[pattern][formControlName],[pattern][formControl],[pattern][ngModel]","providers":[{"__symbolic":"reference","name":"PATTERN_VALIDATOR"}],"host":{"[attr.pattern]":"pattern ? pattern : null"}}]}],"members":{"pattern":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input"}}]}],"ngOnChanges":[{"__symbolic":"method"}],"validate":[{"__symbolic":"method"}],"registerOnValidatorChange":[{"__symbolic":"method"}],"_createValidator":[{"__symbolic":"method"}]}}}}

@@ -17,47 +17,45 @@ /**

/**
* Use by directives and components to emit custom Events.
*
* ### Examples
*
* In the following example, `Zippy` alternatively emits `open` and `close` events when its
* title gets clicked:
*
* ```
* @Component({
* selector: 'zippy',
* template: `
* <div class="zippy">
* <div (click)="toggle()">Toggle</div>
* <div [hidden]="!visible">
* <ng-content></ng-content>
* </div>
* </div>`})
* export class Zippy {
* visible: boolean = true;
* @Output() open: EventEmitter<any> = new EventEmitter();
* @Output() close: EventEmitter<any> = new EventEmitter();
*
* toggle() {
* this.visible = !this.visible;
* if (this.visible) {
* this.open.emit(null);
* } else {
* this.close.emit(null);
* }
* }
* }
* ```
*
* The events payload can be accessed by the parameter `$event` on the components output event
* handler:
*
* ```
* <zippy (open)="onOpen($event)" (close)="onClose($event)"></zippy>
* ```
*
* Uses Rx.Observable but provides an adapter to make it work as specified here:
* https://github.com/jhusain/observable-spec
*
* Once a reference implementation of the spec is available, switch to it.
* @stable
* Use by directives and components to emit custom Events.
* *
* ### Examples
* *
* In the following example, `Zippy` alternatively emits `open` and `close` events when its
* title gets clicked:
* *
* ```
* selector: 'zippy',
* template: `
* <div class="zippy">
* <div (click)="toggle()">Toggle</div>
* <div [hidden]="!visible">
* <ng-content></ng-content>
* </div>
* </div>`})
* export class Zippy {
* visible: boolean = true;
* @Output() open: EventEmitter<any> = new EventEmitter();
* @Output() close: EventEmitter<any> = new EventEmitter();
* *
* toggle() {
* this.visible = !this.visible;
* if (this.visible) {
* this.open.emit(null);
* } else {
* this.close.emit(null);
* }
* }
* }
* ```
* *
* The events payload can be accessed by the parameter `$event` on the components output event
* handler:
* *
* ```
* <zippy (open)="onOpen($event)" (close)="onClose($event)"></zippy>
* ```
* *
* Uses Rx.Observable but provides an adapter to make it work as specified here:
* https://github.com/jhusain/observable-spec
* *
* Once a reference implementation of the spec is available, switch to it.
*/

@@ -67,4 +65,5 @@ export var EventEmitter = (function (_super) {

/**
* Creates an instance of [EventEmitter], which depending on [isAsync],
* delivers events synchronously or asynchronously.
* Creates an instance of [EventEmitter], which depending on [isAsync],
* delivers events synchronously or asynchronously.
* @param {?=} isAsync
*/

@@ -76,7 +75,17 @@ function EventEmitter(isAsync) {

}
/**
* @param {?=} value
* @return {?}
*/
EventEmitter.prototype.emit = function (value) { _super.prototype.next.call(this, value); };
/**
* @param {?=} generatorOrNext
* @param {?=} error
* @param {?=} complete
* @return {?}
*/
EventEmitter.prototype.subscribe = function (generatorOrNext, error, complete) {
var schedulerFn;
var errorFn = function (err) { return null; };
var completeFn = function () { return null; };
var /** @type {?} */ schedulerFn;
var /** @type {?} */ errorFn = function (err) { return null; };
var /** @type {?} */ completeFn = function () { return null; };
if (generatorOrNext && typeof generatorOrNext === 'object') {

@@ -111,2 +120,6 @@ schedulerFn = this.__isAsync ? function (value) {

}(Subject));
function EventEmitter_tsickle_Closure_declarations() {
/** @type {?} */
EventEmitter.prototype.__isAsync;
}
//# sourceMappingURL=async.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"rxjs/Observable","export":["Observable"]},{"from":"rxjs/Subject","export":["Subject"]}]}
{"__symbolic":"module","version":2,"metadata":{"EventEmitter":{"__symbolic":"class"}},"exports":[{"from":"rxjs/Observable","export":["Observable"]},{"from":"rxjs/Subject","export":["Subject"]}]}

@@ -10,3 +10,3 @@ /**

/**
* Wraps Javascript Objects
* Wraps Javascript Objects
*/

@@ -16,4 +16,9 @@ export var StringMapWrapper = (function () {

}
/**
* @param {?} m1
* @param {?} m2
* @return {?}
*/
StringMapWrapper.merge = function (m1, m2) {
var m = {};
var /** @type {?} */ m = {};
for (var _i = 0, _a = Object.keys(m1); _i < _a.length; _i++) {

@@ -29,10 +34,15 @@ var k = _a[_i];

};
/**
* @param {?} m1
* @param {?} m2
* @return {?}
*/
StringMapWrapper.equals = function (m1, m2) {
var k1 = Object.keys(m1);
var k2 = Object.keys(m2);
var /** @type {?} */ k1 = Object.keys(m1);
var /** @type {?} */ k2 = Object.keys(m2);
if (k1.length != k2.length) {
return false;
}
for (var i = 0; i < k1.length; i++) {
var key = k1[i];
for (var /** @type {?} */ i = 0; i < k1.length; i++) {
var /** @type {?} */ key = k1[i];
if (m1[key] !== m2[key]) {

@@ -49,5 +59,10 @@ return false;

}
/**
* @param {?} list
* @param {?} items
* @return {?}
*/
ListWrapper.removeAll = function (list, items) {
for (var i = 0; i < items.length; ++i) {
var index = list.indexOf(items[i]);
for (var /** @type {?} */ i = 0; i < items.length; ++i) {
var /** @type {?} */ index = list.indexOf(items[i]);
if (index > -1) {

@@ -58,4 +73,9 @@ list.splice(index, 1);

};
/**
* @param {?} list
* @param {?} el
* @return {?}
*/
ListWrapper.remove = function (list, el) {
var index = list.indexOf(el);
var /** @type {?} */ index = list.indexOf(el);
if (index > -1) {

@@ -67,6 +87,11 @@ list.splice(index, 1);

};
/**
* @param {?} a
* @param {?} b
* @return {?}
*/
ListWrapper.equals = function (a, b) {
if (a.length != b.length)
return false;
for (var i = 0; i < a.length; ++i) {
for (var /** @type {?} */ i = 0; i < a.length; ++i) {
if (a[i] !== b[i])

@@ -77,6 +102,10 @@ return false;

};
/**
* @param {?} list
* @return {?}
*/
ListWrapper.flatten = function (list) {
return list.reduce(function (flat, item) {
var flatItem = Array.isArray(item) ? ListWrapper.flatten(item) : item;
return flat.concat(flatItem);
var /** @type {?} */ flatItem = Array.isArray(item) ? ListWrapper.flatten(item) : item;
return ((flat)).concat(flatItem);
}, []);

@@ -86,2 +115,6 @@ };

}());
/**
* @param {?} obj
* @return {?}
*/
export function isListLikeIterable(obj) {

@@ -94,8 +127,14 @@ if (!isJsObject(obj))

}
/**
* @param {?} a
* @param {?} b
* @param {?} comparator
* @return {?}
*/
export function areIterablesEqual(a, b, comparator) {
var iterator1 = a[getSymbolIterator()]();
var iterator2 = b[getSymbolIterator()]();
var /** @type {?} */ iterator1 = a[getSymbolIterator()]();
var /** @type {?} */ iterator2 = b[getSymbolIterator()]();
while (true) {
var item1 = iterator1.next();
var item2 = iterator2.next();
var /** @type {?} */ item1 = iterator1.next();
var /** @type {?} */ item2 = iterator2.next();
if (item1.done && item2.done)

@@ -109,5 +148,10 @@ return true;

}
/**
* @param {?} obj
* @param {?} fn
* @return {?}
*/
export function iterateListLike(obj, fn) {
if (Array.isArray(obj)) {
for (var i = 0; i < obj.length; i++) {
for (var /** @type {?} */ i = 0; i < obj.length; i++) {
fn(obj[i]);

@@ -117,4 +161,4 @@ }

else {
var iterator = obj[getSymbolIterator()]();
var item = void 0;
var /** @type {?} */ iterator = obj[getSymbolIterator()]();
var /** @type {?} */ item = void 0;
while (!((item = iterator.next()).done)) {

@@ -121,0 +165,0 @@ fn(item.value);

@@ -8,15 +8,19 @@ /**

*/
var globalScope;
var /** @type {?} */ globalScope;
if (typeof window === 'undefined') {
if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) {
// TODO: Replace any with WorkerGlobalScope from lib.webworker.d.ts #3492
globalScope = self;
globalScope = (self);
}
else {
globalScope = global;
globalScope = (global);
}
}
else {
globalScope = window;
globalScope = (window);
}
/**
* @param {?} fn
* @return {?}
*/
export function scheduleMicroTask(fn) {

@@ -27,4 +31,8 @@ Zone.current.scheduleMicroTask('scheduleMicrotask', fn);

// exports the original value of the symbol.
var _global = globalScope;
var /** @type {?} */ _global = globalScope;
export { _global as global };
/**
* @param {?} type
* @return {?}
*/
export function getTypeNameForDebugging(type) {

@@ -39,15 +47,35 @@ return type['name'] || typeof type;

};
/**
* @param {?} obj
* @return {?}
*/
export function isPresent(obj) {
return obj != null;
}
/**
* @param {?} obj
* @return {?}
*/
export function isBlank(obj) {
return obj == null;
}
var STRING_MAP_PROTO = Object.getPrototypeOf({});
var /** @type {?} */ STRING_MAP_PROTO = Object.getPrototypeOf({});
/**
* @param {?} obj
* @return {?}
*/
export function isStrictStringMap(obj) {
return typeof obj === 'object' && obj !== null && Object.getPrototypeOf(obj) === STRING_MAP_PROTO;
}
/**
* @param {?} obj
* @return {?}
*/
export function isDate(obj) {
return obj instanceof Date && !isNaN(obj.valueOf());
}
/**
* @param {?} token
* @return {?}
*/
export function stringify(token) {

@@ -66,4 +94,4 @@ if (typeof token === 'string') {

}
var res = token.toString();
var newLineIndex = res.indexOf('\n');
var /** @type {?} */ res = token.toString();
var /** @type {?} */ newLineIndex = res.indexOf('\n');
return newLineIndex === -1 ? res : res.substring(0, newLineIndex);

@@ -74,4 +102,8 @@ }

}
/**
* @param {?} text
* @return {?}
*/
NumberWrapper.parseIntAutoRadix = function (text) {
var result = parseInt(text);
var /** @type {?} */ result = parseInt(text);
if (isNaN(result)) {

@@ -82,23 +114,49 @@ throw new Error('Invalid integer literal when parsing ' + text);

};
/**
* @param {?} value
* @return {?}
*/
NumberWrapper.isNumeric = function (value) { return !isNaN(value - parseFloat(value)); };
return NumberWrapper;
}());
// JS has NaN !== NaN
/**
* @param {?} a
* @param {?} b
* @return {?}
*/
export function looseIdentical(a, b) {
return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);
}
/**
* @param {?} o
* @return {?}
*/
export function isJsObject(o) {
return o !== null && (typeof o === 'function' || typeof o === 'object');
}
/**
* @param {?} obj
* @return {?}
*/
export function print(obj) {
console.log(obj);
}
/**
* @param {?} obj
* @return {?}
*/
export function warn(obj) {
console.warn(obj);
}
/**
* @param {?} global
* @param {?} path
* @param {?} value
* @return {?}
*/
export function setValueOnPath(global, path, value) {
var parts = path.split('.');
var obj = global;
var /** @type {?} */ parts = path.split('.');
var /** @type {?} */ obj = global;
while (parts.length > 1) {
var name_1 = parts.shift();
var /** @type {?} */ name_1 = parts.shift();
if (obj.hasOwnProperty(name_1) && obj[name_1] != null) {

@@ -116,6 +174,9 @@ obj = obj[name_1];

}
var _symbolIterator = null;
var /** @type {?} */ _symbolIterator = null;
/**
* @return {?}
*/
export function getSymbolIterator() {
if (!_symbolIterator) {
if (globalScope.Symbol && Symbol.iterator) {
if (((globalScope)).Symbol && Symbol.iterator) {
_symbolIterator = Symbol.iterator;

@@ -125,7 +186,7 @@ }

// es6-shim specific logic
var keys = Object.getOwnPropertyNames(Map.prototype);
for (var i = 0; i < keys.length; ++i) {
var key = keys[i];
var /** @type {?} */ keys = Object.getOwnPropertyNames(Map.prototype);
for (var /** @type {?} */ i = 0; i < keys.length; ++i) {
var /** @type {?} */ key = keys[i];
if (key !== 'entries' && key !== 'size' &&
Map.prototype[key] === Map.prototype['entries']) {
((Map)).prototype[key] === Map.prototype['entries']) {
_symbolIterator = key;

@@ -138,5 +199,13 @@ }

}
/**
* @param {?} obj
* @return {?}
*/
export function isPrimitive(obj) {
return !isJsObject(obj);
}
/**
* @param {?} s
* @return {?}
*/
export function escapeRegExp(s) {

@@ -143,0 +212,0 @@ return s.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"getTypeNameForDebugging":{"__symbolic":"function","parameters":["type"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"type"},"index":"name"},"right":{"__symbolic":"error","message":"Expression form not supported","line":60,"character":25}}},"isPresent":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"!=","left":{"__symbolic":"reference","name":"obj"},"right":null}},"isBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"==","left":{"__symbolic":"reference","name":"obj"},"right":null}},"isStrictStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":80,"character":9},"right":"object"},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{}]}}}},"isDate":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"Date"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"valueOf"}}]}}}},"looseIdentical":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"a"},"right":{"__symbolic":"reference","name":"b"}},"right":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":123,"character":20},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":123,"character":45},"right":"number"}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"a"}]}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"b"}]}}}},"isJsObject":{"__symbolic":"function","parameters":["o"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"o"},"right":null},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":127,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":127,"character":51},"right":"object"}}}},"isPrimitive":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isJsObject"},"arguments":[{"__symbolic":"reference","name":"obj"}]}}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":182,"character":19}}}}
{"__symbolic":"module","version":2,"metadata":{"scheduleMicroTask":{"__symbolic":"function"},"getTypeNameForDebugging":{"__symbolic":"function","parameters":["type"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"index","expression":{"__symbolic":"reference","name":"type"},"index":"name"},"right":{"__symbolic":"error","message":"Expression form not supported","line":60,"character":25}}},"isPresent":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"!=","left":{"__symbolic":"reference","name":"obj"},"right":null}},"isBlank":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"==","left":{"__symbolic":"reference","name":"obj"},"right":null}},"isStrictStringMap":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":80,"character":9},"right":"object"},"right":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"obj"},"right":null}},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{"__symbolic":"reference","name":"obj"}]},"right":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"getPrototypeOf"},"arguments":[{}]}}}},"isDate":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"obj"},"right":{"__symbolic":"reference","name":"Date"}},"right":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"obj"},"member":"valueOf"}}]}}}},"stringify":{"__symbolic":"function"},"NumberWrapper":{"__symbolic":"class"},"looseIdentical":{"__symbolic":"function","parameters":["a","b"],"value":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"reference","name":"a"},"right":{"__symbolic":"reference","name":"b"}},"right":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":123,"character":20},"right":"number"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":123,"character":45},"right":"number"}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"a"}]}},"right":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isNaN"},"arguments":[{"__symbolic":"reference","name":"b"}]}}}},"isJsObject":{"__symbolic":"function","parameters":["o"],"value":{"__symbolic":"binop","operator":"&&","left":{"__symbolic":"binop","operator":"!==","left":{"__symbolic":"reference","name":"o"},"right":null},"right":{"__symbolic":"binop","operator":"||","left":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":127,"character":24},"right":"function"},"right":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"error","message":"Expression form not supported","line":127,"character":51},"right":"object"}}}},"print":{"__symbolic":"function"},"warn":{"__symbolic":"function"},"setValueOnPath":{"__symbolic":"function"},"getSymbolIterator":{"__symbolic":"function"},"isPrimitive":{"__symbolic":"function","parameters":["obj"],"value":{"__symbolic":"pre","operator":"!","operand":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"isJsObject"},"arguments":[{"__symbolic":"reference","name":"obj"}]}}},"escapeRegExp":{"__symbolic":"function","parameters":["s"],"value":{"__symbolic":"error","message":"Expression form not supported","line":182,"character":19}}}}

@@ -12,20 +12,17 @@ /**

/**
* @whatItDoes Creates an {@link AbstractControl} from a user-specified configuration.
*
* It is essentially syntactic sugar that shortens the `new FormGroup()`,
* `new FormControl()`, and `new FormArray()` boilerplate that can build up in larger
* forms.
*
* @howToUse
*
* To use, inject `FormBuilder` into your component class. You can then call its methods
* directly.
*
* {@example forms/ts/formBuilder/form_builder_example.ts region='Component'}
*
* * **npm package**: `@angular/forms`
*
* * **NgModule**: {@link ReactiveFormsModule}
*
* @stable
* *
* It is essentially syntactic sugar that shortens the `new FormGroup()`,
* `new FormControl()`, and `new FormArray()` boilerplate that can build up in larger
* forms.
* *
* *
* To use, inject `FormBuilder` into your component class. You can then call its methods
* directly.
* *
* {@example forms/ts/formBuilder/form_builder_example.ts region='Component'}
* *
* * **npm package**: `@angular/forms`
* *
* * **NgModule**: {@link ReactiveFormsModule}
* *
*/

@@ -36,21 +33,28 @@ export var FormBuilder = (function () {

/**
* Construct a new {@link FormGroup} with the given map of configuration.
* Valid keys for the `extra` parameter map are `validator` and `asyncValidator`.
*
* See the {@link FormGroup} constructor for more details.
* Construct a new {@link FormGroup} with the given map of configuration.
* Valid keys for the `extra` parameter map are `validator` and `asyncValidator`.
* *
* See the {@link FormGroup} constructor for more details.
* @param {?} controlsConfig
* @param {?=} extra
* @return {?}
*/
FormBuilder.prototype.group = function (controlsConfig, extra) {
if (extra === void 0) { extra = null; }
var controls = this._reduceControls(controlsConfig);
var validator = isPresent(extra) ? extra['validator'] : null;
var asyncValidator = isPresent(extra) ? extra['asyncValidator'] : null;
var /** @type {?} */ controls = this._reduceControls(controlsConfig);
var /** @type {?} */ validator = isPresent(extra) ? extra['validator'] : null;
var /** @type {?} */ asyncValidator = isPresent(extra) ? extra['asyncValidator'] : null;
return new FormGroup(controls, validator, asyncValidator);
};
/**
* Construct a new {@link FormControl} with the given `formState`,`validator`, and
* `asyncValidator`.
*
* `formState` can either be a standalone value for the form control or an object
* that contains both a value and a disabled status.
*
* Construct a new {@link FormControl} with the given `formState`,`validator`, and
* `asyncValidator`.
* *
* `formState` can either be a standalone value for the form control or an object
* that contains both a value and a disabled status.
* *
* @param {?} formState
* @param {?=} validator
* @param {?=} asyncValidator
* @return {?}
*/

@@ -63,4 +67,8 @@ FormBuilder.prototype.control = function (formState, validator, asyncValidator) {

/**
* Construct a {@link FormArray} from the given `controlsConfig` array of
* configuration, with the given optional `validator` and `asyncValidator`.
* Construct a {@link FormArray} from the given `controlsConfig` array of
* configuration, with the given optional `validator` and `asyncValidator`.
* @param {?} controlsConfig
* @param {?=} validator
* @param {?=} asyncValidator
* @return {?}
*/

@@ -71,9 +79,12 @@ FormBuilder.prototype.array = function (controlsConfig, validator, asyncValidator) {

if (asyncValidator === void 0) { asyncValidator = null; }
var controls = controlsConfig.map(function (c) { return _this._createControl(c); });
var /** @type {?} */ controls = controlsConfig.map(function (c) { return _this._createControl(c); });
return new FormArray(controls, validator, asyncValidator);
};
/** @internal */
/**
* @param {?} controlsConfig
* @return {?}
*/
FormBuilder.prototype._reduceControls = function (controlsConfig) {
var _this = this;
var controls = {};
var /** @type {?} */ controls = {};
Object.keys(controlsConfig).forEach(function (controlName) {

@@ -84,3 +95,6 @@ controls[controlName] = _this._createControl(controlsConfig[controlName]);

};
/** @internal */
/**
* @param {?} controlConfig
* @return {?}
*/
FormBuilder.prototype._createControl = function (controlConfig) {

@@ -92,5 +106,5 @@ if (controlConfig instanceof FormControl || controlConfig instanceof FormGroup ||

else if (Array.isArray(controlConfig)) {
var value = controlConfig[0];
var validator = controlConfig.length > 1 ? controlConfig[1] : null;
var asyncValidator = controlConfig.length > 2 ? controlConfig[2] : null;
var /** @type {?} */ value = controlConfig[0];
var /** @type {?} */ validator = controlConfig.length > 1 ? controlConfig[1] : null;
var /** @type {?} */ asyncValidator = controlConfig.length > 2 ? controlConfig[2] : null;
return this.control(value, validator, asyncValidator);

@@ -106,5 +120,14 @@ }

/** @nocollapse */
FormBuilder.ctorParameters = [];
FormBuilder.ctorParameters = function () { return []; };
return FormBuilder;
}());
function FormBuilder_tsickle_Closure_declarations() {
/** @type {?} */
FormBuilder.decorators;
/**
* @nocollapse
* @type {?}
*/
FormBuilder.ctorParameters;
}
//# sourceMappingURL=form_builder.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"FormBuilder":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"group":[{"__symbolic":"method"}],"control":[{"__symbolic":"method"}],"array":[{"__symbolic":"method"}],"_reduceControls":[{"__symbolic":"method"}],"_createControl":[{"__symbolic":"method"}]}}}}
{"__symbolic":"module","version":2,"metadata":{"FormBuilder":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"group":[{"__symbolic":"method"}],"control":[{"__symbolic":"method"}],"array":[{"__symbolic":"method"}],"_reduceControls":[{"__symbolic":"method"}],"_createControl":[{"__symbolic":"method"}]}}}}

@@ -13,4 +13,3 @@ /**

/**
* The ng module for forms.
* @stable
* The ng module for forms.
*/

@@ -28,8 +27,16 @@ export var FormsModule = (function () {

/** @nocollapse */
FormsModule.ctorParameters = [];
FormsModule.ctorParameters = function () { return []; };
return FormsModule;
}());
function FormsModule_tsickle_Closure_declarations() {
/** @type {?} */
FormsModule.decorators;
/**
* @nocollapse
* @type {?}
*/
FormsModule.ctorParameters;
}
/**
* The ng module for reactive forms.
* @stable
* The ng module for reactive forms.
*/

@@ -47,5 +54,14 @@ export var ReactiveFormsModule = (function () {

/** @nocollapse */
ReactiveFormsModule.ctorParameters = [];
ReactiveFormsModule.ctorParameters = function () { return []; };
return ReactiveFormsModule;
}());
function ReactiveFormsModule_tsickle_Closure_declarations() {
/** @type {?} */
ReactiveFormsModule.decorators;
/**
* @nocollapse
* @type {?}
*/
ReactiveFormsModule.ctorParameters;
}
//# sourceMappingURL=form_providers.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"FormsModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":{"__symbolic":"reference","module":"./directives","name":"TEMPLATE_DRIVEN_DIRECTIVES"},"providers":[{"__symbolic":"reference","module":"./directives/radio_control_value_accessor","name":"RadioControlRegistry"}],"exports":[{"__symbolic":"reference","module":"./directives","name":"InternalFormsSharedModule"},{"__symbolic":"reference","module":"./directives","name":"TEMPLATE_DRIVEN_DIRECTIVES"}]}]}]},"ReactiveFormsModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[{"__symbolic":"reference","module":"./directives","name":"REACTIVE_DRIVEN_DIRECTIVES"}],"providers":[{"__symbolic":"reference","module":"./form_builder","name":"FormBuilder"},{"__symbolic":"reference","module":"./directives/radio_control_value_accessor","name":"RadioControlRegistry"}],"exports":[{"__symbolic":"reference","module":"./directives","name":"InternalFormsSharedModule"},{"__symbolic":"reference","module":"./directives","name":"REACTIVE_DRIVEN_DIRECTIVES"}]}]}]}}}
{"__symbolic":"module","version":2,"metadata":{"FormsModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":{"__symbolic":"reference","module":"./directives","name":"TEMPLATE_DRIVEN_DIRECTIVES"},"providers":[{"__symbolic":"reference","module":"./directives/radio_control_value_accessor","name":"RadioControlRegistry"}],"exports":[{"__symbolic":"reference","module":"./directives","name":"InternalFormsSharedModule"},{"__symbolic":"reference","module":"./directives","name":"TEMPLATE_DRIVEN_DIRECTIVES"}]}]}]},"ReactiveFormsModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{"declarations":[{"__symbolic":"reference","module":"./directives","name":"REACTIVE_DRIVEN_DIRECTIVES"}],"providers":[{"__symbolic":"reference","module":"./form_builder","name":"FormBuilder"},{"__symbolic":"reference","module":"./directives/radio_control_value_accessor","name":"RadioControlRegistry"}],"exports":[{"__symbolic":"reference","module":"./directives","name":"InternalFormsSharedModule"},{"__symbolic":"reference","module":"./directives","name":"REACTIVE_DRIVEN_DIRECTIVES"}]}]}]}}}

@@ -41,3 +41,3 @@ /**

export { NG_ASYNC_VALIDATORS, NG_VALIDATORS, Validators } from './validators';
export * from './form_providers';
export { FormsModule, ReactiveFormsModule } from './form_providers';
//# sourceMappingURL=forms.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./directives/abstract_control_directive","export":["AbstractControlDirective"]},{"from":"./directives/abstract_form_group_directive","export":["AbstractFormGroupDirective"]},{"from":"./directives/checkbox_value_accessor","export":["CheckboxControlValueAccessor"]},{"from":"./directives/control_container","export":["ControlContainer"]},{"from":"./directives/control_value_accessor","export":["ControlValueAccessor","NG_VALUE_ACCESSOR"]},{"from":"./directives/default_value_accessor","export":["DefaultValueAccessor"]},{"from":"./directives/form_interface","export":["Form"]},{"from":"./directives/ng_control","export":["NgControl"]},{"from":"./directives/ng_control_status","export":["NgControlStatus","NgControlStatusGroup"]},{"from":"./directives/ng_form","export":["NgForm"]},{"from":"./directives/ng_model","export":["NgModel"]},{"from":"./directives/ng_model_group","export":["NgModelGroup"]},{"from":"./directives/radio_control_value_accessor","export":["RadioControlValueAccessor"]},{"from":"./directives/reactive_directives/form_control_directive","export":["FormControlDirective"]},{"from":"./directives/reactive_directives/form_control_name","export":["FormControlName"]},{"from":"./directives/reactive_directives/form_group_directive","export":["FormGroupDirective"]},{"from":"./directives/reactive_directives/form_group_name","export":["FormArrayName"]},{"from":"./directives/reactive_directives/form_group_name","export":["FormGroupName"]},{"from":"./directives/select_control_value_accessor","export":["NgSelectOption","SelectControlValueAccessor"]},{"from":"./directives/select_multiple_control_value_accessor","export":["SelectMultipleControlValueAccessor"]},{"from":"./directives/validators","export":["AsyncValidatorFn","MaxLengthValidator","MinLengthValidator","PatternValidator","RequiredValidator","Validator","ValidatorFn"]},{"from":"./form_builder","export":["FormBuilder"]},{"from":"./model","export":["AbstractControl","FormArray","FormControl","FormGroup"]},{"from":"./validators","export":["NG_ASYNC_VALIDATORS","NG_VALIDATORS","Validators"]},{"from":"./form_providers"}]}
{"__symbolic":"module","version":2,"metadata":{},"exports":[{"from":"./directives/abstract_control_directive","export":["AbstractControlDirective"]},{"from":"./directives/abstract_form_group_directive","export":["AbstractFormGroupDirective"]},{"from":"./directives/checkbox_value_accessor","export":["CheckboxControlValueAccessor"]},{"from":"./directives/control_container","export":["ControlContainer"]},{"from":"./directives/control_value_accessor","export":["ControlValueAccessor","NG_VALUE_ACCESSOR"]},{"from":"./directives/default_value_accessor","export":["DefaultValueAccessor"]},{"from":"./directives/form_interface","export":["Form"]},{"from":"./directives/ng_control","export":["NgControl"]},{"from":"./directives/ng_control_status","export":["NgControlStatus","NgControlStatusGroup"]},{"from":"./directives/ng_form","export":["NgForm"]},{"from":"./directives/ng_model","export":["NgModel"]},{"from":"./directives/ng_model_group","export":["NgModelGroup"]},{"from":"./directives/radio_control_value_accessor","export":["RadioControlValueAccessor"]},{"from":"./directives/reactive_directives/form_control_directive","export":["FormControlDirective"]},{"from":"./directives/reactive_directives/form_control_name","export":["FormControlName"]},{"from":"./directives/reactive_directives/form_group_directive","export":["FormGroupDirective"]},{"from":"./directives/reactive_directives/form_group_name","export":["FormArrayName"]},{"from":"./directives/reactive_directives/form_group_name","export":["FormGroupName"]},{"from":"./directives/select_control_value_accessor","export":["NgSelectOption","SelectControlValueAccessor"]},{"from":"./directives/select_multiple_control_value_accessor","export":["SelectMultipleControlValueAccessor"]},{"from":"./directives/validators","export":["AsyncValidatorFn","MaxLengthValidator","MinLengthValidator","PatternValidator","RequiredValidator","Validator","ValidatorFn"]},{"from":"./form_builder","export":["FormBuilder"]},{"from":"./model","export":["AbstractControl","FormArray","FormControl","FormGroup"]},{"from":"./validators","export":["NG_ASYNC_VALIDATORS","NG_VALIDATORS","Validators"]},{"from":"./form_providers"}]}

@@ -20,7 +20,7 @@ /**

*/
export var VALID = 'VALID';
export var /** @type {?} */ VALID = 'VALID';
/**
* Indicates that a FormControl is invalid, i.e. that an error exists in the input value.
*/
export var INVALID = 'INVALID';
export var /** @type {?} */ INVALID = 'INVALID';
/**

@@ -30,3 +30,3 @@ * Indicates that a FormControl is pending, i.e. that async validation is occurring and

*/
export var PENDING = 'PENDING';
export var /** @type {?} */ PENDING = 'PENDING';
/**

@@ -36,6 +36,16 @@ * Indicates that a FormControl is disabled, i.e. that the control is exempt from ancestor

*/
export var DISABLED = 'DISABLED';
export var /** @type {?} */ DISABLED = 'DISABLED';
/**
* @param {?} control
* @return {?}
*/
export function isControl(control) {
return control instanceof AbstractControl;
}
/**
* @param {?} control
* @param {?} path
* @param {?} delimiter
* @return {?}
*/
function _find(control, path, delimiter) {

@@ -45,7 +55,7 @@ if (path == null)

if (!(path instanceof Array)) {
path = path.split(delimiter);
path = ((path)).split(delimiter);
}
if (path instanceof Array && (path.length === 0))
return null;
return path.reduce(function (v, name) {
return ((path)).reduce(function (v, name) {
if (v instanceof FormGroup) {

@@ -55,3 +65,3 @@ return v.controls[name] || null;

if (v instanceof FormArray) {
return v.at(name) || null;
return v.at(/** @type {?} */ (name)) || null;
}

@@ -61,8 +71,20 @@ return null;

}
/**
* @param {?} r
* @return {?}
*/
function toObservable(r) {
return isPromise(r) ? fromPromise(r) : r;
}
/**
* @param {?} validator
* @return {?}
*/
function coerceToValidator(validator) {
return Array.isArray(validator) ? composeValidators(validator) : validator;
}
/**
* @param {?} asyncValidator
* @return {?}
*/
function coerceToAsyncValidator(asyncValidator) {

@@ -72,13 +94,16 @@ return Array.isArray(asyncValidator) ? composeAsyncValidators(asyncValidator) : asyncValidator;

/**
* @whatItDoes This is the base class for {@link FormControl}, {@link FormGroup}, and
* {@link FormArray}.
*
* It provides some of the shared behavior that all controls and groups of controls have, like
* running validators, calculating status, and resetting state. It also defines the properties
* that are shared between all sub-classes, like `value`, `valid`, and `dirty`. It shouldn't be
* instantiated directly.
*
* @stable
* {@link FormArray}.
* *
* It provides some of the shared behavior that all controls and groups of controls have, like
* running validators, calculating status, and resetting state. It also defines the properties
* that are shared between all sub-classes, like `value`, `valid`, and `dirty`. It shouldn't be
* instantiated directly.
* *
* @abstract
*/
export var AbstractControl = (function () {
/**
* @param {?} validator
* @param {?} asyncValidator
*/
function AbstractControl(validator, asyncValidator) {

@@ -96,3 +121,4 @@ this.validator = validator;

/**
* The value of the control.
* The value of the control.
* @return {?}
*/

@@ -105,3 +131,4 @@ get: function () { return this._value; },

/**
* The parent control.
* The parent control.
* @return {?}
*/

@@ -114,12 +141,13 @@ get: function () { return this._parent; },

/**
* The validation status of the control. There are four possible
* validation statuses:
*
* * **VALID**: control has passed all validation checks
* * **INVALID**: control has failed at least one validation check
* * **PENDING**: control is in the midst of conducting a validation check
* * **DISABLED**: control is exempt from validation checks
*
* These statuses are mutually exclusive, so a control cannot be
* both valid AND invalid or invalid AND disabled.
* The validation status of the control. There are four possible
* validation statuses:
* *
* * **VALID**: control has passed all validation checks
* * **INVALID**: control has failed at least one validation check
* * **PENDING**: control is in the midst of conducting a validation check
* * **DISABLED**: control is exempt from validation checks
* *
* These statuses are mutually exclusive, so a control cannot be
* both valid AND invalid or invalid AND disabled.
* @return {?}
*/

@@ -132,6 +160,7 @@ get: function () { return this._status; },

/**
* A control is `valid` when its `status === VALID`.
*
* In order to have this status, the control must have passed all its
* validation checks.
* A control is `valid` when its `status === VALID`.
* *
* In order to have this status, the control must have passed all its
* validation checks.
* @return {?}
*/

@@ -144,6 +173,7 @@ get: function () { return this._status === VALID; },

/**
* A control is `invalid` when its `status === INVALID`.
*
* In order to have this status, the control must have failed
* at least one of its validation checks.
* A control is `invalid` when its `status === INVALID`.
* *
* In order to have this status, the control must have failed
* at least one of its validation checks.
* @return {?}
*/

@@ -156,6 +186,7 @@ get: function () { return this._status === INVALID; },

/**
* A control is `pending` when its `status === PENDING`.
*
* In order to have this status, the control must be in the
* middle of conducting a validation check.
* A control is `pending` when its `status === PENDING`.
* *
* In order to have this status, the control must be in the
* middle of conducting a validation check.
* @return {?}
*/

@@ -168,7 +199,8 @@ get: function () { return this._status == PENDING; },

/**
* A control is `disabled` when its `status === DISABLED`.
*
* Disabled controls are exempt from validation checks and
* are not included in the aggregate value of their ancestor
* controls.
* A control is `disabled` when its `status === DISABLED`.
* *
* Disabled controls are exempt from validation checks and
* are not included in the aggregate value of their ancestor
* controls.
* @return {?}
*/

@@ -181,6 +213,7 @@ get: function () { return this._status === DISABLED; },

/**
* A control is `enabled` as long as its `status !== DISABLED`.
*
* In other words, it has a status of `VALID`, `INVALID`, or
* `PENDING`.
* A control is `enabled` as long as its `status !== DISABLED`.
* *
* In other words, it has a status of `VALID`, `INVALID`, or
* `PENDING`.
* @return {?}
*/

@@ -193,4 +226,5 @@ get: function () { return this._status !== DISABLED; },

/**
* Returns any errors generated by failing validation. If there
* are no errors, it will return null.
* Returns any errors generated by failing validation. If there
* are no errors, it will return null.
* @return {?}
*/

@@ -203,7 +237,8 @@ get: function () { return this._errors; },

/**
* A control is `pristine` if the user has not yet changed
* the value in the UI.
*
* Note that programmatic changes to a control's value will
* *not* mark it dirty.
* A control is `pristine` if the user has not yet changed
* the value in the UI.
* *
* Note that programmatic changes to a control's value will
* *not* mark it dirty.
* @return {?}
*/

@@ -216,7 +251,8 @@ get: function () { return this._pristine; },

/**
* A control is `dirty` if the user has changed the value
* in the UI.
*
* Note that programmatic changes to a control's value will
* *not* mark it dirty.
* A control is `dirty` if the user has changed the value
* in the UI.
* *
* Note that programmatic changes to a control's value will
* *not* mark it dirty.
* @return {?}
*/

@@ -229,5 +265,6 @@ get: function () { return !this.pristine; },

/**
* A control is marked `touched` once the user has triggered
* a `blur` event on it.
*/
* A control is marked `touched` once the user has triggered
* a `blur` event on it.
* @return {?}
*/
get: function () { return this._touched; },

@@ -239,4 +276,5 @@ enumerable: true,

/**
* A control is `untouched` if the user has not yet triggered
* a `blur` event on it.
* A control is `untouched` if the user has not yet triggered
* a `blur` event on it.
* @return {?}
*/

@@ -249,4 +287,5 @@ get: function () { return !this._touched; },

/**
* Emits an event every time the value of the control changes, in
* the UI or programmatically.
* Emits an event every time the value of the control changes, in
* the UI or programmatically.
* @return {?}
*/

@@ -259,4 +298,5 @@ get: function () { return this._valueChanges; },

/**
* Emits an event every time the validation status of the control
* is re-calculated.
* Emits an event every time the validation status of the control
* is re-calculated.
* @return {?}
*/

@@ -268,4 +308,6 @@ get: function () { return this._statusChanges; },

/**
* Sets the synchronous validators that are active on this control. Calling
* this will overwrite any existing sync validators.
* Sets the synchronous validators that are active on this control. Calling
* this will overwrite any existing sync validators.
* @param {?} newValidator
* @return {?}
*/

@@ -276,4 +318,6 @@ AbstractControl.prototype.setValidators = function (newValidator) {

/**
* Sets the async validators that are active on this control. Calling this
* will overwrite any existing async validators.
* Sets the async validators that are active on this control. Calling this
* will overwrite any existing async validators.
* @param {?} newValidator
* @return {?}
*/

@@ -284,14 +328,18 @@ AbstractControl.prototype.setAsyncValidators = function (newValidator) {

/**
* Empties out the sync validator list.
* Empties out the sync validator list.
* @return {?}
*/
AbstractControl.prototype.clearValidators = function () { this.validator = null; };
/**
* Empties out the async validator list.
* Empties out the async validator list.
* @return {?}
*/
AbstractControl.prototype.clearAsyncValidators = function () { this.asyncValidator = null; };
/**
* Marks the control as `touched`.
*
* This will also mark all direct ancestors as `touched` to maintain
* the model.
* Marks the control as `touched`.
* *
* This will also mark all direct ancestors as `touched` to maintain
* the model.
* @param {?=} __0
* @return {?}
*/

@@ -306,7 +354,9 @@ AbstractControl.prototype.markAsTouched = function (_a) {

/**
* Marks the control as `untouched`.
*
* If the control has any children, it will also mark all children as `untouched`
* to maintain the model, and re-calculate the `touched` status of all parent
* controls.
* Marks the control as `untouched`.
* *
* If the control has any children, it will also mark all children as `untouched`
* to maintain the model, and re-calculate the `touched` status of all parent
* controls.
* @param {?=} __0
* @return {?}
*/

@@ -322,6 +372,8 @@ AbstractControl.prototype.markAsUntouched = function (_a) {

/**
* Marks the control as `dirty`.
*
* This will also mark all direct ancestors as `dirty` to maintain
* the model.
* Marks the control as `dirty`.
* *
* This will also mark all direct ancestors as `dirty` to maintain
* the model.
* @param {?=} __0
* @return {?}
*/

@@ -336,7 +388,9 @@ AbstractControl.prototype.markAsDirty = function (_a) {

/**
* Marks the control as `pristine`.
*
* If the control has any children, it will also mark all children as `pristine`
* to maintain the model, and re-calculate the `pristine` status of all parent
* controls.
* Marks the control as `pristine`.
* *
* If the control has any children, it will also mark all children as `pristine`
* to maintain the model, and re-calculate the `pristine` status of all parent
* controls.
* @param {?=} __0
* @return {?}
*/

@@ -352,3 +406,5 @@ AbstractControl.prototype.markAsPristine = function (_a) {

/**
* Marks the control as `pending`.
* Marks the control as `pending`.
* @param {?=} __0
* @return {?}
*/

@@ -363,6 +419,8 @@ AbstractControl.prototype.markAsPending = function (_a) {

/**
* Disables the control. This means the control will be exempt from validation checks and
* excluded from the aggregate value of any parent. Its status is `DISABLED`.
*
* If the control has children, all children will be disabled to maintain the model.
* Disables the control. This means the control will be exempt from validation checks and
* excluded from the aggregate value of any parent. Its status is `DISABLED`.
* *
* If the control has children, all children will be disabled to maintain the model.
* @param {?=} __0
* @return {?}
*/

@@ -383,7 +441,9 @@ AbstractControl.prototype.disable = function (_a) {

/**
* Enables the control. This means the control will be included in validation checks and
* the aggregate value of its parent. Its status is re-calculated based on its value and
* its validators.
*
* If the control has children, all children will be enabled.
* Enables the control. This means the control will be included in validation checks and
* the aggregate value of its parent. Its status is re-calculated based on its value and
* its validators.
* *
* If the control has children, all children will be enabled.
* @param {?=} __0
* @return {?}
*/

@@ -398,2 +458,6 @@ AbstractControl.prototype.enable = function (_a) {

};
/**
* @param {?} onlySelf
* @return {?}
*/
AbstractControl.prototype._updateAncestors = function (onlySelf) {

@@ -406,8 +470,38 @@ if (this._parent && !onlySelf) {

};
/**
* @param {?} parent
* @return {?}
*/
AbstractControl.prototype.setParent = function (parent) { this._parent = parent; };
/**
* Re-calculates the value and validation status of the control.
*
* By default, it will also update the value and validity of its ancestors.
* Sets the value of the control. Abstract method (implemented in sub-classes).
* @abstract
* @param {?} value
* @param {?=} options
* @return {?}
*/
AbstractControl.prototype.setValue = function (value, options) { };
/**
* Patches the value of the control. Abstract method (implemented in sub-classes).
* @abstract
* @param {?} value
* @param {?=} options
* @return {?}
*/
AbstractControl.prototype.patchValue = function (value, options) { };
/**
* Resets the control. Abstract method (implemented in sub-classes).
* @abstract
* @param {?=} value
* @param {?=} options
* @return {?}
*/
AbstractControl.prototype.reset = function (value, options) { };
/**
* Re-calculates the value and validation status of the control.
* *
* By default, it will also update the value and validity of its ancestors.
* @param {?=} __0
* @return {?}
*/
AbstractControl.prototype.updateValueAndValidity = function (_a) {

@@ -432,3 +526,6 @@ var _b = _a === void 0 ? {} : _a, onlySelf = _b.onlySelf, emitEvent = _b.emitEvent;

};
/** @internal */
/**
* @param {?=} __0
* @return {?}
*/
AbstractControl.prototype._updateTreeValidity = function (_a) {

@@ -439,6 +536,16 @@ var emitEvent = (_a === void 0 ? { emitEvent: true } : _a).emitEvent;

};
/**
* @return {?}
*/
AbstractControl.prototype._setInitialStatus = function () { this._status = this._allControlsDisabled() ? DISABLED : VALID; };
/**
* @return {?}
*/
AbstractControl.prototype._runValidator = function () {
return this.validator ? this.validator(this) : null;
};
/**
* @param {?} emitEvent
* @return {?}
*/
AbstractControl.prototype._runAsyncValidator = function (emitEvent) {

@@ -449,3 +556,3 @@ var _this = this;

this._cancelExistingSubscription();
var obs = toObservable(this.asyncValidator(this));
var /** @type {?} */ obs = toObservable(this.asyncValidator(this));
this._asyncValidationSubscription =

@@ -455,2 +562,5 @@ obs.subscribe({ next: function (res) { return _this.setErrors(res, { emitEvent: emitEvent }); } });

};
/**
* @return {?}
*/
AbstractControl.prototype._cancelExistingSubscription = function () {

@@ -462,23 +572,26 @@ if (this._asyncValidationSubscription) {

/**
* Sets errors on a form control.
*
* This is used when validations are run manually by the user, rather than automatically.
*
* Calling `setErrors` will also update the validity of the parent control.
*
* ### Example
*
* ```
* const login = new FormControl("someLogin");
* login.setErrors({
* "notUnique": true
* });
*
* expect(login.valid).toEqual(false);
* expect(login.errors).toEqual({"notUnique": true});
*
* login.setValue("someOtherLogin");
*
* expect(login.valid).toEqual(true);
* ```
* Sets errors on a form control.
* *
* This is used when validations are run manually by the user, rather than automatically.
* *
* Calling `setErrors` will also update the validity of the parent control.
* *
* ### Example
* *
* ```
* const login = new FormControl("someLogin");
* login.setErrors({
* "notUnique": true
* });
* *
* expect(login.valid).toEqual(false);
* expect(login.errors).toEqual({"notUnique": true});
* *
* login.setValue("someOtherLogin");
* *
* expect(login.valid).toEqual(true);
* ```
* @param {?} errors
* @param {?=} __1
* @return {?}
*/

@@ -491,31 +604,39 @@ AbstractControl.prototype.setErrors = function (errors, _a) {

/**
* Retrieves a child control given the control's name or path.
*
* Paths can be passed in as an array or a string delimited by a dot.
*
* To get a control nested within a `person` sub-group:
*
* * `this.form.get('person.name');`
*
* -OR-
*
* * `this.form.get(['person', 'name']);`
* Retrieves a child control given the control's name or path.
* *
* Paths can be passed in as an array or a string delimited by a dot.
* *
* To get a control nested within a `person` sub-group:
* *
* * `this.form.get('person.name');`
* *
* -OR-
* *
* * `this.form.get(['person', 'name']);`
* @param {?} path
* @return {?}
*/
AbstractControl.prototype.get = function (path) { return _find(this, path, '.'); };
/**
* Returns true if the control with the given path has the error specified. Otherwise
* returns null or undefined.
*
* If no path is given, it checks for the error on the present control.
* Returns true if the control with the given path has the error specified. Otherwise
* returns null or undefined.
* *
* If no path is given, it checks for the error on the present control.
* @param {?} errorCode
* @param {?=} path
* @return {?}
*/
AbstractControl.prototype.getError = function (errorCode, path) {
if (path === void 0) { path = null; }
var control = path ? this.get(path) : this;
var /** @type {?} */ control = path ? this.get(path) : this;
return control && control._errors ? control._errors[errorCode] : null;
};
/**
* Returns true if the control with the given path has the error specified. Otherwise
* returns false.
*
* If no path is given, it checks for the error on the present control.
* Returns true if the control with the given path has the error specified. Otherwise
* returns false.
* *
* If no path is given, it checks for the error on the present control.
* @param {?} errorCode
* @param {?=} path
* @return {?}
*/

@@ -528,6 +649,7 @@ AbstractControl.prototype.hasError = function (errorCode, path) {

/**
* Retrieves the top-level ancestor of this control.
* Retrieves the top-level ancestor of this control.
* @return {?}
*/
get: function () {
var x = this;
var /** @type {?} */ x = this;
while (x._parent) {

@@ -541,3 +663,6 @@ x = x._parent;

});
/** @internal */
/**
* @param {?} emitEvent
* @return {?}
*/
AbstractControl.prototype._updateControlsErrors = function (emitEvent) {

@@ -552,3 +677,5 @@ this._status = this._calculateStatus();

};
/** @internal */
/**
* @return {?}
*/
AbstractControl.prototype._initObservables = function () {

@@ -558,2 +685,5 @@ this._valueChanges = new EventEmitter();

};
/**
* @return {?}
*/
AbstractControl.prototype._calculateStatus = function () {

@@ -570,15 +700,47 @@ if (this._allControlsDisabled())

};
/** @internal */
/**
* @abstract
* @return {?}
*/
AbstractControl.prototype._updateValue = function () { };
/**
* @abstract
* @param {?} cb
* @return {?}
*/
AbstractControl.prototype._forEachChild = function (cb) { };
/**
* @abstract
* @param {?} condition
* @return {?}
*/
AbstractControl.prototype._anyControls = function (condition) { };
/**
* @abstract
* @return {?}
*/
AbstractControl.prototype._allControlsDisabled = function () { };
/**
* @param {?} status
* @return {?}
*/
AbstractControl.prototype._anyControlsHaveStatus = function (status) {
return this._anyControls(function (control) { return control.status === status; });
};
/** @internal */
/**
* @return {?}
*/
AbstractControl.prototype._anyControlsDirty = function () {
return this._anyControls(function (control) { return control.dirty; });
};
/** @internal */
/**
* @return {?}
*/
AbstractControl.prototype._anyControlsTouched = function () {
return this._anyControls(function (control) { return control.touched; });
};
/** @internal */
/**
* @param {?=} __0
* @return {?}
*/
AbstractControl.prototype._updatePristine = function (_a) {

@@ -591,3 +753,6 @@ var onlySelf = (_a === void 0 ? {} : _a).onlySelf;

};
/** @internal */
/**
* @param {?=} __0
* @return {?}
*/
AbstractControl.prototype._updateTouched = function (_a) {

@@ -600,3 +765,6 @@ var onlySelf = (_a === void 0 ? {} : _a).onlySelf;

};
/** @internal */
/**
* @param {?} formState
* @return {?}
*/
AbstractControl.prototype._isBoxedValue = function (formState) {

@@ -606,51 +774,84 @@ return typeof formState === 'object' && formState !== null &&

};
/** @internal */
/**
* @param {?} fn
* @return {?}
*/
AbstractControl.prototype._registerOnCollectionChange = function (fn) { this._onCollectionChange = fn; };
return AbstractControl;
}());
function AbstractControl_tsickle_Closure_declarations() {
/** @type {?} */
AbstractControl.prototype._value;
/** @type {?} */
AbstractControl.prototype._onCollectionChange;
/** @type {?} */
AbstractControl.prototype._valueChanges;
/** @type {?} */
AbstractControl.prototype._statusChanges;
/** @type {?} */
AbstractControl.prototype._status;
/** @type {?} */
AbstractControl.prototype._errors;
/** @type {?} */
AbstractControl.prototype._pristine;
/** @type {?} */
AbstractControl.prototype._touched;
/** @type {?} */
AbstractControl.prototype._parent;
/** @type {?} */
AbstractControl.prototype._asyncValidationSubscription;
/** @type {?} */
AbstractControl.prototype._onDisabledChange;
/** @type {?} */
AbstractControl.prototype.validator;
/** @type {?} */
AbstractControl.prototype.asyncValidator;
}
/**
* @whatItDoes Tracks the value and validation status of an individual form control.
*
* It is one of the three fundamental building blocks of Angular forms, along with
* {@link FormGroup} and {@link FormArray}.
*
* @howToUse
*
* When instantiating a {@link FormControl}, you can pass in an initial value as the
* first argument. Example:
*
* ```ts
* const ctrl = new FormControl('some value');
* console.log(ctrl.value); // 'some value'
*```
*
* You can also initialize the control with a form state object on instantiation,
* which includes both the value and whether or not the control is disabled.
* You can't use the value key without the disabled key; both are required
* to use this way of initialization.
*
* ```ts
* const ctrl = new FormControl({value: 'n/a', disabled: true});
* console.log(ctrl.value); // 'n/a'
* console.log(ctrl.status); // 'DISABLED'
* ```
*
* To include a sync validator (or an array of sync validators) with the control,
* pass it in as the second argument. Async validators are also supported, but
* have to be passed in separately as the third arg.
*
* ```ts
* const ctrl = new FormControl('', Validators.required);
* console.log(ctrl.value); // ''
* console.log(ctrl.status); // 'INVALID'
* ```
*
* See its superclass, {@link AbstractControl}, for more properties and methods.
*
* * **npm package**: `@angular/forms`
*
* @stable
* *
* It is one of the three fundamental building blocks of Angular forms, along with
* {@link FormGroup} and {@link FormArray}.
* *
* *
* When instantiating a {@link FormControl}, you can pass in an initial value as the
* first argument. Example:
* *
* ```ts
* const ctrl = new FormControl('some value');
* console.log(ctrl.value); // 'some value'
* *```
* *
* You can also initialize the control with a form state object on instantiation,
* which includes both the value and whether or not the control is disabled.
* You can't use the value key without the disabled key; both are required
* to use this way of initialization.
* *
* ```ts
* const ctrl = new FormControl({value: 'n/a', disabled: true});
* console.log(ctrl.value); // 'n/a'
* console.log(ctrl.status); // 'DISABLED'
* ```
* *
* To include a sync validator (or an array of sync validators) with the control,
* pass it in as the second argument. Async validators are also supported, but
* have to be passed in separately as the third arg.
* *
* ```ts
* const ctrl = new FormControl('', Validators.required);
* console.log(ctrl.value); // ''
* console.log(ctrl.status); // 'INVALID'
* ```
* *
* See its superclass, {@link AbstractControl}, for more properties and methods.
* *
* * **npm package**: `@angular/forms`
* *
*/
export var FormControl = (function (_super) {
__extends(FormControl, _super);
/**
* @param {?=} formState
* @param {?=} validator
* @param {?=} asyncValidator
*/
function FormControl(formState, validator, asyncValidator) {

@@ -668,17 +869,20 @@ if (formState === void 0) { formState = null; }

/**
* Set the value of the form control to `value`.
*
* If `onlySelf` is `true`, this change will only affect the validation of this `FormControl`
* and not its parent component. This defaults to false.
*
* If `emitEvent` is `true`, this
* change will cause a `valueChanges` event on the `FormControl` to be emitted. This defaults
* to true (as it falls through to `updateValueAndValidity`).
*
* If `emitModelToViewChange` is `true`, the view will be notified about the new value
* via an `onChange` event. This is the default behavior if `emitModelToViewChange` is not
* specified.
*
* If `emitViewToModelChange` is `true`, an ngModelChange event will be fired to update the
* model. This is the default behavior if `emitViewToModelChange` is not specified.
* Set the value of the form control to `value`.
* *
* If `onlySelf` is `true`, this change will only affect the validation of this `FormControl`
* and not its parent component. This defaults to false.
* *
* If `emitEvent` is `true`, this
* change will cause a `valueChanges` event on the `FormControl` to be emitted. This defaults
* to true (as it falls through to `updateValueAndValidity`).
* *
* If `emitModelToViewChange` is `true`, the view will be notified about the new value
* via an `onChange` event. This is the default behavior if `emitModelToViewChange` is not
* specified.
* *
* If `emitViewToModelChange` is `true`, an ngModelChange event will be fired to update the
* model. This is the default behavior if `emitViewToModelChange` is not specified.
* @param {?} value
* @param {?=} __1
* @return {?}
*/

@@ -695,7 +899,10 @@ FormControl.prototype.setValue = function (value, _a) {

/**
* Patches the value of a control.
*
* This function is functionally the same as {@link FormControl.setValue} at this level.
* It exists for symmetry with {@link FormGroup.patchValue} on `FormGroups` and `FormArrays`,
* where it does behave differently.
* Patches the value of a control.
* *
* This function is functionally the same as {@link FormControl.setValue} at this level.
* It exists for symmetry with {@link FormGroup.patchValue} on `FormGroups` and `FormArrays`,
* where it does behave differently.
* @param {?} value
* @param {?=} options
* @return {?}
*/

@@ -707,28 +914,31 @@ FormControl.prototype.patchValue = function (value, options) {

/**
* Resets the form control. This means by default:
*
* * it is marked as `pristine`
* * it is marked as `untouched`
* * value is set to null
*
* You can also reset to a specific form state by passing through a standalone
* value or a form state object that contains both a value and a disabled state
* (these are the only two properties that cannot be calculated).
*
* Ex:
*
* ```ts
* this.control.reset('Nancy');
*
* console.log(this.control.value); // 'Nancy'
* ```
*
* OR
*
* ```
* this.control.reset({value: 'Nancy', disabled: true});
*
* console.log(this.control.value); // 'Nancy'
* console.log(this.control.status); // 'DISABLED'
* ```
* Resets the form control. This means by default:
* *
* * it is marked as `pristine`
* * it is marked as `untouched`
* * value is set to null
* *
* You can also reset to a specific form state by passing through a standalone
* value or a form state object that contains both a value and a disabled state
* (these are the only two properties that cannot be calculated).
* *
* Ex:
* *
* ```ts
* this.control.reset('Nancy');
* *
* console.log(this.control.value); // 'Nancy'
* ```
* *
* OR
* *
* ```
* this.control.reset({value: 'Nancy', disabled: true});
* *
* console.log(this.control.value); // 'Nancy'
* console.log(this.control.status); // 'DISABLED'
* ```
* @param {?=} formState
* @param {?=} __1
* @return {?}
*/

@@ -744,19 +954,22 @@ FormControl.prototype.reset = function (formState, _a) {

/**
* @internal
* @return {?}
*/
FormControl.prototype._updateValue = function () { };
/**
* @internal
* @param {?} condition
* @return {?}
*/
FormControl.prototype._anyControls = function (condition) { return false; };
/**
* @internal
* @return {?}
*/
FormControl.prototype._allControlsDisabled = function () { return this.disabled; };
/**
* Register a listener for change events.
* Register a listener for change events.
* @param {?} fn
* @return {?}
*/
FormControl.prototype.registerOnChange = function (fn) { this._onChange.push(fn); };
/**
* @internal
* @return {?}
*/

@@ -769,3 +982,5 @@ FormControl.prototype._clearChangeFns = function () {

/**
* Register a listener for disabled events.
* Register a listener for disabled events.
* @param {?} fn
* @return {?}
*/

@@ -776,5 +991,10 @@ FormControl.prototype.registerOnDisabledChange = function (fn) {

/**
* @internal
* @param {?} cb
* @return {?}
*/
FormControl.prototype._forEachChild = function (cb) { };
/**
* @param {?} formState
* @return {?}
*/
FormControl.prototype._applyFormState = function (formState) {

@@ -792,56 +1012,62 @@ if (this._isBoxedValue(formState)) {

}(AbstractControl));
function FormControl_tsickle_Closure_declarations() {
/** @type {?} */
FormControl.prototype._onChange;
}
/**
* @whatItDoes Tracks the value and validity state of a group of {@link FormControl}
* instances.
*
* A `FormGroup` aggregates the values of each child {@link FormControl} into one object,
* with each control name as the key. It calculates its status by reducing the statuses
* of its children. For example, if one of the controls in a group is invalid, the entire
* group becomes invalid.
*
* `FormGroup` is one of the three fundamental building blocks used to define forms in Angular,
* along with {@link FormControl} and {@link FormArray}.
*
* @howToUse
*
* When instantiating a {@link FormGroup}, pass in a collection of child controls as the first
* argument. The key for each child will be the name under which it is registered.
*
* ### Example
*
* ```
* const form = new FormGroup({
* first: new FormControl('Nancy', Validators.minLength(2)),
* last: new FormControl('Drew'),
* });
*
* console.log(form.value); // {first: 'Nancy', last; 'Drew'}
* console.log(form.status); // 'VALID'
* ```
*
* You can also include group-level validators as the second arg, or group-level async
* validators as the third arg. These come in handy when you want to perform validation
* that considers the value of more than one child control.
*
* ### Example
*
* ```
* const form = new FormGroup({
* password: new FormControl('', Validators.minLength(2)),
* passwordConfirm: new FormControl('', Validators.minLength(2)),
* }, passwordMatchValidator);
*
*
* function passwordMatchValidator(g: FormGroup) {
* return g.get('password').value === g.get('passwordConfirm').value
* ? null : {'mismatch': true};
* }
* ```
*
* * **npm package**: `@angular/forms`
*
* @stable
* instances.
* *
* A `FormGroup` aggregates the values of each child {@link FormControl} into one object,
* with each control name as the key. It calculates its status by reducing the statuses
* of its children. For example, if one of the controls in a group is invalid, the entire
* group becomes invalid.
* *
* `FormGroup` is one of the three fundamental building blocks used to define forms in Angular,
* along with {@link FormControl} and {@link FormArray}.
* *
* *
* When instantiating a {@link FormGroup}, pass in a collection of child controls as the first
* argument. The key for each child will be the name under which it is registered.
* *
* ### Example
* *
* ```
* const form = new FormGroup({
* first: new FormControl('Nancy', Validators.minLength(2)),
* last: new FormControl('Drew'),
* });
* *
* console.log(form.value); // {first: 'Nancy', last; 'Drew'}
* console.log(form.status); // 'VALID'
* ```
* *
* You can also include group-level validators as the second arg, or group-level async
* validators as the third arg. These come in handy when you want to perform validation
* that considers the value of more than one child control.
* *
* ### Example
* *
* ```
* const form = new FormGroup({
* password: new FormControl('', Validators.minLength(2)),
* passwordConfirm: new FormControl('', Validators.minLength(2)),
* }, passwordMatchValidator);
* *
* *
* function passwordMatchValidator(g: FormGroup) {
* return g.get('password').value === g.get('passwordConfirm').value
* ? null : {'mismatch': true};
* }
* ```
* *
* * **npm package**: `@angular/forms`
* *
*/
export var FormGroup = (function (_super) {
__extends(FormGroup, _super);
/**
* @param {?} controls
* @param {?=} validator
* @param {?=} asyncValidator
*/
function FormGroup(controls, validator, asyncValidator) {

@@ -857,6 +1083,9 @@ if (validator === void 0) { validator = null; }

/**
* Registers a control with the group's list of controls.
*
* This method does not update value or validity of the control, so for
* most cases you'll want to use {@link FormGroup.addControl} instead.
* Registers a control with the group's list of controls.
* *
* This method does not update value or validity of the control, so for
* most cases you'll want to use {@link FormGroup.addControl} instead.
* @param {?} name
* @param {?} control
* @return {?}
*/

@@ -872,3 +1101,6 @@ FormGroup.prototype.registerControl = function (name, control) {

/**
* Add a control to this group.
* Add a control to this group.
* @param {?} name
* @param {?} control
* @return {?}
*/

@@ -881,3 +1113,5 @@ FormGroup.prototype.addControl = function (name, control) {

/**
* Remove a control from this group.
* Remove a control from this group.
* @param {?} name
* @return {?}
*/

@@ -892,3 +1126,6 @@ FormGroup.prototype.removeControl = function (name) {

/**
* Replace an existing control.
* Replace an existing control.
* @param {?} name
* @param {?} control
* @return {?}
*/

@@ -905,6 +1142,8 @@ FormGroup.prototype.setControl = function (name, control) {

/**
* Check whether there is an enabled control with the given name in the group.
*
* It will return false for disabled controls. If you'd like to check for
* existence in the group only, use {@link AbstractControl.get} instead.
* Check whether there is an enabled control with the given name in the group.
* *
* It will return false for disabled controls. If you'd like to check for
* existence in the group only, use {@link AbstractControl.get} instead.
* @param {?} controlName
* @return {?}
*/

@@ -916,21 +1155,24 @@ FormGroup.prototype.contains = function (controlName) {

* Sets the value of the {@link FormGroup}. It accepts an object that matches
* the structure of the group, with control names as keys.
*
* This method performs strict checks, so it will throw an error if you try
* to set the value of a control that doesn't exist or if you exclude the
* value of a control.
*
* ### Example
*
* ```
* const form = new FormGroup({
* first: new FormControl(),
* last: new FormControl()
* });
* console.log(form.value); // {first: null, last: null}
*
* form.setValue({first: 'Nancy', last: 'Drew'});
* console.log(form.value); // {first: 'Nancy', last: 'Drew'}
*
* ```
* the structure of the group, with control names as keys.
* *
* This method performs strict checks, so it will throw an error if you try
* to set the value of a control that doesn't exist or if you exclude the
* value of a control.
* *
* ### Example
* *
* ```
* const form = new FormGroup({
* first: new FormControl(),
* last: new FormControl()
* });
* console.log(form.value); // {first: null, last: null}
* *
* form.setValue({first: 'Nancy', last: 'Drew'});
* console.log(form.value); // {first: 'Nancy', last: 'Drew'}
* *
* ```
* @param {?} value
* @param {?=} __1
* @return {?}
*/

@@ -949,20 +1191,23 @@ FormGroup.prototype.setValue = function (value, _a) {

* Patches the value of the {@link FormGroup}. It accepts an object with control
* names as keys, and will do its best to match the values to the correct controls
* in the group.
*
* It accepts both super-sets and sub-sets of the group without throwing an error.
*
* ### Example
*
* ```
* const form = new FormGroup({
* first: new FormControl(),
* last: new FormControl()
* });
* console.log(form.value); // {first: null, last: null}
*
* form.patchValue({first: 'Nancy'});
* console.log(form.value); // {first: 'Nancy', last: null}
*
* ```
* names as keys, and will do its best to match the values to the correct controls
* in the group.
* *
* It accepts both super-sets and sub-sets of the group without throwing an error.
* *
* ### Example
* *
* ```
* const form = new FormGroup({
* first: new FormControl(),
* last: new FormControl()
* });
* console.log(form.value); // {first: null, last: null}
* *
* form.patchValue({first: 'Nancy'});
* console.log(form.value); // {first: 'Nancy', last: null}
* *
* ```
* @param {?} value
* @param {?=} __1
* @return {?}
*/

@@ -980,32 +1225,35 @@ FormGroup.prototype.patchValue = function (value, _a) {

/**
* Resets the {@link FormGroup}. This means by default:
*
* * The group and all descendants are marked `pristine`
* * The group and all descendants are marked `untouched`
* * The value of all descendants will be null or null maps
*
* You can also reset to a specific form state by passing in a map of states
* that matches the structure of your form, with control names as keys. The state
* can be a standalone value or a form state object with both a value and a disabled
* status.
*
* ### Example
*
* ```ts
* this.form.reset({first: 'name', last: 'last name'});
*
* console.log(this.form.value); // {first: 'name', last: 'last name'}
* ```
*
* - OR -
*
* ```
* this.form.reset({
* first: {value: 'name', disabled: true},
* last: 'last'
* });
*
* console.log(this.form.value); // {first: 'name', last: 'last name'}
* console.log(this.form.get('first').status); // 'DISABLED'
* ```
* Resets the {@link FormGroup}. This means by default:
* *
* * The group and all descendants are marked `pristine`
* * The group and all descendants are marked `untouched`
* * The value of all descendants will be null or null maps
* *
* You can also reset to a specific form state by passing in a map of states
* that matches the structure of your form, with control names as keys. The state
* can be a standalone value or a form state object with both a value and a disabled
* status.
* *
* ### Example
* *
* ```ts
* this.form.reset({first: 'name', last: 'last name'});
* *
* console.log(this.form.value); // {first: 'name', last: 'last name'}
* ```
* *
* - OR -
* *
* ```
* this.form.reset({
* first: {value: 'name', disabled: true},
* last: 'last'
* });
* *
* console.log(this.form.value); // {first: 'name', last: 'last name'}
* console.log(this.form.get('first').status); // 'DISABLED'
* ```
* @param {?=} value
* @param {?=} __1
* @return {?}
*/

@@ -1023,6 +1271,7 @@ FormGroup.prototype.reset = function (value, _a) {

/**
* The aggregate value of the {@link FormGroup}, including any disabled controls.
*
* If you'd like to include all values regardless of disabled status, use this method.
* Otherwise, the `value` property is the best way to get the value of the group.
* The aggregate value of the {@link FormGroup}, including any disabled controls.
* *
* If you'd like to include all values regardless of disabled status, use this method.
* Otherwise, the `value` property is the best way to get the value of the group.
* @return {?}
*/

@@ -1035,3 +1284,6 @@ FormGroup.prototype.getRawValue = function () {

};
/** @internal */
/**
* @param {?} name
* @return {?}
*/
FormGroup.prototype._throwIfControlMissing = function (name) {

@@ -1045,3 +1297,6 @@ if (!Object.keys(this.controls).length) {

};
/** @internal */
/**
* @param {?} cb
* @return {?}
*/
FormGroup.prototype._forEachChild = function (cb) {

@@ -1051,3 +1306,5 @@ var _this = this;

};
/** @internal */
/**
* @return {?}
*/
FormGroup.prototype._setUpControls = function () {

@@ -1060,8 +1317,13 @@ var _this = this;

};
/** @internal */
/**
* @return {?}
*/
FormGroup.prototype._updateValue = function () { this._value = this._reduceValue(); };
/** @internal */
/**
* @param {?} condition
* @return {?}
*/
FormGroup.prototype._anyControls = function (condition) {
var _this = this;
var res = false;
var /** @type {?} */ res = false;
this._forEachChild(function (control, name) {

@@ -1072,3 +1334,5 @@ res = res || (_this.contains(name) && condition(control));

};
/** @internal */
/**
* @return {?}
*/
FormGroup.prototype._reduceValue = function () {

@@ -1083,9 +1347,15 @@ var _this = this;

};
/** @internal */
/**
* @param {?} initValue
* @param {?} fn
* @return {?}
*/
FormGroup.prototype._reduceChildren = function (initValue, fn) {
var res = initValue;
var /** @type {?} */ res = initValue;
this._forEachChild(function (control, name) { res = fn(res, control, name); });
return res;
};
/** @internal */
/**
* @return {?}
*/
FormGroup.prototype._allControlsDisabled = function () {

@@ -1100,3 +1370,6 @@ for (var _i = 0, _a = Object.keys(this.controls); _i < _a.length; _i++) {

};
/** @internal */
/**
* @param {?} value
* @return {?}
*/
FormGroup.prototype._checkAllValuesPresent = function (value) {

@@ -1111,48 +1384,54 @@ this._forEachChild(function (control, name) {

}(AbstractControl));
function FormGroup_tsickle_Closure_declarations() {
/** @type {?} */
FormGroup.prototype.controls;
}
/**
* @whatItDoes Tracks the value and validity state of an array of {@link FormControl}
* instances.
*
* A `FormArray` aggregates the values of each child {@link FormControl} into an array.
* It calculates its status by reducing the statuses of its children. For example, if one of
* the controls in a `FormArray` is invalid, the entire array becomes invalid.
*
* `FormArray` is one of the three fundamental building blocks used to define forms in Angular,
* along with {@link FormControl} and {@link FormGroup}.
*
* @howToUse
*
* When instantiating a {@link FormArray}, pass in an array of child controls as the first
* argument.
*
* ### Example
*
* ```
* const arr = new FormArray([
* new FormControl('Nancy', Validators.minLength(2)),
* new FormControl('Drew'),
* ]);
*
* console.log(arr.value); // ['Nancy', 'Drew']
* console.log(arr.status); // 'VALID'
* ```
*
* You can also include array-level validators as the second arg, or array-level async
* validators as the third arg. These come in handy when you want to perform validation
* that considers the value of more than one child control.
*
* ### Adding or removing controls
*
* To change the controls in the array, use the `push`, `insert`, or `removeAt` methods
* in `FormArray` itself. These methods ensure the controls are properly tracked in the
* form's hierarchy. Do not modify the array of `AbstractControl`s used to instantiate
* the `FormArray` directly, as that will result in strange and unexpected behavior such
* as broken change detection.
*
* * **npm package**: `@angular/forms`
*
* @stable
* instances.
* *
* A `FormArray` aggregates the values of each child {@link FormControl} into an array.
* It calculates its status by reducing the statuses of its children. For example, if one of
* the controls in a `FormArray` is invalid, the entire array becomes invalid.
* *
* `FormArray` is one of the three fundamental building blocks used to define forms in Angular,
* along with {@link FormControl} and {@link FormGroup}.
* *
* *
* When instantiating a {@link FormArray}, pass in an array of child controls as the first
* argument.
* *
* ### Example
* *
* ```
* const arr = new FormArray([
* new FormControl('Nancy', Validators.minLength(2)),
* new FormControl('Drew'),
* ]);
* *
* console.log(arr.value); // ['Nancy', 'Drew']
* console.log(arr.status); // 'VALID'
* ```
* *
* You can also include array-level validators as the second arg, or array-level async
* validators as the third arg. These come in handy when you want to perform validation
* that considers the value of more than one child control.
* *
* ### Adding or removing controls
* *
* To change the controls in the array, use the `push`, `insert`, or `removeAt` methods
* in `FormArray` itself. These methods ensure the controls are properly tracked in the
* form's hierarchy. Do not modify the array of `AbstractControl`s used to instantiate
* the `FormArray` directly, as that will result in strange and unexpected behavior such
* as broken change detection.
* *
* * **npm package**: `@angular/forms`
* *
*/
export var FormArray = (function (_super) {
__extends(FormArray, _super);
/**
* @param {?} controls
* @param {?=} validator
* @param {?=} asyncValidator
*/
function FormArray(controls, validator, asyncValidator) {

@@ -1168,7 +1447,11 @@ if (validator === void 0) { validator = null; }

/**
* Get the {@link AbstractControl} at the given `index` in the array.
* Get the {@link AbstractControl} at the given `index` in the array.
* @param {?} index
* @return {?}
*/
FormArray.prototype.at = function (index) { return this.controls[index]; };
/**
* Insert a new {@link AbstractControl} at the end of the array.
* Insert a new {@link AbstractControl} at the end of the array.
* @param {?} control
* @return {?}
*/

@@ -1182,3 +1465,6 @@ FormArray.prototype.push = function (control) {

/**
* Insert a new {@link AbstractControl} at the given `index` in the array.
* Insert a new {@link AbstractControl} at the given `index` in the array.
* @param {?} index
* @param {?} control
* @return {?}
*/

@@ -1192,3 +1478,5 @@ FormArray.prototype.insert = function (index, control) {

/**
* Remove the control at the given `index` in the array.
* Remove the control at the given `index` in the array.
* @param {?} index
* @return {?}
*/

@@ -1203,3 +1491,6 @@ FormArray.prototype.removeAt = function (index) {

/**
* Replace an existing control.
* Replace an existing control.
* @param {?} index
* @param {?} control
* @return {?}
*/

@@ -1219,3 +1510,4 @@ FormArray.prototype.setControl = function (index, control) {

/**
* Length of the control array.
* Length of the control array.
* @return {?}
*/

@@ -1228,20 +1520,23 @@ get: function () { return this.controls.length; },

* Sets the value of the {@link FormArray}. It accepts an array that matches
* the structure of the control.
*
* This method performs strict checks, so it will throw an error if you try
* to set the value of a control that doesn't exist or if you exclude the
* value of a control.
*
* ### Example
*
* ```
* const arr = new FormArray([
* new FormControl(),
* new FormControl()
* ]);
* console.log(arr.value); // [null, null]
*
* arr.setValue(['Nancy', 'Drew']);
* console.log(arr.value); // ['Nancy', 'Drew']
* ```
* the structure of the control.
* *
* This method performs strict checks, so it will throw an error if you try
* to set the value of a control that doesn't exist or if you exclude the
* value of a control.
* *
* ### Example
* *
* ```
* const arr = new FormArray([
* new FormControl(),
* new FormControl()
* ]);
* console.log(arr.value); // [null, null]
* *
* arr.setValue(['Nancy', 'Drew']);
* console.log(arr.value); // ['Nancy', 'Drew']
* ```
* @param {?} value
* @param {?=} __1
* @return {?}
*/

@@ -1260,19 +1555,22 @@ FormArray.prototype.setValue = function (value, _a) {

* Patches the value of the {@link FormArray}. It accepts an array that matches the
* structure of the control, and will do its best to match the values to the correct
* controls in the group.
*
* It accepts both super-sets and sub-sets of the array without throwing an error.
*
* ### Example
*
* ```
* const arr = new FormArray([
* new FormControl(),
* new FormControl()
* ]);
* console.log(arr.value); // [null, null]
*
* arr.patchValue(['Nancy']);
* console.log(arr.value); // ['Nancy', null]
* ```
* structure of the control, and will do its best to match the values to the correct
* controls in the group.
* *
* It accepts both super-sets and sub-sets of the array without throwing an error.
* *
* ### Example
* *
* ```
* const arr = new FormArray([
* new FormControl(),
* new FormControl()
* ]);
* console.log(arr.value); // [null, null]
* *
* arr.patchValue(['Nancy']);
* console.log(arr.value); // ['Nancy', null]
* ```
* @param {?} value
* @param {?=} __1
* @return {?}
*/

@@ -1290,31 +1588,34 @@ FormArray.prototype.patchValue = function (value, _a) {

/**
* Resets the {@link FormArray}. This means by default:
*
* * The array and all descendants are marked `pristine`
* * The array and all descendants are marked `untouched`
* * The value of all descendants will be null or null maps
*
* You can also reset to a specific form state by passing in an array of states
* that matches the structure of the control. The state can be a standalone value
* or a form state object with both a value and a disabled status.
*
* ### Example
*
* ```ts
* this.arr.reset(['name', 'last name']);
*
* console.log(this.arr.value); // ['name', 'last name']
* ```
*
* - OR -
*
* ```
* this.arr.reset([
* {value: 'name', disabled: true},
* 'last'
* ]);
*
* console.log(this.arr.value); // ['name', 'last name']
* console.log(this.arr.get(0).status); // 'DISABLED'
* ```
* Resets the {@link FormArray}. This means by default:
* *
* * The array and all descendants are marked `pristine`
* * The array and all descendants are marked `untouched`
* * The value of all descendants will be null or null maps
* *
* You can also reset to a specific form state by passing in an array of states
* that matches the structure of the control. The state can be a standalone value
* or a form state object with both a value and a disabled status.
* *
* ### Example
* *
* ```ts
* this.arr.reset(['name', 'last name']);
* *
* console.log(this.arr.value); // ['name', 'last name']
* ```
* *
* - OR -
* *
* ```
* this.arr.reset([
* {value: 'name', disabled: true},
* 'last'
* ]);
* *
* console.log(this.arr.value); // ['name', 'last name']
* console.log(this.arr.get(0).status); // 'DISABLED'
* ```
* @param {?=} value
* @param {?=} __1
* @return {?}
*/

@@ -1332,9 +1633,13 @@ FormArray.prototype.reset = function (value, _a) {

/**
* The aggregate value of the array, including any disabled controls.
*
* If you'd like to include all values regardless of disabled status, use this method.
* Otherwise, the `value` property is the best way to get the value of the array.
* The aggregate value of the array, including any disabled controls.
* *
* If you'd like to include all values regardless of disabled status, use this method.
* Otherwise, the `value` property is the best way to get the value of the array.
* @return {?}
*/
FormArray.prototype.getRawValue = function () { return this.controls.map(function (control) { return control.value; }); };
/** @internal */
/**
* @param {?} index
* @return {?}
*/
FormArray.prototype._throwIfControlMissing = function (index) {

@@ -1348,7 +1653,12 @@ if (!this.controls.length) {

};
/** @internal */
/**
* @param {?} cb
* @return {?}
*/
FormArray.prototype._forEachChild = function (cb) {
this.controls.forEach(function (control, index) { cb(control, index); });
};
/** @internal */
/**
* @return {?}
*/
FormArray.prototype._updateValue = function () {

@@ -1359,7 +1669,12 @@ var _this = this;

};
/** @internal */
/**
* @param {?} condition
* @return {?}
*/
FormArray.prototype._anyControls = function (condition) {
return this.controls.some(function (control) { return control.enabled && condition(control); });
};
/** @internal */
/**
* @return {?}
*/
FormArray.prototype._setUpControls = function () {

@@ -1369,3 +1684,6 @@ var _this = this;

};
/** @internal */
/**
* @param {?} value
* @return {?}
*/
FormArray.prototype._checkAllValuesPresent = function (value) {

@@ -1378,3 +1696,5 @@ this._forEachChild(function (control, i) {

};
/** @internal */
/**
* @return {?}
*/
FormArray.prototype._allControlsDisabled = function () {

@@ -1388,2 +1708,6 @@ for (var _i = 0, _a = this.controls; _i < _a.length; _i++) {

};
/**
* @param {?} control
* @return {?}
*/
FormArray.prototype._registerControl = function (control) {

@@ -1395,2 +1719,6 @@ control.setParent(this);

}(AbstractControl));
function FormArray_tsickle_Closure_declarations() {
/** @type {?} */
FormArray.prototype.controls;
}
//# sourceMappingURL=model.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"VALID":"VALID","INVALID":"INVALID","PENDING":"PENDING","DISABLED":"DISABLED","isControl":{"__symbolic":"function","parameters":["control"],"value":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"control"},"right":{"__symbolic":"reference","name":"AbstractControl"}}}}}
{"__symbolic":"module","version":2,"metadata":{"VALID":"VALID","INVALID":"INVALID","PENDING":"PENDING","DISABLED":"DISABLED","isControl":{"__symbolic":"function","parameters":["control"],"value":{"__symbolic":"binop","operator":"instanceof","left":{"__symbolic":"reference","name":"control"},"right":{"__symbolic":"reference","name":"AbstractControl"}}},"AbstractControl":{"__symbolic":"class"},"FormControl":{"__symbolic":"class"},"FormGroup":{"__symbolic":"class"},"FormArray":{"__symbolic":"class"}}}

@@ -9,3 +9,3 @@ /**

import { __core_private__ as r } from '@angular/core';
export var isPromise = r.isPromise;
export var /** @type {?} */ isPromise = r.isPromise;
//# sourceMappingURL=private_import_core.js.map

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"isPromise":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"___core_private__"},"member":"isPromise"}}}
{"__symbolic":"module","version":2,"metadata":{"isPromise":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"___core_private__"},"member":"isPromise"}}}

@@ -13,2 +13,6 @@ /**

import { isPromise } from './private_import_core';
/**
* @param {?} value
* @return {?}
*/
function isEmptyInputValue(value) {

@@ -27,3 +31,3 @@ return value == null || typeof value === 'string' && value.length === 0;

*/
export var NG_VALIDATORS = new OpaqueToken('NgValidators');
export var /** @type {?} */ NG_VALIDATORS = new OpaqueToken('NgValidators');
/**

@@ -39,16 +43,15 @@ * Providers for asynchronous validators to be used for {@link FormControl}s

*/
export var NG_ASYNC_VALIDATORS = new OpaqueToken('NgAsyncValidators');
export var /** @type {?} */ NG_ASYNC_VALIDATORS = new OpaqueToken('NgAsyncValidators');
/**
* Provides a set of validators used by form controls.
*
* A validator is a function that processes a {@link FormControl} or collection of
* controls and returns a map of errors. A null map means that validation has passed.
*
* ### Example
*
* ```typescript
* var loginControl = new FormControl("", Validators.required)
* ```
*
* @stable
* Provides a set of validators used by form controls.
* *
* A validator is a function that processes a {@link FormControl} or collection of
* controls and returns a map of errors. A null map means that validation has passed.
* *
* ### Example
* *
* ```typescript
* var loginControl = new FormControl("", Validators.required)
* ```
* *
*/

@@ -59,3 +62,5 @@ export var Validators = (function () {

/**
* Validator that requires controls to have a non-empty value.
* Validator that requires controls to have a non-empty value.
* @param {?} control
* @return {?}
*/

@@ -66,3 +71,5 @@ Validators.required = function (control) {

/**
* Validator that requires controls to have a value of a minimum length.
* Validator that requires controls to have a value of a minimum length.
* @param {?} minLength
* @return {?}
*/

@@ -74,3 +81,3 @@ Validators.minLength = function (minLength) {

}
var length = typeof control.value === 'string' ? control.value.length : 0;
var /** @type {?} */ length = typeof control.value === 'string' ? control.value.length : 0;
return length < minLength ?

@@ -82,7 +89,9 @@ { 'minlength': { 'requiredLength': minLength, 'actualLength': length } } :

/**
* Validator that requires controls to have a value of a maximum length.
* Validator that requires controls to have a value of a maximum length.
* @param {?} maxLength
* @return {?}
*/
Validators.maxLength = function (maxLength) {
return function (control) {
var length = typeof control.value === 'string' ? control.value.length : 0;
var /** @type {?} */ length = typeof control.value === 'string' ? control.value.length : 0;
return length > maxLength ?

@@ -94,3 +103,5 @@ { 'maxlength': { 'requiredLength': maxLength, 'actualLength': length } } :

/**
* Validator that requires a control to match a regex to its value.
* Validator that requires a control to match a regex to its value.
* @param {?} pattern
* @return {?}
*/

@@ -100,4 +111,4 @@ Validators.pattern = function (pattern) {

return Validators.nullValidator;
var regex;
var regexStr;
var /** @type {?} */ regex;
var /** @type {?} */ regexStr;
if (typeof pattern === 'string') {

@@ -115,3 +126,3 @@ regexStr = "^" + pattern + "$";

}
var value = control.value;
var /** @type {?} */ value = control.value;
return regex.test(value) ? null :

@@ -122,8 +133,12 @@ { 'pattern': { 'requiredPattern': regexStr, 'actualValue': value } };

/**
* No-op validator.
* No-op validator.
* @param {?} c
* @return {?}
*/
Validators.nullValidator = function (c) { return null; };
/**
* Compose multiple validators into a single function that returns the union
* of the individual error maps.
* Compose multiple validators into a single function that returns the union
* of the individual error maps.
* @param {?} validators
* @return {?}
*/

@@ -133,3 +148,3 @@ Validators.compose = function (validators) {

return null;
var presentValidators = validators.filter(isPresent);
var /** @type {?} */ presentValidators = validators.filter(isPresent);
if (presentValidators.length == 0)

@@ -141,10 +156,14 @@ return null;

};
/**
* @param {?} validators
* @return {?}
*/
Validators.composeAsync = function (validators) {
if (!validators)
return null;
var presentValidators = validators.filter(isPresent);
var /** @type {?} */ presentValidators = validators.filter(isPresent);
if (presentValidators.length == 0)
return null;
return function (control) {
var promises = _executeAsyncValidators(control, presentValidators).map(_convertToPromise);
var /** @type {?} */ promises = _executeAsyncValidators(control, presentValidators).map(_convertToPromise);
return Promise.all(promises).then(_mergeErrors);

@@ -155,13 +174,31 @@ };

}());
/**
* @param {?} obj
* @return {?}
*/
function _convertToPromise(obj) {
return isPromise(obj) ? obj : toPromise.call(obj);
}
/**
* @param {?} control
* @param {?} validators
* @return {?}
*/
function _executeValidators(control, validators) {
return validators.map(function (v) { return v(control); });
}
/**
* @param {?} control
* @param {?} validators
* @return {?}
*/
function _executeAsyncValidators(control, validators) {
return validators.map(function (v) { return v(control); });
}
/**
* @param {?} arrayOfErrors
* @return {?}
*/
function _mergeErrors(arrayOfErrors) {
var res = arrayOfErrors.reduce(function (res, errors) {
var /** @type {?} */ res = arrayOfErrors.reduce(function (res, errors) {
return isPresent(errors) ? StringMapWrapper.merge(res, errors) : res;

@@ -168,0 +205,0 @@ }, {});

@@ -1,1 +0,1 @@

{"__symbolic":"module","version":1,"metadata":{"NG_VALIDATORS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["NgValidators"]},"NG_ASYNC_VALIDATORS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["NgAsyncValidators"]}}}
{"__symbolic":"module","version":2,"metadata":{"NG_VALIDATORS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["NgValidators"]},"NG_ASYNC_VALIDATORS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"OpaqueToken"},"arguments":["NgAsyncValidators"]},"Validators":{"__symbolic":"class"}}}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc