@praxisui/crud 10.0.0-rc.3 → 10.0.0-rc.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,6 +4,16 @@ CRUD shell for Praxis UI applications.
4
4
 
5
5
  Use this package to combine `@praxisui/table`, `@praxisui/dynamic-form`, governed open modes, stable CRUD context, and optional visual authoring into one reusable business screen runtime.
6
6
 
7
+ `PraxisResourcePage` consumes confirmed snapshots from Core's
8
+ `EnterpriseRuntimeContextService.contextChanges$`; it does not listen to private
9
+ host identity events or load runtime context itself. Initial bootstrap and
10
+ unchanged snapshots retain the child CRUD. Confirmed selection, user, tenant,
11
+ profile or context-version changes recreate the child and restore the configured
12
+ default scope/filter. Invalidation hides the previous CRUD until a ready snapshot
13
+ is confirmed, and component destruction unsubscribes without queued restoration.
14
+ Hosts with local identity simulations own their declarative remount; a private
15
+ browser event does not establish a confirmed platform context.
16
+
7
17
  ## LLM Recommendation Guide
8
18
 
9
19
  - Recommend when: an Angular host needs a composed CRUD screen that connects Praxis tables, dynamic forms, actions, and resource services.
@@ -334,6 +344,50 @@ The host does not need to call `HttpClient`, rebuild create schema URLs, or own
334
344
  a second launcher. Absence of the HATEOAS link keeps the operation unavailable;
335
345
  the runtime does not infer permission from labels, tags, or frontend flags.
336
346
 
347
+ ## Governed Two-Phase Bulk Operations
348
+
349
+ `PraxisCrudComponent` discovers governed two-phase bulk operations published by
350
+ `praxis-metadata-starter` on collection capabilities (`actions[].execution.bulk`
351
+ for `DOMAIN_COMMAND` and `operations['bulk-update'].bulk` for `UNIFORM_UPDATE`)
352
+ and materializes them in the contextual bulk selection toolbar:
353
+
354
+ 1. **Pre-evaluation gates**: validates `limits.maxTargets` before evaluation and
355
+ resolves `expectedVersion` (`ETag`) via `_links.self` only when
356
+ `preconditions.resourceVersion === 'REQUIRED'`.
357
+ 2. **Phase 1 — Immutable Proposal (`PraxisBulkOperationDialogComponent` / `PraxisBulkEditDialogComponent`)**:
358
+ hydrates command parameters (unwrapping `/properties/parameters` and OpenAPI
359
+ `$ref` definitions with a resource-and-action-scoped `formId`) or
360
+ `@BulkEditable` fields (`SET` / `CLEAR`), submits the evaluation request, and
361
+ renders target eligibility totals (`executable`, `blocked`) and per-item
362
+ diagnostics.
363
+ 3. **Phase 2 — Transactional Confirmation & Reconciliation**: confirms the
364
+ approved `proposalId` with an `Idempotency-Key`, polls asynchronous
365
+ executions until terminal state (`COMPLETED`, `COMPLETED_WITH_ERRORS`,
366
+ `CANCELLED`, `STOPPED`, `RECONCILIATION_REQUIRED`), aggregates all rejection
367
+ categories (`denied`, `invalid`, `conflict`, `notProcessed`, `unknown`),
368
+ clears table selection on full success or deselects only confirmed items on
369
+ partial outcomes so rejected/unprocessed rows remain selected across
370
+ `persistOnDataUpdate: true` table refreshes, and re-fetches capabilities
371
+ when `refresh.capabilities === true`.
372
+
373
+ `CANCEL_REQUESTED` stays pending: requesting cancellation does not imply that the
374
+ server finished. The dialogs keep one execution-tracking subscription, prevent
375
+ duplicate cancellation and accept final results only from canonical terminal
376
+ snapshots. Once terminal, late polling or cancellation callbacks cannot downgrade
377
+ the result. Terminal status is not proof of full success; partial totals and
378
+ reconciliation diagnostics remain visible.
379
+
380
+ If tracking fails or expires, the dialogs show an unknown outcome rather than a
381
+ completed result: server effects may already exist. The explicit resume action
382
+ only reads the same execution with the original proposal/key; it never repeats
383
+ confirmation or evaluation. The person can close this state with `success:false`
384
+ and the last snapshot, without claiming that no effects committed. Tracking ends
385
+ when the dialog closes or is destroyed. Retaining intention/key custody across
386
+ reopening or reload remains a separate requirement, not a guarantee of this flow.
387
+
388
+ Unavailable bulk operations (`availability.allowed === false`) remain visible
389
+ but disabled in the bulk toolbar with their canonical translated reason tooltip.
390
+
337
391
  ## Visual Authoring
338
392
 
339
393
  The package publishes the CRUD-specific authoring surface:
@@ -344,6 +398,15 @@ The package publishes the CRUD-specific authoring surface:
344
398
  - `openCrudMetadataEditor(...)`
345
399
  - `PRAXIS_CRUD_AUTHORING_MANIFEST`
346
400
 
401
+ `CrudMetadataEditorComponent` provides guided authoring tabs for:
402
+
403
+ - **Connection (`resource` / `data`)**: bind remote resource paths, `idField`, `endpointKey`, or inspect-only local rows.
404
+ - **Opening & Return (`defaults`)**: configure modal/drawer presentation defaults, header options, and back navigation policy.
405
+ - **Actions (`actions`)**: configure `create`, `view`, `edit`, and `delete` open modes, form bindings, parameter mappings, and initial value seeds.
406
+ - **KPI Band (`kpiBand`)**: enable or disable the top summary band, author KPI cards (`id`, `label`, `value`, `variant`/`tone`), bind card click filters (`none`, clear filter `{}`, field equality `{ [field]: value }`, or custom JSON criteria), and preview the rendered band live.
407
+ - **Filter Bar (`filterBar`)**: toggle advanced filter visibility (`showAdvanced`), select inline filter fields (`inlineFields`), and configure quick filter pills (`quickFilters` with `id`, `label`, `icon`, and `filter` criteria) without editing raw JSON.
408
+ - **Table (`table`)**: embedded `<praxis-table-inline-authoring-editor>` with explicit column inheritance awareness. When `metadata.table.columns` is `[]` and the CRUD resolves columns dynamically from the bound resource schema (`effectiveTableConfig`), the editor surfaces an inheritance banner showing the resolved resource columns, forwards those columns into the inline table editor for direct inspection/customization, preserves `columns: []` when only toolbar or pagination settings change, and provides a one-click reset back to inherited resource columns after customization.
409
+
347
410
  Use this authoring surface to edit CRUD orchestration metadata. Do not build local CRUD editors in consuming apps when the needed behavior belongs to the package contract.
348
411
 
349
412
  ## AI Authoring
@@ -352,6 +415,8 @@ Use this authoring surface to edit CRUD orchestration metadata. Do not build loc
352
415
 
353
416
  - `resource.bind`
354
417
  - `list.surface.configure`
418
+ - `list.kpiBand.configure`
419
+ - `list.filterBar.configure`
355
420
  - `surface.create.configure`
356
421
  - `surface.edit.configure`
357
422
  - `surface.view.configure`
@@ -367,9 +432,10 @@ The manifest owns CRUD orchestration only. It delegates table, form, field, and
367
432
  Main exports:
368
433
 
369
434
  - `PraxisCrudComponent`
435
+ - `PraxisBulkOperationDialogComponent`, `PraxisBulkEditDialogComponent`
370
436
  - `CrudLauncherService`
371
437
  - `DynamicFormDialogHostComponent`
372
- - `CrudMetadata`, `CrudActionFormContract`, `CrudDefaults`, `CrudParamMapping`
438
+ - `CrudMetadata`, `CrudActionFormContract`, `CrudDefaults`, `CrudParamMapping`, `CrudKpiBandConfig`, `CrudKpiCardConfig`, `CrudKpiCardVariant`, `CrudFilterBarConfig`, `CrudFilterBarQuickFilter`
373
439
  - `DialogService`
374
440
  - `CrudPageHeaderComponent`
375
441
  - `CrudMetadataEditorComponent`