@praxisui/table 10.0.0-rc.4 → 10.0.0-rc.41
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 +100 -3
- package/ai/component-registry.json +1276 -258
- package/docs/dynamic-filter-host-integration-guide.md +44 -1
- package/docs/dynamic-filter-payload-contract.md +29 -6
- package/docs/governed-page-widget-adapter.md +55 -0
- package/docs/local-data-mode-precedence.md +21 -0
- package/fesm2022/praxisui-table-authoring.mjs +2205 -0
- package/fesm2022/{praxisui-table-filter-form-dialog-host.component-DANYIQs6.mjs → praxisui-table-filter-form-dialog-host.component-Cst6rkAK.mjs} +51 -8
- package/fesm2022/{praxisui-table-praxisui-table-DKvwb6v1.mjs → praxisui-table-praxisui-table-CdEy3SYM.mjs} +17416 -2456
- package/fesm2022/{praxisui-table-table-agentic-authoring-turn-flow-BzjYuDvo.mjs → praxisui-table-table-agentic-authoring-turn-flow-sQz0BpSY.mjs} +1 -1
- package/fesm2022/{praxisui-table-table-ai.adapter-CPgpIGoi.mjs → praxisui-table-table-ai.adapter-DEetBMv9.mjs} +6 -5
- package/fesm2022/praxisui-table.mjs +2 -1
- package/package.json +14 -10
- package/src/lib/praxis-table.json-api.md +39 -9
- package/types/praxisui-table-authoring.d.ts +132 -0
- package/types/praxisui-table.d.ts +1008 -36
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Observable, firstValueFrom } from 'rxjs';
|
|
2
2
|
import { withAuthoringScopePolicy } from '@praxisui/ai';
|
|
3
|
-
import {
|
|
3
|
+
import { ax as setTableActionGlobalActionRef } from './praxisui-table-praxisui-table-CdEy3SYM.mjs';
|
|
4
4
|
|
|
5
5
|
class TableAgenticAuthoringTurnFlow {
|
|
6
6
|
adapter;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { firstValueFrom } from 'rxjs';
|
|
2
2
|
import { BaseAiAdapter, sanitizePraxisAssistantText, createComponentAuthoringContext } from '@praxisui/ai';
|
|
3
3
|
import { PRAXIS_GLOBAL_ACTION_CATALOG, deepMerge } from '@praxisui/core';
|
|
4
|
-
import {
|
|
4
|
+
import { W as TABLE_COMPONENT_EDIT_PLAN_OPERATION_IDS, p as PRAXIS_TABLE_AUTHORING_MANIFEST, T as TABLE_AI_CAPABILITIES, a7 as coerceTableComponentEditPlans, a9 as compileTableComponentEditPlans, Z as TASK_PRESETS, ah as getTableComponentEditPlanCapabilities, R as TABLE_COMPONENT_EDIT_PLAN_EXPECTED_PATHS, O as TABLE_COMPONENT_EDIT_PLAN_ALLOWED_CHANGE_KINDS, U as TABLE_COMPONENT_EDIT_PLAN_JSON_SCHEMA, X as TABLE_COMPONENT_EDIT_PLAN_VERSION, Q as TABLE_COMPONENT_EDIT_PLAN_BATCH_KIND, V as TABLE_COMPONENT_EDIT_PLAN_KIND } from './praxisui-table-praxisui-table-CdEy3SYM.mjs';
|
|
5
5
|
|
|
6
6
|
const TABLE_ROW_EXPRESSION_CONTEXT_OPTION = {
|
|
7
7
|
mode: 'expression',
|
|
@@ -1913,11 +1913,12 @@ class TableDataProfiler {
|
|
|
1913
1913
|
if (first instanceof Date)
|
|
1914
1914
|
return 'date';
|
|
1915
1915
|
// Check string formats
|
|
1916
|
-
const str = String(first);
|
|
1917
|
-
if (!isNaN(Number(str)) && str
|
|
1916
|
+
const str = String(first).trim();
|
|
1917
|
+
if (!isNaN(Number(str)) && str !== '')
|
|
1918
1918
|
return 'number';
|
|
1919
|
-
if (!isNaN(Date.parse(str)) && str.length > 5)
|
|
1920
|
-
return 'date'; // length
|
|
1919
|
+
if (!/^v?\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/.test(str) && !isNaN(Date.parse(str)) && str.length > 5) {
|
|
1920
|
+
return 'date'; // length and semver checks avoid short/version strings being parsed as dates
|
|
1921
|
+
}
|
|
1921
1922
|
return 'string';
|
|
1922
1923
|
}
|
|
1923
1924
|
static sanitizeValue(val, type) {
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { A as ANALYTICS_TABLE_ROW_KEY_FIELD, a as
|
|
1
|
+
export { A as ANALYTICS_TABLE_ROW_KEY_FIELD, a as AnalyticalDrawerRegistryService, b as AnalyticsTableConfigAdapterService, c as AnalyticsTableContractService, d as AnalyticsTableStatsApiService, B as BOOLEAN_PRESETS, e as BehaviorConfigEditorComponent, C as CURRENCY_PRESETS, f as ColumnsConfigEditorComponent, D as DATE_PRESETS, g as DataFormatterComponent, h as DataFormattingService, F as FORMULA_TEMPLATES, i as FilterConfigService, j as FilterSettingsComponent, k as FormulaGeneratorService, J as JsonConfigEditorComponent, M as MessagesLocalizationEditorComponent, N as NUMBER_PRESETS, P as PERCENTAGE_PRESETS, l as PRAXIS_ANALYTICAL_DRAWER_SCHEMAS, m as PRAXIS_FILTER_AUTHORING_MANIFEST, n as PRAXIS_FILTER_COMPONENT_METADATA, o as PRAXIS_FILTER_VIEW_CONTEXT_SCHEMA_VERSION, p as PRAXIS_TABLE_AUTHORING_MANIFEST, q as PRAXIS_TABLE_COMPONENT_METADATA, r as PRAXIS_TABLE_TOOLBAR_APPEARANCE_PRESETS, s as PRAXIS_TABLE_TOOLBAR_DEFAULT_APPEARANCE, t as PRAXIS_TABLE_TOOLBAR_TOKEN_PRESETS, u as PraxisAnalyticalDrawerComponent, v as PraxisFilter, w as PraxisFilterOutletComponent, x as PraxisFilterOutletDirective, y as PraxisFilterWidgetConfigEditor, z as PraxisScopeBarComponent, E as PraxisTable, G as PraxisTableConfigEditor, H as PraxisTableInlineAuthoringEditorComponent, I as PraxisTableToolbar, K as PraxisTableWidgetConfigEditor, S as STRING_PRESETS, T as TABLE_AI_CAPABILITIES, L as TABLE_COMPONENT_AI_CAPABILITIES, O as TABLE_COMPONENT_EDIT_PLAN_ALLOWED_CHANGE_KINDS, Q as TABLE_COMPONENT_EDIT_PLAN_BATCH_KIND, R as TABLE_COMPONENT_EDIT_PLAN_EXPECTED_PATHS, U as TABLE_COMPONENT_EDIT_PLAN_JSON_SCHEMA, V as TABLE_COMPONENT_EDIT_PLAN_KIND, X as TABLE_COMPONENT_EDIT_PLAN_VERSION, Y as TABLE_GOVERNED_PAGE_PREVIEW_ADAPTER, Z as TASK_PRESETS, _ as TableDefaultsProvider, $ as TableRulesEditorComponent, a0 as ToolbarActionsEditorComponent, a1 as ValueMappingEditorComponent, a2 as VisualFormulaBuilderComponent, a3 as analyticsComparisonMetricField, a4 as applyComputedFieldsToRows, a5 as buildTableApplyPlan, a6 as coerceTableComponentEditPlan, a7 as coerceTableComponentEditPlans, a8 as compileTableComponentEditPlan, a9 as compileTableComponentEditPlans, aa as createTableAuthoringDocument, ab as decodeTablePageInputs, ac as encodeTablePageInputs, ad as formatComputedFieldValue, ae as getActionId, af as getEnum, ag as getTableCapabilities, ah as getTableComponentEditPlanCapabilities, ai as interpolateRelationEndpoint, aj as isAnalyticalDrawerSchema, ak as isTableRendererSupportedByRichContentP0, al as mapTableRendererToRichContentP0, am as materializeTablePageRuntimeInputs, an as normalizeComputedFieldDefinition, ao as normalizeTableAuthoringDocument, ap as parseLegacyOrTableDocument, ar as projectTablePageEditorChanges, as as providePraxisAnalyticalDrawerSchemas, at as providePraxisFilterMetadata, au as providePraxisTableMetadata, av as providePraxisTableToolbarAppearance, aw as serializeTableAuthoringDocument, ay as toCanonicalTableConfig, az as validateTableAuthoringDocument, aA as validateTablePageWidget } from './praxisui-table-praxisui-table-CdEy3SYM.mjs';
|
|
2
|
+
export { createDynamicRecord, extractRecordId, isDynamicDataRecord, resolveDataField } from '@praxisui/core';
|
package/package.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/table",
|
|
3
|
-
"version": "10.0.0-rc.
|
|
3
|
+
"version": "10.0.0-rc.41",
|
|
4
4
|
"description": "Advanced data table for Angular (Praxis UI) with editing, filtering, sorting, virtualization, and settings panel integration.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^21.0.0",
|
|
7
7
|
"@angular/core": "^21.0.0",
|
|
8
8
|
"@angular/platform-browser": "^21.0.0",
|
|
9
|
-
"@praxisui/ai": "^10.0.0-rc.
|
|
10
|
-
"@praxisui/core": "^10.0.0-rc.
|
|
11
|
-
"@praxisui/dynamic-fields": "^10.0.0-rc.
|
|
12
|
-
"@praxisui/dynamic-form": "^10.0.0-rc.
|
|
13
|
-
"@praxisui/metadata-editor": "^10.0.0-rc.
|
|
14
|
-
"@praxisui/rich-content": "^10.0.0-rc.
|
|
15
|
-
"@praxisui/settings-panel": "^10.0.0-rc.
|
|
16
|
-
"@praxisui/table-rule-builder": "^10.0.0-rc.
|
|
9
|
+
"@praxisui/ai": "^10.0.0-rc.41",
|
|
10
|
+
"@praxisui/core": "^10.0.0-rc.41",
|
|
11
|
+
"@praxisui/dynamic-fields": "^10.0.0-rc.41",
|
|
12
|
+
"@praxisui/dynamic-form": "^10.0.0-rc.41",
|
|
13
|
+
"@praxisui/metadata-editor": "^10.0.0-rc.41",
|
|
14
|
+
"@praxisui/rich-content": "^10.0.0-rc.41",
|
|
15
|
+
"@praxisui/settings-panel": "^10.0.0-rc.41",
|
|
16
|
+
"@praxisui/table-rule-builder": "^10.0.0-rc.41",
|
|
17
17
|
"@angular/cdk": "^21.0.0",
|
|
18
18
|
"@angular/forms": "^21.0.0",
|
|
19
19
|
"@angular/material": "^21.0.0",
|
|
20
20
|
"@angular/router": "^21.0.0",
|
|
21
|
-
"@praxisui/dialog": "^10.0.0-rc.
|
|
21
|
+
"@praxisui/dialog": "^10.0.0-rc.41",
|
|
22
22
|
"rxjs": "~7.8.0"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
@@ -50,6 +50,10 @@
|
|
|
50
50
|
"types": "./types/praxisui-table.d.ts",
|
|
51
51
|
"default": "./fesm2022/praxisui-table.mjs"
|
|
52
52
|
},
|
|
53
|
+
"./authoring": {
|
|
54
|
+
"types": "./types/praxisui-table-authoring.d.ts",
|
|
55
|
+
"default": "./fesm2022/praxisui-table-authoring.mjs"
|
|
56
|
+
},
|
|
53
57
|
"./filter-drawer-adapter": {
|
|
54
58
|
"types": "./types/praxisui-table-filter-drawer-adapter.d.ts",
|
|
55
59
|
"default": "./fesm2022/praxisui-table-filter-drawer-adapter.mjs"
|
|
@@ -109,11 +109,16 @@ Este documento e a referencia canonica da API JSON de praxis-table.
|
|
|
109
109
|
> [!WARNING]
|
|
110
110
|
> **Segurança Corporativa em Cenários Corporativos**: A visibilidade de colunas via dropdown da toolbar é um recurso estritamente visual (layout de apresentação do lado do cliente). A ocultação de colunas **não** protege o dado sensível da transmissão de rede nem de inspeção técnica. Se determinados campos (ex: salários, senhas ou tokens) forem confidenciais para o nível de permissão do usuário atual, a restrição de dados deve ser realizada obrigatoriamente no lado do servidor (através da filtragem de propriedades nas APIs de CRUD e consulta), e nunca por meio de ocultação puramente visual na tabela.
|
|
111
111
|
|
|
112
|
-
## Quick filters and density
|
|
113
|
-
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
-
|
|
112
|
+
## Quick filters, unified filter region, and density
|
|
113
|
+
|
|
114
|
+
- **Região única de filtros e dono explícito da consulta**: Em telas de coleção com `praxis-table`, a própria tabela é a dona canônica dos filtros editáveis pelo usuário. Quando um campo (ex.: `ativo` / `status`) é governado por `config.toolbar.filters.quickFilters[]`, evite duplicá-lo em `alwaysVisibleFields` (mantenha-o apenas nos escopos rápidos e opcionalmente na gaveta avançada `selectedFieldIds`).
|
|
115
|
+
- `config.toolbar.filters.quickFilters[]` materializa um seletor de escopo governado na toolbar. Cada item declara `id`, `label`, `filter` e `icon` opcional.
|
|
116
|
+
- Um item com `filter: {}` representa o escopo **"Todos"** (sem restrição editável): acioná-lo limpa critérios editáveis anteriores em `filterCriteria` e em `queryContext.filters` não estruturais sem exigir reload da página.
|
|
117
|
+
- Critérios booleanos explícitos `false` (ex.: `{ ativo: false }`) são preservados integralmente na serialização remota e na avaliação local.
|
|
118
|
+
- **Reconciliação de atalhos externos (`queryContext.filters`) vs. filtros estruturais (`queryContext.meta`)**:
|
|
119
|
+
- Quando cards de KPI ou widgets externos aplicam um filtro editável via `queryContext.filters` (ex.: `{ ativo: true }`), a tabela sincroniza `advancedFilterValue`, `activeCrossFilters` e `activeQuickFilterId` correspondente.
|
|
120
|
+
- Se o operador alterar o escopo rápido (`onQuickFilterChange`), submeter/limpar os filtros da tabela (`onAdvancedFilterSubmit` / `onAdvancedFilterClear`) ou remover chips (`onClearCrossFilter` / `onClearAllCrossFilters`), a tabela reconcilia as chaves editáveis em `queryContext.filters` e emite `queryContextChange` e `queryContextClear`, impedindo que `queryContext.filters` órfãos continuem sobrescrevendo `filterCriteria`.
|
|
121
|
+
- Filtros estruturais de contexto (`queryContext.meta.relatedResource === true` + `parentFilterField`, `queryContext.meta.structuralFields`, `queryContext.meta.immutableFields` ou `queryContext.meta.structural === true`) permanecem protegidos e nunca são limpos por ações de filtro do usuário.
|
|
117
122
|
- A composição adaptativa é responsabilidade do runtime: identidade, escopo, consulta e comandos se reorganizam pela largura do container da tabela. Dentro da consulta, campos editáveis formam a região de critérios; tags/atalhos salvos e comandos de gerenciamento formam um único cluster auxiliar. Em largura intermediária, os critérios e esse cluster completo compartilham o mesmo fluxo de quebra para aproveitar a faixa final sem criar uma linha órfã; em largura estreita, o cluster migra inteiro para a faixa seguinte. O host não precisa declarar coordenadas, breakpoints ou ordem visual adicional.
|
|
118
123
|
- Em superfícies de até `640px`, os campos de consulta absorvem o espaço residual da própria linha até o limite do arquétipo; em `320px`, entradas que não cabem em pares ocupam a largura útil integral. Presets e comandos curtos preservam largura intrínseca. Grupos binários de filtros rápidos equilibram as duas opções em até `540px`, enquanto grupos maiores mantêm largura por conteúdo e overflow acessível.
|
|
119
124
|
- `advancedFilters.settings.alwaysVisibleFields` deve conter apenas critérios frequentes. Atalhos persistidos e comandos de gerenciamento não devem ser simulados como campos sempre visíveis nem reposicionados por seletores CSS internos do host.
|
|
@@ -361,8 +366,15 @@ Este arquivo foi adaptado para o padrao canonico atual sem remover conteudo tecn
|
|
|
361
366
|
| `toolbar.appearance` | object | No | Material 3 fallback | token-contract | Governa preset, variante, densidade, forma, divisores e tokens públicos da toolbar sem alterar a semântica das ações. |
|
|
362
367
|
| `actions.collection.discovery.enabled` | boolean | No | `true` | collection-action-discovery | Controla se ações de coleção podem ser materializadas por HATEOAS/capabilities. Configure `false` em lookups/seletores para manter consulta remota e somente ações explicitamente declaradas. |
|
|
363
368
|
| `actions.row.actions[].recordSurface` | object | No | none | `ResourceSurfaceCatalogItem` | Preserva a identidade canônica da superfície relacionada aberta por uma ação de linha, mantendo `actions.row.actions[].id` como identidade do botão. |
|
|
369
|
+
| `actions.row.actions[].quickView` | `ResourceQuickViewBinding` | No | none | `recordOpen` obrigatório | Habilita abertura de visualização rápida read-only ancorada ao botão da ação de linha (no hover para ações inline e no clique/teclado para ações inline ou no menu de overflow). |
|
|
364
370
|
| `actions.row.discovery.enabled` | boolean | No | `true` | row-action-discovery | Controla se row actions podem ser enriquecidas por HATEOAS/capabilities. Configure `false` para manter somente ações declaradas em `actions.row.actions[]`. |
|
|
371
|
+
| `columns[].quickView` | `ResourceQuickViewBinding` | No | none | `recordOpen` obrigatório | Habilita Quick View governado na célula via `[praxisQuickView]`, resolvendo leitura e ações somente-leitura pelo catálogo do recurso referenciado. |
|
|
365
372
|
| `columns[].renderer` | object | No | field-type-driven | renderer-contract | Renderers condicionais, payload expr e ações interativas. |
|
|
373
|
+
| `columns[].renderer.link.quickView` | `ResourceQuickViewBinding` | No | none | `recordOpen` obrigatório | Sobrescreve ou habilita Quick View específico para o renderer `link` (`hover-only` quando há `href` navegável; `hover-and-click` quando `href` está ausente). |
|
|
374
|
+
| `columns[].renderer.badge.quickView` | `ResourceQuickViewBinding` | No | none | `recordOpen` obrigatório | Sobrescreve ou habilita Quick View específico para o renderer `badge`. |
|
|
375
|
+
| `columns[].renderer.chip.quickView` | `ResourceQuickViewBinding` | No | none | `recordOpen` obrigatório | Sobrescreve ou habilita Quick View específico para o renderer `chip`. |
|
|
376
|
+
| `columns[].renderer.icon.quickView` | `ResourceQuickViewBinding` | No | none | `recordOpen` obrigatório | Sobrescreve ou habilita Quick View específico para o renderer `icon`. |
|
|
377
|
+
| `columns[].renderer.compose.items[].quickView` | `ResourceQuickViewBinding` | No | none | `recordOpen` obrigatório | Habilita Quick View específico para itens individuais (`value`, `link`, `badge`, `chip`, `icon`) dentro de uma célula `compose`. |
|
|
366
378
|
|
|
367
379
|
Quando `actions.row.discovery.enabled` esta ativo e o item publica
|
|
368
380
|
capabilities CRUD canonicas, `PraxisTable` pode sintetizar entradas
|
|
@@ -386,6 +398,10 @@ Renderer defaults:
|
|
|
386
398
|
- Em `renderer.compose.items[]` com `type = "value"`, `emphasis = "strong"` representa o valor primário e `emphasis = "subtle"` o contexto de apoio. São os únicos níveis de hierarquia visual no item de texto; `style` arbitrário não integra o contrato de compose.
|
|
387
399
|
|
|
388
400
|
- Em tabela, campos `*Expr` da visualizacao, como `valueExpr`, `targetExpr`, `segmentsExpr`, `toneExpr` e `fallbackTextExpr`, sao resolvidos contra o contexto da linha antes de renderizar. Strings simples sao caminhos (`row.slaAtual`) e objetos seguem Json Logic. Para `kind = "comparison"`, use `points`/`pointsExpr`; `items` fica reservado para visualizacoes orientadas a itens/etapas.
|
|
401
|
+
- `columns[].quickView` e `columns[].renderer.link.quickView` (`ResourceQuickViewBinding`) materializam o gatilho canônico `[praxisQuickView]` (`PraxisQuickViewTriggerDirective`):
|
|
402
|
+
- `renderer.link.quickView` tem precedência sobre `columns[].quickView`.
|
|
403
|
+
- Em links com `href` real (`renderer.type = "link"`), o modo de disparo é `hover-only` no ponteiro (com chip acessível explícito em teclado/touch) para não sequestrar a navegação nativa do `<a href>`.
|
|
404
|
+
- Em células de texto, `badge`, `chip`, `compose` ou `link` sem `href`, o modo é `hover-and-click` (`tabindex="0"`, `Enter`/`Space` e clique isolado com `stopPropagation()` para não disparar seleção ou expansão da linha).
|
|
389
405
|
|
|
390
406
|
### Toolbar contract
|
|
391
407
|
|
|
@@ -949,13 +965,13 @@ O contrato principal e `TableConfig` (alias de `TableConfigV2`) com extensoes de
|
|
|
949
965
|
|
|
950
966
|
#### Projeção governada de colunas
|
|
951
967
|
|
|
952
|
-
Quando `columnProjection.source = "schema"`, a
|
|
953
|
-
materializada a partir de `/schemas/filtered`;
|
|
954
|
-
em `columnProjection.
|
|
968
|
+
Quando `columnProjection.source = "schema"`, a declaração explícita de `columns` é opcional.
|
|
969
|
+
A lista estrutural de colunas é materializada em tempo de execução a partir de `/schemas/filtered`;
|
|
970
|
+
a configuração declara apenas a seleção ordenada em `columnProjection.include` e as decisões
|
|
971
|
+
editoriais pontuais em `columnProjection.overrides`, indexadas pelo nome canônico do campo:
|
|
955
972
|
|
|
956
973
|
```json
|
|
957
974
|
{
|
|
958
|
-
"columns": [],
|
|
959
975
|
"columnProjection": {
|
|
960
976
|
"source": "schema",
|
|
961
977
|
"include": ["competencia", "salarioBruto", "salarioLiquido"],
|
|
@@ -969,6 +985,11 @@ em `columnProjection.overrides`, indexadas pelo nome canônico do campo:
|
|
|
969
985
|
}
|
|
970
986
|
```
|
|
971
987
|
|
|
988
|
+
Quando consumido dentro de `<praxis-crud>`, o contrato também auto-infere a `schemaUrl`
|
|
989
|
+
de `behavior.filtering.advancedFilters` a partir de `resource.schemaPath` ou `resource.path`
|
|
990
|
+
(normalizado para `/schemas/filtered?path=/api/.../filter&operation=post&schemaType=request`),
|
|
991
|
+
eliminando URLs estáticas duplicadas nos arquivos de configuração.
|
|
992
|
+
|
|
972
993
|
O runtime reaplica os overrides após bootstrap e atualização do schema. Uma chave
|
|
973
994
|
desconhecida não cria coluna, e `field` não pode ser alterado pelo override. Este
|
|
974
995
|
contrato não cria “defaults da surface” paralelos: tipo, visibilidade, ordem e
|
|
@@ -1293,7 +1314,16 @@ Em `scroll-auto`, o viewport e uma regiao focalizavel por teclado para que o scr
|
|
|
1293
1314
|
| Path | Type | Required | Default | Status | Notes |
|
|
1294
1315
|
| --- | --- | --- | --- | --- | --- |
|
|
1295
1316
|
| `columns[]` | `TableColumnConfig[]` | Yes | `[]` | Active | Definicao de colunas, renderers e regras de exibicao. |
|
|
1317
|
+
| `columns[].quickView` | `ResourceQuickViewBinding` | No | `undefined` | Active | Binding governado de Quick View (`recordOpen`, `detailPresentation?`, `contentRef?`) na celula. |
|
|
1318
|
+
| `columns[].renderer.link.quickView` | `ResourceQuickViewBinding` | No | `undefined` | Active | Override de Quick View no renderer `link` (`hover-only` com `href` valido). |
|
|
1319
|
+
| `columns[].renderer.badge.quickView` | `ResourceQuickViewBinding` | No | `undefined` | Active | Override de Quick View no renderer `badge`. |
|
|
1320
|
+
| `columns[].renderer.chip.quickView` | `ResourceQuickViewBinding` | No | `undefined` | Active | Override de Quick View no renderer `chip`. |
|
|
1321
|
+
| `columns[].renderer.icon.quickView` | `ResourceQuickViewBinding` | No | `undefined` | Active | Override de Quick View no renderer `icon`. |
|
|
1322
|
+
| `columns[].renderer.compose.items[].quickView` | `ResourceQuickViewBinding` | No | `undefined` | Active | Binding de Quick View por subitem em celulas `compose`. |
|
|
1323
|
+
| `actions.row.actions[].quickView` | `ResourceQuickViewBinding` | No | `undefined` | Active | Binding de Quick View ancorado ao botao da acao de linha. |
|
|
1296
1324
|
| `behavior` | `TableBehaviorConfig` | No | defaults do runtime | Partial | Inclui paginacao, filtro, selecao e expansao por blocos. |
|
|
1325
|
+
| `behavior.filtering.advancedFilters.settings.showAddButton` | `boolean` | No | `true` | Active | Controla a exibicao do botao `+` de adicionar campos rapidos (`alwaysVisibleFields`) na barra do `PraxisFilter` embutido. |
|
|
1326
|
+
| `behavior.filtering.advancedFilters.settings.showFilterSettings` | `boolean` | No | `isCustomizationAvailable()` | Active | Controla a exibicao da engrenagem de preferencias do `PraxisFilter` embutido; quando `enableCustomization` esta desabilitado, permanece oculta. |
|
|
1297
1327
|
| `toolbar.actions[]` | `ToolbarActionConfig[]` | No | `[]` | Partial | Acoes de toolbar com roteamento para `toolbarAction` e `bulkAction`. |
|
|
1298
1328
|
| `toolbar.title` | `string` | No | `undefined` | Active | Titulo renderizado na regiao de identidade da toolbar principal, antes de filtros e acoes. |
|
|
1299
1329
|
| `toolbar.subtitle` | `string` | No | `undefined` | Active | Texto auxiliar renderizado abaixo do titulo quando houver espaco. |
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { TableConfig, FieldDefinition, GovernedPagePreviewWidgetAdapter, WidgetInstance } from '@praxisui/core';
|
|
2
|
+
|
|
3
|
+
interface EditorDocument<TConfig, TBindings = unknown> {
|
|
4
|
+
kind: string;
|
|
5
|
+
version: number;
|
|
6
|
+
config: TConfig;
|
|
7
|
+
bindings?: TBindings;
|
|
8
|
+
}
|
|
9
|
+
type TableHorizontalScroll = 'auto' | 'wrap' | 'none';
|
|
10
|
+
interface TableBindings {
|
|
11
|
+
resourcePath?: string | null;
|
|
12
|
+
horizontalScroll?: TableHorizontalScroll;
|
|
13
|
+
}
|
|
14
|
+
interface TableAuthoringDocument extends EditorDocument<TableConfig, TableBindings> {
|
|
15
|
+
kind: 'praxis.table.editor';
|
|
16
|
+
version: 1;
|
|
17
|
+
}
|
|
18
|
+
interface EditorDiagnostic {
|
|
19
|
+
level: 'error' | 'warning' | 'info';
|
|
20
|
+
code: string;
|
|
21
|
+
message: string;
|
|
22
|
+
path?: string;
|
|
23
|
+
}
|
|
24
|
+
interface TableValidationContext {
|
|
25
|
+
hasLocalDataInput?: boolean;
|
|
26
|
+
localDataModeDefaultEnabled?: boolean;
|
|
27
|
+
server?: {
|
|
28
|
+
idField?: string;
|
|
29
|
+
schemaHash?: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
interface TableProjectionContext {
|
|
33
|
+
hasLocalDataInput?: boolean;
|
|
34
|
+
localDataModeDefaultEnabled?: boolean;
|
|
35
|
+
}
|
|
36
|
+
interface TableRuntimeContext {
|
|
37
|
+
hasLocalDataInput?: boolean;
|
|
38
|
+
localDataModeDefaultEnabled?: boolean;
|
|
39
|
+
server?: {
|
|
40
|
+
idField?: string;
|
|
41
|
+
schemaId?: string;
|
|
42
|
+
schemaHash?: string;
|
|
43
|
+
};
|
|
44
|
+
crud?: {
|
|
45
|
+
tableId: string;
|
|
46
|
+
componentKeyId?: string;
|
|
47
|
+
};
|
|
48
|
+
currentBindings?: TableBindings;
|
|
49
|
+
}
|
|
50
|
+
interface TableApplyPlan {
|
|
51
|
+
canonicalConfig: TableConfig;
|
|
52
|
+
bindingsPatch?: TableBindings;
|
|
53
|
+
persistence?: {
|
|
54
|
+
saveConfig?: boolean;
|
|
55
|
+
saveBindings?: boolean;
|
|
56
|
+
};
|
|
57
|
+
runtime?: {
|
|
58
|
+
reconnectDataSource?: boolean;
|
|
59
|
+
reloadSchema?: boolean;
|
|
60
|
+
fetchData?: boolean;
|
|
61
|
+
refreshLocalView?: boolean;
|
|
62
|
+
};
|
|
63
|
+
metadata?: {
|
|
64
|
+
attachServerMeta?: boolean;
|
|
65
|
+
};
|
|
66
|
+
diff?: {
|
|
67
|
+
resourcePathChanged?: boolean;
|
|
68
|
+
horizontalScrollChanged?: boolean;
|
|
69
|
+
requiresDataRefresh?: boolean;
|
|
70
|
+
};
|
|
71
|
+
diagnostics: EditorDiagnostic[];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** Owner inputs exposed through @praxisui/table/authoring. Fields must already be normalized by admitted Core code.
|
|
75
|
+
* Config and bindings are variable native inputs, not recoverable from a schema.
|
|
76
|
+
* This helper neither admits sources nor evaluates raw schema expressions.
|
|
77
|
+
*/
|
|
78
|
+
interface TableEditorDocumentDerivationInput {
|
|
79
|
+
config: TableConfig;
|
|
80
|
+
bindings: TableBindings;
|
|
81
|
+
fields: FieldDefinition[];
|
|
82
|
+
}
|
|
83
|
+
/** Full native document: canonical defaults/action normalization are owned by
|
|
84
|
+
* createTableAuthoringDocument. This is not a public host executor or attestation.
|
|
85
|
+
*/
|
|
86
|
+
declare function deriveTableEditorDocument(input: TableEditorDocumentDerivationInput): TableAuthoringDocument;
|
|
87
|
+
|
|
88
|
+
declare function createTableAuthoringDocument(source: {
|
|
89
|
+
config?: unknown;
|
|
90
|
+
bindings?: unknown;
|
|
91
|
+
}): TableAuthoringDocument;
|
|
92
|
+
declare function parseLegacyOrTableDocument(raw: unknown): TableAuthoringDocument;
|
|
93
|
+
declare function normalizeTableAuthoringDocument(doc: TableAuthoringDocument): TableAuthoringDocument;
|
|
94
|
+
declare function validateTableAuthoringDocument(doc: TableAuthoringDocument, context?: TableValidationContext): EditorDiagnostic[];
|
|
95
|
+
declare function toCanonicalTableConfig(doc: TableAuthoringDocument, context?: TableProjectionContext): TableConfig;
|
|
96
|
+
declare function buildTableApplyPlan(doc: TableAuthoringDocument, runtime?: TableRuntimeContext, options?: {
|
|
97
|
+
saveConfig?: boolean;
|
|
98
|
+
saveBindings?: boolean;
|
|
99
|
+
attachServerMeta?: boolean;
|
|
100
|
+
}): TableApplyPlan;
|
|
101
|
+
declare function serializeTableAuthoringDocument(doc: TableAuthoringDocument): unknown;
|
|
102
|
+
|
|
103
|
+
/** Raw compact schema authorship only; native normalization remains an editor/runtime projection. */
|
|
104
|
+
declare function decodeTablePageInputs(value: unknown): {
|
|
105
|
+
document: TableAuthoringDocument | null;
|
|
106
|
+
diagnostics: EditorDiagnostic[];
|
|
107
|
+
};
|
|
108
|
+
/** Core prefixes these widget-relative JSON Pointers; this callback never resolves a source/latest. */
|
|
109
|
+
declare function validateTablePageWidget(widget: WidgetInstance): readonly {
|
|
110
|
+
code: string;
|
|
111
|
+
path: string;
|
|
112
|
+
}[];
|
|
113
|
+
declare function encodeTablePageInputs(value: unknown): {
|
|
114
|
+
inputs: Record<string, unknown> | null;
|
|
115
|
+
diagnostics: EditorDiagnostic[];
|
|
116
|
+
};
|
|
117
|
+
/** No-change values in a materialized native editor cannot author defaults or erase absent keys. */
|
|
118
|
+
declare function projectTablePageEditorChanges(authoredInputs: unknown, editorBaseline: unknown, editorValue: unknown): {
|
|
119
|
+
inputs: Record<string, unknown> | null;
|
|
120
|
+
diagnostics: EditorDiagnostic[];
|
|
121
|
+
};
|
|
122
|
+
/** Derive execution-only identity and disable independent preferences. Never persist this projection. */
|
|
123
|
+
declare function materializeTablePageRuntimeInputs(value: unknown, pageId: string, widgetKey: string, options?: {
|
|
124
|
+
preview?: boolean;
|
|
125
|
+
}): {
|
|
126
|
+
inputs: Record<string, unknown> | null;
|
|
127
|
+
diagnostics: EditorDiagnostic[];
|
|
128
|
+
};
|
|
129
|
+
declare const TABLE_GOVERNED_PAGE_PREVIEW_ADAPTER: GovernedPagePreviewWidgetAdapter;
|
|
130
|
+
|
|
131
|
+
export { TABLE_GOVERNED_PAGE_PREVIEW_ADAPTER, buildTableApplyPlan, createTableAuthoringDocument, decodeTablePageInputs, deriveTableEditorDocument, encodeTablePageInputs, materializeTablePageRuntimeInputs, normalizeTableAuthoringDocument, parseLegacyOrTableDocument, projectTablePageEditorChanges, serializeTableAuthoringDocument, toCanonicalTableConfig, validateTableAuthoringDocument, validateTablePageWidget };
|
|
132
|
+
export type { EditorDiagnostic, TableApplyPlan, TableAuthoringDocument, TableBindings, TableEditorDocumentDerivationInput, TableProjectionContext, TableRuntimeContext, TableValidationContext };
|