@praxisui/dynamic-form 10.0.0-rc.40 → 10.0.0-rc.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@praxisui/dynamic-form",
3
- "version": "10.0.0-rc.40",
3
+ "version": "10.0.0-rc.41",
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": "^10.0.0-rc.40",
13
- "@praxisui/dynamic-fields": "^10.0.0-rc.40",
14
- "@praxisui/metadata-editor": "^10.0.0-rc.40",
15
- "@praxisui/rich-content": "^10.0.0-rc.40",
16
- "@praxisui/settings-panel": "^10.0.0-rc.40",
17
- "@praxisui/visual-builder": "^10.0.0-rc.40",
18
- "@praxisui/core": "^10.0.0-rc.40",
12
+ "@praxisui/ai": "^10.0.0-rc.41",
13
+ "@praxisui/dynamic-fields": "^10.0.0-rc.41",
14
+ "@praxisui/metadata-editor": "^10.0.0-rc.41",
15
+ "@praxisui/rich-content": "^10.0.0-rc.41",
16
+ "@praxisui/settings-panel": "^10.0.0-rc.41",
17
+ "@praxisui/visual-builder": "^10.0.0-rc.41",
18
+ "@praxisui/core": "^10.0.0-rc.41",
19
19
  "rxjs": "^7.8.0"
20
20
  },
21
21
  "dependencies": {
@@ -38,7 +38,7 @@ source_of_truth:
38
38
  - "projects/praxis-core/src/lib/models/form/rule-property.schema.ts"
39
39
  - "projects/praxis-dynamic-form/docs/layout-items-visual-blocks.md"
40
40
  source_of_truth_last_verified: "2026-08-12"
41
- last_updated: "2026-10-22"
41
+ last_updated: "2026-10-27"
42
42
  toc: true
43
43
  sidebar: true
44
44
  tags:
@@ -176,16 +176,22 @@ Essa fronteira preserva a premissa de plataforma: o formulario materializa e exp
176
176
  | `helpPresentation` | `FormHelpPresentationConfig` | No | `{ display: "inline" }` | Active | Politica visual para exibir `hint`/`helpText` dos campos sem alterar semantica dos DTOs; erros de validacao continuam inline. |
177
177
  | `presentation` | `FormPresentationConfig` | No | runtime defaults | Active | Preferencias tipadas de label/value para modos read-only e presentation. Valores numericos de tamanho e largura sao materializados como comprimentos CSS em `px`; o mesmo shape alimenta o snapshot canonico do editor. |
178
178
  | `fieldMetadata[].array` | `FieldArrayConfig` | No | n/a | Active | Contrato de Editable Collection apenas quando `fieldMetadata[].controlType === "array"` ou quando `x-ui.array` foi publicado explicitamente. |
179
+ | `fieldMetadata[].items` | `FieldScalarItemsSchema` | No | n/a | Active | Subconjunto escalar do JSON Schema items: type string/integer/number/boolean, format e enum opcionais. Separado de array.itemSchema.fields de objetos; constraints vêm do schema de operação e não podem ser ampliadas pela config salva. |
179
180
 
180
181
  Nota editorial:
181
182
  - `praxis-dynamic-form` carrega e orquestra `FieldMetadata`, mas a resolução de `valuePresentation` em display/read-only pertence ao runtime de `@praxisui/dynamic-fields`.
182
183
  - `fieldMetadata[].source`, `fieldMetadata[].transient` e `fieldMetadata[].submitPolicy` governam campos locais do host. Campos com `source: "local"` ou `transient: true` participam de validação, regras, visibilidade e `valueChange`, mas são omitidos de `formSubmit.formData` e do payload HTTP por default.
183
184
  - `fieldMetadata[].submitPolicy` tem prioridade sobre `source` e `transient`: `include` força envio, `omit` força omissão e `includeWhenDirty` envia apenas quando o controle estiver dirty.
185
+ - Campos de schema `customFields.<key>` preservam `customField`, `customFieldKey` e `customFieldScope` projetados pelo core. O nome pontuado identifica um controle aninhado; `formData`/payload HTTP continuam `{ "customFields": { "<key>": valor } }`. Hidratação de datas, serialização de datas/lookups e políticas de omissão usam esse caminho, sem adapter do host. Valores ausentes não criam containers; campos vazios dirty ou obrigatórios mantêm a semântica dos campos planos.
186
+ - A normalização temporal usa metadata de campo e `array.itemSchema.fields`: tuples legadas de data e strings datetime locais são convertidas apenas em campos temporais declarados. Arrays numéricos/desconhecidos como `[2026, 10, 27]` não viram datas; strings comuns/desconhecidas conservam espaços e texto semelhante a datetime. `DateInput` segue a serialização de data sem horário.
187
+ - Arrays escalares com `items` usam `normalizeScalarArrayValue` de Core na validação e projeção do payload. Tokens devem corresponder ao tipo declarado (números JSON finitos, inteiros seguros, booleanos exatos e formatos date/date-time suportados), e o enum é aplicado após conversão. Não há conversão parcial nem descarte de itens inválidos; item `null` é inválido, enquanto container opcional `null`/ausente e `[]` permanecem distintos. `array.itemSchema.fields` de objetos é outro contrato. Isso permite materializar operandos `IN` tipados sem inferir semântica de busca a partir de arrays ou labels.
188
+ - O rebuild no mesmo contexto preserva dirty/touched por caminhos aninhados de controles e itens, sem marcar irmãos não tocados. Isso não é autosave universal entre resets, retries ou troca de registro/tenant.
189
+ - Na migração de configuração salva, um container colidente cede aos filhos diretos do schema, mesmo com `source: "local"`; campos locais não colidentes continuam preservados. Restrições herdadas de UI não equivalem a política de omissão no submit.
184
190
  - Dentro de `array.itemSchema.fields`, `includeWhenDirty` considera o item ou subcampo especifico dirty, como `participantes.0` ou `participantes.0.observacao`. O `FormArray` pai dirty, como `participantes`, nao torna todos os subcampos de todos os itens elegiveis para submit.
185
191
  - O evento `formSubmit` mantém `formData` como payload persistível filtrado e expõe `rawFormData` para hosts que precisam ler os campos locais/transientes no contexto de UI.
186
- - O evento `payloadPreviewChange` projeta o payload persistível atual sem executar hooks de submit nem disparar HTTP. `formData` usa o mesmo pipeline síncrono de normalização/políticas do submit, `rawFormData` preserva o estado completo e `changedFields` lista somente paths de controles dirty.
192
+ - O evento `payloadPreviewChange` projeta o payload persistível atual sem executar hooks de submit nem disparar HTTP. `formData` usa o mesmo pipeline síncrono de normalização/políticas do submit, `rawFormData` preserva o estado completo e `changedFields` lista somente paths de controles dirty. Uma projeção scalar inválida emite `formData: null` e `isValid: false`, preservando `rawFormData` para correção; consumidores não devem aplicá-la.
187
193
  - Botões com `type="reset"` preservam a semântica canônica de reset mesmo quando recebem um `id` editorial próprio. O runtime impede o reset nativo do navegador, restaura o snapshot hidratado, marca o formulário como pristine/untouched e publica nova prévia com `reason: "reset"`.
188
- - Configs persistidas são reconciliadas com o schema estrutural antes da montagem. Campos locais explícitos são preservados, mas campos server-backed recebem novamente a semântica publicada pelo backend, incluindo `endpoint`, `resourcePath`, `optionLabelKey` e `optionValueKey`.
194
+ - Configs persistidas passam pela reconciliação com o schema estrutural antes da montagem, inclusive quando a leitura bem-sucedida retorna definições vazias. Falhas de leitura/normalização/reconciliação bloqueiam a inicialização em vez de declarar pronta a configuração salva. Campos locais explícitos não colidentes são preservados, mas campos server-backed recebem novamente a semântica publicada pelo backend, incluindo `endpoint`, `resourcePath`, `optionLabelKey` e `optionValueKey`.
189
195
  - Para selects com `x-ui.endpoint` terminando em `/options/filter`, `endpoint` é a operação concreta de opções e `resourcePath` é o recurso dono. O runtime deve chamar `/options/filter`; não deve converter esse endpoint para `/filter`.
190
196
 
191
197
  ### Supported legacy paths
@@ -958,6 +964,13 @@ O runtime emite `target-not-found` quando uma regra aponta para `section`, `row`
958
964
  3. Cobertura de `messages` e parcial para chaves fora do fluxo principal de submit/confirmacao.
959
965
  4. Ainda falta bateria de stress dedicada para corrida teardown/render alem de `NG0205`.
960
966
  5. `hints` permanece no contrato/editor sem exposicao no template principal.
967
+ 6. A política canônica Metadata rejeita nomes reservados que colidem com controles Angular; suporte own-key no helper de payload não relaxa essa admissão. Definições persistidas antigas exigem migração backend.
968
+ 7. Read-only/disabled não significa omissão automática. O request de comando canônico exclui custom fields read-only; o schema response continua disponível para leitura. Use o request exato da operação, sem mesclar response ou inventar um mapping local de `x-ui.submitPolicy`.
969
+ 8. Record paths de regras calculadas não atravessam arrays intermediários. A recursão por `array.itemSchema.fields` no submit é um caminho distinto; scalar `items` também tem contrato próprio.
970
+ 9. Um novo ciclo revalida HTTP; L1 compilado não estabelece readiness. Cache só fornece corpo após 304 correspondente, nunca como fallback de status 0/401/403. Loading/erro de schema e contexto enterprise conhecido não confirmado bloqueiam submit. Retry não promete autosave entre registros, tenants ou resets.
971
+ 10. Schema vazio bem-sucedido é autoritativo. Reconciliação e sync manual ocultam/desabilitam e omitem órfãos server-backed; Filter também bloqueia sua validação e projeção aplicável, mantendo locais explícitos e campos hidden legítimos. Reaparecimento usa as restrições atuais do servidor. Identidade invisível ao snapshot de headers continua exigindo versão confirmada de contexto ou invalidação de todo o escopo cache/sessão no host.
972
+
973
+ Consulte a [revisão de adoção corporativa](https://github.com/codexrodrigues/praxis-ui-angular/pull/658) para fontes, cenários, gates e pendências.
961
974
 
962
975
  ### Source references
963
976
 
@@ -932,6 +932,17 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
932
932
  isSectionEditorialCard(section?: FormSection | null): boolean;
933
933
  isSectionCompactPresentation(section?: FormSection | null): boolean;
934
934
  shouldShowContextEmptyState(): boolean;
935
+ private isItemScopedActionSubmitTarget;
936
+ getActionTargetRecordSummary(): {
937
+ id?: string;
938
+ title?: string;
939
+ subtitle?: string;
940
+ badges: Array<{
941
+ label: string;
942
+ value: string;
943
+ tone: 'neutral' | 'info' | 'success' | 'warning' | 'danger';
944
+ }>;
945
+ } | null;
935
946
  private hasResourceContext;
936
947
  private hasLocalRecordContext;
937
948
  get effectiveReadonly(): boolean;
@@ -1044,6 +1055,8 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
1044
1055
  private assertSchemaInitializationCurrent;
1045
1056
  private isSchemaTransportInterruption;
1046
1057
  private schemaCache;
1058
+ private schemaValidationFailed;
1059
+ private initialValueContextInvalidated;
1047
1060
  private lastSchemaMeta?;
1048
1061
  private readonly schemaMetaPersistenceQueues;
1049
1062
  private persistenceContextEpoch;
@@ -1199,6 +1212,7 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
1199
1212
  ngOnChanges(changes: SimpleChanges): void;
1200
1213
  private blurAllInputs;
1201
1214
  private initializeForm;
1215
+ private hasInitializationError;
1202
1216
  private handleInitializationError;
1203
1217
  private loadConfigFailOpen;
1204
1218
  private resolveFieldLabel;
@@ -1251,6 +1265,7 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
1251
1265
  private emitPayloadPreview;
1252
1266
  private resetToHydratedSnapshot;
1253
1267
  private collectDirtyFieldNames;
1268
+ private collectTouchedFieldNames;
1254
1269
  private buildCurrentFormRuntimeContext;
1255
1270
  private buildRestoreTargetContext;
1256
1271
  private isCompatibleRuntimeStateContext;
@@ -1319,6 +1334,7 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
1319
1334
  private hasVisibleSectionBody;
1320
1335
  private shouldRenderInsideLastSectionContent;
1321
1336
  private resolveInsideLastSectionHost;
1337
+ get actionTargetSelectedRecordLabel(): string;
1322
1338
  getSectionTitle(section: FormSection): string | undefined;
1323
1339
  getSectionDescription(section: FormSection): string | undefined;
1324
1340
  getSectionAppearance(section: FormSection): 'card' | 'plain' | 'step' | undefined;
@@ -1624,6 +1640,8 @@ declare class PraxisDynamicForm implements OnInit, OnChanges, OnDestroy {
1624
1640
  showDetailedError(): void;
1625
1641
  private tryBuildExplicitSchemaContext;
1626
1642
  private buildSchemaContext;
1643
+ private requiresConfirmedSchemaContext;
1644
+ private schemaRepresentationContext;
1627
1645
  private getSchemaWithCache;
1628
1646
  /**
1629
1647
  * Invalida o cache de schema compilado para a instância atual e força
@@ -2060,7 +2078,8 @@ declare class PraxisFilterForm implements OnChanges, OnDestroy {
2060
2078
  private statusChangesSub?;
2061
2079
  private schemaSub?;
2062
2080
  private hydratedFieldMetadata;
2063
- private lastHydratedResourceKey;
2081
+ private schemaHydrationPending;
2082
+ private schemaHydrationFailed;
2064
2083
  private columnFieldsCache;
2065
2084
  private singleFieldCache;
2066
2085
  private readonly crudService;
@@ -2074,6 +2093,8 @@ declare class PraxisFilterForm implements OnChanges, OnDestroy {
2074
2093
  private buildRestorableValues;
2075
2094
  private hasExplicitDefaultValue;
2076
2095
  onFormSubmit(): void;
2096
+ private isFilterReady;
2097
+ private projectFilterValues;
2077
2098
  getColumnFields(column: FormColumn): FieldMetadata[];
2078
2099
  getSingleField(field: FieldMetadata): FieldMetadata[];
2079
2100
  getColumnClasses(column: FormColumn): string | null;
@@ -2695,12 +2716,10 @@ declare function ruleBuilderStateToFormLayoutRules(state: RuleBuilderState | nul
2695
2716
  */
2696
2717
  declare function formLayoutRulesToBuilderState(rules: FormLayoutRule[] | null | undefined): RuleBuilderState;
2697
2718
 
2698
- /**
2699
- * Recursively converts arrays representing dates into ISO-8601 strings.
2700
- * Arrays are expected in the form `[year, month, day, hour?, minute?, second?, millisecond?]`.
2701
- * Non-date arrays and other values are returned untouched.
2702
- */
2703
- declare function normalizeDateArrays(data: any): any;
2719
+ /** Converts legacy date tuples only where the existing field metadata declares a temporal value. */
2720
+ declare function normalizeDateArrays(data: any, fields: readonly FieldMetadata[]): any;
2721
+ /** One private draft shared by hydration and submit; only declared temporal fields are transformed. */
2722
+ declare function normalizeTemporalFieldValues(data: any, fields: readonly FieldMetadata[], normalizeString: (value: string) => string): any;
2704
2723
 
2705
2724
  /**
2706
2725
  * Helper provider to wire the PraxisDynamicForm component into the Settings Panel
@@ -3310,5 +3329,5 @@ declare function materializeDynamicFormPageRuntimeInputs(value: unknown, pageId:
3310
3329
  };
3311
3330
  declare const DYNAMIC_FORM_GOVERNED_PAGE_PREVIEW_ADAPTER: GovernedPagePreviewWidgetAdapter;
3312
3331
 
3313
- export { ActionsEditorComponent, CORPORATE_PRESENTATION_FORMAT_GALLERY, CanvasStateService, CanvasToolbarComponent, ColumnEditorComponent, DYNAMIC_FORM_GOVERNED_PAGE_PREVIEW_ADAPTER, DomainRuleFormRulesService, DynamicFormLayoutService, DynamicFormSchemaCacheService, ERGADM00034_COMPACT_PRESENTATION_EXAMPLE, Ergadm00034CompactPresentationExampleComponent, 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_AUTHORING_MANIFEST, PRAXIS_FILTER_FORM_AUTHORING_PROJECTION, PRAXIS_FILTER_FORM_COMPONENT_METADATA, PraxisDynamicForm, PraxisDynamicFormConfigEditor, PraxisDynamicFormWidgetConfigEditor, PraxisFilterForm, PraxisFilterFormWidgetConfigEditor, PraxisFormActionsComponent, RowConfiguratorComponent, RowEditorComponent, SETTINGS_PANEL_DYNAMIC_FORM_PROVIDER, SectionEditorComponent, TASK_PRESETS, applyVisibilityRules, buildCorporatePresentationFormatGalleryConfig, buildDynamicFormApplyPlan, buildDynamicFormRuleAuthoringContext, buildErgadm00034CompactPresentationConfig, createDynamicFormAuthoringDocument, decodeDynamicFormPageInputs, encodeDynamicFormPageInputs, formLayoutRulesToBuilderState, getFormAiCatalog, getFormCapabilities, getFormEnum, isRuleSatisfied, materializeDynamicFormPageRuntimeInputs, normalizeDateArrays, normalizeDynamicFormAuthoringDocument, parseLegacyOrDynamicFormDocument, projectDynamicFormPageEditorChanges, providePraxisDynamicFormMetadata, providePraxisFilterFormMetadata, provideSettingsPanelDynamicForm, ruleBuilderStateToFormLayoutRules, serializeDynamicFormAuthoringDocument, stripLegacyFieldMetadata, toCanonicalDynamicFormConfig, validateDynamicFormAuthoringDocument, validateDynamicFormAuthoringInput, validateDynamicFormPageWidget };
3332
+ export { ActionsEditorComponent, CORPORATE_PRESENTATION_FORMAT_GALLERY, CanvasStateService, CanvasToolbarComponent, ColumnEditorComponent, DYNAMIC_FORM_GOVERNED_PAGE_PREVIEW_ADAPTER, DomainRuleFormRulesService, DynamicFormLayoutService, DynamicFormSchemaCacheService, ERGADM00034_COMPACT_PRESENTATION_EXAMPLE, Ergadm00034CompactPresentationExampleComponent, 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_AUTHORING_MANIFEST, PRAXIS_FILTER_FORM_AUTHORING_PROJECTION, PRAXIS_FILTER_FORM_COMPONENT_METADATA, PraxisDynamicForm, PraxisDynamicFormConfigEditor, PraxisDynamicFormWidgetConfigEditor, PraxisFilterForm, PraxisFilterFormWidgetConfigEditor, PraxisFormActionsComponent, RowConfiguratorComponent, RowEditorComponent, SETTINGS_PANEL_DYNAMIC_FORM_PROVIDER, SectionEditorComponent, TASK_PRESETS, applyVisibilityRules, buildCorporatePresentationFormatGalleryConfig, buildDynamicFormApplyPlan, buildDynamicFormRuleAuthoringContext, buildErgadm00034CompactPresentationConfig, createDynamicFormAuthoringDocument, decodeDynamicFormPageInputs, encodeDynamicFormPageInputs, formLayoutRulesToBuilderState, getFormAiCatalog, getFormCapabilities, getFormEnum, isRuleSatisfied, materializeDynamicFormPageRuntimeInputs, normalizeDateArrays, normalizeDynamicFormAuthoringDocument, normalizeTemporalFieldValues, parseLegacyOrDynamicFormDocument, projectDynamicFormPageEditorChanges, providePraxisDynamicFormMetadata, providePraxisFilterFormMetadata, provideSettingsPanelDynamicForm, ruleBuilderStateToFormLayoutRules, serializeDynamicFormAuthoringDocument, stripLegacyFieldMetadata, toCanonicalDynamicFormConfig, validateDynamicFormAuthoringDocument, validateDynamicFormAuthoringInput, validateDynamicFormPageWidget };
3314
3333
  export type { CanvasElement, CanvasElementType, CanvasPathPart, Capability$1 as Capability, CapabilityCatalog$1 as CapabilityCatalog, CapabilityCategory$1 as CapabilityCategory, CorporatePresentationExample, DomainRuleFormRulesRequestOptions, DomainRuleMaterializedFormLayoutRule, DynamicFieldRenderErrorEvent, DynamicFormAllowedRuleProperties, DynamicFormApplyPlan, DynamicFormAuthoringDocument, DynamicFormBindings, DynamicFormConfigPatchChangeEvent, DynamicFormContextSnapshot, DynamicFormGeneratedLayoutPreset, DynamicFormPresentationSnapshot, DynamicFormProjectionContext, DynamicFormResolvedRuntimeContract, DynamicFormRuleAuthoringContext, DynamicFormRuleAuthoringField, DynamicFormRuleAuthoringTarget, DynamicFormRuleAuthoringTargetDetails, DynamicFormRuleAuthoringTargets, DynamicFormRuleAuthoringVisualBlockNode, DynamicFormRuleTargetType, DynamicFormRuntimeContext, DynamicFormRuntimeValueSource, DynamicFormSchemaPrefsSnapshot, DynamicFormValidationContext, EditorDiagnostic, EditorDocument, Ergadm00034CompactPresentationExample, Ergadm00034LegacyFrequencyRow, FieldPath, FieldPathContainer, FieldPathWithIndex, Capability as FormComponentCapability, CapabilityCatalog as FormComponentCapabilityCatalog, CapabilityCategory as FormComponentCapabilityCategory, ValueKind as FormComponentValueKind, FormConfigLike, GenerateFormConfigFromMetadataOptions, IdPath, InsertLocalFieldOptions, InsertLocalFieldResult, JsonEditorEvent, JsonValidationResult, LayoutChange, LayoutResult, LocalFieldInsertionDiagnostic, LocalFieldInsertionDiagnosticCode, Operation, Path, PathWithIndex, PraxisDynamicFormDomainRulesOptions, PraxisDynamicFormEmptyState, PraxisDynamicFormWidgetEditorInputs, PraxisDynamicFormWidgetEditorValue, PraxisFilterFormWidgetEditorInputs, PraxisFilterFormWidgetEditorValue, PraxisFormActionEvent, RemovePolicy, RuleApplicationContext, RuleApplicationDiagnostic, RuleApplicationDiagnosticCode, RuleApplicationResult, RuleApplicationTargetIndex, RuleApplicationTargetType, ValidationReport, ValueKind$1 as ValueKind };