@praxisui/table 9.0.67 → 9.0.68-rc.1
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 +152 -2
- package/ai/component-registry.json +316 -33
- package/docs/dynamic-filter-host-integration-guide.md +24 -0
- package/docs/dynamic-filter-payload-contract.md +5 -0
- package/docs/table-authoring-document-completeness-checklist.md +13 -0
- package/fesm2022/{praxisui-table-praxisui-table-DQWmLtjb.mjs → praxisui-table-praxisui-table-Cxa4T7sm.mjs} +55753 -54828
- package/fesm2022/{praxisui-table-table-agentic-authoring-turn-flow-BkxCL9F2.mjs → praxisui-table-table-agentic-authoring-turn-flow-ujl2U5u7.mjs} +1 -1
- package/fesm2022/{praxisui-table-table-ai.adapter-DyrPBufP.mjs → praxisui-table-table-ai.adapter-B2hfkjTX.mjs} +1 -1
- package/fesm2022/praxisui-table.mjs +1 -1
- package/package.json +10 -10
- package/src/lib/praxis-table.json-api.md +29 -0
- package/types/praxisui-table.d.ts +49 -8
package/README.md
CHANGED
|
@@ -10,14 +10,55 @@ Selection decoration does not replace field labels. No column is removed by this
|
|
|
10
10
|
adaptation. The config editor no longer displays an informational version banner
|
|
11
11
|
over actionable diagnostics.
|
|
12
12
|
|
|
13
|
+
In card mode, an intentionally empty action-column heading does not reserve a
|
|
14
|
+
label row or extra vertical padding. Explicit action headings remain visible,
|
|
15
|
+
and the action buttons retain their configured dimensions. Selection keeps its
|
|
16
|
+
own accessible control area; this refinement does not reorder business fields.
|
|
17
|
+
|
|
13
18
|
The checked row-selection radio inherits `--p-table-row-selected-fg` in its normal,
|
|
14
19
|
hover, focus and pressed states, including responsive cards. Disabled and unselected
|
|
15
20
|
radios keep Material's state tokens. Custom themes must maintain sufficient contrast
|
|
16
21
|
between the selected-row foreground and background; the built-in light/dark themes
|
|
17
22
|
are covered by a real-backend regression with a minimum 3:1 indicator contrast.
|
|
18
23
|
|
|
24
|
+
Table action authoring projects session availability out of `toolbar.actions`,
|
|
25
|
+
`actions.row.actions`, `actions.bulk.actions` and nested action `children` before
|
|
26
|
+
editor normalization and portable persistence. Internal `__praxis*` action fields
|
|
27
|
+
are runtime-only; business payloads remain intact. Collection availability preserves
|
|
28
|
+
an explicit host `disabled: true`, and a temporary denial does not become an authored
|
|
29
|
+
restriction when a label or order changes. Older snapshots with an ambiguous denial
|
|
30
|
+
retain `disabled: true`; raw-document validation reports
|
|
31
|
+
`table.action.disabled.origin.unknown`, and portable runtime projection logs that
|
|
32
|
+
diagnostic. Review those older settings explicitly instead of inferring permission.
|
|
33
|
+
See [the implementation evidence](test-dev/action-authoring-projection-result-2026-09-08.md).
|
|
34
|
+
The toolbar editor also compares its initial and edited projections before emitting
|
|
35
|
+
configuration: changing an action label must not materialize export, row-action or
|
|
36
|
+
layout defaults. Untouched host settings remain inherited, while explicit control
|
|
37
|
+
changes retain their derived behavior (for example, hybrid row-action display).
|
|
38
|
+
The [live authoring journey](test-dev/action-authoring-live-roundtrip-2026-09-08.md)
|
|
39
|
+
records the persisted-page comparison and validation.
|
|
40
|
+
Action editor text belongs to the `praxisTableEditor` namespace: quick-add and selected
|
|
41
|
+
action inputs have distinct label keys, and target/selection-limit controls have pt-BR
|
|
42
|
+
and en-US translations. Host translators can override this chrome without changing
|
|
43
|
+
the authored business action label. See [copy validation](test-dev/action-authoring-copy-2026-09-08.md).
|
|
44
|
+
The JSON tab follows visual edits while its text is an untouched projection. Pending
|
|
45
|
+
manual JSON, including incomplete or empty text, is preserved on document updates;
|
|
46
|
+
after applying it and receiving the host acknowledgement, visual synchronization
|
|
47
|
+
resumes. See the [selection-to-surface journey and regression proof](test-dev/view-action-surface-journey-2026-09-08.md).
|
|
48
|
+
|
|
19
49
|
Use this package to render local or backend-driven data grids with `TableConfig`, filtering, sorting, pagination, selection, row actions, visual rules, configurable toolbar, rich detail rows, and optional AI-assisted authoring.
|
|
20
50
|
|
|
51
|
+
On remote pagination, selection is cleared and the existing `selectionChange`
|
|
52
|
+
event is emitted before requesting the new page when both
|
|
53
|
+
`behavior.selection.persistSelection` and `persistOnDataUpdate` are disabled
|
|
54
|
+
(or omitted). Connected detail views therefore leave the previous record context
|
|
55
|
+
during loading, including when that request later fails or is cancelled. Enabling
|
|
56
|
+
either policy preserves the selection during loading: `persistSelection` retains
|
|
57
|
+
cross-page selection, while `persistOnDataUpdate` reconciles it against the rows
|
|
58
|
+
returned by the new page. Local pagination keeps its synchronous reconciliation.
|
|
59
|
+
This timing change is specific to pagination; it does not redefine filter or
|
|
60
|
+
sort transitions, permissions, or action availability.
|
|
61
|
+
|
|
21
62
|
Item workflow actions discovered through resource capabilities/action catalogs are executable
|
|
22
63
|
runtime contracts. When an action publishes `execution`, the table materializes its canonical
|
|
23
64
|
Dynamic Form surface, propagates the row version declared by `resourceVersionField`, and applies
|
|
@@ -174,6 +215,14 @@ When the collection response exposes `_links.create` or a collection `capabiliti
|
|
|
174
215
|
|
|
175
216
|
Selector and lookup surfaces can keep the same remote `resourcePath`, schema, pagination and read capabilities while opting out of collection action materialization with `actions.collection.discovery.enabled = false`. The policy suppresses only collection actions discovered from HATEOAS/capabilities, including canonical create and collection workflows. Explicit toolbar actions and configured row actions remain unchanged. Omission preserves the default enabled behavior.
|
|
176
217
|
|
|
218
|
+
## Configuration ownership in Page Builder
|
|
219
|
+
|
|
220
|
+
Use the **Tabela da página** catalog preset when the page owns the table configuration. It sets the existing `configPersistenceStrategy: 'input-first'`, so an older saved `table-config` does not replace the authored input on reload. In **Configurar conteúdo**, the configuration source selector makes this choice explicit; filter edits in its **Filtros** tab belong to `config.behavior.filtering.advancedFilters.settings` and are saved with the widget/page.
|
|
221
|
+
|
|
222
|
+
The runtime default remains `local-first`, which loads saved table preferences. `volatile` is intended for temporary surfaces that neither load nor save persistent table configuration. `input-first` prioritizes the input for table configuration hydration; it does not mean every independent runtime preference is disabled.
|
|
223
|
+
|
|
224
|
+
The native filter **Preferências do Filtro** panel uses its own `filter-config` preference lane. Its saved always-visible order does not override a nonempty `alwaysVisibleFields` supplied by the page. Use the Page Builder content editor to author the page's filters. Editing a field opens a child settings panel and preserves the parent draft; save the child, then its parent and the page to persist authored changes.
|
|
225
|
+
|
|
177
226
|
## Runtime Inputs And Outputs
|
|
178
227
|
|
|
179
228
|
Common inputs:
|
|
@@ -225,6 +274,11 @@ When row selection is enabled with `mode: "row"` or `mode: "both"`, selectable
|
|
|
225
274
|
rows use a single roving keyboard stop. `ArrowUp`, `ArrowDown`, `Home`, and `End`
|
|
226
275
|
move focus without changing the selection; `Enter` and `Space` activate the
|
|
227
276
|
focused row through the same `selectionChange` contract used by pointer input.
|
|
277
|
+
For the single-selection radio, native input, label and enlarged touch-target
|
|
278
|
+
activation all select through Material's `change` event and emit one canonical
|
|
279
|
+
selection update. Re-clicking the checked radio retains the selection. The
|
|
280
|
+
existing Space shortcut on the radio can still select or clear it; checkbox and
|
|
281
|
+
explicit row-toggle paths retain their own toggle behavior.
|
|
228
282
|
Navigation is resolved against the table data model rather than the rows currently
|
|
229
283
|
mounted in the DOM. In virtualized tables, `Home` and `End` therefore reach the
|
|
230
284
|
first and last logical records and scroll the viewport before restoring focus.
|
|
@@ -296,6 +350,13 @@ Use `config.ai.assistant.enabled = false` when a host needs to disable the embed
|
|
|
296
350
|
|
|
297
351
|
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.
|
|
298
352
|
|
|
353
|
+
The no-data region follows its content height. It delegates alignment, variant,
|
|
354
|
+
density and internal spacing to the shared `praxis-empty-state-card`, without
|
|
355
|
+
forcing a centered transparent card or reserving viewport-based height. Existing
|
|
356
|
+
`--pdx-empty-state-*` theme tokens remain available for the card; the surrounding
|
|
357
|
+
table surface uses the table background and border tokens. The default
|
|
358
|
+
presentation remains centered, compact and transparent.
|
|
359
|
+
|
|
299
360
|
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.
|
|
300
361
|
|
|
301
362
|
For related resources, the generated empty state is informational and does not repeat the capability-governed CREATE action already kept stable in the toolbar. Declare `behavior.emptyState.actions` only when the journey intentionally needs a distinct contextual action; explicit host actions are preserved. Empty-state and toolbar actions share the public `--praxis-action-control-*` geometry, while `toolbar.appearance.tokens.actionSize` and `actionRadius` remain the stronger per-table overrides.
|
|
@@ -316,6 +377,16 @@ const config: TableConfig = {
|
|
|
316
377
|
|
|
317
378
|
## Toolbar Appearance
|
|
318
379
|
|
|
380
|
+
When a containing Widget Shell already owns the title and resource identity, omit
|
|
381
|
+
the table's `toolbar.title`, `toolbar.subtitle`, and `toolbar.icon` and keep
|
|
382
|
+
`toolbar: { visible: true }`. The toolbar can render commands without its identity
|
|
383
|
+
block. Do not use `visible: false` to deduplicate headings: resource discovery may
|
|
384
|
+
materialize a capability-governed CREATE action and make the toolbar visible.
|
|
385
|
+
Preserve those actions, their availability, and their accessible disabled reasons.
|
|
386
|
+
For nested compositions, bind the shell identity to the propagated canonical
|
|
387
|
+
resource identity and verify it after selection changes and in fullscreen; matching
|
|
388
|
+
configuration alone does not prove that the correct record is presented.
|
|
389
|
+
|
|
319
390
|
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.
|
|
320
391
|
|
|
321
392
|
```ts
|
|
@@ -345,6 +416,11 @@ commands are consolidated under one localized `Mais ações` entrypoint without
|
|
|
345
416
|
density controls. At narrow widths the first band preserves identity and commands before the scope and
|
|
346
417
|
query bands, so keyboard focus follows the same reading order presented visually.
|
|
347
418
|
|
|
419
|
+
At up to 540 px of toolbar width, identity and the compact command menu share a
|
|
420
|
+
row when no scope region is present; query controls keep their full-width row.
|
|
421
|
+
With scope present, the existing separate bands remain. Long identities retain
|
|
422
|
+
the existing truncation/tooltip behavior rather than overlapping the menu.
|
|
423
|
+
|
|
348
424
|
Authoring guidance:
|
|
349
425
|
|
|
350
426
|
- use `toolbar.filters.quickFilters` for a small governed scope switch, not as a substitute for every filter;
|
|
@@ -383,6 +459,11 @@ The package exports both the table runtime and `PraxisFilter` integration surfac
|
|
|
383
459
|
`aria-disabled="true"`, keep execution fail-closed, and announce the contextual disabled reason before
|
|
384
460
|
the configured operation tooltip. In the compact overflow menu, the same reason is rendered inline so
|
|
385
461
|
understanding the unavailable command never depends on hovering or focusing a native disabled menu item.
|
|
462
|
+
- When runtime discovery publishes a denied capability, workflow action or surface, toolbar explanations
|
|
463
|
+
use its canonical availability reason from Core’s `resourceDiscovery` translations. Authentication and
|
|
464
|
+
permission denials take precedence over selection guidance. Table locale and host translation overrides
|
|
465
|
+
remain supported; unknown codes use the generic canonical message rather than exposing internal codes.
|
|
466
|
+
An available form surface does not override a denied create operation. This copy does not grant permission.
|
|
386
467
|
- Inline and overflow actions preserve their actionable origin. Overflow menus finish closing and restore the trigger before emitting the action, allowing dialogs and drawers with `restoreFocus` to return keyboard focus to the correct table control.
|
|
387
468
|
|
|
388
469
|
The filter field manager follows the compact inline visual language and can be themed by hosts through
|
|
@@ -405,14 +486,18 @@ control when the operating system displays the thumb. Because the manager render
|
|
|
405
486
|
such as `html`, `body`, or the application theme class rather than only on the `praxis-filter` element.
|
|
406
487
|
When using the `PraxisFilter` i18n input, `selectedFieldsSectionTitle` and
|
|
407
488
|
`availableFieldsSectionTitle` customize the grouped field-manager headings; both are optional and
|
|
408
|
-
default to the Portuguese runtime labels.
|
|
489
|
+
default to the Portuguese runtime labels. The trigger count includes fixed and selected filters.
|
|
490
|
+
Inside the manager, **Campos fixos**, **Campos selecionados** and **Campos disponíveis** state the
|
|
491
|
+
three distinct roles; the selected-section summary counts only the customizable selection. Its
|
|
492
|
+
`selectedFieldsCount` and `selectedFieldsCountSingular` text remains overridable through the same
|
|
493
|
+
i18n input. Each manageable field preserves its authored
|
|
409
494
|
`FieldMetadata.description` (falling back to its explicit tooltip/help metadata) as an information
|
|
410
495
|
tooltip on hover and keyboard focus. This lets operators distinguish semantically different filters
|
|
411
496
|
with similar labels—such as a single date, a date range, and a relative period—without the table
|
|
412
497
|
runtime fabricating domain guidance.
|
|
413
498
|
|
|
414
499
|
While the field manager is open, its selected and available sections preserve the composition they
|
|
415
|
-
had when the draft began. Checkbox state, the
|
|
500
|
+
had when the draft began. Checkbox state, the selected-field summary, pending-change badges, and the
|
|
416
501
|
Apply count update immediately, but rows are regrouped only after Apply closes the overlay or when it
|
|
417
502
|
is opened again. This keeps pointer position, keyboard focus, and scroll anchoring stable. Optional
|
|
418
503
|
`PraxisFilter.i18n` entries `fieldPendingAddition`, `fieldPendingRemoval`,
|
|
@@ -445,6 +530,25 @@ const config: TableConfig = {
|
|
|
445
530
|
|
|
446
531
|
Use `PraxisTableConfigEditor` or the table settings surfaces when `enableCustomization` is true.
|
|
447
532
|
|
|
533
|
+
For `surface.open` actions, invalid input/context JSON remains an unsaved draft:
|
|
534
|
+
the owning editor combines the subeditor's `validationChange` with its other
|
|
535
|
+
validation sources and blocks Apply/Save. Switching tabs preserves the draft;
|
|
536
|
+
correct it or use Cancel/discard before switching or replacing actions. Raw invalid
|
|
537
|
+
text is never included in the settings document. See the
|
|
538
|
+
[Core validation evidence and rollout boundary](../praxis-core/docs/surface-invalid-drafts-validation-2026-09-08.md).
|
|
539
|
+
|
|
540
|
+
In **Overview and behavior → Narrow screens** (Portuguese: **Visão geral e
|
|
541
|
+
comportamento → Telas estreitas**), choose **Cards** and set the maximum width in
|
|
542
|
+
pixels. The native editor and the Page Builder content editor use the existing
|
|
543
|
+
`appearance.responsive.mobile.cardMode` and `appearance.responsive.breakpoints.mobile`
|
|
544
|
+
properties. Missing width defaults to 768 px. The control accepts positive whole
|
|
545
|
+
numbers; invalid drafts block apply/save without replacing the last valid document.
|
|
546
|
+
Switching back to Table keeps other responsive preferences and column priorities.
|
|
547
|
+
Cards retain visible fields, row selection and actions; virtualization keeps the
|
|
548
|
+
standard table renderer. Selection still follows the authored connections and does
|
|
549
|
+
not implicitly navigate to an offscreen detail widget.
|
|
550
|
+
|
|
551
|
+
|
|
448
552
|
Main authoring areas include:
|
|
449
553
|
|
|
450
554
|
- columns
|
|
@@ -456,6 +560,8 @@ Main authoring areas include:
|
|
|
456
560
|
- value mapping
|
|
457
561
|
- JSON config editing
|
|
458
562
|
|
|
563
|
+
The runtime loads `PraxisTableConfigEditor` only when `openTableSettings()` reaches the native table authoring flow. Rendering a table does not eagerly materialize the editor chunk; delegated CRUD authoring also returns before that chunk is requested.
|
|
564
|
+
|
|
459
565
|
The package exports separate governed contracts for the two authoring documents: `PRAXIS_TABLE_AUTHORING_MANIFEST` owns `TableConfig`, including embedded filtering under `behavior.filtering`, while `PRAXIS_FILTER_AUTHORING_MANIFEST` owns the standalone `FilterConfig`. The standalone manifest never persists the controlled `value` DTO and does not expose Table query-builder operations or the nominal `submit` alias. `TABLE_AI_CAPABILITIES` / `TABLE_COMPONENT_AI_CAPABILITIES` remain the component capability discovery surface for the Table aggregate.
|
|
460
566
|
|
|
461
567
|
Canonical table refinements preserve business meaning across preview, persistence, reopen and runtime rendering:
|
|
@@ -520,3 +626,47 @@ O editor de conteúdo da tabela recebe a configuração efetiva em contexto tran
|
|
|
520
626
|
O editor do filtro permite selecionar o recurso e carregar seus campos pelo schema de filtro canônico. `resourcePath` e preferências visuais são persistidos; os metadados carregados permanecem derivados da API.
|
|
521
627
|
|
|
522
628
|
Ao receber novos `filterCriteria` ou `queryContext` de outro widget, a consulta remota reinicia na página zero. Para um recurso paginado, selecione estratégia de paginação `server` no editor; a estratégia cliente continua sendo uma opção explícita para dados locais.
|
|
629
|
+
|
|
630
|
+
## Filter heading and advanced-action presentation
|
|
631
|
+
|
|
632
|
+
Tables and standalone filters share Core `FilterPresentationConfig`. Configure an optional heading above or inline with the filters and present the advanced action as icon, text, or both. Heading visibility is opt-in; omitting presentation preserves the existing appearance. Action placement stays within the auxiliary controls group. It does not move table actions or change filter values.
|
|
633
|
+
|
|
634
|
+
For tables use `config.behavior.filtering.advancedFilters.settings.presentation`; for standalone filters use `FilterConfig.presentation` (runtime input `presentation`). The guided editor exposes semantic choices, while the optional nine `--pfx-filter-*` tokens support theme customization. See [the canonical JSON API](src/lib/praxis-table.json-api.md#filter-presentation) for the exact fields, defaults and token list.
|
|
635
|
+
|
|
636
|
+
When filter persistence is enabled, a presentation acknowledged by **Save and close** is restored over the authored page baseline for the same component identity. **Apply** changes only the current preview. Set `disablePersistence` when the host must always materialize the authored input and must not read or write user filter preferences.
|
|
637
|
+
|
|
638
|
+
The preferences editor carries the complete effective filter document through Apply and Save. Editing presentation, layout or behavior therefore preserves `selectedFieldIds` and metadata overrides owned by the same preference record.
|
|
639
|
+
|
|
640
|
+
|
|
641
|
+
## Ciclo de vida dos editores do filtro
|
|
642
|
+
|
|
643
|
+
Os painéis de preferências e de metadados são vinculados ao `DestroyRef` da origem
|
|
644
|
+
pelo contrato `owner` do Settings Panel. Remover a origem encerra seus painéis e
|
|
645
|
+
as assinaturas de Apply/Save. Um carregamento lazy concluído após a destruição
|
|
646
|
+
do pai não abre um editor filho. O host deve destruir efetivamente o componente
|
|
647
|
+
quando sua origem deixa de existir, em vez de apenas ocultá-lo por CSS.
|
|
648
|
+
|
|
649
|
+
Salvar metadados no editor filho altera o rascunho do pai; a gravação da configuração
|
|
650
|
+
continua pertencendo ao fluxo de Save do filtro. Destruir a origem não inicia Save
|
|
651
|
+
e não implica cancelar requisições de gravação já iniciadas legitimamente.
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
### Confirmação de Save nas preferências do filtro
|
|
655
|
+
|
|
656
|
+
O painel aguarda a conclusão do storage antes de fechar. Apply permanece uma
|
|
657
|
+
prévia sem gravação; erros de Save mantêm o rascunho aberto para nova tentativa.
|
|
658
|
+
Conflitos 409/412 não são sobrescritos automaticamente. Alterações feitas durante
|
|
659
|
+
uma requisição também permanecem abertas após a confirmação da versão enviada.
|
|
660
|
+
O cache local de FilterConfigService é atualizado ou removido somente após sucesso
|
|
661
|
+
de Save/Clear. A garantia corresponde ao storage configurado: o adapter local não
|
|
662
|
+
constitui confirmação de gravação no backend.
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
### Navegação em painéis estreitos
|
|
666
|
+
|
|
667
|
+
A adaptação de authoring considera a largura do contêiner, inclusive quando o
|
|
668
|
+
painel é estreito em uma janela desktop. Table e Dynamic Form exibem “Seção do
|
|
669
|
+
editor” até 768px de largura disponível, mantendo a mesma seleção e os conteúdos
|
|
670
|
+
das abas. Acima desse limite, reaparece a navegação por abas. O Settings Panel
|
|
671
|
+
organiza título, expandir e fechar em uma grade até 599px; a prévia, quando
|
|
672
|
+
suportada, ocupa a linha seguinte. Nenhum documento ou protocolo de Save é alterado.
|