import { ElementRef, EventEmitter, ChangeDetectorRef, SimpleChanges } from '@angular/core'; import { MatDialog, MatDialogRef } from '@angular/material/dialog'; import { EmitterComponent } from '../emitters/emitter.component'; import { ApiService } from '../../services/api.service'; import { DataService } from '../../services/data.service'; import { ToastrService } from 'ngx-toastr'; import { WebhooksComponent } from '../webhooks/webhooks.component'; import { ValidationError } from '../../shared/constants'; import { EditStateServiceService } from '../../services/edit-state-service.service'; import { ValidationService } from '../../services/validation.service'; import * as i0 from "@angular/core"; export declare class CreateFormComponent { dialog: MatDialog; private ApiService; private dataservice; private toastr; private elementRef; private cdr; private errorStateService; private validationService; private document; receivedData: any; selectedPage: any; logicId: any; file: any; SelectedLanguage: any; fileId: any; webhookConflict: boolean; emitterConflict: boolean; subformId: any; multiFieldId: any; isLogicShow: string[]; formStatus: string; private logicIdSubscription; private receivedDataSubscription; private questionSubscription; private pageIdSubscription; private logicQuestionSubscription; private childQuestionsSubscription; private translationSubscription; private subFormQuestionSubscription; private subFormQuestionsSubscription; private newSubFormQuestionsSubscription; private subFormSectionsSubscription; private sectionSubscription; private subFormDeleteSubscription; private fileSubscription; private languageSubscription; private fileIdubscription; private subformIdSubscription; private multiFieldIdSubscription; private multiFieldQuestionsSubscription; private subFormNewQuestionSubscription; private childSubformSubscription; private copiedQuestionSubscription; private focuesdQuestionSubscription; private copiedSubformSubscription; private _lastCopiedQuestionElement; private validationDialogRef; private confirmationDialogRef; dialogRefWebhooks: MatDialogRef | null; dialogRefEmitters: MatDialogRef | null; constructor(dialog: MatDialog, ApiService: ApiService, dataservice: DataService, toastr: ToastrService, elementRef: ElementRef, cdr: ChangeDetectorRef, errorStateService: EditStateServiceService, validationService: ValidationService, document: Document); formId: string; edit: boolean; createDuplicate: boolean; moduleName: string; top: string; showModifyInfo: boolean; triggerFormSave: string | null; isActionTriggered: boolean; showBackButton: boolean; formElements: any; enablePublish: boolean; enableSave: boolean; enableTranslation: boolean; allowTitleEdit: boolean; saveLabel: string; enableNextButton: boolean; formJSON: any; formElement: EventEmitter; submit: EventEmitter; goBack: EventEmitter; next: EventEmitter; pageId: string; questionId: string; rowId: string; isEditing: boolean; title: string; pageTitle: string; isEditingPage: boolean; formData: any; configurationData: any; selectedQuestion: any; selectedSection: any; selectedForm: any; selectedMultifieldId: string; isQuestionSelected: boolean; modifiedOn: string; modifiedBy: string; sideBarOpened: boolean; receivedPageId: string; pageNo: number; selectedids: any; inputValue: string; webhooks: any; emitters: any; defaultQuestions: any; comparisonOptions: { label: string; value: string; }[]; dropdownComparison: { label: string; value: string; }[]; textComparison: { label: string; value: string; }[]; headerTop: any; sideBarTop: any; bodyTop: any; previewMode: boolean; entityType: string; fontFamily: string; fontSize: number; saveInProgress: boolean; selectedQuestionGroup: any; inValidQuestions: ValidationError[]; private testNameMap; duplicateInprogress: boolean; outerRectangle: ElementRef; toggleLeft: number; editingPages: { [pageId: string]: boolean; }; togglePageEdit(pageId: string): void; isPageEditing(pageId: string): boolean; selectpage(pageid: any): void; onTitleChange(event: Event): void; isInvalid(id: any): boolean; getTitle(): any; toggleEditMode(e: any): void; togglePreview(): void; onPageTitleChange(event: Event, pageId: any): void; onTitleBlur(): void; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; ngAfterViewInit(): void; updateTogglePosition(): void; bindData(): void; isElementVisible(type: string): boolean; trackById(index: number, element: any): string; editorLabel: string; activeTab: any; textFieldOpened: boolean; pages: any; initialForm: any; translations: any; selectedLanguage: string; languages: any; previewLanguages: any; primaryColor: string; secondaryColor: string; loadFont(fontName: string): void; getModuleDetails(): void; getFormData(): void; getDuplicateFormData(): void; initializeForm(): void; openTab(tabId: string): void; openEmitters(): void; opentransaltion(): void; openSideBar(): void; closeSideBar(): void; parseErrorsToMap(errorString: string): ValidationError[]; save(formData: string): void; updateForm(data: string, valRequired?: boolean): Promise; saveForm(valRequired?: boolean): Promise; validatePage(): boolean; validateTranslations(translations: any[]): void; openTextFields(): void; addMultiFieldQuestion(data: any): void; addMultiFieldQuestions(pageId: any): void; addNewQuestion(pageId: any): void; addNewChildQuestion(pageId: any, questionId: any, logicId: any): void; addRowToMatchingQuestion(page: any, newRow: any, questionId: any, originalId?: string): void; addChildQuestions(page: any, logicId: any, newQuestion: any, newRow: any): void; addNewPage(): void; selectQuestion(question: any): void; changeElementType(elementType: any): void; deleteQuestion(id: any): void; deleteChildQuestion(pages: any[], id: any): void; getIds(child: any, id: any): void; newpages(updatedPages: any[]): void; deleteLogic(question: any, id: any): void; selectChildQuestion(data: any): void; addLogic(question: any): void; publishForm(): Promise; addSection(pageId: string): void; addSubForms(pageId: string): void; addQuestionGroup(pageId: string): void; deleteSubFormQuestion(pages: any[], id: any): void; deleteSubFormChildQuestion(pages: any[], id: any): void; addSubFormQuestion(data: any): void; addNewQuestionsSubForm(data: any): void; addSubFormNewQuestion(data: any): void; addNewSubFormSections(data: any): void; addNewRowToSubform(newRow: any, data: any): void; selectSection(question: any): void; selectedQuestionId: string; selectSubForm(question: any): void; selectMultifield(question: any): void; selectQuestionGroup(questionGroup: any): void; deleteSections(id: string): void; deleteSubForm(id: string): void; transalationDelete(id: any): void; openValidationFailedModal(validationErrors: ValidationError[], isPublish?: boolean): Promise; openConfirmationModal(page: any): void; extractElementIds(data: any): string[]; updatePageNumber(): void; deleteGrids(id: any): void; handleInput(): void; handleKeyDown(event: KeyboardEvent, childLogic: any): void; removeOption(optionValue: string, childLogic: any): void; onTranslationsUpdated(updatedTranslations: any): void; ngOnDestroy(): void; resetForm(): void; openWebhooks(): void; getWebhooks(moduleName: string): void; hasConflictInWebhook(webhook: any): boolean; hasAnyWebhookConflict(webhooks: any[]): void; updateWebhooks(): void; updateEmitters(): void; hasAnyEmitterConflict(emitters: any[]): boolean; addDefaultQuestion(questions: any): void; htmlTag: HTMLHtmlElement; toggleView(): void; updatePreviewLanguages(): void; getOptions(question: any): { label: string; value: string; }[]; updateQuestionOptions(page: any, questionId: string, updatedOptions: any[]): void; optionUpdates(data: any): void; updateQuestion: (question: any) => void; validateForm: (pages: any) => void; isWhenClauseValid(whenClause: any): boolean; /** * Handles the process of copying a question within the form builder. * It locates the original question by its ID and duplicates it * into the corresponding place (page, row, logic branch, etc.). * * @param copiedQuestion - The question object that needs to be duplicated. */ handleCopyQuestion(copiedQuestion: any): void; /** * Recursively traverses form elements to locate the original question and insert the copied one. * * @param elements - Array of form elements to traverse. * @param copiedQuestion - The question that needs to be duplicated. * @param page - The current page context. * @param parentId - Optional parent ID if the element is nested inside another container. * @param originalId - The ID of the original question to locate. * @returns boolean - Returns true once the copied question is inserted. */ findAndCopyInElements(elements: any[], copiedQuestion: any, page: any, parentId?: string, originalId?: string): boolean; /** * Duplicates a list of child logics, generating new IDs and rows * for each duplicated element inside the child logic. * * @param childLogics - Array of logic branches to duplicate. * @param page - The page context where rows should be added. * @param parentQuestionId - The ID of the parent question to attach rows to. * @returns Array of duplicated child logic objects. */ duplicateChildLogics(childLogics: any[], page: any, parentQuestionId: string): any[]; /** * Recursively duplicates subform elements and their associated translations. * Used for sub-sections inside complex forms. * * @param subformElements - Array of subform elements to be duplicated. * @param page - The page where layout rows will be added. * @returns Array of duplicated subform elements. */ duplicateSubformElements(subformElements: any[], page: any): any[]; propertyUpdate(data: any): void; navigateToBack(): void; navigateToNext(): void; generateFieldName(page: any): void; handleCopySubform(subform: any): void; editPublishedForm(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }