From 515a8e07654b745b60a9a12762081dbd0702a4fa Mon Sep 17 00:00:00 2001 From: Kara Erickson Date: Wed, 8 Jun 2016 10:44:04 -0700 Subject: [PATCH] fix(forms): rename old forms folder to forms-deprecated --- modules/@angular/common/index.ts | 2 +- .../@angular/common/src/common_directives.ts | 2 +- .../@angular/common/src/forms-deprecated.ts | 58 +++++++++++++++++++ .../{forms => forms-deprecated}/directives.ts | 0 .../directives/abstract_control_directive.ts | 0 .../directives/checkbox_value_accessor.ts | 0 .../directives/control_container.ts | 0 .../directives/control_value_accessor.ts | 0 .../directives/default_value_accessor.ts | 0 .../directives/form_interface.ts | 0 .../directives/ng_control.ts | 0 .../directives/ng_control_group.ts | 0 .../directives/ng_control_name.ts | 0 .../directives/ng_control_status.ts | 0 .../directives/ng_form.ts | 0 .../directives/ng_form_control.ts | 0 .../directives/ng_form_model.ts | 0 .../directives/ng_model.ts | 0 .../directives/normalize_validator.dart | 0 .../directives/normalize_validator.ts | 0 .../directives/number_value_accessor.ts | 0 .../radio_control_value_accessor.ts | 0 .../select_control_value_accessor.ts | 0 .../select_multiple_control_value_accessor.ts | 0 .../directives/shared.ts | 0 .../directives/validators.ts | 0 .../form_builder.ts | 0 .../src/{forms => forms-deprecated}/model.ts | 0 .../{forms => forms-deprecated}/validators.ts | 0 modules/@angular/common/src/forms.ts | 58 ------------------- .../directives_spec.ts | 2 +- .../form_builder_spec.ts | 0 .../integration_spec.ts | 0 .../{forms => forms-deprecated}/model_spec.ts | 0 .../validators_spec.ts | 0 .../test/static_reflector_spec.ts | 4 +- tools/cjs-jasmine/index.ts | 2 +- 37 files changed, 64 insertions(+), 64 deletions(-) create mode 100644 modules/@angular/common/src/forms-deprecated.ts rename modules/@angular/common/src/{forms => forms-deprecated}/directives.ts (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/directives/abstract_control_directive.ts (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/directives/checkbox_value_accessor.ts (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/directives/control_container.ts (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/directives/control_value_accessor.ts (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/directives/default_value_accessor.ts (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/directives/form_interface.ts (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/directives/ng_control.ts (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/directives/ng_control_group.ts (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/directives/ng_control_name.ts (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/directives/ng_control_status.ts (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/directives/ng_form.ts (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/directives/ng_form_control.ts (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/directives/ng_form_model.ts (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/directives/ng_model.ts (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/directives/normalize_validator.dart (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/directives/normalize_validator.ts (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/directives/number_value_accessor.ts (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/directives/radio_control_value_accessor.ts (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/directives/select_control_value_accessor.ts (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/directives/select_multiple_control_value_accessor.ts (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/directives/shared.ts (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/directives/validators.ts (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/form_builder.ts (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/model.ts (100%) rename modules/@angular/common/src/{forms => forms-deprecated}/validators.ts (100%) delete mode 100644 modules/@angular/common/src/forms.ts rename modules/@angular/common/test/{forms => forms-deprecated}/directives_spec.ts (99%) rename modules/@angular/common/test/{forms => forms-deprecated}/form_builder_spec.ts (100%) rename modules/@angular/common/test/{forms => forms-deprecated}/integration_spec.ts (100%) rename modules/@angular/common/test/{forms => forms-deprecated}/model_spec.ts (100%) rename modules/@angular/common/test/{forms => forms-deprecated}/validators_spec.ts (100%) diff --git a/modules/@angular/common/index.ts b/modules/@angular/common/index.ts index 2c2d16007e..3900ca0a9c 100644 --- a/modules/@angular/common/index.ts +++ b/modules/@angular/common/index.ts @@ -1,5 +1,5 @@ export * from './src/pipes'; export * from './src/directives'; -export * from './src/forms'; +export * from './src/forms-deprecated'; export * from './src/common_directives'; export * from './src/location'; diff --git a/modules/@angular/common/src/common_directives.ts b/modules/@angular/common/src/common_directives.ts index efa84f22c6..ebddb9b83d 100644 --- a/modules/@angular/common/src/common_directives.ts +++ b/modules/@angular/common/src/common_directives.ts @@ -1,5 +1,5 @@ import {Type} from '@angular/core'; -import {FORM_DIRECTIVES} from './forms'; +import {FORM_DIRECTIVES} from './forms-deprecated'; import {CORE_DIRECTIVES} from './directives'; /** diff --git a/modules/@angular/common/src/forms-deprecated.ts b/modules/@angular/common/src/forms-deprecated.ts new file mode 100644 index 0000000000..70dffe5efa --- /dev/null +++ b/modules/@angular/common/src/forms-deprecated.ts @@ -0,0 +1,58 @@ +/** + * @module + * @description + * This module is used for handling user input, by defining and building a {@link ControlGroup} that + * consists of + * {@link Control} objects, and mapping them onto the DOM. {@link Control} objects can then be used + * to read information + * from the form DOM elements. + * + * Forms providers are not included in default providers; you must import these providers + * explicitly. + */ +export {AbstractControl, Control, ControlGroup, ControlArray} from './forms-deprecated/model'; + +export {AbstractControlDirective} from './forms-deprecated/directives/abstract_control_directive'; +export {Form} from './forms-deprecated/directives/form_interface'; +export {ControlContainer} from './forms-deprecated/directives/control_container'; +export {NgControlName} from './forms-deprecated/directives/ng_control_name'; +export {NgFormControl} from './forms-deprecated/directives/ng_form_control'; +export {NgModel} from './forms-deprecated/directives/ng_model'; +export {NgControl} from './forms-deprecated/directives/ng_control'; +export {NgControlGroup} from './forms-deprecated/directives/ng_control_group'; +export {NgFormModel} from './forms-deprecated/directives/ng_form_model'; +export {NgForm} from './forms-deprecated/directives/ng_form'; +export {ControlValueAccessor, NG_VALUE_ACCESSOR} from './forms-deprecated/directives/control_value_accessor'; +export {DefaultValueAccessor} from './forms-deprecated/directives/default_value_accessor'; +export {NgControlStatus} from './forms-deprecated/directives/ng_control_status'; +export {CheckboxControlValueAccessor} from './forms-deprecated/directives/checkbox_value_accessor'; +export { + NgSelectOption, + SelectControlValueAccessor +} from './forms-deprecated/directives/select_control_value_accessor'; +export {FORM_DIRECTIVES, RadioButtonState} from './forms-deprecated/directives'; +export {NG_VALIDATORS, NG_ASYNC_VALIDATORS, Validators} from './forms-deprecated/validators'; +export { + RequiredValidator, + MinLengthValidator, + MaxLengthValidator, + PatternValidator, + Validator +} from './forms-deprecated/directives/validators'; +export {FormBuilder} from './forms-deprecated/form_builder'; +import {FormBuilder} from './forms-deprecated/form_builder'; +import {RadioControlRegistry} from './forms-deprecated/directives/radio_control_value_accessor'; +import {Type} from '@angular/core'; + +/** + * Shorthand set of providers used for building Angular forms. + * + * ### Example + * + * ```typescript + * bootstrap(MyApp, [FORM_PROVIDERS]); + * ``` + * + * @experimental + */ +export const FORM_PROVIDERS: Type[] = /*@ts2dart_const*/[FormBuilder, RadioControlRegistry]; diff --git a/modules/@angular/common/src/forms/directives.ts b/modules/@angular/common/src/forms-deprecated/directives.ts similarity index 100% rename from modules/@angular/common/src/forms/directives.ts rename to modules/@angular/common/src/forms-deprecated/directives.ts diff --git a/modules/@angular/common/src/forms/directives/abstract_control_directive.ts b/modules/@angular/common/src/forms-deprecated/directives/abstract_control_directive.ts similarity index 100% rename from modules/@angular/common/src/forms/directives/abstract_control_directive.ts rename to modules/@angular/common/src/forms-deprecated/directives/abstract_control_directive.ts diff --git a/modules/@angular/common/src/forms/directives/checkbox_value_accessor.ts b/modules/@angular/common/src/forms-deprecated/directives/checkbox_value_accessor.ts similarity index 100% rename from modules/@angular/common/src/forms/directives/checkbox_value_accessor.ts rename to modules/@angular/common/src/forms-deprecated/directives/checkbox_value_accessor.ts diff --git a/modules/@angular/common/src/forms/directives/control_container.ts b/modules/@angular/common/src/forms-deprecated/directives/control_container.ts similarity index 100% rename from modules/@angular/common/src/forms/directives/control_container.ts rename to modules/@angular/common/src/forms-deprecated/directives/control_container.ts diff --git a/modules/@angular/common/src/forms/directives/control_value_accessor.ts b/modules/@angular/common/src/forms-deprecated/directives/control_value_accessor.ts similarity index 100% rename from modules/@angular/common/src/forms/directives/control_value_accessor.ts rename to modules/@angular/common/src/forms-deprecated/directives/control_value_accessor.ts diff --git a/modules/@angular/common/src/forms/directives/default_value_accessor.ts b/modules/@angular/common/src/forms-deprecated/directives/default_value_accessor.ts similarity index 100% rename from modules/@angular/common/src/forms/directives/default_value_accessor.ts rename to modules/@angular/common/src/forms-deprecated/directives/default_value_accessor.ts diff --git a/modules/@angular/common/src/forms/directives/form_interface.ts b/modules/@angular/common/src/forms-deprecated/directives/form_interface.ts similarity index 100% rename from modules/@angular/common/src/forms/directives/form_interface.ts rename to modules/@angular/common/src/forms-deprecated/directives/form_interface.ts diff --git a/modules/@angular/common/src/forms/directives/ng_control.ts b/modules/@angular/common/src/forms-deprecated/directives/ng_control.ts similarity index 100% rename from modules/@angular/common/src/forms/directives/ng_control.ts rename to modules/@angular/common/src/forms-deprecated/directives/ng_control.ts diff --git a/modules/@angular/common/src/forms/directives/ng_control_group.ts b/modules/@angular/common/src/forms-deprecated/directives/ng_control_group.ts similarity index 100% rename from modules/@angular/common/src/forms/directives/ng_control_group.ts rename to modules/@angular/common/src/forms-deprecated/directives/ng_control_group.ts diff --git a/modules/@angular/common/src/forms/directives/ng_control_name.ts b/modules/@angular/common/src/forms-deprecated/directives/ng_control_name.ts similarity index 100% rename from modules/@angular/common/src/forms/directives/ng_control_name.ts rename to modules/@angular/common/src/forms-deprecated/directives/ng_control_name.ts diff --git a/modules/@angular/common/src/forms/directives/ng_control_status.ts b/modules/@angular/common/src/forms-deprecated/directives/ng_control_status.ts similarity index 100% rename from modules/@angular/common/src/forms/directives/ng_control_status.ts rename to modules/@angular/common/src/forms-deprecated/directives/ng_control_status.ts diff --git a/modules/@angular/common/src/forms/directives/ng_form.ts b/modules/@angular/common/src/forms-deprecated/directives/ng_form.ts similarity index 100% rename from modules/@angular/common/src/forms/directives/ng_form.ts rename to modules/@angular/common/src/forms-deprecated/directives/ng_form.ts diff --git a/modules/@angular/common/src/forms/directives/ng_form_control.ts b/modules/@angular/common/src/forms-deprecated/directives/ng_form_control.ts similarity index 100% rename from modules/@angular/common/src/forms/directives/ng_form_control.ts rename to modules/@angular/common/src/forms-deprecated/directives/ng_form_control.ts diff --git a/modules/@angular/common/src/forms/directives/ng_form_model.ts b/modules/@angular/common/src/forms-deprecated/directives/ng_form_model.ts similarity index 100% rename from modules/@angular/common/src/forms/directives/ng_form_model.ts rename to modules/@angular/common/src/forms-deprecated/directives/ng_form_model.ts diff --git a/modules/@angular/common/src/forms/directives/ng_model.ts b/modules/@angular/common/src/forms-deprecated/directives/ng_model.ts similarity index 100% rename from modules/@angular/common/src/forms/directives/ng_model.ts rename to modules/@angular/common/src/forms-deprecated/directives/ng_model.ts diff --git a/modules/@angular/common/src/forms/directives/normalize_validator.dart b/modules/@angular/common/src/forms-deprecated/directives/normalize_validator.dart similarity index 100% rename from modules/@angular/common/src/forms/directives/normalize_validator.dart rename to modules/@angular/common/src/forms-deprecated/directives/normalize_validator.dart diff --git a/modules/@angular/common/src/forms/directives/normalize_validator.ts b/modules/@angular/common/src/forms-deprecated/directives/normalize_validator.ts similarity index 100% rename from modules/@angular/common/src/forms/directives/normalize_validator.ts rename to modules/@angular/common/src/forms-deprecated/directives/normalize_validator.ts diff --git a/modules/@angular/common/src/forms/directives/number_value_accessor.ts b/modules/@angular/common/src/forms-deprecated/directives/number_value_accessor.ts similarity index 100% rename from modules/@angular/common/src/forms/directives/number_value_accessor.ts rename to modules/@angular/common/src/forms-deprecated/directives/number_value_accessor.ts diff --git a/modules/@angular/common/src/forms/directives/radio_control_value_accessor.ts b/modules/@angular/common/src/forms-deprecated/directives/radio_control_value_accessor.ts similarity index 100% rename from modules/@angular/common/src/forms/directives/radio_control_value_accessor.ts rename to modules/@angular/common/src/forms-deprecated/directives/radio_control_value_accessor.ts diff --git a/modules/@angular/common/src/forms/directives/select_control_value_accessor.ts b/modules/@angular/common/src/forms-deprecated/directives/select_control_value_accessor.ts similarity index 100% rename from modules/@angular/common/src/forms/directives/select_control_value_accessor.ts rename to modules/@angular/common/src/forms-deprecated/directives/select_control_value_accessor.ts diff --git a/modules/@angular/common/src/forms/directives/select_multiple_control_value_accessor.ts b/modules/@angular/common/src/forms-deprecated/directives/select_multiple_control_value_accessor.ts similarity index 100% rename from modules/@angular/common/src/forms/directives/select_multiple_control_value_accessor.ts rename to modules/@angular/common/src/forms-deprecated/directives/select_multiple_control_value_accessor.ts diff --git a/modules/@angular/common/src/forms/directives/shared.ts b/modules/@angular/common/src/forms-deprecated/directives/shared.ts similarity index 100% rename from modules/@angular/common/src/forms/directives/shared.ts rename to modules/@angular/common/src/forms-deprecated/directives/shared.ts diff --git a/modules/@angular/common/src/forms/directives/validators.ts b/modules/@angular/common/src/forms-deprecated/directives/validators.ts similarity index 100% rename from modules/@angular/common/src/forms/directives/validators.ts rename to modules/@angular/common/src/forms-deprecated/directives/validators.ts diff --git a/modules/@angular/common/src/forms/form_builder.ts b/modules/@angular/common/src/forms-deprecated/form_builder.ts similarity index 100% rename from modules/@angular/common/src/forms/form_builder.ts rename to modules/@angular/common/src/forms-deprecated/form_builder.ts diff --git a/modules/@angular/common/src/forms/model.ts b/modules/@angular/common/src/forms-deprecated/model.ts similarity index 100% rename from modules/@angular/common/src/forms/model.ts rename to modules/@angular/common/src/forms-deprecated/model.ts diff --git a/modules/@angular/common/src/forms/validators.ts b/modules/@angular/common/src/forms-deprecated/validators.ts similarity index 100% rename from modules/@angular/common/src/forms/validators.ts rename to modules/@angular/common/src/forms-deprecated/validators.ts diff --git a/modules/@angular/common/src/forms.ts b/modules/@angular/common/src/forms.ts deleted file mode 100644 index 13c6f31d74..0000000000 --- a/modules/@angular/common/src/forms.ts +++ /dev/null @@ -1,58 +0,0 @@ -/** - * @module - * @description - * This module is used for handling user input, by defining and building a {@link ControlGroup} that - * consists of - * {@link Control} objects, and mapping them onto the DOM. {@link Control} objects can then be used - * to read information - * from the form DOM elements. - * - * Forms providers are not included in default providers; you must import these providers - * explicitly. - */ -export {AbstractControl, Control, ControlGroup, ControlArray} from './forms/model'; - -export {AbstractControlDirective} from './forms/directives/abstract_control_directive'; -export {Form} from './forms/directives/form_interface'; -export {ControlContainer} from './forms/directives/control_container'; -export {NgControlName} from './forms/directives/ng_control_name'; -export {NgFormControl} from './forms/directives/ng_form_control'; -export {NgModel} from './forms/directives/ng_model'; -export {NgControl} from './forms/directives/ng_control'; -export {NgControlGroup} from './forms/directives/ng_control_group'; -export {NgFormModel} from './forms/directives/ng_form_model'; -export {NgForm} from './forms/directives/ng_form'; -export {ControlValueAccessor, NG_VALUE_ACCESSOR} from './forms/directives/control_value_accessor'; -export {DefaultValueAccessor} from './forms/directives/default_value_accessor'; -export {NgControlStatus} from './forms/directives/ng_control_status'; -export {CheckboxControlValueAccessor} from './forms/directives/checkbox_value_accessor'; -export { - NgSelectOption, - SelectControlValueAccessor -} from './forms/directives/select_control_value_accessor'; -export {FORM_DIRECTIVES, RadioButtonState} from './forms/directives'; -export {NG_VALIDATORS, NG_ASYNC_VALIDATORS, Validators} from './forms/validators'; -export { - RequiredValidator, - MinLengthValidator, - MaxLengthValidator, - PatternValidator, - Validator -} from './forms/directives/validators'; -export {FormBuilder} from './forms/form_builder'; -import {FormBuilder} from './forms/form_builder'; -import {RadioControlRegistry} from './forms/directives/radio_control_value_accessor'; -import {Type} from '@angular/core'; - -/** - * Shorthand set of providers used for building Angular forms. - * - * ### Example - * - * ```typescript - * bootstrap(MyApp, [FORM_PROVIDERS]); - * ``` - * - * @experimental - */ -export const FORM_PROVIDERS: Type[] = /*@ts2dart_const*/[FormBuilder, RadioControlRegistry]; diff --git a/modules/@angular/common/test/forms/directives_spec.ts b/modules/@angular/common/test/forms-deprecated/directives_spec.ts similarity index 99% rename from modules/@angular/common/test/forms/directives_spec.ts rename to modules/@angular/common/test/forms-deprecated/directives_spec.ts index 90d673ad42..d3d5fb0a35 100644 --- a/modules/@angular/common/test/forms/directives_spec.ts +++ b/modules/@angular/common/test/forms-deprecated/directives_spec.ts @@ -38,7 +38,7 @@ import { } from '@angular/common'; -import {selectValueAccessor, composeValidators} from '@angular/common/src/forms/directives/shared'; +import {selectValueAccessor, composeValidators} from '@angular/common/src/forms-deprecated/directives/shared'; import {TimerWrapper} from '../../src/facade/async'; import {PromiseWrapper} from '../../src/facade/promise'; import {SimpleChange} from '@angular/core/src/change_detection'; diff --git a/modules/@angular/common/test/forms/form_builder_spec.ts b/modules/@angular/common/test/forms-deprecated/form_builder_spec.ts similarity index 100% rename from modules/@angular/common/test/forms/form_builder_spec.ts rename to modules/@angular/common/test/forms-deprecated/form_builder_spec.ts diff --git a/modules/@angular/common/test/forms/integration_spec.ts b/modules/@angular/common/test/forms-deprecated/integration_spec.ts similarity index 100% rename from modules/@angular/common/test/forms/integration_spec.ts rename to modules/@angular/common/test/forms-deprecated/integration_spec.ts diff --git a/modules/@angular/common/test/forms/model_spec.ts b/modules/@angular/common/test/forms-deprecated/model_spec.ts similarity index 100% rename from modules/@angular/common/test/forms/model_spec.ts rename to modules/@angular/common/test/forms-deprecated/model_spec.ts diff --git a/modules/@angular/common/test/forms/validators_spec.ts b/modules/@angular/common/test/forms-deprecated/validators_spec.ts similarity index 100% rename from modules/@angular/common/test/forms/validators_spec.ts rename to modules/@angular/common/test/forms-deprecated/validators_spec.ts diff --git a/modules/@angular/compiler-cli/test/static_reflector_spec.ts b/modules/@angular/compiler-cli/test/static_reflector_spec.ts index 42528866fe..4d766c368d 100644 --- a/modules/@angular/compiler-cli/test/static_reflector_spec.ts +++ b/modules/@angular/compiler-cli/test/static_reflector_spec.ts @@ -326,7 +326,7 @@ class MockReflectorHost implements StaticReflectorHost { getMetadataFor(moduleId: string): any { let data: {[key: string]: any} = { - '/tmp/angular2/src/common/forms/directives.d.ts': [{ + '/tmp/angular2/src/common/forms-deprecated/directives.d.ts': [{ "__symbolic": "module", "version": 1, "metadata": { @@ -424,7 +424,7 @@ class MockReflectorHost implements StaticReflectorHost { { "__symbolic": "reference", "name": "FORM_DIRECTIVES", - "module": "angular2/src/common/forms/directives" + "module": "angular2/src/common/forms-deprecated/directives" } ], "animations": [{ diff --git a/tools/cjs-jasmine/index.ts b/tools/cjs-jasmine/index.ts index 08cff28247..263f0e22e3 100644 --- a/tools/cjs-jasmine/index.ts +++ b/tools/cjs-jasmine/index.ts @@ -41,7 +41,7 @@ var specFiles: any = '@angular/platform-browser/**', '@angular/core/test/zone/**', '@angular/core/test/fake_async_spec.*', - '@angular/common/test/forms/**', + '@angular/common/test/forms-deprecated/**', '@angular/router/test/route_config/route_config_spec.*', '@angular/router/test/integration/bootstrap_spec.*', '@angular/integration_test/symbol_inspector/**',