@praxisui/table 9.0.0-beta.2 → 9.0.0-beta.20

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.
@@ -2403,6 +2403,7 @@ class TableAgenticAuthoringTurnFlow {
2403
2403
  ? []
2404
2404
  : this.toQuickReplies(response, request),
2405
2405
  canApply: false,
2406
+ diagnostics: response.warnings?.length ? { warnings: response.warnings } : undefined,
2406
2407
  };
2407
2408
  }
2408
2409
  if (response.type === 'error') {
@@ -2466,6 +2467,11 @@ class TableAgenticAuthoringTurnFlow {
2466
2467
  return this.normalizeLabel(response.code ?? '') === 'turn in progress';
2467
2468
  }
2468
2469
  compileAdapterResponse(response, request) {
2470
+ response = this.normalizeConsultativeSourcePlaceholderResponse(response, request);
2471
+ const consultativePresentationOptions = this.consultativePresentationOptionsBoundary(response, request);
2472
+ if (consultativePresentationOptions) {
2473
+ return consultativePresentationOptions;
2474
+ }
2469
2475
  response = this.normalizeCategoricalRendererPalette(response, request);
2470
2476
  const incompatibleBooleanStatusPresentation = this.incompatibleBooleanStatusPresentationBoundary(response, request);
2471
2477
  if (incompatibleBooleanStatusPresentation) {
@@ -2764,6 +2770,43 @@ class TableAgenticAuthoringTurnFlow {
2764
2770
  return openOnlySurfaceRuntimeOperation;
2765
2771
  return this.normalizeGovernedCategoricalSelectionExecutableResponse(compiledResponse, request);
2766
2772
  }
2773
+ consultativePresentationOptionsBoundary(response, request) {
2774
+ if (!request)
2775
+ return null;
2776
+ if (this.requestIsCanonicalRendererSelection(request))
2777
+ return null;
2778
+ if (this.requestHasGovernedCategoricalSelection(request))
2779
+ return null;
2780
+ if (this.responseCarriesClarificationChoices(response))
2781
+ return null;
2782
+ if ((response.options ?? []).length || (response.optionPayloads ?? []).length)
2783
+ return null;
2784
+ const normalizedCurrentPrompt = this.normalizeLabel(request.prompt ?? '');
2785
+ const normalizedConversationPrompt = this.normalizeLabel(this.componentPresentationPromptForTurn(request));
2786
+ if (!this.promptRequestsPresentationOptions(normalizedConversationPrompt))
2787
+ return null;
2788
+ if (this.promptRequestsExplicitMaterialization(normalizedCurrentPrompt)
2789
+ || this.promptRequestsExplicitMaterialization(normalizedConversationPrompt)) {
2790
+ return null;
2791
+ }
2792
+ const hasExecutableEnvelope = this.responseMayContainExecutableEnvelope(response)
2793
+ || this.componentEditOperations(response.componentEditPlan).length > 0
2794
+ || !!this.toRecord(response.patch);
2795
+ if (!hasExecutableEnvelope && response.type !== 'info' && response.type !== 'clarification') {
2796
+ return null;
2797
+ }
2798
+ return {
2799
+ ...response,
2800
+ type: response.type === 'clarification' ? 'clarification' : 'info',
2801
+ componentEditPlan: undefined,
2802
+ patch: undefined,
2803
+ warnings: [
2804
+ ...(response.warnings ?? []),
2805
+ 'consultative-presentation-options-kept-non-executable',
2806
+ 'A residual continuity guard preserved a follow-up question about table presentation/formatting options as consultative because no explicit apply/change request was present; semantic intent still comes from the LLM-authored turn context.',
2807
+ ],
2808
+ };
2809
+ }
2767
2810
  visualPresentationChoiceClarificationBoundary(response, request) {
2768
2811
  const carriesVisualPayload = (response.optionPayloads ?? [])
2769
2812
  .some((payload) => this.isVisualPresentationClarificationPayload(payload));
@@ -2848,6 +2891,32 @@ class TableAgenticAuthoringTurnFlow {
2848
2891
  'visual',
2849
2892
  ].some((token) => this.normalizedTextContainsApproxPhrase(normalized, token));
2850
2893
  }
2894
+ promptRequestsExplicitMaterialization(normalizedPrompt) {
2895
+ if (!normalizedPrompt)
2896
+ return false;
2897
+ return [
2898
+ 'aplica',
2899
+ 'aplicar',
2900
+ 'aplique',
2901
+ 'altera',
2902
+ 'alterar',
2903
+ 'altere',
2904
+ 'configura',
2905
+ 'configurar',
2906
+ 'configure',
2907
+ 'cria',
2908
+ 'criar',
2909
+ 'crie',
2910
+ 'muda',
2911
+ 'mudar',
2912
+ 'mude',
2913
+ 'mostra como',
2914
+ 'mostre como',
2915
+ 'transforma',
2916
+ 'transformar',
2917
+ 'transforme',
2918
+ ].some((token) => this.normalizedTextContainsApproxPhrase(normalizedPrompt, token));
2919
+ }
2851
2920
  normalizeCategoricalRendererPalette(response, request) {
2852
2921
  const plan = this.toRecord(response.componentEditPlan);
2853
2922
  const operations = this.componentEditOperations(plan);
@@ -9539,6 +9608,7 @@ class TableAgenticAuthoringTurnFlow {
9539
9608
  }
9540
9609
  withCapabilitySystemMessages(messages, contextHints, prompt = '') {
9541
9610
  const policies = [
9611
+ this.buildConsultativeContextSystemPolicy(contextHints),
9542
9612
  this.buildRecommendedCapabilitiesSystemPolicy(contextHints),
9543
9613
  this.buildSelectedRecordsAnalysisSystemPolicy(contextHints),
9544
9614
  this.buildComponentPresentationAuthoringSystemPolicy(contextHints, prompt),
@@ -9548,6 +9618,152 @@ class TableAgenticAuthoringTurnFlow {
9548
9618
  ].filter((message) => !!message);
9549
9619
  return policies.length ? [...policies, ...messages] : messages;
9550
9620
  }
9621
+ buildConsultativeContextSystemPolicy(contextHints) {
9622
+ const facts = this.tableConsultativeContextFacts(contextHints);
9623
+ if (!facts.length)
9624
+ return null;
9625
+ return {
9626
+ role: 'system',
9627
+ content: [
9628
+ 'Praxis table consultative context policy:',
9629
+ '- The facts below are governed runtime/context evidence for read-only questions about the current table.',
9630
+ '- When answering consultative questions, use the concrete fact value. Never answer with placeholders such as "fonte confirmada" or "source confirmed" when a value is declared.',
9631
+ '- Do not emit visual presentation options, componentEditPlan, tableRuntimeOperations, or quick replies for a purely factual answer unless the user explicitly asks to change, apply, format, filter, open, or export something.',
9632
+ '- Endpoint paths and resourcePath values are technical details: include them only when the user asks for the data source, origin, endpoint, resource, URL, path, or resourcePath.',
9633
+ 'Declared consultative facts:',
9634
+ ...facts,
9635
+ ].join('\n'),
9636
+ };
9637
+ }
9638
+ tableConsultativeContextFacts(contextHints) {
9639
+ const facts = [];
9640
+ const resourcePath = this.extractResourcePath(contextHints)
9641
+ ?? this.extractResourcePath(this.optionalJsonObject(this.adapter.getRuntimeState?.()))
9642
+ ?? this.extractResourcePath(this.optionalJsonObject(this.adapter.getAuthoringContext?.()));
9643
+ if (resourcePath) {
9644
+ facts.push(`- resourcePath: ${resourcePath}`);
9645
+ }
9646
+ const dataProfile = this.optionalJsonObject(this.adapter.getDataProfile?.());
9647
+ const rowCount = this.numberValue(dataProfile?.['rowCount'] ?? dataProfile?.['totalRows'] ?? dataProfile?.['totalElements']);
9648
+ if (rowCount != null) {
9649
+ facts.push(`- dataProfile.rowCount: ${rowCount}`);
9650
+ }
9651
+ const runtimeState = this.optionalJsonObject(this.adapter.getRuntimeState?.());
9652
+ const pageSize = this.numberValue(runtimeState?.['pageSize']);
9653
+ const pageIndex = this.numberValue(runtimeState?.['pageIndex'] ?? runtimeState?.['page']);
9654
+ if (pageSize != null) {
9655
+ facts.push(`- runtimeState.pageSize: ${pageSize}`);
9656
+ }
9657
+ if (pageIndex != null) {
9658
+ facts.push(`- runtimeState.pageIndex: ${pageIndex}`);
9659
+ }
9660
+ const consultativeKinds = this.tableConsultativeQuestionKinds(contextHints);
9661
+ if (consultativeKinds.length) {
9662
+ facts.push(`- consultativeContext.answerableQuestionKinds: ${consultativeKinds.join(', ')}`);
9663
+ }
9664
+ const columnFacts = this.tableConsultativeColumnFacts();
9665
+ if (columnFacts.length) {
9666
+ facts.push('- declaredColumns:');
9667
+ facts.push(...columnFacts);
9668
+ }
9669
+ return facts;
9670
+ }
9671
+ tableConsultativeQuestionKinds(contextHints) {
9672
+ const consultativeContext = this.toRecord(this.toRecord(contextHints?.['authoringContract'])?.['consultativeContext']);
9673
+ const kinds = consultativeContext?.['answerableQuestionKinds'];
9674
+ if (!Array.isArray(kinds))
9675
+ return [];
9676
+ const unique = new Set();
9677
+ kinds
9678
+ .map((kind) => this.stringValue(kind).trim())
9679
+ .filter((kind) => !!kind)
9680
+ .forEach((kind) => unique.add(kind));
9681
+ return [...unique].slice(0, 24);
9682
+ }
9683
+ tableConsultativeColumnFacts() {
9684
+ const currentConfig = this.toRecord(this.adapter.getCurrentConfig?.());
9685
+ const columns = Array.isArray(currentConfig?.['columns'])
9686
+ ? currentConfig['columns']
9687
+ : [];
9688
+ const schemaFieldByName = new Map();
9689
+ for (const schemaField of this.adapter.getSchemaFields?.() ?? []) {
9690
+ const record = this.toRecord(schemaField);
9691
+ if (!record)
9692
+ continue;
9693
+ const name = this.stringValue(record['name']) || this.stringValue(record['field']);
9694
+ if (name)
9695
+ schemaFieldByName.set(name, record);
9696
+ }
9697
+ return columns
9698
+ .map((column) => this.toRecord(column))
9699
+ .filter((column) => !!column)
9700
+ .map((column) => {
9701
+ const field = this.stringValue(column['field']).trim();
9702
+ if (!field)
9703
+ return null;
9704
+ const schemaField = schemaFieldByName.get(field);
9705
+ const label = this.stringValue(column['header'])
9706
+ || this.stringValue(column['label'])
9707
+ || this.stringValue(column['title'])
9708
+ || this.stringValue(schemaField?.['label'])
9709
+ || this.stringValue(schemaField?.['title'])
9710
+ || field;
9711
+ const schemaFormat = this.stringValue(schemaField?.['format']);
9712
+ const type = this.tableConsultativeColumnType(column, schemaField, schemaFormat);
9713
+ const format = this.stringValue(column['format']) || schemaFormat;
9714
+ const renderer = this.stringValue(this.toRecord(column['renderer'])?.['type']);
9715
+ return [
9716
+ ` - ${field}`,
9717
+ `label=${label}`,
9718
+ `type=${type}`,
9719
+ ...(format ? [`format=${format}`] : []),
9720
+ ...(renderer ? [`renderer=${renderer}`] : []),
9721
+ ].join('; ');
9722
+ })
9723
+ .filter((fact) => !!fact)
9724
+ .slice(0, 40);
9725
+ }
9726
+ tableConsultativeColumnType(column, schemaField, schemaFormat) {
9727
+ const columnType = this.stringValue(column['type']) || this.stringValue(column['dataType']);
9728
+ const schemaType = this.stringValue(schemaField?.['type']) || this.stringValue(schemaField?.['dataType']);
9729
+ if (schemaFormat === 'date' || schemaFormat === 'date-time')
9730
+ return schemaFormat;
9731
+ return columnType || schemaType || 'unknown';
9732
+ }
9733
+ normalizeConsultativeSourcePlaceholderResponse(response, request) {
9734
+ if (response.type && response.type !== 'info')
9735
+ return response;
9736
+ if (response.patch && Object.keys(response.patch).length > 0)
9737
+ return response;
9738
+ const message = this.stringValue(response.message || response.explanation);
9739
+ if (!this.isConfirmedSourcePlaceholderMessage(message))
9740
+ return response;
9741
+ const resourcePath = this.extractResourcePath(this.contextHintsForTurn)
9742
+ ?? this.extractResourcePath(this.optionalJsonObject(request?.runtimeState))
9743
+ ?? this.extractResourcePath(this.optionalJsonObject(this.adapter.getRuntimeState?.()))
9744
+ ?? this.extractResourcePath(this.optionalJsonObject(this.adapter.getAuthoringContext?.()));
9745
+ if (!resourcePath)
9746
+ return response;
9747
+ return {
9748
+ ...response,
9749
+ type: 'info',
9750
+ message: `O resourcePath usado por esta tabela é \`${resourcePath}\`.`,
9751
+ explanation: undefined,
9752
+ optionPayloads: undefined,
9753
+ options: undefined,
9754
+ warnings: [
9755
+ ...(response.warnings ?? []),
9756
+ 'consultative-source-placeholder-normalized',
9757
+ 'Resposta informativa normalizada a partir de authoringContract.consultativeContext.resourcePath; nao houve roteamento primario de intencao por palavras-chave.',
9758
+ ],
9759
+ };
9760
+ }
9761
+ isConfirmedSourcePlaceholderMessage(message) {
9762
+ const normalized = this.normalizeLabel(message);
9763
+ return !!normalized
9764
+ && (normalized.includes('fonte confirmada') || normalized.includes('source confirmed'))
9765
+ && (normalized.includes('fonte') || normalized.includes('source') || normalized.includes('resource'));
9766
+ }
9551
9767
  buildSelectedRecordsAnalysisSystemPolicy(contextHints) {
9552
9768
  const selectedRecordsContext = this.selectedRecordsContextRecord(contextHints);
9553
9769
  if (!selectedRecordsContext)
@@ -9632,6 +9848,8 @@ class TableAgenticAuthoringTurnFlow {
9632
9848
  }
9633
9849
  buildComponentPresentationAuthoringSystemPolicy(contextHints, prompt) {
9634
9850
  const normalizedPrompt = this.normalizeLabel(prompt);
9851
+ if (this.promptRequestsPresentationOptions(normalizedPrompt))
9852
+ return null;
9635
9853
  const presentationIntent = this.promptRequestsVisualOrStructuralEdit(normalizedPrompt)
9636
9854
  || this.promptRequestsCompoundColumnPresentationEdit(normalizedPrompt);
9637
9855
  if (!presentationIntent)
@@ -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 { G as TABLE_COMPONENT_EDIT_PLAN_OPERATION_IDS, k as PRAXIS_TABLE_AUTHORING_MANIFEST, T as TABLE_AI_CAPABILITIES, W as coerceTableComponentEditPlans, Y as compileTableComponentEditPlans, I as TASK_PRESETS, a1 as getTableComponentEditPlanCapabilities, y as TABLE_COMPONENT_EDIT_PLAN_EXPECTED_PATHS, w as TABLE_COMPONENT_EDIT_PLAN_ALLOWED_CHANGE_KINDS, z as TABLE_COMPONENT_EDIT_PLAN_JSON_SCHEMA, H as TABLE_COMPONENT_EDIT_PLAN_VERSION, x as TABLE_COMPONENT_EDIT_PLAN_BATCH_KIND, E as TABLE_COMPONENT_EDIT_PLAN_KIND } from './praxisui-table-praxisui-table-CunEk0vb.mjs';
4
+ import { G as TABLE_COMPONENT_EDIT_PLAN_OPERATION_IDS, k as PRAXIS_TABLE_AUTHORING_MANIFEST, T as TABLE_AI_CAPABILITIES, W as coerceTableComponentEditPlans, Y as compileTableComponentEditPlans, I as TASK_PRESETS, a1 as getTableComponentEditPlanCapabilities, y as TABLE_COMPONENT_EDIT_PLAN_EXPECTED_PATHS, w as TABLE_COMPONENT_EDIT_PLAN_ALLOWED_CHANGE_KINDS, z as TABLE_COMPONENT_EDIT_PLAN_JSON_SCHEMA, H as TABLE_COMPONENT_EDIT_PLAN_VERSION, x as TABLE_COMPONENT_EDIT_PLAN_BATCH_KIND, E as TABLE_COMPONENT_EDIT_PLAN_KIND } from './praxisui-table-praxisui-table--Mn44a7Y.mjs';
5
5
 
6
6
  const TABLE_COMPONENT_CONTEXT_PACK = {
7
7
  version: 'v1',
@@ -2204,6 +2204,9 @@ class TableAiAdapter extends BaseAiAdapter {
2204
2204
  'bulk-actions',
2205
2205
  'selection-derived-export-scope',
2206
2206
  'styling-capabilities',
2207
+ 'column-format-options',
2208
+ 'column-presentation-options',
2209
+ 'boolean-status-presentation-options',
2207
2210
  'conditional-renderers',
2208
2211
  'conditional-styles',
2209
2212
  'conditional-animations',
@@ -1 +1 @@
1
- export { A as AnalyticsTableConfigAdapterService, a as AnalyticsTableContractService, b as AnalyticsTableStatsApiService, B as BOOLEAN_PRESETS, c as BehaviorConfigEditorComponent, C as CURRENCY_PRESETS, d as ColumnsConfigEditorComponent, D as DATE_PRESETS, e as DataFormatterComponent, f as DataFormattingService, F as FORMULA_TEMPLATES, g as FilterConfigService, h as FilterSettingsComponent, i as FormulaGeneratorService, J as JsonConfigEditorComponent, M as MessagesLocalizationEditorComponent, N as NUMBER_PRESETS, P as PERCENTAGE_PRESETS, j as PRAXIS_FILTER_COMPONENT_METADATA, k as PRAXIS_TABLE_AUTHORING_MANIFEST, l as PRAXIS_TABLE_COMPONENT_METADATA, m as PRAXIS_TABLE_TOOLBAR_DEFAULT_APPEARANCE, n as PRAXIS_TABLE_TOOLBAR_TOKEN_PRESETS, o as PraxisFilter, p as PraxisFilterWidgetConfigEditor, q as PraxisTable, r as PraxisTableConfigEditor, s as PraxisTableInlineAuthoringEditorComponent, t as PraxisTableToolbar, u as PraxisTableWidgetConfigEditor, S as STRING_PRESETS, T as TABLE_AI_CAPABILITIES, v as TABLE_COMPONENT_AI_CAPABILITIES, w as TABLE_COMPONENT_EDIT_PLAN_ALLOWED_CHANGE_KINDS, x as TABLE_COMPONENT_EDIT_PLAN_BATCH_KIND, y as TABLE_COMPONENT_EDIT_PLAN_EXPECTED_PATHS, z as TABLE_COMPONENT_EDIT_PLAN_JSON_SCHEMA, E as TABLE_COMPONENT_EDIT_PLAN_KIND, H as TABLE_COMPONENT_EDIT_PLAN_VERSION, I as TASK_PRESETS, K as TableDefaultsProvider, L as TableRulesEditorComponent, O as ToolbarActionsEditorComponent, V as ValueMappingEditorComponent, Q as VisualFormulaBuilderComponent, R as buildTableApplyPlan, U as coerceTableComponentEditPlan, W as coerceTableComponentEditPlans, X as compileTableComponentEditPlan, Y as compileTableComponentEditPlans, Z as createTableAuthoringDocument, _ as getActionId, $ as getEnum, a0 as getTableCapabilities, a1 as getTableComponentEditPlanCapabilities, a2 as isTableRendererSupportedByRichContentP0, a3 as mapTableRendererToRichContentP0, a4 as normalizeTableAuthoringDocument, a5 as parseLegacyOrTableDocument, a6 as providePraxisFilterMetadata, a7 as providePraxisTableMetadata, a8 as providePraxisTableToolbarAppearance, a9 as serializeTableAuthoringDocument, aa as toCanonicalTableConfig, ab as validateTableAuthoringDocument } from './praxisui-table-praxisui-table-CunEk0vb.mjs';
1
+ export { A as AnalyticsTableConfigAdapterService, a as AnalyticsTableContractService, b as AnalyticsTableStatsApiService, B as BOOLEAN_PRESETS, c as BehaviorConfigEditorComponent, C as CURRENCY_PRESETS, d as ColumnsConfigEditorComponent, D as DATE_PRESETS, e as DataFormatterComponent, f as DataFormattingService, F as FORMULA_TEMPLATES, g as FilterConfigService, h as FilterSettingsComponent, i as FormulaGeneratorService, J as JsonConfigEditorComponent, M as MessagesLocalizationEditorComponent, N as NUMBER_PRESETS, P as PERCENTAGE_PRESETS, j as PRAXIS_FILTER_COMPONENT_METADATA, k as PRAXIS_TABLE_AUTHORING_MANIFEST, l as PRAXIS_TABLE_COMPONENT_METADATA, m as PRAXIS_TABLE_TOOLBAR_DEFAULT_APPEARANCE, n as PRAXIS_TABLE_TOOLBAR_TOKEN_PRESETS, o as PraxisFilter, p as PraxisFilterWidgetConfigEditor, q as PraxisTable, r as PraxisTableConfigEditor, s as PraxisTableInlineAuthoringEditorComponent, t as PraxisTableToolbar, u as PraxisTableWidgetConfigEditor, S as STRING_PRESETS, T as TABLE_AI_CAPABILITIES, v as TABLE_COMPONENT_AI_CAPABILITIES, w as TABLE_COMPONENT_EDIT_PLAN_ALLOWED_CHANGE_KINDS, x as TABLE_COMPONENT_EDIT_PLAN_BATCH_KIND, y as TABLE_COMPONENT_EDIT_PLAN_EXPECTED_PATHS, z as TABLE_COMPONENT_EDIT_PLAN_JSON_SCHEMA, E as TABLE_COMPONENT_EDIT_PLAN_KIND, H as TABLE_COMPONENT_EDIT_PLAN_VERSION, I as TASK_PRESETS, K as TableDefaultsProvider, L as TableRulesEditorComponent, O as ToolbarActionsEditorComponent, V as ValueMappingEditorComponent, Q as VisualFormulaBuilderComponent, R as buildTableApplyPlan, U as coerceTableComponentEditPlan, W as coerceTableComponentEditPlans, X as compileTableComponentEditPlan, Y as compileTableComponentEditPlans, Z as createTableAuthoringDocument, _ as getActionId, $ as getEnum, a0 as getTableCapabilities, a1 as getTableComponentEditPlanCapabilities, a2 as isTableRendererSupportedByRichContentP0, a3 as mapTableRendererToRichContentP0, a4 as normalizeTableAuthoringDocument, a5 as parseLegacyOrTableDocument, a6 as providePraxisFilterMetadata, a7 as providePraxisTableMetadata, a8 as providePraxisTableToolbarAppearance, a9 as serializeTableAuthoringDocument, aa as toCanonicalTableConfig, ab as validateTableAuthoringDocument } from './praxisui-table-praxisui-table--Mn44a7Y.mjs';
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@praxisui/table",
3
- "version": "9.0.0-beta.2",
3
+ "version": "9.0.0-beta.20",
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
- "@praxisui/ai": "^9.0.0-beta.2",
9
- "@praxisui/core": "^9.0.0-beta.2",
10
- "@praxisui/dynamic-fields": "^9.0.0-beta.2",
11
- "@praxisui/dynamic-form": "^9.0.0-beta.2",
12
- "@praxisui/metadata-editor": "^9.0.0-beta.2",
13
- "@praxisui/rich-content": "^9.0.0-beta.2",
14
- "@praxisui/settings-panel": "^9.0.0-beta.2",
15
- "@praxisui/table-rule-builder": "^9.0.0-beta.2",
8
+ "@praxisui/ai": "^9.0.0-beta.20",
9
+ "@praxisui/core": "^9.0.0-beta.20",
10
+ "@praxisui/dynamic-fields": "^9.0.0-beta.20",
11
+ "@praxisui/dynamic-form": "^9.0.0-beta.20",
12
+ "@praxisui/metadata-editor": "^9.0.0-beta.20",
13
+ "@praxisui/rich-content": "^9.0.0-beta.20",
14
+ "@praxisui/settings-panel": "^9.0.0-beta.20",
15
+ "@praxisui/table-rule-builder": "^9.0.0-beta.20",
16
16
  "@angular/cdk": "^21.0.0",
17
17
  "@angular/forms": "^21.0.0",
18
18
  "@angular/material": "^21.0.0",
19
19
  "@angular/router": "^21.0.0",
20
- "@praxisui/dialog": "^9.0.0-beta.2",
20
+ "@praxisui/dialog": "^9.0.0-beta.20",
21
21
  "rxjs": "~7.8.0"
22
22
  },
23
23
  "dependencies": {
@@ -27,17 +27,11 @@
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
- "repository": {
31
- "type": "git",
32
- "url": "git+https://github.com/codexrodrigues/praxis-ui-angular.git"
33
- },
34
- "homepage": "https://praxisui.dev",
35
- "bugs": {
36
- "url": "https://github.com/codexrodrigues/praxis-ui-angular/issues"
37
- },
30
+ "homepage": "https://praxisui.dev/components/table",
38
31
  "keywords": [
39
32
  "angular",
40
33
  "praxisui",
34
+ "praxis",
41
35
  "table",
42
36
  "data-grid",
43
37
  "filtering",
@@ -58,7 +52,10 @@
58
52
  "./filter-drawer-adapter": {
59
53
  "types": "./types/praxisui-table-filter-drawer-adapter.d.ts",
60
54
  "default": "./fesm2022/praxisui-table-filter-drawer-adapter.mjs"
55
+ },
56
+ "./ai/component-registry.json": {
57
+ "default": "./ai/component-registry.json"
61
58
  }
62
59
  },
63
60
  "type": "module"
64
- }
61
+ }
@@ -37,9 +37,9 @@ source_of_truth:
37
37
  - "projects/praxis-core/src/lib/tokens/global-action.catalog.ts"
38
38
  - "projects/praxis-core/src/lib/models/global-action.model.ts"
39
39
  - "projects/praxis-core/src/lib/actions/global-action-ui.ts"
40
- source_of_truth_last_verified: "2026-03-05"
40
+ source_of_truth_last_verified: "2026-06-24"
41
41
  publish_source_of_truth: false
42
- last_updated: "2026-03-05"
42
+ last_updated: "2026-06-24"
43
43
  toc: true
44
44
  sidebar: true
45
45
  tags:
@@ -92,6 +92,13 @@ Este documento e a referencia canonica da API JSON de praxis-table.
92
92
  - Para exportar apenas a selecao, combine `behavior.selection.enabled`, `config.export.general.scope: "selected"` e uma bulk action visivel apenas quando `selectedCount > 0`.
93
93
  - Quando `config.export.general.scope` e `"selected"`, a exportacao sem linhas selecionadas e bloqueada com feedback de usuario em vez de gerar um arquivo vazio.
94
94
 
95
+ ## AI assistant entrypoint
96
+
97
+ - `config.ai.assistant.enabled` controla a visibilidade e o acionamento do assistente de IA embarcado na tabela.
98
+ - Ausencia do campo equivale ao comportamento historico: o entrypoint continua disponivel quando o adapter de IA da tabela estiver carregado.
99
+ - Use `false` para surfaces em que o host precisa remover a acao de IA por contrato publico, sem CSS contra classes internas da tabela ou do Angular Material.
100
+ - Ao mudar para `false`, a tabela fecha o assistente e remove a sessao contextual da tabela no registry compartilhado de IA.
101
+
95
102
  ## Columns visibility dropdown
96
103
 
97
104
  - `config.toolbar.columnsVisibility.enabled` controla a exibição do botão de visibilidade de colunas na barra de ferramentas.
@@ -331,6 +338,9 @@ Este arquivo foi adaptado para o padrao canonico atual sem remover conteudo tecn
331
338
  | `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[]`. |
332
339
  | `columns[].renderer` | object | No | field-type-driven | renderer-contract | Renderers condicionais, payload expr e ações interativas. |
333
340
 
341
+ Renderer defaults:
342
+ - `columns[].renderer.type = "avatar"` aplica `columns[].align = "center"` quando a coluna não declara alinhamento explícito. Esse default governa header e célula para manter foto/avatar centralizados em colunas dedicadas, preservando `align`, `width` e demais overrides declarados pelo host.
343
+
334
344
  ### Toolbar contract
335
345
 
336
346
  - Acoes globais de toolbar, row e bulk usam `effects[].kind = "global-action"` como envelope canonico de novo authoring.
@@ -365,7 +375,7 @@ Este arquivo foi adaptado para o padrao canonico atual sem remover conteudo tecn
365
375
  | `icon` | `string` | No | component-input | host-surface passthrough | Ícone opcional usado em affordances auxiliares do runtime. |
366
376
  | `autoDelete` | `boolean` | No | component-input | boolean coercion | Ativa deleção automática quando o host delega esse fluxo ao runtime. |
367
377
  | `enableCustomization` | `boolean` | No | component-input | boolean coercion | Controla entrada em editor/configuração; default canônico `false`. |
368
- | `dense` | `boolean` | No | component-input | boolean coercion | Força modo compacto quando o host precisa sobrepor densidade do contrato. |
378
+ | `dense` | `boolean` | No | component-input | boolean coercion | Entrada legada de compactação. Equivale a `appearance.density="compact"` apenas quando o contrato não informa `appearance.density`. |
369
379
  | `notifyIfOutdated` | `'inline' \| 'snackbar' \| 'both' \| 'none'` | No | component-input | enum validation + prefs fallback | Política de aviso de drift de schema; o host escolhe banner inline, snackbar, ambos ou silêncio explícito. |
370
380
  | `snoozeMs` | `number` | No | component-input | numeric fallback + prefs fallback | Janela de snooze para avisos de drift; default do input é `86400000` (24h) e políticas globais podem complementar. |
371
381
  | `autoOpenSettingsOnOutdated` | `boolean` | No | component-input | schema-prefs resolution | Abre automaticamente o settings panel quando drift de schema é detectado. |
@@ -944,7 +954,10 @@ row selection through table affordances.
944
954
  | `--p-table-row-even-bg` | zebra row |
945
955
  | `--p-table-row-hover-bg` | hover row |
946
956
  | `--p-table-row-selected-bg` | row selecionada |
957
+ | `--p-table-row-height` | altura da linha; sobrescreve o default do preset de densidade |
958
+ | `--p-table-header-height` | altura do header; sobrescreve o default do preset de densidade |
947
959
  | `--p-header-padding` | padding do header |
960
+ | `--p-cell-padding` | padding das células; sobrescreve o default do preset de densidade |
948
961
  | `--p-header-font-size` | fonte do header |
949
962
  | `--p-header-font-weight` | peso do header |
950
963
  | `--p-header-letter-spacing` | tracking do header |
@@ -966,6 +979,13 @@ row selection through table affordances.
966
979
  | `--p-table-drag-status-enter-duration` | duracao da entrada da mensagem visual de reorder |
967
980
  | `--p-actions-btn-size` | tamanho de botoes de acao |
968
981
  | `--p-actions-icon-size` | tamanho de icones de acao |
982
+ | `--p-table-paginator-container-min-height` | altura minima do paginator |
983
+ | `--p-table-paginator-container-padding` | padding do paginator |
984
+ | `--p-table-paginator-container-gap` | espaçamento entre controles do paginator |
985
+ | `--p-table-paginator-action-size` | tamanho dos botoes de navegacao do paginator |
986
+ | `--p-table-paginator-select-width` | largura do seletor de tamanho de pagina |
987
+ | `--p-table-paginator-select-height` | altura do seletor de tamanho de pagina |
988
+ | `--p-table-paginator-select-padding-inline` | padding horizontal do seletor de tamanho de pagina |
969
989
  | `--p-table-state-success-*` | tokens de estado success |
970
990
  | `--p-table-state-warning-*` | tokens de estado warning |
971
991
  | `--p-table-state-danger-*` | tokens de estado danger |
@@ -982,6 +1002,8 @@ row selection through table affordances.
982
1002
  | `pfx-column-drag-enabled` | habilita layout base de DnD de colunas |
983
1003
  | `pfx-column-drag-indicator` | habilita indicador visual de drag |
984
1004
 
1005
+ `appearance.density` seleciona apenas o preset de defaults. `appearance.spacing.*` e defaults globais também alimentam tokens `*-default`. Hosts podem redefinir livremente os tokens finais sem depender de seletores internos, por exemplo `--p-table-row-height`, `--p-table-header-height`, `--p-cell-padding`, `--p-actions-btn-size` e `--p-table-paginator-select-height`. Em virtualização sem `itemHeight` explícito, o runtime deriva a altura da densidade efetiva.
1006
+
985
1007
  #### DnD classes (globais)
986
1008
  | Classe CSS | Escopo | Efeito |
987
1009
  | --- | --- | --- |
@@ -1,5 +1,5 @@
1
1
  import * as _praxisui_core from '@praxisui/core';
2
- import { TableToolbarAppearanceConfig, TableConfig, LoggerService, PraxisI18nService, TableToolbarAppearanceVariant, TableToolbarAppearanceDensity, TableToolbarAppearanceShape, TableToolbarAppearanceDivider, TableToolbarTokenName, GlobalConfigService, AsyncConfigStorage, ApiUrlEntry, FieldMetadata, SchemaIdParams, FormConfig, GenericCrudService, DynamicFormService, SchemaNormalizerService, ComponentKeyService, ComponentDocMeta, PraxisTextValue, PraxisAnalyticsProjection, PraxisDataQueryContext, ApiUrlConfig, PraxisQueryFilterExpression, RecordRelatedSurfaceContextPack, LoadingState, RestApiLinks, ColumnDefinition, RichBlockNode, ResourceCapabilityDigest, ConnectionStorage, LoadingOrchestrator, GlobalActionService, PraxisLoadingRenderer, PraxisRuntimeComponentObservationEnvelope, TableDetailRichListNode, TableDetailCardGridNode, TableDetailCardGridCardNode, TableDetailTimelineNode, JsonLogicDataRecord, TableDetailListItemAction, TableDetailActionBarNode, TableDetailActionBarAction, TableDetailRefNode, TableDetailTemplateRefNode, TableDetailDiagramEmbedNode, TableDetailEmbedAction, PraxisExportScope, GlobalActionRef, PraxisRuntimeGlobalActionEffect, ResourceActionCatalogItem, ResourceSurfaceCatalogItem, JsonLogicExpression, GlobalActionCatalogEntry, IconPickerService, SurfaceOpenPayload, GlobalActionField, FieldDefinition, PraxisRuntimeConditionalEffectRule, PraxisJsonLogicService, TableConfigService, SettingsValueProvider as SettingsValueProvider$1, AnalyticsSchemaContractService, AnalyticsPresentationResolver, RichPresenterNode, RichComposeNode, ComponentAuthoringManifest, AiCapability, AiCapabilityCategory, AiValueKind, AiCapabilityCatalog } from '@praxisui/core';
2
+ import { TableToolbarAppearanceConfig, TableConfig, LoggerService, PraxisI18nService, TableToolbarAppearanceVariant, TableToolbarAppearanceDensity, TableToolbarAppearanceShape, TableToolbarAppearanceDivider, TableToolbarTokenName, GlobalConfigService, AsyncConfigStorage, LocalStorageConfigService, ApiUrlEntry, FieldMetadata, SchemaIdParams, FormConfig, GenericCrudService, DynamicFormService, SchemaNormalizerService, ComponentKeyService, ComponentDocMeta, PraxisTextValue, PraxisAnalyticsProjection, PraxisDataQueryContext, ApiUrlConfig, PraxisQueryFilterExpression, RecordRelatedSurfaceContextPack, LoadingState, RestApiLinks, ColumnDefinition, RichBlockNode, ResourceCapabilityDigest, ConnectionStorage, LoadingOrchestrator, GlobalActionService, PraxisLoadingRenderer, PraxisRuntimeComponentObservationEnvelope, TableDetailRichListNode, TableDetailCardGridNode, TableDetailCardGridCardNode, TableDetailTimelineNode, JsonLogicDataRecord, TableDetailListItemAction, TableDetailActionBarNode, TableDetailActionBarAction, TableDetailRefNode, TableDetailTemplateRefNode, TableDetailDiagramEmbedNode, TableDetailEmbedAction, PraxisExportScope, GlobalActionRef, PraxisRuntimeGlobalActionEffect, ResourceActionCatalogItem, ResourceSurfaceCatalogItem, JsonLogicExpression, GlobalActionCatalogEntry, IconPickerService, SurfaceOpenPayload, GlobalActionField, FieldDefinition, PraxisRuntimeConditionalEffectRule, PraxisJsonLogicService, TableConfigService, SettingsValueProvider as SettingsValueProvider$1, AnalyticsSchemaContractService, AnalyticsPresentationResolver, RichPresenterNode, RichComposeNode, ComponentAuthoringManifest, AiCapability, AiCapabilityCategory, AiValueKind, AiCapabilityCatalog } from '@praxisui/core';
3
3
  import * as i0 from '@angular/core';
4
4
  import { InjectionToken, OnDestroy, EventEmitter, ElementRef, Provider, OnInit, OnChanges, AfterViewInit, DoCheck, DestroyRef, ChangeDetectorRef, NgZone, SimpleChanges, ComponentRef, AfterContentInit, Injector } from '@angular/core';
5
5
  import { ActivatedRoute } from '@angular/router';
@@ -95,6 +95,7 @@ declare class PraxisTableToolbar implements OnDestroy {
95
95
  getMoreActionsLabel(): string;
96
96
  emitExportAction(event: Event, format: string): void;
97
97
  getColumnsVisibilityLabel(): string;
98
+ getColumnsVisibilityIcon(): string;
98
99
  isColumnsVisibilityEnabled(): boolean;
99
100
  getVisibleColumnsCount(): number;
100
101
  isColumnVisibilityToggleDisabled(column: {
@@ -359,8 +360,9 @@ type FilterConfig = {
359
360
  };
360
361
  declare class FilterConfigService {
361
362
  private storage;
363
+ private localStorage;
362
364
  private readonly PREFIX;
363
- constructor(storage: AsyncConfigStorage);
365
+ constructor(storage: AsyncConfigStorage, localStorage: LocalStorageConfigService);
364
366
  /**
365
367
  * Load a persisted filter configuration for the given key.
366
368
  */
@@ -369,6 +371,11 @@ declare class FilterConfigService {
369
371
  * Persist a filter configuration for the given key.
370
372
  */
371
373
  save(key: string, config: FilterConfig): void;
374
+ /**
375
+ * Clear the persisted filter configuration from both remote storage and the
376
+ * local fallback cache so reset/reopen cannot revive stale preferences.
377
+ */
378
+ clear(key: string): void;
372
379
  static ɵfac: i0.ɵɵFactoryDeclaration<FilterConfigService, never>;
373
380
  static ɵprov: i0.ɵɵInjectableDeclaration<FilterConfigService>;
374
381
  }
@@ -651,6 +658,7 @@ declare class PraxisFilter implements OnInit, OnChanges, AfterViewInit, OnDestro
651
658
  private resolveInitialDto;
652
659
  private syncFormsFromDto;
653
660
  private refreshProgrammaticFilterFieldDisplays;
661
+ private getProgrammaticRefreshFieldNames;
654
662
  private refreshProgrammaticFilterFieldDisplay;
655
663
  ngOnInit(): Promise<void>;
656
664
  ngAfterViewInit(): void;
@@ -1251,6 +1259,9 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
1251
1259
  set resolvedPrefs(val: any);
1252
1260
  get resolvedPrefs(): any;
1253
1261
  dense: boolean;
1262
+ private hostDeclaredAppearanceDensity;
1263
+ private hostDeclaredAppearanceSpacing;
1264
+ private hostDeclaredAppearanceTypography;
1254
1265
  private resolveAppearanceDensity;
1255
1266
  get hostDensityCompactClass(): boolean;
1256
1267
  get hostDensityComfortableClass(): boolean;
@@ -1339,6 +1350,9 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
1339
1350
  private tableConfigKey;
1340
1351
  private filterConfigKey;
1341
1352
  private ensureConfigDefaults;
1353
+ private hasDeclaredAppearanceDensity;
1354
+ private hasDeclaredAppearanceSection;
1355
+ private shouldApplyAppearanceDefaultValue;
1342
1356
  private mergePersistedTableConfigWithInput;
1343
1357
  private reconcileHostDeclaredTableContract;
1344
1358
  private reconcileHostDeclaredColumns;
@@ -1361,6 +1375,8 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
1361
1375
  aiAssistantTriggerBadge(): string;
1362
1376
  aiAssistantTriggerLabel(): string;
1363
1377
  aiAssistantTriggerTooltip(): string;
1378
+ isAiAssistantEnabled(): boolean;
1379
+ shouldShowAiAssistantEntrypoint(): boolean;
1364
1380
  openAiAssistantFromSession(session: PraxisAssistantSessionSnapshot): void;
1365
1381
  closeAiAssistant(): void;
1366
1382
  onAiAssistantPromptChange(prompt: string): void;
@@ -1404,6 +1420,7 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
1404
1420
  private buildRuntimeObservationClaims;
1405
1421
  private isRuntimeObservationVisible;
1406
1422
  private syncAiAssistantSession;
1423
+ private disableAiAssistantSession;
1407
1424
  private assistantContextRuntimeLocale;
1408
1425
  private refreshAiAssistantContextAfterSelectionChange;
1409
1426
  private hasAiAssistantSessionState;
@@ -1718,6 +1735,7 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
1718
1735
  private resolveSortingStrategy;
1719
1736
  private applyDataSourceSettings;
1720
1737
  private sanitizeColumns;
1738
+ private applyRendererPresentationDefaults;
1721
1739
  private setupColumns;
1722
1740
  private preserveSchemaDrivenColumnsIfConfigOmittedColumns;
1723
1741
  private isDataColumnField;
@@ -1781,10 +1799,6 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
1781
1799
  * Runs only on initial bootstrap (when columns are derived from schema).
1782
1800
  */
1783
1801
  private applyAutoRenderer;
1784
- /**
1785
- * Check if a value is a valid ColumnDataType
1786
- */
1787
- private isValidColumnDataType;
1788
1802
  /**
1789
1803
  * Infer column data type from field name patterns when API type is not available
1790
1804
  * Refined logic to reduce false positives
@@ -2161,6 +2175,7 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
2161
2175
  private getVirtualizationSources;
2162
2176
  isVirtualized(): boolean;
2163
2177
  getVirtItemHeight(): number;
2178
+ private getDefaultDensityRowHeight;
2164
2179
  getVirtBufferSize(): number;
2165
2180
  getVirtMinHeightStyle(): string;
2166
2181
  getVirtMinHeightHostStyle(): string | null;
@@ -3108,6 +3123,7 @@ declare class FilterSettingsComponent implements OnChanges, AfterViewInit, OnDes
3108
3123
  private scrollTrackingRafId;
3109
3124
  readonly layoutPreviewFields: string[];
3110
3125
  private readonly storage;
3126
+ private readonly filterConfigService;
3111
3127
  private readonly settingsPanel;
3112
3128
  private readonly snackBar;
3113
3129
  private readonly destroyRef;