@manojadams/metaforms
Version:
Meta-data driven forms
17 lines (16 loc) • 1.09 kB
TypeScript
import { IDepdendencyItem, IForm } from "../constants/common-interface";
import MetaForm from "../constants/MetaForm";
import { IDependency, IField } from "../constants/model-interfaces";
declare class DependencyUtil {
static initDependencies(form: IForm, section: string, fields: Array<IField>): void;
static getDependencies(form: IForm, section: string, field: string): any;
static setDependencies(form: IForm, section: string, field: string, dependencies: IDependency): void;
static setDependency(form: IForm, dependency: IDepdendencyItem, section: string, type: string, field: string): void;
static handleDependencies(metaform: MetaForm, section: string, fieldName: string, value: any, fieldDisplayed: boolean): Promise<unknown>;
static handleValueMap(metaform: MetaForm, value: any, dep: IDepdendencyItem, resolved: IResolved): void;
static handleValueMapObject(metaform: MetaForm, value: any, dep: IDepdendencyItem, resolved: IResolved, mappedValue: any): void;
}
interface IResolved {
next: () => void;
}
export default DependencyUtil;