diff --git a/packages/forms/src/directives/number_value_accessor.ts b/packages/forms/src/directives/number_value_accessor.ts index 4303c183c6..df5edc43fa 100644 --- a/packages/forms/src/directives/number_value_accessor.ts +++ b/packages/forms/src/directives/number_value_accessor.ts @@ -38,6 +38,7 @@ export const NUMBER_VALUE_ACCESSOR: any = { * * @ngModule ReactiveFormsModule * @ngModule FormsModule + * @publicApi */ @Directive({ selector: diff --git a/packages/forms/src/directives/range_value_accessor.ts b/packages/forms/src/directives/range_value_accessor.ts index 8b11c85536..e386fe1444 100644 --- a/packages/forms/src/directives/range_value_accessor.ts +++ b/packages/forms/src/directives/range_value_accessor.ts @@ -38,6 +38,7 @@ export const RANGE_VALUE_ACCESSOR: StaticProvider = { * * @ngModule ReactiveFormsModule * @ngModule FormsModule + * @publicApi */ @Directive({ selector: diff --git a/packages/forms/src/forms.ts b/packages/forms/src/forms.ts index 324f5668da..235fdf8a03 100644 --- a/packages/forms/src/forms.ts +++ b/packages/forms/src/forms.ts @@ -18,6 +18,7 @@ */ +export {InternalFormsSharedModule as ɵInternalFormsSharedModule} from './directives'; export {AbstractControlDirective} from './directives/abstract_control_directive'; export {AbstractFormGroupDirective} from './directives/abstract_form_group_directive'; export {CheckboxControlValueAccessor} from './directives/checkbox_value_accessor'; @@ -31,7 +32,10 @@ export {NgForm} from './directives/ng_form'; export {NgFormSelectorWarning} from './directives/ng_form_selector_warning'; export {NgModel} from './directives/ng_model'; export {NgModelGroup} from './directives/ng_model_group'; +export {NgNoValidate as ɵNgNoValidate} from './directives/ng_no_validate_directive'; +export {NumberValueAccessor} from './directives/number_value_accessor'; export {RadioControlValueAccessor} from './directives/radio_control_value_accessor'; +export {RangeValueAccessor} from './directives/range_value_accessor'; export {FormControlDirective} from './directives/reactive_directives/form_control_directive'; export {FormControlName} from './directives/reactive_directives/form_control_name'; export {FormGroupDirective} from './directives/reactive_directives/form_group_directive'; @@ -39,6 +43,7 @@ export {FormArrayName} from './directives/reactive_directives/form_group_name'; export {FormGroupName} from './directives/reactive_directives/form_group_name'; export {NgSelectOption, SelectControlValueAccessor} from './directives/select_control_value_accessor'; export {SelectMultipleControlValueAccessor} from './directives/select_multiple_control_value_accessor'; +export {NgSelectMultipleOption as ɵNgSelectMultipleOption} from './directives/select_multiple_control_value_accessor'; export {AsyncValidator, AsyncValidatorFn, CheckboxRequiredValidator, EmailValidator, MaxLengthValidator, MinLengthValidator, PatternValidator, RequiredValidator, ValidationErrors, Validator, ValidatorFn} from './directives/validators'; export {FormBuilder} from './form_builder'; export {AbstractControl, AbstractControlOptions, FormArray, FormControl, FormGroup} from './model'; diff --git a/tools/public_api_guard/forms/forms.d.ts b/tools/public_api_guard/forms/forms.d.ts index eb334e5ec2..ede0fdf7d9 100644 --- a/tools/public_api_guard/forms/forms.d.ts +++ b/tools/public_api_guard/forms/forms.d.ts @@ -435,6 +435,16 @@ export declare class NgSelectOption implements OnDestroy { ngOnDestroy(): void; } +export declare class NumberValueAccessor implements ControlValueAccessor { + onChange: (_: any) => void; + onTouched: () => void; + constructor(_renderer: Renderer2, _elementRef: ElementRef); + registerOnChange(fn: (_: number | null) => void): void; + registerOnTouched(fn: () => void): void; + setDisabledState(isDisabled: boolean): void; + writeValue(value: number): void; +} + export declare class PatternValidator implements Validator, OnChanges { pattern: string | RegExp; ngOnChanges(changes: SimpleChanges): void; @@ -458,6 +468,16 @@ export declare class RadioControlValueAccessor implements ControlValueAccessor, writeValue(value: any): void; } +export declare class RangeValueAccessor implements ControlValueAccessor { + onChange: (_: any) => void; + onTouched: () => void; + constructor(_renderer: Renderer2, _elementRef: ElementRef); + registerOnChange(fn: (_: number | null) => void): void; + registerOnTouched(fn: () => void): void; + setDisabledState(isDisabled: boolean): void; + writeValue(value: any): void; +} + export declare class ReactiveFormsModule { static withConfig(opts: { warnOnNgModelWithFormControl: 'never' | 'once' | 'always'; }): ModuleWithProviders;