import { EventEmitter, HTMLStencilElement } from './stencil-public-runtime';
import { Components, ReactiveFormStatus } from './components';
export { Components, JSX } from './components';
export * from './utils/forms';
export interface ReactiveFormCustomEvents {
statusChanges: CustomEvent;
valueChanges: CustomEvent;
}
declare global {
interface HTMLReactiveFormElement extends Components.ReactiveForm, HTMLStencilElement {
addEventListener>(type: K, listener: (this: HTMLReactiveFormElement, ev: ReactiveFormCustomEvents[K]) => any, options?: boolean | AddEventListenerOptions): void;
/**
* Should return the rawValue of the form.
* @note In stencil it should be decorated with \@Method()
* ```ts
* class YourComponent implements FormComponent {
* \@Method()
* async getFormValue(): Promise {
* return this.formGroup.getRawValue();
* }
* }
* ```
*/
getValue(): Promise;
/**
* The validation status of the control. There are four possible
* validation status values:
*
* * **VALID**: This control has passed all validation checks.
* * **INVALID**: This control has failed at least one validation check.
* * **PENDING**: This control is in the midst of conducting a validation check.
* * **DISABLED**: This control is exempt from validation checks.
*
* These status values are mutually exclusive, so a control cannot be
* both valid AND invalid or invalid AND disabled.
*
* @note In stencil it should be decorated with @Method():
* ```ts
* class YourComponent implements FormComponent {
* \@Method()
* async isValid(): Promise {
* return this.formGroup.status;
* }
* }
* ```
*/
getStatus(): Promise;
}
interface FormComponent {
/**
* This event is raised when the value of the form has been changed.
* @note In stencil it should be decorated with \@Event():
* ```ts
* class YourComponent implements FormComponent {
* \@Event() valueChanges: EventEmitter;
* }
* ```
*/
valueChanges: EventEmitter;
/**
* This event is raised when the status of the form has been changed.
*
* There are four possible validation status values:
*
* * **VALID**: This control has passed all validation checks.
* * **INVALID**: This control has failed at least one validation check.
* * **PENDING**: This control is in the midst of conducting a validation check.
* * **DISABLED**: This control is exempt from validation checks.
*
* These status values are mutually exclusive, so a control cannot be
* both valid AND invalid or invalid AND disabled.
*
* @note In stencil it should be decorated with \@Event():
* ```ts
* class YourComponent implements FormComponent {
* \@Event() statusChanges: EventEmitter;
* }
* ```
*/
statusChanges: EventEmitter;
/**
* Should return the rawValue of the form.
* @note In stencil it should be decorated with \@Method()
* ```ts
* class YourComponent implements FormComponent {
* \@Method()
* async getFormValue(): Promise {
* return this.formGroup.getRawValue();
* }
* }
* ```
*/
getValue(): Promise;
/**
* The validation status of the control. There are four possible
* validation status values:
*
* * **VALID**: This control has passed all validation checks.
* * **INVALID**: This control has failed at least one validation check.
* * **PENDING**: This control is in the midst of conducting a validation check.
* * **DISABLED**: This control is exempt from validation checks.
*
* These status values are mutually exclusive, so a control cannot be
* both valid AND invalid or invalid AND disabled.
*
* @note In stencil it should be decorated with @Method():
* ```ts
* class YourComponent implements FormComponent {
* \@Method()
* async isValid(): Promise {
* return this.formGroup.status;
* }
* }
* ```
*/
getStatus(): Promise;
}
}