@praxisui/dynamic-form 9.0.4-rc.16 → 9.0.4-rc.17
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
CHANGED
|
@@ -251,6 +251,11 @@ Common inputs:
|
|
|
251
251
|
- `domainRules`
|
|
252
252
|
- `editorialContext`
|
|
253
253
|
|
|
254
|
+
In `edit` and `view`, `resourceId` identifies the remote entity to hydrate. In
|
|
255
|
+
`create`, it is contextual only (for example, the employee targeted by an
|
|
256
|
+
item-scoped command) and never starts an entity read; provide command defaults
|
|
257
|
+
through `initialValue`.
|
|
258
|
+
|
|
254
259
|
Common outputs:
|
|
255
260
|
|
|
256
261
|
- `formSubmit`, `formCancel`, `formReset`
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-08-
|
|
3
|
+
"generatedAt": "2026-08-03T18:09:50.161Z",
|
|
4
4
|
"packageName": "@praxisui/dynamic-form",
|
|
5
|
-
"packageVersion": "9.0.4-rc.
|
|
5
|
+
"packageVersion": "9.0.4-rc.17",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 2,
|
|
@@ -12393,6 +12393,23 @@ class PraxisDynamicForm {
|
|
|
12393
12393
|
}
|
|
12394
12394
|
loadEntity() {
|
|
12395
12395
|
this.debugLog('[PDF] loadEntity:start', { id: this.pendingEntityId });
|
|
12396
|
+
// CREATE may still carry a resourceId when the form materializes an
|
|
12397
|
+
// item-scoped command (approve, deactivate, reactivate, etc.). In that
|
|
12398
|
+
// case the id belongs to the command context and must not trigger an
|
|
12399
|
+
// entity read/hydration cycle. Command defaults are supplied explicitly
|
|
12400
|
+
// through initialValue.
|
|
12401
|
+
if (this.mode === 'create') {
|
|
12402
|
+
this.entityHydrationPending = false;
|
|
12403
|
+
const normalized = this.getNormalizedInitialValue();
|
|
12404
|
+
if (normalized && Object.keys(this.form.controls || {}).length) {
|
|
12405
|
+
this.form.patchValue(normalized, { emitEvent: false });
|
|
12406
|
+
}
|
|
12407
|
+
this.flushEntityHydrationState();
|
|
12408
|
+
this.debugLog('[PDF] loadEntity:skipped-create-mode', {
|
|
12409
|
+
id: this.pendingEntityId,
|
|
12410
|
+
});
|
|
12411
|
+
return;
|
|
12412
|
+
}
|
|
12396
12413
|
if (this.pendingEntityId == null) {
|
|
12397
12414
|
this.entityHydrationPending = false;
|
|
12398
12415
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/dynamic-form",
|
|
3
|
-
"version": "9.0.4-rc.
|
|
3
|
+
"version": "9.0.4-rc.17",
|
|
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.4-rc.
|
|
13
|
-
"@praxisui/dynamic-fields": "^9.0.4-rc.
|
|
14
|
-
"@praxisui/metadata-editor": "^9.0.4-rc.
|
|
15
|
-
"@praxisui/rich-content": "^9.0.4-rc.
|
|
16
|
-
"@praxisui/settings-panel": "^9.0.4-rc.
|
|
17
|
-
"@praxisui/visual-builder": "^9.0.4-rc.
|
|
18
|
-
"@praxisui/core": "^9.0.4-rc.
|
|
12
|
+
"@praxisui/ai": "^9.0.4-rc.17",
|
|
13
|
+
"@praxisui/dynamic-fields": "^9.0.4-rc.17",
|
|
14
|
+
"@praxisui/metadata-editor": "^9.0.4-rc.17",
|
|
15
|
+
"@praxisui/rich-content": "^9.0.4-rc.17",
|
|
16
|
+
"@praxisui/settings-panel": "^9.0.4-rc.17",
|
|
17
|
+
"@praxisui/visual-builder": "^9.0.4-rc.17",
|
|
18
|
+
"@praxisui/core": "^9.0.4-rc.17",
|
|
19
19
|
"rxjs": "^7.8.0"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
@@ -232,14 +232,16 @@ O host deve persistir `formSubmit.formData` para fluxos normais. `formSubmit.raw
|
|
|
232
232
|
### Input bindings
|
|
233
233
|
|
|
234
234
|
`initialValue` is an active component input for host-authored or complementary
|
|
235
|
-
field values.
|
|
236
|
-
|
|
235
|
+
field values. In `edit/view`, the runtime applies it without redefining the
|
|
236
|
+
canonical remote entity loaded through `resourcePath` and `resourceId`. In
|
|
237
|
+
`create`, including item-scoped command forms, it is the only supported source
|
|
238
|
+
of initial values: a contextual `resourceId` never triggers entity hydration.
|
|
237
239
|
|
|
238
240
|
| Binding/Path | Type | Required | Source | Runtime normalization | Notes |
|
|
239
241
|
| --- | --- | --- | --- | --- | --- |
|
|
240
242
|
| `config` | `FormConfig` | Conditional | component-input | `normalizeFormConfig(config)` | Contrato principal quando fornecido diretamente pelo host. |
|
|
241
243
|
| `resourcePath` | `string \| undefined` | Conditional | component-input | `crud.configure(resourcePath)` | Endpoint base para schema e dados remotos. Alternativa canônica: `schemaUrl` explícito. |
|
|
242
|
-
| `resourceId` | `string \| number \| undefined` | No | component-input | update `pendingEntityId
|
|
244
|
+
| `resourceId` | `string \| number \| undefined` | No | component-input | update `pendingEntityId`; hydrate only in `edit/view` | Carrega entidade em modo `edit/view`. Em `create`, pode identificar o item dono de um comando sem iniciar leitura nem bloquear os campos. |
|
|
243
245
|
| `mode` | `'create' \| 'edit' \| 'view'` | No | component-input/storage | persistido em `formInputsKey` | Preferência de modo pode ser hidratada do storage. |
|
|
244
246
|
| `schemaSource` | `'resource' \| 'filter'` | No | component-input | runtime branch | Seleciona caminho de obtenção de schema quando `schemaUrl` não é informado. |
|
|
245
247
|
| `schemaUrl` | `string \| null \| undefined` | Conditional | component-input | parsed as `/schemas/filtered` contract | Fonte canônica explícita para inicialização schema-backed sem depender de `resourcePath`. |
|
|
@@ -569,7 +571,7 @@ No ecossistema Praxis, ele funciona tanto como runtime final quanto como superfi
|
|
|
569
571
|
| --- | --- | --- | --- | --- |
|
|
570
572
|
| `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. |
|
|
571
573
|
| `resourcePath` | `string \| undefined` | `undefined` | Active | Habilita carga de schema/dados remotos. Opcional quando `schemaUrl` explícito é fornecido. |
|
|
572
|
-
| `resourceId` | `string \| number \| undefined` | `undefined` | Active | Carrega entidade no modo `edit/view
|
|
574
|
+
| `resourceId` | `string \| number \| undefined` | `undefined` | Active | Carrega entidade no modo `edit/view`; em `create`, funciona apenas como contexto do item e não dispara hidratação. |
|
|
573
575
|
| `mode` | `'create' \| 'edit' \| 'view'` | `'create'` | Active | Governa submit, leitura e apresentacao. |
|
|
574
576
|
| `schemaSource` | `'resource' \| 'filter'` | `'resource'` | Active | Seleciona origem do schema remoto. |
|
|
575
577
|
| `schemaUrl` | `string \| undefined` | `undefined` | Active | Permite usar schema canonico publicado pelo backend sem heuristica local de path e pode iniciar o fluxo corporativo sem `resourcePath`. |
|
|
@@ -704,7 +706,7 @@ Validado em 2026-04-23 contra `praxis-api-quickstart` publicado no Render com
|
|
|
704
706
|
|
|
705
707
|
#### Data mode e fluxo
|
|
706
708
|
|
|
707
|
-
- `mode='create'`: cria registro
|
|
709
|
+
- `mode='create'`: cria registro ou materializa um comando; nunca carrega a entidade por `resourceId`, e valores iniciais devem vir de `initialValue`.
|
|
708
710
|
- `mode='edit'`: carrega entidade por `resourceId` quando disponivel.
|
|
709
711
|
- `mode='view'`: foco em leitura/apresentacao; actions de edicao podem ser suprimidas.
|
|
710
712
|
|