@praxisui/table 9.0.0-beta.8 → 9.0.0-beta.81
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 +96 -1
- package/ai/component-registry.json +23557 -0
- package/docs/column-resize-reorder-implementation-plan.md +42 -34
- package/docs/local-data-support-implementation-plan.md +17 -17
- package/docs/local-data-support-pr-package.md +12 -12
- package/docs/release-notes-p1-hardening.md +1 -3
- package/docs/resource-events.md +28 -0
- package/fesm2022/{praxisui-table-filter-form-dialog-host.component-DbwGIMjF.mjs → praxisui-table-filter-form-dialog-host.component-CStl0VfD.mjs} +2 -2
- package/fesm2022/{praxisui-table-praxisui-table-B-goiuDf.mjs → praxisui-table-praxisui-table-7iWPoCFj.mjs} +3710 -775
- package/fesm2022/{praxisui-table-table-agentic-authoring-turn-flow-DL9l0XF7.mjs → praxisui-table-table-agentic-authoring-turn-flow-Cl8C90zm.mjs} +243 -19
- package/fesm2022/{praxisui-table-table-ai.adapter-9uRovA63.mjs → praxisui-table-table-ai.adapter-B46F-SpL.mjs} +113 -13
- package/fesm2022/praxisui-table.mjs +1 -1
- package/package.json +16 -11
- package/src/lib/praxis-table.json-api.md +51 -19
- package/types/praxisui-table.d.ts +320 -42
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ npm i @praxisui/table@latest
|
|
|
26
26
|
Peer dependencies:
|
|
27
27
|
|
|
28
28
|
- `@angular/common`, `@angular/core`, `@angular/forms`, `@angular/cdk`, `@angular/material`, `@angular/router` `^21.0.0`
|
|
29
|
-
- `@praxisui/ai`, `@praxisui/core`, `@praxisui/dialog`, `@praxisui/dynamic-fields`, `@praxisui/dynamic-form`, `@praxisui/metadata-editor`, `@praxisui/rich-content`, `@praxisui/settings-panel`, `@praxisui/table-rule-builder` `^9.0.0-beta.
|
|
29
|
+
- `@praxisui/ai`, `@praxisui/core`, `@praxisui/dialog`, `@praxisui/dynamic-fields`, `@praxisui/dynamic-form`, `@praxisui/metadata-editor`, `@praxisui/rich-content`, `@praxisui/settings-panel`, `@praxisui/table-rule-builder` `^9.0.0-beta.12`
|
|
30
30
|
- `rxjs` `~7.8.0`
|
|
31
31
|
|
|
32
32
|
## Minimum Local Runtime
|
|
@@ -87,6 +87,8 @@ Use `resourcePath` when the host wants the table to enter backend schema/data mo
|
|
|
87
87
|
|
|
88
88
|
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.
|
|
89
89
|
|
|
90
|
+
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.
|
|
91
|
+
|
|
90
92
|
## Runtime Inputs And Outputs
|
|
91
93
|
|
|
92
94
|
Common inputs:
|
|
@@ -122,6 +124,56 @@ Common outputs:
|
|
|
122
124
|
|
|
123
125
|
The table owns table orchestration and rendering. It does not own backend resource semantics, form payloads, page composition, or business rules outside the table contract.
|
|
124
126
|
|
|
127
|
+
Fields generated from backend schema metadata can render compact corporate indicators when `field.presentation.presenter` is `chip`, `badge`, `status`, `iconValue`, or `microVisualization`. For chip/badge/status renderers, the table keeps `col.field` bound to the original field so sort, filter, export, and row actions continue to use the raw value. Omit `presentation.label` when the cell should display the row value; set it only when the schema intentionally wants a fixed visible label for every row.
|
|
128
|
+
|
|
129
|
+
For `iconValue`, `presentation.prefix` and `presentation.suffix` are rendered as separate rich text markers, not as part of the raw value. When an affix is present, the table suppresses the decorative icon by default so markers such as `#099` stay subtle and do not duplicate a tag/hash icon. Hosts can tune this through table CSS tokens such as `--p-table-icon-value-gap`, `--p-table-icon-value-affix-color`, `--p-table-icon-value-affix-opacity`, `--p-table-icon-value-affix-font-size`, `--p-table-icon-value-affix-font-weight`, `--p-table-icon-value-color`, and `--p-table-icon-value-font-weight`.
|
|
130
|
+
|
|
131
|
+
For schema-driven chip/badge/status cells, `presentation.tone` is mapped to table theme tokens: `neutral` becomes `basic`, `warning` becomes `warn`, and `info`, `success`, and `danger` are preserved. `presentation.appearance` maps to renderer variants `plain`, `soft`, `outlined`, and `filled`; `plain` renders without filled emphasis for dense enterprise tables.
|
|
132
|
+
|
|
133
|
+
Fields generated from backend schema metadata can render compact corporate micro visualizations when `field.presentation.presenter` is `microVisualization` and `field.presentation.visualization.surface` is `table-cell`. The canonical visualization shape is `PraxisPresentationVisualizationConfig` from `@praxisui/core`; the table only hosts the compact cell renderer.
|
|
134
|
+
|
|
135
|
+
For row-specific corporate indicators, declare `*Expr` properties inside the visualization, such as `valueExpr`, `valueSuffixExpr`, `totalExpr`, `targetExpr`, `baselineExpr`, `segmentsExpr`, `pointsExpr`, `thresholdsExpr`, `itemsExpr`, `toneExpr`, `ariaLabelExpr`, and `fallbackTextExpr`. In `PraxisTable`, string expressions are row-context paths like `row.slaAtual`; structured expressions use Json Logic. Use `valueSuffix`/`valueSuffixExpr` for compact `delta` units such as `%`, ` pp`, ` USD`, or ` dias`; the suffix is rendered literally, so include leading spacing when the unit requires it. Use `points`/`pointsExpr` for `line`, `area`, `column`, and `comparison`; `segments`/`segmentsExpr` for `stackedBar`; `thresholds`/`thresholdsExpr` for bullet bands; and `items`/`itemsExpr` for `processFlow`.
|
|
136
|
+
|
|
137
|
+
Table-safe micro visualization kinds are `line`, `area`, `column`, `comparison`, `stackedBar`, `radial`, `harveyBall`, `bullet`, `delta`, and `processFlow`. If a row does not provide the minimum series/step data for a visual kind, the renderer keeps an accessible compact fallback with `role="img"` and the configured fallback or aria text.
|
|
138
|
+
|
|
139
|
+
For dense enterprise tables, `radial` table cells render the percent as adjacent text instead of inside the ring, `delta` shows a directional marker plus the formatted value and suffix, and `processFlow` hides visible step labels while preserving the step sequence in the generated accessible name. Prefer `ariaLabelExpr` when the business meaning needs more detail than the compact visual text.
|
|
140
|
+
|
|
141
|
+
Use `config.ai.assistant.enabled = false` when a host needs to disable the embedded AI assistant entrypoint for a table instance. The default is enabled, so existing AI-enabled tables keep the current behavior without extra config. When the value changes to `false`, the component closes the assistant and removes the table assistant session from the shared assistant registry.
|
|
142
|
+
|
|
143
|
+
## Empty State
|
|
144
|
+
|
|
145
|
+
Use `behavior.emptyState` for table-owned no-data copy and presentation. `message` remains the required backward-compatible text. When `title` is omitted, `message` is used as the empty-state title. When `title` is provided, `message` is rendered as the description unless `description` is explicitly set.
|
|
146
|
+
|
|
147
|
+
When the host does not provide `behavior.emptyState` or legacy `messages.states` copy, the table uses localized runtime defaults for the initial empty collection and for the filtered/search no-results state. Context-specific entries in `behavior.emptyState.contexts.initial`, `behavior.emptyState.contexts.filtered`, and `behavior.emptyState.contexts.searched` still override the base empty state for those modes.
|
|
148
|
+
|
|
149
|
+
```ts
|
|
150
|
+
const config: TableConfig = {
|
|
151
|
+
behavior: {
|
|
152
|
+
emptyState: {
|
|
153
|
+
title: 'Sem documentos legais',
|
|
154
|
+
message: 'Inclua um documento legal para registrar a base normativa deste código.',
|
|
155
|
+
icon: 'gavel',
|
|
156
|
+
density: 'compact',
|
|
157
|
+
variant: 'inline',
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
};
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Toolbar Appearance
|
|
164
|
+
|
|
165
|
+
Use `toolbar.appearance` for governed toolbar chrome instead of host CSS targeting internal classes. The built-in preset `table-integrated` composes toolbar and table as one operational block using public tokens for background, border, radius, shadow, spacing, and density.
|
|
166
|
+
|
|
167
|
+
```ts
|
|
168
|
+
const config: TableConfig = {
|
|
169
|
+
toolbar: {
|
|
170
|
+
visible: true,
|
|
171
|
+
position: 'top',
|
|
172
|
+
appearance: { preset: 'table-integrated' },
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
```
|
|
176
|
+
|
|
125
177
|
## Filtering And Row Actions
|
|
126
178
|
|
|
127
179
|
The package exports both the table runtime and `PraxisFilter` integration surfaces.
|
|
@@ -131,6 +183,43 @@ The package exports both the table runtime and `PraxisFilter` integration surfac
|
|
|
131
183
|
- Contextual row discovery can use backend HATEOAS/capabilities when enabled.
|
|
132
184
|
- `visibleWhen` and `disabledWhen` use canonical JSON Logic.
|
|
133
185
|
|
|
186
|
+
The filter field manager follows the compact inline visual language and can be themed by hosts through
|
|
187
|
+
`--pfx-field-manager-surface`, `--pfx-field-manager-on-surface`,
|
|
188
|
+
`--pfx-field-manager-on-surface-muted`, `--pfx-field-manager-outline`,
|
|
189
|
+
`--pfx-field-manager-focus-outline`, `--pfx-field-manager-search-surface`,
|
|
190
|
+
`--pfx-field-manager-search-on-surface`, `--pfx-field-manager-search-placeholder`,
|
|
191
|
+
`--pfx-field-manager-search-height`, `--pfx-field-manager-search-radius`,
|
|
192
|
+
`--pfx-field-manager-search-font-size`, `--pfx-field-manager-search-line-height`,
|
|
193
|
+
`--pfx-field-manager-search-font-weight`, `--pfx-field-manager-search-icon-size`,
|
|
194
|
+
`--pfx-field-manager-scrollbar-thumb`, `--pfx-field-manager-scrollbar-thumb-hover`,
|
|
195
|
+
`--pfx-field-manager-scrollbar-track`, and `--pfx-field-manager-scrollbar-size`. Their defaults inherit
|
|
196
|
+
the corresponding `--pdx-inline-*` tokens when available, then the semantic `--praxis-theme-*` roles,
|
|
197
|
+
and finally Material system
|
|
198
|
+
tokens; `--pfx-field-manager-search-radius` intentionally defaults to Material's full corner radius so
|
|
199
|
+
the search focus ring and field share the same pill geometry. The runtime resolves every public
|
|
200
|
+
`--pfx-field-manager-*` token from the host before applying its private fallback, so overrides take
|
|
201
|
+
effect without CSS specificity workarounds. The scrollable field list reserves a stable scrollbar gutter
|
|
202
|
+
and derives a contrasting thumb from the manager surface and on-surface roles, so its overflow affordance
|
|
203
|
+
does not depend on application-global scrollbar styles. Native scrollbar auto-hide preferences can still
|
|
204
|
+
control when the operating system displays the thumb. Because the manager renders in a CDK overlay, define host overrides on a global theme scope
|
|
205
|
+
such as `html`, `body`, or the application theme class rather than only on the `praxis-filter` element.
|
|
206
|
+
When using the `PraxisFilter` i18n input, `selectedFieldsSectionTitle` and
|
|
207
|
+
`availableFieldsSectionTitle` customize the grouped field-manager headings; both are optional and
|
|
208
|
+
default to the Portuguese runtime labels. Each manageable field preserves its authored
|
|
209
|
+
`FieldMetadata.description` (falling back to its explicit tooltip/help metadata) as an information
|
|
210
|
+
tooltip on hover and keyboard focus. This lets operators distinguish semantically different filters
|
|
211
|
+
with similar labels—such as a single date, a date range, and a relative period—without the table
|
|
212
|
+
runtime fabricating domain guidance.
|
|
213
|
+
|
|
214
|
+
While the field manager is open, its selected and available sections preserve the composition they
|
|
215
|
+
had when the draft began. Checkbox state, the displayed-field count, pending-change badges, and the
|
|
216
|
+
Apply count update immediately, but rows are regrouped only after Apply closes the overlay or when it
|
|
217
|
+
is opened again. This keeps pointer position, keyboard focus, and scroll anchoring stable. Optional
|
|
218
|
+
`PraxisFilter.i18n` entries `fieldPendingAddition`, `fieldPendingRemoval`,
|
|
219
|
+
`fieldAddedAnnouncement`, `fieldRemovedAnnouncement`, and
|
|
220
|
+
`fieldSelectionSummaryAnnouncement` customize the pending-state badges and polite live-region
|
|
221
|
+
feedback; announcement templates accept `{field}` and `{summary}` placeholders.
|
|
222
|
+
|
|
134
223
|
```ts
|
|
135
224
|
const config: TableConfig = {
|
|
136
225
|
columns: [{ field: 'name', header: 'Name' }],
|
|
@@ -174,6 +263,10 @@ The package also exports `PRAXIS_TABLE_AUTHORING_MANIFEST` for governed AI edits
|
|
|
174
263
|
The table can materialize analytic table projections produced by the canonical `x-ui.analytics` decision in `@praxisui/core`. Services such as `AnalyticsTableContractService` help hosts resolve analytic table contracts and data without reimplementing that projection.
|
|
175
264
|
|
|
176
265
|
Detail rows can host governed rich content surfaces. Rich content semantics belong to the shared rich content/core contracts; the table provides the row-detail shell and host-mediated dispatch.
|
|
266
|
+
Governed embed nodes (`formRef`, `tableRef`, `chartRef`, `templateRef`, `diagramEmbed`) default to `renderMode: "reference"` when the field is omitted.
|
|
267
|
+
`renderMode: "inline"` is an explicit intent for an owning runtime/provider to materialize the referenced surface inside the detail row; hosts must still keep the reference shell as the accessible fallback when the provider, data, or capability is unavailable.
|
|
268
|
+
For charts, use `chartDocumentRef` or a governed `chartDocument` payload that follows the canonical `x-ui.chart` contract; do not place raw chart-engine options directly inside the table detail schema.
|
|
269
|
+
Hosts can register `PRAXIS_TABLE_DETAIL_INLINE_NODE_RESOLVERS` to resolve lightweight references such as `chartDocumentRef` into governed runtime inputs before the inline renderer runs, keeping persisted detail schemas small and auditable.
|
|
177
270
|
|
|
178
271
|
## Public API
|
|
179
272
|
|
|
@@ -199,6 +292,8 @@ Main exports:
|
|
|
199
292
|
|
|
200
293
|
- Separate local data mode from backend resource mode before deciding the minimum setup.
|
|
201
294
|
- `enableCustomization` is opt-in and gates settings/authoring surfaces; it does not change the data mode.
|
|
295
|
+
- `authoringCapability` optionally requires an exact capability from `EnterpriseRuntimeContext.capabilities` before those authoring surfaces are materialized. Use it for governed configuration; do not derive authorization from client-side usernames or roles.
|
|
202
296
|
- Treat export as a governed optional operation, not as automatic support implied by `resourcePath`.
|
|
297
|
+
- When `excel` is enabled in `export.formats`, the toolbar also exposes a current-page Excel export that downloads only the rows currently loaded in the table runtime with visible columns and formatted cell values. Full filtered exports continue to use the configured collection export provider.
|
|
203
298
|
- Theme the table through Material/Praxis tokens instead of targeting internal descendants.
|
|
204
299
|
- Use the official documentation for full recipes on filters, rich detail rows, rules, formatting, AI authoring, and backend capabilities.
|