@praxisui/dynamic-form 9.0.0-beta.30 → 9.0.0-beta.31
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 +22 -0
- package/ai/component-registry.json +134 -10
- package/docs/schema-driven-layout-materialization-rfc.md +43 -1
- package/fesm2022/praxisui-dynamic-form.mjs +210 -106
- package/package.json +8 -8
- package/src/lib/praxis-dynamic-form.json-api.md +1 -1
- package/types/praxisui-dynamic-form.d.ts +11 -7
|
@@ -101,6 +101,18 @@ export type DynamicFormLayoutPersistence = 'transient' | 'authorable';
|
|
|
101
101
|
|
|
102
102
|
export type DynamicFormLayoutDetachBehavior = 'none' | 'explicit';
|
|
103
103
|
|
|
104
|
+
export interface DynamicFormDetailSummaryPolicy {
|
|
105
|
+
includeFields?: readonly string[];
|
|
106
|
+
excludeFields?: readonly string[];
|
|
107
|
+
includeGroups?: readonly string[];
|
|
108
|
+
excludeGroups?: readonly string[];
|
|
109
|
+
includeRoles?: readonly string[];
|
|
110
|
+
excludeRoles?: readonly string[];
|
|
111
|
+
maxFields?: number;
|
|
112
|
+
fieldPriority?: Record<string, number>;
|
|
113
|
+
groupPriority?: Record<string, number>;
|
|
114
|
+
}
|
|
115
|
+
|
|
104
116
|
export interface DynamicFormLayoutPolicy {
|
|
105
117
|
source: DynamicFormLayoutSource;
|
|
106
118
|
preset?: DynamicFormSchemaLayoutPreset;
|
|
@@ -110,6 +122,7 @@ export interface DynamicFormLayoutPolicy {
|
|
|
110
122
|
detachBehavior?: DynamicFormLayoutDetachBehavior;
|
|
111
123
|
schemaOperation?: 'detail' | 'create' | 'update' | 'view';
|
|
112
124
|
schemaType?: 'request' | 'response';
|
|
125
|
+
detailSummary?: DynamicFormDetailSummaryPolicy;
|
|
113
126
|
}
|
|
114
127
|
```
|
|
115
128
|
|
|
@@ -147,11 +160,40 @@ Expected behavior:
|
|
|
147
160
|
- In `mode="view"`, activate presentation rendering when the host does not explicitly provide `presentationModeGlobal`; an explicit `false` keeps the same schema in traditional read-only controls.
|
|
148
161
|
- Honor explicit schema `x-ui.width` as 12-column spans so migrated operational detail screens can use dense fieldset rows. Preserve full-width rows when width is absent.
|
|
149
162
|
- Derive compact section header icons from semantic group roles (`identity`, `rules`, `markers`) while keeping field-level icons owned by existing schema metadata.
|
|
163
|
+
- Allow `layoutPolicy.detailSummary` to select/exclude fields and groups, cap the first compact panel with `maxFields`, and sort with field/group priority when the schema publishes summary/detail roles or priorities.
|
|
164
|
+
- Keep excluded summary fields out of generated rows and mark them hidden in generated field metadata for that transient compact surface, without mutating backend schema semantics.
|
|
150
165
|
|
|
151
166
|
This preset is the platform replacement for local read-only detail sections in migrated screens.
|
|
152
167
|
|
|
153
168
|
This RFC keeps the existing public `compactPresentation` vocabulary. It does not introduce `compactGroupedDetail` as a second public alias during beta.
|
|
154
169
|
|
|
170
|
+
Example policy for a master-detail read-only summary:
|
|
171
|
+
|
|
172
|
+
```ts
|
|
173
|
+
const detailLayoutPolicy: DynamicFormLayoutPolicy = {
|
|
174
|
+
source: 'schema',
|
|
175
|
+
intent: 'detail',
|
|
176
|
+
preset: 'compactPresentation',
|
|
177
|
+
lifecycle: 'live',
|
|
178
|
+
persistence: 'transient',
|
|
179
|
+
schemaType: 'response',
|
|
180
|
+
detailSummary: {
|
|
181
|
+
includeGroups: [
|
|
182
|
+
'Identificacao',
|
|
183
|
+
'Marcadores',
|
|
184
|
+
'Aplicabilidade/preenchimento',
|
|
185
|
+
],
|
|
186
|
+
excludeGroups: ['Escopo', 'Quantidades', 'Empresa'],
|
|
187
|
+
maxFields: 8,
|
|
188
|
+
fieldPriority: {
|
|
189
|
+
codigo: 0,
|
|
190
|
+
mnemonico: 1,
|
|
191
|
+
ativo: 2,
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
};
|
|
195
|
+
```
|
|
196
|
+
|
|
155
197
|
### `groupedCommand`
|
|
156
198
|
|
|
157
199
|
Use for create/edit command forms.
|
|
@@ -377,7 +419,7 @@ Use `layoutPolicy` only when schema metadata is complete enough to generate the
|
|
|
377
419
|
|
|
378
420
|
| Surface | Recommended policy | Schema source | Notes |
|
|
379
421
|
| --- | --- | --- | --- |
|
|
380
|
-
| Read-only detail panel | `source: "schema"`, `intent: "detail"`, `preset: "compactPresentation"`, `persistence: "transient"` | response schema | Use for legacy detail blocks such as identification, rules and markers. |
|
|
422
|
+
| Read-only detail panel | `source: "schema"`, `intent: "detail"`, `preset: "compactPresentation"`, `persistence: "transient"`, optional `detailSummary` | response schema | Use for legacy detail blocks such as identification, rules and markers. |
|
|
381
423
|
| Create/edit drawer or dialog | `source: "schema"`, `intent: "command"`, `preset: "groupedCommand"`, `persistence: "transient"` | request schema | Use only after command DTO metadata and write API gates are ready. |
|
|
382
424
|
| Custom visual composition | `source: "authored"` | authored config | Use for genuinely custom content, embedded child resources or non-field visual blocks. |
|
|
383
425
|
| Transitional migration | authored sections plus schema-owned field metadata | response/request schema | Acceptable while DTO grouping is being corrected; document the temporary debt. |
|