import * as i0 from '@angular/core'; import { OnChanges, OnDestroy, EventEmitter, SimpleChanges, OnInit, ChangeDetectorRef, NgZone, Provider, AfterViewInit, ElementRef } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { FormGroup, AbstractControl, FormBuilder, FormArray } from '@angular/forms'; import { Router, ActivatedRoute } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { CdkDragStart, CdkDragMove, CdkDragEnd, CdkDragDrop } from '@angular/cdk/drag-drop'; import * as _praxisui_core from '@praxisui/core'; import { AsyncConfigStorage, FormLayout, FieldMetadata, FormLayoutRule, FormRuleTargetType as FormRuleTargetType$1, PraxisJsonLogicService, FormSection, FormRow, FormColumn, FormConfig, FormConfigWithSections, FormLayoutItem, ReactiveDeterminationDefinition, ReactiveDeterminationExecutionEvent, FormActionButton, AiCapability, BackConfig, FormPresentationConfig, RichBlockHostCapabilities, EmptyStateTone, EmptyStateVariant, EmptyStateAlignment, EmptyStateDensity, EmptyStateIconContainer, ApiEndpoint, ApiUrlEntry, DynamicFormLayoutPolicy, FormHooksLayout, EndpointConfig, FormSubmitEvent, FormReadyEvent, FormValueChangeEvent, FormPayloadPreviewEvent, SyncResult, FormInitializationError, LoadingState, FormCustomActionEvent, FormActionConfirmationEvent, RichContentDocument, JsonLogicRecord, GenericCrudService, ConnectionStorage, DynamicFormService, ErrorMessageService, SchemaNormalizerService, ComponentMetadataRegistry, GlobalConfigService, ComponentKeyService, LoadingOrchestrator, ApiUrlConfig, PraxisLoadingRenderer, FormHooksRegistry, FormHookPreset, LoggerService, EnterpriseRuntimeContextService, FormSectionHeaderAction, FormSectionHeaderConfig, FormConfigState, JsonLogicExpression, FormHelpPresentationConfig, GlobalActionCatalogEntry, PraxisRuntimeConditionalEffectRule, PraxisRuntimeGlobalActionEffect, SurfaceOpenPayload, GlobalActionField, PraxisEffectPolicy, FieldDefinition, ComponentDocMeta, Breakpoint, DomainRuleRequestOptions, DomainRuleService, DomainRuleMaterialization, TableConfig, IconPickerService, GlobalActionRef, AiCapabilityCategory, AiCapabilityCatalog, AiValueKind, ComponentAuthoringManifest } from '@praxisui/core'; import * as rxjs from 'rxjs'; import { Observable, Subscription, BehaviorSubject } from 'rxjs'; import { SettingsPanelService, SettingsValueProvider } from '@praxisui/settings-panel'; import { BaseAiAdapter, AiResponseCompileResult, PatchResult, PraxisAssistantShellLayout, PraxisAssistantTurnViewState, PraxisAssistantShellLabels, PraxisAssistantSessionSnapshot, PraxisAssistantShellQuickReply, PraxisAssistantShellMessage } from '@praxisui/ai'; import { KeyboardShortcutService } from '@praxisui/dynamic-fields'; import { RuleBuilderConfig, RuleBuilderState } from '@praxisui/visual-builder'; import { CascadeManagerTabComponent } from '@praxisui/metadata-editor'; import * as _praxisui_dynamic_form from '@praxisui/dynamic-form'; declare class FormLayoutService { private storage?; constructor(storage?: AsyncConfigStorage | undefined); loadLayout(componentId: string): Promise; saveLayout(componentId: string, layout: FormLayout): void; clearLayout(componentId: string): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class FormContextService { private fieldsByContext; private componentsByContext; private formRulesByContext; private currentContext; getCurrentContext(): string; setContext(context: string): void; getAvailableFields$(): Observable; setAvailableFields(fields: FieldMetadata[]): void; registerFieldComponent(fieldName: string, component: any): void; getFieldComponent(fieldName: string): any | null; unregisterFieldComponent(fieldName: string): void; setFormRules(rules: FormLayoutRule[]): void; getFormRuleById(ruleId: string): FormLayoutRule | undefined; getFormRulesByTargetType(targetType: FormRuleTargetType$1): FormLayoutRule[]; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } type RuleApplicationDiagnosticCode = 'missing-targets' | 'missing-effect' | 'unsupported-target-type' | 'field-target-not-found' | 'target-not-found' | 'invalid-condition' | 'invalid-value-expression' | 'computed-value-iteration-limit' | 'unsupported-property' | 'rule-evaluation-error'; interface RuleApplicationDiagnostic { ruleId?: string; ruleName?: string; code: RuleApplicationDiagnosticCode; targetType?: FormLayoutRule['targetType']; targetId?: string; details?: string[]; } /** * Structured properties resulting from rule evaluation. */ interface RuleApplicationResult { fieldProps: Record>; sectionProps: Record>; actionProps: Record>; rowProps: Record>; columnProps: Record>; visualBlockProps: Record>; fieldValues: Record; formData: Record; diagnostics: RuleApplicationDiagnostic[]; } type RuleApplicationTargetType = NonNullable; type RuleApplicationTargetIndex = Partial>>; interface RuleApplicationContext { targetIndex?: RuleApplicationTargetIndex; nowUtc?: string; } declare class FormRulesService { private readonly jsonLogic; constructor(jsonLogic: PraxisJsonLogicService); /** * Evaluates a set of form rules against the current value of a FormGroup. * * @param formGroup The Angular FormGroup to evaluate against. * @param formRules The array of rules to process. * @returns A RuleEvaluationResult object containing the visibility and required states for the fields. */ applyRules(formGroup: FormGroup, formRules: FormLayoutRule[], context?: RuleApplicationContext): RuleApplicationResult; private ruleTargetExists; private normalizeRuleTargetId; private evaluateCondition; private evaluateRuleValue; private evaluateJsonLogicValue; private resolveComputedRuleFormData; private areRuleValuesEqual; private addUnsupportedPropertyDiagnostics; private setPath; private deletePath; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } type CanvasElementType = 'section' | 'row' | 'column' | 'field' | 'actions'; interface CanvasPathPart { type: CanvasElementType; name: string; data: FormSection | FormRow | FormColumn | FieldMetadata | any; domElement: HTMLElement; } interface CanvasElement { type: CanvasElementType; domElement: HTMLElement; data: FormSection | FormRow | FormColumn | FieldMetadata | any; path: CanvasPathPart[]; } /** Service providing immutable operations over form layout configuration. */ type RemovePolicy = 'keepEmptyContainers' | 'pruneEmptyContainers'; interface Operation { type: string; correlationId?: string; origin?: string; from?: { sectionId?: string; rowId?: string; columnId?: string; itemId?: string; fieldName?: string; sectionIndex?: number; rowIndex?: number; colIndex?: number; fieldIndex?: number; }; to?: { sectionId?: string; rowId?: string; columnId?: string; itemId?: string; fieldName?: string; sectionIndex?: number; rowIndex?: number; colIndex?: number; fieldIndex?: number; toIndex?: number; toFieldIndex?: number; }; policy?: RemovePolicy; meta?: any; [key: string]: any; } interface LayoutResult { config: FormConfigWithSections; op: Operation; } interface LayoutChange { timestamp: number; op: Operation; config: FormConfig; } interface Path { sectionIndex: number; rowIndex?: number; colIndex?: number; } interface PathWithIndex extends Path { toIndex: number; } interface FieldPath extends Path { colIndex: number; fieldIndex: number; } interface FieldPathWithIndex extends Path { colIndex: number; toFieldIndex: number; } interface FieldPathContainer extends Path { colIndex: number; } interface IdPath { sectionId: string; rowId?: string; columnId?: string; fieldName?: string; } interface ValidationReport { valid: boolean; errors: string[]; } type LocalFieldInsertionDiagnosticCode = 'missing-field-name' | 'missing-control-type' | 'field-name-already-exists' | 'schema-field-name-collision' | 'invalid-local-field-source'; interface LocalFieldInsertionDiagnostic { code: LocalFieldInsertionDiagnosticCode; severity: 'error' | 'warning'; message: string; fieldName?: string; } interface InsertLocalFieldOptions { atIndex?: number; schemaFieldNames?: Iterable; correlationId?: string; origin?: string; } interface InsertLocalFieldResult extends LayoutResult { applied: boolean; diagnostics: LocalFieldInsertionDiagnostic[]; } type DynamicFormGeneratedLayoutPreset = 'default' | 'compactPresentation'; interface GenerateFormConfigFromMetadataOptions { fieldsPerRow?: number; defaultSectionTitle?: string; layoutPreset?: DynamicFormGeneratedLayoutPreset; presentationRoleMap?: Record; } declare class DynamicFormLayoutService { private readonly changesSubject; readonly changes$: rxjs.Observable; private emit; normalizeConfig(config: FormConfig): FormConfigWithSections; validateConfig(config: FormConfig): ValidationReport; generateFormConfigFromMetadata(fields: FieldMetadata[], options?: GenerateFormConfigFromMetadataOptions): FormConfigWithSections; getElementPath(config: FormConfig, element: HTMLElement): CanvasPathPart[]; updateElement(config: FormConfig, path: CanvasPathPart[], updatedData: any, options?: { correlationId?: string; origin?: string; }): LayoutResult; private resolvePath; resolvePathByIds(config: FormConfig, ids: IdPath): FieldPath; private createRowsFromFields; private createCompactPresentationRowsFromFields; private resolveCompactPresentationSpan; private inferCompactPresentationSpan; private clampGridSpan; private resolveGroupOrder; private withCompactPresentationFieldDefaults; private resolveFieldPresentationRole; private resolvePresentationRole; private normalizePresentationRole; private genId; private capitalizeFirstLetter; private assertIndex; private mutate; private getFieldName; private findFieldLayoutItemIndex; private getLayoutInsertIndexForFieldIndex; private applyLayoutItemsToColumn; private insertFieldLayoutItem; private removeFieldLayoutItem; private hasLayoutItems; private moveFieldLayoutItem; moveSection(config: FormConfig, fromIndex: number, toIndex: number): LayoutResult; insertSection(config: FormConfig, section: any, atIndex?: number): LayoutResult; removeSection(config: FormConfig, index: number, _policy?: RemovePolicy): LayoutResult; moveRow(config: FormConfig, from: Path, to: PathWithIndex): LayoutResult; insertRow(config: FormConfig, sectionIndex: number, row: any, atIndex?: number): LayoutResult; removeRow(config: FormConfig, sectionIndex: number, rowIndex: number, policy?: RemovePolicy): LayoutResult; moveColumn(config: FormConfig, from: Path, to: PathWithIndex): LayoutResult; insertColumn(config: FormConfig, secIdx: number, rowIdx: number, col: any, atIndex?: number): LayoutResult; removeColumn(config: FormConfig, secIdx: number, rowIdx: number, colIdx: number, policy?: RemovePolicy): LayoutResult; moveField(config: FormConfig, from: FieldPath, to: FieldPathWithIndex, options?: { policy?: RemovePolicy; correlationId?: string; origin?: string; }): LayoutResult; insertField(config: FormConfig, target: FieldPathContainer, field: any, atIdx?: number): LayoutResult; removeField(config: FormConfig, secIdx: number, rowIdx: number, colIdx: number, fieldIndex: number, options?: { policy?: RemovePolicy; correlationId?: string; origin?: string; }): LayoutResult; moveSectionById(config: FormConfig, sectionId: string, toIndex: number, options?: { correlationId?: string; origin?: string; }): LayoutResult; removeSectionById(config: FormConfig, sectionId: string, policy?: RemovePolicy): LayoutResult; moveRowById(config: FormConfig, sectionId: string, rowId: string, toSectionId: string, toIndex: number, options?: { correlationId?: string; origin?: string; }): LayoutResult; insertRowById(config: FormConfig, sectionId: string, row: FormRow, atIndex?: number): LayoutResult; removeRowById(config: FormConfig, sectionId: string, rowId: string, policy?: RemovePolicy): LayoutResult; moveColumnById(config: FormConfig, sectionId: string, rowId: string, columnId: string, toSectionId: string, toRowId: string, toIndex: number, options?: { correlationId?: string; origin?: string; }): LayoutResult; insertColumnById(config: FormConfig, sectionId: string, rowId: string, column: FormColumn, atIndex?: number): LayoutResult; removeColumnById(config: FormConfig, sectionId: string, rowId: string, columnId: string, policy?: RemovePolicy): LayoutResult; moveFieldById(config: FormConfig, from: { sectionId: string; rowId: string; columnId: string; fieldName: string; }, to: { sectionId: string; rowId: string; columnId: string; toIndex: number; }, options?: { policy?: RemovePolicy; correlationId?: string; origin?: string; }): LayoutResult; insertFieldById(config: FormConfig, target: { sectionId: string; rowId: string; columnId: string; }, field: any, atIndex?: number): LayoutResult; insertLocalFieldById(config: FormConfig, target: { sectionId: string; rowId: string; columnId: string; }, field: FieldMetadata, options?: InsertLocalFieldOptions): InsertLocalFieldResult; insertLayoutItemById(config: FormConfig, target: { sectionId: string; rowId: string; columnId: string; }, item: FormLayoutItem, atIndex?: number): LayoutResult; private prepareLocalFieldMetadata; private validateLocalFieldInsertion; moveLayoutItemById(config: FormConfig, from: { sectionId: string; rowId: string; columnId: string; itemId: string; }, to: { sectionId: string; rowId: string; columnId: string; toIndex: number; }, options?: { policy?: RemovePolicy; correlationId?: string; origin?: string; }): LayoutResult; updateLayoutItemById(config: FormConfig, target: { sectionId: string; rowId: string; columnId: string; itemId: string; }, item: FormLayoutItem): LayoutResult; removeLayoutItemById(config: FormConfig, sectionId: string, rowId: string, columnId: string, itemId: string, options?: { policy?: RemovePolicy; correlationId?: string; origin?: string; }): LayoutResult; removeFieldById(config: FormConfig, sectionId: string, rowId: string, columnId: string, fieldName: string, options?: { policy?: RemovePolicy; correlationId?: string; origin?: string; }): LayoutResult; /** * Removes empty columns, rows and sections from the provided configuration. * Useful when persisting a layout with `removeEmptyContainersOnSave` enabled. */ pruneEmptyContainers(config: FormConfig): LayoutResult; addRowToSectionById(config: FormConfig, sectionId: string): LayoutResult & { addedRowId: string; }; addColumnToRowById(config: FormConfig, sectionId: string, rowId: string): LayoutResult & { addedColumnId: string; }; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } type ReactiveDeterminationExecutor = (definition: ReactiveDeterminationDefinition, requestBody: Record, correlationId: string) => Observable>; /** Internal scheduler for Metadata-compiled, backend reactive determinations. */ declare class ReactiveDeterminationRuntimeService { private readonly pendingStateByForm; private readonly ownedTargetsByForm; private readonly committedControlsByForm; private readonly publishingCommitByForm; private nextConnectionId; hasPending(form: FormGroup): boolean; hasUnsatisfied(form: FormGroup): boolean; waitForStable(form: FormGroup, timeoutMs?: number): Promise; observePending(form: FormGroup, observer: (pending: boolean) => void): Subscription; isOwnedTarget(form: FormGroup, control: AbstractControl): boolean; connect(form: FormGroup, definitions: ReactiveDeterminationDefinition[], executor: ReactiveDeterminationExecutor, onEvent?: (event: ReactiveDeterminationExecutionEvent) => void, operationTimeoutMs?: number): Subscription; private resolveControls; private waitForUpstreamDeterminations; private claimTargets; private buildInvocation; private buildCommit; private buildOutputFingerprint; private commit; private getOrCreateCommittedControls; private event; private getOrCreatePendingState; private beginGeneration; private satisfyGeneration; private finishGeneration; private clearDeterminationState; private isCurrentGeneration; private isPending; private isSatisfied; private notifyIfStable; private notifyPendingChange; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class CanvasStateService { private readonly _hoveredElement$; readonly hoveredElement$: rxjs.Observable; private readonly _selectedElement$; readonly selectedElement$: rxjs.Observable; setHoveredElement(element: CanvasElement | null): void; setSelectedElement(element: CanvasElement | null): void; get selectedElement(): CanvasElement | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * Payload emitted when a form action button is activated. */ interface PraxisFormActionEvent { /** Identifier of the triggered action */ actionId: string; /** Full button configuration for the triggered action */ button: FormActionButton; /** Original DOM event that triggered the action */ originalEvent: Event; } declare class PraxisFormActionsComponent implements OnChanges, OnDestroy { private shortcuts; private readonly i18n; private actionButtonsCache; private actionButtonsCacheSource?; private actionButtonsCacheOverrides?; private formActionsClassesCacheSource?; private formActionsClassesCache; private viewClassMapCacheSource?; private viewClassMapCacheEditorialContext?; private viewClassMapCache; private visibleButtonsCacheSource; private visibleButtonsCache; private collapsedButtonsCacheSource; private collapsedButtonsCache; private primaryButtonsCacheSource; private primaryButtonsCache; private secondaryButtonsCacheSource; private secondaryButtonsCache; private buttonClassCache; private buttonStylesCache; private invalidSubmitHintCacheSignature; private invalidSubmitHintCacheValue; private readonly invalidSubmitHint; readonly submitErrorTitle: string; /** Configuration object describing form action buttons */ actions?: FormConfig['actions']; /** Whether the actions are rendered inside an editorial visual context */ editorialVisualContext: boolean; /** Whether the host form is currently submitting */ isSubmitting: boolean; /** Whether the host form is currently valid */ formIsValid: boolean; /** Optional error message displayed above the actions */ submitError?: string | null; /** Visible required fields that currently block submit */ invalidRequiredFieldLabels: string[]; /** Suppresses invalid-form copy while a host runtime is still hydrating data. */ suppressInvalidSubmitHint: boolean; /** Identifier used when registering keyboard shortcuts */ formId?: string; /** Overrides coming from runtime rules */ actionOverrides?: Record>; /** Emitted whenever a form action button is triggered */ action: EventEmitter; private shortcutDisposers; constructor(shortcuts: KeyboardShortcutService); ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; get formActionsClasses(): { [key: string]: boolean; }; get viewClassMap(): { [key: string]: boolean; }; getMatColor(btn: FormActionButton | undefined): 'primary' | 'accent' | 'warn' | undefined; getActionButtons(): FormActionButton[]; private computeActionButtons; private refreshActionButtons; getVisibleButtons(): FormActionButton[]; getCollapsedButtons(): FormActionButton[]; isSplitLayout(): boolean; getPrimaryButtons(): FormActionButton[]; getSecondaryButtons(): FormActionButton[]; onActionButtonClick(button: FormActionButton, event: Event): void; getButtonNgClass(button: FormActionButton): { [key: string]: boolean; }; getButtonStyles(button: FormActionButton): Record | null; isActionButtonDisabled(button: FormActionButton): boolean; shouldShowInvalidSubmitHint(): boolean; getInvalidSubmitHint(): string; private applyOverrides; private registerActionShortcuts; private resolveButtonActionId; private isSecondaryButton; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Minimal contract the AI adapter needs from the host form component. * Keeps the adapter decoupled from the concrete component class to avoid cycles. */ interface FormAiHost { config: FormConfig; form: FormGroup; mode?: 'create' | 'edit' | 'view'; enableCustomization?: boolean; readonlyModeGlobal?: boolean | null; effectiveReadonly?: boolean; applyConfigFromAdapter(config: FormConfig): void; } declare class FormAiAdapter extends BaseAiAdapter { private host; componentName: string; componentId: string; componentType: string; constructor(host: FormAiHost); getCurrentConfig(): FormConfig; getCapabilities(): AiCapability[]; getTaskPresets(): Record; getRuntimeState(): Record; getDataProfile(): Record; getSchemaFields(): Record[]; getAuthoringContext(): Record; compileAiResponse(response: Record): AiResponseCompileResult | null; createSnapshot(): FormConfig; restoreSnapshot(snapshot: FormConfig): Promise; applyPatch(patch: Partial, intent?: string): Promise; getContextDescription(): string; private applyConfig; private smartMergeFormConfig; private extractIncomingRules; private extractComponentEditOperationPatch; private applyComponentEditOperation; private applyLocalFieldAdd; private applyFieldMetadataPatch; private appendFieldToLayout; private resolveFieldName; private matchesText; private normalizeSearchText; private toBoolean; private toSubmitPolicy; private extractVisualBlockGuidanceOperationRule; private coerceSingleOperationResponse; private coerceOperationResponses; private operationInputRecord; private normalizeVisualBlockGuidanceOperationInput; private visualBlockGuidanceParamsToRule; private normalizeLlmRule; private mergeRulesById; private cloneConfig; private asRecord; private toNonEmptyString; private isFilled; } interface EditorDocument { kind: string; version: number; config: TConfig; bindings?: TBindings; } interface EditorDiagnostic { level: 'error' | 'warning' | 'info'; code: string; message: string; path?: string; } type DynamicFormMode = 'create' | 'edit' | 'view'; interface DynamicFormBindings { mode?: DynamicFormMode; /** true: presentation in view; false: fields; null/absent: inherit layout policy. */ presentationModeGlobal?: boolean | null; } type DynamicFormPresentationSnapshot = FormPresentationConfig; interface DynamicFormSchemaPrefsSnapshot { notifyIfOutdated?: 'inline' | 'snackbar' | 'both' | 'none'; snoozeMs?: number; autoOpenSettingsOnOutdated?: boolean; } interface DynamicFormContextSnapshot { backConfig?: BackConfig; presentation?: DynamicFormPresentationSnapshot; schemaPrefs?: DynamicFormSchemaPrefsSnapshot; } interface DynamicFormAuthoringDocument extends EditorDocument { kind: 'praxis.dynamic-form.editor'; version: 1; contextSnapshot?: DynamicFormContextSnapshot; } interface DynamicFormValidationContext { server?: { schemaHash?: string; }; } type DynamicFormRuntimeValueSource = 'runtime-input' | 'legacy-crud'; interface DynamicFormResolvedRuntimeContract { schemaUrl?: string; schemaSource?: DynamicFormRuntimeValueSource; submitUrl?: string; submitMethod?: 'post' | 'put' | 'patch'; submitSource?: DynamicFormRuntimeValueSource; } interface DynamicFormProjectionContext { mode?: DynamicFormMode; } interface DynamicFormRuntimeContext { currentBindings?: DynamicFormBindings; currentContextSnapshot?: DynamicFormContextSnapshot; server?: { schemaHash?: string; }; resolvedContract?: DynamicFormResolvedRuntimeContract; } interface DynamicFormApplyPlan { canonicalConfig: FormConfig; bindingsPatch?: DynamicFormBindings; contextSnapshot?: DynamicFormContextSnapshot; persistence?: { saveConfig?: boolean; saveBindings?: boolean; saveContextSnapshot?: boolean; }; runtime?: { rebindMode?: boolean; clearMode?: boolean; clearPresentationMode?: boolean; rebuildForm?: boolean; refreshPresentation?: boolean; clearPresentation?: boolean; refreshSchemaState?: boolean; clearSchemaState?: boolean; refreshBackNavigation?: boolean; clearBackNavigation?: boolean; }; metadata?: { attachSchemaSnapshot?: boolean; }; diff?: { modeChanged?: boolean; presentationChanged?: boolean; schemaPrefsChanged?: boolean; backConfigChanged?: boolean; }; diagnostics: EditorDiagnostic[]; } interface DynamicFormConfigPatchChangeEvent { inputPatch: { config?: FormConfig; resourcePath?: string | null; mode?: DynamicFormMode; presentationModeGlobal?: boolean | null; presentation?: DynamicFormPresentationSnapshot | null; }; } /** * Opt-in placeholder rendered when a view form has no selected entity context. * * Business copy remains owned by the host/composition plan. The Dynamic Form * only owns the deterministic state transition and reuses the shared Praxis * empty-state primitive. */ interface PraxisDynamicFormEmptyState { title: string; description?: string; icon?: string; tone?: EmptyStateTone; variant?: EmptyStateVariant; alignment?: EmptyStateAlignment; density?: EmptyStateDensity; iconContainer?: EmptyStateIconContainer; } interface PraxisDynamicFormDomainRulesOptions { enabled?: boolean; targetArtifactKey?: string | null; targetLayer?: string | null; targetArtifactType?: string | null; status?: string | null; } interface DynamicFieldRenderErrorEvent { phase: 'executeRendering' | 'detectChanges'; fieldName: string; error: unknown; fatal: boolean; } type ResolvedSectionHeaderVisual = { kind: 'none'; } | { kind: 'icon'; icon: string; } | { kind: 'image'; src: string; alt: string; } | { kind: 'initials'; text: string; ariaLabel: string; } | { kind: 'placeholder'; icon?: string; text?: string; ariaLabel: string; }; interface FormColumnFieldsRenderItem { kind: 'fields'; id: string; fields: FieldMetadata[]; } interface FormColumnRichContentRenderItem { kind: 'richContent'; id: string; document: RichContentDocument; layout: 'block' | 'inline'; rootClassName?: string | null; className?: string | null; style?: Record | null; } type FormColumnRenderItem = FormColumnFieldsRenderItem | FormColumnRichContentRenderItem; declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy { private crud; private http; private fb; private cdr; private layoutService; private contextService; private rulesService; private settingsPanel; private dialog; private asyncConfigStorage; private connectionStorage; private dynamicForm; private snackBar; private canvasState; private dynamicLayout; private reactiveDeterminationRuntime; private errorMessages; private schemaNormalizer; private componentMetaRegistry; private global; private componentKeys; private loadingOrchestrator; private ngZone; private apiUrlConfig; private loadingRenderer?; private router?; private route?; private hooksRegistry?; private hookPresets?; private logger?; private enterpriseRuntimeContext?; private readonly i18n; private readonly injector; private readonly agenticTurnClient; private readonly assistantSessions; private readonly aiTurnOrchestrator; private readonly jsonLogic; private readonly resourceDiscovery; private readonly aiAssistantSessionEffect; private readonly globalActions; private readonly DEBUG; private effectiveActionsCache?; private effectiveActionsCacheBase?; private effectiveActionsCacheOverride?; private invalidRequiredFieldLabelsCache; private invalidRequiredFieldLabelsSignature; get richContentHostCapabilities(): RichBlockHostCapabilities; resourcePath?: string; resourceId?: string | number; initialValue?: Record | null; /** * Replaces the form with a guided empty state while a view has neither a * resource id nor a local record snapshot. Create/edit forms are unaffected. */ emptyState?: PraxisDynamicFormEmptyState | null; /** * Shared editorial context for rich content hosted around the form. * Treat this input as immutable: in-place mutations do not invalidate the cached * merged context snapshot used to avoid re-binding on every change detection pass. */ editorialContext: Record | null; mode: 'create' | 'edit' | 'view'; config: FormConfig; private hostConfigInputProvided; /** Optional host-level overrides for the rendered form action bar. */ actions?: FormConfig['actions'] | null; /** * Fonte de schema para construir o formulário. * 'resource' (padrão) usa o schema do recurso (/{resource}/schemas -> .../all response) * 'filter' usa o schema do DTO de filtro (via /schemas/filtered no POST /filter request) */ schemaSource: 'resource' | 'filter'; /** Canonical schema URL published by the backend surface catalog. */ schemaUrl?: string | null; /** Canonical read URL published by backend view/read-projection surfaces. */ readUrl?: string | null; /** Canonical submit URL published by the backend surface catalog. */ submitUrl?: string | null; /** Canonical submit method published by the backend surface catalog. */ submitMethod?: string | null; /** Stable key reused by retries of the same materialized business command. */ submitIdempotencyKey?: string | null; /** Correlation identifier propagated to the backend command boundary. */ submitCorrelationId?: string | null; /** Current persisted resource version sent through If-Match when governed by the action. */ submitResourceVersion?: string | number | null; /** Canonical resource whose current ETag must be resolved when the command targets another aggregate. */ submitResourceVersionTargetResourceKey?: string | null; /** Exact request field carrying the canonical identifier of the cross-resource version target. */ submitResourceVersionTargetIdField?: string | null; /** Canonical response schema URL exposed for runtime diagnostics/follow-up. */ responseSchemaUrl?: string | null; /** API endpoint entry used to resolve relative canonical URLs in detached hosts. */ apiEndpointKey?: ApiEndpoint | string | null; /** Resolved API entry carried by detached hosts when route-scoped API_URL is not inherited. */ apiUrlEntry?: ApiUrlEntry | null; /** * CUSTOMIZAÇÃO DE LAYOUT - NÃO confundir com edição de dados do formulário * * Este flag controla se o usuário pode customizar a ESTRUTURA do formulário: * - Mover sections, rows, columns * - Configurar layout e aparência * - Acessar editor de configuração * * É INDEPENDENTE do mode (view/edit/create) que controla os DADOS do registro * * @example * // Formulário em modo VIEW de dados + customização HABILITADA * * * // Formulário em modo EDIT de dados + customização DESABILITADA * */ enableCustomization: boolean; /** Shows Praxis AI assistant triggers for this form instance. */ showAiAssistant: boolean; /** Identifier for persisting layouts */ formId?: string; componentInstanceId?: string; configPersistenceStrategy: 'local-first' | 'input-first'; /** Optional layout to use instead of generated one */ layout?: FormLayout; /** Metadata-driven layout preset used only when creating an initial config from schema. */ generatedLayoutPreset: DynamicFormGeneratedLayoutPreset; /** Opt-in policy for schema-driven transient layout materialization. */ layoutPolicy?: DynamicFormLayoutPolicy | null; /** Optional navigation back config (from CRUD host) */ backConfig?: BackConfig; /** Optional direct hooks declaration for testing/demo (overrides config.hooks) */ hooks?: FormHooksLayout; /** Remove empty sections/rows/columns when saving configuration */ removeEmptyContainersOnSave: boolean; /** Enable reactive afterValidate on valueChanges (overrides config.behavior) */ reactiveValidation: boolean | null; /** Debounce for reactive afterValidate in ms (overrides config.behavior) */ reactiveValidationDebounceMs: number | null; /** Controls outdated schema notifications visibility and channel (only effective when customization is enabled) */ notifyIfOutdated: 'inline' | 'snackbar' | 'both' | 'none'; /** Snooze duration for schema outdated notifications (ms), only when customization is enabled */ snoozeMs: number; /** Auto open settings when schema is detected as outdated (only when customization is enabled) */ autoOpenSettingsOnOutdated: boolean; readonlyModeGlobal: boolean | null; disabledModeGlobal: boolean | null; presentationModeGlobal: boolean | null; /** Projection of contextSnapshot.presentation; null clears authored style overrides. */ presentation?: DynamicFormPresentationSnapshot | null; visibleGlobal: boolean | null; fieldIconPolicy: 'all' | 'presentation-only' | 'none'; /** Opt-in loader for shared domain rule materializations persisted outside FormConfig. */ domainRules: PraxisDynamicFormDomainRulesOptions | boolean | null; get effectivePresentation(): boolean; shouldShowContextEmptyState(): boolean; private hasResourceContext; private hasLocalRecordContext; get effectiveReadonly(): boolean; get effectiveDisabledMode(): boolean | null; get effectiveFormIsValid(): boolean; protected get configControlLabel(): string; protected get disconnectControlLabel(): string; get invalidRequiredFieldLabels(): string[]; /** Value propagated to DynamicFieldLoader; null allows per-field metadata */ get presentationForLoader(): boolean | null; getRenderableFieldsForLoader(fields: FieldMetadata[]): FieldMetadata[]; private materializeFieldPresentationPolicy; private shouldMaterializeBooleanControl; private materializeFieldHelpPolicy; private shouldSuppressFieldIcons; private resolveFieldHelpDisplay; private normalizeFieldHelpControlToken; /** Custom endpoints for CRUD operations */ private _customEndpoints; get customEndpoints(): EndpointConfig; set customEndpoints(value: EndpointConfig); formSubmit: EventEmitter; formCancel: EventEmitter; formReset: EventEmitter; configChange: EventEmitter; configPatchChange: EventEmitter; formReady: EventEmitter; valueChange: EventEmitter; payloadPreviewChange: EventEmitter; syncCompleted: EventEmitter; initializationError: EventEmitter; loadingStateChange: EventEmitter; enableCustomizationChange: EventEmitter; customAction: EventEmitter; actionConfirmation: EventEmitter; /** Emits whenever schema outdated state changes (can be used by host) */ schemaStatusChange: EventEmitter<{ outdated: boolean; serverHash?: string; lastVerifiedAt?: string; formId?: string; }>; /** Forwarded from DynamicFieldLoader to allow host-side observability. */ fieldRenderError: EventEmitter; /** Emits runtime rule diagnostics so hosts can surface or log invalid rules. */ ruleDiagnosticsChange: EventEmitter; /** Emits metadata-only diagnostics for backend-owned form determinations. */ reactiveDeterminationExecuted: EventEmitter; /** Emits only aggregate runtime state; no request or response payload is exposed. */ reactiveDeterminationPendingChange: EventEmitter; private reactiveDeterminationPending; isLoading: boolean; submitting: boolean; private submitPreparationInProgress; submitError: string | null; initializationStatus: 'idle' | 'loading' | 'success' | 'error'; currentErrorMessage: string; currentErrorDetails: any; isRecoverable: boolean; private isInitialized; form: FormGroup; aiAdapter: FormAiAdapter; aiAssistantOpen: boolean; aiAssistantPrompt: string; aiAssistantLayout: PraxisAssistantShellLayout; aiAssistantViewState: PraxisAssistantTurnViewState; readonly aiAssistantLabels: Partial; private aiAssistantController; private aiAssistantStateSubscription; fieldVisibility: { [fieldName: string]: boolean; }; private fieldRuleProps; private sectionRuleProps; actionRuleProps: Record>; private rowRuleProps; private columnRuleProps; private visualBlockRuleProps; private materializedFormRules; private materializedFormRulesLoadSignature; private readonly formCommandRuleStates; ruleApplicationDiagnostics: RuleApplicationDiagnostic[]; private ruleApplicationDiagnosticsSignature; private pendingEntityId; private loadedEntityId; private hydratedEntityId; private loadedEntityData; protected entityHydrationPending: boolean; private schemaCache; private lastSchemaMeta?; private readonly schemaMetaPersistenceQueues; private readonly formConfigPersistenceQueues; private readonly formConfigPersistenceGenerations; private readonly formConfigConflictBlockThrough; private schemaRootHooks?; private schemaRootReactiveDeterminations; private schemaRootOperationId; private destroy$; private isDestroyed; private formValueChangesSubscription; private readonly submitFieldErrorSubscriptions; private activeSubmitErrorDetails; private reactiveDeterminationSubscription; private reactiveDeterminationScheduledBuildId; private dependencyPolicySubscription; private formBuildCycleId; private suppressedValueChangeBuildId; private pendingBootstrapValueChangeBuildId; private readonly sectionHeaderBlobUrlCache; private readonly sectionHeaderObjectUrls; private lastCorrelationId?; private currentDnD?; private columnFieldsCache; private rowClassesCache; private rowStylesCache; private sectionClassesCache; private sectionStylesCache; private columnClassesCache; private columnStylesCache; private lastFieldPatchSig; private lastFieldPatchAt; schemaOutdated: boolean; private resolvedPrefs; private editorialWidgetContextCache; private editorialWidgetContextDeps; private readonly emptyEditorialRichContentDocument; get formBlocksBefore(): RichContentDocument | null; get formBlocksAfter(): RichContentDocument | null; get formBlocksBeforeActions(): RichContentDocument | null; get formBlocksBeforeDocument(): RichContentDocument; get formBlocksBeforeActionsDocument(): RichContentDocument; get formBlocksAfterDocument(): RichContentDocument; get beforeActionsPlacement(): 'insideLastSection' | 'afterSections'; get actionPlacement(): 'insideLastSection' | 'afterSections' | 'top'; get effectiveActions(): FormConfig['actions']; /** * Precedence for editorial rich-content interpolation: * 1. form runtime context * 2. config.editorialContext * 3. host editorialContext input * Later layers override earlier ones. * * Invariant: config.editorialContext and editorialContext must be replaced immutably. * In-place mutations do not invalidate the cached merged context snapshot. */ getEditorialRichContentContext(): JsonLogicRecord; private reactiveValidate$?; private warnedMissingId; private schemaState; private getLogger; private buildLogOptions; private debugLog; private warnLog; private warnOnceLog; private errorLog; private toErrorMessage; private isDynamicFieldRenderErrorEvent; onFieldRenderError(event: DynamicFieldRenderErrorEvent | Event): void; private componentKeyId; private warnMissingId; openQuickConnect(): void; private get debugDnD(); get sectionDropListIds(): string[]; get rowDropListIds(): string[]; get columnDropListIds(): string[]; private formHost?; private fieldLoaders?; private _activeSnack?; presentationVars: { labelPosition: 'above' | 'left'; labelSize: string; valueSize: string; compact: boolean; density: 'comfortable' | 'cozy' | 'compact'; labelWidth: string; labelAlign: 'start' | 'center' | 'end'; valueAlign: 'start' | 'center' | 'end'; }; hoveredElement: CanvasElement | null; selectedElement: CanvasElement | null; toolbarTransform: string; private inputsLoaded; private hasMountedAnimation; private mountAnimationTimer; protected isMounting: boolean; private hasBuiltFormFromConfig; private runtimeFieldMetadata; constructor(crud: GenericCrudService, http: HttpClient, fb: FormBuilder, cdr: ChangeDetectorRef, layoutService: FormLayoutService, contextService: FormContextService, rulesService: FormRulesService, settingsPanel: SettingsPanelService, dialog: MatDialog, asyncConfigStorage: AsyncConfigStorage, connectionStorage: ConnectionStorage, dynamicForm: DynamicFormService, snackBar: MatSnackBar, canvasState: CanvasStateService, dynamicLayout: DynamicFormLayoutService, reactiveDeterminationRuntime: ReactiveDeterminationRuntimeService, errorMessages: ErrorMessageService, schemaNormalizer: SchemaNormalizerService, componentMetaRegistry: ComponentMetadataRegistry, global: GlobalConfigService, componentKeys: ComponentKeyService, loadingOrchestrator: LoadingOrchestrator, ngZone: NgZone, apiUrlConfig: ApiUrlConfig, loadingRenderer?: PraxisLoadingRenderer | undefined, router?: Router | undefined, route?: ActivatedRoute | undefined, hooksRegistry?: FormHooksRegistry | undefined, hookPresets?: FormHookPreset[] | null | undefined, logger?: LoggerService | undefined, enterpriseRuntimeContext?: EnterpriseRuntimeContextService | undefined); private emitLoadingState; private buildLoadingContext; private beginLoading; private endLoading; private runHooks; private resolveSubmitOperation; private buildSubmitRequest; private resolveSubmitResourceVersion; private normalizeSubmitMethod; private formatResourceVersion; private resolveSubmitHref; private resolveReadHref; private resolveEntityAwareHref; private resolveApiHref; private resolveApiOrigin; private resolveApiEntry; private configureCrudRuntime; private unwrapRestApiResponse; private resolveStageDeclarations; private resolvePresetDeclarations; get shouldShowConfigControls(): boolean; private genCorrelationId; private resolveModeKey; private formConfigKey; private formPresKey; private formInputsKey; private crudBackKey; private tryInitializeForm; hasExplicitSchemaUrl(): boolean; private hasSchemaBackedRuntime; hasRenderableConfig(config?: FormConfig | null | undefined): boolean; private initializeStandaloneConfig; private initializeDisconnectedEmptyState; private reloadForModeChange; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; private blurAllInputs; private initializeForm; private handleInitializationError; private loadConfigFailOpen; private resolveFieldLabel; private getErrorMessage; private persistFormConfig; private createDefaultConfig; private createConfigFromHostConfig; private shouldUseSchemaLayoutPolicy; private layoutPolicyRequestsPresentation; private shouldPersistGeneratedConfig; private createSchemaMaterializedConfig; private reconcileLoadedConfigWithServerSchema; private hostConfigHasAuthoredLocalFieldsNotInLocalConfig; private syncWithServer; private loadEntity; private hydrateEntityFromInitialValue; private flushEntityHydrationState; private buildFormFromConfig; private resetFormValueChangesSubscription; private resetReactiveDeterminationSubscription; private scheduleReactiveDeterminationsActivation; /** True while at least one backend Reactive Determination is unsettled. */ hasPendingReactiveDeterminations(): boolean; /** True when the latest settled generation failed or could not derive a current draft. */ hasUnsatisfiedReactiveDeterminations(): boolean; /** Resolves true only when the latest generations settled successfully/current. */ waitForReactiveDeterminations(timeoutMs?: number): Promise; private setReactiveDeterminationPending; private handleReactiveDeterminationExecutionEvent; private resetDependencyPolicySubscription; private setupEntityLookupDependencyPolicies; private applyEntityLookupDependencyPolicy; private isEntityLookupField; private resolveFieldDependencyNames; private allowEntityLookupLegacyRetention; private hasMeaningfulDependencyValue; private setEntityLookupDependencyConflict; private clearEntityLookupDependencyConflict; private resolveEntityLookupDependencyValidationMessage; private getRuntimeFieldMetadata; private resolveFieldAccessAuthorities; private normalizeAuthorityClaims; private materializeFieldAccessState; private scheduleValueChangeBootstrapRelease; private hasInteractiveFormState; private captureFormRuntimeState; private getDirtyFieldNames; private prepareCurrentSubmitPayload; private emitPayloadPreview; private resetToHydratedSnapshot; private collectDirtyFieldNames; private buildCurrentFormRuntimeContext; private buildRestoreTargetContext; private isCompatibleRuntimeStateContext; private restoreFormRuntimeState; private getNormalizedInitialValue; /** * A local composition owns the complete snapshot supplied through initialValue. * Once a readUrl/resourcePath can hydrate an edit/view entity, the backend remains * canonical and later seed changes must not reset remote fields or unsaved edits. */ private usesInitialValueAsAuthoritativeSnapshot; private normalizeFormPatchValue; private isDateControlMetadata; private coerceDateControlValue; /** * Backward-compatible required validation for DATE_RANGE controls. * Some core builds do not enforce required start/end for dateRange fields. */ private applyDateRangeRequiredValidators; /** * Backward-compatible required validation for multiple entity lookups. * Some form-control builders treat `required` correctly for single lookups but * do not mark empty collections as required when `multiple=true`. */ private applyEntityLookupCollectionRequiredValidators; private isMountAnimationDisabled; private triggerMountAnimation; protected getMountDurationVar(): string | null; protected getMountOffsetVar(): string | null; protected getMountStaggerVar(): string | null; private connectionKey; private isEquivalentFormConfig; private saveConnection; disconnect(): void; onToolbarRequestClose(): void; private getActiveFormRules; private refreshMaterializedFormRules; private resolveDomainRulesOptions; private evaluateAndApplyRules; private applyRuleComputedFieldValues; private evaluateAndDispatchFormCommandRules; private evaluateFormCommandCondition; private executeFormCommandGlobalAction; private isPotentiallyDestructiveFormCommandAction; private resolveFormCommandPath; private areRuleValuesEqual; private buildRuleApplicationTargetIndex; private setRuleApplicationDiagnostics; isSectionCollapsed(section?: FormSection): boolean; isSectionCollapsible(section?: FormSection): boolean; private getSectionRuleProps; isSectionVisible(section?: FormSection): boolean; isLastVisibleSection(section: FormSection): boolean; private hasVisibleSectionBody; private shouldRenderInsideLastSectionContent; private resolveInsideLastSectionHost; getSectionTitle(section: FormSection): string | undefined; getSectionDescription(section: FormSection): string | undefined; getSectionAppearance(section: FormSection): 'card' | 'plain' | 'step' | undefined; getSectionStepLabel(section: FormSection): string | undefined; getSectionTitleColor(section: FormSection): string | undefined; getSectionDescriptionColor(section: FormSection): string | undefined; getSectionTitleStyle(section: FormSection): string | undefined; getSectionDescriptionStyle(section: FormSection): string | undefined; getSectionHeaderTooltip(section: FormSection): string | undefined; getSectionHeaderActions(section: FormSection): FormSectionHeaderAction[]; getSectionHeaderAlign(section: FormSection): 'start' | 'center' | undefined; getSectionGapBottom(section: FormSection): number | null; getSectionTitleGapBottom(section: FormSection): number | null; getEffectiveSectionTitleGapBottom(section: FormSection): number; isSectionHeaderTitleOnly(section: FormSection): boolean; getSectionDescriptionGapBottom(section: FormSection): number | null; getSectionHeaderActionTooltip(action: FormSectionHeaderAction): string; isSectionHeaderActionDisabled(action: FormSectionHeaderAction): boolean; getSectionHeaderActionNgClass(action: FormSectionHeaderAction): Record; getSectionHeaderActionStyles(action: FormSectionHeaderAction): Record | null; getSectionHeaderActionLoadingLabel(action: FormSectionHeaderAction): string; onSectionHeaderActionClick(section: FormSection, action: FormSectionHeaderAction, event: Event): void; private applySectionHeaderActionOverrides; private getSectionHeaderActionEventId; private getSectionHeaderActionRuleKeys; private getRowRuleProps; isRowVisible(row?: FormRow): boolean; getRowGap(row: FormRow): number | null; getRowRowGap(row: FormRow): number | null; getRowClasses(row: FormRow): string[]; getRowStyles(row: FormRow): Record | null; getSectionIcon(section: FormSection): string | undefined; getSectionHeaderVisual(section: FormSection): ResolvedSectionHeaderVisual; getSectionHeaderAvatarSize(section: FormSection): NonNullable | null; private getSectionHeaderConfig; private getSectionHeaderFieldValue; private getSectionHeaderInitialsSourceValue; private getSectionHeaderFallbackIcon; private getSectionHeaderEmptyVisual; private getSectionHeaderAltText; private deriveSectionHeaderInitials; private resolveSectionHeaderImageSrc; private bytesToDataUrl; private firstNonEmptyString; getSectionClasses(section: FormSection): string[]; getSectionStyles(section: FormSection): Record | null; private sanitizeSectionStylesForEditorialContext; private isEditorialVisualContext; hasEditorialVisualContext(): boolean; private applyBorderPropsToStyle; private resolveRuleVisibility; private resolveFieldVisibility; private isFieldMetadataHidden; toggleSectionCollapse(event: Event, section: FormSection): void; sectionPanelId(section: FormSection, index: number): string; getSectionCollapsedSummary(section: FormSection): string; getColumnItems(column: FormColumn): FormLayoutItem[]; getColumnRenderItems(column: FormColumn): FormColumnRenderItem[]; getColumnFields(column: { fields?: string[]; items?: FormLayoutItem[]; id?: string; }): FieldMetadata[]; private isFieldRenderableInLayout; getRichContentLayoutItemDocument(item: FormLayoutItem): RichContentDocument | null; getRichContentLayoutItemLayout(item: FormLayoutItem): 'block' | 'inline'; private getVisualBlockRuleProps; private isRichContentLayoutItemVisible; private getColumnFieldsSignature; private getColumnItemsSignature; private getColumnRuleProps; private buildFieldRuleMetadataOverrides; private normalizeRuleFieldOptions; private getEffectiveColumn; getColumnClasses(column: FormColumn, row?: FormRow): string[]; private getColumnSpanClasses; private getProjectedGroupedCommandSpan; private getColumnControlType; private isColumnVisibleAtBreakpoint; private getColumnOffsetClasses; private getColumnOrderClasses; private getColumnHiddenClasses; isColumnVisible(column: FormColumn): boolean; getColumnPadding(column: FormColumn): number | undefined; getColumnStyles(column: FormColumn): Record | null; private _getConfirmationMessage; private _getConfirmationMessageForAliases; private _showConfirmationDialog; onFormAction(event: PraxisFormActionEvent): void; private dispatchRichContentAction; private emitRichContentCustomAction; private isRichContentActionAvailable; private hasRichContentCapability; private buildRichContentActionContext; private _executeAction; private getFormActionEventId; onSubmit(): Promise; private prepareAndSubmit; private waitForReactiveDeterminationsBeforeSubmit; private applySubmitFieldErrors; private clearSubmitFieldErrors; private clearSubmitFieldError; private resetSubmitErrorState; private resolveSubmitErrorMessage; private normalizeSubmitErrorTarget; private navigateAfterSave; private shouldConfirmCancelOnDirty; /** * TOGGLE DE CUSTOMIZAÇÃO DE LAYOUT - NÃO É EDIÇÃO DE DADOS * * Este método alterna entre: * - Modo normal: Usuário interage com dados do formulário (conforme mode: view/edit/create) * - Modo customização: Usuário pode mover sections/rows/columns e configurar layout * * IMPORTANTE: Independe completamente do mode do formulário */ toggleEditMode(): void; openAiAssistant(): void; openAiAssistantFromSession(session: PraxisAssistantSessionSnapshot): void; closeAiAssistant(): void; onAiAssistantPromptChange(prompt: string): void; onAiAssistantSubmit(prompt: string): void; onAiAssistantApply(): void; onAiAssistantRetry(): void; onAiAssistantCancel(): void; onAiAssistantQuickReply(reply: PraxisAssistantShellQuickReply): void; onAiAssistantEditMessage(message: PraxisAssistantShellMessage): void; onAiAssistantResendMessage(message: PraxisAssistantShellMessage): void; onAiAssistantLayoutChange(layout: PraxisAssistantShellLayout): void; aiAssistantTriggerTestId(position: string): string; private initializeAiAssistantController; private buildAiAssistantContextItems; private buildAiAssistantContextSnapshot; private syncAiAssistantSession; private hasAiAssistantSessionState; private resolveAiAssistantSessionId; private resolveAiAssistantOwnerId; private resolveAiAssistantRouteKey; private resolveAiAssistantSummary; private resolveAiAssistantBadge; private resolveAiAssistantIcon; private resolveAiAssistantSelectedTarget; private toAiAssistantTargetKind; private toAiAssistantTargetId; private toAiAssistantTargetLabel; private toAiAssistantPath; openConfigEditor(): Promise; onElementMouseEnter(event: MouseEvent, type: CanvasElementType, data: any, element?: HTMLElement): void; onElementMouseLeave(event: MouseEvent): void; onElementClick(event: MouseEvent, type: CanvasElementType, data: any, element?: HTMLElement): void; /** * Opens the appropriate editor based on current selection (section/row/column/field). */ openSelectedElementEditor(): void; onIgnoreOutdated(): void; onSnoozeOutdated(): void; private getSchemaMetaKey; private getSchemaMetaIndexKey; private getSchemaMetaKeyForSchemaId; private getSchemaMetaKeyForContext; private loadStoredSchemaMeta; private persistSchemaMeta; private enqueueSchemaMetaPersistence; private reconcileSchemaMetaPersistence; private rememberSchemaMetaContext; private isSameSchemaContext; private isStoredSchemaMetaForContext; private getPrefsKey; private getOutdatedIgnoreKey; private getOutdatedSnoozeKey; private getOutdatedNotifiedKey; private isOutdatedIgnored; private getOutdatedSnoozeUntil; private setOutdatedSnooze; private setOutdatedIgnore; private setOutdatedNotified; private wasOutdatedNotified; private resolveSchemaPrefs; shouldShowOutdatedInline(): boolean; private maybeShowOutdatedSnack; private verifyServerSchemaVersion; /** * Opens the Field Metadata Editor from the canvas toolbar when a field is selected. * Currently a safe stub until @praxisui/metadata-editor is available. */ openFieldMetadataEditor(): void; /** * Internal seam to open the metadata editor and wire up apply/save handlers. * Extracted for easier testing and to avoid coupling tests to dynamic import. */ private openFieldMetadataEditorInternal; private openRowEditor; private openColumnEditor; openSectionEditor(section: any, focusTarget?: 'title' | 'description'): void; private applyRowEditorValue; private applyColumnEditorValue; private resolveLayoutEditorLocation; private applyNestedLayoutEditorValue; private applySectionEditorValue; private resolveControlTypeEditorial; private getControlTypeIcon; /** * Friendly control type name resolved from the canonical editorial resolver when available. * Falls back only to neutral technical defaults when nothing can be resolved. */ private getControlTypeName; private applyNullDeletionPatch; private stripNullMarkersFromPatch; private mergeMetadataObjectPatch; private deleteMetadataPath; private getMetadataPath; /** * Applies a metadata patch to the field with the given name and rebuilds the form. */ private applyFieldMetadataPatch; /** Find the DynamicFieldLoaderDirective instance that currently hosts a given field */ private findLoaderForField; private applyLiveFieldMetadata; onToolbarMove(direction: 'up' | 'down'): void; onToolbarToggleReadonly(): void; onToolbarToggleRequired(): void; onToolbarToggleHidden(): void; onToolbarToggleDisabled(): void; /** Helper to update metadata of the currently selected field and refresh the control if needed */ private updateSelectedFieldMeta; onFieldMouseEnter(payload: { field: FieldMetadata; element: HTMLElement; }): void; onFieldMouseLeave(payload: { field: FieldMetadata; element: HTMLElement; }): void; onFieldClick(payload: { field: FieldMetadata; element: HTMLElement; }): void; onFieldFocus(payload: { field: FieldMetadata; element: HTMLElement; }): void; private selectCanvasField; private withMaterializedFieldPath; onDragStarted(event: { field: FieldMetadata; index: number; dragEvent: CdkDragStart; dragData: any; }): void; onDragMoved(event: { field: FieldMetadata; index: number; dragEvent: CdkDragMove; dragData: any; }): void; onDragEnded(event: { field: FieldMetadata; index: number; dragEvent: CdkDragEnd; dragData: any; }): void; onSectionDrop(event: CdkDragDrop): void; onRowDrop(event: CdkDragDrop): void; onColumnDrop(event: CdkDragDrop): void; onFieldDrop(event: CdkDragDrop): void; onSelectPath(pathPart: CanvasPathPart): void; /** * Creates a new section and uses the layout service to insert it * at the correct position. * @param sectionIndex The index of the section after which to insert the new one. */ addNewSectionAfter(sectionIndex: number): void; ngOnDestroy(): void; trackBySection(index: number, section: FormSection): string; trackByRow(index: number, row: FormRow): string; trackByColumn(index: number, column: FormColumn): string; /** Apply configuration or canonical authoring updates coming from external adapters (e.g., AI). */ applyConfigFromAdapter(nextConfig: FormConfig): void; applyConfigFromAdapter(nextConfig: DynamicFormAuthoringDocument): void; private buildDynamicFormEditorRuntimeContext; private buildResolvedRuntimeContractForEditor; private readLegacySchemaUrlForEditor; private captureCurrentContextSnapshot; private captureCurrentPresentationSnapshot; private captureCurrentSchemaPrefsSnapshot; private executeDynamicFormEditorApplyPlan; private attachRuntimeMetadataToDynamicFormConfig; private emitConfigPatchChange; private cloneFormConfigForPatch; private parsePresentationCssNumber; private clearDynamicFormEditorPersistence; private clearStoredPresentationSnapshots; private resetPresentationVarsToDefaults; private resetSchemaPrefsToDefaults; retryInitialization(): void; getErrorTitle(): string; showDetailedError(): void; private tryBuildExplicitSchemaContext; private buildSchemaContext; private getSchemaWithCache; private isReactiveValidationEnabled; private getReactiveValidationDebounceMs; private waitForGlobalConfigReadyForSchema; private setupReactiveValidation; private logRowGapsSnapshot; private applyPresentationVars; private applyPresentationConfig; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class FormConfigService { private readonly _state$; readonly state$: Observable; readonly config$: Observable; get currentConfig(): FormConfig; loadConfig(config: FormConfig): void; updateConfig(configUpdate: Partial): void; private updateState; /** * Export the current configuration as a JSON string. * @param pretty whether to pretty print the JSON */ exportToJson(pretty?: boolean): string; /** * Load a configuration from a JSON string. * Invalid JSON will emit an error on the service state. */ importFromJson(json: string): void; /** * Validate a configuration returning an array of error messages. */ validateConfig(config: FormConfig): string[]; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } interface JsonValidationResult { isValid: boolean; error?: string; document?: DynamicFormAuthoringDocument; config?: FormConfig; diagnostics?: EditorDiagnostic[]; } interface JsonEditorEvent { type: 'apply' | 'format' | 'validation'; payload: JsonValidationResult; } declare class JsonConfigEditorComponent implements OnInit, OnDestroy { private cdr; private configService; config: FormConfig | null; document: DynamicFormAuthoringDocument | null; configChange: EventEmitter; documentChange: EventEmitter; validationChange: EventEmitter; editorEvent: EventEmitter; jsonText: string; isValidJson: boolean; jsonError: string; diagnostics: EditorDiagnostic[]; private destroy$; private jsonTextChanges$; private readonly i18n; constructor(cdr: ChangeDetectorRef, configService: FormConfigService); ngOnInit(): void; ngOnDestroy(): void; onJsonTextChange(text: string): void; applyJsonChanges(): void; formatJson(): void; updateJsonFromConfig(config: FormConfig): void; updateJsonFromDocument(document: DynamicFormAuthoringDocument): void; /** * Força atualização do JSON com a configuração atual */ refreshJson(): void; getCurrentConfig(): FormConfig | null; getCurrentDocument(): DynamicFormAuthoringDocument | null; hasChanges(): boolean; private validateJson; private updateValidationState; insertHooksTemplate(): void; enableReactiveValidation(): void; tx(key: string, fallback: string, params?: Record): string; private resolveI18n; private interpolateFallback; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } interface VisualBlockRuleNodeOption { id: string; label: string; kind: string; roles: Array<'text' | 'title' | 'message'>; } type RuleAuthoringStatus = 'valid' | 'invalid-target' | 'invalid-condition' | 'unsupported-property' | 'sanitized-property' | 'runtime-only' | 'visual-builder-compatible' | 'llm-generated-pending-review'; interface FormRulePropertyIssue { property: string; reason: 'unsupported-property' | 'invalid-value' | 'sanitized-value'; } interface FormRuleTargetDiagnostic { type: NonNullable; id: string; exists: boolean; } interface FormRuleDiagnostics { ruleId: string; ruleName?: string; status: RuleAuthoringStatus[]; targetRefs: FormRuleTargetDiagnostic[]; conditionRefs: string[]; acceptedProperties: string[]; rejectedProperties: string[]; acceptedPropertiesWhenFalse: string[]; rejectedPropertiesWhenFalse: string[]; propertyIssues?: FormRulePropertyIssue[]; propertyIssuesWhenFalse?: FormRulePropertyIssue[]; runtimeOnlyReason?: string; } type ConfigEditorTabKey = 'general' | 'schema' | 'layout' | 'hooks' | 'presentation' | 'behavior' | 'hints' | 'actions' | 'rules' | 'cascades' | 'messages' | 'navigation' | 'json'; interface ConfigEditorTabOption { key: ConfigEditorTabKey; index: number; label: string; } interface CommandRulePreviewModel { state: 'ready' | 'invalid'; executionMode: 'preview-only'; actionId: string; condition: JsonLogicExpression | null; payload?: unknown; payloadExpr?: string; policy: { trigger: NonNullable; distinct: boolean; distinctBy?: string; runOnInitialEvaluation?: boolean; } & Omit; diagnostics: string[]; } declare class PraxisDynamicFormConfigEditor implements SettingsValueProvider, OnInit, OnDestroy { private storage; private configService; private settingsPanel; private cdr; jsonEditor?: JsonConfigEditorComponent; cascadeManager?: CascadeManagerTabComponent; editedConfig: FormConfig; ruleBuilderConfig: RuleBuilderConfig; ruleBuilderState?: RuleBuilderState; currentRules: FormLayoutRule[]; selectedConfigTabIndex: number; selectedCommandRuleId: string; commandRuleCondition: JsonLogicExpression | null; commandRuleConditionJson: string; commandRuleActionId: string; commandRulePayloadJson: string; private commandRulePayloadExpr; commandRuleDistinct: boolean; commandRuleDistinctBy: string; commandRuleRunOnInitialEvaluation: boolean; private commandRulePolicyTrigger; private commandRuleAdvancedPolicy; commandRuleAuthoringError: string | null; commandRulePayloadFieldErrors: Record; ruleDiagnostics: FormRuleDiagnostics[]; visualBlockNodeOptions: Record; ruleDiagnosticsSummary: { total: number; invalid: number; runtimeOnly: number; unsupported: number; pendingReview: number; }; private initialConfig; private initialDocument; private readonly openedWithCanonicalDocument; readonly runtimeContext?: DynamicFormRuntimeContext; readonly runtimeContract?: DynamicFormResolvedRuntimeContract; backConfig?: BackConfig; private includeBackConfigBlock; formId?: string; componentKeyId?: string; inputMode: 'create' | 'edit' | 'view'; private includeBindingsBlock; private readonly editorMode; get isPresentationMode(): boolean; supportsPresentationSettings: boolean; inputPresentationMode: boolean | null | undefined; get displayMode(): 'automatic' | 'fields' | 'presentation'; onDisplayModeChange(value: 'automatic' | 'fields' | 'presentation'): void; get displayModeHint(): string; useViewMode(): void; openPresentationStyle(): void; truncatePreview: boolean; previewItems: Array<{ label: string; value: string; }>; presentationPrefs: { labelPosition: 'above' | 'left'; labelFontSize?: number | null; valueFontSize?: number | null; compact?: boolean; density?: 'comfortable' | 'cozy' | 'compact'; labelWidth?: number | null; labelAlign?: 'start' | 'center' | 'end'; valueAlign?: 'start' | 'center' | 'end'; }; /** Ensure hints object exists (normalized upstream) */ private ensureHints; get helpPresentationDraft(): Required; onHelpPresentationDisplayChange(display: FormHelpPresentationConfig['display']): void; onHelpPresentationInlineMaxLengthChange(inlineMaxLength: number | string | null): void; private updateHelpPresentation; getHelpPreferPopoverControlsText(): string; onHelpPreferPopoverControlsChange(value: string): void; schemaPrefs: { notifyIfOutdated: 'inline' | 'snackbar' | 'both' | 'none'; snoozeMs: number; autoOpenSettingsOnOutdated: boolean; }; private includePresentationBlock; private includeSchemaPrefsBlock; serverMeta?: { serverHash?: string; lastVerifiedAt?: string; }; private destroy$; private hasProcessedInitialRuleState; private jsonEditorIsValid; private globalActionValidationIssues; private readonly i18n; readonly globalActionCatalog: GlobalActionCatalogEntry[]; isDirty$: BehaviorSubject; isValid$: BehaviorSubject; isBusy$: BehaviorSubject; private lastRulesSignature; private pendingRulePropertiesStateSignature; private readonly DEBUG; private debugLog; get configTabOptions(): ConfigEditorTabOption[]; configTabLabel(key: ConfigEditorTabKey): string; private buildPresentationPreviewItems; getConfigTabIndex(key: ConfigEditorTabKey): number; constructor(storage: AsyncConfigStorage, configService: FormConfigService, settingsPanel: SettingsPanelService, cdr: ChangeDetectorRef, globalActionCatalogSource?: ReadonlyArray, injectedData?: any); ngOnInit(): void; reset(): void; updateDirtyState(reason?: string): void; getSettingsValue(): any; onSave(): any; onJsonConfigChange(newValue: FormConfig | DynamicFormAuthoringDocument): void; onJsonValidationChange(result: JsonValidationResult): void; onJsonEditorEvent(_event: JsonEditorEvent): void; onConfigChange(newConfig: FormConfig): void; private updateValidityState; private collectGlobalActionValidationIssues; private collectGlobalActionValidationTargets; private findGlobalActionCatalogEntry; private buildGlobalActionCatalog; onRulesChanged(state: RuleBuilderState): void; onRulePropertiesChanged(rules: FormLayoutRule[]): void; get commandRules(): PraxisRuntimeConditionalEffectRule[]; get selectedCommandRule(): PraxisRuntimeConditionalEffectRule | undefined; onCommandRuleSelectionChange(): void; onCommandActionChange(): void; onCommandConditionChanged(condition: JsonLogicExpression | null): void; addCommandRule(): void; applyCommandRule(): void; deleteCommandRule(): void; get commandRuleActionSchema(): _praxisui_core.GlobalActionUiSchema | undefined; get commandRuleSurfaceOpenPayload(): SurfaceOpenPayload; shouldShowCommandActionField(field: GlobalActionField): boolean; isCommandActionFieldRequired(field: GlobalActionField): boolean; isCommandActionFieldMissing(field: GlobalActionField): boolean; hasCommandActionFieldError(key: string): boolean; getCommandActionFieldError(key: string): string; get commandRulePreview(): CommandRulePreviewModel; getCommandActionFieldValue(field: GlobalActionField): any; onCommandActionFieldChange(field: GlobalActionField, value: any): void; onCommandSurfaceOpenPayloadChange(payload: SurfaceOpenPayload): void; private initializeCommandRuleEditor; private loadCommandRuleEditor; private buildCommandRulePolicy; private updateCommandRules; private parseCommandRuleCondition; private parseOptionalJson; private parseCommandPayloadObject; private getCommandRuleErrorMessage; private collectCommandActionFieldValues; private setCommandActionFieldError; private clearCommandActionFieldError; private nextCommandRuleId; private getDefaultCommandActionId; private formatGlobalActionIssue; private computeRuleDiagnosticsSummary; getRuleStatusLabel(diagnostic: FormRuleDiagnostics): string; getRuleStatusTone(diagnostic: FormRuleDiagnostics): 'ok' | 'warn' | 'error'; canAcceptPendingLlmRule(diagnostic: FormRuleDiagnostics): boolean; canApplyRulePropertyFix(diagnostic: FormRuleDiagnostics): boolean; canOpenRuleJsonReview(diagnostic: FormRuleDiagnostics): boolean; openRuleJsonReview(ruleId: string): void; applyRulePropertyFix(ruleId: string): void; acceptPendingLlmRule(ruleId: string): void; getRuleDiagnosticDetails(diagnostic: FormRuleDiagnostics): string[]; private getRulePropertyIssueNames; private markLlmRuleAccepted; private refreshRuleDiagnostics; get jsonDocument(): DynamicFormAuthoringDocument; onBackConfigChange(): void; isBindingsBlockPersisted(): boolean; isPresentationBlockPersisted(): boolean; isSchemaPrefsBlockPersisted(): boolean; isBackConfigBlockPersisted(): boolean; hasResolvedRuntimeContract(): boolean; describeRuntimeSource(source?: DynamicFormRuntimeValueSource): string; onInputModeChange(): void; onPresentationPrefsChange(reason: string): void; onSchemaPrefsChange(reason: string): void; private createRuleBuilderConfig; private getVisualBuilderRulePropertySchema; private mapMetadataToSchema; private getVisualBlockTargetLabel; private getRuleFieldLabel; private getRuleFieldDescription; private refreshVisualBlockNodeOptions; private collectVisualBlockNodeOptions; private getVisualBlockNodeRoles; private findRichContentNodeText; private mapDataTypeToFieldType; ngOnDestroy(): void; onLayoutSelect(event: any): void; private openColumnEditor; private applyColumnEditorValue; onCascadeApply(patch: Record>): void; private syncCascadeManagerFields; private stripLegacy; private computeRulesSignature; restoreHintsDefaults(): void; private loadPrefsFromStorage; private normalizeMode; private buildAuthoringDocument; private normalizeResolvedRuntimeContract; private createBackConfigState; private mergePresentationPrefs; private mergeSchemaPrefs; private toPresentationSnapshot; private toSchemaPrefsSnapshot; private toBackConfigSnapshot; tx(key: string, fallback?: string, params?: Record): string; private resolveI18n; private interpolateFallback; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } interface FormConfigLike { fieldMetadata?: FieldMetadata[]; } declare function stripLegacyFieldMetadata(arr?: FieldMetadata[]): FieldMetadata[] | undefined; declare class PraxisFilterForm implements OnChanges, OnDestroy { private dynamicForm; config: FormConfig; formId?: string; resourcePath?: string; mode?: string; formReady: EventEmitter<{ formGroup: FormGroup>; }>; valueChange: EventEmitter<{ formData: Record; }>; submit: EventEmitter<{ formData: Record; }>; requestSearch: EventEmitter<{ formData: Record; }>; validityChange: EventEmitter; form: FormGroup>; private valueChangesSub?; private statusChangesSub?; private columnFieldsCache; private singleFieldCache; constructor(dynamicForm: DynamicFormService); ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; private buildForm; private buildRestorableValues; private hasExplicitDefaultValue; onFormSubmit(): void; getColumnFields(column: FormColumn): FieldMetadata[]; getSingleField(field: FieldMetadata): FieldMetadata[]; getColumnClasses(column: FormColumn): string | null; get fieldMetadata(): FieldMetadata[]; get hasLayout(): boolean; trackBySection(i: number, section: FormSection): string; trackByRow(i: number, _row: FormRow): string; trackByColumn(i: number, col: FormColumn): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** Metadata for PraxisFilterForm component */ declare const PRAXIS_FILTER_FORM_COMPONENT_METADATA: ComponentDocMeta; /** Provider to register PraxisFilterForm metadata. */ declare function providePraxisFilterFormMetadata(): Provider; interface PraxisFilterFormWidgetEditorInputs { config?: FormConfig | null; formId?: string; resourcePath?: string; mode?: DynamicFormMode | string; [key: string]: unknown; } interface PraxisFilterFormWidgetEditorValue { inputs: PraxisFilterFormWidgetEditorInputs; } declare class PraxisFilterFormWidgetConfigEditor implements SettingsValueProvider, AfterViewInit, OnDestroy { inputs: PraxisFilterFormWidgetEditorInputs | null; widgetKey?: string; formEditor?: PraxisDynamicFormConfigEditor; readonly isDirty$: BehaviorSubject; readonly isValid$: BehaviorSubject; readonly isBusy$: BehaviorSubject; private readonly subscription; ngAfterViewInit(): void; ngOnDestroy(): void; getSettingsValue(): PraxisFilterFormWidgetEditorValue; onSave(): PraxisFilterFormWidgetEditorValue; reset(): void; private initializeChildEditor; private buildValue; private createDocumentFromInputs; private normalizeMode; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** Tokens for theme colors used across the layout editor. */ declare enum LayoutColorToken { Surface = "--md-sys-color-surface", SurfaceVariant = "--md-sys-color-surface-variant", Outline = "--md-sys-color-outline", Primary = "--md-sys-color-primary" } /** * Persists UI preferences of the layout editor such as the fields palette state * and exposes helpers to read theme tokens. */ declare class LayoutPrefsService { private readonly paletteCollapsedKey; /** Returns whether the fields palette is collapsed. */ getPaletteCollapsed(): boolean; /** Persists the collapsed state of the fields palette. */ setPaletteCollapsed(collapsed: boolean): void; /** Returns the current value for a theme color token. */ getColor(token: LayoutColorToken): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } type VisualBlockPresetId = 'text' | 'notice' | 'divider' | 'infoCard' | 'callout' | 'keyValueList' | 'contractProof' | 'recordSummary' | 'lookupCard' | 'disclosure' | 'emptyState'; interface VisualBlockPreset { id: VisualBlockPresetId; labelKey: string; icon: string; } interface FieldDropEvent { event: CdkDragDrop; sectionIndex: number; rowIndex: number; } interface VisualBlockEvent { sectionIndex: number; rowIndex: number; columnIndex: number; itemId: string; } interface AddVisualBlockEvent { sectionIndex: number; rowIndex: number; columnIndex: number; presetId: VisualBlockPresetId; } interface AddApiFieldEvent { sectionIndex: number; rowIndex: number; columnIndex: number; fieldName: string; } interface AddLocalFieldEvent { sectionIndex: number; rowIndex: number; columnIndex: number; } interface EditFieldEvent { sectionIndex: number; rowIndex: number; columnIndex: number; fieldName: string; } interface MoveVisualBlockEvent extends VisualBlockEvent { direction: -1 | 1; } interface MoveVisualBlockToColumnEvent extends VisualBlockEvent { targetColumnIndex: number; } /** * Editor component for configuring sections, rows and fields of a dynamic form. * Provides a collapsible palette of available fields. */ declare class LayoutEditorComponent implements OnInit { config: FormConfig; configChange: EventEmitter; paletteCollapsed: boolean; protected readonly prefs: LayoutPrefsService; private readonly layoutService; private readonly settingsPanel; private readonly i18n; private visualBlockIdSequence; private localFieldSequence; protected readonly colorTokens: typeof LayoutColorToken; selected: { type: 'section' | 'row' | 'column' | 'field' | 'visualBlock'; sectionIndex?: number; rowIndex?: number; columnIndex?: number; fieldName?: string; itemId?: string; } | null; gapGlobal: number; setGapGlobal(val: number | string): void; adjustGapGlobal(delta: number): void; density: 'compact' | 'cozy' | 'regular'; get densityConfig(): { gridGap: number; sectionGap: number; }; chromeToggles: string[]; get borderEnabled(): boolean; get dividerEnabled(): boolean; get layoutSections(): FormSection[]; canApplyAll(): boolean; applyGapToAll(): void; ngOnInit(): void; handleKeydown(event: KeyboardEvent): void; /** * Toggles the fields palette and persists the collapsed state. */ togglePalette(): void; /** * Fields that are not yet placed in any section/column of the layout. */ get availableFields(): FieldMetadata[]; t(key: string, params?: Record): string; get columnDropListIds(): string[]; getColumnId(sectionIndex: number, rowIndex: number, columnIndex: number): string; private parseColumnId; select: EventEmitter; onSelect(sel: any): void; clearSelection(): void; selectSection(sectionIndex: number): void; selectRow(sectionIndex: number, rowIndex: number): void; selectColumn(sectionIndex: number, rowIndex: number, columnIndex: number): void; dropField({ event }: FieldDropEvent): void; private getColumnLayoutItemByIndex; private getColumnTargetByIndex; private getLayoutItemTargetByIndex; dropSection(event: CdkDragDrop): void; addSection(): void; removeSection(index: number): void; onSectionUpdated(index: number, updatedSection: FormSection): void; addVisualBlockToColumn(event: AddVisualBlockEvent): void; private createVisualBlockItemId; addApiFieldToColumn(event: AddApiFieldEvent): void; addLocalFieldToColumn(event: AddLocalFieldEvent): void; openFieldMetadataEditor(event: EditFieldEvent): void; private openFieldMetadataEditorInternal; private applyFieldMetadataPatch; private createLocalFieldName; openVisualBlockEditor(event: { sectionIndex: number; rowIndex: number; columnIndex: number; itemId: string; }): void; moveVisualBlock(event: MoveVisualBlockEvent): void; moveVisualBlockToColumn(event: MoveVisualBlockToColumnEvent): void; removeVisualBlock(event: VisualBlockEvent): void; private emitNewConfig; onApplyStyleToAll(patch: Partial): void; trackBySection(index: number, s: FormSection & { id?: string; }): string | number; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class RowConfiguratorComponent implements OnChanges { row: FormRow; fieldMetadata: FieldMetadata[]; availableFields: FieldMetadata[]; sectionIndex: number; rowIndex: number; isLastRow: boolean; selected: { type: 'section' | 'row' | 'column' | 'field' | 'visualBlock'; sectionIndex?: number; rowIndex?: number; columnIndex?: number; fieldName?: string; itemId?: string; } | null; availableFieldsListId: string | null; connectedDropListIds: string[]; /** Gap herdado do layout (usado como fallback visual) */ gapGlobal: number; rowChange: EventEmitter; remove: EventEmitter; applyRowGapAll: EventEmitter; fieldDrop: EventEmitter>; addVisualBlock: EventEmitter<{ rowIndex: number; columnIndex: number; presetId: VisualBlockPresetId; }>; addApiField: EventEmitter<{ rowIndex: number; columnIndex: number; fieldName: string; }>; addLocalField: EventEmitter<{ rowIndex: number; columnIndex: number; }>; editField: EventEmitter<{ rowIndex: number; columnIndex: number; fieldName: string; }>; editVisualBlock: EventEmitter<{ rowIndex: number; columnIndex: number; itemId: string; }>; moveVisualBlock: EventEmitter<{ rowIndex: number; columnIndex: number; itemId: string; direction: -1 | 1; }>; moveVisualBlockToColumn: EventEmitter<{ rowIndex: number; columnIndex: number; targetColumnIndex: number; itemId: string; }>; removeVisualBlock: EventEmitter<{ rowIndex: number; columnIndex: number; itemId: string; }>; select: EventEmitter; activeDropIndex: number | null; protected readonly visualBlockPresets: readonly VisualBlockPreset[]; private readonly i18n; private readonly dialog; private hoverTimer; protected readonly breakpoints: Breakpoint[]; previewBreakpoint: Breakpoint; menuContext: { type: 'row' | 'column'; columnIndex?: number; } | null; private connectedColumnsCache; private connectedColumnsSignature; ngOnChanges(changes: SimpleChanges): void; private rebuildConnectedColumnsCache; getFieldByName(fieldName: string): FieldMetadata; getColumnLayoutItems(column: FormColumn): FormLayoutItem[]; trackLayoutItem(_: number, item: FormLayoutItem): string; hasColumnContent(column: FormColumn): boolean; getVisualBlockLabel(item: FormLayoutItem): string; private findRichContentLabel; private findRichNodeLabel; t(key: string, params?: Record): string; getFieldLabel(field: FieldMetadata): string; selectVisualBlock(columnIndex: number, item: FormLayoutItem, event: Event): void; openVisualBlockEditor(columnIndex: number, item: FormLayoutItem, event: Event): void; moveVisualBlockItem(columnIndex: number, item: FormLayoutItem, direction: -1 | 1, event: Event): void; canMoveVisualBlockToColumn(columnIndex: number, direction: -1 | 1): boolean; moveVisualBlockToAdjacentColumn(columnIndex: number, item: FormLayoutItem, direction: -1 | 1, event: Event): void; removeVisualBlockItem(columnIndex: number, item: FormLayoutItem, event: Event): void; drop(event: CdkDragDrop): void; selectRow(): void; openColumnConfig(index: number): void; selectColumn(index: number, event: MouseEvent): void; selectField(fieldName: string, columnIndex: number, event: MouseEvent): void; openFieldEditor(fieldName: string, columnIndex: number, event: Event): void; openRowMenu(): void; onMenuClosed(): void; onDropEnter(index: number): void; onDropExit(index: number): void; isRowSelected(): boolean; isColumnSelected(i: number): boolean; isFieldSelected(fieldName: string): boolean; connectedColumns(index: number): string[]; addColumn(): void; removeColumn(index: number): void; removeRow(): void; moveColumn(index: number, direction: number): void; clearColumn(index: number): void; addVisualBlockToColumn(index: number, presetId: VisualBlockPresetId): void; addApiFieldToColumn(index: number, fieldName: string): void; addLocalFieldToColumn(index: number): void; addFieldToColumn(index: number): void; getColumnId(index: number): string; private generateId; applyPreset(spansMd: number[]): void; getColumnClass(column: any): string; getSpanClasses(column: any): string[]; getColumnClassList(column: any): string; getSpanFor(column: any, bp?: Breakpoint): number; getHiddenFor(column: any, bp?: Breakpoint): boolean; setSpan(columnIndex: number, value: number): void; adjustSpan(columnIndex: number, delta: number): void; toggleHidden(columnIndex: number): void; updateRowGap(kind: 'gap' | 'rowGap', value: number | string): void; adjustRowGapDelta(kind: 'gap' | 'rowGap', delta: number): void; applyRowGapToAll(): void; clearRowGap(): void; hasMultipleColumns(): boolean; getSpanTotal(bp?: Breakpoint): number; getOffsetFor(column: any, bp?: Breakpoint): number; setOffset(columnIndex: number, value: number): void; adjustOffset(columnIndex: number, delta: number): void; getSuggestedSpan(columnIndex: number): number | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class FieldConfiguratorComponent { private readonly registry; field: FieldMetadata; private readonly categoryByType; private resolveEditorialMeta; get icon(): string; get typeClass(): string; get typeSpecificClass(): string; get typeLabel(): string; get tooltip(): string; private readonly typeSpecificClassMap; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } interface PraxisDynamicFormWidgetEditorInputs { config?: FormConfig | null; mode?: DynamicFormMode; presentationModeGlobal?: boolean | null; presentation?: DynamicFormPresentationSnapshot | null; formId?: string; componentInstanceId?: string; backConfig?: BackConfig; notifyIfOutdated?: 'inline' | 'snackbar' | 'both' | 'none'; snoozeMs?: number; autoOpenSettingsOnOutdated?: boolean; [key: string]: unknown; } interface PraxisDynamicFormWidgetEditorValue { inputs: PraxisDynamicFormWidgetEditorInputs; } declare class PraxisDynamicFormWidgetConfigEditor implements SettingsValueProvider, AfterViewInit, OnDestroy { inputs: PraxisDynamicFormWidgetEditorInputs | null; widgetKey?: string; formEditor?: PraxisDynamicFormConfigEditor; readonly isDirty$: BehaviorSubject; readonly isValid$: BehaviorSubject; readonly isBusy$: BehaviorSubject; private readonly subscription; private initialEditorConfig?; private readonly cdr; ngAfterViewInit(): void; ngOnDestroy(): void; getSettingsValue(): PraxisDynamicFormWidgetEditorValue; onSave(): PraxisDynamicFormWidgetEditorValue; reset(): void; private initializeChildEditor; private buildValue; private createDocumentFromInputs; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** Metadata for PraxisDynamicForm component */ declare const PRAXIS_DYNAMIC_FORM_COMPONENT_METADATA: ComponentDocMeta; /** Provider para auto-registrar metadados do componente Dynamic Form. */ declare function providePraxisDynamicFormMetadata(): Provider; interface DomainRuleFormRulesRequestOptions extends DomainRuleRequestOptions { targetLayer?: string; targetArtifactType?: string; status?: string; } type DomainRuleMaterializedFormLayoutRule = FormLayoutRule & { metadata?: Record; }; declare class DomainRuleFormRulesService { private readonly domainRules; constructor(domainRules: DomainRuleService); listRulesForForm(targetArtifactKey: string, options?: DomainRuleFormRulesRequestOptions): Observable; materializationsToFormRules(materializations: DomainRuleMaterialization[] | null | undefined): DomainRuleMaterializedFormLayoutRule[]; materializationToFormRule(materialization: DomainRuleMaterialization): DomainRuleMaterializedFormLayoutRule | null; private asDirectFormRule; private visualBlockGuidanceToRule; private withDomainMetadata; private asRecord; private asStringArray; private resolveString; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class Ergadm00034CompactPresentationExampleComponent { private readonly dynamicLayout; readonly legacyFrequencyExample: _praxisui_dynamic_form.Ergadm00034CompactPresentationExample; readonly legacyFrequencyPresentationConfig: _praxisui_core.FormConfig; readonly legacyFrequencyInitialValue: Record; readonly legacyFrequencyRows: readonly _praxisui_dynamic_form.Ergadm00034LegacyFrequencyRow[]; readonly corporatePresentationExample: _praxisui_dynamic_form.CorporatePresentationExample; readonly corporatePresentationConfig: _praxisui_core.FormConfig; readonly corporatePresentationInitialValue: Record; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } interface Ergadm00034LegacyFrequencyRow { tipo: string; codigo: string; nome: string; preenchimento: string; marcador: string; selected?: boolean; } interface Ergadm00034CompactPresentationExample { readonly id: 'ergadm00034-compact-presentation'; readonly title: string; readonly resourcePath: string; readonly layoutPreset: 'compactPresentation'; readonly rows: readonly Ergadm00034LegacyFrequencyRow[]; readonly tableConfig: TableConfig; readonly metadata: readonly FieldMetadata[]; readonly initialValue: Record; } interface CorporatePresentationExample { readonly id: 'corporate-presentation-format-gallery'; readonly title: string; readonly resourcePath: string; readonly layoutPreset: 'compactPresentation'; readonly metadata: readonly FieldMetadata[]; readonly initialValue: Record; } declare const ERGADM00034_COMPACT_PRESENTATION_EXAMPLE: Ergadm00034CompactPresentationExample; declare const CORPORATE_PRESENTATION_FORMAT_GALLERY: CorporatePresentationExample; declare function buildErgadm00034CompactPresentationConfig(layoutService: DynamicFormLayoutService): FormConfig; declare function buildCorporatePresentationFormatGalleryConfig(layoutService: DynamicFormLayoutService): FormConfig; declare function isRuleSatisfied(rule: FormLayoutRule, data: unknown): boolean; /** * Applies all visibility rules to the provided data and * returns a map of field name to visibility state. */ declare function applyVisibilityRules(rules: FormLayoutRule[], data: any): Record; /** * Converts a RuleBuilderState produced by the visual builder into * an array of FormLayoutRule objects understood by the dynamic form. */ declare function ruleBuilderStateToFormLayoutRules(state: RuleBuilderState | null | undefined): FormLayoutRule[]; /** * Converts an array of FormLayoutRule back into a RuleBuilderState * so that the visual builder can display the saved rules. * * The conversion handles a limited subset of rules (visibility and * required/validation rules with simple field conditions). */ declare function formLayoutRulesToBuilderState(rules: FormLayoutRule[] | null | undefined): RuleBuilderState; /** * Recursively converts arrays representing dates into ISO-8601 strings. * Arrays are expected in the form `[year, month, day, hour?, minute?, second?, millisecond?]`. * Non-date arrays and other values are returned untouched. */ declare function normalizeDateArrays(data: any): any; /** * Helper provider to wire the PraxisDynamicForm component into the Settings Panel * GlobalConfigEditor without creating a hard import cycle. */ declare const SETTINGS_PANEL_DYNAMIC_FORM_PROVIDER: Provider; declare function provideSettingsPanelDynamicForm(): Provider; declare function createDynamicFormAuthoringDocument(source: { config?: unknown; bindings?: unknown; contextSnapshot?: unknown; }): DynamicFormAuthoringDocument; declare function parseLegacyOrDynamicFormDocument(raw: unknown): DynamicFormAuthoringDocument; declare function normalizeDynamicFormAuthoringDocument(doc: DynamicFormAuthoringDocument): DynamicFormAuthoringDocument; declare function validateDynamicFormAuthoringDocument(doc: DynamicFormAuthoringDocument, context?: DynamicFormValidationContext): EditorDiagnostic[]; declare function validateDynamicFormAuthoringInput(raw: unknown, context?: DynamicFormValidationContext): EditorDiagnostic[]; declare function toCanonicalDynamicFormConfig(doc: DynamicFormAuthoringDocument, _context?: DynamicFormProjectionContext): FormConfig; declare function buildDynamicFormApplyPlan(doc: DynamicFormAuthoringDocument, runtime?: DynamicFormRuntimeContext, options?: { saveConfig?: boolean; saveBindings?: boolean; saveContextSnapshot?: boolean; attachSchemaSnapshot?: boolean; replaceContext?: boolean; }): DynamicFormApplyPlan; declare function serializeDynamicFormAuthoringDocument(doc: DynamicFormAuthoringDocument): unknown; declare class CanvasToolbarComponent { selectedElement: CanvasElement | null; editMetadata: EventEmitter; delete: EventEmitter; moveUp: EventEmitter; moveDown: EventEmitter; selectPath: EventEmitter; /** Emite quando o usuário solicita fechar a toolbar (ESC). */ requestClose: EventEmitter; /** Estado interno para animar o fechamento. */ closing: boolean; private readonly closeAnimMs; private readonly i18n; toggleReadonly: EventEmitter; toggleRequired: EventEmitter; toggleHidden: EventEmitter; toggleDisabled: EventEmitter; get selectedLastType(): CanvasPathPart['type'] | null; get isField(): boolean; get isSection(): boolean; get isColumn(): boolean; get configTooltip(): string; get readonlyIcon(): string; get requiredIcon(): string; get visibilityIcon(): string; get disabledIcon(): string; /** Fecha a toolbar com a tecla ESC quando o componente está visível (com animação). */ onGlobalKeydown(ev: KeyboardEvent): void; /** Inicia animação de saída e emite o evento ao final. */ triggerClose(): void; tx(key: string, fallback: string, params?: Record): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } type ActionCatalogOption = { id: string; label: string; description?: string; payloadSchema?: GlobalActionCatalogEntry['payloadSchema']; param?: { required?: boolean; label?: string; placeholder?: string; hint?: string; example?: string; }; }; interface EditableFormSection extends FormSection { sectionHeader?: FormSectionHeaderConfig; appearance?: 'card' | 'plain' | 'step'; stepLabel?: string; collapsible?: boolean; collapsed?: boolean; order?: number; hidden?: { xs?: boolean; sm?: boolean; md?: boolean; lg?: boolean; xl?: boolean; }; className?: string; testId?: string; gapBottom?: number; titleGapBottom?: number; descriptionGapBottom?: number; titleStyle?: string; descriptionStyle?: string; titleColor?: string; descriptionColor?: string; headerAlign?: 'start' | 'center'; headerTooltip?: string; } declare class SectionEditorComponent implements OnInit, AfterViewInit, OnDestroy, SettingsValueProvider { private fb; private data; private iconPicker; focusTarget?: 'title' | 'description'; fieldMetadata: FieldMetadata[]; section: EditableFormSection; form: FormGroup; breakpoints: Breakpoint[]; fieldOptions: Array<{ value: string; label: string; }>; isDirty$: BehaviorSubject; isValid$: BehaviorSubject; isBusy$: BehaviorSubject; private readonly globalActionCatalogSource; private readonly i18n; readonly globalActionCatalog: ActionCatalogOption[]; readonly customActionValue = "__custom__"; private destroy$; private initialValueSig; titleInput?: ElementRef; descriptionInput?: ElementRef; constructor(fb: FormBuilder, data: { section: EditableFormSection; fieldMetadata?: FieldMetadata[]; }, iconPicker: IconPickerService); ngOnInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; getSettingsValue(): any; get headerActionsArray(): FormArray; getHeaderActionStylePlaceholder(): string; getActionCatalogLabel(spec: { label?: string; }): string; getHeaderActionSpecById(id: string): ActionCatalogOption | undefined; getHeaderActionSelectValue(value?: string, globalAction?: GlobalActionRef): string; getHeaderActionParam(value?: string, globalAction?: GlobalActionRef): string; getHeaderActionCustomValue(value?: string, globalAction?: GlobalActionRef): string; getHeaderGlobalActionSchema(value?: string, globalAction?: GlobalActionRef): _praxisui_core.GlobalActionUiSchema | undefined; getHeaderSurfaceOpenActionPayload(value?: string, globalAction?: GlobalActionRef): SurfaceOpenPayload; isHeaderActionParamMissing(value?: string, globalAction?: GlobalActionRef): boolean; onHeaderActionSelectChange(index: number, value: string): void; onHeaderActionParamChange(index: number, value: string): void; onHeaderActionCustomChange(index: number, value: string): void; pickHeaderActionIcon(index: number): Promise; clearHeaderActionIcon(index: number): void; applyHeaderActionStylePreset(index: number, preset: 'default' | 'soft-pill' | 'primary-pill' | 'critical-pill'): void; getHeaderActionPreviewStyles(index: number): Record | null; onHeaderSurfaceOpenActionPayloadChange(index: number, payload: SurfaceOpenPayload): void; pickIcon(): Promise; clearIcon(): void; pickFallbackIcon(): Promise; clearFallbackIcon(): void; addHeaderAction(): void; removeHeaderAction(index: number): void; moveHeaderActionUp(index: number): void; moveHeaderActionDown(index: number): void; private syncCollapsedControlState; applyPreset(key: 'default' | 'simple' | 'collapsible' | 'denseGrid'): void; setCustomColors(value: string): void; onTitleStyleChange(style: string): void; onDescriptionStyleChange(style: string): void; trackFieldOption(index: number, field: { value: string; }): string; tx(key: string, fallback: string, params?: Record): string; private applyNormalizedFormValue; private normalizeSectionFormValue; private normalizeSectionHeader; private createHeaderActionGroup; private moveHeaderAction; private normalizeHeaderActions; private mapCatalogEntryToActionSpec; private getActionCatalogDescription; private normalizeHeaderGlobalAction; private headerActionStyleValidator; private stringifyHeaderActionStyle; private parseHeaderActionStyle; private normalizeOptionalString; private normalizeOptionalNumber; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } interface EditableFormRow extends FormRow { order?: number; gap?: number; rowGap?: number; wrap?: boolean; hidden?: { xs?: boolean; sm?: boolean; md?: boolean; lg?: boolean; xl?: boolean; }; className?: string; testId?: string; } declare class RowEditorComponent implements OnInit, OnDestroy, SettingsValueProvider { private fb; private data; form: FormGroup; breakpoints: Breakpoint[]; row: EditableFormRow; hiddenMode: 'none' | 'mobile' | 'desktop'; isDirty$: BehaviorSubject; isValid$: BehaviorSubject; isBusy$: BehaviorSubject; private destroy$; private initialValueSig; private readonly i18n; constructor(fb: FormBuilder, data: { row: EditableFormRow; }); ngOnInit(): void; ngOnDestroy(): void; getSettingsValue(): any; displayValue(value: number | null | undefined, fallback: string): string | number; displayPxValue(value: number | null | undefined): string; visibilityStateLabel(bp: Breakpoint): string; private setColumns; applyPreset(preset: 'full' | 'half' | 'thirds' | 'thirdTwoThird' | 'twoThirdThird' | 'autoBalance'): void; private resolveHiddenMode; setHiddenMode(mode: 'none' | 'mobile' | 'desktop'): void; tx(key: string, fallback: string, params?: Record): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class ColumnEditorComponent implements OnInit, OnDestroy, SettingsValueProvider { private fb; private data; form: FormGroup; breakpoints: Breakpoint[]; previewBreakpoint: Breakpoint; column: FormColumn; isDirty$: BehaviorSubject; isValid$: BehaviorSubject; isBusy$: BehaviorSubject; private destroy$; private _previewTimer; private initialValueSig; private readonly i18n; constructor(fb: FormBuilder, data: { column: FormColumn; }); ngOnInit(): void; ngOnDestroy(): void; private applyChanges; getSettingsValue(): any; onBreakpointChange(bp: Breakpoint): void; private getControl; getSpan(bp: Breakpoint): number; setSpan(value: number | string): void; adjustSpan(delta: number): void; getOffset(bp: Breakpoint): number; setOffset(value: number | string): void; adjustOffset(delta: number): void; getOrder(bp: Breakpoint): number; setOrder(value: number | string): void; isHidden(bp: Breakpoint): boolean; toggleHidden(): void; copyToLarger(): void; resetResponsive(): void; applyPreset(key: 'full' | 'half' | 'third' | 'twoThird' | 'centered' | 'narrowSidebar' | 'wideContent' | 'stackMobile' | 'hideMobile' | 'desktopOnly'): void; toggleHiddenBp(bp: Breakpoint): void; tx(key: string, fallback: string, params?: Record): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class FieldEditorComponent { field: FieldMetadata | null; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class ActionsEditorComponent { actions: any; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * Catálogo de capacidades do PraxisDynamicForm para uso da IA. * Paths seguem o schema do FormConfig (layout + metadados de campos). */ declare module '@praxisui/core' { interface AiCapabilityCategoryMap { fields: true; rules: true; api: true; messages: true; metadata: true; hooks: true; actions: true; editorial: true; } } type CapabilityCategory$1 = AiCapabilityCategory; type ValueKind$1 = AiValueKind; interface Capability$1 extends AiCapability { category: CapabilityCategory$1; } interface CapabilityCatalog$1 extends AiCapabilityCatalog { capabilities: Capability$1[]; } declare enum ColumnAlign { Start = "start", Center = "center", End = "end", Stretch = "stretch" } declare enum FormActionsLayoutPosition { Left = "left", Center = "center", Right = "right", Justified = "justified", Split = "split" } declare enum FormActionsLayoutMobilePosition { Left = "left", Center = "center", Right = "right", Justified = "justified" } declare enum FormActionsLayoutOrientation { Horizontal = "horizontal", Vertical = "vertical" } declare enum FormActionsLayoutSpacing { Compact = "compact", Normal = "normal", Spacious = "spacious" } declare enum FormActionsLayoutPlacement { InsideLastSection = "insideLastSection", AfterSections = "afterSections", Top = "top" } declare enum FormActionButtonColor { Primary = "primary", Accent = "accent", Warn = "warn", Basic = "basic" } declare enum FormActionButtonSize { Small = "small", Medium = "medium", Large = "large" } declare enum FormActionButtonVariant { Raised = "raised", Stroked = "stroked", Flat = "flat", Fab = "fab" } declare enum FormActionButtonType { Button = "button", Submit = "submit", Reset = "reset" } declare enum FormRuleTargetType { Field = "field", Section = "section", Action = "action", Row = "row", Column = "column", VisualBlock = "visualBlock" } declare enum FormRuleContext { Visibility = "visibility", ReadOnly = "readOnly", Style = "style", Validation = "validation", Notification = "notification" } declare enum FieldAppearance { Fill = "fill", Outline = "outline" } declare enum FieldFloatLabel { Auto = "auto", Always = "always", Never = "never" } declare enum FieldHintPosition { Start = "start", End = "end" } declare enum SectionTitleStyle { TitleLarge = "titleLarge", TitleMedium = "titleMedium", TitleSmall = "titleSmall", HeadlineSmall = "headlineSmall" } declare enum SectionDescriptionStyle { BodyLarge = "bodyLarge", BodyMedium = "bodyMedium", BodySmall = "bodySmall" } declare const ENUMS: { iconPosition: string[]; iconSize: string[]; validationMode: string[]; dependencyMergeStrategy: string[]; dependencyLoadOnChange: string[]; textTransformApply: string[]; visibleIn: string[]; columnAlign: ColumnAlign[]; formActionsLayoutPosition: FormActionsLayoutPosition[]; formActionsLayoutMobilePosition: FormActionsLayoutMobilePosition[]; formActionsLayoutOrientation: FormActionsLayoutOrientation[]; formActionsLayoutSpacing: FormActionsLayoutSpacing[]; formActionsLayoutPlacement: FormActionsLayoutPlacement[]; formActionButtonColor: FormActionButtonColor[]; formActionButtonSize: FormActionButtonSize[]; formActionButtonVariant: FormActionButtonVariant[]; formActionButtonType: FormActionButtonType[]; formRuleTargetType: FormRuleTargetType[]; formRuleContext: FormRuleContext[]; fieldAppearance: FieldAppearance[]; fieldFloatLabel: FieldFloatLabel[]; fieldHintPosition: FieldHintPosition[]; sectionTitleStyle: SectionTitleStyle[]; sectionDescriptionStyle: SectionDescriptionStyle[]; editorialContentFormat: string[]; }; declare const FORM_AI_CAPABILITIES: CapabilityCatalog$1; declare const TASK_PRESETS: Record; declare function getFormCapabilities(): Capability$1[]; declare function getFormEnum(name: keyof typeof ENUMS): string[]; /** * Component-level capabilities for form components and dialog hosts. * Paths assume a wrapper shape: { inputs: {...}, outputs: {...} }. */ declare module '@praxisui/core' { interface AiCapabilityCategoryMap { inputs: true; outputs: true; } } type CapabilityCategory = AiCapabilityCategory; type ValueKind = AiValueKind; interface Capability extends AiCapability { category: CapabilityCategory; } interface CapabilityCatalog extends AiCapabilityCatalog { capabilities: Capability[]; } declare const FORM_COMPONENT_AI_CAPABILITIES: CapabilityCatalog; /** * Aggregates the macro form capabilities with the specific micro capabilities * of the fields present in the form configuration. */ declare function getFormAiCatalog(formConfig?: FormConfig): AiCapabilityCatalog; type DynamicFormRuleTargetType = NonNullable; interface DynamicFormRuleAuthoringField { name: string; label?: string; type?: string; source?: string; submitPolicy?: string; } interface DynamicFormRuleAuthoringTarget { id: string; label?: string; } interface DynamicFormRuleAuthoringVisualBlockNode { id: string; label: string; kind: string; roles: Array<'text' | 'title' | 'message'>; } type DynamicFormRuleAuthoringTargets = Record; type DynamicFormRuleAuthoringTargetDetails = Record; type DynamicFormAllowedRuleProperties = Record; interface DynamicFormRuleAuthoringContext { component: 'praxis-dynamic-form'; capabilityCatalogVersion: string; fields: DynamicFormRuleAuthoringField[]; targets: DynamicFormRuleAuthoringTargets; targetDetails: DynamicFormRuleAuthoringTargetDetails; allowedRuleProperties: DynamicFormAllowedRuleProperties; visualBlockNodes: Record; existingRules: FormLayoutRule[]; diagnostics: FormRuleDiagnostics[]; guardrails: string[]; } declare function buildDynamicFormRuleAuthoringContext(config: Pick): DynamicFormRuleAuthoringContext; /** * Manifesto de authoring canônico para o componente praxis-dynamic-form. * Este arquivo define as operações permitidas pela IA para editar formulários. * * @version 1.5.4 * @status COMPLIANT - Alinhado com contrato v2, gate de aceitação e semântica local/schema-backed. */ declare const PRAXIS_DYNAMIC_FORM_AUTHORING_MANIFEST: ComponentAuthoringManifest; /** * Projeção governada do contrato de formulário para o runtime reduzido de filtros. * * O Filter Form compartilha FormConfig e DynamicFormAuthoringDocument, mas não * executa submitPolicy, visual blocks, rules ou a action bar do Dynamic Form. */ declare const PRAXIS_FILTER_FORM_AUTHORING_PROJECTION: { readonly sourceComponentId: "praxis-dynamic-form"; readonly componentId: "praxis-filter-form"; readonly manifestVersion: "1.0.0"; readonly runtimeInputNames: readonly ["config", "formId", "resourcePath", "mode"]; readonly operationIds: readonly ["field.label.set", "field.placeholder.set", "field.required.set", "field.readOnly.set", "field.disabled.set", "field.hidden.set", "field.controlType.set", "field.optionSource.set", "field.local.add", "field.local.remove", "layout.section.add", "layout.section.remove", "layout.row.add", "layout.column.add", "layout.field.move"]; readonly roundTripRequirements: readonly ["strip-undefined", "stable-field-order", "preserve-local-field-source", "preserve-section-row-column-ids"]; }; declare const PRAXIS_FILTER_FORM_AUTHORING_MANIFEST: _praxisui_core.ComponentAuthoringManifest; export { ActionsEditorComponent, CORPORATE_PRESENTATION_FORMAT_GALLERY, CanvasStateService, CanvasToolbarComponent, ColumnEditorComponent, DomainRuleFormRulesService, DynamicFormLayoutService, ERGADM00034_COMPACT_PRESENTATION_EXAMPLE, Ergadm00034CompactPresentationExampleComponent, FORM_AI_CAPABILITIES, FORM_COMPONENT_AI_CAPABILITIES, FieldConfiguratorComponent, FieldEditorComponent, FormConfigService, FormContextService, FormLayoutService, FormRulesService, JsonConfigEditorComponent, LayoutColorToken, LayoutEditorComponent, LayoutPrefsService, PRAXIS_DYNAMIC_FORM_AUTHORING_MANIFEST, PRAXIS_DYNAMIC_FORM_COMPONENT_METADATA, PRAXIS_FILTER_FORM_AUTHORING_MANIFEST, PRAXIS_FILTER_FORM_AUTHORING_PROJECTION, PRAXIS_FILTER_FORM_COMPONENT_METADATA, PraxisDynamicForm, PraxisDynamicFormConfigEditor, PraxisDynamicFormWidgetConfigEditor, PraxisFilterForm, PraxisFilterFormWidgetConfigEditor, PraxisFormActionsComponent, RowConfiguratorComponent, RowEditorComponent, SETTINGS_PANEL_DYNAMIC_FORM_PROVIDER, SectionEditorComponent, TASK_PRESETS, applyVisibilityRules, buildCorporatePresentationFormatGalleryConfig, buildDynamicFormApplyPlan, buildDynamicFormRuleAuthoringContext, buildErgadm00034CompactPresentationConfig, createDynamicFormAuthoringDocument, formLayoutRulesToBuilderState, getFormAiCatalog, getFormCapabilities, getFormEnum, isRuleSatisfied, normalizeDateArrays, normalizeDynamicFormAuthoringDocument, parseLegacyOrDynamicFormDocument, providePraxisDynamicFormMetadata, providePraxisFilterFormMetadata, provideSettingsPanelDynamicForm, ruleBuilderStateToFormLayoutRules, serializeDynamicFormAuthoringDocument, stripLegacyFieldMetadata, toCanonicalDynamicFormConfig, validateDynamicFormAuthoringDocument, validateDynamicFormAuthoringInput }; export type { CanvasElement, CanvasElementType, CanvasPathPart, Capability$1 as Capability, CapabilityCatalog$1 as CapabilityCatalog, CapabilityCategory$1 as CapabilityCategory, CorporatePresentationExample, DomainRuleFormRulesRequestOptions, DomainRuleMaterializedFormLayoutRule, DynamicFieldRenderErrorEvent, DynamicFormAllowedRuleProperties, DynamicFormApplyPlan, DynamicFormAuthoringDocument, DynamicFormBindings, DynamicFormConfigPatchChangeEvent, DynamicFormContextSnapshot, DynamicFormGeneratedLayoutPreset, DynamicFormMode, DynamicFormPresentationSnapshot, DynamicFormProjectionContext, DynamicFormResolvedRuntimeContract, DynamicFormRuleAuthoringContext, DynamicFormRuleAuthoringField, DynamicFormRuleAuthoringTarget, DynamicFormRuleAuthoringTargetDetails, DynamicFormRuleAuthoringTargets, DynamicFormRuleAuthoringVisualBlockNode, DynamicFormRuleTargetType, DynamicFormRuntimeContext, DynamicFormRuntimeValueSource, DynamicFormSchemaPrefsSnapshot, DynamicFormValidationContext, EditorDiagnostic, EditorDocument, Ergadm00034CompactPresentationExample, Ergadm00034LegacyFrequencyRow, FieldPath, FieldPathContainer, FieldPathWithIndex, Capability as FormComponentCapability, CapabilityCatalog as FormComponentCapabilityCatalog, CapabilityCategory as FormComponentCapabilityCategory, ValueKind as FormComponentValueKind, FormConfigLike, GenerateFormConfigFromMetadataOptions, IdPath, InsertLocalFieldOptions, InsertLocalFieldResult, JsonEditorEvent, JsonValidationResult, LayoutChange, LayoutResult, LocalFieldInsertionDiagnostic, LocalFieldInsertionDiagnosticCode, Operation, Path, PathWithIndex, PraxisDynamicFormDomainRulesOptions, PraxisDynamicFormEmptyState, PraxisDynamicFormWidgetEditorInputs, PraxisDynamicFormWidgetEditorValue, PraxisFilterFormWidgetEditorInputs, PraxisFilterFormWidgetEditorValue, PraxisFormActionEvent, RemovePolicy, RuleApplicationContext, RuleApplicationDiagnostic, RuleApplicationDiagnosticCode, RuleApplicationResult, RuleApplicationTargetIndex, RuleApplicationTargetType, ValidationReport, ValueKind$1 as ValueKind };