@praxisui/dynamic-form 9.0.0-beta.30 → 9.0.0-beta.32
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 +22 -0
- package/ai/component-registry.json +134 -10
- package/docs/schema-driven-layout-materialization-rfc.md +43 -1
- package/fesm2022/praxisui-dynamic-form.mjs +210 -106
- package/package.json +8 -8
- package/src/lib/praxis-dynamic-form.json-api.md +1 -1
- package/types/praxisui-dynamic-form.d.ts +11 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/dynamic-form",
|
|
3
|
-
"version": "9.0.0-beta.
|
|
3
|
+
"version": "9.0.0-beta.32",
|
|
4
4
|
"description": "Angular dynamic form engine for Praxis UI: metadata-driven forms, hooks, and services integrating @praxisui/* packages.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^21.0.0",
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"@angular/forms": "^21.0.0",
|
|
10
10
|
"@angular/material": "^21.0.0",
|
|
11
11
|
"@angular/router": "^21.0.0",
|
|
12
|
-
"@praxisui/ai": "^9.0.0-beta.
|
|
13
|
-
"@praxisui/dynamic-fields": "^9.0.0-beta.
|
|
14
|
-
"@praxisui/metadata-editor": "^9.0.0-beta.
|
|
15
|
-
"@praxisui/rich-content": "^9.0.0-beta.
|
|
16
|
-
"@praxisui/settings-panel": "^9.0.0-beta.
|
|
17
|
-
"@praxisui/visual-builder": "^9.0.0-beta.
|
|
18
|
-
"@praxisui/core": "^9.0.0-beta.
|
|
12
|
+
"@praxisui/ai": "^9.0.0-beta.32",
|
|
13
|
+
"@praxisui/dynamic-fields": "^9.0.0-beta.32",
|
|
14
|
+
"@praxisui/metadata-editor": "^9.0.0-beta.32",
|
|
15
|
+
"@praxisui/rich-content": "^9.0.0-beta.32",
|
|
16
|
+
"@praxisui/settings-panel": "^9.0.0-beta.32",
|
|
17
|
+
"@praxisui/visual-builder": "^9.0.0-beta.32",
|
|
18
|
+
"@praxisui/core": "^9.0.0-beta.32",
|
|
19
19
|
"rxjs": "^7.8.0"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
@@ -560,7 +560,7 @@ No ecossistema Praxis, ele funciona tanto como runtime final quanto como superfi
|
|
|
560
560
|
|
|
561
561
|
| Input | Tipo | Default | Status | Runtime notes |
|
|
562
562
|
| --- | --- | --- | --- | --- |
|
|
563
|
-
| `config` | `FormConfig` | `{ sections: [] }` | Active | Contrato principal consumido no ciclo inteiro. |
|
|
563
|
+
| `config` | `FormConfig` | `{ sections: [] }` | Active | Contrato principal consumido no ciclo inteiro. `sections` é opcional somente para forms schema-driven com grounding explícito (`metadata.source='schema'`, schema metadata ou fonte runtime como `schemaUrl`/`resourcePath`); ausência de layout manual é normalizada internamente como array vazio e permite que `layoutPolicy`/schema materializem agrupamentos. |
|
|
564
564
|
| `resourcePath` | `string \| undefined` | `undefined` | Active | Habilita carga de schema/dados remotos. Opcional quando `schemaUrl` explícito é fornecido. |
|
|
565
565
|
| `resourceId` | `string \| number \| undefined` | `undefined` | Active | Carrega entidade no modo `edit/view`. |
|
|
566
566
|
| `mode` | `'create' \| 'edit' \| 'view'` | `'create'` | Active | Governa submit, leitura e apresentacao. |
|
|
@@ -7,13 +7,14 @@ 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, FormLayoutItem, FormActionButton, AiCapability, BackConfig, RichBlockHostCapabilities, ApiEndpoint, ApiUrlEntry, DynamicFormLayoutPolicy, 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, EnterpriseRuntimeContextService, FormSectionHeaderAction, FormSectionHeaderConfig, FormConfigState, JsonLogicExpression, FormHelpPresentationConfig, GlobalActionCatalogEntry, PraxisRuntimeConditionalEffectRule, PraxisRuntimeGlobalActionEffect, SurfaceOpenPayload, GlobalActionField, PraxisEffectPolicy, FieldDefinition, ComponentDocMeta, Breakpoint, DomainRuleRequestOptions, DomainRuleService, DomainRuleMaterialization, TableConfig, IconPickerService, GlobalActionRef, AiCapabilityCategory, AiCapabilityCatalog, AiValueKind, ComponentAuthoringManifest } from '@praxisui/core';
|
|
10
|
+
import { AsyncConfigStorage, FormLayout, FieldMetadata, FormLayoutRule, FormRuleTargetType as FormRuleTargetType$1, PraxisJsonLogicService, FormSection, FormRow, FormColumn, FormConfig, FormConfigWithSections, FormLayoutItem, FormActionButton, AiCapability, BackConfig, RichBlockHostCapabilities, ApiEndpoint, ApiUrlEntry, DynamicFormLayoutPolicy, 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, EnterpriseRuntimeContextService, FormSectionHeaderAction, FormSectionHeaderConfig, FormConfigState, JsonLogicExpression, FormHelpPresentationConfig, GlobalActionCatalogEntry, PraxisRuntimeConditionalEffectRule, PraxisRuntimeGlobalActionEffect, SurfaceOpenPayload, GlobalActionField, PraxisEffectPolicy, FieldDefinition, ComponentDocMeta, Breakpoint, DomainRuleRequestOptions, DomainRuleService, DomainRuleMaterialization, TableConfig, IconPickerService, GlobalActionRef, AiCapabilityCategory, AiCapabilityCatalog, AiValueKind, ComponentAuthoringManifest } from '@praxisui/core';
|
|
11
11
|
import * as rxjs from 'rxjs';
|
|
12
12
|
import { Observable, BehaviorSubject } from 'rxjs';
|
|
13
13
|
import { SettingsPanelService, SettingsValueProvider } from '@praxisui/settings-panel';
|
|
14
14
|
import { BaseAiAdapter, AiResponseCompileResult, PatchResult, PraxisAssistantShellLayout, PraxisAssistantTurnViewState, PraxisAssistantShellLabels, PraxisAssistantSessionSnapshot, PraxisAssistantShellQuickReply, PraxisAssistantShellMessage } from '@praxisui/ai';
|
|
15
15
|
import { KeyboardShortcutService } from '@praxisui/dynamic-fields';
|
|
16
16
|
import { RuleBuilderConfig, RuleBuilderState } from '@praxisui/visual-builder';
|
|
17
|
+
import { CascadeManagerTabComponent } from '@praxisui/metadata-editor';
|
|
17
18
|
import * as _praxisui_dynamic_form from '@praxisui/dynamic-form';
|
|
18
19
|
|
|
19
20
|
declare class FormLayoutService {
|
|
@@ -147,7 +148,7 @@ interface Operation {
|
|
|
147
148
|
[key: string]: any;
|
|
148
149
|
}
|
|
149
150
|
interface LayoutResult {
|
|
150
|
-
config:
|
|
151
|
+
config: FormConfigWithSections;
|
|
151
152
|
op: Operation;
|
|
152
153
|
}
|
|
153
154
|
interface LayoutChange {
|
|
@@ -212,9 +213,9 @@ declare class DynamicFormLayoutService {
|
|
|
212
213
|
private readonly changesSubject;
|
|
213
214
|
readonly changes$: rxjs.Observable<LayoutChange>;
|
|
214
215
|
private emit;
|
|
215
|
-
normalizeConfig(config: FormConfig):
|
|
216
|
+
normalizeConfig(config: FormConfig): FormConfigWithSections;
|
|
216
217
|
validateConfig(config: FormConfig): ValidationReport;
|
|
217
|
-
generateFormConfigFromMetadata(fields: FieldMetadata[], options?: GenerateFormConfigFromMetadataOptions):
|
|
218
|
+
generateFormConfigFromMetadata(fields: FieldMetadata[], options?: GenerateFormConfigFromMetadataOptions): FormConfigWithSections;
|
|
218
219
|
getElementPath(config: FormConfig, element: HTMLElement): CanvasPathPart[];
|
|
219
220
|
updateElement(config: FormConfig, path: CanvasPathPart[], updatedData: any, options?: {
|
|
220
221
|
correlationId?: string;
|
|
@@ -712,7 +713,7 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
712
713
|
private effectiveActionsCacheOverride?;
|
|
713
714
|
private invalidRequiredFieldLabelsCache;
|
|
714
715
|
private invalidRequiredFieldLabelsSignature;
|
|
715
|
-
|
|
716
|
+
get richContentHostCapabilities(): RichBlockHostCapabilities;
|
|
716
717
|
resourcePath?: string;
|
|
717
718
|
resourceId?: string | number;
|
|
718
719
|
initialValue?: Record<string, unknown> | null;
|
|
@@ -991,9 +992,9 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
|
|
|
991
992
|
private formInputsKey;
|
|
992
993
|
private crudBackKey;
|
|
993
994
|
private tryInitializeForm;
|
|
994
|
-
|
|
995
|
+
hasExplicitSchemaUrl(): boolean;
|
|
995
996
|
private hasSchemaBackedRuntime;
|
|
996
|
-
|
|
997
|
+
hasRenderableConfig(config?: FormConfig | null | undefined): boolean;
|
|
997
998
|
private initializeStandaloneConfig;
|
|
998
999
|
private initializeDisconnectedEmptyState;
|
|
999
1000
|
private reloadForModeChange;
|
|
@@ -1515,6 +1516,7 @@ declare class PraxisDynamicFormConfigEditor implements SettingsValueProvider, On
|
|
|
1515
1516
|
private settingsPanel;
|
|
1516
1517
|
private cdr;
|
|
1517
1518
|
jsonEditor?: JsonConfigEditorComponent;
|
|
1519
|
+
cascadeManager?: CascadeManagerTabComponent;
|
|
1518
1520
|
editedConfig: FormConfig;
|
|
1519
1521
|
ruleBuilderConfig: RuleBuilderConfig;
|
|
1520
1522
|
ruleBuilderState?: RuleBuilderState;
|
|
@@ -1695,6 +1697,7 @@ declare class PraxisDynamicFormConfigEditor implements SettingsValueProvider, On
|
|
|
1695
1697
|
onLayoutSelect(event: any): void;
|
|
1696
1698
|
private openColumnEditor;
|
|
1697
1699
|
onCascadeApply(patch: Record<string, Partial<FieldDefinition>>): void;
|
|
1700
|
+
private syncCascadeManagerFields;
|
|
1698
1701
|
private stripLegacy;
|
|
1699
1702
|
private computeRulesSignature;
|
|
1700
1703
|
restoreHintsDefaults(): void;
|
|
@@ -1899,6 +1902,7 @@ declare class LayoutEditorComponent implements OnInit {
|
|
|
1899
1902
|
chromeToggles: string[];
|
|
1900
1903
|
get borderEnabled(): boolean;
|
|
1901
1904
|
get dividerEnabled(): boolean;
|
|
1905
|
+
get layoutSections(): FormSection[];
|
|
1902
1906
|
canApplyAll(): boolean;
|
|
1903
1907
|
applyGapToAll(): void;
|
|
1904
1908
|
ngOnInit(): void;
|