@masterteam/form-builder 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"hash":"13be4cbd539d36d7ee805bea1a4348cb8c420da77ce1a6ab63ab5e231806ee01","types":[{"exports":["AddField","AddFieldPayload","AddSection","AddSectionPayload","DeleteField","DeleteSection","FieldWidth","FormBuilder","FormBuilderActionKey","FormBuilderFacade","FormBuilderState","FormBuilderStateModel","FormConfiguration","FormField","FormSection","GetFormConfiguration","MoveField","MoveFieldPayload","ResetFormBuilderState","ResetFormConfiguration","Response","SetModuleInfo","UpdateField","UpdateFieldPayload","UpdateSection","UpdateSectionPayload"],"facadeModuleId":"C:\\Users\\ABDULLAH WISHAH\\Documents\\GitHub\\components\\dist\\masterteam\\form-builder\\tmp-typings\\masterteam-form-builder.d.ts","isDynamicEntry":false,"isEntry":true,"isImplicitEntry":false,"moduleIds":["C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/store/form-builder/form-builder.model.d.ts","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/lib/form-builder.model.d.ts","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/store/form-builder/form-builder.facade.d.ts","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/lib/form-builder.d.ts","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/store/form-builder/api.model.d.ts","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/store/form-builder/form-builder.actions.d.ts","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/store/form-builder/form-builder.state.d.ts","C:\\Users\\ABDULLAH WISHAH\\Documents\\GitHub\\components\\dist\\masterteam\\form-builder\\tmp-typings\\masterteam-form-builder.d.ts"],"name":"masterteam-form-builder.d","type":"chunk","dynamicImports":[],"fileName":"masterteam-form-builder.d.ts","implicitlyLoadedBefore":[],"importedBindings":{"@masterteam/form-builder":["*"],"@angular/core":["*"],"@masterteam/components":["LoadingStateShape","CrudStateBase","Response"],"@angular/cdk/drag-drop":["CdkDragDrop"],"rxjs":["*"],"@ngxs/store":["StateContext"]},"imports":["@masterteam/form-builder","@angular/core","@masterteam/components","@angular/cdk/drag-drop","rxjs","@ngxs/store"],"modules":{"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/store/form-builder/form-builder.model.d.ts":{"code":"declare enum FormBuilderActionKey {\n GetFormConfiguration = \"getFormConfiguration\",\n ResetFormConfiguration = \"resetFormConfiguration\",\n AddSection = \"addSection\",\n UpdateSection = \"updateSection\",\n DeleteSection = \"deleteSection\",\n AddField = \"addField\",\n UpdateField = \"updateField\",\n DeleteField = \"deleteField\",\n MoveField = \"moveField\"\n}\ntype FieldWidth = '25' | '50' | '100';\ninterface FormField {\n id: string;\n sectionId: string;\n propertyId: number;\n width: FieldWidth;\n order: number;\n hiddenInCreation?: boolean;\n hiddenInEditForm?: boolean;\n isRequired?: boolean;\n showConditionalDisplayFormula?: boolean;\n conditionalDisplayFormula?: string;\n _pending?: boolean;\n _deleting?: boolean;\n}\ninterface FormSection {\n id: string;\n name: {\n en: string;\n ar: string;\n };\n order: number;\n fields: FormField[];\n}\ninterface FormConfiguration {\n isActive: boolean;\n sections: FormSection[];\n}\ninterface AddSectionPayload {\n name: {\n en: string;\n ar: string;\n };\n order?: number;\n}\ninterface UpdateSectionPayload {\n name?: {\n en: string;\n ar: string;\n };\n order?: number;\n}\ninterface AddFieldPayload {\n propertyId: number;\n width: FieldWidth;\n order?: number;\n hiddenInCreation?: boolean;\n hiddenInEditForm?: boolean;\n isRequired?: boolean;\n showConditionalDisplayFormula?: boolean;\n conditionalDisplayFormula?: string;\n}\ninterface UpdateFieldPayload {\n width?: FieldWidth;\n order?: number;\n hiddenInCreation?: boolean;\n hiddenInEditForm?: boolean;\n isRequired?: boolean;\n showConditionalDisplayFormula?: boolean;\n conditionalDisplayFormula?: string | null;\n}\ninterface MoveFieldPayload {\n targetSectionId: string;\n order?: number;\n}\ninterface FormBuilderStateModel extends LoadingStateShape<FormBuilderActionKey> {\n moduleType: string | null;\n moduleId: string | number | null;\n parentModuleType: string | null;\n parentModuleId: string | number | null;\n parentPath: string;\n formConfiguration: FormConfiguration | null;\n}","originalLength":2277,"removedExports":[],"renderedExports":["FormBuilderActionKey","FieldWidth","FormField","FormSection","FormConfiguration","AddSectionPayload","UpdateSectionPayload","AddFieldPayload","UpdateFieldPayload","MoveFieldPayload","FormBuilderStateModel"],"renderedLength":2134},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/lib/form-builder.model.d.ts":{"code":"interface EnrichedFormField extends FormField {\n name: string;\n type: string;\n data?: any;\n _pending?: boolean;\n _deleting?: boolean;\n}\ninterface EnrichedFormSection extends Omit<FormSection, 'fields'> {\n fields: EnrichedFormField[];\n}\ninterface PropertyItem {\n id: number;\n key: string;\n normalizedKey: string;\n viewType: string;\n viewTypeLabel: string;\n name: string | Record<string, string>;\n description?: string;\n defaultValue?: unknown;\n order?: number;\n canBeDeleted?: boolean;\n displayOverView?: boolean;\n enabled?: boolean;\n formula?: unknown[];\n isBasic?: boolean;\n isCalculated?: boolean;\n isConfigurable?: boolean;\n isHiddenInCreation?: boolean;\n isHiddenInEdition?: boolean;\n isLive?: boolean;\n isLog?: boolean;\n isRequired?: boolean;\n isSystem?: boolean;\n isTranslatable?: boolean;\n shownInTable?: boolean;\n includeInSummary?: boolean;\n dependsOn?: unknown[];\n isFilterFormula?: boolean;\n configuration?: Record<string, unknown>;\n category?: string;\n valueOnCreation?: boolean;\n isRelated?: boolean;\n [key: string]: unknown;\n}","originalLength":1498,"removedExports":["FieldType","FormField","FormSection"],"renderedExports":["FieldWidth","EnrichedFormField","EnrichedFormSection","PropertyItem"],"renderedLength":1154},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/store/form-builder/form-builder.facade.d.ts":{"code":"declare class FormBuilderFacade {\n private readonly store;\n private readonly stateSignal;\n readonly formConfiguration: _angular_core.Signal<_masterteam_form_builder.FormConfiguration | null>;\n readonly sections: _angular_core.Signal<_masterteam_form_builder.FormSection[]>;\n readonly moduleType: _angular_core.Signal<string | null>;\n readonly moduleId: _angular_core.Signal<string | number | null>;\n readonly isLoadingFormConfiguration: _angular_core.Signal<boolean>;\n readonly isResettingFormConfiguration: _angular_core.Signal<boolean>;\n readonly isAddingSection: _angular_core.Signal<boolean>;\n readonly isUpdatingSection: _angular_core.Signal<boolean>;\n readonly isDeletingSection: _angular_core.Signal<boolean>;\n readonly isAddingField: _angular_core.Signal<boolean>;\n readonly isUpdatingField: _angular_core.Signal<boolean>;\n readonly isDeletingField: _angular_core.Signal<boolean>;\n readonly isMovingField: _angular_core.Signal<boolean>;\n readonly formConfigurationError: _angular_core.Signal<string | null>;\n readonly sectionError: _angular_core.Signal<string | null>;\n readonly fieldError: _angular_core.Signal<string | null>;\n setModuleInfo(moduleType: string, moduleId: string | number, parentModuleType?: string, parentModuleId?: string | number, parentPath?: string): rxjs.Observable<void>;\n resetState(): rxjs.Observable<void>;\n getFormConfiguration(): rxjs.Observable<void>;\n resetFormConfiguration(): rxjs.Observable<void>;\n addSection(payload: AddSectionPayload): rxjs.Observable<void>;\n updateSection(sectionId: string, payload: UpdateSectionPayload): rxjs.Observable<void>;\n deleteSection(sectionId: string): rxjs.Observable<void>;\n addField(sectionId: string, payload: AddFieldPayload): rxjs.Observable<void>;\n updateField(sectionId: string, fieldId: string, payload: UpdateFieldPayload): rxjs.Observable<void>;\n deleteField(sectionId: string, fieldId: string): rxjs.Observable<void>;\n moveField(sectionId: string, fieldId: string, payload: MoveFieldPayload): rxjs.Observable<void>;\n static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormBuilderFacade, never>;\n static ɵprov: _angular_core.ɵɵInjectableDeclaration<FormBuilderFacade>;\n}","originalLength":2694,"removedExports":[],"renderedExports":["FormBuilderFacade"],"renderedLength":2246},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/lib/form-builder.d.ts":{"code":"declare class FormBuilder {\n private readonly modalService;\n private readonly confirmationService;\n private readonly translocoService;\n protected readonly facade: FormBuilderFacade;\n private dialogRef;\n readonly properties: _angular_core.InputSignal<PropertyItem[]>;\n readonly activeTab: _angular_core.WritableSignal<string>;\n readonly sections: _angular_core.Signal<_masterteam_form_builder.FormSection[]>;\n readonly isLoading: _angular_core.Signal<boolean>;\n readonly error: _angular_core.Signal<string | null>;\n private readonly propertiesMap;\n readonly enrichedSections: _angular_core.Signal<EnrichedFormSection[]>;\n readonly availableTabs: _angular_core.Signal<{\n id: string;\n title: string;\n properties: PropertyItem[];\n }[]>;\n constructor();\n drop(event: CdkDragDrop<EnrichedFormField[] | PropertyItem[]>): void;\n addSection(): void;\n openPreview(): void;\n resetFormConfiguration(): void;\n noReturnPredicate: () => boolean;\n static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormBuilder, never>;\n static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormBuilder, \"mt-form-builder\", never, { \"properties\": { \"alias\": \"properties\"; \"required\": false; \"isSignal\": true; }; }, {}, never, never, true, never>;\n}","originalLength":1624,"removedExports":[],"renderedExports":["FormBuilder"],"renderedLength":1295},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/store/form-builder/api.model.d.ts":{"code":"/**\n * Standard API Response wrapper\n */\ninterface Response<T> {\n endpoint: string;\n status: number;\n code: number;\n locale: string;\n message?: string | null;\n errors?: any | null;\n data: T;\n cacheSession?: string;\n}","originalLength":248,"removedExports":[],"renderedExports":["Response"],"renderedLength":240},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/store/form-builder/form-builder.actions.d.ts":{"code":"declare class SetModuleInfo {\n moduleType: string;\n moduleId: string | number;\n parentModuleType?: string | undefined;\n parentModuleId?: string | number | undefined;\n parentPath?: string | undefined;\n static readonly type = \"[FormBuilder] Set Module Info\";\n constructor(moduleType: string, moduleId: string | number, parentModuleType?: string | undefined, parentModuleId?: string | number | undefined, parentPath?: string | undefined);\n}\ndeclare class ResetFormBuilderState {\n static readonly type = \"[FormBuilder] Reset State\";\n}\ndeclare class GetFormConfiguration {\n static readonly type = \"[FormBuilder] Get Form Configuration\";\n}\ndeclare class ResetFormConfiguration {\n static readonly type = \"[FormBuilder] Reset Form Configuration\";\n}\ndeclare class AddSection {\n payload: AddSectionPayload;\n static readonly type = \"[FormBuilder] Add Section\";\n constructor(payload: AddSectionPayload);\n}\ndeclare class UpdateSection {\n sectionId: string;\n payload: UpdateSectionPayload;\n static readonly type = \"[FormBuilder] Update Section\";\n constructor(sectionId: string, payload: UpdateSectionPayload);\n}\ndeclare class DeleteSection {\n sectionId: string;\n static readonly type = \"[FormBuilder] Delete Section\";\n constructor(sectionId: string);\n}\ndeclare class AddField {\n sectionId: string;\n payload: AddFieldPayload;\n static readonly type = \"[FormBuilder] Add Field\";\n constructor(sectionId: string, payload: AddFieldPayload);\n}\ndeclare class UpdateField {\n sectionId: string;\n fieldId: string;\n payload: UpdateFieldPayload;\n static readonly type = \"[FormBuilder] Update Field\";\n constructor(sectionId: string, fieldId: string, payload: UpdateFieldPayload);\n}\ndeclare class DeleteField {\n sectionId: string;\n fieldId: string;\n static readonly type = \"[FormBuilder] Delete Field\";\n constructor(sectionId: string, fieldId: string);\n}\ndeclare class MoveField {\n sectionId: string;\n fieldId: string;\n payload: MoveFieldPayload;\n static readonly type = \"[FormBuilder] Move Field\";\n constructor(sectionId: string, fieldId: string, payload: MoveFieldPayload);\n}","originalLength":2380,"removedExports":[],"renderedExports":["SetModuleInfo","ResetFormBuilderState","GetFormConfiguration","ResetFormConfiguration","AddSection","UpdateSection","DeleteSection","AddField","UpdateField","DeleteField","MoveField"],"renderedLength":2162},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/store/form-builder/form-builder.state.d.ts":{"code":"declare class FormBuilderState extends CrudStateBase<FormSection, FormBuilderStateModel, FormBuilderActionKey> {\n private http;\n private baseUrl;\n private getApiPath;\n static getState(state: FormBuilderStateModel): FormBuilderStateModel;\n static getFormConfiguration(state: FormBuilderStateModel): FormConfiguration | null;\n static getSections(state: FormBuilderStateModel): FormSection[];\n static getModuleType(state: FormBuilderStateModel): string | null;\n static getModuleId(state: FormBuilderStateModel): string | number | null;\n setModuleInfo(ctx: StateContext<FormBuilderStateModel>, action: SetModuleInfo): void;\n resetState(ctx: StateContext<FormBuilderStateModel>): void;\n getFormConfiguration(ctx: StateContext<FormBuilderStateModel>): rxjs.Observable<Response$1<FormConfiguration>>;\n resetFormConfiguration(ctx: StateContext<FormBuilderStateModel>): rxjs.Observable<Response$1<FormConfiguration>>;\n addSection(ctx: StateContext<FormBuilderStateModel>, action: AddSection): rxjs.Observable<Response$1<FormSection>>;\n updateSection(ctx: StateContext<FormBuilderStateModel>, action: UpdateSection): rxjs.Observable<Response$1<FormSection>>;\n deleteSection(ctx: StateContext<FormBuilderStateModel>, action: DeleteSection): rxjs.Observable<Response$1<{\n id: string;\n }>>;\n addField(ctx: StateContext<FormBuilderStateModel>, action: AddField): rxjs.Observable<Response$1<FormField>>;\n updateField(ctx: StateContext<FormBuilderStateModel>, action: UpdateField): rxjs.Observable<Response$1<FormField>>;\n deleteField(ctx: StateContext<FormBuilderStateModel>, action: DeleteField): rxjs.Observable<Response$1<{\n id: string;\n sectionId: string;\n }>>;\n moveField(ctx: StateContext<FormBuilderStateModel>, action: MoveField): rxjs.Observable<Response$1<FormField>>;\n static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormBuilderState, never>;\n static ɵprov: _angular_core.ɵɵInjectableDeclaration<FormBuilderState>;\n}","originalLength":2479,"removedExports":[],"renderedExports":["FormBuilderState"],"renderedLength":2002},"C:\\Users\\ABDULLAH WISHAH\\Documents\\GitHub\\components\\dist\\masterteam\\form-builder\\tmp-typings\\masterteam-form-builder.d.ts":{"code":null,"originalLength":129,"removedExports":[],"renderedExports":[],"renderedLength":0}},"referencedFiles":[],"code":"import * as _masterteam_form_builder from '@masterteam/form-builder';\nimport * as _angular_core from '@angular/core';\nimport { LoadingStateShape, CrudStateBase, Response as Response$1 } from '@masterteam/components';\nimport { CdkDragDrop } from '@angular/cdk/drag-drop';\nimport * as rxjs from 'rxjs';\nimport { StateContext } from '@ngxs/store';\n\ndeclare enum FormBuilderActionKey {\n GetFormConfiguration = \"getFormConfiguration\",\n ResetFormConfiguration = \"resetFormConfiguration\",\n AddSection = \"addSection\",\n UpdateSection = \"updateSection\",\n DeleteSection = \"deleteSection\",\n AddField = \"addField\",\n UpdateField = \"updateField\",\n DeleteField = \"deleteField\",\n MoveField = \"moveField\"\n}\ntype FieldWidth = '25' | '50' | '100';\ninterface FormField {\n id: string;\n sectionId: string;\n propertyId: number;\n width: FieldWidth;\n order: number;\n hiddenInCreation?: boolean;\n hiddenInEditForm?: boolean;\n isRequired?: boolean;\n showConditionalDisplayFormula?: boolean;\n conditionalDisplayFormula?: string;\n _pending?: boolean;\n _deleting?: boolean;\n}\ninterface FormSection {\n id: string;\n name: {\n en: string;\n ar: string;\n };\n order: number;\n fields: FormField[];\n}\ninterface FormConfiguration {\n isActive: boolean;\n sections: FormSection[];\n}\ninterface AddSectionPayload {\n name: {\n en: string;\n ar: string;\n };\n order?: number;\n}\ninterface UpdateSectionPayload {\n name?: {\n en: string;\n ar: string;\n };\n order?: number;\n}\ninterface AddFieldPayload {\n propertyId: number;\n width: FieldWidth;\n order?: number;\n hiddenInCreation?: boolean;\n hiddenInEditForm?: boolean;\n isRequired?: boolean;\n showConditionalDisplayFormula?: boolean;\n conditionalDisplayFormula?: string;\n}\ninterface UpdateFieldPayload {\n width?: FieldWidth;\n order?: number;\n hiddenInCreation?: boolean;\n hiddenInEditForm?: boolean;\n isRequired?: boolean;\n showConditionalDisplayFormula?: boolean;\n conditionalDisplayFormula?: string | null;\n}\ninterface MoveFieldPayload {\n targetSectionId: string;\n order?: number;\n}\ninterface FormBuilderStateModel extends LoadingStateShape<FormBuilderActionKey> {\n moduleType: string | null;\n moduleId: string | number | null;\n parentModuleType: string | null;\n parentModuleId: string | number | null;\n parentPath: string;\n formConfiguration: FormConfiguration | null;\n}\n\ninterface EnrichedFormField extends FormField {\n name: string;\n type: string;\n data?: any;\n _pending?: boolean;\n _deleting?: boolean;\n}\ninterface EnrichedFormSection extends Omit<FormSection, 'fields'> {\n fields: EnrichedFormField[];\n}\ninterface PropertyItem {\n id: number;\n key: string;\n normalizedKey: string;\n viewType: string;\n viewTypeLabel: string;\n name: string | Record<string, string>;\n description?: string;\n defaultValue?: unknown;\n order?: number;\n canBeDeleted?: boolean;\n displayOverView?: boolean;\n enabled?: boolean;\n formula?: unknown[];\n isBasic?: boolean;\n isCalculated?: boolean;\n isConfigurable?: boolean;\n isHiddenInCreation?: boolean;\n isHiddenInEdition?: boolean;\n isLive?: boolean;\n isLog?: boolean;\n isRequired?: boolean;\n isSystem?: boolean;\n isTranslatable?: boolean;\n shownInTable?: boolean;\n includeInSummary?: boolean;\n dependsOn?: unknown[];\n isFilterFormula?: boolean;\n configuration?: Record<string, unknown>;\n category?: string;\n valueOnCreation?: boolean;\n isRelated?: boolean;\n [key: string]: unknown;\n}\n\ndeclare class FormBuilderFacade {\n private readonly store;\n private readonly stateSignal;\n readonly formConfiguration: _angular_core.Signal<_masterteam_form_builder.FormConfiguration | null>;\n readonly sections: _angular_core.Signal<_masterteam_form_builder.FormSection[]>;\n readonly moduleType: _angular_core.Signal<string | null>;\n readonly moduleId: _angular_core.Signal<string | number | null>;\n readonly isLoadingFormConfiguration: _angular_core.Signal<boolean>;\n readonly isResettingFormConfiguration: _angular_core.Signal<boolean>;\n readonly isAddingSection: _angular_core.Signal<boolean>;\n readonly isUpdatingSection: _angular_core.Signal<boolean>;\n readonly isDeletingSection: _angular_core.Signal<boolean>;\n readonly isAddingField: _angular_core.Signal<boolean>;\n readonly isUpdatingField: _angular_core.Signal<boolean>;\n readonly isDeletingField: _angular_core.Signal<boolean>;\n readonly isMovingField: _angular_core.Signal<boolean>;\n readonly formConfigurationError: _angular_core.Signal<string | null>;\n readonly sectionError: _angular_core.Signal<string | null>;\n readonly fieldError: _angular_core.Signal<string | null>;\n setModuleInfo(moduleType: string, moduleId: string | number, parentModuleType?: string, parentModuleId?: string | number, parentPath?: string): rxjs.Observable<void>;\n resetState(): rxjs.Observable<void>;\n getFormConfiguration(): rxjs.Observable<void>;\n resetFormConfiguration(): rxjs.Observable<void>;\n addSection(payload: AddSectionPayload): rxjs.Observable<void>;\n updateSection(sectionId: string, payload: UpdateSectionPayload): rxjs.Observable<void>;\n deleteSection(sectionId: string): rxjs.Observable<void>;\n addField(sectionId: string, payload: AddFieldPayload): rxjs.Observable<void>;\n updateField(sectionId: string, fieldId: string, payload: UpdateFieldPayload): rxjs.Observable<void>;\n deleteField(sectionId: string, fieldId: string): rxjs.Observable<void>;\n moveField(sectionId: string, fieldId: string, payload: MoveFieldPayload): rxjs.Observable<void>;\n static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormBuilderFacade, never>;\n static ɵprov: _angular_core.ɵɵInjectableDeclaration<FormBuilderFacade>;\n}\n\ndeclare class FormBuilder {\n private readonly modalService;\n private readonly confirmationService;\n private readonly translocoService;\n protected readonly facade: FormBuilderFacade;\n private dialogRef;\n readonly properties: _angular_core.InputSignal<PropertyItem[]>;\n readonly activeTab: _angular_core.WritableSignal<string>;\n readonly sections: _angular_core.Signal<_masterteam_form_builder.FormSection[]>;\n readonly isLoading: _angular_core.Signal<boolean>;\n readonly error: _angular_core.Signal<string | null>;\n private readonly propertiesMap;\n readonly enrichedSections: _angular_core.Signal<EnrichedFormSection[]>;\n readonly availableTabs: _angular_core.Signal<{\n id: string;\n title: string;\n properties: PropertyItem[];\n }[]>;\n constructor();\n drop(event: CdkDragDrop<EnrichedFormField[] | PropertyItem[]>): void;\n addSection(): void;\n openPreview(): void;\n resetFormConfiguration(): void;\n noReturnPredicate: () => boolean;\n static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormBuilder, never>;\n static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormBuilder, \"mt-form-builder\", never, { \"properties\": { \"alias\": \"properties\"; \"required\": false; \"isSignal\": true; }; }, {}, never, never, true, never>;\n}\n\n/**\n * Standard API Response wrapper\n */\ninterface Response<T> {\n endpoint: string;\n status: number;\n code: number;\n locale: string;\n message?: string | null;\n errors?: any | null;\n data: T;\n cacheSession?: string;\n}\n\ndeclare class SetModuleInfo {\n moduleType: string;\n moduleId: string | number;\n parentModuleType?: string | undefined;\n parentModuleId?: string | number | undefined;\n parentPath?: string | undefined;\n static readonly type = \"[FormBuilder] Set Module Info\";\n constructor(moduleType: string, moduleId: string | number, parentModuleType?: string | undefined, parentModuleId?: string | number | undefined, parentPath?: string | undefined);\n}\ndeclare class ResetFormBuilderState {\n static readonly type = \"[FormBuilder] Reset State\";\n}\ndeclare class GetFormConfiguration {\n static readonly type = \"[FormBuilder] Get Form Configuration\";\n}\ndeclare class ResetFormConfiguration {\n static readonly type = \"[FormBuilder] Reset Form Configuration\";\n}\ndeclare class AddSection {\n payload: AddSectionPayload;\n static readonly type = \"[FormBuilder] Add Section\";\n constructor(payload: AddSectionPayload);\n}\ndeclare class UpdateSection {\n sectionId: string;\n payload: UpdateSectionPayload;\n static readonly type = \"[FormBuilder] Update Section\";\n constructor(sectionId: string, payload: UpdateSectionPayload);\n}\ndeclare class DeleteSection {\n sectionId: string;\n static readonly type = \"[FormBuilder] Delete Section\";\n constructor(sectionId: string);\n}\ndeclare class AddField {\n sectionId: string;\n payload: AddFieldPayload;\n static readonly type = \"[FormBuilder] Add Field\";\n constructor(sectionId: string, payload: AddFieldPayload);\n}\ndeclare class UpdateField {\n sectionId: string;\n fieldId: string;\n payload: UpdateFieldPayload;\n static readonly type = \"[FormBuilder] Update Field\";\n constructor(sectionId: string, fieldId: string, payload: UpdateFieldPayload);\n}\ndeclare class DeleteField {\n sectionId: string;\n fieldId: string;\n static readonly type = \"[FormBuilder] Delete Field\";\n constructor(sectionId: string, fieldId: string);\n}\ndeclare class MoveField {\n sectionId: string;\n fieldId: string;\n payload: MoveFieldPayload;\n static readonly type = \"[FormBuilder] Move Field\";\n constructor(sectionId: string, fieldId: string, payload: MoveFieldPayload);\n}\n\ndeclare class FormBuilderState extends CrudStateBase<FormSection, FormBuilderStateModel, FormBuilderActionKey> {\n private http;\n private baseUrl;\n private getApiPath;\n static getState(state: FormBuilderStateModel): FormBuilderStateModel;\n static getFormConfiguration(state: FormBuilderStateModel): FormConfiguration | null;\n static getSections(state: FormBuilderStateModel): FormSection[];\n static getModuleType(state: FormBuilderStateModel): string | null;\n static getModuleId(state: FormBuilderStateModel): string | number | null;\n setModuleInfo(ctx: StateContext<FormBuilderStateModel>, action: SetModuleInfo): void;\n resetState(ctx: StateContext<FormBuilderStateModel>): void;\n getFormConfiguration(ctx: StateContext<FormBuilderStateModel>): rxjs.Observable<Response$1<FormConfiguration>>;\n resetFormConfiguration(ctx: StateContext<FormBuilderStateModel>): rxjs.Observable<Response$1<FormConfiguration>>;\n addSection(ctx: StateContext<FormBuilderStateModel>, action: AddSection): rxjs.Observable<Response$1<FormSection>>;\n updateSection(ctx: StateContext<FormBuilderStateModel>, action: UpdateSection): rxjs.Observable<Response$1<FormSection>>;\n deleteSection(ctx: StateContext<FormBuilderStateModel>, action: DeleteSection): rxjs.Observable<Response$1<{\n id: string;\n }>>;\n addField(ctx: StateContext<FormBuilderStateModel>, action: AddField): rxjs.Observable<Response$1<FormField>>;\n updateField(ctx: StateContext<FormBuilderStateModel>, action: UpdateField): rxjs.Observable<Response$1<FormField>>;\n deleteField(ctx: StateContext<FormBuilderStateModel>, action: DeleteField): rxjs.Observable<Response$1<{\n id: string;\n sectionId: string;\n }>>;\n moveField(ctx: StateContext<FormBuilderStateModel>, action: MoveField): rxjs.Observable<Response$1<FormField>>;\n static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormBuilderState, never>;\n static ɵprov: _angular_core.ɵɵInjectableDeclaration<FormBuilderState>;\n}\n\nexport { AddField, AddSection, DeleteField, DeleteSection, FormBuilder, FormBuilderActionKey, FormBuilderFacade, FormBuilderState, GetFormConfiguration, MoveField, ResetFormBuilderState, ResetFormConfiguration, SetModuleInfo, UpdateField, UpdateSection };\nexport type { AddFieldPayload, AddSectionPayload, FieldWidth, FormBuilderStateModel, FormConfiguration, FormField, FormSection, MoveFieldPayload, Response, UpdateFieldPayload, UpdateSectionPayload };\n","map":null,"preliminaryFileName":"masterteam-form-builder.d.ts","sourcemapFileName":null}],"fesm2022":[{"exports":["AddField","AddSection","DeleteField","DeleteSection","FormBuilder","FormBuilderActionKey","FormBuilderFacade","FormBuilderState","GetFormConfiguration","MoveField","ResetFormBuilderState","ResetFormConfiguration","SetModuleInfo","UpdateField","UpdateSection"],"facadeModuleId":"C:\\Users\\ABDULLAH WISHAH\\Documents\\GitHub\\components\\dist\\masterteam\\form-builder\\tmp-esm2022\\masterteam-form-builder.js","isDynamicEntry":false,"isEntry":true,"isImplicitEntry":false,"moduleIds":["C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/store/form-builder/api.model.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/store/form-builder/form-builder.actions.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/store/form-builder/form-builder.model.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/store/form-builder/form-builder.state.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/store/form-builder/form-builder.facade.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/store/form-builder/index.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/fb-field-conditions/condition-constants.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/fb-field-conditions/fb-field-conditions.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/fb-field-form/fb-field-form.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/fb-section-form/fb-section-form.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/fb-section/fb-section.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/fb-preview-form/fb-preview-form.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/form-builder.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/public-api.js","C:\\Users\\ABDULLAH WISHAH\\Documents\\GitHub\\components\\dist\\masterteam\\form-builder\\tmp-esm2022\\masterteam-form-builder.js"],"name":"masterteam-form-builder","type":"chunk","dynamicImports":[],"fileName":"masterteam-form-builder.mjs","implicitlyLoadedBefore":[],"importedBindings":{"@angular/core":["inject","*","Injectable","computed","input","signal","viewChild","Component","effect","output"],"@angular/common":["CommonModule","*"],"@angular/forms":["FormControl","ReactiveFormsModule","*","FormGroup","FormsModule"],"primeng/tabs":["TabsModule","*"],"@masterteam/components/button":["Button"],"@masterteam/components/card":["Card"],"@masterteam/components/modal":["ModalService"],"@masterteam/components/confirmation":["ConfirmationService"],"@jsverse/transloco":["TranslocoDirective","TranslocoService"],"@angular/cdk/drag-drop":["CdkDrag","CdkDropList","CdkDragPlaceholder","DragDropModule","*"],"@masterteam/forms/dynamic-field":["DynamicField"],"@masterteam/icons":["Icon"],"@ngxs/store":["Action","Selector","State","Store","select"],"@angular/common/http":["HttpClient"],"@masterteam/components":["CrudStateBase","handleApiRequest","RadioCardsFieldConfig"],"@masterteam/forms/dynamic-form":["DynamicForm"],"@masterteam/components/toggle-field":["ToggleField"],"@masterteam/components/dialog":["ModalRef"],"@masterteam/components/formula":["FormulaToolbar","FormulaEditor"],"@masterteam/components/tabs":["Tabs"]},"imports":["@angular/core","@angular/common","@angular/forms","primeng/tabs","@masterteam/components/button","@masterteam/components/card","@masterteam/components/modal","@masterteam/components/confirmation","@jsverse/transloco","@angular/cdk/drag-drop","@masterteam/forms/dynamic-field","@masterteam/icons","@ngxs/store","@angular/common/http","@masterteam/components","@masterteam/forms/dynamic-form","@masterteam/components/toggle-field","@masterteam/components/dialog","@masterteam/components/formula","@masterteam/components/tabs"],"modules":{"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/store/form-builder/api.model.js":{"code":"","originalLength":37,"removedExports":[],"renderedExports":[],"renderedLength":0},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/store/form-builder/form-builder.actions.js":{"code":"// ============================================================================\n// Module Configuration Actions\n// ============================================================================\nclass SetModuleInfo {\n moduleType;\n moduleId;\n parentModuleType;\n parentModuleId;\n parentPath;\n static type = '[FormBuilder] Set Module Info';\n constructor(moduleType, moduleId, parentModuleType, parentModuleId, parentPath) {\n this.moduleType = moduleType;\n this.moduleId = moduleId;\n this.parentModuleType = parentModuleType;\n this.parentModuleId = parentModuleId;\n this.parentPath = parentPath;\n }\n}\nclass ResetFormBuilderState {\n static type = '[FormBuilder] Reset State';\n}\n// ============================================================================\n// Form Configuration Actions\n// ============================================================================\nclass GetFormConfiguration {\n static type = '[FormBuilder] Get Form Configuration';\n}\nclass ResetFormConfiguration {\n static type = '[FormBuilder] Reset Form Configuration';\n}\n// ============================================================================\n// Section Actions\n// ============================================================================\nclass AddSection {\n payload;\n static type = '[FormBuilder] Add Section';\n constructor(payload) {\n this.payload = payload;\n }\n}\nclass UpdateSection {\n sectionId;\n payload;\n static type = '[FormBuilder] Update Section';\n constructor(sectionId, payload) {\n this.sectionId = sectionId;\n this.payload = payload;\n }\n}\nclass DeleteSection {\n sectionId;\n static type = '[FormBuilder] Delete Section';\n constructor(sectionId) {\n this.sectionId = sectionId;\n }\n}\n// ============================================================================\n// Field Actions\n// ============================================================================\nclass AddField {\n sectionId;\n payload;\n static type = '[FormBuilder] Add Field';\n constructor(sectionId, payload) {\n this.sectionId = sectionId;\n this.payload = payload;\n }\n}\nclass UpdateField {\n sectionId;\n fieldId;\n payload;\n static type = '[FormBuilder] Update Field';\n constructor(sectionId, fieldId, payload) {\n this.sectionId = sectionId;\n this.fieldId = fieldId;\n this.payload = payload;\n }\n}\nclass DeleteField {\n sectionId;\n fieldId;\n static type = '[FormBuilder] Delete Field';\n constructor(sectionId, fieldId) {\n this.sectionId = sectionId;\n this.fieldId = fieldId;\n }\n}\nclass MoveField {\n sectionId;\n fieldId;\n payload;\n static type = '[FormBuilder] Move Field';\n constructor(sectionId, fieldId, payload) {\n this.sectionId = sectionId;\n this.fieldId = fieldId;\n this.payload = payload;\n }\n}","originalLength":3043,"removedExports":[],"renderedExports":["SetModuleInfo","ResetFormBuilderState","GetFormConfiguration","ResetFormConfiguration","AddSection","UpdateSection","DeleteSection","AddField","UpdateField","DeleteField","MoveField"],"renderedLength":2917},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/store/form-builder/form-builder.model.js":{"code":"// ============================================================================\n// Action Keys Enum\n// ============================================================================\nvar FormBuilderActionKey;\n(function (FormBuilderActionKey) {\n // Form Configuration\n FormBuilderActionKey[\"GetFormConfiguration\"] = \"getFormConfiguration\";\n FormBuilderActionKey[\"ResetFormConfiguration\"] = \"resetFormConfiguration\";\n // Section CRUD\n FormBuilderActionKey[\"AddSection\"] = \"addSection\";\n FormBuilderActionKey[\"UpdateSection\"] = \"updateSection\";\n FormBuilderActionKey[\"DeleteSection\"] = \"deleteSection\";\n // Field CRUD\n FormBuilderActionKey[\"AddField\"] = \"addField\";\n FormBuilderActionKey[\"UpdateField\"] = \"updateField\";\n FormBuilderActionKey[\"DeleteField\"] = \"deleteField\";\n FormBuilderActionKey[\"MoveField\"] = \"moveField\";\n})(FormBuilderActionKey || (FormBuilderActionKey = {}));","originalLength":964,"removedExports":[],"renderedExports":["FormBuilderActionKey"],"renderedLength":910},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/store/form-builder/form-builder.state.js":{"code":"var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n// Default State\nconst DEFAULT_STATE = {\n // Module configuration\n moduleType: null,\n moduleId: null,\n parentModuleType: null,\n parentModuleId: null,\n parentPath: '',\n // Form data\n formConfiguration: null,\n // Loading state (from LoadingStateShape)\n loadingActive: [],\n errors: {},\n};\nlet FormBuilderState = class FormBuilderState extends CrudStateBase {\n http = inject(HttpClient);\n baseUrl = 'formConfigurations';\n // ============================================================================\n // Helpers\n // ============================================================================\n getApiPath(state) {\n const { parentPath, moduleType, moduleId } = state;\n return `${this.baseUrl}${parentPath}/${moduleType}/${moduleId}`;\n }\n // ============================================================================\n // Selectors\n // ============================================================================\n static getState(state) {\n return state ?? DEFAULT_STATE;\n }\n static getFormConfiguration(state) {\n return state?.formConfiguration ?? null;\n }\n static getSections(state) {\n return state?.formConfiguration?.sections ?? [];\n }\n static getModuleType(state) {\n return state?.moduleType ?? null;\n }\n static getModuleId(state) {\n return state?.moduleId ?? null;\n }\n // ============================================================================\n // Module Configuration Actions\n // ============================================================================\n setModuleInfo(ctx, action) {\n let parentPath = '';\n if (action.parentModuleType && action.parentModuleId) {\n parentPath = `/${action.parentModuleType}/${action.parentModuleId}`;\n }\n else if (action.parentPath) {\n parentPath = action.parentPath;\n }\n ctx.patchState({\n moduleType: action.moduleType,\n moduleId: action.moduleId,\n parentModuleType: action.parentModuleType ?? null,\n parentModuleId: action.parentModuleId ?? null,\n parentPath: parentPath ?? '',\n });\n }\n resetState(ctx) {\n ctx.setState(DEFAULT_STATE);\n }\n // ============================================================================\n // Form Configuration Actions\n // ============================================================================\n getFormConfiguration(ctx) {\n const state = ctx.getState();\n const apiPath = this.getApiPath(state);\n const req$ = this.http.get(apiPath);\n return this.load(ctx, {\n key: FormBuilderActionKey.GetFormConfiguration,\n request$: req$,\n updateState: (_state, data) => ({\n formConfiguration: data ?? null,\n }),\n });\n }\n resetFormConfiguration(ctx) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/reset`;\n const req$ = this.http.delete(apiPath);\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.ResetFormConfiguration,\n request$: req$,\n onSuccess: (res, _currentState) => ({\n formConfiguration: res.data ?? null,\n }),\n });\n }\n // ============================================================================\n // Section Actions\n // ============================================================================\n addSection(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections`;\n const req$ = this.http.post(apiPath, action.payload);\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.AddSection,\n request$: req$,\n onSuccess: (res, currentState) => {\n const sections = this.adapter.addOne(currentState.formConfiguration?.sections ?? [], res.data);\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n });\n }\n updateSection(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}`;\n const req$ = this.http.put(apiPath, action.payload);\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.UpdateSection,\n request$: req$,\n onSuccess: (res, currentState) => {\n const sections = this.adapter.upsertOne(currentState.formConfiguration?.sections ?? [], res.data, 'id');\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n });\n }\n deleteSection(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}`;\n const req$ = this.http.delete(apiPath);\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.DeleteSection,\n request$: req$,\n onSuccess: (res, currentState) => {\n const sections = this.adapter.removeOne(currentState.formConfiguration?.sections ?? [], res.data.id, 'id');\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n });\n }\n // ============================================================================\n // Field Actions\n // ============================================================================\n addField(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields`;\n const req$ = this.http.post(apiPath, action.payload);\n // Generate temp ID for optimistic update\n const tempId = `temp_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;\n const tempField = {\n id: tempId,\n sectionId: action.sectionId,\n propertyId: action.payload.propertyId,\n width: action.payload.width,\n order: action.payload.order ?? 0,\n hiddenInCreation: action.payload.hiddenInCreation,\n _pending: true,\n };\n // Optimistically add the temp field\n const sectionsWithTemp = (state.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n const fields = [...section.fields];\n const insertIndex = action.payload.order ?? fields.length;\n fields.splice(insertIndex, 0, tempField);\n return { ...section, fields };\n }\n return section;\n });\n ctx.patchState({\n formConfiguration: {\n ...state.formConfiguration,\n sections: sectionsWithTemp,\n },\n });\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.AddField,\n request$: req$,\n onSuccess: (res, currentState) => {\n const newField = res.data;\n // Replace temp field with real field\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n return {\n ...section,\n fields: section.fields.map((f) => f.id === tempId ? newField : f),\n };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n onError: (_error, currentState) => {\n // Remove temp field on error\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n return {\n ...section,\n fields: section.fields.filter((f) => f.id !== tempId),\n };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n });\n }\n updateField(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields/${action.fieldId}`;\n const req$ = this.http.put(apiPath, action.payload);\n // Apply optimistic update for order changes\n if (action.payload.order !== undefined) {\n const newOrder = action.payload.order;\n const sections = (state.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n const fields = [...section.fields];\n const currentIndex = fields.findIndex((f) => f.id === action.fieldId);\n if (currentIndex !== -1) {\n const [movedField] = fields.splice(currentIndex, 1);\n fields.splice(newOrder, 0, movedField);\n }\n return { ...section, fields };\n }\n return section;\n });\n ctx.patchState({\n formConfiguration: {\n ...state.formConfiguration,\n sections,\n },\n });\n }\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.UpdateField,\n request$: req$,\n onSuccess: (res, currentState) => {\n const updatedField = res.data;\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n // Update the field and sort by order\n const updatedFields = section.fields.map((f) => f.id === updatedField.id ? updatedField : f);\n return {\n ...section,\n fields: updatedFields.sort((a, b) => a.order - b.order),\n };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n onError: (_error, _currentState) => {\n // Revert optimistic update on error - reload original state\n if (action.payload.order !== undefined) {\n return {\n formConfiguration: state.formConfiguration,\n };\n }\n return {};\n },\n });\n }\n deleteField(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields/${action.fieldId}`;\n const req$ = this.http.delete(apiPath);\n // Optimistically mark field as deleting\n const sectionsWithDeleting = (state.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n return {\n ...section,\n fields: section.fields.map((f) => f.id === action.fieldId ? { ...f, _deleting: true } : f),\n };\n }\n return section;\n });\n ctx.patchState({\n formConfiguration: {\n ...state.formConfiguration,\n sections: sectionsWithDeleting,\n },\n });\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.DeleteField,\n request$: req$,\n onSuccess: (res, currentState) => {\n const { id: deletedId, sectionId } = res.data;\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === sectionId) {\n return {\n ...section,\n fields: section.fields.filter((f) => f.id !== deletedId),\n };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n onError: (_error, currentState) => {\n // Remove _deleting flag on error\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n return {\n ...section,\n fields: section.fields.map((f) => f.id === action.fieldId ? { ...f, _deleting: false } : f),\n };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n });\n }\n moveField(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields/${action.fieldId}/move`;\n const req$ = this.http.put(apiPath, action.payload);\n // Apply optimistic update - move field immediately\n const sourceSectionId = action.sectionId;\n const targetSectionId = action.payload.targetSectionId;\n const targetOrder = action.payload.order ?? 0;\n let movedFieldData = null;\n const optimisticSections = (state.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === sourceSectionId) {\n const fieldToMove = section.fields.find((f) => f.id === action.fieldId);\n if (fieldToMove) {\n movedFieldData = { ...fieldToMove, order: targetOrder };\n }\n return {\n ...section,\n fields: section.fields.filter((f) => f.id !== action.fieldId),\n };\n }\n return section;\n });\n // Add to target section\n const sectionsWithMoved = optimisticSections.map((section) => {\n if (section.id === targetSectionId && movedFieldData) {\n const fields = [...section.fields];\n fields.splice(targetOrder, 0, movedFieldData);\n return { ...section, fields };\n }\n return section;\n });\n ctx.patchState({\n formConfiguration: {\n ...state.formConfiguration,\n sections: sectionsWithMoved,\n },\n });\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.MoveField,\n request$: req$,\n onSuccess: (res, currentState) => {\n const movedField = res.data;\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n // Update the moved field with server response\n if (section.id === targetSectionId) {\n return {\n ...section,\n fields: section.fields\n .map((f) => (f.id === movedField.id ? movedField : f))\n .sort((a, b) => a.order - b.order),\n };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n onError: (_error, _currentState) => {\n // Revert optimistic update on error\n return {\n formConfiguration: state.formConfiguration,\n };\n },\n });\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilderState, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\n static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilderState });\n};\n__decorate([\n Action(SetModuleInfo)\n], FormBuilderState.prototype, \"setModuleInfo\", null);\n__decorate([\n Action(ResetFormBuilderState)\n], FormBuilderState.prototype, \"resetState\", null);\n__decorate([\n Action(GetFormConfiguration)\n], FormBuilderState.prototype, \"getFormConfiguration\", null);\n__decorate([\n Action(ResetFormConfiguration)\n], FormBuilderState.prototype, \"resetFormConfiguration\", null);\n__decorate([\n Action(AddSection)\n], FormBuilderState.prototype, \"addSection\", null);\n__decorate([\n Action(UpdateSection)\n], FormBuilderState.prototype, \"updateSection\", null);\n__decorate([\n Action(DeleteSection)\n], FormBuilderState.prototype, \"deleteSection\", null);\n__decorate([\n Action(AddField)\n], FormBuilderState.prototype, \"addField\", null);\n__decorate([\n Action(UpdateField)\n], FormBuilderState.prototype, \"updateField\", null);\n__decorate([\n Action(DeleteField)\n], FormBuilderState.prototype, \"deleteField\", null);\n__decorate([\n Action(MoveField)\n], FormBuilderState.prototype, \"moveField\", null);\n__decorate([\n Selector()\n], FormBuilderState, \"getState\", null);\n__decorate([\n Selector()\n], FormBuilderState, \"getFormConfiguration\", null);\n__decorate([\n Selector()\n], FormBuilderState, \"getSections\", null);\n__decorate([\n Selector()\n], FormBuilderState, \"getModuleType\", null);\n__decorate([\n Selector()\n], FormBuilderState, \"getModuleId\", null);\nFormBuilderState = __decorate([\n State({\n name: 'formBuilder',\n defaults: DEFAULT_STATE,\n })\n], FormBuilderState);\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilderState, decorators: [{\n type: Injectable\n }], propDecorators: { setModuleInfo: [], resetState: [], getFormConfiguration: [], resetFormConfiguration: [], addSection: [], updateSection: [], deleteSection: [], addField: [], updateField: [], deleteField: [], moveField: [] } });","originalLength":20440,"removedExports":[],"renderedExports":["FormBuilderState"],"renderedLength":19818},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/store/form-builder/form-builder.facade.js":{"code":"class FormBuilderFacade {\n store = inject(Store);\n // ============================================================================\n // State Selectors\n // ============================================================================\n stateSignal = select(FormBuilderState.getState);\n formConfiguration = select(FormBuilderState.getFormConfiguration);\n sections = select(FormBuilderState.getSections);\n moduleType = select(FormBuilderState.getModuleType);\n moduleId = select(FormBuilderState.getModuleId);\n // ============================================================================\n // Loading Signals\n // ============================================================================\n isLoadingFormConfiguration = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.GetFormConfiguration), ...(ngDevMode ? [{ debugName: \"isLoadingFormConfiguration\" }] : []));\n isResettingFormConfiguration = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.ResetFormConfiguration), ...(ngDevMode ? [{ debugName: \"isResettingFormConfiguration\" }] : []));\n isAddingSection = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.AddSection), ...(ngDevMode ? [{ debugName: \"isAddingSection\" }] : []));\n isUpdatingSection = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.UpdateSection), ...(ngDevMode ? [{ debugName: \"isUpdatingSection\" }] : []));\n isDeletingSection = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.DeleteSection), ...(ngDevMode ? [{ debugName: \"isDeletingSection\" }] : []));\n isAddingField = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.AddField), ...(ngDevMode ? [{ debugName: \"isAddingField\" }] : []));\n isUpdatingField = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.UpdateField), ...(ngDevMode ? [{ debugName: \"isUpdatingField\" }] : []));\n isDeletingField = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.DeleteField), ...(ngDevMode ? [{ debugName: \"isDeletingField\" }] : []));\n isMovingField = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.MoveField), ...(ngDevMode ? [{ debugName: \"isMovingField\" }] : []));\n // ============================================================================\n // Error Signals\n // ============================================================================\n formConfigurationError = computed(() => this.stateSignal().errors[FormBuilderActionKey.GetFormConfiguration] ??\n null, ...(ngDevMode ? [{ debugName: \"formConfigurationError\" }] : []));\n sectionError = computed(() => {\n const errors = this.stateSignal().errors;\n return (errors[FormBuilderActionKey.AddSection] ??\n errors[FormBuilderActionKey.UpdateSection] ??\n errors[FormBuilderActionKey.DeleteSection] ??\n null);\n }, ...(ngDevMode ? [{ debugName: \"sectionError\" }] : []));\n fieldError = computed(() => {\n const errors = this.stateSignal().errors;\n return (errors[FormBuilderActionKey.AddField] ??\n errors[FormBuilderActionKey.UpdateField] ??\n errors[FormBuilderActionKey.DeleteField] ??\n errors[FormBuilderActionKey.MoveField] ??\n null);\n }, ...(ngDevMode ? [{ debugName: \"fieldError\" }] : []));\n // ============================================================================\n // Module Configuration Dispatchers\n // ============================================================================\n setModuleInfo(moduleType, moduleId, parentModuleType, parentModuleId, parentPath) {\n return this.store.dispatch(new SetModuleInfo(moduleType, moduleId, parentModuleType, parentModuleId, parentPath));\n }\n resetState() {\n return this.store.dispatch(new ResetFormBuilderState());\n }\n // ============================================================================\n // Form Configuration Dispatchers\n // ============================================================================\n getFormConfiguration() {\n return this.store.dispatch(new GetFormConfiguration());\n }\n resetFormConfiguration() {\n return this.store.dispatch(new ResetFormConfiguration());\n }\n // ============================================================================\n // Section Dispatchers\n // ============================================================================\n addSection(payload) {\n return this.store.dispatch(new AddSection(payload));\n }\n updateSection(sectionId, payload) {\n return this.store.dispatch(new UpdateSection(sectionId, payload));\n }\n deleteSection(sectionId) {\n return this.store.dispatch(new DeleteSection(sectionId));\n }\n // ============================================================================\n // Field Dispatchers\n // ============================================================================\n addField(sectionId, payload) {\n return this.store.dispatch(new AddField(sectionId, payload));\n }\n updateField(sectionId, fieldId, payload) {\n return this.store.dispatch(new UpdateField(sectionId, fieldId, payload));\n }\n deleteField(sectionId, fieldId) {\n return this.store.dispatch(new DeleteField(sectionId, fieldId));\n }\n moveField(sectionId, fieldId, payload) {\n return this.store.dispatch(new MoveField(sectionId, fieldId, payload));\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilderFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilderFacade, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilderFacade, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });","originalLength":6652,"removedExports":[],"renderedExports":["FormBuilderFacade"],"renderedLength":6119},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/store/form-builder/index.js":{"code":"","originalLength":217,"removedExports":[],"renderedExports":[],"renderedLength":0},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/fb-field-conditions/condition-constants.js":{"code":"/**\n * Condition Formula Constants\n * Static functions and operators for condition formulas (Show/Hide/Enable/Disable)\n */\n/**\n * Functions for field conditions\n */\nconst CONDITION_FUNCTION_CATEGORIES = [\n {\n name: 'Logic',\n displayName: 'Field Visibility',\n functions: [\n {\n name: 'SHOW_IF',\n category: 'Logic',\n description: 'Show this field when condition is true',\n signature: 'SHOW_IF(condition)',\n parameters: [\n {\n name: 'condition',\n type: 'boolean',\n description: 'When true, field is visible',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: [\n 'SHOW_IF(@Status == \"Active\")',\n 'SHOW_IF(@Type == \"Custom\")',\n ],\n },\n {\n name: 'HIDE_IF',\n category: 'Logic',\n description: 'Hide this field when condition is true',\n signature: 'HIDE_IF(condition)',\n parameters: [\n {\n name: 'condition',\n type: 'boolean',\n description: 'When true, field is hidden',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: ['HIDE_IF(@Status == \"Closed\")', 'HIDE_IF(ISNULL(@Parent))'],\n },\n {\n name: 'DISABLE_IF',\n category: 'Logic',\n description: 'Disable this field when condition is true',\n signature: 'DISABLE_IF(condition)',\n parameters: [\n {\n name: 'condition',\n type: 'boolean',\n description: 'When true, field is disabled',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: [\n 'DISABLE_IF(@IsLocked == true)',\n 'DISABLE_IF(@Status == \"Approved\")',\n ],\n },\n {\n name: 'ENABLE_IF',\n category: 'Logic',\n description: 'Enable this field when condition is true',\n signature: 'ENABLE_IF(condition)',\n parameters: [\n {\n name: 'condition',\n type: 'boolean',\n description: 'When true, field is enabled',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: [\n 'ENABLE_IF(@Status == \"Draft\")',\n 'ENABLE_IF(@CanEdit == true)',\n ],\n },\n ],\n },\n {\n name: 'Aggregation',\n displayName: 'Logic Helpers',\n functions: [\n {\n name: 'AND',\n category: 'Aggregation',\n description: 'Returns true if all conditions are true',\n signature: 'AND(condition1, condition2)',\n parameters: [\n {\n name: 'condition1',\n type: 'boolean',\n description: 'First condition',\n required: true,\n },\n {\n name: 'condition2',\n type: 'boolean',\n description: 'Second condition',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: ['AND(@Status == \"Active\", @Priority > 0)'],\n },\n {\n name: 'OR',\n category: 'Aggregation',\n description: 'Returns true if any condition is true',\n signature: 'OR(condition1, condition2)',\n parameters: [\n {\n name: 'condition1',\n type: 'boolean',\n description: 'First condition',\n required: true,\n },\n {\n name: 'condition2',\n type: 'boolean',\n description: 'Second condition',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: ['OR(@Status == \"Active\", @Status == \"Pending\")'],\n },\n {\n name: 'NOT',\n category: 'Aggregation',\n description: 'Returns the opposite of the condition',\n signature: 'NOT(condition)',\n parameters: [\n {\n name: 'condition',\n type: 'boolean',\n description: 'The condition to negate',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: ['NOT(@IsCompleted)'],\n },\n {\n name: 'ISNULL',\n category: 'Aggregation',\n description: 'Returns true if value is null or empty',\n signature: 'ISNULL(value)',\n parameters: [\n {\n name: 'value',\n type: 'any',\n description: 'The value to check',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: ['ISNULL(@Description)'],\n },\n {\n name: 'CONTAINS',\n category: 'Aggregation',\n description: 'Returns true if text contains the search string',\n signature: 'CONTAINS(text, search)',\n parameters: [\n {\n name: 'text',\n type: 'string',\n description: 'The text to search in',\n required: true,\n },\n {\n name: 'search',\n type: 'string',\n description: 'The string to search for',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: ['CONTAINS(@Name, \"Project\")'],\n },\n ],\n },\n];\n/**\n * Operators for conditions\n */\nconst CONDITION_OPERATORS = [\n // Comparison\n {\n symbol: '==',\n name: 'Equal',\n type: 'comparison',\n description: 'Equal to',\n precedence: 3,\n },\n {\n symbol: '!=',\n name: 'Not Equal',\n type: 'comparison',\n description: 'Not equal to',\n precedence: 3,\n },\n {\n symbol: '>',\n name: 'Greater Than',\n type: 'comparison',\n description: 'Greater than',\n precedence: 4,\n },\n {\n symbol: '<',\n name: 'Less Than',\n type: 'comparison',\n description: 'Less than',\n precedence: 4,\n },\n {\n symbol: '>=',\n name: 'Greater or Equal',\n type: 'comparison',\n description: 'Greater than or equal',\n precedence: 4,\n },\n {\n symbol: '<=',\n name: 'Less or Equal',\n type: 'comparison',\n description: 'Less than or equal',\n precedence: 4,\n },\n // Logical\n {\n symbol: '&&',\n name: 'And',\n type: 'logical',\n description: 'Logical AND',\n precedence: 2,\n },\n {\n symbol: '||',\n name: 'Or',\n type: 'logical',\n description: 'Logical OR',\n precedence: 1,\n },\n];","originalLength":8197,"removedExports":[],"renderedExports":["CONDITION_FUNCTION_CATEGORIES","CONDITION_OPERATORS"],"renderedLength":8135},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/fb-field-conditions/fb-field-conditions.js":{"code":"/**\n * Field Conditions Dialog\n *\n * Allows users to define conditional display formulas for form fields.\n * Uses FormulaToolbar + FormulaEditor directly for a visual formula editing experience.\n */\nclass FBFieldConditions {\n modalService = inject(ModalService);\n ref = inject(ModalRef);\n // Inputs\n /** Initial formula (JSON string from backend) */\n initialFormula = input('', ...(ngDevMode ? [{ debugName: \"initialFormula\" }] : []));\n /** Available fields from the form builder (other fields that can be referenced) */\n availableFields = input([], ...(ngDevMode ? [{ debugName: \"availableFields\" }] : []));\n // UI State\n submitting = signal(false, ...(ngDevMode ? [{ debugName: \"submitting\" }] : []));\n // Form control for the formula editor (tokens array)\n formulaControl = new FormControl([]);\n // View child for the editor\n editorRef = viewChild('editor', ...(ngDevMode ? [{ debugName: \"editorRef\" }] : []));\n // Condition-specific functions and operators\n functionCategories = CONDITION_FUNCTION_CATEGORIES;\n operators = CONDITION_OPERATORS;\n /** Extract property keys for toolbar */\n propertyKeys = computed(() => this.availableFields().map((f) => f.key), ...(ngDevMode ? [{ debugName: \"propertyKeys\" }] : []));\n /** Toolbar labels */\n toolbarLabels = {\n functions: 'Functions',\n properties: 'Fields',\n operators: 'Operators',\n noPropertiesAvailable: 'No fields available',\n };\n ngOnInit() {\n // Parse JSON string to tokens\n const formula = this.initialFormula();\n if (formula) {\n try {\n const tokens = JSON.parse(formula);\n this.formulaControl.patchValue(tokens);\n }\n catch {\n // Invalid JSON, start with empty\n }\n }\n }\n /** Handle block insert from toolbar */\n onBlockInsert(block) {\n const editor = this.editorRef();\n if (editor) {\n editor.addBlock(block);\n }\n }\n onSave() {\n const tokens = this.formulaControl.value ?? [];\n const formula = tokens.length > 0 ? JSON.stringify(tokens) : '';\n this.ref.close({ saved: true, conditionalDisplayFormula: formula });\n }\n onCancel() {\n this.ref.close({ saved: false });\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBFieldConditions, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.2.0\", version: \"21.0.3\", type: FBFieldConditions, isStandalone: true, selector: \"mt-fb-field-conditions\", inputs: { initialFormula: { classPropertyName: \"initialFormula\", publicName: \"initialFormula\", isSignal: true, isRequired: false, transformFunction: null }, availableFields: { classPropertyName: \"availableFields\", publicName: \"availableFields\", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: \"editorRef\", first: true, predicate: [\"editor\"], descendants: true, isSignal: true }], ngImport: i0, template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10 flex flex-col gap-3\\\">\\r\\n <!-- Formula Toolbar -->\\r\\n <mt-formula-toolbar\\r\\n [knownProperties]=\\\"propertyKeys()\\\"\\r\\n [functionCategories]=\\\"functionCategories\\\"\\r\\n [operators]=\\\"operators\\\"\\r\\n [labels]=\\\"toolbarLabels\\\"\\r\\n (onBlockInsert)=\\\"onBlockInsert($event)\\\"\\r\\n />\\r\\n <!-- Formula Editor -->\\r\\n <mt-formula-editor\\r\\n #editor\\r\\n [placeholder]=\\\"t('build-condition-formula')\\\"\\r\\n [formControl]=\\\"formulaControl\\\"\\r\\n />\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n />\\r\\n <mt-button\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n />\\r\\n </div>\\r\\n</ng-container>\\r\\n\", dependencies: [{ kind: \"directive\", type: TranslocoDirective, selector: \"[transloco]\", inputs: [\"transloco\", \"translocoParams\", \"translocoScope\", \"translocoRead\", \"translocoPrefix\", \"translocoLang\", \"translocoLoadingTpl\"] }, { kind: \"ngmodule\", type: ReactiveFormsModule }, { kind: \"directive\", type: i1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i1.FormControlDirective, selector: \"[formControl]\", inputs: [\"formControl\", \"disabled\", \"ngModel\"], outputs: [\"ngModelChange\"], exportAs: [\"ngForm\"] }, { kind: \"component\", type: Button, selector: \"mt-button\", inputs: [\"icon\", \"label\", \"tooltip\", \"class\", \"type\", \"styleClass\", \"severity\", \"badge\", \"variant\", \"badgeSeverity\", \"size\", \"iconPos\", \"autofocus\", \"fluid\", \"raised\", \"rounded\", \"text\", \"plain\", \"outlined\", \"link\", \"disabled\", \"loading\", \"pInputs\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }, { kind: \"component\", type: FormulaToolbar, selector: \"mt-formula-toolbar\", inputs: [\"knownProperties\", \"functionCategories\", \"operators\", \"initialTab\", \"searchPlaceholder\", \"labels\"], outputs: [\"onBlockInsert\", \"onTabChange\"] }, { kind: \"component\", type: FormulaEditor, selector: \"mt-formula-editor\", inputs: [\"placeholder\", \"initialTokens\", \"disabled\"], outputs: [\"formulaChange\", \"tokensChange\", \"onBlur\", \"onFocus\"] }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBFieldConditions, decorators: [{\n type: Component,\n args: [{ selector: 'mt-fb-field-conditions', standalone: true, imports: [\n TranslocoDirective,\n ReactiveFormsModule,\n Button,\n FormulaToolbar,\n FormulaEditor,\n ], template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10 flex flex-col gap-3\\\">\\r\\n <!-- Formula Toolbar -->\\r\\n <mt-formula-toolbar\\r\\n [knownProperties]=\\\"propertyKeys()\\\"\\r\\n [functionCategories]=\\\"functionCategories\\\"\\r\\n [operators]=\\\"operators\\\"\\r\\n [labels]=\\\"toolbarLabels\\\"\\r\\n (onBlockInsert)=\\\"onBlockInsert($event)\\\"\\r\\n />\\r\\n <!-- Formula Editor -->\\r\\n <mt-formula-editor\\r\\n #editor\\r\\n [placeholder]=\\\"t('build-condition-formula')\\\"\\r\\n [formControl]=\\\"formulaControl\\\"\\r\\n />\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n />\\r\\n <mt-button\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n />\\r\\n </div>\\r\\n</ng-container>\\r\\n\" }]\n }], propDecorators: { initialFormula: [{ type: i0.Input, args: [{ isSignal: true, alias: \"initialFormula\", required: false }] }], availableFields: [{ type: i0.Input, args: [{ isSignal: true, alias: \"availableFields\", required: false }] }], editorRef: [{ type: i0.ViewChild, args: ['editor', { isSignal: true }] }] } });","originalLength":8248,"removedExports":[],"renderedExports":["FBFieldConditions"],"renderedLength":7557},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/fb-field-form/fb-field-form.js":{"code":"class FBFieldForm {\n transloco = inject(TranslocoService);\n modalService = inject(ModalService);\n ref = inject(ModalRef);\n confirmationService = inject(ConfirmationService);\n facade = inject(FormBuilderFacade);\n // Inputs\n sectionId = input('', ...(ngDevMode ? [{ debugName: \"sectionId\" }] : []));\n initialData = input(null, ...(ngDevMode ? [{ debugName: \"initialData\" }] : []));\n /** All sections with enriched fields (to get available fields for conditions) */\n allSections = input([], ...(ngDevMode ? [{ debugName: \"allSections\" }] : []));\n // UI State\n submitting = signal(false, ...(ngDevMode ? [{ debugName: \"submitting\" }] : []));\n deleting = signal(false, ...(ngDevMode ? [{ debugName: \"deleting\" }] : []));\n conditionalDisplayFormula = signal('', ...(ngDevMode ? [{ debugName: \"conditionalDisplayFormula\" }] : []));\n conditionsDialogRef;\n /**\n * Compute available fields for condition formula\n * Excludes the current field being edited\n */\n availableFields = computed(() => {\n const sections = this.allSections();\n const currentField = this.initialData();\n const fields = [];\n for (const section of sections) {\n for (const field of section.fields) {\n // Exclude the current field being edited\n if (currentField && field.id === currentField.id)\n continue;\n fields.push({\n key: field.name,\n name: field.name,\n type: field.type,\n });\n }\n }\n return fields;\n }, ...(ngDevMode ? [{ debugName: \"availableFields\" }] : []));\n // Form\n formControl = new FormControl();\n showHideControl = new FormControl(false);\n formConfig = {\n sections: [\n {\n key: 'section-form',\n type: 'none',\n columns: 12,\n order: 1,\n fields: [\n {\n key: 'isRequired',\n label: this.transloco.translate('formBuilder.is-required'),\n type: 'toggle',\n toggleShape: 'card',\n colSpan: 12,\n order: 1,\n },\n {\n key: 'hiddenInCreation',\n label: this.transloco.translate('formBuilder.hidden-in-creation'),\n type: 'toggle',\n toggleShape: 'card',\n colSpan: 12,\n order: 2,\n },\n {\n key: 'hiddenInEditForm',\n label: this.transloco.translate('formBuilder.hidden-in-edit-form'),\n type: 'toggle',\n toggleShape: 'card',\n colSpan: 12,\n order: 3,\n },\n new RadioCardsFieldConfig({\n key: 'size',\n label: this.transloco.translate('formBuilder.size'),\n placeholder: this.transloco.translate('formBuilder.size'),\n options: [\n { id: 's', name: 'S' },\n { id: 'm', name: 'M' },\n { id: 'l', name: 'L' },\n ],\n order: 4,\n size: 'small',\n }),\n ],\n },\n ],\n };\n constructor() {\n effect(() => {\n const data = this.initialData();\n if (data) {\n const widthToSize = {\n '25': 's',\n '50': 'm',\n '100': 'l',\n };\n this.formControl.patchValue({\n isRequired: data.isRequired ?? false,\n hiddenInCreation: data.hiddenInCreation ?? false,\n hiddenInEditForm: data.hiddenInEditForm ?? false,\n size: widthToSize[data.width] ?? 'l',\n });\n // Set show/hide toggle based on existing value\n this.showHideControl.patchValue(data.showConditionalDisplayFormula ?? false);\n this.conditionalDisplayFormula.set(data.conditionalDisplayFormula ?? '');\n }\n });\n }\n onSave() {\n if (this.formControl.invalid)\n return;\n const formValue = this.formControl.value;\n const field = this.initialData();\n const sectionId = this.sectionId();\n if (!field || !sectionId)\n return;\n const widthMap = {\n s: '25',\n m: '50',\n l: '100',\n };\n const payload = {\n width: widthMap[formValue.size] ?? '100',\n hiddenInCreation: formValue.hiddenInCreation ?? false,\n hiddenInEditForm: formValue.hiddenInEditForm ?? false,\n isRequired: formValue.isRequired ?? false,\n showConditionalDisplayFormula: this.showHideControl.value ?? false,\n conditionalDisplayFormula: this.showHideControl.value\n ? this.conditionalDisplayFormula()\n : null,\n };\n this.submitting.set(true);\n this.facade.updateField(sectionId, field.id, payload).subscribe({\n next: () => this.ref.close(true),\n error: () => this.submitting.set(false),\n });\n }\n onCancel() {\n this.ref.close(false);\n }\n onSetConditions() {\n this.conditionsDialogRef = this.modalService.openModal(FBFieldConditions, 'drawer', {\n header: this.transloco.translate('formBuilder.set-conditions'),\n styleClass: '!w-[calc(100%-25rem)] !absolute ',\n position: 'start',\n modal: false,\n appendTo: '#page-content',\n inputValues: {\n initialFormula: this.conditionalDisplayFormula(),\n availableFields: this.availableFields(),\n },\n });\n this.conditionsDialogRef.onClose.subscribe((result) => {\n if (result?.saved) {\n this.conditionalDisplayFormula.set(result.conditionalDisplayFormula ?? '');\n }\n });\n }\n onDelete(event) {\n const field = this.initialData();\n const sectionId = this.sectionId();\n if (!field || !sectionId)\n return;\n this.confirmationService.confirmDelete({\n event,\n type: 'popup',\n accept: () => {\n this.deleting.set(true);\n this.facade.deleteField(sectionId, field.id).subscribe({\n next: () => this.ref.close(true),\n error: () => this.deleting.set(false),\n });\n },\n });\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBFieldForm, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.0.3\", type: FBFieldForm, isStandalone: true, selector: \"mt-fb-field-form\", inputs: { sectionId: { classPropertyName: \"sectionId\", publicName: \"sectionId\", isSignal: true, isRequired: false, transformFunction: null }, initialData: { classPropertyName: \"initialData\", publicName: \"initialData\", isSignal: true, isRequired: false, transformFunction: null }, allSections: { classPropertyName: \"allSections\", publicName: \"allSections\", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10 flex flex-col gap-4\\\">\\r\\n <mt-dynamic-form [formConfig]=\\\"formConfig\\\" [formControl]=\\\"formControl\\\">\\r\\n </mt-dynamic-form>\\r\\n\\r\\n <!-- Show/Hide Toggle with Set Conditions -->\\r\\n <mt-toggle-field\\r\\n toggleShape=\\\"card\\\"\\r\\n [label]=\\\"t('show-hide')\\\"\\r\\n [descriptionCard]=\\\"t('show-hide-description')\\\"\\r\\n icon=\\\"general.eye\\\"\\r\\n [formControl]=\\\"showHideControl\\\"\\r\\n >\\r\\n <ng-template #toggleCardBottom>\\r\\n @if (showHideControl.value) {\\r\\n <div class=\\\"mt-3\\\">\\r\\n <mt-button\\r\\n [label]=\\\"t('set-conditions')\\\"\\r\\n size=\\\"small\\\"\\r\\n (onClick)=\\\"onSetConditions()\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n }\\r\\n </ng-template>\\r\\n </mt-toggle-field>\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n @if (initialData()) {\\r\\n <mt-button\\r\\n [tooltip]=\\\"t('delete')\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n icon=\\\"general.trash-01\\\"\\r\\n [loading]=\\\"deleting()\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onDelete($event)\\\"\\r\\n class=\\\"me-auto\\\"\\r\\n ></mt-button>\\r\\n }\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting() || deleting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n <mt-button\\r\\n [disabled]=\\\"!formControl.valid || deleting()\\\"\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n </div>\\r\\n</ng-container>\\r\\n\", dependencies: [{ kind: \"directive\", type: TranslocoDirective, selector: \"[transloco]\", inputs: [\"transloco\", \"translocoParams\", \"translocoScope\", \"translocoRead\", \"translocoPrefix\", \"translocoLang\", \"translocoLoadingTpl\"] }, { kind: \"ngmodule\", type: ReactiveFormsModule }, { kind: \"directive\", type: i1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i1.FormControlDirective, selector: \"[formControl]\", inputs: [\"formControl\", \"disabled\", \"ngModel\"], outputs: [\"ngModelChange\"], exportAs: [\"ngForm\"] }, { kind: \"component\", type: DynamicForm, selector: \"mt-dynamic-form\", inputs: [\"formConfig\"] }, { kind: \"component\", type: Button, selector: \"mt-button\", inputs: [\"icon\", \"label\", \"tooltip\", \"class\", \"type\", \"styleClass\", \"severity\", \"badge\", \"variant\", \"badgeSeverity\", \"size\", \"iconPos\", \"autofocus\", \"fluid\", \"raised\", \"rounded\", \"text\", \"plain\", \"outlined\", \"link\", \"disabled\", \"loading\", \"pInputs\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }, { kind: \"component\", type: ToggleField, selector: \"mt-toggle-field\", inputs: [\"label\", \"labelPosition\", \"placeholder\", \"readonly\", \"pInputs\", \"required\", \"toggleShape\", \"icon\", \"descriptionCard\"], outputs: [\"onChange\"] }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBFieldForm, decorators: [{\n type: Component,\n args: [{ selector: 'mt-fb-field-form', standalone: true, imports: [\n TranslocoDirective,\n ReactiveFormsModule,\n DynamicForm,\n Button,\n ToggleField,\n ], template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10 flex flex-col gap-4\\\">\\r\\n <mt-dynamic-form [formConfig]=\\\"formConfig\\\" [formControl]=\\\"formControl\\\">\\r\\n </mt-dynamic-form>\\r\\n\\r\\n <!-- Show/Hide Toggle with Set Conditions -->\\r\\n <mt-toggle-field\\r\\n toggleShape=\\\"card\\\"\\r\\n [label]=\\\"t('show-hide')\\\"\\r\\n [descriptionCard]=\\\"t('show-hide-description')\\\"\\r\\n icon=\\\"general.eye\\\"\\r\\n [formControl]=\\\"showHideControl\\\"\\r\\n >\\r\\n <ng-template #toggleCardBottom>\\r\\n @if (showHideControl.value) {\\r\\n <div class=\\\"mt-3\\\">\\r\\n <mt-button\\r\\n [label]=\\\"t('set-conditions')\\\"\\r\\n size=\\\"small\\\"\\r\\n (onClick)=\\\"onSetConditions()\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n }\\r\\n </ng-template>\\r\\n </mt-toggle-field>\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n @if (initialData()) {\\r\\n <mt-button\\r\\n [tooltip]=\\\"t('delete')\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n icon=\\\"general.trash-01\\\"\\r\\n [loading]=\\\"deleting()\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onDelete($event)\\\"\\r\\n class=\\\"me-auto\\\"\\r\\n ></mt-button>\\r\\n }\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting() || deleting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n <mt-button\\r\\n [disabled]=\\\"!formControl.valid || deleting()\\\"\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n </div>\\r\\n</ng-container>\\r\\n\" }]\n }], ctorParameters: () => [], propDecorators: { sectionId: [{ type: i0.Input, args: [{ isSignal: true, alias: \"sectionId\", required: false }] }], initialData: [{ type: i0.Input, args: [{ isSignal: true, alias: \"initialData\", required: false }] }], allSections: [{ type: i0.Input, args: [{ isSignal: true, alias: \"allSections\", required: false }] }] } });","originalLength":14568,"removedExports":[],"renderedExports":["FBFieldForm"],"renderedLength":13630},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/fb-section-form/fb-section-form.js":{"code":"class FBSectionForm {\n transloco = inject(TranslocoService);\n modalService = inject(ModalService);\n ref = inject(ModalRef);\n confirmationService = inject(ConfirmationService);\n facade = inject(FormBuilderFacade);\n // Inputs\n sectionId = input(null, ...(ngDevMode ? [{ debugName: \"sectionId\" }] : []));\n initialData = input(null, ...(ngDevMode ? [{ debugName: \"initialData\" }] : []));\n sectionsCount = input(0, ...(ngDevMode ? [{ debugName: \"sectionsCount\" }] : []));\n // UI State\n submitting = signal(false, ...(ngDevMode ? [{ debugName: \"submitting\" }] : []));\n deleting = signal(false, ...(ngDevMode ? [{ debugName: \"deleting\" }] : []));\n // Form\n formControl = new FormControl();\n formConfig = {\n sections: [\n {\n key: 'section-form',\n type: 'none',\n columns: 12,\n order: 1,\n fields: [\n {\n key: 'name-ar',\n label: this.transloco.translate('formBuilder.name-ar'),\n type: 'text',\n placeholder: this.transloco.translate('formBuilder.name-ar'),\n colSpan: 12,\n order: 1,\n },\n {\n key: 'name-en',\n label: this.transloco.translate('formBuilder.name-en'),\n type: 'text',\n placeholder: this.transloco.translate('formBuilder.name-en'),\n colSpan: 12,\n order: 2,\n },\n ],\n },\n ],\n };\n constructor() {\n effect(() => {\n const data = this.initialData();\n if (data) {\n this.formControl.patchValue({\n 'name-ar': data.ar,\n 'name-en': data.en,\n });\n }\n });\n }\n onSave() {\n if (this.formControl.invalid)\n return;\n const formValue = this.formControl.value;\n const payload = {\n name: {\n ar: formValue['name-ar'],\n en: formValue['name-en'],\n },\n };\n this.submitting.set(true);\n const sectionId = this.sectionId();\n if (sectionId) {\n // Update existing section\n this.facade.updateSection(sectionId, payload).subscribe({\n next: () => this.ref.close(true),\n error: () => this.submitting.set(false),\n });\n }\n else {\n // Create new section\n this.facade\n .addSection({ ...payload, order: this.sectionsCount() })\n .subscribe({\n next: () => this.ref.close(true),\n error: () => this.submitting.set(false),\n });\n }\n }\n onCancel() {\n this.ref.close(false);\n }\n onDelete(event) {\n const sectionId = this.sectionId();\n if (!sectionId)\n return;\n this.confirmationService.confirmDelete({\n event,\n type: 'popup',\n accept: () => {\n this.deleting.set(true);\n this.facade.deleteSection(sectionId).subscribe({\n next: () => this.ref.close(true),\n error: () => this.deleting.set(false),\n });\n },\n });\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBSectionForm, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.0.3\", type: FBSectionForm, isStandalone: true, selector: \"mt-fb-section-form\", inputs: { sectionId: { classPropertyName: \"sectionId\", publicName: \"sectionId\", isSignal: true, isRequired: false, transformFunction: null }, initialData: { classPropertyName: \"initialData\", publicName: \"initialData\", isSignal: true, isRequired: false, transformFunction: null }, sectionsCount: { classPropertyName: \"sectionsCount\", publicName: \"sectionsCount\", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10\\\">\\r\\n <mt-dynamic-form [formConfig]=\\\"formConfig\\\" [formControl]=\\\"formControl\\\">\\r\\n </mt-dynamic-form>\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n @if (sectionId()) {\\r\\n <mt-button\\r\\n [tooltip]=\\\"t('delete')\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n icon=\\\"general.trash-01\\\"\\r\\n [loading]=\\\"deleting()\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onDelete($event)\\\"\\r\\n class=\\\"me-auto\\\"\\r\\n ></mt-button>\\r\\n }\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting() || deleting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n <mt-button\\r\\n [disabled]=\\\"!formControl.valid || deleting()\\\"\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n </div>\\r\\n</ng-container>\\r\\n\", dependencies: [{ kind: \"directive\", type: TranslocoDirective, selector: \"[transloco]\", inputs: [\"transloco\", \"translocoParams\", \"translocoScope\", \"translocoRead\", \"translocoPrefix\", \"translocoLang\", \"translocoLoadingTpl\"] }, { kind: \"ngmodule\", type: ReactiveFormsModule }, { kind: \"directive\", type: i1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i1.FormControlDirective, selector: \"[formControl]\", inputs: [\"formControl\", \"disabled\", \"ngModel\"], outputs: [\"ngModelChange\"], exportAs: [\"ngForm\"] }, { kind: \"component\", type: DynamicForm, selector: \"mt-dynamic-form\", inputs: [\"formConfig\"] }, { kind: \"component\", type: Button, selector: \"mt-button\", inputs: [\"icon\", \"label\", \"tooltip\", \"class\", \"type\", \"styleClass\", \"severity\", \"badge\", \"variant\", \"badgeSeverity\", \"size\", \"iconPos\", \"autofocus\", \"fluid\", \"raised\", \"rounded\", \"text\", \"plain\", \"outlined\", \"link\", \"disabled\", \"loading\", \"pInputs\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBSectionForm, decorators: [{\n type: Component,\n args: [{ selector: 'mt-fb-section-form', standalone: true, imports: [TranslocoDirective, ReactiveFormsModule, DynamicForm, Button], template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10\\\">\\r\\n <mt-dynamic-form [formConfig]=\\\"formConfig\\\" [formControl]=\\\"formControl\\\">\\r\\n </mt-dynamic-form>\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n @if (sectionId()) {\\r\\n <mt-button\\r\\n [tooltip]=\\\"t('delete')\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n icon=\\\"general.trash-01\\\"\\r\\n [loading]=\\\"deleting()\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onDelete($event)\\\"\\r\\n class=\\\"me-auto\\\"\\r\\n ></mt-button>\\r\\n }\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting() || deleting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n <mt-button\\r\\n [disabled]=\\\"!formControl.valid || deleting()\\\"\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n </div>\\r\\n</ng-container>\\r\\n\" }]\n }], ctorParameters: () => [], propDecorators: { sectionId: [{ type: i0.Input, args: [{ isSignal: true, alias: \"sectionId\", required: false }] }], initialData: [{ type: i0.Input, args: [{ isSignal: true, alias: \"initialData\", required: false }] }], sectionsCount: [{ type: i0.Input, args: [{ isSignal: true, alias: \"sectionsCount\", required: false }] }] } });","originalLength":9073,"removedExports":[],"renderedExports":["FBSectionForm"],"renderedLength":8357},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/fb-section/fb-section.js":{"code":"class FBSection {\n confirmationService = inject(ConfirmationService);\n modalService = inject(ModalService);\n translocoService = inject(TranslocoService);\n facade = inject(FormBuilderFacade);\n // Inputs\n section = input.required(...(ngDevMode ? [{ debugName: \"section\" }] : []));\n sectionsCount = input(0, ...(ngDevMode ? [{ debugName: \"sectionsCount\" }] : []));\n /** All sections - used to get available fields for condition formulas */\n allSections = input([], ...(ngDevMode ? [{ debugName: \"allSections\" }] : []));\n // Outputs - only keep drag/drop since it needs coordination with parent drop list group\n onFieldDrop = output();\n // Computed\n sectionName = computed(() => {\n const lang = document.documentElement.lang;\n const section = this.section();\n return section.name[lang] ?? section.name['en'];\n }, ...(ngDevMode ? [{ debugName: \"sectionName\" }] : []));\n fields = computed(() => this.section().fields, ...(ngDevMode ? [{ debugName: \"fields\" }] : []));\n // UI State\n expanded = signal(true, ...(ngDevMode ? [{ debugName: \"expanded\" }] : []));\n // Form groups cache for dynamic fields\n formGroupsCache = new Map();\n constructor() {\n // Cleanup stale form groups when fields change\n effect(() => {\n const currentIds = new Set(this.fields().map((f) => f.id));\n for (const id of this.formGroupsCache.keys()) {\n if (!currentIds.has(id)) {\n this.formGroupsCache.delete(id);\n }\n }\n });\n }\n getFormGroup(field) {\n let fg = this.formGroupsCache.get(field.id);\n if (fg) {\n // Check if field name changed\n if (!fg.contains(field.name)) {\n const oldKey = Object.keys(fg.controls)[0];\n const value = oldKey ? fg.get(oldKey)?.value : field.data?.data;\n fg = new FormGroup({\n [field.name]: new FormControl(value),\n });\n this.formGroupsCache.set(field.id, fg);\n }\n }\n else {\n fg = new FormGroup({\n [field.name]: new FormControl(field.data?.data),\n });\n this.formGroupsCache.set(field.id, fg);\n }\n return fg;\n }\n toggleExpanded() {\n this.expanded.update((v) => !v);\n }\n onDrop(event) {\n this.onFieldDrop.emit(event);\n }\n editSection(event) {\n event.stopPropagation();\n const section = this.section();\n this.modalService.openModal(FBSectionForm, 'drawer', {\n header: this.translocoService.translate('formBuilder.edit-section'),\n height: '20vw',\n styleClass: '!w-100 !absolute ',\n position: 'end',\n appendTo: '#page-content',\n modal: false,\n inputValues: {\n sectionId: section.id,\n initialData: section.name,\n sectionsCount: this.sectionsCount(),\n },\n });\n }\n removeField(event, field) {\n this.confirmationService.confirmDelete({\n event,\n type: 'popup',\n accept: () => {\n this.facade.deleteField(this.section().id, field.id);\n },\n });\n }\n editField(field) {\n this.modalService.openModal(FBFieldForm, 'drawer', {\n header: this.translocoService.translate('formBuilder.field-settings'),\n height: '20vw',\n styleClass: '!w-100 !absolute !shadow-none',\n position: 'end',\n modal: false,\n appendTo: '#page-content',\n inputValues: {\n initialData: field,\n sectionId: this.section().id,\n allSections: this.allSections(),\n },\n });\n }\n getFieldColSpan(field) {\n switch (field.width) {\n case '100':\n return 'col-span-12';\n case '50':\n return 'col-span-6';\n case '25':\n return 'col-span-3';\n default:\n return 'col-span-12';\n }\n }\n getFieldType(field) {\n const typeMap = {\n User: 'select',\n Text: 'text',\n LongText: 'editor-field',\n Percentage: 'slider',\n Date: 'date',\n Currency: 'text',\n Number: 'number',\n Lookup: 'select',\n LookupMultiSelect: 'select',\n Checkbox: 'toggle',\n InternalModule: 'select',\n DynamicList: 'select',\n API: 'select',\n Time: 'date',\n Status: 'select',\n Attachment: 'attachment',\n EditableListView: 'actionableTable',\n LookupLog: 'actionableTable',\n LookupMatrix: 'select',\n Location: 'select',\n };\n return typeMap[field.type] ?? 'text';\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBSection, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.0.3\", type: FBSection, isStandalone: true, selector: \"mt-fb-section\", inputs: { section: { classPropertyName: \"section\", publicName: \"section\", isSignal: true, isRequired: true, transformFunction: null }, sectionsCount: { classPropertyName: \"sectionsCount\", publicName: \"sectionsCount\", isSignal: true, isRequired: false, transformFunction: null }, allSections: { classPropertyName: \"allSections\", publicName: \"allSections\", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onFieldDrop: \"onFieldDrop\" }, ngImport: i0, template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div class=\\\"flex flex-col\\\">\\r\\n <div\\r\\n class=\\\"flex justify-between items-center bg-primary text-primary-contrast p-2 rounded-xl\\\"\\r\\n >\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"arrow.chevron-down\\\"\\r\\n class=\\\"transition-[rotate]\\\"\\r\\n [class.rotate-180]=\\\"expanded()\\\"\\r\\n (onClick)=\\\"toggleExpanded()\\\"\\r\\n ></mt-button>\\r\\n <span class=\\\"font-bold\\\">\\r\\n {{ sectionName() }}\\r\\n </span>\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.edit-02\\\"\\r\\n [tooltip]=\\\"t('edit-section')\\\"\\r\\n (onClick)=\\\"editSection($event)\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </div>\\r\\n @if (expanded()) {\\r\\n <div\\r\\n cdkDropList\\r\\n [id]=\\\"section().id\\\"\\r\\n cdkDropListOrientation=\\\"mixed\\\"\\r\\n [cdkDropListData]=\\\"fields()\\\"\\r\\n (cdkDropListDropped)=\\\"onDrop($event)\\\"\\r\\n class=\\\"grid grid-cols-12 gap-4 relative py-4\\\"\\r\\n [class.min-h-27]=\\\"fields().length === 0\\\"\\r\\n >\\r\\n @for (field of fields(); track field.id) {\\r\\n <div\\r\\n cdkDrag\\r\\n [cdkDragData]=\\\"field\\\"\\r\\n [cdkDragDisabled]=\\\"field._pending || field._deleting\\\"\\r\\n [class]=\\\"\\r\\n getFieldColSpan(field) + ' cursor-grab active:cursor-grabbing'\\r\\n \\\"\\r\\n >\\r\\n <div\\r\\n *cdkDragPlaceholder\\r\\n [class]=\\\"\\r\\n 'h-full min-h-27 bg-black/10 rounded-2xl ' +\\r\\n getFieldColSpan(field)\\r\\n \\\"\\r\\n ></div>\\r\\n @if (field._pending) {\\r\\n <!-- Skeleton for pending field -->\\r\\n <mt-card class=\\\"h-full animate-pulse\\\">\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <div class=\\\"flex-1 space-y-3\\\">\\r\\n <div class=\\\"h-4 bg-surface-200 rounded w-1/3\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"flex flex-col gap-1\\\">\\r\\n <div class=\\\"h-8 w-8 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-8 w-8 bg-surface-200 rounded\\\"></div>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n } @else {\\r\\n <mt-card\\r\\n class=\\\"h-full relative\\\"\\r\\n [class.opacity-50]=\\\"field._deleting\\\"\\r\\n >\\r\\n @if (field._deleting) {\\r\\n <div\\r\\n class=\\\"absolute inset-0 flex items-center justify-center bg-white/50 rounded-xl z-10\\\"\\r\\n >\\r\\n <div\\r\\n class=\\\"animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full\\\"\\r\\n ></div>\\r\\n </div>\\r\\n }\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <div class=\\\"flex-1\\\">\\r\\n <form [formGroup]=\\\"getFormGroup(field)\\\">\\r\\n <mt-dynamic-field\\r\\n [fieldName]=\\\"field.name\\\"\\r\\n [fieldConfig]=\\\"{\\r\\n label: field.name,\\r\\n readonly: true,\\r\\n type: getFieldType(field),\\r\\n }\\\"\\r\\n />\\r\\n </form>\\r\\n </div>\\r\\n <div class=\\\"flex flex-col gap-1\\\">\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.settings-01\\\"\\r\\n [tooltip]=\\\"t('edit-field')\\\"\\r\\n outlined\\r\\n [disabled]=\\\"field._deleting\\\"\\r\\n (onClick)=\\\"editField(field)\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.trash-01\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n [tooltip]=\\\"t('remove-field')\\\"\\r\\n [disabled]=\\\"field._deleting\\\"\\r\\n (onClick)=\\\"removeField($event, field)\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n } @empty {\\r\\n <mt-card class=\\\"absolute inset-0 top-4 h-full\\\" paddingless>\\r\\n <div class=\\\"size-full p-4\\\">\\r\\n <div\\r\\n class=\\\"flex justify-center items-center gap-4 h-full border-2 border-primary rounded-xl bg-primary-200 text-primary\\\"\\r\\n >\\r\\n <mt-icon icon=\\\"editor.move\\\" class=\\\"text-3xl\\\" />\\r\\n <span>{{ t(\\\"drag-from-the-side\\\") }}</span>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n</ng-container>\\r\\n\", dependencies: [{ kind: \"component\", type: Button, selector: \"mt-button\", inputs: [\"icon\", \"label\", \"tooltip\", \"class\", \"type\", \"styleClass\", \"severity\", \"badge\", \"variant\", \"badgeSeverity\", \"size\", \"iconPos\", \"autofocus\", \"fluid\", \"raised\", \"rounded\", \"text\", \"plain\", \"outlined\", \"link\", \"disabled\", \"loading\", \"pInputs\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }, { kind: \"component\", type: Card, selector: \"mt-card\", inputs: [\"class\", \"title\", \"paddingless\"] }, { kind: \"component\", type: Icon, selector: \"mt-icon\", inputs: [\"icon\"] }, { kind: \"directive\", type: CdkDrag, selector: \"[cdkDrag]\", inputs: [\"cdkDragData\", \"cdkDragLockAxis\", \"cdkDragRootElement\", \"cdkDragBoundary\", \"cdkDragStartDelay\", \"cdkDragFreeDragPosition\", \"cdkDragDisabled\", \"cdkDragConstrainPosition\", \"cdkDragPreviewClass\", \"cdkDragPreviewContainer\", \"cdkDragScale\"], outputs: [\"cdkDragStarted\", \"cdkDragReleased\", \"cdkDragEnded\", \"cdkDragEntered\", \"cdkDragExited\", \"cdkDragDropped\", \"cdkDragMoved\"], exportAs: [\"cdkDrag\"] }, { kind: \"directive\", type: CdkDropList, selector: \"[cdkDropList], cdk-drop-list\", inputs: [\"cdkDropListConnectedTo\", \"cdkDropListData\", \"cdkDropListOrientation\", \"id\", \"cdkDropListLockAxis\", \"cdkDropListDisabled\", \"cdkDropListSortingDisabled\", \"cdkDropListEnterPredicate\", \"cdkDropListSortPredicate\", \"cdkDropListAutoScrollDisabled\", \"cdkDropListAutoScrollStep\", \"cdkDropListElementContainer\", \"cdkDropListHasAnchor\"], outputs: [\"cdkDropListDropped\", \"cdkDropListEntered\", \"cdkDropListExited\", \"cdkDropListSorted\"], exportAs: [\"cdkDropList\"] }, { kind: \"directive\", type: CdkDragPlaceholder, selector: \"ng-template[cdkDragPlaceholder]\", inputs: [\"data\"] }, { kind: \"directive\", type: TranslocoDirective, selector: \"[transloco]\", inputs: [\"transloco\", \"translocoParams\", \"translocoScope\", \"translocoRead\", \"translocoPrefix\", \"translocoLang\", \"translocoLoadingTpl\"] }, { kind: \"component\", type: DynamicField, selector: \"mt-dynamic-field\", inputs: [\"fieldConfig\", \"fieldName\"] }, { kind: \"ngmodule\", type: ReactiveFormsModule }, { kind: \"directive\", type: i1.ɵNgNoValidate, selector: \"form:not([ngNoForm]):not([ngNativeValidate])\" }, { kind: \"directive\", type: i1.NgControlStatusGroup, selector: \"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]\" }, { kind: \"directive\", type: i1.FormGroupDirective, selector: \"[formGroup]\", inputs: [\"formGroup\"], outputs: [\"ngSubmit\"], exportAs: [\"ngForm\"] }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBSection, decorators: [{\n type: Component,\n args: [{ selector: 'mt-fb-section', standalone: true, imports: [\n Button,\n Card,\n Icon,\n CdkDrag,\n CdkDropList,\n CdkDragPlaceholder,\n TranslocoDirective,\n DynamicField,\n ReactiveFormsModule,\n ], template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div class=\\\"flex flex-col\\\">\\r\\n <div\\r\\n class=\\\"flex justify-between items-center bg-primary text-primary-contrast p-2 rounded-xl\\\"\\r\\n >\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"arrow.chevron-down\\\"\\r\\n class=\\\"transition-[rotate]\\\"\\r\\n [class.rotate-180]=\\\"expanded()\\\"\\r\\n (onClick)=\\\"toggleExpanded()\\\"\\r\\n ></mt-button>\\r\\n <span class=\\\"font-bold\\\">\\r\\n {{ sectionName() }}\\r\\n </span>\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.edit-02\\\"\\r\\n [tooltip]=\\\"t('edit-section')\\\"\\r\\n (onClick)=\\\"editSection($event)\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </div>\\r\\n @if (expanded()) {\\r\\n <div\\r\\n cdkDropList\\r\\n [id]=\\\"section().id\\\"\\r\\n cdkDropListOrientation=\\\"mixed\\\"\\r\\n [cdkDropListData]=\\\"fields()\\\"\\r\\n (cdkDropListDropped)=\\\"onDrop($event)\\\"\\r\\n class=\\\"grid grid-cols-12 gap-4 relative py-4\\\"\\r\\n [class.min-h-27]=\\\"fields().length === 0\\\"\\r\\n >\\r\\n @for (field of fields(); track field.id) {\\r\\n <div\\r\\n cdkDrag\\r\\n [cdkDragData]=\\\"field\\\"\\r\\n [cdkDragDisabled]=\\\"field._pending || field._deleting\\\"\\r\\n [class]=\\\"\\r\\n getFieldColSpan(field) + ' cursor-grab active:cursor-grabbing'\\r\\n \\\"\\r\\n >\\r\\n <div\\r\\n *cdkDragPlaceholder\\r\\n [class]=\\\"\\r\\n 'h-full min-h-27 bg-black/10 rounded-2xl ' +\\r\\n getFieldColSpan(field)\\r\\n \\\"\\r\\n ></div>\\r\\n @if (field._pending) {\\r\\n <!-- Skeleton for pending field -->\\r\\n <mt-card class=\\\"h-full animate-pulse\\\">\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <div class=\\\"flex-1 space-y-3\\\">\\r\\n <div class=\\\"h-4 bg-surface-200 rounded w-1/3\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"flex flex-col gap-1\\\">\\r\\n <div class=\\\"h-8 w-8 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-8 w-8 bg-surface-200 rounded\\\"></div>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n } @else {\\r\\n <mt-card\\r\\n class=\\\"h-full relative\\\"\\r\\n [class.opacity-50]=\\\"field._deleting\\\"\\r\\n >\\r\\n @if (field._deleting) {\\r\\n <div\\r\\n class=\\\"absolute inset-0 flex items-center justify-center bg-white/50 rounded-xl z-10\\\"\\r\\n >\\r\\n <div\\r\\n class=\\\"animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full\\\"\\r\\n ></div>\\r\\n </div>\\r\\n }\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <div class=\\\"flex-1\\\">\\r\\n <form [formGroup]=\\\"getFormGroup(field)\\\">\\r\\n <mt-dynamic-field\\r\\n [fieldName]=\\\"field.name\\\"\\r\\n [fieldConfig]=\\\"{\\r\\n label: field.name,\\r\\n readonly: true,\\r\\n type: getFieldType(field),\\r\\n }\\\"\\r\\n />\\r\\n </form>\\r\\n </div>\\r\\n <div class=\\\"flex flex-col gap-1\\\">\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.settings-01\\\"\\r\\n [tooltip]=\\\"t('edit-field')\\\"\\r\\n outlined\\r\\n [disabled]=\\\"field._deleting\\\"\\r\\n (onClick)=\\\"editField(field)\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.trash-01\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n [tooltip]=\\\"t('remove-field')\\\"\\r\\n [disabled]=\\\"field._deleting\\\"\\r\\n (onClick)=\\\"removeField($event, field)\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n } @empty {\\r\\n <mt-card class=\\\"absolute inset-0 top-4 h-full\\\" paddingless>\\r\\n <div class=\\\"size-full p-4\\\">\\r\\n <div\\r\\n class=\\\"flex justify-center items-center gap-4 h-full border-2 border-primary rounded-xl bg-primary-200 text-primary\\\"\\r\\n >\\r\\n <mt-icon icon=\\\"editor.move\\\" class=\\\"text-3xl\\\" />\\r\\n <span>{{ t(\\\"drag-from-the-side\\\") }}</span>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n</ng-container>\\r\\n\" }]\n }], ctorParameters: () => [], propDecorators: { section: [{ type: i0.Input, args: [{ isSignal: true, alias: \"section\", required: true }] }], sectionsCount: [{ type: i0.Input, args: [{ isSignal: true, alias: \"sectionsCount\", required: false }] }], allSections: [{ type: i0.Input, args: [{ isSignal: true, alias: \"allSections\", required: false }] }], onFieldDrop: [{ type: i0.Output, args: [\"onFieldDrop\"] }] } });","originalLength":20619,"removedExports":[],"renderedExports":["FBSection"],"renderedLength":19589},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/fb-preview-form/fb-preview-form.js":{"code":"class FBPreviewForm {\n modalService = inject(ModalService);\n ref = inject(ModalRef);\n transloco = inject(TranslocoService);\n // Inputs\n sections = input([], ...(ngDevMode ? [{ debugName: \"sections\" }] : []));\n // Tab state\n activeTab = signal('create', ...(ngDevMode ? [{ debugName: \"activeTab\" }] : []));\n isLoading = signal(false, ...(ngDevMode ? [{ debugName: \"isLoading\" }] : []));\n tabOptions = [\n {\n label: this.transloco.translate('formBuilder.create-form'),\n value: 'create',\n },\n { label: this.transloco.translate('formBuilder.edit-form'), value: 'edit' },\n ];\n // Form control for dynamic form\n formControl = new FormControl();\n constructor() {\n // Show skeleton briefly when tab changes to force rebuild\n effect(() => {\n this.activeTab(); // Track tab changes\n this.isLoading.set(true);\n setTimeout(() => this.isLoading.set(false), 50);\n });\n }\n // Convert enriched sections to DynamicFormConfig based on active tab\n formConfig = computed(() => {\n const sections = this.sections();\n const mode = this.activeTab();\n return {\n sections: sections\n .map((section, sectionIndex) => {\n const lang = document.documentElement.lang;\n const sectionName = section.name[lang] ?? section.name['en'] ?? '';\n // Filter fields based on mode\n const visibleFields = section.fields.filter((field) => {\n if (mode === 'create') {\n return !field.hiddenInCreation;\n }\n else {\n return !field.hiddenInEditForm;\n }\n });\n return {\n key: section.id,\n label: sectionName,\n type: 'header',\n columns: 12,\n order: section.order ?? sectionIndex,\n fields: visibleFields.map((field, fieldIndex) => {\n const colSpan = this.getColSpan(field.width);\n return {\n key: `field_${field.propertyId}`,\n label: field.name,\n type: this.mapFieldType(field.type),\n colSpan,\n order: field.order ?? fieldIndex,\n placeholder: field.name,\n };\n }),\n };\n })\n .filter((section) => section.fields.length > 0), // Hide empty sections\n };\n }, ...(ngDevMode ? [{ debugName: \"formConfig\" }] : []));\n /**\n * Map property view type to dynamic form field type\n */\n mapFieldType(viewType) {\n const typeMap = {\n text: 'text',\n number: 'number',\n date: 'date',\n select: 'select',\n multiselect: 'multiselect',\n toggle: 'toggle',\n checkbox: 'checkbox',\n textarea: 'textarea',\n editor: 'editor',\n color: 'color',\n slider: 'slider',\n radio: 'radio',\n 'radio-cards': 'radio-cards',\n upload: 'upload',\n 'user-search': 'user-search',\n };\n return typeMap[viewType?.toLowerCase()] ?? 'text';\n }\n /**\n * Convert field width to colSpan\n */\n getColSpan(width) {\n const widthMap = {\n '25': 3,\n '50': 6,\n '100': 12,\n };\n return widthMap[width] ?? 12;\n }\n onClose() {\n this.ref.close();\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBPreviewForm, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.0.3\", type: FBPreviewForm, isStandalone: true, selector: \"mt-fb-preview-form\", inputs: { sections: { classPropertyName: \"sections\", publicName: \"sections\", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <!-- Tabs for Create/Edit mode -->\\r\\n <div class=\\\"flex justify-center mb-4\\\">\\r\\n <mt-tabs [options]=\\\"tabOptions\\\" [(active)]=\\\"activeTab\\\"></mt-tabs>\\r\\n </div>\\r\\n\\r\\n <div class=\\\"h-full overflow-y-auto pb-10\\\">\\r\\n @if (isLoading()) {\\r\\n <div class=\\\"space-y-4 animate-pulse\\\">\\r\\n <div class=\\\"h-6 bg-surface-200 rounded w-1/3\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded w-2/3\\\"></div>\\r\\n </div>\\r\\n } @else if (formConfig().sections.length > 0) {\\r\\n <mt-dynamic-form\\r\\n [formConfig]=\\\"formConfig()\\\"\\r\\n [formControl]=\\\"formControl\\\"\\r\\n >\\r\\n </mt-dynamic-form>\\r\\n } @else {\\r\\n <div\\r\\n class=\\\"flex justify-center items-center h-64 text-muted-color text-lg\\\"\\r\\n >\\r\\n {{ t(\\\"no-fields-visible\\\") }}\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n</ng-container>\\r\\n\", dependencies: [{ kind: \"directive\", type: TranslocoDirective, selector: \"[transloco]\", inputs: [\"transloco\", \"translocoParams\", \"translocoScope\", \"translocoRead\", \"translocoPrefix\", \"translocoLang\", \"translocoLoadingTpl\"] }, { kind: \"ngmodule\", type: ReactiveFormsModule }, { kind: \"directive\", type: i1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i1.FormControlDirective, selector: \"[formControl]\", inputs: [\"formControl\", \"disabled\", \"ngModel\"], outputs: [\"ngModelChange\"], exportAs: [\"ngForm\"] }, { kind: \"component\", type: DynamicForm, selector: \"mt-dynamic-form\", inputs: [\"formConfig\"] }, { kind: \"component\", type: Tabs, selector: \"mt-tabs\", inputs: [\"options\", \"optionLabel\", \"optionValue\", \"active\", \"size\", \"fluid\", \"disabled\"], outputs: [\"activeChange\", \"onChange\"] }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBPreviewForm, decorators: [{\n type: Component,\n args: [{ selector: 'mt-fb-preview-form', standalone: true, imports: [TranslocoDirective, ReactiveFormsModule, DynamicForm, Tabs], template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <!-- Tabs for Create/Edit mode -->\\r\\n <div class=\\\"flex justify-center mb-4\\\">\\r\\n <mt-tabs [options]=\\\"tabOptions\\\" [(active)]=\\\"activeTab\\\"></mt-tabs>\\r\\n </div>\\r\\n\\r\\n <div class=\\\"h-full overflow-y-auto pb-10\\\">\\r\\n @if (isLoading()) {\\r\\n <div class=\\\"space-y-4 animate-pulse\\\">\\r\\n <div class=\\\"h-6 bg-surface-200 rounded w-1/3\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded w-2/3\\\"></div>\\r\\n </div>\\r\\n } @else if (formConfig().sections.length > 0) {\\r\\n <mt-dynamic-form\\r\\n [formConfig]=\\\"formConfig()\\\"\\r\\n [formControl]=\\\"formControl\\\"\\r\\n >\\r\\n </mt-dynamic-form>\\r\\n } @else {\\r\\n <div\\r\\n class=\\\"flex justify-center items-center h-64 text-muted-color text-lg\\\"\\r\\n >\\r\\n {{ t(\\\"no-fields-visible\\\") }}\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n</ng-container>\\r\\n\" }]\n }], ctorParameters: () => [], propDecorators: { sections: [{ type: i0.Input, args: [{ isSignal: true, alias: \"sections\", required: false }] }] } });","originalLength":8530,"removedExports":[],"renderedExports":["FBPreviewForm"],"renderedLength":7944},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/form-builder.js":{"code":"class FormBuilder {\n modalService = inject(ModalService);\n confirmationService = inject(ConfirmationService);\n translocoService = inject(TranslocoService);\n facade = inject(FormBuilderFacade);\n dialogRef;\n // Inputs - only properties needed from parent\n properties = input([], ...(ngDevMode ? [{ debugName: \"properties\" }] : []));\n // Local UI state\n activeTab = signal('system', ...(ngDevMode ? [{ debugName: \"activeTab\" }] : []));\n // State from facade\n sections = this.facade.sections;\n isLoading = this.facade.isLoadingFormConfiguration;\n error = this.facade.formConfigurationError;\n // Properties map for enrichment\n propertiesMap = computed(() => {\n const map = new Map();\n for (const prop of this.properties()) {\n map.set(prop.id, prop);\n }\n return map;\n }, ...(ngDevMode ? [{ debugName: \"propertiesMap\" }] : []));\n // Enrich sections with property data for UI display\n enrichedSections = computed(() => {\n const sections = this.sections();\n const propsMap = this.propertiesMap();\n const lang = document.documentElement.lang;\n return sections.map((section) => ({\n ...section,\n fields: section.fields.map((field) => {\n const prop = propsMap.get(field.propertyId);\n const propName = prop?.name;\n const name = typeof propName === 'string'\n ? propName\n : (propName?.[lang] ??\n propName?.['en'] ??\n `Property ${field.propertyId}`);\n return {\n ...field,\n name,\n type: prop?.viewType || 'text',\n data: prop,\n };\n }),\n }));\n }, ...(ngDevMode ? [{ debugName: \"enrichedSections\" }] : []));\n // Available properties for toolbox tabs\n availableTabs = computed(() => {\n const tabs = [];\n const usedPropertyIds = new Set(this.sections().flatMap((s) => s.fields.map((f) => f.propertyId)));\n const availableProps = this.properties().filter((p) => !usedPropertyIds.has(p.id));\n const systemProps = availableProps.filter((p) => p.isSystem);\n const customProps = availableProps.filter((p) => !p.isSystem);\n if (systemProps.length > 0) {\n tabs.push({ id: 'system', title: 'System', properties: systemProps });\n }\n if (customProps.length > 0) {\n tabs.push({ id: 'custom', title: 'Custom', properties: customProps });\n }\n return tabs;\n }, ...(ngDevMode ? [{ debugName: \"availableTabs\" }] : []));\n constructor() {\n // Update active tab when tabs change\n effect(() => {\n const tabs = this.availableTabs();\n const currentTab = this.activeTab();\n if (tabs.length > 0 && !tabs.some((t) => t.id === currentTab)) {\n this.activeTab.set(tabs[0].id);\n }\n });\n }\n drop(event) {\n const targetSectionId = event.container.id;\n if (event.previousContainer === event.container) {\n // Reordering within the same section\n const field = event.item.data;\n // Update the field order via API\n this.facade.updateField(targetSectionId, field.id, {\n order: event.currentIndex,\n });\n }\n else if (event.previousContainer.id.startsWith('toolbox-')) {\n // Adding from toolbox\n const propertyItem = event.item.data;\n this.facade.addField(targetSectionId, {\n propertyId: propertyItem.id,\n width: '100',\n order: event.currentIndex,\n hiddenInCreation: false,\n });\n }\n else {\n // Moving between sections\n const sourceSectionId = event.previousContainer.id;\n const field = event.item.data;\n this.facade.moveField(sourceSectionId, field.id, {\n targetSectionId,\n order: event.currentIndex,\n });\n }\n }\n addSection() {\n this.dialogRef = this.modalService.openModal(FBSectionForm, 'drawer', {\n header: this.translocoService.translate('formBuilder.add-section'),\n height: '20vw',\n styleClass: '!w-100 !absolute ',\n position: 'end',\n appendTo: '#page-content',\n modal: true,\n inputValues: {\n sectionsCount: this.sections().length,\n },\n });\n }\n openPreview() {\n this.dialogRef = this.modalService.openModal(FBPreviewForm, 'drawer', {\n header: this.translocoService.translate('formBuilder.preview'),\n styleClass: '!w-[80vw] ',\n position: 'end',\n modal: true,\n inputValues: {\n sections: this.enrichedSections(),\n },\n });\n }\n resetFormConfiguration() {\n this.confirmationService.confirm({\n type: 'dialog',\n acceptButtonStyleClass: 'p-button-danger',\n accept: () => {\n this.facade.resetFormConfiguration();\n },\n });\n }\n noReturnPredicate = () => false;\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.0.3\", type: FormBuilder, isStandalone: true, selector: \"mt-form-builder\", inputs: { properties: { classPropertyName: \"properties\", publicName: \"properties\", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div class=\\\"flex gap-4 h-full w-full overflow-hidden\\\" cdkDropListGroup>\\r\\n @if (properties().length > 0) {\\r\\n <mt-card\\r\\n class=\\\"z-1 w-1/5 min-w-xs shrink-0 h-full flex flex-col overflow-hidden\\\"\\r\\n >\\r\\n <ng-template #headless>\\r\\n <!-- Header -->\\r\\n <div class=\\\"flex items-center justify-between px-4 pt-5\\\">\\r\\n <h3 class=\\\"text-xl font-semibold\\\">{{ t(\\\"form-elements\\\") }}</h3>\\r\\n </div>\\r\\n\\r\\n <!-- Tabs using PrimeNG -->\\r\\n <p-tabs\\r\\n [(value)]=\\\"activeTab\\\"\\r\\n styleClass=\\\"structure-tabs\\\"\\r\\n class=\\\"flex flex-1 flex-col min-h-0\\\"\\r\\n >\\r\\n <p-tablist class=\\\"shrink-0\\\">\\r\\n @for (tab of availableTabs(); track tab.id) {\\r\\n <p-tab [value]=\\\"tab.id\\\">{{ tab.title | titlecase }}</p-tab>\\r\\n }\\r\\n </p-tablist>\\r\\n <p-tabpanels class=\\\"!bg-transparent !p-0 flex-1 overflow-hidden\\\">\\r\\n @for (tab of availableTabs(); track tab.id) {\\r\\n <p-tabpanel [value]=\\\"tab.id\\\" class=\\\"h-full\\\">\\r\\n <!-- Node List -->\\r\\n <div\\r\\n class=\\\"space-y-1 p-4 [&_.cdk-drag-placeholder]:hidden h-full overflow-y-auto\\\"\\r\\n [id]=\\\"'toolbox-' + tab.id\\\"\\r\\n cdkDropList\\r\\n cdkDropListSortingDisabled\\r\\n [cdkDropListData]=\\\"tab.properties\\\"\\r\\n [cdkDropListEnterPredicate]=\\\"noReturnPredicate\\\"\\r\\n >\\r\\n @for (node of tab.properties; track $index) {\\r\\n <div\\r\\n cdkDrag\\r\\n [cdkDragData]=\\\"node\\\"\\r\\n class=\\\"group cursor-move select-none relative flex items-center gap-3 py-3 px-4 rounded-lg border border-dashed border-surface-300 hover:border-solid hover:bg-emphasis dark:border-surface-500 transition-colors\\\"\\r\\n >\\r\\n <div\\r\\n *cdkDragPlaceholder\\r\\n class=\\\"col-span-12 min-h-27 w-full rounded-2xl bg-black/10 z-1\\\"\\r\\n ></div>\\r\\n <span class=\\\"flex-1 text-base font-medium\\\">{{\\r\\n node.name\\r\\n }}</span>\\r\\n </div>\\r\\n }\\r\\n\\r\\n @if (tab.properties.length === 0) {\\r\\n <div class=\\\"py-8 text-center text-muted-color\\\">\\r\\n <p class=\\\"text-sm\\\">\\r\\n All {{ tab.title }} items are in use\\r\\n </p>\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </p-tabpanel>\\r\\n }\\r\\n </p-tabpanels>\\r\\n </p-tabs>\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n }\\r\\n\\r\\n <!-- Main Canvas Area -->\\r\\n <div class=\\\"flex flex-col gap-4 flex-1 w-full h-full overflow-y-auto\\\">\\r\\n <mt-card>\\r\\n <ng-template #headless>\\r\\n <div class=\\\"p-4 flex items-center gap-2\\\">\\r\\n <mt-button\\r\\n icon=\\\"layout.layout-top\\\"\\r\\n [label]=\\\"t('add-section')\\\"\\r\\n (onClick)=\\\"addSection()\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n icon=\\\"general.eye\\\"\\r\\n [label]=\\\"t('preview')\\\"\\r\\n (onClick)=\\\"openPreview()\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n icon=\\\"finance.credit-card-plus\\\"\\r\\n [label]=\\\"t('reset')\\\"\\r\\n (onClick)=\\\"resetFormConfiguration()\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n @for (section of enrichedSections(); track section.id) {\\r\\n <mt-fb-section\\r\\n [section]=\\\"section\\\"\\r\\n [sectionsCount]=\\\"enrichedSections().length\\\"\\r\\n [allSections]=\\\"enrichedSections()\\\"\\r\\n (onFieldDrop)=\\\"drop($event)\\\"\\r\\n >\\r\\n </mt-fb-section>\\r\\n } @empty {\\r\\n <mt-card>\\r\\n <div class=\\\"h-27 p-4\\\">\\r\\n <div\\r\\n class=\\\"flex justify-center items-center gap-4 h-full border-2 border-primary rounded-xl bg-primary-200 text-primary\\\"\\r\\n >\\r\\n <span>{{ t(\\\"no-section\\\") }}</span>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n</ng-container>\\r\\n\", styles: [\".cdk-drag{cursor:grab}.cdk-drag:active,.cdk-drag-preview{cursor:grabbing}.cdk-drag-placeholder{opacity:.5}.cdk-drop-list-dragging .cdk-drag{cursor:grabbing}\\n\"], dependencies: [{ kind: \"ngmodule\", type: CommonModule }, { kind: \"ngmodule\", type: FormsModule }, { kind: \"ngmodule\", type: TabsModule }, { kind: \"component\", type: i1$1.Tabs, selector: \"p-tabs\", inputs: [\"value\", \"scrollable\", \"lazy\", \"selectOnFocus\", \"showNavigators\", \"tabindex\"], outputs: [\"valueChange\"] }, { kind: \"component\", type: i1$1.TabPanels, selector: \"p-tabpanels\" }, { kind: \"component\", type: i1$1.TabPanel, selector: \"p-tabpanel\", inputs: [\"lazy\", \"value\"], outputs: [\"valueChange\"] }, { kind: \"component\", type: i1$1.TabList, selector: \"p-tablist\" }, { kind: \"component\", type: i1$1.Tab, selector: \"p-tab\", inputs: [\"value\", \"disabled\"], outputs: [\"valueChange\"] }, { kind: \"component\", type: Button, selector: \"mt-button\", inputs: [\"icon\", \"label\", \"tooltip\", \"class\", \"type\", \"styleClass\", \"severity\", \"badge\", \"variant\", \"badgeSeverity\", \"size\", \"iconPos\", \"autofocus\", \"fluid\", \"raised\", \"rounded\", \"text\", \"plain\", \"outlined\", \"link\", \"disabled\", \"loading\", \"pInputs\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }, { kind: \"component\", type: Card, selector: \"mt-card\", inputs: [\"class\", \"title\", \"paddingless\"] }, { kind: \"directive\", type: TranslocoDirective, selector: \"[transloco]\", inputs: [\"transloco\", \"translocoParams\", \"translocoScope\", \"translocoRead\", \"translocoPrefix\", \"translocoLang\", \"translocoLoadingTpl\"] }, { kind: \"component\", type: FBSection, selector: \"mt-fb-section\", inputs: [\"section\", \"sectionsCount\", \"allSections\"], outputs: [\"onFieldDrop\"] }, { kind: \"ngmodule\", type: DragDropModule }, { kind: \"directive\", type: i2.CdkDropList, selector: \"[cdkDropList], cdk-drop-list\", inputs: [\"cdkDropListConnectedTo\", \"cdkDropListData\", \"cdkDropListOrientation\", \"id\", \"cdkDropListLockAxis\", \"cdkDropListDisabled\", \"cdkDropListSortingDisabled\", \"cdkDropListEnterPredicate\", \"cdkDropListSortPredicate\", \"cdkDropListAutoScrollDisabled\", \"cdkDropListAutoScrollStep\", \"cdkDropListElementContainer\", \"cdkDropListHasAnchor\"], outputs: [\"cdkDropListDropped\", \"cdkDropListEntered\", \"cdkDropListExited\", \"cdkDropListSorted\"], exportAs: [\"cdkDropList\"] }, { kind: \"directive\", type: i2.CdkDropListGroup, selector: \"[cdkDropListGroup]\", inputs: [\"cdkDropListGroupDisabled\"], exportAs: [\"cdkDropListGroup\"] }, { kind: \"directive\", type: i2.CdkDrag, selector: \"[cdkDrag]\", inputs: [\"cdkDragData\", \"cdkDragLockAxis\", \"cdkDragRootElement\", \"cdkDragBoundary\", \"cdkDragStartDelay\", \"cdkDragFreeDragPosition\", \"cdkDragDisabled\", \"cdkDragConstrainPosition\", \"cdkDragPreviewClass\", \"cdkDragPreviewContainer\", \"cdkDragScale\"], outputs: [\"cdkDragStarted\", \"cdkDragReleased\", \"cdkDragEnded\", \"cdkDragEntered\", \"cdkDragExited\", \"cdkDragDropped\", \"cdkDragMoved\"], exportAs: [\"cdkDrag\"] }, { kind: \"directive\", type: i2.CdkDragPlaceholder, selector: \"ng-template[cdkDragPlaceholder]\", inputs: [\"data\"] }, { kind: \"pipe\", type: i3.TitleCasePipe, name: \"titlecase\" }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilder, decorators: [{\n type: Component,\n args: [{ selector: 'mt-form-builder', standalone: true, imports: [\n CommonModule,\n FormsModule,\n TabsModule,\n Button,\n Card,\n TranslocoDirective,\n FBSection,\n DragDropModule,\n ], template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div class=\\\"flex gap-4 h-full w-full overflow-hidden\\\" cdkDropListGroup>\\r\\n @if (properties().length > 0) {\\r\\n <mt-card\\r\\n class=\\\"z-1 w-1/5 min-w-xs shrink-0 h-full flex flex-col overflow-hidden\\\"\\r\\n >\\r\\n <ng-template #headless>\\r\\n <!-- Header -->\\r\\n <div class=\\\"flex items-center justify-between px-4 pt-5\\\">\\r\\n <h3 class=\\\"text-xl font-semibold\\\">{{ t(\\\"form-elements\\\") }}</h3>\\r\\n </div>\\r\\n\\r\\n <!-- Tabs using PrimeNG -->\\r\\n <p-tabs\\r\\n [(value)]=\\\"activeTab\\\"\\r\\n styleClass=\\\"structure-tabs\\\"\\r\\n class=\\\"flex flex-1 flex-col min-h-0\\\"\\r\\n >\\r\\n <p-tablist class=\\\"shrink-0\\\">\\r\\n @for (tab of availableTabs(); track tab.id) {\\r\\n <p-tab [value]=\\\"tab.id\\\">{{ tab.title | titlecase }}</p-tab>\\r\\n }\\r\\n </p-tablist>\\r\\n <p-tabpanels class=\\\"!bg-transparent !p-0 flex-1 overflow-hidden\\\">\\r\\n @for (tab of availableTabs(); track tab.id) {\\r\\n <p-tabpanel [value]=\\\"tab.id\\\" class=\\\"h-full\\\">\\r\\n <!-- Node List -->\\r\\n <div\\r\\n class=\\\"space-y-1 p-4 [&_.cdk-drag-placeholder]:hidden h-full overflow-y-auto\\\"\\r\\n [id]=\\\"'toolbox-' + tab.id\\\"\\r\\n cdkDropList\\r\\n cdkDropListSortingDisabled\\r\\n [cdkDropListData]=\\\"tab.properties\\\"\\r\\n [cdkDropListEnterPredicate]=\\\"noReturnPredicate\\\"\\r\\n >\\r\\n @for (node of tab.properties; track $index) {\\r\\n <div\\r\\n cdkDrag\\r\\n [cdkDragData]=\\\"node\\\"\\r\\n class=\\\"group cursor-move select-none relative flex items-center gap-3 py-3 px-4 rounded-lg border border-dashed border-surface-300 hover:border-solid hover:bg-emphasis dark:border-surface-500 transition-colors\\\"\\r\\n >\\r\\n <div\\r\\n *cdkDragPlaceholder\\r\\n class=\\\"col-span-12 min-h-27 w-full rounded-2xl bg-black/10 z-1\\\"\\r\\n ></div>\\r\\n <span class=\\\"flex-1 text-base font-medium\\\">{{\\r\\n node.name\\r\\n }}</span>\\r\\n </div>\\r\\n }\\r\\n\\r\\n @if (tab.properties.length === 0) {\\r\\n <div class=\\\"py-8 text-center text-muted-color\\\">\\r\\n <p class=\\\"text-sm\\\">\\r\\n All {{ tab.title }} items are in use\\r\\n </p>\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </p-tabpanel>\\r\\n }\\r\\n </p-tabpanels>\\r\\n </p-tabs>\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n }\\r\\n\\r\\n <!-- Main Canvas Area -->\\r\\n <div class=\\\"flex flex-col gap-4 flex-1 w-full h-full overflow-y-auto\\\">\\r\\n <mt-card>\\r\\n <ng-template #headless>\\r\\n <div class=\\\"p-4 flex items-center gap-2\\\">\\r\\n <mt-button\\r\\n icon=\\\"layout.layout-top\\\"\\r\\n [label]=\\\"t('add-section')\\\"\\r\\n (onClick)=\\\"addSection()\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n icon=\\\"general.eye\\\"\\r\\n [label]=\\\"t('preview')\\\"\\r\\n (onClick)=\\\"openPreview()\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n icon=\\\"finance.credit-card-plus\\\"\\r\\n [label]=\\\"t('reset')\\\"\\r\\n (onClick)=\\\"resetFormConfiguration()\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n @for (section of enrichedSections(); track section.id) {\\r\\n <mt-fb-section\\r\\n [section]=\\\"section\\\"\\r\\n [sectionsCount]=\\\"enrichedSections().length\\\"\\r\\n [allSections]=\\\"enrichedSections()\\\"\\r\\n (onFieldDrop)=\\\"drop($event)\\\"\\r\\n >\\r\\n </mt-fb-section>\\r\\n } @empty {\\r\\n <mt-card>\\r\\n <div class=\\\"h-27 p-4\\\">\\r\\n <div\\r\\n class=\\\"flex justify-center items-center gap-4 h-full border-2 border-primary rounded-xl bg-primary-200 text-primary\\\"\\r\\n >\\r\\n <span>{{ t(\\\"no-section\\\") }}</span>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n</ng-container>\\r\\n\", styles: [\".cdk-drag{cursor:grab}.cdk-drag:active,.cdk-drag-preview{cursor:grabbing}.cdk-drag-placeholder{opacity:.5}.cdk-drop-list-dragging .cdk-drag{cursor:grabbing}\\n\"] }]\n }], ctorParameters: () => [], propDecorators: { properties: [{ type: i0.Input, args: [{ isSignal: true, alias: \"properties\", required: false }] }] } });","originalLength":20160,"removedExports":[],"renderedExports":["FormBuilder"],"renderedLength":19100},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/public-api.js":{"code":"/*\n * Public API Surface of form-builder\n */","originalLength":157,"removedExports":[],"renderedExports":[],"renderedLength":44},"C:\\Users\\ABDULLAH WISHAH\\Documents\\GitHub\\components\\dist\\masterteam\\form-builder\\tmp-esm2022\\masterteam-form-builder.js":{"code":"/**\n * Generated bundle index. Do not edit.\n */","originalLength":129,"removedExports":[],"renderedExports":[],"renderedLength":47}},"referencedFiles":[],"code":"import * as i0 from '@angular/core';\nimport { inject, Injectable, computed, input, signal, viewChild, Component, effect, output } from '@angular/core';\nimport * as i3 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i1 from '@angular/forms';\nimport { FormControl, ReactiveFormsModule, FormGroup, FormsModule } from '@angular/forms';\nimport * as i1$1 from 'primeng/tabs';\nimport { TabsModule } from 'primeng/tabs';\nimport { Button } from '@masterteam/components/button';\nimport { Card } from '@masterteam/components/card';\nimport { ModalService } from '@masterteam/components/modal';\nimport { ConfirmationService } from '@masterteam/components/confirmation';\nimport { TranslocoDirective, TranslocoService } from '@jsverse/transloco';\nimport * as i2 from '@angular/cdk/drag-drop';\nimport { CdkDrag, CdkDropList, CdkDragPlaceholder, DragDropModule } from '@angular/cdk/drag-drop';\nimport { DynamicField } from '@masterteam/forms/dynamic-field';\nimport { Icon } from '@masterteam/icons';\nimport { Action, Selector, State, Store, select } from '@ngxs/store';\nimport { HttpClient } from '@angular/common/http';\nimport { CrudStateBase, handleApiRequest, RadioCardsFieldConfig } from '@masterteam/components';\nimport { DynamicForm } from '@masterteam/forms/dynamic-form';\nimport { ToggleField } from '@masterteam/components/toggle-field';\nimport { ModalRef } from '@masterteam/components/dialog';\nimport { FormulaToolbar, FormulaEditor } from '@masterteam/components/formula';\nimport { Tabs } from '@masterteam/components/tabs';\n\n// ============================================================================\n// Module Configuration Actions\n// ============================================================================\nclass SetModuleInfo {\n moduleType;\n moduleId;\n parentModuleType;\n parentModuleId;\n parentPath;\n static type = '[FormBuilder] Set Module Info';\n constructor(moduleType, moduleId, parentModuleType, parentModuleId, parentPath) {\n this.moduleType = moduleType;\n this.moduleId = moduleId;\n this.parentModuleType = parentModuleType;\n this.parentModuleId = parentModuleId;\n this.parentPath = parentPath;\n }\n}\nclass ResetFormBuilderState {\n static type = '[FormBuilder] Reset State';\n}\n// ============================================================================\n// Form Configuration Actions\n// ============================================================================\nclass GetFormConfiguration {\n static type = '[FormBuilder] Get Form Configuration';\n}\nclass ResetFormConfiguration {\n static type = '[FormBuilder] Reset Form Configuration';\n}\n// ============================================================================\n// Section Actions\n// ============================================================================\nclass AddSection {\n payload;\n static type = '[FormBuilder] Add Section';\n constructor(payload) {\n this.payload = payload;\n }\n}\nclass UpdateSection {\n sectionId;\n payload;\n static type = '[FormBuilder] Update Section';\n constructor(sectionId, payload) {\n this.sectionId = sectionId;\n this.payload = payload;\n }\n}\nclass DeleteSection {\n sectionId;\n static type = '[FormBuilder] Delete Section';\n constructor(sectionId) {\n this.sectionId = sectionId;\n }\n}\n// ============================================================================\n// Field Actions\n// ============================================================================\nclass AddField {\n sectionId;\n payload;\n static type = '[FormBuilder] Add Field';\n constructor(sectionId, payload) {\n this.sectionId = sectionId;\n this.payload = payload;\n }\n}\nclass UpdateField {\n sectionId;\n fieldId;\n payload;\n static type = '[FormBuilder] Update Field';\n constructor(sectionId, fieldId, payload) {\n this.sectionId = sectionId;\n this.fieldId = fieldId;\n this.payload = payload;\n }\n}\nclass DeleteField {\n sectionId;\n fieldId;\n static type = '[FormBuilder] Delete Field';\n constructor(sectionId, fieldId) {\n this.sectionId = sectionId;\n this.fieldId = fieldId;\n }\n}\nclass MoveField {\n sectionId;\n fieldId;\n payload;\n static type = '[FormBuilder] Move Field';\n constructor(sectionId, fieldId, payload) {\n this.sectionId = sectionId;\n this.fieldId = fieldId;\n this.payload = payload;\n }\n}\n\n// ============================================================================\n// Action Keys Enum\n// ============================================================================\nvar FormBuilderActionKey;\n(function (FormBuilderActionKey) {\n // Form Configuration\n FormBuilderActionKey[\"GetFormConfiguration\"] = \"getFormConfiguration\";\n FormBuilderActionKey[\"ResetFormConfiguration\"] = \"resetFormConfiguration\";\n // Section CRUD\n FormBuilderActionKey[\"AddSection\"] = \"addSection\";\n FormBuilderActionKey[\"UpdateSection\"] = \"updateSection\";\n FormBuilderActionKey[\"DeleteSection\"] = \"deleteSection\";\n // Field CRUD\n FormBuilderActionKey[\"AddField\"] = \"addField\";\n FormBuilderActionKey[\"UpdateField\"] = \"updateField\";\n FormBuilderActionKey[\"DeleteField\"] = \"deleteField\";\n FormBuilderActionKey[\"MoveField\"] = \"moveField\";\n})(FormBuilderActionKey || (FormBuilderActionKey = {}));\n\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n// Default State\nconst DEFAULT_STATE = {\n // Module configuration\n moduleType: null,\n moduleId: null,\n parentModuleType: null,\n parentModuleId: null,\n parentPath: '',\n // Form data\n formConfiguration: null,\n // Loading state (from LoadingStateShape)\n loadingActive: [],\n errors: {},\n};\nlet FormBuilderState = class FormBuilderState extends CrudStateBase {\n http = inject(HttpClient);\n baseUrl = 'formConfigurations';\n // ============================================================================\n // Helpers\n // ============================================================================\n getApiPath(state) {\n const { parentPath, moduleType, moduleId } = state;\n return `${this.baseUrl}${parentPath}/${moduleType}/${moduleId}`;\n }\n // ============================================================================\n // Selectors\n // ============================================================================\n static getState(state) {\n return state ?? DEFAULT_STATE;\n }\n static getFormConfiguration(state) {\n return state?.formConfiguration ?? null;\n }\n static getSections(state) {\n return state?.formConfiguration?.sections ?? [];\n }\n static getModuleType(state) {\n return state?.moduleType ?? null;\n }\n static getModuleId(state) {\n return state?.moduleId ?? null;\n }\n // ============================================================================\n // Module Configuration Actions\n // ============================================================================\n setModuleInfo(ctx, action) {\n let parentPath = '';\n if (action.parentModuleType && action.parentModuleId) {\n parentPath = `/${action.parentModuleType}/${action.parentModuleId}`;\n }\n else if (action.parentPath) {\n parentPath = action.parentPath;\n }\n ctx.patchState({\n moduleType: action.moduleType,\n moduleId: action.moduleId,\n parentModuleType: action.parentModuleType ?? null,\n parentModuleId: action.parentModuleId ?? null,\n parentPath: parentPath ?? '',\n });\n }\n resetState(ctx) {\n ctx.setState(DEFAULT_STATE);\n }\n // ============================================================================\n // Form Configuration Actions\n // ============================================================================\n getFormConfiguration(ctx) {\n const state = ctx.getState();\n const apiPath = this.getApiPath(state);\n const req$ = this.http.get(apiPath);\n return this.load(ctx, {\n key: FormBuilderActionKey.GetFormConfiguration,\n request$: req$,\n updateState: (_state, data) => ({\n formConfiguration: data ?? null,\n }),\n });\n }\n resetFormConfiguration(ctx) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/reset`;\n const req$ = this.http.delete(apiPath);\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.ResetFormConfiguration,\n request$: req$,\n onSuccess: (res, _currentState) => ({\n formConfiguration: res.data ?? null,\n }),\n });\n }\n // ============================================================================\n // Section Actions\n // ============================================================================\n addSection(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections`;\n const req$ = this.http.post(apiPath, action.payload);\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.AddSection,\n request$: req$,\n onSuccess: (res, currentState) => {\n const sections = this.adapter.addOne(currentState.formConfiguration?.sections ?? [], res.data);\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n });\n }\n updateSection(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}`;\n const req$ = this.http.put(apiPath, action.payload);\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.UpdateSection,\n request$: req$,\n onSuccess: (res, currentState) => {\n const sections = this.adapter.upsertOne(currentState.formConfiguration?.sections ?? [], res.data, 'id');\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n });\n }\n deleteSection(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}`;\n const req$ = this.http.delete(apiPath);\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.DeleteSection,\n request$: req$,\n onSuccess: (res, currentState) => {\n const sections = this.adapter.removeOne(currentState.formConfiguration?.sections ?? [], res.data.id, 'id');\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n });\n }\n // ============================================================================\n // Field Actions\n // ============================================================================\n addField(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields`;\n const req$ = this.http.post(apiPath, action.payload);\n // Generate temp ID for optimistic update\n const tempId = `temp_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;\n const tempField = {\n id: tempId,\n sectionId: action.sectionId,\n propertyId: action.payload.propertyId,\n width: action.payload.width,\n order: action.payload.order ?? 0,\n hiddenInCreation: action.payload.hiddenInCreation,\n _pending: true,\n };\n // Optimistically add the temp field\n const sectionsWithTemp = (state.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n const fields = [...section.fields];\n const insertIndex = action.payload.order ?? fields.length;\n fields.splice(insertIndex, 0, tempField);\n return { ...section, fields };\n }\n return section;\n });\n ctx.patchState({\n formConfiguration: {\n ...state.formConfiguration,\n sections: sectionsWithTemp,\n },\n });\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.AddField,\n request$: req$,\n onSuccess: (res, currentState) => {\n const newField = res.data;\n // Replace temp field with real field\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n return {\n ...section,\n fields: section.fields.map((f) => f.id === tempId ? newField : f),\n };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n onError: (_error, currentState) => {\n // Remove temp field on error\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n return {\n ...section,\n fields: section.fields.filter((f) => f.id !== tempId),\n };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n });\n }\n updateField(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields/${action.fieldId}`;\n const req$ = this.http.put(apiPath, action.payload);\n // Apply optimistic update for order changes\n if (action.payload.order !== undefined) {\n const newOrder = action.payload.order;\n const sections = (state.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n const fields = [...section.fields];\n const currentIndex = fields.findIndex((f) => f.id === action.fieldId);\n if (currentIndex !== -1) {\n const [movedField] = fields.splice(currentIndex, 1);\n fields.splice(newOrder, 0, movedField);\n }\n return { ...section, fields };\n }\n return section;\n });\n ctx.patchState({\n formConfiguration: {\n ...state.formConfiguration,\n sections,\n },\n });\n }\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.UpdateField,\n request$: req$,\n onSuccess: (res, currentState) => {\n const updatedField = res.data;\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n // Update the field and sort by order\n const updatedFields = section.fields.map((f) => f.id === updatedField.id ? updatedField : f);\n return {\n ...section,\n fields: updatedFields.sort((a, b) => a.order - b.order),\n };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n onError: (_error, _currentState) => {\n // Revert optimistic update on error - reload original state\n if (action.payload.order !== undefined) {\n return {\n formConfiguration: state.formConfiguration,\n };\n }\n return {};\n },\n });\n }\n deleteField(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields/${action.fieldId}`;\n const req$ = this.http.delete(apiPath);\n // Optimistically mark field as deleting\n const sectionsWithDeleting = (state.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n return {\n ...section,\n fields: section.fields.map((f) => f.id === action.fieldId ? { ...f, _deleting: true } : f),\n };\n }\n return section;\n });\n ctx.patchState({\n formConfiguration: {\n ...state.formConfiguration,\n sections: sectionsWithDeleting,\n },\n });\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.DeleteField,\n request$: req$,\n onSuccess: (res, currentState) => {\n const { id: deletedId, sectionId } = res.data;\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === sectionId) {\n return {\n ...section,\n fields: section.fields.filter((f) => f.id !== deletedId),\n };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n onError: (_error, currentState) => {\n // Remove _deleting flag on error\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n return {\n ...section,\n fields: section.fields.map((f) => f.id === action.fieldId ? { ...f, _deleting: false } : f),\n };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n });\n }\n moveField(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields/${action.fieldId}/move`;\n const req$ = this.http.put(apiPath, action.payload);\n // Apply optimistic update - move field immediately\n const sourceSectionId = action.sectionId;\n const targetSectionId = action.payload.targetSectionId;\n const targetOrder = action.payload.order ?? 0;\n let movedFieldData = null;\n const optimisticSections = (state.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === sourceSectionId) {\n const fieldToMove = section.fields.find((f) => f.id === action.fieldId);\n if (fieldToMove) {\n movedFieldData = { ...fieldToMove, order: targetOrder };\n }\n return {\n ...section,\n fields: section.fields.filter((f) => f.id !== action.fieldId),\n };\n }\n return section;\n });\n // Add to target section\n const sectionsWithMoved = optimisticSections.map((section) => {\n if (section.id === targetSectionId && movedFieldData) {\n const fields = [...section.fields];\n fields.splice(targetOrder, 0, movedFieldData);\n return { ...section, fields };\n }\n return section;\n });\n ctx.patchState({\n formConfiguration: {\n ...state.formConfiguration,\n sections: sectionsWithMoved,\n },\n });\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.MoveField,\n request$: req$,\n onSuccess: (res, currentState) => {\n const movedField = res.data;\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n // Update the moved field with server response\n if (section.id === targetSectionId) {\n return {\n ...section,\n fields: section.fields\n .map((f) => (f.id === movedField.id ? movedField : f))\n .sort((a, b) => a.order - b.order),\n };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n onError: (_error, _currentState) => {\n // Revert optimistic update on error\n return {\n formConfiguration: state.formConfiguration,\n };\n },\n });\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilderState, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\n static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilderState });\n};\n__decorate([\n Action(SetModuleInfo)\n], FormBuilderState.prototype, \"setModuleInfo\", null);\n__decorate([\n Action(ResetFormBuilderState)\n], FormBuilderState.prototype, \"resetState\", null);\n__decorate([\n Action(GetFormConfiguration)\n], FormBuilderState.prototype, \"getFormConfiguration\", null);\n__decorate([\n Action(ResetFormConfiguration)\n], FormBuilderState.prototype, \"resetFormConfiguration\", null);\n__decorate([\n Action(AddSection)\n], FormBuilderState.prototype, \"addSection\", null);\n__decorate([\n Action(UpdateSection)\n], FormBuilderState.prototype, \"updateSection\", null);\n__decorate([\n Action(DeleteSection)\n], FormBuilderState.prototype, \"deleteSection\", null);\n__decorate([\n Action(AddField)\n], FormBuilderState.prototype, \"addField\", null);\n__decorate([\n Action(UpdateField)\n], FormBuilderState.prototype, \"updateField\", null);\n__decorate([\n Action(DeleteField)\n], FormBuilderState.prototype, \"deleteField\", null);\n__decorate([\n Action(MoveField)\n], FormBuilderState.prototype, \"moveField\", null);\n__decorate([\n Selector()\n], FormBuilderState, \"getState\", null);\n__decorate([\n Selector()\n], FormBuilderState, \"getFormConfiguration\", null);\n__decorate([\n Selector()\n], FormBuilderState, \"getSections\", null);\n__decorate([\n Selector()\n], FormBuilderState, \"getModuleType\", null);\n__decorate([\n Selector()\n], FormBuilderState, \"getModuleId\", null);\nFormBuilderState = __decorate([\n State({\n name: 'formBuilder',\n defaults: DEFAULT_STATE,\n })\n], FormBuilderState);\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilderState, decorators: [{\n type: Injectable\n }], propDecorators: { setModuleInfo: [], resetState: [], getFormConfiguration: [], resetFormConfiguration: [], addSection: [], updateSection: [], deleteSection: [], addField: [], updateField: [], deleteField: [], moveField: [] } });\n\nclass FormBuilderFacade {\n store = inject(Store);\n // ============================================================================\n // State Selectors\n // ============================================================================\n stateSignal = select(FormBuilderState.getState);\n formConfiguration = select(FormBuilderState.getFormConfiguration);\n sections = select(FormBuilderState.getSections);\n moduleType = select(FormBuilderState.getModuleType);\n moduleId = select(FormBuilderState.getModuleId);\n // ============================================================================\n // Loading Signals\n // ============================================================================\n isLoadingFormConfiguration = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.GetFormConfiguration), ...(ngDevMode ? [{ debugName: \"isLoadingFormConfiguration\" }] : []));\n isResettingFormConfiguration = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.ResetFormConfiguration), ...(ngDevMode ? [{ debugName: \"isResettingFormConfiguration\" }] : []));\n isAddingSection = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.AddSection), ...(ngDevMode ? [{ debugName: \"isAddingSection\" }] : []));\n isUpdatingSection = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.UpdateSection), ...(ngDevMode ? [{ debugName: \"isUpdatingSection\" }] : []));\n isDeletingSection = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.DeleteSection), ...(ngDevMode ? [{ debugName: \"isDeletingSection\" }] : []));\n isAddingField = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.AddField), ...(ngDevMode ? [{ debugName: \"isAddingField\" }] : []));\n isUpdatingField = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.UpdateField), ...(ngDevMode ? [{ debugName: \"isUpdatingField\" }] : []));\n isDeletingField = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.DeleteField), ...(ngDevMode ? [{ debugName: \"isDeletingField\" }] : []));\n isMovingField = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.MoveField), ...(ngDevMode ? [{ debugName: \"isMovingField\" }] : []));\n // ============================================================================\n // Error Signals\n // ============================================================================\n formConfigurationError = computed(() => this.stateSignal().errors[FormBuilderActionKey.GetFormConfiguration] ??\n null, ...(ngDevMode ? [{ debugName: \"formConfigurationError\" }] : []));\n sectionError = computed(() => {\n const errors = this.stateSignal().errors;\n return (errors[FormBuilderActionKey.AddSection] ??\n errors[FormBuilderActionKey.UpdateSection] ??\n errors[FormBuilderActionKey.DeleteSection] ??\n null);\n }, ...(ngDevMode ? [{ debugName: \"sectionError\" }] : []));\n fieldError = computed(() => {\n const errors = this.stateSignal().errors;\n return (errors[FormBuilderActionKey.AddField] ??\n errors[FormBuilderActionKey.UpdateField] ??\n errors[FormBuilderActionKey.DeleteField] ??\n errors[FormBuilderActionKey.MoveField] ??\n null);\n }, ...(ngDevMode ? [{ debugName: \"fieldError\" }] : []));\n // ============================================================================\n // Module Configuration Dispatchers\n // ============================================================================\n setModuleInfo(moduleType, moduleId, parentModuleType, parentModuleId, parentPath) {\n return this.store.dispatch(new SetModuleInfo(moduleType, moduleId, parentModuleType, parentModuleId, parentPath));\n }\n resetState() {\n return this.store.dispatch(new ResetFormBuilderState());\n }\n // ============================================================================\n // Form Configuration Dispatchers\n // ============================================================================\n getFormConfiguration() {\n return this.store.dispatch(new GetFormConfiguration());\n }\n resetFormConfiguration() {\n return this.store.dispatch(new ResetFormConfiguration());\n }\n // ============================================================================\n // Section Dispatchers\n // ============================================================================\n addSection(payload) {\n return this.store.dispatch(new AddSection(payload));\n }\n updateSection(sectionId, payload) {\n return this.store.dispatch(new UpdateSection(sectionId, payload));\n }\n deleteSection(sectionId) {\n return this.store.dispatch(new DeleteSection(sectionId));\n }\n // ============================================================================\n // Field Dispatchers\n // ============================================================================\n addField(sectionId, payload) {\n return this.store.dispatch(new AddField(sectionId, payload));\n }\n updateField(sectionId, fieldId, payload) {\n return this.store.dispatch(new UpdateField(sectionId, fieldId, payload));\n }\n deleteField(sectionId, fieldId) {\n return this.store.dispatch(new DeleteField(sectionId, fieldId));\n }\n moveField(sectionId, fieldId, payload) {\n return this.store.dispatch(new MoveField(sectionId, fieldId, payload));\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilderFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilderFacade, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilderFacade, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\n/**\n * Condition Formula Constants\n * Static functions and operators for condition formulas (Show/Hide/Enable/Disable)\n */\n/**\n * Functions for field conditions\n */\nconst CONDITION_FUNCTION_CATEGORIES = [\n {\n name: 'Logic',\n displayName: 'Field Visibility',\n functions: [\n {\n name: 'SHOW_IF',\n category: 'Logic',\n description: 'Show this field when condition is true',\n signature: 'SHOW_IF(condition)',\n parameters: [\n {\n name: 'condition',\n type: 'boolean',\n description: 'When true, field is visible',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: [\n 'SHOW_IF(@Status == \"Active\")',\n 'SHOW_IF(@Type == \"Custom\")',\n ],\n },\n {\n name: 'HIDE_IF',\n category: 'Logic',\n description: 'Hide this field when condition is true',\n signature: 'HIDE_IF(condition)',\n parameters: [\n {\n name: 'condition',\n type: 'boolean',\n description: 'When true, field is hidden',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: ['HIDE_IF(@Status == \"Closed\")', 'HIDE_IF(ISNULL(@Parent))'],\n },\n {\n name: 'DISABLE_IF',\n category: 'Logic',\n description: 'Disable this field when condition is true',\n signature: 'DISABLE_IF(condition)',\n parameters: [\n {\n name: 'condition',\n type: 'boolean',\n description: 'When true, field is disabled',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: [\n 'DISABLE_IF(@IsLocked == true)',\n 'DISABLE_IF(@Status == \"Approved\")',\n ],\n },\n {\n name: 'ENABLE_IF',\n category: 'Logic',\n description: 'Enable this field when condition is true',\n signature: 'ENABLE_IF(condition)',\n parameters: [\n {\n name: 'condition',\n type: 'boolean',\n description: 'When true, field is enabled',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: [\n 'ENABLE_IF(@Status == \"Draft\")',\n 'ENABLE_IF(@CanEdit == true)',\n ],\n },\n ],\n },\n {\n name: 'Aggregation',\n displayName: 'Logic Helpers',\n functions: [\n {\n name: 'AND',\n category: 'Aggregation',\n description: 'Returns true if all conditions are true',\n signature: 'AND(condition1, condition2)',\n parameters: [\n {\n name: 'condition1',\n type: 'boolean',\n description: 'First condition',\n required: true,\n },\n {\n name: 'condition2',\n type: 'boolean',\n description: 'Second condition',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: ['AND(@Status == \"Active\", @Priority > 0)'],\n },\n {\n name: 'OR',\n category: 'Aggregation',\n description: 'Returns true if any condition is true',\n signature: 'OR(condition1, condition2)',\n parameters: [\n {\n name: 'condition1',\n type: 'boolean',\n description: 'First condition',\n required: true,\n },\n {\n name: 'condition2',\n type: 'boolean',\n description: 'Second condition',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: ['OR(@Status == \"Active\", @Status == \"Pending\")'],\n },\n {\n name: 'NOT',\n category: 'Aggregation',\n description: 'Returns the opposite of the condition',\n signature: 'NOT(condition)',\n parameters: [\n {\n name: 'condition',\n type: 'boolean',\n description: 'The condition to negate',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: ['NOT(@IsCompleted)'],\n },\n {\n name: 'ISNULL',\n category: 'Aggregation',\n description: 'Returns true if value is null or empty',\n signature: 'ISNULL(value)',\n parameters: [\n {\n name: 'value',\n type: 'any',\n description: 'The value to check',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: ['ISNULL(@Description)'],\n },\n {\n name: 'CONTAINS',\n category: 'Aggregation',\n description: 'Returns true if text contains the search string',\n signature: 'CONTAINS(text, search)',\n parameters: [\n {\n name: 'text',\n type: 'string',\n description: 'The text to search in',\n required: true,\n },\n {\n name: 'search',\n type: 'string',\n description: 'The string to search for',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: ['CONTAINS(@Name, \"Project\")'],\n },\n ],\n },\n];\n/**\n * Operators for conditions\n */\nconst CONDITION_OPERATORS = [\n // Comparison\n {\n symbol: '==',\n name: 'Equal',\n type: 'comparison',\n description: 'Equal to',\n precedence: 3,\n },\n {\n symbol: '!=',\n name: 'Not Equal',\n type: 'comparison',\n description: 'Not equal to',\n precedence: 3,\n },\n {\n symbol: '>',\n name: 'Greater Than',\n type: 'comparison',\n description: 'Greater than',\n precedence: 4,\n },\n {\n symbol: '<',\n name: 'Less Than',\n type: 'comparison',\n description: 'Less than',\n precedence: 4,\n },\n {\n symbol: '>=',\n name: 'Greater or Equal',\n type: 'comparison',\n description: 'Greater than or equal',\n precedence: 4,\n },\n {\n symbol: '<=',\n name: 'Less or Equal',\n type: 'comparison',\n description: 'Less than or equal',\n precedence: 4,\n },\n // Logical\n {\n symbol: '&&',\n name: 'And',\n type: 'logical',\n description: 'Logical AND',\n precedence: 2,\n },\n {\n symbol: '||',\n name: 'Or',\n type: 'logical',\n description: 'Logical OR',\n precedence: 1,\n },\n];\n\n/**\n * Field Conditions Dialog\n *\n * Allows users to define conditional display formulas for form fields.\n * Uses FormulaToolbar + FormulaEditor directly for a visual formula editing experience.\n */\nclass FBFieldConditions {\n modalService = inject(ModalService);\n ref = inject(ModalRef);\n // Inputs\n /** Initial formula (JSON string from backend) */\n initialFormula = input('', ...(ngDevMode ? [{ debugName: \"initialFormula\" }] : []));\n /** Available fields from the form builder (other fields that can be referenced) */\n availableFields = input([], ...(ngDevMode ? [{ debugName: \"availableFields\" }] : []));\n // UI State\n submitting = signal(false, ...(ngDevMode ? [{ debugName: \"submitting\" }] : []));\n // Form control for the formula editor (tokens array)\n formulaControl = new FormControl([]);\n // View child for the editor\n editorRef = viewChild('editor', ...(ngDevMode ? [{ debugName: \"editorRef\" }] : []));\n // Condition-specific functions and operators\n functionCategories = CONDITION_FUNCTION_CATEGORIES;\n operators = CONDITION_OPERATORS;\n /** Extract property keys for toolbar */\n propertyKeys = computed(() => this.availableFields().map((f) => f.key), ...(ngDevMode ? [{ debugName: \"propertyKeys\" }] : []));\n /** Toolbar labels */\n toolbarLabels = {\n functions: 'Functions',\n properties: 'Fields',\n operators: 'Operators',\n noPropertiesAvailable: 'No fields available',\n };\n ngOnInit() {\n // Parse JSON string to tokens\n const formula = this.initialFormula();\n if (formula) {\n try {\n const tokens = JSON.parse(formula);\n this.formulaControl.patchValue(tokens);\n }\n catch {\n // Invalid JSON, start with empty\n }\n }\n }\n /** Handle block insert from toolbar */\n onBlockInsert(block) {\n const editor = this.editorRef();\n if (editor) {\n editor.addBlock(block);\n }\n }\n onSave() {\n const tokens = this.formulaControl.value ?? [];\n const formula = tokens.length > 0 ? JSON.stringify(tokens) : '';\n this.ref.close({ saved: true, conditionalDisplayFormula: formula });\n }\n onCancel() {\n this.ref.close({ saved: false });\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBFieldConditions, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.2.0\", version: \"21.0.3\", type: FBFieldConditions, isStandalone: true, selector: \"mt-fb-field-conditions\", inputs: { initialFormula: { classPropertyName: \"initialFormula\", publicName: \"initialFormula\", isSignal: true, isRequired: false, transformFunction: null }, availableFields: { classPropertyName: \"availableFields\", publicName: \"availableFields\", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: \"editorRef\", first: true, predicate: [\"editor\"], descendants: true, isSignal: true }], ngImport: i0, template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10 flex flex-col gap-3\\\">\\r\\n <!-- Formula Toolbar -->\\r\\n <mt-formula-toolbar\\r\\n [knownProperties]=\\\"propertyKeys()\\\"\\r\\n [functionCategories]=\\\"functionCategories\\\"\\r\\n [operators]=\\\"operators\\\"\\r\\n [labels]=\\\"toolbarLabels\\\"\\r\\n (onBlockInsert)=\\\"onBlockInsert($event)\\\"\\r\\n />\\r\\n <!-- Formula Editor -->\\r\\n <mt-formula-editor\\r\\n #editor\\r\\n [placeholder]=\\\"t('build-condition-formula')\\\"\\r\\n [formControl]=\\\"formulaControl\\\"\\r\\n />\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n />\\r\\n <mt-button\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n />\\r\\n </div>\\r\\n</ng-container>\\r\\n\", dependencies: [{ kind: \"directive\", type: TranslocoDirective, selector: \"[transloco]\", inputs: [\"transloco\", \"translocoParams\", \"translocoScope\", \"translocoRead\", \"translocoPrefix\", \"translocoLang\", \"translocoLoadingTpl\"] }, { kind: \"ngmodule\", type: ReactiveFormsModule }, { kind: \"directive\", type: i1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i1.FormControlDirective, selector: \"[formControl]\", inputs: [\"formControl\", \"disabled\", \"ngModel\"], outputs: [\"ngModelChange\"], exportAs: [\"ngForm\"] }, { kind: \"component\", type: Button, selector: \"mt-button\", inputs: [\"icon\", \"label\", \"tooltip\", \"class\", \"type\", \"styleClass\", \"severity\", \"badge\", \"variant\", \"badgeSeverity\", \"size\", \"iconPos\", \"autofocus\", \"fluid\", \"raised\", \"rounded\", \"text\", \"plain\", \"outlined\", \"link\", \"disabled\", \"loading\", \"pInputs\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }, { kind: \"component\", type: FormulaToolbar, selector: \"mt-formula-toolbar\", inputs: [\"knownProperties\", \"functionCategories\", \"operators\", \"initialTab\", \"searchPlaceholder\", \"labels\"], outputs: [\"onBlockInsert\", \"onTabChange\"] }, { kind: \"component\", type: FormulaEditor, selector: \"mt-formula-editor\", inputs: [\"placeholder\", \"initialTokens\", \"disabled\"], outputs: [\"formulaChange\", \"tokensChange\", \"onBlur\", \"onFocus\"] }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBFieldConditions, decorators: [{\n type: Component,\n args: [{ selector: 'mt-fb-field-conditions', standalone: true, imports: [\n TranslocoDirective,\n ReactiveFormsModule,\n Button,\n FormulaToolbar,\n FormulaEditor,\n ], template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10 flex flex-col gap-3\\\">\\r\\n <!-- Formula Toolbar -->\\r\\n <mt-formula-toolbar\\r\\n [knownProperties]=\\\"propertyKeys()\\\"\\r\\n [functionCategories]=\\\"functionCategories\\\"\\r\\n [operators]=\\\"operators\\\"\\r\\n [labels]=\\\"toolbarLabels\\\"\\r\\n (onBlockInsert)=\\\"onBlockInsert($event)\\\"\\r\\n />\\r\\n <!-- Formula Editor -->\\r\\n <mt-formula-editor\\r\\n #editor\\r\\n [placeholder]=\\\"t('build-condition-formula')\\\"\\r\\n [formControl]=\\\"formulaControl\\\"\\r\\n />\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n />\\r\\n <mt-button\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n />\\r\\n </div>\\r\\n</ng-container>\\r\\n\" }]\n }], propDecorators: { initialFormula: [{ type: i0.Input, args: [{ isSignal: true, alias: \"initialFormula\", required: false }] }], availableFields: [{ type: i0.Input, args: [{ isSignal: true, alias: \"availableFields\", required: false }] }], editorRef: [{ type: i0.ViewChild, args: ['editor', { isSignal: true }] }] } });\n\nclass FBFieldForm {\n transloco = inject(TranslocoService);\n modalService = inject(ModalService);\n ref = inject(ModalRef);\n confirmationService = inject(ConfirmationService);\n facade = inject(FormBuilderFacade);\n // Inputs\n sectionId = input('', ...(ngDevMode ? [{ debugName: \"sectionId\" }] : []));\n initialData = input(null, ...(ngDevMode ? [{ debugName: \"initialData\" }] : []));\n /** All sections with enriched fields (to get available fields for conditions) */\n allSections = input([], ...(ngDevMode ? [{ debugName: \"allSections\" }] : []));\n // UI State\n submitting = signal(false, ...(ngDevMode ? [{ debugName: \"submitting\" }] : []));\n deleting = signal(false, ...(ngDevMode ? [{ debugName: \"deleting\" }] : []));\n conditionalDisplayFormula = signal('', ...(ngDevMode ? [{ debugName: \"conditionalDisplayFormula\" }] : []));\n conditionsDialogRef;\n /**\n * Compute available fields for condition formula\n * Excludes the current field being edited\n */\n availableFields = computed(() => {\n const sections = this.allSections();\n const currentField = this.initialData();\n const fields = [];\n for (const section of sections) {\n for (const field of section.fields) {\n // Exclude the current field being edited\n if (currentField && field.id === currentField.id)\n continue;\n fields.push({\n key: field.name,\n name: field.name,\n type: field.type,\n });\n }\n }\n return fields;\n }, ...(ngDevMode ? [{ debugName: \"availableFields\" }] : []));\n // Form\n formControl = new FormControl();\n showHideControl = new FormControl(false);\n formConfig = {\n sections: [\n {\n key: 'section-form',\n type: 'none',\n columns: 12,\n order: 1,\n fields: [\n {\n key: 'isRequired',\n label: this.transloco.translate('formBuilder.is-required'),\n type: 'toggle',\n toggleShape: 'card',\n colSpan: 12,\n order: 1,\n },\n {\n key: 'hiddenInCreation',\n label: this.transloco.translate('formBuilder.hidden-in-creation'),\n type: 'toggle',\n toggleShape: 'card',\n colSpan: 12,\n order: 2,\n },\n {\n key: 'hiddenInEditForm',\n label: this.transloco.translate('formBuilder.hidden-in-edit-form'),\n type: 'toggle',\n toggleShape: 'card',\n colSpan: 12,\n order: 3,\n },\n new RadioCardsFieldConfig({\n key: 'size',\n label: this.transloco.translate('formBuilder.size'),\n placeholder: this.transloco.translate('formBuilder.size'),\n options: [\n { id: 's', name: 'S' },\n { id: 'm', name: 'M' },\n { id: 'l', name: 'L' },\n ],\n order: 4,\n size: 'small',\n }),\n ],\n },\n ],\n };\n constructor() {\n effect(() => {\n const data = this.initialData();\n if (data) {\n const widthToSize = {\n '25': 's',\n '50': 'm',\n '100': 'l',\n };\n this.formControl.patchValue({\n isRequired: data.isRequired ?? false,\n hiddenInCreation: data.hiddenInCreation ?? false,\n hiddenInEditForm: data.hiddenInEditForm ?? false,\n size: widthToSize[data.width] ?? 'l',\n });\n // Set show/hide toggle based on existing value\n this.showHideControl.patchValue(data.showConditionalDisplayFormula ?? false);\n this.conditionalDisplayFormula.set(data.conditionalDisplayFormula ?? '');\n }\n });\n }\n onSave() {\n if (this.formControl.invalid)\n return;\n const formValue = this.formControl.value;\n const field = this.initialData();\n const sectionId = this.sectionId();\n if (!field || !sectionId)\n return;\n const widthMap = {\n s: '25',\n m: '50',\n l: '100',\n };\n const payload = {\n width: widthMap[formValue.size] ?? '100',\n hiddenInCreation: formValue.hiddenInCreation ?? false,\n hiddenInEditForm: formValue.hiddenInEditForm ?? false,\n isRequired: formValue.isRequired ?? false,\n showConditionalDisplayFormula: this.showHideControl.value ?? false,\n conditionalDisplayFormula: this.showHideControl.value\n ? this.conditionalDisplayFormula()\n : null,\n };\n this.submitting.set(true);\n this.facade.updateField(sectionId, field.id, payload).subscribe({\n next: () => this.ref.close(true),\n error: () => this.submitting.set(false),\n });\n }\n onCancel() {\n this.ref.close(false);\n }\n onSetConditions() {\n this.conditionsDialogRef = this.modalService.openModal(FBFieldConditions, 'drawer', {\n header: this.transloco.translate('formBuilder.set-conditions'),\n styleClass: '!w-[calc(100%-25rem)] !absolute ',\n position: 'start',\n modal: false,\n appendTo: '#page-content',\n inputValues: {\n initialFormula: this.conditionalDisplayFormula(),\n availableFields: this.availableFields(),\n },\n });\n this.conditionsDialogRef.onClose.subscribe((result) => {\n if (result?.saved) {\n this.conditionalDisplayFormula.set(result.conditionalDisplayFormula ?? '');\n }\n });\n }\n onDelete(event) {\n const field = this.initialData();\n const sectionId = this.sectionId();\n if (!field || !sectionId)\n return;\n this.confirmationService.confirmDelete({\n event,\n type: 'popup',\n accept: () => {\n this.deleting.set(true);\n this.facade.deleteField(sectionId, field.id).subscribe({\n next: () => this.ref.close(true),\n error: () => this.deleting.set(false),\n });\n },\n });\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBFieldForm, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.0.3\", type: FBFieldForm, isStandalone: true, selector: \"mt-fb-field-form\", inputs: { sectionId: { classPropertyName: \"sectionId\", publicName: \"sectionId\", isSignal: true, isRequired: false, transformFunction: null }, initialData: { classPropertyName: \"initialData\", publicName: \"initialData\", isSignal: true, isRequired: false, transformFunction: null }, allSections: { classPropertyName: \"allSections\", publicName: \"allSections\", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10 flex flex-col gap-4\\\">\\r\\n <mt-dynamic-form [formConfig]=\\\"formConfig\\\" [formControl]=\\\"formControl\\\">\\r\\n </mt-dynamic-form>\\r\\n\\r\\n <!-- Show/Hide Toggle with Set Conditions -->\\r\\n <mt-toggle-field\\r\\n toggleShape=\\\"card\\\"\\r\\n [label]=\\\"t('show-hide')\\\"\\r\\n [descriptionCard]=\\\"t('show-hide-description')\\\"\\r\\n icon=\\\"general.eye\\\"\\r\\n [formControl]=\\\"showHideControl\\\"\\r\\n >\\r\\n <ng-template #toggleCardBottom>\\r\\n @if (showHideControl.value) {\\r\\n <div class=\\\"mt-3\\\">\\r\\n <mt-button\\r\\n [label]=\\\"t('set-conditions')\\\"\\r\\n size=\\\"small\\\"\\r\\n (onClick)=\\\"onSetConditions()\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n }\\r\\n </ng-template>\\r\\n </mt-toggle-field>\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n @if (initialData()) {\\r\\n <mt-button\\r\\n [tooltip]=\\\"t('delete')\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n icon=\\\"general.trash-01\\\"\\r\\n [loading]=\\\"deleting()\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onDelete($event)\\\"\\r\\n class=\\\"me-auto\\\"\\r\\n ></mt-button>\\r\\n }\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting() || deleting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n <mt-button\\r\\n [disabled]=\\\"!formControl.valid || deleting()\\\"\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n </div>\\r\\n</ng-container>\\r\\n\", dependencies: [{ kind: \"directive\", type: TranslocoDirective, selector: \"[transloco]\", inputs: [\"transloco\", \"translocoParams\", \"translocoScope\", \"translocoRead\", \"translocoPrefix\", \"translocoLang\", \"translocoLoadingTpl\"] }, { kind: \"ngmodule\", type: ReactiveFormsModule }, { kind: \"directive\", type: i1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i1.FormControlDirective, selector: \"[formControl]\", inputs: [\"formControl\", \"disabled\", \"ngModel\"], outputs: [\"ngModelChange\"], exportAs: [\"ngForm\"] }, { kind: \"component\", type: DynamicForm, selector: \"mt-dynamic-form\", inputs: [\"formConfig\"] }, { kind: \"component\", type: Button, selector: \"mt-button\", inputs: [\"icon\", \"label\", \"tooltip\", \"class\", \"type\", \"styleClass\", \"severity\", \"badge\", \"variant\", \"badgeSeverity\", \"size\", \"iconPos\", \"autofocus\", \"fluid\", \"raised\", \"rounded\", \"text\", \"plain\", \"outlined\", \"link\", \"disabled\", \"loading\", \"pInputs\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }, { kind: \"component\", type: ToggleField, selector: \"mt-toggle-field\", inputs: [\"label\", \"labelPosition\", \"placeholder\", \"readonly\", \"pInputs\", \"required\", \"toggleShape\", \"icon\", \"descriptionCard\"], outputs: [\"onChange\"] }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBFieldForm, decorators: [{\n type: Component,\n args: [{ selector: 'mt-fb-field-form', standalone: true, imports: [\n TranslocoDirective,\n ReactiveFormsModule,\n DynamicForm,\n Button,\n ToggleField,\n ], template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10 flex flex-col gap-4\\\">\\r\\n <mt-dynamic-form [formConfig]=\\\"formConfig\\\" [formControl]=\\\"formControl\\\">\\r\\n </mt-dynamic-form>\\r\\n\\r\\n <!-- Show/Hide Toggle with Set Conditions -->\\r\\n <mt-toggle-field\\r\\n toggleShape=\\\"card\\\"\\r\\n [label]=\\\"t('show-hide')\\\"\\r\\n [descriptionCard]=\\\"t('show-hide-description')\\\"\\r\\n icon=\\\"general.eye\\\"\\r\\n [formControl]=\\\"showHideControl\\\"\\r\\n >\\r\\n <ng-template #toggleCardBottom>\\r\\n @if (showHideControl.value) {\\r\\n <div class=\\\"mt-3\\\">\\r\\n <mt-button\\r\\n [label]=\\\"t('set-conditions')\\\"\\r\\n size=\\\"small\\\"\\r\\n (onClick)=\\\"onSetConditions()\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n }\\r\\n </ng-template>\\r\\n </mt-toggle-field>\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n @if (initialData()) {\\r\\n <mt-button\\r\\n [tooltip]=\\\"t('delete')\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n icon=\\\"general.trash-01\\\"\\r\\n [loading]=\\\"deleting()\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onDelete($event)\\\"\\r\\n class=\\\"me-auto\\\"\\r\\n ></mt-button>\\r\\n }\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting() || deleting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n <mt-button\\r\\n [disabled]=\\\"!formControl.valid || deleting()\\\"\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n </div>\\r\\n</ng-container>\\r\\n\" }]\n }], ctorParameters: () => [], propDecorators: { sectionId: [{ type: i0.Input, args: [{ isSignal: true, alias: \"sectionId\", required: false }] }], initialData: [{ type: i0.Input, args: [{ isSignal: true, alias: \"initialData\", required: false }] }], allSections: [{ type: i0.Input, args: [{ isSignal: true, alias: \"allSections\", required: false }] }] } });\n\nclass FBSectionForm {\n transloco = inject(TranslocoService);\n modalService = inject(ModalService);\n ref = inject(ModalRef);\n confirmationService = inject(ConfirmationService);\n facade = inject(FormBuilderFacade);\n // Inputs\n sectionId = input(null, ...(ngDevMode ? [{ debugName: \"sectionId\" }] : []));\n initialData = input(null, ...(ngDevMode ? [{ debugName: \"initialData\" }] : []));\n sectionsCount = input(0, ...(ngDevMode ? [{ debugName: \"sectionsCount\" }] : []));\n // UI State\n submitting = signal(false, ...(ngDevMode ? [{ debugName: \"submitting\" }] : []));\n deleting = signal(false, ...(ngDevMode ? [{ debugName: \"deleting\" }] : []));\n // Form\n formControl = new FormControl();\n formConfig = {\n sections: [\n {\n key: 'section-form',\n type: 'none',\n columns: 12,\n order: 1,\n fields: [\n {\n key: 'name-ar',\n label: this.transloco.translate('formBuilder.name-ar'),\n type: 'text',\n placeholder: this.transloco.translate('formBuilder.name-ar'),\n colSpan: 12,\n order: 1,\n },\n {\n key: 'name-en',\n label: this.transloco.translate('formBuilder.name-en'),\n type: 'text',\n placeholder: this.transloco.translate('formBuilder.name-en'),\n colSpan: 12,\n order: 2,\n },\n ],\n },\n ],\n };\n constructor() {\n effect(() => {\n const data = this.initialData();\n if (data) {\n this.formControl.patchValue({\n 'name-ar': data.ar,\n 'name-en': data.en,\n });\n }\n });\n }\n onSave() {\n if (this.formControl.invalid)\n return;\n const formValue = this.formControl.value;\n const payload = {\n name: {\n ar: formValue['name-ar'],\n en: formValue['name-en'],\n },\n };\n this.submitting.set(true);\n const sectionId = this.sectionId();\n if (sectionId) {\n // Update existing section\n this.facade.updateSection(sectionId, payload).subscribe({\n next: () => this.ref.close(true),\n error: () => this.submitting.set(false),\n });\n }\n else {\n // Create new section\n this.facade\n .addSection({ ...payload, order: this.sectionsCount() })\n .subscribe({\n next: () => this.ref.close(true),\n error: () => this.submitting.set(false),\n });\n }\n }\n onCancel() {\n this.ref.close(false);\n }\n onDelete(event) {\n const sectionId = this.sectionId();\n if (!sectionId)\n return;\n this.confirmationService.confirmDelete({\n event,\n type: 'popup',\n accept: () => {\n this.deleting.set(true);\n this.facade.deleteSection(sectionId).subscribe({\n next: () => this.ref.close(true),\n error: () => this.deleting.set(false),\n });\n },\n });\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBSectionForm, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.0.3\", type: FBSectionForm, isStandalone: true, selector: \"mt-fb-section-form\", inputs: { sectionId: { classPropertyName: \"sectionId\", publicName: \"sectionId\", isSignal: true, isRequired: false, transformFunction: null }, initialData: { classPropertyName: \"initialData\", publicName: \"initialData\", isSignal: true, isRequired: false, transformFunction: null }, sectionsCount: { classPropertyName: \"sectionsCount\", publicName: \"sectionsCount\", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10\\\">\\r\\n <mt-dynamic-form [formConfig]=\\\"formConfig\\\" [formControl]=\\\"formControl\\\">\\r\\n </mt-dynamic-form>\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n @if (sectionId()) {\\r\\n <mt-button\\r\\n [tooltip]=\\\"t('delete')\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n icon=\\\"general.trash-01\\\"\\r\\n [loading]=\\\"deleting()\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onDelete($event)\\\"\\r\\n class=\\\"me-auto\\\"\\r\\n ></mt-button>\\r\\n }\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting() || deleting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n <mt-button\\r\\n [disabled]=\\\"!formControl.valid || deleting()\\\"\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n </div>\\r\\n</ng-container>\\r\\n\", dependencies: [{ kind: \"directive\", type: TranslocoDirective, selector: \"[transloco]\", inputs: [\"transloco\", \"translocoParams\", \"translocoScope\", \"translocoRead\", \"translocoPrefix\", \"translocoLang\", \"translocoLoadingTpl\"] }, { kind: \"ngmodule\", type: ReactiveFormsModule }, { kind: \"directive\", type: i1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i1.FormControlDirective, selector: \"[formControl]\", inputs: [\"formControl\", \"disabled\", \"ngModel\"], outputs: [\"ngModelChange\"], exportAs: [\"ngForm\"] }, { kind: \"component\", type: DynamicForm, selector: \"mt-dynamic-form\", inputs: [\"formConfig\"] }, { kind: \"component\", type: Button, selector: \"mt-button\", inputs: [\"icon\", \"label\", \"tooltip\", \"class\", \"type\", \"styleClass\", \"severity\", \"badge\", \"variant\", \"badgeSeverity\", \"size\", \"iconPos\", \"autofocus\", \"fluid\", \"raised\", \"rounded\", \"text\", \"plain\", \"outlined\", \"link\", \"disabled\", \"loading\", \"pInputs\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBSectionForm, decorators: [{\n type: Component,\n args: [{ selector: 'mt-fb-section-form', standalone: true, imports: [TranslocoDirective, ReactiveFormsModule, DynamicForm, Button], template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10\\\">\\r\\n <mt-dynamic-form [formConfig]=\\\"formConfig\\\" [formControl]=\\\"formControl\\\">\\r\\n </mt-dynamic-form>\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n @if (sectionId()) {\\r\\n <mt-button\\r\\n [tooltip]=\\\"t('delete')\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n icon=\\\"general.trash-01\\\"\\r\\n [loading]=\\\"deleting()\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onDelete($event)\\\"\\r\\n class=\\\"me-auto\\\"\\r\\n ></mt-button>\\r\\n }\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting() || deleting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n <mt-button\\r\\n [disabled]=\\\"!formControl.valid || deleting()\\\"\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n </div>\\r\\n</ng-container>\\r\\n\" }]\n }], ctorParameters: () => [], propDecorators: { sectionId: [{ type: i0.Input, args: [{ isSignal: true, alias: \"sectionId\", required: false }] }], initialData: [{ type: i0.Input, args: [{ isSignal: true, alias: \"initialData\", required: false }] }], sectionsCount: [{ type: i0.Input, args: [{ isSignal: true, alias: \"sectionsCount\", required: false }] }] } });\n\nclass FBSection {\n confirmationService = inject(ConfirmationService);\n modalService = inject(ModalService);\n translocoService = inject(TranslocoService);\n facade = inject(FormBuilderFacade);\n // Inputs\n section = input.required(...(ngDevMode ? [{ debugName: \"section\" }] : []));\n sectionsCount = input(0, ...(ngDevMode ? [{ debugName: \"sectionsCount\" }] : []));\n /** All sections - used to get available fields for condition formulas */\n allSections = input([], ...(ngDevMode ? [{ debugName: \"allSections\" }] : []));\n // Outputs - only keep drag/drop since it needs coordination with parent drop list group\n onFieldDrop = output();\n // Computed\n sectionName = computed(() => {\n const lang = document.documentElement.lang;\n const section = this.section();\n return section.name[lang] ?? section.name['en'];\n }, ...(ngDevMode ? [{ debugName: \"sectionName\" }] : []));\n fields = computed(() => this.section().fields, ...(ngDevMode ? [{ debugName: \"fields\" }] : []));\n // UI State\n expanded = signal(true, ...(ngDevMode ? [{ debugName: \"expanded\" }] : []));\n // Form groups cache for dynamic fields\n formGroupsCache = new Map();\n constructor() {\n // Cleanup stale form groups when fields change\n effect(() => {\n const currentIds = new Set(this.fields().map((f) => f.id));\n for (const id of this.formGroupsCache.keys()) {\n if (!currentIds.has(id)) {\n this.formGroupsCache.delete(id);\n }\n }\n });\n }\n getFormGroup(field) {\n let fg = this.formGroupsCache.get(field.id);\n if (fg) {\n // Check if field name changed\n if (!fg.contains(field.name)) {\n const oldKey = Object.keys(fg.controls)[0];\n const value = oldKey ? fg.get(oldKey)?.value : field.data?.data;\n fg = new FormGroup({\n [field.name]: new FormControl(value),\n });\n this.formGroupsCache.set(field.id, fg);\n }\n }\n else {\n fg = new FormGroup({\n [field.name]: new FormControl(field.data?.data),\n });\n this.formGroupsCache.set(field.id, fg);\n }\n return fg;\n }\n toggleExpanded() {\n this.expanded.update((v) => !v);\n }\n onDrop(event) {\n this.onFieldDrop.emit(event);\n }\n editSection(event) {\n event.stopPropagation();\n const section = this.section();\n this.modalService.openModal(FBSectionForm, 'drawer', {\n header: this.translocoService.translate('formBuilder.edit-section'),\n height: '20vw',\n styleClass: '!w-100 !absolute ',\n position: 'end',\n appendTo: '#page-content',\n modal: false,\n inputValues: {\n sectionId: section.id,\n initialData: section.name,\n sectionsCount: this.sectionsCount(),\n },\n });\n }\n removeField(event, field) {\n this.confirmationService.confirmDelete({\n event,\n type: 'popup',\n accept: () => {\n this.facade.deleteField(this.section().id, field.id);\n },\n });\n }\n editField(field) {\n this.modalService.openModal(FBFieldForm, 'drawer', {\n header: this.translocoService.translate('formBuilder.field-settings'),\n height: '20vw',\n styleClass: '!w-100 !absolute !shadow-none',\n position: 'end',\n modal: false,\n appendTo: '#page-content',\n inputValues: {\n initialData: field,\n sectionId: this.section().id,\n allSections: this.allSections(),\n },\n });\n }\n getFieldColSpan(field) {\n switch (field.width) {\n case '100':\n return 'col-span-12';\n case '50':\n return 'col-span-6';\n case '25':\n return 'col-span-3';\n default:\n return 'col-span-12';\n }\n }\n getFieldType(field) {\n const typeMap = {\n User: 'select',\n Text: 'text',\n LongText: 'editor-field',\n Percentage: 'slider',\n Date: 'date',\n Currency: 'text',\n Number: 'number',\n Lookup: 'select',\n LookupMultiSelect: 'select',\n Checkbox: 'toggle',\n InternalModule: 'select',\n DynamicList: 'select',\n API: 'select',\n Time: 'date',\n Status: 'select',\n Attachment: 'attachment',\n EditableListView: 'actionableTable',\n LookupLog: 'actionableTable',\n LookupMatrix: 'select',\n Location: 'select',\n };\n return typeMap[field.type] ?? 'text';\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBSection, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.0.3\", type: FBSection, isStandalone: true, selector: \"mt-fb-section\", inputs: { section: { classPropertyName: \"section\", publicName: \"section\", isSignal: true, isRequired: true, transformFunction: null }, sectionsCount: { classPropertyName: \"sectionsCount\", publicName: \"sectionsCount\", isSignal: true, isRequired: false, transformFunction: null }, allSections: { classPropertyName: \"allSections\", publicName: \"allSections\", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onFieldDrop: \"onFieldDrop\" }, ngImport: i0, template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div class=\\\"flex flex-col\\\">\\r\\n <div\\r\\n class=\\\"flex justify-between items-center bg-primary text-primary-contrast p-2 rounded-xl\\\"\\r\\n >\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"arrow.chevron-down\\\"\\r\\n class=\\\"transition-[rotate]\\\"\\r\\n [class.rotate-180]=\\\"expanded()\\\"\\r\\n (onClick)=\\\"toggleExpanded()\\\"\\r\\n ></mt-button>\\r\\n <span class=\\\"font-bold\\\">\\r\\n {{ sectionName() }}\\r\\n </span>\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.edit-02\\\"\\r\\n [tooltip]=\\\"t('edit-section')\\\"\\r\\n (onClick)=\\\"editSection($event)\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </div>\\r\\n @if (expanded()) {\\r\\n <div\\r\\n cdkDropList\\r\\n [id]=\\\"section().id\\\"\\r\\n cdkDropListOrientation=\\\"mixed\\\"\\r\\n [cdkDropListData]=\\\"fields()\\\"\\r\\n (cdkDropListDropped)=\\\"onDrop($event)\\\"\\r\\n class=\\\"grid grid-cols-12 gap-4 relative py-4\\\"\\r\\n [class.min-h-27]=\\\"fields().length === 0\\\"\\r\\n >\\r\\n @for (field of fields(); track field.id) {\\r\\n <div\\r\\n cdkDrag\\r\\n [cdkDragData]=\\\"field\\\"\\r\\n [cdkDragDisabled]=\\\"field._pending || field._deleting\\\"\\r\\n [class]=\\\"\\r\\n getFieldColSpan(field) + ' cursor-grab active:cursor-grabbing'\\r\\n \\\"\\r\\n >\\r\\n <div\\r\\n *cdkDragPlaceholder\\r\\n [class]=\\\"\\r\\n 'h-full min-h-27 bg-black/10 rounded-2xl ' +\\r\\n getFieldColSpan(field)\\r\\n \\\"\\r\\n ></div>\\r\\n @if (field._pending) {\\r\\n <!-- Skeleton for pending field -->\\r\\n <mt-card class=\\\"h-full animate-pulse\\\">\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <div class=\\\"flex-1 space-y-3\\\">\\r\\n <div class=\\\"h-4 bg-surface-200 rounded w-1/3\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"flex flex-col gap-1\\\">\\r\\n <div class=\\\"h-8 w-8 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-8 w-8 bg-surface-200 rounded\\\"></div>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n } @else {\\r\\n <mt-card\\r\\n class=\\\"h-full relative\\\"\\r\\n [class.opacity-50]=\\\"field._deleting\\\"\\r\\n >\\r\\n @if (field._deleting) {\\r\\n <div\\r\\n class=\\\"absolute inset-0 flex items-center justify-center bg-white/50 rounded-xl z-10\\\"\\r\\n >\\r\\n <div\\r\\n class=\\\"animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full\\\"\\r\\n ></div>\\r\\n </div>\\r\\n }\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <div class=\\\"flex-1\\\">\\r\\n <form [formGroup]=\\\"getFormGroup(field)\\\">\\r\\n <mt-dynamic-field\\r\\n [fieldName]=\\\"field.name\\\"\\r\\n [fieldConfig]=\\\"{\\r\\n label: field.name,\\r\\n readonly: true,\\r\\n type: getFieldType(field),\\r\\n }\\\"\\r\\n />\\r\\n </form>\\r\\n </div>\\r\\n <div class=\\\"flex flex-col gap-1\\\">\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.settings-01\\\"\\r\\n [tooltip]=\\\"t('edit-field')\\\"\\r\\n outlined\\r\\n [disabled]=\\\"field._deleting\\\"\\r\\n (onClick)=\\\"editField(field)\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.trash-01\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n [tooltip]=\\\"t('remove-field')\\\"\\r\\n [disabled]=\\\"field._deleting\\\"\\r\\n (onClick)=\\\"removeField($event, field)\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n } @empty {\\r\\n <mt-card class=\\\"absolute inset-0 top-4 h-full\\\" paddingless>\\r\\n <div class=\\\"size-full p-4\\\">\\r\\n <div\\r\\n class=\\\"flex justify-center items-center gap-4 h-full border-2 border-primary rounded-xl bg-primary-200 text-primary\\\"\\r\\n >\\r\\n <mt-icon icon=\\\"editor.move\\\" class=\\\"text-3xl\\\" />\\r\\n <span>{{ t(\\\"drag-from-the-side\\\") }}</span>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n</ng-container>\\r\\n\", dependencies: [{ kind: \"component\", type: Button, selector: \"mt-button\", inputs: [\"icon\", \"label\", \"tooltip\", \"class\", \"type\", \"styleClass\", \"severity\", \"badge\", \"variant\", \"badgeSeverity\", \"size\", \"iconPos\", \"autofocus\", \"fluid\", \"raised\", \"rounded\", \"text\", \"plain\", \"outlined\", \"link\", \"disabled\", \"loading\", \"pInputs\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }, { kind: \"component\", type: Card, selector: \"mt-card\", inputs: [\"class\", \"title\", \"paddingless\"] }, { kind: \"component\", type: Icon, selector: \"mt-icon\", inputs: [\"icon\"] }, { kind: \"directive\", type: CdkDrag, selector: \"[cdkDrag]\", inputs: [\"cdkDragData\", \"cdkDragLockAxis\", \"cdkDragRootElement\", \"cdkDragBoundary\", \"cdkDragStartDelay\", \"cdkDragFreeDragPosition\", \"cdkDragDisabled\", \"cdkDragConstrainPosition\", \"cdkDragPreviewClass\", \"cdkDragPreviewContainer\", \"cdkDragScale\"], outputs: [\"cdkDragStarted\", \"cdkDragReleased\", \"cdkDragEnded\", \"cdkDragEntered\", \"cdkDragExited\", \"cdkDragDropped\", \"cdkDragMoved\"], exportAs: [\"cdkDrag\"] }, { kind: \"directive\", type: CdkDropList, selector: \"[cdkDropList], cdk-drop-list\", inputs: [\"cdkDropListConnectedTo\", \"cdkDropListData\", \"cdkDropListOrientation\", \"id\", \"cdkDropListLockAxis\", \"cdkDropListDisabled\", \"cdkDropListSortingDisabled\", \"cdkDropListEnterPredicate\", \"cdkDropListSortPredicate\", \"cdkDropListAutoScrollDisabled\", \"cdkDropListAutoScrollStep\", \"cdkDropListElementContainer\", \"cdkDropListHasAnchor\"], outputs: [\"cdkDropListDropped\", \"cdkDropListEntered\", \"cdkDropListExited\", \"cdkDropListSorted\"], exportAs: [\"cdkDropList\"] }, { kind: \"directive\", type: CdkDragPlaceholder, selector: \"ng-template[cdkDragPlaceholder]\", inputs: [\"data\"] }, { kind: \"directive\", type: TranslocoDirective, selector: \"[transloco]\", inputs: [\"transloco\", \"translocoParams\", \"translocoScope\", \"translocoRead\", \"translocoPrefix\", \"translocoLang\", \"translocoLoadingTpl\"] }, { kind: \"component\", type: DynamicField, selector: \"mt-dynamic-field\", inputs: [\"fieldConfig\", \"fieldName\"] }, { kind: \"ngmodule\", type: ReactiveFormsModule }, { kind: \"directive\", type: i1.ɵNgNoValidate, selector: \"form:not([ngNoForm]):not([ngNativeValidate])\" }, { kind: \"directive\", type: i1.NgControlStatusGroup, selector: \"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]\" }, { kind: \"directive\", type: i1.FormGroupDirective, selector: \"[formGroup]\", inputs: [\"formGroup\"], outputs: [\"ngSubmit\"], exportAs: [\"ngForm\"] }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBSection, decorators: [{\n type: Component,\n args: [{ selector: 'mt-fb-section', standalone: true, imports: [\n Button,\n Card,\n Icon,\n CdkDrag,\n CdkDropList,\n CdkDragPlaceholder,\n TranslocoDirective,\n DynamicField,\n ReactiveFormsModule,\n ], template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div class=\\\"flex flex-col\\\">\\r\\n <div\\r\\n class=\\\"flex justify-between items-center bg-primary text-primary-contrast p-2 rounded-xl\\\"\\r\\n >\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"arrow.chevron-down\\\"\\r\\n class=\\\"transition-[rotate]\\\"\\r\\n [class.rotate-180]=\\\"expanded()\\\"\\r\\n (onClick)=\\\"toggleExpanded()\\\"\\r\\n ></mt-button>\\r\\n <span class=\\\"font-bold\\\">\\r\\n {{ sectionName() }}\\r\\n </span>\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.edit-02\\\"\\r\\n [tooltip]=\\\"t('edit-section')\\\"\\r\\n (onClick)=\\\"editSection($event)\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </div>\\r\\n @if (expanded()) {\\r\\n <div\\r\\n cdkDropList\\r\\n [id]=\\\"section().id\\\"\\r\\n cdkDropListOrientation=\\\"mixed\\\"\\r\\n [cdkDropListData]=\\\"fields()\\\"\\r\\n (cdkDropListDropped)=\\\"onDrop($event)\\\"\\r\\n class=\\\"grid grid-cols-12 gap-4 relative py-4\\\"\\r\\n [class.min-h-27]=\\\"fields().length === 0\\\"\\r\\n >\\r\\n @for (field of fields(); track field.id) {\\r\\n <div\\r\\n cdkDrag\\r\\n [cdkDragData]=\\\"field\\\"\\r\\n [cdkDragDisabled]=\\\"field._pending || field._deleting\\\"\\r\\n [class]=\\\"\\r\\n getFieldColSpan(field) + ' cursor-grab active:cursor-grabbing'\\r\\n \\\"\\r\\n >\\r\\n <div\\r\\n *cdkDragPlaceholder\\r\\n [class]=\\\"\\r\\n 'h-full min-h-27 bg-black/10 rounded-2xl ' +\\r\\n getFieldColSpan(field)\\r\\n \\\"\\r\\n ></div>\\r\\n @if (field._pending) {\\r\\n <!-- Skeleton for pending field -->\\r\\n <mt-card class=\\\"h-full animate-pulse\\\">\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <div class=\\\"flex-1 space-y-3\\\">\\r\\n <div class=\\\"h-4 bg-surface-200 rounded w-1/3\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"flex flex-col gap-1\\\">\\r\\n <div class=\\\"h-8 w-8 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-8 w-8 bg-surface-200 rounded\\\"></div>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n } @else {\\r\\n <mt-card\\r\\n class=\\\"h-full relative\\\"\\r\\n [class.opacity-50]=\\\"field._deleting\\\"\\r\\n >\\r\\n @if (field._deleting) {\\r\\n <div\\r\\n class=\\\"absolute inset-0 flex items-center justify-center bg-white/50 rounded-xl z-10\\\"\\r\\n >\\r\\n <div\\r\\n class=\\\"animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full\\\"\\r\\n ></div>\\r\\n </div>\\r\\n }\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <div class=\\\"flex-1\\\">\\r\\n <form [formGroup]=\\\"getFormGroup(field)\\\">\\r\\n <mt-dynamic-field\\r\\n [fieldName]=\\\"field.name\\\"\\r\\n [fieldConfig]=\\\"{\\r\\n label: field.name,\\r\\n readonly: true,\\r\\n type: getFieldType(field),\\r\\n }\\\"\\r\\n />\\r\\n </form>\\r\\n </div>\\r\\n <div class=\\\"flex flex-col gap-1\\\">\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.settings-01\\\"\\r\\n [tooltip]=\\\"t('edit-field')\\\"\\r\\n outlined\\r\\n [disabled]=\\\"field._deleting\\\"\\r\\n (onClick)=\\\"editField(field)\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.trash-01\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n [tooltip]=\\\"t('remove-field')\\\"\\r\\n [disabled]=\\\"field._deleting\\\"\\r\\n (onClick)=\\\"removeField($event, field)\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n } @empty {\\r\\n <mt-card class=\\\"absolute inset-0 top-4 h-full\\\" paddingless>\\r\\n <div class=\\\"size-full p-4\\\">\\r\\n <div\\r\\n class=\\\"flex justify-center items-center gap-4 h-full border-2 border-primary rounded-xl bg-primary-200 text-primary\\\"\\r\\n >\\r\\n <mt-icon icon=\\\"editor.move\\\" class=\\\"text-3xl\\\" />\\r\\n <span>{{ t(\\\"drag-from-the-side\\\") }}</span>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n</ng-container>\\r\\n\" }]\n }], ctorParameters: () => [], propDecorators: { section: [{ type: i0.Input, args: [{ isSignal: true, alias: \"section\", required: true }] }], sectionsCount: [{ type: i0.Input, args: [{ isSignal: true, alias: \"sectionsCount\", required: false }] }], allSections: [{ type: i0.Input, args: [{ isSignal: true, alias: \"allSections\", required: false }] }], onFieldDrop: [{ type: i0.Output, args: [\"onFieldDrop\"] }] } });\n\nclass FBPreviewForm {\n modalService = inject(ModalService);\n ref = inject(ModalRef);\n transloco = inject(TranslocoService);\n // Inputs\n sections = input([], ...(ngDevMode ? [{ debugName: \"sections\" }] : []));\n // Tab state\n activeTab = signal('create', ...(ngDevMode ? [{ debugName: \"activeTab\" }] : []));\n isLoading = signal(false, ...(ngDevMode ? [{ debugName: \"isLoading\" }] : []));\n tabOptions = [\n {\n label: this.transloco.translate('formBuilder.create-form'),\n value: 'create',\n },\n { label: this.transloco.translate('formBuilder.edit-form'), value: 'edit' },\n ];\n // Form control for dynamic form\n formControl = new FormControl();\n constructor() {\n // Show skeleton briefly when tab changes to force rebuild\n effect(() => {\n this.activeTab(); // Track tab changes\n this.isLoading.set(true);\n setTimeout(() => this.isLoading.set(false), 50);\n });\n }\n // Convert enriched sections to DynamicFormConfig based on active tab\n formConfig = computed(() => {\n const sections = this.sections();\n const mode = this.activeTab();\n return {\n sections: sections\n .map((section, sectionIndex) => {\n const lang = document.documentElement.lang;\n const sectionName = section.name[lang] ?? section.name['en'] ?? '';\n // Filter fields based on mode\n const visibleFields = section.fields.filter((field) => {\n if (mode === 'create') {\n return !field.hiddenInCreation;\n }\n else {\n return !field.hiddenInEditForm;\n }\n });\n return {\n key: section.id,\n label: sectionName,\n type: 'header',\n columns: 12,\n order: section.order ?? sectionIndex,\n fields: visibleFields.map((field, fieldIndex) => {\n const colSpan = this.getColSpan(field.width);\n return {\n key: `field_${field.propertyId}`,\n label: field.name,\n type: this.mapFieldType(field.type),\n colSpan,\n order: field.order ?? fieldIndex,\n placeholder: field.name,\n };\n }),\n };\n })\n .filter((section) => section.fields.length > 0), // Hide empty sections\n };\n }, ...(ngDevMode ? [{ debugName: \"formConfig\" }] : []));\n /**\n * Map property view type to dynamic form field type\n */\n mapFieldType(viewType) {\n const typeMap = {\n text: 'text',\n number: 'number',\n date: 'date',\n select: 'select',\n multiselect: 'multiselect',\n toggle: 'toggle',\n checkbox: 'checkbox',\n textarea: 'textarea',\n editor: 'editor',\n color: 'color',\n slider: 'slider',\n radio: 'radio',\n 'radio-cards': 'radio-cards',\n upload: 'upload',\n 'user-search': 'user-search',\n };\n return typeMap[viewType?.toLowerCase()] ?? 'text';\n }\n /**\n * Convert field width to colSpan\n */\n getColSpan(width) {\n const widthMap = {\n '25': 3,\n '50': 6,\n '100': 12,\n };\n return widthMap[width] ?? 12;\n }\n onClose() {\n this.ref.close();\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBPreviewForm, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.0.3\", type: FBPreviewForm, isStandalone: true, selector: \"mt-fb-preview-form\", inputs: { sections: { classPropertyName: \"sections\", publicName: \"sections\", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <!-- Tabs for Create/Edit mode -->\\r\\n <div class=\\\"flex justify-center mb-4\\\">\\r\\n <mt-tabs [options]=\\\"tabOptions\\\" [(active)]=\\\"activeTab\\\"></mt-tabs>\\r\\n </div>\\r\\n\\r\\n <div class=\\\"h-full overflow-y-auto pb-10\\\">\\r\\n @if (isLoading()) {\\r\\n <div class=\\\"space-y-4 animate-pulse\\\">\\r\\n <div class=\\\"h-6 bg-surface-200 rounded w-1/3\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded w-2/3\\\"></div>\\r\\n </div>\\r\\n } @else if (formConfig().sections.length > 0) {\\r\\n <mt-dynamic-form\\r\\n [formConfig]=\\\"formConfig()\\\"\\r\\n [formControl]=\\\"formControl\\\"\\r\\n >\\r\\n </mt-dynamic-form>\\r\\n } @else {\\r\\n <div\\r\\n class=\\\"flex justify-center items-center h-64 text-muted-color text-lg\\\"\\r\\n >\\r\\n {{ t(\\\"no-fields-visible\\\") }}\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n</ng-container>\\r\\n\", dependencies: [{ kind: \"directive\", type: TranslocoDirective, selector: \"[transloco]\", inputs: [\"transloco\", \"translocoParams\", \"translocoScope\", \"translocoRead\", \"translocoPrefix\", \"translocoLang\", \"translocoLoadingTpl\"] }, { kind: \"ngmodule\", type: ReactiveFormsModule }, { kind: \"directive\", type: i1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i1.FormControlDirective, selector: \"[formControl]\", inputs: [\"formControl\", \"disabled\", \"ngModel\"], outputs: [\"ngModelChange\"], exportAs: [\"ngForm\"] }, { kind: \"component\", type: DynamicForm, selector: \"mt-dynamic-form\", inputs: [\"formConfig\"] }, { kind: \"component\", type: Tabs, selector: \"mt-tabs\", inputs: [\"options\", \"optionLabel\", \"optionValue\", \"active\", \"size\", \"fluid\", \"disabled\"], outputs: [\"activeChange\", \"onChange\"] }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBPreviewForm, decorators: [{\n type: Component,\n args: [{ selector: 'mt-fb-preview-form', standalone: true, imports: [TranslocoDirective, ReactiveFormsModule, DynamicForm, Tabs], template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <!-- Tabs for Create/Edit mode -->\\r\\n <div class=\\\"flex justify-center mb-4\\\">\\r\\n <mt-tabs [options]=\\\"tabOptions\\\" [(active)]=\\\"activeTab\\\"></mt-tabs>\\r\\n </div>\\r\\n\\r\\n <div class=\\\"h-full overflow-y-auto pb-10\\\">\\r\\n @if (isLoading()) {\\r\\n <div class=\\\"space-y-4 animate-pulse\\\">\\r\\n <div class=\\\"h-6 bg-surface-200 rounded w-1/3\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded w-2/3\\\"></div>\\r\\n </div>\\r\\n } @else if (formConfig().sections.length > 0) {\\r\\n <mt-dynamic-form\\r\\n [formConfig]=\\\"formConfig()\\\"\\r\\n [formControl]=\\\"formControl\\\"\\r\\n >\\r\\n </mt-dynamic-form>\\r\\n } @else {\\r\\n <div\\r\\n class=\\\"flex justify-center items-center h-64 text-muted-color text-lg\\\"\\r\\n >\\r\\n {{ t(\\\"no-fields-visible\\\") }}\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n</ng-container>\\r\\n\" }]\n }], ctorParameters: () => [], propDecorators: { sections: [{ type: i0.Input, args: [{ isSignal: true, alias: \"sections\", required: false }] }] } });\n\nclass FormBuilder {\n modalService = inject(ModalService);\n confirmationService = inject(ConfirmationService);\n translocoService = inject(TranslocoService);\n facade = inject(FormBuilderFacade);\n dialogRef;\n // Inputs - only properties needed from parent\n properties = input([], ...(ngDevMode ? [{ debugName: \"properties\" }] : []));\n // Local UI state\n activeTab = signal('system', ...(ngDevMode ? [{ debugName: \"activeTab\" }] : []));\n // State from facade\n sections = this.facade.sections;\n isLoading = this.facade.isLoadingFormConfiguration;\n error = this.facade.formConfigurationError;\n // Properties map for enrichment\n propertiesMap = computed(() => {\n const map = new Map();\n for (const prop of this.properties()) {\n map.set(prop.id, prop);\n }\n return map;\n }, ...(ngDevMode ? [{ debugName: \"propertiesMap\" }] : []));\n // Enrich sections with property data for UI display\n enrichedSections = computed(() => {\n const sections = this.sections();\n const propsMap = this.propertiesMap();\n const lang = document.documentElement.lang;\n return sections.map((section) => ({\n ...section,\n fields: section.fields.map((field) => {\n const prop = propsMap.get(field.propertyId);\n const propName = prop?.name;\n const name = typeof propName === 'string'\n ? propName\n : (propName?.[lang] ??\n propName?.['en'] ??\n `Property ${field.propertyId}`);\n return {\n ...field,\n name,\n type: prop?.viewType || 'text',\n data: prop,\n };\n }),\n }));\n }, ...(ngDevMode ? [{ debugName: \"enrichedSections\" }] : []));\n // Available properties for toolbox tabs\n availableTabs = computed(() => {\n const tabs = [];\n const usedPropertyIds = new Set(this.sections().flatMap((s) => s.fields.map((f) => f.propertyId)));\n const availableProps = this.properties().filter((p) => !usedPropertyIds.has(p.id));\n const systemProps = availableProps.filter((p) => p.isSystem);\n const customProps = availableProps.filter((p) => !p.isSystem);\n if (systemProps.length > 0) {\n tabs.push({ id: 'system', title: 'System', properties: systemProps });\n }\n if (customProps.length > 0) {\n tabs.push({ id: 'custom', title: 'Custom', properties: customProps });\n }\n return tabs;\n }, ...(ngDevMode ? [{ debugName: \"availableTabs\" }] : []));\n constructor() {\n // Update active tab when tabs change\n effect(() => {\n const tabs = this.availableTabs();\n const currentTab = this.activeTab();\n if (tabs.length > 0 && !tabs.some((t) => t.id === currentTab)) {\n this.activeTab.set(tabs[0].id);\n }\n });\n }\n drop(event) {\n const targetSectionId = event.container.id;\n if (event.previousContainer === event.container) {\n // Reordering within the same section\n const field = event.item.data;\n // Update the field order via API\n this.facade.updateField(targetSectionId, field.id, {\n order: event.currentIndex,\n });\n }\n else if (event.previousContainer.id.startsWith('toolbox-')) {\n // Adding from toolbox\n const propertyItem = event.item.data;\n this.facade.addField(targetSectionId, {\n propertyId: propertyItem.id,\n width: '100',\n order: event.currentIndex,\n hiddenInCreation: false,\n });\n }\n else {\n // Moving between sections\n const sourceSectionId = event.previousContainer.id;\n const field = event.item.data;\n this.facade.moveField(sourceSectionId, field.id, {\n targetSectionId,\n order: event.currentIndex,\n });\n }\n }\n addSection() {\n this.dialogRef = this.modalService.openModal(FBSectionForm, 'drawer', {\n header: this.translocoService.translate('formBuilder.add-section'),\n height: '20vw',\n styleClass: '!w-100 !absolute ',\n position: 'end',\n appendTo: '#page-content',\n modal: true,\n inputValues: {\n sectionsCount: this.sections().length,\n },\n });\n }\n openPreview() {\n this.dialogRef = this.modalService.openModal(FBPreviewForm, 'drawer', {\n header: this.translocoService.translate('formBuilder.preview'),\n styleClass: '!w-[80vw] ',\n position: 'end',\n modal: true,\n inputValues: {\n sections: this.enrichedSections(),\n },\n });\n }\n resetFormConfiguration() {\n this.confirmationService.confirm({\n type: 'dialog',\n acceptButtonStyleClass: 'p-button-danger',\n accept: () => {\n this.facade.resetFormConfiguration();\n },\n });\n }\n noReturnPredicate = () => false;\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.0.3\", type: FormBuilder, isStandalone: true, selector: \"mt-form-builder\", inputs: { properties: { classPropertyName: \"properties\", publicName: \"properties\", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div class=\\\"flex gap-4 h-full w-full overflow-hidden\\\" cdkDropListGroup>\\r\\n @if (properties().length > 0) {\\r\\n <mt-card\\r\\n class=\\\"z-1 w-1/5 min-w-xs shrink-0 h-full flex flex-col overflow-hidden\\\"\\r\\n >\\r\\n <ng-template #headless>\\r\\n <!-- Header -->\\r\\n <div class=\\\"flex items-center justify-between px-4 pt-5\\\">\\r\\n <h3 class=\\\"text-xl font-semibold\\\">{{ t(\\\"form-elements\\\") }}</h3>\\r\\n </div>\\r\\n\\r\\n <!-- Tabs using PrimeNG -->\\r\\n <p-tabs\\r\\n [(value)]=\\\"activeTab\\\"\\r\\n styleClass=\\\"structure-tabs\\\"\\r\\n class=\\\"flex flex-1 flex-col min-h-0\\\"\\r\\n >\\r\\n <p-tablist class=\\\"shrink-0\\\">\\r\\n @for (tab of availableTabs(); track tab.id) {\\r\\n <p-tab [value]=\\\"tab.id\\\">{{ tab.title | titlecase }}</p-tab>\\r\\n }\\r\\n </p-tablist>\\r\\n <p-tabpanels class=\\\"!bg-transparent !p-0 flex-1 overflow-hidden\\\">\\r\\n @for (tab of availableTabs(); track tab.id) {\\r\\n <p-tabpanel [value]=\\\"tab.id\\\" class=\\\"h-full\\\">\\r\\n <!-- Node List -->\\r\\n <div\\r\\n class=\\\"space-y-1 p-4 [&_.cdk-drag-placeholder]:hidden h-full overflow-y-auto\\\"\\r\\n [id]=\\\"'toolbox-' + tab.id\\\"\\r\\n cdkDropList\\r\\n cdkDropListSortingDisabled\\r\\n [cdkDropListData]=\\\"tab.properties\\\"\\r\\n [cdkDropListEnterPredicate]=\\\"noReturnPredicate\\\"\\r\\n >\\r\\n @for (node of tab.properties; track $index) {\\r\\n <div\\r\\n cdkDrag\\r\\n [cdkDragData]=\\\"node\\\"\\r\\n class=\\\"group cursor-move select-none relative flex items-center gap-3 py-3 px-4 rounded-lg border border-dashed border-surface-300 hover:border-solid hover:bg-emphasis dark:border-surface-500 transition-colors\\\"\\r\\n >\\r\\n <div\\r\\n *cdkDragPlaceholder\\r\\n class=\\\"col-span-12 min-h-27 w-full rounded-2xl bg-black/10 z-1\\\"\\r\\n ></div>\\r\\n <span class=\\\"flex-1 text-base font-medium\\\">{{\\r\\n node.name\\r\\n }}</span>\\r\\n </div>\\r\\n }\\r\\n\\r\\n @if (tab.properties.length === 0) {\\r\\n <div class=\\\"py-8 text-center text-muted-color\\\">\\r\\n <p class=\\\"text-sm\\\">\\r\\n All {{ tab.title }} items are in use\\r\\n </p>\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </p-tabpanel>\\r\\n }\\r\\n </p-tabpanels>\\r\\n </p-tabs>\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n }\\r\\n\\r\\n <!-- Main Canvas Area -->\\r\\n <div class=\\\"flex flex-col gap-4 flex-1 w-full h-full overflow-y-auto\\\">\\r\\n <mt-card>\\r\\n <ng-template #headless>\\r\\n <div class=\\\"p-4 flex items-center gap-2\\\">\\r\\n <mt-button\\r\\n icon=\\\"layout.layout-top\\\"\\r\\n [label]=\\\"t('add-section')\\\"\\r\\n (onClick)=\\\"addSection()\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n icon=\\\"general.eye\\\"\\r\\n [label]=\\\"t('preview')\\\"\\r\\n (onClick)=\\\"openPreview()\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n icon=\\\"finance.credit-card-plus\\\"\\r\\n [label]=\\\"t('reset')\\\"\\r\\n (onClick)=\\\"resetFormConfiguration()\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n @for (section of enrichedSections(); track section.id) {\\r\\n <mt-fb-section\\r\\n [section]=\\\"section\\\"\\r\\n [sectionsCount]=\\\"enrichedSections().length\\\"\\r\\n [allSections]=\\\"enrichedSections()\\\"\\r\\n (onFieldDrop)=\\\"drop($event)\\\"\\r\\n >\\r\\n </mt-fb-section>\\r\\n } @empty {\\r\\n <mt-card>\\r\\n <div class=\\\"h-27 p-4\\\">\\r\\n <div\\r\\n class=\\\"flex justify-center items-center gap-4 h-full border-2 border-primary rounded-xl bg-primary-200 text-primary\\\"\\r\\n >\\r\\n <span>{{ t(\\\"no-section\\\") }}</span>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n</ng-container>\\r\\n\", styles: [\".cdk-drag{cursor:grab}.cdk-drag:active,.cdk-drag-preview{cursor:grabbing}.cdk-drag-placeholder{opacity:.5}.cdk-drop-list-dragging .cdk-drag{cursor:grabbing}\\n\"], dependencies: [{ kind: \"ngmodule\", type: CommonModule }, { kind: \"ngmodule\", type: FormsModule }, { kind: \"ngmodule\", type: TabsModule }, { kind: \"component\", type: i1$1.Tabs, selector: \"p-tabs\", inputs: [\"value\", \"scrollable\", \"lazy\", \"selectOnFocus\", \"showNavigators\", \"tabindex\"], outputs: [\"valueChange\"] }, { kind: \"component\", type: i1$1.TabPanels, selector: \"p-tabpanels\" }, { kind: \"component\", type: i1$1.TabPanel, selector: \"p-tabpanel\", inputs: [\"lazy\", \"value\"], outputs: [\"valueChange\"] }, { kind: \"component\", type: i1$1.TabList, selector: \"p-tablist\" }, { kind: \"component\", type: i1$1.Tab, selector: \"p-tab\", inputs: [\"value\", \"disabled\"], outputs: [\"valueChange\"] }, { kind: \"component\", type: Button, selector: \"mt-button\", inputs: [\"icon\", \"label\", \"tooltip\", \"class\", \"type\", \"styleClass\", \"severity\", \"badge\", \"variant\", \"badgeSeverity\", \"size\", \"iconPos\", \"autofocus\", \"fluid\", \"raised\", \"rounded\", \"text\", \"plain\", \"outlined\", \"link\", \"disabled\", \"loading\", \"pInputs\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }, { kind: \"component\", type: Card, selector: \"mt-card\", inputs: [\"class\", \"title\", \"paddingless\"] }, { kind: \"directive\", type: TranslocoDirective, selector: \"[transloco]\", inputs: [\"transloco\", \"translocoParams\", \"translocoScope\", \"translocoRead\", \"translocoPrefix\", \"translocoLang\", \"translocoLoadingTpl\"] }, { kind: \"component\", type: FBSection, selector: \"mt-fb-section\", inputs: [\"section\", \"sectionsCount\", \"allSections\"], outputs: [\"onFieldDrop\"] }, { kind: \"ngmodule\", type: DragDropModule }, { kind: \"directive\", type: i2.CdkDropList, selector: \"[cdkDropList], cdk-drop-list\", inputs: [\"cdkDropListConnectedTo\", \"cdkDropListData\", \"cdkDropListOrientation\", \"id\", \"cdkDropListLockAxis\", \"cdkDropListDisabled\", \"cdkDropListSortingDisabled\", \"cdkDropListEnterPredicate\", \"cdkDropListSortPredicate\", \"cdkDropListAutoScrollDisabled\", \"cdkDropListAutoScrollStep\", \"cdkDropListElementContainer\", \"cdkDropListHasAnchor\"], outputs: [\"cdkDropListDropped\", \"cdkDropListEntered\", \"cdkDropListExited\", \"cdkDropListSorted\"], exportAs: [\"cdkDropList\"] }, { kind: \"directive\", type: i2.CdkDropListGroup, selector: \"[cdkDropListGroup]\", inputs: [\"cdkDropListGroupDisabled\"], exportAs: [\"cdkDropListGroup\"] }, { kind: \"directive\", type: i2.CdkDrag, selector: \"[cdkDrag]\", inputs: [\"cdkDragData\", \"cdkDragLockAxis\", \"cdkDragRootElement\", \"cdkDragBoundary\", \"cdkDragStartDelay\", \"cdkDragFreeDragPosition\", \"cdkDragDisabled\", \"cdkDragConstrainPosition\", \"cdkDragPreviewClass\", \"cdkDragPreviewContainer\", \"cdkDragScale\"], outputs: [\"cdkDragStarted\", \"cdkDragReleased\", \"cdkDragEnded\", \"cdkDragEntered\", \"cdkDragExited\", \"cdkDragDropped\", \"cdkDragMoved\"], exportAs: [\"cdkDrag\"] }, { kind: \"directive\", type: i2.CdkDragPlaceholder, selector: \"ng-template[cdkDragPlaceholder]\", inputs: [\"data\"] }, { kind: \"pipe\", type: i3.TitleCasePipe, name: \"titlecase\" }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilder, decorators: [{\n type: Component,\n args: [{ selector: 'mt-form-builder', standalone: true, imports: [\n CommonModule,\n FormsModule,\n TabsModule,\n Button,\n Card,\n TranslocoDirective,\n FBSection,\n DragDropModule,\n ], template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div class=\\\"flex gap-4 h-full w-full overflow-hidden\\\" cdkDropListGroup>\\r\\n @if (properties().length > 0) {\\r\\n <mt-card\\r\\n class=\\\"z-1 w-1/5 min-w-xs shrink-0 h-full flex flex-col overflow-hidden\\\"\\r\\n >\\r\\n <ng-template #headless>\\r\\n <!-- Header -->\\r\\n <div class=\\\"flex items-center justify-between px-4 pt-5\\\">\\r\\n <h3 class=\\\"text-xl font-semibold\\\">{{ t(\\\"form-elements\\\") }}</h3>\\r\\n </div>\\r\\n\\r\\n <!-- Tabs using PrimeNG -->\\r\\n <p-tabs\\r\\n [(value)]=\\\"activeTab\\\"\\r\\n styleClass=\\\"structure-tabs\\\"\\r\\n class=\\\"flex flex-1 flex-col min-h-0\\\"\\r\\n >\\r\\n <p-tablist class=\\\"shrink-0\\\">\\r\\n @for (tab of availableTabs(); track tab.id) {\\r\\n <p-tab [value]=\\\"tab.id\\\">{{ tab.title | titlecase }}</p-tab>\\r\\n }\\r\\n </p-tablist>\\r\\n <p-tabpanels class=\\\"!bg-transparent !p-0 flex-1 overflow-hidden\\\">\\r\\n @for (tab of availableTabs(); track tab.id) {\\r\\n <p-tabpanel [value]=\\\"tab.id\\\" class=\\\"h-full\\\">\\r\\n <!-- Node List -->\\r\\n <div\\r\\n class=\\\"space-y-1 p-4 [&_.cdk-drag-placeholder]:hidden h-full overflow-y-auto\\\"\\r\\n [id]=\\\"'toolbox-' + tab.id\\\"\\r\\n cdkDropList\\r\\n cdkDropListSortingDisabled\\r\\n [cdkDropListData]=\\\"tab.properties\\\"\\r\\n [cdkDropListEnterPredicate]=\\\"noReturnPredicate\\\"\\r\\n >\\r\\n @for (node of tab.properties; track $index) {\\r\\n <div\\r\\n cdkDrag\\r\\n [cdkDragData]=\\\"node\\\"\\r\\n class=\\\"group cursor-move select-none relative flex items-center gap-3 py-3 px-4 rounded-lg border border-dashed border-surface-300 hover:border-solid hover:bg-emphasis dark:border-surface-500 transition-colors\\\"\\r\\n >\\r\\n <div\\r\\n *cdkDragPlaceholder\\r\\n class=\\\"col-span-12 min-h-27 w-full rounded-2xl bg-black/10 z-1\\\"\\r\\n ></div>\\r\\n <span class=\\\"flex-1 text-base font-medium\\\">{{\\r\\n node.name\\r\\n }}</span>\\r\\n </div>\\r\\n }\\r\\n\\r\\n @if (tab.properties.length === 0) {\\r\\n <div class=\\\"py-8 text-center text-muted-color\\\">\\r\\n <p class=\\\"text-sm\\\">\\r\\n All {{ tab.title }} items are in use\\r\\n </p>\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </p-tabpanel>\\r\\n }\\r\\n </p-tabpanels>\\r\\n </p-tabs>\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n }\\r\\n\\r\\n <!-- Main Canvas Area -->\\r\\n <div class=\\\"flex flex-col gap-4 flex-1 w-full h-full overflow-y-auto\\\">\\r\\n <mt-card>\\r\\n <ng-template #headless>\\r\\n <div class=\\\"p-4 flex items-center gap-2\\\">\\r\\n <mt-button\\r\\n icon=\\\"layout.layout-top\\\"\\r\\n [label]=\\\"t('add-section')\\\"\\r\\n (onClick)=\\\"addSection()\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n icon=\\\"general.eye\\\"\\r\\n [label]=\\\"t('preview')\\\"\\r\\n (onClick)=\\\"openPreview()\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n icon=\\\"finance.credit-card-plus\\\"\\r\\n [label]=\\\"t('reset')\\\"\\r\\n (onClick)=\\\"resetFormConfiguration()\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n @for (section of enrichedSections(); track section.id) {\\r\\n <mt-fb-section\\r\\n [section]=\\\"section\\\"\\r\\n [sectionsCount]=\\\"enrichedSections().length\\\"\\r\\n [allSections]=\\\"enrichedSections()\\\"\\r\\n (onFieldDrop)=\\\"drop($event)\\\"\\r\\n >\\r\\n </mt-fb-section>\\r\\n } @empty {\\r\\n <mt-card>\\r\\n <div class=\\\"h-27 p-4\\\">\\r\\n <div\\r\\n class=\\\"flex justify-center items-center gap-4 h-full border-2 border-primary rounded-xl bg-primary-200 text-primary\\\"\\r\\n >\\r\\n <span>{{ t(\\\"no-section\\\") }}</span>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n</ng-container>\\r\\n\", styles: [\".cdk-drag{cursor:grab}.cdk-drag:active,.cdk-drag-preview{cursor:grabbing}.cdk-drag-placeholder{opacity:.5}.cdk-drop-list-dragging .cdk-drag{cursor:grabbing}\\n\"] }]\n }], ctorParameters: () => [], propDecorators: { properties: [{ type: i0.Input, args: [{ isSignal: true, alias: \"properties\", required: false }] }] } });\n\n/*\n * Public API Surface of form-builder\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AddField, AddSection, DeleteField, DeleteSection, FormBuilder, FormBuilderActionKey, FormBuilderFacade, FormBuilderState, GetFormConfiguration, MoveField, ResetFormBuilderState, ResetFormConfiguration, SetModuleInfo, UpdateField, UpdateSection };\n//# sourceMappingURL=masterteam-form-builder.mjs.map\n","map":null,"preliminaryFileName":"masterteam-form-builder.mjs","sourcemapFileName":"masterteam-form-builder.mjs.map"},{"fileName":"masterteam-form-builder.mjs.map","names":[],"needsCodeReference":false,"originalFileName":null,"originalFileNames":[],"source":"{\"version\":3,\"file\":\"masterteam-form-builder.mjs\",\"sources\":[\"../../../../packages/masterteam/form-builder/src/store/form-builder/form-builder.actions.ts\",\"../../../../packages/masterteam/form-builder/src/store/form-builder/form-builder.model.ts\",\"../../../../packages/masterteam/form-builder/src/store/form-builder/form-builder.state.ts\",\"../../../../packages/masterteam/form-builder/src/store/form-builder/form-builder.facade.ts\",\"../../../../packages/masterteam/form-builder/src/lib/fb-field-conditions/condition-constants.ts\",\"../../../../packages/masterteam/form-builder/src/lib/fb-field-conditions/fb-field-conditions.ts\",\"../../../../packages/masterteam/form-builder/src/lib/fb-field-conditions/fb-field-conditions.html\",\"../../../../packages/masterteam/form-builder/src/lib/fb-field-form/fb-field-form.ts\",\"../../../../packages/masterteam/form-builder/src/lib/fb-field-form/fb-field-form.html\",\"../../../../packages/masterteam/form-builder/src/lib/fb-section-form/fb-section-form.ts\",\"../../../../packages/masterteam/form-builder/src/lib/fb-section-form/fb-section-form.html\",\"../../../../packages/masterteam/form-builder/src/lib/fb-section/fb-section.ts\",\"../../../../packages/masterteam/form-builder/src/lib/fb-section/fb-section.html\",\"../../../../packages/masterteam/form-builder/src/lib/fb-preview-form/fb-preview-form.ts\",\"../../../../packages/masterteam/form-builder/src/lib/fb-preview-form/fb-preview-form.html\",\"../../../../packages/masterteam/form-builder/src/lib/form-builder.ts\",\"../../../../packages/masterteam/form-builder/src/lib/form-builder.html\",\"../../../../packages/masterteam/form-builder/src/public-api.ts\",\"../../../../packages/masterteam/form-builder/src/masterteam-form-builder.ts\"],\"sourcesContent\":[\"import type {\\r\\n AddFieldPayload,\\r\\n AddSectionPayload,\\r\\n MoveFieldPayload,\\r\\n UpdateFieldPayload,\\r\\n UpdateSectionPayload,\\r\\n} from './form-builder.model';\\r\\n\\r\\n// ============================================================================\\r\\n// Module Configuration Actions\\r\\n// ============================================================================\\r\\n\\r\\nexport class SetModuleInfo {\\r\\n static readonly type = '[FormBuilder] Set Module Info';\\r\\n constructor(\\r\\n public moduleType: string,\\r\\n public moduleId: string | number,\\r\\n public parentModuleType?: string,\\r\\n public parentModuleId?: string | number,\\r\\n public parentPath?: string,\\r\\n ) {}\\r\\n}\\r\\n\\r\\nexport class ResetFormBuilderState {\\r\\n static readonly type = '[FormBuilder] Reset State';\\r\\n}\\r\\n\\r\\n// ============================================================================\\r\\n// Form Configuration Actions\\r\\n// ============================================================================\\r\\n\\r\\nexport class GetFormConfiguration {\\r\\n static readonly type = '[FormBuilder] Get Form Configuration';\\r\\n}\\r\\n\\r\\nexport class ResetFormConfiguration {\\r\\n static readonly type = '[FormBuilder] Reset Form Configuration';\\r\\n}\\r\\n\\r\\n// ============================================================================\\r\\n// Section Actions\\r\\n// ============================================================================\\r\\n\\r\\nexport class AddSection {\\r\\n static readonly type = '[FormBuilder] Add Section';\\r\\n constructor(public payload: AddSectionPayload) {}\\r\\n}\\r\\n\\r\\nexport class UpdateSection {\\r\\n static readonly type = '[FormBuilder] Update Section';\\r\\n constructor(\\r\\n public sectionId: string,\\r\\n public payload: UpdateSectionPayload,\\r\\n ) {}\\r\\n}\\r\\n\\r\\nexport class DeleteSection {\\r\\n static readonly type = '[FormBuilder] Delete Section';\\r\\n constructor(public sectionId: string) {}\\r\\n}\\r\\n\\r\\n// ============================================================================\\r\\n// Field Actions\\r\\n// ============================================================================\\r\\n\\r\\nexport class AddField {\\r\\n static readonly type = '[FormBuilder] Add Field';\\r\\n constructor(\\r\\n public sectionId: string,\\r\\n public payload: AddFieldPayload,\\r\\n ) {}\\r\\n}\\r\\n\\r\\nexport class UpdateField {\\r\\n static readonly type = '[FormBuilder] Update Field';\\r\\n constructor(\\r\\n public sectionId: string,\\r\\n public fieldId: string,\\r\\n public payload: UpdateFieldPayload,\\r\\n ) {}\\r\\n}\\r\\n\\r\\nexport class DeleteField {\\r\\n static readonly type = '[FormBuilder] Delete Field';\\r\\n constructor(\\r\\n public sectionId: string,\\r\\n public fieldId: string,\\r\\n ) {}\\r\\n}\\r\\n\\r\\nexport class MoveField {\\r\\n static readonly type = '[FormBuilder] Move Field';\\r\\n constructor(\\r\\n public sectionId: string,\\r\\n public fieldId: string,\\r\\n public payload: MoveFieldPayload,\\r\\n ) {}\\r\\n}\\r\\n\",\"import type { LoadingStateShape } from '@masterteam/components';\\r\\n\\r\\n// ============================================================================\\r\\n// Action Keys Enum\\r\\n// ============================================================================\\r\\nexport enum FormBuilderActionKey {\\r\\n // Form Configuration\\r\\n GetFormConfiguration = 'getFormConfiguration',\\r\\n ResetFormConfiguration = 'resetFormConfiguration',\\r\\n\\r\\n // Section CRUD\\r\\n AddSection = 'addSection',\\r\\n UpdateSection = 'updateSection',\\r\\n DeleteSection = 'deleteSection',\\r\\n\\r\\n // Field CRUD\\r\\n AddField = 'addField',\\r\\n UpdateField = 'updateField',\\r\\n DeleteField = 'deleteField',\\r\\n MoveField = 'moveField',\\r\\n}\\r\\n\\r\\n// ============================================================================\\r\\n// API Models\\r\\n// ============================================================================\\r\\n\\r\\nexport type FieldWidth = '25' | '50' | '100';\\r\\n\\r\\nexport interface FormField {\\r\\n id: string;\\r\\n sectionId: string;\\r\\n propertyId: number;\\r\\n width: FieldWidth;\\r\\n order: number;\\r\\n hiddenInCreation?: boolean;\\r\\n hiddenInEditForm?: boolean;\\r\\n isRequired?: boolean;\\r\\n showConditionalDisplayFormula?: boolean;\\r\\n conditionalDisplayFormula?: string;\\r\\n _pending?: boolean; // Optimistic: field is being added\\r\\n _deleting?: boolean; // Optimistic: field is being deleted\\r\\n}\\r\\n\\r\\nexport interface FormSection {\\r\\n id: string;\\r\\n name: {\\r\\n en: string;\\r\\n ar: string;\\r\\n };\\r\\n order: number;\\r\\n fields: FormField[];\\r\\n}\\r\\n\\r\\nexport interface FormConfiguration {\\r\\n isActive: boolean;\\r\\n sections: FormSection[];\\r\\n}\\r\\n\\r\\n// ============================================================================\\r\\n// Request Payloads\\r\\n// ============================================================================\\r\\n\\r\\nexport interface AddSectionPayload {\\r\\n name: { en: string; ar: string };\\r\\n order?: number;\\r\\n}\\r\\n\\r\\nexport interface UpdateSectionPayload {\\r\\n name?: { en: string; ar: string };\\r\\n order?: number;\\r\\n}\\r\\n\\r\\nexport interface AddFieldPayload {\\r\\n propertyId: number;\\r\\n width: FieldWidth;\\r\\n order?: number;\\r\\n hiddenInCreation?: boolean;\\r\\n hiddenInEditForm?: boolean;\\r\\n isRequired?: boolean;\\r\\n showConditionalDisplayFormula?: boolean;\\r\\n conditionalDisplayFormula?: string;\\r\\n}\\r\\n\\r\\nexport interface UpdateFieldPayload {\\r\\n width?: FieldWidth;\\r\\n order?: number;\\r\\n hiddenInCreation?: boolean;\\r\\n hiddenInEditForm?: boolean;\\r\\n isRequired?: boolean;\\r\\n showConditionalDisplayFormula?: boolean;\\r\\n conditionalDisplayFormula?: string | null;\\r\\n}\\r\\n\\r\\nexport interface MoveFieldPayload {\\r\\n targetSectionId: string;\\r\\n order?: number;\\r\\n}\\r\\n\\r\\n// ============================================================================\\r\\n// State Model\\r\\n// ============================================================================\\r\\nexport interface FormBuilderStateModel extends LoadingStateShape<FormBuilderActionKey> {\\r\\n // Module configuration\\r\\n moduleType: string | null;\\r\\n moduleId: string | number | null;\\r\\n parentModuleType: string | null;\\r\\n parentModuleId: string | number | null;\\r\\n parentPath: string;\\r\\n\\r\\n // Form data\\r\\n formConfiguration: FormConfiguration | null;\\r\\n}\\r\\n\",\"import { HttpClient } from '@angular/common/http';\\r\\nimport { inject, Injectable } from '@angular/core';\\r\\nimport { Action, Selector, State, StateContext } from '@ngxs/store';\\r\\nimport { CrudStateBase, handleApiRequest ,Response} from '@masterteam/components';\\r\\n\\r\\nimport {\\r\\n FormBuilderActionKey,\\r\\n FormBuilderStateModel,\\r\\n FormConfiguration,\\r\\n FormField,\\r\\n FormSection,\\r\\n} from './form-builder.model';\\r\\nimport {\\r\\n AddField,\\r\\n AddSection,\\r\\n DeleteField,\\r\\n DeleteSection,\\r\\n GetFormConfiguration,\\r\\n MoveField,\\r\\n ResetFormBuilderState,\\r\\n ResetFormConfiguration,\\r\\n SetModuleInfo,\\r\\n UpdateField,\\r\\n UpdateSection,\\r\\n} from './form-builder.actions';\\r\\n\\r\\n// Default State\\r\\nconst DEFAULT_STATE: FormBuilderStateModel = {\\r\\n // Module configuration\\r\\n moduleType: null,\\r\\n moduleId: null,\\r\\n parentModuleType: null,\\r\\n parentModuleId: null,\\r\\n parentPath: '',\\r\\n\\r\\n // Form data\\r\\n formConfiguration: null,\\r\\n\\r\\n // Loading state (from LoadingStateShape)\\r\\n loadingActive: [],\\r\\n errors: {},\\r\\n};\\r\\n\\r\\n@State<FormBuilderStateModel>({\\r\\n name: 'formBuilder',\\r\\n defaults: DEFAULT_STATE,\\r\\n})\\r\\n@Injectable()\\r\\nexport class FormBuilderState extends CrudStateBase<\\r\\n FormSection,\\r\\n FormBuilderStateModel,\\r\\n FormBuilderActionKey\\r\\n> {\\r\\n private http = inject(HttpClient);\\r\\n private baseUrl = 'formConfigurations';\\r\\n\\r\\n // ============================================================================\\r\\n // Helpers\\r\\n // ============================================================================\\r\\n\\r\\n private getApiPath(state: FormBuilderStateModel): string {\\r\\n const { parentPath, moduleType, moduleId } = state;\\r\\n return `${this.baseUrl}${parentPath}/${moduleType}/${moduleId}`;\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // Selectors\\r\\n // ============================================================================\\r\\n\\r\\n @Selector()\\r\\n static getState(state: FormBuilderStateModel): FormBuilderStateModel {\\r\\n return state ?? DEFAULT_STATE;\\r\\n }\\r\\n\\r\\n @Selector()\\r\\n static getFormConfiguration(\\r\\n state: FormBuilderStateModel,\\r\\n ): FormConfiguration | null {\\r\\n return state?.formConfiguration ?? null;\\r\\n }\\r\\n\\r\\n @Selector()\\r\\n static getSections(state: FormBuilderStateModel): FormSection[] {\\r\\n return state?.formConfiguration?.sections ?? [];\\r\\n }\\r\\n\\r\\n @Selector()\\r\\n static getModuleType(state: FormBuilderStateModel): string | null {\\r\\n return state?.moduleType ?? null;\\r\\n }\\r\\n\\r\\n @Selector()\\r\\n static getModuleId(state: FormBuilderStateModel): string | number | null {\\r\\n return state?.moduleId ?? null;\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // Module Configuration Actions\\r\\n // ============================================================================\\r\\n\\r\\n @Action(SetModuleInfo)\\r\\n setModuleInfo(\\r\\n ctx: StateContext<FormBuilderStateModel>,\\r\\n action: SetModuleInfo,\\r\\n ) {\\r\\n let parentPath = '';\\r\\n if (action.parentModuleType && action.parentModuleId) {\\r\\n parentPath = `/${action.parentModuleType}/${action.parentModuleId}`;\\r\\n } else if (action.parentPath) {\\r\\n parentPath = action.parentPath;\\r\\n }\\r\\n ctx.patchState({\\r\\n moduleType: action.moduleType,\\r\\n moduleId: action.moduleId,\\r\\n parentModuleType: action.parentModuleType ?? null,\\r\\n parentModuleId: action.parentModuleId ?? null,\\r\\n parentPath: parentPath ?? '',\\r\\n });\\r\\n }\\r\\n\\r\\n @Action(ResetFormBuilderState)\\r\\n resetState(ctx: StateContext<FormBuilderStateModel>) {\\r\\n ctx.setState(DEFAULT_STATE);\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // Form Configuration Actions\\r\\n // ============================================================================\\r\\n\\r\\n @Action(GetFormConfiguration)\\r\\n getFormConfiguration(ctx: StateContext<FormBuilderStateModel>) {\\r\\n const state = ctx.getState();\\r\\n const apiPath = this.getApiPath(state);\\r\\n const req$ = this.http.get<Response<FormConfiguration>>(apiPath);\\r\\n\\r\\n return this.load(ctx, {\\r\\n key: FormBuilderActionKey.GetFormConfiguration,\\r\\n request$: req$,\\r\\n updateState: (_state, data) => ({\\r\\n formConfiguration: data ?? null,\\r\\n }),\\r\\n });\\r\\n }\\r\\n\\r\\n @Action(ResetFormConfiguration)\\r\\n resetFormConfiguration(ctx: StateContext<FormBuilderStateModel>) {\\r\\n const state = ctx.getState();\\r\\n const apiPath = `${this.getApiPath(state)}/reset`;\\r\\n const req$ = this.http.delete<Response<FormConfiguration>>(apiPath);\\r\\n\\r\\n return handleApiRequest({\\r\\n ctx,\\r\\n key: FormBuilderActionKey.ResetFormConfiguration,\\r\\n request$: req$,\\r\\n onSuccess: (res, _currentState) => ({\\r\\n formConfiguration: res.data ?? null,\\r\\n }),\\r\\n });\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // Section Actions\\r\\n // ============================================================================\\r\\n\\r\\n @Action(AddSection)\\r\\n addSection(ctx: StateContext<FormBuilderStateModel>, action: AddSection) {\\r\\n const state = ctx.getState();\\r\\n const apiPath = `${this.getApiPath(state)}/sections`;\\r\\n const req$ = this.http.post<Response<FormSection>>(apiPath, action.payload);\\r\\n\\r\\n return handleApiRequest({\\r\\n ctx,\\r\\n key: FormBuilderActionKey.AddSection,\\r\\n request$: req$,\\r\\n onSuccess: (res, currentState) => {\\r\\n const sections = this.adapter.addOne(\\r\\n currentState.formConfiguration?.sections ?? [],\\r\\n res.data,\\r\\n );\\r\\n return {\\r\\n formConfiguration: {\\r\\n ...currentState.formConfiguration!,\\r\\n sections,\\r\\n },\\r\\n };\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n @Action(UpdateSection)\\r\\n updateSection(\\r\\n ctx: StateContext<FormBuilderStateModel>,\\r\\n action: UpdateSection,\\r\\n ) {\\r\\n const state = ctx.getState();\\r\\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}`;\\r\\n const req$ = this.http.put<Response<FormSection>>(apiPath, action.payload);\\r\\n\\r\\n return handleApiRequest({\\r\\n ctx,\\r\\n key: FormBuilderActionKey.UpdateSection,\\r\\n request$: req$,\\r\\n onSuccess: (res, currentState) => {\\r\\n const sections = this.adapter.upsertOne(\\r\\n currentState.formConfiguration?.sections ?? [],\\r\\n res.data,\\r\\n 'id',\\r\\n );\\r\\n return {\\r\\n formConfiguration: {\\r\\n ...currentState.formConfiguration!,\\r\\n sections,\\r\\n },\\r\\n };\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n @Action(DeleteSection)\\r\\n deleteSection(\\r\\n ctx: StateContext<FormBuilderStateModel>,\\r\\n action: DeleteSection,\\r\\n ) {\\r\\n const state = ctx.getState();\\r\\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}`;\\r\\n const req$ = this.http.delete<Response<{ id: string }>>(apiPath);\\r\\n\\r\\n return handleApiRequest({\\r\\n ctx,\\r\\n key: FormBuilderActionKey.DeleteSection,\\r\\n request$: req$,\\r\\n onSuccess: (res, currentState) => {\\r\\n const sections = this.adapter.removeOne(\\r\\n currentState.formConfiguration?.sections ?? [],\\r\\n res.data.id,\\r\\n 'id',\\r\\n );\\r\\n return {\\r\\n formConfiguration: {\\r\\n ...currentState.formConfiguration!,\\r\\n sections,\\r\\n },\\r\\n };\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // Field Actions\\r\\n // ============================================================================\\r\\n\\r\\n @Action(AddField)\\r\\n addField(ctx: StateContext<FormBuilderStateModel>, action: AddField) {\\r\\n const state = ctx.getState();\\r\\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields`;\\r\\n const req$ = this.http.post<Response<FormField>>(apiPath, action.payload);\\r\\n\\r\\n // Generate temp ID for optimistic update\\r\\n const tempId = `temp_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;\\r\\n const tempField: FormField = {\\r\\n id: tempId,\\r\\n sectionId: action.sectionId,\\r\\n propertyId: action.payload.propertyId,\\r\\n width: action.payload.width,\\r\\n order: action.payload.order ?? 0,\\r\\n hiddenInCreation: action.payload.hiddenInCreation,\\r\\n _pending: true,\\r\\n };\\r\\n\\r\\n // Optimistically add the temp field\\r\\n const sectionsWithTemp = (state.formConfiguration?.sections ?? []).map(\\r\\n (section) => {\\r\\n if (section.id === action.sectionId) {\\r\\n const fields = [...section.fields];\\r\\n const insertIndex = action.payload.order ?? fields.length;\\r\\n fields.splice(insertIndex, 0, tempField);\\r\\n return { ...section, fields };\\r\\n }\\r\\n return section;\\r\\n },\\r\\n );\\r\\n ctx.patchState({\\r\\n formConfiguration: {\\r\\n ...state.formConfiguration!,\\r\\n sections: sectionsWithTemp,\\r\\n },\\r\\n });\\r\\n\\r\\n return handleApiRequest({\\r\\n ctx,\\r\\n key: FormBuilderActionKey.AddField,\\r\\n request$: req$,\\r\\n onSuccess: (res, currentState) => {\\r\\n const newField = res.data;\\r\\n // Replace temp field with real field\\r\\n const sections = (currentState.formConfiguration?.sections ?? []).map(\\r\\n (section) => {\\r\\n if (section.id === action.sectionId) {\\r\\n return {\\r\\n ...section,\\r\\n fields: section.fields.map((f) =>\\r\\n f.id === tempId ? newField : f,\\r\\n ),\\r\\n };\\r\\n }\\r\\n return section;\\r\\n },\\r\\n );\\r\\n return {\\r\\n formConfiguration: {\\r\\n ...currentState.formConfiguration!,\\r\\n sections,\\r\\n },\\r\\n };\\r\\n },\\r\\n onError: (_error, currentState) => {\\r\\n // Remove temp field on error\\r\\n const sections = (currentState.formConfiguration?.sections ?? []).map(\\r\\n (section) => {\\r\\n if (section.id === action.sectionId) {\\r\\n return {\\r\\n ...section,\\r\\n fields: section.fields.filter((f) => f.id !== tempId),\\r\\n };\\r\\n }\\r\\n return section;\\r\\n },\\r\\n );\\r\\n return {\\r\\n formConfiguration: {\\r\\n ...currentState.formConfiguration!,\\r\\n sections,\\r\\n },\\r\\n };\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n @Action(UpdateField)\\r\\n updateField(ctx: StateContext<FormBuilderStateModel>, action: UpdateField) {\\r\\n const state = ctx.getState();\\r\\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields/${action.fieldId}`;\\r\\n const req$ = this.http.put<Response<FormField>>(apiPath, action.payload);\\r\\n\\r\\n // Apply optimistic update for order changes\\r\\n if (action.payload.order !== undefined) {\\r\\n const newOrder = action.payload.order;\\r\\n const sections = (state.formConfiguration?.sections ?? []).map(\\r\\n (section) => {\\r\\n if (section.id === action.sectionId) {\\r\\n const fields = [...section.fields];\\r\\n const currentIndex = fields.findIndex(\\r\\n (f) => f.id === action.fieldId,\\r\\n );\\r\\n if (currentIndex !== -1) {\\r\\n const [movedField] = fields.splice(currentIndex, 1);\\r\\n fields.splice(newOrder, 0, movedField);\\r\\n }\\r\\n return { ...section, fields };\\r\\n }\\r\\n return section;\\r\\n },\\r\\n );\\r\\n ctx.patchState({\\r\\n formConfiguration: {\\r\\n ...state.formConfiguration!,\\r\\n sections,\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n return handleApiRequest({\\r\\n ctx,\\r\\n key: FormBuilderActionKey.UpdateField,\\r\\n request$: req$,\\r\\n onSuccess: (res, currentState) => {\\r\\n const updatedField = res.data;\\r\\n const sections = (currentState.formConfiguration?.sections ?? []).map(\\r\\n (section) => {\\r\\n if (section.id === action.sectionId) {\\r\\n // Update the field and sort by order\\r\\n const updatedFields = section.fields.map((f) =>\\r\\n f.id === updatedField.id ? updatedField : f,\\r\\n );\\r\\n return {\\r\\n ...section,\\r\\n fields: updatedFields.sort((a, b) => a.order - b.order),\\r\\n };\\r\\n }\\r\\n return section;\\r\\n },\\r\\n );\\r\\n return {\\r\\n formConfiguration: {\\r\\n ...currentState.formConfiguration!,\\r\\n sections,\\r\\n },\\r\\n };\\r\\n },\\r\\n onError: (_error, _currentState) => {\\r\\n // Revert optimistic update on error - reload original state\\r\\n if (action.payload.order !== undefined) {\\r\\n return {\\r\\n formConfiguration: state.formConfiguration,\\r\\n };\\r\\n }\\r\\n return {};\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n @Action(DeleteField)\\r\\n deleteField(ctx: StateContext<FormBuilderStateModel>, action: DeleteField) {\\r\\n const state = ctx.getState();\\r\\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields/${action.fieldId}`;\\r\\n const req$ =\\r\\n this.http.delete<Response<{ id: string; sectionId: string }>>(apiPath);\\r\\n\\r\\n // Optimistically mark field as deleting\\r\\n const sectionsWithDeleting = (state.formConfiguration?.sections ?? []).map(\\r\\n (section) => {\\r\\n if (section.id === action.sectionId) {\\r\\n return {\\r\\n ...section,\\r\\n fields: section.fields.map((f) =>\\r\\n f.id === action.fieldId ? { ...f, _deleting: true } : f,\\r\\n ),\\r\\n };\\r\\n }\\r\\n return section;\\r\\n },\\r\\n );\\r\\n ctx.patchState({\\r\\n formConfiguration: {\\r\\n ...state.formConfiguration!,\\r\\n sections: sectionsWithDeleting,\\r\\n },\\r\\n });\\r\\n\\r\\n return handleApiRequest({\\r\\n ctx,\\r\\n key: FormBuilderActionKey.DeleteField,\\r\\n request$: req$,\\r\\n onSuccess: (res, currentState) => {\\r\\n const { id: deletedId, sectionId } = res.data;\\r\\n const sections = (currentState.formConfiguration?.sections ?? []).map(\\r\\n (section) => {\\r\\n if (section.id === sectionId) {\\r\\n return {\\r\\n ...section,\\r\\n fields: section.fields.filter((f) => f.id !== deletedId),\\r\\n };\\r\\n }\\r\\n return section;\\r\\n },\\r\\n );\\r\\n return {\\r\\n formConfiguration: {\\r\\n ...currentState.formConfiguration!,\\r\\n sections,\\r\\n },\\r\\n };\\r\\n },\\r\\n onError: (_error, currentState) => {\\r\\n // Remove _deleting flag on error\\r\\n const sections = (currentState.formConfiguration?.sections ?? []).map(\\r\\n (section) => {\\r\\n if (section.id === action.sectionId) {\\r\\n return {\\r\\n ...section,\\r\\n fields: section.fields.map((f) =>\\r\\n f.id === action.fieldId ? { ...f, _deleting: false } : f,\\r\\n ),\\r\\n };\\r\\n }\\r\\n return section;\\r\\n },\\r\\n );\\r\\n return {\\r\\n formConfiguration: {\\r\\n ...currentState.formConfiguration!,\\r\\n sections,\\r\\n },\\r\\n };\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n @Action(MoveField)\\r\\n moveField(ctx: StateContext<FormBuilderStateModel>, action: MoveField) {\\r\\n const state = ctx.getState();\\r\\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields/${action.fieldId}/move`;\\r\\n const req$ = this.http.put<Response<FormField>>(apiPath, action.payload);\\r\\n\\r\\n // Apply optimistic update - move field immediately\\r\\n const sourceSectionId = action.sectionId;\\r\\n const targetSectionId = action.payload.targetSectionId;\\r\\n const targetOrder = action.payload.order ?? 0;\\r\\n\\r\\n let movedFieldData: FormField | null = null;\\r\\n const optimisticSections = (state.formConfiguration?.sections ?? []).map(\\r\\n (section) => {\\r\\n if (section.id === sourceSectionId) {\\r\\n const fieldToMove = section.fields.find(\\r\\n (f) => f.id === action.fieldId,\\r\\n );\\r\\n if (fieldToMove) {\\r\\n movedFieldData = { ...fieldToMove, order: targetOrder };\\r\\n }\\r\\n return {\\r\\n ...section,\\r\\n fields: section.fields.filter((f) => f.id !== action.fieldId),\\r\\n };\\r\\n }\\r\\n return section;\\r\\n },\\r\\n );\\r\\n\\r\\n // Add to target section\\r\\n const sectionsWithMoved = optimisticSections.map((section) => {\\r\\n if (section.id === targetSectionId && movedFieldData) {\\r\\n const fields = [...section.fields];\\r\\n fields.splice(targetOrder, 0, movedFieldData);\\r\\n return { ...section, fields };\\r\\n }\\r\\n return section;\\r\\n });\\r\\n\\r\\n ctx.patchState({\\r\\n formConfiguration: {\\r\\n ...state.formConfiguration!,\\r\\n sections: sectionsWithMoved,\\r\\n },\\r\\n });\\r\\n\\r\\n return handleApiRequest({\\r\\n ctx,\\r\\n key: FormBuilderActionKey.MoveField,\\r\\n request$: req$,\\r\\n onSuccess: (res, currentState) => {\\r\\n const movedField = res.data;\\r\\n const sections = (currentState.formConfiguration?.sections ?? []).map(\\r\\n (section) => {\\r\\n // Update the moved field with server response\\r\\n if (section.id === targetSectionId) {\\r\\n return {\\r\\n ...section,\\r\\n fields: section.fields\\r\\n .map((f) => (f.id === movedField.id ? movedField : f))\\r\\n .sort((a, b) => a.order - b.order),\\r\\n };\\r\\n }\\r\\n return section;\\r\\n },\\r\\n );\\r\\n return {\\r\\n formConfiguration: {\\r\\n ...currentState.formConfiguration!,\\r\\n sections,\\r\\n },\\r\\n };\\r\\n },\\r\\n onError: (_error, _currentState) => {\\r\\n // Revert optimistic update on error\\r\\n return {\\r\\n formConfiguration: state.formConfiguration,\\r\\n };\\r\\n },\\r\\n });\\r\\n }\\r\\n}\\r\\n\",\"import { computed, Injectable, inject } from '@angular/core';\\r\\nimport { Store, select } from '@ngxs/store';\\r\\n\\r\\nimport {\\r\\n AddFieldPayload,\\r\\n AddSectionPayload,\\r\\n FormBuilderActionKey,\\r\\n MoveFieldPayload,\\r\\n UpdateFieldPayload,\\r\\n UpdateSectionPayload,\\r\\n} from './form-builder.model';\\r\\nimport {\\r\\n AddField,\\r\\n AddSection,\\r\\n DeleteField,\\r\\n DeleteSection,\\r\\n GetFormConfiguration,\\r\\n MoveField,\\r\\n ResetFormBuilderState,\\r\\n ResetFormConfiguration,\\r\\n SetModuleInfo,\\r\\n UpdateField,\\r\\n UpdateSection,\\r\\n} from './form-builder.actions';\\r\\nimport { FormBuilderState } from './form-builder.state';\\r\\n\\r\\n@Injectable({ providedIn: 'root' })\\r\\nexport class FormBuilderFacade {\\r\\n private readonly store = inject(Store);\\r\\n\\r\\n // ============================================================================\\r\\n // State Selectors\\r\\n // ============================================================================\\r\\n\\r\\n private readonly stateSignal = select(FormBuilderState.getState);\\r\\n\\r\\n readonly formConfiguration = select(FormBuilderState.getFormConfiguration);\\r\\n readonly sections = select(FormBuilderState.getSections);\\r\\n readonly moduleType = select(FormBuilderState.getModuleType);\\r\\n readonly moduleId = select(FormBuilderState.getModuleId);\\r\\n\\r\\n // ============================================================================\\r\\n // Loading Signals\\r\\n // ============================================================================\\r\\n\\r\\n readonly isLoadingFormConfiguration = computed(() =>\\r\\n this.stateSignal().loadingActive.includes(\\r\\n FormBuilderActionKey.GetFormConfiguration,\\r\\n ),\\r\\n );\\r\\n\\r\\n readonly isResettingFormConfiguration = computed(() =>\\r\\n this.stateSignal().loadingActive.includes(\\r\\n FormBuilderActionKey.ResetFormConfiguration,\\r\\n ),\\r\\n );\\r\\n\\r\\n readonly isAddingSection = computed(() =>\\r\\n this.stateSignal().loadingActive.includes(FormBuilderActionKey.AddSection),\\r\\n );\\r\\n\\r\\n readonly isUpdatingSection = computed(() =>\\r\\n this.stateSignal().loadingActive.includes(\\r\\n FormBuilderActionKey.UpdateSection,\\r\\n ),\\r\\n );\\r\\n\\r\\n readonly isDeletingSection = computed(() =>\\r\\n this.stateSignal().loadingActive.includes(\\r\\n FormBuilderActionKey.DeleteSection,\\r\\n ),\\r\\n );\\r\\n\\r\\n readonly isAddingField = computed(() =>\\r\\n this.stateSignal().loadingActive.includes(FormBuilderActionKey.AddField),\\r\\n );\\r\\n\\r\\n readonly isUpdatingField = computed(() =>\\r\\n this.stateSignal().loadingActive.includes(FormBuilderActionKey.UpdateField),\\r\\n );\\r\\n\\r\\n readonly isDeletingField = computed(() =>\\r\\n this.stateSignal().loadingActive.includes(FormBuilderActionKey.DeleteField),\\r\\n );\\r\\n\\r\\n readonly isMovingField = computed(() =>\\r\\n this.stateSignal().loadingActive.includes(FormBuilderActionKey.MoveField),\\r\\n );\\r\\n\\r\\n // ============================================================================\\r\\n // Error Signals\\r\\n // ============================================================================\\r\\n\\r\\n readonly formConfigurationError = computed(\\r\\n () =>\\r\\n this.stateSignal().errors[FormBuilderActionKey.GetFormConfiguration] ??\\r\\n null,\\r\\n );\\r\\n\\r\\n readonly sectionError = computed(() => {\\r\\n const errors = this.stateSignal().errors;\\r\\n return (\\r\\n errors[FormBuilderActionKey.AddSection] ??\\r\\n errors[FormBuilderActionKey.UpdateSection] ??\\r\\n errors[FormBuilderActionKey.DeleteSection] ??\\r\\n null\\r\\n );\\r\\n });\\r\\n\\r\\n readonly fieldError = computed(() => {\\r\\n const errors = this.stateSignal().errors;\\r\\n return (\\r\\n errors[FormBuilderActionKey.AddField] ??\\r\\n errors[FormBuilderActionKey.UpdateField] ??\\r\\n errors[FormBuilderActionKey.DeleteField] ??\\r\\n errors[FormBuilderActionKey.MoveField] ??\\r\\n null\\r\\n );\\r\\n });\\r\\n\\r\\n // ============================================================================\\r\\n // Module Configuration Dispatchers\\r\\n // ============================================================================\\r\\n\\r\\n setModuleInfo(\\r\\n moduleType: string,\\r\\n moduleId: string | number,\\r\\n parentModuleType?: string,\\r\\n parentModuleId?: string | number,\\r\\n parentPath?: string,\\r\\n ) {\\r\\n return this.store.dispatch(\\r\\n new SetModuleInfo(\\r\\n moduleType,\\r\\n moduleId,\\r\\n parentModuleType,\\r\\n parentModuleId,\\r\\n parentPath,\\r\\n ),\\r\\n );\\r\\n }\\r\\n\\r\\n resetState() {\\r\\n return this.store.dispatch(new ResetFormBuilderState());\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // Form Configuration Dispatchers\\r\\n // ============================================================================\\r\\n\\r\\n getFormConfiguration() {\\r\\n return this.store.dispatch(new GetFormConfiguration());\\r\\n }\\r\\n\\r\\n resetFormConfiguration() {\\r\\n return this.store.dispatch(new ResetFormConfiguration());\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // Section Dispatchers\\r\\n // ============================================================================\\r\\n\\r\\n addSection(payload: AddSectionPayload) {\\r\\n return this.store.dispatch(new AddSection(payload));\\r\\n }\\r\\n\\r\\n updateSection(sectionId: string, payload: UpdateSectionPayload) {\\r\\n return this.store.dispatch(new UpdateSection(sectionId, payload));\\r\\n }\\r\\n\\r\\n deleteSection(sectionId: string) {\\r\\n return this.store.dispatch(new DeleteSection(sectionId));\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // Field Dispatchers\\r\\n // ============================================================================\\r\\n\\r\\n addField(sectionId: string, payload: AddFieldPayload) {\\r\\n return this.store.dispatch(new AddField(sectionId, payload));\\r\\n }\\r\\n\\r\\n updateField(sectionId: string, fieldId: string, payload: UpdateFieldPayload) {\\r\\n return this.store.dispatch(new UpdateField(sectionId, fieldId, payload));\\r\\n }\\r\\n\\r\\n deleteField(sectionId: string, fieldId: string) {\\r\\n return this.store.dispatch(new DeleteField(sectionId, fieldId));\\r\\n }\\r\\n\\r\\n moveField(sectionId: string, fieldId: string, payload: MoveFieldPayload) {\\r\\n return this.store.dispatch(new MoveField(sectionId, fieldId, payload));\\r\\n }\\r\\n}\\r\\n\",\"/**\\r\\n * Condition Formula Constants\\r\\n * Static functions and operators for condition formulas (Show/Hide/Enable/Disable)\\r\\n */\\r\\n\\r\\nimport type {\\r\\n FunctionCategoryGroup,\\r\\n OperatorDefinition,\\r\\n} from '@masterteam/components/formula';\\r\\n\\r\\n/**\\r\\n * Functions for field conditions\\r\\n */\\r\\nexport const CONDITION_FUNCTION_CATEGORIES: FunctionCategoryGroup[] = [\\r\\n {\\r\\n name: 'Logic',\\r\\n displayName: 'Field Visibility',\\r\\n functions: [\\r\\n {\\r\\n name: 'SHOW_IF',\\r\\n category: 'Logic',\\r\\n description: 'Show this field when condition is true',\\r\\n signature: 'SHOW_IF(condition)',\\r\\n parameters: [\\r\\n {\\r\\n name: 'condition',\\r\\n type: 'boolean',\\r\\n description: 'When true, field is visible',\\r\\n required: true,\\r\\n },\\r\\n ],\\r\\n returnType: 'boolean',\\r\\n examples: [\\r\\n 'SHOW_IF(@Status == \\\"Active\\\")',\\r\\n 'SHOW_IF(@Type == \\\"Custom\\\")',\\r\\n ],\\r\\n },\\r\\n {\\r\\n name: 'HIDE_IF',\\r\\n category: 'Logic',\\r\\n description: 'Hide this field when condition is true',\\r\\n signature: 'HIDE_IF(condition)',\\r\\n parameters: [\\r\\n {\\r\\n name: 'condition',\\r\\n type: 'boolean',\\r\\n description: 'When true, field is hidden',\\r\\n required: true,\\r\\n },\\r\\n ],\\r\\n returnType: 'boolean',\\r\\n examples: ['HIDE_IF(@Status == \\\"Closed\\\")', 'HIDE_IF(ISNULL(@Parent))'],\\r\\n },\\r\\n {\\r\\n name: 'DISABLE_IF',\\r\\n category: 'Logic',\\r\\n description: 'Disable this field when condition is true',\\r\\n signature: 'DISABLE_IF(condition)',\\r\\n parameters: [\\r\\n {\\r\\n name: 'condition',\\r\\n type: 'boolean',\\r\\n description: 'When true, field is disabled',\\r\\n required: true,\\r\\n },\\r\\n ],\\r\\n returnType: 'boolean',\\r\\n examples: [\\r\\n 'DISABLE_IF(@IsLocked == true)',\\r\\n 'DISABLE_IF(@Status == \\\"Approved\\\")',\\r\\n ],\\r\\n },\\r\\n {\\r\\n name: 'ENABLE_IF',\\r\\n category: 'Logic',\\r\\n description: 'Enable this field when condition is true',\\r\\n signature: 'ENABLE_IF(condition)',\\r\\n parameters: [\\r\\n {\\r\\n name: 'condition',\\r\\n type: 'boolean',\\r\\n description: 'When true, field is enabled',\\r\\n required: true,\\r\\n },\\r\\n ],\\r\\n returnType: 'boolean',\\r\\n examples: [\\r\\n 'ENABLE_IF(@Status == \\\"Draft\\\")',\\r\\n 'ENABLE_IF(@CanEdit == true)',\\r\\n ],\\r\\n },\\r\\n ],\\r\\n },\\r\\n {\\r\\n name: 'Aggregation',\\r\\n displayName: 'Logic Helpers',\\r\\n functions: [\\r\\n {\\r\\n name: 'AND',\\r\\n category: 'Aggregation',\\r\\n description: 'Returns true if all conditions are true',\\r\\n signature: 'AND(condition1, condition2)',\\r\\n parameters: [\\r\\n {\\r\\n name: 'condition1',\\r\\n type: 'boolean',\\r\\n description: 'First condition',\\r\\n required: true,\\r\\n },\\r\\n {\\r\\n name: 'condition2',\\r\\n type: 'boolean',\\r\\n description: 'Second condition',\\r\\n required: true,\\r\\n },\\r\\n ],\\r\\n returnType: 'boolean',\\r\\n examples: ['AND(@Status == \\\"Active\\\", @Priority > 0)'],\\r\\n },\\r\\n {\\r\\n name: 'OR',\\r\\n category: 'Aggregation',\\r\\n description: 'Returns true if any condition is true',\\r\\n signature: 'OR(condition1, condition2)',\\r\\n parameters: [\\r\\n {\\r\\n name: 'condition1',\\r\\n type: 'boolean',\\r\\n description: 'First condition',\\r\\n required: true,\\r\\n },\\r\\n {\\r\\n name: 'condition2',\\r\\n type: 'boolean',\\r\\n description: 'Second condition',\\r\\n required: true,\\r\\n },\\r\\n ],\\r\\n returnType: 'boolean',\\r\\n examples: ['OR(@Status == \\\"Active\\\", @Status == \\\"Pending\\\")'],\\r\\n },\\r\\n {\\r\\n name: 'NOT',\\r\\n category: 'Aggregation',\\r\\n description: 'Returns the opposite of the condition',\\r\\n signature: 'NOT(condition)',\\r\\n parameters: [\\r\\n {\\r\\n name: 'condition',\\r\\n type: 'boolean',\\r\\n description: 'The condition to negate',\\r\\n required: true,\\r\\n },\\r\\n ],\\r\\n returnType: 'boolean',\\r\\n examples: ['NOT(@IsCompleted)'],\\r\\n },\\r\\n {\\r\\n name: 'ISNULL',\\r\\n category: 'Aggregation',\\r\\n description: 'Returns true if value is null or empty',\\r\\n signature: 'ISNULL(value)',\\r\\n parameters: [\\r\\n {\\r\\n name: 'value',\\r\\n type: 'any',\\r\\n description: 'The value to check',\\r\\n required: true,\\r\\n },\\r\\n ],\\r\\n returnType: 'boolean',\\r\\n examples: ['ISNULL(@Description)'],\\r\\n },\\r\\n {\\r\\n name: 'CONTAINS',\\r\\n category: 'Aggregation',\\r\\n description: 'Returns true if text contains the search string',\\r\\n signature: 'CONTAINS(text, search)',\\r\\n parameters: [\\r\\n {\\r\\n name: 'text',\\r\\n type: 'string',\\r\\n description: 'The text to search in',\\r\\n required: true,\\r\\n },\\r\\n {\\r\\n name: 'search',\\r\\n type: 'string',\\r\\n description: 'The string to search for',\\r\\n required: true,\\r\\n },\\r\\n ],\\r\\n returnType: 'boolean',\\r\\n examples: ['CONTAINS(@Name, \\\"Project\\\")'],\\r\\n },\\r\\n ],\\r\\n },\\r\\n];\\r\\n\\r\\n/**\\r\\n * Operators for conditions\\r\\n */\\r\\nexport const CONDITION_OPERATORS: OperatorDefinition[] = [\\r\\n // Comparison\\r\\n {\\r\\n symbol: '==',\\r\\n name: 'Equal',\\r\\n type: 'comparison',\\r\\n description: 'Equal to',\\r\\n precedence: 3,\\r\\n },\\r\\n {\\r\\n symbol: '!=',\\r\\n name: 'Not Equal',\\r\\n type: 'comparison',\\r\\n description: 'Not equal to',\\r\\n precedence: 3,\\r\\n },\\r\\n {\\r\\n symbol: '>',\\r\\n name: 'Greater Than',\\r\\n type: 'comparison',\\r\\n description: 'Greater than',\\r\\n precedence: 4,\\r\\n },\\r\\n {\\r\\n symbol: '<',\\r\\n name: 'Less Than',\\r\\n type: 'comparison',\\r\\n description: 'Less than',\\r\\n precedence: 4,\\r\\n },\\r\\n {\\r\\n symbol: '>=',\\r\\n name: 'Greater or Equal',\\r\\n type: 'comparison',\\r\\n description: 'Greater than or equal',\\r\\n precedence: 4,\\r\\n },\\r\\n {\\r\\n symbol: '<=',\\r\\n name: 'Less or Equal',\\r\\n type: 'comparison',\\r\\n description: 'Less than or equal',\\r\\n precedence: 4,\\r\\n },\\r\\n // Logical\\r\\n {\\r\\n symbol: '&&',\\r\\n name: 'And',\\r\\n type: 'logical',\\r\\n description: 'Logical AND',\\r\\n precedence: 2,\\r\\n },\\r\\n {\\r\\n symbol: '||',\\r\\n name: 'Or',\\r\\n type: 'logical',\\r\\n description: 'Logical OR',\\r\\n precedence: 1,\\r\\n },\\r\\n];\\r\\n\",\"import {\\r\\n Component,\\r\\n computed,\\r\\n inject,\\r\\n input,\\r\\n OnInit,\\r\\n signal,\\r\\n viewChild,\\r\\n} from '@angular/core';\\r\\nimport { TranslocoDirective } from '@jsverse/transloco';\\r\\nimport { ReactiveFormsModule, FormControl } from '@angular/forms';\\r\\nimport { Button } from '@masterteam/components/button';\\r\\nimport { ModalService } from '@masterteam/components/modal';\\r\\nimport { ModalRef } from '@masterteam/components/dialog';\\r\\nimport {\\r\\n FormulaEditor,\\r\\n FormulaToolbar,\\r\\n SmartBlock,\\r\\n FormulaToken,\\r\\n} from '@masterteam/components/formula';\\r\\nimport {\\r\\n CONDITION_FUNCTION_CATEGORIES,\\r\\n CONDITION_OPERATORS,\\r\\n} from './condition-constants';\\r\\n\\r\\n/**\\r\\n * Field property for condition formula\\r\\n */\\r\\nexport interface ConditionFieldProperty {\\r\\n /** Unique key (used in formula as @key) */\\r\\n key: string;\\r\\n /** Display name */\\r\\n name: string;\\r\\n /** Field type for hint */\\r\\n type?: string;\\r\\n}\\r\\n\\r\\n/**\\r\\n * Field Conditions Dialog\\r\\n *\\r\\n * Allows users to define conditional display formulas for form fields.\\r\\n * Uses FormulaToolbar + FormulaEditor directly for a visual formula editing experience.\\r\\n */\\r\\n@Component({\\r\\n selector: 'mt-fb-field-conditions',\\r\\n standalone: true,\\r\\n imports: [\\r\\n TranslocoDirective,\\r\\n ReactiveFormsModule,\\r\\n Button,\\r\\n FormulaToolbar,\\r\\n FormulaEditor,\\r\\n ],\\r\\n templateUrl: './fb-field-conditions.html',\\r\\n})\\r\\nexport class FBFieldConditions implements OnInit {\\r\\n protected readonly modalService = inject(ModalService);\\r\\n private readonly ref = inject(ModalRef);\\r\\n\\r\\n // Inputs\\r\\n /** Initial formula (JSON string from backend) */\\r\\n readonly initialFormula = input<string>('');\\r\\n\\r\\n /** Available fields from the form builder (other fields that can be referenced) */\\r\\n readonly availableFields = input<ConditionFieldProperty[]>([]);\\r\\n\\r\\n // UI State\\r\\n readonly submitting = signal(false);\\r\\n\\r\\n // Form control for the formula editor (tokens array)\\r\\n readonly formulaControl = new FormControl<FormulaToken[]>([]);\\r\\n\\r\\n // View child for the editor\\r\\n private readonly editorRef = viewChild<FormulaEditor>('editor');\\r\\n\\r\\n // Condition-specific functions and operators\\r\\n readonly functionCategories = CONDITION_FUNCTION_CATEGORIES;\\r\\n readonly operators = CONDITION_OPERATORS;\\r\\n\\r\\n /** Extract property keys for toolbar */\\r\\n readonly propertyKeys = computed(() =>\\r\\n this.availableFields().map((f) => f.key),\\r\\n );\\r\\n\\r\\n /** Toolbar labels */\\r\\n readonly toolbarLabels = {\\r\\n functions: 'Functions',\\r\\n properties: 'Fields',\\r\\n operators: 'Operators',\\r\\n noPropertiesAvailable: 'No fields available',\\r\\n };\\r\\n\\r\\n ngOnInit(): void {\\r\\n // Parse JSON string to tokens\\r\\n const formula = this.initialFormula();\\r\\n if (formula) {\\r\\n try {\\r\\n const tokens = JSON.parse(formula) as FormulaToken[];\\r\\n this.formulaControl.patchValue(tokens);\\r\\n } catch {\\r\\n // Invalid JSON, start with empty\\r\\n }\\r\\n }\\r\\n }\\r\\n\\r\\n /** Handle block insert from toolbar */\\r\\n onBlockInsert(block: SmartBlock): void {\\r\\n const editor = this.editorRef();\\r\\n if (editor) {\\r\\n editor.addBlock(block);\\r\\n }\\r\\n }\\r\\n\\r\\n onSave(): void {\\r\\n const tokens = this.formulaControl.value ?? [];\\r\\n const formula = tokens.length > 0 ? JSON.stringify(tokens) : '';\\r\\n this.ref.close({ saved: true, conditionalDisplayFormula: formula });\\r\\n }\\r\\n\\r\\n onCancel(): void {\\r\\n this.ref.close({ saved: false });\\r\\n }\\r\\n}\\r\\n\",\"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10 flex flex-col gap-3\\\">\\r\\n <!-- Formula Toolbar -->\\r\\n <mt-formula-toolbar\\r\\n [knownProperties]=\\\"propertyKeys()\\\"\\r\\n [functionCategories]=\\\"functionCategories\\\"\\r\\n [operators]=\\\"operators\\\"\\r\\n [labels]=\\\"toolbarLabels\\\"\\r\\n (onBlockInsert)=\\\"onBlockInsert($event)\\\"\\r\\n />\\r\\n <!-- Formula Editor -->\\r\\n <mt-formula-editor\\r\\n #editor\\r\\n [placeholder]=\\\"t('build-condition-formula')\\\"\\r\\n [formControl]=\\\"formulaControl\\\"\\r\\n />\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n />\\r\\n <mt-button\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n />\\r\\n </div>\\r\\n</ng-container>\\r\\n\",\"import {\\r\\n Component,\\r\\n computed,\\r\\n effect,\\r\\n inject,\\r\\n input,\\r\\n signal,\\r\\n} from '@angular/core';\\r\\nimport { TranslocoDirective, TranslocoService } from '@jsverse/transloco';\\r\\nimport { ReactiveFormsModule, FormControl } from '@angular/forms';\\r\\nimport { DynamicForm } from '@masterteam/forms/dynamic-form';\\r\\nimport {\\r\\n DynamicFormConfig,\\r\\n RadioCardsFieldConfig,\\r\\n} from '@masterteam/components';\\r\\nimport { Button } from '@masterteam/components/button';\\r\\nimport { ToggleField } from '@masterteam/components/toggle-field';\\r\\nimport { ModalService } from '@masterteam/components/modal';\\r\\nimport { ModalRef } from '@masterteam/components/dialog';\\r\\nimport { ConfirmationService } from '@masterteam/components/confirmation';\\r\\nimport type {\\r\\n EnrichedFormField,\\r\\n EnrichedFormSection,\\r\\n} from '../form-builder.model';\\r\\nimport { FormBuilderFacade } from '../../store/form-builder';\\r\\nimport type { FieldWidth } from '../../store/form-builder/form-builder.model';\\r\\nimport {\\r\\n FBFieldConditions,\\r\\n ConditionFieldProperty,\\r\\n} from '../fb-field-conditions/fb-field-conditions';\\r\\n\\r\\n@Component({\\r\\n selector: 'mt-fb-field-form',\\r\\n standalone: true,\\r\\n imports: [\\r\\n TranslocoDirective,\\r\\n ReactiveFormsModule,\\r\\n DynamicForm,\\r\\n Button,\\r\\n ToggleField,\\r\\n ],\\r\\n templateUrl: './fb-field-form.html',\\r\\n})\\r\\nexport class FBFieldForm {\\r\\n private readonly transloco = inject(TranslocoService);\\r\\n protected readonly modalService = inject(ModalService);\\r\\n private readonly ref = inject(ModalRef);\\r\\n private readonly confirmationService = inject(ConfirmationService);\\r\\n private readonly facade = inject(FormBuilderFacade);\\r\\n\\r\\n // Inputs\\r\\n readonly sectionId = input<string>('');\\r\\n readonly initialData = input<EnrichedFormField | null>(null);\\r\\n /** All sections with enriched fields (to get available fields for conditions) */\\r\\n readonly allSections = input<EnrichedFormSection[]>([]);\\r\\n\\r\\n // UI State\\r\\n readonly submitting = signal(false);\\r\\n readonly deleting = signal(false);\\r\\n readonly conditionalDisplayFormula = signal<string>('');\\r\\n private conditionsDialogRef: any;\\r\\n\\r\\n /**\\r\\n * Compute available fields for condition formula\\r\\n * Excludes the current field being edited\\r\\n */\\r\\n readonly availableFields = computed<ConditionFieldProperty[]>(() => {\\r\\n const sections = this.allSections();\\r\\n const currentField = this.initialData();\\r\\n const fields: ConditionFieldProperty[] = [];\\r\\n\\r\\n for (const section of sections) {\\r\\n for (const field of section.fields) {\\r\\n // Exclude the current field being edited\\r\\n if (currentField && field.id === currentField.id) continue;\\r\\n\\r\\n fields.push({\\r\\n key: field.name,\\r\\n name: field.name,\\r\\n type: field.type,\\r\\n });\\r\\n }\\r\\n }\\r\\n\\r\\n return fields;\\r\\n });\\r\\n\\r\\n // Form\\r\\n readonly formControl = new FormControl();\\r\\n readonly showHideControl = new FormControl(false);\\r\\n readonly formConfig: DynamicFormConfig = {\\r\\n sections: [\\r\\n {\\r\\n key: 'section-form',\\r\\n type: 'none',\\r\\n columns: 12,\\r\\n order: 1,\\r\\n fields: [\\r\\n {\\r\\n key: 'isRequired',\\r\\n label: this.transloco.translate('formBuilder.is-required'),\\r\\n type: 'toggle',\\r\\n toggleShape: 'card',\\r\\n colSpan: 12,\\r\\n order: 1,\\r\\n },\\r\\n {\\r\\n key: 'hiddenInCreation',\\r\\n label: this.transloco.translate('formBuilder.hidden-in-creation'),\\r\\n type: 'toggle',\\r\\n toggleShape: 'card',\\r\\n colSpan: 12,\\r\\n order: 2,\\r\\n },\\r\\n {\\r\\n key: 'hiddenInEditForm',\\r\\n label: this.transloco.translate('formBuilder.hidden-in-edit-form'),\\r\\n type: 'toggle',\\r\\n toggleShape: 'card',\\r\\n colSpan: 12,\\r\\n order: 3,\\r\\n },\\r\\n new RadioCardsFieldConfig({\\r\\n key: 'size',\\r\\n label: this.transloco.translate('formBuilder.size'),\\r\\n placeholder: this.transloco.translate('formBuilder.size'),\\r\\n options: [\\r\\n { id: 's', name: 'S' },\\r\\n { id: 'm', name: 'M' },\\r\\n { id: 'l', name: 'L' },\\r\\n ],\\r\\n order: 4,\\r\\n size: 'small',\\r\\n }),\\r\\n ],\\r\\n },\\r\\n ],\\r\\n };\\r\\n\\r\\n constructor() {\\r\\n effect(() => {\\r\\n const data = this.initialData();\\r\\n if (data) {\\r\\n const widthToSize: Record<string, string> = {\\r\\n '25': 's',\\r\\n '50': 'm',\\r\\n '100': 'l',\\r\\n };\\r\\n this.formControl.patchValue({\\r\\n isRequired: data.isRequired ?? false,\\r\\n hiddenInCreation: data.hiddenInCreation ?? false,\\r\\n hiddenInEditForm: data.hiddenInEditForm ?? false,\\r\\n size: widthToSize[data.width] ?? 'l',\\r\\n });\\r\\n // Set show/hide toggle based on existing value\\r\\n this.showHideControl.patchValue(\\r\\n data.showConditionalDisplayFormula ?? false,\\r\\n );\\r\\n this.conditionalDisplayFormula.set(\\r\\n data.conditionalDisplayFormula ?? '',\\r\\n );\\r\\n }\\r\\n });\\r\\n }\\r\\n\\r\\n onSave(): void {\\r\\n if (this.formControl.invalid) return;\\r\\n\\r\\n const formValue = this.formControl.value;\\r\\n const field = this.initialData();\\r\\n const sectionId = this.sectionId();\\r\\n\\r\\n if (!field || !sectionId) return;\\r\\n\\r\\n const widthMap: Record<string, FieldWidth> = {\\r\\n s: '25',\\r\\n m: '50',\\r\\n l: '100',\\r\\n };\\r\\n\\r\\n const payload = {\\r\\n width: widthMap[formValue.size] ?? '100',\\r\\n hiddenInCreation: formValue.hiddenInCreation ?? false,\\r\\n hiddenInEditForm: formValue.hiddenInEditForm ?? false,\\r\\n isRequired: formValue.isRequired ?? false,\\r\\n showConditionalDisplayFormula: this.showHideControl.value ?? false,\\r\\n conditionalDisplayFormula: this.showHideControl.value\\r\\n ? this.conditionalDisplayFormula()\\r\\n : null,\\r\\n };\\r\\n\\r\\n this.submitting.set(true);\\r\\n this.facade.updateField(sectionId, field.id, payload).subscribe({\\r\\n next: () => this.ref.close(true),\\r\\n error: () => this.submitting.set(false),\\r\\n });\\r\\n }\\r\\n\\r\\n onCancel(): void {\\r\\n this.ref.close(false);\\r\\n }\\r\\n\\r\\n onSetConditions(): void {\\r\\n this.conditionsDialogRef = this.modalService.openModal(\\r\\n FBFieldConditions,\\r\\n 'drawer',\\r\\n {\\r\\n header: this.transloco.translate('formBuilder.set-conditions'),\\r\\n styleClass: '!w-[calc(100%-25rem)] !absolute ',\\r\\n position: 'start',\\r\\n modal: false,\\r\\n appendTo: '#page-content',\\r\\n inputValues: {\\r\\n initialFormula: this.conditionalDisplayFormula(),\\r\\n availableFields: this.availableFields(),\\r\\n },\\r\\n },\\r\\n );\\r\\n\\r\\n this.conditionsDialogRef.onClose.subscribe(\\r\\n (result: { saved: boolean; conditionalDisplayFormula?: string }) => {\\r\\n if (result?.saved) {\\r\\n this.conditionalDisplayFormula.set(\\r\\n result.conditionalDisplayFormula ?? '',\\r\\n );\\r\\n }\\r\\n },\\r\\n );\\r\\n }\\r\\n\\r\\n onDelete(event: Event): void {\\r\\n const field = this.initialData();\\r\\n const sectionId = this.sectionId();\\r\\n\\r\\n if (!field || !sectionId) return;\\r\\n\\r\\n this.confirmationService.confirmDelete({\\r\\n event,\\r\\n type: 'popup',\\r\\n accept: () => {\\r\\n this.deleting.set(true);\\r\\n this.facade.deleteField(sectionId, field.id).subscribe({\\r\\n next: () => this.ref.close(true),\\r\\n error: () => this.deleting.set(false),\\r\\n });\\r\\n },\\r\\n });\\r\\n }\\r\\n}\\r\\n\",\"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10 flex flex-col gap-4\\\">\\r\\n <mt-dynamic-form [formConfig]=\\\"formConfig\\\" [formControl]=\\\"formControl\\\">\\r\\n </mt-dynamic-form>\\r\\n\\r\\n <!-- Show/Hide Toggle with Set Conditions -->\\r\\n <mt-toggle-field\\r\\n toggleShape=\\\"card\\\"\\r\\n [label]=\\\"t('show-hide')\\\"\\r\\n [descriptionCard]=\\\"t('show-hide-description')\\\"\\r\\n icon=\\\"general.eye\\\"\\r\\n [formControl]=\\\"showHideControl\\\"\\r\\n >\\r\\n <ng-template #toggleCardBottom>\\r\\n @if (showHideControl.value) {\\r\\n <div class=\\\"mt-3\\\">\\r\\n <mt-button\\r\\n [label]=\\\"t('set-conditions')\\\"\\r\\n size=\\\"small\\\"\\r\\n (onClick)=\\\"onSetConditions()\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n }\\r\\n </ng-template>\\r\\n </mt-toggle-field>\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n @if (initialData()) {\\r\\n <mt-button\\r\\n [tooltip]=\\\"t('delete')\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n icon=\\\"general.trash-01\\\"\\r\\n [loading]=\\\"deleting()\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onDelete($event)\\\"\\r\\n class=\\\"me-auto\\\"\\r\\n ></mt-button>\\r\\n }\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting() || deleting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n <mt-button\\r\\n [disabled]=\\\"!formControl.valid || deleting()\\\"\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n </div>\\r\\n</ng-container>\\r\\n\",\"import { Component, effect, inject, input, signal } from '@angular/core';\\r\\nimport { TranslocoDirective, TranslocoService } from '@jsverse/transloco';\\r\\nimport { ReactiveFormsModule, FormControl } from '@angular/forms';\\r\\nimport { DynamicForm } from '@masterteam/forms/dynamic-form';\\r\\nimport { DynamicFormConfig } from '@masterteam/components';\\r\\nimport { Button } from '@masterteam/components/button';\\r\\nimport { ModalService } from '@masterteam/components/modal';\\r\\nimport { ModalRef } from '@masterteam/components/dialog';\\r\\nimport { ConfirmationService } from '@masterteam/components/confirmation';\\r\\nimport { FormBuilderFacade } from '../../store/form-builder';\\r\\n\\r\\n@Component({\\r\\n selector: 'mt-fb-section-form',\\r\\n standalone: true,\\r\\n imports: [TranslocoDirective, ReactiveFormsModule, DynamicForm, Button],\\r\\n templateUrl: './fb-section-form.html',\\r\\n})\\r\\nexport class FBSectionForm {\\r\\n private readonly transloco = inject(TranslocoService);\\r\\n protected readonly modalService = inject(ModalService);\\r\\n private readonly ref = inject(ModalRef);\\r\\n private readonly confirmationService = inject(ConfirmationService);\\r\\n private readonly facade = inject(FormBuilderFacade);\\r\\n\\r\\n // Inputs\\r\\n readonly sectionId = input<string | null>(null);\\r\\n readonly initialData = input<{ ar: string; en: string } | null>(null);\\r\\n readonly sectionsCount = input<number>(0);\\r\\n\\r\\n // UI State\\r\\n readonly submitting = signal(false);\\r\\n readonly deleting = signal(false);\\r\\n\\r\\n // Form\\r\\n readonly formControl = new FormControl();\\r\\n readonly formConfig: DynamicFormConfig = {\\r\\n sections: [\\r\\n {\\r\\n key: 'section-form',\\r\\n type: 'none',\\r\\n columns: 12,\\r\\n order: 1,\\r\\n fields: [\\r\\n {\\r\\n key: 'name-ar',\\r\\n label: this.transloco.translate('formBuilder.name-ar'),\\r\\n type: 'text',\\r\\n placeholder: this.transloco.translate('formBuilder.name-ar'),\\r\\n colSpan: 12,\\r\\n order: 1,\\r\\n },\\r\\n {\\r\\n key: 'name-en',\\r\\n label: this.transloco.translate('formBuilder.name-en'),\\r\\n type: 'text',\\r\\n placeholder: this.transloco.translate('formBuilder.name-en'),\\r\\n colSpan: 12,\\r\\n order: 2,\\r\\n },\\r\\n ],\\r\\n },\\r\\n ],\\r\\n };\\r\\n\\r\\n constructor() {\\r\\n effect(() => {\\r\\n const data = this.initialData();\\r\\n if (data) {\\r\\n this.formControl.patchValue({\\r\\n 'name-ar': data.ar,\\r\\n 'name-en': data.en,\\r\\n });\\r\\n }\\r\\n });\\r\\n }\\r\\n\\r\\n onSave(): void {\\r\\n if (this.formControl.invalid) return;\\r\\n\\r\\n const formValue = this.formControl.value;\\r\\n const payload = {\\r\\n name: {\\r\\n ar: formValue['name-ar'],\\r\\n en: formValue['name-en'],\\r\\n },\\r\\n };\\r\\n\\r\\n this.submitting.set(true);\\r\\n const sectionId = this.sectionId();\\r\\n\\r\\n if (sectionId) {\\r\\n // Update existing section\\r\\n this.facade.updateSection(sectionId, payload).subscribe({\\r\\n next: () => this.ref.close(true),\\r\\n error: () => this.submitting.set(false),\\r\\n });\\r\\n } else {\\r\\n // Create new section\\r\\n this.facade\\r\\n .addSection({ ...payload, order: this.sectionsCount() })\\r\\n .subscribe({\\r\\n next: () => this.ref.close(true),\\r\\n error: () => this.submitting.set(false),\\r\\n });\\r\\n }\\r\\n }\\r\\n\\r\\n onCancel(): void {\\r\\n this.ref.close(false);\\r\\n }\\r\\n\\r\\n onDelete(event: Event): void {\\r\\n const sectionId = this.sectionId();\\r\\n if (!sectionId) return;\\r\\n\\r\\n this.confirmationService.confirmDelete({\\r\\n event,\\r\\n type: 'popup',\\r\\n accept: () => {\\r\\n this.deleting.set(true);\\r\\n this.facade.deleteSection(sectionId).subscribe({\\r\\n next: () => this.ref.close(true),\\r\\n error: () => this.deleting.set(false),\\r\\n });\\r\\n },\\r\\n });\\r\\n }\\r\\n}\\r\\n\",\"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10\\\">\\r\\n <mt-dynamic-form [formConfig]=\\\"formConfig\\\" [formControl]=\\\"formControl\\\">\\r\\n </mt-dynamic-form>\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n @if (sectionId()) {\\r\\n <mt-button\\r\\n [tooltip]=\\\"t('delete')\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n icon=\\\"general.trash-01\\\"\\r\\n [loading]=\\\"deleting()\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onDelete($event)\\\"\\r\\n class=\\\"me-auto\\\"\\r\\n ></mt-button>\\r\\n }\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting() || deleting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n <mt-button\\r\\n [disabled]=\\\"!formControl.valid || deleting()\\\"\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n </div>\\r\\n</ng-container>\\r\\n\",\"import {\\r\\n Component,\\r\\n computed,\\r\\n inject,\\r\\n input,\\r\\n output,\\r\\n signal,\\r\\n effect,\\r\\n} from '@angular/core';\\r\\nimport { EnrichedFormField, EnrichedFormSection } from '../form-builder.model';\\r\\nimport { ConfirmationService } from '@masterteam/components/confirmation';\\r\\nimport { ModalService } from '@masterteam/components/modal';\\r\\nimport { TranslocoService } from '@jsverse/transloco';\\r\\nimport { Button } from '@masterteam/components/button';\\r\\nimport { Card } from '@masterteam/components/card';\\r\\nimport {\\r\\n CdkDrag,\\r\\n CdkDragDrop,\\r\\n CdkDragPlaceholder,\\r\\n CdkDropList,\\r\\n} from '@angular/cdk/drag-drop';\\r\\nimport { TranslocoDirective } from '@jsverse/transloco';\\r\\nimport { DynamicField } from '@masterteam/forms/dynamic-field';\\r\\nimport { ReactiveFormsModule, FormGroup, FormControl } from '@angular/forms';\\r\\nimport { Icon } from '@masterteam/icons';\\r\\nimport { FormBuilderFacade } from '../../store/form-builder';\\r\\nimport { FBFieldForm } from '../fb-field-form/fb-field-form';\\r\\nimport { FBSectionForm } from '../fb-section-form/fb-section-form';\\r\\n\\r\\n@Component({\\r\\n selector: 'mt-fb-section',\\r\\n standalone: true,\\r\\n imports: [\\r\\n Button,\\r\\n Card,\\r\\n Icon,\\r\\n CdkDrag,\\r\\n CdkDropList,\\r\\n CdkDragPlaceholder,\\r\\n TranslocoDirective,\\r\\n DynamicField,\\r\\n ReactiveFormsModule,\\r\\n ],\\r\\n templateUrl: './fb-section.html',\\r\\n})\\r\\nexport class FBSection {\\r\\n private readonly confirmationService = inject(ConfirmationService);\\r\\n private readonly modalService = inject(ModalService);\\r\\n private readonly translocoService = inject(TranslocoService);\\r\\n private readonly facade = inject(FormBuilderFacade);\\r\\n\\r\\n // Inputs\\r\\n readonly section = input.required<EnrichedFormSection>();\\r\\n readonly sectionsCount = input<number>(0);\\r\\n /** All sections - used to get available fields for condition formulas */\\r\\n readonly allSections = input<EnrichedFormSection[]>([]);\\r\\n\\r\\n // Outputs - only keep drag/drop since it needs coordination with parent drop list group\\r\\n readonly onFieldDrop = output<CdkDragDrop<EnrichedFormField[]>>();\\r\\n\\r\\n // Computed\\r\\n readonly sectionName = computed(() => {\\r\\n const lang = document.documentElement.lang as 'en' | 'ar';\\r\\n const section = this.section();\\r\\n return section.name[lang] ?? section.name['en'];\\r\\n });\\r\\n\\r\\n readonly fields = computed(() => this.section().fields);\\r\\n\\r\\n // UI State\\r\\n readonly expanded = signal(true);\\r\\n\\r\\n // Form groups cache for dynamic fields\\r\\n private readonly formGroupsCache = new Map<string, FormGroup>();\\r\\n\\r\\n constructor() {\\r\\n // Cleanup stale form groups when fields change\\r\\n effect(() => {\\r\\n const currentIds = new Set(this.fields().map((f) => f.id));\\r\\n for (const id of this.formGroupsCache.keys()) {\\r\\n if (!currentIds.has(id)) {\\r\\n this.formGroupsCache.delete(id);\\r\\n }\\r\\n }\\r\\n });\\r\\n }\\r\\n\\r\\n getFormGroup(field: EnrichedFormField): FormGroup {\\r\\n let fg = this.formGroupsCache.get(field.id);\\r\\n\\r\\n if (fg) {\\r\\n // Check if field name changed\\r\\n if (!fg.contains(field.name)) {\\r\\n const oldKey = Object.keys(fg.controls)[0];\\r\\n const value = oldKey ? fg.get(oldKey)?.value : field.data?.data;\\r\\n\\r\\n fg = new FormGroup({\\r\\n [field.name]: new FormControl(value),\\r\\n });\\r\\n this.formGroupsCache.set(field.id, fg);\\r\\n }\\r\\n } else {\\r\\n fg = new FormGroup({\\r\\n [field.name]: new FormControl(field.data?.data),\\r\\n });\\r\\n this.formGroupsCache.set(field.id, fg);\\r\\n }\\r\\n\\r\\n return fg;\\r\\n }\\r\\n\\r\\n toggleExpanded(): void {\\r\\n this.expanded.update((v) => !v);\\r\\n }\\r\\n\\r\\n onDrop(event: CdkDragDrop<EnrichedFormField[]>): void {\\r\\n this.onFieldDrop.emit(event);\\r\\n }\\r\\n\\r\\n editSection(event: Event): void {\\r\\n event.stopPropagation();\\r\\n const section = this.section();\\r\\n\\r\\n this.modalService.openModal(FBSectionForm, 'drawer', {\\r\\n header: this.translocoService.translate('formBuilder.edit-section'),\\r\\n height: '20vw',\\r\\n styleClass: '!w-100 !absolute ',\\r\\n position: 'end',\\r\\n appendTo: '#page-content',\\r\\n modal: false,\\r\\n inputValues: {\\r\\n sectionId: section.id,\\r\\n initialData: section.name,\\r\\n sectionsCount: this.sectionsCount(),\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n removeField(event: Event, field: EnrichedFormField): void {\\r\\n this.confirmationService.confirmDelete({\\r\\n event,\\r\\n type: 'popup',\\r\\n accept: () => {\\r\\n this.facade.deleteField(this.section().id, field.id);\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n editField(field: EnrichedFormField): void {\\r\\n this.modalService.openModal(FBFieldForm, 'drawer', {\\r\\n header: this.translocoService.translate('formBuilder.field-settings'),\\r\\n height: '20vw',\\r\\n styleClass: '!w-100 !absolute !shadow-none',\\r\\n position: 'end',\\r\\n modal: false,\\r\\n appendTo: '#page-content',\\r\\n inputValues: {\\r\\n initialData: field,\\r\\n sectionId: this.section().id,\\r\\n allSections: this.allSections(),\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n getFieldColSpan(field: EnrichedFormField): string {\\r\\n switch (field.width) {\\r\\n case '100':\\r\\n return 'col-span-12';\\r\\n case '50':\\r\\n return 'col-span-6';\\r\\n case '25':\\r\\n return 'col-span-3';\\r\\n default:\\r\\n return 'col-span-12';\\r\\n }\\r\\n }\\r\\n\\r\\n getFieldType(field: EnrichedFormField): string {\\r\\n const typeMap: Record<string, string> = {\\r\\n User: 'select',\\r\\n Text: 'text',\\r\\n LongText: 'editor-field',\\r\\n Percentage: 'slider',\\r\\n Date: 'date',\\r\\n Currency: 'text',\\r\\n Number: 'number',\\r\\n Lookup: 'select',\\r\\n LookupMultiSelect: 'select',\\r\\n Checkbox: 'toggle',\\r\\n InternalModule: 'select',\\r\\n DynamicList: 'select',\\r\\n API: 'select',\\r\\n Time: 'date',\\r\\n Status: 'select',\\r\\n Attachment: 'attachment',\\r\\n EditableListView: 'actionableTable',\\r\\n LookupLog: 'actionableTable',\\r\\n LookupMatrix: 'select',\\r\\n Location: 'select',\\r\\n };\\r\\n\\r\\n return typeMap[field.type] ?? 'text';\\r\\n }\\r\\n}\\r\\n\",\"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div class=\\\"flex flex-col\\\">\\r\\n <div\\r\\n class=\\\"flex justify-between items-center bg-primary text-primary-contrast p-2 rounded-xl\\\"\\r\\n >\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"arrow.chevron-down\\\"\\r\\n class=\\\"transition-[rotate]\\\"\\r\\n [class.rotate-180]=\\\"expanded()\\\"\\r\\n (onClick)=\\\"toggleExpanded()\\\"\\r\\n ></mt-button>\\r\\n <span class=\\\"font-bold\\\">\\r\\n {{ sectionName() }}\\r\\n </span>\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.edit-02\\\"\\r\\n [tooltip]=\\\"t('edit-section')\\\"\\r\\n (onClick)=\\\"editSection($event)\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </div>\\r\\n @if (expanded()) {\\r\\n <div\\r\\n cdkDropList\\r\\n [id]=\\\"section().id\\\"\\r\\n cdkDropListOrientation=\\\"mixed\\\"\\r\\n [cdkDropListData]=\\\"fields()\\\"\\r\\n (cdkDropListDropped)=\\\"onDrop($event)\\\"\\r\\n class=\\\"grid grid-cols-12 gap-4 relative py-4\\\"\\r\\n [class.min-h-27]=\\\"fields().length === 0\\\"\\r\\n >\\r\\n @for (field of fields(); track field.id) {\\r\\n <div\\r\\n cdkDrag\\r\\n [cdkDragData]=\\\"field\\\"\\r\\n [cdkDragDisabled]=\\\"field._pending || field._deleting\\\"\\r\\n [class]=\\\"\\r\\n getFieldColSpan(field) + ' cursor-grab active:cursor-grabbing'\\r\\n \\\"\\r\\n >\\r\\n <div\\r\\n *cdkDragPlaceholder\\r\\n [class]=\\\"\\r\\n 'h-full min-h-27 bg-black/10 rounded-2xl ' +\\r\\n getFieldColSpan(field)\\r\\n \\\"\\r\\n ></div>\\r\\n @if (field._pending) {\\r\\n <!-- Skeleton for pending field -->\\r\\n <mt-card class=\\\"h-full animate-pulse\\\">\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <div class=\\\"flex-1 space-y-3\\\">\\r\\n <div class=\\\"h-4 bg-surface-200 rounded w-1/3\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"flex flex-col gap-1\\\">\\r\\n <div class=\\\"h-8 w-8 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-8 w-8 bg-surface-200 rounded\\\"></div>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n } @else {\\r\\n <mt-card\\r\\n class=\\\"h-full relative\\\"\\r\\n [class.opacity-50]=\\\"field._deleting\\\"\\r\\n >\\r\\n @if (field._deleting) {\\r\\n <div\\r\\n class=\\\"absolute inset-0 flex items-center justify-center bg-white/50 rounded-xl z-10\\\"\\r\\n >\\r\\n <div\\r\\n class=\\\"animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full\\\"\\r\\n ></div>\\r\\n </div>\\r\\n }\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <div class=\\\"flex-1\\\">\\r\\n <form [formGroup]=\\\"getFormGroup(field)\\\">\\r\\n <mt-dynamic-field\\r\\n [fieldName]=\\\"field.name\\\"\\r\\n [fieldConfig]=\\\"{\\r\\n label: field.name,\\r\\n readonly: true,\\r\\n type: getFieldType(field),\\r\\n }\\\"\\r\\n />\\r\\n </form>\\r\\n </div>\\r\\n <div class=\\\"flex flex-col gap-1\\\">\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.settings-01\\\"\\r\\n [tooltip]=\\\"t('edit-field')\\\"\\r\\n outlined\\r\\n [disabled]=\\\"field._deleting\\\"\\r\\n (onClick)=\\\"editField(field)\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.trash-01\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n [tooltip]=\\\"t('remove-field')\\\"\\r\\n [disabled]=\\\"field._deleting\\\"\\r\\n (onClick)=\\\"removeField($event, field)\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n } @empty {\\r\\n <mt-card class=\\\"absolute inset-0 top-4 h-full\\\" paddingless>\\r\\n <div class=\\\"size-full p-4\\\">\\r\\n <div\\r\\n class=\\\"flex justify-center items-center gap-4 h-full border-2 border-primary rounded-xl bg-primary-200 text-primary\\\"\\r\\n >\\r\\n <mt-icon icon=\\\"editor.move\\\" class=\\\"text-3xl\\\" />\\r\\n <span>{{ t(\\\"drag-from-the-side\\\") }}</span>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n</ng-container>\\r\\n\",\"import {\\r\\n Component,\\r\\n computed,\\r\\n effect,\\r\\n inject,\\r\\n input,\\r\\n signal,\\r\\n} from '@angular/core';\\r\\nimport { TranslocoDirective, TranslocoService } from '@jsverse/transloco';\\r\\nimport { ReactiveFormsModule, FormControl } from '@angular/forms';\\r\\nimport { DynamicForm } from '@masterteam/forms/dynamic-form';\\r\\nimport { DynamicFormConfig, DynamicFieldConfig } from '@masterteam/components';\\r\\nimport { Tabs } from '@masterteam/components/tabs';\\r\\nimport { ModalService } from '@masterteam/components/modal';\\r\\nimport { ModalRef } from '@masterteam/components/dialog';\\r\\nimport type { EnrichedFormSection } from '../form-builder.model';\\r\\n\\r\\ntype PreviewMode = 'create' | 'edit';\\r\\n\\r\\n@Component({\\r\\n selector: 'mt-fb-preview-form',\\r\\n standalone: true,\\r\\n imports: [TranslocoDirective, ReactiveFormsModule, DynamicForm, Tabs],\\r\\n templateUrl: './fb-preview-form.html',\\r\\n})\\r\\nexport class FBPreviewForm {\\r\\n protected readonly modalService = inject(ModalService);\\r\\n private readonly ref = inject(ModalRef);\\r\\n private readonly transloco = inject(TranslocoService);\\r\\n\\r\\n // Inputs\\r\\n readonly sections = input<EnrichedFormSection[]>([]);\\r\\n\\r\\n // Tab state\\r\\n readonly activeTab = signal<PreviewMode>('create');\\r\\n readonly isLoading = signal(false);\\r\\n readonly tabOptions = [\\r\\n {\\r\\n label: this.transloco.translate('formBuilder.create-form'),\\r\\n value: 'create',\\r\\n },\\r\\n { label: this.transloco.translate('formBuilder.edit-form'), value: 'edit' },\\r\\n ];\\r\\n\\r\\n // Form control for dynamic form\\r\\n readonly formControl = new FormControl();\\r\\n\\r\\n constructor() {\\r\\n // Show skeleton briefly when tab changes to force rebuild\\r\\n effect(() => {\\r\\n this.activeTab(); // Track tab changes\\r\\n this.isLoading.set(true);\\r\\n setTimeout(() => this.isLoading.set(false), 50);\\r\\n });\\r\\n }\\r\\n\\r\\n // Convert enriched sections to DynamicFormConfig based on active tab\\r\\n readonly formConfig = computed<DynamicFormConfig>(() => {\\r\\n const sections = this.sections();\\r\\n const mode = this.activeTab();\\r\\n\\r\\n return {\\r\\n sections: sections\\r\\n .map((section, sectionIndex) => {\\r\\n const lang = document.documentElement.lang as 'en' | 'ar';\\r\\n const sectionName = section.name[lang] ?? section.name['en'] ?? '';\\r\\n\\r\\n // Filter fields based on mode\\r\\n const visibleFields = section.fields.filter((field) => {\\r\\n if (mode === 'create') {\\r\\n return !field.hiddenInCreation;\\r\\n } else {\\r\\n return !field.hiddenInEditForm;\\r\\n }\\r\\n });\\r\\n\\r\\n return {\\r\\n key: section.id,\\r\\n label: sectionName,\\r\\n type: 'header' as const,\\r\\n columns: 12,\\r\\n order: section.order ?? sectionIndex,\\r\\n fields: visibleFields.map((field, fieldIndex) => {\\r\\n const colSpan = this.getColSpan(field.width);\\r\\n\\r\\n return {\\r\\n key: `field_${field.propertyId}`,\\r\\n label: field.name,\\r\\n type: this.mapFieldType(field.type),\\r\\n colSpan,\\r\\n order: field.order ?? fieldIndex,\\r\\n placeholder: field.name,\\r\\n } as DynamicFieldConfig;\\r\\n }),\\r\\n };\\r\\n })\\r\\n .filter((section) => section.fields.length > 0), // Hide empty sections\\r\\n };\\r\\n });\\r\\n\\r\\n /**\\r\\n * Map property view type to dynamic form field type\\r\\n */\\r\\n private mapFieldType(viewType: string): string {\\r\\n const typeMap: Record<string, string> = {\\r\\n text: 'text',\\r\\n number: 'number',\\r\\n date: 'date',\\r\\n select: 'select',\\r\\n multiselect: 'multiselect',\\r\\n toggle: 'toggle',\\r\\n checkbox: 'checkbox',\\r\\n textarea: 'textarea',\\r\\n editor: 'editor',\\r\\n color: 'color',\\r\\n slider: 'slider',\\r\\n radio: 'radio',\\r\\n 'radio-cards': 'radio-cards',\\r\\n upload: 'upload',\\r\\n 'user-search': 'user-search',\\r\\n };\\r\\n\\r\\n return typeMap[viewType?.toLowerCase()] ?? 'text';\\r\\n }\\r\\n\\r\\n /**\\r\\n * Convert field width to colSpan\\r\\n */\\r\\n private getColSpan(width: string): number {\\r\\n const widthMap: Record<string, number> = {\\r\\n '25': 3,\\r\\n '50': 6,\\r\\n '100': 12,\\r\\n };\\r\\n\\r\\n return widthMap[width] ?? 12;\\r\\n }\\r\\n\\r\\n onClose(): void {\\r\\n this.ref.close();\\r\\n }\\r\\n}\\r\\n\",\"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <!-- Tabs for Create/Edit mode -->\\r\\n <div class=\\\"flex justify-center mb-4\\\">\\r\\n <mt-tabs [options]=\\\"tabOptions\\\" [(active)]=\\\"activeTab\\\"></mt-tabs>\\r\\n </div>\\r\\n\\r\\n <div class=\\\"h-full overflow-y-auto pb-10\\\">\\r\\n @if (isLoading()) {\\r\\n <div class=\\\"space-y-4 animate-pulse\\\">\\r\\n <div class=\\\"h-6 bg-surface-200 rounded w-1/3\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded w-2/3\\\"></div>\\r\\n </div>\\r\\n } @else if (formConfig().sections.length > 0) {\\r\\n <mt-dynamic-form\\r\\n [formConfig]=\\\"formConfig()\\\"\\r\\n [formControl]=\\\"formControl\\\"\\r\\n >\\r\\n </mt-dynamic-form>\\r\\n } @else {\\r\\n <div\\r\\n class=\\\"flex justify-center items-center h-64 text-muted-color text-lg\\\"\\r\\n >\\r\\n {{ t(\\\"no-fields-visible\\\") }}\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n</ng-container>\\r\\n\",\"import {\\r\\n Component,\\r\\n computed,\\r\\n inject,\\r\\n input,\\r\\n signal,\\r\\n effect,\\r\\n} from '@angular/core';\\r\\nimport { CommonModule } from '@angular/common';\\r\\nimport { FormsModule } from '@angular/forms';\\r\\nimport { TabsModule } from 'primeng/tabs';\\r\\nimport { Button } from '@masterteam/components/button';\\r\\nimport { Card } from '@masterteam/components/card';\\r\\nimport { ModalService } from '@masterteam/components/modal';\\r\\nimport { ConfirmationService } from '@masterteam/components/confirmation';\\r\\nimport { TranslocoDirective, TranslocoService } from '@jsverse/transloco';\\r\\nimport { FBSection } from './fb-section/fb-section';\\r\\nimport { EnrichedFormSection, EnrichedFormField ,PropertyItem} from './form-builder.model';\\r\\nimport type { FieldWidth } from '../store/form-builder/form-builder.model';\\r\\nimport { CdkDragDrop, DragDropModule } from '@angular/cdk/drag-drop';\\r\\nimport { FBSectionForm } from './fb-section-form/fb-section-form';\\r\\nimport { FBPreviewForm } from './fb-preview-form/fb-preview-form';\\r\\nimport { FormBuilderFacade } from '../store/form-builder/form-builder.facade';\\r\\n\\r\\n@Component({\\r\\n selector: 'mt-form-builder',\\r\\n standalone: true,\\r\\n imports: [\\r\\n CommonModule,\\r\\n FormsModule,\\r\\n TabsModule,\\r\\n Button,\\r\\n Card,\\r\\n TranslocoDirective,\\r\\n FBSection,\\r\\n DragDropModule,\\r\\n ],\\r\\n templateUrl: './form-builder.html',\\r\\n styleUrl: './form-builder.scss',\\r\\n})\\r\\nexport class FormBuilder {\\r\\n private readonly modalService = inject(ModalService);\\r\\n private readonly confirmationService = inject(ConfirmationService);\\r\\n private readonly translocoService = inject(TranslocoService);\\r\\n protected readonly facade = inject(FormBuilderFacade);\\r\\n\\r\\n private dialogRef: any;\\r\\n\\r\\n // Inputs - only properties needed from parent\\r\\n readonly properties = input<PropertyItem[]>([]);\\r\\n\\r\\n // Local UI state\\r\\n readonly activeTab = signal<string>('system');\\r\\n\\r\\n // State from facade\\r\\n readonly sections = this.facade.sections;\\r\\n readonly isLoading = this.facade.isLoadingFormConfiguration;\\r\\n readonly error = this.facade.formConfigurationError;\\r\\n\\r\\n // Properties map for enrichment\\r\\n private readonly propertiesMap = computed(() => {\\r\\n const map = new Map<number, PropertyItem>();\\r\\n for (const prop of this.properties()) {\\r\\n map.set(prop.id, prop);\\r\\n }\\r\\n return map;\\r\\n });\\r\\n\\r\\n // Enrich sections with property data for UI display\\r\\n readonly enrichedSections = computed<EnrichedFormSection[]>(() => {\\r\\n const sections = this.sections();\\r\\n const propsMap = this.propertiesMap();\\r\\n const lang = document.documentElement.lang as 'en' | 'ar';\\r\\n\\r\\n return sections.map((section) => ({\\r\\n ...section,\\r\\n fields: section.fields.map((field): EnrichedFormField => {\\r\\n const prop = propsMap.get(field.propertyId);\\r\\n const propName = prop?.name;\\r\\n const name =\\r\\n typeof propName === 'string'\\r\\n ? propName\\r\\n : (propName?.[lang] ??\\r\\n propName?.['en'] ??\\r\\n `Property ${field.propertyId}`);\\r\\n\\r\\n return {\\r\\n ...field,\\r\\n name,\\r\\n type: prop?.viewType || 'text',\\r\\n data: prop,\\r\\n };\\r\\n }),\\r\\n }));\\r\\n });\\r\\n\\r\\n // Available properties for toolbox tabs\\r\\n readonly availableTabs = computed(() => {\\r\\n const tabs: Array<{\\r\\n id: string;\\r\\n title: string;\\r\\n properties: PropertyItem[];\\r\\n }> = [];\\r\\n const usedPropertyIds = new Set(\\r\\n this.sections().flatMap((s) => s.fields.map((f) => f.propertyId)),\\r\\n );\\r\\n\\r\\n const availableProps = this.properties().filter(\\r\\n (p) => !usedPropertyIds.has(p.id),\\r\\n );\\r\\n\\r\\n const systemProps = availableProps.filter((p) => p.isSystem);\\r\\n const customProps = availableProps.filter((p) => !p.isSystem);\\r\\n\\r\\n if (systemProps.length > 0) {\\r\\n tabs.push({ id: 'system', title: 'System', properties: systemProps });\\r\\n }\\r\\n if (customProps.length > 0) {\\r\\n tabs.push({ id: 'custom', title: 'Custom', properties: customProps });\\r\\n }\\r\\n\\r\\n return tabs;\\r\\n });\\r\\n\\r\\n constructor() {\\r\\n // Update active tab when tabs change\\r\\n effect(() => {\\r\\n const tabs = this.availableTabs();\\r\\n const currentTab = this.activeTab();\\r\\n if (tabs.length > 0 && !tabs.some((t) => t.id === currentTab)) {\\r\\n this.activeTab.set(tabs[0].id);\\r\\n }\\r\\n });\\r\\n }\\r\\n\\r\\n drop(event: CdkDragDrop<EnrichedFormField[] | PropertyItem[]>): void {\\r\\n const targetSectionId = event.container.id;\\r\\n\\r\\n if (event.previousContainer === event.container) {\\r\\n // Reordering within the same section\\r\\n const field = event.item.data as EnrichedFormField;\\r\\n\\r\\n // Update the field order via API\\r\\n this.facade.updateField(targetSectionId, field.id, {\\r\\n order: event.currentIndex,\\r\\n });\\r\\n } else if (event.previousContainer.id.startsWith('toolbox-')) {\\r\\n // Adding from toolbox\\r\\n const propertyItem = event.item.data as PropertyItem;\\r\\n this.facade.addField(targetSectionId, {\\r\\n propertyId: propertyItem.id,\\r\\n width: '100' as FieldWidth,\\r\\n order: event.currentIndex,\\r\\n hiddenInCreation: false,\\r\\n });\\r\\n } else {\\r\\n // Moving between sections\\r\\n const sourceSectionId = event.previousContainer.id;\\r\\n const field = event.item.data as EnrichedFormField;\\r\\n this.facade.moveField(sourceSectionId, field.id, {\\r\\n targetSectionId,\\r\\n order: event.currentIndex,\\r\\n });\\r\\n }\\r\\n }\\r\\n\\r\\n addSection(): void {\\r\\n this.dialogRef = this.modalService.openModal(FBSectionForm, 'drawer', {\\r\\n header: this.translocoService.translate('formBuilder.add-section'),\\r\\n height: '20vw',\\r\\n styleClass: '!w-100 !absolute ',\\r\\n position: 'end',\\r\\n appendTo: '#page-content',\\r\\n modal: true,\\r\\n inputValues: {\\r\\n sectionsCount: this.sections().length,\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n openPreview(): void {\\r\\n this.dialogRef = this.modalService.openModal(FBPreviewForm, 'drawer', {\\r\\n header: this.translocoService.translate('formBuilder.preview'),\\r\\n styleClass: '!w-[80vw] ',\\r\\n position: 'end',\\r\\n modal: true,\\r\\n inputValues: {\\r\\n sections: this.enrichedSections(),\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n resetFormConfiguration(): void {\\r\\n this.confirmationService.confirm({\\r\\n type: 'dialog',\\r\\n acceptButtonStyleClass: 'p-button-danger',\\r\\n accept: () => {\\r\\n this.facade.resetFormConfiguration();\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n noReturnPredicate = (): boolean => false;\\r\\n}\\r\\n\",\"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div class=\\\"flex gap-4 h-full w-full overflow-hidden\\\" cdkDropListGroup>\\r\\n @if (properties().length > 0) {\\r\\n <mt-card\\r\\n class=\\\"z-1 w-1/5 min-w-xs shrink-0 h-full flex flex-col overflow-hidden\\\"\\r\\n >\\r\\n <ng-template #headless>\\r\\n <!-- Header -->\\r\\n <div class=\\\"flex items-center justify-between px-4 pt-5\\\">\\r\\n <h3 class=\\\"text-xl font-semibold\\\">{{ t(\\\"form-elements\\\") }}</h3>\\r\\n </div>\\r\\n\\r\\n <!-- Tabs using PrimeNG -->\\r\\n <p-tabs\\r\\n [(value)]=\\\"activeTab\\\"\\r\\n styleClass=\\\"structure-tabs\\\"\\r\\n class=\\\"flex flex-1 flex-col min-h-0\\\"\\r\\n >\\r\\n <p-tablist class=\\\"shrink-0\\\">\\r\\n @for (tab of availableTabs(); track tab.id) {\\r\\n <p-tab [value]=\\\"tab.id\\\">{{ tab.title | titlecase }}</p-tab>\\r\\n }\\r\\n </p-tablist>\\r\\n <p-tabpanels class=\\\"!bg-transparent !p-0 flex-1 overflow-hidden\\\">\\r\\n @for (tab of availableTabs(); track tab.id) {\\r\\n <p-tabpanel [value]=\\\"tab.id\\\" class=\\\"h-full\\\">\\r\\n <!-- Node List -->\\r\\n <div\\r\\n class=\\\"space-y-1 p-4 [&_.cdk-drag-placeholder]:hidden h-full overflow-y-auto\\\"\\r\\n [id]=\\\"'toolbox-' + tab.id\\\"\\r\\n cdkDropList\\r\\n cdkDropListSortingDisabled\\r\\n [cdkDropListData]=\\\"tab.properties\\\"\\r\\n [cdkDropListEnterPredicate]=\\\"noReturnPredicate\\\"\\r\\n >\\r\\n @for (node of tab.properties; track $index) {\\r\\n <div\\r\\n cdkDrag\\r\\n [cdkDragData]=\\\"node\\\"\\r\\n class=\\\"group cursor-move select-none relative flex items-center gap-3 py-3 px-4 rounded-lg border border-dashed border-surface-300 hover:border-solid hover:bg-emphasis dark:border-surface-500 transition-colors\\\"\\r\\n >\\r\\n <div\\r\\n *cdkDragPlaceholder\\r\\n class=\\\"col-span-12 min-h-27 w-full rounded-2xl bg-black/10 z-1\\\"\\r\\n ></div>\\r\\n <span class=\\\"flex-1 text-base font-medium\\\">{{\\r\\n node.name\\r\\n }}</span>\\r\\n </div>\\r\\n }\\r\\n\\r\\n @if (tab.properties.length === 0) {\\r\\n <div class=\\\"py-8 text-center text-muted-color\\\">\\r\\n <p class=\\\"text-sm\\\">\\r\\n All {{ tab.title }} items are in use\\r\\n </p>\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </p-tabpanel>\\r\\n }\\r\\n </p-tabpanels>\\r\\n </p-tabs>\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n }\\r\\n\\r\\n <!-- Main Canvas Area -->\\r\\n <div class=\\\"flex flex-col gap-4 flex-1 w-full h-full overflow-y-auto\\\">\\r\\n <mt-card>\\r\\n <ng-template #headless>\\r\\n <div class=\\\"p-4 flex items-center gap-2\\\">\\r\\n <mt-button\\r\\n icon=\\\"layout.layout-top\\\"\\r\\n [label]=\\\"t('add-section')\\\"\\r\\n (onClick)=\\\"addSection()\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n icon=\\\"general.eye\\\"\\r\\n [label]=\\\"t('preview')\\\"\\r\\n (onClick)=\\\"openPreview()\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n icon=\\\"finance.credit-card-plus\\\"\\r\\n [label]=\\\"t('reset')\\\"\\r\\n (onClick)=\\\"resetFormConfiguration()\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n @for (section of enrichedSections(); track section.id) {\\r\\n <mt-fb-section\\r\\n [section]=\\\"section\\\"\\r\\n [sectionsCount]=\\\"enrichedSections().length\\\"\\r\\n [allSections]=\\\"enrichedSections()\\\"\\r\\n (onFieldDrop)=\\\"drop($event)\\\"\\r\\n >\\r\\n </mt-fb-section>\\r\\n } @empty {\\r\\n <mt-card>\\r\\n <div class=\\\"h-27 p-4\\\">\\r\\n <div\\r\\n class=\\\"flex justify-center items-center gap-4 h-full border-2 border-primary rounded-xl bg-primary-200 text-primary\\\"\\r\\n >\\r\\n <span>{{ t(\\\"no-section\\\") }}</span>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n</ng-container>\\r\\n\",\"/*\\r\\n * Public API Surface of form-builder\\r\\n */\\r\\n\\r\\nexport * from './lib/form-builder';\\r\\nexport * from './store/form-builder';\\r\\n\",\"/**\\n * Generated bundle index. Do not edit.\\n */\\n\\nexport * from './public-api';\\n\"],\"names\":[\"i1\"],\"mappings\":\";;;;;;;;;;;;;;;;;;;;;;;;;;AAQA;AACA;AACA;MAEa,aAAa,CAAA;AAGf,IAAA,UAAA;AACA,IAAA,QAAA;AACA,IAAA,gBAAA;AACA,IAAA,cAAA;AACA,IAAA,UAAA;AANT,IAAA,OAAgB,IAAI,GAAG,+BAA+B;IACtD,WAAA,CACS,UAAkB,EAClB,QAAyB,EACzB,gBAAyB,EACzB,cAAgC,EAChC,UAAmB,EAAA;QAJnB,IAAA,CAAA,UAAU,GAAV,UAAU;QACV,IAAA,CAAA,QAAQ,GAAR,QAAQ;QACR,IAAA,CAAA,gBAAgB,GAAhB,gBAAgB;QAChB,IAAA,CAAA,cAAc,GAAd,cAAc;QACd,IAAA,CAAA,UAAU,GAAV,UAAU;IAChB;;MAGQ,qBAAqB,CAAA;AAChC,IAAA,OAAgB,IAAI,GAAG,2BAA2B;;AAGpD;AACA;AACA;MAEa,oBAAoB,CAAA;AAC/B,IAAA,OAAgB,IAAI,GAAG,sCAAsC;;MAGlD,sBAAsB,CAAA;AACjC,IAAA,OAAgB,IAAI,GAAG,wCAAwC;;AAGjE;AACA;AACA;MAEa,UAAU,CAAA;AAEF,IAAA,OAAA;AADnB,IAAA,OAAgB,IAAI,GAAG,2BAA2B;AAClD,IAAA,WAAA,CAAmB,OAA0B,EAAA;QAA1B,IAAA,CAAA,OAAO,GAAP,OAAO;IAAsB;;MAGrC,aAAa,CAAA;AAGf,IAAA,SAAA;AACA,IAAA,OAAA;AAHT,IAAA,OAAgB,IAAI,GAAG,8BAA8B;IACrD,WAAA,CACS,SAAiB,EACjB,OAA6B,EAAA;QAD7B,IAAA,CAAA,SAAS,GAAT,SAAS;QACT,IAAA,CAAA,OAAO,GAAP,OAAO;IACb;;MAGQ,aAAa,CAAA;AAEL,IAAA,SAAA;AADnB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EAAA,CAAA,gBAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,eAAA,EAAA,gBAAA,EAAA,cAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,kBAAA,EAAA,QAAA,EAAA,iCAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA;;2FAKL,WAAW,EAAA,UAAA,EAAA,CAAA;kBAhBvB,SAAS;+BACE,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,OAAA,EACP;wBACP,YAAY;wBACZ,WAAW;wBACX,UAAU;wBACV,MAAM;wBACN,IAAI;wBACJ,kBAAkB;wBAClB,SAAS;wBACT,cAAc;AACf,qBAAA,EAAA,QAAA,EAAA,ykJAAA,EAAA,MAAA,EAAA,CAAA,gKAAA,CAAA,EAAA;;;AEpCH;;AAEG;;ACFH;;AAEG;;;;\"}","type":"asset"}]}
1
+ {"hash":"b8a53df749697bbc22eb05d32eff46ade166b68c370e1a682635bda24c42f082","types":[{"exports":["AddField","AddFieldPayload","AddSection","AddSectionPayload","DeleteField","DeleteSection","EnrichedFormField","EnrichedFormSection","FieldWidth","FormBuilder","FormBuilderActionKey","FormBuilderFacade","FormBuilderState","FormBuilderStateModel","FormConfiguration","FormField","FormSection","GetFormConfiguration","MoveField","MoveFieldPayload","PropertyItem","ReorderFieldPayload","ReorderFields","ResetFormBuilderState","ResetFormConfiguration","Response","SetModuleInfo","SetProperties","UpdateField","UpdateFieldPayload","UpdateSection","UpdateSectionPayload"],"facadeModuleId":"C:\\Users\\ABDULLAH WISHAH\\Documents\\GitHub\\components\\dist\\masterteam\\form-builder\\tmp-typings\\masterteam-form-builder.d.ts","isDynamicEntry":false,"isEntry":true,"isImplicitEntry":false,"moduleIds":["C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/store/form-builder/form-builder.model.d.ts","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/store/form-builder/form-builder.facade.d.ts","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/lib/form-builder.d.ts","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/store/form-builder/api.model.d.ts","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/store/form-builder/form-builder.actions.d.ts","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/store/form-builder/form-builder.state.d.ts","C:\\Users\\ABDULLAH WISHAH\\Documents\\GitHub\\components\\dist\\masterteam\\form-builder\\tmp-typings\\masterteam-form-builder.d.ts"],"name":"masterteam-form-builder.d","type":"chunk","dynamicImports":[],"fileName":"masterteam-form-builder.d.ts","implicitlyLoadedBefore":[],"importedBindings":{"@masterteam/form-builder":["*"],"@angular/core":["*"],"@masterteam/components":["LoadingStateShape","CrudStateBase","Response"],"@angular/cdk/drag-drop":["CdkDragDrop"],"rxjs":["*"],"@ngxs/store":["StateContext"]},"imports":["@masterteam/form-builder","@angular/core","@masterteam/components","@angular/cdk/drag-drop","rxjs","@ngxs/store"],"modules":{"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/store/form-builder/form-builder.model.d.ts":{"code":"declare enum FormBuilderActionKey {\n GetFormConfiguration = \"getFormConfiguration\",\n ResetFormConfiguration = \"resetFormConfiguration\",\n AddSection = \"addSection\",\n UpdateSection = \"updateSection\",\n DeleteSection = \"deleteSection\",\n AddField = \"addField\",\n UpdateField = \"updateField\",\n DeleteField = \"deleteField\",\n MoveField = \"moveField\",\n ReorderFields = \"reorderFields\"\n}\ntype FieldWidth = '25' | '50' | '100';\ninterface FormField {\n id: string;\n sectionId: string;\n propertyId: number;\n width: FieldWidth;\n order: number;\n hiddenInCreation?: boolean;\n hiddenInEditForm?: boolean;\n isRequired?: boolean;\n showConditionalDisplayFormula?: boolean;\n conditionalDisplayFormula?: string;\n _pending?: boolean;\n _deleting?: boolean;\n}\ninterface FormSection {\n id: string;\n name: {\n en: string;\n ar: string;\n };\n order: number;\n fields: FormField[];\n}\ninterface FormConfiguration {\n isActive: boolean;\n sections: FormSection[];\n}\ninterface AddSectionPayload {\n name: {\n en: string;\n ar: string;\n };\n order?: number;\n}\ninterface UpdateSectionPayload {\n name?: {\n en: string;\n ar: string;\n };\n order?: number;\n}\ninterface AddFieldPayload {\n propertyId: number;\n width: FieldWidth;\n order?: number;\n hiddenInCreation?: boolean;\n hiddenInEditForm?: boolean;\n isRequired?: boolean;\n showConditionalDisplayFormula?: boolean;\n conditionalDisplayFormula?: string;\n}\ninterface UpdateFieldPayload {\n width?: FieldWidth;\n order?: number;\n hiddenInCreation?: boolean;\n hiddenInEditForm?: boolean;\n isRequired?: boolean;\n showConditionalDisplayFormula?: boolean;\n conditionalDisplayFormula?: string | null;\n}\ninterface MoveFieldPayload {\n targetSectionId: string;\n order?: number;\n}\ninterface ReorderFieldPayload {\n id: string;\n order: number;\n}\ninterface PropertyItem {\n id: number;\n name: string | Record<string, string>;\n viewType?: string;\n [key: string]: any;\n}\ninterface EnrichedFormField extends FormField {\n name: string;\n type: string;\n data?: any;\n}\ninterface EnrichedFormSection extends Omit<FormSection, 'fields'> {\n fields: EnrichedFormField[];\n}\ninterface FormBuilderStateModel extends LoadingStateShape<FormBuilderActionKey> {\n moduleType: string | null;\n moduleId: string | number | null;\n parentModuleType: string | null;\n parentModuleId: string | number | null;\n parentPath: string;\n formConfiguration: FormConfiguration | null;\n properties: PropertyItem[];\n}","originalLength":2781,"removedExports":[],"renderedExports":["FormBuilderActionKey","FieldWidth","FormField","FormSection","FormConfiguration","AddSectionPayload","UpdateSectionPayload","AddFieldPayload","UpdateFieldPayload","MoveFieldPayload","ReorderFieldPayload","PropertyItem","EnrichedFormField","EnrichedFormSection","FormBuilderStateModel"],"renderedLength":2610},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/store/form-builder/form-builder.facade.d.ts":{"code":"declare class FormBuilderFacade {\n private readonly store;\n private readonly stateSignal;\n readonly formConfiguration: _angular_core.Signal<_masterteam_form_builder.FormConfiguration | null>;\n readonly sections: _angular_core.Signal<_masterteam_form_builder.FormSection[]>;\n readonly properties: _angular_core.Signal<PropertyItem[]>;\n readonly moduleType: _angular_core.Signal<string | null>;\n readonly moduleId: _angular_core.Signal<string | number | null>;\n readonly isLoadingFormConfiguration: _angular_core.Signal<boolean>;\n readonly isResettingFormConfiguration: _angular_core.Signal<boolean>;\n readonly isAddingSection: _angular_core.Signal<boolean>;\n readonly isUpdatingSection: _angular_core.Signal<boolean>;\n readonly isDeletingSection: _angular_core.Signal<boolean>;\n readonly isAddingField: _angular_core.Signal<boolean>;\n readonly isUpdatingField: _angular_core.Signal<boolean>;\n readonly isDeletingField: _angular_core.Signal<boolean>;\n readonly isMovingField: _angular_core.Signal<boolean>;\n readonly formConfigurationError: _angular_core.Signal<string | null>;\n readonly sectionError: _angular_core.Signal<string | null>;\n readonly fieldError: _angular_core.Signal<string | null>;\n setModuleInfo(moduleType: string, moduleId: string | number, parentModuleType?: string, parentModuleId?: string | number, parentPath?: string): rxjs.Observable<void>;\n resetState(): rxjs.Observable<void>;\n setProperties(properties: PropertyItem[]): rxjs.Observable<void>;\n getFormConfiguration(): rxjs.Observable<void>;\n resetFormConfiguration(): rxjs.Observable<void>;\n addSection(payload: AddSectionPayload): rxjs.Observable<void>;\n updateSection(sectionId: string, payload: UpdateSectionPayload): rxjs.Observable<void>;\n deleteSection(sectionId: string): rxjs.Observable<void>;\n addField(sectionId: string, payload: AddFieldPayload): rxjs.Observable<void>;\n updateField(sectionId: string, fieldId: string, payload: UpdateFieldPayload): rxjs.Observable<void>;\n deleteField(sectionId: string, fieldId: string): rxjs.Observable<void>;\n reorderFields(sectionId: string, payload: ReorderFieldPayload[]): rxjs.Observable<void>;\n moveField(sectionId: string, fieldId: string, payload: MoveFieldPayload): rxjs.Observable<void>;\n static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormBuilderFacade, never>;\n static ɵprov: _angular_core.ɵɵInjectableDeclaration<FormBuilderFacade>;\n}","originalLength":2985,"removedExports":[],"renderedExports":["FormBuilderFacade"],"renderedLength":2472},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/lib/form-builder.d.ts":{"code":"declare class FormBuilder {\n private readonly modalService;\n private readonly confirmationService;\n private readonly translocoService;\n protected readonly facade: FormBuilderFacade;\n private dialogRef;\n readonly activeTab: _angular_core.WritableSignal<string>;\n readonly sections: _angular_core.Signal<_masterteam_form_builder.FormSection[]>;\n readonly properties: _angular_core.Signal<PropertyItem[]>;\n readonly isLoading: _angular_core.Signal<boolean>;\n readonly error: _angular_core.Signal<string | null>;\n private readonly propertiesMap;\n readonly enrichedSections: _angular_core.Signal<EnrichedFormSection[]>;\n readonly availableTabs: _angular_core.Signal<{\n id: string;\n title: string;\n properties: PropertyItem[];\n }[]>;\n constructor();\n drop(event: CdkDragDrop<EnrichedFormField[] | PropertyItem[]>): void;\n addSection(): void;\n openPreview(): void;\n resetFormConfiguration(): void;\n noReturnPredicate: () => boolean;\n static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormBuilder, never>;\n static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormBuilder, \"mt-form-builder\", never, {}, {}, never, never, true, never>;\n}","originalLength":1564,"removedExports":[],"renderedExports":["FormBuilder"],"renderedLength":1210},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/store/form-builder/api.model.d.ts":{"code":"/**\n * Standard API Response wrapper\n */\ninterface Response<T> {\n endpoint: string;\n status: number;\n code: number;\n locale: string;\n message?: string | null;\n errors?: any | null;\n data: T;\n cacheSession?: string;\n}","originalLength":248,"removedExports":[],"renderedExports":["Response"],"renderedLength":240},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/store/form-builder/form-builder.actions.d.ts":{"code":"declare class SetModuleInfo {\n moduleType: string;\n moduleId: string | number;\n parentModuleType?: string | undefined;\n parentModuleId?: string | number | undefined;\n parentPath?: string | undefined;\n static readonly type = \"[FormBuilder] Set Module Info\";\n constructor(moduleType: string, moduleId: string | number, parentModuleType?: string | undefined, parentModuleId?: string | number | undefined, parentPath?: string | undefined);\n}\ndeclare class ResetFormBuilderState {\n static readonly type = \"[FormBuilder] Reset State\";\n}\ndeclare class SetProperties {\n properties: PropertyItem[];\n static readonly type = \"[FormBuilder] Set Properties\";\n constructor(properties: PropertyItem[]);\n}\ndeclare class GetFormConfiguration {\n static readonly type = \"[FormBuilder] Get Form Configuration\";\n}\ndeclare class ResetFormConfiguration {\n static readonly type = \"[FormBuilder] Reset Form Configuration\";\n}\ndeclare class AddSection {\n payload: AddSectionPayload;\n static readonly type = \"[FormBuilder] Add Section\";\n constructor(payload: AddSectionPayload);\n}\ndeclare class UpdateSection {\n sectionId: string;\n payload: UpdateSectionPayload;\n static readonly type = \"[FormBuilder] Update Section\";\n constructor(sectionId: string, payload: UpdateSectionPayload);\n}\ndeclare class DeleteSection {\n sectionId: string;\n static readonly type = \"[FormBuilder] Delete Section\";\n constructor(sectionId: string);\n}\ndeclare class AddField {\n sectionId: string;\n payload: AddFieldPayload;\n static readonly type = \"[FormBuilder] Add Field\";\n constructor(sectionId: string, payload: AddFieldPayload);\n}\ndeclare class UpdateField {\n sectionId: string;\n fieldId: string;\n payload: UpdateFieldPayload;\n static readonly type = \"[FormBuilder] Update Field\";\n constructor(sectionId: string, fieldId: string, payload: UpdateFieldPayload);\n}\ndeclare class DeleteField {\n sectionId: string;\n fieldId: string;\n static readonly type = \"[FormBuilder] Delete Field\";\n constructor(sectionId: string, fieldId: string);\n}\ndeclare class ReorderFields {\n sectionId: string;\n payload: ReorderFieldPayload[];\n static readonly type = \"[FormBuilder] Reorder Fields\";\n constructor(sectionId: string, payload: ReorderFieldPayload[]);\n}\ndeclare class MoveField {\n sectionId: string;\n fieldId: string;\n payload: MoveFieldPayload;\n static readonly type = \"[FormBuilder] Move Field\";\n constructor(sectionId: string, fieldId: string, payload: MoveFieldPayload);\n}","originalLength":2815,"removedExports":[],"renderedExports":["SetModuleInfo","ResetFormBuilderState","SetProperties","GetFormConfiguration","ResetFormConfiguration","AddSection","UpdateSection","DeleteSection","AddField","UpdateField","DeleteField","ReorderFields","MoveField"],"renderedLength":2548},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-typings/store/form-builder/form-builder.state.d.ts":{"code":"declare class FormBuilderState extends CrudStateBase<FormSection, FormBuilderStateModel, FormBuilderActionKey> {\n private http;\n private baseUrl;\n private getApiPath;\n static getState(state: FormBuilderStateModel): FormBuilderStateModel;\n static getFormConfiguration(state: FormBuilderStateModel): FormConfiguration | null;\n static getSections(state: FormBuilderStateModel): FormSection[];\n static getModuleType(state: FormBuilderStateModel): string | null;\n static getModuleId(state: FormBuilderStateModel): string | number | null;\n static getProperties(state: FormBuilderStateModel): _masterteam_form_builder.PropertyItem[];\n setModuleInfo(ctx: StateContext<FormBuilderStateModel>, action: SetModuleInfo): void;\n resetState(ctx: StateContext<FormBuilderStateModel>): void;\n setProperties(ctx: StateContext<FormBuilderStateModel>, action: SetProperties): void;\n getFormConfiguration(ctx: StateContext<FormBuilderStateModel>): rxjs.Observable<Response$1<FormConfiguration>>;\n resetFormConfiguration(ctx: StateContext<FormBuilderStateModel>): rxjs.Observable<Response$1<FormConfiguration>>;\n addSection(ctx: StateContext<FormBuilderStateModel>, action: AddSection): rxjs.Observable<Response$1<FormSection>>;\n updateSection(ctx: StateContext<FormBuilderStateModel>, action: UpdateSection): rxjs.Observable<Response$1<FormSection>>;\n deleteSection(ctx: StateContext<FormBuilderStateModel>, action: DeleteSection): rxjs.Observable<Response$1<{\n id: string;\n }>>;\n addField(ctx: StateContext<FormBuilderStateModel>, action: AddField): rxjs.Observable<Response$1<FormField>>;\n updateField(ctx: StateContext<FormBuilderStateModel>, action: UpdateField): rxjs.Observable<Response$1<FormField>>;\n deleteField(ctx: StateContext<FormBuilderStateModel>, action: DeleteField): rxjs.Observable<Response$1<{\n id: string;\n sectionId: string;\n }>>;\n reorderFields(ctx: StateContext<FormBuilderStateModel>, action: ReorderFields): rxjs.Observable<Response$1<FormField[]>>;\n moveField(ctx: StateContext<FormBuilderStateModel>, action: MoveField): rxjs.Observable<Response$1<FormField>>;\n static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormBuilderState, never>;\n static ɵprov: _angular_core.ɵɵInjectableDeclaration<FormBuilderState>;\n}","originalLength":2840,"removedExports":[],"renderedExports":["FormBuilderState"],"renderedLength":2315},"C:\\Users\\ABDULLAH WISHAH\\Documents\\GitHub\\components\\dist\\masterteam\\form-builder\\tmp-typings\\masterteam-form-builder.d.ts":{"code":null,"originalLength":129,"removedExports":[],"renderedExports":[],"renderedLength":0}},"referencedFiles":[],"code":"import * as _masterteam_form_builder from '@masterteam/form-builder';\nimport * as _angular_core from '@angular/core';\nimport { LoadingStateShape, CrudStateBase, Response as Response$1 } from '@masterteam/components';\nimport { CdkDragDrop } from '@angular/cdk/drag-drop';\nimport * as rxjs from 'rxjs';\nimport { StateContext } from '@ngxs/store';\n\ndeclare enum FormBuilderActionKey {\n GetFormConfiguration = \"getFormConfiguration\",\n ResetFormConfiguration = \"resetFormConfiguration\",\n AddSection = \"addSection\",\n UpdateSection = \"updateSection\",\n DeleteSection = \"deleteSection\",\n AddField = \"addField\",\n UpdateField = \"updateField\",\n DeleteField = \"deleteField\",\n MoveField = \"moveField\",\n ReorderFields = \"reorderFields\"\n}\ntype FieldWidth = '25' | '50' | '100';\ninterface FormField {\n id: string;\n sectionId: string;\n propertyId: number;\n width: FieldWidth;\n order: number;\n hiddenInCreation?: boolean;\n hiddenInEditForm?: boolean;\n isRequired?: boolean;\n showConditionalDisplayFormula?: boolean;\n conditionalDisplayFormula?: string;\n _pending?: boolean;\n _deleting?: boolean;\n}\ninterface FormSection {\n id: string;\n name: {\n en: string;\n ar: string;\n };\n order: number;\n fields: FormField[];\n}\ninterface FormConfiguration {\n isActive: boolean;\n sections: FormSection[];\n}\ninterface AddSectionPayload {\n name: {\n en: string;\n ar: string;\n };\n order?: number;\n}\ninterface UpdateSectionPayload {\n name?: {\n en: string;\n ar: string;\n };\n order?: number;\n}\ninterface AddFieldPayload {\n propertyId: number;\n width: FieldWidth;\n order?: number;\n hiddenInCreation?: boolean;\n hiddenInEditForm?: boolean;\n isRequired?: boolean;\n showConditionalDisplayFormula?: boolean;\n conditionalDisplayFormula?: string;\n}\ninterface UpdateFieldPayload {\n width?: FieldWidth;\n order?: number;\n hiddenInCreation?: boolean;\n hiddenInEditForm?: boolean;\n isRequired?: boolean;\n showConditionalDisplayFormula?: boolean;\n conditionalDisplayFormula?: string | null;\n}\ninterface MoveFieldPayload {\n targetSectionId: string;\n order?: number;\n}\ninterface ReorderFieldPayload {\n id: string;\n order: number;\n}\ninterface PropertyItem {\n id: number;\n name: string | Record<string, string>;\n viewType?: string;\n [key: string]: any;\n}\ninterface EnrichedFormField extends FormField {\n name: string;\n type: string;\n data?: any;\n}\ninterface EnrichedFormSection extends Omit<FormSection, 'fields'> {\n fields: EnrichedFormField[];\n}\ninterface FormBuilderStateModel extends LoadingStateShape<FormBuilderActionKey> {\n moduleType: string | null;\n moduleId: string | number | null;\n parentModuleType: string | null;\n parentModuleId: string | number | null;\n parentPath: string;\n formConfiguration: FormConfiguration | null;\n properties: PropertyItem[];\n}\n\ndeclare class FormBuilderFacade {\n private readonly store;\n private readonly stateSignal;\n readonly formConfiguration: _angular_core.Signal<_masterteam_form_builder.FormConfiguration | null>;\n readonly sections: _angular_core.Signal<_masterteam_form_builder.FormSection[]>;\n readonly properties: _angular_core.Signal<PropertyItem[]>;\n readonly moduleType: _angular_core.Signal<string | null>;\n readonly moduleId: _angular_core.Signal<string | number | null>;\n readonly isLoadingFormConfiguration: _angular_core.Signal<boolean>;\n readonly isResettingFormConfiguration: _angular_core.Signal<boolean>;\n readonly isAddingSection: _angular_core.Signal<boolean>;\n readonly isUpdatingSection: _angular_core.Signal<boolean>;\n readonly isDeletingSection: _angular_core.Signal<boolean>;\n readonly isAddingField: _angular_core.Signal<boolean>;\n readonly isUpdatingField: _angular_core.Signal<boolean>;\n readonly isDeletingField: _angular_core.Signal<boolean>;\n readonly isMovingField: _angular_core.Signal<boolean>;\n readonly formConfigurationError: _angular_core.Signal<string | null>;\n readonly sectionError: _angular_core.Signal<string | null>;\n readonly fieldError: _angular_core.Signal<string | null>;\n setModuleInfo(moduleType: string, moduleId: string | number, parentModuleType?: string, parentModuleId?: string | number, parentPath?: string): rxjs.Observable<void>;\n resetState(): rxjs.Observable<void>;\n setProperties(properties: PropertyItem[]): rxjs.Observable<void>;\n getFormConfiguration(): rxjs.Observable<void>;\n resetFormConfiguration(): rxjs.Observable<void>;\n addSection(payload: AddSectionPayload): rxjs.Observable<void>;\n updateSection(sectionId: string, payload: UpdateSectionPayload): rxjs.Observable<void>;\n deleteSection(sectionId: string): rxjs.Observable<void>;\n addField(sectionId: string, payload: AddFieldPayload): rxjs.Observable<void>;\n updateField(sectionId: string, fieldId: string, payload: UpdateFieldPayload): rxjs.Observable<void>;\n deleteField(sectionId: string, fieldId: string): rxjs.Observable<void>;\n reorderFields(sectionId: string, payload: ReorderFieldPayload[]): rxjs.Observable<void>;\n moveField(sectionId: string, fieldId: string, payload: MoveFieldPayload): rxjs.Observable<void>;\n static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormBuilderFacade, never>;\n static ɵprov: _angular_core.ɵɵInjectableDeclaration<FormBuilderFacade>;\n}\n\ndeclare class FormBuilder {\n private readonly modalService;\n private readonly confirmationService;\n private readonly translocoService;\n protected readonly facade: FormBuilderFacade;\n private dialogRef;\n readonly activeTab: _angular_core.WritableSignal<string>;\n readonly sections: _angular_core.Signal<_masterteam_form_builder.FormSection[]>;\n readonly properties: _angular_core.Signal<PropertyItem[]>;\n readonly isLoading: _angular_core.Signal<boolean>;\n readonly error: _angular_core.Signal<string | null>;\n private readonly propertiesMap;\n readonly enrichedSections: _angular_core.Signal<EnrichedFormSection[]>;\n readonly availableTabs: _angular_core.Signal<{\n id: string;\n title: string;\n properties: PropertyItem[];\n }[]>;\n constructor();\n drop(event: CdkDragDrop<EnrichedFormField[] | PropertyItem[]>): void;\n addSection(): void;\n openPreview(): void;\n resetFormConfiguration(): void;\n noReturnPredicate: () => boolean;\n static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormBuilder, never>;\n static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormBuilder, \"mt-form-builder\", never, {}, {}, never, never, true, never>;\n}\n\n/**\n * Standard API Response wrapper\n */\ninterface Response<T> {\n endpoint: string;\n status: number;\n code: number;\n locale: string;\n message?: string | null;\n errors?: any | null;\n data: T;\n cacheSession?: string;\n}\n\ndeclare class SetModuleInfo {\n moduleType: string;\n moduleId: string | number;\n parentModuleType?: string | undefined;\n parentModuleId?: string | number | undefined;\n parentPath?: string | undefined;\n static readonly type = \"[FormBuilder] Set Module Info\";\n constructor(moduleType: string, moduleId: string | number, parentModuleType?: string | undefined, parentModuleId?: string | number | undefined, parentPath?: string | undefined);\n}\ndeclare class ResetFormBuilderState {\n static readonly type = \"[FormBuilder] Reset State\";\n}\ndeclare class SetProperties {\n properties: PropertyItem[];\n static readonly type = \"[FormBuilder] Set Properties\";\n constructor(properties: PropertyItem[]);\n}\ndeclare class GetFormConfiguration {\n static readonly type = \"[FormBuilder] Get Form Configuration\";\n}\ndeclare class ResetFormConfiguration {\n static readonly type = \"[FormBuilder] Reset Form Configuration\";\n}\ndeclare class AddSection {\n payload: AddSectionPayload;\n static readonly type = \"[FormBuilder] Add Section\";\n constructor(payload: AddSectionPayload);\n}\ndeclare class UpdateSection {\n sectionId: string;\n payload: UpdateSectionPayload;\n static readonly type = \"[FormBuilder] Update Section\";\n constructor(sectionId: string, payload: UpdateSectionPayload);\n}\ndeclare class DeleteSection {\n sectionId: string;\n static readonly type = \"[FormBuilder] Delete Section\";\n constructor(sectionId: string);\n}\ndeclare class AddField {\n sectionId: string;\n payload: AddFieldPayload;\n static readonly type = \"[FormBuilder] Add Field\";\n constructor(sectionId: string, payload: AddFieldPayload);\n}\ndeclare class UpdateField {\n sectionId: string;\n fieldId: string;\n payload: UpdateFieldPayload;\n static readonly type = \"[FormBuilder] Update Field\";\n constructor(sectionId: string, fieldId: string, payload: UpdateFieldPayload);\n}\ndeclare class DeleteField {\n sectionId: string;\n fieldId: string;\n static readonly type = \"[FormBuilder] Delete Field\";\n constructor(sectionId: string, fieldId: string);\n}\ndeclare class ReorderFields {\n sectionId: string;\n payload: ReorderFieldPayload[];\n static readonly type = \"[FormBuilder] Reorder Fields\";\n constructor(sectionId: string, payload: ReorderFieldPayload[]);\n}\ndeclare class MoveField {\n sectionId: string;\n fieldId: string;\n payload: MoveFieldPayload;\n static readonly type = \"[FormBuilder] Move Field\";\n constructor(sectionId: string, fieldId: string, payload: MoveFieldPayload);\n}\n\ndeclare class FormBuilderState extends CrudStateBase<FormSection, FormBuilderStateModel, FormBuilderActionKey> {\n private http;\n private baseUrl;\n private getApiPath;\n static getState(state: FormBuilderStateModel): FormBuilderStateModel;\n static getFormConfiguration(state: FormBuilderStateModel): FormConfiguration | null;\n static getSections(state: FormBuilderStateModel): FormSection[];\n static getModuleType(state: FormBuilderStateModel): string | null;\n static getModuleId(state: FormBuilderStateModel): string | number | null;\n static getProperties(state: FormBuilderStateModel): _masterteam_form_builder.PropertyItem[];\n setModuleInfo(ctx: StateContext<FormBuilderStateModel>, action: SetModuleInfo): void;\n resetState(ctx: StateContext<FormBuilderStateModel>): void;\n setProperties(ctx: StateContext<FormBuilderStateModel>, action: SetProperties): void;\n getFormConfiguration(ctx: StateContext<FormBuilderStateModel>): rxjs.Observable<Response$1<FormConfiguration>>;\n resetFormConfiguration(ctx: StateContext<FormBuilderStateModel>): rxjs.Observable<Response$1<FormConfiguration>>;\n addSection(ctx: StateContext<FormBuilderStateModel>, action: AddSection): rxjs.Observable<Response$1<FormSection>>;\n updateSection(ctx: StateContext<FormBuilderStateModel>, action: UpdateSection): rxjs.Observable<Response$1<FormSection>>;\n deleteSection(ctx: StateContext<FormBuilderStateModel>, action: DeleteSection): rxjs.Observable<Response$1<{\n id: string;\n }>>;\n addField(ctx: StateContext<FormBuilderStateModel>, action: AddField): rxjs.Observable<Response$1<FormField>>;\n updateField(ctx: StateContext<FormBuilderStateModel>, action: UpdateField): rxjs.Observable<Response$1<FormField>>;\n deleteField(ctx: StateContext<FormBuilderStateModel>, action: DeleteField): rxjs.Observable<Response$1<{\n id: string;\n sectionId: string;\n }>>;\n reorderFields(ctx: StateContext<FormBuilderStateModel>, action: ReorderFields): rxjs.Observable<Response$1<FormField[]>>;\n moveField(ctx: StateContext<FormBuilderStateModel>, action: MoveField): rxjs.Observable<Response$1<FormField>>;\n static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormBuilderState, never>;\n static ɵprov: _angular_core.ɵɵInjectableDeclaration<FormBuilderState>;\n}\n\nexport { AddField, AddSection, DeleteField, DeleteSection, FormBuilder, FormBuilderActionKey, FormBuilderFacade, FormBuilderState, GetFormConfiguration, MoveField, ReorderFields, ResetFormBuilderState, ResetFormConfiguration, SetModuleInfo, SetProperties, UpdateField, UpdateSection };\nexport type { AddFieldPayload, AddSectionPayload, EnrichedFormField, EnrichedFormSection, FieldWidth, FormBuilderStateModel, FormConfiguration, FormField, FormSection, MoveFieldPayload, PropertyItem, ReorderFieldPayload, Response, UpdateFieldPayload, UpdateSectionPayload };\n","map":null,"preliminaryFileName":"masterteam-form-builder.d.ts","sourcemapFileName":null}],"fesm2022":[{"exports":["AddField","AddSection","DeleteField","DeleteSection","FormBuilder","FormBuilderActionKey","FormBuilderFacade","FormBuilderState","GetFormConfiguration","MoveField","ReorderFields","ResetFormBuilderState","ResetFormConfiguration","SetModuleInfo","SetProperties","UpdateField","UpdateSection"],"facadeModuleId":"C:\\Users\\ABDULLAH WISHAH\\Documents\\GitHub\\components\\dist\\masterteam\\form-builder\\tmp-esm2022\\masterteam-form-builder.js","isDynamicEntry":false,"isEntry":true,"isImplicitEntry":false,"moduleIds":["C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/store/form-builder/api.model.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/store/form-builder/form-builder.actions.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/store/form-builder/form-builder.model.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/store/form-builder/form-builder.state.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/store/form-builder/form-builder.facade.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/store/form-builder/index.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/fb-field-conditions/condition-constants.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/fb-field-conditions/fb-field-conditions.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/fb-field-form/fb-field-form.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/fb-section-form/fb-section-form.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/fb-section/fb-section.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/fb-preview-form/fb-preview-form.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/form-builder.js","C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/public-api.js","C:\\Users\\ABDULLAH WISHAH\\Documents\\GitHub\\components\\dist\\masterteam\\form-builder\\tmp-esm2022\\masterteam-form-builder.js"],"name":"masterteam-form-builder","type":"chunk","dynamicImports":[],"fileName":"masterteam-form-builder.mjs","implicitlyLoadedBefore":[],"importedBindings":{"@angular/core":["inject","*","Injectable","computed","input","signal","viewChild","Component","effect","output"],"@angular/common":["CommonModule","*"],"@angular/forms":["FormControl","ReactiveFormsModule","*","FormGroup","FormsModule"],"primeng/tabs":["TabsModule","*"],"primeng/skeleton":["SkeletonModule","*"],"@masterteam/components/button":["Button"],"@masterteam/components/card":["Card"],"@masterteam/components/modal":["ModalService"],"@masterteam/components/confirmation":["ConfirmationService"],"@jsverse/transloco":["TranslocoDirective","TranslocoService"],"@angular/cdk/drag-drop":["CdkDrag","CdkDropList","CdkDragPlaceholder","DragDropModule","*"],"@masterteam/forms/dynamic-field":["DynamicField"],"@masterteam/icons":["Icon"],"@ngxs/store":["Action","Selector","State","Store","select"],"@angular/common/http":["HttpClient"],"@masterteam/components":["CrudStateBase","handleApiRequest","RadioCardsFieldConfig"],"@masterteam/forms/dynamic-form":["DynamicForm"],"@masterteam/components/toggle-field":["ToggleField"],"@masterteam/components/dialog":["ModalRef"],"@masterteam/components/formula":["FormulaToolbar","FormulaEditor"],"@masterteam/components/tabs":["Tabs"]},"imports":["@angular/core","@angular/common","@angular/forms","primeng/tabs","primeng/skeleton","@masterteam/components/button","@masterteam/components/card","@masterteam/components/modal","@masterteam/components/confirmation","@jsverse/transloco","@angular/cdk/drag-drop","@masterteam/forms/dynamic-field","@masterteam/icons","@ngxs/store","@angular/common/http","@masterteam/components","@masterteam/forms/dynamic-form","@masterteam/components/toggle-field","@masterteam/components/dialog","@masterteam/components/formula","@masterteam/components/tabs"],"modules":{"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/store/form-builder/api.model.js":{"code":"","originalLength":37,"removedExports":[],"renderedExports":[],"renderedLength":0},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/store/form-builder/form-builder.actions.js":{"code":"// ============================================================================\n// Module Configuration Actions\n// ============================================================================\nclass SetModuleInfo {\n moduleType;\n moduleId;\n parentModuleType;\n parentModuleId;\n parentPath;\n static type = '[FormBuilder] Set Module Info';\n constructor(moduleType, moduleId, parentModuleType, parentModuleId, parentPath) {\n this.moduleType = moduleType;\n this.moduleId = moduleId;\n this.parentModuleType = parentModuleType;\n this.parentModuleId = parentModuleId;\n this.parentPath = parentPath;\n }\n}\nclass ResetFormBuilderState {\n static type = '[FormBuilder] Reset State';\n}\nclass SetProperties {\n properties;\n static type = '[FormBuilder] Set Properties';\n constructor(properties) {\n this.properties = properties;\n }\n}\n// ============================================================================\n// Form Configuration Actions\n// ============================================================================\nclass GetFormConfiguration {\n static type = '[FormBuilder] Get Form Configuration';\n}\nclass ResetFormConfiguration {\n static type = '[FormBuilder] Reset Form Configuration';\n}\n// ============================================================================\n// Section Actions\n// ============================================================================\nclass AddSection {\n payload;\n static type = '[FormBuilder] Add Section';\n constructor(payload) {\n this.payload = payload;\n }\n}\nclass UpdateSection {\n sectionId;\n payload;\n static type = '[FormBuilder] Update Section';\n constructor(sectionId, payload) {\n this.sectionId = sectionId;\n this.payload = payload;\n }\n}\nclass DeleteSection {\n sectionId;\n static type = '[FormBuilder] Delete Section';\n constructor(sectionId) {\n this.sectionId = sectionId;\n }\n}\n// ============================================================================\n// Field Actions\n// ============================================================================\nclass AddField {\n sectionId;\n payload;\n static type = '[FormBuilder] Add Field';\n constructor(sectionId, payload) {\n this.sectionId = sectionId;\n this.payload = payload;\n }\n}\nclass UpdateField {\n sectionId;\n fieldId;\n payload;\n static type = '[FormBuilder] Update Field';\n constructor(sectionId, fieldId, payload) {\n this.sectionId = sectionId;\n this.fieldId = fieldId;\n this.payload = payload;\n }\n}\nclass DeleteField {\n sectionId;\n fieldId;\n static type = '[FormBuilder] Delete Field';\n constructor(sectionId, fieldId) {\n this.sectionId = sectionId;\n this.fieldId = fieldId;\n }\n}\nclass ReorderFields {\n sectionId;\n payload;\n static type = '[FormBuilder] Reorder Fields';\n constructor(sectionId, payload) {\n this.sectionId = sectionId;\n this.payload = payload;\n }\n}\nclass MoveField {\n sectionId;\n fieldId;\n payload;\n static type = '[FormBuilder] Move Field';\n constructor(sectionId, fieldId, payload) {\n this.sectionId = sectionId;\n this.fieldId = fieldId;\n this.payload = payload;\n }\n}","originalLength":3435,"removedExports":[],"renderedExports":["SetModuleInfo","ResetFormBuilderState","SetProperties","GetFormConfiguration","ResetFormConfiguration","AddSection","UpdateSection","DeleteSection","AddField","UpdateField","DeleteField","ReorderFields","MoveField"],"renderedLength":3295},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/store/form-builder/form-builder.model.js":{"code":"// ============================================================================\n// Action Keys Enum\n// ============================================================================\nvar FormBuilderActionKey;\n(function (FormBuilderActionKey) {\n // Form Configuration\n FormBuilderActionKey[\"GetFormConfiguration\"] = \"getFormConfiguration\";\n FormBuilderActionKey[\"ResetFormConfiguration\"] = \"resetFormConfiguration\";\n // Section CRUD\n FormBuilderActionKey[\"AddSection\"] = \"addSection\";\n FormBuilderActionKey[\"UpdateSection\"] = \"updateSection\";\n FormBuilderActionKey[\"DeleteSection\"] = \"deleteSection\";\n // Field CRUD\n FormBuilderActionKey[\"AddField\"] = \"addField\";\n FormBuilderActionKey[\"UpdateField\"] = \"updateField\";\n FormBuilderActionKey[\"DeleteField\"] = \"deleteField\";\n FormBuilderActionKey[\"MoveField\"] = \"moveField\";\n FormBuilderActionKey[\"ReorderFields\"] = \"reorderFields\";\n})(FormBuilderActionKey || (FormBuilderActionKey = {}));","originalLength":1025,"removedExports":[],"renderedExports":["FormBuilderActionKey"],"renderedLength":971},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/store/form-builder/form-builder.state.js":{"code":"var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n// Default State\nconst DEFAULT_STATE = {\n // Module configuration\n moduleType: null,\n moduleId: null,\n parentModuleType: null,\n parentModuleId: null,\n parentPath: '',\n // Form data\n formConfiguration: null,\n // Properties for field enrichment\n properties: [],\n // Loading state (from LoadingStateShape)\n loadingActive: [],\n errors: {},\n};\nlet FormBuilderState = class FormBuilderState extends CrudStateBase {\n http = inject(HttpClient);\n baseUrl = 'formConfigurations';\n // ============================================================================\n // Helpers\n // ============================================================================\n getApiPath(state) {\n const { parentPath, moduleType, moduleId } = state;\n return `${this.baseUrl}${parentPath}/${moduleType}/${moduleId}`;\n }\n // ============================================================================\n // Selectors\n // ============================================================================\n static getState(state) {\n return state ?? DEFAULT_STATE;\n }\n static getFormConfiguration(state) {\n return state?.formConfiguration ?? null;\n }\n static getSections(state) {\n return state?.formConfiguration?.sections ?? [];\n }\n static getModuleType(state) {\n return state?.moduleType ?? null;\n }\n static getModuleId(state) {\n return state?.moduleId ?? null;\n }\n static getProperties(state) {\n return state?.properties ?? [];\n }\n // ============================================================================\n // Module Configuration Actions\n // ============================================================================\n setModuleInfo(ctx, action) {\n let parentPath = '';\n if (action.parentModuleType && action.parentModuleId) {\n parentPath = `/${action.parentModuleType}/${action.parentModuleId}`;\n }\n else if (action.parentPath) {\n parentPath = action.parentPath;\n }\n ctx.patchState({\n moduleType: action.moduleType,\n moduleId: action.moduleId,\n parentModuleType: action.parentModuleType ?? null,\n parentModuleId: action.parentModuleId ?? null,\n parentPath: parentPath ?? '',\n });\n }\n resetState(ctx) {\n ctx.setState(DEFAULT_STATE);\n }\n setProperties(ctx, action) {\n ctx.patchState({\n properties: action.properties,\n });\n }\n // ============================================================================\n // Form Configuration Actions\n // ============================================================================\n getFormConfiguration(ctx) {\n const state = ctx.getState();\n const apiPath = this.getApiPath(state);\n const req$ = this.http.get(apiPath);\n return this.load(ctx, {\n key: FormBuilderActionKey.GetFormConfiguration,\n request$: req$,\n updateState: (_state, data) => ({\n formConfiguration: data ?? null,\n }),\n });\n }\n resetFormConfiguration(ctx) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/reset`;\n const req$ = this.http.delete(apiPath);\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.ResetFormConfiguration,\n request$: req$,\n onSuccess: (res, _currentState) => ({\n formConfiguration: res.data ?? null,\n }),\n });\n }\n // ============================================================================\n // Section Actions\n // ============================================================================\n addSection(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections`;\n const req$ = this.http.post(apiPath, action.payload);\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.AddSection,\n request$: req$,\n onSuccess: (res, currentState) => {\n const sections = this.adapter.addOne(currentState.formConfiguration?.sections ?? [], res.data);\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n });\n }\n updateSection(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}`;\n const req$ = this.http.put(apiPath, action.payload);\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.UpdateSection,\n request$: req$,\n onSuccess: (res, currentState) => {\n const sections = this.adapter.upsertOne(currentState.formConfiguration?.sections ?? [], res.data, 'id');\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n });\n }\n deleteSection(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}`;\n const req$ = this.http.delete(apiPath);\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.DeleteSection,\n request$: req$,\n onSuccess: (res, currentState) => {\n const sections = this.adapter.removeOne(currentState.formConfiguration?.sections ?? [], res.data.id, 'id');\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n });\n }\n // ============================================================================\n // Field Actions\n // ============================================================================\n addField(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields`;\n const req$ = this.http.post(apiPath, action.payload);\n // Generate temp ID for optimistic update\n const tempId = `temp_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;\n const tempField = {\n id: tempId,\n sectionId: action.sectionId,\n propertyId: action.payload.propertyId,\n width: action.payload.width,\n order: action.payload.order ?? 0,\n hiddenInCreation: action.payload.hiddenInCreation,\n _pending: true,\n };\n // Optimistically add the temp field\n const sectionsWithTemp = (state.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n const fields = [...section.fields];\n const insertIndex = action.payload.order ?? fields.length;\n fields.splice(insertIndex, 0, tempField);\n return { ...section, fields };\n }\n return section;\n });\n ctx.patchState({\n formConfiguration: {\n ...state.formConfiguration,\n sections: sectionsWithTemp,\n },\n });\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.AddField,\n request$: req$,\n onSuccess: (res, currentState) => {\n const newField = res.data;\n // Replace temp field with real field\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n return {\n ...section,\n fields: section.fields.map((f) => f.id === tempId ? newField : f),\n };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n onError: (_error, currentState) => {\n // Remove temp field on error\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n return {\n ...section,\n fields: section.fields.filter((f) => f.id !== tempId),\n };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n });\n }\n updateField(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields/${action.fieldId}`;\n const req$ = this.http.put(apiPath, action.payload);\n // Apply optimistic update for order changes\n if (action.payload.order !== undefined) {\n const newOrder = action.payload.order;\n const sections = (state.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n const fields = [...section.fields];\n const currentIndex = fields.findIndex((f) => f.id === action.fieldId);\n if (currentIndex !== -1) {\n const [movedField] = fields.splice(currentIndex, 1);\n fields.splice(newOrder, 0, movedField);\n }\n return { ...section, fields };\n }\n return section;\n });\n ctx.patchState({\n formConfiguration: {\n ...state.formConfiguration,\n sections,\n },\n });\n }\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.UpdateField,\n request$: req$,\n onSuccess: (res, currentState) => {\n const updatedField = res.data;\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n // Update the field but preserve current array order (from optimistic update)\n // Don't re-sort by order property as other fields may have stale order values\n const updatedFields = section.fields.map((f, index) => f.id === updatedField.id\n ? { ...updatedField, order: index }\n : { ...f, order: index });\n return {\n ...section,\n fields: updatedFields,\n };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n onError: (_error, _currentState) => {\n // Revert optimistic update on error - reload original state\n if (action.payload.order !== undefined) {\n return {\n formConfiguration: state.formConfiguration,\n };\n }\n return {};\n },\n });\n }\n deleteField(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields/${action.fieldId}`;\n const req$ = this.http.delete(apiPath);\n // Optimistically mark field as deleting\n const sectionsWithDeleting = (state.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n return {\n ...section,\n fields: section.fields.map((f) => f.id === action.fieldId ? { ...f, _deleting: true } : f),\n };\n }\n return section;\n });\n ctx.patchState({\n formConfiguration: {\n ...state.formConfiguration,\n sections: sectionsWithDeleting,\n },\n });\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.DeleteField,\n request$: req$,\n onSuccess: (res, currentState) => {\n const { id: deletedId, sectionId } = res.data;\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === sectionId) {\n return {\n ...section,\n fields: section.fields.filter((f) => f.id !== deletedId),\n };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n onError: (_error, currentState) => {\n // Remove _deleting flag on error\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n return {\n ...section,\n fields: section.fields.map((f) => f.id === action.fieldId ? { ...f, _deleting: false } : f),\n };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n });\n }\n reorderFields(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields/reorder`;\n const req$ = this.http.put(apiPath, action.payload);\n // Create order map for optimistic update\n const orderMap = new Map(action.payload.map((p) => [p.id, p.order]));\n // Apply optimistic update\n const optimisticSections = (state.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n const reorderedFields = section.fields\n .map((f) => ({\n ...f,\n order: orderMap.get(f.id) ?? f.order,\n }))\n .sort((a, b) => a.order - b.order);\n return { ...section, fields: reorderedFields };\n }\n return section;\n });\n ctx.patchState({\n formConfiguration: {\n ...state.formConfiguration,\n sections: optimisticSections,\n },\n });\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.ReorderFields,\n request$: req$,\n onSuccess: (res, currentState) => {\n const updatedFields = res.data;\n const fieldMap = new Map(updatedFields.map((f) => [f.id, f]));\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n const mergedFields = section.fields\n .map((f) => fieldMap.get(f.id) ?? f)\n .sort((a, b) => a.order - b.order);\n return { ...section, fields: mergedFields };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n onError: (_error, _currentState) => {\n // Revert to original state on error\n return {\n formConfiguration: state.formConfiguration,\n };\n },\n });\n }\n moveField(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields/${action.fieldId}/move`;\n const req$ = this.http.put(apiPath, action.payload);\n // Apply optimistic update - move field immediately\n const sourceSectionId = action.sectionId;\n const targetSectionId = action.payload.targetSectionId;\n const targetOrder = action.payload.order ?? 0;\n let movedFieldData = null;\n const optimisticSections = (state.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === sourceSectionId) {\n const fieldToMove = section.fields.find((f) => f.id === action.fieldId);\n if (fieldToMove) {\n movedFieldData = { ...fieldToMove, order: targetOrder };\n }\n return {\n ...section,\n fields: section.fields.filter((f) => f.id !== action.fieldId),\n };\n }\n return section;\n });\n // Add to target section\n const sectionsWithMoved = optimisticSections.map((section) => {\n if (section.id === targetSectionId && movedFieldData) {\n const fields = [...section.fields];\n fields.splice(targetOrder, 0, movedFieldData);\n return { ...section, fields };\n }\n return section;\n });\n ctx.patchState({\n formConfiguration: {\n ...state.formConfiguration,\n sections: sectionsWithMoved,\n },\n });\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.MoveField,\n request$: req$,\n onSuccess: (res, currentState) => {\n const movedField = res.data;\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n // Update the moved field with server response\n if (section.id === targetSectionId) {\n return {\n ...section,\n fields: section.fields\n .map((f) => (f.id === movedField.id ? movedField : f))\n .sort((a, b) => a.order - b.order),\n };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n onError: (_error, _currentState) => {\n // Revert optimistic update on error\n return {\n formConfiguration: state.formConfiguration,\n };\n },\n });\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilderState, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\n static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilderState });\n};\n__decorate([\n Action(SetModuleInfo)\n], FormBuilderState.prototype, \"setModuleInfo\", null);\n__decorate([\n Action(ResetFormBuilderState)\n], FormBuilderState.prototype, \"resetState\", null);\n__decorate([\n Action(SetProperties)\n], FormBuilderState.prototype, \"setProperties\", null);\n__decorate([\n Action(GetFormConfiguration)\n], FormBuilderState.prototype, \"getFormConfiguration\", null);\n__decorate([\n Action(ResetFormConfiguration)\n], FormBuilderState.prototype, \"resetFormConfiguration\", null);\n__decorate([\n Action(AddSection)\n], FormBuilderState.prototype, \"addSection\", null);\n__decorate([\n Action(UpdateSection)\n], FormBuilderState.prototype, \"updateSection\", null);\n__decorate([\n Action(DeleteSection)\n], FormBuilderState.prototype, \"deleteSection\", null);\n__decorate([\n Action(AddField)\n], FormBuilderState.prototype, \"addField\", null);\n__decorate([\n Action(UpdateField)\n], FormBuilderState.prototype, \"updateField\", null);\n__decorate([\n Action(DeleteField)\n], FormBuilderState.prototype, \"deleteField\", null);\n__decorate([\n Action(ReorderFields)\n], FormBuilderState.prototype, \"reorderFields\", null);\n__decorate([\n Action(MoveField)\n], FormBuilderState.prototype, \"moveField\", null);\n__decorate([\n Selector()\n], FormBuilderState, \"getState\", null);\n__decorate([\n Selector()\n], FormBuilderState, \"getFormConfiguration\", null);\n__decorate([\n Selector()\n], FormBuilderState, \"getSections\", null);\n__decorate([\n Selector()\n], FormBuilderState, \"getModuleType\", null);\n__decorate([\n Selector()\n], FormBuilderState, \"getModuleId\", null);\n__decorate([\n Selector()\n], FormBuilderState, \"getProperties\", null);\nFormBuilderState = __decorate([\n State({\n name: 'formBuilder',\n defaults: DEFAULT_STATE,\n })\n], FormBuilderState);\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilderState, decorators: [{\n type: Injectable\n }], propDecorators: { setModuleInfo: [], resetState: [], setProperties: [], getFormConfiguration: [], resetFormConfiguration: [], addSection: [], updateSection: [], deleteSection: [], addField: [], updateField: [], deleteField: [], reorderFields: [], moveField: [] } });","originalLength":23587,"removedExports":[],"renderedExports":["FormBuilderState"],"renderedLength":22934},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/store/form-builder/form-builder.facade.js":{"code":"class FormBuilderFacade {\n store = inject(Store);\n // ============================================================================\n // State Selectors\n // ============================================================================\n stateSignal = select(FormBuilderState.getState);\n formConfiguration = select(FormBuilderState.getFormConfiguration);\n sections = select(FormBuilderState.getSections);\n properties = select(FormBuilderState.getProperties);\n moduleType = select(FormBuilderState.getModuleType);\n moduleId = select(FormBuilderState.getModuleId);\n // ============================================================================\n // Loading Signals\n // ============================================================================\n isLoadingFormConfiguration = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.GetFormConfiguration), ...(ngDevMode ? [{ debugName: \"isLoadingFormConfiguration\" }] : []));\n isResettingFormConfiguration = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.ResetFormConfiguration), ...(ngDevMode ? [{ debugName: \"isResettingFormConfiguration\" }] : []));\n isAddingSection = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.AddSection), ...(ngDevMode ? [{ debugName: \"isAddingSection\" }] : []));\n isUpdatingSection = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.UpdateSection), ...(ngDevMode ? [{ debugName: \"isUpdatingSection\" }] : []));\n isDeletingSection = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.DeleteSection), ...(ngDevMode ? [{ debugName: \"isDeletingSection\" }] : []));\n isAddingField = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.AddField), ...(ngDevMode ? [{ debugName: \"isAddingField\" }] : []));\n isUpdatingField = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.UpdateField), ...(ngDevMode ? [{ debugName: \"isUpdatingField\" }] : []));\n isDeletingField = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.DeleteField), ...(ngDevMode ? [{ debugName: \"isDeletingField\" }] : []));\n isMovingField = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.MoveField), ...(ngDevMode ? [{ debugName: \"isMovingField\" }] : []));\n // ============================================================================\n // Error Signals\n // ============================================================================\n formConfigurationError = computed(() => this.stateSignal().errors[FormBuilderActionKey.GetFormConfiguration] ??\n null, ...(ngDevMode ? [{ debugName: \"formConfigurationError\" }] : []));\n sectionError = computed(() => {\n const errors = this.stateSignal().errors;\n return (errors[FormBuilderActionKey.AddSection] ??\n errors[FormBuilderActionKey.UpdateSection] ??\n errors[FormBuilderActionKey.DeleteSection] ??\n null);\n }, ...(ngDevMode ? [{ debugName: \"sectionError\" }] : []));\n fieldError = computed(() => {\n const errors = this.stateSignal().errors;\n return (errors[FormBuilderActionKey.AddField] ??\n errors[FormBuilderActionKey.UpdateField] ??\n errors[FormBuilderActionKey.DeleteField] ??\n errors[FormBuilderActionKey.MoveField] ??\n null);\n }, ...(ngDevMode ? [{ debugName: \"fieldError\" }] : []));\n // ============================================================================\n // Module Configuration Dispatchers\n // ============================================================================\n setModuleInfo(moduleType, moduleId, parentModuleType, parentModuleId, parentPath) {\n return this.store.dispatch(new SetModuleInfo(moduleType, moduleId, parentModuleType, parentModuleId, parentPath));\n }\n resetState() {\n return this.store.dispatch(new ResetFormBuilderState());\n }\n setProperties(properties) {\n return this.store.dispatch(new SetProperties(properties));\n }\n // ============================================================================\n // Form Configuration Dispatchers\n // ============================================================================\n getFormConfiguration() {\n return this.store.dispatch(new GetFormConfiguration());\n }\n resetFormConfiguration() {\n return this.store.dispatch(new ResetFormConfiguration());\n }\n // ============================================================================\n // Section Dispatchers\n // ============================================================================\n addSection(payload) {\n return this.store.dispatch(new AddSection(payload));\n }\n updateSection(sectionId, payload) {\n return this.store.dispatch(new UpdateSection(sectionId, payload));\n }\n deleteSection(sectionId) {\n return this.store.dispatch(new DeleteSection(sectionId));\n }\n // ============================================================================\n // Field Dispatchers\n // ============================================================================\n addField(sectionId, payload) {\n return this.store.dispatch(new AddField(sectionId, payload));\n }\n updateField(sectionId, fieldId, payload) {\n return this.store.dispatch(new UpdateField(sectionId, fieldId, payload));\n }\n deleteField(sectionId, fieldId) {\n return this.store.dispatch(new DeleteField(sectionId, fieldId));\n }\n reorderFields(sectionId, payload) {\n return this.store.dispatch(new ReorderFields(sectionId, payload));\n }\n moveField(sectionId, fieldId, payload) {\n return this.store.dispatch(new MoveField(sectionId, fieldId, payload));\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilderFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilderFacade, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilderFacade, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });","originalLength":6965,"removedExports":[],"renderedExports":["FormBuilderFacade"],"renderedLength":6402},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/store/form-builder/index.js":{"code":"","originalLength":217,"removedExports":[],"renderedExports":[],"renderedLength":0},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/fb-field-conditions/condition-constants.js":{"code":"/**\n * Condition Formula Constants\n * Static functions and operators for condition formulas (Show/Hide/Enable/Disable)\n */\n/**\n * Functions for field conditions\n */\nconst CONDITION_FUNCTION_CATEGORIES = [\n {\n name: 'Logic',\n displayName: 'Field Visibility',\n functions: [\n {\n name: 'SHOW_IF',\n category: 'Logic',\n description: 'Show this field when condition is true',\n signature: 'SHOW_IF(condition)',\n parameters: [\n {\n name: 'condition',\n type: 'boolean',\n description: 'When true, field is visible',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: [\n 'SHOW_IF(@Status == \"Active\")',\n 'SHOW_IF(@Type == \"Custom\")',\n ],\n },\n {\n name: 'HIDE_IF',\n category: 'Logic',\n description: 'Hide this field when condition is true',\n signature: 'HIDE_IF(condition)',\n parameters: [\n {\n name: 'condition',\n type: 'boolean',\n description: 'When true, field is hidden',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: ['HIDE_IF(@Status == \"Closed\")', 'HIDE_IF(ISNULL(@Parent))'],\n },\n {\n name: 'DISABLE_IF',\n category: 'Logic',\n description: 'Disable this field when condition is true',\n signature: 'DISABLE_IF(condition)',\n parameters: [\n {\n name: 'condition',\n type: 'boolean',\n description: 'When true, field is disabled',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: [\n 'DISABLE_IF(@IsLocked == true)',\n 'DISABLE_IF(@Status == \"Approved\")',\n ],\n },\n {\n name: 'ENABLE_IF',\n category: 'Logic',\n description: 'Enable this field when condition is true',\n signature: 'ENABLE_IF(condition)',\n parameters: [\n {\n name: 'condition',\n type: 'boolean',\n description: 'When true, field is enabled',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: [\n 'ENABLE_IF(@Status == \"Draft\")',\n 'ENABLE_IF(@CanEdit == true)',\n ],\n },\n ],\n },\n {\n name: 'Aggregation',\n displayName: 'Logic Helpers',\n functions: [\n {\n name: 'AND',\n category: 'Aggregation',\n description: 'Returns true if all conditions are true',\n signature: 'AND(condition1, condition2)',\n parameters: [\n {\n name: 'condition1',\n type: 'boolean',\n description: 'First condition',\n required: true,\n },\n {\n name: 'condition2',\n type: 'boolean',\n description: 'Second condition',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: ['AND(@Status == \"Active\", @Priority > 0)'],\n },\n {\n name: 'OR',\n category: 'Aggregation',\n description: 'Returns true if any condition is true',\n signature: 'OR(condition1, condition2)',\n parameters: [\n {\n name: 'condition1',\n type: 'boolean',\n description: 'First condition',\n required: true,\n },\n {\n name: 'condition2',\n type: 'boolean',\n description: 'Second condition',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: ['OR(@Status == \"Active\", @Status == \"Pending\")'],\n },\n {\n name: 'NOT',\n category: 'Aggregation',\n description: 'Returns the opposite of the condition',\n signature: 'NOT(condition)',\n parameters: [\n {\n name: 'condition',\n type: 'boolean',\n description: 'The condition to negate',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: ['NOT(@IsCompleted)'],\n },\n {\n name: 'ISNULL',\n category: 'Aggregation',\n description: 'Returns true if value is null or empty',\n signature: 'ISNULL(value)',\n parameters: [\n {\n name: 'value',\n type: 'any',\n description: 'The value to check',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: ['ISNULL(@Description)'],\n },\n {\n name: 'CONTAINS',\n category: 'Aggregation',\n description: 'Returns true if text contains the search string',\n signature: 'CONTAINS(text, search)',\n parameters: [\n {\n name: 'text',\n type: 'string',\n description: 'The text to search in',\n required: true,\n },\n {\n name: 'search',\n type: 'string',\n description: 'The string to search for',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: ['CONTAINS(@Name, \"Project\")'],\n },\n ],\n },\n];\n/**\n * Operators for conditions\n */\nconst CONDITION_OPERATORS = [\n // Comparison\n {\n symbol: '==',\n name: 'Equal',\n type: 'comparison',\n description: 'Equal to',\n precedence: 3,\n },\n {\n symbol: '!=',\n name: 'Not Equal',\n type: 'comparison',\n description: 'Not equal to',\n precedence: 3,\n },\n {\n symbol: '>',\n name: 'Greater Than',\n type: 'comparison',\n description: 'Greater than',\n precedence: 4,\n },\n {\n symbol: '<',\n name: 'Less Than',\n type: 'comparison',\n description: 'Less than',\n precedence: 4,\n },\n {\n symbol: '>=',\n name: 'Greater or Equal',\n type: 'comparison',\n description: 'Greater than or equal',\n precedence: 4,\n },\n {\n symbol: '<=',\n name: 'Less or Equal',\n type: 'comparison',\n description: 'Less than or equal',\n precedence: 4,\n },\n // Logical\n {\n symbol: '&&',\n name: 'And',\n type: 'logical',\n description: 'Logical AND',\n precedence: 2,\n },\n {\n symbol: '||',\n name: 'Or',\n type: 'logical',\n description: 'Logical OR',\n precedence: 1,\n },\n];","originalLength":8197,"removedExports":[],"renderedExports":["CONDITION_FUNCTION_CATEGORIES","CONDITION_OPERATORS"],"renderedLength":8135},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/fb-field-conditions/fb-field-conditions.js":{"code":"/**\n * Field Conditions Dialog\n *\n * Allows users to define conditional display formulas for form fields.\n * Uses FormulaToolbar + FormulaEditor directly for a visual formula editing experience.\n */\nclass FBFieldConditions {\n modalService = inject(ModalService);\n ref = inject(ModalRef);\n // Inputs\n /** Initial formula (JSON string from backend) */\n initialFormula = input('', ...(ngDevMode ? [{ debugName: \"initialFormula\" }] : []));\n /** Available fields from the form builder (other fields that can be referenced) */\n availableFields = input([], ...(ngDevMode ? [{ debugName: \"availableFields\" }] : []));\n // UI State\n submitting = signal(false, ...(ngDevMode ? [{ debugName: \"submitting\" }] : []));\n // Form control for the formula editor (tokens array)\n formulaControl = new FormControl([]);\n // View child for the editor\n editorRef = viewChild('editor', ...(ngDevMode ? [{ debugName: \"editorRef\" }] : []));\n // Condition-specific functions and operators\n functionCategories = CONDITION_FUNCTION_CATEGORIES;\n operators = CONDITION_OPERATORS;\n /** Extract property keys for toolbar */\n propertyKeys = computed(() => this.availableFields().map((f) => f.key), ...(ngDevMode ? [{ debugName: \"propertyKeys\" }] : []));\n /** Toolbar labels */\n toolbarLabels = {\n functions: 'Functions',\n properties: 'Fields',\n operators: 'Operators',\n noPropertiesAvailable: 'No fields available',\n };\n ngOnInit() {\n // Parse JSON string to tokens\n const formula = this.initialFormula();\n if (formula) {\n try {\n const tokens = JSON.parse(formula);\n this.formulaControl.patchValue(tokens);\n }\n catch {\n // Invalid JSON, start with empty\n }\n }\n }\n /** Handle block insert from toolbar */\n onBlockInsert(block) {\n const editor = this.editorRef();\n if (editor) {\n editor.addBlock(block);\n }\n }\n onSave() {\n const tokens = this.formulaControl.value ?? [];\n const formula = tokens.length > 0 ? JSON.stringify(tokens) : '';\n this.ref.close({ saved: true, conditionalDisplayFormula: formula });\n }\n onCancel() {\n this.ref.close({ saved: false });\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBFieldConditions, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.2.0\", version: \"21.0.3\", type: FBFieldConditions, isStandalone: true, selector: \"mt-fb-field-conditions\", inputs: { initialFormula: { classPropertyName: \"initialFormula\", publicName: \"initialFormula\", isSignal: true, isRequired: false, transformFunction: null }, availableFields: { classPropertyName: \"availableFields\", publicName: \"availableFields\", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: \"editorRef\", first: true, predicate: [\"editor\"], descendants: true, isSignal: true }], ngImport: i0, template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10 flex flex-col gap-3\\\">\\r\\n <!-- Formula Toolbar -->\\r\\n <mt-formula-toolbar\\r\\n [knownProperties]=\\\"propertyKeys()\\\"\\r\\n [functionCategories]=\\\"functionCategories\\\"\\r\\n [operators]=\\\"operators\\\"\\r\\n [labels]=\\\"toolbarLabels\\\"\\r\\n (onBlockInsert)=\\\"onBlockInsert($event)\\\"\\r\\n />\\r\\n <!-- Formula Editor -->\\r\\n <mt-formula-editor\\r\\n #editor\\r\\n [placeholder]=\\\"t('build-condition-formula')\\\"\\r\\n [formControl]=\\\"formulaControl\\\"\\r\\n />\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n />\\r\\n <mt-button\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n />\\r\\n </div>\\r\\n</ng-container>\\r\\n\", dependencies: [{ kind: \"directive\", type: TranslocoDirective, selector: \"[transloco]\", inputs: [\"transloco\", \"translocoParams\", \"translocoScope\", \"translocoRead\", \"translocoPrefix\", \"translocoLang\", \"translocoLoadingTpl\"] }, { kind: \"ngmodule\", type: ReactiveFormsModule }, { kind: \"directive\", type: i1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i1.FormControlDirective, selector: \"[formControl]\", inputs: [\"formControl\", \"disabled\", \"ngModel\"], outputs: [\"ngModelChange\"], exportAs: [\"ngForm\"] }, { kind: \"component\", type: Button, selector: \"mt-button\", inputs: [\"icon\", \"label\", \"tooltip\", \"class\", \"type\", \"styleClass\", \"severity\", \"badge\", \"variant\", \"badgeSeverity\", \"size\", \"iconPos\", \"autofocus\", \"fluid\", \"raised\", \"rounded\", \"text\", \"plain\", \"outlined\", \"link\", \"disabled\", \"loading\", \"pInputs\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }, { kind: \"component\", type: FormulaToolbar, selector: \"mt-formula-toolbar\", inputs: [\"knownProperties\", \"functionCategories\", \"operators\", \"initialTab\", \"searchPlaceholder\", \"labels\"], outputs: [\"onBlockInsert\", \"onTabChange\"] }, { kind: \"component\", type: FormulaEditor, selector: \"mt-formula-editor\", inputs: [\"placeholder\", \"initialTokens\", \"disabled\"], outputs: [\"formulaChange\", \"tokensChange\", \"onBlur\", \"onFocus\"] }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBFieldConditions, decorators: [{\n type: Component,\n args: [{ selector: 'mt-fb-field-conditions', standalone: true, imports: [\n TranslocoDirective,\n ReactiveFormsModule,\n Button,\n FormulaToolbar,\n FormulaEditor,\n ], template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10 flex flex-col gap-3\\\">\\r\\n <!-- Formula Toolbar -->\\r\\n <mt-formula-toolbar\\r\\n [knownProperties]=\\\"propertyKeys()\\\"\\r\\n [functionCategories]=\\\"functionCategories\\\"\\r\\n [operators]=\\\"operators\\\"\\r\\n [labels]=\\\"toolbarLabels\\\"\\r\\n (onBlockInsert)=\\\"onBlockInsert($event)\\\"\\r\\n />\\r\\n <!-- Formula Editor -->\\r\\n <mt-formula-editor\\r\\n #editor\\r\\n [placeholder]=\\\"t('build-condition-formula')\\\"\\r\\n [formControl]=\\\"formulaControl\\\"\\r\\n />\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n />\\r\\n <mt-button\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n />\\r\\n </div>\\r\\n</ng-container>\\r\\n\" }]\n }], propDecorators: { initialFormula: [{ type: i0.Input, args: [{ isSignal: true, alias: \"initialFormula\", required: false }] }], availableFields: [{ type: i0.Input, args: [{ isSignal: true, alias: \"availableFields\", required: false }] }], editorRef: [{ type: i0.ViewChild, args: ['editor', { isSignal: true }] }] } });","originalLength":8248,"removedExports":[],"renderedExports":["FBFieldConditions"],"renderedLength":7557},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/fb-field-form/fb-field-form.js":{"code":"class FBFieldForm {\n transloco = inject(TranslocoService);\n modalService = inject(ModalService);\n ref = inject(ModalRef);\n confirmationService = inject(ConfirmationService);\n facade = inject(FormBuilderFacade);\n // Inputs\n sectionId = input('', ...(ngDevMode ? [{ debugName: \"sectionId\" }] : []));\n initialData = input(null, ...(ngDevMode ? [{ debugName: \"initialData\" }] : []));\n /** All sections with enriched fields (to get available fields for conditions) */\n allSections = input([], ...(ngDevMode ? [{ debugName: \"allSections\" }] : []));\n // UI State\n submitting = signal(false, ...(ngDevMode ? [{ debugName: \"submitting\" }] : []));\n deleting = signal(false, ...(ngDevMode ? [{ debugName: \"deleting\" }] : []));\n conditionalDisplayFormula = signal('', ...(ngDevMode ? [{ debugName: \"conditionalDisplayFormula\" }] : []));\n conditionsDialogRef;\n /**\n * Compute available fields for condition formula\n * Excludes the current field being edited\n */\n availableFields = computed(() => {\n const sections = this.allSections();\n const currentField = this.initialData();\n const fields = [];\n for (const section of sections) {\n for (const field of section.fields) {\n // Exclude the current field being edited\n if (currentField && field.id === currentField.id)\n continue;\n fields.push({\n key: field.name,\n name: field.name,\n type: field.type,\n });\n }\n }\n return fields;\n }, ...(ngDevMode ? [{ debugName: \"availableFields\" }] : []));\n // Form\n formControl = new FormControl();\n showHideControl = new FormControl(false);\n formConfig = {\n sections: [\n {\n key: 'section-form',\n type: 'none',\n columns: 12,\n order: 1,\n fields: [\n {\n key: 'isRequired',\n label: this.transloco.translate('formBuilder.is-required'),\n type: 'toggle',\n toggleShape: 'card',\n colSpan: 12,\n order: 1,\n },\n {\n key: 'hiddenInCreation',\n label: this.transloco.translate('formBuilder.hidden-in-creation'),\n type: 'toggle',\n toggleShape: 'card',\n colSpan: 12,\n order: 2,\n },\n {\n key: 'hiddenInEditForm',\n label: this.transloco.translate('formBuilder.hidden-in-edit-form'),\n type: 'toggle',\n toggleShape: 'card',\n colSpan: 12,\n order: 3,\n },\n new RadioCardsFieldConfig({\n key: 'size',\n label: this.transloco.translate('formBuilder.size'),\n placeholder: this.transloco.translate('formBuilder.size'),\n options: [\n { id: 's', name: 'S' },\n { id: 'm', name: 'M' },\n { id: 'l', name: 'L' },\n ],\n order: 4,\n size: 'small',\n }),\n ],\n },\n ],\n };\n constructor() {\n effect(() => {\n const data = this.initialData();\n if (data) {\n const widthToSize = {\n '25': 's',\n '50': 'm',\n '100': 'l',\n };\n this.formControl.patchValue({\n isRequired: data.isRequired ?? false,\n hiddenInCreation: data.hiddenInCreation ?? false,\n hiddenInEditForm: data.hiddenInEditForm ?? false,\n size: widthToSize[data.width] ?? 'l',\n });\n // Set show/hide toggle based on existing value\n this.showHideControl.patchValue(data.showConditionalDisplayFormula ?? false);\n this.conditionalDisplayFormula.set(data.conditionalDisplayFormula ?? '');\n }\n });\n }\n onSave() {\n if (this.formControl.invalid)\n return;\n const formValue = this.formControl.value;\n const field = this.initialData();\n const sectionId = this.sectionId();\n if (!field || !sectionId)\n return;\n const widthMap = {\n s: '25',\n m: '50',\n l: '100',\n };\n const payload = {\n width: widthMap[formValue.size] ?? '100',\n hiddenInCreation: formValue.hiddenInCreation ?? false,\n hiddenInEditForm: formValue.hiddenInEditForm ?? false,\n isRequired: formValue.isRequired ?? false,\n showConditionalDisplayFormula: this.showHideControl.value ?? false,\n conditionalDisplayFormula: this.showHideControl.value\n ? this.conditionalDisplayFormula()\n : null,\n };\n this.submitting.set(true);\n this.facade.updateField(sectionId, field.id, payload).subscribe({\n next: () => this.ref.close(true),\n error: () => this.submitting.set(false),\n });\n }\n onCancel() {\n this.ref.close(false);\n }\n onSetConditions() {\n this.conditionsDialogRef = this.modalService.openModal(FBFieldConditions, 'drawer', {\n header: this.transloco.translate('formBuilder.set-conditions'),\n styleClass: '!w-[calc(100%-25rem)] !absolute ',\n position: 'start',\n modal: true,\n dismissible: true,\n appendTo: '#page-content',\n inputValues: {\n initialFormula: this.conditionalDisplayFormula(),\n availableFields: this.availableFields(),\n },\n });\n this.conditionsDialogRef.onClose.subscribe((result) => {\n if (result?.saved) {\n this.conditionalDisplayFormula.set(result.conditionalDisplayFormula ?? '');\n }\n });\n }\n onDelete(event) {\n const field = this.initialData();\n const sectionId = this.sectionId();\n if (!field || !sectionId)\n return;\n this.confirmationService.confirmDelete({\n event,\n type: 'popup',\n accept: () => {\n this.deleting.set(true);\n this.facade.deleteField(sectionId, field.id).subscribe({\n next: () => this.ref.close(true),\n error: () => this.deleting.set(false),\n });\n },\n });\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBFieldForm, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.0.3\", type: FBFieldForm, isStandalone: true, selector: \"mt-fb-field-form\", inputs: { sectionId: { classPropertyName: \"sectionId\", publicName: \"sectionId\", isSignal: true, isRequired: false, transformFunction: null }, initialData: { classPropertyName: \"initialData\", publicName: \"initialData\", isSignal: true, isRequired: false, transformFunction: null }, allSections: { classPropertyName: \"allSections\", publicName: \"allSections\", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10 flex flex-col gap-4\\\">\\r\\n <mt-dynamic-form [formConfig]=\\\"formConfig\\\" [formControl]=\\\"formControl\\\">\\r\\n </mt-dynamic-form>\\r\\n\\r\\n <!-- Show/Hide Toggle with Set Conditions -->\\r\\n <mt-toggle-field\\r\\n toggleShape=\\\"card\\\"\\r\\n [label]=\\\"t('show-hide')\\\"\\r\\n [descriptionCard]=\\\"t('show-hide-description')\\\"\\r\\n icon=\\\"general.eye\\\"\\r\\n [formControl]=\\\"showHideControl\\\"\\r\\n >\\r\\n <ng-template #toggleCardBottom>\\r\\n @if (showHideControl.value) {\\r\\n <div class=\\\"mt-3\\\">\\r\\n <mt-button\\r\\n [label]=\\\"t('set-conditions')\\\"\\r\\n size=\\\"small\\\"\\r\\n (onClick)=\\\"onSetConditions()\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n }\\r\\n </ng-template>\\r\\n </mt-toggle-field>\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n @if (initialData()) {\\r\\n <mt-button\\r\\n [tooltip]=\\\"t('delete')\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n icon=\\\"general.trash-01\\\"\\r\\n [loading]=\\\"deleting()\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onDelete($event)\\\"\\r\\n class=\\\"me-auto\\\"\\r\\n ></mt-button>\\r\\n }\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting() || deleting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n <mt-button\\r\\n [disabled]=\\\"!formControl.valid || deleting()\\\"\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n </div>\\r\\n</ng-container>\\r\\n\", dependencies: [{ kind: \"directive\", type: TranslocoDirective, selector: \"[transloco]\", inputs: [\"transloco\", \"translocoParams\", \"translocoScope\", \"translocoRead\", \"translocoPrefix\", \"translocoLang\", \"translocoLoadingTpl\"] }, { kind: \"ngmodule\", type: ReactiveFormsModule }, { kind: \"directive\", type: i1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i1.FormControlDirective, selector: \"[formControl]\", inputs: [\"formControl\", \"disabled\", \"ngModel\"], outputs: [\"ngModelChange\"], exportAs: [\"ngForm\"] }, { kind: \"component\", type: DynamicForm, selector: \"mt-dynamic-form\", inputs: [\"formConfig\"] }, { kind: \"component\", type: Button, selector: \"mt-button\", inputs: [\"icon\", \"label\", \"tooltip\", \"class\", \"type\", \"styleClass\", \"severity\", \"badge\", \"variant\", \"badgeSeverity\", \"size\", \"iconPos\", \"autofocus\", \"fluid\", \"raised\", \"rounded\", \"text\", \"plain\", \"outlined\", \"link\", \"disabled\", \"loading\", \"pInputs\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }, { kind: \"component\", type: ToggleField, selector: \"mt-toggle-field\", inputs: [\"label\", \"labelPosition\", \"placeholder\", \"readonly\", \"pInputs\", \"required\", \"toggleShape\", \"size\", \"icon\", \"descriptionCard\"], outputs: [\"onChange\"] }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBFieldForm, decorators: [{\n type: Component,\n args: [{ selector: 'mt-fb-field-form', standalone: true, imports: [\n TranslocoDirective,\n ReactiveFormsModule,\n DynamicForm,\n Button,\n ToggleField,\n ], template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10 flex flex-col gap-4\\\">\\r\\n <mt-dynamic-form [formConfig]=\\\"formConfig\\\" [formControl]=\\\"formControl\\\">\\r\\n </mt-dynamic-form>\\r\\n\\r\\n <!-- Show/Hide Toggle with Set Conditions -->\\r\\n <mt-toggle-field\\r\\n toggleShape=\\\"card\\\"\\r\\n [label]=\\\"t('show-hide')\\\"\\r\\n [descriptionCard]=\\\"t('show-hide-description')\\\"\\r\\n icon=\\\"general.eye\\\"\\r\\n [formControl]=\\\"showHideControl\\\"\\r\\n >\\r\\n <ng-template #toggleCardBottom>\\r\\n @if (showHideControl.value) {\\r\\n <div class=\\\"mt-3\\\">\\r\\n <mt-button\\r\\n [label]=\\\"t('set-conditions')\\\"\\r\\n size=\\\"small\\\"\\r\\n (onClick)=\\\"onSetConditions()\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n }\\r\\n </ng-template>\\r\\n </mt-toggle-field>\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n @if (initialData()) {\\r\\n <mt-button\\r\\n [tooltip]=\\\"t('delete')\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n icon=\\\"general.trash-01\\\"\\r\\n [loading]=\\\"deleting()\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onDelete($event)\\\"\\r\\n class=\\\"me-auto\\\"\\r\\n ></mt-button>\\r\\n }\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting() || deleting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n <mt-button\\r\\n [disabled]=\\\"!formControl.valid || deleting()\\\"\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n </div>\\r\\n</ng-container>\\r\\n\" }]\n }], ctorParameters: () => [], propDecorators: { sectionId: [{ type: i0.Input, args: [{ isSignal: true, alias: \"sectionId\", required: false }] }], initialData: [{ type: i0.Input, args: [{ isSignal: true, alias: \"initialData\", required: false }] }], allSections: [{ type: i0.Input, args: [{ isSignal: true, alias: \"allSections\", required: false }] }] } });","originalLength":14606,"removedExports":[],"renderedExports":["FBFieldForm"],"renderedLength":13668},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/fb-section-form/fb-section-form.js":{"code":"class FBSectionForm {\n transloco = inject(TranslocoService);\n modalService = inject(ModalService);\n ref = inject(ModalRef);\n confirmationService = inject(ConfirmationService);\n facade = inject(FormBuilderFacade);\n // Inputs\n sectionId = input(null, ...(ngDevMode ? [{ debugName: \"sectionId\" }] : []));\n initialData = input(null, ...(ngDevMode ? [{ debugName: \"initialData\" }] : []));\n sectionsCount = input(0, ...(ngDevMode ? [{ debugName: \"sectionsCount\" }] : []));\n // UI State\n submitting = signal(false, ...(ngDevMode ? [{ debugName: \"submitting\" }] : []));\n deleting = signal(false, ...(ngDevMode ? [{ debugName: \"deleting\" }] : []));\n // Form\n formControl = new FormControl();\n formConfig = {\n sections: [\n {\n key: 'section-form',\n type: 'none',\n columns: 12,\n order: 1,\n fields: [\n {\n key: 'name-ar',\n label: this.transloco.translate('formBuilder.name-ar'),\n type: 'text',\n placeholder: this.transloco.translate('formBuilder.name-ar'),\n colSpan: 12,\n order: 1,\n },\n {\n key: 'name-en',\n label: this.transloco.translate('formBuilder.name-en'),\n type: 'text',\n placeholder: this.transloco.translate('formBuilder.name-en'),\n colSpan: 12,\n order: 2,\n },\n ],\n },\n ],\n };\n constructor() {\n effect(() => {\n const data = this.initialData();\n if (data) {\n this.formControl.patchValue({\n 'name-ar': data.ar,\n 'name-en': data.en,\n });\n }\n });\n }\n onSave() {\n if (this.formControl.invalid)\n return;\n const formValue = this.formControl.value;\n const payload = {\n name: {\n ar: formValue['name-ar'],\n en: formValue['name-en'],\n },\n };\n this.submitting.set(true);\n const sectionId = this.sectionId();\n if (sectionId) {\n // Update existing section\n this.facade.updateSection(sectionId, payload).subscribe({\n next: () => this.ref.close(true),\n error: () => this.submitting.set(false),\n });\n }\n else {\n // Create new section\n this.facade\n .addSection({ ...payload, order: this.sectionsCount() })\n .subscribe({\n next: () => this.ref.close(true),\n error: () => this.submitting.set(false),\n });\n }\n }\n onCancel() {\n this.ref.close(false);\n }\n onDelete(event) {\n const sectionId = this.sectionId();\n if (!sectionId)\n return;\n this.confirmationService.confirmDelete({\n event,\n type: 'popup',\n accept: () => {\n this.deleting.set(true);\n this.facade.deleteSection(sectionId).subscribe({\n next: () => this.ref.close(true),\n error: () => this.deleting.set(false),\n });\n },\n });\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBSectionForm, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.0.3\", type: FBSectionForm, isStandalone: true, selector: \"mt-fb-section-form\", inputs: { sectionId: { classPropertyName: \"sectionId\", publicName: \"sectionId\", isSignal: true, isRequired: false, transformFunction: null }, initialData: { classPropertyName: \"initialData\", publicName: \"initialData\", isSignal: true, isRequired: false, transformFunction: null }, sectionsCount: { classPropertyName: \"sectionsCount\", publicName: \"sectionsCount\", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10\\\">\\r\\n <mt-dynamic-form [formConfig]=\\\"formConfig\\\" [formControl]=\\\"formControl\\\">\\r\\n </mt-dynamic-form>\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n @if (sectionId()) {\\r\\n <mt-button\\r\\n [tooltip]=\\\"t('delete')\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n icon=\\\"general.trash-01\\\"\\r\\n [loading]=\\\"deleting()\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onDelete($event)\\\"\\r\\n class=\\\"me-auto\\\"\\r\\n ></mt-button>\\r\\n }\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting() || deleting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n <mt-button\\r\\n [disabled]=\\\"!formControl.valid || deleting()\\\"\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n </div>\\r\\n</ng-container>\\r\\n\", dependencies: [{ kind: \"directive\", type: TranslocoDirective, selector: \"[transloco]\", inputs: [\"transloco\", \"translocoParams\", \"translocoScope\", \"translocoRead\", \"translocoPrefix\", \"translocoLang\", \"translocoLoadingTpl\"] }, { kind: \"ngmodule\", type: ReactiveFormsModule }, { kind: \"directive\", type: i1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i1.FormControlDirective, selector: \"[formControl]\", inputs: [\"formControl\", \"disabled\", \"ngModel\"], outputs: [\"ngModelChange\"], exportAs: [\"ngForm\"] }, { kind: \"component\", type: DynamicForm, selector: \"mt-dynamic-form\", inputs: [\"formConfig\"] }, { kind: \"component\", type: Button, selector: \"mt-button\", inputs: [\"icon\", \"label\", \"tooltip\", \"class\", \"type\", \"styleClass\", \"severity\", \"badge\", \"variant\", \"badgeSeverity\", \"size\", \"iconPos\", \"autofocus\", \"fluid\", \"raised\", \"rounded\", \"text\", \"plain\", \"outlined\", \"link\", \"disabled\", \"loading\", \"pInputs\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBSectionForm, decorators: [{\n type: Component,\n args: [{ selector: 'mt-fb-section-form', standalone: true, imports: [TranslocoDirective, ReactiveFormsModule, DynamicForm, Button], template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10\\\">\\r\\n <mt-dynamic-form [formConfig]=\\\"formConfig\\\" [formControl]=\\\"formControl\\\">\\r\\n </mt-dynamic-form>\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n @if (sectionId()) {\\r\\n <mt-button\\r\\n [tooltip]=\\\"t('delete')\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n icon=\\\"general.trash-01\\\"\\r\\n [loading]=\\\"deleting()\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onDelete($event)\\\"\\r\\n class=\\\"me-auto\\\"\\r\\n ></mt-button>\\r\\n }\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting() || deleting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n <mt-button\\r\\n [disabled]=\\\"!formControl.valid || deleting()\\\"\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n </div>\\r\\n</ng-container>\\r\\n\" }]\n }], ctorParameters: () => [], propDecorators: { sectionId: [{ type: i0.Input, args: [{ isSignal: true, alias: \"sectionId\", required: false }] }], initialData: [{ type: i0.Input, args: [{ isSignal: true, alias: \"initialData\", required: false }] }], sectionsCount: [{ type: i0.Input, args: [{ isSignal: true, alias: \"sectionsCount\", required: false }] }] } });","originalLength":9073,"removedExports":[],"renderedExports":["FBSectionForm"],"renderedLength":8357},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/fb-section/fb-section.js":{"code":"class FBSection {\n confirmationService = inject(ConfirmationService);\n modalService = inject(ModalService);\n translocoService = inject(TranslocoService);\n facade = inject(FormBuilderFacade);\n // Inputs\n section = input.required(...(ngDevMode ? [{ debugName: \"section\" }] : []));\n sectionsCount = input(0, ...(ngDevMode ? [{ debugName: \"sectionsCount\" }] : []));\n /** All sections - used to get available fields for condition formulas */\n allSections = input([], ...(ngDevMode ? [{ debugName: \"allSections\" }] : []));\n // Outputs - only keep drag/drop since it needs coordination with parent drop list group\n onFieldDrop = output();\n // Computed\n sectionName = computed(() => {\n const lang = document.documentElement.lang;\n const section = this.section();\n return section.name[lang] ?? section.name['en'];\n }, ...(ngDevMode ? [{ debugName: \"sectionName\" }] : []));\n fields = computed(() => this.section().fields, ...(ngDevMode ? [{ debugName: \"fields\" }] : []));\n // UI State\n expanded = signal(true, ...(ngDevMode ? [{ debugName: \"expanded\" }] : []));\n // Form groups cache for dynamic fields\n formGroupsCache = new Map();\n constructor() {\n // Cleanup stale form groups when fields change\n effect(() => {\n const currentIds = new Set(this.fields().map((f) => f.id));\n for (const id of this.formGroupsCache.keys()) {\n if (!currentIds.has(id)) {\n this.formGroupsCache.delete(id);\n }\n }\n });\n }\n getFormGroup(field) {\n let fg = this.formGroupsCache.get(field.id);\n if (fg) {\n // Check if field name changed\n if (!fg.contains(field.name)) {\n const oldKey = Object.keys(fg.controls)[0];\n const value = oldKey ? fg.get(oldKey)?.value : field.data?.data;\n fg = new FormGroup({\n [field.name]: new FormControl(value),\n });\n this.formGroupsCache.set(field.id, fg);\n }\n }\n else {\n fg = new FormGroup({\n [field.name]: new FormControl(field.data?.data),\n });\n this.formGroupsCache.set(field.id, fg);\n }\n return fg;\n }\n toggleExpanded() {\n this.expanded.update((v) => !v);\n }\n onDrop(event) {\n this.onFieldDrop.emit(event);\n }\n editSection(event) {\n event.stopPropagation();\n const section = this.section();\n this.modalService.openModal(FBSectionForm, 'drawer', {\n header: this.translocoService.translate('formBuilder.edit-section'),\n height: '20vw',\n styleClass: '!w-100 !absolute ',\n position: 'end',\n appendTo: '#page-content',\n modal: true,\n dismissible: true,\n inputValues: {\n sectionId: section.id,\n initialData: section.name,\n sectionsCount: this.sectionsCount(),\n },\n });\n }\n removeField(event, field) {\n this.confirmationService.confirmDelete({\n event,\n type: 'popup',\n accept: () => {\n this.facade.deleteField(this.section().id, field.id);\n },\n });\n }\n editField(field) {\n this.modalService.openModal(FBFieldForm, 'drawer', {\n header: this.translocoService.translate('formBuilder.field-settings'),\n height: '20vw',\n styleClass: '!w-100 !absolute !shadow-none',\n position: 'end',\n modal: true,\n dismissible: true,\n appendTo: '#page-content',\n inputValues: {\n initialData: field,\n sectionId: this.section().id,\n allSections: this.allSections(),\n },\n });\n }\n getFieldColSpan(field) {\n switch (field.width) {\n case '100':\n return 'col-span-12';\n case '50':\n return 'col-span-6';\n case '25':\n return 'col-span-3';\n default:\n return 'col-span-12';\n }\n }\n getFieldType(field) {\n const typeMap = {\n User: 'select',\n Text: 'text',\n LongText: 'editor-field',\n Percentage: 'slider',\n Date: 'date',\n Currency: 'text',\n Number: 'number',\n Lookup: 'select',\n LookupMultiSelect: 'select',\n Checkbox: 'toggle',\n InternalModule: 'select',\n DynamicList: 'select',\n API: 'select',\n Time: 'date',\n Status: 'select',\n Attachment: 'attachment',\n EditableListView: 'actionableTable',\n LookupLog: 'actionableTable',\n LookupMatrix: 'select',\n Location: 'select',\n };\n return typeMap[field.type] ?? 'text';\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBSection, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.0.3\", type: FBSection, isStandalone: true, selector: \"mt-fb-section\", inputs: { section: { classPropertyName: \"section\", publicName: \"section\", isSignal: true, isRequired: true, transformFunction: null }, sectionsCount: { classPropertyName: \"sectionsCount\", publicName: \"sectionsCount\", isSignal: true, isRequired: false, transformFunction: null }, allSections: { classPropertyName: \"allSections\", publicName: \"allSections\", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onFieldDrop: \"onFieldDrop\" }, ngImport: i0, template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div class=\\\"flex flex-col\\\">\\r\\n <div\\r\\n class=\\\"flex justify-between items-center bg-primary text-primary-contrast p-2 rounded-xl\\\"\\r\\n >\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"arrow.chevron-down\\\"\\r\\n class=\\\"transition-[rotate]\\\"\\r\\n [class.rotate-180]=\\\"expanded()\\\"\\r\\n (onClick)=\\\"toggleExpanded()\\\"\\r\\n ></mt-button>\\r\\n <span class=\\\"font-bold\\\">\\r\\n {{ sectionName() }}\\r\\n </span>\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.edit-02\\\"\\r\\n [tooltip]=\\\"t('edit-section')\\\"\\r\\n (onClick)=\\\"editSection($event)\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </div>\\r\\n @if (expanded()) {\\r\\n <div\\r\\n cdkDropList\\r\\n [id]=\\\"section().id\\\"\\r\\n cdkDropListOrientation=\\\"mixed\\\"\\r\\n [cdkDropListData]=\\\"fields()\\\"\\r\\n (cdkDropListDropped)=\\\"onDrop($event)\\\"\\r\\n class=\\\"grid grid-cols-12 gap-4 relative py-4\\\"\\r\\n [class.min-h-27]=\\\"fields().length === 0\\\"\\r\\n >\\r\\n @for (field of fields(); track field.id) {\\r\\n <div\\r\\n cdkDrag\\r\\n [cdkDragData]=\\\"field\\\"\\r\\n [cdkDragDisabled]=\\\"field._pending || field._deleting\\\"\\r\\n [class]=\\\"\\r\\n getFieldColSpan(field) + ' cursor-grab active:cursor-grabbing'\\r\\n \\\"\\r\\n >\\r\\n <div\\r\\n *cdkDragPlaceholder\\r\\n [class]=\\\"\\r\\n 'h-full min-h-27 bg-black/10 rounded-2xl ' +\\r\\n getFieldColSpan(field)\\r\\n \\\"\\r\\n ></div>\\r\\n @if (field._pending) {\\r\\n <!-- Skeleton for pending field -->\\r\\n <mt-card class=\\\"h-full animate-pulse\\\">\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <div class=\\\"flex-1 space-y-3\\\">\\r\\n <div class=\\\"h-4 bg-surface-200 rounded w-1/3\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"flex flex-col gap-1\\\">\\r\\n <div class=\\\"h-8 w-8 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-8 w-8 bg-surface-200 rounded\\\"></div>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n } @else {\\r\\n <mt-card\\r\\n class=\\\"h-full relative\\\"\\r\\n [class.opacity-50]=\\\"field._deleting\\\"\\r\\n >\\r\\n @if (field._deleting) {\\r\\n <div\\r\\n class=\\\"absolute inset-0 flex items-center justify-center bg-white/50 rounded-xl z-10\\\"\\r\\n >\\r\\n <div\\r\\n class=\\\"animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full\\\"\\r\\n ></div>\\r\\n </div>\\r\\n }\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <div class=\\\"flex-1\\\">\\r\\n <form [formGroup]=\\\"getFormGroup(field)\\\">\\r\\n <mt-dynamic-field\\r\\n [fieldName]=\\\"field.name\\\"\\r\\n [fieldConfig]=\\\"{\\r\\n label: field.name,\\r\\n readonly: true,\\r\\n type: getFieldType(field),\\r\\n }\\\"\\r\\n />\\r\\n </form>\\r\\n </div>\\r\\n <div class=\\\"flex flex-col gap-1\\\">\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.settings-01\\\"\\r\\n [tooltip]=\\\"t('edit-field')\\\"\\r\\n outlined\\r\\n [disabled]=\\\"field._deleting\\\"\\r\\n (onClick)=\\\"editField(field)\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.trash-01\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n [tooltip]=\\\"t('remove-field')\\\"\\r\\n [disabled]=\\\"field._deleting\\\"\\r\\n (onClick)=\\\"removeField($event, field)\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n } @empty {\\r\\n <mt-card class=\\\"absolute inset-0 top-4 h-full\\\" paddingless>\\r\\n <div class=\\\"size-full p-4\\\">\\r\\n <div\\r\\n class=\\\"flex justify-center items-center gap-4 h-full border-2 border-primary rounded-xl bg-primary-200 text-primary\\\"\\r\\n >\\r\\n <mt-icon icon=\\\"editor.move\\\" class=\\\"text-3xl\\\" />\\r\\n <span>{{ t(\\\"drag-from-the-side\\\") }}</span>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n</ng-container>\\r\\n\", dependencies: [{ kind: \"component\", type: Button, selector: \"mt-button\", inputs: [\"icon\", \"label\", \"tooltip\", \"class\", \"type\", \"styleClass\", \"severity\", \"badge\", \"variant\", \"badgeSeverity\", \"size\", \"iconPos\", \"autofocus\", \"fluid\", \"raised\", \"rounded\", \"text\", \"plain\", \"outlined\", \"link\", \"disabled\", \"loading\", \"pInputs\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }, { kind: \"component\", type: Card, selector: \"mt-card\", inputs: [\"class\", \"title\", \"paddingless\"] }, { kind: \"component\", type: Icon, selector: \"mt-icon\", inputs: [\"icon\"] }, { kind: \"directive\", type: CdkDrag, selector: \"[cdkDrag]\", inputs: [\"cdkDragData\", \"cdkDragLockAxis\", \"cdkDragRootElement\", \"cdkDragBoundary\", \"cdkDragStartDelay\", \"cdkDragFreeDragPosition\", \"cdkDragDisabled\", \"cdkDragConstrainPosition\", \"cdkDragPreviewClass\", \"cdkDragPreviewContainer\", \"cdkDragScale\"], outputs: [\"cdkDragStarted\", \"cdkDragReleased\", \"cdkDragEnded\", \"cdkDragEntered\", \"cdkDragExited\", \"cdkDragDropped\", \"cdkDragMoved\"], exportAs: [\"cdkDrag\"] }, { kind: \"directive\", type: CdkDropList, selector: \"[cdkDropList], cdk-drop-list\", inputs: [\"cdkDropListConnectedTo\", \"cdkDropListData\", \"cdkDropListOrientation\", \"id\", \"cdkDropListLockAxis\", \"cdkDropListDisabled\", \"cdkDropListSortingDisabled\", \"cdkDropListEnterPredicate\", \"cdkDropListSortPredicate\", \"cdkDropListAutoScrollDisabled\", \"cdkDropListAutoScrollStep\", \"cdkDropListElementContainer\", \"cdkDropListHasAnchor\"], outputs: [\"cdkDropListDropped\", \"cdkDropListEntered\", \"cdkDropListExited\", \"cdkDropListSorted\"], exportAs: [\"cdkDropList\"] }, { kind: \"directive\", type: CdkDragPlaceholder, selector: \"ng-template[cdkDragPlaceholder]\", inputs: [\"data\"] }, { kind: \"directive\", type: TranslocoDirective, selector: \"[transloco]\", inputs: [\"transloco\", \"translocoParams\", \"translocoScope\", \"translocoRead\", \"translocoPrefix\", \"translocoLang\", \"translocoLoadingTpl\"] }, { kind: \"component\", type: DynamicField, selector: \"mt-dynamic-field\", inputs: [\"fieldConfig\", \"fieldName\"] }, { kind: \"ngmodule\", type: ReactiveFormsModule }, { kind: \"directive\", type: i1.ɵNgNoValidate, selector: \"form:not([ngNoForm]):not([ngNativeValidate])\" }, { kind: \"directive\", type: i1.NgControlStatusGroup, selector: \"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]\" }, { kind: \"directive\", type: i1.FormGroupDirective, selector: \"[formGroup]\", inputs: [\"formGroup\"], outputs: [\"ngSubmit\"], exportAs: [\"ngForm\"] }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBSection, decorators: [{\n type: Component,\n args: [{ selector: 'mt-fb-section', standalone: true, imports: [\n Button,\n Card,\n Icon,\n CdkDrag,\n CdkDropList,\n CdkDragPlaceholder,\n TranslocoDirective,\n DynamicField,\n ReactiveFormsModule,\n ], template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div class=\\\"flex flex-col\\\">\\r\\n <div\\r\\n class=\\\"flex justify-between items-center bg-primary text-primary-contrast p-2 rounded-xl\\\"\\r\\n >\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"arrow.chevron-down\\\"\\r\\n class=\\\"transition-[rotate]\\\"\\r\\n [class.rotate-180]=\\\"expanded()\\\"\\r\\n (onClick)=\\\"toggleExpanded()\\\"\\r\\n ></mt-button>\\r\\n <span class=\\\"font-bold\\\">\\r\\n {{ sectionName() }}\\r\\n </span>\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.edit-02\\\"\\r\\n [tooltip]=\\\"t('edit-section')\\\"\\r\\n (onClick)=\\\"editSection($event)\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </div>\\r\\n @if (expanded()) {\\r\\n <div\\r\\n cdkDropList\\r\\n [id]=\\\"section().id\\\"\\r\\n cdkDropListOrientation=\\\"mixed\\\"\\r\\n [cdkDropListData]=\\\"fields()\\\"\\r\\n (cdkDropListDropped)=\\\"onDrop($event)\\\"\\r\\n class=\\\"grid grid-cols-12 gap-4 relative py-4\\\"\\r\\n [class.min-h-27]=\\\"fields().length === 0\\\"\\r\\n >\\r\\n @for (field of fields(); track field.id) {\\r\\n <div\\r\\n cdkDrag\\r\\n [cdkDragData]=\\\"field\\\"\\r\\n [cdkDragDisabled]=\\\"field._pending || field._deleting\\\"\\r\\n [class]=\\\"\\r\\n getFieldColSpan(field) + ' cursor-grab active:cursor-grabbing'\\r\\n \\\"\\r\\n >\\r\\n <div\\r\\n *cdkDragPlaceholder\\r\\n [class]=\\\"\\r\\n 'h-full min-h-27 bg-black/10 rounded-2xl ' +\\r\\n getFieldColSpan(field)\\r\\n \\\"\\r\\n ></div>\\r\\n @if (field._pending) {\\r\\n <!-- Skeleton for pending field -->\\r\\n <mt-card class=\\\"h-full animate-pulse\\\">\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <div class=\\\"flex-1 space-y-3\\\">\\r\\n <div class=\\\"h-4 bg-surface-200 rounded w-1/3\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"flex flex-col gap-1\\\">\\r\\n <div class=\\\"h-8 w-8 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-8 w-8 bg-surface-200 rounded\\\"></div>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n } @else {\\r\\n <mt-card\\r\\n class=\\\"h-full relative\\\"\\r\\n [class.opacity-50]=\\\"field._deleting\\\"\\r\\n >\\r\\n @if (field._deleting) {\\r\\n <div\\r\\n class=\\\"absolute inset-0 flex items-center justify-center bg-white/50 rounded-xl z-10\\\"\\r\\n >\\r\\n <div\\r\\n class=\\\"animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full\\\"\\r\\n ></div>\\r\\n </div>\\r\\n }\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <div class=\\\"flex-1\\\">\\r\\n <form [formGroup]=\\\"getFormGroup(field)\\\">\\r\\n <mt-dynamic-field\\r\\n [fieldName]=\\\"field.name\\\"\\r\\n [fieldConfig]=\\\"{\\r\\n label: field.name,\\r\\n readonly: true,\\r\\n type: getFieldType(field),\\r\\n }\\\"\\r\\n />\\r\\n </form>\\r\\n </div>\\r\\n <div class=\\\"flex flex-col gap-1\\\">\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.settings-01\\\"\\r\\n [tooltip]=\\\"t('edit-field')\\\"\\r\\n outlined\\r\\n [disabled]=\\\"field._deleting\\\"\\r\\n (onClick)=\\\"editField(field)\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.trash-01\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n [tooltip]=\\\"t('remove-field')\\\"\\r\\n [disabled]=\\\"field._deleting\\\"\\r\\n (onClick)=\\\"removeField($event, field)\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n } @empty {\\r\\n <mt-card class=\\\"absolute inset-0 top-4 h-full\\\" paddingless>\\r\\n <div class=\\\"size-full p-4\\\">\\r\\n <div\\r\\n class=\\\"flex justify-center items-center gap-4 h-full border-2 border-primary rounded-xl bg-primary-200 text-primary\\\"\\r\\n >\\r\\n <mt-icon icon=\\\"editor.move\\\" class=\\\"text-3xl\\\" />\\r\\n <span>{{ t(\\\"drag-from-the-side\\\") }}</span>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n</ng-container>\\r\\n\" }]\n }], ctorParameters: () => [], propDecorators: { section: [{ type: i0.Input, args: [{ isSignal: true, alias: \"section\", required: true }] }], sectionsCount: [{ type: i0.Input, args: [{ isSignal: true, alias: \"sectionsCount\", required: false }] }], allSections: [{ type: i0.Input, args: [{ isSignal: true, alias: \"allSections\", required: false }] }], onFieldDrop: [{ type: i0.Output, args: [\"onFieldDrop\"] }] } });","originalLength":20679,"removedExports":[],"renderedExports":["FBSection"],"renderedLength":19649},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/fb-preview-form/fb-preview-form.js":{"code":"class FBPreviewForm {\n modalService = inject(ModalService);\n ref = inject(ModalRef);\n transloco = inject(TranslocoService);\n // Inputs\n sections = input([], ...(ngDevMode ? [{ debugName: \"sections\" }] : []));\n // Tab state\n activeTab = signal('create', ...(ngDevMode ? [{ debugName: \"activeTab\" }] : []));\n isLoading = signal(false, ...(ngDevMode ? [{ debugName: \"isLoading\" }] : []));\n tabOptions = [\n {\n label: this.transloco.translate('formBuilder.create-form'),\n value: 'create',\n },\n { label: this.transloco.translate('formBuilder.edit-form'), value: 'edit' },\n ];\n // Form control for dynamic form\n formControl = new FormControl();\n constructor() {\n // Show skeleton briefly when tab changes to force rebuild\n effect(() => {\n this.activeTab(); // Track tab changes\n this.isLoading.set(true);\n setTimeout(() => this.isLoading.set(false), 50);\n });\n }\n // Convert enriched sections to DynamicFormConfig based on active tab\n formConfig = computed(() => {\n const sections = this.sections();\n const mode = this.activeTab();\n return {\n sections: sections\n .map((section, sectionIndex) => {\n const lang = document.documentElement.lang;\n const sectionName = section.name[lang] ?? section.name['en'] ?? '';\n // Filter fields based on mode\n const visibleFields = section.fields.filter((field) => {\n if (mode === 'create') {\n return !field.hiddenInCreation;\n }\n else {\n return !field.hiddenInEditForm;\n }\n });\n return {\n key: section.id,\n label: sectionName,\n type: 'header',\n columns: 12,\n order: section.order ?? sectionIndex,\n fields: visibleFields.map((field, fieldIndex) => {\n const colSpan = this.getColSpan(field.width);\n return {\n key: `field_${field.propertyId}`,\n label: field.name,\n type: this.mapFieldType(field.type),\n colSpan,\n order: field.order ?? fieldIndex,\n placeholder: field.name,\n };\n }),\n };\n })\n .filter((section) => section.fields.length > 0), // Hide empty sections\n };\n }, ...(ngDevMode ? [{ debugName: \"formConfig\" }] : []));\n /**\n * Map property view type to dynamic form field type\n */\n mapFieldType(viewType) {\n const typeMap = {\n User: 'select',\n Text: 'text',\n LongText: 'editor-field',\n Percentage: 'slider',\n Date: 'date',\n Currency: 'text',\n Number: 'number',\n Lookup: 'select',\n LookupMultiSelect: 'select',\n Checkbox: 'toggle',\n InternalModule: 'select',\n DynamicList: 'select',\n API: 'select',\n Time: 'date',\n Status: 'select',\n Attachment: 'attachment',\n EditableListView: 'actionableTable',\n LookupLog: 'actionableTable',\n LookupMatrix: 'select',\n Location: 'select',\n };\n return typeMap[viewType] ?? 'text';\n }\n /**\n * Convert field width to colSpan\n */\n getColSpan(width) {\n const widthMap = {\n '25': 3,\n '50': 6,\n '100': 12,\n };\n return widthMap[width] ?? 12;\n }\n onClose() {\n this.ref.close();\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBPreviewForm, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.0.3\", type: FBPreviewForm, isStandalone: true, selector: \"mt-fb-preview-form\", inputs: { sections: { classPropertyName: \"sections\", publicName: \"sections\", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <!-- Tabs for Create/Edit mode -->\\r\\n <div class=\\\"flex justify-center mb-4\\\">\\r\\n <mt-tabs [options]=\\\"tabOptions\\\" [(active)]=\\\"activeTab\\\"></mt-tabs>\\r\\n </div>\\r\\n\\r\\n <div class=\\\"h-full overflow-y-auto pb-10\\\">\\r\\n @if (isLoading()) {\\r\\n <div class=\\\"space-y-4 animate-pulse\\\">\\r\\n <div class=\\\"h-6 bg-surface-200 rounded w-1/3\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded w-2/3\\\"></div>\\r\\n </div>\\r\\n } @else if (formConfig().sections.length > 0) {\\r\\n <mt-dynamic-form\\r\\n [formConfig]=\\\"formConfig()\\\"\\r\\n [formControl]=\\\"formControl\\\"\\r\\n >\\r\\n </mt-dynamic-form>\\r\\n } @else {\\r\\n <div\\r\\n class=\\\"flex justify-center items-center h-64 text-muted-color text-lg\\\"\\r\\n >\\r\\n {{ t(\\\"no-fields-visible\\\") }}\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n</ng-container>\\r\\n\", dependencies: [{ kind: \"directive\", type: TranslocoDirective, selector: \"[transloco]\", inputs: [\"transloco\", \"translocoParams\", \"translocoScope\", \"translocoRead\", \"translocoPrefix\", \"translocoLang\", \"translocoLoadingTpl\"] }, { kind: \"ngmodule\", type: ReactiveFormsModule }, { kind: \"directive\", type: i1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i1.FormControlDirective, selector: \"[formControl]\", inputs: [\"formControl\", \"disabled\", \"ngModel\"], outputs: [\"ngModelChange\"], exportAs: [\"ngForm\"] }, { kind: \"component\", type: DynamicForm, selector: \"mt-dynamic-form\", inputs: [\"formConfig\"] }, { kind: \"component\", type: Tabs, selector: \"mt-tabs\", inputs: [\"options\", \"optionLabel\", \"optionValue\", \"active\", \"size\", \"fluid\", \"disabled\"], outputs: [\"activeChange\", \"onChange\"] }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBPreviewForm, decorators: [{\n type: Component,\n args: [{ selector: 'mt-fb-preview-form', standalone: true, imports: [TranslocoDirective, ReactiveFormsModule, DynamicForm, Tabs], template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <!-- Tabs for Create/Edit mode -->\\r\\n <div class=\\\"flex justify-center mb-4\\\">\\r\\n <mt-tabs [options]=\\\"tabOptions\\\" [(active)]=\\\"activeTab\\\"></mt-tabs>\\r\\n </div>\\r\\n\\r\\n <div class=\\\"h-full overflow-y-auto pb-10\\\">\\r\\n @if (isLoading()) {\\r\\n <div class=\\\"space-y-4 animate-pulse\\\">\\r\\n <div class=\\\"h-6 bg-surface-200 rounded w-1/3\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded w-2/3\\\"></div>\\r\\n </div>\\r\\n } @else if (formConfig().sections.length > 0) {\\r\\n <mt-dynamic-form\\r\\n [formConfig]=\\\"formConfig()\\\"\\r\\n [formControl]=\\\"formControl\\\"\\r\\n >\\r\\n </mt-dynamic-form>\\r\\n } @else {\\r\\n <div\\r\\n class=\\\"flex justify-center items-center h-64 text-muted-color text-lg\\\"\\r\\n >\\r\\n {{ t(\\\"no-fields-visible\\\") }}\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n</ng-container>\\r\\n\" }]\n }], ctorParameters: () => [], propDecorators: { sections: [{ type: i0.Input, args: [{ isSignal: true, alias: \"sections\", required: false }] }] } });","originalLength":8703,"removedExports":[],"renderedExports":["FBPreviewForm"],"renderedLength":8117},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/lib/form-builder.js":{"code":"class FormBuilder {\n modalService = inject(ModalService);\n confirmationService = inject(ConfirmationService);\n translocoService = inject(TranslocoService);\n facade = inject(FormBuilderFacade);\n dialogRef;\n // Local UI state\n activeTab = signal('system', ...(ngDevMode ? [{ debugName: \"activeTab\" }] : []));\n // State from facade\n sections = this.facade.sections;\n properties = this.facade.properties;\n isLoading = this.facade.isLoadingFormConfiguration;\n error = this.facade.formConfigurationError;\n // Properties map for enrichment\n propertiesMap = computed(() => {\n const map = new Map();\n for (const prop of this.properties()) {\n map.set(prop.id, prop);\n }\n return map;\n }, ...(ngDevMode ? [{ debugName: \"propertiesMap\" }] : []));\n // Enrich sections with property data for UI display\n enrichedSections = computed(() => {\n const sections = this.sections();\n const propsMap = this.propertiesMap();\n const lang = document.documentElement.lang;\n return sections.map((section) => ({\n ...section,\n fields: section.fields.map((field) => {\n const prop = propsMap.get(field.propertyId);\n const propName = prop?.name;\n const name = typeof propName === 'string'\n ? propName\n : (propName?.[lang] ??\n propName?.['en'] ??\n `Property ${field.propertyId}`);\n return {\n ...field,\n name,\n type: prop?.viewType || 'text',\n data: prop,\n };\n }),\n }));\n }, ...(ngDevMode ? [{ debugName: \"enrichedSections\" }] : []));\n // Available properties for toolbox tabs\n availableTabs = computed(() => {\n const tabs = [];\n const usedPropertyIds = new Set(this.sections().flatMap((s) => s.fields.map((f) => f.propertyId)));\n const availableProps = this.properties().filter((p) => !usedPropertyIds.has(p.id));\n const systemProps = availableProps.filter((p) => p['isSystem']);\n const customProps = availableProps.filter((p) => !p['isSystem']);\n if (systemProps.length > 0) {\n tabs.push({ id: 'system', title: 'System', properties: systemProps });\n }\n if (customProps.length > 0) {\n tabs.push({ id: 'custom', title: 'Custom', properties: customProps });\n }\n return tabs;\n }, ...(ngDevMode ? [{ debugName: \"availableTabs\" }] : []));\n constructor() {\n // Update active tab when tabs change\n effect(() => {\n const tabs = this.availableTabs();\n const currentTab = this.activeTab();\n if (tabs.length > 0 && !tabs.some((t) => t.id === currentTab)) {\n this.activeTab.set(tabs[0].id);\n }\n });\n }\n drop(event) {\n const targetSectionId = event.container.id;\n if (event.previousContainer === event.container) {\n // Reordering within the same section\n const fields = [...event.container.data];\n const [movedField] = fields.splice(event.previousIndex, 1);\n fields.splice(event.currentIndex, 0, movedField);\n // Build bulk reorder payload with new order values\n const reorderPayload = fields.map((field, index) => ({\n id: field.id,\n order: index,\n }));\n this.facade.reorderFields(targetSectionId, reorderPayload);\n }\n else if (event.previousContainer.id.startsWith('toolbox-')) {\n // Adding from toolbox\n const propertyItem = event.item.data;\n this.facade.addField(targetSectionId, {\n propertyId: propertyItem.id,\n width: '100',\n order: event.currentIndex,\n hiddenInCreation: false,\n });\n }\n else {\n // Moving between sections\n const sourceSectionId = event.previousContainer.id;\n const field = event.item.data;\n this.facade.moveField(sourceSectionId, field.id, {\n targetSectionId,\n order: event.currentIndex,\n });\n }\n }\n addSection() {\n this.dialogRef = this.modalService.openModal(FBSectionForm, 'drawer', {\n header: this.translocoService.translate('formBuilder.add-section'),\n height: '20vw',\n styleClass: '!w-100 !absolute ',\n position: 'end',\n appendTo: '#page-content',\n modal: true,\n dismissible: true,\n inputValues: {\n sectionsCount: this.sections().length,\n },\n });\n }\n openPreview() {\n this.dialogRef = this.modalService.openModal(FBPreviewForm, 'drawer', {\n header: this.translocoService.translate('formBuilder.preview'),\n styleClass: '!w-[80vw] ',\n position: 'end',\n modal: true,\n dismissible: true,\n inputValues: {\n sections: this.enrichedSections(),\n },\n });\n }\n resetFormConfiguration() {\n this.confirmationService.confirm({\n type: 'dialog',\n acceptButtonStyleClass: 'p-button-danger',\n accept: () => {\n this.facade.resetFormConfiguration();\n },\n });\n }\n noReturnPredicate = () => false;\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.0.3\", type: FormBuilder, isStandalone: true, selector: \"mt-form-builder\", ngImport: i0, template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div class=\\\"flex gap-4 h-full w-full overflow-hidden\\\" cdkDropListGroup>\\r\\n <!-- Properties Sidebar -->\\r\\n <mt-card\\r\\n class=\\\"z-1 w-1/5 min-w-xs shrink-0 h-full flex flex-col overflow-hidden\\\"\\r\\n >\\r\\n <ng-template #headless>\\r\\n <!-- Header -->\\r\\n <div class=\\\"flex items-center justify-between px-4 pt-5\\\">\\r\\n <h3 class=\\\"text-xl font-semibold\\\">{{ t(\\\"form-elements\\\") }}</h3>\\r\\n </div>\\r\\n\\r\\n @if (properties().length === 0) {\\r\\n @if (isLoading()) {\\r\\n <!-- Properties Loading Skeleton -->\\r\\n <div class=\\\"p-4 space-y-3\\\">\\r\\n <p-skeleton height=\\\"2rem\\\" styleClass=\\\"mb-4\\\" />\\r\\n @for (i of [1, 2, 3, 4, 5, 6]; track i) {\\r\\n <p-skeleton height=\\\"3rem\\\" styleClass=\\\"rounded-lg\\\" />\\r\\n }\\r\\n </div>\\r\\n } @else {\\r\\n <!-- No Properties State -->\\r\\n <div class=\\\"flex-1 flex items-center justify-center p-4\\\">\\r\\n <div class=\\\"text-center text-muted-color\\\">\\r\\n <p class=\\\"text-sm\\\">{{ t(\\\"no-properties\\\") }}</p>\\r\\n </div>\\r\\n </div>\\r\\n }\\r\\n } @else {\\r\\n <!-- Tabs using PrimeNG -->\\r\\n <p-tabs\\r\\n [(value)]=\\\"activeTab\\\"\\r\\n styleClass=\\\"structure-tabs\\\"\\r\\n class=\\\"flex flex-1 flex-col min-h-0\\\"\\r\\n >\\r\\n <p-tablist class=\\\"shrink-0\\\">\\r\\n @for (tab of availableTabs(); track tab.id) {\\r\\n <p-tab [value]=\\\"tab.id\\\">{{ tab.title | titlecase }}</p-tab>\\r\\n }\\r\\n </p-tablist>\\r\\n <p-tabpanels class=\\\"!bg-transparent !p-0 flex-1 overflow-hidden\\\">\\r\\n @for (tab of availableTabs(); track tab.id) {\\r\\n <p-tabpanel [value]=\\\"tab.id\\\" class=\\\"h-full\\\">\\r\\n <!-- Node List -->\\r\\n <div\\r\\n class=\\\"space-y-1 p-4 [&_.cdk-drag-placeholder]:hidden h-full overflow-y-auto\\\"\\r\\n [id]=\\\"'toolbox-' + tab.id\\\"\\r\\n cdkDropList\\r\\n cdkDropListSortingDisabled\\r\\n [cdkDropListData]=\\\"tab.properties\\\"\\r\\n [cdkDropListEnterPredicate]=\\\"noReturnPredicate\\\"\\r\\n >\\r\\n @for (node of tab.properties; track $index) {\\r\\n <div\\r\\n cdkDrag\\r\\n [cdkDragData]=\\\"node\\\"\\r\\n class=\\\"group cursor-move select-none relative flex items-center gap-3 py-3 px-4 rounded-lg border border-dashed border-surface-300 hover:border-solid hover:bg-emphasis dark:border-surface-500 transition-colors\\\"\\r\\n >\\r\\n <div\\r\\n *cdkDragPlaceholder\\r\\n class=\\\"col-span-12 min-h-27 w-full rounded-2xl bg-black/10 z-1\\\"\\r\\n ></div>\\r\\n <span class=\\\"flex-1 text-base font-medium\\\">{{\\r\\n node.name\\r\\n }}</span>\\r\\n </div>\\r\\n }\\r\\n\\r\\n @if (tab.properties.length === 0) {\\r\\n <div class=\\\"py-8 text-center text-muted-color\\\">\\r\\n <p class=\\\"text-sm\\\">\\r\\n All {{ tab.title }} items are in use\\r\\n </p>\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </p-tabpanel>\\r\\n }\\r\\n </p-tabpanels>\\r\\n </p-tabs>\\r\\n }\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n\\r\\n <!-- Main Canvas Area -->\\r\\n <div class=\\\"flex flex-col gap-4 flex-1 w-full h-full overflow-y-auto\\\">\\r\\n <mt-card>\\r\\n <ng-template #headless>\\r\\n <div class=\\\"p-4 flex items-center gap-2\\\">\\r\\n <mt-button\\r\\n icon=\\\"layout.layout-top\\\"\\r\\n [label]=\\\"t('add-section')\\\"\\r\\n (onClick)=\\\"addSection()\\\"\\r\\n [disabled]=\\\"isLoading()\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n icon=\\\"general.eye\\\"\\r\\n [label]=\\\"t('preview')\\\"\\r\\n (onClick)=\\\"openPreview()\\\"\\r\\n [disabled]=\\\"isLoading()\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n icon=\\\"finance.credit-card-plus\\\"\\r\\n [label]=\\\"t('reset')\\\"\\r\\n (onClick)=\\\"resetFormConfiguration()\\\"\\r\\n [disabled]=\\\"isLoading()\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n\\r\\n @if (isLoading()) {\\r\\n <!-- Form Loading Skeleton -->\\r\\n @for (i of [1, 2]; track i) {\\r\\n <mt-card>\\r\\n <ng-template #headless>\\r\\n <div class=\\\"p-4 space-y-4\\\">\\r\\n <!-- Section header skeleton -->\\r\\n <div class=\\\"flex items-center justify-between\\\">\\r\\n <p-skeleton width=\\\"10rem\\\" height=\\\"1.5rem\\\" />\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <p-skeleton width=\\\"2rem\\\" height=\\\"2rem\\\" shape=\\\"circle\\\" />\\r\\n <p-skeleton width=\\\"2rem\\\" height=\\\"2rem\\\" shape=\\\"circle\\\" />\\r\\n </div>\\r\\n </div>\\r\\n <!-- Fields skeleton -->\\r\\n <div class=\\\"grid grid-cols-12 gap-4\\\">\\r\\n <div class=\\\"col-span-6\\\">\\r\\n <p-skeleton height=\\\"4rem\\\" styleClass=\\\"rounded-lg\\\" />\\r\\n </div>\\r\\n <div class=\\\"col-span-6\\\">\\r\\n <p-skeleton height=\\\"4rem\\\" styleClass=\\\"rounded-lg\\\" />\\r\\n </div>\\r\\n <div class=\\\"col-span-12\\\">\\r\\n <p-skeleton height=\\\"4rem\\\" styleClass=\\\"rounded-lg\\\" />\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n }\\r\\n } @else {\\r\\n @for (section of enrichedSections(); track section.id) {\\r\\n <mt-fb-section\\r\\n [section]=\\\"section\\\"\\r\\n [sectionsCount]=\\\"enrichedSections().length\\\"\\r\\n [allSections]=\\\"enrichedSections()\\\"\\r\\n (onFieldDrop)=\\\"drop($event)\\\"\\r\\n >\\r\\n </mt-fb-section>\\r\\n } @empty {\\r\\n <mt-card>\\r\\n <div class=\\\"h-27 p-4\\\">\\r\\n <div\\r\\n class=\\\"flex justify-center items-center gap-4 h-full border-2 border-primary rounded-xl bg-primary-200 text-primary\\\"\\r\\n >\\r\\n <span>{{ t(\\\"no-section\\\") }}</span>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n</ng-container>\\r\\n\", styles: [\".cdk-drag{cursor:grab}.cdk-drag:active,.cdk-drag-preview{cursor:grabbing}.cdk-drag-placeholder{opacity:.5}.cdk-drop-list-dragging .cdk-drag{cursor:grabbing}\\n\"], dependencies: [{ kind: \"ngmodule\", type: CommonModule }, { kind: \"ngmodule\", type: FormsModule }, { kind: \"ngmodule\", type: TabsModule }, { kind: \"component\", type: i1$1.Tabs, selector: \"p-tabs\", inputs: [\"value\", \"scrollable\", \"lazy\", \"selectOnFocus\", \"showNavigators\", \"tabindex\"], outputs: [\"valueChange\"] }, { kind: \"component\", type: i1$1.TabPanels, selector: \"p-tabpanels\" }, { kind: \"component\", type: i1$1.TabPanel, selector: \"p-tabpanel\", inputs: [\"lazy\", \"value\"], outputs: [\"valueChange\"] }, { kind: \"component\", type: i1$1.TabList, selector: \"p-tablist\" }, { kind: \"component\", type: i1$1.Tab, selector: \"p-tab\", inputs: [\"value\", \"disabled\"], outputs: [\"valueChange\"] }, { kind: \"ngmodule\", type: SkeletonModule }, { kind: \"component\", type: i2.Skeleton, selector: \"p-skeleton\", inputs: [\"styleClass\", \"shape\", \"animation\", \"borderRadius\", \"size\", \"width\", \"height\"] }, { kind: \"component\", type: Button, selector: \"mt-button\", inputs: [\"icon\", \"label\", \"tooltip\", \"class\", \"type\", \"styleClass\", \"severity\", \"badge\", \"variant\", \"badgeSeverity\", \"size\", \"iconPos\", \"autofocus\", \"fluid\", \"raised\", \"rounded\", \"text\", \"plain\", \"outlined\", \"link\", \"disabled\", \"loading\", \"pInputs\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }, { kind: \"component\", type: Card, selector: \"mt-card\", inputs: [\"class\", \"title\", \"paddingless\"] }, { kind: \"directive\", type: TranslocoDirective, selector: \"[transloco]\", inputs: [\"transloco\", \"translocoParams\", \"translocoScope\", \"translocoRead\", \"translocoPrefix\", \"translocoLang\", \"translocoLoadingTpl\"] }, { kind: \"component\", type: FBSection, selector: \"mt-fb-section\", inputs: [\"section\", \"sectionsCount\", \"allSections\"], outputs: [\"onFieldDrop\"] }, { kind: \"ngmodule\", type: DragDropModule }, { kind: \"directive\", type: i3.CdkDropList, selector: \"[cdkDropList], cdk-drop-list\", inputs: [\"cdkDropListConnectedTo\", \"cdkDropListData\", \"cdkDropListOrientation\", \"id\", \"cdkDropListLockAxis\", \"cdkDropListDisabled\", \"cdkDropListSortingDisabled\", \"cdkDropListEnterPredicate\", \"cdkDropListSortPredicate\", \"cdkDropListAutoScrollDisabled\", \"cdkDropListAutoScrollStep\", \"cdkDropListElementContainer\", \"cdkDropListHasAnchor\"], outputs: [\"cdkDropListDropped\", \"cdkDropListEntered\", \"cdkDropListExited\", \"cdkDropListSorted\"], exportAs: [\"cdkDropList\"] }, { kind: \"directive\", type: i3.CdkDropListGroup, selector: \"[cdkDropListGroup]\", inputs: [\"cdkDropListGroupDisabled\"], exportAs: [\"cdkDropListGroup\"] }, { kind: \"directive\", type: i3.CdkDrag, selector: \"[cdkDrag]\", inputs: [\"cdkDragData\", \"cdkDragLockAxis\", \"cdkDragRootElement\", \"cdkDragBoundary\", \"cdkDragStartDelay\", \"cdkDragFreeDragPosition\", \"cdkDragDisabled\", \"cdkDragConstrainPosition\", \"cdkDragPreviewClass\", \"cdkDragPreviewContainer\", \"cdkDragScale\"], outputs: [\"cdkDragStarted\", \"cdkDragReleased\", \"cdkDragEnded\", \"cdkDragEntered\", \"cdkDragExited\", \"cdkDragDropped\", \"cdkDragMoved\"], exportAs: [\"cdkDrag\"] }, { kind: \"directive\", type: i3.CdkDragPlaceholder, selector: \"ng-template[cdkDragPlaceholder]\", inputs: [\"data\"] }, { kind: \"pipe\", type: i4.TitleCasePipe, name: \"titlecase\" }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilder, decorators: [{\n type: Component,\n args: [{ selector: 'mt-form-builder', standalone: true, imports: [\n CommonModule,\n FormsModule,\n TabsModule,\n SkeletonModule,\n Button,\n Card,\n TranslocoDirective,\n FBSection,\n DragDropModule,\n ], template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div class=\\\"flex gap-4 h-full w-full overflow-hidden\\\" cdkDropListGroup>\\r\\n <!-- Properties Sidebar -->\\r\\n <mt-card\\r\\n class=\\\"z-1 w-1/5 min-w-xs shrink-0 h-full flex flex-col overflow-hidden\\\"\\r\\n >\\r\\n <ng-template #headless>\\r\\n <!-- Header -->\\r\\n <div class=\\\"flex items-center justify-between px-4 pt-5\\\">\\r\\n <h3 class=\\\"text-xl font-semibold\\\">{{ t(\\\"form-elements\\\") }}</h3>\\r\\n </div>\\r\\n\\r\\n @if (properties().length === 0) {\\r\\n @if (isLoading()) {\\r\\n <!-- Properties Loading Skeleton -->\\r\\n <div class=\\\"p-4 space-y-3\\\">\\r\\n <p-skeleton height=\\\"2rem\\\" styleClass=\\\"mb-4\\\" />\\r\\n @for (i of [1, 2, 3, 4, 5, 6]; track i) {\\r\\n <p-skeleton height=\\\"3rem\\\" styleClass=\\\"rounded-lg\\\" />\\r\\n }\\r\\n </div>\\r\\n } @else {\\r\\n <!-- No Properties State -->\\r\\n <div class=\\\"flex-1 flex items-center justify-center p-4\\\">\\r\\n <div class=\\\"text-center text-muted-color\\\">\\r\\n <p class=\\\"text-sm\\\">{{ t(\\\"no-properties\\\") }}</p>\\r\\n </div>\\r\\n </div>\\r\\n }\\r\\n } @else {\\r\\n <!-- Tabs using PrimeNG -->\\r\\n <p-tabs\\r\\n [(value)]=\\\"activeTab\\\"\\r\\n styleClass=\\\"structure-tabs\\\"\\r\\n class=\\\"flex flex-1 flex-col min-h-0\\\"\\r\\n >\\r\\n <p-tablist class=\\\"shrink-0\\\">\\r\\n @for (tab of availableTabs(); track tab.id) {\\r\\n <p-tab [value]=\\\"tab.id\\\">{{ tab.title | titlecase }}</p-tab>\\r\\n }\\r\\n </p-tablist>\\r\\n <p-tabpanels class=\\\"!bg-transparent !p-0 flex-1 overflow-hidden\\\">\\r\\n @for (tab of availableTabs(); track tab.id) {\\r\\n <p-tabpanel [value]=\\\"tab.id\\\" class=\\\"h-full\\\">\\r\\n <!-- Node List -->\\r\\n <div\\r\\n class=\\\"space-y-1 p-4 [&_.cdk-drag-placeholder]:hidden h-full overflow-y-auto\\\"\\r\\n [id]=\\\"'toolbox-' + tab.id\\\"\\r\\n cdkDropList\\r\\n cdkDropListSortingDisabled\\r\\n [cdkDropListData]=\\\"tab.properties\\\"\\r\\n [cdkDropListEnterPredicate]=\\\"noReturnPredicate\\\"\\r\\n >\\r\\n @for (node of tab.properties; track $index) {\\r\\n <div\\r\\n cdkDrag\\r\\n [cdkDragData]=\\\"node\\\"\\r\\n class=\\\"group cursor-move select-none relative flex items-center gap-3 py-3 px-4 rounded-lg border border-dashed border-surface-300 hover:border-solid hover:bg-emphasis dark:border-surface-500 transition-colors\\\"\\r\\n >\\r\\n <div\\r\\n *cdkDragPlaceholder\\r\\n class=\\\"col-span-12 min-h-27 w-full rounded-2xl bg-black/10 z-1\\\"\\r\\n ></div>\\r\\n <span class=\\\"flex-1 text-base font-medium\\\">{{\\r\\n node.name\\r\\n }}</span>\\r\\n </div>\\r\\n }\\r\\n\\r\\n @if (tab.properties.length === 0) {\\r\\n <div class=\\\"py-8 text-center text-muted-color\\\">\\r\\n <p class=\\\"text-sm\\\">\\r\\n All {{ tab.title }} items are in use\\r\\n </p>\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </p-tabpanel>\\r\\n }\\r\\n </p-tabpanels>\\r\\n </p-tabs>\\r\\n }\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n\\r\\n <!-- Main Canvas Area -->\\r\\n <div class=\\\"flex flex-col gap-4 flex-1 w-full h-full overflow-y-auto\\\">\\r\\n <mt-card>\\r\\n <ng-template #headless>\\r\\n <div class=\\\"p-4 flex items-center gap-2\\\">\\r\\n <mt-button\\r\\n icon=\\\"layout.layout-top\\\"\\r\\n [label]=\\\"t('add-section')\\\"\\r\\n (onClick)=\\\"addSection()\\\"\\r\\n [disabled]=\\\"isLoading()\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n icon=\\\"general.eye\\\"\\r\\n [label]=\\\"t('preview')\\\"\\r\\n (onClick)=\\\"openPreview()\\\"\\r\\n [disabled]=\\\"isLoading()\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n icon=\\\"finance.credit-card-plus\\\"\\r\\n [label]=\\\"t('reset')\\\"\\r\\n (onClick)=\\\"resetFormConfiguration()\\\"\\r\\n [disabled]=\\\"isLoading()\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n\\r\\n @if (isLoading()) {\\r\\n <!-- Form Loading Skeleton -->\\r\\n @for (i of [1, 2]; track i) {\\r\\n <mt-card>\\r\\n <ng-template #headless>\\r\\n <div class=\\\"p-4 space-y-4\\\">\\r\\n <!-- Section header skeleton -->\\r\\n <div class=\\\"flex items-center justify-between\\\">\\r\\n <p-skeleton width=\\\"10rem\\\" height=\\\"1.5rem\\\" />\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <p-skeleton width=\\\"2rem\\\" height=\\\"2rem\\\" shape=\\\"circle\\\" />\\r\\n <p-skeleton width=\\\"2rem\\\" height=\\\"2rem\\\" shape=\\\"circle\\\" />\\r\\n </div>\\r\\n </div>\\r\\n <!-- Fields skeleton -->\\r\\n <div class=\\\"grid grid-cols-12 gap-4\\\">\\r\\n <div class=\\\"col-span-6\\\">\\r\\n <p-skeleton height=\\\"4rem\\\" styleClass=\\\"rounded-lg\\\" />\\r\\n </div>\\r\\n <div class=\\\"col-span-6\\\">\\r\\n <p-skeleton height=\\\"4rem\\\" styleClass=\\\"rounded-lg\\\" />\\r\\n </div>\\r\\n <div class=\\\"col-span-12\\\">\\r\\n <p-skeleton height=\\\"4rem\\\" styleClass=\\\"rounded-lg\\\" />\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n }\\r\\n } @else {\\r\\n @for (section of enrichedSections(); track section.id) {\\r\\n <mt-fb-section\\r\\n [section]=\\\"section\\\"\\r\\n [sectionsCount]=\\\"enrichedSections().length\\\"\\r\\n [allSections]=\\\"enrichedSections()\\\"\\r\\n (onFieldDrop)=\\\"drop($event)\\\"\\r\\n >\\r\\n </mt-fb-section>\\r\\n } @empty {\\r\\n <mt-card>\\r\\n <div class=\\\"h-27 p-4\\\">\\r\\n <div\\r\\n class=\\\"flex justify-center items-center gap-4 h-full border-2 border-primary rounded-xl bg-primary-200 text-primary\\\"\\r\\n >\\r\\n <span>{{ t(\\\"no-section\\\") }}</span>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n</ng-container>\\r\\n\", styles: [\".cdk-drag{cursor:grab}.cdk-drag:active,.cdk-drag-preview{cursor:grabbing}.cdk-drag-placeholder{opacity:.5}.cdk-drop-list-dragging .cdk-drag{cursor:grabbing}\\n\"] }]\n }], ctorParameters: () => [] });","originalLength":25117,"removedExports":[],"renderedExports":["FormBuilder"],"renderedLength":23974},"C:/Users/ABDULLAH WISHAH/Documents/GitHub/components/dist/masterteam/form-builder/tmp-esm2022/public-api.js":{"code":"/*\n * Public API Surface of form-builder\n */","originalLength":157,"removedExports":[],"renderedExports":[],"renderedLength":44},"C:\\Users\\ABDULLAH WISHAH\\Documents\\GitHub\\components\\dist\\masterteam\\form-builder\\tmp-esm2022\\masterteam-form-builder.js":{"code":"/**\n * Generated bundle index. Do not edit.\n */","originalLength":129,"removedExports":[],"renderedExports":[],"renderedLength":47}},"referencedFiles":[],"code":"import * as i0 from '@angular/core';\nimport { inject, Injectable, computed, input, signal, viewChild, Component, effect, output } from '@angular/core';\nimport * as i4 from '@angular/common';\nimport { CommonModule } from '@angular/common';\nimport * as i1 from '@angular/forms';\nimport { FormControl, ReactiveFormsModule, FormGroup, FormsModule } from '@angular/forms';\nimport * as i1$1 from 'primeng/tabs';\nimport { TabsModule } from 'primeng/tabs';\nimport * as i2 from 'primeng/skeleton';\nimport { SkeletonModule } from 'primeng/skeleton';\nimport { Button } from '@masterteam/components/button';\nimport { Card } from '@masterteam/components/card';\nimport { ModalService } from '@masterteam/components/modal';\nimport { ConfirmationService } from '@masterteam/components/confirmation';\nimport { TranslocoDirective, TranslocoService } from '@jsverse/transloco';\nimport * as i3 from '@angular/cdk/drag-drop';\nimport { CdkDrag, CdkDropList, CdkDragPlaceholder, DragDropModule } from '@angular/cdk/drag-drop';\nimport { DynamicField } from '@masterteam/forms/dynamic-field';\nimport { Icon } from '@masterteam/icons';\nimport { Action, Selector, State, Store, select } from '@ngxs/store';\nimport { HttpClient } from '@angular/common/http';\nimport { CrudStateBase, handleApiRequest, RadioCardsFieldConfig } from '@masterteam/components';\nimport { DynamicForm } from '@masterteam/forms/dynamic-form';\nimport { ToggleField } from '@masterteam/components/toggle-field';\nimport { ModalRef } from '@masterteam/components/dialog';\nimport { FormulaToolbar, FormulaEditor } from '@masterteam/components/formula';\nimport { Tabs } from '@masterteam/components/tabs';\n\n// ============================================================================\n// Module Configuration Actions\n// ============================================================================\nclass SetModuleInfo {\n moduleType;\n moduleId;\n parentModuleType;\n parentModuleId;\n parentPath;\n static type = '[FormBuilder] Set Module Info';\n constructor(moduleType, moduleId, parentModuleType, parentModuleId, parentPath) {\n this.moduleType = moduleType;\n this.moduleId = moduleId;\n this.parentModuleType = parentModuleType;\n this.parentModuleId = parentModuleId;\n this.parentPath = parentPath;\n }\n}\nclass ResetFormBuilderState {\n static type = '[FormBuilder] Reset State';\n}\nclass SetProperties {\n properties;\n static type = '[FormBuilder] Set Properties';\n constructor(properties) {\n this.properties = properties;\n }\n}\n// ============================================================================\n// Form Configuration Actions\n// ============================================================================\nclass GetFormConfiguration {\n static type = '[FormBuilder] Get Form Configuration';\n}\nclass ResetFormConfiguration {\n static type = '[FormBuilder] Reset Form Configuration';\n}\n// ============================================================================\n// Section Actions\n// ============================================================================\nclass AddSection {\n payload;\n static type = '[FormBuilder] Add Section';\n constructor(payload) {\n this.payload = payload;\n }\n}\nclass UpdateSection {\n sectionId;\n payload;\n static type = '[FormBuilder] Update Section';\n constructor(sectionId, payload) {\n this.sectionId = sectionId;\n this.payload = payload;\n }\n}\nclass DeleteSection {\n sectionId;\n static type = '[FormBuilder] Delete Section';\n constructor(sectionId) {\n this.sectionId = sectionId;\n }\n}\n// ============================================================================\n// Field Actions\n// ============================================================================\nclass AddField {\n sectionId;\n payload;\n static type = '[FormBuilder] Add Field';\n constructor(sectionId, payload) {\n this.sectionId = sectionId;\n this.payload = payload;\n }\n}\nclass UpdateField {\n sectionId;\n fieldId;\n payload;\n static type = '[FormBuilder] Update Field';\n constructor(sectionId, fieldId, payload) {\n this.sectionId = sectionId;\n this.fieldId = fieldId;\n this.payload = payload;\n }\n}\nclass DeleteField {\n sectionId;\n fieldId;\n static type = '[FormBuilder] Delete Field';\n constructor(sectionId, fieldId) {\n this.sectionId = sectionId;\n this.fieldId = fieldId;\n }\n}\nclass ReorderFields {\n sectionId;\n payload;\n static type = '[FormBuilder] Reorder Fields';\n constructor(sectionId, payload) {\n this.sectionId = sectionId;\n this.payload = payload;\n }\n}\nclass MoveField {\n sectionId;\n fieldId;\n payload;\n static type = '[FormBuilder] Move Field';\n constructor(sectionId, fieldId, payload) {\n this.sectionId = sectionId;\n this.fieldId = fieldId;\n this.payload = payload;\n }\n}\n\n// ============================================================================\n// Action Keys Enum\n// ============================================================================\nvar FormBuilderActionKey;\n(function (FormBuilderActionKey) {\n // Form Configuration\n FormBuilderActionKey[\"GetFormConfiguration\"] = \"getFormConfiguration\";\n FormBuilderActionKey[\"ResetFormConfiguration\"] = \"resetFormConfiguration\";\n // Section CRUD\n FormBuilderActionKey[\"AddSection\"] = \"addSection\";\n FormBuilderActionKey[\"UpdateSection\"] = \"updateSection\";\n FormBuilderActionKey[\"DeleteSection\"] = \"deleteSection\";\n // Field CRUD\n FormBuilderActionKey[\"AddField\"] = \"addField\";\n FormBuilderActionKey[\"UpdateField\"] = \"updateField\";\n FormBuilderActionKey[\"DeleteField\"] = \"deleteField\";\n FormBuilderActionKey[\"MoveField\"] = \"moveField\";\n FormBuilderActionKey[\"ReorderFields\"] = \"reorderFields\";\n})(FormBuilderActionKey || (FormBuilderActionKey = {}));\n\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n// Default State\nconst DEFAULT_STATE = {\n // Module configuration\n moduleType: null,\n moduleId: null,\n parentModuleType: null,\n parentModuleId: null,\n parentPath: '',\n // Form data\n formConfiguration: null,\n // Properties for field enrichment\n properties: [],\n // Loading state (from LoadingStateShape)\n loadingActive: [],\n errors: {},\n};\nlet FormBuilderState = class FormBuilderState extends CrudStateBase {\n http = inject(HttpClient);\n baseUrl = 'formConfigurations';\n // ============================================================================\n // Helpers\n // ============================================================================\n getApiPath(state) {\n const { parentPath, moduleType, moduleId } = state;\n return `${this.baseUrl}${parentPath}/${moduleType}/${moduleId}`;\n }\n // ============================================================================\n // Selectors\n // ============================================================================\n static getState(state) {\n return state ?? DEFAULT_STATE;\n }\n static getFormConfiguration(state) {\n return state?.formConfiguration ?? null;\n }\n static getSections(state) {\n return state?.formConfiguration?.sections ?? [];\n }\n static getModuleType(state) {\n return state?.moduleType ?? null;\n }\n static getModuleId(state) {\n return state?.moduleId ?? null;\n }\n static getProperties(state) {\n return state?.properties ?? [];\n }\n // ============================================================================\n // Module Configuration Actions\n // ============================================================================\n setModuleInfo(ctx, action) {\n let parentPath = '';\n if (action.parentModuleType && action.parentModuleId) {\n parentPath = `/${action.parentModuleType}/${action.parentModuleId}`;\n }\n else if (action.parentPath) {\n parentPath = action.parentPath;\n }\n ctx.patchState({\n moduleType: action.moduleType,\n moduleId: action.moduleId,\n parentModuleType: action.parentModuleType ?? null,\n parentModuleId: action.parentModuleId ?? null,\n parentPath: parentPath ?? '',\n });\n }\n resetState(ctx) {\n ctx.setState(DEFAULT_STATE);\n }\n setProperties(ctx, action) {\n ctx.patchState({\n properties: action.properties,\n });\n }\n // ============================================================================\n // Form Configuration Actions\n // ============================================================================\n getFormConfiguration(ctx) {\n const state = ctx.getState();\n const apiPath = this.getApiPath(state);\n const req$ = this.http.get(apiPath);\n return this.load(ctx, {\n key: FormBuilderActionKey.GetFormConfiguration,\n request$: req$,\n updateState: (_state, data) => ({\n formConfiguration: data ?? null,\n }),\n });\n }\n resetFormConfiguration(ctx) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/reset`;\n const req$ = this.http.delete(apiPath);\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.ResetFormConfiguration,\n request$: req$,\n onSuccess: (res, _currentState) => ({\n formConfiguration: res.data ?? null,\n }),\n });\n }\n // ============================================================================\n // Section Actions\n // ============================================================================\n addSection(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections`;\n const req$ = this.http.post(apiPath, action.payload);\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.AddSection,\n request$: req$,\n onSuccess: (res, currentState) => {\n const sections = this.adapter.addOne(currentState.formConfiguration?.sections ?? [], res.data);\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n });\n }\n updateSection(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}`;\n const req$ = this.http.put(apiPath, action.payload);\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.UpdateSection,\n request$: req$,\n onSuccess: (res, currentState) => {\n const sections = this.adapter.upsertOne(currentState.formConfiguration?.sections ?? [], res.data, 'id');\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n });\n }\n deleteSection(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}`;\n const req$ = this.http.delete(apiPath);\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.DeleteSection,\n request$: req$,\n onSuccess: (res, currentState) => {\n const sections = this.adapter.removeOne(currentState.formConfiguration?.sections ?? [], res.data.id, 'id');\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n });\n }\n // ============================================================================\n // Field Actions\n // ============================================================================\n addField(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields`;\n const req$ = this.http.post(apiPath, action.payload);\n // Generate temp ID for optimistic update\n const tempId = `temp_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;\n const tempField = {\n id: tempId,\n sectionId: action.sectionId,\n propertyId: action.payload.propertyId,\n width: action.payload.width,\n order: action.payload.order ?? 0,\n hiddenInCreation: action.payload.hiddenInCreation,\n _pending: true,\n };\n // Optimistically add the temp field\n const sectionsWithTemp = (state.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n const fields = [...section.fields];\n const insertIndex = action.payload.order ?? fields.length;\n fields.splice(insertIndex, 0, tempField);\n return { ...section, fields };\n }\n return section;\n });\n ctx.patchState({\n formConfiguration: {\n ...state.formConfiguration,\n sections: sectionsWithTemp,\n },\n });\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.AddField,\n request$: req$,\n onSuccess: (res, currentState) => {\n const newField = res.data;\n // Replace temp field with real field\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n return {\n ...section,\n fields: section.fields.map((f) => f.id === tempId ? newField : f),\n };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n onError: (_error, currentState) => {\n // Remove temp field on error\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n return {\n ...section,\n fields: section.fields.filter((f) => f.id !== tempId),\n };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n });\n }\n updateField(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields/${action.fieldId}`;\n const req$ = this.http.put(apiPath, action.payload);\n // Apply optimistic update for order changes\n if (action.payload.order !== undefined) {\n const newOrder = action.payload.order;\n const sections = (state.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n const fields = [...section.fields];\n const currentIndex = fields.findIndex((f) => f.id === action.fieldId);\n if (currentIndex !== -1) {\n const [movedField] = fields.splice(currentIndex, 1);\n fields.splice(newOrder, 0, movedField);\n }\n return { ...section, fields };\n }\n return section;\n });\n ctx.patchState({\n formConfiguration: {\n ...state.formConfiguration,\n sections,\n },\n });\n }\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.UpdateField,\n request$: req$,\n onSuccess: (res, currentState) => {\n const updatedField = res.data;\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n // Update the field but preserve current array order (from optimistic update)\n // Don't re-sort by order property as other fields may have stale order values\n const updatedFields = section.fields.map((f, index) => f.id === updatedField.id\n ? { ...updatedField, order: index }\n : { ...f, order: index });\n return {\n ...section,\n fields: updatedFields,\n };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n onError: (_error, _currentState) => {\n // Revert optimistic update on error - reload original state\n if (action.payload.order !== undefined) {\n return {\n formConfiguration: state.formConfiguration,\n };\n }\n return {};\n },\n });\n }\n deleteField(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields/${action.fieldId}`;\n const req$ = this.http.delete(apiPath);\n // Optimistically mark field as deleting\n const sectionsWithDeleting = (state.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n return {\n ...section,\n fields: section.fields.map((f) => f.id === action.fieldId ? { ...f, _deleting: true } : f),\n };\n }\n return section;\n });\n ctx.patchState({\n formConfiguration: {\n ...state.formConfiguration,\n sections: sectionsWithDeleting,\n },\n });\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.DeleteField,\n request$: req$,\n onSuccess: (res, currentState) => {\n const { id: deletedId, sectionId } = res.data;\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === sectionId) {\n return {\n ...section,\n fields: section.fields.filter((f) => f.id !== deletedId),\n };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n onError: (_error, currentState) => {\n // Remove _deleting flag on error\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n return {\n ...section,\n fields: section.fields.map((f) => f.id === action.fieldId ? { ...f, _deleting: false } : f),\n };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n });\n }\n reorderFields(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields/reorder`;\n const req$ = this.http.put(apiPath, action.payload);\n // Create order map for optimistic update\n const orderMap = new Map(action.payload.map((p) => [p.id, p.order]));\n // Apply optimistic update\n const optimisticSections = (state.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n const reorderedFields = section.fields\n .map((f) => ({\n ...f,\n order: orderMap.get(f.id) ?? f.order,\n }))\n .sort((a, b) => a.order - b.order);\n return { ...section, fields: reorderedFields };\n }\n return section;\n });\n ctx.patchState({\n formConfiguration: {\n ...state.formConfiguration,\n sections: optimisticSections,\n },\n });\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.ReorderFields,\n request$: req$,\n onSuccess: (res, currentState) => {\n const updatedFields = res.data;\n const fieldMap = new Map(updatedFields.map((f) => [f.id, f]));\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === action.sectionId) {\n const mergedFields = section.fields\n .map((f) => fieldMap.get(f.id) ?? f)\n .sort((a, b) => a.order - b.order);\n return { ...section, fields: mergedFields };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n onError: (_error, _currentState) => {\n // Revert to original state on error\n return {\n formConfiguration: state.formConfiguration,\n };\n },\n });\n }\n moveField(ctx, action) {\n const state = ctx.getState();\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields/${action.fieldId}/move`;\n const req$ = this.http.put(apiPath, action.payload);\n // Apply optimistic update - move field immediately\n const sourceSectionId = action.sectionId;\n const targetSectionId = action.payload.targetSectionId;\n const targetOrder = action.payload.order ?? 0;\n let movedFieldData = null;\n const optimisticSections = (state.formConfiguration?.sections ?? []).map((section) => {\n if (section.id === sourceSectionId) {\n const fieldToMove = section.fields.find((f) => f.id === action.fieldId);\n if (fieldToMove) {\n movedFieldData = { ...fieldToMove, order: targetOrder };\n }\n return {\n ...section,\n fields: section.fields.filter((f) => f.id !== action.fieldId),\n };\n }\n return section;\n });\n // Add to target section\n const sectionsWithMoved = optimisticSections.map((section) => {\n if (section.id === targetSectionId && movedFieldData) {\n const fields = [...section.fields];\n fields.splice(targetOrder, 0, movedFieldData);\n return { ...section, fields };\n }\n return section;\n });\n ctx.patchState({\n formConfiguration: {\n ...state.formConfiguration,\n sections: sectionsWithMoved,\n },\n });\n return handleApiRequest({\n ctx,\n key: FormBuilderActionKey.MoveField,\n request$: req$,\n onSuccess: (res, currentState) => {\n const movedField = res.data;\n const sections = (currentState.formConfiguration?.sections ?? []).map((section) => {\n // Update the moved field with server response\n if (section.id === targetSectionId) {\n return {\n ...section,\n fields: section.fields\n .map((f) => (f.id === movedField.id ? movedField : f))\n .sort((a, b) => a.order - b.order),\n };\n }\n return section;\n });\n return {\n formConfiguration: {\n ...currentState.formConfiguration,\n sections,\n },\n };\n },\n onError: (_error, _currentState) => {\n // Revert optimistic update on error\n return {\n formConfiguration: state.formConfiguration,\n };\n },\n });\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilderState, deps: null, target: i0.ɵɵFactoryTarget.Injectable });\n static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilderState });\n};\n__decorate([\n Action(SetModuleInfo)\n], FormBuilderState.prototype, \"setModuleInfo\", null);\n__decorate([\n Action(ResetFormBuilderState)\n], FormBuilderState.prototype, \"resetState\", null);\n__decorate([\n Action(SetProperties)\n], FormBuilderState.prototype, \"setProperties\", null);\n__decorate([\n Action(GetFormConfiguration)\n], FormBuilderState.prototype, \"getFormConfiguration\", null);\n__decorate([\n Action(ResetFormConfiguration)\n], FormBuilderState.prototype, \"resetFormConfiguration\", null);\n__decorate([\n Action(AddSection)\n], FormBuilderState.prototype, \"addSection\", null);\n__decorate([\n Action(UpdateSection)\n], FormBuilderState.prototype, \"updateSection\", null);\n__decorate([\n Action(DeleteSection)\n], FormBuilderState.prototype, \"deleteSection\", null);\n__decorate([\n Action(AddField)\n], FormBuilderState.prototype, \"addField\", null);\n__decorate([\n Action(UpdateField)\n], FormBuilderState.prototype, \"updateField\", null);\n__decorate([\n Action(DeleteField)\n], FormBuilderState.prototype, \"deleteField\", null);\n__decorate([\n Action(ReorderFields)\n], FormBuilderState.prototype, \"reorderFields\", null);\n__decorate([\n Action(MoveField)\n], FormBuilderState.prototype, \"moveField\", null);\n__decorate([\n Selector()\n], FormBuilderState, \"getState\", null);\n__decorate([\n Selector()\n], FormBuilderState, \"getFormConfiguration\", null);\n__decorate([\n Selector()\n], FormBuilderState, \"getSections\", null);\n__decorate([\n Selector()\n], FormBuilderState, \"getModuleType\", null);\n__decorate([\n Selector()\n], FormBuilderState, \"getModuleId\", null);\n__decorate([\n Selector()\n], FormBuilderState, \"getProperties\", null);\nFormBuilderState = __decorate([\n State({\n name: 'formBuilder',\n defaults: DEFAULT_STATE,\n })\n], FormBuilderState);\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilderState, decorators: [{\n type: Injectable\n }], propDecorators: { setModuleInfo: [], resetState: [], setProperties: [], getFormConfiguration: [], resetFormConfiguration: [], addSection: [], updateSection: [], deleteSection: [], addField: [], updateField: [], deleteField: [], reorderFields: [], moveField: [] } });\n\nclass FormBuilderFacade {\n store = inject(Store);\n // ============================================================================\n // State Selectors\n // ============================================================================\n stateSignal = select(FormBuilderState.getState);\n formConfiguration = select(FormBuilderState.getFormConfiguration);\n sections = select(FormBuilderState.getSections);\n properties = select(FormBuilderState.getProperties);\n moduleType = select(FormBuilderState.getModuleType);\n moduleId = select(FormBuilderState.getModuleId);\n // ============================================================================\n // Loading Signals\n // ============================================================================\n isLoadingFormConfiguration = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.GetFormConfiguration), ...(ngDevMode ? [{ debugName: \"isLoadingFormConfiguration\" }] : []));\n isResettingFormConfiguration = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.ResetFormConfiguration), ...(ngDevMode ? [{ debugName: \"isResettingFormConfiguration\" }] : []));\n isAddingSection = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.AddSection), ...(ngDevMode ? [{ debugName: \"isAddingSection\" }] : []));\n isUpdatingSection = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.UpdateSection), ...(ngDevMode ? [{ debugName: \"isUpdatingSection\" }] : []));\n isDeletingSection = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.DeleteSection), ...(ngDevMode ? [{ debugName: \"isDeletingSection\" }] : []));\n isAddingField = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.AddField), ...(ngDevMode ? [{ debugName: \"isAddingField\" }] : []));\n isUpdatingField = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.UpdateField), ...(ngDevMode ? [{ debugName: \"isUpdatingField\" }] : []));\n isDeletingField = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.DeleteField), ...(ngDevMode ? [{ debugName: \"isDeletingField\" }] : []));\n isMovingField = computed(() => this.stateSignal().loadingActive.includes(FormBuilderActionKey.MoveField), ...(ngDevMode ? [{ debugName: \"isMovingField\" }] : []));\n // ============================================================================\n // Error Signals\n // ============================================================================\n formConfigurationError = computed(() => this.stateSignal().errors[FormBuilderActionKey.GetFormConfiguration] ??\n null, ...(ngDevMode ? [{ debugName: \"formConfigurationError\" }] : []));\n sectionError = computed(() => {\n const errors = this.stateSignal().errors;\n return (errors[FormBuilderActionKey.AddSection] ??\n errors[FormBuilderActionKey.UpdateSection] ??\n errors[FormBuilderActionKey.DeleteSection] ??\n null);\n }, ...(ngDevMode ? [{ debugName: \"sectionError\" }] : []));\n fieldError = computed(() => {\n const errors = this.stateSignal().errors;\n return (errors[FormBuilderActionKey.AddField] ??\n errors[FormBuilderActionKey.UpdateField] ??\n errors[FormBuilderActionKey.DeleteField] ??\n errors[FormBuilderActionKey.MoveField] ??\n null);\n }, ...(ngDevMode ? [{ debugName: \"fieldError\" }] : []));\n // ============================================================================\n // Module Configuration Dispatchers\n // ============================================================================\n setModuleInfo(moduleType, moduleId, parentModuleType, parentModuleId, parentPath) {\n return this.store.dispatch(new SetModuleInfo(moduleType, moduleId, parentModuleType, parentModuleId, parentPath));\n }\n resetState() {\n return this.store.dispatch(new ResetFormBuilderState());\n }\n setProperties(properties) {\n return this.store.dispatch(new SetProperties(properties));\n }\n // ============================================================================\n // Form Configuration Dispatchers\n // ============================================================================\n getFormConfiguration() {\n return this.store.dispatch(new GetFormConfiguration());\n }\n resetFormConfiguration() {\n return this.store.dispatch(new ResetFormConfiguration());\n }\n // ============================================================================\n // Section Dispatchers\n // ============================================================================\n addSection(payload) {\n return this.store.dispatch(new AddSection(payload));\n }\n updateSection(sectionId, payload) {\n return this.store.dispatch(new UpdateSection(sectionId, payload));\n }\n deleteSection(sectionId) {\n return this.store.dispatch(new DeleteSection(sectionId));\n }\n // ============================================================================\n // Field Dispatchers\n // ============================================================================\n addField(sectionId, payload) {\n return this.store.dispatch(new AddField(sectionId, payload));\n }\n updateField(sectionId, fieldId, payload) {\n return this.store.dispatch(new UpdateField(sectionId, fieldId, payload));\n }\n deleteField(sectionId, fieldId) {\n return this.store.dispatch(new DeleteField(sectionId, fieldId));\n }\n reorderFields(sectionId, payload) {\n return this.store.dispatch(new ReorderFields(sectionId, payload));\n }\n moveField(sectionId, fieldId, payload) {\n return this.store.dispatch(new MoveField(sectionId, fieldId, payload));\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilderFacade, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilderFacade, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilderFacade, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }] });\n\n/**\n * Condition Formula Constants\n * Static functions and operators for condition formulas (Show/Hide/Enable/Disable)\n */\n/**\n * Functions for field conditions\n */\nconst CONDITION_FUNCTION_CATEGORIES = [\n {\n name: 'Logic',\n displayName: 'Field Visibility',\n functions: [\n {\n name: 'SHOW_IF',\n category: 'Logic',\n description: 'Show this field when condition is true',\n signature: 'SHOW_IF(condition)',\n parameters: [\n {\n name: 'condition',\n type: 'boolean',\n description: 'When true, field is visible',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: [\n 'SHOW_IF(@Status == \"Active\")',\n 'SHOW_IF(@Type == \"Custom\")',\n ],\n },\n {\n name: 'HIDE_IF',\n category: 'Logic',\n description: 'Hide this field when condition is true',\n signature: 'HIDE_IF(condition)',\n parameters: [\n {\n name: 'condition',\n type: 'boolean',\n description: 'When true, field is hidden',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: ['HIDE_IF(@Status == \"Closed\")', 'HIDE_IF(ISNULL(@Parent))'],\n },\n {\n name: 'DISABLE_IF',\n category: 'Logic',\n description: 'Disable this field when condition is true',\n signature: 'DISABLE_IF(condition)',\n parameters: [\n {\n name: 'condition',\n type: 'boolean',\n description: 'When true, field is disabled',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: [\n 'DISABLE_IF(@IsLocked == true)',\n 'DISABLE_IF(@Status == \"Approved\")',\n ],\n },\n {\n name: 'ENABLE_IF',\n category: 'Logic',\n description: 'Enable this field when condition is true',\n signature: 'ENABLE_IF(condition)',\n parameters: [\n {\n name: 'condition',\n type: 'boolean',\n description: 'When true, field is enabled',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: [\n 'ENABLE_IF(@Status == \"Draft\")',\n 'ENABLE_IF(@CanEdit == true)',\n ],\n },\n ],\n },\n {\n name: 'Aggregation',\n displayName: 'Logic Helpers',\n functions: [\n {\n name: 'AND',\n category: 'Aggregation',\n description: 'Returns true if all conditions are true',\n signature: 'AND(condition1, condition2)',\n parameters: [\n {\n name: 'condition1',\n type: 'boolean',\n description: 'First condition',\n required: true,\n },\n {\n name: 'condition2',\n type: 'boolean',\n description: 'Second condition',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: ['AND(@Status == \"Active\", @Priority > 0)'],\n },\n {\n name: 'OR',\n category: 'Aggregation',\n description: 'Returns true if any condition is true',\n signature: 'OR(condition1, condition2)',\n parameters: [\n {\n name: 'condition1',\n type: 'boolean',\n description: 'First condition',\n required: true,\n },\n {\n name: 'condition2',\n type: 'boolean',\n description: 'Second condition',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: ['OR(@Status == \"Active\", @Status == \"Pending\")'],\n },\n {\n name: 'NOT',\n category: 'Aggregation',\n description: 'Returns the opposite of the condition',\n signature: 'NOT(condition)',\n parameters: [\n {\n name: 'condition',\n type: 'boolean',\n description: 'The condition to negate',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: ['NOT(@IsCompleted)'],\n },\n {\n name: 'ISNULL',\n category: 'Aggregation',\n description: 'Returns true if value is null or empty',\n signature: 'ISNULL(value)',\n parameters: [\n {\n name: 'value',\n type: 'any',\n description: 'The value to check',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: ['ISNULL(@Description)'],\n },\n {\n name: 'CONTAINS',\n category: 'Aggregation',\n description: 'Returns true if text contains the search string',\n signature: 'CONTAINS(text, search)',\n parameters: [\n {\n name: 'text',\n type: 'string',\n description: 'The text to search in',\n required: true,\n },\n {\n name: 'search',\n type: 'string',\n description: 'The string to search for',\n required: true,\n },\n ],\n returnType: 'boolean',\n examples: ['CONTAINS(@Name, \"Project\")'],\n },\n ],\n },\n];\n/**\n * Operators for conditions\n */\nconst CONDITION_OPERATORS = [\n // Comparison\n {\n symbol: '==',\n name: 'Equal',\n type: 'comparison',\n description: 'Equal to',\n precedence: 3,\n },\n {\n symbol: '!=',\n name: 'Not Equal',\n type: 'comparison',\n description: 'Not equal to',\n precedence: 3,\n },\n {\n symbol: '>',\n name: 'Greater Than',\n type: 'comparison',\n description: 'Greater than',\n precedence: 4,\n },\n {\n symbol: '<',\n name: 'Less Than',\n type: 'comparison',\n description: 'Less than',\n precedence: 4,\n },\n {\n symbol: '>=',\n name: 'Greater or Equal',\n type: 'comparison',\n description: 'Greater than or equal',\n precedence: 4,\n },\n {\n symbol: '<=',\n name: 'Less or Equal',\n type: 'comparison',\n description: 'Less than or equal',\n precedence: 4,\n },\n // Logical\n {\n symbol: '&&',\n name: 'And',\n type: 'logical',\n description: 'Logical AND',\n precedence: 2,\n },\n {\n symbol: '||',\n name: 'Or',\n type: 'logical',\n description: 'Logical OR',\n precedence: 1,\n },\n];\n\n/**\n * Field Conditions Dialog\n *\n * Allows users to define conditional display formulas for form fields.\n * Uses FormulaToolbar + FormulaEditor directly for a visual formula editing experience.\n */\nclass FBFieldConditions {\n modalService = inject(ModalService);\n ref = inject(ModalRef);\n // Inputs\n /** Initial formula (JSON string from backend) */\n initialFormula = input('', ...(ngDevMode ? [{ debugName: \"initialFormula\" }] : []));\n /** Available fields from the form builder (other fields that can be referenced) */\n availableFields = input([], ...(ngDevMode ? [{ debugName: \"availableFields\" }] : []));\n // UI State\n submitting = signal(false, ...(ngDevMode ? [{ debugName: \"submitting\" }] : []));\n // Form control for the formula editor (tokens array)\n formulaControl = new FormControl([]);\n // View child for the editor\n editorRef = viewChild('editor', ...(ngDevMode ? [{ debugName: \"editorRef\" }] : []));\n // Condition-specific functions and operators\n functionCategories = CONDITION_FUNCTION_CATEGORIES;\n operators = CONDITION_OPERATORS;\n /** Extract property keys for toolbar */\n propertyKeys = computed(() => this.availableFields().map((f) => f.key), ...(ngDevMode ? [{ debugName: \"propertyKeys\" }] : []));\n /** Toolbar labels */\n toolbarLabels = {\n functions: 'Functions',\n properties: 'Fields',\n operators: 'Operators',\n noPropertiesAvailable: 'No fields available',\n };\n ngOnInit() {\n // Parse JSON string to tokens\n const formula = this.initialFormula();\n if (formula) {\n try {\n const tokens = JSON.parse(formula);\n this.formulaControl.patchValue(tokens);\n }\n catch {\n // Invalid JSON, start with empty\n }\n }\n }\n /** Handle block insert from toolbar */\n onBlockInsert(block) {\n const editor = this.editorRef();\n if (editor) {\n editor.addBlock(block);\n }\n }\n onSave() {\n const tokens = this.formulaControl.value ?? [];\n const formula = tokens.length > 0 ? JSON.stringify(tokens) : '';\n this.ref.close({ saved: true, conditionalDisplayFormula: formula });\n }\n onCancel() {\n this.ref.close({ saved: false });\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBFieldConditions, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.2.0\", version: \"21.0.3\", type: FBFieldConditions, isStandalone: true, selector: \"mt-fb-field-conditions\", inputs: { initialFormula: { classPropertyName: \"initialFormula\", publicName: \"initialFormula\", isSignal: true, isRequired: false, transformFunction: null }, availableFields: { classPropertyName: \"availableFields\", publicName: \"availableFields\", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: \"editorRef\", first: true, predicate: [\"editor\"], descendants: true, isSignal: true }], ngImport: i0, template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10 flex flex-col gap-3\\\">\\r\\n <!-- Formula Toolbar -->\\r\\n <mt-formula-toolbar\\r\\n [knownProperties]=\\\"propertyKeys()\\\"\\r\\n [functionCategories]=\\\"functionCategories\\\"\\r\\n [operators]=\\\"operators\\\"\\r\\n [labels]=\\\"toolbarLabels\\\"\\r\\n (onBlockInsert)=\\\"onBlockInsert($event)\\\"\\r\\n />\\r\\n <!-- Formula Editor -->\\r\\n <mt-formula-editor\\r\\n #editor\\r\\n [placeholder]=\\\"t('build-condition-formula')\\\"\\r\\n [formControl]=\\\"formulaControl\\\"\\r\\n />\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n />\\r\\n <mt-button\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n />\\r\\n </div>\\r\\n</ng-container>\\r\\n\", dependencies: [{ kind: \"directive\", type: TranslocoDirective, selector: \"[transloco]\", inputs: [\"transloco\", \"translocoParams\", \"translocoScope\", \"translocoRead\", \"translocoPrefix\", \"translocoLang\", \"translocoLoadingTpl\"] }, { kind: \"ngmodule\", type: ReactiveFormsModule }, { kind: \"directive\", type: i1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i1.FormControlDirective, selector: \"[formControl]\", inputs: [\"formControl\", \"disabled\", \"ngModel\"], outputs: [\"ngModelChange\"], exportAs: [\"ngForm\"] }, { kind: \"component\", type: Button, selector: \"mt-button\", inputs: [\"icon\", \"label\", \"tooltip\", \"class\", \"type\", \"styleClass\", \"severity\", \"badge\", \"variant\", \"badgeSeverity\", \"size\", \"iconPos\", \"autofocus\", \"fluid\", \"raised\", \"rounded\", \"text\", \"plain\", \"outlined\", \"link\", \"disabled\", \"loading\", \"pInputs\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }, { kind: \"component\", type: FormulaToolbar, selector: \"mt-formula-toolbar\", inputs: [\"knownProperties\", \"functionCategories\", \"operators\", \"initialTab\", \"searchPlaceholder\", \"labels\"], outputs: [\"onBlockInsert\", \"onTabChange\"] }, { kind: \"component\", type: FormulaEditor, selector: \"mt-formula-editor\", inputs: [\"placeholder\", \"initialTokens\", \"disabled\"], outputs: [\"formulaChange\", \"tokensChange\", \"onBlur\", \"onFocus\"] }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBFieldConditions, decorators: [{\n type: Component,\n args: [{ selector: 'mt-fb-field-conditions', standalone: true, imports: [\n TranslocoDirective,\n ReactiveFormsModule,\n Button,\n FormulaToolbar,\n FormulaEditor,\n ], template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10 flex flex-col gap-3\\\">\\r\\n <!-- Formula Toolbar -->\\r\\n <mt-formula-toolbar\\r\\n [knownProperties]=\\\"propertyKeys()\\\"\\r\\n [functionCategories]=\\\"functionCategories\\\"\\r\\n [operators]=\\\"operators\\\"\\r\\n [labels]=\\\"toolbarLabels\\\"\\r\\n (onBlockInsert)=\\\"onBlockInsert($event)\\\"\\r\\n />\\r\\n <!-- Formula Editor -->\\r\\n <mt-formula-editor\\r\\n #editor\\r\\n [placeholder]=\\\"t('build-condition-formula')\\\"\\r\\n [formControl]=\\\"formulaControl\\\"\\r\\n />\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n />\\r\\n <mt-button\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n />\\r\\n </div>\\r\\n</ng-container>\\r\\n\" }]\n }], propDecorators: { initialFormula: [{ type: i0.Input, args: [{ isSignal: true, alias: \"initialFormula\", required: false }] }], availableFields: [{ type: i0.Input, args: [{ isSignal: true, alias: \"availableFields\", required: false }] }], editorRef: [{ type: i0.ViewChild, args: ['editor', { isSignal: true }] }] } });\n\nclass FBFieldForm {\n transloco = inject(TranslocoService);\n modalService = inject(ModalService);\n ref = inject(ModalRef);\n confirmationService = inject(ConfirmationService);\n facade = inject(FormBuilderFacade);\n // Inputs\n sectionId = input('', ...(ngDevMode ? [{ debugName: \"sectionId\" }] : []));\n initialData = input(null, ...(ngDevMode ? [{ debugName: \"initialData\" }] : []));\n /** All sections with enriched fields (to get available fields for conditions) */\n allSections = input([], ...(ngDevMode ? [{ debugName: \"allSections\" }] : []));\n // UI State\n submitting = signal(false, ...(ngDevMode ? [{ debugName: \"submitting\" }] : []));\n deleting = signal(false, ...(ngDevMode ? [{ debugName: \"deleting\" }] : []));\n conditionalDisplayFormula = signal('', ...(ngDevMode ? [{ debugName: \"conditionalDisplayFormula\" }] : []));\n conditionsDialogRef;\n /**\n * Compute available fields for condition formula\n * Excludes the current field being edited\n */\n availableFields = computed(() => {\n const sections = this.allSections();\n const currentField = this.initialData();\n const fields = [];\n for (const section of sections) {\n for (const field of section.fields) {\n // Exclude the current field being edited\n if (currentField && field.id === currentField.id)\n continue;\n fields.push({\n key: field.name,\n name: field.name,\n type: field.type,\n });\n }\n }\n return fields;\n }, ...(ngDevMode ? [{ debugName: \"availableFields\" }] : []));\n // Form\n formControl = new FormControl();\n showHideControl = new FormControl(false);\n formConfig = {\n sections: [\n {\n key: 'section-form',\n type: 'none',\n columns: 12,\n order: 1,\n fields: [\n {\n key: 'isRequired',\n label: this.transloco.translate('formBuilder.is-required'),\n type: 'toggle',\n toggleShape: 'card',\n colSpan: 12,\n order: 1,\n },\n {\n key: 'hiddenInCreation',\n label: this.transloco.translate('formBuilder.hidden-in-creation'),\n type: 'toggle',\n toggleShape: 'card',\n colSpan: 12,\n order: 2,\n },\n {\n key: 'hiddenInEditForm',\n label: this.transloco.translate('formBuilder.hidden-in-edit-form'),\n type: 'toggle',\n toggleShape: 'card',\n colSpan: 12,\n order: 3,\n },\n new RadioCardsFieldConfig({\n key: 'size',\n label: this.transloco.translate('formBuilder.size'),\n placeholder: this.transloco.translate('formBuilder.size'),\n options: [\n { id: 's', name: 'S' },\n { id: 'm', name: 'M' },\n { id: 'l', name: 'L' },\n ],\n order: 4,\n size: 'small',\n }),\n ],\n },\n ],\n };\n constructor() {\n effect(() => {\n const data = this.initialData();\n if (data) {\n const widthToSize = {\n '25': 's',\n '50': 'm',\n '100': 'l',\n };\n this.formControl.patchValue({\n isRequired: data.isRequired ?? false,\n hiddenInCreation: data.hiddenInCreation ?? false,\n hiddenInEditForm: data.hiddenInEditForm ?? false,\n size: widthToSize[data.width] ?? 'l',\n });\n // Set show/hide toggle based on existing value\n this.showHideControl.patchValue(data.showConditionalDisplayFormula ?? false);\n this.conditionalDisplayFormula.set(data.conditionalDisplayFormula ?? '');\n }\n });\n }\n onSave() {\n if (this.formControl.invalid)\n return;\n const formValue = this.formControl.value;\n const field = this.initialData();\n const sectionId = this.sectionId();\n if (!field || !sectionId)\n return;\n const widthMap = {\n s: '25',\n m: '50',\n l: '100',\n };\n const payload = {\n width: widthMap[formValue.size] ?? '100',\n hiddenInCreation: formValue.hiddenInCreation ?? false,\n hiddenInEditForm: formValue.hiddenInEditForm ?? false,\n isRequired: formValue.isRequired ?? false,\n showConditionalDisplayFormula: this.showHideControl.value ?? false,\n conditionalDisplayFormula: this.showHideControl.value\n ? this.conditionalDisplayFormula()\n : null,\n };\n this.submitting.set(true);\n this.facade.updateField(sectionId, field.id, payload).subscribe({\n next: () => this.ref.close(true),\n error: () => this.submitting.set(false),\n });\n }\n onCancel() {\n this.ref.close(false);\n }\n onSetConditions() {\n this.conditionsDialogRef = this.modalService.openModal(FBFieldConditions, 'drawer', {\n header: this.transloco.translate('formBuilder.set-conditions'),\n styleClass: '!w-[calc(100%-25rem)] !absolute ',\n position: 'start',\n modal: true,\n dismissible: true,\n appendTo: '#page-content',\n inputValues: {\n initialFormula: this.conditionalDisplayFormula(),\n availableFields: this.availableFields(),\n },\n });\n this.conditionsDialogRef.onClose.subscribe((result) => {\n if (result?.saved) {\n this.conditionalDisplayFormula.set(result.conditionalDisplayFormula ?? '');\n }\n });\n }\n onDelete(event) {\n const field = this.initialData();\n const sectionId = this.sectionId();\n if (!field || !sectionId)\n return;\n this.confirmationService.confirmDelete({\n event,\n type: 'popup',\n accept: () => {\n this.deleting.set(true);\n this.facade.deleteField(sectionId, field.id).subscribe({\n next: () => this.ref.close(true),\n error: () => this.deleting.set(false),\n });\n },\n });\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBFieldForm, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.0.3\", type: FBFieldForm, isStandalone: true, selector: \"mt-fb-field-form\", inputs: { sectionId: { classPropertyName: \"sectionId\", publicName: \"sectionId\", isSignal: true, isRequired: false, transformFunction: null }, initialData: { classPropertyName: \"initialData\", publicName: \"initialData\", isSignal: true, isRequired: false, transformFunction: null }, allSections: { classPropertyName: \"allSections\", publicName: \"allSections\", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10 flex flex-col gap-4\\\">\\r\\n <mt-dynamic-form [formConfig]=\\\"formConfig\\\" [formControl]=\\\"formControl\\\">\\r\\n </mt-dynamic-form>\\r\\n\\r\\n <!-- Show/Hide Toggle with Set Conditions -->\\r\\n <mt-toggle-field\\r\\n toggleShape=\\\"card\\\"\\r\\n [label]=\\\"t('show-hide')\\\"\\r\\n [descriptionCard]=\\\"t('show-hide-description')\\\"\\r\\n icon=\\\"general.eye\\\"\\r\\n [formControl]=\\\"showHideControl\\\"\\r\\n >\\r\\n <ng-template #toggleCardBottom>\\r\\n @if (showHideControl.value) {\\r\\n <div class=\\\"mt-3\\\">\\r\\n <mt-button\\r\\n [label]=\\\"t('set-conditions')\\\"\\r\\n size=\\\"small\\\"\\r\\n (onClick)=\\\"onSetConditions()\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n }\\r\\n </ng-template>\\r\\n </mt-toggle-field>\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n @if (initialData()) {\\r\\n <mt-button\\r\\n [tooltip]=\\\"t('delete')\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n icon=\\\"general.trash-01\\\"\\r\\n [loading]=\\\"deleting()\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onDelete($event)\\\"\\r\\n class=\\\"me-auto\\\"\\r\\n ></mt-button>\\r\\n }\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting() || deleting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n <mt-button\\r\\n [disabled]=\\\"!formControl.valid || deleting()\\\"\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n </div>\\r\\n</ng-container>\\r\\n\", dependencies: [{ kind: \"directive\", type: TranslocoDirective, selector: \"[transloco]\", inputs: [\"transloco\", \"translocoParams\", \"translocoScope\", \"translocoRead\", \"translocoPrefix\", \"translocoLang\", \"translocoLoadingTpl\"] }, { kind: \"ngmodule\", type: ReactiveFormsModule }, { kind: \"directive\", type: i1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i1.FormControlDirective, selector: \"[formControl]\", inputs: [\"formControl\", \"disabled\", \"ngModel\"], outputs: [\"ngModelChange\"], exportAs: [\"ngForm\"] }, { kind: \"component\", type: DynamicForm, selector: \"mt-dynamic-form\", inputs: [\"formConfig\"] }, { kind: \"component\", type: Button, selector: \"mt-button\", inputs: [\"icon\", \"label\", \"tooltip\", \"class\", \"type\", \"styleClass\", \"severity\", \"badge\", \"variant\", \"badgeSeverity\", \"size\", \"iconPos\", \"autofocus\", \"fluid\", \"raised\", \"rounded\", \"text\", \"plain\", \"outlined\", \"link\", \"disabled\", \"loading\", \"pInputs\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }, { kind: \"component\", type: ToggleField, selector: \"mt-toggle-field\", inputs: [\"label\", \"labelPosition\", \"placeholder\", \"readonly\", \"pInputs\", \"required\", \"toggleShape\", \"size\", \"icon\", \"descriptionCard\"], outputs: [\"onChange\"] }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBFieldForm, decorators: [{\n type: Component,\n args: [{ selector: 'mt-fb-field-form', standalone: true, imports: [\n TranslocoDirective,\n ReactiveFormsModule,\n DynamicForm,\n Button,\n ToggleField,\n ], template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10 flex flex-col gap-4\\\">\\r\\n <mt-dynamic-form [formConfig]=\\\"formConfig\\\" [formControl]=\\\"formControl\\\">\\r\\n </mt-dynamic-form>\\r\\n\\r\\n <!-- Show/Hide Toggle with Set Conditions -->\\r\\n <mt-toggle-field\\r\\n toggleShape=\\\"card\\\"\\r\\n [label]=\\\"t('show-hide')\\\"\\r\\n [descriptionCard]=\\\"t('show-hide-description')\\\"\\r\\n icon=\\\"general.eye\\\"\\r\\n [formControl]=\\\"showHideControl\\\"\\r\\n >\\r\\n <ng-template #toggleCardBottom>\\r\\n @if (showHideControl.value) {\\r\\n <div class=\\\"mt-3\\\">\\r\\n <mt-button\\r\\n [label]=\\\"t('set-conditions')\\\"\\r\\n size=\\\"small\\\"\\r\\n (onClick)=\\\"onSetConditions()\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n }\\r\\n </ng-template>\\r\\n </mt-toggle-field>\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n @if (initialData()) {\\r\\n <mt-button\\r\\n [tooltip]=\\\"t('delete')\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n icon=\\\"general.trash-01\\\"\\r\\n [loading]=\\\"deleting()\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onDelete($event)\\\"\\r\\n class=\\\"me-auto\\\"\\r\\n ></mt-button>\\r\\n }\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting() || deleting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n <mt-button\\r\\n [disabled]=\\\"!formControl.valid || deleting()\\\"\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n </div>\\r\\n</ng-container>\\r\\n\" }]\n }], ctorParameters: () => [], propDecorators: { sectionId: [{ type: i0.Input, args: [{ isSignal: true, alias: \"sectionId\", required: false }] }], initialData: [{ type: i0.Input, args: [{ isSignal: true, alias: \"initialData\", required: false }] }], allSections: [{ type: i0.Input, args: [{ isSignal: true, alias: \"allSections\", required: false }] }] } });\n\nclass FBSectionForm {\n transloco = inject(TranslocoService);\n modalService = inject(ModalService);\n ref = inject(ModalRef);\n confirmationService = inject(ConfirmationService);\n facade = inject(FormBuilderFacade);\n // Inputs\n sectionId = input(null, ...(ngDevMode ? [{ debugName: \"sectionId\" }] : []));\n initialData = input(null, ...(ngDevMode ? [{ debugName: \"initialData\" }] : []));\n sectionsCount = input(0, ...(ngDevMode ? [{ debugName: \"sectionsCount\" }] : []));\n // UI State\n submitting = signal(false, ...(ngDevMode ? [{ debugName: \"submitting\" }] : []));\n deleting = signal(false, ...(ngDevMode ? [{ debugName: \"deleting\" }] : []));\n // Form\n formControl = new FormControl();\n formConfig = {\n sections: [\n {\n key: 'section-form',\n type: 'none',\n columns: 12,\n order: 1,\n fields: [\n {\n key: 'name-ar',\n label: this.transloco.translate('formBuilder.name-ar'),\n type: 'text',\n placeholder: this.transloco.translate('formBuilder.name-ar'),\n colSpan: 12,\n order: 1,\n },\n {\n key: 'name-en',\n label: this.transloco.translate('formBuilder.name-en'),\n type: 'text',\n placeholder: this.transloco.translate('formBuilder.name-en'),\n colSpan: 12,\n order: 2,\n },\n ],\n },\n ],\n };\n constructor() {\n effect(() => {\n const data = this.initialData();\n if (data) {\n this.formControl.patchValue({\n 'name-ar': data.ar,\n 'name-en': data.en,\n });\n }\n });\n }\n onSave() {\n if (this.formControl.invalid)\n return;\n const formValue = this.formControl.value;\n const payload = {\n name: {\n ar: formValue['name-ar'],\n en: formValue['name-en'],\n },\n };\n this.submitting.set(true);\n const sectionId = this.sectionId();\n if (sectionId) {\n // Update existing section\n this.facade.updateSection(sectionId, payload).subscribe({\n next: () => this.ref.close(true),\n error: () => this.submitting.set(false),\n });\n }\n else {\n // Create new section\n this.facade\n .addSection({ ...payload, order: this.sectionsCount() })\n .subscribe({\n next: () => this.ref.close(true),\n error: () => this.submitting.set(false),\n });\n }\n }\n onCancel() {\n this.ref.close(false);\n }\n onDelete(event) {\n const sectionId = this.sectionId();\n if (!sectionId)\n return;\n this.confirmationService.confirmDelete({\n event,\n type: 'popup',\n accept: () => {\n this.deleting.set(true);\n this.facade.deleteSection(sectionId).subscribe({\n next: () => this.ref.close(true),\n error: () => this.deleting.set(false),\n });\n },\n });\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBSectionForm, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.0.3\", type: FBSectionForm, isStandalone: true, selector: \"mt-fb-section-form\", inputs: { sectionId: { classPropertyName: \"sectionId\", publicName: \"sectionId\", isSignal: true, isRequired: false, transformFunction: null }, initialData: { classPropertyName: \"initialData\", publicName: \"initialData\", isSignal: true, isRequired: false, transformFunction: null }, sectionsCount: { classPropertyName: \"sectionsCount\", publicName: \"sectionsCount\", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10\\\">\\r\\n <mt-dynamic-form [formConfig]=\\\"formConfig\\\" [formControl]=\\\"formControl\\\">\\r\\n </mt-dynamic-form>\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n @if (sectionId()) {\\r\\n <mt-button\\r\\n [tooltip]=\\\"t('delete')\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n icon=\\\"general.trash-01\\\"\\r\\n [loading]=\\\"deleting()\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onDelete($event)\\\"\\r\\n class=\\\"me-auto\\\"\\r\\n ></mt-button>\\r\\n }\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting() || deleting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n <mt-button\\r\\n [disabled]=\\\"!formControl.valid || deleting()\\\"\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n </div>\\r\\n</ng-container>\\r\\n\", dependencies: [{ kind: \"directive\", type: TranslocoDirective, selector: \"[transloco]\", inputs: [\"transloco\", \"translocoParams\", \"translocoScope\", \"translocoRead\", \"translocoPrefix\", \"translocoLang\", \"translocoLoadingTpl\"] }, { kind: \"ngmodule\", type: ReactiveFormsModule }, { kind: \"directive\", type: i1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i1.FormControlDirective, selector: \"[formControl]\", inputs: [\"formControl\", \"disabled\", \"ngModel\"], outputs: [\"ngModelChange\"], exportAs: [\"ngForm\"] }, { kind: \"component\", type: DynamicForm, selector: \"mt-dynamic-form\", inputs: [\"formConfig\"] }, { kind: \"component\", type: Button, selector: \"mt-button\", inputs: [\"icon\", \"label\", \"tooltip\", \"class\", \"type\", \"styleClass\", \"severity\", \"badge\", \"variant\", \"badgeSeverity\", \"size\", \"iconPos\", \"autofocus\", \"fluid\", \"raised\", \"rounded\", \"text\", \"plain\", \"outlined\", \"link\", \"disabled\", \"loading\", \"pInputs\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBSectionForm, decorators: [{\n type: Component,\n args: [{ selector: 'mt-fb-section-form', standalone: true, imports: [TranslocoDirective, ReactiveFormsModule, DynamicForm, Button], template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10\\\">\\r\\n <mt-dynamic-form [formConfig]=\\\"formConfig\\\" [formControl]=\\\"formControl\\\">\\r\\n </mt-dynamic-form>\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n @if (sectionId()) {\\r\\n <mt-button\\r\\n [tooltip]=\\\"t('delete')\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n icon=\\\"general.trash-01\\\"\\r\\n [loading]=\\\"deleting()\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onDelete($event)\\\"\\r\\n class=\\\"me-auto\\\"\\r\\n ></mt-button>\\r\\n }\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting() || deleting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n <mt-button\\r\\n [disabled]=\\\"!formControl.valid || deleting()\\\"\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n </div>\\r\\n</ng-container>\\r\\n\" }]\n }], ctorParameters: () => [], propDecorators: { sectionId: [{ type: i0.Input, args: [{ isSignal: true, alias: \"sectionId\", required: false }] }], initialData: [{ type: i0.Input, args: [{ isSignal: true, alias: \"initialData\", required: false }] }], sectionsCount: [{ type: i0.Input, args: [{ isSignal: true, alias: \"sectionsCount\", required: false }] }] } });\n\nclass FBSection {\n confirmationService = inject(ConfirmationService);\n modalService = inject(ModalService);\n translocoService = inject(TranslocoService);\n facade = inject(FormBuilderFacade);\n // Inputs\n section = input.required(...(ngDevMode ? [{ debugName: \"section\" }] : []));\n sectionsCount = input(0, ...(ngDevMode ? [{ debugName: \"sectionsCount\" }] : []));\n /** All sections - used to get available fields for condition formulas */\n allSections = input([], ...(ngDevMode ? [{ debugName: \"allSections\" }] : []));\n // Outputs - only keep drag/drop since it needs coordination with parent drop list group\n onFieldDrop = output();\n // Computed\n sectionName = computed(() => {\n const lang = document.documentElement.lang;\n const section = this.section();\n return section.name[lang] ?? section.name['en'];\n }, ...(ngDevMode ? [{ debugName: \"sectionName\" }] : []));\n fields = computed(() => this.section().fields, ...(ngDevMode ? [{ debugName: \"fields\" }] : []));\n // UI State\n expanded = signal(true, ...(ngDevMode ? [{ debugName: \"expanded\" }] : []));\n // Form groups cache for dynamic fields\n formGroupsCache = new Map();\n constructor() {\n // Cleanup stale form groups when fields change\n effect(() => {\n const currentIds = new Set(this.fields().map((f) => f.id));\n for (const id of this.formGroupsCache.keys()) {\n if (!currentIds.has(id)) {\n this.formGroupsCache.delete(id);\n }\n }\n });\n }\n getFormGroup(field) {\n let fg = this.formGroupsCache.get(field.id);\n if (fg) {\n // Check if field name changed\n if (!fg.contains(field.name)) {\n const oldKey = Object.keys(fg.controls)[0];\n const value = oldKey ? fg.get(oldKey)?.value : field.data?.data;\n fg = new FormGroup({\n [field.name]: new FormControl(value),\n });\n this.formGroupsCache.set(field.id, fg);\n }\n }\n else {\n fg = new FormGroup({\n [field.name]: new FormControl(field.data?.data),\n });\n this.formGroupsCache.set(field.id, fg);\n }\n return fg;\n }\n toggleExpanded() {\n this.expanded.update((v) => !v);\n }\n onDrop(event) {\n this.onFieldDrop.emit(event);\n }\n editSection(event) {\n event.stopPropagation();\n const section = this.section();\n this.modalService.openModal(FBSectionForm, 'drawer', {\n header: this.translocoService.translate('formBuilder.edit-section'),\n height: '20vw',\n styleClass: '!w-100 !absolute ',\n position: 'end',\n appendTo: '#page-content',\n modal: true,\n dismissible: true,\n inputValues: {\n sectionId: section.id,\n initialData: section.name,\n sectionsCount: this.sectionsCount(),\n },\n });\n }\n removeField(event, field) {\n this.confirmationService.confirmDelete({\n event,\n type: 'popup',\n accept: () => {\n this.facade.deleteField(this.section().id, field.id);\n },\n });\n }\n editField(field) {\n this.modalService.openModal(FBFieldForm, 'drawer', {\n header: this.translocoService.translate('formBuilder.field-settings'),\n height: '20vw',\n styleClass: '!w-100 !absolute !shadow-none',\n position: 'end',\n modal: true,\n dismissible: true,\n appendTo: '#page-content',\n inputValues: {\n initialData: field,\n sectionId: this.section().id,\n allSections: this.allSections(),\n },\n });\n }\n getFieldColSpan(field) {\n switch (field.width) {\n case '100':\n return 'col-span-12';\n case '50':\n return 'col-span-6';\n case '25':\n return 'col-span-3';\n default:\n return 'col-span-12';\n }\n }\n getFieldType(field) {\n const typeMap = {\n User: 'select',\n Text: 'text',\n LongText: 'editor-field',\n Percentage: 'slider',\n Date: 'date',\n Currency: 'text',\n Number: 'number',\n Lookup: 'select',\n LookupMultiSelect: 'select',\n Checkbox: 'toggle',\n InternalModule: 'select',\n DynamicList: 'select',\n API: 'select',\n Time: 'date',\n Status: 'select',\n Attachment: 'attachment',\n EditableListView: 'actionableTable',\n LookupLog: 'actionableTable',\n LookupMatrix: 'select',\n Location: 'select',\n };\n return typeMap[field.type] ?? 'text';\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBSection, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.0.3\", type: FBSection, isStandalone: true, selector: \"mt-fb-section\", inputs: { section: { classPropertyName: \"section\", publicName: \"section\", isSignal: true, isRequired: true, transformFunction: null }, sectionsCount: { classPropertyName: \"sectionsCount\", publicName: \"sectionsCount\", isSignal: true, isRequired: false, transformFunction: null }, allSections: { classPropertyName: \"allSections\", publicName: \"allSections\", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onFieldDrop: \"onFieldDrop\" }, ngImport: i0, template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div class=\\\"flex flex-col\\\">\\r\\n <div\\r\\n class=\\\"flex justify-between items-center bg-primary text-primary-contrast p-2 rounded-xl\\\"\\r\\n >\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"arrow.chevron-down\\\"\\r\\n class=\\\"transition-[rotate]\\\"\\r\\n [class.rotate-180]=\\\"expanded()\\\"\\r\\n (onClick)=\\\"toggleExpanded()\\\"\\r\\n ></mt-button>\\r\\n <span class=\\\"font-bold\\\">\\r\\n {{ sectionName() }}\\r\\n </span>\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.edit-02\\\"\\r\\n [tooltip]=\\\"t('edit-section')\\\"\\r\\n (onClick)=\\\"editSection($event)\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </div>\\r\\n @if (expanded()) {\\r\\n <div\\r\\n cdkDropList\\r\\n [id]=\\\"section().id\\\"\\r\\n cdkDropListOrientation=\\\"mixed\\\"\\r\\n [cdkDropListData]=\\\"fields()\\\"\\r\\n (cdkDropListDropped)=\\\"onDrop($event)\\\"\\r\\n class=\\\"grid grid-cols-12 gap-4 relative py-4\\\"\\r\\n [class.min-h-27]=\\\"fields().length === 0\\\"\\r\\n >\\r\\n @for (field of fields(); track field.id) {\\r\\n <div\\r\\n cdkDrag\\r\\n [cdkDragData]=\\\"field\\\"\\r\\n [cdkDragDisabled]=\\\"field._pending || field._deleting\\\"\\r\\n [class]=\\\"\\r\\n getFieldColSpan(field) + ' cursor-grab active:cursor-grabbing'\\r\\n \\\"\\r\\n >\\r\\n <div\\r\\n *cdkDragPlaceholder\\r\\n [class]=\\\"\\r\\n 'h-full min-h-27 bg-black/10 rounded-2xl ' +\\r\\n getFieldColSpan(field)\\r\\n \\\"\\r\\n ></div>\\r\\n @if (field._pending) {\\r\\n <!-- Skeleton for pending field -->\\r\\n <mt-card class=\\\"h-full animate-pulse\\\">\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <div class=\\\"flex-1 space-y-3\\\">\\r\\n <div class=\\\"h-4 bg-surface-200 rounded w-1/3\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"flex flex-col gap-1\\\">\\r\\n <div class=\\\"h-8 w-8 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-8 w-8 bg-surface-200 rounded\\\"></div>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n } @else {\\r\\n <mt-card\\r\\n class=\\\"h-full relative\\\"\\r\\n [class.opacity-50]=\\\"field._deleting\\\"\\r\\n >\\r\\n @if (field._deleting) {\\r\\n <div\\r\\n class=\\\"absolute inset-0 flex items-center justify-center bg-white/50 rounded-xl z-10\\\"\\r\\n >\\r\\n <div\\r\\n class=\\\"animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full\\\"\\r\\n ></div>\\r\\n </div>\\r\\n }\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <div class=\\\"flex-1\\\">\\r\\n <form [formGroup]=\\\"getFormGroup(field)\\\">\\r\\n <mt-dynamic-field\\r\\n [fieldName]=\\\"field.name\\\"\\r\\n [fieldConfig]=\\\"{\\r\\n label: field.name,\\r\\n readonly: true,\\r\\n type: getFieldType(field),\\r\\n }\\\"\\r\\n />\\r\\n </form>\\r\\n </div>\\r\\n <div class=\\\"flex flex-col gap-1\\\">\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.settings-01\\\"\\r\\n [tooltip]=\\\"t('edit-field')\\\"\\r\\n outlined\\r\\n [disabled]=\\\"field._deleting\\\"\\r\\n (onClick)=\\\"editField(field)\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.trash-01\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n [tooltip]=\\\"t('remove-field')\\\"\\r\\n [disabled]=\\\"field._deleting\\\"\\r\\n (onClick)=\\\"removeField($event, field)\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n } @empty {\\r\\n <mt-card class=\\\"absolute inset-0 top-4 h-full\\\" paddingless>\\r\\n <div class=\\\"size-full p-4\\\">\\r\\n <div\\r\\n class=\\\"flex justify-center items-center gap-4 h-full border-2 border-primary rounded-xl bg-primary-200 text-primary\\\"\\r\\n >\\r\\n <mt-icon icon=\\\"editor.move\\\" class=\\\"text-3xl\\\" />\\r\\n <span>{{ t(\\\"drag-from-the-side\\\") }}</span>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n</ng-container>\\r\\n\", dependencies: [{ kind: \"component\", type: Button, selector: \"mt-button\", inputs: [\"icon\", \"label\", \"tooltip\", \"class\", \"type\", \"styleClass\", \"severity\", \"badge\", \"variant\", \"badgeSeverity\", \"size\", \"iconPos\", \"autofocus\", \"fluid\", \"raised\", \"rounded\", \"text\", \"plain\", \"outlined\", \"link\", \"disabled\", \"loading\", \"pInputs\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }, { kind: \"component\", type: Card, selector: \"mt-card\", inputs: [\"class\", \"title\", \"paddingless\"] }, { kind: \"component\", type: Icon, selector: \"mt-icon\", inputs: [\"icon\"] }, { kind: \"directive\", type: CdkDrag, selector: \"[cdkDrag]\", inputs: [\"cdkDragData\", \"cdkDragLockAxis\", \"cdkDragRootElement\", \"cdkDragBoundary\", \"cdkDragStartDelay\", \"cdkDragFreeDragPosition\", \"cdkDragDisabled\", \"cdkDragConstrainPosition\", \"cdkDragPreviewClass\", \"cdkDragPreviewContainer\", \"cdkDragScale\"], outputs: [\"cdkDragStarted\", \"cdkDragReleased\", \"cdkDragEnded\", \"cdkDragEntered\", \"cdkDragExited\", \"cdkDragDropped\", \"cdkDragMoved\"], exportAs: [\"cdkDrag\"] }, { kind: \"directive\", type: CdkDropList, selector: \"[cdkDropList], cdk-drop-list\", inputs: [\"cdkDropListConnectedTo\", \"cdkDropListData\", \"cdkDropListOrientation\", \"id\", \"cdkDropListLockAxis\", \"cdkDropListDisabled\", \"cdkDropListSortingDisabled\", \"cdkDropListEnterPredicate\", \"cdkDropListSortPredicate\", \"cdkDropListAutoScrollDisabled\", \"cdkDropListAutoScrollStep\", \"cdkDropListElementContainer\", \"cdkDropListHasAnchor\"], outputs: [\"cdkDropListDropped\", \"cdkDropListEntered\", \"cdkDropListExited\", \"cdkDropListSorted\"], exportAs: [\"cdkDropList\"] }, { kind: \"directive\", type: CdkDragPlaceholder, selector: \"ng-template[cdkDragPlaceholder]\", inputs: [\"data\"] }, { kind: \"directive\", type: TranslocoDirective, selector: \"[transloco]\", inputs: [\"transloco\", \"translocoParams\", \"translocoScope\", \"translocoRead\", \"translocoPrefix\", \"translocoLang\", \"translocoLoadingTpl\"] }, { kind: \"component\", type: DynamicField, selector: \"mt-dynamic-field\", inputs: [\"fieldConfig\", \"fieldName\"] }, { kind: \"ngmodule\", type: ReactiveFormsModule }, { kind: \"directive\", type: i1.ɵNgNoValidate, selector: \"form:not([ngNoForm]):not([ngNativeValidate])\" }, { kind: \"directive\", type: i1.NgControlStatusGroup, selector: \"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]\" }, { kind: \"directive\", type: i1.FormGroupDirective, selector: \"[formGroup]\", inputs: [\"formGroup\"], outputs: [\"ngSubmit\"], exportAs: [\"ngForm\"] }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBSection, decorators: [{\n type: Component,\n args: [{ selector: 'mt-fb-section', standalone: true, imports: [\n Button,\n Card,\n Icon,\n CdkDrag,\n CdkDropList,\n CdkDragPlaceholder,\n TranslocoDirective,\n DynamicField,\n ReactiveFormsModule,\n ], template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div class=\\\"flex flex-col\\\">\\r\\n <div\\r\\n class=\\\"flex justify-between items-center bg-primary text-primary-contrast p-2 rounded-xl\\\"\\r\\n >\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"arrow.chevron-down\\\"\\r\\n class=\\\"transition-[rotate]\\\"\\r\\n [class.rotate-180]=\\\"expanded()\\\"\\r\\n (onClick)=\\\"toggleExpanded()\\\"\\r\\n ></mt-button>\\r\\n <span class=\\\"font-bold\\\">\\r\\n {{ sectionName() }}\\r\\n </span>\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.edit-02\\\"\\r\\n [tooltip]=\\\"t('edit-section')\\\"\\r\\n (onClick)=\\\"editSection($event)\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </div>\\r\\n @if (expanded()) {\\r\\n <div\\r\\n cdkDropList\\r\\n [id]=\\\"section().id\\\"\\r\\n cdkDropListOrientation=\\\"mixed\\\"\\r\\n [cdkDropListData]=\\\"fields()\\\"\\r\\n (cdkDropListDropped)=\\\"onDrop($event)\\\"\\r\\n class=\\\"grid grid-cols-12 gap-4 relative py-4\\\"\\r\\n [class.min-h-27]=\\\"fields().length === 0\\\"\\r\\n >\\r\\n @for (field of fields(); track field.id) {\\r\\n <div\\r\\n cdkDrag\\r\\n [cdkDragData]=\\\"field\\\"\\r\\n [cdkDragDisabled]=\\\"field._pending || field._deleting\\\"\\r\\n [class]=\\\"\\r\\n getFieldColSpan(field) + ' cursor-grab active:cursor-grabbing'\\r\\n \\\"\\r\\n >\\r\\n <div\\r\\n *cdkDragPlaceholder\\r\\n [class]=\\\"\\r\\n 'h-full min-h-27 bg-black/10 rounded-2xl ' +\\r\\n getFieldColSpan(field)\\r\\n \\\"\\r\\n ></div>\\r\\n @if (field._pending) {\\r\\n <!-- Skeleton for pending field -->\\r\\n <mt-card class=\\\"h-full animate-pulse\\\">\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <div class=\\\"flex-1 space-y-3\\\">\\r\\n <div class=\\\"h-4 bg-surface-200 rounded w-1/3\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"flex flex-col gap-1\\\">\\r\\n <div class=\\\"h-8 w-8 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-8 w-8 bg-surface-200 rounded\\\"></div>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n } @else {\\r\\n <mt-card\\r\\n class=\\\"h-full relative\\\"\\r\\n [class.opacity-50]=\\\"field._deleting\\\"\\r\\n >\\r\\n @if (field._deleting) {\\r\\n <div\\r\\n class=\\\"absolute inset-0 flex items-center justify-center bg-white/50 rounded-xl z-10\\\"\\r\\n >\\r\\n <div\\r\\n class=\\\"animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full\\\"\\r\\n ></div>\\r\\n </div>\\r\\n }\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <div class=\\\"flex-1\\\">\\r\\n <form [formGroup]=\\\"getFormGroup(field)\\\">\\r\\n <mt-dynamic-field\\r\\n [fieldName]=\\\"field.name\\\"\\r\\n [fieldConfig]=\\\"{\\r\\n label: field.name,\\r\\n readonly: true,\\r\\n type: getFieldType(field),\\r\\n }\\\"\\r\\n />\\r\\n </form>\\r\\n </div>\\r\\n <div class=\\\"flex flex-col gap-1\\\">\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.settings-01\\\"\\r\\n [tooltip]=\\\"t('edit-field')\\\"\\r\\n outlined\\r\\n [disabled]=\\\"field._deleting\\\"\\r\\n (onClick)=\\\"editField(field)\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.trash-01\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n [tooltip]=\\\"t('remove-field')\\\"\\r\\n [disabled]=\\\"field._deleting\\\"\\r\\n (onClick)=\\\"removeField($event, field)\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n } @empty {\\r\\n <mt-card class=\\\"absolute inset-0 top-4 h-full\\\" paddingless>\\r\\n <div class=\\\"size-full p-4\\\">\\r\\n <div\\r\\n class=\\\"flex justify-center items-center gap-4 h-full border-2 border-primary rounded-xl bg-primary-200 text-primary\\\"\\r\\n >\\r\\n <mt-icon icon=\\\"editor.move\\\" class=\\\"text-3xl\\\" />\\r\\n <span>{{ t(\\\"drag-from-the-side\\\") }}</span>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n</ng-container>\\r\\n\" }]\n }], ctorParameters: () => [], propDecorators: { section: [{ type: i0.Input, args: [{ isSignal: true, alias: \"section\", required: true }] }], sectionsCount: [{ type: i0.Input, args: [{ isSignal: true, alias: \"sectionsCount\", required: false }] }], allSections: [{ type: i0.Input, args: [{ isSignal: true, alias: \"allSections\", required: false }] }], onFieldDrop: [{ type: i0.Output, args: [\"onFieldDrop\"] }] } });\n\nclass FBPreviewForm {\n modalService = inject(ModalService);\n ref = inject(ModalRef);\n transloco = inject(TranslocoService);\n // Inputs\n sections = input([], ...(ngDevMode ? [{ debugName: \"sections\" }] : []));\n // Tab state\n activeTab = signal('create', ...(ngDevMode ? [{ debugName: \"activeTab\" }] : []));\n isLoading = signal(false, ...(ngDevMode ? [{ debugName: \"isLoading\" }] : []));\n tabOptions = [\n {\n label: this.transloco.translate('formBuilder.create-form'),\n value: 'create',\n },\n { label: this.transloco.translate('formBuilder.edit-form'), value: 'edit' },\n ];\n // Form control for dynamic form\n formControl = new FormControl();\n constructor() {\n // Show skeleton briefly when tab changes to force rebuild\n effect(() => {\n this.activeTab(); // Track tab changes\n this.isLoading.set(true);\n setTimeout(() => this.isLoading.set(false), 50);\n });\n }\n // Convert enriched sections to DynamicFormConfig based on active tab\n formConfig = computed(() => {\n const sections = this.sections();\n const mode = this.activeTab();\n return {\n sections: sections\n .map((section, sectionIndex) => {\n const lang = document.documentElement.lang;\n const sectionName = section.name[lang] ?? section.name['en'] ?? '';\n // Filter fields based on mode\n const visibleFields = section.fields.filter((field) => {\n if (mode === 'create') {\n return !field.hiddenInCreation;\n }\n else {\n return !field.hiddenInEditForm;\n }\n });\n return {\n key: section.id,\n label: sectionName,\n type: 'header',\n columns: 12,\n order: section.order ?? sectionIndex,\n fields: visibleFields.map((field, fieldIndex) => {\n const colSpan = this.getColSpan(field.width);\n return {\n key: `field_${field.propertyId}`,\n label: field.name,\n type: this.mapFieldType(field.type),\n colSpan,\n order: field.order ?? fieldIndex,\n placeholder: field.name,\n };\n }),\n };\n })\n .filter((section) => section.fields.length > 0), // Hide empty sections\n };\n }, ...(ngDevMode ? [{ debugName: \"formConfig\" }] : []));\n /**\n * Map property view type to dynamic form field type\n */\n mapFieldType(viewType) {\n const typeMap = {\n User: 'select',\n Text: 'text',\n LongText: 'editor-field',\n Percentage: 'slider',\n Date: 'date',\n Currency: 'text',\n Number: 'number',\n Lookup: 'select',\n LookupMultiSelect: 'select',\n Checkbox: 'toggle',\n InternalModule: 'select',\n DynamicList: 'select',\n API: 'select',\n Time: 'date',\n Status: 'select',\n Attachment: 'attachment',\n EditableListView: 'actionableTable',\n LookupLog: 'actionableTable',\n LookupMatrix: 'select',\n Location: 'select',\n };\n return typeMap[viewType] ?? 'text';\n }\n /**\n * Convert field width to colSpan\n */\n getColSpan(width) {\n const widthMap = {\n '25': 3,\n '50': 6,\n '100': 12,\n };\n return widthMap[width] ?? 12;\n }\n onClose() {\n this.ref.close();\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBPreviewForm, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.0.3\", type: FBPreviewForm, isStandalone: true, selector: \"mt-fb-preview-form\", inputs: { sections: { classPropertyName: \"sections\", publicName: \"sections\", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <!-- Tabs for Create/Edit mode -->\\r\\n <div class=\\\"flex justify-center mb-4\\\">\\r\\n <mt-tabs [options]=\\\"tabOptions\\\" [(active)]=\\\"activeTab\\\"></mt-tabs>\\r\\n </div>\\r\\n\\r\\n <div class=\\\"h-full overflow-y-auto pb-10\\\">\\r\\n @if (isLoading()) {\\r\\n <div class=\\\"space-y-4 animate-pulse\\\">\\r\\n <div class=\\\"h-6 bg-surface-200 rounded w-1/3\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded w-2/3\\\"></div>\\r\\n </div>\\r\\n } @else if (formConfig().sections.length > 0) {\\r\\n <mt-dynamic-form\\r\\n [formConfig]=\\\"formConfig()\\\"\\r\\n [formControl]=\\\"formControl\\\"\\r\\n >\\r\\n </mt-dynamic-form>\\r\\n } @else {\\r\\n <div\\r\\n class=\\\"flex justify-center items-center h-64 text-muted-color text-lg\\\"\\r\\n >\\r\\n {{ t(\\\"no-fields-visible\\\") }}\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n</ng-container>\\r\\n\", dependencies: [{ kind: \"directive\", type: TranslocoDirective, selector: \"[transloco]\", inputs: [\"transloco\", \"translocoParams\", \"translocoScope\", \"translocoRead\", \"translocoPrefix\", \"translocoLang\", \"translocoLoadingTpl\"] }, { kind: \"ngmodule\", type: ReactiveFormsModule }, { kind: \"directive\", type: i1.NgControlStatus, selector: \"[formControlName],[ngModel],[formControl]\" }, { kind: \"directive\", type: i1.FormControlDirective, selector: \"[formControl]\", inputs: [\"formControl\", \"disabled\", \"ngModel\"], outputs: [\"ngModelChange\"], exportAs: [\"ngForm\"] }, { kind: \"component\", type: DynamicForm, selector: \"mt-dynamic-form\", inputs: [\"formConfig\"] }, { kind: \"component\", type: Tabs, selector: \"mt-tabs\", inputs: [\"options\", \"optionLabel\", \"optionValue\", \"active\", \"size\", \"fluid\", \"disabled\"], outputs: [\"activeChange\", \"onChange\"] }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FBPreviewForm, decorators: [{\n type: Component,\n args: [{ selector: 'mt-fb-preview-form', standalone: true, imports: [TranslocoDirective, ReactiveFormsModule, DynamicForm, Tabs], template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <!-- Tabs for Create/Edit mode -->\\r\\n <div class=\\\"flex justify-center mb-4\\\">\\r\\n <mt-tabs [options]=\\\"tabOptions\\\" [(active)]=\\\"activeTab\\\"></mt-tabs>\\r\\n </div>\\r\\n\\r\\n <div class=\\\"h-full overflow-y-auto pb-10\\\">\\r\\n @if (isLoading()) {\\r\\n <div class=\\\"space-y-4 animate-pulse\\\">\\r\\n <div class=\\\"h-6 bg-surface-200 rounded w-1/3\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded w-2/3\\\"></div>\\r\\n </div>\\r\\n } @else if (formConfig().sections.length > 0) {\\r\\n <mt-dynamic-form\\r\\n [formConfig]=\\\"formConfig()\\\"\\r\\n [formControl]=\\\"formControl\\\"\\r\\n >\\r\\n </mt-dynamic-form>\\r\\n } @else {\\r\\n <div\\r\\n class=\\\"flex justify-center items-center h-64 text-muted-color text-lg\\\"\\r\\n >\\r\\n {{ t(\\\"no-fields-visible\\\") }}\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n</ng-container>\\r\\n\" }]\n }], ctorParameters: () => [], propDecorators: { sections: [{ type: i0.Input, args: [{ isSignal: true, alias: \"sections\", required: false }] }] } });\n\nclass FormBuilder {\n modalService = inject(ModalService);\n confirmationService = inject(ConfirmationService);\n translocoService = inject(TranslocoService);\n facade = inject(FormBuilderFacade);\n dialogRef;\n // Local UI state\n activeTab = signal('system', ...(ngDevMode ? [{ debugName: \"activeTab\" }] : []));\n // State from facade\n sections = this.facade.sections;\n properties = this.facade.properties;\n isLoading = this.facade.isLoadingFormConfiguration;\n error = this.facade.formConfigurationError;\n // Properties map for enrichment\n propertiesMap = computed(() => {\n const map = new Map();\n for (const prop of this.properties()) {\n map.set(prop.id, prop);\n }\n return map;\n }, ...(ngDevMode ? [{ debugName: \"propertiesMap\" }] : []));\n // Enrich sections with property data for UI display\n enrichedSections = computed(() => {\n const sections = this.sections();\n const propsMap = this.propertiesMap();\n const lang = document.documentElement.lang;\n return sections.map((section) => ({\n ...section,\n fields: section.fields.map((field) => {\n const prop = propsMap.get(field.propertyId);\n const propName = prop?.name;\n const name = typeof propName === 'string'\n ? propName\n : (propName?.[lang] ??\n propName?.['en'] ??\n `Property ${field.propertyId}`);\n return {\n ...field,\n name,\n type: prop?.viewType || 'text',\n data: prop,\n };\n }),\n }));\n }, ...(ngDevMode ? [{ debugName: \"enrichedSections\" }] : []));\n // Available properties for toolbox tabs\n availableTabs = computed(() => {\n const tabs = [];\n const usedPropertyIds = new Set(this.sections().flatMap((s) => s.fields.map((f) => f.propertyId)));\n const availableProps = this.properties().filter((p) => !usedPropertyIds.has(p.id));\n const systemProps = availableProps.filter((p) => p['isSystem']);\n const customProps = availableProps.filter((p) => !p['isSystem']);\n if (systemProps.length > 0) {\n tabs.push({ id: 'system', title: 'System', properties: systemProps });\n }\n if (customProps.length > 0) {\n tabs.push({ id: 'custom', title: 'Custom', properties: customProps });\n }\n return tabs;\n }, ...(ngDevMode ? [{ debugName: \"availableTabs\" }] : []));\n constructor() {\n // Update active tab when tabs change\n effect(() => {\n const tabs = this.availableTabs();\n const currentTab = this.activeTab();\n if (tabs.length > 0 && !tabs.some((t) => t.id === currentTab)) {\n this.activeTab.set(tabs[0].id);\n }\n });\n }\n drop(event) {\n const targetSectionId = event.container.id;\n if (event.previousContainer === event.container) {\n // Reordering within the same section\n const fields = [...event.container.data];\n const [movedField] = fields.splice(event.previousIndex, 1);\n fields.splice(event.currentIndex, 0, movedField);\n // Build bulk reorder payload with new order values\n const reorderPayload = fields.map((field, index) => ({\n id: field.id,\n order: index,\n }));\n this.facade.reorderFields(targetSectionId, reorderPayload);\n }\n else if (event.previousContainer.id.startsWith('toolbox-')) {\n // Adding from toolbox\n const propertyItem = event.item.data;\n this.facade.addField(targetSectionId, {\n propertyId: propertyItem.id,\n width: '100',\n order: event.currentIndex,\n hiddenInCreation: false,\n });\n }\n else {\n // Moving between sections\n const sourceSectionId = event.previousContainer.id;\n const field = event.item.data;\n this.facade.moveField(sourceSectionId, field.id, {\n targetSectionId,\n order: event.currentIndex,\n });\n }\n }\n addSection() {\n this.dialogRef = this.modalService.openModal(FBSectionForm, 'drawer', {\n header: this.translocoService.translate('formBuilder.add-section'),\n height: '20vw',\n styleClass: '!w-100 !absolute ',\n position: 'end',\n appendTo: '#page-content',\n modal: true,\n dismissible: true,\n inputValues: {\n sectionsCount: this.sections().length,\n },\n });\n }\n openPreview() {\n this.dialogRef = this.modalService.openModal(FBPreviewForm, 'drawer', {\n header: this.translocoService.translate('formBuilder.preview'),\n styleClass: '!w-[80vw] ',\n position: 'end',\n modal: true,\n dismissible: true,\n inputValues: {\n sections: this.enrichedSections(),\n },\n });\n }\n resetFormConfiguration() {\n this.confirmationService.confirm({\n type: 'dialog',\n acceptButtonStyleClass: 'p-button-danger',\n accept: () => {\n this.facade.resetFormConfiguration();\n },\n });\n }\n noReturnPredicate = () => false;\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilder, deps: [], target: i0.ɵɵFactoryTarget.Component });\n static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: \"17.0.0\", version: \"21.0.3\", type: FormBuilder, isStandalone: true, selector: \"mt-form-builder\", ngImport: i0, template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div class=\\\"flex gap-4 h-full w-full overflow-hidden\\\" cdkDropListGroup>\\r\\n <!-- Properties Sidebar -->\\r\\n <mt-card\\r\\n class=\\\"z-1 w-1/5 min-w-xs shrink-0 h-full flex flex-col overflow-hidden\\\"\\r\\n >\\r\\n <ng-template #headless>\\r\\n <!-- Header -->\\r\\n <div class=\\\"flex items-center justify-between px-4 pt-5\\\">\\r\\n <h3 class=\\\"text-xl font-semibold\\\">{{ t(\\\"form-elements\\\") }}</h3>\\r\\n </div>\\r\\n\\r\\n @if (properties().length === 0) {\\r\\n @if (isLoading()) {\\r\\n <!-- Properties Loading Skeleton -->\\r\\n <div class=\\\"p-4 space-y-3\\\">\\r\\n <p-skeleton height=\\\"2rem\\\" styleClass=\\\"mb-4\\\" />\\r\\n @for (i of [1, 2, 3, 4, 5, 6]; track i) {\\r\\n <p-skeleton height=\\\"3rem\\\" styleClass=\\\"rounded-lg\\\" />\\r\\n }\\r\\n </div>\\r\\n } @else {\\r\\n <!-- No Properties State -->\\r\\n <div class=\\\"flex-1 flex items-center justify-center p-4\\\">\\r\\n <div class=\\\"text-center text-muted-color\\\">\\r\\n <p class=\\\"text-sm\\\">{{ t(\\\"no-properties\\\") }}</p>\\r\\n </div>\\r\\n </div>\\r\\n }\\r\\n } @else {\\r\\n <!-- Tabs using PrimeNG -->\\r\\n <p-tabs\\r\\n [(value)]=\\\"activeTab\\\"\\r\\n styleClass=\\\"structure-tabs\\\"\\r\\n class=\\\"flex flex-1 flex-col min-h-0\\\"\\r\\n >\\r\\n <p-tablist class=\\\"shrink-0\\\">\\r\\n @for (tab of availableTabs(); track tab.id) {\\r\\n <p-tab [value]=\\\"tab.id\\\">{{ tab.title | titlecase }}</p-tab>\\r\\n }\\r\\n </p-tablist>\\r\\n <p-tabpanels class=\\\"!bg-transparent !p-0 flex-1 overflow-hidden\\\">\\r\\n @for (tab of availableTabs(); track tab.id) {\\r\\n <p-tabpanel [value]=\\\"tab.id\\\" class=\\\"h-full\\\">\\r\\n <!-- Node List -->\\r\\n <div\\r\\n class=\\\"space-y-1 p-4 [&_.cdk-drag-placeholder]:hidden h-full overflow-y-auto\\\"\\r\\n [id]=\\\"'toolbox-' + tab.id\\\"\\r\\n cdkDropList\\r\\n cdkDropListSortingDisabled\\r\\n [cdkDropListData]=\\\"tab.properties\\\"\\r\\n [cdkDropListEnterPredicate]=\\\"noReturnPredicate\\\"\\r\\n >\\r\\n @for (node of tab.properties; track $index) {\\r\\n <div\\r\\n cdkDrag\\r\\n [cdkDragData]=\\\"node\\\"\\r\\n class=\\\"group cursor-move select-none relative flex items-center gap-3 py-3 px-4 rounded-lg border border-dashed border-surface-300 hover:border-solid hover:bg-emphasis dark:border-surface-500 transition-colors\\\"\\r\\n >\\r\\n <div\\r\\n *cdkDragPlaceholder\\r\\n class=\\\"col-span-12 min-h-27 w-full rounded-2xl bg-black/10 z-1\\\"\\r\\n ></div>\\r\\n <span class=\\\"flex-1 text-base font-medium\\\">{{\\r\\n node.name\\r\\n }}</span>\\r\\n </div>\\r\\n }\\r\\n\\r\\n @if (tab.properties.length === 0) {\\r\\n <div class=\\\"py-8 text-center text-muted-color\\\">\\r\\n <p class=\\\"text-sm\\\">\\r\\n All {{ tab.title }} items are in use\\r\\n </p>\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </p-tabpanel>\\r\\n }\\r\\n </p-tabpanels>\\r\\n </p-tabs>\\r\\n }\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n\\r\\n <!-- Main Canvas Area -->\\r\\n <div class=\\\"flex flex-col gap-4 flex-1 w-full h-full overflow-y-auto\\\">\\r\\n <mt-card>\\r\\n <ng-template #headless>\\r\\n <div class=\\\"p-4 flex items-center gap-2\\\">\\r\\n <mt-button\\r\\n icon=\\\"layout.layout-top\\\"\\r\\n [label]=\\\"t('add-section')\\\"\\r\\n (onClick)=\\\"addSection()\\\"\\r\\n [disabled]=\\\"isLoading()\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n icon=\\\"general.eye\\\"\\r\\n [label]=\\\"t('preview')\\\"\\r\\n (onClick)=\\\"openPreview()\\\"\\r\\n [disabled]=\\\"isLoading()\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n icon=\\\"finance.credit-card-plus\\\"\\r\\n [label]=\\\"t('reset')\\\"\\r\\n (onClick)=\\\"resetFormConfiguration()\\\"\\r\\n [disabled]=\\\"isLoading()\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n\\r\\n @if (isLoading()) {\\r\\n <!-- Form Loading Skeleton -->\\r\\n @for (i of [1, 2]; track i) {\\r\\n <mt-card>\\r\\n <ng-template #headless>\\r\\n <div class=\\\"p-4 space-y-4\\\">\\r\\n <!-- Section header skeleton -->\\r\\n <div class=\\\"flex items-center justify-between\\\">\\r\\n <p-skeleton width=\\\"10rem\\\" height=\\\"1.5rem\\\" />\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <p-skeleton width=\\\"2rem\\\" height=\\\"2rem\\\" shape=\\\"circle\\\" />\\r\\n <p-skeleton width=\\\"2rem\\\" height=\\\"2rem\\\" shape=\\\"circle\\\" />\\r\\n </div>\\r\\n </div>\\r\\n <!-- Fields skeleton -->\\r\\n <div class=\\\"grid grid-cols-12 gap-4\\\">\\r\\n <div class=\\\"col-span-6\\\">\\r\\n <p-skeleton height=\\\"4rem\\\" styleClass=\\\"rounded-lg\\\" />\\r\\n </div>\\r\\n <div class=\\\"col-span-6\\\">\\r\\n <p-skeleton height=\\\"4rem\\\" styleClass=\\\"rounded-lg\\\" />\\r\\n </div>\\r\\n <div class=\\\"col-span-12\\\">\\r\\n <p-skeleton height=\\\"4rem\\\" styleClass=\\\"rounded-lg\\\" />\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n }\\r\\n } @else {\\r\\n @for (section of enrichedSections(); track section.id) {\\r\\n <mt-fb-section\\r\\n [section]=\\\"section\\\"\\r\\n [sectionsCount]=\\\"enrichedSections().length\\\"\\r\\n [allSections]=\\\"enrichedSections()\\\"\\r\\n (onFieldDrop)=\\\"drop($event)\\\"\\r\\n >\\r\\n </mt-fb-section>\\r\\n } @empty {\\r\\n <mt-card>\\r\\n <div class=\\\"h-27 p-4\\\">\\r\\n <div\\r\\n class=\\\"flex justify-center items-center gap-4 h-full border-2 border-primary rounded-xl bg-primary-200 text-primary\\\"\\r\\n >\\r\\n <span>{{ t(\\\"no-section\\\") }}</span>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n</ng-container>\\r\\n\", styles: [\".cdk-drag{cursor:grab}.cdk-drag:active,.cdk-drag-preview{cursor:grabbing}.cdk-drag-placeholder{opacity:.5}.cdk-drop-list-dragging .cdk-drag{cursor:grabbing}\\n\"], dependencies: [{ kind: \"ngmodule\", type: CommonModule }, { kind: \"ngmodule\", type: FormsModule }, { kind: \"ngmodule\", type: TabsModule }, { kind: \"component\", type: i1$1.Tabs, selector: \"p-tabs\", inputs: [\"value\", \"scrollable\", \"lazy\", \"selectOnFocus\", \"showNavigators\", \"tabindex\"], outputs: [\"valueChange\"] }, { kind: \"component\", type: i1$1.TabPanels, selector: \"p-tabpanels\" }, { kind: \"component\", type: i1$1.TabPanel, selector: \"p-tabpanel\", inputs: [\"lazy\", \"value\"], outputs: [\"valueChange\"] }, { kind: \"component\", type: i1$1.TabList, selector: \"p-tablist\" }, { kind: \"component\", type: i1$1.Tab, selector: \"p-tab\", inputs: [\"value\", \"disabled\"], outputs: [\"valueChange\"] }, { kind: \"ngmodule\", type: SkeletonModule }, { kind: \"component\", type: i2.Skeleton, selector: \"p-skeleton\", inputs: [\"styleClass\", \"shape\", \"animation\", \"borderRadius\", \"size\", \"width\", \"height\"] }, { kind: \"component\", type: Button, selector: \"mt-button\", inputs: [\"icon\", \"label\", \"tooltip\", \"class\", \"type\", \"styleClass\", \"severity\", \"badge\", \"variant\", \"badgeSeverity\", \"size\", \"iconPos\", \"autofocus\", \"fluid\", \"raised\", \"rounded\", \"text\", \"plain\", \"outlined\", \"link\", \"disabled\", \"loading\", \"pInputs\"], outputs: [\"onClick\", \"onFocus\", \"onBlur\"] }, { kind: \"component\", type: Card, selector: \"mt-card\", inputs: [\"class\", \"title\", \"paddingless\"] }, { kind: \"directive\", type: TranslocoDirective, selector: \"[transloco]\", inputs: [\"transloco\", \"translocoParams\", \"translocoScope\", \"translocoRead\", \"translocoPrefix\", \"translocoLang\", \"translocoLoadingTpl\"] }, { kind: \"component\", type: FBSection, selector: \"mt-fb-section\", inputs: [\"section\", \"sectionsCount\", \"allSections\"], outputs: [\"onFieldDrop\"] }, { kind: \"ngmodule\", type: DragDropModule }, { kind: \"directive\", type: i3.CdkDropList, selector: \"[cdkDropList], cdk-drop-list\", inputs: [\"cdkDropListConnectedTo\", \"cdkDropListData\", \"cdkDropListOrientation\", \"id\", \"cdkDropListLockAxis\", \"cdkDropListDisabled\", \"cdkDropListSortingDisabled\", \"cdkDropListEnterPredicate\", \"cdkDropListSortPredicate\", \"cdkDropListAutoScrollDisabled\", \"cdkDropListAutoScrollStep\", \"cdkDropListElementContainer\", \"cdkDropListHasAnchor\"], outputs: [\"cdkDropListDropped\", \"cdkDropListEntered\", \"cdkDropListExited\", \"cdkDropListSorted\"], exportAs: [\"cdkDropList\"] }, { kind: \"directive\", type: i3.CdkDropListGroup, selector: \"[cdkDropListGroup]\", inputs: [\"cdkDropListGroupDisabled\"], exportAs: [\"cdkDropListGroup\"] }, { kind: \"directive\", type: i3.CdkDrag, selector: \"[cdkDrag]\", inputs: [\"cdkDragData\", \"cdkDragLockAxis\", \"cdkDragRootElement\", \"cdkDragBoundary\", \"cdkDragStartDelay\", \"cdkDragFreeDragPosition\", \"cdkDragDisabled\", \"cdkDragConstrainPosition\", \"cdkDragPreviewClass\", \"cdkDragPreviewContainer\", \"cdkDragScale\"], outputs: [\"cdkDragStarted\", \"cdkDragReleased\", \"cdkDragEnded\", \"cdkDragEntered\", \"cdkDragExited\", \"cdkDragDropped\", \"cdkDragMoved\"], exportAs: [\"cdkDrag\"] }, { kind: \"directive\", type: i3.CdkDragPlaceholder, selector: \"ng-template[cdkDragPlaceholder]\", inputs: [\"data\"] }, { kind: \"pipe\", type: i4.TitleCasePipe, name: \"titlecase\" }] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"21.0.3\", ngImport: i0, type: FormBuilder, decorators: [{\n type: Component,\n args: [{ selector: 'mt-form-builder', standalone: true, imports: [\n CommonModule,\n FormsModule,\n TabsModule,\n SkeletonModule,\n Button,\n Card,\n TranslocoDirective,\n FBSection,\n DragDropModule,\n ], template: \"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div class=\\\"flex gap-4 h-full w-full overflow-hidden\\\" cdkDropListGroup>\\r\\n <!-- Properties Sidebar -->\\r\\n <mt-card\\r\\n class=\\\"z-1 w-1/5 min-w-xs shrink-0 h-full flex flex-col overflow-hidden\\\"\\r\\n >\\r\\n <ng-template #headless>\\r\\n <!-- Header -->\\r\\n <div class=\\\"flex items-center justify-between px-4 pt-5\\\">\\r\\n <h3 class=\\\"text-xl font-semibold\\\">{{ t(\\\"form-elements\\\") }}</h3>\\r\\n </div>\\r\\n\\r\\n @if (properties().length === 0) {\\r\\n @if (isLoading()) {\\r\\n <!-- Properties Loading Skeleton -->\\r\\n <div class=\\\"p-4 space-y-3\\\">\\r\\n <p-skeleton height=\\\"2rem\\\" styleClass=\\\"mb-4\\\" />\\r\\n @for (i of [1, 2, 3, 4, 5, 6]; track i) {\\r\\n <p-skeleton height=\\\"3rem\\\" styleClass=\\\"rounded-lg\\\" />\\r\\n }\\r\\n </div>\\r\\n } @else {\\r\\n <!-- No Properties State -->\\r\\n <div class=\\\"flex-1 flex items-center justify-center p-4\\\">\\r\\n <div class=\\\"text-center text-muted-color\\\">\\r\\n <p class=\\\"text-sm\\\">{{ t(\\\"no-properties\\\") }}</p>\\r\\n </div>\\r\\n </div>\\r\\n }\\r\\n } @else {\\r\\n <!-- Tabs using PrimeNG -->\\r\\n <p-tabs\\r\\n [(value)]=\\\"activeTab\\\"\\r\\n styleClass=\\\"structure-tabs\\\"\\r\\n class=\\\"flex flex-1 flex-col min-h-0\\\"\\r\\n >\\r\\n <p-tablist class=\\\"shrink-0\\\">\\r\\n @for (tab of availableTabs(); track tab.id) {\\r\\n <p-tab [value]=\\\"tab.id\\\">{{ tab.title | titlecase }}</p-tab>\\r\\n }\\r\\n </p-tablist>\\r\\n <p-tabpanels class=\\\"!bg-transparent !p-0 flex-1 overflow-hidden\\\">\\r\\n @for (tab of availableTabs(); track tab.id) {\\r\\n <p-tabpanel [value]=\\\"tab.id\\\" class=\\\"h-full\\\">\\r\\n <!-- Node List -->\\r\\n <div\\r\\n class=\\\"space-y-1 p-4 [&_.cdk-drag-placeholder]:hidden h-full overflow-y-auto\\\"\\r\\n [id]=\\\"'toolbox-' + tab.id\\\"\\r\\n cdkDropList\\r\\n cdkDropListSortingDisabled\\r\\n [cdkDropListData]=\\\"tab.properties\\\"\\r\\n [cdkDropListEnterPredicate]=\\\"noReturnPredicate\\\"\\r\\n >\\r\\n @for (node of tab.properties; track $index) {\\r\\n <div\\r\\n cdkDrag\\r\\n [cdkDragData]=\\\"node\\\"\\r\\n class=\\\"group cursor-move select-none relative flex items-center gap-3 py-3 px-4 rounded-lg border border-dashed border-surface-300 hover:border-solid hover:bg-emphasis dark:border-surface-500 transition-colors\\\"\\r\\n >\\r\\n <div\\r\\n *cdkDragPlaceholder\\r\\n class=\\\"col-span-12 min-h-27 w-full rounded-2xl bg-black/10 z-1\\\"\\r\\n ></div>\\r\\n <span class=\\\"flex-1 text-base font-medium\\\">{{\\r\\n node.name\\r\\n }}</span>\\r\\n </div>\\r\\n }\\r\\n\\r\\n @if (tab.properties.length === 0) {\\r\\n <div class=\\\"py-8 text-center text-muted-color\\\">\\r\\n <p class=\\\"text-sm\\\">\\r\\n All {{ tab.title }} items are in use\\r\\n </p>\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </p-tabpanel>\\r\\n }\\r\\n </p-tabpanels>\\r\\n </p-tabs>\\r\\n }\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n\\r\\n <!-- Main Canvas Area -->\\r\\n <div class=\\\"flex flex-col gap-4 flex-1 w-full h-full overflow-y-auto\\\">\\r\\n <mt-card>\\r\\n <ng-template #headless>\\r\\n <div class=\\\"p-4 flex items-center gap-2\\\">\\r\\n <mt-button\\r\\n icon=\\\"layout.layout-top\\\"\\r\\n [label]=\\\"t('add-section')\\\"\\r\\n (onClick)=\\\"addSection()\\\"\\r\\n [disabled]=\\\"isLoading()\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n icon=\\\"general.eye\\\"\\r\\n [label]=\\\"t('preview')\\\"\\r\\n (onClick)=\\\"openPreview()\\\"\\r\\n [disabled]=\\\"isLoading()\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n icon=\\\"finance.credit-card-plus\\\"\\r\\n [label]=\\\"t('reset')\\\"\\r\\n (onClick)=\\\"resetFormConfiguration()\\\"\\r\\n [disabled]=\\\"isLoading()\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n\\r\\n @if (isLoading()) {\\r\\n <!-- Form Loading Skeleton -->\\r\\n @for (i of [1, 2]; track i) {\\r\\n <mt-card>\\r\\n <ng-template #headless>\\r\\n <div class=\\\"p-4 space-y-4\\\">\\r\\n <!-- Section header skeleton -->\\r\\n <div class=\\\"flex items-center justify-between\\\">\\r\\n <p-skeleton width=\\\"10rem\\\" height=\\\"1.5rem\\\" />\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <p-skeleton width=\\\"2rem\\\" height=\\\"2rem\\\" shape=\\\"circle\\\" />\\r\\n <p-skeleton width=\\\"2rem\\\" height=\\\"2rem\\\" shape=\\\"circle\\\" />\\r\\n </div>\\r\\n </div>\\r\\n <!-- Fields skeleton -->\\r\\n <div class=\\\"grid grid-cols-12 gap-4\\\">\\r\\n <div class=\\\"col-span-6\\\">\\r\\n <p-skeleton height=\\\"4rem\\\" styleClass=\\\"rounded-lg\\\" />\\r\\n </div>\\r\\n <div class=\\\"col-span-6\\\">\\r\\n <p-skeleton height=\\\"4rem\\\" styleClass=\\\"rounded-lg\\\" />\\r\\n </div>\\r\\n <div class=\\\"col-span-12\\\">\\r\\n <p-skeleton height=\\\"4rem\\\" styleClass=\\\"rounded-lg\\\" />\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n }\\r\\n } @else {\\r\\n @for (section of enrichedSections(); track section.id) {\\r\\n <mt-fb-section\\r\\n [section]=\\\"section\\\"\\r\\n [sectionsCount]=\\\"enrichedSections().length\\\"\\r\\n [allSections]=\\\"enrichedSections()\\\"\\r\\n (onFieldDrop)=\\\"drop($event)\\\"\\r\\n >\\r\\n </mt-fb-section>\\r\\n } @empty {\\r\\n <mt-card>\\r\\n <div class=\\\"h-27 p-4\\\">\\r\\n <div\\r\\n class=\\\"flex justify-center items-center gap-4 h-full border-2 border-primary rounded-xl bg-primary-200 text-primary\\\"\\r\\n >\\r\\n <span>{{ t(\\\"no-section\\\") }}</span>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n</ng-container>\\r\\n\", styles: [\".cdk-drag{cursor:grab}.cdk-drag:active,.cdk-drag-preview{cursor:grabbing}.cdk-drag-placeholder{opacity:.5}.cdk-drop-list-dragging .cdk-drag{cursor:grabbing}\\n\"] }]\n }], ctorParameters: () => [] });\n\n/*\n * Public API Surface of form-builder\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AddField, AddSection, DeleteField, DeleteSection, FormBuilder, FormBuilderActionKey, FormBuilderFacade, FormBuilderState, GetFormConfiguration, MoveField, ReorderFields, ResetFormBuilderState, ResetFormConfiguration, SetModuleInfo, SetProperties, UpdateField, UpdateSection };\n//# sourceMappingURL=masterteam-form-builder.mjs.map\n","map":null,"preliminaryFileName":"masterteam-form-builder.mjs","sourcemapFileName":"masterteam-form-builder.mjs.map"},{"fileName":"masterteam-form-builder.mjs.map","names":[],"needsCodeReference":false,"originalFileName":null,"originalFileNames":[],"source":"{\"version\":3,\"file\":\"masterteam-form-builder.mjs\",\"sources\":[\"../../../../packages/masterteam/form-builder/src/store/form-builder/form-builder.actions.ts\",\"../../../../packages/masterteam/form-builder/src/store/form-builder/form-builder.model.ts\",\"../../../../packages/masterteam/form-builder/src/store/form-builder/form-builder.state.ts\",\"../../../../packages/masterteam/form-builder/src/store/form-builder/form-builder.facade.ts\",\"../../../../packages/masterteam/form-builder/src/lib/fb-field-conditions/condition-constants.ts\",\"../../../../packages/masterteam/form-builder/src/lib/fb-field-conditions/fb-field-conditions.ts\",\"../../../../packages/masterteam/form-builder/src/lib/fb-field-conditions/fb-field-conditions.html\",\"../../../../packages/masterteam/form-builder/src/lib/fb-field-form/fb-field-form.ts\",\"../../../../packages/masterteam/form-builder/src/lib/fb-field-form/fb-field-form.html\",\"../../../../packages/masterteam/form-builder/src/lib/fb-section-form/fb-section-form.ts\",\"../../../../packages/masterteam/form-builder/src/lib/fb-section-form/fb-section-form.html\",\"../../../../packages/masterteam/form-builder/src/lib/fb-section/fb-section.ts\",\"../../../../packages/masterteam/form-builder/src/lib/fb-section/fb-section.html\",\"../../../../packages/masterteam/form-builder/src/lib/fb-preview-form/fb-preview-form.ts\",\"../../../../packages/masterteam/form-builder/src/lib/fb-preview-form/fb-preview-form.html\",\"../../../../packages/masterteam/form-builder/src/lib/form-builder.ts\",\"../../../../packages/masterteam/form-builder/src/lib/form-builder.html\",\"../../../../packages/masterteam/form-builder/src/public-api.ts\",\"../../../../packages/masterteam/form-builder/src/masterteam-form-builder.ts\"],\"sourcesContent\":[\"import type {\\r\\n AddFieldPayload,\\r\\n AddSectionPayload,\\r\\n MoveFieldPayload,\\r\\n PropertyItem,\\r\\n ReorderFieldPayload,\\r\\n UpdateFieldPayload,\\r\\n UpdateSectionPayload,\\r\\n} from './form-builder.model';\\r\\n\\r\\n// ============================================================================\\r\\n// Module Configuration Actions\\r\\n// ============================================================================\\r\\n\\r\\nexport class SetModuleInfo {\\r\\n static readonly type = '[FormBuilder] Set Module Info';\\r\\n constructor(\\r\\n public moduleType: string,\\r\\n public moduleId: string | number,\\r\\n public parentModuleType?: string,\\r\\n public parentModuleId?: string | number,\\r\\n public parentPath?: string,\\r\\n ) {}\\r\\n}\\r\\n\\r\\nexport class ResetFormBuilderState {\\r\\n static readonly type = '[FormBuilder] Reset State';\\r\\n}\\r\\n\\r\\nexport class SetProperties {\\r\\n static readonly type = '[FormBuilder] Set Properties';\\r\\n constructor(public properties: PropertyItem[]) {}\\r\\n}\\r\\n\\r\\n// ============================================================================\\r\\n// Form Configuration Actions\\r\\n// ============================================================================\\r\\n\\r\\nexport class GetFormConfiguration {\\r\\n static readonly type = '[FormBuilder] Get Form Configuration';\\r\\n}\\r\\n\\r\\nexport class ResetFormConfiguration {\\r\\n static readonly type = '[FormBuilder] Reset Form Configuration';\\r\\n}\\r\\n\\r\\n// ============================================================================\\r\\n// Section Actions\\r\\n// ============================================================================\\r\\n\\r\\nexport class AddSection {\\r\\n static readonly type = '[FormBuilder] Add Section';\\r\\n constructor(public payload: AddSectionPayload) {}\\r\\n}\\r\\n\\r\\nexport class UpdateSection {\\r\\n static readonly type = '[FormBuilder] Update Section';\\r\\n constructor(\\r\\n public sectionId: string,\\r\\n public payload: UpdateSectionPayload,\\r\\n ) {}\\r\\n}\\r\\n\\r\\nexport class DeleteSection {\\r\\n static readonly type = '[FormBuilder] Delete Section';\\r\\n constructor(public sectionId: string) {}\\r\\n}\\r\\n\\r\\n// ============================================================================\\r\\n// Field Actions\\r\\n// ============================================================================\\r\\n\\r\\nexport class AddField {\\r\\n static readonly type = '[FormBuilder] Add Field';\\r\\n constructor(\\r\\n public sectionId: string,\\r\\n public payload: AddFieldPayload,\\r\\n ) {}\\r\\n}\\r\\n\\r\\nexport class UpdateField {\\r\\n static readonly type = '[FormBuilder] Update Field';\\r\\n constructor(\\r\\n public sectionId: string,\\r\\n public fieldId: string,\\r\\n public payload: UpdateFieldPayload,\\r\\n ) {}\\r\\n}\\r\\n\\r\\nexport class DeleteField {\\r\\n static readonly type = '[FormBuilder] Delete Field';\\r\\n constructor(\\r\\n public sectionId: string,\\r\\n public fieldId: string,\\r\\n ) {}\\r\\n}\\r\\n\\r\\nexport class ReorderFields {\\r\\n static readonly type = '[FormBuilder] Reorder Fields';\\r\\n constructor(\\r\\n public sectionId: string,\\r\\n public payload: ReorderFieldPayload[],\\r\\n ) {}\\r\\n}\\r\\n\\r\\nexport class MoveField {\\r\\n static readonly type = '[FormBuilder] Move Field';\\r\\n constructor(\\r\\n public sectionId: string,\\r\\n public fieldId: string,\\r\\n public payload: MoveFieldPayload,\\r\\n ) {}\\r\\n}\\r\\n\",\"import type { LoadingStateShape } from '@masterteam/components';\\r\\n\\r\\n// ============================================================================\\r\\n// Action Keys Enum\\r\\n// ============================================================================\\r\\nexport enum FormBuilderActionKey {\\r\\n // Form Configuration\\r\\n GetFormConfiguration = 'getFormConfiguration',\\r\\n ResetFormConfiguration = 'resetFormConfiguration',\\r\\n\\r\\n // Section CRUD\\r\\n AddSection = 'addSection',\\r\\n UpdateSection = 'updateSection',\\r\\n DeleteSection = 'deleteSection',\\r\\n\\r\\n // Field CRUD\\r\\n AddField = 'addField',\\r\\n UpdateField = 'updateField',\\r\\n DeleteField = 'deleteField',\\r\\n MoveField = 'moveField',\\r\\n ReorderFields = 'reorderFields',\\r\\n}\\r\\n\\r\\n// ============================================================================\\r\\n// API Models\\r\\n// ============================================================================\\r\\n\\r\\nexport type FieldWidth = '25' | '50' | '100';\\r\\n\\r\\nexport interface FormField {\\r\\n id: string;\\r\\n sectionId: string;\\r\\n propertyId: number;\\r\\n width: FieldWidth;\\r\\n order: number;\\r\\n hiddenInCreation?: boolean;\\r\\n hiddenInEditForm?: boolean;\\r\\n isRequired?: boolean;\\r\\n showConditionalDisplayFormula?: boolean;\\r\\n conditionalDisplayFormula?: string;\\r\\n _pending?: boolean; // Optimistic: field is being added\\r\\n _deleting?: boolean; // Optimistic: field is being deleted\\r\\n}\\r\\n\\r\\nexport interface FormSection {\\r\\n id: string;\\r\\n name: {\\r\\n en: string;\\r\\n ar: string;\\r\\n };\\r\\n order: number;\\r\\n fields: FormField[];\\r\\n}\\r\\n\\r\\nexport interface FormConfiguration {\\r\\n isActive: boolean;\\r\\n sections: FormSection[];\\r\\n}\\r\\n\\r\\n// ============================================================================\\r\\n// Request Payloads\\r\\n// ============================================================================\\r\\n\\r\\nexport interface AddSectionPayload {\\r\\n name: { en: string; ar: string };\\r\\n order?: number;\\r\\n}\\r\\n\\r\\nexport interface UpdateSectionPayload {\\r\\n name?: { en: string; ar: string };\\r\\n order?: number;\\r\\n}\\r\\n\\r\\nexport interface AddFieldPayload {\\r\\n propertyId: number;\\r\\n width: FieldWidth;\\r\\n order?: number;\\r\\n hiddenInCreation?: boolean;\\r\\n hiddenInEditForm?: boolean;\\r\\n isRequired?: boolean;\\r\\n showConditionalDisplayFormula?: boolean;\\r\\n conditionalDisplayFormula?: string;\\r\\n}\\r\\n\\r\\nexport interface UpdateFieldPayload {\\r\\n width?: FieldWidth;\\r\\n order?: number;\\r\\n hiddenInCreation?: boolean;\\r\\n hiddenInEditForm?: boolean;\\r\\n isRequired?: boolean;\\r\\n showConditionalDisplayFormula?: boolean;\\r\\n conditionalDisplayFormula?: string | null;\\r\\n}\\r\\n\\r\\nexport interface MoveFieldPayload {\\r\\n targetSectionId: string;\\r\\n order?: number;\\r\\n}\\r\\n\\r\\nexport interface ReorderFieldPayload {\\r\\n id: string;\\r\\n order: number;\\r\\n}\\r\\n\\r\\n// ============================================================================\\r\\n// Property Item (for enrichment)\\r\\n// ============================================================================\\r\\nexport interface PropertyItem {\\r\\n id: number;\\r\\n name: string | Record<string, string>;\\r\\n viewType?: string;\\r\\n [key: string]: any;\\r\\n}\\r\\n\\r\\n// ============================================================================\\r\\n// Enriched Types (for UI display)\\r\\n// ============================================================================\\r\\n\\r\\n// Enriched field with UI properties (from PropertyItem)\\r\\nexport interface EnrichedFormField extends FormField {\\r\\n name: string;\\r\\n type: string;\\r\\n data?: any;\\r\\n}\\r\\n\\r\\n// Enriched section for UI display\\r\\nexport interface EnrichedFormSection extends Omit<FormSection, 'fields'> {\\r\\n fields: EnrichedFormField[];\\r\\n}\\r\\n\\r\\n// ============================================================================\\r\\n// State Model\\r\\n// ============================================================================\\r\\nexport interface FormBuilderStateModel extends LoadingStateShape<FormBuilderActionKey> {\\r\\n // Module configuration\\r\\n moduleType: string | null;\\r\\n moduleId: string | number | null;\\r\\n parentModuleType: string | null;\\r\\n parentModuleId: string | number | null;\\r\\n parentPath: string;\\r\\n\\r\\n // Form data\\r\\n formConfiguration: FormConfiguration | null;\\r\\n\\r\\n // Properties for field enrichment\\r\\n properties: PropertyItem[];\\r\\n}\\r\\n\",\"import { HttpClient } from '@angular/common/http';\\r\\nimport { inject, Injectable } from '@angular/core';\\r\\nimport { Action, Selector, State, StateContext } from '@ngxs/store';\\r\\nimport {\\r\\n CrudStateBase,\\r\\n handleApiRequest,\\r\\n Response,\\r\\n} from '@masterteam/components';\\r\\n\\r\\nimport {\\r\\n FormBuilderActionKey,\\r\\n FormBuilderStateModel,\\r\\n FormConfiguration,\\r\\n FormField,\\r\\n FormSection,\\r\\n} from './form-builder.model';\\r\\nimport {\\r\\n AddField,\\r\\n AddSection,\\r\\n DeleteField,\\r\\n DeleteSection,\\r\\n GetFormConfiguration,\\r\\n MoveField,\\r\\n ReorderFields,\\r\\n ResetFormBuilderState,\\r\\n ResetFormConfiguration,\\r\\n SetModuleInfo,\\r\\n SetProperties,\\r\\n UpdateField,\\r\\n UpdateSection,\\r\\n} from './form-builder.actions';\\r\\n\\r\\n// Default State\\r\\nconst DEFAULT_STATE: FormBuilderStateModel = {\\r\\n // Module configuration\\r\\n moduleType: null,\\r\\n moduleId: null,\\r\\n parentModuleType: null,\\r\\n parentModuleId: null,\\r\\n parentPath: '',\\r\\n\\r\\n // Form data\\r\\n formConfiguration: null,\\r\\n\\r\\n // Properties for field enrichment\\r\\n properties: [],\\r\\n\\r\\n // Loading state (from LoadingStateShape)\\r\\n loadingActive: [],\\r\\n errors: {},\\r\\n};\\r\\n\\r\\n@State<FormBuilderStateModel>({\\r\\n name: 'formBuilder',\\r\\n defaults: DEFAULT_STATE,\\r\\n})\\r\\n@Injectable()\\r\\nexport class FormBuilderState extends CrudStateBase<\\r\\n FormSection,\\r\\n FormBuilderStateModel,\\r\\n FormBuilderActionKey\\r\\n> {\\r\\n private http = inject(HttpClient);\\r\\n private baseUrl = 'formConfigurations';\\r\\n\\r\\n // ============================================================================\\r\\n // Helpers\\r\\n // ============================================================================\\r\\n\\r\\n private getApiPath(state: FormBuilderStateModel): string {\\r\\n const { parentPath, moduleType, moduleId } = state;\\r\\n return `${this.baseUrl}${parentPath}/${moduleType}/${moduleId}`;\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // Selectors\\r\\n // ============================================================================\\r\\n\\r\\n @Selector()\\r\\n static getState(state: FormBuilderStateModel): FormBuilderStateModel {\\r\\n return state ?? DEFAULT_STATE;\\r\\n }\\r\\n\\r\\n @Selector()\\r\\n static getFormConfiguration(\\r\\n state: FormBuilderStateModel,\\r\\n ): FormConfiguration | null {\\r\\n return state?.formConfiguration ?? null;\\r\\n }\\r\\n\\r\\n @Selector()\\r\\n static getSections(state: FormBuilderStateModel): FormSection[] {\\r\\n return state?.formConfiguration?.sections ?? [];\\r\\n }\\r\\n\\r\\n @Selector()\\r\\n static getModuleType(state: FormBuilderStateModel): string | null {\\r\\n return state?.moduleType ?? null;\\r\\n }\\r\\n\\r\\n @Selector()\\r\\n static getModuleId(state: FormBuilderStateModel): string | number | null {\\r\\n return state?.moduleId ?? null;\\r\\n }\\r\\n\\r\\n @Selector()\\r\\n static getProperties(state: FormBuilderStateModel) {\\r\\n return state?.properties ?? [];\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // Module Configuration Actions\\r\\n // ============================================================================\\r\\n\\r\\n @Action(SetModuleInfo)\\r\\n setModuleInfo(\\r\\n ctx: StateContext<FormBuilderStateModel>,\\r\\n action: SetModuleInfo,\\r\\n ) {\\r\\n let parentPath = '';\\r\\n if (action.parentModuleType && action.parentModuleId) {\\r\\n parentPath = `/${action.parentModuleType}/${action.parentModuleId}`;\\r\\n } else if (action.parentPath) {\\r\\n parentPath = action.parentPath;\\r\\n }\\r\\n ctx.patchState({\\r\\n moduleType: action.moduleType,\\r\\n moduleId: action.moduleId,\\r\\n parentModuleType: action.parentModuleType ?? null,\\r\\n parentModuleId: action.parentModuleId ?? null,\\r\\n parentPath: parentPath ?? '',\\r\\n });\\r\\n }\\r\\n\\r\\n @Action(ResetFormBuilderState)\\r\\n resetState(ctx: StateContext<FormBuilderStateModel>) {\\r\\n ctx.setState(DEFAULT_STATE);\\r\\n }\\r\\n\\r\\n @Action(SetProperties)\\r\\n setProperties(\\r\\n ctx: StateContext<FormBuilderStateModel>,\\r\\n action: SetProperties,\\r\\n ) {\\r\\n ctx.patchState({\\r\\n properties: action.properties,\\r\\n });\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // Form Configuration Actions\\r\\n // ============================================================================\\r\\n\\r\\n @Action(GetFormConfiguration)\\r\\n getFormConfiguration(ctx: StateContext<FormBuilderStateModel>) {\\r\\n const state = ctx.getState();\\r\\n const apiPath = this.getApiPath(state);\\r\\n const req$ = this.http.get<Response<FormConfiguration>>(apiPath);\\r\\n\\r\\n return this.load(ctx, {\\r\\n key: FormBuilderActionKey.GetFormConfiguration,\\r\\n request$: req$,\\r\\n updateState: (_state, data) => ({\\r\\n formConfiguration: data ?? null,\\r\\n }),\\r\\n });\\r\\n }\\r\\n\\r\\n @Action(ResetFormConfiguration)\\r\\n resetFormConfiguration(ctx: StateContext<FormBuilderStateModel>) {\\r\\n const state = ctx.getState();\\r\\n const apiPath = `${this.getApiPath(state)}/reset`;\\r\\n const req$ = this.http.delete<Response<FormConfiguration>>(apiPath);\\r\\n\\r\\n return handleApiRequest({\\r\\n ctx,\\r\\n key: FormBuilderActionKey.ResetFormConfiguration,\\r\\n request$: req$,\\r\\n onSuccess: (res, _currentState) => ({\\r\\n formConfiguration: res.data ?? null,\\r\\n }),\\r\\n });\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // Section Actions\\r\\n // ============================================================================\\r\\n\\r\\n @Action(AddSection)\\r\\n addSection(ctx: StateContext<FormBuilderStateModel>, action: AddSection) {\\r\\n const state = ctx.getState();\\r\\n const apiPath = `${this.getApiPath(state)}/sections`;\\r\\n const req$ = this.http.post<Response<FormSection>>(apiPath, action.payload);\\r\\n\\r\\n return handleApiRequest({\\r\\n ctx,\\r\\n key: FormBuilderActionKey.AddSection,\\r\\n request$: req$,\\r\\n onSuccess: (res, currentState) => {\\r\\n const sections = this.adapter.addOne(\\r\\n currentState.formConfiguration?.sections ?? [],\\r\\n res.data,\\r\\n );\\r\\n return {\\r\\n formConfiguration: {\\r\\n ...currentState.formConfiguration!,\\r\\n sections,\\r\\n },\\r\\n };\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n @Action(UpdateSection)\\r\\n updateSection(\\r\\n ctx: StateContext<FormBuilderStateModel>,\\r\\n action: UpdateSection,\\r\\n ) {\\r\\n const state = ctx.getState();\\r\\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}`;\\r\\n const req$ = this.http.put<Response<FormSection>>(apiPath, action.payload);\\r\\n\\r\\n return handleApiRequest({\\r\\n ctx,\\r\\n key: FormBuilderActionKey.UpdateSection,\\r\\n request$: req$,\\r\\n onSuccess: (res, currentState) => {\\r\\n const sections = this.adapter.upsertOne(\\r\\n currentState.formConfiguration?.sections ?? [],\\r\\n res.data,\\r\\n 'id',\\r\\n );\\r\\n return {\\r\\n formConfiguration: {\\r\\n ...currentState.formConfiguration!,\\r\\n sections,\\r\\n },\\r\\n };\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n @Action(DeleteSection)\\r\\n deleteSection(\\r\\n ctx: StateContext<FormBuilderStateModel>,\\r\\n action: DeleteSection,\\r\\n ) {\\r\\n const state = ctx.getState();\\r\\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}`;\\r\\n const req$ = this.http.delete<Response<{ id: string }>>(apiPath);\\r\\n\\r\\n return handleApiRequest({\\r\\n ctx,\\r\\n key: FormBuilderActionKey.DeleteSection,\\r\\n request$: req$,\\r\\n onSuccess: (res, currentState) => {\\r\\n const sections = this.adapter.removeOne(\\r\\n currentState.formConfiguration?.sections ?? [],\\r\\n res.data.id,\\r\\n 'id',\\r\\n );\\r\\n return {\\r\\n formConfiguration: {\\r\\n ...currentState.formConfiguration!,\\r\\n sections,\\r\\n },\\r\\n };\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // Field Actions\\r\\n // ============================================================================\\r\\n\\r\\n @Action(AddField)\\r\\n addField(ctx: StateContext<FormBuilderStateModel>, action: AddField) {\\r\\n const state = ctx.getState();\\r\\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields`;\\r\\n const req$ = this.http.post<Response<FormField>>(apiPath, action.payload);\\r\\n\\r\\n // Generate temp ID for optimistic update\\r\\n const tempId = `temp_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;\\r\\n const tempField: FormField = {\\r\\n id: tempId,\\r\\n sectionId: action.sectionId,\\r\\n propertyId: action.payload.propertyId,\\r\\n width: action.payload.width,\\r\\n order: action.payload.order ?? 0,\\r\\n hiddenInCreation: action.payload.hiddenInCreation,\\r\\n _pending: true,\\r\\n };\\r\\n\\r\\n // Optimistically add the temp field\\r\\n const sectionsWithTemp = (state.formConfiguration?.sections ?? []).map(\\r\\n (section) => {\\r\\n if (section.id === action.sectionId) {\\r\\n const fields = [...section.fields];\\r\\n const insertIndex = action.payload.order ?? fields.length;\\r\\n fields.splice(insertIndex, 0, tempField);\\r\\n return { ...section, fields };\\r\\n }\\r\\n return section;\\r\\n },\\r\\n );\\r\\n ctx.patchState({\\r\\n formConfiguration: {\\r\\n ...state.formConfiguration!,\\r\\n sections: sectionsWithTemp,\\r\\n },\\r\\n });\\r\\n\\r\\n return handleApiRequest({\\r\\n ctx,\\r\\n key: FormBuilderActionKey.AddField,\\r\\n request$: req$,\\r\\n onSuccess: (res, currentState) => {\\r\\n const newField = res.data;\\r\\n // Replace temp field with real field\\r\\n const sections = (currentState.formConfiguration?.sections ?? []).map(\\r\\n (section) => {\\r\\n if (section.id === action.sectionId) {\\r\\n return {\\r\\n ...section,\\r\\n fields: section.fields.map((f) =>\\r\\n f.id === tempId ? newField : f,\\r\\n ),\\r\\n };\\r\\n }\\r\\n return section;\\r\\n },\\r\\n );\\r\\n return {\\r\\n formConfiguration: {\\r\\n ...currentState.formConfiguration!,\\r\\n sections,\\r\\n },\\r\\n };\\r\\n },\\r\\n onError: (_error, currentState) => {\\r\\n // Remove temp field on error\\r\\n const sections = (currentState.formConfiguration?.sections ?? []).map(\\r\\n (section) => {\\r\\n if (section.id === action.sectionId) {\\r\\n return {\\r\\n ...section,\\r\\n fields: section.fields.filter((f) => f.id !== tempId),\\r\\n };\\r\\n }\\r\\n return section;\\r\\n },\\r\\n );\\r\\n return {\\r\\n formConfiguration: {\\r\\n ...currentState.formConfiguration!,\\r\\n sections,\\r\\n },\\r\\n };\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n @Action(UpdateField)\\r\\n updateField(ctx: StateContext<FormBuilderStateModel>, action: UpdateField) {\\r\\n const state = ctx.getState();\\r\\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields/${action.fieldId}`;\\r\\n const req$ = this.http.put<Response<FormField>>(apiPath, action.payload);\\r\\n\\r\\n // Apply optimistic update for order changes\\r\\n if (action.payload.order !== undefined) {\\r\\n const newOrder = action.payload.order;\\r\\n const sections = (state.formConfiguration?.sections ?? []).map(\\r\\n (section) => {\\r\\n if (section.id === action.sectionId) {\\r\\n const fields = [...section.fields];\\r\\n const currentIndex = fields.findIndex(\\r\\n (f) => f.id === action.fieldId,\\r\\n );\\r\\n if (currentIndex !== -1) {\\r\\n const [movedField] = fields.splice(currentIndex, 1);\\r\\n fields.splice(newOrder, 0, movedField);\\r\\n }\\r\\n return { ...section, fields };\\r\\n }\\r\\n return section;\\r\\n },\\r\\n );\\r\\n ctx.patchState({\\r\\n formConfiguration: {\\r\\n ...state.formConfiguration!,\\r\\n sections,\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n return handleApiRequest({\\r\\n ctx,\\r\\n key: FormBuilderActionKey.UpdateField,\\r\\n request$: req$,\\r\\n onSuccess: (res, currentState) => {\\r\\n const updatedField = res.data;\\r\\n const sections = (currentState.formConfiguration?.sections ?? []).map(\\r\\n (section) => {\\r\\n if (section.id === action.sectionId) {\\r\\n // Update the field but preserve current array order (from optimistic update)\\r\\n // Don't re-sort by order property as other fields may have stale order values\\r\\n const updatedFields = section.fields.map((f, index) =>\\r\\n f.id === updatedField.id\\r\\n ? { ...updatedField, order: index }\\r\\n : { ...f, order: index },\\r\\n );\\r\\n return {\\r\\n ...section,\\r\\n fields: updatedFields,\\r\\n };\\r\\n }\\r\\n return section;\\r\\n },\\r\\n );\\r\\n return {\\r\\n formConfiguration: {\\r\\n ...currentState.formConfiguration!,\\r\\n sections,\\r\\n },\\r\\n };\\r\\n },\\r\\n onError: (_error, _currentState) => {\\r\\n // Revert optimistic update on error - reload original state\\r\\n if (action.payload.order !== undefined) {\\r\\n return {\\r\\n formConfiguration: state.formConfiguration,\\r\\n };\\r\\n }\\r\\n return {};\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n @Action(DeleteField)\\r\\n deleteField(ctx: StateContext<FormBuilderStateModel>, action: DeleteField) {\\r\\n const state = ctx.getState();\\r\\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields/${action.fieldId}`;\\r\\n const req$ =\\r\\n this.http.delete<Response<{ id: string; sectionId: string }>>(apiPath);\\r\\n\\r\\n // Optimistically mark field as deleting\\r\\n const sectionsWithDeleting = (state.formConfiguration?.sections ?? []).map(\\r\\n (section) => {\\r\\n if (section.id === action.sectionId) {\\r\\n return {\\r\\n ...section,\\r\\n fields: section.fields.map((f) =>\\r\\n f.id === action.fieldId ? { ...f, _deleting: true } : f,\\r\\n ),\\r\\n };\\r\\n }\\r\\n return section;\\r\\n },\\r\\n );\\r\\n ctx.patchState({\\r\\n formConfiguration: {\\r\\n ...state.formConfiguration!,\\r\\n sections: sectionsWithDeleting,\\r\\n },\\r\\n });\\r\\n\\r\\n return handleApiRequest({\\r\\n ctx,\\r\\n key: FormBuilderActionKey.DeleteField,\\r\\n request$: req$,\\r\\n onSuccess: (res, currentState) => {\\r\\n const { id: deletedId, sectionId } = res.data;\\r\\n const sections = (currentState.formConfiguration?.sections ?? []).map(\\r\\n (section) => {\\r\\n if (section.id === sectionId) {\\r\\n return {\\r\\n ...section,\\r\\n fields: section.fields.filter((f) => f.id !== deletedId),\\r\\n };\\r\\n }\\r\\n return section;\\r\\n },\\r\\n );\\r\\n return {\\r\\n formConfiguration: {\\r\\n ...currentState.formConfiguration!,\\r\\n sections,\\r\\n },\\r\\n };\\r\\n },\\r\\n onError: (_error, currentState) => {\\r\\n // Remove _deleting flag on error\\r\\n const sections = (currentState.formConfiguration?.sections ?? []).map(\\r\\n (section) => {\\r\\n if (section.id === action.sectionId) {\\r\\n return {\\r\\n ...section,\\r\\n fields: section.fields.map((f) =>\\r\\n f.id === action.fieldId ? { ...f, _deleting: false } : f,\\r\\n ),\\r\\n };\\r\\n }\\r\\n return section;\\r\\n },\\r\\n );\\r\\n return {\\r\\n formConfiguration: {\\r\\n ...currentState.formConfiguration!,\\r\\n sections,\\r\\n },\\r\\n };\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n @Action(ReorderFields)\\r\\n reorderFields(\\r\\n ctx: StateContext<FormBuilderStateModel>,\\r\\n action: ReorderFields,\\r\\n ) {\\r\\n const state = ctx.getState();\\r\\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields/reorder`;\\r\\n const req$ = this.http.put<Response<FormField[]>>(apiPath, action.payload);\\r\\n\\r\\n // Create order map for optimistic update\\r\\n const orderMap = new Map(action.payload.map((p) => [p.id, p.order]));\\r\\n\\r\\n // Apply optimistic update\\r\\n const optimisticSections = (state.formConfiguration?.sections ?? []).map(\\r\\n (section) => {\\r\\n if (section.id === action.sectionId) {\\r\\n const reorderedFields = section.fields\\r\\n .map((f) => ({\\r\\n ...f,\\r\\n order: orderMap.get(f.id) ?? f.order,\\r\\n }))\\r\\n .sort((a, b) => a.order - b.order);\\r\\n return { ...section, fields: reorderedFields };\\r\\n }\\r\\n return section;\\r\\n },\\r\\n );\\r\\n\\r\\n ctx.patchState({\\r\\n formConfiguration: {\\r\\n ...state.formConfiguration!,\\r\\n sections: optimisticSections,\\r\\n },\\r\\n });\\r\\n\\r\\n return handleApiRequest({\\r\\n ctx,\\r\\n key: FormBuilderActionKey.ReorderFields,\\r\\n request$: req$,\\r\\n onSuccess: (res, currentState) => {\\r\\n const updatedFields = res.data;\\r\\n const fieldMap = new Map(updatedFields.map((f) => [f.id, f]));\\r\\n\\r\\n const sections = (currentState.formConfiguration?.sections ?? []).map(\\r\\n (section) => {\\r\\n if (section.id === action.sectionId) {\\r\\n const mergedFields = section.fields\\r\\n .map((f) => fieldMap.get(f.id) ?? f)\\r\\n .sort((a, b) => a.order - b.order);\\r\\n return { ...section, fields: mergedFields };\\r\\n }\\r\\n return section;\\r\\n },\\r\\n );\\r\\n return {\\r\\n formConfiguration: {\\r\\n ...currentState.formConfiguration!,\\r\\n sections,\\r\\n },\\r\\n };\\r\\n },\\r\\n onError: (_error, _currentState) => {\\r\\n // Revert to original state on error\\r\\n return {\\r\\n formConfiguration: state.formConfiguration,\\r\\n };\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n @Action(MoveField)\\r\\n moveField(ctx: StateContext<FormBuilderStateModel>, action: MoveField) {\\r\\n const state = ctx.getState();\\r\\n const apiPath = `${this.getApiPath(state)}/sections/${action.sectionId}/fields/${action.fieldId}/move`;\\r\\n const req$ = this.http.put<Response<FormField>>(apiPath, action.payload);\\r\\n\\r\\n // Apply optimistic update - move field immediately\\r\\n const sourceSectionId = action.sectionId;\\r\\n const targetSectionId = action.payload.targetSectionId;\\r\\n const targetOrder = action.payload.order ?? 0;\\r\\n\\r\\n let movedFieldData: FormField | null = null;\\r\\n const optimisticSections = (state.formConfiguration?.sections ?? []).map(\\r\\n (section) => {\\r\\n if (section.id === sourceSectionId) {\\r\\n const fieldToMove = section.fields.find(\\r\\n (f) => f.id === action.fieldId,\\r\\n );\\r\\n if (fieldToMove) {\\r\\n movedFieldData = { ...fieldToMove, order: targetOrder };\\r\\n }\\r\\n return {\\r\\n ...section,\\r\\n fields: section.fields.filter((f) => f.id !== action.fieldId),\\r\\n };\\r\\n }\\r\\n return section;\\r\\n },\\r\\n );\\r\\n\\r\\n // Add to target section\\r\\n const sectionsWithMoved = optimisticSections.map((section) => {\\r\\n if (section.id === targetSectionId && movedFieldData) {\\r\\n const fields = [...section.fields];\\r\\n fields.splice(targetOrder, 0, movedFieldData);\\r\\n return { ...section, fields };\\r\\n }\\r\\n return section;\\r\\n });\\r\\n\\r\\n ctx.patchState({\\r\\n formConfiguration: {\\r\\n ...state.formConfiguration!,\\r\\n sections: sectionsWithMoved,\\r\\n },\\r\\n });\\r\\n\\r\\n return handleApiRequest({\\r\\n ctx,\\r\\n key: FormBuilderActionKey.MoveField,\\r\\n request$: req$,\\r\\n onSuccess: (res, currentState) => {\\r\\n const movedField = res.data;\\r\\n const sections = (currentState.formConfiguration?.sections ?? []).map(\\r\\n (section) => {\\r\\n // Update the moved field with server response\\r\\n if (section.id === targetSectionId) {\\r\\n return {\\r\\n ...section,\\r\\n fields: section.fields\\r\\n .map((f) => (f.id === movedField.id ? movedField : f))\\r\\n .sort((a, b) => a.order - b.order),\\r\\n };\\r\\n }\\r\\n return section;\\r\\n },\\r\\n );\\r\\n return {\\r\\n formConfiguration: {\\r\\n ...currentState.formConfiguration!,\\r\\n sections,\\r\\n },\\r\\n };\\r\\n },\\r\\n onError: (_error, _currentState) => {\\r\\n // Revert optimistic update on error\\r\\n return {\\r\\n formConfiguration: state.formConfiguration,\\r\\n };\\r\\n },\\r\\n });\\r\\n }\\r\\n}\\r\\n\",\"import { computed, Injectable, inject } from '@angular/core';\\r\\nimport { Store, select } from '@ngxs/store';\\r\\n\\r\\nimport {\\r\\n AddFieldPayload,\\r\\n AddSectionPayload,\\r\\n FormBuilderActionKey,\\r\\n MoveFieldPayload,\\r\\n PropertyItem,\\r\\n ReorderFieldPayload,\\r\\n UpdateFieldPayload,\\r\\n UpdateSectionPayload,\\r\\n} from './form-builder.model';\\r\\nimport {\\r\\n AddField,\\r\\n AddSection,\\r\\n DeleteField,\\r\\n DeleteSection,\\r\\n GetFormConfiguration,\\r\\n MoveField,\\r\\n ReorderFields,\\r\\n ResetFormBuilderState,\\r\\n ResetFormConfiguration,\\r\\n SetModuleInfo,\\r\\n SetProperties,\\r\\n UpdateField,\\r\\n UpdateSection,\\r\\n} from './form-builder.actions';\\r\\nimport { FormBuilderState } from './form-builder.state';\\r\\n\\r\\n@Injectable({ providedIn: 'root' })\\r\\nexport class FormBuilderFacade {\\r\\n private readonly store = inject(Store);\\r\\n\\r\\n // ============================================================================\\r\\n // State Selectors\\r\\n // ============================================================================\\r\\n\\r\\n private readonly stateSignal = select(FormBuilderState.getState);\\r\\n\\r\\n readonly formConfiguration = select(FormBuilderState.getFormConfiguration);\\r\\n readonly sections = select(FormBuilderState.getSections);\\r\\n readonly properties = select(FormBuilderState.getProperties);\\r\\n readonly moduleType = select(FormBuilderState.getModuleType);\\r\\n readonly moduleId = select(FormBuilderState.getModuleId);\\r\\n\\r\\n // ============================================================================\\r\\n // Loading Signals\\r\\n // ============================================================================\\r\\n\\r\\n readonly isLoadingFormConfiguration = computed(() =>\\r\\n this.stateSignal().loadingActive.includes(\\r\\n FormBuilderActionKey.GetFormConfiguration,\\r\\n ),\\r\\n );\\r\\n\\r\\n readonly isResettingFormConfiguration = computed(() =>\\r\\n this.stateSignal().loadingActive.includes(\\r\\n FormBuilderActionKey.ResetFormConfiguration,\\r\\n ),\\r\\n );\\r\\n\\r\\n readonly isAddingSection = computed(() =>\\r\\n this.stateSignal().loadingActive.includes(FormBuilderActionKey.AddSection),\\r\\n );\\r\\n\\r\\n readonly isUpdatingSection = computed(() =>\\r\\n this.stateSignal().loadingActive.includes(\\r\\n FormBuilderActionKey.UpdateSection,\\r\\n ),\\r\\n );\\r\\n\\r\\n readonly isDeletingSection = computed(() =>\\r\\n this.stateSignal().loadingActive.includes(\\r\\n FormBuilderActionKey.DeleteSection,\\r\\n ),\\r\\n );\\r\\n\\r\\n readonly isAddingField = computed(() =>\\r\\n this.stateSignal().loadingActive.includes(FormBuilderActionKey.AddField),\\r\\n );\\r\\n\\r\\n readonly isUpdatingField = computed(() =>\\r\\n this.stateSignal().loadingActive.includes(FormBuilderActionKey.UpdateField),\\r\\n );\\r\\n\\r\\n readonly isDeletingField = computed(() =>\\r\\n this.stateSignal().loadingActive.includes(FormBuilderActionKey.DeleteField),\\r\\n );\\r\\n\\r\\n readonly isMovingField = computed(() =>\\r\\n this.stateSignal().loadingActive.includes(FormBuilderActionKey.MoveField),\\r\\n );\\r\\n\\r\\n // ============================================================================\\r\\n // Error Signals\\r\\n // ============================================================================\\r\\n\\r\\n readonly formConfigurationError = computed(\\r\\n () =>\\r\\n this.stateSignal().errors[FormBuilderActionKey.GetFormConfiguration] ??\\r\\n null,\\r\\n );\\r\\n\\r\\n readonly sectionError = computed(() => {\\r\\n const errors = this.stateSignal().errors;\\r\\n return (\\r\\n errors[FormBuilderActionKey.AddSection] ??\\r\\n errors[FormBuilderActionKey.UpdateSection] ??\\r\\n errors[FormBuilderActionKey.DeleteSection] ??\\r\\n null\\r\\n );\\r\\n });\\r\\n\\r\\n readonly fieldError = computed(() => {\\r\\n const errors = this.stateSignal().errors;\\r\\n return (\\r\\n errors[FormBuilderActionKey.AddField] ??\\r\\n errors[FormBuilderActionKey.UpdateField] ??\\r\\n errors[FormBuilderActionKey.DeleteField] ??\\r\\n errors[FormBuilderActionKey.MoveField] ??\\r\\n null\\r\\n );\\r\\n });\\r\\n\\r\\n // ============================================================================\\r\\n // Module Configuration Dispatchers\\r\\n // ============================================================================\\r\\n\\r\\n setModuleInfo(\\r\\n moduleType: string,\\r\\n moduleId: string | number,\\r\\n parentModuleType?: string,\\r\\n parentModuleId?: string | number,\\r\\n parentPath?: string,\\r\\n ) {\\r\\n return this.store.dispatch(\\r\\n new SetModuleInfo(\\r\\n moduleType,\\r\\n moduleId,\\r\\n parentModuleType,\\r\\n parentModuleId,\\r\\n parentPath,\\r\\n ),\\r\\n );\\r\\n }\\r\\n\\r\\n resetState() {\\r\\n return this.store.dispatch(new ResetFormBuilderState());\\r\\n }\\r\\n\\r\\n setProperties(properties: PropertyItem[]) {\\r\\n return this.store.dispatch(new SetProperties(properties));\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // Form Configuration Dispatchers\\r\\n // ============================================================================\\r\\n\\r\\n getFormConfiguration() {\\r\\n return this.store.dispatch(new GetFormConfiguration());\\r\\n }\\r\\n\\r\\n resetFormConfiguration() {\\r\\n return this.store.dispatch(new ResetFormConfiguration());\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // Section Dispatchers\\r\\n // ============================================================================\\r\\n\\r\\n addSection(payload: AddSectionPayload) {\\r\\n return this.store.dispatch(new AddSection(payload));\\r\\n }\\r\\n\\r\\n updateSection(sectionId: string, payload: UpdateSectionPayload) {\\r\\n return this.store.dispatch(new UpdateSection(sectionId, payload));\\r\\n }\\r\\n\\r\\n deleteSection(sectionId: string) {\\r\\n return this.store.dispatch(new DeleteSection(sectionId));\\r\\n }\\r\\n\\r\\n // ============================================================================\\r\\n // Field Dispatchers\\r\\n // ============================================================================\\r\\n\\r\\n addField(sectionId: string, payload: AddFieldPayload) {\\r\\n return this.store.dispatch(new AddField(sectionId, payload));\\r\\n }\\r\\n\\r\\n updateField(sectionId: string, fieldId: string, payload: UpdateFieldPayload) {\\r\\n return this.store.dispatch(new UpdateField(sectionId, fieldId, payload));\\r\\n }\\r\\n\\r\\n deleteField(sectionId: string, fieldId: string) {\\r\\n return this.store.dispatch(new DeleteField(sectionId, fieldId));\\r\\n }\\r\\n\\r\\n reorderFields(sectionId: string, payload: ReorderFieldPayload[]) {\\r\\n return this.store.dispatch(new ReorderFields(sectionId, payload));\\r\\n }\\r\\n\\r\\n moveField(sectionId: string, fieldId: string, payload: MoveFieldPayload) {\\r\\n return this.store.dispatch(new MoveField(sectionId, fieldId, payload));\\r\\n }\\r\\n}\\r\\n\",\"/**\\r\\n * Condition Formula Constants\\r\\n * Static functions and operators for condition formulas (Show/Hide/Enable/Disable)\\r\\n */\\r\\n\\r\\nimport type {\\r\\n FunctionCategoryGroup,\\r\\n OperatorDefinition,\\r\\n} from '@masterteam/components/formula';\\r\\n\\r\\n/**\\r\\n * Functions for field conditions\\r\\n */\\r\\nexport const CONDITION_FUNCTION_CATEGORIES: FunctionCategoryGroup[] = [\\r\\n {\\r\\n name: 'Logic',\\r\\n displayName: 'Field Visibility',\\r\\n functions: [\\r\\n {\\r\\n name: 'SHOW_IF',\\r\\n category: 'Logic',\\r\\n description: 'Show this field when condition is true',\\r\\n signature: 'SHOW_IF(condition)',\\r\\n parameters: [\\r\\n {\\r\\n name: 'condition',\\r\\n type: 'boolean',\\r\\n description: 'When true, field is visible',\\r\\n required: true,\\r\\n },\\r\\n ],\\r\\n returnType: 'boolean',\\r\\n examples: [\\r\\n 'SHOW_IF(@Status == \\\"Active\\\")',\\r\\n 'SHOW_IF(@Type == \\\"Custom\\\")',\\r\\n ],\\r\\n },\\r\\n {\\r\\n name: 'HIDE_IF',\\r\\n category: 'Logic',\\r\\n description: 'Hide this field when condition is true',\\r\\n signature: 'HIDE_IF(condition)',\\r\\n parameters: [\\r\\n {\\r\\n name: 'condition',\\r\\n type: 'boolean',\\r\\n description: 'When true, field is hidden',\\r\\n required: true,\\r\\n },\\r\\n ],\\r\\n returnType: 'boolean',\\r\\n examples: ['HIDE_IF(@Status == \\\"Closed\\\")', 'HIDE_IF(ISNULL(@Parent))'],\\r\\n },\\r\\n {\\r\\n name: 'DISABLE_IF',\\r\\n category: 'Logic',\\r\\n description: 'Disable this field when condition is true',\\r\\n signature: 'DISABLE_IF(condition)',\\r\\n parameters: [\\r\\n {\\r\\n name: 'condition',\\r\\n type: 'boolean',\\r\\n description: 'When true, field is disabled',\\r\\n required: true,\\r\\n },\\r\\n ],\\r\\n returnType: 'boolean',\\r\\n examples: [\\r\\n 'DISABLE_IF(@IsLocked == true)',\\r\\n 'DISABLE_IF(@Status == \\\"Approved\\\")',\\r\\n ],\\r\\n },\\r\\n {\\r\\n name: 'ENABLE_IF',\\r\\n category: 'Logic',\\r\\n description: 'Enable this field when condition is true',\\r\\n signature: 'ENABLE_IF(condition)',\\r\\n parameters: [\\r\\n {\\r\\n name: 'condition',\\r\\n type: 'boolean',\\r\\n description: 'When true, field is enabled',\\r\\n required: true,\\r\\n },\\r\\n ],\\r\\n returnType: 'boolean',\\r\\n examples: [\\r\\n 'ENABLE_IF(@Status == \\\"Draft\\\")',\\r\\n 'ENABLE_IF(@CanEdit == true)',\\r\\n ],\\r\\n },\\r\\n ],\\r\\n },\\r\\n {\\r\\n name: 'Aggregation',\\r\\n displayName: 'Logic Helpers',\\r\\n functions: [\\r\\n {\\r\\n name: 'AND',\\r\\n category: 'Aggregation',\\r\\n description: 'Returns true if all conditions are true',\\r\\n signature: 'AND(condition1, condition2)',\\r\\n parameters: [\\r\\n {\\r\\n name: 'condition1',\\r\\n type: 'boolean',\\r\\n description: 'First condition',\\r\\n required: true,\\r\\n },\\r\\n {\\r\\n name: 'condition2',\\r\\n type: 'boolean',\\r\\n description: 'Second condition',\\r\\n required: true,\\r\\n },\\r\\n ],\\r\\n returnType: 'boolean',\\r\\n examples: ['AND(@Status == \\\"Active\\\", @Priority > 0)'],\\r\\n },\\r\\n {\\r\\n name: 'OR',\\r\\n category: 'Aggregation',\\r\\n description: 'Returns true if any condition is true',\\r\\n signature: 'OR(condition1, condition2)',\\r\\n parameters: [\\r\\n {\\r\\n name: 'condition1',\\r\\n type: 'boolean',\\r\\n description: 'First condition',\\r\\n required: true,\\r\\n },\\r\\n {\\r\\n name: 'condition2',\\r\\n type: 'boolean',\\r\\n description: 'Second condition',\\r\\n required: true,\\r\\n },\\r\\n ],\\r\\n returnType: 'boolean',\\r\\n examples: ['OR(@Status == \\\"Active\\\", @Status == \\\"Pending\\\")'],\\r\\n },\\r\\n {\\r\\n name: 'NOT',\\r\\n category: 'Aggregation',\\r\\n description: 'Returns the opposite of the condition',\\r\\n signature: 'NOT(condition)',\\r\\n parameters: [\\r\\n {\\r\\n name: 'condition',\\r\\n type: 'boolean',\\r\\n description: 'The condition to negate',\\r\\n required: true,\\r\\n },\\r\\n ],\\r\\n returnType: 'boolean',\\r\\n examples: ['NOT(@IsCompleted)'],\\r\\n },\\r\\n {\\r\\n name: 'ISNULL',\\r\\n category: 'Aggregation',\\r\\n description: 'Returns true if value is null or empty',\\r\\n signature: 'ISNULL(value)',\\r\\n parameters: [\\r\\n {\\r\\n name: 'value',\\r\\n type: 'any',\\r\\n description: 'The value to check',\\r\\n required: true,\\r\\n },\\r\\n ],\\r\\n returnType: 'boolean',\\r\\n examples: ['ISNULL(@Description)'],\\r\\n },\\r\\n {\\r\\n name: 'CONTAINS',\\r\\n category: 'Aggregation',\\r\\n description: 'Returns true if text contains the search string',\\r\\n signature: 'CONTAINS(text, search)',\\r\\n parameters: [\\r\\n {\\r\\n name: 'text',\\r\\n type: 'string',\\r\\n description: 'The text to search in',\\r\\n required: true,\\r\\n },\\r\\n {\\r\\n name: 'search',\\r\\n type: 'string',\\r\\n description: 'The string to search for',\\r\\n required: true,\\r\\n },\\r\\n ],\\r\\n returnType: 'boolean',\\r\\n examples: ['CONTAINS(@Name, \\\"Project\\\")'],\\r\\n },\\r\\n ],\\r\\n },\\r\\n];\\r\\n\\r\\n/**\\r\\n * Operators for conditions\\r\\n */\\r\\nexport const CONDITION_OPERATORS: OperatorDefinition[] = [\\r\\n // Comparison\\r\\n {\\r\\n symbol: '==',\\r\\n name: 'Equal',\\r\\n type: 'comparison',\\r\\n description: 'Equal to',\\r\\n precedence: 3,\\r\\n },\\r\\n {\\r\\n symbol: '!=',\\r\\n name: 'Not Equal',\\r\\n type: 'comparison',\\r\\n description: 'Not equal to',\\r\\n precedence: 3,\\r\\n },\\r\\n {\\r\\n symbol: '>',\\r\\n name: 'Greater Than',\\r\\n type: 'comparison',\\r\\n description: 'Greater than',\\r\\n precedence: 4,\\r\\n },\\r\\n {\\r\\n symbol: '<',\\r\\n name: 'Less Than',\\r\\n type: 'comparison',\\r\\n description: 'Less than',\\r\\n precedence: 4,\\r\\n },\\r\\n {\\r\\n symbol: '>=',\\r\\n name: 'Greater or Equal',\\r\\n type: 'comparison',\\r\\n description: 'Greater than or equal',\\r\\n precedence: 4,\\r\\n },\\r\\n {\\r\\n symbol: '<=',\\r\\n name: 'Less or Equal',\\r\\n type: 'comparison',\\r\\n description: 'Less than or equal',\\r\\n precedence: 4,\\r\\n },\\r\\n // Logical\\r\\n {\\r\\n symbol: '&&',\\r\\n name: 'And',\\r\\n type: 'logical',\\r\\n description: 'Logical AND',\\r\\n precedence: 2,\\r\\n },\\r\\n {\\r\\n symbol: '||',\\r\\n name: 'Or',\\r\\n type: 'logical',\\r\\n description: 'Logical OR',\\r\\n precedence: 1,\\r\\n },\\r\\n];\\r\\n\",\"import {\\r\\n Component,\\r\\n computed,\\r\\n inject,\\r\\n input,\\r\\n OnInit,\\r\\n signal,\\r\\n viewChild,\\r\\n} from '@angular/core';\\r\\nimport { TranslocoDirective } from '@jsverse/transloco';\\r\\nimport { ReactiveFormsModule, FormControl } from '@angular/forms';\\r\\nimport { Button } from '@masterteam/components/button';\\r\\nimport { ModalService } from '@masterteam/components/modal';\\r\\nimport { ModalRef } from '@masterteam/components/dialog';\\r\\nimport {\\r\\n FormulaEditor,\\r\\n FormulaToolbar,\\r\\n SmartBlock,\\r\\n FormulaToken,\\r\\n} from '@masterteam/components/formula';\\r\\nimport {\\r\\n CONDITION_FUNCTION_CATEGORIES,\\r\\n CONDITION_OPERATORS,\\r\\n} from './condition-constants';\\r\\n\\r\\n/**\\r\\n * Field property for condition formula\\r\\n */\\r\\nexport interface ConditionFieldProperty {\\r\\n /** Unique key (used in formula as @key) */\\r\\n key: string;\\r\\n /** Display name */\\r\\n name: string;\\r\\n /** Field type for hint */\\r\\n type?: string;\\r\\n}\\r\\n\\r\\n/**\\r\\n * Field Conditions Dialog\\r\\n *\\r\\n * Allows users to define conditional display formulas for form fields.\\r\\n * Uses FormulaToolbar + FormulaEditor directly for a visual formula editing experience.\\r\\n */\\r\\n@Component({\\r\\n selector: 'mt-fb-field-conditions',\\r\\n standalone: true,\\r\\n imports: [\\r\\n TranslocoDirective,\\r\\n ReactiveFormsModule,\\r\\n Button,\\r\\n FormulaToolbar,\\r\\n FormulaEditor,\\r\\n ],\\r\\n templateUrl: './fb-field-conditions.html',\\r\\n})\\r\\nexport class FBFieldConditions implements OnInit {\\r\\n protected readonly modalService = inject(ModalService);\\r\\n private readonly ref = inject(ModalRef);\\r\\n\\r\\n // Inputs\\r\\n /** Initial formula (JSON string from backend) */\\r\\n readonly initialFormula = input<string>('');\\r\\n\\r\\n /** Available fields from the form builder (other fields that can be referenced) */\\r\\n readonly availableFields = input<ConditionFieldProperty[]>([]);\\r\\n\\r\\n // UI State\\r\\n readonly submitting = signal(false);\\r\\n\\r\\n // Form control for the formula editor (tokens array)\\r\\n readonly formulaControl = new FormControl<FormulaToken[]>([]);\\r\\n\\r\\n // View child for the editor\\r\\n private readonly editorRef = viewChild<FormulaEditor>('editor');\\r\\n\\r\\n // Condition-specific functions and operators\\r\\n readonly functionCategories = CONDITION_FUNCTION_CATEGORIES;\\r\\n readonly operators = CONDITION_OPERATORS;\\r\\n\\r\\n /** Extract property keys for toolbar */\\r\\n readonly propertyKeys = computed(() =>\\r\\n this.availableFields().map((f) => f.key),\\r\\n );\\r\\n\\r\\n /** Toolbar labels */\\r\\n readonly toolbarLabels = {\\r\\n functions: 'Functions',\\r\\n properties: 'Fields',\\r\\n operators: 'Operators',\\r\\n noPropertiesAvailable: 'No fields available',\\r\\n };\\r\\n\\r\\n ngOnInit(): void {\\r\\n // Parse JSON string to tokens\\r\\n const formula = this.initialFormula();\\r\\n if (formula) {\\r\\n try {\\r\\n const tokens = JSON.parse(formula) as FormulaToken[];\\r\\n this.formulaControl.patchValue(tokens);\\r\\n } catch {\\r\\n // Invalid JSON, start with empty\\r\\n }\\r\\n }\\r\\n }\\r\\n\\r\\n /** Handle block insert from toolbar */\\r\\n onBlockInsert(block: SmartBlock): void {\\r\\n const editor = this.editorRef();\\r\\n if (editor) {\\r\\n editor.addBlock(block);\\r\\n }\\r\\n }\\r\\n\\r\\n onSave(): void {\\r\\n const tokens = this.formulaControl.value ?? [];\\r\\n const formula = tokens.length > 0 ? JSON.stringify(tokens) : '';\\r\\n this.ref.close({ saved: true, conditionalDisplayFormula: formula });\\r\\n }\\r\\n\\r\\n onCancel(): void {\\r\\n this.ref.close({ saved: false });\\r\\n }\\r\\n}\\r\\n\",\"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10 flex flex-col gap-3\\\">\\r\\n <!-- Formula Toolbar -->\\r\\n <mt-formula-toolbar\\r\\n [knownProperties]=\\\"propertyKeys()\\\"\\r\\n [functionCategories]=\\\"functionCategories\\\"\\r\\n [operators]=\\\"operators\\\"\\r\\n [labels]=\\\"toolbarLabels\\\"\\r\\n (onBlockInsert)=\\\"onBlockInsert($event)\\\"\\r\\n />\\r\\n <!-- Formula Editor -->\\r\\n <mt-formula-editor\\r\\n #editor\\r\\n [placeholder]=\\\"t('build-condition-formula')\\\"\\r\\n [formControl]=\\\"formulaControl\\\"\\r\\n />\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n />\\r\\n <mt-button\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n />\\r\\n </div>\\r\\n</ng-container>\\r\\n\",\"import {\\r\\n Component,\\r\\n computed,\\r\\n effect,\\r\\n inject,\\r\\n input,\\r\\n signal,\\r\\n} from '@angular/core';\\r\\nimport { TranslocoDirective, TranslocoService } from '@jsverse/transloco';\\r\\nimport { ReactiveFormsModule, FormControl } from '@angular/forms';\\r\\nimport { DynamicForm } from '@masterteam/forms/dynamic-form';\\r\\nimport {\\r\\n DynamicFormConfig,\\r\\n RadioCardsFieldConfig,\\r\\n} from '@masterteam/components';\\r\\nimport { Button } from '@masterteam/components/button';\\r\\nimport { ToggleField } from '@masterteam/components/toggle-field';\\r\\nimport { ModalService } from '@masterteam/components/modal';\\r\\nimport { ModalRef } from '@masterteam/components/dialog';\\r\\nimport { ConfirmationService } from '@masterteam/components/confirmation';\\r\\nimport type {\\r\\n EnrichedFormField,\\r\\n EnrichedFormSection,\\r\\n FieldWidth,\\r\\n} from '../../store/form-builder/form-builder.model';\\r\\nimport { FormBuilderFacade } from '../../store/form-builder';\\r\\nimport {\\r\\n FBFieldConditions,\\r\\n ConditionFieldProperty,\\r\\n} from '../fb-field-conditions/fb-field-conditions';\\r\\n\\r\\n@Component({\\r\\n selector: 'mt-fb-field-form',\\r\\n standalone: true,\\r\\n imports: [\\r\\n TranslocoDirective,\\r\\n ReactiveFormsModule,\\r\\n DynamicForm,\\r\\n Button,\\r\\n ToggleField,\\r\\n ],\\r\\n templateUrl: './fb-field-form.html',\\r\\n})\\r\\nexport class FBFieldForm {\\r\\n private readonly transloco = inject(TranslocoService);\\r\\n protected readonly modalService = inject(ModalService);\\r\\n private readonly ref = inject(ModalRef);\\r\\n private readonly confirmationService = inject(ConfirmationService);\\r\\n private readonly facade = inject(FormBuilderFacade);\\r\\n\\r\\n // Inputs\\r\\n readonly sectionId = input<string>('');\\r\\n readonly initialData = input<EnrichedFormField | null>(null);\\r\\n /** All sections with enriched fields (to get available fields for conditions) */\\r\\n readonly allSections = input<EnrichedFormSection[]>([]);\\r\\n\\r\\n // UI State\\r\\n readonly submitting = signal(false);\\r\\n readonly deleting = signal(false);\\r\\n readonly conditionalDisplayFormula = signal<string>('');\\r\\n private conditionsDialogRef: any;\\r\\n\\r\\n /**\\r\\n * Compute available fields for condition formula\\r\\n * Excludes the current field being edited\\r\\n */\\r\\n readonly availableFields = computed<ConditionFieldProperty[]>(() => {\\r\\n const sections = this.allSections();\\r\\n const currentField = this.initialData();\\r\\n const fields: ConditionFieldProperty[] = [];\\r\\n\\r\\n for (const section of sections) {\\r\\n for (const field of section.fields) {\\r\\n // Exclude the current field being edited\\r\\n if (currentField && field.id === currentField.id) continue;\\r\\n\\r\\n fields.push({\\r\\n key: field.name,\\r\\n name: field.name,\\r\\n type: field.type,\\r\\n });\\r\\n }\\r\\n }\\r\\n\\r\\n return fields;\\r\\n });\\r\\n\\r\\n // Form\\r\\n readonly formControl = new FormControl();\\r\\n readonly showHideControl = new FormControl(false);\\r\\n readonly formConfig: DynamicFormConfig = {\\r\\n sections: [\\r\\n {\\r\\n key: 'section-form',\\r\\n type: 'none',\\r\\n columns: 12,\\r\\n order: 1,\\r\\n fields: [\\r\\n {\\r\\n key: 'isRequired',\\r\\n label: this.transloco.translate('formBuilder.is-required'),\\r\\n type: 'toggle',\\r\\n toggleShape: 'card',\\r\\n colSpan: 12,\\r\\n order: 1,\\r\\n },\\r\\n {\\r\\n key: 'hiddenInCreation',\\r\\n label: this.transloco.translate('formBuilder.hidden-in-creation'),\\r\\n type: 'toggle',\\r\\n toggleShape: 'card',\\r\\n colSpan: 12,\\r\\n order: 2,\\r\\n },\\r\\n {\\r\\n key: 'hiddenInEditForm',\\r\\n label: this.transloco.translate('formBuilder.hidden-in-edit-form'),\\r\\n type: 'toggle',\\r\\n toggleShape: 'card',\\r\\n colSpan: 12,\\r\\n order: 3,\\r\\n },\\r\\n new RadioCardsFieldConfig({\\r\\n key: 'size',\\r\\n label: this.transloco.translate('formBuilder.size'),\\r\\n placeholder: this.transloco.translate('formBuilder.size'),\\r\\n options: [\\r\\n { id: 's', name: 'S' },\\r\\n { id: 'm', name: 'M' },\\r\\n { id: 'l', name: 'L' },\\r\\n ],\\r\\n order: 4,\\r\\n size: 'small',\\r\\n }),\\r\\n ],\\r\\n },\\r\\n ],\\r\\n };\\r\\n\\r\\n constructor() {\\r\\n effect(() => {\\r\\n const data = this.initialData();\\r\\n if (data) {\\r\\n const widthToSize: Record<string, string> = {\\r\\n '25': 's',\\r\\n '50': 'm',\\r\\n '100': 'l',\\r\\n };\\r\\n this.formControl.patchValue({\\r\\n isRequired: data.isRequired ?? false,\\r\\n hiddenInCreation: data.hiddenInCreation ?? false,\\r\\n hiddenInEditForm: data.hiddenInEditForm ?? false,\\r\\n size: widthToSize[data.width] ?? 'l',\\r\\n });\\r\\n // Set show/hide toggle based on existing value\\r\\n this.showHideControl.patchValue(\\r\\n data.showConditionalDisplayFormula ?? false,\\r\\n );\\r\\n this.conditionalDisplayFormula.set(\\r\\n data.conditionalDisplayFormula ?? '',\\r\\n );\\r\\n }\\r\\n });\\r\\n }\\r\\n\\r\\n onSave(): void {\\r\\n if (this.formControl.invalid) return;\\r\\n\\r\\n const formValue = this.formControl.value;\\r\\n const field = this.initialData();\\r\\n const sectionId = this.sectionId();\\r\\n\\r\\n if (!field || !sectionId) return;\\r\\n\\r\\n const widthMap: Record<string, FieldWidth> = {\\r\\n s: '25',\\r\\n m: '50',\\r\\n l: '100',\\r\\n };\\r\\n\\r\\n const payload = {\\r\\n width: widthMap[formValue.size] ?? '100',\\r\\n hiddenInCreation: formValue.hiddenInCreation ?? false,\\r\\n hiddenInEditForm: formValue.hiddenInEditForm ?? false,\\r\\n isRequired: formValue.isRequired ?? false,\\r\\n showConditionalDisplayFormula: this.showHideControl.value ?? false,\\r\\n conditionalDisplayFormula: this.showHideControl.value\\r\\n ? this.conditionalDisplayFormula()\\r\\n : null,\\r\\n };\\r\\n\\r\\n this.submitting.set(true);\\r\\n this.facade.updateField(sectionId, field.id, payload).subscribe({\\r\\n next: () => this.ref.close(true),\\r\\n error: () => this.submitting.set(false),\\r\\n });\\r\\n }\\r\\n\\r\\n onCancel(): void {\\r\\n this.ref.close(false);\\r\\n }\\r\\n\\r\\n onSetConditions(): void {\\r\\n this.conditionsDialogRef = this.modalService.openModal(\\r\\n FBFieldConditions,\\r\\n 'drawer',\\r\\n {\\r\\n header: this.transloco.translate('formBuilder.set-conditions'),\\r\\n styleClass: '!w-[calc(100%-25rem)] !absolute ',\\r\\n position: 'start',\\r\\n modal: true,\\r\\n dismissible: true,\\r\\n appendTo: '#page-content',\\r\\n inputValues: {\\r\\n initialFormula: this.conditionalDisplayFormula(),\\r\\n availableFields: this.availableFields(),\\r\\n },\\r\\n },\\r\\n );\\r\\n\\r\\n this.conditionsDialogRef.onClose.subscribe(\\r\\n (result: { saved: boolean; conditionalDisplayFormula?: string }) => {\\r\\n if (result?.saved) {\\r\\n this.conditionalDisplayFormula.set(\\r\\n result.conditionalDisplayFormula ?? '',\\r\\n );\\r\\n }\\r\\n },\\r\\n );\\r\\n }\\r\\n\\r\\n onDelete(event: Event): void {\\r\\n const field = this.initialData();\\r\\n const sectionId = this.sectionId();\\r\\n\\r\\n if (!field || !sectionId) return;\\r\\n\\r\\n this.confirmationService.confirmDelete({\\r\\n event,\\r\\n type: 'popup',\\r\\n accept: () => {\\r\\n this.deleting.set(true);\\r\\n this.facade.deleteField(sectionId, field.id).subscribe({\\r\\n next: () => this.ref.close(true),\\r\\n error: () => this.deleting.set(false),\\r\\n });\\r\\n },\\r\\n });\\r\\n }\\r\\n}\\r\\n\",\"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10 flex flex-col gap-4\\\">\\r\\n <mt-dynamic-form [formConfig]=\\\"formConfig\\\" [formControl]=\\\"formControl\\\">\\r\\n </mt-dynamic-form>\\r\\n\\r\\n <!-- Show/Hide Toggle with Set Conditions -->\\r\\n <mt-toggle-field\\r\\n toggleShape=\\\"card\\\"\\r\\n [label]=\\\"t('show-hide')\\\"\\r\\n [descriptionCard]=\\\"t('show-hide-description')\\\"\\r\\n icon=\\\"general.eye\\\"\\r\\n [formControl]=\\\"showHideControl\\\"\\r\\n >\\r\\n <ng-template #toggleCardBottom>\\r\\n @if (showHideControl.value) {\\r\\n <div class=\\\"mt-3\\\">\\r\\n <mt-button\\r\\n [label]=\\\"t('set-conditions')\\\"\\r\\n size=\\\"small\\\"\\r\\n (onClick)=\\\"onSetConditions()\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n }\\r\\n </ng-template>\\r\\n </mt-toggle-field>\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n @if (initialData()) {\\r\\n <mt-button\\r\\n [tooltip]=\\\"t('delete')\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n icon=\\\"general.trash-01\\\"\\r\\n [loading]=\\\"deleting()\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onDelete($event)\\\"\\r\\n class=\\\"me-auto\\\"\\r\\n ></mt-button>\\r\\n }\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting() || deleting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n <mt-button\\r\\n [disabled]=\\\"!formControl.valid || deleting()\\\"\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n </div>\\r\\n</ng-container>\\r\\n\",\"import { Component, effect, inject, input, signal } from '@angular/core';\\r\\nimport { TranslocoDirective, TranslocoService } from '@jsverse/transloco';\\r\\nimport { ReactiveFormsModule, FormControl } from '@angular/forms';\\r\\nimport { DynamicForm } from '@masterteam/forms/dynamic-form';\\r\\nimport { DynamicFormConfig } from '@masterteam/components';\\r\\nimport { Button } from '@masterteam/components/button';\\r\\nimport { ModalService } from '@masterteam/components/modal';\\r\\nimport { ModalRef } from '@masterteam/components/dialog';\\r\\nimport { ConfirmationService } from '@masterteam/components/confirmation';\\r\\nimport { FormBuilderFacade } from '../../store/form-builder';\\r\\n\\r\\n@Component({\\r\\n selector: 'mt-fb-section-form',\\r\\n standalone: true,\\r\\n imports: [TranslocoDirective, ReactiveFormsModule, DynamicForm, Button],\\r\\n templateUrl: './fb-section-form.html',\\r\\n})\\r\\nexport class FBSectionForm {\\r\\n private readonly transloco = inject(TranslocoService);\\r\\n protected readonly modalService = inject(ModalService);\\r\\n private readonly ref = inject(ModalRef);\\r\\n private readonly confirmationService = inject(ConfirmationService);\\r\\n private readonly facade = inject(FormBuilderFacade);\\r\\n\\r\\n // Inputs\\r\\n readonly sectionId = input<string | null>(null);\\r\\n readonly initialData = input<{ ar: string; en: string } | null>(null);\\r\\n readonly sectionsCount = input<number>(0);\\r\\n\\r\\n // UI State\\r\\n readonly submitting = signal(false);\\r\\n readonly deleting = signal(false);\\r\\n\\r\\n // Form\\r\\n readonly formControl = new FormControl();\\r\\n readonly formConfig: DynamicFormConfig = {\\r\\n sections: [\\r\\n {\\r\\n key: 'section-form',\\r\\n type: 'none',\\r\\n columns: 12,\\r\\n order: 1,\\r\\n fields: [\\r\\n {\\r\\n key: 'name-ar',\\r\\n label: this.transloco.translate('formBuilder.name-ar'),\\r\\n type: 'text',\\r\\n placeholder: this.transloco.translate('formBuilder.name-ar'),\\r\\n colSpan: 12,\\r\\n order: 1,\\r\\n },\\r\\n {\\r\\n key: 'name-en',\\r\\n label: this.transloco.translate('formBuilder.name-en'),\\r\\n type: 'text',\\r\\n placeholder: this.transloco.translate('formBuilder.name-en'),\\r\\n colSpan: 12,\\r\\n order: 2,\\r\\n },\\r\\n ],\\r\\n },\\r\\n ],\\r\\n };\\r\\n\\r\\n constructor() {\\r\\n effect(() => {\\r\\n const data = this.initialData();\\r\\n if (data) {\\r\\n this.formControl.patchValue({\\r\\n 'name-ar': data.ar,\\r\\n 'name-en': data.en,\\r\\n });\\r\\n }\\r\\n });\\r\\n }\\r\\n\\r\\n onSave(): void {\\r\\n if (this.formControl.invalid) return;\\r\\n\\r\\n const formValue = this.formControl.value;\\r\\n const payload = {\\r\\n name: {\\r\\n ar: formValue['name-ar'],\\r\\n en: formValue['name-en'],\\r\\n },\\r\\n };\\r\\n\\r\\n this.submitting.set(true);\\r\\n const sectionId = this.sectionId();\\r\\n\\r\\n if (sectionId) {\\r\\n // Update existing section\\r\\n this.facade.updateSection(sectionId, payload).subscribe({\\r\\n next: () => this.ref.close(true),\\r\\n error: () => this.submitting.set(false),\\r\\n });\\r\\n } else {\\r\\n // Create new section\\r\\n this.facade\\r\\n .addSection({ ...payload, order: this.sectionsCount() })\\r\\n .subscribe({\\r\\n next: () => this.ref.close(true),\\r\\n error: () => this.submitting.set(false),\\r\\n });\\r\\n }\\r\\n }\\r\\n\\r\\n onCancel(): void {\\r\\n this.ref.close(false);\\r\\n }\\r\\n\\r\\n onDelete(event: Event): void {\\r\\n const sectionId = this.sectionId();\\r\\n if (!sectionId) return;\\r\\n\\r\\n this.confirmationService.confirmDelete({\\r\\n event,\\r\\n type: 'popup',\\r\\n accept: () => {\\r\\n this.deleting.set(true);\\r\\n this.facade.deleteSection(sectionId).subscribe({\\r\\n next: () => this.ref.close(true),\\r\\n error: () => this.deleting.set(false),\\r\\n });\\r\\n },\\r\\n });\\r\\n }\\r\\n}\\r\\n\",\"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <div class=\\\"mt-4 h-full overflow-y-auto pb-10\\\">\\r\\n <mt-dynamic-form [formConfig]=\\\"formConfig\\\" [formControl]=\\\"formControl\\\">\\r\\n </mt-dynamic-form>\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div [class]=\\\"modalService.footerClass\\\">\\r\\n @if (sectionId()) {\\r\\n <mt-button\\r\\n [tooltip]=\\\"t('delete')\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n icon=\\\"general.trash-01\\\"\\r\\n [loading]=\\\"deleting()\\\"\\r\\n [disabled]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onDelete($event)\\\"\\r\\n class=\\\"me-auto\\\"\\r\\n ></mt-button>\\r\\n }\\r\\n <mt-button\\r\\n [label]=\\\"t('cancel')\\\"\\r\\n severity=\\\"secondary\\\"\\r\\n [disabled]=\\\"submitting() || deleting()\\\"\\r\\n (onClick)=\\\"onCancel()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n <mt-button\\r\\n [disabled]=\\\"!formControl.valid || deleting()\\\"\\r\\n [label]=\\\"t('save')\\\"\\r\\n severity=\\\"primary\\\"\\r\\n [loading]=\\\"submitting()\\\"\\r\\n (onClick)=\\\"onSave()\\\"\\r\\n >\\r\\n </mt-button>\\r\\n </div>\\r\\n</ng-container>\\r\\n\",\"import {\\r\\n Component,\\r\\n computed,\\r\\n inject,\\r\\n input,\\r\\n output,\\r\\n signal,\\r\\n effect,\\r\\n} from '@angular/core';\\r\\nimport type {\\r\\n EnrichedFormField,\\r\\n EnrichedFormSection,\\r\\n} from '../../store/form-builder/form-builder.model';\\r\\nimport { ConfirmationService } from '@masterteam/components/confirmation';\\r\\nimport { ModalService } from '@masterteam/components/modal';\\r\\nimport { TranslocoService } from '@jsverse/transloco';\\r\\nimport { Button } from '@masterteam/components/button';\\r\\nimport { Card } from '@masterteam/components/card';\\r\\nimport {\\r\\n CdkDrag,\\r\\n CdkDragDrop,\\r\\n CdkDragPlaceholder,\\r\\n CdkDropList,\\r\\n} from '@angular/cdk/drag-drop';\\r\\nimport { TranslocoDirective } from '@jsverse/transloco';\\r\\nimport { DynamicField } from '@masterteam/forms/dynamic-field';\\r\\nimport { ReactiveFormsModule, FormGroup, FormControl } from '@angular/forms';\\r\\nimport { Icon } from '@masterteam/icons';\\r\\nimport { FormBuilderFacade } from '../../store/form-builder';\\r\\nimport { FBFieldForm } from '../fb-field-form/fb-field-form';\\r\\nimport { FBSectionForm } from '../fb-section-form/fb-section-form';\\r\\n\\r\\n@Component({\\r\\n selector: 'mt-fb-section',\\r\\n standalone: true,\\r\\n imports: [\\r\\n Button,\\r\\n Card,\\r\\n Icon,\\r\\n CdkDrag,\\r\\n CdkDropList,\\r\\n CdkDragPlaceholder,\\r\\n TranslocoDirective,\\r\\n DynamicField,\\r\\n ReactiveFormsModule,\\r\\n ],\\r\\n templateUrl: './fb-section.html',\\r\\n})\\r\\nexport class FBSection {\\r\\n private readonly confirmationService = inject(ConfirmationService);\\r\\n private readonly modalService = inject(ModalService);\\r\\n private readonly translocoService = inject(TranslocoService);\\r\\n private readonly facade = inject(FormBuilderFacade);\\r\\n\\r\\n // Inputs\\r\\n readonly section = input.required<EnrichedFormSection>();\\r\\n readonly sectionsCount = input<number>(0);\\r\\n /** All sections - used to get available fields for condition formulas */\\r\\n readonly allSections = input<EnrichedFormSection[]>([]);\\r\\n\\r\\n // Outputs - only keep drag/drop since it needs coordination with parent drop list group\\r\\n readonly onFieldDrop = output<CdkDragDrop<EnrichedFormField[]>>();\\r\\n\\r\\n // Computed\\r\\n readonly sectionName = computed(() => {\\r\\n const lang = document.documentElement.lang as 'en' | 'ar';\\r\\n const section = this.section();\\r\\n return section.name[lang] ?? section.name['en'];\\r\\n });\\r\\n\\r\\n readonly fields = computed(() => this.section().fields);\\r\\n\\r\\n // UI State\\r\\n readonly expanded = signal(true);\\r\\n\\r\\n // Form groups cache for dynamic fields\\r\\n private readonly formGroupsCache = new Map<string, FormGroup>();\\r\\n\\r\\n constructor() {\\r\\n // Cleanup stale form groups when fields change\\r\\n effect(() => {\\r\\n const currentIds = new Set(this.fields().map((f) => f.id));\\r\\n for (const id of this.formGroupsCache.keys()) {\\r\\n if (!currentIds.has(id)) {\\r\\n this.formGroupsCache.delete(id);\\r\\n }\\r\\n }\\r\\n });\\r\\n }\\r\\n\\r\\n getFormGroup(field: EnrichedFormField): FormGroup {\\r\\n let fg = this.formGroupsCache.get(field.id);\\r\\n\\r\\n if (fg) {\\r\\n // Check if field name changed\\r\\n if (!fg.contains(field.name)) {\\r\\n const oldKey = Object.keys(fg.controls)[0];\\r\\n const value = oldKey ? fg.get(oldKey)?.value : field.data?.data;\\r\\n\\r\\n fg = new FormGroup({\\r\\n [field.name]: new FormControl(value),\\r\\n });\\r\\n this.formGroupsCache.set(field.id, fg);\\r\\n }\\r\\n } else {\\r\\n fg = new FormGroup({\\r\\n [field.name]: new FormControl(field.data?.data),\\r\\n });\\r\\n this.formGroupsCache.set(field.id, fg);\\r\\n }\\r\\n\\r\\n return fg;\\r\\n }\\r\\n\\r\\n toggleExpanded(): void {\\r\\n this.expanded.update((v) => !v);\\r\\n }\\r\\n\\r\\n onDrop(event: CdkDragDrop<EnrichedFormField[]>): void {\\r\\n this.onFieldDrop.emit(event);\\r\\n }\\r\\n\\r\\n editSection(event: Event): void {\\r\\n event.stopPropagation();\\r\\n const section = this.section();\\r\\n\\r\\n this.modalService.openModal(FBSectionForm, 'drawer', {\\r\\n header: this.translocoService.translate('formBuilder.edit-section'),\\r\\n height: '20vw',\\r\\n styleClass: '!w-100 !absolute ',\\r\\n position: 'end',\\r\\n appendTo: '#page-content',\\r\\n modal: true,\\r\\n dismissible: true,\\r\\n\\r\\n inputValues: {\\r\\n sectionId: section.id,\\r\\n initialData: section.name,\\r\\n sectionsCount: this.sectionsCount(),\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n removeField(event: Event, field: EnrichedFormField): void {\\r\\n this.confirmationService.confirmDelete({\\r\\n event,\\r\\n type: 'popup',\\r\\n accept: () => {\\r\\n this.facade.deleteField(this.section().id, field.id);\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n editField(field: EnrichedFormField): void {\\r\\n this.modalService.openModal(FBFieldForm, 'drawer', {\\r\\n header: this.translocoService.translate('formBuilder.field-settings'),\\r\\n height: '20vw',\\r\\n styleClass: '!w-100 !absolute !shadow-none',\\r\\n position: 'end',\\r\\n modal: true,\\r\\n dismissible: true,\\r\\n\\r\\n appendTo: '#page-content',\\r\\n inputValues: {\\r\\n initialData: field,\\r\\n sectionId: this.section().id,\\r\\n allSections: this.allSections(),\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n getFieldColSpan(field: EnrichedFormField): string {\\r\\n switch (field.width) {\\r\\n case '100':\\r\\n return 'col-span-12';\\r\\n case '50':\\r\\n return 'col-span-6';\\r\\n case '25':\\r\\n return 'col-span-3';\\r\\n default:\\r\\n return 'col-span-12';\\r\\n }\\r\\n }\\r\\n\\r\\n getFieldType(field: EnrichedFormField): string {\\r\\n const typeMap: Record<string, string> = {\\r\\n User: 'select',\\r\\n Text: 'text',\\r\\n LongText: 'editor-field',\\r\\n Percentage: 'slider',\\r\\n Date: 'date',\\r\\n Currency: 'text',\\r\\n Number: 'number',\\r\\n Lookup: 'select',\\r\\n LookupMultiSelect: 'select',\\r\\n Checkbox: 'toggle',\\r\\n InternalModule: 'select',\\r\\n DynamicList: 'select',\\r\\n API: 'select',\\r\\n Time: 'date',\\r\\n Status: 'select',\\r\\n Attachment: 'attachment',\\r\\n EditableListView: 'actionableTable',\\r\\n LookupLog: 'actionableTable',\\r\\n LookupMatrix: 'select',\\r\\n Location: 'select',\\r\\n };\\r\\n\\r\\n return typeMap[field.type] ?? 'text';\\r\\n }\\r\\n}\\r\\n\",\"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div class=\\\"flex flex-col\\\">\\r\\n <div\\r\\n class=\\\"flex justify-between items-center bg-primary text-primary-contrast p-2 rounded-xl\\\"\\r\\n >\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"arrow.chevron-down\\\"\\r\\n class=\\\"transition-[rotate]\\\"\\r\\n [class.rotate-180]=\\\"expanded()\\\"\\r\\n (onClick)=\\\"toggleExpanded()\\\"\\r\\n ></mt-button>\\r\\n <span class=\\\"font-bold\\\">\\r\\n {{ sectionName() }}\\r\\n </span>\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.edit-02\\\"\\r\\n [tooltip]=\\\"t('edit-section')\\\"\\r\\n (onClick)=\\\"editSection($event)\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </div>\\r\\n @if (expanded()) {\\r\\n <div\\r\\n cdkDropList\\r\\n [id]=\\\"section().id\\\"\\r\\n cdkDropListOrientation=\\\"mixed\\\"\\r\\n [cdkDropListData]=\\\"fields()\\\"\\r\\n (cdkDropListDropped)=\\\"onDrop($event)\\\"\\r\\n class=\\\"grid grid-cols-12 gap-4 relative py-4\\\"\\r\\n [class.min-h-27]=\\\"fields().length === 0\\\"\\r\\n >\\r\\n @for (field of fields(); track field.id) {\\r\\n <div\\r\\n cdkDrag\\r\\n [cdkDragData]=\\\"field\\\"\\r\\n [cdkDragDisabled]=\\\"field._pending || field._deleting\\\"\\r\\n [class]=\\\"\\r\\n getFieldColSpan(field) + ' cursor-grab active:cursor-grabbing'\\r\\n \\\"\\r\\n >\\r\\n <div\\r\\n *cdkDragPlaceholder\\r\\n [class]=\\\"\\r\\n 'h-full min-h-27 bg-black/10 rounded-2xl ' +\\r\\n getFieldColSpan(field)\\r\\n \\\"\\r\\n ></div>\\r\\n @if (field._pending) {\\r\\n <!-- Skeleton for pending field -->\\r\\n <mt-card class=\\\"h-full animate-pulse\\\">\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <div class=\\\"flex-1 space-y-3\\\">\\r\\n <div class=\\\"h-4 bg-surface-200 rounded w-1/3\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"flex flex-col gap-1\\\">\\r\\n <div class=\\\"h-8 w-8 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-8 w-8 bg-surface-200 rounded\\\"></div>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n } @else {\\r\\n <mt-card\\r\\n class=\\\"h-full relative\\\"\\r\\n [class.opacity-50]=\\\"field._deleting\\\"\\r\\n >\\r\\n @if (field._deleting) {\\r\\n <div\\r\\n class=\\\"absolute inset-0 flex items-center justify-center bg-white/50 rounded-xl z-10\\\"\\r\\n >\\r\\n <div\\r\\n class=\\\"animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full\\\"\\r\\n ></div>\\r\\n </div>\\r\\n }\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <div class=\\\"flex-1\\\">\\r\\n <form [formGroup]=\\\"getFormGroup(field)\\\">\\r\\n <mt-dynamic-field\\r\\n [fieldName]=\\\"field.name\\\"\\r\\n [fieldConfig]=\\\"{\\r\\n label: field.name,\\r\\n readonly: true,\\r\\n type: getFieldType(field),\\r\\n }\\\"\\r\\n />\\r\\n </form>\\r\\n </div>\\r\\n <div class=\\\"flex flex-col gap-1\\\">\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.settings-01\\\"\\r\\n [tooltip]=\\\"t('edit-field')\\\"\\r\\n outlined\\r\\n [disabled]=\\\"field._deleting\\\"\\r\\n (onClick)=\\\"editField(field)\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n size=\\\"small\\\"\\r\\n icon=\\\"general.trash-01\\\"\\r\\n severity=\\\"danger\\\"\\r\\n outlined\\r\\n [tooltip]=\\\"t('remove-field')\\\"\\r\\n [disabled]=\\\"field._deleting\\\"\\r\\n (onClick)=\\\"removeField($event, field)\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n } @empty {\\r\\n <mt-card class=\\\"absolute inset-0 top-4 h-full\\\" paddingless>\\r\\n <div class=\\\"size-full p-4\\\">\\r\\n <div\\r\\n class=\\\"flex justify-center items-center gap-4 h-full border-2 border-primary rounded-xl bg-primary-200 text-primary\\\"\\r\\n >\\r\\n <mt-icon icon=\\\"editor.move\\\" class=\\\"text-3xl\\\" />\\r\\n <span>{{ t(\\\"drag-from-the-side\\\") }}</span>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n</ng-container>\\r\\n\",\"import {\\r\\n Component,\\r\\n computed,\\r\\n effect,\\r\\n inject,\\r\\n input,\\r\\n signal,\\r\\n} from '@angular/core';\\r\\nimport { TranslocoDirective, TranslocoService } from '@jsverse/transloco';\\r\\nimport { ReactiveFormsModule, FormControl } from '@angular/forms';\\r\\nimport { DynamicForm } from '@masterteam/forms/dynamic-form';\\r\\nimport { DynamicFormConfig, DynamicFieldConfig } from '@masterteam/components';\\r\\nimport { Tabs } from '@masterteam/components/tabs';\\r\\nimport { ModalService } from '@masterteam/components/modal';\\r\\nimport { ModalRef } from '@masterteam/components/dialog';\\r\\nimport type { EnrichedFormSection } from '../../store/form-builder/form-builder.model';\\r\\n\\r\\ntype PreviewMode = 'create' | 'edit';\\r\\n\\r\\n@Component({\\r\\n selector: 'mt-fb-preview-form',\\r\\n standalone: true,\\r\\n imports: [TranslocoDirective, ReactiveFormsModule, DynamicForm, Tabs],\\r\\n templateUrl: './fb-preview-form.html',\\r\\n})\\r\\nexport class FBPreviewForm {\\r\\n protected readonly modalService = inject(ModalService);\\r\\n private readonly ref = inject(ModalRef);\\r\\n private readonly transloco = inject(TranslocoService);\\r\\n\\r\\n // Inputs\\r\\n readonly sections = input<EnrichedFormSection[]>([]);\\r\\n\\r\\n // Tab state\\r\\n readonly activeTab = signal<PreviewMode>('create');\\r\\n readonly isLoading = signal(false);\\r\\n readonly tabOptions = [\\r\\n {\\r\\n label: this.transloco.translate('formBuilder.create-form'),\\r\\n value: 'create',\\r\\n },\\r\\n { label: this.transloco.translate('formBuilder.edit-form'), value: 'edit' },\\r\\n ];\\r\\n\\r\\n // Form control for dynamic form\\r\\n readonly formControl = new FormControl();\\r\\n\\r\\n constructor() {\\r\\n // Show skeleton briefly when tab changes to force rebuild\\r\\n effect(() => {\\r\\n this.activeTab(); // Track tab changes\\r\\n this.isLoading.set(true);\\r\\n setTimeout(() => this.isLoading.set(false), 50);\\r\\n });\\r\\n }\\r\\n\\r\\n // Convert enriched sections to DynamicFormConfig based on active tab\\r\\n readonly formConfig = computed<DynamicFormConfig>(() => {\\r\\n const sections = this.sections();\\r\\n const mode = this.activeTab();\\r\\n\\r\\n return {\\r\\n sections: sections\\r\\n .map((section, sectionIndex) => {\\r\\n const lang = document.documentElement.lang as 'en' | 'ar';\\r\\n const sectionName = section.name[lang] ?? section.name['en'] ?? '';\\r\\n\\r\\n // Filter fields based on mode\\r\\n const visibleFields = section.fields.filter((field) => {\\r\\n if (mode === 'create') {\\r\\n return !field.hiddenInCreation;\\r\\n } else {\\r\\n return !field.hiddenInEditForm;\\r\\n }\\r\\n });\\r\\n\\r\\n return {\\r\\n key: section.id,\\r\\n label: sectionName,\\r\\n type: 'header' as const,\\r\\n columns: 12,\\r\\n order: section.order ?? sectionIndex,\\r\\n fields: visibleFields.map((field, fieldIndex) => {\\r\\n const colSpan = this.getColSpan(field.width);\\r\\n\\r\\n return {\\r\\n key: `field_${field.propertyId}`,\\r\\n label: field.name,\\r\\n type: this.mapFieldType(field.type),\\r\\n colSpan,\\r\\n order: field.order ?? fieldIndex,\\r\\n placeholder: field.name,\\r\\n } as DynamicFieldConfig;\\r\\n }),\\r\\n };\\r\\n })\\r\\n .filter((section) => section.fields.length > 0), // Hide empty sections\\r\\n };\\r\\n });\\r\\n\\r\\n /**\\r\\n * Map property view type to dynamic form field type\\r\\n */\\r\\n private mapFieldType(viewType: string): string {\\r\\n const typeMap: Record<string, string> = {\\r\\n User: 'select',\\r\\n Text: 'text',\\r\\n LongText: 'editor-field',\\r\\n Percentage: 'slider',\\r\\n Date: 'date',\\r\\n Currency: 'text',\\r\\n Number: 'number',\\r\\n Lookup: 'select',\\r\\n LookupMultiSelect: 'select',\\r\\n Checkbox: 'toggle',\\r\\n InternalModule: 'select',\\r\\n DynamicList: 'select',\\r\\n API: 'select',\\r\\n Time: 'date',\\r\\n Status: 'select',\\r\\n Attachment: 'attachment',\\r\\n EditableListView: 'actionableTable',\\r\\n LookupLog: 'actionableTable',\\r\\n LookupMatrix: 'select',\\r\\n Location: 'select',\\r\\n };\\r\\n\\r\\n return typeMap[viewType] ?? 'text';\\r\\n }\\r\\n\\r\\n /**\\r\\n * Convert field width to colSpan\\r\\n */\\r\\n private getColSpan(width: string): number {\\r\\n const widthMap: Record<string, number> = {\\r\\n '25': 3,\\r\\n '50': 6,\\r\\n '100': 12,\\r\\n };\\r\\n\\r\\n return widthMap[width] ?? 12;\\r\\n }\\r\\n\\r\\n onClose(): void {\\r\\n this.ref.close();\\r\\n }\\r\\n}\\r\\n\",\"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div [class]=\\\"[modalService.contentClass, 'p-4', 'overflow-y-hidden!']\\\">\\r\\n <!-- Tabs for Create/Edit mode -->\\r\\n <div class=\\\"flex justify-center mb-4\\\">\\r\\n <mt-tabs [options]=\\\"tabOptions\\\" [(active)]=\\\"activeTab\\\"></mt-tabs>\\r\\n </div>\\r\\n\\r\\n <div class=\\\"h-full overflow-y-auto pb-10\\\">\\r\\n @if (isLoading()) {\\r\\n <div class=\\\"space-y-4 animate-pulse\\\">\\r\\n <div class=\\\"h-6 bg-surface-200 rounded w-1/3\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded\\\"></div>\\r\\n <div class=\\\"h-10 bg-surface-200 rounded w-2/3\\\"></div>\\r\\n </div>\\r\\n } @else if (formConfig().sections.length > 0) {\\r\\n <mt-dynamic-form\\r\\n [formConfig]=\\\"formConfig()\\\"\\r\\n [formControl]=\\\"formControl\\\"\\r\\n >\\r\\n </mt-dynamic-form>\\r\\n } @else {\\r\\n <div\\r\\n class=\\\"flex justify-center items-center h-64 text-muted-color text-lg\\\"\\r\\n >\\r\\n {{ t(\\\"no-fields-visible\\\") }}\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n</ng-container>\\r\\n\",\"import { Component, computed, inject, signal, effect } from '@angular/core';\\r\\nimport { CommonModule } from '@angular/common';\\r\\nimport { FormsModule } from '@angular/forms';\\r\\nimport { TabsModule } from 'primeng/tabs';\\r\\nimport { SkeletonModule } from 'primeng/skeleton';\\r\\nimport { Button } from '@masterteam/components/button';\\r\\nimport { Card } from '@masterteam/components/card';\\r\\nimport { ModalService } from '@masterteam/components/modal';\\r\\nimport { ConfirmationService } from '@masterteam/components/confirmation';\\r\\nimport { TranslocoDirective, TranslocoService } from '@jsverse/transloco';\\r\\nimport { FBSection } from './fb-section/fb-section';\\r\\nimport type {\\r\\n EnrichedFormSection,\\r\\n EnrichedFormField,\\r\\n FieldWidth,\\r\\n PropertyItem,\\r\\n} from '../store/form-builder/form-builder.model';\\r\\nimport { CdkDragDrop, DragDropModule } from '@angular/cdk/drag-drop';\\r\\nimport { FBSectionForm } from './fb-section-form/fb-section-form';\\r\\nimport { FBPreviewForm } from './fb-preview-form/fb-preview-form';\\r\\nimport { FormBuilderFacade } from '../store/form-builder/form-builder.facade';\\r\\n\\r\\n@Component({\\r\\n selector: 'mt-form-builder',\\r\\n standalone: true,\\r\\n imports: [\\r\\n CommonModule,\\r\\n FormsModule,\\r\\n TabsModule,\\r\\n SkeletonModule,\\r\\n Button,\\r\\n Card,\\r\\n TranslocoDirective,\\r\\n FBSection,\\r\\n DragDropModule,\\r\\n ],\\r\\n templateUrl: './form-builder.html',\\r\\n styleUrl: './form-builder.scss',\\r\\n})\\r\\nexport class FormBuilder {\\r\\n private readonly modalService = inject(ModalService);\\r\\n private readonly confirmationService = inject(ConfirmationService);\\r\\n private readonly translocoService = inject(TranslocoService);\\r\\n protected readonly facade = inject(FormBuilderFacade);\\r\\n\\r\\n private dialogRef: any;\\r\\n\\r\\n // Local UI state\\r\\n readonly activeTab = signal<string>('system');\\r\\n\\r\\n // State from facade\\r\\n readonly sections = this.facade.sections;\\r\\n readonly properties = this.facade.properties;\\r\\n readonly isLoading = this.facade.isLoadingFormConfiguration;\\r\\n readonly error = this.facade.formConfigurationError;\\r\\n\\r\\n // Properties map for enrichment\\r\\n private readonly propertiesMap = computed(() => {\\r\\n const map = new Map<number, PropertyItem>();\\r\\n for (const prop of this.properties()) {\\r\\n map.set(prop.id, prop);\\r\\n }\\r\\n return map;\\r\\n });\\r\\n\\r\\n // Enrich sections with property data for UI display\\r\\n readonly enrichedSections = computed<EnrichedFormSection[]>(() => {\\r\\n const sections = this.sections();\\r\\n const propsMap = this.propertiesMap();\\r\\n const lang = document.documentElement.lang as 'en' | 'ar';\\r\\n\\r\\n return sections.map((section) => ({\\r\\n ...section,\\r\\n fields: section.fields.map((field): EnrichedFormField => {\\r\\n const prop = propsMap.get(field.propertyId);\\r\\n const propName = prop?.name;\\r\\n const name =\\r\\n typeof propName === 'string'\\r\\n ? propName\\r\\n : (propName?.[lang] ??\\r\\n propName?.['en'] ??\\r\\n `Property ${field.propertyId}`);\\r\\n\\r\\n return {\\r\\n ...field,\\r\\n name,\\r\\n type: prop?.viewType || 'text',\\r\\n data: prop,\\r\\n };\\r\\n }),\\r\\n }));\\r\\n });\\r\\n\\r\\n // Available properties for toolbox tabs\\r\\n readonly availableTabs = computed(() => {\\r\\n const tabs: Array<{\\r\\n id: string;\\r\\n title: string;\\r\\n properties: PropertyItem[];\\r\\n }> = [];\\r\\n const usedPropertyIds = new Set(\\r\\n this.sections().flatMap((s) => s.fields.map((f) => f.propertyId)),\\r\\n );\\r\\n\\r\\n const availableProps = this.properties().filter(\\r\\n (p) => !usedPropertyIds.has(p.id),\\r\\n );\\r\\n\\r\\n const systemProps = availableProps.filter((p) => p['isSystem']);\\r\\n const customProps = availableProps.filter((p) => !p['isSystem']);\\r\\n\\r\\n if (systemProps.length > 0) {\\r\\n tabs.push({ id: 'system', title: 'System', properties: systemProps });\\r\\n }\\r\\n if (customProps.length > 0) {\\r\\n tabs.push({ id: 'custom', title: 'Custom', properties: customProps });\\r\\n }\\r\\n\\r\\n return tabs;\\r\\n });\\r\\n\\r\\n constructor() {\\r\\n // Update active tab when tabs change\\r\\n effect(() => {\\r\\n const tabs = this.availableTabs();\\r\\n const currentTab = this.activeTab();\\r\\n if (tabs.length > 0 && !tabs.some((t) => t.id === currentTab)) {\\r\\n this.activeTab.set(tabs[0].id);\\r\\n }\\r\\n });\\r\\n }\\r\\n\\r\\n drop(event: CdkDragDrop<EnrichedFormField[] | PropertyItem[]>): void {\\r\\n const targetSectionId = event.container.id;\\r\\n\\r\\n if (event.previousContainer === event.container) {\\r\\n // Reordering within the same section\\r\\n const fields = [...(event.container.data as EnrichedFormField[])];\\r\\n const [movedField] = fields.splice(event.previousIndex, 1);\\r\\n fields.splice(event.currentIndex, 0, movedField);\\r\\n\\r\\n // Build bulk reorder payload with new order values\\r\\n const reorderPayload = fields.map((field, index) => ({\\r\\n id: field.id,\\r\\n order: index,\\r\\n }));\\r\\n\\r\\n this.facade.reorderFields(targetSectionId, reorderPayload);\\r\\n } else if (event.previousContainer.id.startsWith('toolbox-')) {\\r\\n // Adding from toolbox\\r\\n const propertyItem = event.item.data as PropertyItem;\\r\\n this.facade.addField(targetSectionId, {\\r\\n propertyId: propertyItem.id,\\r\\n width: '100' as FieldWidth,\\r\\n order: event.currentIndex,\\r\\n hiddenInCreation: false,\\r\\n });\\r\\n } else {\\r\\n // Moving between sections\\r\\n const sourceSectionId = event.previousContainer.id;\\r\\n const field = event.item.data as EnrichedFormField;\\r\\n this.facade.moveField(sourceSectionId, field.id, {\\r\\n targetSectionId,\\r\\n order: event.currentIndex,\\r\\n });\\r\\n }\\r\\n }\\r\\n\\r\\n addSection(): void {\\r\\n this.dialogRef = this.modalService.openModal(FBSectionForm, 'drawer', {\\r\\n header: this.translocoService.translate('formBuilder.add-section'),\\r\\n height: '20vw',\\r\\n styleClass: '!w-100 !absolute ',\\r\\n position: 'end',\\r\\n appendTo: '#page-content',\\r\\n modal: true,\\r\\n dismissible: true,\\r\\n inputValues: {\\r\\n sectionsCount: this.sections().length,\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n openPreview(): void {\\r\\n this.dialogRef = this.modalService.openModal(FBPreviewForm, 'drawer', {\\r\\n header: this.translocoService.translate('formBuilder.preview'),\\r\\n styleClass: '!w-[80vw] ',\\r\\n position: 'end',\\r\\n modal: true,\\r\\n dismissible: true,\\r\\n inputValues: {\\r\\n sections: this.enrichedSections(),\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n resetFormConfiguration(): void {\\r\\n this.confirmationService.confirm({\\r\\n type: 'dialog',\\r\\n acceptButtonStyleClass: 'p-button-danger',\\r\\n accept: () => {\\r\\n this.facade.resetFormConfiguration();\\r\\n },\\r\\n });\\r\\n }\\r\\n\\r\\n noReturnPredicate = (): boolean => false;\\r\\n}\\r\\n\",\"<ng-container *transloco=\\\"let t; prefix: 'formBuilder'\\\">\\r\\n <div class=\\\"flex gap-4 h-full w-full overflow-hidden\\\" cdkDropListGroup>\\r\\n <!-- Properties Sidebar -->\\r\\n <mt-card\\r\\n class=\\\"z-1 w-1/5 min-w-xs shrink-0 h-full flex flex-col overflow-hidden\\\"\\r\\n >\\r\\n <ng-template #headless>\\r\\n <!-- Header -->\\r\\n <div class=\\\"flex items-center justify-between px-4 pt-5\\\">\\r\\n <h3 class=\\\"text-xl font-semibold\\\">{{ t(\\\"form-elements\\\") }}</h3>\\r\\n </div>\\r\\n\\r\\n @if (properties().length === 0) {\\r\\n @if (isLoading()) {\\r\\n <!-- Properties Loading Skeleton -->\\r\\n <div class=\\\"p-4 space-y-3\\\">\\r\\n <p-skeleton height=\\\"2rem\\\" styleClass=\\\"mb-4\\\" />\\r\\n @for (i of [1, 2, 3, 4, 5, 6]; track i) {\\r\\n <p-skeleton height=\\\"3rem\\\" styleClass=\\\"rounded-lg\\\" />\\r\\n }\\r\\n </div>\\r\\n } @else {\\r\\n <!-- No Properties State -->\\r\\n <div class=\\\"flex-1 flex items-center justify-center p-4\\\">\\r\\n <div class=\\\"text-center text-muted-color\\\">\\r\\n <p class=\\\"text-sm\\\">{{ t(\\\"no-properties\\\") }}</p>\\r\\n </div>\\r\\n </div>\\r\\n }\\r\\n } @else {\\r\\n <!-- Tabs using PrimeNG -->\\r\\n <p-tabs\\r\\n [(value)]=\\\"activeTab\\\"\\r\\n styleClass=\\\"structure-tabs\\\"\\r\\n class=\\\"flex flex-1 flex-col min-h-0\\\"\\r\\n >\\r\\n <p-tablist class=\\\"shrink-0\\\">\\r\\n @for (tab of availableTabs(); track tab.id) {\\r\\n <p-tab [value]=\\\"tab.id\\\">{{ tab.title | titlecase }}</p-tab>\\r\\n }\\r\\n </p-tablist>\\r\\n <p-tabpanels class=\\\"!bg-transparent !p-0 flex-1 overflow-hidden\\\">\\r\\n @for (tab of availableTabs(); track tab.id) {\\r\\n <p-tabpanel [value]=\\\"tab.id\\\" class=\\\"h-full\\\">\\r\\n <!-- Node List -->\\r\\n <div\\r\\n class=\\\"space-y-1 p-4 [&_.cdk-drag-placeholder]:hidden h-full overflow-y-auto\\\"\\r\\n [id]=\\\"'toolbox-' + tab.id\\\"\\r\\n cdkDropList\\r\\n cdkDropListSortingDisabled\\r\\n [cdkDropListData]=\\\"tab.properties\\\"\\r\\n [cdkDropListEnterPredicate]=\\\"noReturnPredicate\\\"\\r\\n >\\r\\n @for (node of tab.properties; track $index) {\\r\\n <div\\r\\n cdkDrag\\r\\n [cdkDragData]=\\\"node\\\"\\r\\n class=\\\"group cursor-move select-none relative flex items-center gap-3 py-3 px-4 rounded-lg border border-dashed border-surface-300 hover:border-solid hover:bg-emphasis dark:border-surface-500 transition-colors\\\"\\r\\n >\\r\\n <div\\r\\n *cdkDragPlaceholder\\r\\n class=\\\"col-span-12 min-h-27 w-full rounded-2xl bg-black/10 z-1\\\"\\r\\n ></div>\\r\\n <span class=\\\"flex-1 text-base font-medium\\\">{{\\r\\n node.name\\r\\n }}</span>\\r\\n </div>\\r\\n }\\r\\n\\r\\n @if (tab.properties.length === 0) {\\r\\n <div class=\\\"py-8 text-center text-muted-color\\\">\\r\\n <p class=\\\"text-sm\\\">\\r\\n All {{ tab.title }} items are in use\\r\\n </p>\\r\\n </div>\\r\\n }\\r\\n </div>\\r\\n </p-tabpanel>\\r\\n }\\r\\n </p-tabpanels>\\r\\n </p-tabs>\\r\\n }\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n\\r\\n <!-- Main Canvas Area -->\\r\\n <div class=\\\"flex flex-col gap-4 flex-1 w-full h-full overflow-y-auto\\\">\\r\\n <mt-card>\\r\\n <ng-template #headless>\\r\\n <div class=\\\"p-4 flex items-center gap-2\\\">\\r\\n <mt-button\\r\\n icon=\\\"layout.layout-top\\\"\\r\\n [label]=\\\"t('add-section')\\\"\\r\\n (onClick)=\\\"addSection()\\\"\\r\\n [disabled]=\\\"isLoading()\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n icon=\\\"general.eye\\\"\\r\\n [label]=\\\"t('preview')\\\"\\r\\n (onClick)=\\\"openPreview()\\\"\\r\\n [disabled]=\\\"isLoading()\\\"\\r\\n ></mt-button>\\r\\n <mt-button\\r\\n icon=\\\"finance.credit-card-plus\\\"\\r\\n [label]=\\\"t('reset')\\\"\\r\\n (onClick)=\\\"resetFormConfiguration()\\\"\\r\\n [disabled]=\\\"isLoading()\\\"\\r\\n ></mt-button>\\r\\n </div>\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n\\r\\n @if (isLoading()) {\\r\\n <!-- Form Loading Skeleton -->\\r\\n @for (i of [1, 2]; track i) {\\r\\n <mt-card>\\r\\n <ng-template #headless>\\r\\n <div class=\\\"p-4 space-y-4\\\">\\r\\n <!-- Section header skeleton -->\\r\\n <div class=\\\"flex items-center justify-between\\\">\\r\\n <p-skeleton width=\\\"10rem\\\" height=\\\"1.5rem\\\" />\\r\\n <div class=\\\"flex gap-2\\\">\\r\\n <p-skeleton width=\\\"2rem\\\" height=\\\"2rem\\\" shape=\\\"circle\\\" />\\r\\n <p-skeleton width=\\\"2rem\\\" height=\\\"2rem\\\" shape=\\\"circle\\\" />\\r\\n </div>\\r\\n </div>\\r\\n <!-- Fields skeleton -->\\r\\n <div class=\\\"grid grid-cols-12 gap-4\\\">\\r\\n <div class=\\\"col-span-6\\\">\\r\\n <p-skeleton height=\\\"4rem\\\" styleClass=\\\"rounded-lg\\\" />\\r\\n </div>\\r\\n <div class=\\\"col-span-6\\\">\\r\\n <p-skeleton height=\\\"4rem\\\" styleClass=\\\"rounded-lg\\\" />\\r\\n </div>\\r\\n <div class=\\\"col-span-12\\\">\\r\\n <p-skeleton height=\\\"4rem\\\" styleClass=\\\"rounded-lg\\\" />\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n </ng-template>\\r\\n </mt-card>\\r\\n }\\r\\n } @else {\\r\\n @for (section of enrichedSections(); track section.id) {\\r\\n <mt-fb-section\\r\\n [section]=\\\"section\\\"\\r\\n [sectionsCount]=\\\"enrichedSections().length\\\"\\r\\n [allSections]=\\\"enrichedSections()\\\"\\r\\n (onFieldDrop)=\\\"drop($event)\\\"\\r\\n >\\r\\n </mt-fb-section>\\r\\n } @empty {\\r\\n <mt-card>\\r\\n <div class=\\\"h-27 p-4\\\">\\r\\n <div\\r\\n class=\\\"flex justify-center items-center gap-4 h-full border-2 border-primary rounded-xl bg-primary-200 text-primary\\\"\\r\\n >\\r\\n <span>{{ t(\\\"no-section\\\") }}</span>\\r\\n </div>\\r\\n </div>\\r\\n </mt-card>\\r\\n }\\r\\n }\\r\\n </div>\\r\\n </div>\\r\\n</ng-container>\\r\\n\",\"/*\\r\\n * Public API Surface of form-builder\\r\\n */\\r\\n\\r\\nexport * from './lib/form-builder';\\r\\nexport * from './store/form-builder';\\r\\n\",\"/**\\n * Generated bundle index. Do not edit.\\n */\\n\\nexport * from './public-api';\\n\"],\"names\":[\"i1\"],\"mappings\":\";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA;AACA;AACA;MAEa,aAAa,CAAA;AAGf,IAAA,UAAA;AACA,IAAA,QAAA;AACA,IAAA,gBAAA;AACA,IAAA,cAAA;AACA,IAAA,UAAA;AANT,IAAA,OAAgB,IAAI,GAAG,+BAA+B;IACtD,WAAA,CACS,UAAkB,EAClB,QAAyB,EACzB,gBAAyB,EACzB,cAAgC,EAChC,U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