@praxisui/crud 9.0.0-beta.70 → 9.0.0-beta.72

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
@@ -94,6 +94,7 @@ export class EmployeesCrudComponent {
94
94
  - `componentInstanceId`: optional host-level instance id
95
95
  - `context`: host/runtime context passed into table and form flows
96
96
  - `enableCustomization`: enables the package authoring surface
97
+ - `authoringCapability`: optionally requires the exact capability from `EnterpriseRuntimeContext.capabilities` before authoring controls, the CRUD editor, and its internal table authoring are available. This is a UX gate; governed persistence must enforce the same policy server-side.
97
98
 
98
99
  It emits:
99
100
 
@@ -161,6 +162,33 @@ Drawer mode works without a host adapter: the package opens its standard form
161
162
  dialog host with drawer presentation. Provide `CRUD_DRAWER_ADAPTER` only when a
162
163
  host must replace that standard shell with a real corporate drawer implementation.
163
164
 
165
+ ## Empty collection state
166
+
167
+ When collection creation is available, `PraxisCrudComponent` derives the initial
168
+ empty state for its table from the resource label and the canonical `create`
169
+ action. The compact state uses the shared `praxis-empty-state-card`, repeats the
170
+ same create label/icon exposed by the toolbar, and invokes the same action path.
171
+
172
+ Filtered or searched empty results remain distinct and use the table no-results
173
+ copy without suggesting that the user create a duplicate record. An explicit
174
+ `table.behavior.emptyState` always wins, allowing domain-specific read-only or
175
+ guided states without host CSS or a parallel empty-state component.
176
+
177
+ ## Duplicate Draft
178
+
179
+ `PraxisCrudComponent` recognizes the canonical optional `duplicate-draft`
180
+ operation published by `praxis-metadata-starter`. When a selected row exposes
181
+ `_links['duplicate-draft']`, the runtime:
182
+
183
+ 1. invokes the non-mutating draft endpoint;
184
+ 2. unwraps the returned draft DTO;
185
+ 3. opens the canonical `create` form with that DTO as `initialValue`;
186
+ 4. refreshes the table only after the user saves the new record.
187
+
188
+ The host does not need to call `HttpClient`, rebuild create schema URLs, or own
189
+ a second launcher. Absence of the HATEOAS link keeps the operation unavailable;
190
+ the runtime does not infer permission from labels, tags, or frontend flags.
191
+
164
192
  ## Visual Authoring
165
193
 
166
194
  The package publishes the CRUD-specific authoring surface: