@praxisui/dynamic-form 1.0.0-beta.60 → 1.0.0-beta.61
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 +65 -11
- package/fesm2022/praxisui-dynamic-form.mjs +57 -11
- package/fesm2022/praxisui-dynamic-form.mjs.map +1 -1
- package/index.d.ts +6 -4
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ keywords:
|
|
|
37
37
|
- "schema-driven"
|
|
38
38
|
- "layout editor"
|
|
39
39
|
- "settings integration"
|
|
40
|
-
last_updated: "2026-03-
|
|
40
|
+
last_updated: "2026-03-12"
|
|
41
41
|
---
|
|
42
42
|
|
|
43
43
|
# @praxisui/dynamic-form
|
|
@@ -159,6 +159,7 @@ O `@praxisui/dynamic-form` agora aceita uma surface fundacional para hospedar bl
|
|
|
159
159
|
|
|
160
160
|
Inputs relevantes:
|
|
161
161
|
- `config.formBlocksBefore?: WidgetDefinition[]`
|
|
162
|
+
- `config.formBlocksBeforeActions?: WidgetDefinition[]`
|
|
162
163
|
- `config.formBlocksAfter?: WidgetDefinition[]`
|
|
163
164
|
- `config.editorialContext?: Record<string, unknown>`
|
|
164
165
|
- `[editorialContext]?: Record<string, unknown>`
|
|
@@ -179,25 +180,76 @@ const formConfig: FormConfig = {
|
|
|
179
180
|
editorialContext: {
|
|
180
181
|
accountName: 'Helena Costa',
|
|
181
182
|
accountRole: 'Gestora financeira',
|
|
183
|
+
accountContext: {
|
|
184
|
+
user: {
|
|
185
|
+
name: 'Helena Costa',
|
|
186
|
+
email: 'helena.costa@praxis.demo',
|
|
187
|
+
role: 'Gestora financeira',
|
|
188
|
+
},
|
|
189
|
+
tenant: {
|
|
190
|
+
name: 'Praxis Holding',
|
|
191
|
+
},
|
|
192
|
+
},
|
|
182
193
|
},
|
|
183
194
|
formBlocksBefore: [
|
|
184
195
|
{
|
|
185
|
-
id: '
|
|
196
|
+
id: 'widget:hero-banner',
|
|
186
197
|
inputs: {
|
|
187
|
-
|
|
198
|
+
instanceId: 'editorial:before:hero:1',
|
|
188
199
|
title: 'Praxis Summit 2026',
|
|
189
200
|
subtitle: 'Inscricao institucional',
|
|
190
|
-
|
|
201
|
+
description: 'Experiencia institucional com composicao editorial hospedada antes do formulario.',
|
|
202
|
+
variant: 'event',
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
id: 'widget:rich-text-block',
|
|
207
|
+
inputs: {
|
|
208
|
+
instanceId: 'editorial:before:rich-text:1',
|
|
209
|
+
title: 'Antes de comecar',
|
|
210
|
+
subtitle: 'Contexto editorial',
|
|
211
|
+
icon: 'info',
|
|
212
|
+
contentFormat: 'markdown',
|
|
213
|
+
content: 'Confirme os dados abaixo antes do envio e consulte a [documentacao](https://example.com/docs) se precisar de suporte.',
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
id: 'widget:legal-notice',
|
|
218
|
+
inputs: {
|
|
219
|
+
instanceId: 'editorial:before:legal:1',
|
|
220
|
+
title: 'Uso de dados',
|
|
221
|
+
contentFormat: 'plain',
|
|
222
|
+
content: 'Ao participar, voce reconhece a politica institucional aplicavel.',
|
|
223
|
+
severity: 'info',
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
],
|
|
227
|
+
formBlocksBeforeActions: [
|
|
228
|
+
{
|
|
229
|
+
id: 'form:user-context-summary',
|
|
230
|
+
inputs: {
|
|
231
|
+
instanceId: 'editorial:before-actions:user-context:1',
|
|
232
|
+
title: 'Conta atual',
|
|
233
|
+
source: 'context',
|
|
234
|
+
context: '${accountContext}',
|
|
235
|
+
fields: [
|
|
236
|
+
{ label: 'Nome', valuePath: 'user.name', fallback: '-' },
|
|
237
|
+
{ label: 'E-mail', valuePath: 'user.email', fallback: '-' },
|
|
238
|
+
],
|
|
191
239
|
},
|
|
192
240
|
},
|
|
193
241
|
],
|
|
194
242
|
formBlocksAfter: [
|
|
195
243
|
{
|
|
196
|
-
id: '
|
|
244
|
+
id: 'widget:footer-links',
|
|
197
245
|
inputs: {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
246
|
+
instanceId: 'editorial:after:footer-links:1',
|
|
247
|
+
brandText: 'Praxis',
|
|
248
|
+
secondaryText: 'Todos os direitos reservados.',
|
|
249
|
+
links: [
|
|
250
|
+
{ label: 'Docs', href: '/components/dynamic-form/docs/overview' },
|
|
251
|
+
{ label: 'API', href: '/components/dynamic-form/api' },
|
|
252
|
+
],
|
|
201
253
|
},
|
|
202
254
|
},
|
|
203
255
|
],
|
|
@@ -233,10 +285,12 @@ Uso no host:
|
|
|
233
285
|
```
|
|
234
286
|
|
|
235
287
|
Notas:
|
|
236
|
-
- `formBlocksBefore` e `formBlocksAfter` nao entram em `formData`.
|
|
237
|
-
- `widgetEvent` reemite eventos dos widgets hospedados com `placement` (`before` ou `after`).
|
|
288
|
+
- `formBlocksBefore`, `formBlocksBeforeActions` e `formBlocksAfter` nao entram em `formData`.
|
|
289
|
+
- `widgetEvent` reemite eventos dos widgets hospedados com `placement` (`before`, `beforeActions` ou `after`).
|
|
238
290
|
- `editorialContext` deve ser tratado como imutavel; mutacoes in-place nao invalidam o cache do host.
|
|
239
|
-
-
|
|
291
|
+
- A surface editorial ja suporta widgets reais compartilhados para hero, rich text, legal notice, user context summary e footer links.
|
|
292
|
+
- `formBlocksBeforeActions` renderiza depois das secoes e antes da area principal de acoes, sendo o slot recomendado para blocos contextuais como `form:user-context-summary`.
|
|
293
|
+
- `formBlocksAfter` permanece como slot de fechamento e continua renderizando depois do formulario inteiro, incluindo os CTAs.
|
|
240
294
|
|
|
241
295
|
See public exports: `projects/praxis-dynamic-form/src/public-api.ts`.
|
|
242
296
|
|