ngx-surveys
Version:
Angular 18+ survey / form builder
43 lines (42 loc) • 2.41 kB
TypeScript
import { OnInit, EventEmitter, QueryList } from '@angular/core';
import { NgxSurveyService } from '../ngx-survey.service';
import { CdkDragDrop } from '@angular/cdk/drag-drop';
import { MatDialog } from '@angular/material/dialog';
import { FormItem, FormSection, FormItemComponent } from '../form-item/index';
import * as i0 from "@angular/core";
export declare class FormBuilderComponent implements OnInit {
service: NgxSurveyService;
dialog: MatDialog;
changes: EventEmitter<any[]>;
onFieldAdded: EventEmitter<FormItem>;
set form(form: FormSection[]);
get form(): FormSection[];
allowMultiChoiseFieldsOnly: boolean;
enableEditFieldValues: boolean;
showFieldNames: boolean;
readOnly: boolean;
formItemElements: QueryList<FormItemComponent>;
private _form;
formValues: any;
sortableSectionOptions: any;
onSectionDropped(event: CdkDragDrop<FormItem[]>): void;
onItemDropped(event: CdkDragDrop<FormItem[]>, section: FormSection): void;
sortableItemOptions: any;
constructor(service: NgxSurveyService, dialog: MatDialog);
openSectionDialog(section: FormSection): void;
openItemDialog(item: FormItem, section?: FormSection): void;
getSectionValueItemsForItem(item: FormItem, section: FormSection): FormItem[];
openItemVisibilityDialog(item: FormItem, section: FormSection): void;
ngOnInit(): void;
getDateStr(time: any): string;
getDateValue(str: any): Date;
onItemChanges(item: FormItem): void;
removeField(item: FormItem, section: FormSection): void;
cloneItem(item: FormItem, section: FormSection): void;
clearValue(item: FormItem, section: FormSection): void;
addFeild(section: FormSection): void;
removeSection(section: FormSection): void;
addSection(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<FormBuilderComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<FormBuilderComponent, "ngx-survey-form-builder", never, { "form": { "alias": "form"; "required": false; }; "allowMultiChoiseFieldsOnly": { "alias": "allowMultiChoiseFieldsOnly"; "required": false; }; "enableEditFieldValues": { "alias": "enableEditFieldValues"; "required": false; }; "showFieldNames": { "alias": "showFieldNames"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; }, { "changes": "changes"; "onFieldAdded": "onFieldAdded"; }, never, never, false, never>;
}