@praxisui/dynamic-form 1.0.0-beta.4 → 1.0.0-beta.41
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/README.md +151 -1
- package/fesm2022/praxisui-dynamic-form.mjs +16804 -9942
- package/fesm2022/praxisui-dynamic-form.mjs.map +1 -1
- package/index.d.ts +473 -57
- package/package.json +10 -10
package/index.d.ts
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { OnChanges, OnDestroy, EventEmitter, SimpleChanges, OnInit, ChangeDetectorRef, Provider } from '@angular/core';
|
|
2
|
+
import { OnChanges, OnDestroy, EventEmitter, SimpleChanges, OnInit, ChangeDetectorRef, Provider, AfterViewInit, ElementRef } from '@angular/core';
|
|
3
3
|
import { FormGroup, FormBuilder } from '@angular/forms';
|
|
4
|
+
import { Router, ActivatedRoute } from '@angular/router';
|
|
4
5
|
import { MatDialog } from '@angular/material/dialog';
|
|
5
6
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
6
7
|
import { CdkDragStart, CdkDragMove, CdkDragEnd, CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
7
|
-
import {
|
|
8
|
+
import { AsyncConfigStorage, FormLayout, FieldMetadata, FormLayoutRule, FormRuleTargetType as FormRuleTargetType$1, FormSection, FormRow, FormColumn, FormConfig, FormActionButton, BackConfig, FormHooksLayout, EndpointConfig, FormSubmitEvent, FormReadyEvent, FormValueChangeEvent, SyncResult, FormInitializationError, LoadingState, FormCustomActionEvent, FormActionConfirmationEvent, GenericCrudService, ConnectionStorage, DynamicFormService, ErrorMessageService, SchemaNormalizerService, ComponentMetadataRegistry, GlobalConfigService, ComponentKeyService, LoadingOrchestrator, PraxisLoadingRenderer, FormHooksRegistry, FormHookPreset, LoggerService, FormConfigState, FieldDefinition, Breakpoint, ComponentDocMeta, IconPickerService, AiCapabilityCategory, AiValueKind, AiCapability, AiCapabilityCatalog } from '@praxisui/core';
|
|
8
9
|
import * as rxjs from 'rxjs';
|
|
9
10
|
import { Observable, BehaviorSubject } from 'rxjs';
|
|
10
11
|
import { SettingsPanelService, SettingsValueProvider } from '@praxisui/settings-panel';
|
|
11
12
|
import { KeyboardShortcutService } from '@praxisui/dynamic-fields';
|
|
13
|
+
import { BaseAiAdapter, Capability as Capability$2, PatchResult } from '@praxisui/ai';
|
|
12
14
|
import { RuleBuilderConfig, RuleBuilderState } from '@praxisui/visual-builder';
|
|
13
15
|
|
|
14
16
|
declare class FormLayoutService {
|
|
15
17
|
private storage?;
|
|
16
|
-
constructor(storage?:
|
|
17
|
-
loadLayout(
|
|
18
|
-
saveLayout(
|
|
19
|
-
clearLayout(
|
|
18
|
+
constructor(storage?: AsyncConfigStorage | undefined);
|
|
19
|
+
loadLayout(componentId: string): Promise<FormLayout | null>;
|
|
20
|
+
saveLayout(componentId: string, layout: FormLayout): void;
|
|
21
|
+
clearLayout(componentId: string): void;
|
|
20
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormLayoutService, [{ optional: true; }]>;
|
|
21
23
|
static ɵprov: i0.ɵɵInjectableDeclaration<FormLayoutService>;
|
|
22
24
|
}
|
|
@@ -35,42 +37,20 @@ declare class FormContextService {
|
|
|
35
37
|
unregisterFieldComponent(fieldName: string): void;
|
|
36
38
|
setFormRules(rules: FormLayoutRule[]): void;
|
|
37
39
|
getFormRuleById(ruleId: string): FormLayoutRule | undefined;
|
|
38
|
-
|
|
40
|
+
getFormRulesByTargetType(targetType: FormRuleTargetType$1): FormLayoutRule[];
|
|
39
41
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormContextService, never>;
|
|
40
42
|
static ɵprov: i0.ɵɵInjectableDeclaration<FormContextService>;
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
/**
|
|
44
|
-
*
|
|
46
|
+
* Structured properties resulting from rule evaluation.
|
|
45
47
|
*/
|
|
46
|
-
interface
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
};
|
|
48
|
+
interface RuleApplicationResult {
|
|
49
|
+
fieldProps: Record<string, Record<string, any>>;
|
|
50
|
+
sectionProps: Record<string, Record<string, any>>;
|
|
51
|
+
actionProps: Record<string, Record<string, any>>;
|
|
52
|
+
rowProps: Record<string, Record<string, any>>;
|
|
53
|
+
columnProps: Record<string, Record<string, any>>;
|
|
74
54
|
}
|
|
75
55
|
declare class FormRulesService {
|
|
76
56
|
/**
|
|
@@ -80,7 +60,7 @@ declare class FormRulesService {
|
|
|
80
60
|
* @param formRules The array of rules to process.
|
|
81
61
|
* @returns A RuleEvaluationResult object containing the visibility and required states for the fields.
|
|
82
62
|
*/
|
|
83
|
-
applyRules(formGroup: FormGroup, formRules: FormLayoutRule[]):
|
|
63
|
+
applyRules(formGroup: FormGroup, formRules: FormLayoutRule[]): RuleApplicationResult;
|
|
84
64
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormRulesService, never>;
|
|
85
65
|
static ɵprov: i0.ɵɵInjectableDeclaration<FormRulesService>;
|
|
86
66
|
}
|
|
@@ -303,6 +283,8 @@ declare class PraxisFormActionsComponent implements OnChanges, OnDestroy {
|
|
|
303
283
|
submitError?: string | null;
|
|
304
284
|
/** Identifier used when registering keyboard shortcuts */
|
|
305
285
|
formId?: string;
|
|
286
|
+
/** Overrides coming from runtime rules */
|
|
287
|
+
actionOverrides?: Record<string, Record<string, any>>;
|
|
306
288
|
/** Emitted whenever a form action button is triggered */
|
|
307
289
|
action: EventEmitter<PraxisFormActionEvent>;
|
|
308
290
|
private shortcutDisposers;
|
|
@@ -320,11 +302,53 @@ declare class PraxisFormActionsComponent implements OnChanges, OnDestroy {
|
|
|
320
302
|
getVisibleButtons(): FormActionButton[];
|
|
321
303
|
getCollapsedButtons(): FormActionButton[];
|
|
322
304
|
onActionButtonClick(button: FormActionButton, event: Event): void;
|
|
305
|
+
getButtonNgClass(button: FormActionButton): {
|
|
306
|
+
[key: string]: boolean;
|
|
307
|
+
};
|
|
308
|
+
getButtonStyles(button: FormActionButton): Record<string, any> | null;
|
|
309
|
+
isActionButtonDisabled(button: FormActionButton): boolean;
|
|
310
|
+
private applyOverrides;
|
|
323
311
|
private registerActionShortcuts;
|
|
324
312
|
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>;
|
|
313
|
+
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; }; "actionOverrides": { "alias": "actionOverrides"; "required": false; }; }, { "action": "action"; }, never, never, true, never>;
|
|
326
314
|
}
|
|
327
315
|
|
|
316
|
+
/**
|
|
317
|
+
* Minimal contract the AI adapter needs from the host form component.
|
|
318
|
+
* Keeps the adapter decoupled from the concrete component class to avoid cycles.
|
|
319
|
+
*/
|
|
320
|
+
interface FormAiHost {
|
|
321
|
+
config: FormConfig;
|
|
322
|
+
form: FormGroup;
|
|
323
|
+
applyConfigFromAdapter(config: FormConfig): void;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
declare class FormAiAdapter extends BaseAiAdapter<FormConfig> {
|
|
327
|
+
private host;
|
|
328
|
+
componentName: string;
|
|
329
|
+
componentId: string;
|
|
330
|
+
componentType: string;
|
|
331
|
+
constructor(host: FormAiHost);
|
|
332
|
+
getCurrentConfig(): FormConfig;
|
|
333
|
+
getCapabilities(): Capability$2[];
|
|
334
|
+
getTaskPresets(): Record<string, string[]>;
|
|
335
|
+
getRuntimeState(): Record<string, any>;
|
|
336
|
+
createSnapshot(): FormConfig;
|
|
337
|
+
restoreSnapshot(snapshot: FormConfig): Promise<void>;
|
|
338
|
+
applyPatch(patch: Partial<FormConfig>, intent?: string): Promise<PatchResult>;
|
|
339
|
+
getContextDescription(): string;
|
|
340
|
+
private applyConfig;
|
|
341
|
+
private smartMergeFormConfig;
|
|
342
|
+
private cloneConfig;
|
|
343
|
+
private isFilled;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
interface DynamicFieldRenderErrorEvent {
|
|
347
|
+
phase: 'executeRendering' | 'detectChanges';
|
|
348
|
+
fieldName: string;
|
|
349
|
+
error: unknown;
|
|
350
|
+
fatal: boolean;
|
|
351
|
+
}
|
|
328
352
|
declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
329
353
|
private crud;
|
|
330
354
|
private fb;
|
|
@@ -334,7 +358,7 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
334
358
|
private rulesService;
|
|
335
359
|
private settingsPanel;
|
|
336
360
|
private dialog;
|
|
337
|
-
private
|
|
361
|
+
private asyncConfigStorage;
|
|
338
362
|
private connectionStorage;
|
|
339
363
|
private dynamicForm;
|
|
340
364
|
private snackBar;
|
|
@@ -344,8 +368,14 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
344
368
|
private schemaNormalizer;
|
|
345
369
|
private componentMetaRegistry;
|
|
346
370
|
private global;
|
|
371
|
+
private componentKeys;
|
|
372
|
+
private loadingOrchestrator;
|
|
373
|
+
private loadingRenderer?;
|
|
374
|
+
private router?;
|
|
375
|
+
private route?;
|
|
347
376
|
private hooksRegistry?;
|
|
348
377
|
private hookPresets?;
|
|
378
|
+
private logger?;
|
|
349
379
|
private readonly DEBUG;
|
|
350
380
|
resourcePath?: string;
|
|
351
381
|
resourceId?: string | number;
|
|
@@ -377,6 +407,7 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
377
407
|
editModeEnabled: boolean;
|
|
378
408
|
/** Identifier for persisting layouts */
|
|
379
409
|
formId?: string;
|
|
410
|
+
componentInstanceId?: string;
|
|
380
411
|
/** Optional layout to use instead of generated one */
|
|
381
412
|
layout?: FormLayout;
|
|
382
413
|
/** Optional navigation back config (from CRUD host) */
|
|
@@ -399,6 +430,10 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
399
430
|
disabledModeGlobal: boolean | null;
|
|
400
431
|
presentationModeGlobal: boolean | null;
|
|
401
432
|
visibleGlobal: boolean | null;
|
|
433
|
+
get effectivePresentation(): boolean;
|
|
434
|
+
get effectiveReadonly(): boolean;
|
|
435
|
+
/** Value propagated to DynamicFieldLoader; null allows per-field metadata */
|
|
436
|
+
get presentationForLoader(): boolean | null;
|
|
402
437
|
/** Custom endpoints for CRUD operations */
|
|
403
438
|
private _customEndpoints;
|
|
404
439
|
get customEndpoints(): EndpointConfig;
|
|
@@ -411,6 +446,7 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
411
446
|
valueChange: EventEmitter<FormValueChangeEvent>;
|
|
412
447
|
syncCompleted: EventEmitter<SyncResult>;
|
|
413
448
|
initializationError: EventEmitter<FormInitializationError>;
|
|
449
|
+
loadingStateChange: EventEmitter<LoadingState>;
|
|
414
450
|
editModeEnabledChange: EventEmitter<boolean>;
|
|
415
451
|
customAction: EventEmitter<FormCustomActionEvent>;
|
|
416
452
|
actionConfirmation: EventEmitter<FormActionConfirmationEvent>;
|
|
@@ -421,6 +457,8 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
421
457
|
lastVerifiedAt?: string;
|
|
422
458
|
formId?: string;
|
|
423
459
|
}>;
|
|
460
|
+
/** Forwarded from DynamicFieldLoader to allow host-side observability. */
|
|
461
|
+
fieldRenderError: EventEmitter<DynamicFieldRenderErrorEvent>;
|
|
424
462
|
isLoading: boolean;
|
|
425
463
|
submitting: boolean;
|
|
426
464
|
submitError: string | null;
|
|
@@ -430,9 +468,15 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
430
468
|
isRecoverable: boolean;
|
|
431
469
|
private isInitialized;
|
|
432
470
|
form: FormGroup;
|
|
471
|
+
aiAdapter: FormAiAdapter;
|
|
433
472
|
fieldVisibility: {
|
|
434
473
|
[fieldName: string]: boolean;
|
|
435
474
|
};
|
|
475
|
+
private fieldRuleProps;
|
|
476
|
+
private sectionRuleProps;
|
|
477
|
+
actionRuleProps: Record<string, Record<string, any>>;
|
|
478
|
+
private rowRuleProps;
|
|
479
|
+
private columnRuleProps;
|
|
436
480
|
private pendingEntityId;
|
|
437
481
|
private loadedEntityId;
|
|
438
482
|
private loadedEntityData;
|
|
@@ -448,6 +492,19 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
448
492
|
schemaOutdated: boolean;
|
|
449
493
|
private resolvedPrefs;
|
|
450
494
|
private reactiveValidate$?;
|
|
495
|
+
private warnedMissingId;
|
|
496
|
+
private schemaState;
|
|
497
|
+
private getLogger;
|
|
498
|
+
private buildLogOptions;
|
|
499
|
+
private debugLog;
|
|
500
|
+
private warnLog;
|
|
501
|
+
private warnOnceLog;
|
|
502
|
+
private errorLog;
|
|
503
|
+
private toErrorMessage;
|
|
504
|
+
private isDynamicFieldRenderErrorEvent;
|
|
505
|
+
onFieldRenderError(event: DynamicFieldRenderErrorEvent | Event): void;
|
|
506
|
+
private componentKeyId;
|
|
507
|
+
private warnMissingId;
|
|
451
508
|
openQuickConnect(): void;
|
|
452
509
|
private get debugDnD();
|
|
453
510
|
get sectionDropListIds(): string[];
|
|
@@ -469,12 +526,27 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
469
526
|
hoveredElement: CanvasElement | null;
|
|
470
527
|
selectedElement: CanvasElement | null;
|
|
471
528
|
toolbarTransform: string;
|
|
472
|
-
|
|
529
|
+
private inputsLoaded;
|
|
530
|
+
private hasMountedAnimation;
|
|
531
|
+
private mountAnimationTimer;
|
|
532
|
+
protected isMounting: boolean;
|
|
533
|
+
constructor(crud: GenericCrudService<any>, 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, errorMessages: ErrorMessageService, schemaNormalizer: SchemaNormalizerService, componentMetaRegistry: ComponentMetadataRegistry, global: GlobalConfigService, componentKeys: ComponentKeyService, loadingOrchestrator: LoadingOrchestrator, loadingRenderer?: PraxisLoadingRenderer | undefined, router?: Router | undefined, route?: ActivatedRoute | undefined, hooksRegistry?: FormHooksRegistry | undefined, hookPresets?: FormHookPreset[] | null | undefined, logger?: LoggerService | undefined);
|
|
534
|
+
private emitLoadingState;
|
|
535
|
+
private buildLoadingContext;
|
|
536
|
+
private beginLoading;
|
|
537
|
+
private endLoading;
|
|
473
538
|
private runHooks;
|
|
474
539
|
private resolveStageDeclarations;
|
|
475
540
|
private resolvePresetDeclarations;
|
|
476
541
|
get shouldShowConfigControls(): boolean;
|
|
477
542
|
private genCorrelationId;
|
|
543
|
+
private resolveModeKey;
|
|
544
|
+
private formConfigKey;
|
|
545
|
+
private formPresKey;
|
|
546
|
+
private formInputsKey;
|
|
547
|
+
private crudBackKey;
|
|
548
|
+
private tryInitializeForm;
|
|
549
|
+
private reloadForModeChange;
|
|
478
550
|
ngOnInit(): void;
|
|
479
551
|
ngOnChanges(changes: SimpleChanges): void;
|
|
480
552
|
private blurAllInputs;
|
|
@@ -486,26 +558,70 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
486
558
|
private syncWithServer;
|
|
487
559
|
private loadEntity;
|
|
488
560
|
private buildFormFromConfig;
|
|
561
|
+
/**
|
|
562
|
+
* Backward-compatible required validation for DATE_RANGE controls.
|
|
563
|
+
* Some core builds do not enforce required start/end for dateRange fields.
|
|
564
|
+
*/
|
|
565
|
+
private applyDateRangeRequiredValidators;
|
|
566
|
+
private isMountAnimationDisabled;
|
|
567
|
+
private triggerMountAnimation;
|
|
568
|
+
protected getMountDurationVar(): string | null;
|
|
569
|
+
protected getMountOffsetVar(): string | null;
|
|
570
|
+
protected getMountStaggerVar(): string | null;
|
|
489
571
|
private connectionKey;
|
|
490
572
|
private saveConnection;
|
|
491
573
|
disconnect(): void;
|
|
492
574
|
onToolbarRequestClose(): void;
|
|
493
575
|
private evaluateAndApplyRules;
|
|
576
|
+
isSectionCollapsed(section?: FormSection): boolean;
|
|
577
|
+
isSectionCollapsible(section?: FormSection): boolean;
|
|
578
|
+
private getSectionRuleProps;
|
|
579
|
+
isSectionVisible(section?: FormSection): boolean;
|
|
580
|
+
getSectionTitle(section: FormSection): string | undefined;
|
|
581
|
+
getSectionDescription(section: FormSection): string | undefined;
|
|
582
|
+
getSectionTitleColor(section: FormSection): string | undefined;
|
|
583
|
+
getSectionDescriptionColor(section: FormSection): string | undefined;
|
|
584
|
+
getSectionTitleStyle(section: FormSection): string | undefined;
|
|
585
|
+
getSectionDescriptionStyle(section: FormSection): string | undefined;
|
|
586
|
+
getSectionHeaderTooltip(section: FormSection): string | undefined;
|
|
587
|
+
getSectionHeaderAlign(section: FormSection): 'start' | 'center' | undefined;
|
|
588
|
+
getSectionGapBottom(section: FormSection): number | null;
|
|
589
|
+
getSectionTitleGapBottom(section: FormSection): number | null;
|
|
590
|
+
getSectionDescriptionGapBottom(section: FormSection): number | null;
|
|
591
|
+
private getRowRuleProps;
|
|
592
|
+
isRowVisible(row?: FormRow): boolean;
|
|
593
|
+
getRowGap(row: FormRow): number | null;
|
|
594
|
+
getRowRowGap(row: FormRow): number | null;
|
|
595
|
+
getRowClasses(row: FormRow): string[];
|
|
596
|
+
getRowStyles(row: FormRow): Record<string, any> | null;
|
|
597
|
+
getSectionIcon(section: FormSection): string | undefined;
|
|
598
|
+
getSectionClasses(section: FormSection): string[];
|
|
599
|
+
getSectionStyles(section: FormSection): Record<string, any> | null;
|
|
600
|
+
private applyBorderPropsToStyle;
|
|
601
|
+
toggleSectionCollapse(event: Event, section: FormSection): void;
|
|
602
|
+
sectionPanelId(section: FormSection, index: number): string;
|
|
603
|
+
getSectionCollapsedSummary(section: FormSection): string;
|
|
494
604
|
getColumnFields(column: {
|
|
495
605
|
fields: string[];
|
|
496
606
|
id?: string;
|
|
497
607
|
}): FieldMetadata[];
|
|
608
|
+
private getColumnRuleProps;
|
|
609
|
+
private getEffectiveColumn;
|
|
498
610
|
getColumnClasses(column: FormColumn): string[];
|
|
499
611
|
private getColumnSpanClasses;
|
|
500
612
|
private getColumnOffsetClasses;
|
|
501
613
|
private getColumnOrderClasses;
|
|
502
614
|
private getColumnHiddenClasses;
|
|
503
615
|
isColumnVisible(column: FormColumn): boolean;
|
|
616
|
+
getColumnPadding(column: FormColumn): number | undefined;
|
|
617
|
+
getColumnStyles(column: FormColumn): Record<string, any> | null;
|
|
504
618
|
private _getConfirmationMessage;
|
|
505
619
|
private _showConfirmationDialog;
|
|
506
620
|
onFormAction(event: PraxisFormActionEvent): void;
|
|
507
621
|
private _executeAction;
|
|
508
622
|
onSubmit(): Promise<void>;
|
|
623
|
+
private navigateAfterSave;
|
|
624
|
+
private shouldConfirmCancelOnDirty;
|
|
509
625
|
/**
|
|
510
626
|
* TOGGLE DE CUSTOMIZAÇÃO DE LAYOUT - NÃO É EDIÇÃO DE DADOS
|
|
511
627
|
*
|
|
@@ -516,7 +632,7 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
516
632
|
* IMPORTANTE: Independe completamente do mode do formulário
|
|
517
633
|
*/
|
|
518
634
|
toggleEditMode(): void;
|
|
519
|
-
openConfigEditor(): void
|
|
635
|
+
openConfigEditor(): Promise<void>;
|
|
520
636
|
onElementMouseEnter(event: MouseEvent, type: CanvasElementType, data: any, element?: HTMLElement): void;
|
|
521
637
|
onElementMouseLeave(event: MouseEvent): void;
|
|
522
638
|
onElementClick(event: MouseEvent, type: CanvasElementType, data: any, element?: HTMLElement): void;
|
|
@@ -527,6 +643,13 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
527
643
|
onIgnoreOutdated(): void;
|
|
528
644
|
onSnoozeOutdated(): void;
|
|
529
645
|
private getSchemaMetaKey;
|
|
646
|
+
private getSchemaMetaIndexKey;
|
|
647
|
+
private getSchemaMetaKeyForSchemaId;
|
|
648
|
+
private getSchemaMetaKeyForContext;
|
|
649
|
+
private loadStoredSchemaMeta;
|
|
650
|
+
private rememberSchemaMetaContext;
|
|
651
|
+
private isSameSchemaContext;
|
|
652
|
+
private isStoredSchemaMetaForContext;
|
|
530
653
|
private getPrefsKey;
|
|
531
654
|
private getOutdatedIgnoreKey;
|
|
532
655
|
private getOutdatedSnoozeKey;
|
|
@@ -553,13 +676,17 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
553
676
|
private openFieldMetadataEditorInternal;
|
|
554
677
|
private openRowEditor;
|
|
555
678
|
private openColumnEditor;
|
|
556
|
-
|
|
679
|
+
openSectionEditor(section: any, focusTarget?: 'title' | 'description'): void;
|
|
557
680
|
private getControlTypeIcon;
|
|
558
681
|
/**
|
|
559
682
|
* Friendly control type name resolved from ComponentMetadataRegistry when available.
|
|
560
683
|
* Falls back to a local map only when there is no registered metadata.
|
|
561
684
|
*/
|
|
562
685
|
private getControlTypeName;
|
|
686
|
+
private applyNullDeletionPatch;
|
|
687
|
+
private stripNullMarkersFromPatch;
|
|
688
|
+
private deleteMetadataPath;
|
|
689
|
+
private getMetadataPath;
|
|
563
690
|
/**
|
|
564
691
|
* Applies a metadata patch to the field with the given name and rebuilds the form.
|
|
565
692
|
*/
|
|
@@ -618,6 +745,8 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
618
745
|
trackBySection(index: number, section: FormSection): string;
|
|
619
746
|
trackByRow(index: number, row: FormRow): string;
|
|
620
747
|
trackByColumn(index: number, column: FormColumn): string;
|
|
748
|
+
/** Apply configuration updates coming from external adapters (e.g., AI) in a controlled way. */
|
|
749
|
+
applyConfigFromAdapter(nextConfig: FormConfig): void;
|
|
621
750
|
retryInitialization(): void;
|
|
622
751
|
getErrorTitle(): string;
|
|
623
752
|
showDetailedError(): void;
|
|
@@ -626,10 +755,11 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
626
755
|
private isReactiveValidationEnabled;
|
|
627
756
|
private getReactiveValidationDebounceMs;
|
|
628
757
|
private setupReactiveValidation;
|
|
629
|
-
private
|
|
758
|
+
private logRowGapsSnapshot;
|
|
630
759
|
private applyPresentationVars;
|
|
631
|
-
|
|
632
|
-
static
|
|
760
|
+
private applyPresentationConfig;
|
|
761
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisDynamicForm, [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
762
|
+
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; }; "componentInstanceId": { "alias": "componentInstanceId"; "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"; "loadingStateChange": "loadingStateChange"; "editModeEnabledChange": "editModeEnabledChange"; "customAction": "customAction"; "actionConfirmation": "actionConfirmation"; "schemaStatusChange": "schemaStatusChange"; "fieldRenderError": "fieldRenderError"; }, never, never, true, never>;
|
|
633
763
|
}
|
|
634
764
|
|
|
635
765
|
declare class FormConfigService {
|
|
@@ -703,14 +833,19 @@ declare class JsonConfigEditorComponent implements OnInit, OnDestroy {
|
|
|
703
833
|
declare class PraxisDynamicFormConfigEditor implements SettingsValueProvider, OnInit, OnDestroy {
|
|
704
834
|
private storage;
|
|
705
835
|
private configService;
|
|
836
|
+
private settingsPanel;
|
|
837
|
+
private cdr;
|
|
706
838
|
jsonEditor?: JsonConfigEditorComponent;
|
|
707
839
|
editedConfig: FormConfig;
|
|
708
840
|
ruleBuilderConfig: RuleBuilderConfig;
|
|
709
841
|
ruleBuilderState?: RuleBuilderState;
|
|
842
|
+
currentRules: FormLayoutRule[];
|
|
710
843
|
private initialConfig;
|
|
711
844
|
backConfig?: BackConfig;
|
|
712
845
|
formId?: string;
|
|
846
|
+
componentKeyId?: string;
|
|
713
847
|
inputMode: 'create' | 'edit' | 'view';
|
|
848
|
+
private readonly editorMode;
|
|
714
849
|
isPresentationMode: boolean;
|
|
715
850
|
truncatePreview: boolean;
|
|
716
851
|
previewItems: {
|
|
@@ -727,6 +862,8 @@ declare class PraxisDynamicFormConfigEditor implements SettingsValueProvider, On
|
|
|
727
862
|
labelAlign?: 'start' | 'center' | 'end';
|
|
728
863
|
valueAlign?: 'start' | 'center' | 'end';
|
|
729
864
|
};
|
|
865
|
+
/** Ensure hints object exists (normalized upstream) */
|
|
866
|
+
private ensureHints;
|
|
730
867
|
schemaPrefs: {
|
|
731
868
|
notifyIfOutdated: 'inline' | 'snackbar' | 'both' | 'none';
|
|
732
869
|
snoozeMs: number;
|
|
@@ -736,13 +873,18 @@ declare class PraxisDynamicFormConfigEditor implements SettingsValueProvider, On
|
|
|
736
873
|
serverHash?: string;
|
|
737
874
|
lastVerifiedAt?: string;
|
|
738
875
|
};
|
|
876
|
+
private destroy$;
|
|
877
|
+
private hasProcessedInitialRuleState;
|
|
739
878
|
isDirty$: BehaviorSubject<boolean>;
|
|
740
879
|
isValid$: BehaviorSubject<boolean>;
|
|
741
880
|
isBusy$: BehaviorSubject<boolean>;
|
|
742
|
-
|
|
881
|
+
private lastRulesSignature;
|
|
882
|
+
private readonly DEBUG;
|
|
883
|
+
private debugLog;
|
|
884
|
+
constructor(storage: AsyncConfigStorage, configService: FormConfigService, settingsPanel: SettingsPanelService, cdr: ChangeDetectorRef, injectedData?: any);
|
|
743
885
|
ngOnInit(): void;
|
|
744
886
|
reset(): void;
|
|
745
|
-
|
|
887
|
+
updateDirtyState(reason?: string): void;
|
|
746
888
|
getSettingsValue(): any;
|
|
747
889
|
onSave(): any;
|
|
748
890
|
onJsonConfigChange(newConfig: FormConfig): void;
|
|
@@ -754,9 +896,15 @@ declare class PraxisDynamicFormConfigEditor implements SettingsValueProvider, On
|
|
|
754
896
|
private mapMetadataToSchema;
|
|
755
897
|
private mapDataTypeToFieldType;
|
|
756
898
|
ngOnDestroy(): void;
|
|
899
|
+
onLayoutSelect(event: any): void;
|
|
900
|
+
private openColumnEditor;
|
|
757
901
|
onCascadeApply(patch: Record<string, Partial<FieldDefinition>>): void;
|
|
758
902
|
private stripLegacy;
|
|
759
|
-
|
|
903
|
+
private computeRulesSignature;
|
|
904
|
+
restoreHintsDefaults(): void;
|
|
905
|
+
private loadPrefsFromStorage;
|
|
906
|
+
private normalizeMode;
|
|
907
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisDynamicFormConfigEditor, [null, null, null, null, { optional: true; }]>;
|
|
760
908
|
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisDynamicFormConfigEditor, "praxis-dynamic-form-config-editor", never, {}, {}, never, never, true, never>;
|
|
761
909
|
}
|
|
762
910
|
interface FormConfigLike {
|
|
@@ -843,6 +991,8 @@ declare class LayoutEditorComponent implements OnInit {
|
|
|
843
991
|
fieldName?: string;
|
|
844
992
|
} | null;
|
|
845
993
|
gapGlobal: number;
|
|
994
|
+
setGapGlobal(val: number | string): void;
|
|
995
|
+
adjustGapGlobal(delta: number): void;
|
|
846
996
|
density: 'compact' | 'cozy' | 'regular';
|
|
847
997
|
get densityConfig(): {
|
|
848
998
|
gridGap: number;
|
|
@@ -866,6 +1016,7 @@ declare class LayoutEditorComponent implements OnInit {
|
|
|
866
1016
|
get columnDropListIds(): string[];
|
|
867
1017
|
getColumnId(sectionIndex: number, rowIndex: number, columnIndex: number): string;
|
|
868
1018
|
private parseColumnId;
|
|
1019
|
+
select: EventEmitter<any>;
|
|
869
1020
|
onSelect(sel: any): void;
|
|
870
1021
|
clearSelection(): void;
|
|
871
1022
|
selectSection(sectionIndex: number): void;
|
|
@@ -882,14 +1033,15 @@ declare class LayoutEditorComponent implements OnInit {
|
|
|
882
1033
|
id?: string;
|
|
883
1034
|
}): string | number;
|
|
884
1035
|
static ɵfac: i0.ɵɵFactoryDeclaration<LayoutEditorComponent, never>;
|
|
885
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<LayoutEditorComponent, "praxis-layout-editor", never, { "config": { "alias": "config"; "required": false; }; }, { "configChange": "configChange"; }, never, never, true, never>;
|
|
1036
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LayoutEditorComponent, "praxis-layout-editor", never, { "config": { "alias": "config"; "required": false; }; }, { "configChange": "configChange"; "select": "select"; }, never, never, true, never>;
|
|
886
1037
|
}
|
|
887
1038
|
|
|
888
|
-
declare class RowConfiguratorComponent {
|
|
1039
|
+
declare class RowConfiguratorComponent implements OnChanges {
|
|
889
1040
|
row: FormRow;
|
|
890
1041
|
fieldMetadata: FieldMetadata[];
|
|
891
1042
|
sectionIndex: number;
|
|
892
1043
|
rowIndex: number;
|
|
1044
|
+
isLastRow: boolean;
|
|
893
1045
|
selected: {
|
|
894
1046
|
type: 'section' | 'row' | 'column' | 'field';
|
|
895
1047
|
sectionIndex?: number;
|
|
@@ -899,17 +1051,33 @@ declare class RowConfiguratorComponent {
|
|
|
899
1051
|
} | null;
|
|
900
1052
|
availableFieldsListId: string | null;
|
|
901
1053
|
connectedDropListIds: string[];
|
|
1054
|
+
/** Gap herdado do layout (usado como fallback visual) */
|
|
1055
|
+
gapGlobal: number;
|
|
902
1056
|
rowChange: EventEmitter<FormRow>;
|
|
903
1057
|
remove: EventEmitter<void>;
|
|
1058
|
+
applyRowGapAll: EventEmitter<number>;
|
|
904
1059
|
fieldDrop: EventEmitter<CdkDragDrop<any, any, any>>;
|
|
905
1060
|
select: EventEmitter<any>;
|
|
906
1061
|
activeDropIndex: number | null;
|
|
907
1062
|
private hoverTimer;
|
|
1063
|
+
protected readonly breakpoints: Breakpoint[];
|
|
1064
|
+
previewBreakpoint: Breakpoint;
|
|
1065
|
+
menuContext: {
|
|
1066
|
+
type: 'row' | 'column';
|
|
1067
|
+
columnIndex?: number;
|
|
1068
|
+
} | null;
|
|
1069
|
+
private connectedColumnsCache;
|
|
1070
|
+
private connectedColumnsSignature;
|
|
1071
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1072
|
+
private rebuildConnectedColumnsCache;
|
|
908
1073
|
getFieldByName(fieldName: string): FieldMetadata;
|
|
909
1074
|
drop(event: CdkDragDrop<string[]>): void;
|
|
910
1075
|
selectRow(): void;
|
|
1076
|
+
openColumnConfig(index: number): void;
|
|
911
1077
|
selectColumn(index: number, event: MouseEvent): void;
|
|
912
1078
|
selectField(fieldName: string, event: MouseEvent): void;
|
|
1079
|
+
openRowMenu(): void;
|
|
1080
|
+
onMenuClosed(): void;
|
|
913
1081
|
onDropEnter(index: number): void;
|
|
914
1082
|
onDropExit(index: number): void;
|
|
915
1083
|
isRowSelected(): boolean;
|
|
@@ -919,13 +1087,32 @@ declare class RowConfiguratorComponent {
|
|
|
919
1087
|
addColumn(): void;
|
|
920
1088
|
removeColumn(index: number): void;
|
|
921
1089
|
removeRow(): void;
|
|
1090
|
+
moveColumn(index: number, direction: number): void;
|
|
1091
|
+
clearColumn(index: number): void;
|
|
1092
|
+
addFieldToColumn(index: number): void;
|
|
922
1093
|
getColumnId(index: number): string;
|
|
923
1094
|
private generateId;
|
|
924
1095
|
applyPreset(spansMd: number[]): void;
|
|
1096
|
+
getColumnClass(column: any): string;
|
|
925
1097
|
getSpanClasses(column: any): string[];
|
|
926
|
-
|
|
1098
|
+
getColumnClassList(column: any): string;
|
|
1099
|
+
getSpanFor(column: any, bp?: Breakpoint): number;
|
|
1100
|
+
getHiddenFor(column: any, bp?: Breakpoint): boolean;
|
|
1101
|
+
setSpan(columnIndex: number, value: number): void;
|
|
1102
|
+
adjustSpan(columnIndex: number, delta: number): void;
|
|
1103
|
+
toggleHidden(columnIndex: number): void;
|
|
1104
|
+
updateRowGap(kind: 'gap' | 'rowGap', value: number | string): void;
|
|
1105
|
+
adjustRowGapDelta(kind: 'gap' | 'rowGap', delta: number): void;
|
|
1106
|
+
applyRowGapToAll(): void;
|
|
1107
|
+
clearRowGap(): void;
|
|
1108
|
+
hasMultipleColumns(): boolean;
|
|
1109
|
+
getSpanTotal(bp?: Breakpoint): number;
|
|
1110
|
+
getOffsetFor(column: any, bp?: Breakpoint): number;
|
|
1111
|
+
setOffset(columnIndex: number, value: number): void;
|
|
1112
|
+
adjustOffset(columnIndex: number, delta: number): void;
|
|
1113
|
+
getSuggestedSpan(columnIndex: number): number | null;
|
|
927
1114
|
static ɵfac: i0.ɵɵFactoryDeclaration<RowConfiguratorComponent, never>;
|
|
928
|
-
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>;
|
|
1115
|
+
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; }; "isLastRow": { "alias": "isLastRow"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "availableFieldsListId": { "alias": "availableFieldsListId"; "required": false; }; "connectedDropListIds": { "alias": "connectedDropListIds"; "required": false; }; "gapGlobal": { "alias": "gapGlobal"; "required": false; }; }, { "rowChange": "rowChange"; "remove": "remove"; "applyRowGapAll": "applyRowGapAll"; "fieldDrop": "fieldDrop"; "select": "select"; }, never, never, true, never>;
|
|
929
1116
|
}
|
|
930
1117
|
|
|
931
1118
|
declare class FieldConfiguratorComponent {
|
|
@@ -978,6 +1165,13 @@ declare function formLayoutRulesToBuilderState(rules: FormLayoutRule[] | null |
|
|
|
978
1165
|
*/
|
|
979
1166
|
declare function normalizeDateArrays(data: any): any;
|
|
980
1167
|
|
|
1168
|
+
/**
|
|
1169
|
+
* Helper provider to wire the PraxisDynamicForm component into the Settings Panel
|
|
1170
|
+
* GlobalConfigEditor without creating a hard import cycle.
|
|
1171
|
+
*/
|
|
1172
|
+
declare const SETTINGS_PANEL_DYNAMIC_FORM_PROVIDER: Provider;
|
|
1173
|
+
declare function provideSettingsPanelDynamicForm(): Provider;
|
|
1174
|
+
|
|
981
1175
|
declare class CanvasToolbarComponent {
|
|
982
1176
|
selectedElement: CanvasElement | null;
|
|
983
1177
|
editMetadata: EventEmitter<void>;
|
|
@@ -987,6 +1181,9 @@ declare class CanvasToolbarComponent {
|
|
|
987
1181
|
selectPath: EventEmitter<CanvasPathPart>;
|
|
988
1182
|
/** Emite quando o usuário solicita fechar a toolbar (ESC). */
|
|
989
1183
|
requestClose: EventEmitter<void>;
|
|
1184
|
+
/** Estado interno para animar o fechamento. */
|
|
1185
|
+
closing: boolean;
|
|
1186
|
+
private readonly closeAnimMs;
|
|
990
1187
|
toggleReadonly: EventEmitter<void>;
|
|
991
1188
|
toggleRequired: EventEmitter<void>;
|
|
992
1189
|
toggleHidden: EventEmitter<void>;
|
|
@@ -1000,8 +1197,10 @@ declare class CanvasToolbarComponent {
|
|
|
1000
1197
|
get requiredIcon(): string;
|
|
1001
1198
|
get visibilityIcon(): string;
|
|
1002
1199
|
get disabledIcon(): string;
|
|
1003
|
-
/** Fecha a toolbar com a tecla ESC quando o componente está visível. */
|
|
1200
|
+
/** Fecha a toolbar com a tecla ESC quando o componente está visível (com animação). */
|
|
1004
1201
|
onGlobalKeydown(ev: KeyboardEvent): void;
|
|
1202
|
+
/** Inicia animação de saída e emite o evento ao final. */
|
|
1203
|
+
triggerClose(): void;
|
|
1005
1204
|
static ɵfac: i0.ɵɵFactoryDeclaration<CanvasToolbarComponent, never>;
|
|
1006
1205
|
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>;
|
|
1007
1206
|
}
|
|
@@ -1019,11 +1218,21 @@ interface EditableFormSection extends FormSection {
|
|
|
1019
1218
|
};
|
|
1020
1219
|
className?: string;
|
|
1021
1220
|
testId?: string;
|
|
1221
|
+
gapBottom?: number;
|
|
1222
|
+
titleGapBottom?: number;
|
|
1223
|
+
descriptionGapBottom?: number;
|
|
1224
|
+
titleStyle?: string;
|
|
1225
|
+
descriptionStyle?: string;
|
|
1226
|
+
titleColor?: string;
|
|
1227
|
+
descriptionColor?: string;
|
|
1228
|
+
headerAlign?: 'start' | 'center';
|
|
1229
|
+
headerTooltip?: string;
|
|
1022
1230
|
}
|
|
1023
|
-
declare class SectionEditorComponent implements OnInit, OnDestroy, SettingsValueProvider {
|
|
1231
|
+
declare class SectionEditorComponent implements OnInit, AfterViewInit, OnDestroy, SettingsValueProvider {
|
|
1024
1232
|
private fb;
|
|
1025
1233
|
private data;
|
|
1026
1234
|
private iconPicker;
|
|
1235
|
+
focusTarget?: 'title' | 'description';
|
|
1027
1236
|
section: EditableFormSection;
|
|
1028
1237
|
form: FormGroup;
|
|
1029
1238
|
breakpoints: Breakpoint[];
|
|
@@ -1031,16 +1240,23 @@ declare class SectionEditorComponent implements OnInit, OnDestroy, SettingsValue
|
|
|
1031
1240
|
isValid$: BehaviorSubject<boolean>;
|
|
1032
1241
|
isBusy$: BehaviorSubject<boolean>;
|
|
1033
1242
|
private destroy$;
|
|
1243
|
+
titleInput?: ElementRef<HTMLInputElement>;
|
|
1244
|
+
descriptionInput?: ElementRef<HTMLTextAreaElement>;
|
|
1034
1245
|
constructor(fb: FormBuilder, data: {
|
|
1035
1246
|
section: EditableFormSection;
|
|
1036
1247
|
}, iconPicker: IconPickerService);
|
|
1037
1248
|
ngOnInit(): void;
|
|
1249
|
+
ngAfterViewInit(): void;
|
|
1038
1250
|
ngOnDestroy(): void;
|
|
1039
1251
|
getSettingsValue(): any;
|
|
1040
1252
|
pickIcon(): Promise<void>;
|
|
1041
1253
|
clearIcon(): void;
|
|
1254
|
+
applyPreset(key: 'default' | 'simple' | 'collapsible' | 'denseGrid'): void;
|
|
1255
|
+
setCustomColors(value: string): void;
|
|
1256
|
+
onTitleStyleChange(style: string): void;
|
|
1257
|
+
onDescriptionStyleChange(style: string): void;
|
|
1042
1258
|
static ɵfac: i0.ɵɵFactoryDeclaration<SectionEditorComponent, never>;
|
|
1043
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SectionEditorComponent, "praxis-section-editor", never, {}, {}, never, never, true, never>;
|
|
1259
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SectionEditorComponent, "praxis-section-editor", never, { "focusTarget": { "alias": "focusTarget"; "required": false; }; }, {}, never, never, true, never>;
|
|
1044
1260
|
}
|
|
1045
1261
|
|
|
1046
1262
|
interface EditableFormRow extends FormRow {
|
|
@@ -1064,16 +1280,24 @@ declare class RowEditorComponent implements OnInit, OnDestroy, SettingsValueProv
|
|
|
1064
1280
|
form: FormGroup;
|
|
1065
1281
|
breakpoints: Breakpoint[];
|
|
1066
1282
|
row: EditableFormRow;
|
|
1283
|
+
hiddenMode: 'none' | 'mobile' | 'desktop';
|
|
1067
1284
|
isDirty$: BehaviorSubject<boolean>;
|
|
1068
1285
|
isValid$: BehaviorSubject<boolean>;
|
|
1069
1286
|
isBusy$: BehaviorSubject<boolean>;
|
|
1070
1287
|
private destroy$;
|
|
1288
|
+
private initialValueSig;
|
|
1071
1289
|
constructor(fb: FormBuilder, data: {
|
|
1072
1290
|
row: EditableFormRow;
|
|
1073
1291
|
});
|
|
1074
1292
|
ngOnInit(): void;
|
|
1075
1293
|
ngOnDestroy(): void;
|
|
1076
1294
|
getSettingsValue(): any;
|
|
1295
|
+
displayValue(value: number | null | undefined, fallback: string): string | number;
|
|
1296
|
+
displayPxValue(value: number | null | undefined): string;
|
|
1297
|
+
private setColumns;
|
|
1298
|
+
applyPreset(preset: 'full' | 'half' | 'thirds' | 'thirdTwoThird' | 'twoThirdThird' | 'autoBalance'): void;
|
|
1299
|
+
private resolveHiddenMode;
|
|
1300
|
+
setHiddenMode(mode: 'none' | 'mobile' | 'desktop'): void;
|
|
1077
1301
|
static ɵfac: i0.ɵɵFactoryDeclaration<RowEditorComponent, never>;
|
|
1078
1302
|
static ɵcmp: i0.ɵɵComponentDeclaration<RowEditorComponent, "praxis-row-editor", never, {}, {}, never, never, true, never>;
|
|
1079
1303
|
}
|
|
@@ -1083,6 +1307,7 @@ declare class ColumnEditorComponent implements OnInit, OnDestroy, SettingsValueP
|
|
|
1083
1307
|
private data;
|
|
1084
1308
|
form: FormGroup;
|
|
1085
1309
|
breakpoints: Breakpoint[];
|
|
1310
|
+
previewBreakpoint: Breakpoint;
|
|
1086
1311
|
column: FormColumn;
|
|
1087
1312
|
isDirty$: BehaviorSubject<boolean>;
|
|
1088
1313
|
isValid$: BehaviorSubject<boolean>;
|
|
@@ -1096,6 +1321,22 @@ declare class ColumnEditorComponent implements OnInit, OnDestroy, SettingsValueP
|
|
|
1096
1321
|
ngOnDestroy(): void;
|
|
1097
1322
|
private applyChanges;
|
|
1098
1323
|
getSettingsValue(): any;
|
|
1324
|
+
onBreakpointChange(bp: Breakpoint): void;
|
|
1325
|
+
private getControl;
|
|
1326
|
+
getSpan(bp: Breakpoint): number;
|
|
1327
|
+
setSpan(value: number | string): void;
|
|
1328
|
+
adjustSpan(delta: number): void;
|
|
1329
|
+
getOffset(bp: Breakpoint): number;
|
|
1330
|
+
setOffset(value: number | string): void;
|
|
1331
|
+
adjustOffset(delta: number): void;
|
|
1332
|
+
getOrder(bp: Breakpoint): number;
|
|
1333
|
+
setOrder(value: number | string): void;
|
|
1334
|
+
isHidden(bp: Breakpoint): boolean;
|
|
1335
|
+
toggleHidden(): void;
|
|
1336
|
+
copyToLarger(): void;
|
|
1337
|
+
resetResponsive(): void;
|
|
1338
|
+
applyPreset(key: 'full' | 'half' | 'third' | 'twoThird' | 'centered' | 'narrowSidebar' | 'wideContent' | 'stackMobile' | 'hideMobile' | 'desktopOnly'): void;
|
|
1339
|
+
toggleHiddenBp(bp: Breakpoint): void;
|
|
1099
1340
|
static ɵfac: i0.ɵɵFactoryDeclaration<ColumnEditorComponent, never>;
|
|
1100
1341
|
static ɵcmp: i0.ɵɵComponentDeclaration<ColumnEditorComponent, "praxis-column-editor", never, {}, {}, never, never, true, never>;
|
|
1101
1342
|
}
|
|
@@ -1112,5 +1353,180 @@ declare class ActionsEditorComponent {
|
|
|
1112
1353
|
static ɵcmp: i0.ɵɵComponentDeclaration<ActionsEditorComponent, "praxis-actions-editor", never, { "actions": { "alias": "actions"; "required": false; }; }, {}, never, never, true, never>;
|
|
1113
1354
|
}
|
|
1114
1355
|
|
|
1115
|
-
|
|
1116
|
-
|
|
1356
|
+
/**
|
|
1357
|
+
* Catálogo de capacidades do PraxisDynamicForm para uso da IA.
|
|
1358
|
+
* Paths seguem o schema do FormConfig (layout + metadados de campos).
|
|
1359
|
+
*/
|
|
1360
|
+
|
|
1361
|
+
declare module '@praxisui/core' {
|
|
1362
|
+
interface AiCapabilityCategoryMap {
|
|
1363
|
+
fields: true;
|
|
1364
|
+
rules: true;
|
|
1365
|
+
api: true;
|
|
1366
|
+
messages: true;
|
|
1367
|
+
metadata: true;
|
|
1368
|
+
hooks: true;
|
|
1369
|
+
actions: true;
|
|
1370
|
+
}
|
|
1371
|
+
}
|
|
1372
|
+
type CapabilityCategory$1 = AiCapabilityCategory;
|
|
1373
|
+
type ValueKind$1 = AiValueKind;
|
|
1374
|
+
interface Capability$1 extends AiCapability {
|
|
1375
|
+
category: CapabilityCategory$1;
|
|
1376
|
+
}
|
|
1377
|
+
interface CapabilityCatalog$1 extends AiCapabilityCatalog {
|
|
1378
|
+
capabilities: Capability$1[];
|
|
1379
|
+
}
|
|
1380
|
+
declare enum ColumnAlign {
|
|
1381
|
+
Start = "start",
|
|
1382
|
+
Center = "center",
|
|
1383
|
+
End = "end",
|
|
1384
|
+
Stretch = "stretch"
|
|
1385
|
+
}
|
|
1386
|
+
declare enum FormActionsLayoutPosition {
|
|
1387
|
+
Left = "left",
|
|
1388
|
+
Center = "center",
|
|
1389
|
+
Right = "right",
|
|
1390
|
+
Justified = "justified",
|
|
1391
|
+
Split = "split"
|
|
1392
|
+
}
|
|
1393
|
+
declare enum FormActionsLayoutMobilePosition {
|
|
1394
|
+
Left = "left",
|
|
1395
|
+
Center = "center",
|
|
1396
|
+
Right = "right",
|
|
1397
|
+
Justified = "justified"
|
|
1398
|
+
}
|
|
1399
|
+
declare enum FormActionsLayoutOrientation {
|
|
1400
|
+
Horizontal = "horizontal",
|
|
1401
|
+
Vertical = "vertical"
|
|
1402
|
+
}
|
|
1403
|
+
declare enum FormActionsLayoutSpacing {
|
|
1404
|
+
Compact = "compact",
|
|
1405
|
+
Normal = "normal",
|
|
1406
|
+
Spacious = "spacious"
|
|
1407
|
+
}
|
|
1408
|
+
declare enum FormActionsLayoutPlacement {
|
|
1409
|
+
InsideLastSection = "insideLastSection",
|
|
1410
|
+
AfterSections = "afterSections",
|
|
1411
|
+
Top = "top"
|
|
1412
|
+
}
|
|
1413
|
+
declare enum FormActionButtonColor {
|
|
1414
|
+
Primary = "primary",
|
|
1415
|
+
Accent = "accent",
|
|
1416
|
+
Warn = "warn",
|
|
1417
|
+
Basic = "basic"
|
|
1418
|
+
}
|
|
1419
|
+
declare enum FormActionButtonSize {
|
|
1420
|
+
Small = "small",
|
|
1421
|
+
Medium = "medium",
|
|
1422
|
+
Large = "large"
|
|
1423
|
+
}
|
|
1424
|
+
declare enum FormActionButtonVariant {
|
|
1425
|
+
Raised = "raised",
|
|
1426
|
+
Stroked = "stroked",
|
|
1427
|
+
Flat = "flat",
|
|
1428
|
+
Fab = "fab"
|
|
1429
|
+
}
|
|
1430
|
+
declare enum FormActionButtonType {
|
|
1431
|
+
Button = "button",
|
|
1432
|
+
Submit = "submit",
|
|
1433
|
+
Reset = "reset"
|
|
1434
|
+
}
|
|
1435
|
+
declare enum FormRuleTargetType {
|
|
1436
|
+
Field = "field",
|
|
1437
|
+
Section = "section",
|
|
1438
|
+
Action = "action",
|
|
1439
|
+
Row = "row",
|
|
1440
|
+
Column = "column"
|
|
1441
|
+
}
|
|
1442
|
+
declare enum FormRuleContext {
|
|
1443
|
+
Visibility = "visibility",
|
|
1444
|
+
ReadOnly = "readOnly",
|
|
1445
|
+
Style = "style",
|
|
1446
|
+
Validation = "validation",
|
|
1447
|
+
Notification = "notification"
|
|
1448
|
+
}
|
|
1449
|
+
declare enum FieldAppearance {
|
|
1450
|
+
Fill = "fill",
|
|
1451
|
+
Outline = "outline"
|
|
1452
|
+
}
|
|
1453
|
+
declare enum FieldFloatLabel {
|
|
1454
|
+
Auto = "auto",
|
|
1455
|
+
Always = "always",
|
|
1456
|
+
Never = "never"
|
|
1457
|
+
}
|
|
1458
|
+
declare enum FieldHintPosition {
|
|
1459
|
+
Start = "start",
|
|
1460
|
+
End = "end"
|
|
1461
|
+
}
|
|
1462
|
+
declare enum SectionTitleStyle {
|
|
1463
|
+
TitleLarge = "titleLarge",
|
|
1464
|
+
TitleMedium = "titleMedium",
|
|
1465
|
+
TitleSmall = "titleSmall",
|
|
1466
|
+
HeadlineSmall = "headlineSmall"
|
|
1467
|
+
}
|
|
1468
|
+
declare enum SectionDescriptionStyle {
|
|
1469
|
+
BodyLarge = "bodyLarge",
|
|
1470
|
+
BodyMedium = "bodyMedium",
|
|
1471
|
+
BodySmall = "bodySmall"
|
|
1472
|
+
}
|
|
1473
|
+
declare const ENUMS: {
|
|
1474
|
+
iconPosition: string[];
|
|
1475
|
+
iconSize: string[];
|
|
1476
|
+
validationMode: string[];
|
|
1477
|
+
dependencyMergeStrategy: string[];
|
|
1478
|
+
dependencyLoadOnChange: string[];
|
|
1479
|
+
textTransformApply: string[];
|
|
1480
|
+
visibleIn: string[];
|
|
1481
|
+
columnAlign: ColumnAlign[];
|
|
1482
|
+
formActionsLayoutPosition: FormActionsLayoutPosition[];
|
|
1483
|
+
formActionsLayoutMobilePosition: FormActionsLayoutMobilePosition[];
|
|
1484
|
+
formActionsLayoutOrientation: FormActionsLayoutOrientation[];
|
|
1485
|
+
formActionsLayoutSpacing: FormActionsLayoutSpacing[];
|
|
1486
|
+
formActionsLayoutPlacement: FormActionsLayoutPlacement[];
|
|
1487
|
+
formActionButtonColor: FormActionButtonColor[];
|
|
1488
|
+
formActionButtonSize: FormActionButtonSize[];
|
|
1489
|
+
formActionButtonVariant: FormActionButtonVariant[];
|
|
1490
|
+
formActionButtonType: FormActionButtonType[];
|
|
1491
|
+
formRuleTargetType: FormRuleTargetType[];
|
|
1492
|
+
formRuleContext: FormRuleContext[];
|
|
1493
|
+
fieldAppearance: FieldAppearance[];
|
|
1494
|
+
fieldFloatLabel: FieldFloatLabel[];
|
|
1495
|
+
fieldHintPosition: FieldHintPosition[];
|
|
1496
|
+
sectionTitleStyle: SectionTitleStyle[];
|
|
1497
|
+
sectionDescriptionStyle: SectionDescriptionStyle[];
|
|
1498
|
+
};
|
|
1499
|
+
declare const FORM_AI_CAPABILITIES: CapabilityCatalog$1;
|
|
1500
|
+
declare const TASK_PRESETS: Record<string, string[]>;
|
|
1501
|
+
declare function getFormCapabilities(): Capability$1[];
|
|
1502
|
+
declare function getFormEnum(name: keyof typeof ENUMS): string[];
|
|
1503
|
+
|
|
1504
|
+
/**
|
|
1505
|
+
* Component-level capabilities for form components and dialog hosts.
|
|
1506
|
+
* Paths assume a wrapper shape: { inputs: {...}, outputs: {...} }.
|
|
1507
|
+
*/
|
|
1508
|
+
|
|
1509
|
+
declare module '@praxisui/core' {
|
|
1510
|
+
interface AiCapabilityCategoryMap {
|
|
1511
|
+
inputs: true;
|
|
1512
|
+
outputs: true;
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
type CapabilityCategory = AiCapabilityCategory;
|
|
1516
|
+
type ValueKind = AiValueKind;
|
|
1517
|
+
interface Capability extends AiCapability {
|
|
1518
|
+
category: CapabilityCategory;
|
|
1519
|
+
}
|
|
1520
|
+
interface CapabilityCatalog extends AiCapabilityCatalog {
|
|
1521
|
+
capabilities: Capability[];
|
|
1522
|
+
}
|
|
1523
|
+
declare const FORM_COMPONENT_AI_CAPABILITIES: CapabilityCatalog;
|
|
1524
|
+
|
|
1525
|
+
/**
|
|
1526
|
+
* Aggregates the macro form capabilities with the specific micro capabilities
|
|
1527
|
+
* of the fields present in the form configuration.
|
|
1528
|
+
*/
|
|
1529
|
+
declare function getFormAiCatalog(formConfig?: FormConfig): AiCapabilityCatalog;
|
|
1530
|
+
|
|
1531
|
+
export { ActionsEditorComponent, CanvasStateService, CanvasToolbarComponent, ColumnEditorComponent, DynamicFormLayoutService, FORM_AI_CAPABILITIES, FORM_COMPONENT_AI_CAPABILITIES, FieldConfiguratorComponent, FieldEditorComponent, FormConfigService, FormContextService, FormLayoutService, JsonConfigEditorComponent, LayoutColorToken, LayoutEditorComponent, LayoutPrefsService, PRAXIS_DYNAMIC_FORM_COMPONENT_METADATA, PraxisDynamicForm, PraxisDynamicFormConfigEditor, PraxisFilterForm, PraxisFormActionsComponent, RowConfiguratorComponent, RowEditorComponent, SETTINGS_PANEL_DYNAMIC_FORM_PROVIDER, SectionEditorComponent, TASK_PRESETS, applyVisibilityRules, formLayoutRulesToBuilderState, getFormAiCatalog, getFormCapabilities, getFormEnum, isRuleSatisfied, normalizeDateArrays, providePraxisDynamicFormMetadata, provideSettingsPanelDynamicForm, ruleBuilderStateToFormLayoutRules, stripLegacyFieldMetadata };
|
|
1532
|
+
export type { CanvasElement, CanvasElementType, CanvasPathPart, Capability$1 as Capability, CapabilityCatalog$1 as CapabilityCatalog, CapabilityCategory$1 as CapabilityCategory, DynamicFieldRenderErrorEvent, FieldPath, FieldPathContainer, FieldPathWithIndex, Capability as FormComponentCapability, CapabilityCatalog as FormComponentCapabilityCatalog, CapabilityCategory as FormComponentCapabilityCategory, ValueKind as FormComponentValueKind, FormConfigLike, IdPath, JsonEditorEvent, JsonValidationResult, LayoutChange, LayoutResult, Operation, Path, PathWithIndex, PraxisFormActionEvent, RemovePolicy, ValidationReport, ValueKind$1 as ValueKind };
|