From 6fd5bc075d70879c487c0188f6cd5b148e72a4dd Mon Sep 17 00:00:00 2001 From: Kara Date: Wed, 17 Aug 2016 07:44:39 -0700 Subject: [PATCH] chore(forms): update forms labels (#10873) --- modules/@angular/forms/src/directives.ts | 4 +- .../directives/abstract_control_directive.ts | 2 +- .../abstract_form_group_directive.ts | 2 +- .../src/directives/checkbox_value_accessor.ts | 2 +- .../forms/src/directives/control_container.ts | 2 +- .../src/directives/control_value_accessor.ts | 4 +- .../src/directives/default_value_accessor.ts | 2 +- .../forms/src/directives/ng_control.ts | 4 +- .../forms/src/directives/ng_control_status.ts | 4 +- .../@angular/forms/src/directives/ng_form.ts | 2 +- .../@angular/forms/src/directives/ng_model.ts | 2 +- .../forms/src/directives/ng_model_group.ts | 2 +- .../form_control_directive.ts | 2 +- .../reactive_directives/form_control_name.ts | 2 +- .../form_group_directive.ts | 2 +- .../reactive_directives/form_group_name.ts | 4 +- .../select_control_value_accessor.ts | 4 +- .../select_multiple_control_value_accessor.ts | 2 +- .../forms/src/directives/validators.ts | 14 +-- modules/@angular/forms/src/form_builder.ts | 2 +- modules/@angular/forms/src/form_providers.ts | 10 +-- modules/@angular/forms/src/model.ts | 15 ++-- modules/@angular/forms/src/validators.ts | 6 +- tools/public_api_guard/forms/index.d.ts | 88 +++++++++---------- 24 files changed, 93 insertions(+), 90 deletions(-) diff --git a/modules/@angular/forms/src/directives.ts b/modules/@angular/forms/src/directives.ts index fdce1d899d..62669c3e47 100644 --- a/modules/@angular/forms/src/directives.ts +++ b/modules/@angular/forms/src/directives.ts @@ -69,12 +69,12 @@ export const REACTIVE_DRIVEN_DIRECTIVES: Type[] = * }) * class MyApp {} * ``` - * @experimental + * @stable */ export const FORM_DIRECTIVES: Type[][] = [TEMPLATE_DRIVEN_DIRECTIVES, SHARED_FORM_DIRECTIVES]; /** - * @experimental + * @stable */ export const REACTIVE_FORM_DIRECTIVES: Type[][] = diff --git a/modules/@angular/forms/src/directives/abstract_control_directive.ts b/modules/@angular/forms/src/directives/abstract_control_directive.ts index c932defd4c..c0ec26a84f 100644 --- a/modules/@angular/forms/src/directives/abstract_control_directive.ts +++ b/modules/@angular/forms/src/directives/abstract_control_directive.ts @@ -16,7 +16,7 @@ import {AbstractControl} from '../model'; * * Only used internally in the forms module. * - * @experimental + * @stable */ export abstract class AbstractControlDirective { get control(): AbstractControl { throw new BaseException('unimplemented'); } diff --git a/modules/@angular/forms/src/directives/abstract_form_group_directive.ts b/modules/@angular/forms/src/directives/abstract_form_group_directive.ts index 1b4a464f95..085805a61f 100644 --- a/modules/@angular/forms/src/directives/abstract_form_group_directive.ts +++ b/modules/@angular/forms/src/directives/abstract_form_group_directive.ts @@ -20,7 +20,7 @@ import {AsyncValidatorFn, ValidatorFn} from './validators'; /** * This is a base class for code shared between {@link NgModelGroup} and {@link FormGroupName}. * - * @experimental + * @stable */ export class AbstractFormGroupDirective extends ControlContainer implements OnInit, OnDestroy { /** @internal */ diff --git a/modules/@angular/forms/src/directives/checkbox_value_accessor.ts b/modules/@angular/forms/src/directives/checkbox_value_accessor.ts index 71829d7486..e19e551596 100644 --- a/modules/@angular/forms/src/directives/checkbox_value_accessor.ts +++ b/modules/@angular/forms/src/directives/checkbox_value_accessor.ts @@ -24,7 +24,7 @@ export const CHECKBOX_VALUE_ACCESSOR: any = { * * ``` * - * @experimental + * @stable */ @Directive({ selector: diff --git a/modules/@angular/forms/src/directives/control_container.ts b/modules/@angular/forms/src/directives/control_container.ts index f41ff60fe5..a0ee276426 100644 --- a/modules/@angular/forms/src/directives/control_container.ts +++ b/modules/@angular/forms/src/directives/control_container.ts @@ -15,7 +15,7 @@ import {Form} from './form_interface'; * * Only used by the forms module. * - * @experimental + * @stable */ export class ControlContainer extends AbstractControlDirective { name: string; diff --git a/modules/@angular/forms/src/directives/control_value_accessor.ts b/modules/@angular/forms/src/directives/control_value_accessor.ts index 475a51ebee..210dbee44c 100644 --- a/modules/@angular/forms/src/directives/control_value_accessor.ts +++ b/modules/@angular/forms/src/directives/control_value_accessor.ts @@ -16,7 +16,7 @@ import {OpaqueToken} from '@angular/core'; * * Please see {@link DefaultValueAccessor} for more information. * - * @experimental + * @stable */ export interface ControlValueAccessor { /** @@ -39,6 +39,6 @@ export interface ControlValueAccessor { * Used to provide a {@link ControlValueAccessor} for form controls. * * See {@link DefaultValueAccessor} for how to implement one. - * @experimental + * @stable */ export const NG_VALUE_ACCESSOR: OpaqueToken = new OpaqueToken('NgValueAccessor'); diff --git a/modules/@angular/forms/src/directives/default_value_accessor.ts b/modules/@angular/forms/src/directives/default_value_accessor.ts index 848dea8351..2124f697ec 100644 --- a/modules/@angular/forms/src/directives/default_value_accessor.ts +++ b/modules/@angular/forms/src/directives/default_value_accessor.ts @@ -27,7 +27,7 @@ export const DEFAULT_VALUE_ACCESSOR: any = { * * ``` * - * @experimental + * @stable */ @Directive({ selector: diff --git a/modules/@angular/forms/src/directives/ng_control.ts b/modules/@angular/forms/src/directives/ng_control.ts index 305185d4b9..b2f23a9d49 100644 --- a/modules/@angular/forms/src/directives/ng_control.ts +++ b/modules/@angular/forms/src/directives/ng_control.ts @@ -18,11 +18,11 @@ function unimplemented(): any { /** * A base class that all control directive extend. - * It binds a {@link Control} object to a DOM element. + * It binds a {@link FormControl} object to a DOM element. * * Used internally by Angular forms. * - * @experimental + * @stable */ export abstract class NgControl extends AbstractControlDirective { name: string = null; diff --git a/modules/@angular/forms/src/directives/ng_control_status.ts b/modules/@angular/forms/src/directives/ng_control_status.ts index 41ff15a3ae..ef4074a4f2 100644 --- a/modules/@angular/forms/src/directives/ng_control_status.ts +++ b/modules/@angular/forms/src/directives/ng_control_status.ts @@ -52,7 +52,7 @@ export const ngControlStatusHost = { * Directive automatically applied to Angular form controls that sets CSS classes * based on control status (valid/invalid/dirty/etc). * - * @experimental + * @stable */ @Directive({selector: '[formControlName],[ngModel],[formControl]', host: ngControlStatusHost}) export class NgControlStatus extends AbstractControlStatus { @@ -63,7 +63,7 @@ export class NgControlStatus extends AbstractControlStatus { * Directive automatically applied to Angular form groups that sets CSS classes * based on control status (valid/invalid/dirty/etc). * - * @experimental + * @stable */ @Directive({ selector: diff --git a/modules/@angular/forms/src/directives/ng_form.ts b/modules/@angular/forms/src/directives/ng_form.ts index 6c63c25b30..a7f26bfe39 100644 --- a/modules/@angular/forms/src/directives/ng_form.ts +++ b/modules/@angular/forms/src/directives/ng_form.ts @@ -85,7 +85,7 @@ const resolvedPromise = Promise.resolve(null); * } * ``` * - * @experimental + * @stable */ @Directive({ selector: 'form:not([ngNoForm]):not([formGroup]),ngForm,[ngForm]', diff --git a/modules/@angular/forms/src/directives/ng_model.ts b/modules/@angular/forms/src/directives/ng_model.ts index 7876d1fc47..d10b4734d2 100644 --- a/modules/@angular/forms/src/directives/ng_model.ts +++ b/modules/@angular/forms/src/directives/ng_model.ts @@ -49,7 +49,7 @@ const resolvedPromise = Promise.resolve(null); * } * ``` * - * @experimental + * @stable */ @Directive({ selector: '[ngModel]:not([formControlName]):not([formControl])', diff --git a/modules/@angular/forms/src/directives/ng_model_group.ts b/modules/@angular/forms/src/directives/ng_model_group.ts index 141563d331..eb37a09a96 100644 --- a/modules/@angular/forms/src/directives/ng_model_group.ts +++ b/modules/@angular/forms/src/directives/ng_model_group.ts @@ -55,7 +55,7 @@ export const modelGroupProvider: any = { * This example declares a model group for a user's name. The value and validation state of * this group can be accessed separately from the overall form. * - * @experimental + * @stable */ @Directive({selector: '[ngModelGroup]', providers: [modelGroupProvider], exportAs: 'ngModelGroup'}) export class NgModelGroup extends AbstractFormGroupDirective implements OnInit, OnDestroy { diff --git a/modules/@angular/forms/src/directives/reactive_directives/form_control_directive.ts b/modules/@angular/forms/src/directives/reactive_directives/form_control_directive.ts index 18d54165eb..0e3952c177 100644 --- a/modules/@angular/forms/src/directives/reactive_directives/form_control_directive.ts +++ b/modules/@angular/forms/src/directives/reactive_directives/form_control_directive.ts @@ -70,7 +70,7 @@ export const formControlBinding: any = { * } * ``` * - * @experimental + * @stable */ @Directive({selector: '[formControl]', providers: [formControlBinding], exportAs: 'ngForm'}) diff --git a/modules/@angular/forms/src/directives/reactive_directives/form_control_name.ts b/modules/@angular/forms/src/directives/reactive_directives/form_control_name.ts index d9be028aaa..62788fba40 100644 --- a/modules/@angular/forms/src/directives/reactive_directives/form_control_name.ts +++ b/modules/@angular/forms/src/directives/reactive_directives/form_control_name.ts @@ -92,7 +92,7 @@ export const controlNameBinding: any = { * } * ``` * - * @experimental + * @stable */ @Directive({selector: '[formControlName]', providers: [controlNameBinding]}) export class FormControlName extends NgControl implements OnChanges, OnDestroy { diff --git a/modules/@angular/forms/src/directives/reactive_directives/form_group_directive.ts b/modules/@angular/forms/src/directives/reactive_directives/form_group_directive.ts index 6bca6c047b..1e2e054747 100644 --- a/modules/@angular/forms/src/directives/reactive_directives/form_group_directive.ts +++ b/modules/@angular/forms/src/directives/reactive_directives/form_group_directive.ts @@ -94,7 +94,7 @@ export const formDirectiveProvider: any = { * } * ``` * - * @experimental + * @stable */ @Directive({ selector: '[formGroup]', diff --git a/modules/@angular/forms/src/directives/reactive_directives/form_group_name.ts b/modules/@angular/forms/src/directives/reactive_directives/form_group_name.ts index bc190322ac..0f86a71974 100644 --- a/modules/@angular/forms/src/directives/reactive_directives/form_group_name.ts +++ b/modules/@angular/forms/src/directives/reactive_directives/form_group_name.ts @@ -68,7 +68,7 @@ export const formGroupNameProvider: any = { * This example syncs the form group for the user's name. The value and validation state of * this group can be accessed separately from the overall form. * - * @experimental + * @stable */ @Directive({selector: '[formGroupName]', providers: [formGroupNameProvider]}) export class FormGroupName extends AbstractFormGroupDirective implements OnInit, OnDestroy { @@ -131,7 +131,7 @@ export const formArrayNameProvider: any = { * } * ``` * - * @experimental + * @stable */ @Directive({selector: '[formArrayName]', providers: [formArrayNameProvider]}) export class FormArrayName extends ControlContainer implements OnInit, OnDestroy { diff --git a/modules/@angular/forms/src/directives/select_control_value_accessor.ts b/modules/@angular/forms/src/directives/select_control_value_accessor.ts index d714a56858..226f4e3b90 100644 --- a/modules/@angular/forms/src/directives/select_control_value_accessor.ts +++ b/modules/@angular/forms/src/directives/select_control_value_accessor.ts @@ -37,7 +37,7 @@ function _extractId(valueString: string): string { * https://bugzilla.mozilla.org/show_bug.cgi?id=1024350 * https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/4660045/ * - * @experimental + * @stable */ @Directive({ selector: @@ -100,7 +100,7 @@ export class SelectControlValueAccessor implements ControlValueAccessor { * * ``` * - * @experimental + * @stable */ @Directive({selector: 'option'}) export class NgSelectOption implements OnDestroy { diff --git a/modules/@angular/forms/src/directives/select_multiple_control_value_accessor.ts b/modules/@angular/forms/src/directives/select_multiple_control_value_accessor.ts index cda2b1905e..f8df57d43c 100644 --- a/modules/@angular/forms/src/directives/select_multiple_control_value_accessor.ts +++ b/modules/@angular/forms/src/directives/select_multiple_control_value_accessor.ts @@ -45,7 +45,7 @@ abstract class HTMLCollection { /** * The accessor for writing a value and listening to changes on a select element. * - * @experimental + * @stable */ @Directive({ selector: diff --git a/modules/@angular/forms/src/directives/validators.ts b/modules/@angular/forms/src/directives/validators.ts index fa3ddceba8..56391978dd 100644 --- a/modules/@angular/forms/src/directives/validators.ts +++ b/modules/@angular/forms/src/directives/validators.ts @@ -31,7 +31,7 @@ import {NG_VALIDATORS, Validators} from '../validators'; * } * ``` * - * @experimental + * @stable */ export interface Validator { validate(c: AbstractControl): {[key: string]: any}; } @@ -53,7 +53,7 @@ export const REQUIRED_VALIDATOR: any = { * * ``` * - * @experimental + * @stable */ @Directive({ selector: '[required][formControlName],[required][formControl],[required][ngModel]', @@ -63,12 +63,12 @@ export class RequiredValidator { } /** - * @experimental + * @stable */ export interface ValidatorFn { (c: AbstractControl): {[key: string]: any}; } /** - * @experimental + * @stable */ export interface AsyncValidatorFn { (c: AbstractControl): any /*Promise<{[key: string]: any}>|Observable<{[key: string]: any}>*/; @@ -91,7 +91,7 @@ export const MIN_LENGTH_VALIDATOR: any = { * A directive which installs the {@link MinLengthValidator} for any `formControlName`, * `formControl`, or control with `ngModel` that also has a `minlength` attribute. * - * @experimental + * @stable */ @Directive({ selector: '[minlength][formControlName],[minlength][formControl],[minlength][ngModel]', @@ -125,7 +125,7 @@ export const MAX_LENGTH_VALIDATOR: any = { * `formControl`, * or control with `ngModel` that also has a `maxlength` attribute. * - * @experimental + * @stable */ @Directive({ selector: '[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]', @@ -160,7 +160,7 @@ export const PATTERN_VALIDATOR: any = { * ``` * * ``` - * @experimental + * @stable */ @Directive({ selector: '[pattern][formControlName],[pattern][formControl],[pattern][ngModel]', diff --git a/modules/@angular/forms/src/form_builder.ts b/modules/@angular/forms/src/form_builder.ts index 6b70f808c4..e7f936053b 100644 --- a/modules/@angular/forms/src/form_builder.ts +++ b/modules/@angular/forms/src/form_builder.ts @@ -53,7 +53,7 @@ import {AbstractControl, FormArray, FormControl, FormGroup} from './model'; * } * ``` * - * @experimental + * @stable */ @Injectable() export class FormBuilder { diff --git a/modules/@angular/forms/src/form_providers.ts b/modules/@angular/forms/src/form_providers.ts index 51c532361c..9c63c569d7 100644 --- a/modules/@angular/forms/src/form_providers.ts +++ b/modules/@angular/forms/src/form_providers.ts @@ -16,19 +16,19 @@ import {FormBuilder} from './form_builder'; /** * Shorthand set of providers used for building Angular forms. - * @experimental + * @stable */ export const FORM_PROVIDERS: Type[] = [RadioControlRegistry]; /** * Shorthand set of providers used for building reactive Angular forms. - * @experimental + * @stable */ export const REACTIVE_FORM_PROVIDERS: Type[] = [FormBuilder, RadioControlRegistry]; /** * The ng module for forms. - * @experimental + * @stable */ @NgModule({ declarations: TEMPLATE_DRIVEN_DIRECTIVES, @@ -40,7 +40,7 @@ export class FormsModule { /** * The ng module for reactive forms. - * @experimental + * @stable */ @NgModule({ declarations: [REACTIVE_DRIVEN_DIRECTIVES], @@ -48,4 +48,4 @@ export class FormsModule { exports: [InternalFormsSharedModule, REACTIVE_DRIVEN_DIRECTIVES] }) export class ReactiveFormsModule { -} \ No newline at end of file +} diff --git a/modules/@angular/forms/src/model.ts b/modules/@angular/forms/src/model.ts index cacd56bacb..22d31319a0 100644 --- a/modules/@angular/forms/src/model.ts +++ b/modules/@angular/forms/src/model.ts @@ -71,7 +71,7 @@ function coerceToAsyncValidator(asyncValidator: AsyncValidatorFn | AsyncValidato } /** - * @experimental + * @stable */ export abstract class AbstractControl { /** @internal */ @@ -368,7 +368,7 @@ export abstract class AbstractControl { * can be bound to a DOM element instead. This `FormControl` can be configured with a custom * validation function. * - * @experimental + * @stable */ export class FormControl extends AbstractControl { /** @internal */ @@ -467,14 +467,15 @@ export class FormControl extends AbstractControl { * controls, but is of variable length. * * - * @experimental + * @stable */ export class FormGroup extends AbstractControl { private _optionals: {[key: string]: boolean}; constructor( - public controls: {[key: string]: AbstractControl}, optionals: {[key: string]: boolean} = null, - validator: ValidatorFn = null, asyncValidator: AsyncValidatorFn = null) { + public controls: {[key: string]: AbstractControl}, + /* @deprecated */ optionals: {[key: string]: boolean} = null, validator: ValidatorFn = null, + asyncValidator: AsyncValidatorFn = null) { super(validator, asyncValidator); this._optionals = isPresent(optionals) ? optionals : {}; this._initObservables(); @@ -510,6 +511,7 @@ export class FormGroup extends AbstractControl { /** * Mark the named control as non-optional. + * @deprecated */ include(controlName: string): void { StringMapWrapper.set(this._optionals, controlName, true); @@ -518,6 +520,7 @@ export class FormGroup extends AbstractControl { /** * Mark the named control as optional. + * @deprecated */ exclude(controlName: string): void { StringMapWrapper.set(this._optionals, controlName, false); @@ -651,7 +654,7 @@ export class FormGroup extends AbstractControl { * as broken change detection. * * - * @experimental + * @stable */ export class FormArray extends AbstractControl { constructor( diff --git a/modules/@angular/forms/src/validators.ts b/modules/@angular/forms/src/validators.ts index 8c0e32d3c1..29f7cfe039 100644 --- a/modules/@angular/forms/src/validators.ts +++ b/modules/@angular/forms/src/validators.ts @@ -23,7 +23,7 @@ import {AbstractControl} from './model'; * ### Example * * {@example core/forms/ts/ng_validators/ng_validators.ts region='ng_validators'} - * @experimental + * @stable */ export const NG_VALIDATORS: OpaqueToken = new OpaqueToken('NgValidators'); @@ -35,7 +35,7 @@ export const NG_VALIDATORS: OpaqueToken = new OpaqueToken('NgValidators'); * * See {@link NG_VALIDATORS} for more details. * - * @experimental + * @stable */ export const NG_ASYNC_VALIDATORS: OpaqueToken = new OpaqueToken('NgAsyncValidators'); @@ -51,7 +51,7 @@ export const NG_ASYNC_VALIDATORS: OpaqueToken = new OpaqueToken('NgAsyncValidato * var loginControl = new FormControl("", Validators.required) * ``` * - * @experimental + * @stable */ export class Validators { /** diff --git a/tools/public_api_guard/forms/index.d.ts b/tools/public_api_guard/forms/index.d.ts index a3fe43ff14..12696fff9b 100644 --- a/tools/public_api_guard/forms/index.d.ts +++ b/tools/public_api_guard/forms/index.d.ts @@ -1,4 +1,4 @@ -/** @experimental */ +/** @stable */ export declare abstract class AbstractControl { asyncValidator: AsyncValidatorFn; dirty: boolean; @@ -55,7 +55,7 @@ export declare abstract class AbstractControl { }): void; } -/** @experimental */ +/** @stable */ export declare abstract class AbstractControlDirective { control: AbstractControl; dirty: boolean; @@ -75,7 +75,7 @@ export declare abstract class AbstractControlDirective { reset(value?: any): void; } -/** @experimental */ +/** @stable */ export declare class AbstractFormGroupDirective extends ControlContainer implements OnInit, OnDestroy { asyncValidator: AsyncValidatorFn; control: FormGroup; @@ -86,12 +86,12 @@ export declare class AbstractFormGroupDirective extends ControlContainer impleme ngOnInit(): void; } -/** @experimental */ +/** @stable */ export interface AsyncValidatorFn { (c: AbstractControl): any; } -/** @experimental */ +/** @stable */ export declare class CheckboxControlValueAccessor implements ControlValueAccessor { onChange: (_: any) => void; onTouched: () => void; @@ -101,21 +101,21 @@ export declare class CheckboxControlValueAccessor implements ControlValueAccesso writeValue(value: any): void; } -/** @experimental */ +/** @stable */ export declare class ControlContainer extends AbstractControlDirective { formDirective: Form; name: string; path: string[]; } -/** @experimental */ +/** @stable */ export interface ControlValueAccessor { registerOnChange(fn: any): void; registerOnTouched(fn: any): void; writeValue(obj: any): void; } -/** @experimental */ +/** @stable */ export declare class DefaultValueAccessor implements ControlValueAccessor { onChange: (_: any) => void; onTouched: () => void; @@ -136,13 +136,13 @@ export interface Form { updateModel(dir: NgControl, value: any): void; } -/** @experimental */ +/** @stable */ export declare const FORM_DIRECTIVES: Type[][]; -/** @experimental */ +/** @stable */ export declare const FORM_PROVIDERS: Type[]; -/** @experimental */ +/** @stable */ export declare class FormArray extends AbstractControl { controls: AbstractControl[]; length: number; @@ -162,7 +162,7 @@ export declare class FormArray extends AbstractControl { }): void; } -/** @experimental */ +/** @stable */ export declare class FormArrayName extends ControlContainer implements OnInit, OnDestroy { asyncValidator: AsyncValidatorFn; control: FormArray; @@ -175,7 +175,7 @@ export declare class FormArrayName extends ControlContainer implements OnInit, O ngOnInit(): void; } -/** @experimental */ +/** @stable */ export declare class FormBuilder { array(controlsConfig: any[], validator?: ValidatorFn, asyncValidator?: AsyncValidatorFn): FormArray; control(value: Object, validator?: ValidatorFn | ValidatorFn[], asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[]): FormControl; @@ -186,7 +186,7 @@ export declare class FormBuilder { }): FormGroup; } -/** @experimental */ +/** @stable */ export declare class FormControl extends AbstractControl { constructor(value?: any, validator?: ValidatorFn | ValidatorFn[], asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[]); patchValue(value: any, options?: { @@ -207,7 +207,7 @@ export declare class FormControl extends AbstractControl { }): void; } -/** @experimental */ +/** @stable */ export declare class FormControlDirective extends NgControl implements OnChanges { asyncValidator: AsyncValidatorFn; control: FormControl; @@ -222,7 +222,7 @@ export declare class FormControlDirective extends NgControl implements OnChanges viewToModelUpdate(newValue: any): void; } -/** @experimental */ +/** @stable */ export declare class FormControlName extends NgControl implements OnChanges, OnDestroy { asyncValidator: AsyncValidatorFn; control: FormControl; @@ -238,7 +238,7 @@ export declare class FormControlName extends NgControl implements OnChanges, OnD viewToModelUpdate(newValue: any): void; } -/** @experimental */ +/** @stable */ export declare class FormGroup extends AbstractControl { controls: { [key: string]: AbstractControl; @@ -250,8 +250,8 @@ export declare class FormGroup extends AbstractControl { }, validator?: ValidatorFn, asyncValidator?: AsyncValidatorFn); addControl(name: string, control: AbstractControl): void; contains(controlName: string): boolean; - exclude(controlName: string): void; - include(controlName: string): void; + /** @deprecated */ exclude(controlName: string): void; + /** @deprecated */ include(controlName: string): void; patchValue(value: { [key: string]: any; }, {onlySelf}?: { @@ -269,7 +269,7 @@ export declare class FormGroup extends AbstractControl { }): void; } -/** @experimental */ +/** @stable */ export declare class FormGroupDirective extends ControlContainer implements Form, OnChanges { control: FormGroup; directives: NgControl[]; @@ -295,17 +295,17 @@ export declare class FormGroupDirective extends ControlContainer implements Form updateModel(dir: NgControl, value: any): void; } -/** @experimental */ +/** @stable */ export declare class FormGroupName extends AbstractFormGroupDirective implements OnInit, OnDestroy { name: string; constructor(parent: ControlContainer, validators: any[], asyncValidators: any[]); } -/** @experimental */ +/** @stable */ export declare class FormsModule { } -/** @experimental */ +/** @stable */ export declare class MaxLengthValidator implements Validator { constructor(maxLength: string); validate(c: AbstractControl): { @@ -313,7 +313,7 @@ export declare class MaxLengthValidator implements Validator { }; } -/** @experimental */ +/** @stable */ export declare class MinLengthValidator implements Validator { constructor(minLength: string); validate(c: AbstractControl): { @@ -321,16 +321,16 @@ export declare class MinLengthValidator implements Validator { }; } -/** @experimental */ +/** @stable */ export declare const NG_ASYNC_VALIDATORS: OpaqueToken; -/** @experimental */ +/** @stable */ export declare const NG_VALIDATORS: OpaqueToken; -/** @experimental */ +/** @stable */ export declare const NG_VALUE_ACCESSOR: OpaqueToken; -/** @experimental */ +/** @stable */ export declare abstract class NgControl extends AbstractControlDirective { asyncValidator: AsyncValidatorFn; name: string; @@ -339,17 +339,17 @@ export declare abstract class NgControl extends AbstractControlDirective { abstract viewToModelUpdate(newValue: any): void; } -/** @experimental */ +/** @stable */ export declare class NgControlStatus extends AbstractControlStatus { constructor(cd: NgControl); } -/** @experimental */ +/** @stable */ export declare class NgControlStatusGroup extends AbstractControlStatus { constructor(cd: ControlContainer); } -/** @experimental */ +/** @stable */ export declare class NgForm extends ControlContainer implements Form { control: FormGroup; controls: { @@ -376,7 +376,7 @@ export declare class NgForm extends ControlContainer implements Form { updateModel(dir: NgControl, value: any): void; } -/** @experimental */ +/** @stable */ export declare class NgModel extends NgControl implements OnChanges, OnDestroy { asyncValidator: AsyncValidatorFn; control: FormControl; @@ -397,13 +397,13 @@ export declare class NgModel extends NgControl implements OnChanges, OnDestroy { viewToModelUpdate(newValue: any): void; } -/** @experimental */ +/** @stable */ export declare class NgModelGroup extends AbstractFormGroupDirective implements OnInit, OnDestroy { name: string; constructor(parent: ControlContainer, validators: any[], asyncValidators: any[]); } -/** @experimental */ +/** @stable */ export declare class NgSelectOption implements OnDestroy { id: string; ngValue: any; @@ -412,7 +412,7 @@ export declare class NgSelectOption implements OnDestroy { ngOnDestroy(): void; } -/** @experimental */ +/** @stable */ export declare class PatternValidator implements Validator { constructor(pattern: string); validate(c: AbstractControl): { @@ -420,21 +420,21 @@ export declare class PatternValidator implements Validator { }; } -/** @experimental */ +/** @stable */ export declare const REACTIVE_FORM_DIRECTIVES: Type[][]; -/** @experimental */ +/** @stable */ export declare const REACTIVE_FORM_PROVIDERS: Type[]; -/** @experimental */ +/** @stable */ export declare class ReactiveFormsModule { } -/** @experimental */ +/** @stable */ export declare class RequiredValidator { } -/** @experimental */ +/** @stable */ export declare class SelectControlValueAccessor implements ControlValueAccessor { onChange: (_: any) => void; onTouched: () => void; @@ -445,7 +445,7 @@ export declare class SelectControlValueAccessor implements ControlValueAccessor writeValue(value: any): void; } -/** @experimental */ +/** @stable */ export declare class SelectMultipleControlValueAccessor implements ControlValueAccessor { onChange: (_: any) => void; onTouched: () => void; @@ -456,21 +456,21 @@ export declare class SelectMultipleControlValueAccessor implements ControlValueA writeValue(value: any): void; } -/** @experimental */ +/** @stable */ export interface Validator { validate(c: AbstractControl): { [key: string]: any; }; } -/** @experimental */ +/** @stable */ export interface ValidatorFn { (c: AbstractControl): { [key: string]: any; }; } -/** @experimental */ +/** @stable */ export declare class Validators { static compose(validators: ValidatorFn[]): ValidatorFn; static composeAsync(validators: AsyncValidatorFn[]): AsyncValidatorFn;