@praxisui/page-builder 9.0.68-rc.3 → 10.0.0-rc.10
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 +89 -1
- package/ai/component-registry.json +72 -54
- package/fesm2022/praxisui-page-builder.mjs +806 -314
- package/package.json +4 -4
- package/types/praxisui-page-builder.d.ts +62 -4
package/README.md
CHANGED
|
@@ -4,6 +4,54 @@ Visual page and dashboard builder for Praxis UI applications.
|
|
|
4
4
|
|
|
5
5
|
Use this package when an application must let users compose governed operational pages from registered widgets, visual layout, shell settings, component editors, `composition.links`, and optional AI-assisted authoring.
|
|
6
6
|
|
|
7
|
+
## Dashboard pages and persistence ownership
|
|
8
|
+
|
|
9
|
+
A dashboard is a `WidgetPageDefinition` rendered by `praxis-dynamic-page` and edited
|
|
10
|
+
by `praxis-dynamic-page-builder`. The beta `PraxisDashboardPage` wrapper was removed;
|
|
11
|
+
use these existing components instead. Application titles, toolbar presentation and
|
|
12
|
+
business navigation remain host concerns.
|
|
13
|
+
|
|
14
|
+
For manual page editing, opt in to the Core persistence lifecycle:
|
|
15
|
+
|
|
16
|
+
```html
|
|
17
|
+
<praxis-dynamic-page-builder
|
|
18
|
+
#builder
|
|
19
|
+
[page]="defaultPage"
|
|
20
|
+
[pageIdentity]="identity"
|
|
21
|
+
[autoPersist]="true"
|
|
22
|
+
[enableCustomization]="editing"
|
|
23
|
+
(persistenceChange)="persistence = $event"
|
|
24
|
+
/>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
`autoPersist` defaults to `false` on the builder, preserving its previous effective
|
|
28
|
+
behavior (the child runtime previously always received `false`). Hosts that already
|
|
29
|
+
persist `pageAuthoringChange`/`pageSaveRequested` must leave it disabled. Core Dynamic
|
|
30
|
+
Page keeps its own existing default. Do not enable a second host writer when Core
|
|
31
|
+
owns persistence.
|
|
32
|
+
|
|
33
|
+
Pass `PageIdentity` with the application's actual tenant/user/route. Core uses the
|
|
34
|
+
configured `ASYNC_CONFIG_STORAGE`; no separate localStorage cache, browser globals
|
|
35
|
+
or persona-specific host reconciler is needed. Storage identity is not backend
|
|
36
|
+
authorization. Persisted documents, including an empty widget list, are authoritative;
|
|
37
|
+
new factory widgets are not silently appended to a user's saved page.
|
|
38
|
+
|
|
39
|
+
`persistenceChange` forwards Core's operational `WidgetPagePersistenceState`:
|
|
40
|
+
`idle`, `loading`, `saving`, `saved`, `resetting` or `error`, with `customized`, optional
|
|
41
|
+
ISO `savedAt`, operation and a safe `errorKind`. Show success only after acknowledgement,
|
|
42
|
+
and distinguish conflicts from a pending or failed write. It is not business metadata
|
|
43
|
+
and must not be persisted in `WidgetPageDefinition`.
|
|
44
|
+
|
|
45
|
+
`builder.resetPersistedPage(defaultPage)` deletes this identity's saved page and applies
|
|
46
|
+
the supplied default only after acknowledgement. `builder.reloadPersistedPage(defaultPage)`
|
|
47
|
+
explicitly discards the draft and reloads storage, using the supplied default when no saved
|
|
48
|
+
page exists. Make that destructive-to-draft intent visible in the host. The existing Save
|
|
49
|
+
button retries through Core for manually managed pages; conflicts require an explicit reload.
|
|
50
|
+
|
|
51
|
+
For `authoringDocument` or agentic authoring, Core automatic persistence is disabled even
|
|
52
|
+
when requested: the existing host/server apply lifecycle owns revisions and provenance.
|
|
53
|
+
An AI preview must never be saved through an automatic generic config write.
|
|
54
|
+
|
|
7
55
|
## Widget shell editor integrity
|
|
8
56
|
|
|
9
57
|
The shell editor exposes **Keep header visible while scrolling the page**
|
|
@@ -345,9 +393,21 @@ Feedback cycles are validated before authoring and runtime delivery. Direct or i
|
|
|
345
393
|
The visual connection editor is an authoring surface over the saved `composition.links` document. It does not create a parallel graph DSL.
|
|
346
394
|
|
|
347
395
|
Invalid JSON in an embedded Surface editor starts or retains the connection draft
|
|
348
|
-
and blocks Apply. Correcting that text still respects the other connection
|
|
396
|
+
and blocks Apply unless a payload expression is the effective source. Correcting that text still respects the other connection
|
|
349
397
|
diagnostics; Cancel discards the transient text without publishing a page change.
|
|
350
398
|
|
|
399
|
+
For a `global-action` target, absence of both structured `payload` and
|
|
400
|
+
`payloadExpr` means the action receives the value delivered by the connection;
|
|
401
|
+
it is not an implicit literal. A pre-existing `payloadExpr` remains the effective
|
|
402
|
+
source even when a structured payload is preserved, until the author explicitly
|
|
403
|
+
chooses a source. The Connection Editor does not author or edit expression text.
|
|
404
|
+
Choosing structured data removes the existing expression; if no structured value
|
|
405
|
+
is then present, delivery remains the source. An invalid structured Surface draft
|
|
406
|
+
may stay locally preserved while an expression is active, but it is not the active
|
|
407
|
+
payload and does not publish a page change. Cancel discards that transient draft
|
|
408
|
+
with the rest of the connection transaction. Returning to a source without an
|
|
409
|
+
expression reactivates its error and Apply block until the draft is repaired or discarded.
|
|
410
|
+
|
|
351
411
|
Current capabilities include:
|
|
352
412
|
|
|
353
413
|
- inspecting persisted links, endpoints, intent, condition, transform and policy through the on-demand **Inspector**; opening it from the toolbar, canvas, link list, **Locate**, or port catalogue brings focus to the inspector header; catalogue and inspector are mutually exclusive. Dismissal restores the initiating catalogue, selected port and connection when applicable, including its internal scroll position; Escape closes one inspection layer at a time. Other entries restore their initiating control, with the editor as fallback when a canvas target is offscreen;
|
|
@@ -511,6 +571,23 @@ Schema-derived table columns already use the canonical `TableConfig.columnProjec
|
|
|
511
571
|
|
|
512
572
|
`ComponentDocMeta.insertionPresets` remains the canonical catalog for reusable defaults owned by one component. It is not a page/domain template system: do not publish Employee Operations presets from CRUD, tabs, or related-resource outlet metadata merely to shorten a business recipe.
|
|
513
573
|
|
|
574
|
+
To streamline host registration of widget providers and component metadata without repetitive manual bootstrap code, `@praxisui/page-builder` exports the `providePraxisPageBuilderWidgets(widgets?: Array<Provider | ComponentDocMeta>)` helper. Hosts can supply a bundle of standard providers or direct `ComponentDocMeta` objects; any `ComponentDocMeta` passed is automatically registered with `ComponentMetadataRegistry` during environment initialization:
|
|
575
|
+
|
|
576
|
+
```ts
|
|
577
|
+
import { providePraxisPageBuilderWidgets } from '@praxisui/page-builder';
|
|
578
|
+
import { providePraxisListMetadata } from '@praxisui/list';
|
|
579
|
+
import { providePraxisTableMetadata } from '@praxisui/table';
|
|
580
|
+
|
|
581
|
+
export const appConfig: ApplicationConfig = {
|
|
582
|
+
providers: [
|
|
583
|
+
...providePraxisPageBuilderWidgets([
|
|
584
|
+
providePraxisListMetadata(),
|
|
585
|
+
providePraxisTableMetadata(),
|
|
586
|
+
]),
|
|
587
|
+
],
|
|
588
|
+
};
|
|
589
|
+
```
|
|
590
|
+
|
|
514
591
|
For complete governed page templates, the additive `UiCompositionPlanTemplateReference` pins the canonical `ai_registry` key and complete `configJson` SHA-256. The Config Starter resolves the active `SYSTEM/GLOBAL` record, verifies the exact hash, extracts its governed `authoringPlan`, and only then invokes the existing compiler. Angular consumers can use the pure `resolveUiCompositionPlanTemplate` helper only with an explicitly supplied `UiCompositionPlanTemplateMaterialization`; the helper performs no HTTP, search, or implicit selection. The first contract accepts no non-empty overrides, fails closed for missing, inactive, malformed, or stale references, and never persists the unresolved reference. `version` and `etag` are retained as audit evidence, while `configSha256` is the required content pin.
|
|
515
592
|
|
|
516
593
|
Keep the compact authoring plan, the compiled executable page, and the surrounding recipe metadata as distinct artifacts. `UiCompositionPlan` is the reviewable authoring intent; `WidgetPageDefinition` is the explicit runtime graph; recipe metadata and operational evidence document when and how the example should be used. The server compiler must produce the same executable page as the Page Builder compiler before persistence.
|
|
@@ -1059,3 +1136,14 @@ and block value production with a localized diagnostic, allowing correction with
|
|
|
1059
1136
|
losing unrelated context. Arrangement choices track their draft baseline even when the
|
|
1060
1137
|
selected distribution initially produces no changes, so later edits clear stale status.
|
|
1061
1138
|
These fixes are not part of the already published 9.0.68-rc.2 package.
|
|
1139
|
+
|
|
1140
|
+
`retryPersistedPage()` retries the current draft after a non-conflict save failure,
|
|
1141
|
+
including empty pages, without emitting host save lifecycle events. Conflicts require
|
|
1142
|
+
explicit `reloadPersistedPage(defaultPage)`; reload discards the local draft.
|
|
1143
|
+
|
|
1144
|
+
<!-- praxis-npm-catalog-links:start -->
|
|
1145
|
+
## Official documentation and examples
|
|
1146
|
+
|
|
1147
|
+
- [Canonical technical overview: Overview](https://praxisui.dev/docs/components/praxis-page-builder)
|
|
1148
|
+
- [Praxis Angular public catalog](https://praxisui.dev/angular)
|
|
1149
|
+
<!-- praxis-npm-catalog-links:end -->
|