@praxisui/table 10.0.0-rc.6 → 10.0.0-rc.61
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 +136 -10
- package/ai/component-registry.json +3842 -382
- package/docs/column-resize-reorder-implementation-plan.md +3 -3
- package/docs/column-resize-reorder-review-prompt.md +1 -1
- package/docs/dynamic-filter-host-integration-guide.md +49 -2
- package/docs/dynamic-filter-payload-contract.md +29 -6
- package/docs/dynamic-filter-range-filters-guide.md +125 -13
- package/docs/governed-page-widget-adapter.md +55 -0
- package/docs/local-data-mode-precedence.md +21 -0
- package/docs/performance-hardening-v2-implementation-plan.md +20 -20
- package/docs/table-bottom-detail-progress.md +2 -2
- package/fesm2022/praxisui-table-authoring.mjs +859 -52
- package/fesm2022/{praxisui-table-filter-form-dialog-host.component-DANYIQs6.mjs → praxisui-table-filter-form-dialog-host.component-DfOXx5lp.mjs} +61 -11
- package/fesm2022/{praxisui-table-praxisui-table-BIRFv2S8.mjs → praxisui-table-praxisui-table-PvwtPvhN.mjs} +20021 -2297
- package/fesm2022/{praxisui-table-table-agentic-authoring-turn-flow-DtOwXgFW.mjs → praxisui-table-table-agentic-authoring-turn-flow-DgbfJI3k.mjs} +1 -1
- package/fesm2022/{praxisui-table-table-ai.adapter-25xtoiWq.mjs → praxisui-table-table-ai.adapter-DWR_lxPJ.mjs} +13 -7
- package/fesm2022/praxisui-table.mjs +1 -1
- package/package.json +10 -10
- package/src/lib/praxis-table.json-api.md +58 -18
- package/types/praxisui-table-authoring.d.ts +30 -2
- package/types/praxisui-table.d.ts +1119 -121
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Observable, firstValueFrom } from 'rxjs';
|
|
2
2
|
import { withAuthoringScopePolicy } from '@praxisui/ai';
|
|
3
|
-
import {
|
|
3
|
+
import { az as setTableActionGlobalActionRef } from './praxisui-table-praxisui-table-PvwtPvhN.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 { W as TABLE_COMPONENT_EDIT_PLAN_OPERATION_IDS, p as PRAXIS_TABLE_AUTHORING_MANIFEST, T as TABLE_AI_CAPABILITIES,
|
|
4
|
+
import { W as TABLE_COMPONENT_EDIT_PLAN_OPERATION_IDS, p as PRAXIS_TABLE_AUTHORING_MANIFEST, T as TABLE_AI_CAPABILITIES, a8 as coerceTableComponentEditPlans, aa as compileTableComponentEditPlans, Z as TASK_PRESETS, ai 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-PvwtPvhN.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) {
|
|
@@ -3746,7 +3747,7 @@ Columns Analysis:
|
|
|
3746
3747
|
if (exactMatch || prefixMatch) {
|
|
3747
3748
|
if (newPath === 'columns[].computed.expression') {
|
|
3748
3749
|
if (!obj[key] || typeof obj[key] !== 'object' || Array.isArray(obj[key])) {
|
|
3749
|
-
warnings.push(`Computed expression
|
|
3750
|
+
warnings.push(`Computed expression inválida: ${newPath} (deve ser Json Logic)`);
|
|
3750
3751
|
continue;
|
|
3751
3752
|
}
|
|
3752
3753
|
if (Object.keys(obj[key]).length === 0) {
|
|
@@ -3952,7 +3953,12 @@ Columns Analysis:
|
|
|
3952
3953
|
isFirstChange: () => false
|
|
3953
3954
|
}
|
|
3954
3955
|
});
|
|
3955
|
-
this.table.
|
|
3956
|
+
if (typeof this.table.emitPortableConfigChange === 'function') {
|
|
3957
|
+
this.table.emitPortableConfigChange(config);
|
|
3958
|
+
}
|
|
3959
|
+
else {
|
|
3960
|
+
this.table.configChange?.emit?.(config);
|
|
3961
|
+
}
|
|
3956
3962
|
}
|
|
3957
3963
|
/**
|
|
3958
3964
|
* If a patch adds a typed format, ensure the column type is set so the
|
|
@@ -1,2 +1,2 @@
|
|
|
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
|
|
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 attachAnalyticsTableRowMetadata, a6 as buildTableApplyPlan, a7 as coerceTableComponentEditPlan, a8 as coerceTableComponentEditPlans, a9 as compileTableComponentEditPlan, aa as compileTableComponentEditPlans, ab as createTableAuthoringDocument, ac as decodeTablePageInputs, ad as encodeTablePageInputs, ae as formatComputedFieldValue, af as getActionId, ag as getEnum, ah as getTableCapabilities, ai as getTableComponentEditPlanCapabilities, aj as interpolateRelationEndpoint, ak as isAnalyticalDrawerSchema, al as isTableRendererSupportedByRichContentP0, am as mapTableRendererToRichContentP0, an as materializeTablePageRuntimeInputs, ao as normalizeComputedFieldDefinition, ap as normalizeTableAuthoringDocument, aq as parseLegacyOrTableDocument, as as projectTablePageEditorChanges, at as providePraxisAnalyticalDrawerSchemas, au as providePraxisFilterMetadata, av as providePraxisTableMetadata, aw as providePraxisTableToolbarAppearance, ax as readAnalyticsTableRowMetadata, ay as serializeTableAuthoringDocument, aA as toCanonicalTableConfig, aB as validateTableAuthoringDocument, aC as validateTablePageWidget } from './praxisui-table-praxisui-table-PvwtPvhN.mjs';
|
|
2
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.61",
|
|
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.61",
|
|
10
|
+
"@praxisui/core": "^10.0.0-rc.61",
|
|
11
|
+
"@praxisui/dynamic-fields": "^10.0.0-rc.61",
|
|
12
|
+
"@praxisui/dynamic-form": "^10.0.0-rc.61",
|
|
13
|
+
"@praxisui/metadata-editor": "^10.0.0-rc.61",
|
|
14
|
+
"@praxisui/rich-content": "^10.0.0-rc.61",
|
|
15
|
+
"@praxisui/settings-panel": "^10.0.0-rc.61",
|
|
16
|
+
"@praxisui/table-rule-builder": "^10.0.0-rc.61",
|
|
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.61",
|
|
22
22
|
"rxjs": "~7.8.0"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
@@ -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.
|
|
@@ -268,15 +273,17 @@ type ActionBarNode = {
|
|
|
268
273
|
| `meta` | object | No | `{}` | Active | Metadados de versao/hash/contexto da configuracao. |
|
|
269
274
|
| `columns[]` | array | Yes | `[]` | Active | Definicao estrutural principal da tabela. |
|
|
270
275
|
| `behavior` | object | No | component-defaults | Active | Regras de paginação, sort, filter, selection, expansion, loading. |
|
|
271
|
-
| `behavior.loading.type` | `spinner \| skeleton \| progress` | No | `skeleton` | Active | Seleciona um dos três indicadores materializados pelo runtime. O valor legado `custom`, sem renderer local canônico, foi removido durante o beta. |
|
|
272
|
-
| `behavior.loading.position` | `overlay \| inline \| replace` | No | `replace` | Active | Controla se o indicador cobre, acompanha ou substitui a superfície de dados. |
|
|
273
|
-
| `behavior.loading.text` | string | No | `
|
|
274
|
-
| `behavior.loading.delay` | number | No | `0` | Active | Adia
|
|
275
|
-
| `behavior.loading.showForQuickOperations` | boolean | No | `false` | Active | Quando `true
|
|
276
|
+
| `behavior.loading.type` | `spinner \| skeleton \| progress` | No | `skeleton` | Active | Seleciona um dos três indicadores materializados pelo runtime na cápsula compacta (`spinner`, `progress` ou pulso `skeleton`) e, na carga fria em `replace`, as linhas estruturais de skeleton. O valor legado `custom`, sem renderer local canônico, foi removido durante o beta. |
|
|
277
|
+
| `behavior.loading.position` | `overlay \| inline \| replace` | No | `replace` | Active | Controla se o indicador cobre, acompanha ou substitui a superfície de dados. Em `replace`, substitui o corpo apenas na carga fria inicial antes do primeiro baseline; recargas seguintes promovem automaticamente para `overlay` preservando altura e contexto. |
|
|
278
|
+
| `behavior.loading.text` | string | No | `table.loading.message` | Active | Mensagem acessível e visual apresentada na cápsula com `role="status"` restrito ao texto. Quando omitida (ou vinda do seed padrão sem autoria explícita), é localizada via `table.loading.message` / `table.loading.analytics`; texto explícito do host sempre vence. |
|
|
279
|
+
| `behavior.loading.delay` | number | No | `0` | Active | Adia o indicador visual; estado, bloqueio e timeout começam com o request. Com `delay: 0` e `showForQuickOperations: false`, a hairline de `2px` inicia em `0ms` e a cápsula/véu têm graça CSS de `60ms`. |
|
|
280
|
+
| `behavior.loading.showForQuickOperations` | boolean | No | `false` | Active | Quando `true` (ou com `delay > 0`), remove a graça visual CSS de `60ms` e apresenta o indicador imediatamente assim que liberado pelo timer. |
|
|
276
281
|
| `behavior.loading.requestTimeoutMs` | number | No | `30000` | Active | Encerra requests de schema, coleção REST ou `analyticsProjection` que excedem o SLA e apresenta erro recuperável; `0` delega a política ao host. |
|
|
277
|
-
| `behavior.loading.allowCancel` | boolean | No | `true` | Active | Em schema, coleção REST e `analyticsProjection`, exibe cancelamento acessível, aborta o transporte por unsubscribe e preserva dados
|
|
278
|
-
| `behavior.loading.skeleton.rows` | number | No | `3` | Active | Quantidade de linhas visuais, normalizada
|
|
279
|
-
| `behavior.loading.skeleton.animated` | boolean | No | `true` | Active | Controla a animação do skeleton. |
|
|
282
|
+
| `behavior.loading.allowCancel` | boolean | No | `true` | Active | Em schema, coleção REST e `analyticsProjection`, exibe cancelamento acessível após revelação progressiva de `1200ms` (ou imediata por `:focus-within`, alvo `>= 24px`), aborta o transporte por unsubscribe e preserva os dados já renderizados. |
|
|
283
|
+
| `behavior.loading.skeleton.rows` | number | No | `3` (`min(pageSize, 8)` paginado) | Active | Quantidade de linhas visuais da carga fria, normalizada entre `1` e `12`. Quando omitida em tabelas paginadas não virtualizadas, deriva de `min(pageSize, 8)` (fallback `3`). |
|
|
284
|
+
| `behavior.loading.skeleton.animated` | boolean | No | `true` | Active | Controla a animação do carregamento quando `type="skeleton"` (`replace`, `overlay` e `inline`), em conjunto com `appearance.animations.enabled` e `accessibility.reduceMotion`. |
|
|
285
|
+
| `behavior.loading.skeleton.baseColor` | string | No | `undefined` | Declared-only | Declarado em `LoadingConfig` e preservado no round-trip do editor; ossos e cápsula consomem tokens semânticos `--md-sys-color-*` / `--p-table-*`. |
|
|
286
|
+
| `behavior.loading.skeleton.highlightColor` | string | No | `undefined` | Declared-only | Declarado em `LoadingConfig` e preservado no round-trip do editor; não sobrescreve tokens do runtime. |
|
|
280
287
|
| `appearance` | object | No | component-defaults | Active | Densidade, responsividade, tokens e comportamento visual. |
|
|
281
288
|
| `toolbar` | object | No | component-defaults | Active | Ações globais, busca e controles de topo. |
|
|
282
289
|
| `actions` | object | No | component-defaults | Active | Ações por linha/lote e integrações de comando. |
|
|
@@ -361,8 +368,15 @@ Este arquivo foi adaptado para o padrao canonico atual sem remover conteudo tecn
|
|
|
361
368
|
| `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
369
|
| `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
370
|
| `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. |
|
|
371
|
+
| `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
372
|
| `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[]`. |
|
|
373
|
+
| `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
374
|
| `columns[].renderer` | object | No | field-type-driven | renderer-contract | Renderers condicionais, payload expr e ações interativas. |
|
|
375
|
+
| `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). |
|
|
376
|
+
| `columns[].renderer.badge.quickView` | `ResourceQuickViewBinding` | No | none | `recordOpen` obrigatório | Sobrescreve ou habilita Quick View específico para o renderer `badge`. |
|
|
377
|
+
| `columns[].renderer.chip.quickView` | `ResourceQuickViewBinding` | No | none | `recordOpen` obrigatório | Sobrescreve ou habilita Quick View específico para o renderer `chip`. |
|
|
378
|
+
| `columns[].renderer.icon.quickView` | `ResourceQuickViewBinding` | No | none | `recordOpen` obrigatório | Sobrescreve ou habilita Quick View específico para o renderer `icon`. |
|
|
379
|
+
| `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
380
|
|
|
367
381
|
Quando `actions.row.discovery.enabled` esta ativo e o item publica
|
|
368
382
|
capabilities CRUD canonicas, `PraxisTable` pode sintetizar entradas
|
|
@@ -386,6 +400,10 @@ Renderer defaults:
|
|
|
386
400
|
- 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
401
|
|
|
388
402
|
- 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.
|
|
403
|
+
- `columns[].quickView` e `columns[].renderer.link.quickView` (`ResourceQuickViewBinding`) materializam o gatilho canônico `[praxisQuickView]` (`PraxisQuickViewTriggerDirective`):
|
|
404
|
+
- `renderer.link.quickView` tem precedência sobre `columns[].quickView`.
|
|
405
|
+
- 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>`.
|
|
406
|
+
- 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
407
|
|
|
390
408
|
### Toolbar contract
|
|
391
409
|
|
|
@@ -500,6 +518,8 @@ degraded filter.
|
|
|
500
518
|
| `SettingsPanelService` | bidirectional | `open(...).applied$/saved$` | fail-open | Canal de edição em runtime (quick connect/editor). |
|
|
501
519
|
| `PRAXIS_TABLE_DETAIL_RESOURCE_RESOLVER` | outbound call | Angular DI token (`TableDetailResourceResolver`) | fail-closed | Resolução externa e governada de detail schema por `resource`; o host deve fornecer o token por DI. |
|
|
502
520
|
| `AnalyticsTableStatsApiService.execute` | outbound call | `Observable<AnalyticsTableRow[]>` | fail-closed | A subscription é proprietária do transporte HTTP. `unsubscribe`, supersessão, timeout e destruição abortam o request em andamento; use `firstValueFrom(...)` apenas na borda de um consumidor que deliberadamente precise de Promise. |
|
|
521
|
+
| `AnalyticsTableStatsApiService.executeRaw` / `mapRawResponseToRows` | outbound call + pure mapper | `Observable<AnalyticsTableRawStatsResult>` + `readAnalyticsTableRowMetadata(row)` | fail-closed | Permite compartilhar uma única execução HTTP `/stats/*` entre múltiplos renderers analíticos e preserva metadados não-enumeráveis de bucket (`primaryKey`, `secondaryKey`, `keys`, `from`, `to`, `suppressed`, `state`, `count`) para cross-filter e guarda LGPD. |
|
|
522
|
+
| `AnalyticsTableConfigAdapterService.toTableConfig` | pure adapter | `(projection, options?: AnalyticsTableConfigAdapterOptions)` | fail-closed | `options.surfaceMode?: 'standalone' \| 'embedded'` controla supressão de toolbar e densidade compacta; `options.rowCount?: number` suprime paginação quando os buckets cabem em uma única página e habilita `allowDeselect: true` em seleção single-row quando interativo. |
|
|
503
523
|
|
|
504
524
|
`resourcePath` mantém precedência canônica sobre `analyticsProjection`: quando ambos estão presentes, o runtime cancela o transporte analítico e materializa somente a coleção REST.
|
|
505
525
|
|
|
@@ -949,13 +969,13 @@ O contrato principal e `TableConfig` (alias de `TableConfigV2`) com extensoes de
|
|
|
949
969
|
|
|
950
970
|
#### Projeção governada de colunas
|
|
951
971
|
|
|
952
|
-
Quando `columnProjection.source = "schema"`, a
|
|
953
|
-
materializada a partir de `/schemas/filtered`;
|
|
954
|
-
em `columnProjection.
|
|
972
|
+
Quando `columnProjection.source = "schema"`, a declaração explícita de `columns` é opcional.
|
|
973
|
+
A lista estrutural de colunas é materializada em tempo de execução a partir de `/schemas/filtered`;
|
|
974
|
+
a configuração declara apenas a seleção ordenada em `columnProjection.include` e as decisões
|
|
975
|
+
editoriais pontuais em `columnProjection.overrides`, indexadas pelo nome canônico do campo:
|
|
955
976
|
|
|
956
977
|
```json
|
|
957
978
|
{
|
|
958
|
-
"columns": [],
|
|
959
979
|
"columnProjection": {
|
|
960
980
|
"source": "schema",
|
|
961
981
|
"include": ["competencia", "salarioBruto", "salarioLiquido"],
|
|
@@ -969,6 +989,11 @@ em `columnProjection.overrides`, indexadas pelo nome canônico do campo:
|
|
|
969
989
|
}
|
|
970
990
|
```
|
|
971
991
|
|
|
992
|
+
Quando consumido dentro de `<praxis-crud>`, o contrato também auto-infere a `schemaUrl`
|
|
993
|
+
de `behavior.filtering.advancedFilters` a partir de `resource.schemaPath` ou `resource.path`
|
|
994
|
+
(normalizado para `/schemas/filtered?path=/api/.../filter&operation=post&schemaType=request`),
|
|
995
|
+
eliminando URLs estáticas duplicadas nos arquivos de configuração.
|
|
996
|
+
|
|
972
997
|
O runtime reaplica os overrides após bootstrap e atualização do schema. Uma chave
|
|
973
998
|
desconhecida não cria coluna, e `field` não pode ser alterado pelo override. Este
|
|
974
999
|
contrato não cria “defaults da surface” paralelos: tipo, visibilidade, ordem e
|
|
@@ -1077,6 +1102,7 @@ row selection through table affordances.
|
|
|
1077
1102
|
| `--p-table-state-warning-*` | tokens de estado warning |
|
|
1078
1103
|
| `--p-table-state-danger-*` | tokens de estado danger |
|
|
1079
1104
|
| `--p-table-state-highlight-*` | tokens de estado highlight |
|
|
1105
|
+
| `--p-table-data-surface-min-height` | override opcional do host para a altura mínima reservada de `.ptable-data-surface` (ex.: `0px` para desativar a estabilização de slots em filtros ou páginas parciais; fallback `--p-table-data-surface-min-height-runtime`) |
|
|
1080
1106
|
|
|
1081
1107
|
#### Host classes
|
|
1082
1108
|
| Classe no host | Efeito |
|
|
@@ -1268,6 +1294,9 @@ Em `scroll-auto`, o viewport e uma regiao focalizavel por teclado para que o scr
|
|
|
1268
1294
|
- Se houver comportamento divergente entre schema e runtime, priorize as indicacoes desta pagina em `Known limitations and mismatches` e mantenha `has_known_mismatches=true` no frontmatter enquanto a lacuna existir.
|
|
1269
1295
|
|
|
1270
1296
|
### Source references
|
|
1297
|
+
- `projects/praxis-table/src/lib/analytics/analytics-table.model.ts`
|
|
1298
|
+
- `projects/praxis-table/src/lib/analytics/analytics-table-config-adapter.service.ts`
|
|
1299
|
+
- `projects/praxis-table/src/lib/analytics/analytics-table-stats-api.service.ts`
|
|
1271
1300
|
- `projects/praxis-table/src/lib/praxis-table.ts`
|
|
1272
1301
|
- `projects/praxis-table/src/lib/praxis-table.html`
|
|
1273
1302
|
- `projects/praxis-table/src/lib/praxis-table.scss`
|
|
@@ -1293,7 +1322,18 @@ Em `scroll-auto`, o viewport e uma regiao focalizavel por teclado para que o scr
|
|
|
1293
1322
|
| Path | Type | Required | Default | Status | Notes |
|
|
1294
1323
|
| --- | --- | --- | --- | --- | --- |
|
|
1295
1324
|
| `columns[]` | `TableColumnConfig[]` | Yes | `[]` | Active | Definicao de colunas, renderers e regras de exibicao. |
|
|
1325
|
+
| `columns[].emptyValue` | `string \| undefined` | No | `undefined` | Active | Texto substituto exibido quando o valor resolvido da celula for `null`, `undefined` ou `''`, preservando o valor bruto no dataset para ordenacao client-side. |
|
|
1326
|
+
| `columns[].quickView` | `ResourceQuickViewBinding` | No | `undefined` | Active | Binding governado de Quick View (`recordOpen`, `detailPresentation?`, `contentRef?`) na celula. |
|
|
1327
|
+
| `columns[].renderer.link.quickView` | `ResourceQuickViewBinding` | No | `undefined` | Active | Override de Quick View no renderer `link` (`hover-only` com `href` valido). |
|
|
1328
|
+
| `columns[].renderer.badge.quickView` | `ResourceQuickViewBinding` | No | `undefined` | Active | Override de Quick View no renderer `badge`. |
|
|
1329
|
+
| `columns[].renderer.chip.quickView` | `ResourceQuickViewBinding` | No | `undefined` | Active | Override de Quick View no renderer `chip`. |
|
|
1330
|
+
| `columns[].renderer.icon.quickView` | `ResourceQuickViewBinding` | No | `undefined` | Active | Override de Quick View no renderer `icon`. |
|
|
1331
|
+
| `columns[].renderer.compose.items[].quickView` | `ResourceQuickViewBinding` | No | `undefined` | Active | Binding de Quick View por subitem em celulas `compose`. |
|
|
1332
|
+
| `actions.row.actions[].quickView` | `ResourceQuickViewBinding` | No | `undefined` | Active | Binding de Quick View ancorado ao botao da acao de linha. |
|
|
1296
1333
|
| `behavior` | `TableBehaviorConfig` | No | defaults do runtime | Partial | Inclui paginacao, filtro, selecao e expansao por blocos. |
|
|
1334
|
+
| `behavior.selection.allowDeselect` | `boolean` | No | `false` | Active | Permite toggle-off ao clicar ou acionar `Espaco` novamente na linha selecionada quando `behavior.selection.type = "single"` nos modos `row`, `checkbox` e `both` (padrao e virtualizado). |
|
|
1335
|
+
| `behavior.filtering.advancedFilters.settings.showAddButton` | `boolean` | No | `true` | Active | Controla a exibicao do botao `+` de adicionar campos rapidos (`alwaysVisibleFields`) na barra do `PraxisFilter` embutido. |
|
|
1336
|
+
| `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
1337
|
| `toolbar.actions[]` | `ToolbarActionConfig[]` | No | `[]` | Partial | Acoes de toolbar com roteamento para `toolbarAction` e `bulkAction`. |
|
|
1298
1338
|
| `toolbar.title` | `string` | No | `undefined` | Active | Titulo renderizado na regiao de identidade da toolbar principal, antes de filtros e acoes. |
|
|
1299
1339
|
| `toolbar.subtitle` | `string` | No | `undefined` | Active | Texto auxiliar renderizado abaixo do titulo quando houver espaco. |
|
|
@@ -1475,7 +1515,7 @@ Use `detail.presentation.configure` to choose bottom: it disables row expansion
|
|
|
1475
1515
|
|
|
1476
1516
|
The Details section edits the authored tree and preserves field expressions, unknown nodes and provider references. Its local preview does not perform remote reads or persist sample values. Invalid advanced JSON blocks Apply/Save. Discard restores detail edits; global defaults retain their existing reset semantics.
|
|
1477
1517
|
|
|
1478
|
-
The bottom body defaults to dynamic height with a small-viewport CSS limit. Fixed mode starts at 192px in the editor and provides vertical scrolling. It is outside the virtual viewport and defaults to after the footer controls, preserving the collection stack. Explicit collapse persists across selection changes. Inline charts require the Charts provider; unresolved references remain explained placeholders.
|
|
1518
|
+
The bottom body defaults to dynamic height with a small-viewport CSS limit. Fixed mode starts at 192px in the editor and provides vertical scrolling. It is outside the virtual viewport and defaults to after the footer controls, preserving the collection stack. Explicit collapse persists across selection changes. Both row expansion and bottom detail surfaces share `#tableDetailBodyTemplate`, render the retry action exclusively when `source.mode` or `fallbackMode` is asynchronous (`resource`, `resourcePath`, `hypermedia`), and evict non-`ready` (`blocked`/`error`) detail states on collapse even when `lazyLoad.cache.enabled` is `true`. Inline charts require the Charts provider; unresolved references remain explained placeholders.
|
|
1479
1519
|
|
|
1480
1520
|
- `behavior.detail.schemaContract.allowedNodes` agora tambem pode incluir `formRef`, `tableRef`, `chartRef`, `templateRef` e `diagramEmbed`.
|
|
1481
1521
|
- Esses nodes continuam host-mediated:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TableConfig, FieldDefinition } from '@praxisui/core';
|
|
1
|
+
import { TableConfig, FieldDefinition, GovernedPagePreviewWidgetAdapter, WidgetInstance } from '@praxisui/core';
|
|
2
2
|
|
|
3
3
|
interface EditorDocument<TConfig, TBindings = unknown> {
|
|
4
4
|
kind: string;
|
|
@@ -100,5 +100,33 @@ declare function buildTableApplyPlan(doc: TableAuthoringDocument, runtime?: Tabl
|
|
|
100
100
|
}): TableApplyPlan;
|
|
101
101
|
declare function serializeTableAuthoringDocument(doc: TableAuthoringDocument): unknown;
|
|
102
102
|
|
|
103
|
-
|
|
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 };
|
|
104
132
|
export type { EditorDiagnostic, TableApplyPlan, TableAuthoringDocument, TableBindings, TableEditorDocumentDerivationInput, TableProjectionContext, TableRuntimeContext, TableValidationContext };
|