@uplink-protocol/form-controller
Version:
Reactive multi-step form controller with dynamic validation and state management
37 lines (36 loc) • 1.35 kB
TypeScript
import { FormService } from './form.service';
import { FieldService } from './field.service';
import { InteractionService } from './interaction.service';
import { StepperService } from './stepper.service';
/**
* FormManagerService - Handles form operations that require coordination with other services
* This provides a higher-level abstraction for form operations
*/
export declare class FormManagerService {
private formService;
private fieldService;
private interactionService;
private stepperService;
constructor(formService: FormService, fieldService: FieldService, interactionService: InteractionService, stepperService: StepperService);
/**
* Update a field value and handle validation and touch state
* @param stepId Step ID
* @param fieldId Field ID
* @param value New field value
*/
updateFieldWithValidation(stepId: string, fieldId: string, value: any): void;
/**
* Handle form submission logic with integrated validation
* @param showValidationErrors Whether to show validation errors
* @returns Submission result object
*/
submitFormWithValidation(showValidationErrors?: boolean): {
success: boolean;
data?: any;
errors?: any;
};
/**
* Reset the form to its initial state
*/
resetFormCompletely(): void;
}