@praxisui/dynamic-form 8.0.0-beta.0 → 8.0.0-beta.100
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 +246 -22
- 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-CmFfx-VR.mjs +356 -0
- package/fesm2022/praxisui-dynamic-form.mjs +20161 -12093
- package/package.json +19 -12
- 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 +1016 -0
- package/{index.d.ts → types/praxisui-dynamic-form.d.ts} +736 -24
|
@@ -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,
|
|
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, AiCapabilityCatalog, AiValueKind, 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;
|
|
@@ -280,6 +370,28 @@ interface PraxisFormActionEvent {
|
|
|
280
370
|
}
|
|
281
371
|
declare class PraxisFormActionsComponent implements OnChanges, OnDestroy {
|
|
282
372
|
private shortcuts;
|
|
373
|
+
private readonly i18n;
|
|
374
|
+
private actionButtonsCache;
|
|
375
|
+
private actionButtonsCacheSource?;
|
|
376
|
+
private actionButtonsCacheOverrides?;
|
|
377
|
+
private formActionsClassesCacheSource?;
|
|
378
|
+
private formActionsClassesCache;
|
|
379
|
+
private viewClassMapCacheSource?;
|
|
380
|
+
private viewClassMapCacheEditorialContext?;
|
|
381
|
+
private viewClassMapCache;
|
|
382
|
+
private visibleButtonsCacheSource;
|
|
383
|
+
private visibleButtonsCache;
|
|
384
|
+
private collapsedButtonsCacheSource;
|
|
385
|
+
private collapsedButtonsCache;
|
|
386
|
+
private primaryButtonsCacheSource;
|
|
387
|
+
private primaryButtonsCache;
|
|
388
|
+
private secondaryButtonsCacheSource;
|
|
389
|
+
private secondaryButtonsCache;
|
|
390
|
+
private buttonClassCache;
|
|
391
|
+
private buttonStylesCache;
|
|
392
|
+
private invalidSubmitHintCacheSignature;
|
|
393
|
+
private invalidSubmitHintCacheValue;
|
|
394
|
+
private readonly invalidSubmitHint;
|
|
283
395
|
/** Configuration object describing form action buttons */
|
|
284
396
|
actions?: FormConfig['actions'];
|
|
285
397
|
/** Whether the actions are rendered inside an editorial visual context */
|
|
@@ -290,6 +402,8 @@ declare class PraxisFormActionsComponent implements OnChanges, OnDestroy {
|
|
|
290
402
|
formIsValid: boolean;
|
|
291
403
|
/** Optional error message displayed above the actions */
|
|
292
404
|
submitError?: string | null;
|
|
405
|
+
/** Visible required fields that currently block submit */
|
|
406
|
+
invalidRequiredFieldLabels: string[];
|
|
293
407
|
/** Identifier used when registering keyboard shortcuts */
|
|
294
408
|
formId?: string;
|
|
295
409
|
/** Overrides coming from runtime rules */
|
|
@@ -308,6 +422,8 @@ declare class PraxisFormActionsComponent implements OnChanges, OnDestroy {
|
|
|
308
422
|
};
|
|
309
423
|
getMatColor(btn: FormActionButton | undefined): 'primary' | 'accent' | 'warn' | undefined;
|
|
310
424
|
getActionButtons(): FormActionButton[];
|
|
425
|
+
private computeActionButtons;
|
|
426
|
+
private refreshActionButtons;
|
|
311
427
|
getVisibleButtons(): FormActionButton[];
|
|
312
428
|
getCollapsedButtons(): FormActionButton[];
|
|
313
429
|
isSplitLayout(): boolean;
|
|
@@ -319,11 +435,14 @@ declare class PraxisFormActionsComponent implements OnChanges, OnDestroy {
|
|
|
319
435
|
};
|
|
320
436
|
getButtonStyles(button: FormActionButton): Record<string, any> | null;
|
|
321
437
|
isActionButtonDisabled(button: FormActionButton): boolean;
|
|
438
|
+
shouldShowInvalidSubmitHint(): boolean;
|
|
439
|
+
getInvalidSubmitHint(): string;
|
|
322
440
|
private applyOverrides;
|
|
323
441
|
private registerActionShortcuts;
|
|
442
|
+
private resolveButtonActionId;
|
|
324
443
|
private isSecondaryButton;
|
|
325
444
|
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisFormActionsComponent, never>;
|
|
326
|
-
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; }; "formId": { "alias": "formId"; "required": false; }; "actionOverrides": { "alias": "actionOverrides"; "required": false; }; }, { "action": "action"; }, never, never, true, never>;
|
|
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>;
|
|
327
446
|
}
|
|
328
447
|
|
|
329
448
|
/**
|
|
@@ -333,6 +452,10 @@ declare class PraxisFormActionsComponent implements OnChanges, OnDestroy {
|
|
|
333
452
|
interface FormAiHost {
|
|
334
453
|
config: FormConfig;
|
|
335
454
|
form: FormGroup;
|
|
455
|
+
mode?: 'create' | 'edit' | 'view';
|
|
456
|
+
enableCustomization?: boolean;
|
|
457
|
+
readonlyModeGlobal?: boolean | null;
|
|
458
|
+
effectiveReadonly?: boolean;
|
|
336
459
|
applyConfigFromAdapter(config: FormConfig): void;
|
|
337
460
|
}
|
|
338
461
|
|
|
@@ -346,13 +469,36 @@ declare class FormAiAdapter extends BaseAiAdapter<FormConfig> {
|
|
|
346
469
|
getCapabilities(): AiCapability[];
|
|
347
470
|
getTaskPresets(): Record<string, string[]>;
|
|
348
471
|
getRuntimeState(): Record<string, any>;
|
|
472
|
+
getAuthoringContext(): Record<string, any>;
|
|
473
|
+
compileAiResponse(response: Record<string, unknown>): AiResponseCompileResult | null;
|
|
349
474
|
createSnapshot(): FormConfig;
|
|
350
475
|
restoreSnapshot(snapshot: FormConfig): Promise<void>;
|
|
351
476
|
applyPatch(patch: Partial<FormConfig>, intent?: string): Promise<PatchResult>;
|
|
352
477
|
getContextDescription(): string;
|
|
353
478
|
private applyConfig;
|
|
354
479
|
private smartMergeFormConfig;
|
|
480
|
+
private extractIncomingRules;
|
|
481
|
+
private extractComponentEditOperationPatch;
|
|
482
|
+
private applyComponentEditOperation;
|
|
483
|
+
private applyLocalFieldAdd;
|
|
484
|
+
private applyFieldMetadataPatch;
|
|
485
|
+
private appendFieldToLayout;
|
|
486
|
+
private resolveFieldName;
|
|
487
|
+
private matchesText;
|
|
488
|
+
private normalizeSearchText;
|
|
489
|
+
private toBoolean;
|
|
490
|
+
private toSubmitPolicy;
|
|
491
|
+
private extractVisualBlockGuidanceOperationRule;
|
|
492
|
+
private coerceSingleOperationResponse;
|
|
493
|
+
private coerceOperationResponses;
|
|
494
|
+
private operationInputRecord;
|
|
495
|
+
private normalizeVisualBlockGuidanceOperationInput;
|
|
496
|
+
private visualBlockGuidanceParamsToRule;
|
|
497
|
+
private normalizeLlmRule;
|
|
498
|
+
private mergeRulesById;
|
|
355
499
|
private cloneConfig;
|
|
500
|
+
private asRecord;
|
|
501
|
+
private toNonEmptyString;
|
|
356
502
|
private isFilled;
|
|
357
503
|
}
|
|
358
504
|
|
|
@@ -453,6 +599,18 @@ interface DynamicFormApplyPlan {
|
|
|
453
599
|
diagnostics: EditorDiagnostic[];
|
|
454
600
|
}
|
|
455
601
|
|
|
602
|
+
interface DynamicFormConfigPatchChangeEvent {
|
|
603
|
+
inputPatch: {
|
|
604
|
+
config: FormConfig;
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
interface PraxisDynamicFormDomainRulesOptions {
|
|
608
|
+
enabled?: boolean;
|
|
609
|
+
targetArtifactKey?: string | null;
|
|
610
|
+
targetLayer?: string | null;
|
|
611
|
+
targetArtifactType?: string | null;
|
|
612
|
+
status?: string | null;
|
|
613
|
+
}
|
|
456
614
|
interface DynamicFieldRenderErrorEvent {
|
|
457
615
|
phase: 'executeRendering' | 'detectChanges';
|
|
458
616
|
fieldName: string;
|
|
@@ -478,6 +636,21 @@ type ResolvedSectionHeaderVisual = {
|
|
|
478
636
|
text?: string;
|
|
479
637
|
ariaLabel: string;
|
|
480
638
|
};
|
|
639
|
+
interface FormColumnFieldsRenderItem {
|
|
640
|
+
kind: 'fields';
|
|
641
|
+
id: string;
|
|
642
|
+
fields: FieldMetadata[];
|
|
643
|
+
}
|
|
644
|
+
interface FormColumnRichContentRenderItem {
|
|
645
|
+
kind: 'richContent';
|
|
646
|
+
id: string;
|
|
647
|
+
document: RichContentDocument;
|
|
648
|
+
layout: 'block' | 'inline';
|
|
649
|
+
rootClassName?: string | null;
|
|
650
|
+
className?: string | null;
|
|
651
|
+
style?: Record<string, any> | null;
|
|
652
|
+
}
|
|
653
|
+
type FormColumnRenderItem = FormColumnFieldsRenderItem | FormColumnRichContentRenderItem;
|
|
481
654
|
declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
482
655
|
private crud;
|
|
483
656
|
private http;
|
|
@@ -509,7 +682,20 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
509
682
|
private hookPresets?;
|
|
510
683
|
private logger?;
|
|
511
684
|
private readonly i18n;
|
|
685
|
+
private readonly injector;
|
|
686
|
+
private readonly aiApi;
|
|
687
|
+
private readonly assistantSessions;
|
|
688
|
+
private readonly aiTurnOrchestrator;
|
|
689
|
+
private readonly jsonLogic;
|
|
690
|
+
private readonly aiAssistantSessionEffect;
|
|
691
|
+
private readonly globalActions;
|
|
512
692
|
private readonly DEBUG;
|
|
693
|
+
private effectiveActionsCache?;
|
|
694
|
+
private effectiveActionsCacheBase?;
|
|
695
|
+
private effectiveActionsCacheOverride?;
|
|
696
|
+
private invalidRequiredFieldLabelsCache;
|
|
697
|
+
private invalidRequiredFieldLabelsSignature;
|
|
698
|
+
readonly richContentHostCapabilities: RichBlockHostCapabilities;
|
|
513
699
|
resourcePath?: string;
|
|
514
700
|
resourceId?: string | number;
|
|
515
701
|
initialValue?: Record<string, unknown> | null;
|
|
@@ -521,6 +707,8 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
521
707
|
editorialContext: Record<string, unknown> | null;
|
|
522
708
|
mode: 'create' | 'edit' | 'view';
|
|
523
709
|
config: FormConfig;
|
|
710
|
+
/** Optional host-level overrides for the rendered form action bar. */
|
|
711
|
+
actions?: FormConfig['actions'] | null;
|
|
524
712
|
/**
|
|
525
713
|
* Fonte de schema para construir o formulário.
|
|
526
714
|
* 'resource' (padrão) usa o schema do recurso (/{resource}/schemas -> .../all response)
|
|
@@ -529,6 +717,8 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
529
717
|
schemaSource: 'resource' | 'filter';
|
|
530
718
|
/** Canonical schema URL published by the backend surface catalog. */
|
|
531
719
|
schemaUrl?: string | null;
|
|
720
|
+
/** Canonical read URL published by backend view/read-projection surfaces. */
|
|
721
|
+
readUrl?: string | null;
|
|
532
722
|
/** Canonical submit URL published by the backend surface catalog. */
|
|
533
723
|
submitUrl?: string | null;
|
|
534
724
|
/** Canonical submit method published by the backend surface catalog. */
|
|
@@ -555,11 +745,14 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
555
745
|
*
|
|
556
746
|
* // Formulário em modo EDIT de dados + customização DESABILITADA
|
|
557
747
|
* <praxis-dynamic-form mode="edit" [enableCustomization]="false">
|
|
558
|
-
|
|
748
|
+
*/
|
|
559
749
|
enableCustomization: boolean;
|
|
750
|
+
/** Shows Praxis AI assistant triggers for this form instance. */
|
|
751
|
+
showAiAssistant: boolean;
|
|
560
752
|
/** Identifier for persisting layouts */
|
|
561
753
|
formId?: string;
|
|
562
754
|
componentInstanceId?: string;
|
|
755
|
+
configPersistenceStrategy: 'local-first' | 'input-first';
|
|
563
756
|
/** Optional layout to use instead of generated one */
|
|
564
757
|
layout?: FormLayout;
|
|
565
758
|
/** Optional navigation back config (from CRUD host) */
|
|
@@ -582,10 +775,13 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
582
775
|
disabledModeGlobal: boolean | null;
|
|
583
776
|
presentationModeGlobal: boolean | null;
|
|
584
777
|
visibleGlobal: boolean | null;
|
|
778
|
+
/** Opt-in loader for shared domain rule materializations persisted outside FormConfig. */
|
|
779
|
+
domainRules: PraxisDynamicFormDomainRulesOptions | boolean | null;
|
|
585
780
|
get effectivePresentation(): boolean;
|
|
586
781
|
get effectiveReadonly(): boolean;
|
|
587
782
|
get effectiveDisabledMode(): boolean | null;
|
|
588
783
|
get effectiveFormIsValid(): boolean;
|
|
784
|
+
get invalidRequiredFieldLabels(): string[];
|
|
589
785
|
/** Value propagated to DynamicFieldLoader; null allows per-field metadata */
|
|
590
786
|
get presentationForLoader(): boolean | null;
|
|
591
787
|
/** Custom endpoints for CRUD operations */
|
|
@@ -596,6 +792,7 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
596
792
|
formCancel: EventEmitter<void>;
|
|
597
793
|
formReset: EventEmitter<void>;
|
|
598
794
|
configChange: EventEmitter<FormConfig>;
|
|
795
|
+
configPatchChange: EventEmitter<DynamicFormConfigPatchChangeEvent>;
|
|
599
796
|
formReady: EventEmitter<FormReadyEvent>;
|
|
600
797
|
valueChange: EventEmitter<FormValueChangeEvent>;
|
|
601
798
|
syncCompleted: EventEmitter<SyncResult>;
|
|
@@ -613,6 +810,8 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
613
810
|
}>;
|
|
614
811
|
/** Forwarded from DynamicFieldLoader to allow host-side observability. */
|
|
615
812
|
fieldRenderError: EventEmitter<DynamicFieldRenderErrorEvent>;
|
|
813
|
+
/** Emits runtime rule diagnostics so hosts can surface or log invalid rules. */
|
|
814
|
+
ruleDiagnosticsChange: EventEmitter<RuleApplicationDiagnostic[]>;
|
|
616
815
|
isLoading: boolean;
|
|
617
816
|
submitting: boolean;
|
|
618
817
|
submitError: string | null;
|
|
@@ -623,6 +822,13 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
623
822
|
private isInitialized;
|
|
624
823
|
form: FormGroup;
|
|
625
824
|
aiAdapter: FormAiAdapter;
|
|
825
|
+
aiAssistantOpen: boolean;
|
|
826
|
+
aiAssistantPrompt: string;
|
|
827
|
+
aiAssistantLayout: PraxisAssistantShellLayout;
|
|
828
|
+
aiAssistantViewState: PraxisAssistantTurnViewState;
|
|
829
|
+
readonly aiAssistantLabels: Partial<PraxisAssistantShellLabels>;
|
|
830
|
+
private aiAssistantController;
|
|
831
|
+
private aiAssistantStateSubscription;
|
|
626
832
|
fieldVisibility: {
|
|
627
833
|
[fieldName: string]: boolean;
|
|
628
834
|
};
|
|
@@ -631,6 +837,12 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
631
837
|
actionRuleProps: Record<string, Record<string, any>>;
|
|
632
838
|
private rowRuleProps;
|
|
633
839
|
private columnRuleProps;
|
|
840
|
+
private visualBlockRuleProps;
|
|
841
|
+
private materializedFormRules;
|
|
842
|
+
private materializedFormRulesLoadSignature;
|
|
843
|
+
private readonly formCommandRuleStates;
|
|
844
|
+
ruleApplicationDiagnostics: RuleApplicationDiagnostic[];
|
|
845
|
+
private ruleApplicationDiagnosticsSignature;
|
|
634
846
|
private pendingEntityId;
|
|
635
847
|
private loadedEntityId;
|
|
636
848
|
private hydratedEntityId;
|
|
@@ -641,6 +853,7 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
641
853
|
private schemaRootHooks?;
|
|
642
854
|
private destroy$;
|
|
643
855
|
private formValueChangesSubscription;
|
|
856
|
+
private dependencyPolicySubscription;
|
|
644
857
|
private formBuildCycleId;
|
|
645
858
|
private suppressedValueChangeBuildId;
|
|
646
859
|
private pendingBootstrapValueChangeBuildId;
|
|
@@ -649,6 +862,12 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
649
862
|
private lastCorrelationId?;
|
|
650
863
|
private currentDnD?;
|
|
651
864
|
private columnFieldsCache;
|
|
865
|
+
private rowClassesCache;
|
|
866
|
+
private rowStylesCache;
|
|
867
|
+
private sectionClassesCache;
|
|
868
|
+
private sectionStylesCache;
|
|
869
|
+
private columnClassesCache;
|
|
870
|
+
private columnStylesCache;
|
|
652
871
|
private lastFieldPatchSig;
|
|
653
872
|
private lastFieldPatchAt;
|
|
654
873
|
schemaOutdated: boolean;
|
|
@@ -664,6 +883,7 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
664
883
|
get formBlocksAfterDocument(): RichContentDocument;
|
|
665
884
|
get beforeActionsPlacement(): 'insideLastSection' | 'afterSections';
|
|
666
885
|
get actionPlacement(): 'insideLastSection' | 'afterSections' | 'top';
|
|
886
|
+
get effectiveActions(): FormConfig['actions'];
|
|
667
887
|
/**
|
|
668
888
|
* Precedence for editorial rich-content interpolation:
|
|
669
889
|
* 1. form runtime context
|
|
@@ -725,6 +945,8 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
725
945
|
private buildSubmitRequest;
|
|
726
946
|
private normalizeSubmitMethod;
|
|
727
947
|
private resolveSubmitHref;
|
|
948
|
+
private resolveReadHref;
|
|
949
|
+
private resolveEntityAwareHref;
|
|
728
950
|
private resolveApiHref;
|
|
729
951
|
private resolveApiOrigin;
|
|
730
952
|
private resolveApiEntry;
|
|
@@ -740,34 +962,63 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
740
962
|
private formInputsKey;
|
|
741
963
|
private crudBackKey;
|
|
742
964
|
private tryInitializeForm;
|
|
965
|
+
private hasExplicitSchemaUrl;
|
|
966
|
+
private hasSchemaBackedRuntime;
|
|
743
967
|
private hasRenderableConfig;
|
|
744
968
|
private initializeStandaloneConfig;
|
|
969
|
+
private initializeDisconnectedEmptyState;
|
|
745
970
|
private reloadForModeChange;
|
|
746
971
|
ngOnInit(): void;
|
|
747
972
|
ngOnChanges(changes: SimpleChanges): void;
|
|
748
973
|
private blurAllInputs;
|
|
749
974
|
private initializeForm;
|
|
750
975
|
private handleInitializationError;
|
|
976
|
+
private loadConfigFailOpen;
|
|
977
|
+
private resolveFieldLabel;
|
|
751
978
|
private getErrorMessage;
|
|
752
979
|
private persistFormConfig;
|
|
753
980
|
private createDefaultConfig;
|
|
981
|
+
private createConfigFromHostConfig;
|
|
982
|
+
private reconcileLoadedConfigWithServerSchema;
|
|
983
|
+
private hostConfigHasAuthoredLocalFieldsNotInLocalConfig;
|
|
754
984
|
private syncWithServer;
|
|
755
985
|
private loadEntity;
|
|
756
986
|
private buildFormFromConfig;
|
|
757
987
|
private resetFormValueChangesSubscription;
|
|
988
|
+
private resetDependencyPolicySubscription;
|
|
989
|
+
private setupEntityLookupDependencyPolicies;
|
|
990
|
+
private applyEntityLookupDependencyPolicy;
|
|
991
|
+
private isEntityLookupField;
|
|
992
|
+
private resolveFieldDependencyNames;
|
|
993
|
+
private allowEntityLookupLegacyRetention;
|
|
994
|
+
private hasMeaningfulDependencyValue;
|
|
995
|
+
private setEntityLookupDependencyConflict;
|
|
996
|
+
private clearEntityLookupDependencyConflict;
|
|
997
|
+
private resolveEntityLookupDependencyValidationMessage;
|
|
758
998
|
private scheduleValueChangeBootstrapRelease;
|
|
759
999
|
private hasInteractiveFormState;
|
|
760
1000
|
private captureFormRuntimeState;
|
|
1001
|
+
private getDirtyFieldNames;
|
|
1002
|
+
private collectDirtyFieldNames;
|
|
761
1003
|
private buildCurrentFormRuntimeContext;
|
|
762
1004
|
private buildRestoreTargetContext;
|
|
763
1005
|
private isCompatibleRuntimeStateContext;
|
|
764
1006
|
private restoreFormRuntimeState;
|
|
765
1007
|
private getNormalizedInitialValue;
|
|
1008
|
+
private normalizeFormPatchValue;
|
|
1009
|
+
private isDateControlMetadata;
|
|
1010
|
+
private coerceDateControlValue;
|
|
766
1011
|
/**
|
|
767
1012
|
* Backward-compatible required validation for DATE_RANGE controls.
|
|
768
1013
|
* Some core builds do not enforce required start/end for dateRange fields.
|
|
769
1014
|
*/
|
|
770
1015
|
private applyDateRangeRequiredValidators;
|
|
1016
|
+
/**
|
|
1017
|
+
* Backward-compatible required validation for multiple entity lookups.
|
|
1018
|
+
* Some form-control builders treat `required` correctly for single lookups but
|
|
1019
|
+
* do not mark empty collections as required when `multiple=true`.
|
|
1020
|
+
*/
|
|
1021
|
+
private applyEntityLookupCollectionRequiredValidators;
|
|
771
1022
|
private isMountAnimationDisabled;
|
|
772
1023
|
private triggerMountAnimation;
|
|
773
1024
|
protected getMountDurationVar(): string | null;
|
|
@@ -778,7 +1029,19 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
778
1029
|
private saveConnection;
|
|
779
1030
|
disconnect(): void;
|
|
780
1031
|
onToolbarRequestClose(): void;
|
|
1032
|
+
private getActiveFormRules;
|
|
1033
|
+
private refreshMaterializedFormRules;
|
|
1034
|
+
private resolveDomainRulesOptions;
|
|
781
1035
|
private evaluateAndApplyRules;
|
|
1036
|
+
private applyRuleComputedFieldValues;
|
|
1037
|
+
private evaluateAndDispatchFormCommandRules;
|
|
1038
|
+
private evaluateFormCommandCondition;
|
|
1039
|
+
private executeFormCommandGlobalAction;
|
|
1040
|
+
private isPotentiallyDestructiveFormCommandAction;
|
|
1041
|
+
private resolveFormCommandPath;
|
|
1042
|
+
private areRuleValuesEqual;
|
|
1043
|
+
private buildRuleApplicationTargetIndex;
|
|
1044
|
+
private setRuleApplicationDiagnostics;
|
|
782
1045
|
isSectionCollapsed(section?: FormSection): boolean;
|
|
783
1046
|
isSectionCollapsible(section?: FormSection): boolean;
|
|
784
1047
|
private getSectionRuleProps;
|
|
@@ -796,6 +1059,8 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
796
1059
|
getSectionHeaderAlign(section: FormSection): 'start' | 'center' | undefined;
|
|
797
1060
|
getSectionGapBottom(section: FormSection): number | null;
|
|
798
1061
|
getSectionTitleGapBottom(section: FormSection): number | null;
|
|
1062
|
+
getEffectiveSectionTitleGapBottom(section: FormSection): number;
|
|
1063
|
+
isSectionHeaderTitleOnly(section: FormSection): boolean;
|
|
799
1064
|
getSectionDescriptionGapBottom(section: FormSection): number | null;
|
|
800
1065
|
getSectionHeaderActionColor(action: FormSectionHeaderAction): 'primary' | 'accent' | 'warn' | undefined;
|
|
801
1066
|
getSectionHeaderActionTooltip(action: FormSectionHeaderAction): string;
|
|
@@ -833,13 +1098,24 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
833
1098
|
hasEditorialVisualContext(): boolean;
|
|
834
1099
|
private applyBorderPropsToStyle;
|
|
835
1100
|
private resolveRuleVisibility;
|
|
1101
|
+
private resolveFieldVisibility;
|
|
1102
|
+
private isFieldMetadataHidden;
|
|
836
1103
|
toggleSectionCollapse(event: Event, section: FormSection): void;
|
|
837
1104
|
sectionPanelId(section: FormSection, index: number): string;
|
|
838
1105
|
getSectionCollapsedSummary(section: FormSection): string;
|
|
1106
|
+
getColumnItems(column: FormColumn): FormLayoutItem[];
|
|
1107
|
+
getColumnRenderItems(column: FormColumn): FormColumnRenderItem[];
|
|
839
1108
|
getColumnFields(column: {
|
|
840
|
-
fields
|
|
1109
|
+
fields?: string[];
|
|
1110
|
+
items?: FormLayoutItem[];
|
|
841
1111
|
id?: string;
|
|
842
1112
|
}): FieldMetadata[];
|
|
1113
|
+
getRichContentLayoutItemDocument(item: FormLayoutItem): RichContentDocument | null;
|
|
1114
|
+
getRichContentLayoutItemLayout(item: FormLayoutItem): 'block' | 'inline';
|
|
1115
|
+
private getVisualBlockRuleProps;
|
|
1116
|
+
private isRichContentLayoutItemVisible;
|
|
1117
|
+
private getColumnFieldsSignature;
|
|
1118
|
+
private getColumnItemsSignature;
|
|
843
1119
|
private getColumnRuleProps;
|
|
844
1120
|
private buildFieldRuleMetadataOverrides;
|
|
845
1121
|
private normalizeRuleFieldOptions;
|
|
@@ -857,7 +1133,12 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
857
1133
|
private _getConfirmationMessageForAliases;
|
|
858
1134
|
private _showConfirmationDialog;
|
|
859
1135
|
onFormAction(event: PraxisFormActionEvent): void;
|
|
1136
|
+
private dispatchRichContentAction;
|
|
1137
|
+
private isRichContentActionAvailable;
|
|
1138
|
+
private hasRichContentCapability;
|
|
1139
|
+
private buildRichContentActionContext;
|
|
860
1140
|
private _executeAction;
|
|
1141
|
+
private getFormActionEventId;
|
|
861
1142
|
onSubmit(): Promise<void>;
|
|
862
1143
|
private navigateAfterSave;
|
|
863
1144
|
private shouldConfirmCancelOnDirty;
|
|
@@ -871,6 +1152,35 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
871
1152
|
* IMPORTANTE: Independe completamente do mode do formulário
|
|
872
1153
|
*/
|
|
873
1154
|
toggleEditMode(): void;
|
|
1155
|
+
openAiAssistant(): void;
|
|
1156
|
+
openAiAssistantFromSession(session: PraxisAssistantSessionSnapshot): void;
|
|
1157
|
+
closeAiAssistant(): void;
|
|
1158
|
+
onAiAssistantPromptChange(prompt: string): void;
|
|
1159
|
+
onAiAssistantSubmit(prompt: string): void;
|
|
1160
|
+
onAiAssistantApply(): void;
|
|
1161
|
+
onAiAssistantRetry(): void;
|
|
1162
|
+
onAiAssistantCancel(): void;
|
|
1163
|
+
onAiAssistantQuickReply(reply: PraxisAssistantShellQuickReply): void;
|
|
1164
|
+
onAiAssistantEditMessage(message: PraxisAssistantShellMessage): void;
|
|
1165
|
+
onAiAssistantResendMessage(message: PraxisAssistantShellMessage): void;
|
|
1166
|
+
onAiAssistantLayoutChange(layout: PraxisAssistantShellLayout): void;
|
|
1167
|
+
aiAssistantTriggerTestId(position: string): string;
|
|
1168
|
+
private initializeAiAssistantController;
|
|
1169
|
+
private buildAiAssistantContextItems;
|
|
1170
|
+
private buildAiAssistantContextSnapshot;
|
|
1171
|
+
private syncAiAssistantSession;
|
|
1172
|
+
private hasAiAssistantSessionState;
|
|
1173
|
+
private resolveAiAssistantSessionId;
|
|
1174
|
+
private resolveAiAssistantOwnerId;
|
|
1175
|
+
private resolveAiAssistantRouteKey;
|
|
1176
|
+
private resolveAiAssistantSummary;
|
|
1177
|
+
private resolveAiAssistantBadge;
|
|
1178
|
+
private resolveAiAssistantIcon;
|
|
1179
|
+
private resolveAiAssistantSelectedTarget;
|
|
1180
|
+
private toAiAssistantTargetKind;
|
|
1181
|
+
private toAiAssistantTargetId;
|
|
1182
|
+
private toAiAssistantTargetLabel;
|
|
1183
|
+
private toAiAssistantPath;
|
|
874
1184
|
openConfigEditor(): Promise<void>;
|
|
875
1185
|
onElementMouseEnter(event: MouseEvent, type: CanvasElementType, data: any, element?: HTMLElement): void;
|
|
876
1186
|
onElementMouseLeave(event: MouseEvent): void;
|
|
@@ -916,6 +1226,7 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
916
1226
|
private openRowEditor;
|
|
917
1227
|
private openColumnEditor;
|
|
918
1228
|
openSectionEditor(section: any, focusTarget?: 'title' | 'description'): void;
|
|
1229
|
+
private applySectionEditorValue;
|
|
919
1230
|
private resolveControlTypeEditorial;
|
|
920
1231
|
private getControlTypeIcon;
|
|
921
1232
|
/**
|
|
@@ -925,6 +1236,7 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
925
1236
|
private getControlTypeName;
|
|
926
1237
|
private applyNullDeletionPatch;
|
|
927
1238
|
private stripNullMarkersFromPatch;
|
|
1239
|
+
private mergeMetadataObjectPatch;
|
|
928
1240
|
private deleteMetadataPath;
|
|
929
1241
|
private getMetadataPath;
|
|
930
1242
|
/**
|
|
@@ -953,6 +1265,11 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
953
1265
|
field: FieldMetadata;
|
|
954
1266
|
element: HTMLElement;
|
|
955
1267
|
}): void;
|
|
1268
|
+
onFieldFocus(payload: {
|
|
1269
|
+
field: FieldMetadata;
|
|
1270
|
+
element: HTMLElement;
|
|
1271
|
+
}): void;
|
|
1272
|
+
private selectCanvasField;
|
|
956
1273
|
onDragStarted(event: {
|
|
957
1274
|
field: FieldMetadata;
|
|
958
1275
|
index: number;
|
|
@@ -997,6 +1314,8 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
997
1314
|
private captureCurrentSchemaPrefsSnapshot;
|
|
998
1315
|
private executeDynamicFormEditorApplyPlan;
|
|
999
1316
|
private attachRuntimeMetadataToDynamicFormConfig;
|
|
1317
|
+
private emitConfigPatchChange;
|
|
1318
|
+
private cloneFormConfigForPatch;
|
|
1000
1319
|
private parsePresentationCssNumber;
|
|
1001
1320
|
private clearDynamicFormEditorPersistence;
|
|
1002
1321
|
private clearStoredPresentationSnapshots;
|
|
@@ -1010,12 +1329,13 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
1010
1329
|
private getSchemaWithCache;
|
|
1011
1330
|
private isReactiveValidationEnabled;
|
|
1012
1331
|
private getReactiveValidationDebounceMs;
|
|
1332
|
+
private waitForGlobalConfigReadyForSchema;
|
|
1013
1333
|
private setupReactiveValidation;
|
|
1014
1334
|
private logRowGapsSnapshot;
|
|
1015
1335
|
private applyPresentationVars;
|
|
1016
1336
|
private applyPresentationConfig;
|
|
1017
1337
|
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; }]>;
|
|
1018
|
-
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; }; "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>;
|
|
1338
|
+
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; }; "readUrl": { "alias": "readUrl"; "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; }; "showAiAssistant": { "alias": "showAiAssistant"; "required": false; }; "formId": { "alias": "formId"; "required": false; }; "componentInstanceId": { "alias": "componentInstanceId"; "required": false; }; "configPersistenceStrategy": { "alias": "configPersistenceStrategy"; "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"; "configPatchChange": "configPatchChange"; "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>;
|
|
1019
1339
|
}
|
|
1020
1340
|
|
|
1021
1341
|
declare class FormConfigService {
|
|
@@ -1093,6 +1413,53 @@ declare class JsonConfigEditorComponent implements OnInit, OnDestroy {
|
|
|
1093
1413
|
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>;
|
|
1094
1414
|
}
|
|
1095
1415
|
|
|
1416
|
+
interface VisualBlockRuleNodeOption {
|
|
1417
|
+
id: string;
|
|
1418
|
+
label: string;
|
|
1419
|
+
kind: string;
|
|
1420
|
+
roles: Array<'text' | 'title' | 'message'>;
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
type RuleAuthoringStatus = 'valid' | 'invalid-target' | 'invalid-condition' | 'unsupported-property' | 'sanitized-property' | 'runtime-only' | 'visual-builder-compatible' | 'llm-generated-pending-review';
|
|
1424
|
+
interface FormRulePropertyIssue {
|
|
1425
|
+
property: string;
|
|
1426
|
+
reason: 'unsupported-property' | 'invalid-value' | 'sanitized-value';
|
|
1427
|
+
}
|
|
1428
|
+
interface FormRuleTargetDiagnostic {
|
|
1429
|
+
type: NonNullable<FormLayoutRule['targetType']>;
|
|
1430
|
+
id: string;
|
|
1431
|
+
exists: boolean;
|
|
1432
|
+
}
|
|
1433
|
+
interface FormRuleDiagnostics {
|
|
1434
|
+
ruleId: string;
|
|
1435
|
+
ruleName?: string;
|
|
1436
|
+
status: RuleAuthoringStatus[];
|
|
1437
|
+
targetRefs: FormRuleTargetDiagnostic[];
|
|
1438
|
+
conditionRefs: string[];
|
|
1439
|
+
acceptedProperties: string[];
|
|
1440
|
+
rejectedProperties: string[];
|
|
1441
|
+
acceptedPropertiesWhenFalse: string[];
|
|
1442
|
+
rejectedPropertiesWhenFalse: string[];
|
|
1443
|
+
propertyIssues?: FormRulePropertyIssue[];
|
|
1444
|
+
propertyIssuesWhenFalse?: FormRulePropertyIssue[];
|
|
1445
|
+
runtimeOnlyReason?: string;
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
interface CommandRulePreviewModel {
|
|
1449
|
+
state: 'ready' | 'invalid';
|
|
1450
|
+
executionMode: 'preview-only';
|
|
1451
|
+
actionId: string;
|
|
1452
|
+
condition: JsonLogicExpression | null;
|
|
1453
|
+
payload?: unknown;
|
|
1454
|
+
payloadExpr?: string;
|
|
1455
|
+
policy: {
|
|
1456
|
+
trigger: 'on-condition-enter';
|
|
1457
|
+
distinct: boolean;
|
|
1458
|
+
distinctBy?: string;
|
|
1459
|
+
runOnInitialEvaluation?: boolean;
|
|
1460
|
+
};
|
|
1461
|
+
diagnostics: string[];
|
|
1462
|
+
}
|
|
1096
1463
|
declare class PraxisDynamicFormConfigEditor implements SettingsValueProvider, OnInit, OnDestroy {
|
|
1097
1464
|
private storage;
|
|
1098
1465
|
private configService;
|
|
@@ -1103,6 +1470,26 @@ declare class PraxisDynamicFormConfigEditor implements SettingsValueProvider, On
|
|
|
1103
1470
|
ruleBuilderConfig: RuleBuilderConfig;
|
|
1104
1471
|
ruleBuilderState?: RuleBuilderState;
|
|
1105
1472
|
currentRules: FormLayoutRule[];
|
|
1473
|
+
selectedCommandRuleId: string;
|
|
1474
|
+
commandRuleCondition: JsonLogicExpression | null;
|
|
1475
|
+
commandRuleConditionJson: string;
|
|
1476
|
+
commandRuleActionId: string;
|
|
1477
|
+
commandRulePayloadJson: string;
|
|
1478
|
+
private commandRulePayloadExpr;
|
|
1479
|
+
commandRuleDistinct: boolean;
|
|
1480
|
+
commandRuleDistinctBy: string;
|
|
1481
|
+
commandRuleRunOnInitialEvaluation: boolean;
|
|
1482
|
+
commandRuleAuthoringError: string | null;
|
|
1483
|
+
commandRulePayloadFieldErrors: Record<string, string>;
|
|
1484
|
+
ruleDiagnostics: FormRuleDiagnostics[];
|
|
1485
|
+
visualBlockNodeOptions: Record<string, VisualBlockRuleNodeOption[]>;
|
|
1486
|
+
ruleDiagnosticsSummary: {
|
|
1487
|
+
total: number;
|
|
1488
|
+
invalid: number;
|
|
1489
|
+
runtimeOnly: number;
|
|
1490
|
+
unsupported: number;
|
|
1491
|
+
pendingReview: number;
|
|
1492
|
+
};
|
|
1106
1493
|
private initialConfig;
|
|
1107
1494
|
private initialDocument;
|
|
1108
1495
|
private readonly openedWithCanonicalDocument;
|
|
@@ -1146,13 +1533,16 @@ declare class PraxisDynamicFormConfigEditor implements SettingsValueProvider, On
|
|
|
1146
1533
|
};
|
|
1147
1534
|
private destroy$;
|
|
1148
1535
|
private hasProcessedInitialRuleState;
|
|
1536
|
+
private jsonEditorIsValid;
|
|
1537
|
+
private globalActionValidationIssues;
|
|
1538
|
+
readonly globalActionCatalog: GlobalActionCatalogEntry[];
|
|
1149
1539
|
isDirty$: BehaviorSubject<boolean>;
|
|
1150
1540
|
isValid$: BehaviorSubject<boolean>;
|
|
1151
1541
|
isBusy$: BehaviorSubject<boolean>;
|
|
1152
1542
|
private lastRulesSignature;
|
|
1153
1543
|
private readonly DEBUG;
|
|
1154
1544
|
private debugLog;
|
|
1155
|
-
constructor(storage: AsyncConfigStorage, configService: FormConfigService, settingsPanel: SettingsPanelService, cdr: ChangeDetectorRef, injectedData?: any);
|
|
1545
|
+
constructor(storage: AsyncConfigStorage, configService: FormConfigService, settingsPanel: SettingsPanelService, cdr: ChangeDetectorRef, globalActionCatalogSource?: ReadonlyArray<GlobalActionCatalogEntry[]>, injectedData?: any);
|
|
1156
1546
|
ngOnInit(): void;
|
|
1157
1547
|
reset(): void;
|
|
1158
1548
|
updateDirtyState(reason?: string): void;
|
|
@@ -1162,7 +1552,53 @@ declare class PraxisDynamicFormConfigEditor implements SettingsValueProvider, On
|
|
|
1162
1552
|
onJsonValidationChange(result: JsonValidationResult): void;
|
|
1163
1553
|
onJsonEditorEvent(_event: JsonEditorEvent): void;
|
|
1164
1554
|
onConfigChange(newConfig: FormConfig): void;
|
|
1555
|
+
private updateValidityState;
|
|
1556
|
+
private collectGlobalActionValidationIssues;
|
|
1557
|
+
private collectGlobalActionValidationTargets;
|
|
1558
|
+
private findGlobalActionCatalogEntry;
|
|
1559
|
+
private buildGlobalActionCatalog;
|
|
1165
1560
|
onRulesChanged(state: RuleBuilderState): void;
|
|
1561
|
+
onRulePropertiesChanged(rules: FormLayoutRule[]): void;
|
|
1562
|
+
get commandRules(): PraxisRuntimeConditionalEffectRule<PraxisRuntimeGlobalActionEffect>[];
|
|
1563
|
+
get selectedCommandRule(): PraxisRuntimeConditionalEffectRule<PraxisRuntimeGlobalActionEffect> | undefined;
|
|
1564
|
+
onCommandRuleSelectionChange(): void;
|
|
1565
|
+
onCommandActionChange(): void;
|
|
1566
|
+
onCommandConditionChanged(condition: JsonLogicExpression | null): void;
|
|
1567
|
+
addCommandRule(): void;
|
|
1568
|
+
applyCommandRule(): void;
|
|
1569
|
+
deleteCommandRule(): void;
|
|
1570
|
+
get commandRuleActionSchema(): _praxisui_core.GlobalActionUiSchema | undefined;
|
|
1571
|
+
shouldShowCommandActionField(field: GlobalActionField): boolean;
|
|
1572
|
+
isCommandActionFieldRequired(field: GlobalActionField): boolean;
|
|
1573
|
+
isCommandActionFieldMissing(field: GlobalActionField): boolean;
|
|
1574
|
+
hasCommandActionFieldError(key: string): boolean;
|
|
1575
|
+
getCommandActionFieldError(key: string): string;
|
|
1576
|
+
get commandRulePreview(): CommandRulePreviewModel;
|
|
1577
|
+
getCommandActionFieldValue(field: GlobalActionField): any;
|
|
1578
|
+
onCommandActionFieldChange(field: GlobalActionField, value: any): void;
|
|
1579
|
+
private initializeCommandRuleEditor;
|
|
1580
|
+
private loadCommandRuleEditor;
|
|
1581
|
+
private updateCommandRules;
|
|
1582
|
+
private parseCommandRuleCondition;
|
|
1583
|
+
private parseOptionalJson;
|
|
1584
|
+
private parseCommandPayloadObject;
|
|
1585
|
+
private collectCommandActionFieldValues;
|
|
1586
|
+
private setCommandActionFieldError;
|
|
1587
|
+
private clearCommandActionFieldError;
|
|
1588
|
+
private nextCommandRuleId;
|
|
1589
|
+
private getDefaultCommandActionId;
|
|
1590
|
+
private formatGlobalActionIssue;
|
|
1591
|
+
private computeRuleDiagnosticsSummary;
|
|
1592
|
+
getRuleStatusLabel(diagnostic: FormRuleDiagnostics): string;
|
|
1593
|
+
getRuleStatusTone(diagnostic: FormRuleDiagnostics): 'ok' | 'warn' | 'error';
|
|
1594
|
+
canAcceptPendingLlmRule(diagnostic: FormRuleDiagnostics): boolean;
|
|
1595
|
+
canApplyRulePropertyFix(diagnostic: FormRuleDiagnostics): boolean;
|
|
1596
|
+
applyRulePropertyFix(ruleId: string): void;
|
|
1597
|
+
acceptPendingLlmRule(ruleId: string): void;
|
|
1598
|
+
getRuleDiagnosticDetails(diagnostic: FormRuleDiagnostics): string[];
|
|
1599
|
+
private getRulePropertyIssueNames;
|
|
1600
|
+
private markLlmRuleAccepted;
|
|
1601
|
+
private refreshRuleDiagnostics;
|
|
1166
1602
|
get jsonDocument(): DynamicFormAuthoringDocument;
|
|
1167
1603
|
onBackConfigChange(): void;
|
|
1168
1604
|
isBindingsBlockPersisted(): boolean;
|
|
@@ -1175,7 +1611,15 @@ declare class PraxisDynamicFormConfigEditor implements SettingsValueProvider, On
|
|
|
1175
1611
|
onPresentationPrefsChange(reason: string): void;
|
|
1176
1612
|
onSchemaPrefsChange(reason: string): void;
|
|
1177
1613
|
private createRuleBuilderConfig;
|
|
1614
|
+
private getVisualBuilderRulePropertySchema;
|
|
1178
1615
|
private mapMetadataToSchema;
|
|
1616
|
+
private getVisualBlockTargetLabel;
|
|
1617
|
+
private getRuleFieldLabel;
|
|
1618
|
+
private getRuleFieldDescription;
|
|
1619
|
+
private refreshVisualBlockNodeOptions;
|
|
1620
|
+
private collectVisualBlockNodeOptions;
|
|
1621
|
+
private getVisualBlockNodeRoles;
|
|
1622
|
+
private findRichContentNodeText;
|
|
1179
1623
|
private mapDataTypeToFieldType;
|
|
1180
1624
|
ngOnDestroy(): void;
|
|
1181
1625
|
onLayoutSelect(event: any): void;
|
|
@@ -1194,7 +1638,7 @@ declare class PraxisDynamicFormConfigEditor implements SettingsValueProvider, On
|
|
|
1194
1638
|
private toPresentationSnapshot;
|
|
1195
1639
|
private toSchemaPrefsSnapshot;
|
|
1196
1640
|
private toBackConfigSnapshot;
|
|
1197
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisDynamicFormConfigEditor, [null, null, null, null, { optional: true; }]>;
|
|
1641
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisDynamicFormConfigEditor, [null, null, null, null, { optional: true; }, { optional: true; }]>;
|
|
1198
1642
|
static ɵcmp: i0.ɵɵComponentDeclaration<PraxisDynamicFormConfigEditor, "praxis-dynamic-form-config-editor", never, {}, {}, never, never, true, never>;
|
|
1199
1643
|
}
|
|
1200
1644
|
interface FormConfigLike {
|
|
@@ -1232,6 +1676,7 @@ declare class PraxisFilterForm implements OnChanges, OnDestroy {
|
|
|
1232
1676
|
private hasExplicitDefaultValue;
|
|
1233
1677
|
onFormSubmit(): void;
|
|
1234
1678
|
getColumnFields(column: FormColumn): FieldMetadata[];
|
|
1679
|
+
getColumnClasses(column: FormColumn): string | null;
|
|
1235
1680
|
get fieldMetadata(): FieldMetadata[];
|
|
1236
1681
|
get hasLayout(): boolean;
|
|
1237
1682
|
trackBySection(i: number, section: FormSection): string;
|
|
@@ -1246,6 +1691,37 @@ declare const PRAXIS_FILTER_FORM_COMPONENT_METADATA: ComponentDocMeta;
|
|
|
1246
1691
|
/** Provider to register PraxisFilterForm metadata. */
|
|
1247
1692
|
declare function providePraxisFilterFormMetadata(): Provider;
|
|
1248
1693
|
|
|
1694
|
+
interface PraxisFilterFormWidgetEditorInputs {
|
|
1695
|
+
config?: FormConfig | null;
|
|
1696
|
+
formId?: string;
|
|
1697
|
+
resourcePath?: string;
|
|
1698
|
+
mode?: DynamicFormMode | string;
|
|
1699
|
+
[key: string]: unknown;
|
|
1700
|
+
}
|
|
1701
|
+
interface PraxisFilterFormWidgetEditorValue {
|
|
1702
|
+
inputs: PraxisFilterFormWidgetEditorInputs;
|
|
1703
|
+
}
|
|
1704
|
+
declare class PraxisFilterFormWidgetConfigEditor implements SettingsValueProvider, AfterViewInit, OnDestroy {
|
|
1705
|
+
inputs: PraxisFilterFormWidgetEditorInputs | null;
|
|
1706
|
+
widgetKey?: string;
|
|
1707
|
+
formEditor?: PraxisDynamicFormConfigEditor;
|
|
1708
|
+
readonly isDirty$: BehaviorSubject<boolean>;
|
|
1709
|
+
readonly isValid$: BehaviorSubject<boolean>;
|
|
1710
|
+
readonly isBusy$: BehaviorSubject<boolean>;
|
|
1711
|
+
private readonly subscription;
|
|
1712
|
+
ngAfterViewInit(): void;
|
|
1713
|
+
ngOnDestroy(): void;
|
|
1714
|
+
getSettingsValue(): PraxisFilterFormWidgetEditorValue;
|
|
1715
|
+
onSave(): PraxisFilterFormWidgetEditorValue;
|
|
1716
|
+
reset(): void;
|
|
1717
|
+
private initializeChildEditor;
|
|
1718
|
+
private buildValue;
|
|
1719
|
+
private createDocumentFromInputs;
|
|
1720
|
+
private normalizeMode;
|
|
1721
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisFilterFormWidgetConfigEditor, never>;
|
|
1722
|
+
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>;
|
|
1723
|
+
}
|
|
1724
|
+
|
|
1249
1725
|
/** Tokens for theme colors used across the layout editor. */
|
|
1250
1726
|
declare enum LayoutColorToken {
|
|
1251
1727
|
Surface = "--md-sys-color-surface",
|
|
@@ -1269,11 +1745,53 @@ declare class LayoutPrefsService {
|
|
|
1269
1745
|
static ɵprov: i0.ɵɵInjectableDeclaration<LayoutPrefsService>;
|
|
1270
1746
|
}
|
|
1271
1747
|
|
|
1748
|
+
type VisualBlockPresetId = 'text' | 'notice' | 'divider' | 'infoCard' | 'callout' | 'keyValueList' | 'recordSummary' | 'lookupCard' | 'disclosure' | 'emptyState';
|
|
1749
|
+
interface VisualBlockPreset {
|
|
1750
|
+
id: VisualBlockPresetId;
|
|
1751
|
+
labelKey: string;
|
|
1752
|
+
icon: string;
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1272
1755
|
interface FieldDropEvent {
|
|
1273
1756
|
event: CdkDragDrop<any>;
|
|
1274
1757
|
sectionIndex: number;
|
|
1275
1758
|
rowIndex: number;
|
|
1276
1759
|
}
|
|
1760
|
+
interface VisualBlockEvent {
|
|
1761
|
+
sectionIndex: number;
|
|
1762
|
+
rowIndex: number;
|
|
1763
|
+
columnIndex: number;
|
|
1764
|
+
itemId: string;
|
|
1765
|
+
}
|
|
1766
|
+
interface AddVisualBlockEvent {
|
|
1767
|
+
sectionIndex: number;
|
|
1768
|
+
rowIndex: number;
|
|
1769
|
+
columnIndex: number;
|
|
1770
|
+
presetId: VisualBlockPresetId;
|
|
1771
|
+
}
|
|
1772
|
+
interface AddApiFieldEvent {
|
|
1773
|
+
sectionIndex: number;
|
|
1774
|
+
rowIndex: number;
|
|
1775
|
+
columnIndex: number;
|
|
1776
|
+
fieldName: string;
|
|
1777
|
+
}
|
|
1778
|
+
interface AddLocalFieldEvent {
|
|
1779
|
+
sectionIndex: number;
|
|
1780
|
+
rowIndex: number;
|
|
1781
|
+
columnIndex: number;
|
|
1782
|
+
}
|
|
1783
|
+
interface EditFieldEvent {
|
|
1784
|
+
sectionIndex: number;
|
|
1785
|
+
rowIndex: number;
|
|
1786
|
+
columnIndex: number;
|
|
1787
|
+
fieldName: string;
|
|
1788
|
+
}
|
|
1789
|
+
interface MoveVisualBlockEvent extends VisualBlockEvent {
|
|
1790
|
+
direction: -1 | 1;
|
|
1791
|
+
}
|
|
1792
|
+
interface MoveVisualBlockToColumnEvent extends VisualBlockEvent {
|
|
1793
|
+
targetColumnIndex: number;
|
|
1794
|
+
}
|
|
1277
1795
|
/**
|
|
1278
1796
|
* Editor component for configuring sections, rows and fields of a dynamic form.
|
|
1279
1797
|
* Provides a collapsible palette of available fields.
|
|
@@ -1283,13 +1801,19 @@ declare class LayoutEditorComponent implements OnInit {
|
|
|
1283
1801
|
configChange: EventEmitter<FormConfig>;
|
|
1284
1802
|
paletteCollapsed: boolean;
|
|
1285
1803
|
protected readonly prefs: LayoutPrefsService;
|
|
1804
|
+
private readonly layoutService;
|
|
1805
|
+
private readonly settingsPanel;
|
|
1806
|
+
private readonly i18n;
|
|
1807
|
+
private visualBlockIdSequence;
|
|
1808
|
+
private localFieldSequence;
|
|
1286
1809
|
protected readonly colorTokens: typeof LayoutColorToken;
|
|
1287
1810
|
selected: {
|
|
1288
|
-
type: 'section' | 'row' | 'column' | 'field';
|
|
1811
|
+
type: 'section' | 'row' | 'column' | 'field' | 'visualBlock';
|
|
1289
1812
|
sectionIndex?: number;
|
|
1290
1813
|
rowIndex?: number;
|
|
1291
1814
|
columnIndex?: number;
|
|
1292
1815
|
fieldName?: string;
|
|
1816
|
+
itemId?: string;
|
|
1293
1817
|
} | null;
|
|
1294
1818
|
gapGlobal: number;
|
|
1295
1819
|
setGapGlobal(val: number | string): void;
|
|
@@ -1314,6 +1838,7 @@ declare class LayoutEditorComponent implements OnInit {
|
|
|
1314
1838
|
* Fields that are not yet placed in any section/column of the layout.
|
|
1315
1839
|
*/
|
|
1316
1840
|
get availableFields(): FieldMetadata[];
|
|
1841
|
+
t(key: string, params?: Record<string, string | number | boolean | null | undefined>): string;
|
|
1317
1842
|
get columnDropListIds(): string[];
|
|
1318
1843
|
getColumnId(sectionIndex: number, rowIndex: number, columnIndex: number): string;
|
|
1319
1844
|
private parseColumnId;
|
|
@@ -1324,10 +1849,30 @@ declare class LayoutEditorComponent implements OnInit {
|
|
|
1324
1849
|
selectRow(sectionIndex: number, rowIndex: number): void;
|
|
1325
1850
|
selectColumn(sectionIndex: number, rowIndex: number, columnIndex: number): void;
|
|
1326
1851
|
dropField({ event }: FieldDropEvent): void;
|
|
1852
|
+
private getColumnLayoutItemByIndex;
|
|
1853
|
+
private getColumnTargetByIndex;
|
|
1854
|
+
private getLayoutItemTargetByIndex;
|
|
1327
1855
|
dropSection(event: CdkDragDrop<FormSection[]>): void;
|
|
1328
1856
|
addSection(): void;
|
|
1329
1857
|
removeSection(index: number): void;
|
|
1330
1858
|
onSectionUpdated(index: number, updatedSection: FormSection): void;
|
|
1859
|
+
addVisualBlockToColumn(event: AddVisualBlockEvent): void;
|
|
1860
|
+
private createVisualBlockItemId;
|
|
1861
|
+
addApiFieldToColumn(event: AddApiFieldEvent): void;
|
|
1862
|
+
addLocalFieldToColumn(event: AddLocalFieldEvent): void;
|
|
1863
|
+
openFieldMetadataEditor(event: EditFieldEvent): void;
|
|
1864
|
+
private openFieldMetadataEditorInternal;
|
|
1865
|
+
private applyFieldMetadataPatch;
|
|
1866
|
+
private createLocalFieldName;
|
|
1867
|
+
openVisualBlockEditor(event: {
|
|
1868
|
+
sectionIndex: number;
|
|
1869
|
+
rowIndex: number;
|
|
1870
|
+
columnIndex: number;
|
|
1871
|
+
itemId: string;
|
|
1872
|
+
}): void;
|
|
1873
|
+
moveVisualBlock(event: MoveVisualBlockEvent): void;
|
|
1874
|
+
moveVisualBlockToColumn(event: MoveVisualBlockToColumnEvent): void;
|
|
1875
|
+
removeVisualBlock(event: VisualBlockEvent): void;
|
|
1331
1876
|
private emitNewConfig;
|
|
1332
1877
|
onApplyStyleToAll(patch: Partial<FormSection>): void;
|
|
1333
1878
|
trackBySection(index: number, s: FormSection & {
|
|
@@ -1340,15 +1885,17 @@ declare class LayoutEditorComponent implements OnInit {
|
|
|
1340
1885
|
declare class RowConfiguratorComponent implements OnChanges {
|
|
1341
1886
|
row: FormRow;
|
|
1342
1887
|
fieldMetadata: FieldMetadata[];
|
|
1888
|
+
availableFields: FieldMetadata[];
|
|
1343
1889
|
sectionIndex: number;
|
|
1344
1890
|
rowIndex: number;
|
|
1345
1891
|
isLastRow: boolean;
|
|
1346
1892
|
selected: {
|
|
1347
|
-
type: 'section' | 'row' | 'column' | 'field';
|
|
1893
|
+
type: 'section' | 'row' | 'column' | 'field' | 'visualBlock';
|
|
1348
1894
|
sectionIndex?: number;
|
|
1349
1895
|
rowIndex?: number;
|
|
1350
1896
|
columnIndex?: number;
|
|
1351
1897
|
fieldName?: string;
|
|
1898
|
+
itemId?: string;
|
|
1352
1899
|
} | null;
|
|
1353
1900
|
availableFieldsListId: string | null;
|
|
1354
1901
|
connectedDropListIds: string[];
|
|
@@ -1358,8 +1905,51 @@ declare class RowConfiguratorComponent implements OnChanges {
|
|
|
1358
1905
|
remove: EventEmitter<void>;
|
|
1359
1906
|
applyRowGapAll: EventEmitter<number>;
|
|
1360
1907
|
fieldDrop: EventEmitter<CdkDragDrop<any, any, any>>;
|
|
1908
|
+
addVisualBlock: EventEmitter<{
|
|
1909
|
+
rowIndex: number;
|
|
1910
|
+
columnIndex: number;
|
|
1911
|
+
presetId: VisualBlockPresetId;
|
|
1912
|
+
}>;
|
|
1913
|
+
addApiField: EventEmitter<{
|
|
1914
|
+
rowIndex: number;
|
|
1915
|
+
columnIndex: number;
|
|
1916
|
+
fieldName: string;
|
|
1917
|
+
}>;
|
|
1918
|
+
addLocalField: EventEmitter<{
|
|
1919
|
+
rowIndex: number;
|
|
1920
|
+
columnIndex: number;
|
|
1921
|
+
}>;
|
|
1922
|
+
editField: EventEmitter<{
|
|
1923
|
+
rowIndex: number;
|
|
1924
|
+
columnIndex: number;
|
|
1925
|
+
fieldName: string;
|
|
1926
|
+
}>;
|
|
1927
|
+
editVisualBlock: EventEmitter<{
|
|
1928
|
+
rowIndex: number;
|
|
1929
|
+
columnIndex: number;
|
|
1930
|
+
itemId: string;
|
|
1931
|
+
}>;
|
|
1932
|
+
moveVisualBlock: EventEmitter<{
|
|
1933
|
+
rowIndex: number;
|
|
1934
|
+
columnIndex: number;
|
|
1935
|
+
itemId: string;
|
|
1936
|
+
direction: -1 | 1;
|
|
1937
|
+
}>;
|
|
1938
|
+
moveVisualBlockToColumn: EventEmitter<{
|
|
1939
|
+
rowIndex: number;
|
|
1940
|
+
columnIndex: number;
|
|
1941
|
+
targetColumnIndex: number;
|
|
1942
|
+
itemId: string;
|
|
1943
|
+
}>;
|
|
1944
|
+
removeVisualBlock: EventEmitter<{
|
|
1945
|
+
rowIndex: number;
|
|
1946
|
+
columnIndex: number;
|
|
1947
|
+
itemId: string;
|
|
1948
|
+
}>;
|
|
1361
1949
|
select: EventEmitter<any>;
|
|
1362
1950
|
activeDropIndex: number | null;
|
|
1951
|
+
protected readonly visualBlockPresets: readonly VisualBlockPreset[];
|
|
1952
|
+
private readonly i18n;
|
|
1363
1953
|
private hoverTimer;
|
|
1364
1954
|
protected readonly breakpoints: Breakpoint[];
|
|
1365
1955
|
previewBreakpoint: Breakpoint;
|
|
@@ -1372,11 +1962,26 @@ declare class RowConfiguratorComponent implements OnChanges {
|
|
|
1372
1962
|
ngOnChanges(changes: SimpleChanges): void;
|
|
1373
1963
|
private rebuildConnectedColumnsCache;
|
|
1374
1964
|
getFieldByName(fieldName: string): FieldMetadata;
|
|
1375
|
-
|
|
1965
|
+
getColumnLayoutItems(column: FormColumn): FormLayoutItem[];
|
|
1966
|
+
trackLayoutItem(_: number, item: FormLayoutItem): string;
|
|
1967
|
+
hasColumnContent(column: FormColumn): boolean;
|
|
1968
|
+
getVisualBlockLabel(item: FormLayoutItem): string;
|
|
1969
|
+
private findRichContentLabel;
|
|
1970
|
+
private findRichNodeLabel;
|
|
1971
|
+
t(key: string, params?: Record<string, string | number | boolean | null | undefined>): string;
|
|
1972
|
+
getFieldLabel(field: FieldMetadata): string;
|
|
1973
|
+
selectVisualBlock(columnIndex: number, item: FormLayoutItem, event: Event): void;
|
|
1974
|
+
openVisualBlockEditor(columnIndex: number, item: FormLayoutItem, event: Event): void;
|
|
1975
|
+
moveVisualBlockItem(columnIndex: number, item: FormLayoutItem, direction: -1 | 1, event: Event): void;
|
|
1976
|
+
canMoveVisualBlockToColumn(columnIndex: number, direction: -1 | 1): boolean;
|
|
1977
|
+
moveVisualBlockToAdjacentColumn(columnIndex: number, item: FormLayoutItem, direction: -1 | 1, event: Event): void;
|
|
1978
|
+
removeVisualBlockItem(columnIndex: number, item: FormLayoutItem, event: Event): void;
|
|
1979
|
+
drop(event: CdkDragDrop<FormLayoutItem[], FormLayoutItem[] | FieldMetadata[], FormLayoutItem | FieldMetadata>): void;
|
|
1376
1980
|
selectRow(): void;
|
|
1377
1981
|
openColumnConfig(index: number): void;
|
|
1378
1982
|
selectColumn(index: number, event: MouseEvent): void;
|
|
1379
|
-
selectField(fieldName: string, event: MouseEvent): void;
|
|
1983
|
+
selectField(fieldName: string, columnIndex: number, event: MouseEvent): void;
|
|
1984
|
+
openFieldEditor(fieldName: string, columnIndex: number, event: Event): void;
|
|
1380
1985
|
openRowMenu(): void;
|
|
1381
1986
|
onMenuClosed(): void;
|
|
1382
1987
|
onDropEnter(index: number): void;
|
|
@@ -1390,6 +1995,9 @@ declare class RowConfiguratorComponent implements OnChanges {
|
|
|
1390
1995
|
removeRow(): void;
|
|
1391
1996
|
moveColumn(index: number, direction: number): void;
|
|
1392
1997
|
clearColumn(index: number): void;
|
|
1998
|
+
addVisualBlockToColumn(index: number, presetId: VisualBlockPresetId): void;
|
|
1999
|
+
addApiFieldToColumn(index: number, fieldName: string): void;
|
|
2000
|
+
addLocalFieldToColumn(index: number): void;
|
|
1393
2001
|
addFieldToColumn(index: number): void;
|
|
1394
2002
|
getColumnId(index: number): string;
|
|
1395
2003
|
private generateId;
|
|
@@ -1413,7 +2021,7 @@ declare class RowConfiguratorComponent implements OnChanges {
|
|
|
1413
2021
|
adjustOffset(columnIndex: number, delta: number): void;
|
|
1414
2022
|
getSuggestedSpan(columnIndex: number): number | null;
|
|
1415
2023
|
static ɵfac: i0.ɵɵFactoryDeclaration<RowConfiguratorComponent, never>;
|
|
1416
|
-
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>;
|
|
2024
|
+
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>;
|
|
1417
2025
|
}
|
|
1418
2026
|
|
|
1419
2027
|
declare class FieldConfiguratorComponent {
|
|
@@ -1431,11 +2039,69 @@ declare class FieldConfiguratorComponent {
|
|
|
1431
2039
|
static ɵcmp: i0.ɵɵComponentDeclaration<FieldConfiguratorComponent, "praxis-field-configurator", never, { "field": { "alias": "field"; "required": false; }; }, {}, never, never, true, never>;
|
|
1432
2040
|
}
|
|
1433
2041
|
|
|
2042
|
+
interface PraxisDynamicFormWidgetEditorInputs {
|
|
2043
|
+
config?: FormConfig | null;
|
|
2044
|
+
mode?: DynamicFormMode;
|
|
2045
|
+
formId?: string;
|
|
2046
|
+
componentInstanceId?: string;
|
|
2047
|
+
backConfig?: BackConfig;
|
|
2048
|
+
notifyIfOutdated?: 'inline' | 'snackbar' | 'both' | 'none';
|
|
2049
|
+
snoozeMs?: number;
|
|
2050
|
+
autoOpenSettingsOnOutdated?: boolean;
|
|
2051
|
+
[key: string]: unknown;
|
|
2052
|
+
}
|
|
2053
|
+
interface PraxisDynamicFormWidgetEditorValue {
|
|
2054
|
+
inputs: PraxisDynamicFormWidgetEditorInputs;
|
|
2055
|
+
}
|
|
2056
|
+
declare class PraxisDynamicFormWidgetConfigEditor implements SettingsValueProvider, AfterViewInit, OnDestroy {
|
|
2057
|
+
inputs: PraxisDynamicFormWidgetEditorInputs | null;
|
|
2058
|
+
widgetKey?: string;
|
|
2059
|
+
formEditor?: PraxisDynamicFormConfigEditor;
|
|
2060
|
+
readonly isDirty$: BehaviorSubject<boolean>;
|
|
2061
|
+
readonly isValid$: BehaviorSubject<boolean>;
|
|
2062
|
+
readonly isBusy$: BehaviorSubject<boolean>;
|
|
2063
|
+
private readonly subscription;
|
|
2064
|
+
ngAfterViewInit(): void;
|
|
2065
|
+
ngOnDestroy(): void;
|
|
2066
|
+
getSettingsValue(): PraxisDynamicFormWidgetEditorValue;
|
|
2067
|
+
onSave(): PraxisDynamicFormWidgetEditorValue;
|
|
2068
|
+
reset(): void;
|
|
2069
|
+
private initializeChildEditor;
|
|
2070
|
+
private buildValue;
|
|
2071
|
+
private createDocumentFromInputs;
|
|
2072
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisDynamicFormWidgetConfigEditor, never>;
|
|
2073
|
+
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>;
|
|
2074
|
+
}
|
|
2075
|
+
|
|
1434
2076
|
/** Metadata for PraxisDynamicForm component */
|
|
1435
2077
|
declare const PRAXIS_DYNAMIC_FORM_COMPONENT_METADATA: ComponentDocMeta;
|
|
1436
2078
|
/** Provider para auto-registrar metadados do componente Dynamic Form. */
|
|
1437
2079
|
declare function providePraxisDynamicFormMetadata(): Provider;
|
|
1438
2080
|
|
|
2081
|
+
interface DomainRuleFormRulesRequestOptions extends DomainRuleRequestOptions {
|
|
2082
|
+
targetLayer?: string;
|
|
2083
|
+
targetArtifactType?: string;
|
|
2084
|
+
status?: string;
|
|
2085
|
+
}
|
|
2086
|
+
type DomainRuleMaterializedFormLayoutRule = FormLayoutRule & {
|
|
2087
|
+
metadata?: Record<string, unknown>;
|
|
2088
|
+
};
|
|
2089
|
+
declare class DomainRuleFormRulesService {
|
|
2090
|
+
private readonly domainRules;
|
|
2091
|
+
constructor(domainRules: DomainRuleService);
|
|
2092
|
+
listRulesForForm(targetArtifactKey: string, options?: DomainRuleFormRulesRequestOptions): Observable<DomainRuleMaterializedFormLayoutRule[]>;
|
|
2093
|
+
materializationsToFormRules(materializations: DomainRuleMaterialization[] | null | undefined): DomainRuleMaterializedFormLayoutRule[];
|
|
2094
|
+
materializationToFormRule(materialization: DomainRuleMaterialization): DomainRuleMaterializedFormLayoutRule | null;
|
|
2095
|
+
private asDirectFormRule;
|
|
2096
|
+
private visualBlockGuidanceToRule;
|
|
2097
|
+
private withDomainMetadata;
|
|
2098
|
+
private asRecord;
|
|
2099
|
+
private asStringArray;
|
|
2100
|
+
private resolveString;
|
|
2101
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DomainRuleFormRulesService, never>;
|
|
2102
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DomainRuleFormRulesService>;
|
|
2103
|
+
}
|
|
2104
|
+
|
|
1439
2105
|
declare function isRuleSatisfied(rule: FormLayoutRule, data: unknown): boolean;
|
|
1440
2106
|
/**
|
|
1441
2107
|
* Applies all visibility rules to the provided data and
|
|
@@ -1527,6 +2193,7 @@ type ActionCatalogOption = {
|
|
|
1527
2193
|
id: string;
|
|
1528
2194
|
label: string;
|
|
1529
2195
|
description?: string;
|
|
2196
|
+
payloadSchema?: GlobalActionCatalogEntry['payloadSchema'];
|
|
1530
2197
|
param?: {
|
|
1531
2198
|
required?: boolean;
|
|
1532
2199
|
label?: string;
|
|
@@ -1580,7 +2247,6 @@ declare class SectionEditorComponent implements OnInit, AfterViewInit, OnDestroy
|
|
|
1580
2247
|
isBusy$: BehaviorSubject<boolean>;
|
|
1581
2248
|
private readonly globalActionCatalogSource;
|
|
1582
2249
|
private readonly i18n;
|
|
1583
|
-
readonly legacyActionSpecs: _praxisui_core.GlobalActionSpec[];
|
|
1584
2250
|
readonly globalActionCatalog: ActionCatalogOption[];
|
|
1585
2251
|
readonly customActionValue = "__custom__";
|
|
1586
2252
|
private destroy$;
|
|
@@ -1600,12 +2266,12 @@ declare class SectionEditorComponent implements OnInit, AfterViewInit, OnDestroy
|
|
|
1600
2266
|
label?: string;
|
|
1601
2267
|
}): string;
|
|
1602
2268
|
getHeaderActionSpecById(id: string): ActionCatalogOption | undefined;
|
|
1603
|
-
getHeaderActionSelectValue(value?: string): string;
|
|
1604
|
-
getHeaderActionParam(value?: string): string;
|
|
1605
|
-
getHeaderActionCustomValue(value?: string): string;
|
|
1606
|
-
getHeaderGlobalActionSchema(value?: string): _praxisui_core.GlobalActionUiSchema | undefined;
|
|
1607
|
-
getHeaderSurfaceOpenActionPayload(value?: string): SurfaceOpenPayload;
|
|
1608
|
-
isHeaderActionParamMissing(value?: string): boolean;
|
|
2269
|
+
getHeaderActionSelectValue(value?: string, globalAction?: GlobalActionRef): string;
|
|
2270
|
+
getHeaderActionParam(value?: string, globalAction?: GlobalActionRef): string;
|
|
2271
|
+
getHeaderActionCustomValue(value?: string, globalAction?: GlobalActionRef): string;
|
|
2272
|
+
getHeaderGlobalActionSchema(value?: string, globalAction?: GlobalActionRef): _praxisui_core.GlobalActionUiSchema | undefined;
|
|
2273
|
+
getHeaderSurfaceOpenActionPayload(value?: string, globalAction?: GlobalActionRef): SurfaceOpenPayload;
|
|
2274
|
+
isHeaderActionParamMissing(value?: string, globalAction?: GlobalActionRef): boolean;
|
|
1609
2275
|
onHeaderActionSelectChange(index: number, value: string): void;
|
|
1610
2276
|
onHeaderActionParamChange(index: number, value: string): void;
|
|
1611
2277
|
onHeaderActionCustomChange(index: number, value: string): void;
|
|
@@ -1639,6 +2305,7 @@ declare class SectionEditorComponent implements OnInit, AfterViewInit, OnDestroy
|
|
|
1639
2305
|
private normalizeHeaderActions;
|
|
1640
2306
|
private mapCatalogEntryToActionSpec;
|
|
1641
2307
|
private getActionCatalogDescription;
|
|
2308
|
+
private normalizeHeaderGlobalAction;
|
|
1642
2309
|
private headerActionStyleValidator;
|
|
1643
2310
|
private stringifyHeaderActionStyle;
|
|
1644
2311
|
private parseHeaderActionStyle;
|
|
@@ -1827,7 +2494,8 @@ declare enum FormRuleTargetType {
|
|
|
1827
2494
|
Section = "section",
|
|
1828
2495
|
Action = "action",
|
|
1829
2496
|
Row = "row",
|
|
1830
|
-
Column = "column"
|
|
2497
|
+
Column = "column",
|
|
2498
|
+
VisualBlock = "visualBlock"
|
|
1831
2499
|
}
|
|
1832
2500
|
declare enum FormRuleContext {
|
|
1833
2501
|
Visibility = "visibility",
|
|
@@ -1919,5 +2587,49 @@ declare const FORM_COMPONENT_AI_CAPABILITIES: CapabilityCatalog;
|
|
|
1919
2587
|
*/
|
|
1920
2588
|
declare function getFormAiCatalog(formConfig?: FormConfig): AiCapabilityCatalog;
|
|
1921
2589
|
|
|
1922
|
-
|
|
1923
|
-
|
|
2590
|
+
type DynamicFormRuleTargetType = NonNullable<FormLayoutRule['targetType']>;
|
|
2591
|
+
interface DynamicFormRuleAuthoringField {
|
|
2592
|
+
name: string;
|
|
2593
|
+
label?: string;
|
|
2594
|
+
type?: string;
|
|
2595
|
+
source?: string;
|
|
2596
|
+
submitPolicy?: string;
|
|
2597
|
+
}
|
|
2598
|
+
interface DynamicFormRuleAuthoringTarget {
|
|
2599
|
+
id: string;
|
|
2600
|
+
label?: string;
|
|
2601
|
+
}
|
|
2602
|
+
interface DynamicFormRuleAuthoringVisualBlockNode {
|
|
2603
|
+
id: string;
|
|
2604
|
+
label: string;
|
|
2605
|
+
kind: string;
|
|
2606
|
+
roles: Array<'text' | 'title' | 'message'>;
|
|
2607
|
+
}
|
|
2608
|
+
type DynamicFormRuleAuthoringTargets = Record<DynamicFormRuleTargetType, string[]>;
|
|
2609
|
+
type DynamicFormRuleAuthoringTargetDetails = Record<DynamicFormRuleTargetType, DynamicFormRuleAuthoringTarget[]>;
|
|
2610
|
+
type DynamicFormAllowedRuleProperties = Record<DynamicFormRuleTargetType, string[]>;
|
|
2611
|
+
interface DynamicFormRuleAuthoringContext {
|
|
2612
|
+
component: 'praxis-dynamic-form';
|
|
2613
|
+
capabilityCatalogVersion: string;
|
|
2614
|
+
fields: DynamicFormRuleAuthoringField[];
|
|
2615
|
+
targets: DynamicFormRuleAuthoringTargets;
|
|
2616
|
+
targetDetails: DynamicFormRuleAuthoringTargetDetails;
|
|
2617
|
+
allowedRuleProperties: DynamicFormAllowedRuleProperties;
|
|
2618
|
+
visualBlockNodes: Record<string, DynamicFormRuleAuthoringVisualBlockNode[]>;
|
|
2619
|
+
existingRules: FormLayoutRule[];
|
|
2620
|
+
diagnostics: FormRuleDiagnostics[];
|
|
2621
|
+
guardrails: string[];
|
|
2622
|
+
}
|
|
2623
|
+
declare function buildDynamicFormRuleAuthoringContext(config: Pick<FormConfig, 'fieldMetadata' | 'sections' | 'actions' | 'formRules'>): DynamicFormRuleAuthoringContext;
|
|
2624
|
+
|
|
2625
|
+
/**
|
|
2626
|
+
* Manifesto de authoring canônico para o componente praxis-dynamic-form.
|
|
2627
|
+
* Este arquivo define as operações permitidas pela IA para editar formulários.
|
|
2628
|
+
*
|
|
2629
|
+
* @version 1.5.0
|
|
2630
|
+
* @status COMPLIANT - Alinhado com contrato v2, gate de aceitação e semântica local/schema-backed.
|
|
2631
|
+
*/
|
|
2632
|
+
declare const PRAXIS_DYNAMIC_FORM_AUTHORING_MANIFEST: ComponentAuthoringManifest;
|
|
2633
|
+
|
|
2634
|
+
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 };
|
|
2635
|
+
export type { CanvasElement, CanvasElementType, CanvasPathPart, Capability$1 as Capability, CapabilityCatalog$1 as CapabilityCatalog, CapabilityCategory$1 as CapabilityCategory, DomainRuleFormRulesRequestOptions, DomainRuleMaterializedFormLayoutRule, DynamicFieldRenderErrorEvent, DynamicFormAllowedRuleProperties, DynamicFormApplyPlan, DynamicFormAuthoringDocument, DynamicFormBindings, DynamicFormConfigPatchChangeEvent, 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 };
|