@praxisui/table 8.0.0-beta.93 → 8.0.0-beta.95

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.
@@ -126,8 +126,8 @@ const PRAXIS_TABLE_RUNTIME_I18N_CONFIG = {
126
126
  'table.assistant.recommendation.globalNavigation.description': 'Conecta a tabela a rotas ou páginas publicadas pelo host.',
127
127
  'table.assistant.recommendation.globalNavigation.prompt': 'Mostre quais ações globais de navegação podem ser adicionadas nesta tabela.',
128
128
  'table.assistant.recommendation.selection.label': 'Analisar selecionados',
129
- 'table.assistant.recommendation.selection.description': 'Compara os registros marcados e sugere filtros, ranges ou ações compatíveis.',
130
- 'table.assistant.recommendation.selection.prompt': 'Analise os registros selecionados e sugira as próximas ações úteis para esta tabela.',
129
+ 'table.assistant.recommendation.selection.description': 'Resume semelhanças, diferenças e próximos caminhos sem alterar a tabela automaticamente.',
130
+ 'table.assistant.recommendation.selection.prompt': 'Analise os registros selecionados e responda em linguagem natural: o que eles têm em comum, quais diferenças importam e quais próximos caminhos seriam úteis. Não aplique alterações sem um pedido explícito.',
131
131
  'table.assistant.recommendation.capabilityDiscovery.label': 'Ver recursos recomendados',
132
132
  'table.assistant.recommendation.capabilityDiscovery.description': 'Analisa configuração, colunas e dados para sugerir os próximos ajustes úteis.',
133
133
  'table.assistant.recommendation.capabilityDiscovery.prompt': 'Analise esta tabela, suas configurações atuais, colunas e dados disponíveis, e recomende os recursos mais úteis para aplicar agora.',
@@ -39947,7 +39947,7 @@ class PraxisTable {
39947
39947
  if (this.aiAdapter || this.aiAdapterLoadStarted)
39948
39948
  return;
39949
39949
  this.aiAdapterLoadStarted = true;
39950
- import('./praxisui-table-table-ai.adapter-BWnL5QfP.mjs')
39950
+ import('./praxisui-table-table-ai.adapter-t9FU2DZc.mjs')
39951
39951
  .then(({ TableAiAdapter }) => {
39952
39952
  this.aiAdapter = new TableAiAdapter(this);
39953
39953
  this.initializeAiAssistantController();
@@ -40256,7 +40256,7 @@ class PraxisTable {
40256
40256
  intents.push({
40257
40257
  id: 'table-analyze-selection',
40258
40258
  label: t('table.assistant.recommendation.selection.label', 'Analisar selecionados'),
40259
- description: t('table.assistant.recommendation.selection.description', 'Compara os registros marcados e sugere filtros, ranges ou ações compatíveis.'),
40259
+ description: t('table.assistant.recommendation.selection.description', 'Resume semelhanças, diferenças e próximos caminhos sem alterar a tabela automaticamente.'),
40260
40260
  group: {
40261
40261
  id: 'table-selection',
40262
40262
  label: t('table.assistant.recommendation.group.selection', 'Seleção'),
@@ -40265,10 +40265,15 @@ class PraxisTable {
40265
40265
  tone: 'success',
40266
40266
  action: {
40267
40267
  kind: 'submit-prompt',
40268
- prompt: t('table.assistant.recommendation.selection.prompt', 'Analise os registros selecionados e sugira as próximas ações úteis para esta tabela.'),
40268
+ prompt: t('table.assistant.recommendation.selection.prompt', 'Analise os registros selecionados e responda em linguagem natural: o que eles têm em comum, quais diferenças importam e quais próximos caminhos seriam úteis. Não aplique alterações sem um pedido explícito.'),
40269
40269
  contextHints: {
40270
40270
  source: 'table-opportunity-catalog',
40271
40271
  opportunityId: 'table.selection.analyze',
40272
+ authoringMode: 'table.selection.readonly-analysis',
40273
+ responseContract: {
40274
+ preferredResponse: 'info',
40275
+ mutatesTable: false,
40276
+ },
40272
40277
  target: { kind: 'component', id: tableContext.tableId },
40273
40278
  componentState: tableContext,
40274
40279
  selectedRecordsContext: this.getAiAssistantSelectedRowsContext(),
@@ -40561,7 +40566,7 @@ class PraxisTable {
40561
40566
  initializeAiAssistantController() {
40562
40567
  if (!this.aiAdapter || this.aiAssistantController)
40563
40568
  return;
40564
- import('./praxisui-table-table-agentic-authoring-turn-flow-DUu4AIDF.mjs')
40569
+ import('./praxisui-table-table-agentic-authoring-turn-flow-CWeXfMs8.mjs')
40565
40570
  .then(({ TableAgenticAuthoringTurnFlow }) => {
40566
40571
  if (this.aiAssistantController || !this.aiAdapter)
40567
40572
  return;
@@ -1525,9 +1525,18 @@ class TableAgenticAuthoringTurnFlow {
1525
1525
  'render',
1526
1526
  'oculta',
1527
1527
  'ocultar',
1528
+ 'oculte',
1528
1529
  'esconde',
1529
1530
  'exibe',
1530
1531
  'mostra coluna',
1532
+ 'nova coluna',
1533
+ 'coluna calculada',
1534
+ 'junta',
1535
+ 'junte',
1536
+ 'juntar',
1537
+ 'unir',
1538
+ 'combinar',
1539
+ 'mesclar',
1531
1540
  'adiciona botao',
1532
1541
  'botao',
1533
1542
  ].some((token) => normalizedPrompt.includes(this.normalizeLabel(token)));
@@ -3810,10 +3819,7 @@ class TableAgenticAuthoringTurnFlow {
3810
3819
  .find((candidate) => this.stringValue(candidate['field']) === normalizedField) ?? null;
3811
3820
  }
3812
3821
  selectedRecordFilterCandidates(contextHints) {
3813
- const authoringContract = this.toRecord(contextHints?.['authoringContract']);
3814
- const consultativeContext = this.toRecord(authoringContract?.['consultativeContext']);
3815
- const selectedRecordsContext = this.toRecord(consultativeContext?.['selectedRecordsContext'])
3816
- ?? this.toRecord(contextHints?.['selectedRecordsContext']);
3822
+ const selectedRecordsContext = this.selectedRecordsContextRecord(contextHints);
3817
3823
  const candidates = Array.isArray(selectedRecordsContext?.['filterCandidates'])
3818
3824
  ? selectedRecordsContext['filterCandidates']
3819
3825
  : [];
@@ -3822,10 +3828,7 @@ class TableAgenticAuthoringTurnFlow {
3822
3828
  .filter((candidate) => !!candidate);
3823
3829
  }
3824
3830
  selectedRecordSampleRows(contextHints) {
3825
- const authoringContract = this.toRecord(contextHints?.['authoringContract']);
3826
- const consultativeContext = this.toRecord(authoringContract?.['consultativeContext']);
3827
- const selectedRecordsContext = this.toRecord(consultativeContext?.['selectedRecordsContext'])
3828
- ?? this.toRecord(contextHints?.['selectedRecordsContext']);
3831
+ const selectedRecordsContext = this.selectedRecordsContextRecord(contextHints);
3829
3832
  const sampleRows = Array.isArray(selectedRecordsContext?.['sampleRows'])
3830
3833
  ? selectedRecordsContext['sampleRows']
3831
3834
  : [];
@@ -3833,6 +3836,12 @@ class TableAgenticAuthoringTurnFlow {
3833
3836
  .map((row) => this.toRecord(row))
3834
3837
  .filter((row) => !!row);
3835
3838
  }
3839
+ selectedRecordsContextRecord(contextHints) {
3840
+ const authoringContract = this.toRecord(contextHints?.['authoringContract']);
3841
+ const consultativeContext = this.toRecord(authoringContract?.['consultativeContext']);
3842
+ return this.toRecord(consultativeContext?.['selectedRecordsContext'])
3843
+ ?? this.toRecord(contextHints?.['selectedRecordsContext']);
3844
+ }
3836
3845
  selectedRecordFilterClarificationOptionPayload(entry, contextHints) {
3837
3846
  const description = this.selectedRecordFilterCandidateDescription(entry.name, contextHints);
3838
3847
  return {
@@ -7960,6 +7969,7 @@ class TableAgenticAuthoringTurnFlow {
7960
7969
  withCapabilitySystemMessages(messages, contextHints, prompt = '') {
7961
7970
  const policies = [
7962
7971
  this.buildRecommendedCapabilitiesSystemPolicy(contextHints),
7972
+ this.buildSelectedRecordsAnalysisSystemPolicy(contextHints),
7963
7973
  this.buildComponentPresentationAuthoringSystemPolicy(contextHints, prompt),
7964
7974
  this.buildComponentLayoutAuthoringSystemPolicy(contextHints, prompt),
7965
7975
  this.buildFilterExpressionSystemPolicy(contextHints),
@@ -7967,6 +7977,40 @@ class TableAgenticAuthoringTurnFlow {
7967
7977
  ].filter((message) => !!message);
7968
7978
  return policies.length ? [...policies, ...messages] : messages;
7969
7979
  }
7980
+ buildSelectedRecordsAnalysisSystemPolicy(contextHints) {
7981
+ const selectedRecordsContext = this.selectedRecordsContextRecord(contextHints);
7982
+ if (!selectedRecordsContext)
7983
+ return null;
7984
+ const selectedCount = this.numberValue(selectedRecordsContext['selectedCount']);
7985
+ const sampleRows = Array.isArray(selectedRecordsContext['sampleRows'])
7986
+ ? selectedRecordsContext['sampleRows']
7987
+ : [];
7988
+ if ((!selectedCount || selectedCount <= 0) && !sampleRows.length)
7989
+ return null;
7990
+ const fields = Array.isArray(selectedRecordsContext['fields'])
7991
+ ? selectedRecordsContext['fields'].map((field) => this.stringValue(field)).filter((field) => !!field)
7992
+ : [];
7993
+ const candidateLabels = Array.isArray(selectedRecordsContext['filterCandidates'])
7994
+ ? selectedRecordsContext['filterCandidates']
7995
+ .map((candidate) => this.stringValue(this.toRecord(candidate)?.['label']))
7996
+ .filter((label) => !!label)
7997
+ .slice(0, 8)
7998
+ : [];
7999
+ return {
8000
+ role: 'system',
8001
+ content: [
8002
+ 'Praxis table selected-record analysis policy:',
8003
+ '- selectedRecordsContext is a governed read-only grounding source for questions about the currently selected records.',
8004
+ '- When the user asks to understand, summarize, compare, inspect, explain, rank, or identify commonalities/differences in selected records, return type "info" with a human analytical answer grounded in selectedRecordsContext.sampleRows. Do not return componentEditPlan, table.filter.apply, export, or row-action operations for that consultative question.',
8005
+ '- Only materialize table changes, filters, exports, navigation, or row actions when the user explicitly asks to apply/configure/create/open/export something. Otherwise, answer first and optionally mention next actions as suggestions.',
8006
+ '- If the selected sample rows are insufficient to answer a business question, explain the missing data succinctly instead of converting the question into a selected-record filter clarification.',
8007
+ '- Keep the answer human-facing: use visible labels and values; do not expose raw ids, endpoint paths, operationIds, schema keys, or payload examples unless the user asks for technical details.',
8008
+ `Selected records declared count: ${selectedCount ?? sampleRows.length}.`,
8009
+ fields.length ? `Selected record fields: ${fields.join(', ')}.` : 'Selected record fields: inferred from sampleRows.',
8010
+ candidateLabels.length ? `Selection-derived filter candidates available for explicit filter requests: ${candidateLabels.join(', ')}.` : 'Selection-derived filter candidates available for explicit filter requests: none declared.',
8011
+ ].join('\n'),
8012
+ };
8013
+ }
7970
8014
  buildRecommendedCapabilitiesSystemPolicy(contextHints) {
7971
8015
  const recommendedIntent = this.toRecord(contextHints?.['recommendedIntent']);
7972
8016
  const intentId = this.stringValue(recommendedIntent?.['id'])
@@ -8105,6 +8149,7 @@ class TableAgenticAuthoringTurnFlow {
8105
8149
  '- Use the declared filterFieldCatalog as the canonical grounding for row filtering decisions.',
8106
8150
  '- When the user asks to restrict, search, list, show only, compare values, define ranges, or filter rows, prefer a table.filter.apply runtime operation over visual renderer or column formatting operations.',
8107
8151
  ...(this.promptRequestsVisualOrStructuralEdit(normalizedPrompt)
8152
+ || this.promptRequestsCompoundColumnPresentationEdit(normalizedPrompt)
8108
8153
  ? ['- This turn contains an explicit visual or structural table-edit signal; do not reinterpret that signal as a row filter unless the user also explicitly asks to restrict table rows.']
8109
8154
  : []),
8110
8155
  '- For numeric and date comparisons, use the declared range filter field from filterFieldCatalog instead of the raw listing column field.',
@@ -8255,6 +8300,11 @@ class TableAgenticAuthoringTurnFlow {
8255
8300
  normalizeSelectedRecordFilterClarification(response, request) {
8256
8301
  if (response.type !== 'clarification' || this.selectedRecordsCountForTurn <= 0)
8257
8302
  return null;
8303
+ const normalizedPrompt = this.normalizeLabel(request?.prompt ?? '');
8304
+ if (this.promptRequestsVisualOrStructuralEdit(normalizedPrompt)
8305
+ || this.promptRequestsCompoundColumnPresentationEdit(normalizedPrompt)) {
8306
+ return null;
8307
+ }
8258
8308
  const contextHints = this.contextHintsFor(request);
8259
8309
  const candidates = this.selectedRecordFilterCandidates(contextHints);
8260
8310
  if (!candidates.length)
@@ -1,7 +1,7 @@
1
1
  import { firstValueFrom } from 'rxjs';
2
2
  import { BaseAiAdapter, 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-DXpnCND9.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-D0NRZNEo.mjs';
5
5
 
6
6
  const TABLE_COMPONENT_CONTEXT_PACK = {
7
7
  version: 'v1',
@@ -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-DXpnCND9.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-D0NRZNEo.mjs';
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@praxisui/table",
3
- "version": "8.0.0-beta.93",
3
+ "version": "8.0.0-beta.95",
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": "^8.0.0-beta.93",
9
- "@praxisui/core": "^8.0.0-beta.93",
10
- "@praxisui/dynamic-fields": "^8.0.0-beta.93",
11
- "@praxisui/dynamic-form": "^8.0.0-beta.93",
12
- "@praxisui/metadata-editor": "^8.0.0-beta.93",
13
- "@praxisui/rich-content": "^8.0.0-beta.93",
14
- "@praxisui/settings-panel": "^8.0.0-beta.93",
15
- "@praxisui/table-rule-builder": "^8.0.0-beta.93",
8
+ "@praxisui/ai": "^8.0.0-beta.95",
9
+ "@praxisui/core": "^8.0.0-beta.95",
10
+ "@praxisui/dynamic-fields": "^8.0.0-beta.95",
11
+ "@praxisui/dynamic-form": "^8.0.0-beta.95",
12
+ "@praxisui/metadata-editor": "^8.0.0-beta.95",
13
+ "@praxisui/rich-content": "^8.0.0-beta.95",
14
+ "@praxisui/settings-panel": "^8.0.0-beta.95",
15
+ "@praxisui/table-rule-builder": "^8.0.0-beta.95",
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": "^8.0.0-beta.93",
20
+ "@praxisui/dialog": "^8.0.0-beta.95",
21
21
  "rxjs": "~7.8.0"
22
22
  },
23
23
  "dependencies": {