@kronscht/former
Version:
Former is an Angular library that provides a declarative way to generate complex forms based on primeng components
32 lines (31 loc) • 1.84 kB
TypeScript
import { KeyValue } from '@angular/common';
import { AfterContentChecked, ChangeDetectorRef, EventEmitter, OnChanges, OnInit, QueryList, SimpleChanges } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { TemplateNameDirective } from '../directive/template-name.directive';
import { FormerService } from '../former.service';
import { ActionButton, ActionResult, FormDefinition } from '../model/former.model';
import * as i0 from "@angular/core";
export declare class GeneratedFormComponent implements OnInit, OnChanges, AfterContentChecked {
readonly formerService: FormerService;
readonly cdr: ChangeDetectorRef;
templates: QueryList<TemplateNameDirective>;
formDefinition: FormDefinition;
formValues: any;
form: FormGroup;
changesEvent: EventEmitter<any>;
submitEvent: EventEmitter<ActionResult>;
actionHandler?: ActionButton;
ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
ngAfterContentChecked(): void;
originalOrder: (a: KeyValue<any, any>, b: KeyValue<any, any>) => number;
setActionHandler(action: ActionButton): void;
callActionHandler(): void;
isButtonDisabled(action: KeyValue<string, ActionButton>): boolean | undefined;
findActionForKey(action: KeyValue<string, ActionButton>): ActionButton | undefined;
findSubmitAction(): ActionButton | undefined;
private updateButtonState;
reset(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<GeneratedFormComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<GeneratedFormComponent, "lib-generated-form", never, { "formDefinition": { "alias": "formDefinition"; "required": false; }; "formValues": { "alias": "formValues"; "required": false; }; }, { "changesEvent": "changesEvent"; "submitEvent": "submitEvent"; }, ["templates"], never, false, never>;
}