@praxisui/core 10.0.0-rc.7 → 10.0.0-rc.71
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 +519 -13
- package/ai/component-registry.json +521 -372
- package/fesm2022/praxisui-core-micro-visualization.mjs +212 -0
- package/fesm2022/praxisui-core-schema.mjs +3545 -602
- package/fesm2022/praxisui-core.mjs +92118 -49298
- package/package.json +5 -1
- package/theme-bridge.css +268 -9
- package/theming/_micro-visualization.scss +103 -0
- package/theming/_theming.scss +382 -102
- package/theming/index.scss +1 -0
- package/theming/workspace-themes.scss +519 -0
- package/types/praxisui-core-micro-visualization.d.ts +70 -0
- package/types/praxisui-core-schema.d.ts +1083 -170
- package/types/praxisui-core.d.ts +19507 -11422
package/README.md
CHANGED
|
@@ -4,12 +4,227 @@ Shared contracts, tokens, services, metadata models, widget runtime primitives,
|
|
|
4
4
|
|
|
5
5
|
Use this package directly when a host application or library needs Praxis UI types, global actions, metadata registries, schema clients, resource discovery, i18n, theme bridge, dynamic widget contracts, or shared runtime services.
|
|
6
6
|
|
|
7
|
+
`DomainRuleSnapshotGovernanceState` includes `WITHDRAWN`. A withdrawn head is
|
|
8
|
+
not executable (`executionReady=false`); its last selected snapshot key and
|
|
9
|
+
current ETag/revision are audit and concurrency information. Consumers must not
|
|
10
|
+
infer activation from the presence of that key. `DomainRuleService.withdrawSnapshotHead`
|
|
11
|
+
(`POST /api/praxis/config/domain-rules/snapshots/withdrawals`) submits a strong
|
|
12
|
+
`If-Match` precondition and an auditable `reason` (`1..1000` characters) to
|
|
13
|
+
record a tombstone head (`DomainRuleSnapshotWithdrawalResponse`), while
|
|
14
|
+
`DomainRuleService.getSnapshotHeadSet` (`GET /api/praxis/config/domain-rules/snapshots/head-set`)
|
|
15
|
+
reads a consistent, non-withdrawn multi-operation head bundle (`1..64` unique
|
|
16
|
+
`operationKeys`). Reentry after withdrawal requires the backend's governed
|
|
17
|
+
`REQUIRED` rollout (`createRollout` with the withdrawn head's `If-Match`) and
|
|
18
|
+
fresh preload quorum (`DomainRuleCandidateProbeResponse`).
|
|
19
|
+
|
|
20
|
+
## Global dynamic pages defaults (`GlobalConfig.pages`)
|
|
21
|
+
|
|
22
|
+
`GlobalConfigService` supports `pages.defaults` (`GlobalDynamicPagesDefaultsConfig`) through `provideGlobalConfig` and runtime overrides:
|
|
23
|
+
|
|
24
|
+
- `layoutPreset`: Optional default `WidgetPageLayoutPresetId` when a page omits an explicit `layoutPreset`
|
|
25
|
+
- `themePreset`: Default `WidgetPageThemePresetId` (`operational-command`, `executive-clarity`, `editorial-canvas`)
|
|
26
|
+
- `shellPreset`: Default widget shell preset (`default`, `minimal`, `borderless`, `outlined`, `elevated`, `compact`, `spacious`)
|
|
27
|
+
- `columns` (1–24), `gap`, `paddingInline`, and `autoRows` (`fixed` | `content`)
|
|
28
|
+
|
|
29
|
+
`DynamicWidgetPageComponent` resolves page presentation with strict precedence:
|
|
30
|
+
`authored page property > GlobalConfig.pages.defaults > builtin preset/component fallback`, without polluting persisted canonical page documents with global defaults.
|
|
31
|
+
|
|
32
|
+
## Closed page authoring profile
|
|
33
|
+
|
|
34
|
+
The additive page codec validates and preserves the Config-owned publication
|
|
35
|
+
profile, copies typed widget/link identities and materializes stable route/child
|
|
36
|
+
identities. Structural success is distinct from native validation and server
|
|
37
|
+
admission. See [the codec contract](https://github.com/codexrodrigues/praxis-ui-angular/blob/main/projects/praxis-core/docs/page-publication-codec.md) for APIs,
|
|
38
|
+
limits, examples and evidence scope. This API alone does not activate publication.
|
|
39
|
+
|
|
40
|
+
## Runtime isolation and authoring policy safeguards
|
|
41
|
+
|
|
42
|
+
`DynamicWidgetPageComponent` enforces strict fail-closed isolation and authoring integrity across owner transitions and layout commits:
|
|
43
|
+
|
|
44
|
+
- **Owner & auto-persist fail-closed restoration**: when `persistenceOwnerKey`, `componentInstanceId`, or `pageIdentity` changes (or when `autoPersist` transitions from `true` to `false`), Core immediately clears `widgetShellRenderCache` and restores `factoryPageDefinition` before any asynchronous persisted load resolves—ensuring failed or slow storage reads never leak widgets from the previous owner or disabled persistence scope.
|
|
45
|
+
- **`WidgetInstanceAuthoringPolicy` runtime enforcement**: `removable: false`, `duplicable: false`, and `lockShellKind: true` (`shell.kind` and `shell.showHeader`) are re-enforced during `applyPageLayout` alongside shell mutations, restoring protected widgets and their baseline canvas coordinates even when external layout patches drop them.
|
|
46
|
+
- **Hidden row compaction on responsive reflow**: `computeCollapsedHiddenRows` compacts empty collapsed rows even when hidden widgets reflow onto narrow tablet or mobile breakpoints without explicit per-device `col`/`row` overrides.
|
|
47
|
+
|
|
48
|
+
## Context-bound runtime navigation
|
|
49
|
+
|
|
50
|
+
`EnterpriseRuntimeContextService.navigation({ parentRef?, cursor?, pageSize? })`
|
|
51
|
+
reads one page from the host's existing `/api/praxis/runtime/navigation` endpoint.
|
|
52
|
+
It waits for a confirmed ready context and sends its `X-Praxis-Context-Version`
|
|
53
|
+
with the existing authenticated host headers. `pageSize` defaults to 50 (1–100);
|
|
54
|
+
`parentRef` is a canonical group UUID and the opaque cursor is bounded to 4096
|
|
55
|
+
characters. Omit `parentRef` for roots; use a returned group ID for its children.
|
|
56
|
+
The server remains responsible for current authorization, cursor admission,
|
|
57
|
+
ordering and the complete authorized projection.
|
|
58
|
+
|
|
59
|
+
The response uses `praxis-enterprise-runtime-navigation.v1` and requires `nodes`,
|
|
60
|
+
`capabilities`, `contextVersion`, `receiptEtag`, `headReceipts`, `nextCursor` and
|
|
61
|
+
`resolvedAt`; empty arrays and a null `nextCursor` are valid. Nodes can carry an
|
|
62
|
+
admitted icon identifier, and `children: null` denotes on-demand loading. Head
|
|
63
|
+
receipts use Core's existing `UiLayoutReleaseHeadReceipt`. The semantic read
|
|
64
|
+
receipt is distinct from each strong write `headEtag`; Core does not introduce
|
|
65
|
+
navigation caching or send `If-None-Match` in this slice.
|
|
66
|
+
|
|
67
|
+
The service captures the local context generation before awaiting readiness and
|
|
68
|
+
rejects stale success/error responses with `EnterpriseRuntimeContextObsoleteError`,
|
|
69
|
+
including A → B → A and a response confirming another context. An unconfirmed
|
|
70
|
+
context fails before navigation dispatch. HTTP errors in the current generation
|
|
71
|
+
remain HTTP errors; callers must handle unavailable or stale continuations rather
|
|
72
|
+
than silently restarting or combining pages. A cursor never grants access.
|
|
73
|
+
|
|
74
|
+
This is the Core wire/transport slice of [Config's frozen P3-B design](https://github.com/codexrodrigues/praxis-config-starter/blob/c161609f14ffcdc39024e66a886a1bd5df471fc8/docs/ai/contracts/page-publication-p0/P3B-DESIGN.md).
|
|
75
|
+
It does not install a host navigation provider. An absent provider remains
|
|
76
|
+
`503 RUNTIME_PROVIDER_UNAVAILABLE`. Shell rendering, published-page routes and
|
|
77
|
+
their visual E2E remain P4; real host HTTP proof remains P3-C. A service HTTP spec
|
|
78
|
+
and a direct-consumer build do not establish those later integrations.
|
|
79
|
+
|
|
80
|
+
### Context lifecycle & cross-filter coordination primitives
|
|
81
|
+
|
|
82
|
+
- **`EnterpriseRuntimeContextLifecycleState` (`lifecycleState` / `isSwitching`):** `EnterpriseRuntimeContextService` exposes a readonly `lifecycleState` signal (`'idle' | 'loading' | 'switching' | 'ready' | 'error'`) and `isSwitching` getter so analytical surfaces mounted mid-switch defer remote queries until a context with `state === 'ready'` is confirmed; non-ready snapshots (`'selection-required'`, `'selection-invalid'`) transition to `'idle'` with `effectiveContext === null`.
|
|
83
|
+
- **Cross-filter & KPI micro-visualization metadata:** `PraxisCrossFilterSourceEntry.dimensionField` and `PraxisKpiInteractionSpec.crossFilter.{cardinality, dimensionField}` declare explicit analytical dimension identity and wire cardinality (`'scalar' | 'list'`) independently of field-naming heuristics, while `PraxisPresentationVisualizationConfig.activeSelectionCount` lets multi-value `stackedBar` segments distinguish incremental filter removal from full filter reset in assistive announcements.
|
|
84
|
+
|
|
85
|
+
## Contextual table defaults
|
|
86
|
+
|
|
87
|
+
`createDefaultTableConfig()` leaves `pagination.strategy` and `sorting.strategy`
|
|
88
|
+
unset. These shared contracts cannot choose a data source: `@praxisui/table`
|
|
89
|
+
infers server processing for remote data and client processing for local data.
|
|
90
|
+
Explicit `client` or `server` choices remain authored choices. Optional strategy
|
|
91
|
+
properties allow sparse metadata and editor resets to preserve contextual
|
|
92
|
+
resolution; `auto` is not a public serialized value.
|
|
93
|
+
|
|
94
|
+
## Governed bulk client: basic synchronous slice
|
|
95
|
+
|
|
96
|
+
`requestCancellation(contract, executionId)` follows the published cancel binding.
|
|
97
|
+
Cancellation is cooperative: the returned server state is authoritative, including
|
|
98
|
+
an execution that already completed. It does not undo confirmed items. Use
|
|
99
|
+
`readExecution` and `readResults` to resume observation from a retained execution ID.
|
|
100
|
+
|
|
101
|
+
`BulkOperationClientService` consumes the Metadata published `BulkExecutionContract`
|
|
102
|
+
from an action or CRUD capability. `discoverAction` and `discoverCapability` use the
|
|
103
|
+
existing resource discovery surface; operation paths and filtered schema URLs come
|
|
104
|
+
from that descriptor. `evaluationSchema` loads the backend's filtered request schema
|
|
105
|
+
for a caller to render the operation's form. The client admits only `SYNC`,
|
|
106
|
+
`EXPLICIT` and `PER_ITEM` in this first Angular slice. A descriptor that also
|
|
107
|
+
advertises query selection is usable only with an explicit target request here.
|
|
108
|
+
|
|
109
|
+
The Quickstart candidate migrates its existing uniform update operation to an
|
|
110
|
+
`ASYNC`-only profile; that host adoption is still being validated. BASIC omits
|
|
111
|
+
an `ASYNC`-only operation without a `SYNC` fallback. Angular ASYNC support needs
|
|
112
|
+
its own consumer implementation and acceptance; this note does not establish a
|
|
113
|
+
Render deployment or an ASYNC UI journey.
|
|
114
|
+
|
|
115
|
+
Provide the exact wire ID and opaque resource `expectedVersion` for every selected
|
|
116
|
+
target. In particular, int64/Long IDs remain decimal strings; do not convert them
|
|
117
|
+
through JavaScript numbers. Evaluate first, review the returned READY or BLOCKED
|
|
118
|
+
proposal and its authorized paged results, then confirm a READY proposal using
|
|
119
|
+
only `{ proposalId }` and one `Idempotency-Key`. `BulkSyncStateService.createSession`
|
|
120
|
+
keeps that key fixed across a retry of the same confirmation. A new intention gets
|
|
121
|
+
a new session. The key and proposal live only in that session; it makes no claim
|
|
122
|
+
of recovery across a page reload.
|
|
123
|
+
|
|
124
|
+
For a selected collection row that publishes a `self` link,
|
|
125
|
+
`readTargetVersion(row._links, wireId, identityPath, options)` reads that exact
|
|
126
|
+
item, verifies its returned identity and returns the original strong quoted ETag
|
|
127
|
+
as `expectedVersion`. It rejects absent/weak ETags, foreign origins and mismatched
|
|
128
|
+
IDs. Callers should bound concurrent reads and cancel them when their resource
|
|
129
|
+
context closes. A row value, schema ETag or locally inferred URL is not a resource
|
|
130
|
+
version.
|
|
131
|
+
|
|
132
|
+
```ts
|
|
133
|
+
const contract = await firstValueFrom(bulkClient.discoverCapability(resourceResponse, operationId));
|
|
134
|
+
const session = bulkState.createSession(contract);
|
|
135
|
+
const proposal = await session.evaluate(explicitSyncRequest);
|
|
136
|
+
const preview = await firstValueFrom(bulkClient.readProposalResults(contract, proposal.proposalId));
|
|
137
|
+
// Present proposal and preview to the person; a BLOCKED proposal cannot be confirmed.
|
|
138
|
+
|
|
139
|
+
// In a separate, explicit confirmation action for a READY proposal:
|
|
140
|
+
await session.confirm(idempotencyKeyForThisIntent);
|
|
141
|
+
// On an uncertain HTTP failure, retain this session and retry with the same key.
|
|
142
|
+
// The host schedules further authorized readbacks for an accepted nonterminal execution.
|
|
143
|
+
const reads = new AbortController(); // This view owns GET lifetime, not confirmation custody.
|
|
144
|
+
if (!session.isTerminal()) await session.refreshExecution(reads.signal);
|
|
145
|
+
if (session.isTerminal()) {
|
|
146
|
+
const results = await session.readResults(200, undefined, reads.signal);
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
`resourceResponse`, `operationId`, the explicit request and the key come from the
|
|
151
|
+
caller's governed selection and form flow; the client resolves operation URLs from
|
|
152
|
+
the descriptor. The caller controls when to read status again and presents each
|
|
153
|
+
authorized page of results. This example is a service integration sketch, not a
|
|
154
|
+
ready visual workflow or a deployment claim.
|
|
155
|
+
|
|
156
|
+
`refreshExecution(signal?)` and `readResults(size?, after?, signal?)` retain their
|
|
157
|
+
Promise API and optionally accept a standard `AbortSignal`. An already aborted
|
|
158
|
+
signal dispatches no GET; abort unsubscribes the actual HTTP request, releases the
|
|
159
|
+
read slot, and prevents a late Promise continuation from updating the session.
|
|
160
|
+
Abort listeners are removed on success, failure and cancellation. A cancelled GET
|
|
161
|
+
keeps the original proposal, confirmation key and accepted execution; it does not
|
|
162
|
+
mark that execution terminal or prove rollback. A new authorized read may observe
|
|
163
|
+
the same execution. Overlapping execution refreshes remain rejected, while an
|
|
164
|
+
aborted generation cannot release the slot of its successor.
|
|
165
|
+
|
|
166
|
+
The caller owns GET cancellation and its observation budget; the Core session does
|
|
167
|
+
not invent a global read timeout. Use a fresh read lifetime for a fresh consultation
|
|
168
|
+
and abort reads when the owning view closes. Do not race a Promise with a timer:
|
|
169
|
+
connect the signal to the read itself so the HTTP subscription is torn down.
|
|
170
|
+
`evaluate` and `confirm` do not accept this signal: a dispatched POST and its original
|
|
171
|
+
key stay in intent custody across view teardown. GET failure/cancellation must never
|
|
172
|
+
start a new evaluation or confirmation automatically.
|
|
173
|
+
|
|
174
|
+
The backend is the authority on proposal expiry. A client clock hint must not
|
|
175
|
+
block a same-key replay after an uncertain confirmation; the backend may return
|
|
176
|
+
409 or 410 and the host must explain that state without inventing a new intent.
|
|
177
|
+
|
|
178
|
+
HTTP 202, `RUNNING`, `CANCEL_REQUESTED` and `RECONCILIATION_REQUIRED` are not
|
|
179
|
+
business success. Read the authorized execution until its reconciled terminal
|
|
180
|
+
state and use the paged result reader for each item outcome. Preserve backend
|
|
181
|
+
errors (including 409, 410, 429 and 503) for the host's governed UX mapping;
|
|
182
|
+
do not turn them into a new submission with a new key. The backend continues to
|
|
183
|
+
own authorization, policy, identity, idempotency, limits and the domain transaction.
|
|
184
|
+
The table library has a candidate visual path for a published CRUD
|
|
185
|
+
`bulk-update` capability in `UNIFORM_UPDATE` mode. It uses this client and a
|
|
186
|
+
separate review/confirmation surface; it does not add a second backend contract.
|
|
187
|
+
The service also supports typed command and per-item requests, but that table
|
|
188
|
+
surface does not advertise them. Query selection, ASYNC jobs and ATOMIC mode are
|
|
189
|
+
outside this Angular slice. This is not a claim that the reference host or full
|
|
190
|
+
backend B7 acceptance is complete.
|
|
191
|
+
|
|
192
|
+
## Published asynchronous execution tracking
|
|
193
|
+
|
|
194
|
+
`PraxisBulkClientService.waitForExecution` is separate from the BASIC client
|
|
195
|
+
above. Use its published execution operation only when that operation actually
|
|
196
|
+
supports the asynchronous profile; an enum member does not enable a backend
|
|
197
|
+
profile. The Observable emits one canonical terminal snapshot, preserving
|
|
198
|
+
`COMPLETED`, `COMPLETED_WITH_ERRORS`, `CANCELLED`, `STOPPED` and
|
|
199
|
+
`RECONCILIATION_REQUIRED`. `CANCEL_REQUESTED` remains pending.
|
|
200
|
+
|
|
201
|
+
Each subscription starts its own strict overall deadline. At most one GET is in
|
|
202
|
+
flight: interval ticks do not abort a useful slow read or queue overlapping reads.
|
|
203
|
+
Pending responses do not renew the deadline, which also bounds a GET that never
|
|
204
|
+
responds. Terminal completion, transport error, deadline and unsubscribe release
|
|
205
|
+
the active read and polling timers; a late response cannot revive an expired
|
|
206
|
+
subscription. Stopping a GET does not reverse server effects or cancel a POST.
|
|
207
|
+
|
|
208
|
+
A read failure means the outcome is unknown. Explicitly resume reads for the same
|
|
209
|
+
execution and preserve the original proposal and confirmation key; do not confirm
|
|
210
|
+
or evaluate again to restore progress. This transport does not provide custody
|
|
211
|
+
across closing/reopening a dialog, reload recovery or operational ASYNC acceptance.
|
|
212
|
+
|
|
7
213
|
## Governed color palettes
|
|
8
214
|
|
|
9
215
|
`materializeGovernedPaletteEntries(palette, purposes)` returns `MaterializedGovernedColorToken[]`, pairing each original `entry` with its resolved `color`. It preserves distinct token IDs even when CSS references/colors match, applies purpose filtering, and resolves fallback dependencies against the complete palette. Use this projection for identified swatches; do not zip color arrays to entries or infer identity from color equality. `materializeGovernedPaletteColors` remains the string-only projection of the same resolver.
|
|
10
216
|
|
|
11
217
|
`GovernedColorPaletteService` is the canonical Angular client for color-palette projections published by Praxis Config. Published palettes carry a stable `familyKey`, an explicit `variant` identity and token-level `displayName`/`aliases`; incomplete legacy projections are rejected before caching. The service supports list/read/capabilities/preview, exact `list(familyKey)` queries, tenant/environment-isolated caching, conditional ETag revalidation and deterministic `version`/`etag` pins. Consumers may use names and aliases for presentation and discovery only: `paletteKey` and `tokenId` remain the persisted identities, and local metadata must not become a second source of governance. `GovernedColorTokenSelection` carries the exact palette/version/ETag/token observation beside the existing CSS-string field value; applications persist it only through an explicit domain field or mapping.
|
|
12
218
|
|
|
219
|
+
## Declarative Page DataSources (`page.dataSources`)
|
|
220
|
+
|
|
221
|
+
`WidgetPageDefinition.dataSources` and `WidgetPageDataSourceRuntimeService` allow dynamic pages and dashboards to fetch backend KPIs, group-by aggregations, and time-series metrics without imperative host `HttpClient` orchestration:
|
|
222
|
+
|
|
223
|
+
- **Endpoint resolution (`endpointKey` + `resourcePath`)**: resolves URLs through the `API_URL` token using `endpointKey` (falling back to `'default'`) so multi-service enterprise hosts route each DataSource to its target microservice.
|
|
224
|
+
- **Transform presets & JsonLogic**: supports `{ kind: 'path', path }`, `{ kind: 'group-by-map', mappings, totalField }` (initializing declared keys with `0` for sparse buckets), `{ kind: 'timeseries-last', mappings }`, or arbitrary JsonLogic expressions.
|
|
225
|
+
- **Transient state overlay (`targetStatePath`)**: merges resolved payloads into a non-persisted runtime overlay over `page.state.values[targetStatePath]` and coalesces concurrent emissions via microtask batching before re-evaluating `page.state.derived` and `composition.links`. Live runtime payloads never dirty `authoredPageDefinition` or trigger `autoPersist` writes.
|
|
226
|
+
- **Resilience & visibility-aware polling**: `errorPolicy` (`'fallback' | 'silent' | 'propagate'`) applies `fallbackValue` only before the first successful response so transient network errors during polling (`refreshIntervalMs`) never overwrite live data with static fallbacks. Subsequent poll ticks pause while `document.visibilityState === 'hidden'` and resume immediately on `visibilitychange`.
|
|
227
|
+
|
|
13
228
|
## LLM Recommendation Guide
|
|
14
229
|
|
|
15
230
|
- `BUILTIN_WIDGET_SHELL_PRESETS` is the canonical catalog for reusable shell
|
|
@@ -31,6 +246,9 @@ Use this package directly when a host application or library needs Praxis UI typ
|
|
|
31
246
|
through `context.ui.shell.presets`, then widget-specific `appearance`; use CSS
|
|
32
247
|
variables there for corporate theming. The `dark-glass` and `graphite` material palettes remain dark by default;
|
|
33
248
|
adaptive finishes follow the host Material tokens. Do not mutate either exported catalog to configure an application.
|
|
249
|
+
Shell titles use the host Material title-medium weight by default, including
|
|
250
|
+
expanded and fullscreen states; `appearance.typography.titleWeight` remains
|
|
251
|
+
the more specific widget-authored override at desktop and narrow viewports.
|
|
34
252
|
The deliberate `frameless` inset improvement differs from 9.0.67: persist
|
|
35
253
|
`appearance.body.padding: "0"` when the original edge-to-edge layout is required.
|
|
36
254
|
- `WidgetShellConfig.stickyHeader: true` retains the existing composition-derived
|
|
@@ -209,6 +427,12 @@ Peer dependencies:
|
|
|
209
427
|
- `@angular/common`, `@angular/core`, `@angular/forms`, `@angular/material`, `@angular/platform-browser`, `@angular/router` `^21.0.0`
|
|
210
428
|
- `rxjs` `~7.8.0`
|
|
211
429
|
|
|
430
|
+
## Resource HTTP responses and revision custody
|
|
431
|
+
|
|
432
|
+
`GenericCrudService.getByIdHttpResponse(id, options?)` and `updateHttpResponse(id, entity, options?)` expose the original `HttpResponse<RestApiResponse<T>>`, pairing a representation with its response headers. Existing `getById`, `getByIdResponse`, `update` and `updateResponse` keep their original DTO/envelope return shapes.
|
|
433
|
+
|
|
434
|
+
`CrudOperationOptions.resourceVersion` overrides a write's shared item cache: a strong quoted ETag supplies the exact `If-Match`, `null` intentionally omits that precondition, and `undefined` preserves existing cache → DTO `resourceVersion` fallback (or the configured header when neither is present). Consumers that edit a captured representation must provide its original revision, rather than a revision obtained by another read. `readStrongResourceEtag` validates a single strong tag without normalizing its bytes; weak, unquoted and multi-valued headers cannot stand in for a write revision. An explicitly invalid/weak response header clears the previous cached token. When the header is absent, the existing Core cache can capture DTO `resourceVersion`; this legacy/manual fallback does not authorize an automatic Form snapshot. Explicit overrides never fall back to cached, DTO or configured tokens.
|
|
435
|
+
|
|
212
436
|
## Theme And Icons
|
|
213
437
|
|
|
214
438
|
### Canonical SCSS Theming (Recommended)
|
|
@@ -272,8 +496,11 @@ Hosts should load the icon fonts they use. Without the classic Material Icons fo
|
|
|
272
496
|
Use `PraxisIconButtonComponent` for icon-only actions. It keeps the native
|
|
273
497
|
`button` contract, centers the glyph, and preserves a 44px pointer target even
|
|
274
498
|
when the visible surface is compact. It accepts the same `mi:`, `mso:`, `msr:`
|
|
275
|
-
and `mss:` icon-family prefixes as `PraxisIconDirective`;
|
|
276
|
-
|
|
499
|
+
and `mss:` icon-family prefixes as `PraxisIconDirective`; explicit prefixes
|
|
500
|
+
always select their named family. Unprefixed names follow the configured
|
|
501
|
+
`MatIconRegistry` default for Material Icons or Symbols (outlined, rounded, or
|
|
502
|
+
sharp). Without a configured Symbols default, they retain legacy Material Icons
|
|
503
|
+
behavior; `providePraxisIconDefaults()` selects Symbols Outlined.
|
|
277
504
|
|
|
278
505
|
```ts
|
|
279
506
|
import { Component, signal } from "@angular/core";
|
|
@@ -407,6 +634,17 @@ identity (`USER` when `X-User-ID` is present), and never sends a tenant ETag as
|
|
|
407
634
|
`If-Match` for that user-owned write. Editing or deleting the tenant document
|
|
408
635
|
requires an explicitly tenant-scoped provider.
|
|
409
636
|
|
|
637
|
+
`ApiConfigStorageOptions.canRead?: () => boolean` gates read requests (`loadConfig` and `loadConfigDocument`) when configured. Returning `false` skips remote GET dispatches and emits `null`, allowing hosts with deferred or session-gated authentication to avoid premature pre-session reads without replacing backend authorization.
|
|
638
|
+
|
|
639
|
+
`ApiConfigStorageOptions.canWrite?: () => boolean` and `ApiConfigStorageOptions.canWriteScope?: (scope: ConfigStorageScope) => boolean` gate remote config writes/clears (`saveConfig`, `clearConfig`, `deletePersonalOverrideAndReloadTenantBaseline`) and runtime scope switches (`setWriteScope`, `toggleWriteScope`). Both predicates are evaluated lazily inside `defer()`, complete without emitting (`EMPTY`, "not acknowledged" per `AsyncConfigStorage` semantics) without dispatching HTTP PUT/DELETE when denied, and expose `storage.canWriteConfig(key, options)` so runtimes like `DynamicWidgetPageComponent` avoid false `'saved'` states when writes are disabled. `providePraxisGlobalConfigBootstrap` also forwards `canRead`, `canWrite`, `canWriteScope`, `writeScope`, and `resolveWriteScope` into `ApiConfigStorageOptions`.
|
|
640
|
+
|
|
641
|
+
### Workspace Customization Governance (`PraxisCustomizationModeService`)
|
|
642
|
+
|
|
643
|
+
`PraxisCustomizationModeService` coordinates layout customization across `@praxisui/core`, `@praxisui/page-builder`, `@praxisui/crud`, and `PraxisAppShellComponent`:
|
|
644
|
+
|
|
645
|
+
- `disableCustomization(reason?: string | null): () => void`: acquires a token-scoped lock (`isAvailable()` becomes `false`, `unavailableReason()` exposes the active lock reason, `isDisabled()` becomes `true`, and active customization exits automatically). Calling the returned release callback restores availability once all locks are released.
|
|
646
|
+
- `PraxisAppShellComponent` reflects `unavailableReason()` on the customization toggle's accessible metadata and blocks toggles while `isDisabled()` is `true`.
|
|
647
|
+
|
|
410
648
|
## Dynamic Page Runtime
|
|
411
649
|
|
|
412
650
|
`DynamicWidgetPageComponent` renders `WidgetPageDefinition` documents.
|
|
@@ -439,6 +677,20 @@ export class PageComponent {
|
|
|
439
677
|
|
|
440
678
|
Use `page.composition.links` for persisted wiring. `page.connections` is legacy/residual and should not be used for new pages or examples. Nested component ports should use `component-port` endpoints with `ref.nestedPath`.
|
|
441
679
|
|
|
680
|
+
### Transient runtime overlays and persistence hooks
|
|
681
|
+
|
|
682
|
+
`DynamicWidgetPageComponent.patchWidgetInputs(widgetKey, inputsPatch, options?)` and `updateWidgetShell(widgetKey, shellPatch, options?)` treat runtime updates as non-persistable overlays by default (`options?.persistable === false` when omitted). Authored widget configuration and shell titles/actions remain intact in persisted snapshots and child editors unless `{ persistable: true }` is explicitly passed, and transient keys are restored before persistence emission.
|
|
683
|
+
|
|
684
|
+
Hosts using Core-managed persistence can supply opt-in hooks on `<praxis-dynamic-page>`:
|
|
685
|
+
- `reconcilePersistedPage?: (saved, current) => WidgetPageDefinition`: merges a loaded persisted document against the current canonical page before hydration.
|
|
686
|
+
- `preparePageForPersistence?: (page) => WidgetPageDefinition`: strips volatile runtime projections or normalizes layout geometry before `ASYNC_CONFIG_STORAGE.saveConfig(...)`.
|
|
687
|
+
|
|
688
|
+
The helper `cloneInputsPreservingLiveReferences(inputs)` is exported from `@praxisui/core` for deep-cloning plain input structures while preserving functions, Angular signals, RxJS observables, non-plain class instances, and circular references.
|
|
689
|
+
|
|
690
|
+
### Header action pinning and keyboard tab navigation
|
|
691
|
+
|
|
692
|
+
`WidgetShellAction.pinned?: boolean` keeps critical shell actions directly visible in the card header before overflow collapsing is evaluated, even when compact header width (`< 480px`) limits unpinned header slots. Shell tabs follow WAI-ARIA roving `tabindex` (`0` on the active tab, `-1` on inactive tabs) with reactive `ArrowRight`, `ArrowLeft`, `Home`, and `End` keyboard navigation in `WidgetShellComponent`.
|
|
693
|
+
|
|
442
694
|
When a host enables dynamic-page customization, it can pass a transient
|
|
443
695
|
`WidgetPageAuthoringCapabilities` grant through `authoringCapabilities` to expose only the canvas,
|
|
444
696
|
page settings, widget shell, component-input, removal and child-customization operations that the
|
|
@@ -451,6 +703,20 @@ Hosts that maintain an authored source separately from runtime state should cons
|
|
|
451
703
|
`pageChange` remains the compatibility stream for every canonical page update, including persistent
|
|
452
704
|
runtime state; transient composition projections remain excluded from both outputs.
|
|
453
705
|
|
|
706
|
+
With `autoPersist` enabled, pass a stable `pageIdentity` to scope the document and
|
|
707
|
+
listen to `persistenceChange: WidgetPagePersistenceState` for `loading`, `saving`,
|
|
708
|
+
`saved`, `resetting`, `idle` or `error`. `savedAt` is emitted only after the
|
|
709
|
+
storage confirms a save. An empty `{ widgets: [] }` document is a valid customized
|
|
710
|
+
page; absence of a stored document falls back to the host's page. The runtime
|
|
711
|
+
serializes save and reset operations for the identity so each storage call uses
|
|
712
|
+
the latest provider ETag. A 409/412 conflict blocks later writes until the host
|
|
713
|
+
explicitly calls `reloadPersistedPage(defaultPage)`, which discards the current
|
|
714
|
+
draft. `resetPersistedPage(defaultPage)` clears storage and applies the factory
|
|
715
|
+
page only after acknowledgement. `persistCurrentPage(page?)` requests an
|
|
716
|
+
explicit save or retries a recoverable save failure; callers can pass the exact
|
|
717
|
+
authored snapshot they want saved. Completion without a storage value reports
|
|
718
|
+
`errorKind: 'unacknowledged'` rather than claiming success.
|
|
719
|
+
|
|
454
720
|
Pointer drag/resize in the canvas snapshots rendered CSS Grid track sizes and gutters at gesture
|
|
455
721
|
start. Content-sized rows are not treated as uniformly sized `rowUnit` rows. Horizontal resize
|
|
456
722
|
snaps to columns; vertical resize in `autoRows: 'content'` authors the item's independent
|
|
@@ -578,6 +844,8 @@ promise failures produced after a host/global-action adapter accepts a delivery.
|
|
|
578
844
|
|
|
579
845
|
If the problem is URL or HTTP execution, start with `resourcePath`. If the problem is semantic discovery, surface/action context, or stable runtime identity, start with `resourceKey`.
|
|
580
846
|
|
|
847
|
+
Use `normalizePraxisResourcePath(raw, styleOrOptions?)`, `extractPraxisApiPathPrefix(baseUrl)`, and `resolvePraxisSchemasFilteredUrl(apiBaseUrl, resourcePath, options?)` from `@praxisui/core` whenever components or services normalize `resourcePath` inputs. Calling these shared utilities ensures equivalent inputs such as `'/workforce/employees'`, `'workforce/employees'`, `'workforce/employees/'`, and `'/api/workforce/employees'` produce identical CRUD, `/schemas/filtered`, `/options/*`, `/stats/*`, and `/capabilities` URLs without double `/api/api/` prefixes or relative `baseUrl` failures. Pass `stripOperationalSuffix: false` to `resolvePraxisSchemasFilteredUrl(...)` for analytics or projection endpoints where trailing path segments belong to the target route (default `true`); portable configuration descriptors such as `PraxisCrudComponent`'s `advancedFilters.schemaUrl` keep the normalized relative `'/schemas/filtered?path=...'` format without embedding host origins or altering `{id}` templates.
|
|
848
|
+
|
|
581
849
|
`ResourceCapabilitySnapshot.canonicalOperations` preserves structural support only.
|
|
582
850
|
`operations` carries the current operation contract and availability for CRUD, query,
|
|
583
851
|
options, stats, and export. The core keeps unknown operation IDs for forward compatibility;
|
|
@@ -585,6 +853,8 @@ it must not infer authorization from a `canonicalOperations` boolean or discard
|
|
|
585
853
|
|
|
586
854
|
`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.
|
|
587
855
|
|
|
856
|
+
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'`).
|
|
857
|
+
|
|
588
858
|
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.
|
|
589
859
|
|
|
590
860
|
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.
|
|
@@ -604,12 +874,43 @@ Core exports schema and metadata infrastructure used by form, table, list, chart
|
|
|
604
874
|
- form layout item models
|
|
605
875
|
- JSON Logic models and runtime service
|
|
606
876
|
|
|
877
|
+
`SchemaNormalizerService` expands `x-ui.customFieldsContainer: true` into child
|
|
878
|
+
fields such as `customFields.numero_calcado`, preserving each child's label,
|
|
879
|
+
control type, group, order, validators and option source. It also recognizes an
|
|
880
|
+
object named `customFields` with inline `properties`. `FieldDefinition` and
|
|
881
|
+
`FieldMetadata` retain `customField`, `customFieldKey` and `customFieldScope`;
|
|
882
|
+
the container itself does not become a control. See [schema flow](https://github.com/codexrodrigues/praxis-ui-angular/blob/feat/custom-fields-runtime/projects/praxis-core/docs/schema-flow.md#custom-fields)
|
|
883
|
+
for the value path and identity defaults.
|
|
884
|
+
|
|
885
|
+
For scalar arrays, `FieldDefinition.items` and `FieldMetadata.items` preserve the
|
|
886
|
+
operation schema's `FieldScalarItemsSchema` (`type`, optional `format` and `enum`).
|
|
887
|
+
This is distinct from `array.itemSchema.fields` for object collections.
|
|
888
|
+
`normalizeScalarArrayValue` is the shared Core projection for UI tokens: it admits
|
|
889
|
+
only declared scalar types and the finite enum after conversion, rejects invalid
|
|
890
|
+
items without partial output, and does not infer types from labels or value shape.
|
|
891
|
+
Consumers must apply it at validation and query/submit boundaries; saved metadata
|
|
892
|
+
cannot widen the server's `items` or `enumValues` constraints.
|
|
893
|
+
|
|
894
|
+
Expansion does not make arbitrary property names safe Angular controls or turn
|
|
895
|
+
read-only into automatic omission. The canonical Metadata key policy rejects
|
|
896
|
+
reserved control names, and its command request projection excludes read-only
|
|
897
|
+
custom fields. Consumers must use that operation schema rather than merge a
|
|
898
|
+
response schema into a command. See the
|
|
899
|
+
[enterprise adoption review](https://github.com/codexrodrigues/praxis-ui-angular/pull/658)
|
|
900
|
+
for contract blockers, context/freshness limits and the exact proof boundary.
|
|
901
|
+
|
|
607
902
|
For governed analytics cross-filtering, `bindings.primaryDimension.keyFilterField` is the public request field that receives the raw `bucket.key`. Consumers must preserve its type, verify the target request schema, and must not infer this field from the dimension name, display label, or backend property paths.
|
|
608
903
|
|
|
609
904
|
`valuePresentation` is the shared display contract for scalar read-only values such as currency, number, date, datetime, time, percentage, and boolean.
|
|
610
905
|
`presentation` is the shared semantic wrapper contract for presentation-capable consumers. It can request chip, badge, status or iconValue rendering while preserving the raw value used for filtering, sorting and export.
|
|
611
906
|
|
|
612
|
-
`FieldPresentationConfig` is the shared semantic presentation contract for read-only surfaces that need a visual primitive around the value, such as `chip`, `badge`, `status`, `iconValue`, or `microVisualization`. It keeps business data in the original field and lets consumers map `tone`, `appearance`, `icon`, `tooltip`, and optional fixed `label` values to their own renderer and theme tokens.
|
|
907
|
+
`FieldPresentationConfig` is the shared semantic presentation contract for read-only surfaces that need a visual primitive around the value, such as `chip`, `badge`, `status`, `iconValue`, or `microVisualization`. It keeps business data in the original field and lets consumers map `tone`, `appearance`, `icon`, `tooltip`, and optional fixed `label` values to their own renderer and theme tokens. For `microVisualization` (`PraxisPresentationVisualizationConfig`), `@praxisui/core` publishes:
|
|
908
|
+
|
|
909
|
+
- `<praxis-micro-viz-host>` (`PraxisMicroVizHostComponent`) as the canonical, zero-ECharts-dependency presentation host used across `@praxisui/table`, `@praxisui/crud` (`kpiBand`), `@praxisui/rich-content`, `@praxisui/dynamic-fields`, and `@praxisui/charts` (`PraxisMicroVisualizationComponent`);
|
|
910
|
+
- the `@praxisui/core/micro-visualization` secondary entrypoint (`PraxisMicroVisualizationComponent`, which delegates cleanly to `<praxis-micro-viz-host [hostMarker]="false">` with zero ECharts dependency in `@praxisui/core`, and `PraxisKpiCardViewComponent`), alongside `@praxisui/core/theming/micro-visualization` (`define-praxis-micro-visualization-tokens` / `praxis-micro-visualization-styles`) and the canonical `praxis.microViz.*` i18n catalog (`resolvePraxisMicroVizMessage`);
|
|
911
|
+
- the optional `PRAXIS_MICRO_CHART_ENGINE` injection token (`PraxisMicroChartEngine` / `PraxisMicroChartRenderRequest`), allowing `@praxisui/charts` (`providePraxisCharts()`) to render all 6 vector/SVG kinds (`line`, `area`, `column`, `waterfall`, `radial`, and `harveyBall`) across all surfaces (including compact `table-cell` dials) via Apache ECharts `SVGRenderer` (`data-engine="echarts"`) while `@praxisui/core` handles structural HTML/CSS kinds (`stackedBar`, `comparison`, `bullet`, `delta`, `processFlow`) and falls back automatically for all 11 kinds (`data-engine="primitive"`) when no engine is provided or on engine error;
|
|
912
|
+
- `PraxisMicroVizIdSequenceService` (root-injected SSR/hydration-safe ID scoping, bounded scope map for SSR reuse), canonical normalization (`title`, `legend`, `targetLabel`, `bullet` non-zero `min`/negative auto-floor/open-ended thresholds, `harveyBall` default `100` denominator, `column` zero-anchored negative bar fallback parity, dual `target` + `baseline` reference lines, `compactValue` readouts, over-capacity `>100%` readouts), contract attributes (`data-praxis-micro-viz`, `data-kind`, `data-surface`, `data-size`, `data-engine`, `data-tone`, `data-suppressed-count`), and `PraxisMicroTooltipOverlayService`, a `document.body` / HTML Top Layer singleton portal for unclipped floating telemetry readouts (`data-micro-readout`) with optional `CSP_NONCE` propagation on its injected stylesheet;
|
|
913
|
+
- CSR strict-CSP compliance (`style-src-attr 'none'`) via CSSOM bindings on HTML/CSS primitives (noting Angular SSR still serializes `[style.*]` bindings into initial server HTML `style="..."` attributes until client hydration), plus native RTL logical mirroring (`bullet`, `stackedBar`, `processFlow`) with reversed horizontal keyboard arrows and locked `direction: ltr` cartesian scrub overlays (`line`, `area`, `column`, `waterfall`). Legacy HTML-string rendering (`renderPraxisPresentationVisualizationHtml`) has been removed; all consumers render via `<praxis-micro-viz-host>` using `PraxisPresentationVisualizationFormatOptions` (see `docs/2026-11-micro-visualizations-echarts-unification-adr.md`).
|
|
613
914
|
|
|
614
915
|
## Global Actions
|
|
615
916
|
|
|
@@ -668,7 +969,7 @@ the same value at runtime. Ordinary runtime change outputs keep using `pageChang
|
|
|
668
969
|
composition targets still pass through canonical restoration before persistence.
|
|
669
970
|
This lets Page Builder save the edited config instead of its previous draft.
|
|
670
971
|
|
|
671
|
-
Dynamic widgets may implement `WidgetShellActionContributor` to publish transient, stateful content actions to their owning `WidgetShell`. The loader observes that signal and the shell merges contributions with authored actions by stable id without writing them into the page document. The widget remains the owner of command handling, localized labels, availability and controlled-region state; the shell owns responsive toolbar materialization and ARIA projection.
|
|
972
|
+
Dynamic widgets may implement `WidgetShellActionContributor` to publish transient, stateful content actions to their owning `WidgetShell`. The loader observes that signal and synchronizes header visibility (`setShellActionHostHeaderVisible`), and the shell merges contributions with authored actions by stable id without writing them into the page document. The primary header row (`.pdx-shell-header-main`) remains single-line across desktop and tablet card widths (`>= 448px`) using real `44px` icon-button touch-target budgets and standalone/`pinned` icon compaction before overflow, while preserving readable minimum identity (`min(14rem, 50%)`) and `44px` touch targets on narrow shells (`< 448px`) and keeping optional `.pdx-shell-tabs` on a dedicated secondary row below. Standalone, `pinned` (`compactVariant: 'icon'`), and segmented actions (`groupVariant: 'segmented'`, optional `groupLabel`, `compactVariant: 'icon'`, `selectionRole: 'radio'`) share the same width cascade along `icon + label -> icon-only + tooltip -> overflow menu (⋯)`, where grouped options render as labeled radio sections with checkmarks. The widget remains the owner of command handling, localized labels, availability and controlled-region state; the shell owns responsive toolbar materialization and ARIA projection.
|
|
672
973
|
|
|
673
974
|
## Global configuration snapshots
|
|
674
975
|
|
|
@@ -692,15 +993,52 @@ contracts are unchanged.
|
|
|
692
993
|
|
|
693
994
|
`DomainKnowledgeService` and `DomainRuleService` are shared clients for governed semantic decision flows exposed by `praxis-config-starter`. `browseDefinitionCatalog` exposes the bounded, redacted and server-scoped decision catalog; consumers then use `getDefinition` with the exact returned definition id instead of downloading every rule body or joining versions by key. `getDefinitionFacts` projects the same definition's versioned fact vocabulary, including type, localized meaning, provider evidence, sensitivity and redaction policy; Angular must not reconstruct that vocabulary from JSON Logic or host-specific fixtures. `getDefinitionCapabilities` returns the authenticated principal's server-scoped `CREATE_NEW_VERSION` action per definition; consumers must not treat projection metadata such as editor support as authorization. For change workspaces, `getChangeWorkspaceCapabilities` returns the authenticated principal's `availableActions` and stable blockers; consumers must not infer submit, review or promotion authority from lifecycle status. `DomainRuleService` also exposes the safe RuleSet version catalog, active head/status, redacted execution summary, aggregate host alignment, forward activation and rollback protected by the current head ETag. The same client projects immutable rollout-policy versions, their independent anti-ABA head, maker-checker approval, activation and append-only timeline; policy authority and lifecycle validation remain server-owned. It also exposes the two-phase operational rollout through a recoverable human catalog, redacted readiness, create/cancel commands and candidate activation bound to the rollout identity. Consumers must obey the Config-owned `availableActions`; they must not recalculate quorum or head validity. Execution summaries contain only aggregate outcome counts, distinct-host count and observation timestamps for an immutable snapshot. Host-status summaries contain only aligned, snapshot-drifted, runtime-incompatible, unavailable and stale counts derived against the active head and its approved compatibility coordinates; facts and host identities remain outside Angular. Runtime surfaces should treat materializations as derived projections of backend-governed decisions, not as frontend-owned business rules.
|
|
694
995
|
|
|
996
|
+
`getDefinitionParameters` reads the same immutable definition's Engine-owned parameter template and typed constraints, together with declared/default/effective values. An absent `defaultValue` or `declaredValue` property differs from explicit JSON null; `origin` identifies the declared/default source. Consumers edit only workspace `parameters.parameterValues`, preserve other parameter metadata, and let Config derive the structural condition. Template identity, read-only flags, constraints, workspace ETags and publication through the governed snapshot lifecycle remain server-owned.
|
|
997
|
+
|
|
998
|
+
An intact historical snapshot with a different runtime compatibility is `RUNTIME_INCOMPATIBLE`, remains available for authorized audit, and is not executable (`executionReady=false`). All non-`READY` versions expose `availableAction=UNAVAILABLE`, including an incompatible version still referenced by the active head. Consumers must preserve that historical identity without offering activation, rollback or rollout; `READY` still requires the current compiler and implementation catalog. Historical readability never authorizes execution.
|
|
999
|
+
|
|
1000
|
+
Snapshot publication returns `DomainRuleSnapshotStored` (immutable content/hash), without selecting or refreshing an active head. Before a first activation, a server-published `CREATE_ROLLOUT` version action may authorize starting the staged flow together with the rollout catalog action. `createRollout` and `activateSnapshotCandidate` accept an explicit null head token for verified absence and send only `If-None-Match: *`; existing tokens send only `If-Match`. Candidate activation retains the actual rollout ID. The nullable expected snapshot/head pair records bootstrap absence; clients must never replace it with a content hash, fabricated head or local readiness calculation.
|
|
1001
|
+
|
|
1002
|
+
## Testing Defaults (`providePraxisTestingDefaults`)
|
|
1003
|
+
|
|
1004
|
+
Full-page and host integration specs often import `appConfig.providers`, which installs `providePraxisGlobalConfigBootstrap(...)`, `providePraxisEnterpriseRuntimeContext(...)`, and `ApiConfigStorage`. Without test overrides, `TestBed` bootstraps can issue real HTTP calls to `/api/praxis/runtime/context` and `/api/praxis/config/ui` or leak `localStorage` schema/theme state between tests.
|
|
1005
|
+
|
|
1006
|
+
Spread `...providePraxisTestingDefaults(options?)` after `...appConfig.providers` (or standalone in `TestBed.configureTestingModule`):
|
|
1007
|
+
|
|
1008
|
+
```ts
|
|
1009
|
+
import { provideHttpClient } from '@angular/common/http';
|
|
1010
|
+
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
|
1011
|
+
import { providePraxisTestingDefaults } from '@praxisui/core';
|
|
1012
|
+
|
|
1013
|
+
TestBed.configureTestingModule({
|
|
1014
|
+
providers: [
|
|
1015
|
+
...appConfig.providers,
|
|
1016
|
+
provideHttpClient(),
|
|
1017
|
+
provideHttpClientTesting(),
|
|
1018
|
+
...providePraxisTestingDefaults({
|
|
1019
|
+
initialConfig: { 'table:employees': { pageSize: 20 } },
|
|
1020
|
+
}),
|
|
1021
|
+
],
|
|
1022
|
+
});
|
|
1023
|
+
```
|
|
1024
|
+
|
|
1025
|
+
What `providePraxisTestingDefaults()` configures:
|
|
1026
|
+
|
|
1027
|
+
- **`CONFIG_STORAGE` & `ASYNC_CONFIG_STORAGE`:** both bound to the same `InMemoryConfigStore` via `InMemoryConfigStorage` and `InMemoryAsyncConfigStorage` (with strong-ack `of(void 0)` emissions on save/clear and zero `localStorage` access).
|
|
1028
|
+
- **`EnterpriseRuntimeContextService`:** replaced with `InMemoryEnterpriseRuntimeContextService` (zero `HttpClient` dependency, zero calls to `/api/praxis/runtime/**`, supports `adoptConfirmedContext`, `choices`, `tenants`, `navigation`, and `applyHeaders`).
|
|
1029
|
+
- **Bootstrap initializers:** overrides `PRAXIS_GLOBAL_CONFIG_BOOTSTRAP_OPTIONS`, `PRAXIS_GLOBAL_CONFIG_BOOTSTRAP_READY`, `PRAXIS_ENTERPRISE_RUNTIME_CONTEXT_READY`, and `PRAXIS_ENTERPRISE_RUNTIME_CONTEXT_OPTIONS` (`includeGlobalFetchHeaders: false`, `blocking: false`, `errorPolicy: 'ignore'`) so `ApplicationInitStatus.donePromise` resolves immediately without triggering runtime-context HTTP/fetch calls.
|
|
1030
|
+
- **`API_URL` & caches:** defaults `API_URL` to `{ default: { baseUrl: '/api' } }` (unless `apiUrl: false`), sets `cache.disableSchemaCache: true` so `GenericCrudService` uses `MemoryCacheAdapter`, disables visibility `fetch` revalidation on `PraxisSessionTransportService`, disables `localStorage` writes in `PraxisThemeService`, and installs a silent `PRAXIS_TELEMETRY_TRANSPORT`.
|
|
1031
|
+
- **Optional defensive interceptor:** `createPraxisTestingNoopHttpInterceptor()` can be passed to `withInterceptors([...])` when a spec uses `provideHttpClient()` without `provideHttpClientTesting()`.
|
|
1032
|
+
|
|
695
1033
|
## Public API Areas
|
|
696
1034
|
|
|
697
1035
|
Core exports:
|
|
698
1036
|
|
|
699
1037
|
- shared services such as `GenericCrudService`, `GlobalConfigService`, `GlobalActionService`, `ResourceDiscoveryService`, `ComponentMetadataRegistry`, `PraxisJsonLogicService`, `LoadingOrchestratorService`
|
|
700
|
-
- governed submit-error normalization through `ErrorMessageService`, preserving public `code`, `target`, `category`, and safe messages while keeping transport details out of UI fallbacks
|
|
701
|
-
- tokens and providers for API URLs, global config, global actions, loading, i18n, settings panel bridge, surface drawer bridge, collection export, field selector registry, overlay/layer scale, the shared collection-search visual contract (`PRAXIS_COLLECTION_SEARCH_DEFAULTS`, `PRAXIS_COLLECTION_SEARCH_VARS`, `buildPraxisCollectionSearchCss`), and the shared action-control geometry contract (`PRAXIS_ACTION_CONTROL_DEFAULTS`, `PRAXIS_ACTION_CONTROL_VARS`, `buildPraxisActionControlCss`)
|
|
1038
|
+
- governed submit-error normalization through `ErrorMessageService`, preserving public `code`, `target`, `category`, `decision`, and safe messages while keeping transport details out of UI fallbacks; unknown decisions retain safe summary copy without implying a field correction
|
|
1039
|
+
- tokens and providers for API URLs, global config, global actions, loading, i18n, settings panel bridge, surface drawer bridge, collection export, field selector registry, overlay/layer scale, `providePraxisTestingDefaults()` / `InMemoryConfigStorage` / `createPraxisTestingNoopHttpInterceptor()`, the shared collection-search visual contract (`PRAXIS_COLLECTION_SEARCH_DEFAULTS`, `PRAXIS_COLLECTION_SEARCH_VARS`, `buildPraxisCollectionSearchCss`), and the shared action-control geometry contract (`PRAXIS_ACTION_CONTROL_DEFAULTS`, `PRAXIS_ACTION_CONTROL_VARS`, `buildPraxisActionControlCss`)
|
|
702
1040
|
- models for table config, fields, forms, rich content, editorial content, widget pages, global actions, resource discovery, domain knowledge/rules, analytics, query context, loading, and collection export
|
|
703
|
-
- helpers for schema ids, ETag fetch, field mapping, config merge, validation, IDs, inline filter controls, global action refs, and form hooks
|
|
1041
|
+
- helpers for canonical `resourcePath` normalization (`normalizePraxisResourcePath`, `extractPraxisApiPathPrefix`, `resolvePraxisSchemasFilteredUrl`), schema ids, ETag fetch, field mapping, config merge, validation, IDs, inline filter controls, global action refs, and form hooks
|
|
704
1042
|
- dynamic widget/page runtime components and metadata
|
|
705
1043
|
- UI helpers such as icon picker, empty state card, resource quick connect, schema viewer, `PraxisIconDirective`, and `PraxisIconButtonComponent`
|
|
706
1044
|
|
|
@@ -719,7 +1057,9 @@ Action-bearing components must use the semantic `--praxis-action-control-*` vari
|
|
|
719
1057
|
|
|
720
1058
|
### Catálogo no quick connect e isolamento do editor de página
|
|
721
1059
|
|
|
722
|
-
`ResourceQuickConnectComponent` apresenta recursos publicados em `/schemas/catalog` usando o seletor `pdx-material-select` registrado em `ComponentMetadataRegistry`. O host deve registrar os descritores oficiais de DynamicFields. O controle é inicializado pelo protocolo `setInputMetadata` e ControlValueAccessor
|
|
1060
|
+
`ResourceQuickConnectComponent` apresenta recursos publicados em `/schemas/catalog` usando o seletor `pdx-material-select` registrado em `ComponentMetadataRegistry`. O host deve registrar os descritores oficiais de DynamicFields. O controle é inicializado pelo protocolo `setInputMetadata` e `ControlValueAccessor`; Core não importa a biblioteca de campos. A conexão avançada por rota continua disponível (com `<datalist>` de sugestões do catálogo e abertura automática da seção avançada quando o seletor dinâmico não está disponível ou quando o recurso atual é uma rota customizada fora do catálogo).
|
|
1061
|
+
|
|
1062
|
+
O componente expõe `[resourcePath]`, `(resourcePathChange)`, `[endpointKey]`, `[apiUrlEntry]`, `[intent]`, `ControlValueAccessor` (`ngModel` / `formControl`) e os hooks `reset()` / `acceptAppliedValue()` de `SettingsValueProvider`. A projeção e reconciliação de opções do catálogo são centralizadas em `ResourceDiscoveryService.getDiscoveredResources()`, `loadDiscoveredResources()`, `projectSchemaCatalogResources()` e `resolveCatalogResourceOptionValue()`, deduplicando chamadas concorrentes a `/schemas/catalog` por URL, consumindo `resourcePath`, `resourceReadOnly` e `resourceCapabilities` publicados pelo backend para eliminar falsos-positivos de capacidades (como endpoints herdados `/stats/*` desabilitados) e sinalizando recursos somente leitura no subtítulo do seletor. `ResourceDiscoveryService` reutiliza a instância do injetor ancestral quando um componente standalone cria injetor filho sem override local de `API_URL`.
|
|
723
1063
|
|
|
724
1064
|
O editor de configurações da página recebe uma cópia da definição autoral. Dados carregados e entradas transitórias dos widgets não devem virar configuração ao alterar o layout.
|
|
725
1065
|
|
|
@@ -829,7 +1169,7 @@ interpolation does not add date masks, CPF masks or an expression language. Lite
|
|
|
829
1169
|
separators remain when both bound fields are empty.
|
|
830
1170
|
The canonical link pipeline now supports explicit `format-value` for civil dates,
|
|
831
1171
|
digit masks and numeric presentation.
|
|
832
|
-
The
|
|
1172
|
+
The complete identity recipe (`examples/ai-recipes/praxis-dynamic-page.widget-selection-identity.json`)
|
|
833
1173
|
resets the transient identity before formatting and composes only available subtitle
|
|
834
1174
|
parts. The lab and Core integration test consume the same executable page artifact.
|
|
835
1175
|
|
|
@@ -899,10 +1239,17 @@ widget appearance/size, or registered content editor session. It uses the existi
|
|
|
899
1239
|
`owner` option; no session identity is persisted in the page document.
|
|
900
1240
|
|
|
901
1241
|
The session is cancelled when its panel closes, the page is destroyed, or an external
|
|
902
|
-
page/context/identity/authoring input change invalidates it.
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
1242
|
+
page/context/identity/authoring input change invalidates it. An acknowledgement identical
|
|
1243
|
+
to the current authored page keeps the session alive for subsequent Apply/Save, including
|
|
1244
|
+
when the host resends an equivalent `pageIdentity` object. After the first input change,
|
|
1245
|
+
identity equivalence means strict equality of its five fields: `appId`, `tenantId`,
|
|
1246
|
+
`userId`, `routePath` and `locale`; whitespace, delimiters and missing values are not
|
|
1247
|
+
normalized. Core retains a private snapshot of those accepted primitive values, so
|
|
1248
|
+
mutating the host's previous object before resending a clone still changes the scope.
|
|
1249
|
+
Resending only that equivalent identity also preserves data-source overlays,
|
|
1250
|
+
composition and persistence scope. Context, instance and authoring capability changes
|
|
1251
|
+
remain invalidating. A different external document cancels open editors even when a
|
|
1252
|
+
particular widget happens to be unchanged. This does not confirm an HTTP save.
|
|
906
1253
|
|
|
907
1254
|
Confirmed widget removal cancels sessions targeting that key, plus page-wide settings
|
|
908
1255
|
that could restore the removed widget. Asynchronous editor results cannot open a panel
|
|
@@ -1065,6 +1412,165 @@ blur does not become an inner widget's default. Intentional inheritance through
|
|
|
1065
1412
|
`context.ui.shell.preset/presets` remains supported. This isolation does not remove
|
|
1066
1413
|
the host's shared theme tokens.
|
|
1067
1414
|
|
|
1415
|
+
## App shell: host appearance
|
|
1416
|
+
|
|
1417
|
+
`PraxisAppShellComponent` materializes the host theme for both the sidebar and
|
|
1418
|
+
header. The existing theme roles `--sidebar` (falling back to `--card`),
|
|
1419
|
+
`--surface-gradient` (falling back to `--card`), `--command-gradient`,
|
|
1420
|
+
`--sidebar-foreground`, `--sidebar-primary`, `--sidebar-accent`,
|
|
1421
|
+
`--sidebar-accent-foreground`, `--primary-deep`, `--primary-foreground`,
|
|
1422
|
+
`--accent`, `--secondary`, `--overlay`
|
|
1423
|
+
and `--shadow-panel` apply to the native chrome and brand icon. Navigation,
|
|
1424
|
+
loading and mobile behavior do not change when these colors change. Without host
|
|
1425
|
+
theme tokens, the brand uses a dark blue fallback with a white icon; custom host
|
|
1426
|
+
colors should always supply their corresponding foreground roles.
|
|
1427
|
+
|
|
1428
|
+
Semantic badges use tinted surfaces with the host's foreground. Success,
|
|
1429
|
+
warning and info consume `--praxis-success`, `--praxis-warning` and
|
|
1430
|
+
`--praxis-info`; the established `--ready`/`--warning` variables and bounded
|
|
1431
|
+
fallbacks remain available. Error consumes `--destructive`. Hosts should use
|
|
1432
|
+
these existing roles rather than overriding private shell selectors. No new
|
|
1433
|
+
shell input, saved layout field or theme-specific component is required.
|
|
1434
|
+
|
|
1435
|
+
## Governed Resource Quick View
|
|
1436
|
+
|
|
1437
|
+
`ResourceQuickViewBinding`, `PraxisQuickViewTriggerDirective` (`[praxisQuickView]`),
|
|
1438
|
+
`ResourceQuickViewService` and `PraxisQuickViewOverlayComponent` provide the
|
|
1439
|
+
canonical hover/focus/click contextual dossier across `@praxisui/table`,
|
|
1440
|
+
`@praxisui/list`, `@praxisui/dynamic-fields`, `@praxisui/dynamic-form`,
|
|
1441
|
+
`@praxisui/rich-content`, `@praxisui/charts`, `@praxisui/stepper` and
|
|
1442
|
+
`@praxisui/ai`:
|
|
1443
|
+
|
|
1444
|
+
- **Metadata synthesis (`resolveFieldQuickViewBinding` & `reconcileFieldQuickViewBinding`)**:
|
|
1445
|
+
Synthesizes `ResourceQuickViewBinding` from explicit `field.quickView`,
|
|
1446
|
+
backend `x-ui.resourceReference` (`@ResourceReference`) or
|
|
1447
|
+
`x-ui.optionSource.detail` when it declares a `resourceKey`. The binding reuses
|
|
1448
|
+
`recordOpen.sourceIdentityField` and `recordOpen.target.resourceKey/surfaceId`;
|
|
1449
|
+
`previewSurfaceId` can select a separate read projection. Persisted presentation
|
|
1450
|
+
preferences must preserve the server-owned record target and identity field.
|
|
1451
|
+
- **Context resolution (`resolveResourceQuickViewTarget`)**:
|
|
1452
|
+
Resolves `recordOpen.sourceIdentityField` from direct records or nested `row`,
|
|
1453
|
+
`item` and `values` envelopes, including dotted field paths, and extracts
|
|
1454
|
+
scalar IDs (`id`, `value`, `key`) when a form control holds an entity-lookup
|
|
1455
|
+
selection object.
|
|
1456
|
+
- **Enterprise security and request lifetime**:
|
|
1457
|
+
`ResourceQuickViewService` coalesces matching in-flight projections and invalidates
|
|
1458
|
+
the active generation on context changes; it does not retain a completed-record
|
|
1459
|
+
LRU cache. Every fresh open resolves the current item surface. Surface, action,
|
|
1460
|
+
capability and schema discovery share requests within the current runtime context
|
|
1461
|
+
generation. A context change cancels the whole record opening and invalidates
|
|
1462
|
+
late discovery responses, including a return to the same context. The hover trigger
|
|
1463
|
+
waits 280 ms by default; explicit activation starts immediately. Discovery reads
|
|
1464
|
+
the resource catalog, the item and its contextual surfaces before resolving the
|
|
1465
|
+
filtered response schema and projection. A pending HTTP request can therefore
|
|
1466
|
+
outlive dismissal even though its obsolete result cannot update that popover.
|
|
1467
|
+
Fields restricted by `x-ui.fieldAccess` are filtered or masked (`•••`) before
|
|
1468
|
+
rendering, and `recordOpen` actions are validated against the item's
|
|
1469
|
+
authorized `_links` / `surfaces` / `actions` snapshot. Confirmed saves or
|
|
1470
|
+
deletions inside an opened Quick View detail or contextual drawer invalidate
|
|
1471
|
+
the active projection cache and emit `ResourceQuickViewService.resourceMutation$`
|
|
1472
|
+
(`ResourceQuickViewMutationEvent`) so parent resource tables can refresh.
|
|
1473
|
+
- **Shared side-panel geometry (`side-panel-geometry.util` & `SurfaceSizeConfig`)**:
|
|
1474
|
+
Canonical helpers (`SIDE_PANEL_PRESET_WIDTHS`, `resolveSidePanelViewportWidth`,
|
|
1475
|
+
`resolveSidePanelPresetWidth`, `parseSidePanelWidthPx` with `px`/`rem`/`vw`/`%`/`min`/`max`/`clamp`
|
|
1476
|
+
support, `clampSidePanelWidthPx`, `resolveExpandedSidePanelWidthPx`,
|
|
1477
|
+
`canExpandSidePanel`, `readPersistedSidePanelWidth`, `writePersistedSidePanelWidth`)
|
|
1478
|
+
unify preset widths, viewport clamping, expand thresholds, and pixel persistence
|
|
1479
|
+
across `@praxisui/settings-panel`, `@praxisui/dialog`, and `@praxisui/table`.
|
|
1480
|
+
- **Metadata presentation**:
|
|
1481
|
+
Summary labels come from normalized domain metadata (`x-ui.label`), not field-name
|
|
1482
|
+
humanization. Explicit numeric `valuePresentation` uses the shared resolver and
|
|
1483
|
+
formatter for `currency`, `number` and `percentage`, including `currency.code`,
|
|
1484
|
+
zero precision and fractional `digitsInfo`. A presentation-level value config
|
|
1485
|
+
takes precedence over the field config. Existing field currency/decimal defaults
|
|
1486
|
+
remain the fallback when the explicit config omits them. Options, masking and
|
|
1487
|
+
presentation affixes retain their precedence. This numeric correction does not
|
|
1488
|
+
add support for compact notation or change the existing date/time formatting path.
|
|
1489
|
+
|
|
1490
|
+
Hosts must install `providePraxisQuickViewDialogPresenter()` from `@praxisui/dialog`.
|
|
1491
|
+
Bindings with `contentRef` also require the rich-content body renderer; the standard
|
|
1492
|
+
summary does not. Source changes require publication and consumer adoption before
|
|
1493
|
+
they can be claimed for an installed package.
|
|
1494
|
+
|
|
1495
|
+
### Optional editing highlight
|
|
1496
|
+
|
|
1497
|
+
This feature was added in source after `10.0.0-rc.36`; it is not yet part of a published package release.
|
|
1498
|
+
|
|
1499
|
+
`WidgetShellConfig.appearance.card.interactionHighlight` selects `standard` or
|
|
1500
|
+
`gradient`. Omit it to inherit the shell preset; the final default is `standard`.
|
|
1501
|
+
An explicit `standard` overrides a gradient preset. This is editing chrome: it
|
|
1502
|
+
appears on selection or keyboard focus while customization is enabled, never as a
|
|
1503
|
+
permanent border in the published page. Focusing a child control does not change selection; the highlight itself does not emit selection.
|
|
1504
|
+
The gradient uses the current primary, tertiary and secondary theme tokens. Resize
|
|
1505
|
+
grips follow the same choice. Internal control focus indicators remain intact;
|
|
1506
|
+
blocked canvas operations retain the error indicator and forced colors use a solid
|
|
1507
|
+
system-color outline. The highlight follows the resolved card radius (square for
|
|
1508
|
+
content-only shells).
|
|
1509
|
+
|
|
1510
|
+
```json
|
|
1511
|
+
{"shell":{"kind":"dashboard-card","appearance":{"card":{"interactionHighlight":"gradient"}}}}
|
|
1512
|
+
```
|
|
1513
|
+
|
|
1514
|
+
In Widget settings → Appearance, choose Inherit, Standard or Gradient and inspect
|
|
1515
|
+
its preview. Apply updates the local draft; the host controls remote persistence.
|
|
1516
|
+
Saving the settings panel alone is not proof of a server write: the reference Page
|
|
1517
|
+
Builder host requires Save page. Reopening and Reset preserve the distinction between
|
|
1518
|
+
an omitted value and an explicit override. Editing appearance on a widget without a
|
|
1519
|
+
shell preserves content-only presentation (`kind: 'none'`); a card requires an explicit
|
|
1520
|
+
choice. The option does not change child component inputs or enable customization.
|
|
1521
|
+
|
|
1522
|
+
This preference controls editing appearance; it grants no authorization and carries
|
|
1523
|
+
no business selection state. The host integrates persistence, identity and tenant
|
|
1524
|
+
scope through the canonical configuration infrastructure, including its ETag
|
|
1525
|
+
contract; this option requires no separate ETag implementation in the host. Editing only this preference must preserve unrelated
|
|
1526
|
+
shell settings, including `bodyLayout`, `windowActions` and action `pressed` values.
|
|
1527
|
+
Local editor round-trip tests do not prove remote tenant isolation or ETag behavior.
|
|
1528
|
+
|
|
1529
|
+
The existing AI operation `widget.shell.configure` merges partial shell input.
|
|
1530
|
+
Omitting `interactionHighlight` from that input preserves an existing override; it
|
|
1531
|
+
does not perform the visual editor's Inherit action, which removes the field from
|
|
1532
|
+
the complete saved document. Explicit `standard` disables the gradient but remains
|
|
1533
|
+
an override. Resetting an existing override to inherited styling through this AI
|
|
1534
|
+
operation remains unsupported; this option does not imply full editor/AI parity.
|
|
1535
|
+
|
|
1536
|
+
|
|
1537
|
+
|
|
1538
|
+
### Domain Rules: identidade explícita de operação (candidato G3)
|
|
1539
|
+
|
|
1540
|
+
As leituras `listSnapshotVersions`, `getSnapshotHeadStatus`, `getSnapshotHead`, `getSnapshotHostStatusSummary` e `getRolloutCatalog` exigem `operationKey` após `ruleSetKey`. A inspeção de lifecycle recebe `{ ruleSetKey, operationKey }` quando incluir snapshots. Nenhum método escolhe o primeiro perfil. As projeções de versão, head, rollout, status e publicação preservam essa identidade retornada pelo servidor.
|
|
1541
|
+
|
|
1542
|
+
O consumidor deve invalidar cache, requisições tardias e confirmações ao mudar de operação. Políticas de rollout permanecem familiares. Preparação neutra de candidato continua limitada ao endpoint host que resolve uma única operação registrada; não inventar um campo ou capacidade no cliente para compor famílias múltiplas. O corte público exige release coordenado do Core, bibliotecas dependentes e consumidores, seguido de instalação a partir do registry; tarball local só comprova candidato.
|
|
1543
|
+
|
|
1544
|
+
## Canonical `configPersistenceStrategy` Contract
|
|
1545
|
+
|
|
1546
|
+
`@praxisui/core` publishes `PraxisConfigPersistenceStrategy` (`'local-first' | 'input-first' | 'volatile'`), `PraxisLegacyConfigPersistenceStrategy`, and `normalizeConfigPersistenceStrategy(strategy, fallback)` as the shared precedence contract across Praxis components (`@praxisui/table`, `@praxisui/crud`, `@praxisui/tabs`, `@praxisui/expansion`, `@praxisui/dynamic-form`, `@praxisui/list`, `@praxisui/charts`):
|
|
1547
|
+
|
|
1548
|
+
- `'local-first'` (canonical; `'storage-first'` accepted as legacy alias): hydrates persisted overrides and persists runtime/authoring customizations for the component identity.
|
|
1549
|
+
- `'input-first'`: prioritizes host-supplied `[config]` / `[metadata]` over stored overrides so composed pages retain declarative ownership.
|
|
1550
|
+
- `'volatile'`: strictly ephemeral in-memory execution; never reads, writes, or clears configuration storage (used by temporary previews, inspect-only hosts, and sandbox views).
|
|
1551
|
+
|
|
1552
|
+
## Platform Governance, Enterprise Shell, and Reconciler Foundations
|
|
1553
|
+
|
|
1554
|
+
- **Theming & Layer Tokens (`_theming.scss` & `theme-bridge.css`):** Publishes `--praxis-info`, `--praxis-warning`, and canonical `--praxis-z-*` stacking tokens (`--praxis-z-drawer`, `--praxis-z-command-palette`, etc.) uniformly across Sass theming and runtime CSS bridge stylesheets, alongside `@media (forced-colors: active)` and GPU containment (`contain`) guidance for `--pdx-shell-card-backdrop-filter`.
|
|
1555
|
+
- **Fail-Closed Write Gates (`ApiConfigStorageOptions.canWriteTargetScope`):** Optional preflight resolver returning `boolean | ConfigStorageWriteDecision` (with structured `code` and `reason`) before `saveConfig`/`clearConfig` dispatch, preserving the fail-closed `EMPTY` return contract when blocked.
|
|
1556
|
+
- **Related Resource Outlet Customization (`PraxisRelatedResourceOutletComponent`):** Exposes `followShellCustomizationMode = input<boolean>(false)` so embedded related-resource surfaces opt in explicitly before inheriting shell customization state.
|
|
1557
|
+
- **Enterprise Shell & Command Palette:** Publishes the `praxis.shell.*` catalog (`pt-BR` and `en-US`), `PraxisContextSwitchGuard` for dirty-state verification, the `shell-scope-bar` projection slot, Global Settings / Create Page triggers decoupled from `customizationMode.isDisabled()`, and `<praxis-command-palette>` (`Ctrl+K`, RBAC filtering, `--praxis-z-*` layering, and conditional focus restoration).
|
|
1558
|
+
- **Authoring Contracts & Page Reconciliation:** Extends `ComponentDocMeta` with `schemaVersion`, `transientInputs`, `lockedInputs`, `visualOverrideKeys`, and `paletteVisibility` (`ComponentPaletteVisibility`: `'global' | 'explicit-only' | 'hidden'`); provides `PraxisPageReconcilerService` with fail-closed `PageIntegrityPolicy` (preserving `composition.links`, `layoutPreset`, `grouping`, and conservative `context` merges) and extended `WidgetPagePersistenceState.errorKind` (`'forbidden' | 'governance_denied' | 'network'`).
|
|
1559
|
+
- **Per-Widget Authoring Policy, Owner Rebind & Visual Row Compaction:** Exports `WidgetInstanceAuthoringPolicy` (`removable`, `duplicable`, `lockShellKind`) on `WidgetInstance.authoringPolicy`, enforced by `DynamicWidgetPageComponent` (toolbar/menu/projected shell actions, imperative duplicate/remove, shell constraints) and preserved/restored by `PraxisPageReconcilerService`; exposes `@Input() persistenceOwnerKey` on `DynamicWidgetPageComponent` to rehydrate scope-owned persistence without host `@for` teardown (`NG0956`); and compacts completely hidden grid rows visually in non-customizing `autoRows: 'content'` view mode without mutating authored `canvas.items`.
|
|
1560
|
+
|
|
1561
|
+
## Epistemic Governance & Intelligence Job Primitives (`@praxisui/core`)
|
|
1562
|
+
|
|
1563
|
+
- **Shared Epistemic & Statistical Contracts:** Exports `PraxisEpistemicKind` (`'DETERMINISTIC_LAW' | 'CALIBRATED_PROBABILITY' | 'STOCHASTIC_SIMULATION' | 'CAUSAL_HYPOTHESIS' | 'OPTIMIZATION_RESULT'`), `PraxisEpistemicAvailabilityState` (`'AVAILABLE' | 'INSUFFICIENT_SAMPLE' | 'K_ANONYMITY_SUPPRESSED' | 'ENGINE_UNAVAILABLE' | 'DEGRADED'`), `PraxisEpistemicMeta`, `PraxisCanonicalNigriniConformity`, `PRAXIS_INTELLIGENCE_ERROR_CODES`, `PraxisAnalyticsInferenceStatsRequest`, `PraxisAnalyticsAnomalyScanStatsRequest`, and analytics provenance helpers (`normalizePraxisEpistemicMeta`, `normalizePraxisNigriniConformity`, `getPraxisEpistemicKindIcon`, `formatPraxisEpistemicNumber`, `formatPraxisQValueFdr`, `extractAnalyticsEpistemicMetadata`, `attachAnalyticsEpistemicMetadata`, `readAnalyticsEpistemicMetadata`, `deriveFailClosedEpistemicMetaFromError`).
|
|
1564
|
+
- **Analytical Calculation Trails & Discovery:** Extends `PraxisAnalyticalDrawerCalculationTrail` with `epistemicMeta` and expression bindings (`epistemicMetaExpr`, `epistemicKindExpr`, `epistemicAvailabilityStateExpr`, `statisticallySignificantExpr`, `qValueFdrExpr`, `sampleSizeExpr`, `suppressedCellCountExpr`, `provenanceHashExpr`, `modelCardIdExpr`, `datasetKeyExpr`, `methodologyNoteExpr`, `nigriniMadExpr`, `nigriniConformityExpr`), and adds `'inference' | 'anomalies'` (`'statsInference' | 'statsAnomalies'`) support across `AnalyticsStatsOperation`, `ResourceDiscoveryService`, and `WidgetPageDataSourceRuntimeService` for workforce/payroll analytics without synthetic `COUNT` injection.
|
|
1565
|
+
- **Jobs Client & Silent Polling (`PraxisIntelligenceJobsService`):** Exposes `getJob`, `cancelJob`, `pollJob`, `PRAXIS_INTELLIGENCE_JOBS_BASE_PATH`, and `PraxisIntelligenceJobError`, delegating tenant/request headers to `EnterpriseRuntimeContextService` (falling back to `PAX_FETCH_HEADERS` only when enterprise context is absent), applying `createSilentPraxisLoadingContext()` on background poll requests so `PRAXIS_LOADING_CTX` remains inspectable without triggering global loading UI, tolerating bounded transient poll errors (`maxTransientErrors`), and cancelling safely across tenant switches or teardown.
|
|
1566
|
+
- **Reusable Frameless Components & Widget Metadata:** Publishes `<praxis-epistemic-badge>` (`PraxisEpistemicBadgeComponent`, `compact | detailed`, expandable provenance details, async `provenanceHash` copy, fail-closed `matTooltip`, `PRAXIS_EPISTEMIC_BADGE_METADATA`, `providePraxisEpistemicBadgeMetadata`) and `<praxis-intelligence-job-status>` (`PraxisIntelligenceJobStatusComponent`, `receipt` input or managed `jobId` polling with `emitInitialTerminal`, `maxTransientErrors`, `cancel`/`cancelFailed`/`expired`/`completed`/`failed` outputs, inline `cancelError` alert, and `aria-live="polite"`, `PRAXIS_INTELLIGENCE_JOB_STATUS_METADATA`, `providePraxisIntelligenceJobStatusMetadata`), localized in `pt-BR` and `en-US` via `PRAXIS_INTELLIGENCE_I18N_NAMESPACE` and `providePraxisIntelligenceI18n`.
|
|
1567
|
+
|
|
1568
|
+
### CSS Custom Properties (Icon Framing & Header Layout)
|
|
1569
|
+
|
|
1570
|
+
- **Widget Shell Header Layout (`<praxis-widget-shell>`):** `.pdx-shell-header` declares `container-type: inline-size` with `--pdx-shell-title-basis` (adjusting cleanly above `380px` to keep compact multi-icon desktop headers on one row) and `--pdx-shell-actions-gap`.
|
|
1571
|
+
- **Frameless KPI Icon Tokens (`<praxis-kpi-card-view>`):** Exposes `--prx-kpi-icon-size` (alias `--praxis-kpi-icon-size`), `--prx-kpi-icon-padding` / `--praxis-kpi-icon-padding`, `--prx-kpi-icon-radius` / `--praxis-kpi-icon-radius`, `--prx-kpi-icon-border` / `--praxis-kpi-icon-border`, `--prx-kpi-icon-bg` / `--praxis-kpi-icon-bg`, `--prx-kpi-icon-shadow` / `--praxis-kpi-icon-shadow`, `--prx-kpi-icon-glyph-size` / `--praxis-kpi-icon-glyph-size`, and `--prx-kpi-icon-fg` / `--praxis-kpi-icon-fg`.
|
|
1572
|
+
- **Surface Context Framing (`<praxis-surface-host>`):** `.pdx-surface-host__operation-context` exposes `--pdx-surface-context-border` (default `none`), `--pdx-surface-context-accent-border` (default `3px solid var(--md-sys-color-primary, currentColor)`), and `--pdx-surface-context-radius` (default `0 10px 10px 0`), letting hosts switch to a uniform perimeter border without left-edge stripes.
|
|
1573
|
+
|
|
1068
1574
|
<!-- praxis-npm-catalog-links:start -->
|
|
1069
1575
|
## Official documentation and examples
|
|
1070
1576
|
|