@praxisui/dynamic-form 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts ADDED
@@ -0,0 +1,1104 @@
1
+ import * as i0 from '@angular/core';
2
+ import { OnChanges, OnDestroy, EventEmitter, SimpleChanges, OnInit, ChangeDetectorRef, Provider } from '@angular/core';
3
+ import { FormGroup, FormBuilder } from '@angular/forms';
4
+ import { MatDialog } from '@angular/material/dialog';
5
+ import { MatSnackBar } from '@angular/material/snack-bar';
6
+ import { CdkDragStart, CdkDragMove, CdkDragEnd, CdkDragDrop } from '@angular/cdk/drag-drop';
7
+ import { ConfigStorage, FormLayout, FieldMetadata, FormLayoutRule, FormRuleContext, ValidatorOptions, FormSection, FormRow, FormColumn, FormConfig, FormActionButton, BackConfig, FormHooksLayout, EndpointConfig, FormSubmitEvent, FormReadyEvent, FormValueChangeEvent, SyncResult, FormInitializationError, FormCustomActionEvent, FormActionConfirmationEvent, GenericCrudService, ConnectionStorage, DynamicFormService, ErrorMessageService, SchemaNormalizerService, ComponentMetadataRegistry, GlobalConfigService, FormHooksRegistry, FormHookPreset, FormConfigState, FieldDefinition, ComponentDocMeta, Breakpoint, IconPickerService } from '@praxisui/core';
8
+ import * as rxjs from 'rxjs';
9
+ import { Observable, BehaviorSubject } from 'rxjs';
10
+ import { SettingsPanelService, SettingsValueProvider } from '@praxisui/settings-panel';
11
+ import { KeyboardShortcutService } from '@praxisui/dynamic-fields';
12
+ import { RuleBuilderConfig, RuleBuilderState } from '@praxisui/visual-builder';
13
+
14
+ declare class FormLayoutService {
15
+ private storage?;
16
+ constructor(storage?: ConfigStorage | undefined);
17
+ loadLayout(formId: string): FormLayout | null;
18
+ saveLayout(formId: string, layout: FormLayout): void;
19
+ clearLayout(formId: string): void;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormLayoutService, [{ optional: true; }]>;
21
+ static ɵprov: i0.ɵɵInjectableDeclaration<FormLayoutService>;
22
+ }
23
+
24
+ declare class FormContextService {
25
+ private fieldsByContext;
26
+ private componentsByContext;
27
+ private formRulesByContext;
28
+ private currentContext;
29
+ getCurrentContext(): string;
30
+ setContext(context: string): void;
31
+ getAvailableFields$(): Observable<FieldMetadata[]>;
32
+ setAvailableFields(fields: FieldMetadata[]): void;
33
+ registerFieldComponent(fieldName: string, component: any): void;
34
+ getFieldComponent(fieldName: string): any | null;
35
+ unregisterFieldComponent(fieldName: string): void;
36
+ setFormRules(rules: FormLayoutRule[]): void;
37
+ getFormRuleById(ruleId: string): FormLayoutRule | undefined;
38
+ getFormRulesByContext(ruleContext: FormRuleContext): FormLayoutRule[];
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormContextService, never>;
40
+ static ɵprov: i0.ɵɵInjectableDeclaration<FormContextService>;
41
+ }
42
+
43
+ /**
44
+ * The result of applying a set of rules against a form's data.
45
+ */
46
+ interface RuleEvaluationResult {
47
+ /**
48
+ * A map where the key is the field name and the value is a boolean
49
+ * indicating if the field should be visible.
50
+ */
51
+ visibility: {
52
+ [fieldName: string]: boolean;
53
+ };
54
+ /**
55
+ * A map where the key is the field name and the value is a boolean
56
+ * indicating if the field should be required.
57
+ */
58
+ required: {
59
+ [fieldName: string]: boolean;
60
+ };
61
+ /**
62
+ * A map where the key is the field name and the value is a boolean
63
+ * indicating if the field should be read-only (disabled but visible).
64
+ */
65
+ readonly?: {
66
+ [fieldName: string]: boolean;
67
+ };
68
+ /**
69
+ * Optional validator overrides computed from rules for each field.
70
+ */
71
+ metaUpdates?: {
72
+ [fieldName: string]: Partial<ValidatorOptions>;
73
+ };
74
+ }
75
+ declare class FormRulesService {
76
+ /**
77
+ * Evaluates a set of form rules against the current value of a FormGroup.
78
+ *
79
+ * @param formGroup The Angular FormGroup to evaluate against.
80
+ * @param formRules The array of rules to process.
81
+ * @returns A RuleEvaluationResult object containing the visibility and required states for the fields.
82
+ */
83
+ applyRules(formGroup: FormGroup, formRules: FormLayoutRule[]): RuleEvaluationResult;
84
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormRulesService, never>;
85
+ static ɵprov: i0.ɵɵInjectableDeclaration<FormRulesService>;
86
+ }
87
+
88
+ type CanvasElementType = 'section' | 'row' | 'column' | 'field' | 'actions';
89
+ interface CanvasPathPart {
90
+ type: CanvasElementType;
91
+ name: string;
92
+ data: FormSection | FormRow | FormColumn | FieldMetadata | any;
93
+ domElement: HTMLElement;
94
+ }
95
+ interface CanvasElement {
96
+ type: CanvasElementType;
97
+ domElement: HTMLElement;
98
+ data: FormSection | FormRow | FormColumn | FieldMetadata | any;
99
+ path: CanvasPathPart[];
100
+ }
101
+
102
+ /** Service providing immutable operations over form layout configuration. */
103
+ type RemovePolicy = 'keepEmptyContainers' | 'pruneEmptyContainers';
104
+ interface Operation {
105
+ type: string;
106
+ correlationId?: string;
107
+ origin?: string;
108
+ from?: {
109
+ sectionId?: string;
110
+ rowId?: string;
111
+ columnId?: string;
112
+ fieldName?: string;
113
+ sectionIndex?: number;
114
+ rowIndex?: number;
115
+ colIndex?: number;
116
+ fieldIndex?: number;
117
+ };
118
+ to?: {
119
+ sectionId?: string;
120
+ rowId?: string;
121
+ columnId?: string;
122
+ fieldName?: string;
123
+ sectionIndex?: number;
124
+ rowIndex?: number;
125
+ colIndex?: number;
126
+ fieldIndex?: number;
127
+ toIndex?: number;
128
+ toFieldIndex?: number;
129
+ };
130
+ policy?: RemovePolicy;
131
+ meta?: any;
132
+ [key: string]: any;
133
+ }
134
+ interface LayoutResult {
135
+ config: FormConfig;
136
+ op: Operation;
137
+ }
138
+ interface LayoutChange {
139
+ timestamp: number;
140
+ op: Operation;
141
+ config: FormConfig;
142
+ }
143
+ interface Path {
144
+ sectionIndex: number;
145
+ rowIndex?: number;
146
+ colIndex?: number;
147
+ }
148
+ interface PathWithIndex extends Path {
149
+ toIndex: number;
150
+ }
151
+ interface FieldPath extends Path {
152
+ colIndex: number;
153
+ fieldIndex: number;
154
+ }
155
+ interface FieldPathWithIndex extends Path {
156
+ colIndex: number;
157
+ toFieldIndex: number;
158
+ }
159
+ interface FieldPathContainer extends Path {
160
+ colIndex: number;
161
+ }
162
+ interface IdPath {
163
+ sectionId: string;
164
+ rowId?: string;
165
+ columnId?: string;
166
+ fieldName?: string;
167
+ }
168
+ interface ValidationReport {
169
+ valid: boolean;
170
+ errors: string[];
171
+ }
172
+ declare class DynamicFormLayoutService {
173
+ private readonly changesSubject;
174
+ readonly changes$: rxjs.Observable<LayoutChange>;
175
+ private emit;
176
+ normalizeConfig(config: FormConfig): FormConfig;
177
+ validateConfig(config: FormConfig): ValidationReport;
178
+ generateFormConfigFromMetadata(fields: FieldMetadata[], options?: {
179
+ fieldsPerRow?: number;
180
+ defaultSectionTitle?: string;
181
+ }): FormConfig;
182
+ getElementPath(config: FormConfig, element: HTMLElement): CanvasPathPart[];
183
+ updateElement(config: FormConfig, path: CanvasPathPart[], updatedData: any, options?: {
184
+ correlationId?: string;
185
+ origin?: string;
186
+ }): LayoutResult;
187
+ private resolvePath;
188
+ resolvePathByIds(config: FormConfig, ids: IdPath): FieldPath;
189
+ private createRowsFromFields;
190
+ private genId;
191
+ private capitalizeFirstLetter;
192
+ private assertIndex;
193
+ private mutate;
194
+ moveSection(config: FormConfig, fromIndex: number, toIndex: number): LayoutResult;
195
+ insertSection(config: FormConfig, section: any, atIndex?: number): LayoutResult;
196
+ removeSection(config: FormConfig, index: number, _policy?: RemovePolicy): LayoutResult;
197
+ moveRow(config: FormConfig, from: Path, to: PathWithIndex): LayoutResult;
198
+ insertRow(config: FormConfig, sectionIndex: number, row: any, atIndex?: number): LayoutResult;
199
+ removeRow(config: FormConfig, sectionIndex: number, rowIndex: number, policy?: RemovePolicy): LayoutResult;
200
+ moveColumn(config: FormConfig, from: Path, to: PathWithIndex): LayoutResult;
201
+ insertColumn(config: FormConfig, secIdx: number, rowIdx: number, col: any, atIndex?: number): LayoutResult;
202
+ removeColumn(config: FormConfig, secIdx: number, rowIdx: number, colIdx: number, policy?: RemovePolicy): LayoutResult;
203
+ moveField(config: FormConfig, from: FieldPath, to: FieldPathWithIndex, options?: {
204
+ policy?: RemovePolicy;
205
+ correlationId?: string;
206
+ origin?: string;
207
+ }): LayoutResult;
208
+ insertField(config: FormConfig, target: FieldPathContainer, field: any, atIdx?: number): LayoutResult;
209
+ removeField(config: FormConfig, secIdx: number, rowIdx: number, colIdx: number, fieldIndex: number, options?: {
210
+ policy?: RemovePolicy;
211
+ correlationId?: string;
212
+ origin?: string;
213
+ }): LayoutResult;
214
+ moveSectionById(config: FormConfig, sectionId: string, toIndex: number, options?: {
215
+ correlationId?: string;
216
+ origin?: string;
217
+ }): LayoutResult;
218
+ removeSectionById(config: FormConfig, sectionId: string, policy?: RemovePolicy): LayoutResult;
219
+ moveRowById(config: FormConfig, sectionId: string, rowId: string, toSectionId: string, toIndex: number, options?: {
220
+ correlationId?: string;
221
+ origin?: string;
222
+ }): LayoutResult;
223
+ insertRowById(config: FormConfig, sectionId: string, row: FormRow, atIndex?: number): LayoutResult;
224
+ removeRowById(config: FormConfig, sectionId: string, rowId: string, policy?: RemovePolicy): LayoutResult;
225
+ moveColumnById(config: FormConfig, sectionId: string, rowId: string, columnId: string, toSectionId: string, toRowId: string, toIndex: number, options?: {
226
+ correlationId?: string;
227
+ origin?: string;
228
+ }): LayoutResult;
229
+ insertColumnById(config: FormConfig, sectionId: string, rowId: string, column: FormColumn, atIndex?: number): LayoutResult;
230
+ removeColumnById(config: FormConfig, sectionId: string, rowId: string, columnId: string, policy?: RemovePolicy): LayoutResult;
231
+ moveFieldById(config: FormConfig, from: {
232
+ sectionId: string;
233
+ rowId: string;
234
+ columnId: string;
235
+ fieldName: string;
236
+ }, to: {
237
+ sectionId: string;
238
+ rowId: string;
239
+ columnId: string;
240
+ toIndex: number;
241
+ }, options?: {
242
+ policy?: RemovePolicy;
243
+ correlationId?: string;
244
+ origin?: string;
245
+ }): LayoutResult;
246
+ insertFieldById(config: FormConfig, target: {
247
+ sectionId: string;
248
+ rowId: string;
249
+ columnId: string;
250
+ }, field: any, atIndex?: number): LayoutResult;
251
+ removeFieldById(config: FormConfig, sectionId: string, rowId: string, columnId: string, fieldName: string, options?: {
252
+ policy?: RemovePolicy;
253
+ correlationId?: string;
254
+ origin?: string;
255
+ }): LayoutResult;
256
+ /**
257
+ * Removes empty columns, rows and sections from the provided configuration.
258
+ * Useful when persisting a layout with `removeEmptyContainersOnSave` enabled.
259
+ */
260
+ pruneEmptyContainers(config: FormConfig): LayoutResult;
261
+ addRowToSectionById(config: FormConfig, sectionId: string): LayoutResult & {
262
+ addedRowId: string;
263
+ };
264
+ addColumnToRowById(config: FormConfig, sectionId: string, rowId: string): LayoutResult & {
265
+ addedColumnId: string;
266
+ };
267
+ static ɵfac: i0.ɵɵFactoryDeclaration<DynamicFormLayoutService, never>;
268
+ static ɵprov: i0.ɵɵInjectableDeclaration<DynamicFormLayoutService>;
269
+ }
270
+
271
+ declare class CanvasStateService {
272
+ private readonly _hoveredElement$;
273
+ readonly hoveredElement$: rxjs.Observable<CanvasElement | null>;
274
+ private readonly _selectedElement$;
275
+ readonly selectedElement$: rxjs.Observable<CanvasElement | null>;
276
+ setHoveredElement(element: CanvasElement | null): void;
277
+ setSelectedElement(element: CanvasElement | null): void;
278
+ get selectedElement(): CanvasElement | null;
279
+ static ɵfac: i0.ɵɵFactoryDeclaration<CanvasStateService, never>;
280
+ static ɵprov: i0.ɵɵInjectableDeclaration<CanvasStateService>;
281
+ }
282
+
283
+ /**
284
+ * Payload emitted when a form action button is activated.
285
+ */
286
+ interface PraxisFormActionEvent {
287
+ /** Identifier of the triggered action */
288
+ actionId: string;
289
+ /** Full button configuration for the triggered action */
290
+ button: FormActionButton;
291
+ /** Original DOM event that triggered the action */
292
+ originalEvent: Event;
293
+ }
294
+ declare class PraxisFormActionsComponent implements OnChanges, OnDestroy {
295
+ private shortcuts;
296
+ /** Configuration object describing form action buttons */
297
+ actions?: FormConfig['actions'];
298
+ /** Whether the host form is currently submitting */
299
+ isSubmitting: boolean;
300
+ /** Whether the host form is currently valid */
301
+ formIsValid: boolean;
302
+ /** Optional error message displayed above the actions */
303
+ submitError?: string | null;
304
+ /** Identifier used when registering keyboard shortcuts */
305
+ formId?: string;
306
+ /** Emitted whenever a form action button is triggered */
307
+ action: EventEmitter<PraxisFormActionEvent>;
308
+ private shortcutDisposers;
309
+ constructor(shortcuts: KeyboardShortcutService);
310
+ ngOnChanges(changes: SimpleChanges): void;
311
+ ngOnDestroy(): void;
312
+ get formActionsClasses(): {
313
+ [key: string]: boolean;
314
+ };
315
+ get viewClassMap(): {
316
+ [key: string]: boolean;
317
+ };
318
+ getMatColor(btn: FormActionButton | undefined): 'primary' | 'accent' | 'warn' | undefined;
319
+ getActionButtons(): FormActionButton[];
320
+ getVisibleButtons(): FormActionButton[];
321
+ getCollapsedButtons(): FormActionButton[];
322
+ onActionButtonClick(button: FormActionButton, event: Event): void;
323
+ private registerActionShortcuts;
324
+ static ɵfac: i0.ɵɵFactoryDeclaration<PraxisFormActionsComponent, never>;
325
+ static ɵcmp: i0.ɵɵComponentDeclaration<PraxisFormActionsComponent, "praxis-form-actions", never, { "actions": { "alias": "actions"; "required": false; }; "isSubmitting": { "alias": "isSubmitting"; "required": false; }; "formIsValid": { "alias": "formIsValid"; "required": false; }; "submitError": { "alias": "submitError"; "required": false; }; "formId": { "alias": "formId"; "required": false; }; }, { "action": "action"; }, never, never, true, never>;
326
+ }
327
+
328
+ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
329
+ private crud;
330
+ private fb;
331
+ private cdr;
332
+ private layoutService;
333
+ private contextService;
334
+ private rulesService;
335
+ private settingsPanel;
336
+ private dialog;
337
+ private configStorage;
338
+ private connectionStorage;
339
+ private dynamicForm;
340
+ private snackBar;
341
+ private canvasState;
342
+ private dynamicLayout;
343
+ private errorMessages;
344
+ private schemaNormalizer;
345
+ private componentMetaRegistry;
346
+ private global;
347
+ private hooksRegistry?;
348
+ private hookPresets?;
349
+ private readonly DEBUG;
350
+ resourcePath?: string;
351
+ resourceId?: string | number;
352
+ mode: 'create' | 'edit' | 'view';
353
+ config: FormConfig;
354
+ /**
355
+ * Fonte de schema para construir o formulário.
356
+ * 'resource' (padrão) usa o schema do recurso (/{resource}/schemas -> .../all response)
357
+ * 'filter' usa o schema do DTO de filtro (via /schemas/filtered no POST /filter request)
358
+ */
359
+ schemaSource: 'resource' | 'filter';
360
+ /**
361
+ * CUSTOMIZAÇÃO DE LAYOUT - NÃO confundir com edição de dados do formulário
362
+ *
363
+ * Este flag controla se o usuário pode customizar a ESTRUTURA do formulário:
364
+ * - Mover sections, rows, columns
365
+ * - Configurar layout e aparência
366
+ * - Acessar editor de configuração
367
+ *
368
+ * É INDEPENDENTE do mode (view/edit/create) que controla os DADOS do registro
369
+ *
370
+ * @example
371
+ * // Formulário em modo VIEW de dados + customização HABILITADA
372
+ * <praxis-dynamic-form mode="view" [editModeEnabled]="true">
373
+ *
374
+ * // Formulário em modo EDIT de dados + customização DESABILITADA
375
+ * <praxis-dynamic-form mode="edit" [editModeEnabled]="false">
376
+ */
377
+ editModeEnabled: boolean;
378
+ /** Identifier for persisting layouts */
379
+ formId?: string;
380
+ /** Optional layout to use instead of generated one */
381
+ layout?: FormLayout;
382
+ /** Optional navigation back config (from CRUD host) */
383
+ backConfig?: BackConfig;
384
+ /** Optional direct hooks declaration for testing/demo (overrides config.hooks) */
385
+ hooks?: FormHooksLayout;
386
+ /** Remove empty sections/rows/columns when saving configuration */
387
+ removeEmptyContainersOnSave: boolean;
388
+ /** Enable reactive afterValidate on valueChanges (overrides config.behavior) */
389
+ reactiveValidation: boolean | null;
390
+ /** Debounce for reactive afterValidate in ms (overrides config.behavior) */
391
+ reactiveValidationDebounceMs: number | null;
392
+ /** Controls outdated schema notifications visibility and channel (only effective in edit mode) */
393
+ notifyIfOutdated: 'inline' | 'snackbar' | 'both' | 'none';
394
+ /** Snooze duration for schema outdated notifications (ms), only in edit mode */
395
+ snoozeMs: number;
396
+ /** Auto open settings when schema is detected as outdated (only in edit mode) */
397
+ autoOpenSettingsOnOutdated: boolean;
398
+ readonlyModeGlobal: boolean | null;
399
+ disabledModeGlobal: boolean | null;
400
+ presentationModeGlobal: boolean | null;
401
+ visibleGlobal: boolean | null;
402
+ /** Custom endpoints for CRUD operations */
403
+ private _customEndpoints;
404
+ get customEndpoints(): EndpointConfig;
405
+ set customEndpoints(value: EndpointConfig);
406
+ formSubmit: EventEmitter<FormSubmitEvent>;
407
+ formCancel: EventEmitter<void>;
408
+ formReset: EventEmitter<void>;
409
+ configChange: EventEmitter<FormConfig>;
410
+ formReady: EventEmitter<FormReadyEvent>;
411
+ valueChange: EventEmitter<FormValueChangeEvent>;
412
+ syncCompleted: EventEmitter<SyncResult>;
413
+ initializationError: EventEmitter<FormInitializationError>;
414
+ editModeEnabledChange: EventEmitter<boolean>;
415
+ customAction: EventEmitter<FormCustomActionEvent>;
416
+ actionConfirmation: EventEmitter<FormActionConfirmationEvent>;
417
+ /** Emits whenever schema outdated state changes (can be used by host) */
418
+ schemaStatusChange: EventEmitter<{
419
+ outdated: boolean;
420
+ serverHash?: string;
421
+ lastVerifiedAt?: string;
422
+ formId?: string;
423
+ }>;
424
+ isLoading: boolean;
425
+ submitting: boolean;
426
+ submitError: string | null;
427
+ initializationStatus: 'idle' | 'loading' | 'success' | 'error';
428
+ currentErrorMessage: string;
429
+ currentErrorDetails: any;
430
+ isRecoverable: boolean;
431
+ private isInitialized;
432
+ form: FormGroup;
433
+ fieldVisibility: {
434
+ [fieldName: string]: boolean;
435
+ };
436
+ private pendingEntityId;
437
+ private loadedEntityId;
438
+ private loadedEntityData;
439
+ private schemaCache;
440
+ private lastSchemaMeta?;
441
+ private schemaRootHooks?;
442
+ private destroy$;
443
+ private lastCorrelationId?;
444
+ private currentDnD?;
445
+ private columnFieldsCache;
446
+ private lastFieldPatchSig;
447
+ private lastFieldPatchAt;
448
+ schemaOutdated: boolean;
449
+ private resolvedPrefs;
450
+ private reactiveValidate$?;
451
+ openQuickConnect(): void;
452
+ private get debugDnD();
453
+ get sectionDropListIds(): string[];
454
+ get rowDropListIds(): string[];
455
+ get columnDropListIds(): string[];
456
+ private formHost?;
457
+ private fieldLoaders?;
458
+ private _activeSnack?;
459
+ presentationVars: {
460
+ labelPosition: 'above' | 'left';
461
+ labelSize: string;
462
+ valueSize: string;
463
+ compact: boolean;
464
+ density: 'comfortable' | 'cozy' | 'compact';
465
+ labelWidth: string;
466
+ labelAlign: 'start' | 'center' | 'end';
467
+ valueAlign: 'start' | 'center' | 'end';
468
+ };
469
+ hoveredElement: CanvasElement | null;
470
+ selectedElement: CanvasElement | null;
471
+ toolbarTransform: string;
472
+ constructor(crud: GenericCrudService<any>, fb: FormBuilder, cdr: ChangeDetectorRef, layoutService: FormLayoutService, contextService: FormContextService, rulesService: FormRulesService, settingsPanel: SettingsPanelService, dialog: MatDialog, configStorage: ConfigStorage, connectionStorage: ConnectionStorage, dynamicForm: DynamicFormService, snackBar: MatSnackBar, canvasState: CanvasStateService, dynamicLayout: DynamicFormLayoutService, errorMessages: ErrorMessageService, schemaNormalizer: SchemaNormalizerService, componentMetaRegistry: ComponentMetadataRegistry, global: GlobalConfigService, hooksRegistry?: FormHooksRegistry | undefined, hookPresets?: FormHookPreset[] | null | undefined);
473
+ private runHooks;
474
+ private resolveStageDeclarations;
475
+ private resolvePresetDeclarations;
476
+ get shouldShowConfigControls(): boolean;
477
+ private genCorrelationId;
478
+ ngOnInit(): void;
479
+ ngOnChanges(changes: SimpleChanges): void;
480
+ private blurAllInputs;
481
+ private initializeForm;
482
+ private handleInitializationError;
483
+ private getErrorMessage;
484
+ private persistFormConfig;
485
+ private createDefaultConfig;
486
+ private syncWithServer;
487
+ private loadEntity;
488
+ private buildFormFromConfig;
489
+ private connectionKey;
490
+ private saveConnection;
491
+ disconnect(): void;
492
+ onToolbarRequestClose(): void;
493
+ private evaluateAndApplyRules;
494
+ getColumnFields(column: {
495
+ fields: string[];
496
+ id?: string;
497
+ }): FieldMetadata[];
498
+ getColumnClasses(column: FormColumn): string[];
499
+ private getColumnSpanClasses;
500
+ private getColumnOffsetClasses;
501
+ private getColumnOrderClasses;
502
+ private getColumnHiddenClasses;
503
+ isColumnVisible(column: FormColumn): boolean;
504
+ private _getConfirmationMessage;
505
+ private _showConfirmationDialog;
506
+ onFormAction(event: PraxisFormActionEvent): void;
507
+ private _executeAction;
508
+ onSubmit(): Promise<void>;
509
+ /**
510
+ * TOGGLE DE CUSTOMIZAÇÃO DE LAYOUT - NÃO É EDIÇÃO DE DADOS
511
+ *
512
+ * Este método alterna entre:
513
+ * - Modo normal: Usuário interage com dados do formulário (conforme mode: view/edit/create)
514
+ * - Modo customização: Usuário pode mover sections/rows/columns e configurar layout
515
+ *
516
+ * IMPORTANTE: Independe completamente do mode do formulário
517
+ */
518
+ toggleEditMode(): void;
519
+ openConfigEditor(): void;
520
+ onElementMouseEnter(event: MouseEvent, type: CanvasElementType, data: any, element?: HTMLElement): void;
521
+ onElementMouseLeave(event: MouseEvent): void;
522
+ onElementClick(event: MouseEvent, type: CanvasElementType, data: any, element?: HTMLElement): void;
523
+ /**
524
+ * Opens the appropriate editor based on current selection (section/row/column/field).
525
+ */
526
+ openSelectedElementEditor(): void;
527
+ onIgnoreOutdated(): void;
528
+ onSnoozeOutdated(): void;
529
+ private getSchemaMetaKey;
530
+ private getPrefsKey;
531
+ private getOutdatedIgnoreKey;
532
+ private getOutdatedSnoozeKey;
533
+ private getOutdatedNotifiedKey;
534
+ private isOutdatedIgnored;
535
+ private getOutdatedSnoozeUntil;
536
+ private setOutdatedSnooze;
537
+ private setOutdatedIgnore;
538
+ private setOutdatedNotified;
539
+ private wasOutdatedNotified;
540
+ private resolveSchemaPrefs;
541
+ shouldShowOutdatedInline(): boolean;
542
+ private maybeShowOutdatedSnack;
543
+ private verifyServerSchemaVersion;
544
+ /**
545
+ * Opens the Field Metadata Editor from the canvas toolbar when a field is selected.
546
+ * Currently a safe stub until @praxisui/metadata-editor is available.
547
+ */
548
+ openFieldMetadataEditor(): void;
549
+ /**
550
+ * Internal seam to open the metadata editor and wire up apply/save handlers.
551
+ * Extracted for easier testing and to avoid coupling tests to dynamic import.
552
+ */
553
+ private openFieldMetadataEditorInternal;
554
+ private openRowEditor;
555
+ private openColumnEditor;
556
+ private openSectionEditor;
557
+ private getControlTypeIcon;
558
+ /**
559
+ * Friendly control type name resolved from ComponentMetadataRegistry when available.
560
+ * Falls back to a local map only when there is no registered metadata.
561
+ */
562
+ private getControlTypeName;
563
+ /**
564
+ * Applies a metadata patch to the field with the given name and rebuilds the form.
565
+ */
566
+ private applyFieldMetadataPatch;
567
+ /** Find the DynamicFieldLoaderDirective instance that currently hosts a given field */
568
+ private findLoaderForField;
569
+ onToolbarMove(direction: 'up' | 'down'): void;
570
+ onToolbarToggleReadonly(): void;
571
+ onToolbarToggleRequired(): void;
572
+ onToolbarToggleHidden(): void;
573
+ onToolbarToggleDisabled(): void;
574
+ /** Helper to update metadata of the currently selected field and refresh the control if needed */
575
+ private updateSelectedFieldMeta;
576
+ onFieldMouseEnter(payload: {
577
+ field: FieldMetadata;
578
+ element: HTMLElement;
579
+ }): void;
580
+ onFieldMouseLeave(payload: {
581
+ field: FieldMetadata;
582
+ element: HTMLElement;
583
+ }): void;
584
+ onFieldClick(payload: {
585
+ field: FieldMetadata;
586
+ element: HTMLElement;
587
+ }): void;
588
+ onDragStarted(event: {
589
+ field: FieldMetadata;
590
+ index: number;
591
+ dragEvent: CdkDragStart<any>;
592
+ dragData: any;
593
+ }): void;
594
+ onDragMoved(event: {
595
+ field: FieldMetadata;
596
+ index: number;
597
+ dragEvent: CdkDragMove<any>;
598
+ dragData: any;
599
+ }): void;
600
+ onDragEnded(event: {
601
+ field: FieldMetadata;
602
+ index: number;
603
+ dragEvent: CdkDragEnd<any>;
604
+ dragData: any;
605
+ }): void;
606
+ onSectionDrop(event: CdkDragDrop<any>): void;
607
+ onRowDrop(event: CdkDragDrop<any>): void;
608
+ onColumnDrop(event: CdkDragDrop<any>): void;
609
+ onFieldDrop(event: CdkDragDrop<any>): void;
610
+ onSelectPath(pathPart: CanvasPathPart): void;
611
+ /**
612
+ * Creates a new section and uses the layout service to insert it
613
+ * at the correct position.
614
+ * @param sectionIndex The index of the section after which to insert the new one.
615
+ */
616
+ addNewSectionAfter(sectionIndex: number): void;
617
+ ngOnDestroy(): void;
618
+ trackBySection(index: number, section: FormSection): string;
619
+ trackByRow(index: number, row: FormRow): string;
620
+ trackByColumn(index: number, column: FormColumn): string;
621
+ retryInitialization(): void;
622
+ getErrorTitle(): string;
623
+ showDetailedError(): void;
624
+ private buildSchemaContext;
625
+ private getSchemaWithCache;
626
+ private isReactiveValidationEnabled;
627
+ private getReactiveValidationDebounceMs;
628
+ private setupReactiveValidation;
629
+ private debugLog;
630
+ private applyPresentationVars;
631
+ static ɵfac: i0.ɵɵFactoryDeclaration<PraxisDynamicForm, [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }]>;
632
+ static ɵcmp: i0.ɵɵComponentDeclaration<PraxisDynamicForm, "praxis-dynamic-form", never, { "resourcePath": { "alias": "resourcePath"; "required": false; }; "resourceId": { "alias": "resourceId"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "config": { "alias": "config"; "required": false; }; "schemaSource": { "alias": "schemaSource"; "required": false; }; "editModeEnabled": { "alias": "editModeEnabled"; "required": false; }; "formId": { "alias": "formId"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "backConfig": { "alias": "backConfig"; "required": false; }; "hooks": { "alias": "hooks"; "required": false; }; "removeEmptyContainersOnSave": { "alias": "removeEmptyContainersOnSave"; "required": false; }; "reactiveValidation": { "alias": "reactiveValidation"; "required": false; }; "reactiveValidationDebounceMs": { "alias": "reactiveValidationDebounceMs"; "required": false; }; "notifyIfOutdated": { "alias": "notifyIfOutdated"; "required": false; }; "snoozeMs": { "alias": "snoozeMs"; "required": false; }; "autoOpenSettingsOnOutdated": { "alias": "autoOpenSettingsOnOutdated"; "required": false; }; "readonlyModeGlobal": { "alias": "readonlyModeGlobal"; "required": false; }; "disabledModeGlobal": { "alias": "disabledModeGlobal"; "required": false; }; "presentationModeGlobal": { "alias": "presentationModeGlobal"; "required": false; }; "visibleGlobal": { "alias": "visibleGlobal"; "required": false; }; "customEndpoints": { "alias": "customEndpoints"; "required": false; }; }, { "formSubmit": "formSubmit"; "formCancel": "formCancel"; "formReset": "formReset"; "configChange": "configChange"; "formReady": "formReady"; "valueChange": "valueChange"; "syncCompleted": "syncCompleted"; "initializationError": "initializationError"; "editModeEnabledChange": "editModeEnabledChange"; "customAction": "customAction"; "actionConfirmation": "actionConfirmation"; "schemaStatusChange": "schemaStatusChange"; }, never, never, true, never>;
633
+ }
634
+
635
+ declare class FormConfigService {
636
+ private readonly _state$;
637
+ readonly state$: Observable<FormConfigState>;
638
+ readonly config$: Observable<FormConfig>;
639
+ get currentConfig(): FormConfig;
640
+ loadConfig(config: FormConfig): void;
641
+ updateConfig(configUpdate: Partial<FormConfig>): void;
642
+ private updateState;
643
+ /**
644
+ * Export the current configuration as a JSON string.
645
+ * @param pretty whether to pretty print the JSON
646
+ */
647
+ exportToJson(pretty?: boolean): string;
648
+ /**
649
+ * Load a configuration from a JSON string.
650
+ * Invalid JSON will emit an error on the service state.
651
+ */
652
+ importFromJson(json: string): void;
653
+ /**
654
+ * Validate a configuration returning an array of error messages.
655
+ */
656
+ validateConfig(config: FormConfig): string[];
657
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormConfigService, never>;
658
+ static ɵprov: i0.ɵɵInjectableDeclaration<FormConfigService>;
659
+ }
660
+
661
+ interface JsonValidationResult {
662
+ isValid: boolean;
663
+ error?: string;
664
+ config?: FormConfig;
665
+ }
666
+ interface JsonEditorEvent {
667
+ type: 'apply' | 'format' | 'validation';
668
+ payload: JsonValidationResult;
669
+ }
670
+ declare class JsonConfigEditorComponent implements OnInit, OnDestroy {
671
+ private cdr;
672
+ private configService;
673
+ config: FormConfig | null;
674
+ configChange: EventEmitter<FormConfig>;
675
+ validationChange: EventEmitter<JsonValidationResult>;
676
+ editorEvent: EventEmitter<JsonEditorEvent>;
677
+ jsonText: string;
678
+ isValidJson: boolean;
679
+ jsonError: string;
680
+ private destroy$;
681
+ private jsonTextChanges$;
682
+ constructor(cdr: ChangeDetectorRef, configService: FormConfigService);
683
+ ngOnInit(): void;
684
+ ngOnDestroy(): void;
685
+ onJsonTextChange(text: string): void;
686
+ applyJsonChanges(): void;
687
+ formatJson(): void;
688
+ updateJsonFromConfig(config: FormConfig): void;
689
+ /**
690
+ * Força atualização do JSON com a configuração atual
691
+ */
692
+ refreshJson(): void;
693
+ getCurrentConfig(): FormConfig | null;
694
+ hasChanges(): boolean;
695
+ private validateJson;
696
+ private updateValidationState;
697
+ insertHooksTemplate(): void;
698
+ enableReactiveValidation(): void;
699
+ static ɵfac: i0.ɵɵFactoryDeclaration<JsonConfigEditorComponent, never>;
700
+ static ɵcmp: i0.ɵɵComponentDeclaration<JsonConfigEditorComponent, "form-json-config-editor", never, { "config": { "alias": "config"; "required": false; }; }, { "configChange": "configChange"; "validationChange": "validationChange"; "editorEvent": "editorEvent"; }, never, never, true, never>;
701
+ }
702
+
703
+ declare class PraxisDynamicFormConfigEditor implements SettingsValueProvider, OnInit, OnDestroy {
704
+ private storage;
705
+ private configService;
706
+ jsonEditor?: JsonConfigEditorComponent;
707
+ editedConfig: FormConfig;
708
+ ruleBuilderConfig: RuleBuilderConfig;
709
+ ruleBuilderState?: RuleBuilderState;
710
+ private initialConfig;
711
+ backConfig?: BackConfig;
712
+ formId?: string;
713
+ inputMode: 'create' | 'edit' | 'view';
714
+ isPresentationMode: boolean;
715
+ truncatePreview: boolean;
716
+ previewItems: {
717
+ label: string;
718
+ value: string;
719
+ }[];
720
+ presentationPrefs: {
721
+ labelPosition: 'above' | 'left';
722
+ labelFontSize?: number | null;
723
+ valueFontSize?: number | null;
724
+ compact?: boolean;
725
+ density?: 'comfortable' | 'cozy' | 'compact';
726
+ labelWidth?: number | null;
727
+ labelAlign?: 'start' | 'center' | 'end';
728
+ valueAlign?: 'start' | 'center' | 'end';
729
+ };
730
+ schemaPrefs: {
731
+ notifyIfOutdated: 'inline' | 'snackbar' | 'both' | 'none';
732
+ snoozeMs: number;
733
+ autoOpenSettingsOnOutdated: boolean;
734
+ };
735
+ serverMeta?: {
736
+ serverHash?: string;
737
+ lastVerifiedAt?: string;
738
+ };
739
+ isDirty$: BehaviorSubject<boolean>;
740
+ isValid$: BehaviorSubject<boolean>;
741
+ isBusy$: BehaviorSubject<boolean>;
742
+ constructor(storage: ConfigStorage, configService: FormConfigService, injectedData?: any);
743
+ ngOnInit(): void;
744
+ reset(): void;
745
+ private updateDirtyState;
746
+ getSettingsValue(): any;
747
+ onSave(): any;
748
+ onJsonConfigChange(newConfig: FormConfig): void;
749
+ onJsonValidationChange(result: JsonValidationResult): void;
750
+ onJsonEditorEvent(_event: JsonEditorEvent): void;
751
+ onConfigChange(newConfig: FormConfig): void;
752
+ onRulesChanged(state: RuleBuilderState): void;
753
+ private createRuleBuilderConfig;
754
+ private mapMetadataToSchema;
755
+ private mapDataTypeToFieldType;
756
+ ngOnDestroy(): void;
757
+ onCascadeApply(patch: Record<string, Partial<FieldDefinition>>): void;
758
+ private stripLegacy;
759
+ static ɵfac: i0.ɵɵFactoryDeclaration<PraxisDynamicFormConfigEditor, [null, null, { optional: true; }]>;
760
+ static ɵcmp: i0.ɵɵComponentDeclaration<PraxisDynamicFormConfigEditor, "praxis-dynamic-form-config-editor", never, {}, {}, never, never, true, never>;
761
+ }
762
+ interface FormConfigLike {
763
+ fieldMetadata?: FieldMetadata[];
764
+ }
765
+ declare function stripLegacyFieldMetadata(arr?: FieldMetadata[]): FieldMetadata[] | undefined;
766
+
767
+ declare class PraxisFilterForm implements OnChanges, OnDestroy {
768
+ private dynamicForm;
769
+ config: FormConfig;
770
+ formId?: string;
771
+ resourcePath?: string;
772
+ mode?: string;
773
+ formReady: EventEmitter<{
774
+ formGroup: FormGroup<Record<string, any>>;
775
+ }>;
776
+ valueChange: EventEmitter<{
777
+ formData: Record<string, any>;
778
+ }>;
779
+ submit: EventEmitter<{
780
+ formData: Record<string, any>;
781
+ }>;
782
+ validityChange: EventEmitter<boolean>;
783
+ form: FormGroup<Record<string, any>>;
784
+ private valueChangesSub?;
785
+ private statusChangesSub?;
786
+ constructor(dynamicForm: DynamicFormService);
787
+ ngOnChanges(changes: SimpleChanges): void;
788
+ ngOnDestroy(): void;
789
+ private buildForm;
790
+ onFormSubmit(): void;
791
+ getColumnFields(column: FormColumn): FieldMetadata[];
792
+ get hasLayout(): boolean;
793
+ trackBySection(i: number, section: FormSection): string;
794
+ trackByRow(i: number, _row: FormRow): string;
795
+ trackByColumn(i: number, col: FormColumn): string;
796
+ static ɵfac: i0.ɵɵFactoryDeclaration<PraxisFilterForm, never>;
797
+ static ɵcmp: i0.ɵɵComponentDeclaration<PraxisFilterForm, "praxis-filter-form", never, { "config": { "alias": "config"; "required": true; }; "formId": { "alias": "formId"; "required": false; }; "resourcePath": { "alias": "resourcePath"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; }, { "formReady": "formReady"; "valueChange": "valueChange"; "submit": "submit"; "validityChange": "validityChange"; }, never, never, true, never>;
798
+ }
799
+
800
+ /** Tokens for theme colors used across the layout editor. */
801
+ declare enum LayoutColorToken {
802
+ Surface = "--md-sys-color-surface",
803
+ SurfaceVariant = "--md-sys-color-surface-variant",
804
+ Outline = "--md-sys-color-outline",
805
+ Primary = "--md-sys-color-primary"
806
+ }
807
+ /**
808
+ * Persists UI preferences of the layout editor such as the fields palette state
809
+ * and exposes helpers to read theme tokens.
810
+ */
811
+ declare class LayoutPrefsService {
812
+ private readonly paletteCollapsedKey;
813
+ /** Returns whether the fields palette is collapsed. */
814
+ getPaletteCollapsed(): boolean;
815
+ /** Persists the collapsed state of the fields palette. */
816
+ setPaletteCollapsed(collapsed: boolean): void;
817
+ /** Returns the current value for a theme color token. */
818
+ getColor(token: LayoutColorToken): string;
819
+ static ɵfac: i0.ɵɵFactoryDeclaration<LayoutPrefsService, never>;
820
+ static ɵprov: i0.ɵɵInjectableDeclaration<LayoutPrefsService>;
821
+ }
822
+
823
+ interface FieldDropEvent {
824
+ event: CdkDragDrop<any>;
825
+ sectionIndex: number;
826
+ rowIndex: number;
827
+ }
828
+ /**
829
+ * Editor component for configuring sections, rows and fields of a dynamic form.
830
+ * Provides a collapsible palette of available fields.
831
+ */
832
+ declare class LayoutEditorComponent implements OnInit {
833
+ config: FormConfig;
834
+ configChange: EventEmitter<FormConfig>;
835
+ paletteCollapsed: boolean;
836
+ protected readonly prefs: LayoutPrefsService;
837
+ protected readonly colorTokens: typeof LayoutColorToken;
838
+ selected: {
839
+ type: 'section' | 'row' | 'column' | 'field';
840
+ sectionIndex?: number;
841
+ rowIndex?: number;
842
+ columnIndex?: number;
843
+ fieldName?: string;
844
+ } | null;
845
+ bulkSectionGapBottom: number | null;
846
+ applyGapBottomToAll(): void;
847
+ ngOnInit(): void;
848
+ handleKeydown(event: KeyboardEvent): void;
849
+ /**
850
+ * Toggles the fields palette and persists the collapsed state.
851
+ */
852
+ togglePalette(): void;
853
+ /**
854
+ * Fields that are not yet placed in any section/column of the layout.
855
+ */
856
+ get availableFields(): FieldMetadata[];
857
+ get columnDropListIds(): string[];
858
+ getColumnId(sectionIndex: number, rowIndex: number, columnIndex: number): string;
859
+ private parseColumnId;
860
+ onSelect(sel: any): void;
861
+ clearSelection(): void;
862
+ selectSection(sectionIndex: number): void;
863
+ selectRow(sectionIndex: number, rowIndex: number): void;
864
+ selectColumn(sectionIndex: number, rowIndex: number, columnIndex: number): void;
865
+ dropField({ event }: FieldDropEvent): void;
866
+ dropSection(event: CdkDragDrop<FormSection[]>): void;
867
+ addSection(): void;
868
+ removeSection(index: number): void;
869
+ onSectionUpdated(index: number, updatedSection: FormSection): void;
870
+ private emitNewConfig;
871
+ onApplyStyleToAll(patch: Partial<FormSection>): void;
872
+ static ɵfac: i0.ɵɵFactoryDeclaration<LayoutEditorComponent, never>;
873
+ static ɵcmp: i0.ɵɵComponentDeclaration<LayoutEditorComponent, "praxis-layout-editor", never, { "config": { "alias": "config"; "required": false; }; }, { "configChange": "configChange"; }, never, never, true, never>;
874
+ }
875
+
876
+ declare class RowConfiguratorComponent {
877
+ row: FormRow;
878
+ fieldMetadata: FieldMetadata[];
879
+ sectionIndex: number;
880
+ rowIndex: number;
881
+ selected: {
882
+ type: 'section' | 'row' | 'column' | 'field';
883
+ sectionIndex?: number;
884
+ rowIndex?: number;
885
+ columnIndex?: number;
886
+ fieldName?: string;
887
+ } | null;
888
+ availableFieldsListId: string | null;
889
+ connectedDropListIds: string[];
890
+ rowChange: EventEmitter<FormRow>;
891
+ remove: EventEmitter<void>;
892
+ fieldDrop: EventEmitter<CdkDragDrop<any, any, any>>;
893
+ select: EventEmitter<any>;
894
+ activeDropIndex: number | null;
895
+ private hoverTimer;
896
+ getFieldByName(fieldName: string): FieldMetadata;
897
+ drop(event: CdkDragDrop<string[]>): void;
898
+ selectRow(): void;
899
+ selectColumn(index: number, event: MouseEvent): void;
900
+ selectField(fieldName: string, event: MouseEvent): void;
901
+ onDropEnter(index: number): void;
902
+ onDropExit(index: number): void;
903
+ isRowSelected(): boolean;
904
+ isColumnSelected(i: number): boolean;
905
+ isFieldSelected(fieldName: string): boolean;
906
+ connectedColumns(index: number): string[];
907
+ addColumn(): void;
908
+ removeColumn(index: number): void;
909
+ removeRow(): void;
910
+ getColumnId(index: number): string;
911
+ private generateId;
912
+ applyPreset(spansMd: number[]): void;
913
+ getSpanClasses(column: any): string[];
914
+ getSpanMd(column: any): number;
915
+ static ɵfac: i0.ɵɵFactoryDeclaration<RowConfiguratorComponent, never>;
916
+ static ɵcmp: i0.ɵɵComponentDeclaration<RowConfiguratorComponent, "praxis-row-configurator", never, { "row": { "alias": "row"; "required": false; }; "fieldMetadata": { "alias": "fieldMetadata"; "required": false; }; "sectionIndex": { "alias": "sectionIndex"; "required": false; }; "rowIndex": { "alias": "rowIndex"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "availableFieldsListId": { "alias": "availableFieldsListId"; "required": false; }; "connectedDropListIds": { "alias": "connectedDropListIds"; "required": false; }; }, { "rowChange": "rowChange"; "remove": "remove"; "fieldDrop": "fieldDrop"; "select": "select"; }, never, never, true, never>;
917
+ }
918
+
919
+ declare class FieldConfiguratorComponent {
920
+ private readonly registry;
921
+ field: FieldMetadata;
922
+ private readonly controlTypeMap;
923
+ private readonly categoryByType;
924
+ private readonly fallbackInfo;
925
+ get meta(): ComponentDocMeta | undefined;
926
+ get icon(): string;
927
+ get typeClass(): string;
928
+ get typeSpecificClass(): string;
929
+ get typeLabel(): string;
930
+ get tooltip(): string;
931
+ private readonly typeSpecificClassMap;
932
+ static ɵfac: i0.ɵɵFactoryDeclaration<FieldConfiguratorComponent, never>;
933
+ static ɵcmp: i0.ɵɵComponentDeclaration<FieldConfiguratorComponent, "praxis-field-configurator", never, { "field": { "alias": "field"; "required": false; }; }, {}, never, never, true, never>;
934
+ }
935
+
936
+ /** Metadata for PraxisDynamicForm component */
937
+ declare const PRAXIS_DYNAMIC_FORM_COMPONENT_METADATA: ComponentDocMeta;
938
+ /** Provider para auto-registrar metadados do componente Dynamic Form. */
939
+ declare function providePraxisDynamicFormMetadata(): Provider;
940
+
941
+ declare function isRuleSatisfied(rule: FormLayoutRule, data: unknown): boolean;
942
+ /**
943
+ * Applies all visibility rules to the provided data and
944
+ * returns a map of field name to visibility state.
945
+ */
946
+ declare function applyVisibilityRules(rules: FormLayoutRule[], data: any): Record<string, boolean>;
947
+
948
+ /**
949
+ * Converts a RuleBuilderState produced by the visual builder into
950
+ * an array of FormLayoutRule objects understood by the dynamic form.
951
+ */
952
+ declare function ruleBuilderStateToFormLayoutRules(state: RuleBuilderState | null | undefined): FormLayoutRule[];
953
+ /**
954
+ * Converts an array of FormLayoutRule back into a RuleBuilderState
955
+ * so that the visual builder can display the saved rules.
956
+ *
957
+ * The conversion handles a limited subset of rules (visibility and
958
+ * required/validation rules with simple field conditions).
959
+ */
960
+ declare function formLayoutRulesToBuilderState(rules: FormLayoutRule[] | null | undefined): RuleBuilderState;
961
+
962
+ /**
963
+ * Recursively converts arrays representing dates into ISO-8601 strings.
964
+ * Arrays are expected in the form `[year, month, day, hour?, minute?, second?, millisecond?]`.
965
+ * Non-date arrays and other values are returned untouched.
966
+ */
967
+ declare function normalizeDateArrays(data: any): any;
968
+
969
+ declare class CanvasToolbarComponent {
970
+ selectedElement: CanvasElement | null;
971
+ editMetadata: EventEmitter<void>;
972
+ delete: EventEmitter<void>;
973
+ moveUp: EventEmitter<void>;
974
+ moveDown: EventEmitter<void>;
975
+ selectPath: EventEmitter<CanvasPathPart>;
976
+ /** Emite quando o usuário solicita fechar a toolbar (ESC). */
977
+ requestClose: EventEmitter<void>;
978
+ toggleReadonly: EventEmitter<void>;
979
+ toggleRequired: EventEmitter<void>;
980
+ toggleHidden: EventEmitter<void>;
981
+ toggleDisabled: EventEmitter<void>;
982
+ get selectedLastType(): CanvasPathPart['type'] | null;
983
+ get isField(): boolean;
984
+ get isSection(): boolean;
985
+ get isColumn(): boolean;
986
+ get configTooltip(): string;
987
+ get readonlyIcon(): string;
988
+ get requiredIcon(): string;
989
+ get visibilityIcon(): string;
990
+ get disabledIcon(): string;
991
+ /** Fecha a toolbar com a tecla ESC quando o componente está visível. */
992
+ onGlobalKeydown(ev: KeyboardEvent): void;
993
+ static ɵfac: i0.ɵɵFactoryDeclaration<CanvasToolbarComponent, never>;
994
+ static ɵcmp: i0.ɵɵComponentDeclaration<CanvasToolbarComponent, "praxis-canvas-toolbar", never, { "selectedElement": { "alias": "selectedElement"; "required": false; }; }, { "editMetadata": "editMetadata"; "delete": "delete"; "moveUp": "moveUp"; "moveDown": "moveDown"; "selectPath": "selectPath"; "requestClose": "requestClose"; "toggleReadonly": "toggleReadonly"; "toggleRequired": "toggleRequired"; "toggleHidden": "toggleHidden"; "toggleDisabled": "toggleDisabled"; }, never, never, true, never>;
995
+ }
996
+
997
+ interface EditableFormSection extends FormSection {
998
+ collapsible?: boolean;
999
+ collapsed?: boolean;
1000
+ order?: number;
1001
+ hidden?: {
1002
+ xs?: boolean;
1003
+ sm?: boolean;
1004
+ md?: boolean;
1005
+ lg?: boolean;
1006
+ xl?: boolean;
1007
+ };
1008
+ className?: string;
1009
+ testId?: string;
1010
+ }
1011
+ declare class SectionEditorComponent implements OnInit, OnDestroy, SettingsValueProvider {
1012
+ private fb;
1013
+ private data;
1014
+ private iconPicker;
1015
+ section: EditableFormSection;
1016
+ form: FormGroup;
1017
+ breakpoints: Breakpoint[];
1018
+ isDirty$: BehaviorSubject<boolean>;
1019
+ isValid$: BehaviorSubject<boolean>;
1020
+ isBusy$: BehaviorSubject<boolean>;
1021
+ private destroy$;
1022
+ constructor(fb: FormBuilder, data: {
1023
+ section: EditableFormSection;
1024
+ }, iconPicker: IconPickerService);
1025
+ ngOnInit(): void;
1026
+ ngOnDestroy(): void;
1027
+ getSettingsValue(): any;
1028
+ pickIcon(): Promise<void>;
1029
+ clearIcon(): void;
1030
+ static ɵfac: i0.ɵɵFactoryDeclaration<SectionEditorComponent, never>;
1031
+ static ɵcmp: i0.ɵɵComponentDeclaration<SectionEditorComponent, "praxis-section-editor", never, {}, {}, never, never, true, never>;
1032
+ }
1033
+
1034
+ interface EditableFormRow extends FormRow {
1035
+ order?: number;
1036
+ gap?: number;
1037
+ rowGap?: number;
1038
+ wrap?: boolean;
1039
+ hidden?: {
1040
+ xs?: boolean;
1041
+ sm?: boolean;
1042
+ md?: boolean;
1043
+ lg?: boolean;
1044
+ xl?: boolean;
1045
+ };
1046
+ className?: string;
1047
+ testId?: string;
1048
+ }
1049
+ declare class RowEditorComponent implements OnInit, OnDestroy, SettingsValueProvider {
1050
+ private fb;
1051
+ private data;
1052
+ form: FormGroup;
1053
+ breakpoints: Breakpoint[];
1054
+ row: EditableFormRow;
1055
+ isDirty$: BehaviorSubject<boolean>;
1056
+ isValid$: BehaviorSubject<boolean>;
1057
+ isBusy$: BehaviorSubject<boolean>;
1058
+ private destroy$;
1059
+ constructor(fb: FormBuilder, data: {
1060
+ row: EditableFormRow;
1061
+ });
1062
+ ngOnInit(): void;
1063
+ ngOnDestroy(): void;
1064
+ getSettingsValue(): any;
1065
+ static ɵfac: i0.ɵɵFactoryDeclaration<RowEditorComponent, never>;
1066
+ static ɵcmp: i0.ɵɵComponentDeclaration<RowEditorComponent, "praxis-row-editor", never, {}, {}, never, never, true, never>;
1067
+ }
1068
+
1069
+ declare class ColumnEditorComponent implements OnInit, OnDestroy, SettingsValueProvider {
1070
+ private fb;
1071
+ private data;
1072
+ form: FormGroup;
1073
+ breakpoints: Breakpoint[];
1074
+ column: FormColumn;
1075
+ isDirty$: BehaviorSubject<boolean>;
1076
+ isValid$: BehaviorSubject<boolean>;
1077
+ isBusy$: BehaviorSubject<boolean>;
1078
+ private destroy$;
1079
+ private _previewTimer;
1080
+ constructor(fb: FormBuilder, data: {
1081
+ column: FormColumn;
1082
+ });
1083
+ ngOnInit(): void;
1084
+ ngOnDestroy(): void;
1085
+ private applyChanges;
1086
+ getSettingsValue(): any;
1087
+ static ɵfac: i0.ɵɵFactoryDeclaration<ColumnEditorComponent, never>;
1088
+ static ɵcmp: i0.ɵɵComponentDeclaration<ColumnEditorComponent, "praxis-column-editor", never, {}, {}, never, never, true, never>;
1089
+ }
1090
+
1091
+ declare class FieldEditorComponent {
1092
+ field: FieldMetadata | null;
1093
+ static ɵfac: i0.ɵɵFactoryDeclaration<FieldEditorComponent, never>;
1094
+ static ɵcmp: i0.ɵɵComponentDeclaration<FieldEditorComponent, "praxis-field-editor", never, { "field": { "alias": "field"; "required": false; }; }, {}, never, never, true, never>;
1095
+ }
1096
+
1097
+ declare class ActionsEditorComponent {
1098
+ actions: any;
1099
+ static ɵfac: i0.ɵɵFactoryDeclaration<ActionsEditorComponent, never>;
1100
+ static ɵcmp: i0.ɵɵComponentDeclaration<ActionsEditorComponent, "praxis-actions-editor", never, { "actions": { "alias": "actions"; "required": false; }; }, {}, never, never, true, never>;
1101
+ }
1102
+
1103
+ export { ActionsEditorComponent, CanvasStateService, CanvasToolbarComponent, ColumnEditorComponent, DynamicFormLayoutService, FieldConfiguratorComponent, FieldEditorComponent, FormConfigService, FormContextService, FormLayoutService, JsonConfigEditorComponent, LayoutColorToken, LayoutEditorComponent, LayoutPrefsService, PRAXIS_DYNAMIC_FORM_COMPONENT_METADATA, PraxisDynamicForm, PraxisDynamicFormConfigEditor, PraxisFilterForm, PraxisFormActionsComponent, RowConfiguratorComponent, RowEditorComponent, SectionEditorComponent, applyVisibilityRules, formLayoutRulesToBuilderState, isRuleSatisfied, normalizeDateArrays, providePraxisDynamicFormMetadata, ruleBuilderStateToFormLayoutRules, stripLegacyFieldMetadata };
1104
+ export type { CanvasElement, CanvasElementType, CanvasPathPart, FieldPath, FieldPathContainer, FieldPathWithIndex, FormConfigLike, IdPath, JsonEditorEvent, JsonValidationResult, LayoutChange, LayoutResult, Operation, Path, PathWithIndex, PraxisFormActionEvent, RemovePolicy, ValidationReport };