@praxisui/dynamic-form 3.0.0-beta.9 → 5.0.0-beta.0
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 +6 -3
- package/fesm2022/praxisui-dynamic-form.mjs +1252 -607
- package/index.d.ts +67 -10
- package/package.json +5 -7
package/README.md
CHANGED
|
@@ -56,6 +56,10 @@ last_updated: "2026-03-22"
|
|
|
56
56
|
- Keep runtime customization and layout governance inside the host application
|
|
57
57
|
- Integrate with other `@praxisui/*` packages through shared contracts and settings flows
|
|
58
58
|
|
|
59
|
+
## Canonical submit contract
|
|
60
|
+
|
|
61
|
+
When the host opens the form from backend `surfaces` or `actions`, the canonical runtime path is `schemaUrl + submitUrl + submitMethod`, and detached hosts may also pass `apiUrlEntry` when the current overlay does not inherit the route-scoped `API_URL`. The legacy `crud.create/update` fallback still exists only as transitional behavior for hosts that have not fully migrated to discovery-driven submit execution.
|
|
62
|
+
|
|
59
63
|
## Install
|
|
60
64
|
|
|
61
65
|
```bash
|
|
@@ -67,8 +71,6 @@ Peer dependencies (Angular v20):
|
|
|
67
71
|
- `@angular/common` `^20.0.0`
|
|
68
72
|
- `@angular/cdk` `^20.0.0`
|
|
69
73
|
- `@praxisui/core` `^0.0.1`
|
|
70
|
-
- `@praxisui/specification-core` `^0.0.1`
|
|
71
|
-
- `@praxisui/specification` `^0.0.1`
|
|
72
74
|
- `@praxisui/visual-builder` `^0.0.1`
|
|
73
75
|
- `@praxisui/settings-panel` `^0.0.1`
|
|
74
76
|
- `@praxisui/cron-builder` `^0.0.1`
|
|
@@ -131,6 +133,7 @@ export class FormDemoComponent {
|
|
|
131
133
|
```
|
|
132
134
|
|
|
133
135
|
Tip: connect to a backend resource by setting `resourcePath`/`resourceId`. The component can fetch schemas and reconcile local layout with server metadata when `enableCustomization` is true.
|
|
136
|
+
For metadata-driven surfaces published by the backend, prefer passing `schemaUrl`, `submitUrl` and `submitMethod` explicitly. In dialog/drawer hosts detached from the route injector, pass `apiUrlEntry` in addition to `apiEndpointKey` so relative runtime URLs still resolve against the remote backend instead of the local shell origin.
|
|
134
137
|
When a late `config` hydration rebuilds the surface, the runtime preserves the current form values already mounted in memory only when the logical context remains the same (`resourcePath`, `resourceId`, and mode). If the form was preloaded from `resourceId`, that entity hydration remains visible after the rebuild only for the same entity context; entity switches and create-mode transitions do not restore the previous record snapshot.
|
|
135
138
|
|
|
136
139
|
Presentation/read-only note:
|
|
@@ -446,7 +449,7 @@ Os paths micro são normalizados para `fieldMetadata[].<prop>` para garantir que
|
|
|
446
449
|
|
|
447
450
|
## Regras de formulário (novo contrato)
|
|
448
451
|
|
|
449
|
-
- Formato: cada regra tem `targetType` (`field | section | action | row | column`), `targets: string[]` (IDs canônicos do alvo), e `effect` com `condition` (
|
|
452
|
+
- Formato: cada regra tem `targetType` (`field | section | action | row | column`), `targets: string[]` (IDs canônicos do alvo), e `effect` com `condition` (`JsonLogicExpression | null`), `properties` e `propertiesWhenFalse`.
|
|
450
453
|
- Compatibilidade: regras antigas (`context/targetField`) são migradas para `properties/targets` automaticamente; prefixes legados `section:/action:/row:/column:` continuam sendo normalizados quando representarem alvos tradicionais. Para header actions de seção, o ID canônico é preservado como `section:<sectionId>:header-action:<actionLogicalId>`.
|
|
451
454
|
- Semântica de limpeza: valores `null` em `properties/propertiesWhenFalse` removem o override e retornam ao valor base do layout; ausência mantém o valor base.
|
|
452
455
|
- Whitelist por tipo (somente propriedades a seguir são aplicadas; demais são descartadas e logadas em dev):
|