@praxisui/core 10.0.0-rc.43 → 10.0.0-rc.44
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 +30 -12
- package/ai/component-registry.json +2 -2
- package/fesm2022/praxisui-core-schema.mjs +9 -5
- package/fesm2022/praxisui-core.mjs +1554 -757
- package/package.json +1 -1
- package/types/praxisui-core.d.ts +131 -59
package/README.md
CHANGED
|
@@ -800,6 +800,8 @@ it must not infer authorization from a `canonicalOperations` boolean or discard
|
|
|
800
800
|
|
|
801
801
|
`ResourceRecordOpenService` materializes the minimal `ResourceRecordOpenRef` published by governed analytics. It resolves the target resource catalog, loads the real item, follows its HATEOAS `surfaces` relation, requires the exact item surface to be available for the current context, and only then delegates to `ResourceSurfaceOpenAdapterService`. Consumers must not replace this flow with `${item.id}`, a copied surface path, a label match, or a prebuilt `surface.open` payload.
|
|
802
802
|
|
|
803
|
+
When a readable item surface (`VIEW` or `READ_PROJECTION` with `scope === 'ITEM'` and no `relatedResource` of its own) is materialized from a contextual surface catalog, `ResourceSurfaceOpenAdapterService.extractRelatedSurfaces` filters the sibling `ITEM` surfaces that are authorized (`availability.allowed === true`) and publish a complete `relatedResource` contract (`childResourceKey`, `childResourcePath`, `childParentField`), sorted by `order`, and attaches them to `payload.context.relatedSurfaces`. `PraxisSurfaceHostComponent` automatically composes a `[data-testid="surface-related-resources"]` section containing `<praxis-related-resource-outlet>` cards in `mode="open-action"` (`compact: true`) by default so opening a 360° dossier with multiple `1:N` child collections never triggers an N-table HTTP prefetch storm. Activating any card dispatches `surface.open` with the parent `surfaceRuntime`, pushing the child `<praxis-table>` onto the `SurfaceDrawerComponent` navigation stack (`pushFrame`/`backFrame`). Callers may opt into inline tables (`context.relatedResourcesMode = 'inline'`) or suppress the section (`context.relatedResourcesMode = 'off'`).
|
|
804
|
+
|
|
803
805
|
When a discovered item surface publishes `relatedResource`, `ResourceSurfaceOpenAdapterService` delegates to `RelatedResourceSurfaceResolverService`. The resulting table targets the canonical child resource and receives the parent identity through `queryContext.filters`; it does not prefetch the item projection and rebuild a host-local table before opening. When the child surface publishes `childParentField`, related create actions seed that field through `actions[].form.initialValue`, and both create/update command policies project it into `groupedCommand.contextFields`. The field therefore remains in the schema-backed form and submit payload without rendering a redundant lookup for context the dossier already established. The generated related-resource empty state is informational: CREATE remains the stable, capability-governed toolbar action instead of being duplicated inside the empty state. An explicit host `emptyState.actions` declaration is preserved when the product journey intentionally needs a different contextual action. The materializer declares `openMode: "drawer"` but does not redefine drawer geometry: positioning, viewport height, focus, and close behavior remain owned by `@praxisui/crud`. This keeps the drawer responsive and preserves child operations, empty states, endpoint routing, and resource identity from the backend contract.
|
|
804
806
|
|
|
805
807
|
The outlet's `ComponentDocMeta.configEditor` intentionally owns presentation only: `title`, `subtitle`, `icon`, `mode`, `presentation`, `compact`, and the closed copy/layout subset of `emptyState`. Opening it does not resolve runtime/materialized inputs. Apply and Save preserve every other persisted input opaquely, including Table-owned `tableConfig` and behavior-bearing empty-state fields. The relationship path, parent field/id, operation, filters, query context, surface and runtime state remain metadata/runtime-owned and cannot be authored by this editor or its AI manifest.
|
|
@@ -1352,24 +1354,40 @@ canonical hover/focus/click contextual dossier across `@praxisui/table`,
|
|
|
1352
1354
|
- **Metadata synthesis (`resolveFieldQuickViewBinding` & `reconcileFieldQuickViewBinding`)**:
|
|
1353
1355
|
Synthesizes `ResourceQuickViewBinding` from explicit `field.quickView`,
|
|
1354
1356
|
backend `x-ui.resourceReference` (`@ResourceReference`) or
|
|
1355
|
-
`x-ui.optionSource.detail`
|
|
1356
|
-
`
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
customizations (`previewSurfaceId`, `detailPresentation`, `triggerMode`,
|
|
1360
|
-
`hoverOpenDelayMs`).
|
|
1357
|
+
`x-ui.optionSource.detail` when it declares a `resourceKey`. The binding reuses
|
|
1358
|
+
`recordOpen.sourceIdentityField` and `recordOpen.target.resourceKey/surfaceId`;
|
|
1359
|
+
`previewSurfaceId` can select a separate read projection. Persisted presentation
|
|
1360
|
+
preferences must preserve the server-owned record target and identity field.
|
|
1361
1361
|
- **Context resolution (`resolveResourceQuickViewTarget`)**:
|
|
1362
|
-
Resolves `
|
|
1363
|
-
`
|
|
1362
|
+
Resolves `recordOpen.sourceIdentityField` from direct records or nested `row`,
|
|
1363
|
+
`item` and `values` envelopes, including dotted field paths, and extracts
|
|
1364
1364
|
scalar IDs (`id`, `value`, `key`) when a form control holds an entity-lookup
|
|
1365
1365
|
selection object.
|
|
1366
|
-
- **Enterprise security
|
|
1367
|
-
`ResourceQuickViewService`
|
|
1368
|
-
|
|
1369
|
-
|
|
1366
|
+
- **Enterprise security and request lifetime**:
|
|
1367
|
+
`ResourceQuickViewService` coalesces matching in-flight projections and invalidates
|
|
1368
|
+
the active generation on context changes; it does not retain a completed-record
|
|
1369
|
+
LRU cache. Every fresh open resolves the current item surface. The hover trigger
|
|
1370
|
+
waits 280 ms by default; explicit activation starts immediately. Discovery reads
|
|
1371
|
+
the resource catalog, the item and its contextual surfaces before resolving the
|
|
1372
|
+
filtered response schema and projection. A pending HTTP request can therefore
|
|
1373
|
+
outlive dismissal even though its obsolete result cannot update that popover.
|
|
1370
1374
|
Fields restricted by `x-ui.fieldAccess` are filtered or masked (`•••`) before
|
|
1371
1375
|
rendering, and `recordOpen` actions are validated against the item's
|
|
1372
1376
|
authorized `_links` / `surfaces` / `actions` snapshot.
|
|
1377
|
+
- **Metadata presentation**:
|
|
1378
|
+
Summary labels come from normalized domain metadata (`x-ui.label`), not field-name
|
|
1379
|
+
humanization. Explicit numeric `valuePresentation` uses the shared resolver and
|
|
1380
|
+
formatter for `currency`, `number` and `percentage`, including `currency.code`,
|
|
1381
|
+
zero precision and fractional `digitsInfo`. A presentation-level value config
|
|
1382
|
+
takes precedence over the field config. Existing field currency/decimal defaults
|
|
1383
|
+
remain the fallback when the explicit config omits them. Options, masking and
|
|
1384
|
+
presentation affixes retain their precedence. This numeric correction does not
|
|
1385
|
+
add support for compact notation or change the existing date/time formatting path.
|
|
1386
|
+
|
|
1387
|
+
Hosts must install `providePraxisQuickViewDialogPresenter()` from `@praxisui/dialog`.
|
|
1388
|
+
Bindings with `contentRef` also require the rich-content body renderer; the standard
|
|
1389
|
+
summary does not. Source changes require publication and consumer adoption before
|
|
1390
|
+
they can be claimed for an installed package.
|
|
1373
1391
|
|
|
1374
1392
|
### Optional editing highlight
|
|
1375
1393
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-11-
|
|
3
|
+
"generatedAt": "2026-11-09T21:30:37.724Z",
|
|
4
4
|
"packageName": "@praxisui/core",
|
|
5
|
-
"packageVersion": "10.0.0-rc.
|
|
5
|
+
"packageVersion": "10.0.0-rc.44",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 4,
|
|
@@ -1297,13 +1297,17 @@ function resolveFieldQuickViewBinding(candidate) {
|
|
|
1297
1297
|
candidate.optionSource.valuePropertyPath.trim().length > 0
|
|
1298
1298
|
? candidate.optionSource.valuePropertyPath.trim()
|
|
1299
1299
|
: 'id';
|
|
1300
|
-
// Quando o campo possui optionSource e seu nome não
|
|
1301
|
-
// optionValueProperty (
|
|
1302
|
-
// campo irmão
|
|
1300
|
+
// Quando o campo possui optionSource e seu nome não coincide com rawValueField, um valueField
|
|
1301
|
+
// igual a 'id'/'value'/'key' ou a optionValueProperty (ex.: 'numero', 'codigo') refere-se à
|
|
1302
|
+
// chave do OptionDTO e nunca ao campo irmão 'id' do registro pai.
|
|
1303
|
+
const isOptionKeyAlias = rawValueField === 'id' ||
|
|
1304
|
+
rawValueField === 'value' ||
|
|
1305
|
+
rawValueField === 'key' ||
|
|
1306
|
+
rawValueField === optionValueProperty;
|
|
1303
1307
|
const effectiveSiblingValueField = rawValueField &&
|
|
1304
1308
|
(!candidate.optionSource ||
|
|
1305
|
-
fieldName ===
|
|
1306
|
-
|
|
1309
|
+
fieldName === rawValueField ||
|
|
1310
|
+
!isOptionKeyAlias)
|
|
1307
1311
|
? rawValueField
|
|
1308
1312
|
: '';
|
|
1309
1313
|
const refCandidate = candidate.resourceReference?.resourceKey
|