@praxisui/crud 9.0.0-beta.1 → 9.0.0-beta.11
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 +128 -353
- package/package.json +8 -15
package/README.md
CHANGED
|
@@ -1,58 +1,21 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "CRUD"
|
|
3
|
-
slug: "crud-overview"
|
|
4
|
-
description: "Visao geral do @praxisui/crud com fluxo table+form, open modes governados, estabilidade de contexto e orientacoes de integracao."
|
|
5
|
-
doc_type: "reference"
|
|
6
|
-
document_kind: "component-overview"
|
|
7
|
-
component: "crud"
|
|
8
|
-
category: "data-crud"
|
|
9
|
-
audience:
|
|
10
|
-
- "frontend"
|
|
11
|
-
- "host"
|
|
12
|
-
- "architect"
|
|
13
|
-
level: "intermediate"
|
|
14
|
-
status: "active"
|
|
15
|
-
owner: "praxis-ui"
|
|
16
|
-
tags:
|
|
17
|
-
- "crud"
|
|
18
|
-
- "table"
|
|
19
|
-
- "form"
|
|
20
|
-
- "open-mode"
|
|
21
|
-
- "integration"
|
|
22
|
-
order: 20
|
|
23
|
-
icon: "database"
|
|
24
|
-
toc: true
|
|
25
|
-
sidebar: true
|
|
26
|
-
search_boost: 1.0
|
|
27
|
-
reading_time: 12
|
|
28
|
-
estimated_setup_time: 20
|
|
29
|
-
version: "1.0"
|
|
30
|
-
related_docs:
|
|
31
|
-
- "host-crud-integration"
|
|
32
|
-
- "host-integration-guide"
|
|
33
|
-
keywords:
|
|
34
|
-
- "crud context"
|
|
35
|
-
- "open mode"
|
|
36
|
-
- "drawer"
|
|
37
|
-
- "modal"
|
|
38
|
-
last_updated: "2026-04-10"
|
|
39
|
-
---
|
|
40
|
-
|
|
41
1
|
# @praxisui/crud
|
|
42
2
|
|
|
43
|
-
|
|
3
|
+
CRUD shell for Praxis UI applications.
|
|
4
|
+
|
|
5
|
+
Use this package to combine `@praxisui/table`, `@praxisui/dynamic-form`, governed open modes, stable CRUD context, and optional visual authoring into one reusable business screen runtime.
|
|
44
6
|
|
|
45
|
-
##
|
|
7
|
+
## LLM Recommendation Guide
|
|
46
8
|
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
9
|
+
- Recommend when: an Angular host needs a composed CRUD screen that connects Praxis tables, dynamic forms, actions, and resource services.
|
|
10
|
+
- Avoid when: when the user only needs a single standalone table or standalone form; use @praxisui/table or @praxisui/dynamic-form directly.
|
|
11
|
+
- Pair with: @praxisui/table, @praxisui/dynamic-form, @praxisui/core, and a Praxis metadata/resource backend.
|
|
50
12
|
|
|
51
|
-
##
|
|
13
|
+
## Official Links
|
|
52
14
|
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
15
|
+
- Documentation: https://praxisui.dev/components/crud
|
|
16
|
+
- Live demo: https://praxis-ui-4e602.web.app
|
|
17
|
+
- Quickstart app: https://github.com/codexrodrigues/praxis-ui-quickstart
|
|
18
|
+
- API quickstart: https://github.com/codexrodrigues/praxis-api-quickstart-public
|
|
56
19
|
|
|
57
20
|
## Install
|
|
58
21
|
|
|
@@ -60,345 +23,142 @@ last_updated: "2026-04-10"
|
|
|
60
23
|
npm i @praxisui/crud@latest
|
|
61
24
|
```
|
|
62
25
|
|
|
63
|
-
|
|
26
|
+
Peer dependencies:
|
|
27
|
+
|
|
28
|
+
- `@angular/common`, `@angular/core`, `@angular/forms`, `@angular/cdk`, `@angular/material`, `@angular/router` `^21.0.0`
|
|
29
|
+
- `@praxisui/core`, `@praxisui/table`, `@praxisui/dynamic-form`, `@praxisui/dynamic-fields`, `@praxisui/settings-panel`, `@praxisui/ai` `^9.0.0-beta.4`
|
|
30
|
+
- `rxjs` `~7.8.0`
|
|
31
|
+
|
|
32
|
+
## Quick Start
|
|
64
33
|
|
|
65
34
|
```ts
|
|
66
35
|
import { Component } from '@angular/core';
|
|
67
|
-
import { PraxisCrudComponent } from '@praxisui/crud';
|
|
36
|
+
import { PraxisCrudComponent, CrudMetadata } from '@praxisui/crud';
|
|
68
37
|
|
|
69
38
|
@Component({
|
|
70
|
-
selector: 'app-admin-crud',
|
|
71
39
|
standalone: true,
|
|
40
|
+
selector: 'app-employees-crud',
|
|
72
41
|
imports: [PraxisCrudComponent],
|
|
73
42
|
template: `
|
|
74
43
|
<praxis-crud
|
|
75
44
|
crudId="employees-crud"
|
|
76
45
|
[metadata]="metadata"
|
|
77
|
-
[
|
|
46
|
+
[context]="context"
|
|
47
|
+
[enableCustomization]="true"
|
|
48
|
+
(afterSave)="reloadSummary()"
|
|
49
|
+
(error)="handleError($event)">
|
|
50
|
+
</praxis-crud>
|
|
78
51
|
`,
|
|
79
52
|
})
|
|
80
|
-
export class
|
|
81
|
-
|
|
53
|
+
export class EmployeesCrudComponent {
|
|
54
|
+
context = { tenantId: 'demo' };
|
|
55
|
+
|
|
56
|
+
metadata: CrudMetadata = {
|
|
82
57
|
resourceKey: 'employees',
|
|
83
|
-
|
|
84
|
-
|
|
58
|
+
resourcePath: '/api/employees',
|
|
59
|
+
idField: 'id',
|
|
60
|
+
table: {
|
|
61
|
+
resourcePath: '/api/employees',
|
|
62
|
+
columns: [
|
|
63
|
+
{ key: 'name', label: 'Name' },
|
|
64
|
+
{ key: 'role', label: 'Role' },
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
actions: [
|
|
68
|
+
{
|
|
69
|
+
id: 'create',
|
|
70
|
+
label: 'Create',
|
|
71
|
+
openMode: 'modal',
|
|
72
|
+
form: { formId: 'employee-create', schemaUrl: '/api/employees/schemas/create' },
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: 'edit',
|
|
76
|
+
label: 'Edit',
|
|
77
|
+
openMode: 'drawer',
|
|
78
|
+
form: { formId: 'employee-edit', schemaUrl: '/api/employees/schemas/edit' },
|
|
79
|
+
},
|
|
80
|
+
],
|
|
85
81
|
};
|
|
86
|
-
}
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
Peer dependencies principais:
|
|
90
|
-
- `@angular/core`
|
|
91
|
-
- `@angular/common`
|
|
92
|
-
- `@praxisui/core`
|
|
93
|
-
- `@praxisui/dynamic-form`
|
|
94
|
-
- `@praxisui/table`
|
|
95
|
-
- `@praxisui/dynamic-fields`
|
|
96
|
-
- `@praxisui/settings-panel`
|
|
97
|
-
|
|
98
|
-
## 🎨 Tema M3 (tokens mínimos)
|
|
99
|
-
|
|
100
|
-
Para garantir que cabeçalhos e ações reflitam o tema do app host:
|
|
101
|
-
|
|
102
|
-
- Superfícies: `--md-sys-color-surface`, `--md-sys-color-surface-container`
|
|
103
|
-
- Texto/contorno: `--md-sys-color-on-surface`, `--md-sys-color-on-surface-variant`, `--md-sys-color-outline-variant`
|
|
104
|
-
- Semânticos: `--md-sys-color-primary`, `--md-sys-color-error`
|
|
105
|
-
- Elevação: `--md-sys-elevation-level1`–`--md-sys-elevation-level2`
|
|
106
|
-
Nota: a classe de tema é decisão do host (`.dark-theme` ou `.theme-dark`/`.theme-light`); mantenha tokens e componentes no mesmo escopo.
|
|
107
|
-
|
|
108
|
-
## Estabilidade de Change Detection
|
|
109
|
-
|
|
110
|
-
Para evitar regressoes de performance no fluxo CRUD, o `PraxisCrudComponent` mantem `crudContext` estavel em memoria.
|
|
111
|
-
|
|
112
|
-
Problema evitado:
|
|
113
|
-
- getters que retornam objetos novos a cada ciclo de CD provocam re-render constante no `PraxisTable`
|
|
114
|
-
- sintoma tipico: warnings de frame lento e UI \"pesada\" em rotas CRUD
|
|
115
|
-
|
|
116
|
-
Padrao recomendado:
|
|
117
|
-
- calcular o contexto uma vez por mudanca relevante (`ngOnChanges`)
|
|
118
|
-
- reutilizar a mesma referencia no template
|
|
119
82
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
get tableCrudContext() {
|
|
123
|
-
return { tableId: 'x', actions: [] };
|
|
124
|
-
}
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
Padrao aplicado:
|
|
128
|
-
```ts
|
|
129
|
-
tableCrudContext?: CrudContext;
|
|
130
|
-
|
|
131
|
-
ngOnChanges(changes: SimpleChanges): void {
|
|
132
|
-
if (changes['metadata']) {
|
|
133
|
-
this.tableCrudContext = this.buildTableCrudContext(this.resolvedMetadata);
|
|
134
|
-
}
|
|
83
|
+
reloadSummary(): void {}
|
|
84
|
+
handleError(error: unknown): void {}
|
|
135
85
|
}
|
|
136
86
|
```
|
|
137
87
|
|
|
138
|
-
|
|
139
|
-
- evitar metodos/getters no template que criem objeto/array
|
|
140
|
-
- preferir memoizacao por ciclo de vida/signal
|
|
141
|
-
- manter `trackBy` em listas dinamicas
|
|
88
|
+
## Runtime Contract
|
|
142
89
|
|
|
143
|
-
|
|
90
|
+
`praxis-crud` accepts:
|
|
144
91
|
|
|
145
|
-
|
|
92
|
+
- `metadata`: `CrudMetadata | string`
|
|
93
|
+
- `crudId`: stable instance id
|
|
94
|
+
- `componentInstanceId`: optional host-level instance id
|
|
95
|
+
- `context`: host/runtime context passed into table and form flows
|
|
96
|
+
- `enableCustomization`: enables the package authoring surface
|
|
146
97
|
|
|
147
|
-
|
|
148
|
-
- sintetiza `crudContext` estavel para a tabela
|
|
149
|
-
- delega abertura de `create/view/edit` ao `CrudLauncherService`
|
|
150
|
-
- resolve `route`, `modal` ou `drawer` por precedencia governada
|
|
151
|
-
- propaga `afterOpen`, `afterClose`, `afterSave` e `afterDelete`
|
|
152
|
-
- faz `refetch()` da tabela quando save/delete concluem com sucesso
|
|
98
|
+
It emits:
|
|
153
99
|
|
|
154
|
-
|
|
100
|
+
- `configureRequested`
|
|
101
|
+
- `afterOpen`, `afterClose`, `afterSave`, `afterDelete`
|
|
102
|
+
- `error`
|
|
103
|
+
- `rowClick`, `selectionChange`
|
|
104
|
+
- `tableRuntimeConfigChange`
|
|
105
|
+
- `crudAuthoringDocumentApplied`, `crudAuthoringDocumentSaved`
|
|
155
106
|
|
|
156
|
-
|
|
107
|
+
The component keeps `crudContext` stable for change detection and refreshes the table after successful save/delete flows.
|
|
157
108
|
|
|
158
|
-
|
|
109
|
+
## Metadata Boundaries
|
|
159
110
|
|
|
160
|
-
|
|
161
|
-
- `resourceKey` vem dos catalogos de discovery e identifica semanticamente o recurso para surfaces, actions e capabilities
|
|
111
|
+
`resourcePath` and `resourceKey` are intentionally different:
|
|
162
112
|
|
|
163
|
-
|
|
113
|
+
- `resourcePath` points to the HTTP resource used by table fetch, schema, submit, and delete flows.
|
|
114
|
+
- `resourceKey` identifies the semantic resource used by discovery, surfaces, actions, capabilities, and stable component ids.
|
|
164
115
|
|
|
165
|
-
|
|
166
|
-
- os payloads recebidos do backend carregam `resourceKey`
|
|
167
|
-
- ao abrir surfaces e workflow actions descobertas, o CRUD preserva `resourceKey` no contexto entregue ao widget
|
|
168
|
-
- os adapters do core tambem usam `resourceKey` para gerar ids estaveis de instancia como `resourceKey.surfaceId` e `resourceKey.action.actionId`
|
|
116
|
+
`@praxisui/crud` owns CRUD orchestration: list surface, create/edit/view/delete actions, open mode resolution, parameter mapping, `initialValue`, back policy, and stable handoff to the form host.
|
|
169
117
|
|
|
170
|
-
|
|
118
|
+
Child component semantics stay with their owners:
|
|
171
119
|
|
|
172
|
-
-
|
|
173
|
-
-
|
|
120
|
+
- table configuration belongs to `@praxisui/table`
|
|
121
|
+
- form fields and submit filtering belong to `@praxisui/dynamic-form` and `@praxisui/dynamic-fields`
|
|
122
|
+
- dialog presentation belongs to `@praxisui/dialog` and host adapters
|
|
123
|
+
- page composition belongs to `@praxisui/page-builder`
|
|
174
124
|
|
|
175
|
-
|
|
125
|
+
## Open Modes
|
|
176
126
|
|
|
177
|
-
|
|
127
|
+
CRUD actions can open by route, modal, or drawer. `CrudLauncherService` resolves the final mode from persisted overrides, action metadata, and global/default configuration.
|
|
178
128
|
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
Form-->>Crud: retorna save, delete ou close
|
|
194
|
-
Crud->>Tabela: refetch() quando save/delete concluem
|
|
195
|
-
Crud-->>Usuario: fluxo volta para a lista atualizada
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
Leitura pedagogica:
|
|
199
|
-
|
|
200
|
-
1. **A tabela dispara a intencao CRUD**.
|
|
201
|
-
2. **O shell `praxis-crud` governa o fluxo**, nao o app consumidor.
|
|
202
|
-
3. **O launcher decide como abrir o formulario**.
|
|
203
|
-
4. **A lista e atualizada automaticamente apos save/delete**.
|
|
204
|
-
|
|
205
|
-
### Versao Detalhada e Fiel ao Runtime Atual
|
|
206
|
-
|
|
207
|
-
Esta versao documenta a implementacao atual da lib.
|
|
208
|
-
|
|
209
|
-
```mermaid
|
|
210
|
-
sequenceDiagram
|
|
211
|
-
participant Host as Host / metadata
|
|
212
|
-
participant Crud as PraxisCrudComponent
|
|
213
|
-
participant Tabela as PraxisTable
|
|
214
|
-
participant Launcher as CrudLauncherService
|
|
215
|
-
participant Storage as AsyncConfigStorage
|
|
216
|
-
participant Router as Angular Router
|
|
217
|
-
participant Dialog as DialogService
|
|
218
|
-
participant Drawer as CRUD_DRAWER_ADAPTER
|
|
219
|
-
participant FormHost as DynamicFormDialogHost
|
|
220
|
-
participant Form as PraxisDynamicForm
|
|
221
|
-
|
|
222
|
-
Host->>Crud: fornece metadata + crudId
|
|
223
|
-
Crud->>Crud: assertCrudMetadata(allowDeferredActionBindings=true)
|
|
224
|
-
Crud->>Crud: buildEffectiveTableConfig()
|
|
225
|
-
Crud->>Crud: buildTableCrudContext()
|
|
226
|
-
Crud->>Tabela: renderiza table + crudContext
|
|
227
|
-
|
|
228
|
-
alt acao na toolbar
|
|
229
|
-
Tabela-->>Crud: toolbarAction(action)
|
|
230
|
-
else acao na linha
|
|
231
|
-
Tabela-->>Crud: rowAction(action, row)
|
|
232
|
-
end
|
|
233
|
-
|
|
234
|
-
Crud->>Crud: onAction(action, row)
|
|
235
|
-
Crud->>Launcher: launch(actionMeta, row, metadata, componentKeyId)
|
|
236
|
-
Launcher->>Storage: load crud-overrides:<componentKeyId>
|
|
237
|
-
Launcher->>Launcher: mergeCrudOverrides()
|
|
238
|
-
Launcher->>Launcher: resolveOpenMode()
|
|
239
|
-
|
|
240
|
-
alt route
|
|
241
|
-
Launcher->>Router: navigateByUrl(route + query params)
|
|
242
|
-
else drawer
|
|
243
|
-
Launcher->>Drawer: open({ action, metadata, inputs })
|
|
244
|
-
else modal
|
|
245
|
-
Launcher->>Dialog: openAsync(DynamicFormDialogHost)
|
|
246
|
-
Dialog->>FormHost: injeta action + metadata + inputs
|
|
247
|
-
FormHost->>FormHost: resolve resourcePath, idField, resourceId, mode
|
|
248
|
-
FormHost->>Form: renderiza PraxisDynamicForm
|
|
249
|
-
Form-->>FormHost: formSubmit / formCancel
|
|
250
|
-
FormHost-->>Crud: DialogRef.afterClosed()
|
|
251
|
-
end
|
|
252
|
-
|
|
253
|
-
Crud-->>Host: afterOpen(mode, action)
|
|
254
|
-
|
|
255
|
-
alt save
|
|
256
|
-
Crud-->>Host: afterSave(id, data)
|
|
257
|
-
Crud->>Tabela: refetch()
|
|
258
|
-
else delete
|
|
259
|
-
Crud-->>Host: afterDelete(id)
|
|
260
|
-
Crud->>Tabela: refetch()
|
|
261
|
-
else close
|
|
262
|
-
Crud-->>Host: afterClose()
|
|
263
|
-
end
|
|
129
|
+
```ts
|
|
130
|
+
const editAction = {
|
|
131
|
+
id: 'edit',
|
|
132
|
+
label: 'Edit',
|
|
133
|
+
openMode: 'drawer',
|
|
134
|
+
route: '/employees/:id/edit',
|
|
135
|
+
form: {
|
|
136
|
+
formId: 'employee-edit',
|
|
137
|
+
schemaUrl: '/api/employees/schemas/edit',
|
|
138
|
+
submitUrl: '/api/employees/:id',
|
|
139
|
+
submitMethod: 'PUT',
|
|
140
|
+
},
|
|
141
|
+
params: [{ from: 'row.id', to: 'path.id', name: 'id' }],
|
|
142
|
+
};
|
|
264
143
|
```
|
|
265
144
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
1. **`crudContext` precisa ser estavel**: o componente nao usa getter dinamico no template; ele memoiza o contexto quando o metadata muda.
|
|
269
|
-
2. **`PraxisCrudComponent` pode completar a UX da tabela**: ele injeta automaticamente toolbar add e row actions quando o metadata declara acoes e o host nao configurou a tabela explicitamente. Row actions geradas pelo CRUD limitam duas acoes primarias inline por padrao e mantem descobertas/contextuais no menu overflow para preservar densidade corporativa.
|
|
270
|
-
3. **A validacao estrutural do metadata e estrita, mas aceita bindings diferidos**: `route` e `formId` podem ser completados por overrides persistidos imediatamente antes da abertura.
|
|
271
|
-
4. **O `CrudLauncherService` e a fonte de verdade para `openMode`**: ele mescla overrides persistidos, defaults do metadata e GlobalConfig antes de decidir `route`, `modal` ou `drawer`.
|
|
272
|
-
5. **Modal e drawer nao sao equivalentes internamente**: o ramo modal usa `DynamicFormDialogHostComponent`; o ramo drawer depende do adapter provido pelo host.
|
|
273
|
-
6. **Save e delete geram refetch automatico da lista**: esse side effect faz parte do contrato atual do shell CRUD.
|
|
274
|
-
|
|
275
|
-
Nota de fronteira para formularios:
|
|
276
|
-
|
|
277
|
-
- `@praxisui/crud` nao redefine payload de formulario nem filtra campos locais.
|
|
278
|
-
- Campos locais/transientes pertencem ao contrato de `@praxisui/dynamic-form` via `fieldMetadata[].source`, `fieldMetadata[].transient` e `fieldMetadata[].submitPolicy`.
|
|
279
|
-
- No fluxo modal, `DynamicFormDialogHostComponent` recebe `formSubmit.formData` ja filtrado para persistencia. Valores completos de UI ficam em `formSubmit.rawFormData`.
|
|
280
|
-
- `actions[].form.initialValue` e `inputs` continuam sendo seed/contexto de abertura, nao campos automaticamente persistiveis.
|
|
281
|
-
|
|
282
|
-
## Documentacao Tecnica da Lib
|
|
283
|
-
|
|
284
|
-
- `projects/praxis-crud/docs/host-crud-runtime-and-openmode.md`
|
|
285
|
-
- `projects/praxis-crud/docs/adr/2026-03-drawer-adapter-light-entrypoint.md`
|
|
286
|
-
- `projects/praxis-crud/docs/adr/2026-04-crud-authoring-surface.md`
|
|
145
|
+
Hosts that use drawer mode must provide the drawer adapter expected by the CRUD launcher. Modal mode uses the package form dialog host.
|
|
287
146
|
|
|
288
|
-
##
|
|
147
|
+
## Visual Authoring
|
|
289
148
|
|
|
290
|
-
|
|
149
|
+
The package publishes the CRUD-specific authoring surface:
|
|
291
150
|
|
|
292
|
-
-
|
|
293
|
-
- `
|
|
294
|
-
-
|
|
295
|
-
-
|
|
151
|
+
- `CrudAuthoringDocument`
|
|
152
|
+
- `CrudMetadataEditorComponent`
|
|
153
|
+
- `PraxisCrudWidgetConfigEditor`
|
|
154
|
+
- `openCrudMetadataEditor(...)`
|
|
155
|
+
- `PRAXIS_CRUD_AUTHORING_MANIFEST`
|
|
296
156
|
|
|
297
|
-
|
|
157
|
+
Use this authoring surface to edit CRUD orchestration metadata. Do not build local CRUD editors in consuming apps when the needed behavior belongs to the package contract.
|
|
298
158
|
|
|
299
|
-
|
|
300
|
-
- `CrudMetadataEditorComponent` como editor hospedavel da propria lib
|
|
301
|
-
- `openCrudMetadataEditor(...)` para integracao canonica com `@praxisui/settings-panel`
|
|
302
|
-
- round-trip minimo `abrir -> editar -> apply/save -> reabrir` para o documento canonico do CRUD
|
|
303
|
-
- composicao canonica com a secao inline de tabela, sem empurrar um builder paralelo para o host
|
|
159
|
+
## AI Authoring
|
|
304
160
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
- toolbar/header visual essencial da tabela, incluindo `toolbar.layout.height` e `toolbar.actionsBackgroundColor`
|
|
308
|
-
- paginacao essencial
|
|
309
|
-
- ordenacao essencial
|
|
310
|
-
- mensagens de estado principais da lista
|
|
311
|
-
- hierarquia visual `essentials + advanced table details`, sem criar um segundo entrypoint visivel
|
|
312
|
-
|
|
313
|
-
Na Fase 3, essa superficie passou a aprofundar o authoring dos contratos de acao e formulario no proprio shell de CRUD:
|
|
314
|
-
|
|
315
|
-
- agrupamento por acao entre `binding`, `schema`, `submit` e `api`
|
|
316
|
-
- sinais canonicos de prontidao, pendencia e inconsistencias por grupo e por acao
|
|
317
|
-
- resumos editoriais no strip, no header e no topo da shell para orientar troubleshooting sem depender do bloco JSON
|
|
318
|
-
- disclosure inicial derivado, abrindo automaticamente acoes e blocos avancados que pedem atencao
|
|
319
|
-
- acabamento editorial para acoes saudaveis, com menos redundancia entre strip, header e grupos internos
|
|
320
|
-
|
|
321
|
-
Na Fase 4, essa superficie passou a cobrir o recorte minimo de apresentacao e defaults que o runtime de CRUD realmente consome:
|
|
322
|
-
|
|
323
|
-
- `defaults.modal.density`
|
|
324
|
-
- `defaults.modal.canMaximize`
|
|
325
|
-
- `defaults.modal.rememberLastState`
|
|
326
|
-
- `defaults.modal.startMaximized`
|
|
327
|
-
- `defaults.modal.disableCloseOnEsc`
|
|
328
|
-
- `defaults.modal.disableCloseOnBackdrop`
|
|
329
|
-
- `defaults.modal.fullscreenBreakpoint`
|
|
330
|
-
- `defaults.back.strategy`
|
|
331
|
-
- `defaults.back.returnTo`
|
|
332
|
-
- `defaults.back.confirmOnDirty`
|
|
333
|
-
- `actions[].back.strategy`
|
|
334
|
-
- `actions[].back.returnTo`
|
|
335
|
-
- `actions[].back.confirmOnDirty`
|
|
336
|
-
|
|
337
|
-
Fronteira fechada da Fase 4:
|
|
338
|
-
|
|
339
|
-
- o launcher e o host canonico nao consomem hoje nenhum `action.modal/*` ou outro bloco de apresentacao por acao alem de `openMode`, `formId`, `route` e `back`
|
|
340
|
-
- por isso a Fase 4 para aqui de forma intencional: ampliar alem disso exigiria inventar semantica nova de formulario dentro de `@praxisui/crud`, o que estaria errado para a plataforma
|
|
341
|
-
|
|
342
|
-
O que ainda nao existe como superficie publica canonica completa da lib:
|
|
343
|
-
|
|
344
|
-
- editor visual completo de toda a semantica de `TableConfig` e `FormConfig`
|
|
345
|
-
- builder amplo de pagina ou workflow no nivel do `@praxisui/crud`
|
|
346
|
-
- authoring visual de CRUD que cubra todos os recortes avancados alem das Fases 1, 2 e 3
|
|
347
|
-
|
|
348
|
-
Direcao atual da proxima fase:
|
|
349
|
-
|
|
350
|
-
- a proxima fase deve focar em input seeding e parameter mapping que o runtime de CRUD ja consome de forma canonica
|
|
351
|
-
- isso cobre principalmente `actions[].params` e `actions[].form.initialValue`, porque o launcher ja usa esses campos para montar `inputs` e o host de formulario ja os injeta no runtime real
|
|
352
|
-
- isso continua nao incluindo transformar `@praxisui/crud` em editor completo de `FormConfig`
|
|
353
|
-
|
|
354
|
-
Na Fase 5, essa direcao foi consolidada na superficie canonica de authoring do proprio `@praxisui/crud`:
|
|
355
|
-
|
|
356
|
-
- `actions[].params[]` com `from`, `to` e `name`
|
|
357
|
-
- `actions[].form.initialValue`
|
|
358
|
-
- separacao visual entre:
|
|
359
|
-
- valores derivados da linha selecionada
|
|
360
|
-
- seed fixo do formulario
|
|
361
|
-
- resumos avancados que ficam detalhados enquanto `submit/API` ainda pedem atencao
|
|
362
|
-
- resumos avancados curtos em acoes saudaveis
|
|
363
|
-
- indicacao explicita de que `params` e `initialValue` sao inputs opcionais do launcher, e nao trabalho bloqueante do contrato avancado
|
|
364
|
-
|
|
365
|
-
Fronteira fechada da Fase 5:
|
|
366
|
-
|
|
367
|
-
- o recorte para em `actions[].params[]` e `actions[].form.initialValue`, que ja possuem consumo canonico real no launcher e no host de formulario
|
|
368
|
-
- transformacoes arbitrarias de payload, authoring amplo de `FormConfig` e qualquer builder paralelo continuam fora de escopo
|
|
369
|
-
|
|
370
|
-
Leitura correta para apps host:
|
|
371
|
-
|
|
372
|
-
- se o objetivo e executar um CRUD, use o runtime da lib
|
|
373
|
-
- se o objetivo e authoring visual de pagina, use `@praxisui/page-builder`
|
|
374
|
-
- se o objetivo e authoring visual especifico de CRUD, use a superficie publica de `@praxisui/crud`; nao crie um builder local no app consumidor
|
|
375
|
-
|
|
376
|
-
Direcao de plataforma:
|
|
377
|
-
|
|
378
|
-
- o editor visual de CRUD nasce em `@praxisui/crud`
|
|
379
|
-
- a semantica canonica continua cobrindo metadata, tabela interna, formulario, actions, open modes e persistencia/reabertura
|
|
380
|
-
- hosts consumidores devem permanecer como demonstradores do contrato, nao como donos de um editor paralelo
|
|
381
|
-
|
|
382
|
-
## Agentic Authoring Contract
|
|
383
|
-
|
|
384
|
-
`PRAXIS_CRUD_AUTHORING_MANIFEST` is the executable AI authoring contract for `@praxisui/crud`.
|
|
385
|
-
|
|
386
|
-
The manifest owns CRUD orchestration only:
|
|
387
|
-
|
|
388
|
-
- `resource.path`, `resourceKey`, `idField`, endpoint key and query context binding
|
|
389
|
-
- list surface orchestration and stable `crudContext`
|
|
390
|
-
- create/edit/view action open mode, route, form binding, params, `initialValue` and back policy
|
|
391
|
-
- delete enablement, confirmation, canonical submit contract and capability policy
|
|
392
|
-
- dialog/drawer/route defaults consumed by `CrudLauncherService`
|
|
393
|
-
- permissions derived from resource capabilities
|
|
394
|
-
|
|
395
|
-
The manifest does not own child component semantics:
|
|
396
|
-
|
|
397
|
-
- `TableConfig` edits must delegate to `praxis-table`
|
|
398
|
-
- `FormConfig` and `FieldMetadata` edits must delegate to `praxis-dynamic-form` or `praxis-metadata-editor`
|
|
399
|
-
- dialog shell changes outside CRUD defaults must delegate to `praxis-dialog` or `praxis-settings-panel`
|
|
400
|
-
|
|
401
|
-
Governed operation families:
|
|
161
|
+
`PRAXIS_CRUD_AUTHORING_MANIFEST` declares the governed operation families for AI-assisted authoring:
|
|
402
162
|
|
|
403
163
|
- `resource.bind`
|
|
404
164
|
- `list.surface.configure`
|
|
@@ -410,12 +170,27 @@ Governed operation families:
|
|
|
410
170
|
- `permissions.set`
|
|
411
171
|
- `form.childOperation.delegate`
|
|
412
172
|
|
|
413
|
-
|
|
173
|
+
The manifest owns CRUD orchestration only. It delegates table, form, field, and dialog details to the canonical component owners.
|
|
414
174
|
|
|
415
|
-
|
|
175
|
+
## Public API
|
|
416
176
|
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
177
|
+
Main exports:
|
|
178
|
+
|
|
179
|
+
- `PraxisCrudComponent`
|
|
180
|
+
- `CrudLauncherService`
|
|
181
|
+
- `DynamicFormDialogHostComponent`
|
|
182
|
+
- `CrudMetadata`, `CrudActionFormContract`, `CrudDefaults`, `CrudParamMapping`
|
|
183
|
+
- `DialogService`
|
|
184
|
+
- `CrudPageHeaderComponent`
|
|
185
|
+
- `CrudMetadataEditorComponent`
|
|
186
|
+
- `PraxisCrudWidgetConfigEditor`
|
|
187
|
+
- `openCrudMetadataEditor`
|
|
188
|
+
- `CRUD_AI_CAPABILITIES`
|
|
189
|
+
- `PRAXIS_CRUD_AUTHORING_MANIFEST`
|
|
190
|
+
|
|
191
|
+
## Notes
|
|
420
192
|
|
|
421
|
-
|
|
193
|
+
- Avoid template getters that create new object/array references for CRUD context.
|
|
194
|
+
- Treat `actions[].params` and `actions[].form.initialValue` as input seeding for the launcher, not as automatic persistence rules.
|
|
195
|
+
- Keep UI-only/transient form fields in the dynamic form contract with the appropriate submit policy.
|
|
196
|
+
- Use the official documentation and quickstart for full route, drawer, modal, and backend examples.
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/crud",
|
|
3
|
-
"version": "9.0.0-beta.
|
|
3
|
+
"version": "9.0.0-beta.11",
|
|
4
4
|
"description": "CRUD building blocks for Praxis UI: integrates dynamic forms and tables with unified configuration and services.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^21.0.0",
|
|
7
7
|
"@angular/core": "^21.0.0",
|
|
8
|
-
"@praxisui/dynamic-form": "^9.0.0-beta.
|
|
9
|
-
"@praxisui/table": "^9.0.0-beta.
|
|
10
|
-
"@praxisui/core": "^9.0.0-beta.
|
|
11
|
-
"@praxisui/dynamic-fields": "^9.0.0-beta.
|
|
12
|
-
"@praxisui/settings-panel": "^9.0.0-beta.
|
|
8
|
+
"@praxisui/dynamic-form": "^9.0.0-beta.11",
|
|
9
|
+
"@praxisui/table": "^9.0.0-beta.11",
|
|
10
|
+
"@praxisui/core": "^9.0.0-beta.11",
|
|
11
|
+
"@praxisui/dynamic-fields": "^9.0.0-beta.11",
|
|
12
|
+
"@praxisui/settings-panel": "^9.0.0-beta.11",
|
|
13
13
|
"@angular/cdk": "^21.0.0",
|
|
14
14
|
"@angular/forms": "^21.0.0",
|
|
15
15
|
"@angular/material": "^21.0.0",
|
|
16
16
|
"@angular/router": "^21.0.0",
|
|
17
|
-
"@praxisui/ai": "^9.0.0-beta.
|
|
17
|
+
"@praxisui/ai": "^9.0.0-beta.11",
|
|
18
18
|
"rxjs": "~7.8.0"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
@@ -24,14 +24,7 @@
|
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
|
-
"
|
|
28
|
-
"type": "git",
|
|
29
|
-
"url": "https://github.com/codexrodrigues/praxis-ui-angular"
|
|
30
|
-
},
|
|
31
|
-
"homepage": "https://praxisui.dev",
|
|
32
|
-
"bugs": {
|
|
33
|
-
"url": "https://github.com/codexrodrigues/praxis-ui-angular/issues"
|
|
34
|
-
},
|
|
27
|
+
"homepage": "https://praxisui.dev/components/crud",
|
|
35
28
|
"keywords": [
|
|
36
29
|
"angular",
|
|
37
30
|
"praxisui",
|