@praxisui/dynamic-form 8.0.0-beta.2 → 8.0.0-beta.21
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 +166 -18
- package/docs/dynamic-form-authoring-document-semantics.md +80 -0
- package/docs/dynamic-form-llm-rule-authoring-guide.md +318 -0
- package/docs/dynamic-form-rules-authoring-plan.md +379 -0
- package/docs/hot-metadata-updates.md +141 -0
- package/docs/layout-items-visual-blocks.md +406 -0
- package/fesm2022/praxisui-dynamic-form-dynamic-form-agentic-authoring-turn-flow-DuH1ad7h.mjs +417 -0
- package/fesm2022/praxisui-dynamic-form.mjs +9147 -2078
- package/index.d.ts +640 -22
- package/package.json +12 -6
- package/src/lib/components/praxis-form-actions/praxis-form-actions.json-api.md +441 -0
- package/src/lib/config-editor/praxis-dynamic-form-config-editor.json-api.md +481 -0
- package/src/lib/filter-form/praxis-filter-form.json-api.md +507 -0
- package/src/lib/json-config-editor/form-json-config-editor.json-api.md +491 -0
- package/src/lib/layout-editor/praxis-layout-editor.json-api.md +432 -0
- package/src/lib/praxis-dynamic-form.json-api.md +1011 -0
package/index.d.ts
CHANGED
|
@@ -7,12 +7,12 @@ import { MatDialog } from '@angular/material/dialog';
|
|
|
7
7
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
8
8
|
import { CdkDragStart, CdkDragMove, CdkDragEnd, CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
9
9
|
import * as _praxisui_core from '@praxisui/core';
|
|
10
|
-
import { AsyncConfigStorage, FormLayout, FieldMetadata, FormLayoutRule, FormRuleTargetType as FormRuleTargetType$1, PraxisJsonLogicService, FormSection, FormRow, FormColumn, FormConfig, FormActionButton, AiCapability, BackConfig, ApiEndpoint, ApiUrlEntry, FormHooksLayout, EndpointConfig, FormSubmitEvent, FormReadyEvent, FormValueChangeEvent, SyncResult, FormInitializationError, LoadingState, FormCustomActionEvent, FormActionConfirmationEvent, RichContentDocument, JsonLogicRecord, GenericCrudService, ConnectionStorage, DynamicFormService, ErrorMessageService, SchemaNormalizerService, ComponentMetadataRegistry, GlobalConfigService, ComponentKeyService, LoadingOrchestrator, ApiUrlConfig, PraxisLoadingRenderer, FormHooksRegistry, FormHookPreset, LoggerService, FormSectionHeaderAction, FormSectionHeaderConfig, FormConfigState, FieldDefinition, ComponentDocMeta, Breakpoint, IconPickerService, SurfaceOpenPayload, AiCapabilityCategory, AiValueKind, AiCapabilityCatalog } from '@praxisui/core';
|
|
10
|
+
import { AsyncConfigStorage, FormLayout, FieldMetadata, FormLayoutRule, FormRuleTargetType as FormRuleTargetType$1, PraxisJsonLogicService, FormSection, FormRow, FormColumn, FormConfig, FormLayoutItem, FormActionButton, AiCapability, BackConfig, RichBlockHostCapabilities, ApiEndpoint, ApiUrlEntry, FormHooksLayout, EndpointConfig, FormSubmitEvent, FormReadyEvent, FormValueChangeEvent, SyncResult, FormInitializationError, LoadingState, FormCustomActionEvent, FormActionConfirmationEvent, RichContentDocument, JsonLogicRecord, GenericCrudService, ConnectionStorage, DynamicFormService, ErrorMessageService, SchemaNormalizerService, ComponentMetadataRegistry, GlobalConfigService, ComponentKeyService, LoadingOrchestrator, ApiUrlConfig, PraxisLoadingRenderer, FormHooksRegistry, FormHookPreset, LoggerService, FormSectionHeaderAction, FormSectionHeaderConfig, FormConfigState, JsonLogicExpression, GlobalActionCatalogEntry, PraxisRuntimeConditionalEffectRule, PraxisRuntimeGlobalActionEffect, GlobalActionField, FieldDefinition, ComponentDocMeta, Breakpoint, DomainRuleRequestOptions, DomainRuleService, DomainRuleMaterialization, IconPickerService, GlobalActionRef, SurfaceOpenPayload, AiCapabilityCategory, AiValueKind, AiCapabilityCatalog, ComponentAuthoringManifest } from '@praxisui/core';
|
|
11
11
|
import * as rxjs from 'rxjs';
|
|
12
12
|
import { Observable, BehaviorSubject } from 'rxjs';
|
|
13
13
|
import { SettingsPanelService, SettingsValueProvider } from '@praxisui/settings-panel';
|
|
14
|
+
import { BaseAiAdapter, AiResponseCompileResult, PatchResult, PraxisAssistantShellLayout, PraxisAssistantTurnViewState, PraxisAssistantShellLabels, PraxisAssistantSessionSnapshot, PraxisAssistantShellQuickReply, PraxisAssistantShellMessage } from '@praxisui/ai';
|
|
14
15
|
import { KeyboardShortcutService } from '@praxisui/dynamic-fields';
|
|
15
|
-
import { BaseAiAdapter, PatchResult } from '@praxisui/ai';
|
|
16
16
|
import { RuleBuilderConfig, RuleBuilderState } from '@praxisui/visual-builder';
|
|
17
17
|
|
|
18
18
|
declare class FormLayoutService {
|
|
@@ -44,6 +44,15 @@ declare class FormContextService {
|
|
|
44
44
|
static ɵprov: i0.ɵɵInjectableDeclaration<FormContextService>;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
type RuleApplicationDiagnosticCode = 'missing-targets' | 'missing-effect' | 'unsupported-target-type' | 'field-target-not-found' | 'target-not-found' | 'invalid-condition' | 'invalid-value-expression' | 'computed-value-iteration-limit' | 'unsupported-property' | 'rule-evaluation-error';
|
|
48
|
+
interface RuleApplicationDiagnostic {
|
|
49
|
+
ruleId?: string;
|
|
50
|
+
ruleName?: string;
|
|
51
|
+
code: RuleApplicationDiagnosticCode;
|
|
52
|
+
targetType?: FormLayoutRule['targetType'];
|
|
53
|
+
targetId?: string;
|
|
54
|
+
details?: string[];
|
|
55
|
+
}
|
|
47
56
|
/**
|
|
48
57
|
* Structured properties resulting from rule evaluation.
|
|
49
58
|
*/
|
|
@@ -53,6 +62,15 @@ interface RuleApplicationResult {
|
|
|
53
62
|
actionProps: Record<string, Record<string, any>>;
|
|
54
63
|
rowProps: Record<string, Record<string, any>>;
|
|
55
64
|
columnProps: Record<string, Record<string, any>>;
|
|
65
|
+
visualBlockProps: Record<string, Record<string, any>>;
|
|
66
|
+
fieldValues: Record<string, any>;
|
|
67
|
+
formData: Record<string, any>;
|
|
68
|
+
diagnostics: RuleApplicationDiagnostic[];
|
|
69
|
+
}
|
|
70
|
+
type RuleApplicationTargetType = NonNullable<FormLayoutRule['targetType']>;
|
|
71
|
+
type RuleApplicationTargetIndex = Partial<Record<RuleApplicationTargetType, ReadonlySet<string>>>;
|
|
72
|
+
interface RuleApplicationContext {
|
|
73
|
+
targetIndex?: RuleApplicationTargetIndex;
|
|
56
74
|
}
|
|
57
75
|
declare class FormRulesService {
|
|
58
76
|
private readonly jsonLogic;
|
|
@@ -64,8 +82,15 @@ declare class FormRulesService {
|
|
|
64
82
|
* @param formRules The array of rules to process.
|
|
65
83
|
* @returns A RuleEvaluationResult object containing the visibility and required states for the fields.
|
|
66
84
|
*/
|
|
67
|
-
applyRules(formGroup: FormGroup, formRules: FormLayoutRule[]): RuleApplicationResult;
|
|
85
|
+
applyRules(formGroup: FormGroup, formRules: FormLayoutRule[], context?: RuleApplicationContext): RuleApplicationResult;
|
|
86
|
+
private ruleTargetExists;
|
|
87
|
+
private normalizeRuleTargetId;
|
|
68
88
|
private evaluateCondition;
|
|
89
|
+
private evaluateRuleValue;
|
|
90
|
+
private evaluateJsonLogicValue;
|
|
91
|
+
private resolveComputedRuleFormData;
|
|
92
|
+
private areRuleValuesEqual;
|
|
93
|
+
private addUnsupportedPropertyDiagnostics;
|
|
69
94
|
private setPath;
|
|
70
95
|
private deletePath;
|
|
71
96
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormRulesService, never>;
|
|
@@ -96,6 +121,7 @@ interface Operation {
|
|
|
96
121
|
sectionId?: string;
|
|
97
122
|
rowId?: string;
|
|
98
123
|
columnId?: string;
|
|
124
|
+
itemId?: string;
|
|
99
125
|
fieldName?: string;
|
|
100
126
|
sectionIndex?: number;
|
|
101
127
|
rowIndex?: number;
|
|
@@ -106,6 +132,7 @@ interface Operation {
|
|
|
106
132
|
sectionId?: string;
|
|
107
133
|
rowId?: string;
|
|
108
134
|
columnId?: string;
|
|
135
|
+
itemId?: string;
|
|
109
136
|
fieldName?: string;
|
|
110
137
|
sectionIndex?: number;
|
|
111
138
|
rowIndex?: number;
|
|
@@ -156,6 +183,23 @@ interface ValidationReport {
|
|
|
156
183
|
valid: boolean;
|
|
157
184
|
errors: string[];
|
|
158
185
|
}
|
|
186
|
+
type LocalFieldInsertionDiagnosticCode = 'missing-field-name' | 'missing-control-type' | 'field-name-already-exists' | 'schema-field-name-collision' | 'invalid-local-field-source';
|
|
187
|
+
interface LocalFieldInsertionDiagnostic {
|
|
188
|
+
code: LocalFieldInsertionDiagnosticCode;
|
|
189
|
+
severity: 'error' | 'warning';
|
|
190
|
+
message: string;
|
|
191
|
+
fieldName?: string;
|
|
192
|
+
}
|
|
193
|
+
interface InsertLocalFieldOptions {
|
|
194
|
+
atIndex?: number;
|
|
195
|
+
schemaFieldNames?: Iterable<string>;
|
|
196
|
+
correlationId?: string;
|
|
197
|
+
origin?: string;
|
|
198
|
+
}
|
|
199
|
+
interface InsertLocalFieldResult extends LayoutResult {
|
|
200
|
+
applied: boolean;
|
|
201
|
+
diagnostics: LocalFieldInsertionDiagnostic[];
|
|
202
|
+
}
|
|
159
203
|
declare class DynamicFormLayoutService {
|
|
160
204
|
private readonly changesSubject;
|
|
161
205
|
readonly changes$: rxjs.Observable<LayoutChange>;
|
|
@@ -178,6 +222,14 @@ declare class DynamicFormLayoutService {
|
|
|
178
222
|
private capitalizeFirstLetter;
|
|
179
223
|
private assertIndex;
|
|
180
224
|
private mutate;
|
|
225
|
+
private getFieldName;
|
|
226
|
+
private findFieldLayoutItemIndex;
|
|
227
|
+
private getLayoutInsertIndexForFieldIndex;
|
|
228
|
+
private applyLayoutItemsToColumn;
|
|
229
|
+
private insertFieldLayoutItem;
|
|
230
|
+
private removeFieldLayoutItem;
|
|
231
|
+
private hasLayoutItems;
|
|
232
|
+
private moveFieldLayoutItem;
|
|
181
233
|
moveSection(config: FormConfig, fromIndex: number, toIndex: number): LayoutResult;
|
|
182
234
|
insertSection(config: FormConfig, section: any, atIndex?: number): LayoutResult;
|
|
183
235
|
removeSection(config: FormConfig, index: number, _policy?: RemovePolicy): LayoutResult;
|
|
@@ -235,6 +287,44 @@ declare class DynamicFormLayoutService {
|
|
|
235
287
|
rowId: string;
|
|
236
288
|
columnId: string;
|
|
237
289
|
}, field: any, atIndex?: number): LayoutResult;
|
|
290
|
+
insertLocalFieldById(config: FormConfig, target: {
|
|
291
|
+
sectionId: string;
|
|
292
|
+
rowId: string;
|
|
293
|
+
columnId: string;
|
|
294
|
+
}, field: FieldMetadata, options?: InsertLocalFieldOptions): InsertLocalFieldResult;
|
|
295
|
+
insertLayoutItemById(config: FormConfig, target: {
|
|
296
|
+
sectionId: string;
|
|
297
|
+
rowId: string;
|
|
298
|
+
columnId: string;
|
|
299
|
+
}, item: FormLayoutItem, atIndex?: number): LayoutResult;
|
|
300
|
+
private prepareLocalFieldMetadata;
|
|
301
|
+
private validateLocalFieldInsertion;
|
|
302
|
+
moveLayoutItemById(config: FormConfig, from: {
|
|
303
|
+
sectionId: string;
|
|
304
|
+
rowId: string;
|
|
305
|
+
columnId: string;
|
|
306
|
+
itemId: string;
|
|
307
|
+
}, to: {
|
|
308
|
+
sectionId: string;
|
|
309
|
+
rowId: string;
|
|
310
|
+
columnId: string;
|
|
311
|
+
toIndex: number;
|
|
312
|
+
}, options?: {
|
|
313
|
+
policy?: RemovePolicy;
|
|
314
|
+
correlationId?: string;
|
|
315
|
+
origin?: string;
|
|
316
|
+
}): LayoutResult;
|
|
317
|
+
updateLayoutItemById(config: FormConfig, target: {
|
|
318
|
+
sectionId: string;
|
|
319
|
+
rowId: string;
|
|
320
|
+
columnId: string;
|
|
321
|
+
itemId: string;
|
|
322
|
+
}, item: FormLayoutItem): LayoutResult;
|
|
323
|
+
removeLayoutItemById(config: FormConfig, sectionId: string, rowId: string, columnId: string, itemId: string, options?: {
|
|
324
|
+
policy?: RemovePolicy;
|
|
325
|
+
correlationId?: string;
|
|
326
|
+
origin?: string;
|
|
327
|
+
}): LayoutResult;
|
|
238
328
|
removeFieldById(config: FormConfig, sectionId: string, rowId: string, columnId: string, fieldName: string, options?: {
|
|
239
329
|
policy?: RemovePolicy;
|
|
240
330
|
correlationId?: string;
|
|
@@ -349,6 +439,7 @@ declare class PraxisFormActionsComponent implements OnChanges, OnDestroy {
|
|
|
349
439
|
getInvalidSubmitHint(): string;
|
|
350
440
|
private applyOverrides;
|
|
351
441
|
private registerActionShortcuts;
|
|
442
|
+
private resolveButtonActionId;
|
|
352
443
|
private isSecondaryButton;
|
|
353
444
|
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisFormActionsComponent, never>;
|
|
354
445
|
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisFormActionsComponent, "praxis-form-actions", never, { "actions": { "alias": "actions"; "required": false; }; "editorialVisualContext": { "alias": "editorialVisualContext"; "required": false; }; "isSubmitting": { "alias": "isSubmitting"; "required": false; }; "formIsValid": { "alias": "formIsValid"; "required": false; }; "submitError": { "alias": "submitError"; "required": false; }; "invalidRequiredFieldLabels": { "alias": "invalidRequiredFieldLabels"; "required": false; }; "formId": { "alias": "formId"; "required": false; }; "actionOverrides": { "alias": "actionOverrides"; "required": false; }; }, { "action": "action"; }, never, never, true, never>;
|
|
@@ -361,6 +452,10 @@ declare class PraxisFormActionsComponent implements OnChanges, OnDestroy {
|
|
|
361
452
|
interface FormAiHost {
|
|
362
453
|
config: FormConfig;
|
|
363
454
|
form: FormGroup;
|
|
455
|
+
mode?: 'create' | 'edit' | 'view';
|
|
456
|
+
enableCustomization?: boolean;
|
|
457
|
+
readonlyModeGlobal?: boolean | null;
|
|
458
|
+
effectiveReadonly?: boolean;
|
|
364
459
|
applyConfigFromAdapter(config: FormConfig): void;
|
|
365
460
|
}
|
|
366
461
|
|
|
@@ -374,13 +469,25 @@ declare class FormAiAdapter extends BaseAiAdapter<FormConfig> {
|
|
|
374
469
|
getCapabilities(): AiCapability[];
|
|
375
470
|
getTaskPresets(): Record<string, string[]>;
|
|
376
471
|
getRuntimeState(): Record<string, any>;
|
|
472
|
+
getAuthoringContext(): Record<string, any>;
|
|
473
|
+
compileAiResponse(response: Record<string, unknown>): AiResponseCompileResult | null;
|
|
377
474
|
createSnapshot(): FormConfig;
|
|
378
475
|
restoreSnapshot(snapshot: FormConfig): Promise<void>;
|
|
379
476
|
applyPatch(patch: Partial<FormConfig>, intent?: string): Promise<PatchResult>;
|
|
380
477
|
getContextDescription(): string;
|
|
381
478
|
private applyConfig;
|
|
382
479
|
private smartMergeFormConfig;
|
|
480
|
+
private extractIncomingRules;
|
|
481
|
+
private extractVisualBlockGuidanceOperationRule;
|
|
482
|
+
private coerceSingleOperationResponse;
|
|
483
|
+
private operationInputRecord;
|
|
484
|
+
private normalizeVisualBlockGuidanceOperationInput;
|
|
485
|
+
private visualBlockGuidanceParamsToRule;
|
|
486
|
+
private normalizeLlmRule;
|
|
487
|
+
private mergeRulesById;
|
|
383
488
|
private cloneConfig;
|
|
489
|
+
private asRecord;
|
|
490
|
+
private toNonEmptyString;
|
|
384
491
|
private isFilled;
|
|
385
492
|
}
|
|
386
493
|
|
|
@@ -481,6 +588,13 @@ interface DynamicFormApplyPlan {
|
|
|
481
588
|
diagnostics: EditorDiagnostic[];
|
|
482
589
|
}
|
|
483
590
|
|
|
591
|
+
interface PraxisDynamicFormDomainRulesOptions {
|
|
592
|
+
enabled?: boolean;
|
|
593
|
+
targetArtifactKey?: string | null;
|
|
594
|
+
targetLayer?: string | null;
|
|
595
|
+
targetArtifactType?: string | null;
|
|
596
|
+
status?: string | null;
|
|
597
|
+
}
|
|
484
598
|
interface DynamicFieldRenderErrorEvent {
|
|
485
599
|
phase: 'executeRendering' | 'detectChanges';
|
|
486
600
|
fieldName: string;
|
|
@@ -506,6 +620,21 @@ type ResolvedSectionHeaderVisual = {
|
|
|
506
620
|
text?: string;
|
|
507
621
|
ariaLabel: string;
|
|
508
622
|
};
|
|
623
|
+
interface FormColumnFieldsRenderItem {
|
|
624
|
+
kind: 'fields';
|
|
625
|
+
id: string;
|
|
626
|
+
fields: FieldMetadata[];
|
|
627
|
+
}
|
|
628
|
+
interface FormColumnRichContentRenderItem {
|
|
629
|
+
kind: 'richContent';
|
|
630
|
+
id: string;
|
|
631
|
+
document: RichContentDocument;
|
|
632
|
+
layout: 'block' | 'inline';
|
|
633
|
+
rootClassName?: string | null;
|
|
634
|
+
className?: string | null;
|
|
635
|
+
style?: Record<string, any> | null;
|
|
636
|
+
}
|
|
637
|
+
type FormColumnRenderItem = FormColumnFieldsRenderItem | FormColumnRichContentRenderItem;
|
|
509
638
|
declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
510
639
|
private crud;
|
|
511
640
|
private http;
|
|
@@ -537,12 +666,20 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
537
666
|
private hookPresets?;
|
|
538
667
|
private logger?;
|
|
539
668
|
private readonly i18n;
|
|
669
|
+
private readonly injector;
|
|
670
|
+
private readonly aiApi;
|
|
671
|
+
private readonly assistantSessions;
|
|
672
|
+
private readonly aiTurnOrchestrator;
|
|
673
|
+
private readonly jsonLogic;
|
|
674
|
+
private readonly aiAssistantSessionEffect;
|
|
675
|
+
private readonly globalActions;
|
|
540
676
|
private readonly DEBUG;
|
|
541
677
|
private effectiveActionsCache?;
|
|
542
678
|
private effectiveActionsCacheBase?;
|
|
543
679
|
private effectiveActionsCacheOverride?;
|
|
544
680
|
private invalidRequiredFieldLabelsCache;
|
|
545
681
|
private invalidRequiredFieldLabelsSignature;
|
|
682
|
+
readonly richContentHostCapabilities: RichBlockHostCapabilities;
|
|
546
683
|
resourcePath?: string;
|
|
547
684
|
resourceId?: string | number;
|
|
548
685
|
initialValue?: Record<string, unknown> | null;
|
|
@@ -617,6 +754,8 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
617
754
|
disabledModeGlobal: boolean | null;
|
|
618
755
|
presentationModeGlobal: boolean | null;
|
|
619
756
|
visibleGlobal: boolean | null;
|
|
757
|
+
/** Opt-in loader for shared domain rule materializations persisted outside FormConfig. */
|
|
758
|
+
domainRules: PraxisDynamicFormDomainRulesOptions | boolean | null;
|
|
620
759
|
get effectivePresentation(): boolean;
|
|
621
760
|
get effectiveReadonly(): boolean;
|
|
622
761
|
get effectiveDisabledMode(): boolean | null;
|
|
@@ -649,6 +788,8 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
649
788
|
}>;
|
|
650
789
|
/** Forwarded from DynamicFieldLoader to allow host-side observability. */
|
|
651
790
|
fieldRenderError: EventEmitter<DynamicFieldRenderErrorEvent>;
|
|
791
|
+
/** Emits runtime rule diagnostics so hosts can surface or log invalid rules. */
|
|
792
|
+
ruleDiagnosticsChange: EventEmitter<RuleApplicationDiagnostic[]>;
|
|
652
793
|
isLoading: boolean;
|
|
653
794
|
submitting: boolean;
|
|
654
795
|
submitError: string | null;
|
|
@@ -659,6 +800,13 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
659
800
|
private isInitialized;
|
|
660
801
|
form: FormGroup;
|
|
661
802
|
aiAdapter: FormAiAdapter;
|
|
803
|
+
aiAssistantOpen: boolean;
|
|
804
|
+
aiAssistantPrompt: string;
|
|
805
|
+
aiAssistantLayout: PraxisAssistantShellLayout;
|
|
806
|
+
aiAssistantViewState: PraxisAssistantTurnViewState;
|
|
807
|
+
readonly aiAssistantLabels: Partial<PraxisAssistantShellLabels>;
|
|
808
|
+
private aiAssistantController;
|
|
809
|
+
private aiAssistantStateSubscription;
|
|
662
810
|
fieldVisibility: {
|
|
663
811
|
[fieldName: string]: boolean;
|
|
664
812
|
};
|
|
@@ -667,6 +815,12 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
667
815
|
actionRuleProps: Record<string, Record<string, any>>;
|
|
668
816
|
private rowRuleProps;
|
|
669
817
|
private columnRuleProps;
|
|
818
|
+
private visualBlockRuleProps;
|
|
819
|
+
private materializedFormRules;
|
|
820
|
+
private materializedFormRulesLoadSignature;
|
|
821
|
+
private readonly formCommandRuleStates;
|
|
822
|
+
ruleApplicationDiagnostics: RuleApplicationDiagnostic[];
|
|
823
|
+
private ruleApplicationDiagnosticsSignature;
|
|
670
824
|
private pendingEntityId;
|
|
671
825
|
private loadedEntityId;
|
|
672
826
|
private hydratedEntityId;
|
|
@@ -677,6 +831,7 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
677
831
|
private schemaRootHooks?;
|
|
678
832
|
private destroy$;
|
|
679
833
|
private formValueChangesSubscription;
|
|
834
|
+
private dependencyPolicySubscription;
|
|
680
835
|
private formBuildCycleId;
|
|
681
836
|
private suppressedValueChangeBuildId;
|
|
682
837
|
private pendingBootstrapValueChangeBuildId;
|
|
@@ -804,10 +959,21 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
804
959
|
private loadEntity;
|
|
805
960
|
private buildFormFromConfig;
|
|
806
961
|
private resetFormValueChangesSubscription;
|
|
962
|
+
private resetDependencyPolicySubscription;
|
|
963
|
+
private setupEntityLookupDependencyPolicies;
|
|
964
|
+
private applyEntityLookupDependencyPolicy;
|
|
965
|
+
private isEntityLookupField;
|
|
966
|
+
private resolveFieldDependencyNames;
|
|
967
|
+
private allowEntityLookupLegacyRetention;
|
|
968
|
+
private hasMeaningfulDependencyValue;
|
|
969
|
+
private setEntityLookupDependencyConflict;
|
|
970
|
+
private clearEntityLookupDependencyConflict;
|
|
971
|
+
private resolveEntityLookupDependencyValidationMessage;
|
|
807
972
|
private scheduleValueChangeBootstrapRelease;
|
|
808
973
|
private hasInteractiveFormState;
|
|
809
974
|
private captureFormRuntimeState;
|
|
810
975
|
private getDirtyFieldNames;
|
|
976
|
+
private collectDirtyFieldNames;
|
|
811
977
|
private buildCurrentFormRuntimeContext;
|
|
812
978
|
private buildRestoreTargetContext;
|
|
813
979
|
private isCompatibleRuntimeStateContext;
|
|
@@ -818,6 +984,12 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
818
984
|
* Some core builds do not enforce required start/end for dateRange fields.
|
|
819
985
|
*/
|
|
820
986
|
private applyDateRangeRequiredValidators;
|
|
987
|
+
/**
|
|
988
|
+
* Backward-compatible required validation for multiple entity lookups.
|
|
989
|
+
* Some form-control builders treat `required` correctly for single lookups but
|
|
990
|
+
* do not mark empty collections as required when `multiple=true`.
|
|
991
|
+
*/
|
|
992
|
+
private applyEntityLookupCollectionRequiredValidators;
|
|
821
993
|
private isMountAnimationDisabled;
|
|
822
994
|
private triggerMountAnimation;
|
|
823
995
|
protected getMountDurationVar(): string | null;
|
|
@@ -828,7 +1000,19 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
828
1000
|
private saveConnection;
|
|
829
1001
|
disconnect(): void;
|
|
830
1002
|
onToolbarRequestClose(): void;
|
|
1003
|
+
private getActiveFormRules;
|
|
1004
|
+
private refreshMaterializedFormRules;
|
|
1005
|
+
private resolveDomainRulesOptions;
|
|
831
1006
|
private evaluateAndApplyRules;
|
|
1007
|
+
private applyRuleComputedFieldValues;
|
|
1008
|
+
private evaluateAndDispatchFormCommandRules;
|
|
1009
|
+
private evaluateFormCommandCondition;
|
|
1010
|
+
private executeFormCommandGlobalAction;
|
|
1011
|
+
private isPotentiallyDestructiveFormCommandAction;
|
|
1012
|
+
private resolveFormCommandPath;
|
|
1013
|
+
private areRuleValuesEqual;
|
|
1014
|
+
private buildRuleApplicationTargetIndex;
|
|
1015
|
+
private setRuleApplicationDiagnostics;
|
|
832
1016
|
isSectionCollapsed(section?: FormSection): boolean;
|
|
833
1017
|
isSectionCollapsible(section?: FormSection): boolean;
|
|
834
1018
|
private getSectionRuleProps;
|
|
@@ -888,11 +1072,19 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
888
1072
|
toggleSectionCollapse(event: Event, section: FormSection): void;
|
|
889
1073
|
sectionPanelId(section: FormSection, index: number): string;
|
|
890
1074
|
getSectionCollapsedSummary(section: FormSection): string;
|
|
1075
|
+
getColumnItems(column: FormColumn): FormLayoutItem[];
|
|
1076
|
+
getColumnRenderItems(column: FormColumn): FormColumnRenderItem[];
|
|
891
1077
|
getColumnFields(column: {
|
|
892
|
-
fields
|
|
1078
|
+
fields?: string[];
|
|
1079
|
+
items?: FormLayoutItem[];
|
|
893
1080
|
id?: string;
|
|
894
1081
|
}): FieldMetadata[];
|
|
1082
|
+
getRichContentLayoutItemDocument(item: FormLayoutItem): RichContentDocument | null;
|
|
1083
|
+
getRichContentLayoutItemLayout(item: FormLayoutItem): 'block' | 'inline';
|
|
1084
|
+
private getVisualBlockRuleProps;
|
|
1085
|
+
private isRichContentLayoutItemVisible;
|
|
895
1086
|
private getColumnFieldsSignature;
|
|
1087
|
+
private getColumnItemsSignature;
|
|
896
1088
|
private getColumnRuleProps;
|
|
897
1089
|
private buildFieldRuleMetadataOverrides;
|
|
898
1090
|
private normalizeRuleFieldOptions;
|
|
@@ -910,7 +1102,12 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
910
1102
|
private _getConfirmationMessageForAliases;
|
|
911
1103
|
private _showConfirmationDialog;
|
|
912
1104
|
onFormAction(event: PraxisFormActionEvent): void;
|
|
1105
|
+
private dispatchRichContentAction;
|
|
1106
|
+
private isRichContentActionAvailable;
|
|
1107
|
+
private hasRichContentCapability;
|
|
1108
|
+
private buildRichContentActionContext;
|
|
913
1109
|
private _executeAction;
|
|
1110
|
+
private getFormActionEventId;
|
|
914
1111
|
onSubmit(): Promise<void>;
|
|
915
1112
|
private navigateAfterSave;
|
|
916
1113
|
private shouldConfirmCancelOnDirty;
|
|
@@ -924,6 +1121,35 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
924
1121
|
* IMPORTANTE: Independe completamente do mode do formulário
|
|
925
1122
|
*/
|
|
926
1123
|
toggleEditMode(): void;
|
|
1124
|
+
openAiAssistant(): void;
|
|
1125
|
+
openAiAssistantFromSession(session: PraxisAssistantSessionSnapshot): void;
|
|
1126
|
+
closeAiAssistant(): void;
|
|
1127
|
+
onAiAssistantPromptChange(prompt: string): void;
|
|
1128
|
+
onAiAssistantSubmit(prompt: string): void;
|
|
1129
|
+
onAiAssistantApply(): void;
|
|
1130
|
+
onAiAssistantRetry(): void;
|
|
1131
|
+
onAiAssistantCancel(): void;
|
|
1132
|
+
onAiAssistantQuickReply(reply: PraxisAssistantShellQuickReply): void;
|
|
1133
|
+
onAiAssistantEditMessage(message: PraxisAssistantShellMessage): void;
|
|
1134
|
+
onAiAssistantResendMessage(message: PraxisAssistantShellMessage): void;
|
|
1135
|
+
onAiAssistantLayoutChange(layout: PraxisAssistantShellLayout): void;
|
|
1136
|
+
aiAssistantTriggerTestId(position: string): string;
|
|
1137
|
+
private initializeAiAssistantController;
|
|
1138
|
+
private buildAiAssistantContextItems;
|
|
1139
|
+
private buildAiAssistantContextSnapshot;
|
|
1140
|
+
private syncAiAssistantSession;
|
|
1141
|
+
private hasAiAssistantSessionState;
|
|
1142
|
+
private resolveAiAssistantSessionId;
|
|
1143
|
+
private resolveAiAssistantOwnerId;
|
|
1144
|
+
private resolveAiAssistantRouteKey;
|
|
1145
|
+
private resolveAiAssistantSummary;
|
|
1146
|
+
private resolveAiAssistantBadge;
|
|
1147
|
+
private resolveAiAssistantIcon;
|
|
1148
|
+
private resolveAiAssistantSelectedTarget;
|
|
1149
|
+
private toAiAssistantTargetKind;
|
|
1150
|
+
private toAiAssistantTargetId;
|
|
1151
|
+
private toAiAssistantTargetLabel;
|
|
1152
|
+
private toAiAssistantPath;
|
|
927
1153
|
openConfigEditor(): Promise<void>;
|
|
928
1154
|
onElementMouseEnter(event: MouseEvent, type: CanvasElementType, data: any, element?: HTMLElement): void;
|
|
929
1155
|
onElementMouseLeave(event: MouseEvent): void;
|
|
@@ -978,6 +1204,7 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
978
1204
|
private getControlTypeName;
|
|
979
1205
|
private applyNullDeletionPatch;
|
|
980
1206
|
private stripNullMarkersFromPatch;
|
|
1207
|
+
private mergeMetadataObjectPatch;
|
|
981
1208
|
private deleteMetadataPath;
|
|
982
1209
|
private getMetadataPath;
|
|
983
1210
|
/**
|
|
@@ -1069,7 +1296,7 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
1069
1296
|
private applyPresentationVars;
|
|
1070
1297
|
private applyPresentationConfig;
|
|
1071
1298
|
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, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
1072
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisDynamicForm, "praxis-dynamic-form", never, { "resourcePath": { "alias": "resourcePath"; "required": false; }; "resourceId": { "alias": "resourceId"; "required": false; }; "initialValue": { "alias": "initialValue"; "required": false; }; "editorialContext": { "alias": "editorialContext"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "config": { "alias": "config"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "schemaSource": { "alias": "schemaSource"; "required": false; }; "schemaUrl": { "alias": "schemaUrl"; "required": false; }; "submitUrl": { "alias": "submitUrl"; "required": false; }; "submitMethod": { "alias": "submitMethod"; "required": false; }; "responseSchemaUrl": { "alias": "responseSchemaUrl"; "required": false; }; "apiEndpointKey": { "alias": "apiEndpointKey"; "required": false; }; "apiUrlEntry": { "alias": "apiUrlEntry"; "required": false; }; "enableCustomization": { "alias": "enableCustomization"; "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"; "enableCustomizationChange": "enableCustomizationChange"; "customAction": "customAction"; "actionConfirmation": "actionConfirmation"; "schemaStatusChange": "schemaStatusChange"; "fieldRenderError": "fieldRenderError"; }, never, never, true, never>;
|
|
1299
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisDynamicForm, "praxis-dynamic-form", never, { "resourcePath": { "alias": "resourcePath"; "required": false; }; "resourceId": { "alias": "resourceId"; "required": false; }; "initialValue": { "alias": "initialValue"; "required": false; }; "editorialContext": { "alias": "editorialContext"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "config": { "alias": "config"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "schemaSource": { "alias": "schemaSource"; "required": false; }; "schemaUrl": { "alias": "schemaUrl"; "required": false; }; "submitUrl": { "alias": "submitUrl"; "required": false; }; "submitMethod": { "alias": "submitMethod"; "required": false; }; "responseSchemaUrl": { "alias": "responseSchemaUrl"; "required": false; }; "apiEndpointKey": { "alias": "apiEndpointKey"; "required": false; }; "apiUrlEntry": { "alias": "apiUrlEntry"; "required": false; }; "enableCustomization": { "alias": "enableCustomization"; "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; }; "domainRules": { "alias": "domainRules"; "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"; "enableCustomizationChange": "enableCustomizationChange"; "customAction": "customAction"; "actionConfirmation": "actionConfirmation"; "schemaStatusChange": "schemaStatusChange"; "fieldRenderError": "fieldRenderError"; "ruleDiagnosticsChange": "ruleDiagnosticsChange"; }, never, never, true, never>;
|
|
1073
1300
|
}
|
|
1074
1301
|
|
|
1075
1302
|
declare class FormConfigService {
|
|
@@ -1147,6 +1374,53 @@ declare class JsonConfigEditorComponent implements OnInit, OnDestroy {
|
|
|
1147
1374
|
static ɵcmp: i0.ɵɵComponentDeclaration<JsonConfigEditorComponent, "form-json-config-editor", never, { "config": { "alias": "config"; "required": false; }; "document": { "alias": "document"; "required": false; }; }, { "configChange": "configChange"; "documentChange": "documentChange"; "validationChange": "validationChange"; "editorEvent": "editorEvent"; }, never, never, true, never>;
|
|
1148
1375
|
}
|
|
1149
1376
|
|
|
1377
|
+
interface VisualBlockRuleNodeOption {
|
|
1378
|
+
id: string;
|
|
1379
|
+
label: string;
|
|
1380
|
+
kind: string;
|
|
1381
|
+
roles: Array<'text' | 'title' | 'message'>;
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1384
|
+
type RuleAuthoringStatus = 'valid' | 'invalid-target' | 'invalid-condition' | 'unsupported-property' | 'sanitized-property' | 'runtime-only' | 'visual-builder-compatible' | 'llm-generated-pending-review';
|
|
1385
|
+
interface FormRulePropertyIssue {
|
|
1386
|
+
property: string;
|
|
1387
|
+
reason: 'unsupported-property' | 'invalid-value' | 'sanitized-value';
|
|
1388
|
+
}
|
|
1389
|
+
interface FormRuleTargetDiagnostic {
|
|
1390
|
+
type: NonNullable<FormLayoutRule['targetType']>;
|
|
1391
|
+
id: string;
|
|
1392
|
+
exists: boolean;
|
|
1393
|
+
}
|
|
1394
|
+
interface FormRuleDiagnostics {
|
|
1395
|
+
ruleId: string;
|
|
1396
|
+
ruleName?: string;
|
|
1397
|
+
status: RuleAuthoringStatus[];
|
|
1398
|
+
targetRefs: FormRuleTargetDiagnostic[];
|
|
1399
|
+
conditionRefs: string[];
|
|
1400
|
+
acceptedProperties: string[];
|
|
1401
|
+
rejectedProperties: string[];
|
|
1402
|
+
acceptedPropertiesWhenFalse: string[];
|
|
1403
|
+
rejectedPropertiesWhenFalse: string[];
|
|
1404
|
+
propertyIssues?: FormRulePropertyIssue[];
|
|
1405
|
+
propertyIssuesWhenFalse?: FormRulePropertyIssue[];
|
|
1406
|
+
runtimeOnlyReason?: string;
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
interface CommandRulePreviewModel {
|
|
1410
|
+
state: 'ready' | 'invalid';
|
|
1411
|
+
executionMode: 'preview-only';
|
|
1412
|
+
actionId: string;
|
|
1413
|
+
condition: JsonLogicExpression | null;
|
|
1414
|
+
payload?: unknown;
|
|
1415
|
+
payloadExpr?: string;
|
|
1416
|
+
policy: {
|
|
1417
|
+
trigger: 'on-condition-enter';
|
|
1418
|
+
distinct: boolean;
|
|
1419
|
+
distinctBy?: string;
|
|
1420
|
+
runOnInitialEvaluation?: boolean;
|
|
1421
|
+
};
|
|
1422
|
+
diagnostics: string[];
|
|
1423
|
+
}
|
|
1150
1424
|
declare class PraxisDynamicFormConfigEditor implements SettingsValueProvider, OnInit, OnDestroy {
|
|
1151
1425
|
private storage;
|
|
1152
1426
|
private configService;
|
|
@@ -1157,6 +1431,26 @@ declare class PraxisDynamicFormConfigEditor implements SettingsValueProvider, On
|
|
|
1157
1431
|
ruleBuilderConfig: RuleBuilderConfig;
|
|
1158
1432
|
ruleBuilderState?: RuleBuilderState;
|
|
1159
1433
|
currentRules: FormLayoutRule[];
|
|
1434
|
+
selectedCommandRuleId: string;
|
|
1435
|
+
commandRuleCondition: JsonLogicExpression | null;
|
|
1436
|
+
commandRuleConditionJson: string;
|
|
1437
|
+
commandRuleActionId: string;
|
|
1438
|
+
commandRulePayloadJson: string;
|
|
1439
|
+
private commandRulePayloadExpr;
|
|
1440
|
+
commandRuleDistinct: boolean;
|
|
1441
|
+
commandRuleDistinctBy: string;
|
|
1442
|
+
commandRuleRunOnInitialEvaluation: boolean;
|
|
1443
|
+
commandRuleAuthoringError: string | null;
|
|
1444
|
+
commandRulePayloadFieldErrors: Record<string, string>;
|
|
1445
|
+
ruleDiagnostics: FormRuleDiagnostics[];
|
|
1446
|
+
visualBlockNodeOptions: Record<string, VisualBlockRuleNodeOption[]>;
|
|
1447
|
+
ruleDiagnosticsSummary: {
|
|
1448
|
+
total: number;
|
|
1449
|
+
invalid: number;
|
|
1450
|
+
runtimeOnly: number;
|
|
1451
|
+
unsupported: number;
|
|
1452
|
+
pendingReview: number;
|
|
1453
|
+
};
|
|
1160
1454
|
private initialConfig;
|
|
1161
1455
|
private initialDocument;
|
|
1162
1456
|
private readonly openedWithCanonicalDocument;
|
|
@@ -1200,13 +1494,16 @@ declare class PraxisDynamicFormConfigEditor implements SettingsValueProvider, On
|
|
|
1200
1494
|
};
|
|
1201
1495
|
private destroy$;
|
|
1202
1496
|
private hasProcessedInitialRuleState;
|
|
1497
|
+
private jsonEditorIsValid;
|
|
1498
|
+
private globalActionValidationIssues;
|
|
1499
|
+
readonly globalActionCatalog: GlobalActionCatalogEntry[];
|
|
1203
1500
|
isDirty$: BehaviorSubject<boolean>;
|
|
1204
1501
|
isValid$: BehaviorSubject<boolean>;
|
|
1205
1502
|
isBusy$: BehaviorSubject<boolean>;
|
|
1206
1503
|
private lastRulesSignature;
|
|
1207
1504
|
private readonly DEBUG;
|
|
1208
1505
|
private debugLog;
|
|
1209
|
-
constructor(storage: AsyncConfigStorage, configService: FormConfigService, settingsPanel: SettingsPanelService, cdr: ChangeDetectorRef, injectedData?: any);
|
|
1506
|
+
constructor(storage: AsyncConfigStorage, configService: FormConfigService, settingsPanel: SettingsPanelService, cdr: ChangeDetectorRef, globalActionCatalogSource?: ReadonlyArray<GlobalActionCatalogEntry[]>, injectedData?: any);
|
|
1210
1507
|
ngOnInit(): void;
|
|
1211
1508
|
reset(): void;
|
|
1212
1509
|
updateDirtyState(reason?: string): void;
|
|
@@ -1216,7 +1513,53 @@ declare class PraxisDynamicFormConfigEditor implements SettingsValueProvider, On
|
|
|
1216
1513
|
onJsonValidationChange(result: JsonValidationResult): void;
|
|
1217
1514
|
onJsonEditorEvent(_event: JsonEditorEvent): void;
|
|
1218
1515
|
onConfigChange(newConfig: FormConfig): void;
|
|
1516
|
+
private updateValidityState;
|
|
1517
|
+
private collectGlobalActionValidationIssues;
|
|
1518
|
+
private collectGlobalActionValidationTargets;
|
|
1519
|
+
private findGlobalActionCatalogEntry;
|
|
1520
|
+
private buildGlobalActionCatalog;
|
|
1219
1521
|
onRulesChanged(state: RuleBuilderState): void;
|
|
1522
|
+
onRulePropertiesChanged(rules: FormLayoutRule[]): void;
|
|
1523
|
+
get commandRules(): PraxisRuntimeConditionalEffectRule<PraxisRuntimeGlobalActionEffect>[];
|
|
1524
|
+
get selectedCommandRule(): PraxisRuntimeConditionalEffectRule<PraxisRuntimeGlobalActionEffect> | undefined;
|
|
1525
|
+
onCommandRuleSelectionChange(): void;
|
|
1526
|
+
onCommandActionChange(): void;
|
|
1527
|
+
onCommandConditionChanged(condition: JsonLogicExpression | null): void;
|
|
1528
|
+
addCommandRule(): void;
|
|
1529
|
+
applyCommandRule(): void;
|
|
1530
|
+
deleteCommandRule(): void;
|
|
1531
|
+
get commandRuleActionSchema(): _praxisui_core.GlobalActionUiSchema | undefined;
|
|
1532
|
+
shouldShowCommandActionField(field: GlobalActionField): boolean;
|
|
1533
|
+
isCommandActionFieldRequired(field: GlobalActionField): boolean;
|
|
1534
|
+
isCommandActionFieldMissing(field: GlobalActionField): boolean;
|
|
1535
|
+
hasCommandActionFieldError(key: string): boolean;
|
|
1536
|
+
getCommandActionFieldError(key: string): string;
|
|
1537
|
+
get commandRulePreview(): CommandRulePreviewModel;
|
|
1538
|
+
getCommandActionFieldValue(field: GlobalActionField): any;
|
|
1539
|
+
onCommandActionFieldChange(field: GlobalActionField, value: any): void;
|
|
1540
|
+
private initializeCommandRuleEditor;
|
|
1541
|
+
private loadCommandRuleEditor;
|
|
1542
|
+
private updateCommandRules;
|
|
1543
|
+
private parseCommandRuleCondition;
|
|
1544
|
+
private parseOptionalJson;
|
|
1545
|
+
private parseCommandPayloadObject;
|
|
1546
|
+
private collectCommandActionFieldValues;
|
|
1547
|
+
private setCommandActionFieldError;
|
|
1548
|
+
private clearCommandActionFieldError;
|
|
1549
|
+
private nextCommandRuleId;
|
|
1550
|
+
private getDefaultCommandActionId;
|
|
1551
|
+
private formatGlobalActionIssue;
|
|
1552
|
+
private computeRuleDiagnosticsSummary;
|
|
1553
|
+
getRuleStatusLabel(diagnostic: FormRuleDiagnostics): string;
|
|
1554
|
+
getRuleStatusTone(diagnostic: FormRuleDiagnostics): 'ok' | 'warn' | 'error';
|
|
1555
|
+
canAcceptPendingLlmRule(diagnostic: FormRuleDiagnostics): boolean;
|
|
1556
|
+
canApplyRulePropertyFix(diagnostic: FormRuleDiagnostics): boolean;
|
|
1557
|
+
applyRulePropertyFix(ruleId: string): void;
|
|
1558
|
+
acceptPendingLlmRule(ruleId: string): void;
|
|
1559
|
+
getRuleDiagnosticDetails(diagnostic: FormRuleDiagnostics): string[];
|
|
1560
|
+
private getRulePropertyIssueNames;
|
|
1561
|
+
private markLlmRuleAccepted;
|
|
1562
|
+
private refreshRuleDiagnostics;
|
|
1220
1563
|
get jsonDocument(): DynamicFormAuthoringDocument;
|
|
1221
1564
|
onBackConfigChange(): void;
|
|
1222
1565
|
isBindingsBlockPersisted(): boolean;
|
|
@@ -1229,7 +1572,15 @@ declare class PraxisDynamicFormConfigEditor implements SettingsValueProvider, On
|
|
|
1229
1572
|
onPresentationPrefsChange(reason: string): void;
|
|
1230
1573
|
onSchemaPrefsChange(reason: string): void;
|
|
1231
1574
|
private createRuleBuilderConfig;
|
|
1575
|
+
private getVisualBuilderRulePropertySchema;
|
|
1232
1576
|
private mapMetadataToSchema;
|
|
1577
|
+
private getVisualBlockTargetLabel;
|
|
1578
|
+
private getRuleFieldLabel;
|
|
1579
|
+
private getRuleFieldDescription;
|
|
1580
|
+
private refreshVisualBlockNodeOptions;
|
|
1581
|
+
private collectVisualBlockNodeOptions;
|
|
1582
|
+
private getVisualBlockNodeRoles;
|
|
1583
|
+
private findRichContentNodeText;
|
|
1233
1584
|
private mapDataTypeToFieldType;
|
|
1234
1585
|
ngOnDestroy(): void;
|
|
1235
1586
|
onLayoutSelect(event: any): void;
|
|
@@ -1248,7 +1599,7 @@ declare class PraxisDynamicFormConfigEditor implements SettingsValueProvider, On
|
|
|
1248
1599
|
private toPresentationSnapshot;
|
|
1249
1600
|
private toSchemaPrefsSnapshot;
|
|
1250
1601
|
private toBackConfigSnapshot;
|
|
1251
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisDynamicFormConfigEditor, [null, null, null, null, { optional: true; }]>;
|
|
1602
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisDynamicFormConfigEditor, [null, null, null, null, { optional: true; }, { optional: true; }]>;
|
|
1252
1603
|
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisDynamicFormConfigEditor, "praxis-dynamic-form-config-editor", never, {}, {}, never, never, true, never>;
|
|
1253
1604
|
}
|
|
1254
1605
|
interface FormConfigLike {
|
|
@@ -1300,6 +1651,37 @@ declare const PRAXIS_FILTER_FORM_COMPONENT_METADATA: ComponentDocMeta;
|
|
|
1300
1651
|
/** Provider to register PraxisFilterForm metadata. */
|
|
1301
1652
|
declare function providePraxisFilterFormMetadata(): Provider;
|
|
1302
1653
|
|
|
1654
|
+
interface PraxisFilterFormWidgetEditorInputs {
|
|
1655
|
+
config?: FormConfig | null;
|
|
1656
|
+
formId?: string;
|
|
1657
|
+
resourcePath?: string;
|
|
1658
|
+
mode?: DynamicFormMode | string;
|
|
1659
|
+
[key: string]: unknown;
|
|
1660
|
+
}
|
|
1661
|
+
interface PraxisFilterFormWidgetEditorValue {
|
|
1662
|
+
inputs: PraxisFilterFormWidgetEditorInputs;
|
|
1663
|
+
}
|
|
1664
|
+
declare class PraxisFilterFormWidgetConfigEditor implements SettingsValueProvider, AfterViewInit, OnDestroy {
|
|
1665
|
+
inputs: PraxisFilterFormWidgetEditorInputs | null;
|
|
1666
|
+
widgetKey?: string;
|
|
1667
|
+
formEditor?: PraxisDynamicFormConfigEditor;
|
|
1668
|
+
readonly isDirty$: BehaviorSubject<boolean>;
|
|
1669
|
+
readonly isValid$: BehaviorSubject<boolean>;
|
|
1670
|
+
readonly isBusy$: BehaviorSubject<boolean>;
|
|
1671
|
+
private readonly subscription;
|
|
1672
|
+
ngAfterViewInit(): void;
|
|
1673
|
+
ngOnDestroy(): void;
|
|
1674
|
+
getSettingsValue(): PraxisFilterFormWidgetEditorValue;
|
|
1675
|
+
onSave(): PraxisFilterFormWidgetEditorValue;
|
|
1676
|
+
reset(): void;
|
|
1677
|
+
private initializeChildEditor;
|
|
1678
|
+
private buildValue;
|
|
1679
|
+
private createDocumentFromInputs;
|
|
1680
|
+
private normalizeMode;
|
|
1681
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisFilterFormWidgetConfigEditor, never>;
|
|
1682
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisFilterFormWidgetConfigEditor, "praxis-filter-form-widget-config-editor", never, { "inputs": { "alias": "inputs"; "required": false; }; "widgetKey": { "alias": "widgetKey"; "required": false; }; }, {}, never, never, true, never>;
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1303
1685
|
/** Tokens for theme colors used across the layout editor. */
|
|
1304
1686
|
declare enum LayoutColorToken {
|
|
1305
1687
|
Surface = "--md-sys-color-surface",
|
|
@@ -1323,11 +1705,53 @@ declare class LayoutPrefsService {
|
|
|
1323
1705
|
static ɵprov: i0.ɵɵInjectableDeclaration<LayoutPrefsService>;
|
|
1324
1706
|
}
|
|
1325
1707
|
|
|
1708
|
+
type VisualBlockPresetId = 'text' | 'notice' | 'divider' | 'infoCard' | 'callout' | 'keyValueList' | 'recordSummary' | 'lookupCard' | 'disclosure' | 'emptyState';
|
|
1709
|
+
interface VisualBlockPreset {
|
|
1710
|
+
id: VisualBlockPresetId;
|
|
1711
|
+
labelKey: string;
|
|
1712
|
+
icon: string;
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1326
1715
|
interface FieldDropEvent {
|
|
1327
1716
|
event: CdkDragDrop<any>;
|
|
1328
1717
|
sectionIndex: number;
|
|
1329
1718
|
rowIndex: number;
|
|
1330
1719
|
}
|
|
1720
|
+
interface VisualBlockEvent {
|
|
1721
|
+
sectionIndex: number;
|
|
1722
|
+
rowIndex: number;
|
|
1723
|
+
columnIndex: number;
|
|
1724
|
+
itemId: string;
|
|
1725
|
+
}
|
|
1726
|
+
interface AddVisualBlockEvent {
|
|
1727
|
+
sectionIndex: number;
|
|
1728
|
+
rowIndex: number;
|
|
1729
|
+
columnIndex: number;
|
|
1730
|
+
presetId: VisualBlockPresetId;
|
|
1731
|
+
}
|
|
1732
|
+
interface AddApiFieldEvent {
|
|
1733
|
+
sectionIndex: number;
|
|
1734
|
+
rowIndex: number;
|
|
1735
|
+
columnIndex: number;
|
|
1736
|
+
fieldName: string;
|
|
1737
|
+
}
|
|
1738
|
+
interface AddLocalFieldEvent {
|
|
1739
|
+
sectionIndex: number;
|
|
1740
|
+
rowIndex: number;
|
|
1741
|
+
columnIndex: number;
|
|
1742
|
+
}
|
|
1743
|
+
interface EditFieldEvent {
|
|
1744
|
+
sectionIndex: number;
|
|
1745
|
+
rowIndex: number;
|
|
1746
|
+
columnIndex: number;
|
|
1747
|
+
fieldName: string;
|
|
1748
|
+
}
|
|
1749
|
+
interface MoveVisualBlockEvent extends VisualBlockEvent {
|
|
1750
|
+
direction: -1 | 1;
|
|
1751
|
+
}
|
|
1752
|
+
interface MoveVisualBlockToColumnEvent extends VisualBlockEvent {
|
|
1753
|
+
targetColumnIndex: number;
|
|
1754
|
+
}
|
|
1331
1755
|
/**
|
|
1332
1756
|
* Editor component for configuring sections, rows and fields of a dynamic form.
|
|
1333
1757
|
* Provides a collapsible palette of available fields.
|
|
@@ -1337,13 +1761,19 @@ declare class LayoutEditorComponent implements OnInit {
|
|
|
1337
1761
|
configChange: EventEmitter<FormConfig>;
|
|
1338
1762
|
paletteCollapsed: boolean;
|
|
1339
1763
|
protected readonly prefs: LayoutPrefsService;
|
|
1764
|
+
private readonly layoutService;
|
|
1765
|
+
private readonly settingsPanel;
|
|
1766
|
+
private readonly i18n;
|
|
1767
|
+
private visualBlockIdSequence;
|
|
1768
|
+
private localFieldSequence;
|
|
1340
1769
|
protected readonly colorTokens: typeof LayoutColorToken;
|
|
1341
1770
|
selected: {
|
|
1342
|
-
type: 'section' | 'row' | 'column' | 'field';
|
|
1771
|
+
type: 'section' | 'row' | 'column' | 'field' | 'visualBlock';
|
|
1343
1772
|
sectionIndex?: number;
|
|
1344
1773
|
rowIndex?: number;
|
|
1345
1774
|
columnIndex?: number;
|
|
1346
1775
|
fieldName?: string;
|
|
1776
|
+
itemId?: string;
|
|
1347
1777
|
} | null;
|
|
1348
1778
|
gapGlobal: number;
|
|
1349
1779
|
setGapGlobal(val: number | string): void;
|
|
@@ -1368,6 +1798,7 @@ declare class LayoutEditorComponent implements OnInit {
|
|
|
1368
1798
|
* Fields that are not yet placed in any section/column of the layout.
|
|
1369
1799
|
*/
|
|
1370
1800
|
get availableFields(): FieldMetadata[];
|
|
1801
|
+
t(key: string, params?: Record<string, string | number | boolean | null | undefined>): string;
|
|
1371
1802
|
get columnDropListIds(): string[];
|
|
1372
1803
|
getColumnId(sectionIndex: number, rowIndex: number, columnIndex: number): string;
|
|
1373
1804
|
private parseColumnId;
|
|
@@ -1378,10 +1809,30 @@ declare class LayoutEditorComponent implements OnInit {
|
|
|
1378
1809
|
selectRow(sectionIndex: number, rowIndex: number): void;
|
|
1379
1810
|
selectColumn(sectionIndex: number, rowIndex: number, columnIndex: number): void;
|
|
1380
1811
|
dropField({ event }: FieldDropEvent): void;
|
|
1812
|
+
private getColumnLayoutItemByIndex;
|
|
1813
|
+
private getColumnTargetByIndex;
|
|
1814
|
+
private getLayoutItemTargetByIndex;
|
|
1381
1815
|
dropSection(event: CdkDragDrop<FormSection[]>): void;
|
|
1382
1816
|
addSection(): void;
|
|
1383
1817
|
removeSection(index: number): void;
|
|
1384
1818
|
onSectionUpdated(index: number, updatedSection: FormSection): void;
|
|
1819
|
+
addVisualBlockToColumn(event: AddVisualBlockEvent): void;
|
|
1820
|
+
private createVisualBlockItemId;
|
|
1821
|
+
addApiFieldToColumn(event: AddApiFieldEvent): void;
|
|
1822
|
+
addLocalFieldToColumn(event: AddLocalFieldEvent): void;
|
|
1823
|
+
openFieldMetadataEditor(event: EditFieldEvent): void;
|
|
1824
|
+
private openFieldMetadataEditorInternal;
|
|
1825
|
+
private applyFieldMetadataPatch;
|
|
1826
|
+
private createLocalFieldName;
|
|
1827
|
+
openVisualBlockEditor(event: {
|
|
1828
|
+
sectionIndex: number;
|
|
1829
|
+
rowIndex: number;
|
|
1830
|
+
columnIndex: number;
|
|
1831
|
+
itemId: string;
|
|
1832
|
+
}): void;
|
|
1833
|
+
moveVisualBlock(event: MoveVisualBlockEvent): void;
|
|
1834
|
+
moveVisualBlockToColumn(event: MoveVisualBlockToColumnEvent): void;
|
|
1835
|
+
removeVisualBlock(event: VisualBlockEvent): void;
|
|
1385
1836
|
private emitNewConfig;
|
|
1386
1837
|
onApplyStyleToAll(patch: Partial<FormSection>): void;
|
|
1387
1838
|
trackBySection(index: number, s: FormSection & {
|
|
@@ -1394,15 +1845,17 @@ declare class LayoutEditorComponent implements OnInit {
|
|
|
1394
1845
|
declare class RowConfiguratorComponent implements OnChanges {
|
|
1395
1846
|
row: FormRow;
|
|
1396
1847
|
fieldMetadata: FieldMetadata[];
|
|
1848
|
+
availableFields: FieldMetadata[];
|
|
1397
1849
|
sectionIndex: number;
|
|
1398
1850
|
rowIndex: number;
|
|
1399
1851
|
isLastRow: boolean;
|
|
1400
1852
|
selected: {
|
|
1401
|
-
type: 'section' | 'row' | 'column' | 'field';
|
|
1853
|
+
type: 'section' | 'row' | 'column' | 'field' | 'visualBlock';
|
|
1402
1854
|
sectionIndex?: number;
|
|
1403
1855
|
rowIndex?: number;
|
|
1404
1856
|
columnIndex?: number;
|
|
1405
1857
|
fieldName?: string;
|
|
1858
|
+
itemId?: string;
|
|
1406
1859
|
} | null;
|
|
1407
1860
|
availableFieldsListId: string | null;
|
|
1408
1861
|
connectedDropListIds: string[];
|
|
@@ -1412,8 +1865,51 @@ declare class RowConfiguratorComponent implements OnChanges {
|
|
|
1412
1865
|
remove: EventEmitter<void>;
|
|
1413
1866
|
applyRowGapAll: EventEmitter<number>;
|
|
1414
1867
|
fieldDrop: EventEmitter<CdkDragDrop<any, any, any>>;
|
|
1868
|
+
addVisualBlock: EventEmitter<{
|
|
1869
|
+
rowIndex: number;
|
|
1870
|
+
columnIndex: number;
|
|
1871
|
+
presetId: VisualBlockPresetId;
|
|
1872
|
+
}>;
|
|
1873
|
+
addApiField: EventEmitter<{
|
|
1874
|
+
rowIndex: number;
|
|
1875
|
+
columnIndex: number;
|
|
1876
|
+
fieldName: string;
|
|
1877
|
+
}>;
|
|
1878
|
+
addLocalField: EventEmitter<{
|
|
1879
|
+
rowIndex: number;
|
|
1880
|
+
columnIndex: number;
|
|
1881
|
+
}>;
|
|
1882
|
+
editField: EventEmitter<{
|
|
1883
|
+
rowIndex: number;
|
|
1884
|
+
columnIndex: number;
|
|
1885
|
+
fieldName: string;
|
|
1886
|
+
}>;
|
|
1887
|
+
editVisualBlock: EventEmitter<{
|
|
1888
|
+
rowIndex: number;
|
|
1889
|
+
columnIndex: number;
|
|
1890
|
+
itemId: string;
|
|
1891
|
+
}>;
|
|
1892
|
+
moveVisualBlock: EventEmitter<{
|
|
1893
|
+
rowIndex: number;
|
|
1894
|
+
columnIndex: number;
|
|
1895
|
+
itemId: string;
|
|
1896
|
+
direction: -1 | 1;
|
|
1897
|
+
}>;
|
|
1898
|
+
moveVisualBlockToColumn: EventEmitter<{
|
|
1899
|
+
rowIndex: number;
|
|
1900
|
+
columnIndex: number;
|
|
1901
|
+
targetColumnIndex: number;
|
|
1902
|
+
itemId: string;
|
|
1903
|
+
}>;
|
|
1904
|
+
removeVisualBlock: EventEmitter<{
|
|
1905
|
+
rowIndex: number;
|
|
1906
|
+
columnIndex: number;
|
|
1907
|
+
itemId: string;
|
|
1908
|
+
}>;
|
|
1415
1909
|
select: EventEmitter<any>;
|
|
1416
1910
|
activeDropIndex: number | null;
|
|
1911
|
+
protected readonly visualBlockPresets: readonly VisualBlockPreset[];
|
|
1912
|
+
private readonly i18n;
|
|
1417
1913
|
private hoverTimer;
|
|
1418
1914
|
protected readonly breakpoints: Breakpoint[];
|
|
1419
1915
|
previewBreakpoint: Breakpoint;
|
|
@@ -1426,11 +1922,26 @@ declare class RowConfiguratorComponent implements OnChanges {
|
|
|
1426
1922
|
ngOnChanges(changes: SimpleChanges): void;
|
|
1427
1923
|
private rebuildConnectedColumnsCache;
|
|
1428
1924
|
getFieldByName(fieldName: string): FieldMetadata;
|
|
1429
|
-
|
|
1925
|
+
getColumnLayoutItems(column: FormColumn): FormLayoutItem[];
|
|
1926
|
+
trackLayoutItem(_: number, item: FormLayoutItem): string;
|
|
1927
|
+
hasColumnContent(column: FormColumn): boolean;
|
|
1928
|
+
getVisualBlockLabel(item: FormLayoutItem): string;
|
|
1929
|
+
private findRichContentLabel;
|
|
1930
|
+
private findRichNodeLabel;
|
|
1931
|
+
t(key: string, params?: Record<string, string | number | boolean | null | undefined>): string;
|
|
1932
|
+
getFieldLabel(field: FieldMetadata): string;
|
|
1933
|
+
selectVisualBlock(columnIndex: number, item: FormLayoutItem, event: Event): void;
|
|
1934
|
+
openVisualBlockEditor(columnIndex: number, item: FormLayoutItem, event: Event): void;
|
|
1935
|
+
moveVisualBlockItem(columnIndex: number, item: FormLayoutItem, direction: -1 | 1, event: Event): void;
|
|
1936
|
+
canMoveVisualBlockToColumn(columnIndex: number, direction: -1 | 1): boolean;
|
|
1937
|
+
moveVisualBlockToAdjacentColumn(columnIndex: number, item: FormLayoutItem, direction: -1 | 1, event: Event): void;
|
|
1938
|
+
removeVisualBlockItem(columnIndex: number, item: FormLayoutItem, event: Event): void;
|
|
1939
|
+
drop(event: CdkDragDrop<FormLayoutItem[], FormLayoutItem[] | FieldMetadata[], FormLayoutItem | FieldMetadata>): void;
|
|
1430
1940
|
selectRow(): void;
|
|
1431
1941
|
openColumnConfig(index: number): void;
|
|
1432
1942
|
selectColumn(index: number, event: MouseEvent): void;
|
|
1433
|
-
selectField(fieldName: string, event: MouseEvent): void;
|
|
1943
|
+
selectField(fieldName: string, columnIndex: number, event: MouseEvent): void;
|
|
1944
|
+
openFieldEditor(fieldName: string, columnIndex: number, event: Event): void;
|
|
1434
1945
|
openRowMenu(): void;
|
|
1435
1946
|
onMenuClosed(): void;
|
|
1436
1947
|
onDropEnter(index: number): void;
|
|
@@ -1444,6 +1955,9 @@ declare class RowConfiguratorComponent implements OnChanges {
|
|
|
1444
1955
|
removeRow(): void;
|
|
1445
1956
|
moveColumn(index: number, direction: number): void;
|
|
1446
1957
|
clearColumn(index: number): void;
|
|
1958
|
+
addVisualBlockToColumn(index: number, presetId: VisualBlockPresetId): void;
|
|
1959
|
+
addApiFieldToColumn(index: number, fieldName: string): void;
|
|
1960
|
+
addLocalFieldToColumn(index: number): void;
|
|
1447
1961
|
addFieldToColumn(index: number): void;
|
|
1448
1962
|
getColumnId(index: number): string;
|
|
1449
1963
|
private generateId;
|
|
@@ -1467,7 +1981,7 @@ declare class RowConfiguratorComponent implements OnChanges {
|
|
|
1467
1981
|
adjustOffset(columnIndex: number, delta: number): void;
|
|
1468
1982
|
getSuggestedSpan(columnIndex: number): number | null;
|
|
1469
1983
|
static ɵfac: i0.ɵɵFactoryDeclaration<RowConfiguratorComponent, never>;
|
|
1470
|
-
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>;
|
|
1984
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RowConfiguratorComponent, "praxis-row-configurator", never, { "row": { "alias": "row"; "required": false; }; "fieldMetadata": { "alias": "fieldMetadata"; "required": false; }; "availableFields": { "alias": "availableFields"; "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"; "addVisualBlock": "addVisualBlock"; "addApiField": "addApiField"; "addLocalField": "addLocalField"; "editField": "editField"; "editVisualBlock": "editVisualBlock"; "moveVisualBlock": "moveVisualBlock"; "moveVisualBlockToColumn": "moveVisualBlockToColumn"; "removeVisualBlock": "removeVisualBlock"; "select": "select"; }, never, never, true, never>;
|
|
1471
1985
|
}
|
|
1472
1986
|
|
|
1473
1987
|
declare class FieldConfiguratorComponent {
|
|
@@ -1485,11 +1999,69 @@ declare class FieldConfiguratorComponent {
|
|
|
1485
1999
|
static ɵcmp: i0.ɵɵComponentDeclaration<FieldConfiguratorComponent, "praxis-field-configurator", never, { "field": { "alias": "field"; "required": false; }; }, {}, never, never, true, never>;
|
|
1486
2000
|
}
|
|
1487
2001
|
|
|
2002
|
+
interface PraxisDynamicFormWidgetEditorInputs {
|
|
2003
|
+
config?: FormConfig | null;
|
|
2004
|
+
mode?: DynamicFormMode;
|
|
2005
|
+
formId?: string;
|
|
2006
|
+
componentInstanceId?: string;
|
|
2007
|
+
backConfig?: BackConfig;
|
|
2008
|
+
notifyIfOutdated?: 'inline' | 'snackbar' | 'both' | 'none';
|
|
2009
|
+
snoozeMs?: number;
|
|
2010
|
+
autoOpenSettingsOnOutdated?: boolean;
|
|
2011
|
+
[key: string]: unknown;
|
|
2012
|
+
}
|
|
2013
|
+
interface PraxisDynamicFormWidgetEditorValue {
|
|
2014
|
+
inputs: PraxisDynamicFormWidgetEditorInputs;
|
|
2015
|
+
}
|
|
2016
|
+
declare class PraxisDynamicFormWidgetConfigEditor implements SettingsValueProvider, AfterViewInit, OnDestroy {
|
|
2017
|
+
inputs: PraxisDynamicFormWidgetEditorInputs | null;
|
|
2018
|
+
widgetKey?: string;
|
|
2019
|
+
formEditor?: PraxisDynamicFormConfigEditor;
|
|
2020
|
+
readonly isDirty$: BehaviorSubject<boolean>;
|
|
2021
|
+
readonly isValid$: BehaviorSubject<boolean>;
|
|
2022
|
+
readonly isBusy$: BehaviorSubject<boolean>;
|
|
2023
|
+
private readonly subscription;
|
|
2024
|
+
ngAfterViewInit(): void;
|
|
2025
|
+
ngOnDestroy(): void;
|
|
2026
|
+
getSettingsValue(): PraxisDynamicFormWidgetEditorValue;
|
|
2027
|
+
onSave(): PraxisDynamicFormWidgetEditorValue;
|
|
2028
|
+
reset(): void;
|
|
2029
|
+
private initializeChildEditor;
|
|
2030
|
+
private buildValue;
|
|
2031
|
+
private createDocumentFromInputs;
|
|
2032
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisDynamicFormWidgetConfigEditor, never>;
|
|
2033
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisDynamicFormWidgetConfigEditor, "praxis-dynamic-form-widget-config-editor", never, { "inputs": { "alias": "inputs"; "required": false; }; "widgetKey": { "alias": "widgetKey"; "required": false; }; }, {}, never, never, true, never>;
|
|
2034
|
+
}
|
|
2035
|
+
|
|
1488
2036
|
/** Metadata for PraxisDynamicForm component */
|
|
1489
2037
|
declare const PRAXIS_DYNAMIC_FORM_COMPONENT_METADATA: ComponentDocMeta;
|
|
1490
2038
|
/** Provider para auto-registrar metadados do componente Dynamic Form. */
|
|
1491
2039
|
declare function providePraxisDynamicFormMetadata(): Provider;
|
|
1492
2040
|
|
|
2041
|
+
interface DomainRuleFormRulesRequestOptions extends DomainRuleRequestOptions {
|
|
2042
|
+
targetLayer?: string;
|
|
2043
|
+
targetArtifactType?: string;
|
|
2044
|
+
status?: string;
|
|
2045
|
+
}
|
|
2046
|
+
type DomainRuleMaterializedFormLayoutRule = FormLayoutRule & {
|
|
2047
|
+
metadata?: Record<string, unknown>;
|
|
2048
|
+
};
|
|
2049
|
+
declare class DomainRuleFormRulesService {
|
|
2050
|
+
private readonly domainRules;
|
|
2051
|
+
constructor(domainRules: DomainRuleService);
|
|
2052
|
+
listRulesForForm(targetArtifactKey: string, options?: DomainRuleFormRulesRequestOptions): Observable<DomainRuleMaterializedFormLayoutRule[]>;
|
|
2053
|
+
materializationsToFormRules(materializations: DomainRuleMaterialization[] | null | undefined): DomainRuleMaterializedFormLayoutRule[];
|
|
2054
|
+
materializationToFormRule(materialization: DomainRuleMaterialization): DomainRuleMaterializedFormLayoutRule | null;
|
|
2055
|
+
private asDirectFormRule;
|
|
2056
|
+
private visualBlockGuidanceToRule;
|
|
2057
|
+
private withDomainMetadata;
|
|
2058
|
+
private asRecord;
|
|
2059
|
+
private asStringArray;
|
|
2060
|
+
private resolveString;
|
|
2061
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DomainRuleFormRulesService, never>;
|
|
2062
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DomainRuleFormRulesService>;
|
|
2063
|
+
}
|
|
2064
|
+
|
|
1493
2065
|
declare function isRuleSatisfied(rule: FormLayoutRule, data: unknown): boolean;
|
|
1494
2066
|
/**
|
|
1495
2067
|
* Applies all visibility rules to the provided data and
|
|
@@ -1581,6 +2153,7 @@ type ActionCatalogOption = {
|
|
|
1581
2153
|
id: string;
|
|
1582
2154
|
label: string;
|
|
1583
2155
|
description?: string;
|
|
2156
|
+
payloadSchema?: GlobalActionCatalogEntry['payloadSchema'];
|
|
1584
2157
|
param?: {
|
|
1585
2158
|
required?: boolean;
|
|
1586
2159
|
label?: string;
|
|
@@ -1634,7 +2207,6 @@ declare class SectionEditorComponent implements OnInit, AfterViewInit, OnDestroy
|
|
|
1634
2207
|
isBusy$: BehaviorSubject<boolean>;
|
|
1635
2208
|
private readonly globalActionCatalogSource;
|
|
1636
2209
|
private readonly i18n;
|
|
1637
|
-
readonly legacyActionSpecs: _praxisui_core.GlobalActionSpec[];
|
|
1638
2210
|
readonly globalActionCatalog: ActionCatalogOption[];
|
|
1639
2211
|
readonly customActionValue = "__custom__";
|
|
1640
2212
|
private destroy$;
|
|
@@ -1654,12 +2226,12 @@ declare class SectionEditorComponent implements OnInit, AfterViewInit, OnDestroy
|
|
|
1654
2226
|
label?: string;
|
|
1655
2227
|
}): string;
|
|
1656
2228
|
getHeaderActionSpecById(id: string): ActionCatalogOption | undefined;
|
|
1657
|
-
getHeaderActionSelectValue(value?: string): string;
|
|
1658
|
-
getHeaderActionParam(value?: string): string;
|
|
1659
|
-
getHeaderActionCustomValue(value?: string): string;
|
|
1660
|
-
getHeaderGlobalActionSchema(value?: string): _praxisui_core.GlobalActionUiSchema | undefined;
|
|
1661
|
-
getHeaderSurfaceOpenActionPayload(value?: string): SurfaceOpenPayload;
|
|
1662
|
-
isHeaderActionParamMissing(value?: string): boolean;
|
|
2229
|
+
getHeaderActionSelectValue(value?: string, globalAction?: GlobalActionRef): string;
|
|
2230
|
+
getHeaderActionParam(value?: string, globalAction?: GlobalActionRef): string;
|
|
2231
|
+
getHeaderActionCustomValue(value?: string, globalAction?: GlobalActionRef): string;
|
|
2232
|
+
getHeaderGlobalActionSchema(value?: string, globalAction?: GlobalActionRef): _praxisui_core.GlobalActionUiSchema | undefined;
|
|
2233
|
+
getHeaderSurfaceOpenActionPayload(value?: string, globalAction?: GlobalActionRef): SurfaceOpenPayload;
|
|
2234
|
+
isHeaderActionParamMissing(value?: string, globalAction?: GlobalActionRef): boolean;
|
|
1663
2235
|
onHeaderActionSelectChange(index: number, value: string): void;
|
|
1664
2236
|
onHeaderActionParamChange(index: number, value: string): void;
|
|
1665
2237
|
onHeaderActionCustomChange(index: number, value: string): void;
|
|
@@ -1693,6 +2265,7 @@ declare class SectionEditorComponent implements OnInit, AfterViewInit, OnDestroy
|
|
|
1693
2265
|
private normalizeHeaderActions;
|
|
1694
2266
|
private mapCatalogEntryToActionSpec;
|
|
1695
2267
|
private getActionCatalogDescription;
|
|
2268
|
+
private normalizeHeaderGlobalAction;
|
|
1696
2269
|
private headerActionStyleValidator;
|
|
1697
2270
|
private stringifyHeaderActionStyle;
|
|
1698
2271
|
private parseHeaderActionStyle;
|
|
@@ -1881,7 +2454,8 @@ declare enum FormRuleTargetType {
|
|
|
1881
2454
|
Section = "section",
|
|
1882
2455
|
Action = "action",
|
|
1883
2456
|
Row = "row",
|
|
1884
|
-
Column = "column"
|
|
2457
|
+
Column = "column",
|
|
2458
|
+
VisualBlock = "visualBlock"
|
|
1885
2459
|
}
|
|
1886
2460
|
declare enum FormRuleContext {
|
|
1887
2461
|
Visibility = "visibility",
|
|
@@ -1973,5 +2547,49 @@ declare const FORM_COMPONENT_AI_CAPABILITIES: CapabilityCatalog;
|
|
|
1973
2547
|
*/
|
|
1974
2548
|
declare function getFormAiCatalog(formConfig?: FormConfig): AiCapabilityCatalog;
|
|
1975
2549
|
|
|
1976
|
-
|
|
1977
|
-
|
|
2550
|
+
type DynamicFormRuleTargetType = NonNullable<FormLayoutRule['targetType']>;
|
|
2551
|
+
interface DynamicFormRuleAuthoringField {
|
|
2552
|
+
name: string;
|
|
2553
|
+
label?: string;
|
|
2554
|
+
type?: string;
|
|
2555
|
+
source?: string;
|
|
2556
|
+
submitPolicy?: string;
|
|
2557
|
+
}
|
|
2558
|
+
interface DynamicFormRuleAuthoringTarget {
|
|
2559
|
+
id: string;
|
|
2560
|
+
label?: string;
|
|
2561
|
+
}
|
|
2562
|
+
interface DynamicFormRuleAuthoringVisualBlockNode {
|
|
2563
|
+
id: string;
|
|
2564
|
+
label: string;
|
|
2565
|
+
kind: string;
|
|
2566
|
+
roles: Array<'text' | 'title' | 'message'>;
|
|
2567
|
+
}
|
|
2568
|
+
type DynamicFormRuleAuthoringTargets = Record<DynamicFormRuleTargetType, string[]>;
|
|
2569
|
+
type DynamicFormRuleAuthoringTargetDetails = Record<DynamicFormRuleTargetType, DynamicFormRuleAuthoringTarget[]>;
|
|
2570
|
+
type DynamicFormAllowedRuleProperties = Record<DynamicFormRuleTargetType, string[]>;
|
|
2571
|
+
interface DynamicFormRuleAuthoringContext {
|
|
2572
|
+
component: 'praxis-dynamic-form';
|
|
2573
|
+
capabilityCatalogVersion: string;
|
|
2574
|
+
fields: DynamicFormRuleAuthoringField[];
|
|
2575
|
+
targets: DynamicFormRuleAuthoringTargets;
|
|
2576
|
+
targetDetails: DynamicFormRuleAuthoringTargetDetails;
|
|
2577
|
+
allowedRuleProperties: DynamicFormAllowedRuleProperties;
|
|
2578
|
+
visualBlockNodes: Record<string, DynamicFormRuleAuthoringVisualBlockNode[]>;
|
|
2579
|
+
existingRules: FormLayoutRule[];
|
|
2580
|
+
diagnostics: FormRuleDiagnostics[];
|
|
2581
|
+
guardrails: string[];
|
|
2582
|
+
}
|
|
2583
|
+
declare function buildDynamicFormRuleAuthoringContext(config: Pick<FormConfig, 'fieldMetadata' | 'sections' | 'actions' | 'formRules'>): DynamicFormRuleAuthoringContext;
|
|
2584
|
+
|
|
2585
|
+
/**
|
|
2586
|
+
* Manifesto de authoring canônico para o componente praxis-dynamic-form.
|
|
2587
|
+
* Este arquivo define as operações permitidas pela IA para editar formulários.
|
|
2588
|
+
*
|
|
2589
|
+
* @version 1.5.0
|
|
2590
|
+
* @status COMPLIANT - Alinhado com contrato v2, gate de aceitação e semântica local/schema-backed.
|
|
2591
|
+
*/
|
|
2592
|
+
declare const PRAXIS_DYNAMIC_FORM_AUTHORING_MANIFEST: ComponentAuthoringManifest;
|
|
2593
|
+
|
|
2594
|
+
export { ActionsEditorComponent, CanvasStateService, CanvasToolbarComponent, ColumnEditorComponent, DomainRuleFormRulesService, DynamicFormLayoutService, FORM_AI_CAPABILITIES, FORM_COMPONENT_AI_CAPABILITIES, FieldConfiguratorComponent, FieldEditorComponent, FormConfigService, FormContextService, FormLayoutService, FormRulesService, JsonConfigEditorComponent, LayoutColorToken, LayoutEditorComponent, LayoutPrefsService, PRAXIS_DYNAMIC_FORM_AUTHORING_MANIFEST, PRAXIS_DYNAMIC_FORM_COMPONENT_METADATA, PRAXIS_FILTER_FORM_COMPONENT_METADATA, PraxisDynamicForm, PraxisDynamicFormConfigEditor, PraxisDynamicFormWidgetConfigEditor, PraxisFilterForm, PraxisFilterFormWidgetConfigEditor, PraxisFormActionsComponent, RowConfiguratorComponent, RowEditorComponent, SETTINGS_PANEL_DYNAMIC_FORM_PROVIDER, SectionEditorComponent, TASK_PRESETS, applyVisibilityRules, buildDynamicFormApplyPlan, buildDynamicFormRuleAuthoringContext, createDynamicFormAuthoringDocument, formLayoutRulesToBuilderState, getFormAiCatalog, getFormCapabilities, getFormEnum, isRuleSatisfied, normalizeDateArrays, normalizeDynamicFormAuthoringDocument, parseLegacyOrDynamicFormDocument, providePraxisDynamicFormMetadata, providePraxisFilterFormMetadata, provideSettingsPanelDynamicForm, ruleBuilderStateToFormLayoutRules, serializeDynamicFormAuthoringDocument, stripLegacyFieldMetadata, toCanonicalDynamicFormConfig, validateDynamicFormAuthoringDocument, validateDynamicFormAuthoringInput };
|
|
2595
|
+
export type { CanvasElement, CanvasElementType, CanvasPathPart, Capability$1 as Capability, CapabilityCatalog$1 as CapabilityCatalog, CapabilityCategory$1 as CapabilityCategory, DomainRuleFormRulesRequestOptions, DomainRuleMaterializedFormLayoutRule, DynamicFieldRenderErrorEvent, DynamicFormAllowedRuleProperties, DynamicFormApplyPlan, DynamicFormAuthoringDocument, DynamicFormBindings, DynamicFormContextSnapshot, DynamicFormMode, DynamicFormPresentationSnapshot, DynamicFormProjectionContext, DynamicFormResolvedRuntimeContract, DynamicFormRuleAuthoringContext, DynamicFormRuleAuthoringField, DynamicFormRuleAuthoringTarget, DynamicFormRuleAuthoringTargetDetails, DynamicFormRuleAuthoringTargets, DynamicFormRuleAuthoringVisualBlockNode, DynamicFormRuleTargetType, DynamicFormRuntimeContext, DynamicFormRuntimeValueSource, DynamicFormSchemaPrefsSnapshot, DynamicFormValidationContext, EditorDiagnostic, EditorDocument, FieldPath, FieldPathContainer, FieldPathWithIndex, Capability as FormComponentCapability, CapabilityCatalog as FormComponentCapabilityCatalog, CapabilityCategory as FormComponentCapabilityCategory, ValueKind as FormComponentValueKind, FormConfigLike, IdPath, InsertLocalFieldOptions, InsertLocalFieldResult, JsonEditorEvent, JsonValidationResult, LayoutChange, LayoutResult, LocalFieldInsertionDiagnostic, LocalFieldInsertionDiagnosticCode, Operation, Path, PathWithIndex, PraxisDynamicFormDomainRulesOptions, PraxisDynamicFormWidgetEditorInputs, PraxisDynamicFormWidgetEditorValue, PraxisFilterFormWidgetEditorInputs, PraxisFilterFormWidgetEditorValue, PraxisFormActionEvent, RemovePolicy, RuleApplicationContext, RuleApplicationDiagnostic, RuleApplicationDiagnosticCode, RuleApplicationResult, RuleApplicationTargetIndex, RuleApplicationTargetType, ValidationReport, ValueKind$1 as ValueKind };
|