@praxisui/table 9.0.4-rc.47 → 9.0.4-rc.49
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 +34 -0
- package/ai/component-registry.json +406 -289
- package/fesm2022/{praxisui-table-praxisui-table-CUH7vNfu.mjs → praxisui-table-praxisui-table-Cf63AwZs.mjs} +306 -19
- package/fesm2022/{praxisui-table-table-agentic-authoring-turn-flow-DsM7fuli.mjs → praxisui-table-table-agentic-authoring-turn-flow-Cz_xmaGA.mjs} +1 -1
- package/fesm2022/{praxisui-table-table-ai.adapter-B3JduSXn.mjs → praxisui-table-table-ai.adapter-iUYC2oD5.mjs} +1 -1
- package/fesm2022/praxisui-table.mjs +1 -1
- package/package.json +10 -10
- package/src/lib/praxis-table.json-api.md +41 -1
- package/types/praxisui-table.d.ts +19 -1
package/README.md
CHANGED
|
@@ -99,6 +99,40 @@ Use `resourcePath` when the host wants the table to enter backend schema/data mo
|
|
|
99
99
|
|
|
100
100
|
`resourcePath` is enough only when the host already provides the Praxis API/CRUD wiring expected by the table runtime. In remote mode, the table derives columns from the backend schema contract and data from the backend resource/filter contract.
|
|
101
101
|
|
|
102
|
+
For schema-governed tables that need only a few editorial differences, keep
|
|
103
|
+
`columns: []` and declare a schema projection. The runtime derives every visible
|
|
104
|
+
column from `/schemas/filtered` and reapplies the overrides by canonical field
|
|
105
|
+
name whenever the schema changes:
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
const config: TableConfig = {
|
|
109
|
+
columns: [],
|
|
110
|
+
columnProjection: {
|
|
111
|
+
source: 'schema',
|
|
112
|
+
include: ['competencia', 'salarioBruto', 'salarioLiquido'],
|
|
113
|
+
overrides: {
|
|
114
|
+
salarioLiquido: { sticky: 'end', width: '160px' },
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
An unknown override never creates a client-only column, and the override cannot
|
|
121
|
+
change the canonical `field`. Use explicit `columns` only when the page really
|
|
122
|
+
owns a complete local projection rather than schema-derived defaults.
|
|
123
|
+
|
|
124
|
+
The table editor keeps the expanded columns only in memory. On apply/save and
|
|
125
|
+
in `configChange`, it serializes the contract back to `include` plus the actual
|
|
126
|
+
`overrides`. Computed or other genuinely client-owned columns are preserved in
|
|
127
|
+
`columnProjection.additions`; an addition cannot shadow a canonical schema
|
|
128
|
+
field. This round-trip prevents customization from turning the compact page
|
|
129
|
+
contract back into a schema copy.
|
|
130
|
+
|
|
131
|
+
`include` is an ordered allowlist. Omit it only when every field marked as table
|
|
132
|
+
visible by the backend belongs in the experience. Prefer it for financial,
|
|
133
|
+
personal, or otherwise sensitive resources so future schema fields are not
|
|
134
|
+
published implicitly.
|
|
135
|
+
|
|
102
136
|
Optional collection operations such as export are not implied by a base route. Expose them only when backend capabilities or HATEOAS links prove that the operation is available.
|
|
103
137
|
|
|
104
138
|
When the collection response exposes `_links.create` or a collection `capabilities` snapshot with create support, `PraxisTable` can materialize the canonical `create` toolbar action without requiring each host screen to duplicate labels, disabled state, schema URLs, or submit URLs. If the host provides `surface.open`, the action opens the create form as a governed collection surface; otherwise the table emits `toolbarAction` with the enriched action metadata for the composed host to handle.
|