@praxisui/dynamic-form 8.0.0-beta.2 → 8.0.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +166 -18
- package/docs/dynamic-form-authoring-document-semantics.md +80 -0
- package/docs/dynamic-form-llm-rule-authoring-guide.md +318 -0
- package/docs/dynamic-form-rules-authoring-plan.md +379 -0
- package/docs/hot-metadata-updates.md +141 -0
- package/docs/layout-items-visual-blocks.md +406 -0
- package/fesm2022/praxisui-dynamic-form-dynamic-form-agentic-authoring-turn-flow-DuH1ad7h.mjs +417 -0
- package/fesm2022/praxisui-dynamic-form.mjs +9147 -2078
- package/index.d.ts +640 -22
- package/package.json +12 -6
- package/src/lib/components/praxis-form-actions/praxis-form-actions.json-api.md +441 -0
- package/src/lib/config-editor/praxis-dynamic-form-config-editor.json-api.md +481 -0
- package/src/lib/filter-form/praxis-filter-form.json-api.md +507 -0
- package/src/lib/json-config-editor/form-json-config-editor.json-api.md +491 -0
- package/src/lib/layout-editor/praxis-layout-editor.json-api.md +432 -0
- package/src/lib/praxis-dynamic-form.json-api.md +1011 -0
package/package.json
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/dynamic-form",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.21",
|
|
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": "^20.0.0",
|
|
7
7
|
"@angular/core": "^20.0.0",
|
|
8
8
|
"@angular/cdk": "^20.0.0",
|
|
9
|
-
"@
|
|
10
|
-
"@
|
|
11
|
-
"@
|
|
12
|
-
"@praxisui/
|
|
13
|
-
"@praxisui/
|
|
9
|
+
"@angular/forms": "^20.0.0",
|
|
10
|
+
"@angular/material": "^20.0.0",
|
|
11
|
+
"@angular/router": "^20.0.0",
|
|
12
|
+
"@praxisui/ai": "^8.0.0-beta.21",
|
|
13
|
+
"@praxisui/dynamic-fields": "^8.0.0-beta.21",
|
|
14
|
+
"@praxisui/metadata-editor": "^8.0.0-beta.21",
|
|
15
|
+
"@praxisui/rich-content": "^8.0.0-beta.21",
|
|
16
|
+
"@praxisui/settings-panel": "^8.0.0-beta.21",
|
|
17
|
+
"@praxisui/visual-builder": "^8.0.0-beta.21",
|
|
18
|
+
"@praxisui/core": "^8.0.0-beta.21",
|
|
19
|
+
"rxjs": "^7.8.0"
|
|
14
20
|
},
|
|
15
21
|
"dependencies": {
|
|
16
22
|
"tslib": "^2.3.0",
|
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "praxis-form-actions JSON API (Canonical)"
|
|
3
|
+
slug: "praxis-form-actions-json-api"
|
|
4
|
+
doc_type: "api-reference"
|
|
5
|
+
component: "praxis-form-actions"
|
|
6
|
+
document_kind: "json-api-canonical"
|
|
7
|
+
reference_mode: "canonical"
|
|
8
|
+
contract_format: "json"
|
|
9
|
+
contract_source: "runtime-and-code"
|
|
10
|
+
description: "Referencia canonica do contrato JSON do componente praxis-form-actions."
|
|
11
|
+
category: "components"
|
|
12
|
+
sub_category: "dynamic-form"
|
|
13
|
+
audience:
|
|
14
|
+
- "frontend"
|
|
15
|
+
- "architect"
|
|
16
|
+
- "platform-team"
|
|
17
|
+
level: "advanced"
|
|
18
|
+
status: "active"
|
|
19
|
+
owner: "praxis-ui"
|
|
20
|
+
source_of_truth:
|
|
21
|
+
- "projects/praxis-dynamic-form/src/lib/components/praxis-form-actions/praxis-form-actions.component.ts"
|
|
22
|
+
- "projects/praxis-dynamic-form/src/lib/components/praxis-form-actions/praxis-form-actions.component.html"
|
|
23
|
+
- "projects/praxis-core/src/lib/models/form/form-layout.model.ts"
|
|
24
|
+
source_of_truth_last_verified: "2026-03-05"
|
|
25
|
+
last_updated: "2026-03-05"
|
|
26
|
+
toc: true
|
|
27
|
+
sidebar: true
|
|
28
|
+
tags:
|
|
29
|
+
- "json-api"
|
|
30
|
+
- "canonical-contract"
|
|
31
|
+
- "praxis-form-actions"
|
|
32
|
+
api_stability: "canonical"
|
|
33
|
+
schema_verified: true
|
|
34
|
+
runtime_verified: false
|
|
35
|
+
editor_coverage_verified: false
|
|
36
|
+
runtime_scope: "public"
|
|
37
|
+
legacy_paths_present: true
|
|
38
|
+
has_known_mismatches: true
|
|
39
|
+
related_components:
|
|
40
|
+
- "praxis-table"
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
# praxis-form-actions
|
|
44
|
+
|
|
45
|
+
Este documento e a referencia canonica da API JSON de praxis-form-actions.
|
|
46
|
+
|
|
47
|
+
## Summary
|
|
48
|
+
|
|
49
|
+
- Tipo documental: API reference canonica de contrato JSON.
|
|
50
|
+
- Source of truth: runtime e codigo declarados no frontmatter.
|
|
51
|
+
- Objetivo operacional: consulta rapida, auditavel e deterministica sob pressao.
|
|
52
|
+
- Resumo funcional herdado: `praxis-form-actions` renderiza e orquestra a barra de botoes de acao do formulario. Ele e JSON-first: recebe `actions` (derivado de `FormConfig.actions`) e emite um evento unico de acao para o host decidir o fluxo.
|
|
53
|
+
|
|
54
|
+
## Scope and positioning
|
|
55
|
+
|
|
56
|
+
- Escopo: contrato JSON publico e limites de comportamento observavel.
|
|
57
|
+
- Fora de escopo: tutorial de adocao e walkthrough operacional detalhado.
|
|
58
|
+
- Posicionamento: referencia canonicamente governada para consumidores, arquitetos e mantenedores.
|
|
59
|
+
|
|
60
|
+
## Source of truth
|
|
61
|
+
|
|
62
|
+
| Source | Kind | Notes |
|
|
63
|
+
| --- | --- | --- |
|
|
64
|
+
| projects/praxis-dynamic-form/src/lib/components/praxis-form-actions/praxis-form-actions.component.ts | runtime-code | Source de implementacao declarado no repositorio. |
|
|
65
|
+
| projects/praxis-dynamic-form/src/lib/components/praxis-form-actions/praxis-form-actions.component.html | template-style | Source de implementacao declarado no repositorio. |
|
|
66
|
+
| projects/praxis-core/src/lib/models/form/form-layout.model.ts | runtime-code | Source de implementacao declarado no repositorio. |
|
|
67
|
+
|
|
68
|
+
## Support legend
|
|
69
|
+
|
|
70
|
+
- Active: suportado e observado no runtime atual.
|
|
71
|
+
- Partial: suporte parcial, com restricoes conhecidas.
|
|
72
|
+
- Declared-only: declarado em tipos/schema sem ligacao runtime confirmada.
|
|
73
|
+
- Schema-only: presente em schema/modelo sem confirmacao de execucao.
|
|
74
|
+
- Deprecated: mantido por compatibilidade legada com migracao prevista.
|
|
75
|
+
|
|
76
|
+
## Contract classification
|
|
77
|
+
|
|
78
|
+
### Canonical paths (public contract)
|
|
79
|
+
|
|
80
|
+
| Path | Type | Required | Default | Status | Notes |
|
|
81
|
+
| --- | --- | --- | --- | --- | --- |
|
|
82
|
+
| `actions.submit/cancel/reset` | not-specified | not-specified | n/a | Active | Base para botoes padrao. |
|
|
83
|
+
| `actions.custom[]` | not-specified | not-specified | n/a | Active | Adiciona botoes extras no fluxo. |
|
|
84
|
+
| `actions.position/orientation/spacing/sticky/divider` | not-specified | not-specified | n/a | Active | Aplica classes de layout da barra. |
|
|
85
|
+
| `actions.mobile.collapseToMenu` | not-specified | not-specified | n/a | Active | Ativa modo mobile com menu de overflow. |
|
|
86
|
+
| `actions.containerClassName/containerStyles` | not-specified | not-specified | n/a | Active | Classe/estilo no container principal. |
|
|
87
|
+
| `actions.showSaveButton/showCancelButton/showResetButton` | not-specified | not-specified | n/a | Active | Compatibilidade legada para visibilidade. |
|
|
88
|
+
| `actions.submitButtonLabel/cancelButtonLabel/resetButtonLabel` | not-specified | not-specified | n/a | Active | Compatibilidade legada para labels. |
|
|
89
|
+
| `actions.placement` | not-specified | not-specified | n/a | Declared-only | Declarado no modelo; nao aplicado neste componente isolado. |
|
|
90
|
+
|
|
91
|
+
### Supported legacy paths
|
|
92
|
+
|
|
93
|
+
| Legacy path | Canonical replacement | Support window | Runtime behavior | Notes |
|
|
94
|
+
| --- | --- | --- | --- | --- |
|
|
95
|
+
| extracted-from-detailed-api | see canonical paths | not-yet-verified | accepted for backward compatibility | Alias/legado identificado no conteúdo preservado. |
|
|
96
|
+
|
|
97
|
+
### Internal-only paths
|
|
98
|
+
|
|
99
|
+
| Path | Internal consumer | Runtime presence | Public support | Notes |
|
|
100
|
+
| --- | --- | --- | --- | --- |
|
|
101
|
+
| not-yet-mapped | not-yet-verified | not-yet-verified | No | Caminhos internos nao mapeados explicitamente nesta revisao automatizada. |
|
|
102
|
+
|
|
103
|
+
### Experimental paths
|
|
104
|
+
|
|
105
|
+
| Path | Enablement (flag/guard) | Stability | Rollout notes | Notes |
|
|
106
|
+
| --- | --- | --- | --- | --- |
|
|
107
|
+
| not-yet-mapped | not-yet-verified | Experimental | not-yet-verified | Registrar somente quando houver evidencia em runtime/codigo. |
|
|
108
|
+
|
|
109
|
+
## Overview
|
|
110
|
+
|
|
111
|
+
Este arquivo foi adaptado para o padrao canonico atual sem remover conteudo tecnico existente. O conteudo detalhado anterior foi preservado para manter rastreabilidade historica e reduzir perda de contexto.
|
|
112
|
+
|
|
113
|
+
## Public contract surface
|
|
114
|
+
|
|
115
|
+
### Top-level configuration blocks
|
|
116
|
+
|
|
117
|
+
| Block | Purpose | Required | Merge strategy | Notes |
|
|
118
|
+
| --- | --- | --- | --- | --- |
|
|
119
|
+
| actions | Configuração top-level identificada na referência preservada. | not-yet-verified | component-defined | 8 path(s) mapeado(s), status predominante Active. |
|
|
120
|
+
|
|
121
|
+
### Nested configuration blocks
|
|
122
|
+
|
|
123
|
+
| Path | Type | Required | Default | Constraints | Notes |
|
|
124
|
+
| --- | --- | --- | --- | --- | --- |
|
|
125
|
+
| `actions.submit/cancel/reset` | not-specified | not-specified | n/a | component-defined | Base para botoes padrao. |
|
|
126
|
+
| `actions.custom[]` | not-specified | not-specified | n/a | component-defined | Adiciona botoes extras no fluxo. |
|
|
127
|
+
| `actions.position/orientation/spacing/sticky/divider` | not-specified | not-specified | n/a | component-defined | Aplica classes de layout da barra. |
|
|
128
|
+
| `actions.mobile.collapseToMenu` | not-specified | not-specified | n/a | component-defined | Ativa modo mobile com menu de overflow. |
|
|
129
|
+
| `actions.containerClassName/containerStyles` | not-specified | not-specified | n/a | component-defined | Classe/estilo no container principal. |
|
|
130
|
+
| `actions.showSaveButton/showCancelButton/showResetButton` | not-specified | not-specified | n/a | component-defined | Compatibilidade legada para visibilidade. |
|
|
131
|
+
| `actions.submitButtonLabel/cancelButtonLabel/resetButtonLabel` | not-specified | not-specified | n/a | component-defined | Compatibilidade legada para labels. |
|
|
132
|
+
| `actions.placement` | not-specified | not-specified | n/a | component-defined | Declarado no modelo; nao aplicado neste componente isolado. |
|
|
133
|
+
|
|
134
|
+
### Input bindings
|
|
135
|
+
|
|
136
|
+
| Binding/Path | Type | Required | Source | Runtime normalization | Notes |
|
|
137
|
+
| --- | --- | --- | --- | --- | --- |
|
|
138
|
+
| `actions` | `FormConfig['actions']` | not-specified | component-input | not-yet-verified | Contrato principal da barra de acoes. |
|
|
139
|
+
| `isSubmitting` | `boolean` | not-specified | component-input | not-yet-verified | Bloqueia cliques e desabilita botoes durante envio. |
|
|
140
|
+
| `formIsValid` | `boolean` | not-specified | component-input | not-yet-verified | Bloqueia botao `submit` quando invalido. |
|
|
141
|
+
| `submitError` | `string \| null \| undefined` | not-specified | component-input | not-yet-verified | Exibe alerta acima da barra. |
|
|
142
|
+
| `formId` | `string \| undefined` | not-specified | component-input | not-yet-verified | Namespace para atalhos de teclado. |
|
|
143
|
+
| `actionOverrides` | `Record<string, Record<string, any>>` | not-specified | component-input | not-yet-verified | Patch de propriedades por actionId. |
|
|
144
|
+
|
|
145
|
+
### Output events
|
|
146
|
+
|
|
147
|
+
| Event | Payload | Trigger | Stability | Notes |
|
|
148
|
+
| --- | --- | --- | --- | --- |
|
|
149
|
+
| `action` | `PraxisFormActionEvent` | Clique/atalho em acao habilitada. | Partial | Preservado da documentação anterior. |
|
|
150
|
+
|
|
151
|
+
### External side channels
|
|
152
|
+
|
|
153
|
+
| Channel | Direction | Contract | Failure mode | Notes |
|
|
154
|
+
| --- | --- | --- | --- | --- |
|
|
155
|
+
| host/services/storage | bidirectional | see-detailed-api | not-yet-verified | Side channels dependem do componente e do host consumidor. |
|
|
156
|
+
|
|
157
|
+
### Host/runtime dependencies
|
|
158
|
+
|
|
159
|
+
| Dependency | Required | Environment | Purpose | Notes |
|
|
160
|
+
| --- | --- | --- | --- | --- |
|
|
161
|
+
| see-source-of-truth | true | browser/dev/prod/ssr | runtime linkage | Confirmar por componente quando necessario. |
|
|
162
|
+
|
|
163
|
+
## Coverage matrix
|
|
164
|
+
|
|
165
|
+
| Surface | Verified | Coverage status | Evidence | Notes |
|
|
166
|
+
| --- | --- | --- | --- | --- |
|
|
167
|
+
| Runtime | false | Partial | source_of_truth + conteudo preservado | Revisao estrutural concluida; validacao comportamental fina pode exigir follow-up. |
|
|
168
|
+
| Schema/Types | true | Partial | interfaces/modelos citados | Mapeamento formal de todos os campos ainda pode requerer refinamento. |
|
|
169
|
+
| Editor/Tooling | false | Partial | secoes de editor quando presentes | Cobertura de editor/tooling nem sempre confirmada por evidencia direta. |
|
|
170
|
+
|
|
171
|
+
## Runtime coverage boundaries
|
|
172
|
+
|
|
173
|
+
- Cobertura consolidada com base em documentacao existente e source of truth declarado.
|
|
174
|
+
- Comportamentos fora de evidencia direta foram marcados como not-yet-verified ou Partial.
|
|
175
|
+
- Compatibilidade legada, quando detectada, foi separada em classificacao explicita.
|
|
176
|
+
|
|
177
|
+
## Resolution model
|
|
178
|
+
|
|
179
|
+
### Merge order
|
|
180
|
+
|
|
181
|
+
1. defaults do componente
|
|
182
|
+
2. contrato JSON recebido
|
|
183
|
+
3. overrides de host/runtime
|
|
184
|
+
4. normalizacoes internas
|
|
185
|
+
|
|
186
|
+
### Fallback order
|
|
187
|
+
|
|
188
|
+
contrato explicito -> aliases legados (quando suportados) -> defaults internos -> comportamento seguro
|
|
189
|
+
|
|
190
|
+
### Override points
|
|
191
|
+
|
|
192
|
+
- inputs publicos do componente
|
|
193
|
+
- configuracao JSON de runtime
|
|
194
|
+
- integracoes de host (servicos/tokens/adapters)
|
|
195
|
+
|
|
196
|
+
### Runtime normalization
|
|
197
|
+
|
|
198
|
+
Campos e aliases preservados do documento anterior devem convergir progressivamente para paths canonicos declarados.
|
|
199
|
+
|
|
200
|
+
### Precedence rules
|
|
201
|
+
|
|
202
|
+
Quando houver conflito entre alias e path canonico, priorizar path canonico e manter alias apenas para backward compatibility.
|
|
203
|
+
|
|
204
|
+
## Validation and error semantics
|
|
205
|
+
|
|
206
|
+
### Validation model
|
|
207
|
+
|
|
208
|
+
| Path/Rule | Validation phase | Behavior on fail | Error code / warning | Notes |
|
|
209
|
+
| --- | --- | --- | --- | --- |
|
|
210
|
+
| see-detailed-api | runtime | warn-or-reject | not-yet-standardized | Semantica de validacao preservada do documento anterior. |
|
|
211
|
+
|
|
212
|
+
### Error semantics
|
|
213
|
+
|
|
214
|
+
Erros devem ser classificados em warnings recuperaveis versus falhas bloqueantes. Quando a evidencia nao estiver explicita, tratar como not yet verified.
|
|
215
|
+
|
|
216
|
+
### Fail-open / fail-closed behavior
|
|
217
|
+
|
|
218
|
+
| Condition | Mode | Runtime behavior | Consumer impact |
|
|
219
|
+
| --- | --- | --- | --- |
|
|
220
|
+
| invalid-or-unknown-field | component-defined | not-yet-verified | Variavel por componente; requer verificacao em runtime. |
|
|
221
|
+
|
|
222
|
+
### Invalid or unknown field handling
|
|
223
|
+
|
|
224
|
+
- Campos desconhecidos: comportamento depende da estrategia do componente (ignore, warn ou reject).
|
|
225
|
+
- Campos invalidos: podem gerar fallback, warning ou falha conforme implementacao.
|
|
226
|
+
- Registrar divergencias observadas em Known limitations and mismatches.
|
|
227
|
+
|
|
228
|
+
### Runtime warnings vs hard failures
|
|
229
|
+
|
|
230
|
+
| Condition | Severity | Observability | Consumer action |
|
|
231
|
+
| --- | --- | --- | --- |
|
|
232
|
+
| partial-or-declared-only-coverage | warning | logs/eventos do componente | confirmar ligacao runtime antes de uso critico |
|
|
233
|
+
|
|
234
|
+
## Detailed API
|
|
235
|
+
|
|
236
|
+
### Preserved technical reference (normalized from previous revision)
|
|
237
|
+
|
|
238
|
+
### 1. Visao Geral e Quando Usar
|
|
239
|
+
`praxis-form-actions` renderiza e orquestra a barra de botoes de acao do formulario.
|
|
240
|
+
Ele e JSON-first: recebe `actions` (derivado de `FormConfig.actions`) e emite um evento unico de acao para o host decidir o fluxo.
|
|
241
|
+
|
|
242
|
+
Use quando precisar de:
|
|
243
|
+
- botoes padrao (`submit`, `cancel`, `reset`) + custom;
|
|
244
|
+
- layout responsivo da barra de acoes;
|
|
245
|
+
- atalhos de teclado por acao;
|
|
246
|
+
- overrides de runtime por regra (ex.: desabilitar, ocultar, trocar label).
|
|
247
|
+
|
|
248
|
+
### 2. API do Componente
|
|
249
|
+
|
|
250
|
+
#### 2.1 Inputs
|
|
251
|
+
| Input | Tipo | Padrao | Status | Comportamento |
|
|
252
|
+
| --- | --- | --- | --- | --- |
|
|
253
|
+
| `actions` | `FormConfig['actions']` | `undefined` | Active | Contrato principal da barra de acoes. |
|
|
254
|
+
| `isSubmitting` | `boolean` | `false` | Active | Bloqueia cliques e desabilita botoes durante envio. |
|
|
255
|
+
| `formIsValid` | `boolean` | `true` | Active | Bloqueia botao `submit` quando invalido. |
|
|
256
|
+
| `submitError` | `string \| null \| undefined` | `undefined` | Active | Exibe alerta acima da barra. |
|
|
257
|
+
| `formId` | `string \| undefined` | `undefined` | Active | Namespace para atalhos de teclado. |
|
|
258
|
+
| `actionOverrides` | `Record<string, Record<string, any>>` | `undefined` | Active | Patch de propriedades por actionId. |
|
|
259
|
+
|
|
260
|
+
#### 2.2 Output
|
|
261
|
+
| Output | Payload | Quando emite |
|
|
262
|
+
| --- | --- | --- |
|
|
263
|
+
| `action` | `PraxisFormActionEvent` | Clique/atalho em acao habilitada. |
|
|
264
|
+
|
|
265
|
+
```ts
|
|
266
|
+
interface PraxisFormActionEvent {
|
|
267
|
+
actionId: string;
|
|
268
|
+
button: FormActionButton;
|
|
269
|
+
originalEvent: Event;
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
### 3. Cobertura JSON de `actions`
|
|
274
|
+
| Caminho | Status | Runtime notes |
|
|
275
|
+
| --- | --- | --- |
|
|
276
|
+
| `actions.submit/cancel/reset` | Active | Base para botoes padrao. |
|
|
277
|
+
| `actions.custom[]` | Active | Adiciona botoes extras no fluxo. |
|
|
278
|
+
| `actions.position/orientation/spacing/sticky/divider` | Active | Aplica classes de layout da barra. |
|
|
279
|
+
| `actions.mobile.collapseToMenu` | Active | Ativa modo mobile com menu de overflow. |
|
|
280
|
+
| `actions.containerClassName/containerStyles` | Active | Classe/estilo no container principal. |
|
|
281
|
+
| `actions.showSaveButton/showCancelButton/showResetButton` | Active | Compatibilidade legada para visibilidade. |
|
|
282
|
+
| `actions.submitButtonLabel/cancelButtonLabel/resetButtonLabel` | Active | Compatibilidade legada para labels. |
|
|
283
|
+
| `actions.placement` | Declared-only | Declarado no modelo; nao aplicado neste componente isolado. |
|
|
284
|
+
|
|
285
|
+
### 4. Regras Operacionais Importantes
|
|
286
|
+
- Fallback sem `actions`:
|
|
287
|
+
- renderiza apenas botao `submit` (ENVIAR).
|
|
288
|
+
- Atalhos padrao quando nao definidos:
|
|
289
|
+
- submit: `ctrl+s`
|
|
290
|
+
- cancel: `esc`
|
|
291
|
+
- reset: `ctrl+shift+r`
|
|
292
|
+
- Guardas:
|
|
293
|
+
- clique ignorado quando `isSubmitting=true`;
|
|
294
|
+
- `submit` sempre bloqueado quando `formIsValid=false`.
|
|
295
|
+
|
|
296
|
+
### 5. Exemplo Minimo
|
|
297
|
+
```html
|
|
298
|
+
<praxis-form-actions
|
|
299
|
+
[actions]="formConfig.actions"
|
|
300
|
+
[formIsValid]="form.valid"
|
|
301
|
+
[isSubmitting]="isSubmitting"
|
|
302
|
+
(action)="onFormAction($event)"
|
|
303
|
+
></praxis-form-actions>
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### 6. Exemplo Corporativo (override por regra)
|
|
307
|
+
```ts
|
|
308
|
+
actionOverrides = {
|
|
309
|
+
submit: { disabled: !policy.canSave, label: 'Salvar Alteracoes' },
|
|
310
|
+
cancel: { tooltip: 'Voltar sem salvar' },
|
|
311
|
+
approve: { visible: policy.canApprove, color: 'primary' }
|
|
312
|
+
};
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
```html
|
|
316
|
+
<praxis-form-actions
|
|
317
|
+
[actions]="formConfig.actions"
|
|
318
|
+
[actionOverrides]="actionOverrides"
|
|
319
|
+
[formId]="formId"
|
|
320
|
+
[formIsValid]="form.valid"
|
|
321
|
+
[isSubmitting]="isSubmitting"
|
|
322
|
+
[submitError]="submitError"
|
|
323
|
+
(action)="dispatchFormAction($event)"
|
|
324
|
+
></praxis-form-actions>
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
### 7. Problemas Comuns e Armadilhas
|
|
328
|
+
1. Esperar submit automatico sem escutar `action`.
|
|
329
|
+
Correcao: o host deve tratar `actionId='submit'` e executar pipeline.
|
|
330
|
+
|
|
331
|
+
2. Usar `placement` achando que muda o posicionamento aqui.
|
|
332
|
+
Correcao: `placement` e decidido no runtime host do formulario, nao nesta barra isolada.
|
|
333
|
+
|
|
334
|
+
3. Nao limpar atalhos em destroy no fork/customizacao.
|
|
335
|
+
Correcao: preserve ciclo de dispose (`ngOnDestroy`) ao extender comportamento.
|
|
336
|
+
|
|
337
|
+
4. Definir acao custom sem `id`/`action`.
|
|
338
|
+
Correcao: garanta identificador para rotear evento.
|
|
339
|
+
|
|
340
|
+
5. Ignorar `formIsValid` e forcar submit por fora.
|
|
341
|
+
Correcao: alinhe regra visual e regra de negocio no host.
|
|
342
|
+
|
|
343
|
+
6. Misturar override e config original sem precedencia clara.
|
|
344
|
+
Correcao: trate `actionOverrides` como ultima camada (patch final).
|
|
345
|
+
|
|
346
|
+
### 8. Referencias Cruzadas
|
|
347
|
+
- Runtime host de formulario: `projects/praxis-dynamic-form/src/lib/praxis-dynamic-form.ts`
|
|
348
|
+
- Modelo de acoes: `projects/praxis-core/src/lib/models/form/form-layout.model.ts`
|
|
349
|
+
- Editor de acoes: `projects/praxis-dynamic-form/src/lib/actions-editor/actions-editor.component.ts`
|
|
350
|
+
|
|
351
|
+
### 9. Premissas
|
|
352
|
+
- O componente nao executa side-effects de negocio; ele apenas emite evento de intencao.
|
|
353
|
+
- Controle de permissao/autorizacao deve ocorrer no host/backend.
|
|
354
|
+
- Mensagens de erro/sucesso devem ser coordenadas com `messages` do runtime de formulario.
|
|
355
|
+
|
|
356
|
+
### 10. Relatorio de Validacao Estrutural
|
|
357
|
+
- Visao geral: PASS
|
|
358
|
+
- Inputs/outputs: PASS
|
|
359
|
+
- Cobertura de `actions` por status: PASS
|
|
360
|
+
- Regras operacionais: PASS
|
|
361
|
+
- Exemplo minimo: PASS
|
|
362
|
+
- Exemplo corporativo: PASS
|
|
363
|
+
- Problemas comuns (>=5): PASS
|
|
364
|
+
- Referencias cruzadas: PASS
|
|
365
|
+
- Premissas explicitas: PASS
|
|
366
|
+
|
|
367
|
+
## JSON path index
|
|
368
|
+
|
|
369
|
+
| Path | Type | Required | Default | Status | Notes |
|
|
370
|
+
| --- | --- | --- | --- | --- | --- |
|
|
371
|
+
| `actions.submit/cancel/reset` | not-specified | not-specified | n/a | Active | Base para botoes padrao. |
|
|
372
|
+
| `actions.custom[]` | not-specified | not-specified | n/a | Active | Adiciona botoes extras no fluxo. |
|
|
373
|
+
| `actions.position/orientation/spacing/sticky/divider` | not-specified | not-specified | n/a | Active | Aplica classes de layout da barra. |
|
|
374
|
+
| `actions.mobile.collapseToMenu` | not-specified | not-specified | n/a | Active | Ativa modo mobile com menu de overflow. |
|
|
375
|
+
| `actions.containerClassName/containerStyles` | not-specified | not-specified | n/a | Active | Classe/estilo no container principal. |
|
|
376
|
+
| `actions.showSaveButton/showCancelButton/showResetButton` | not-specified | not-specified | n/a | Active | Compatibilidade legada para visibilidade. |
|
|
377
|
+
| `actions.submitButtonLabel/cancelButtonLabel/resetButtonLabel` | not-specified | not-specified | n/a | Active | Compatibilidade legada para labels. |
|
|
378
|
+
| `actions.placement` | not-specified | not-specified | n/a | Declared-only | Declarado no modelo; nao aplicado neste componente isolado. |
|
|
379
|
+
|
|
380
|
+
## Events
|
|
381
|
+
|
|
382
|
+
| Event | Payload | Trigger | Stability | Notes |
|
|
383
|
+
| --- | --- | --- | --- | --- |
|
|
384
|
+
| `action` | `PraxisFormActionEvent` | Clique/atalho em acao habilitada. | Partial | Preservado da documentação anterior. |
|
|
385
|
+
|
|
386
|
+
## Styling API
|
|
387
|
+
|
|
388
|
+
| Token/Class | Scope | Purpose | Notes |
|
|
389
|
+
| --- | --- | --- | --- |
|
|
390
|
+
| see-detailed-api | component | styling/runtime | Consolidar naming canonico quando aplicavel. |
|
|
391
|
+
|
|
392
|
+
## Editor and tooling notes
|
|
393
|
+
|
|
394
|
+
- Cobertura de editor/tooling foi separada da cobertura de runtime para evitar confusao de suporte.
|
|
395
|
+
- Quando nao houver evidencia direta no codigo, o status deve permanecer not yet verified.
|
|
396
|
+
|
|
397
|
+
## Examples
|
|
398
|
+
|
|
399
|
+
### Minimal valid
|
|
400
|
+
|
|
401
|
+
```json
|
|
402
|
+
{}
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
### Typical/common
|
|
406
|
+
|
|
407
|
+
```json
|
|
408
|
+
{}
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
### Advanced
|
|
412
|
+
|
|
413
|
+
```json
|
|
414
|
+
{}
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
### Enterprise scenario
|
|
418
|
+
|
|
419
|
+
```json
|
|
420
|
+
{}
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
## Known limitations and mismatches
|
|
424
|
+
|
|
425
|
+
| Path/Behavior | Observed behavior (runtime) | Desired behavior | Impact | Tracking issue | Target fix |
|
|
426
|
+
| --- | --- | --- | --- | --- | --- |
|
|
427
|
+
| coverage/mapping | Evidência textual preservada indica itens Partial/Declared-only. | Cobertura confirmada por evidência runtime + schema + editor. | Pode gerar uso de paths não totalmente ligados. | to-be-linked | next-doc-cycle |
|
|
428
|
+
|
|
429
|
+
## Compatibility and migration notes
|
|
430
|
+
|
|
431
|
+
| Concern | Affected versions | Migration action | Deadline | Notes |
|
|
432
|
+
| --- | --- | --- | --- | --- |
|
|
433
|
+
| legacy aliases and mixed status vocabulary | pre-canonical docs | unificar para taxonomia canonica (Active/Partial/Declared-only/...) | next-doc-cycle | manter backward compatibility documentada |
|
|
434
|
+
|
|
435
|
+
## Source references
|
|
436
|
+
|
|
437
|
+
| Source type | Path/URL | Why it is source of truth | Last verified (YYYY-MM-DD) | Notes |
|
|
438
|
+
| --- | --- | --- | --- | --- |
|
|
439
|
+
| local-file | projects/praxis-dynamic-form/src/lib/components/praxis-form-actions/praxis-form-actions.component.ts | Evidencia de implementacao e contrato. | 2026-03-05 | referencia preservada da versao anterior |
|
|
440
|
+
| local-file | projects/praxis-dynamic-form/src/lib/components/praxis-form-actions/praxis-form-actions.component.html | Evidencia de implementacao e contrato. | 2026-03-05 | referencia preservada da versao anterior |
|
|
441
|
+
| local-file | projects/praxis-core/src/lib/models/form/form-layout.model.ts | Evidencia de implementacao e contrato. | 2026-03-05 | referencia preservada da versao anterior |
|