import { WritableSignal } from '@angular/core'; import { BehaviorSubject, Observable } from 'rxjs'; import { IAfInstance, IFormDesignCell, IFormDesignRow, IFormDesignSection } from './interfaces'; import { ICoreFormSection, IFormBaseControl, IValidator } from '../core-form/core-form/enum-interfaces'; import { ICoreChecklistOption } from '../core-checklist/core-checklist/core-checklist.component'; import { FormArray, FormGroup, ValidatorFn } from '@angular/forms'; import { EnumSupportedRuntimeValidator } from './enums/EnumSupportedRuntimeValidator'; import { AlertService } from '../alert/alert.service'; import { AppService } from '../../services/app.service'; import { EnumTranslateKey } from 'alpha-global-constants'; import { EnumCorePageEditMode } from '../core-page-edit/EnumCorePageEditMode'; import { IAfInstanceDTO } from './interfaces'; import { EnumFormDesignMode } from './enums/EnumFormDesignMode'; import { EnumCoreButtonVNSCode } from '../core-button-group-vns/core-button-group-vns/EnumCoreButtonVNSCode'; import { ICalculatedField } from '../core-workflow-builder/interfaces/ICalculatedField'; import { JsonService } from '../../services/json.service'; import * as i0 from "@angular/core"; export declare const READONLY_WORKFLOW_FIELDS: string[]; export interface IWysFieldGroup { parent: string; children: string[]; } export declare class CoreFormDesignService { $afInstance: WritableSignal; $placeholderSections: WritableSignal; $nestedPlaceholderSections: WritableSignal; js: JsonService; shallowEqual(a: unknown, b: unknown): boolean; $sectionIndex: WritableSignal; $rowIndex: WritableSignal; $colIndex: WritableSignal; $nestedSectionIndex: WritableSignal; $nestedRowIndex: WritableSignal; $nestedColIndex: WritableSignal; $selectedCell: WritableSignal; $nestedSelectedCell: WritableSignal; $fieldSettingPanelOpen: WritableSignal; $nestedFieldSettingPanelOpen: WritableSignal; $showFormMetadata: WritableSignal; $showFormArrayDesign: WritableSignal; $controlTemplate: WritableSignal | null>; $control: WritableSignal; $nestedControlTemplate: WritableSignal | null>; $nestedControl: WritableSignal; $calculatedField: WritableSignal; $submitText: WritableSignal; editMode$: BehaviorSubject; $customFormButtonItems: WritableSignal; $draggingControl: WritableSignal | null>; $nestedDraggingControl: WritableSignal | null>; $shouldPatchMetadataForm: WritableSignal; $sections: import("@angular/core").Signal; $nestedSimplifiedSections: import("@angular/core").Signal; $controlJson: import("@angular/core").Signal; $nestedControlJson: import("@angular/core").Signal; $isInWorkflowDesign: WritableSignal; $saveLiveJson: import("@angular/core").Signal; $mode: WritableSignal; $liveFormNormalMode: WritableSignal; $liveFormSections: WritableSignal; liveFormCrudMode$: BehaviorSubject; formDesign: FormGroup; nestedFormDesign: FormGroup; formMetadata: FormGroup; formMetadataCheckError$: BehaviorSubject; alertService: AlertService; appService: AppService; formMetadataCustomButtonChecklistOptions$: BehaviorSubject; $formMetadataSections: WritableSignal; buildFormArrayFromLayout(layout: ICoreFormSection[], repeatCount?: number): FormArray; private stripRuntimeProps; updatePlaceholderSectionsPerNestedChanges(): void; $mergedControl: import("@angular/core").Signal; monkeyNPHS(): void; constructor(); syncFormDesignWithSections(): void; syncNestedFormDesignWithSections(): void; $formContext: import("@angular/core").Signal; $nestedFormContext: import("@angular/core").Signal; filteredCells(row: IFormDesignRow | undefined): IFormDesignCell[]; setControlProp(key: K, value: IFormBaseControl[K], isNested: boolean): void; replaceControl(oldField: string | null, newControl: IFormBaseControl, isNested: boolean): void; buildFormGroupFromSections(sections: ICoreFormSection[]): FormGroup; setControlPropDirectly(key: K, value: IFormBaseControl[K], isNested: boolean, directControl?: IFormBaseControl): void; patchControl(updated: IFormBaseControl, isNested: boolean): void; beginDragTemplate(control: IFormBaseControl, isNested: boolean): void; endDrag(isNested: boolean): void; isType(type: string): boolean; private readonly selfMappingTypes; private readonly defaultByControlType; normalizeCalledCount$: BehaviorSubject; normalize(control: Partial): IFormBaseControl; getDefaults(controlType: string): Partial; isRenderable(control: Partial): boolean; private generateUniqueField; private readonly propsComponentMap; getTypeSpecificPropsComponent(control: Partial | undefined): string; $currentPropsComponent: import("@angular/core").Signal; $nestedCurrentPropsComponent: import("@angular/core").Signal; generateFieldNameFor(control: Partial): string; generateLabelNameFor(control: Partial): string; getDetailedControlKey(control: Partial): string; getFriendlyControlLabel(control: Partial): string; camelToTitle(input: string): string; getAllControlsFromSections(): IFormBaseControl[]; toIValidatorArray(config: Partial>): IValidator[]; buildValidator(name: EnumSupportedRuntimeValidator, input: Partial): IValidator | null; getSimpleValidator(name: 'required' | 'email'): ValidatorFn; getSupportedValidators(control: IFormBaseControl): EnumSupportedRuntimeValidator[]; getControl(cell: IFormDesignCell): IFormBaseControl | null; getDefaultValidatorsFor(control: IFormBaseControl): IValidator[]; getErrorMessageFor(v: EnumSupportedRuntimeValidator): string; getValidatorFn(v: EnumSupportedRuntimeValidator, value: any): ValidatorFn; buildValidatorFromName(name: EnumSupportedRuntimeValidator, value?: any, readOnly?: boolean): IValidator; buildValidatorFn(name: EnumSupportedRuntimeValidator, value?: any): ValidatorFn; createFormInstance(payload: IAfInstance): Observable; updateFormInstance(payload: IAfInstance): Observable; sanitizeSectionsForSaving(sections: IFormDesignSection[]): ICoreFormSection[]; restoreValidator(v: any): any; toFormDesignSections(coreSections: ICoreFormSection[]): IFormDesignSection[]; toCoreFormSections(placeholderSections: IFormDesignSection[], injectSystemField?: boolean): ICoreFormSection[]; getById(id: string): Observable; mapToAfInstanceDTO(form: IAfInstance): IAfInstanceDTO; safeStringify(obj: any): string; mapFromAfInstanceDTO(dto: IAfInstanceDTO): IAfInstance; syncPlaceholderSectionsFromInstance(): void; normalizeSections(sections: IFormDesignSection[]): IFormDesignSection[]; designToCoreSection(sections: IFormDesignSection[]): ICoreFormSection[]; sanitizeControl(control: Partial): IFormBaseControl; rehydrateRuntimeSections(sections: ICoreFormSection[]): ICoreFormSection[]; rehydrateSections(sections: IFormDesignSection[]): IFormDesignSection[]; resetFormDesignState(): void; resetNestedFormDesignState(): void; isValidatorFn(validator: any): validator is ValidatorFn; injectSystemControls(sections: ICoreFormSection[], hasIdOfStringType: boolean): ICoreFormSection[]; updateCellAt(patch: Partial, isNested: boolean): void; extractWysGroups(sections: IFormDesignSection[]): IWysFieldGroup[]; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }