@praxisui/table 8.0.0-beta.77 → 8.0.0-beta.79

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.
@@ -39578,7 +39578,7 @@ class PraxisTable {
39578
39578
  if (this.aiAdapter || this.aiAdapterLoadStarted)
39579
39579
  return;
39580
39580
  this.aiAdapterLoadStarted = true;
39581
- import('./praxisui-table-table-ai.adapter-uGmLaI9F.mjs')
39581
+ import('./praxisui-table-table-ai.adapter-xYd8P_-p.mjs')
39582
39582
  .then(({ TableAiAdapter }) => {
39583
39583
  this.aiAdapter = new TableAiAdapter(this);
39584
39584
  this.initializeAiAssistantController();
@@ -39760,7 +39760,7 @@ class PraxisTable {
39760
39760
  initializeAiAssistantController() {
39761
39761
  if (!this.aiAdapter || this.aiAssistantController)
39762
39762
  return;
39763
- import('./praxisui-table-table-agentic-authoring-turn-flow-CmfIj9ao.mjs')
39763
+ import('./praxisui-table-table-agentic-authoring-turn-flow-DtH4XP12.mjs')
39764
39764
  .then(({ TableAgenticAuthoringTurnFlow }) => {
39765
39765
  if (this.aiAssistantController || !this.aiAdapter)
39766
39766
  return;
@@ -580,6 +580,10 @@ class TableAgenticAuthoringTurnFlow {
580
580
  warnings: compiledExecutable.warnings,
581
581
  };
582
582
  }
583
+ const continuedSurfaceRuntimeOperation = this.selectedRecordSurfaceRuntimeOperationForInfo(response, request);
584
+ if (continuedSurfaceRuntimeOperation) {
585
+ return continuedSurfaceRuntimeOperation;
586
+ }
583
587
  const continuedSurfaceRowAction = this.selectedRecordSurfaceRowActionPlanForClarification(response, request);
584
588
  if (continuedSurfaceRowAction) {
585
589
  return this.compileAdapterResponse(continuedSurfaceRowAction, request);
@@ -985,6 +989,67 @@ class TableAgenticAuthoringTurnFlow {
985
989
  ],
986
990
  };
987
991
  }
992
+ selectedRecordSurfaceRuntimeOperationForInfo(response, request) {
993
+ if (response.type !== 'info' || !request)
994
+ return null;
995
+ const normalizedPrompt = this.normalizeLabel(request.prompt ?? '');
996
+ if (!this.textMentionsRecordSurfaceOpenRequest(normalizedPrompt))
997
+ return null;
998
+ const responseText = this.normalizeLabel([
999
+ response.message ?? '',
1000
+ response.explanation ?? '',
1001
+ ].join(' '));
1002
+ if (!this.textMentionsSurfaceOpenCommitment(responseText))
1003
+ return null;
1004
+ const contextHints = this.contextHintsFor(request);
1005
+ const surfaces = this.selectedRecordSurfaces(contextHints);
1006
+ if (!surfaces.length)
1007
+ return null;
1008
+ const ranked = surfaces
1009
+ .map((surface) => ({
1010
+ surface,
1011
+ score: this.selectedRecordSurfacePromptScore(`${normalizedPrompt} ${responseText}`, surface),
1012
+ }))
1013
+ .filter((entry) => entry.score >= 2)
1014
+ .sort((left, right) => right.score - left.score);
1015
+ if (!ranked.length || (ranked.length > 1 && ranked[0].score === ranked[1].score)) {
1016
+ return null;
1017
+ }
1018
+ const surface = ranked[0].surface;
1019
+ const surfaceId = this.stringValue(surface['id']);
1020
+ if (!surfaceId)
1021
+ return null;
1022
+ const resourceSurface = this.toRecord(surface['resourceSurface']);
1023
+ const surfaceLabel = this.stringValue(surface['label'])
1024
+ || this.stringValue(resourceSurface?.['title'])
1025
+ || this.humanizeField(surfaceId);
1026
+ // Residual continuity guard: this runs only after the LLM already resolved
1027
+ // a declared recordSurface in an info answer but failed to emit the runtime
1028
+ // operation required by the user request. Ranking uses the governed
1029
+ // recordSurfaces catalog plus the LLM-authored answer, not primary local
1030
+ // command routing.
1031
+ return {
1032
+ type: 'patch',
1033
+ patch: {
1034
+ tableRuntimeOperations: {
1035
+ source: 'selected-record-surface-info-continuity-guard',
1036
+ operations: [{
1037
+ operationId: 'dynamicPage.surface.open',
1038
+ input: {
1039
+ surfaceId,
1040
+ surfaceLabel,
1041
+ source: 'selected-records',
1042
+ },
1043
+ }],
1044
+ },
1045
+ },
1046
+ explanation: `Vou abrir a superfície relacionada ${surfaceLabel}.`,
1047
+ warnings: [
1048
+ 'selected-record-surface-info-continued-to-runtime-operation',
1049
+ 'Residual continuity guard acted only after LLM resolved a declared recordSurface in an info answer without emitting the required runtime operation.',
1050
+ ],
1051
+ };
1052
+ }
988
1053
  selectedRecordSurfaceRowActionClarificationKind(response) {
989
1054
  const text = this.normalizeLabel([
990
1055
  response.message ?? '',
@@ -1024,6 +1089,31 @@ class TableAgenticAuthoringTurnFlow {
1024
1089
  'em cada linha',
1025
1090
  ].some((needle) => normalizedText.includes(needle));
1026
1091
  }
1092
+ textMentionsRecordSurfaceOpenRequest(normalizedText) {
1093
+ return [
1094
+ 'abrir',
1095
+ 'abre',
1096
+ 'abra',
1097
+ 'mostra',
1098
+ 'mostrar',
1099
+ 'mostre',
1100
+ 'exibir',
1101
+ 'exiba',
1102
+ 'ver',
1103
+ 'consulta',
1104
+ 'consultar',
1105
+ ].some((needle) => normalizedText.includes(needle));
1106
+ }
1107
+ textMentionsSurfaceOpenCommitment(normalizedText) {
1108
+ return [
1109
+ 'vou abrir',
1110
+ 'abrindo',
1111
+ 'abrir a superficie',
1112
+ 'abrir a superfície',
1113
+ 'superficie a abrir',
1114
+ 'superfície a abrir',
1115
+ ].some((needle) => normalizedText.includes(this.normalizeLabel(needle)));
1116
+ }
1027
1117
  isResourceSurfaceCatalogDigest(value) {
1028
1118
  if (!value)
1029
1119
  return false;
@@ -1,7 +1,7 @@
1
1
  import { firstValueFrom } from 'rxjs';
2
2
  import { BaseAiAdapter, createComponentAuthoringContext } from '@praxisui/ai';
3
3
  import { deepMerge } from '@praxisui/core';
4
- import { z as TABLE_COMPONENT_EDIT_PLAN_OPERATION_IDS, k as PRAXIS_TABLE_AUTHORING_MANIFEST, T as TABLE_AI_CAPABILITIES, R as coerceTableComponentEditPlans, W as compileTableComponentEditPlans, G as TASK_PRESETS, $ as getTableComponentEditPlanCapabilities, w as TABLE_COMPONENT_EDIT_PLAN_EXPECTED_PATHS, u as TABLE_COMPONENT_EDIT_PLAN_ALLOWED_CHANGE_KINDS, x as TABLE_COMPONENT_EDIT_PLAN_JSON_SCHEMA, E as TABLE_COMPONENT_EDIT_PLAN_VERSION, v as TABLE_COMPONENT_EDIT_PLAN_BATCH_KIND, y as TABLE_COMPONENT_EDIT_PLAN_KIND } from './praxisui-table-praxisui-table-CzZSCTe1.mjs';
4
+ import { z as TABLE_COMPONENT_EDIT_PLAN_OPERATION_IDS, k as PRAXIS_TABLE_AUTHORING_MANIFEST, T as TABLE_AI_CAPABILITIES, R as coerceTableComponentEditPlans, W as compileTableComponentEditPlans, G as TASK_PRESETS, $ as getTableComponentEditPlanCapabilities, w as TABLE_COMPONENT_EDIT_PLAN_EXPECTED_PATHS, u as TABLE_COMPONENT_EDIT_PLAN_ALLOWED_CHANGE_KINDS, x as TABLE_COMPONENT_EDIT_PLAN_JSON_SCHEMA, E as TABLE_COMPONENT_EDIT_PLAN_VERSION, v as TABLE_COMPONENT_EDIT_PLAN_BATCH_KIND, y as TABLE_COMPONENT_EDIT_PLAN_KIND } from './praxisui-table-praxisui-table-Mu4q753b.mjs';
5
5
 
6
6
  const TABLE_COMPONENT_CONTEXT_PACK = {
7
7
  version: 'v1',
@@ -2638,11 +2638,18 @@ class TableAiAdapter extends BaseAiAdapter {
2638
2638
  ?? nestedComponentEditPlan;
2639
2639
  const directOperation = this.toRecord(source['runtimeOperation']);
2640
2640
  const directOperations = Array.isArray(source['runtimeOperations']) ? source['runtimeOperations'] : null;
2641
- const operationCandidates = raw
2641
+ const directRuntimeOperation = this.isRuntimeOperationId(this.stringValue(source['operationId']))
2642
+ ? source
2643
+ : null;
2644
+ const operationCandidates = Array.isArray(raw?.['operations'])
2642
2645
  ? raw['operations']
2643
2646
  : directOperation
2644
2647
  ? [directOperation]
2645
- : directOperations;
2648
+ : directOperations
2649
+ ? directOperations
2650
+ : directRuntimeOperation
2651
+ ? [directRuntimeOperation]
2652
+ : null;
2646
2653
  if (!Array.isArray(operationCandidates))
2647
2654
  return null;
2648
2655
  const operations = operationCandidates
@@ -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 PraxisFilter, n as PraxisFilterWidgetConfigEditor, o as PraxisTable, p as PraxisTableConfigEditor, q as PraxisTableInlineAuthoringEditorComponent, r as PraxisTableToolbar, s as PraxisTableWidgetConfigEditor, S as STRING_PRESETS, T as TABLE_AI_CAPABILITIES, t as TABLE_COMPONENT_AI_CAPABILITIES, u as TABLE_COMPONENT_EDIT_PLAN_ALLOWED_CHANGE_KINDS, v as TABLE_COMPONENT_EDIT_PLAN_BATCH_KIND, w as TABLE_COMPONENT_EDIT_PLAN_EXPECTED_PATHS, x as TABLE_COMPONENT_EDIT_PLAN_JSON_SCHEMA, y as TABLE_COMPONENT_EDIT_PLAN_KIND, E as TABLE_COMPONENT_EDIT_PLAN_VERSION, G as TASK_PRESETS, H as TableDefaultsProvider, I as TableRulesEditorComponent, K as ToolbarActionsEditorComponent, V as ValueMappingEditorComponent, L as VisualFormulaBuilderComponent, O as buildTableApplyPlan, Q as coerceTableComponentEditPlan, R as coerceTableComponentEditPlans, U as compileTableComponentEditPlan, W as compileTableComponentEditPlans, X as createTableAuthoringDocument, Y as getActionId, Z as getEnum, _ as getTableCapabilities, $ as getTableComponentEditPlanCapabilities, a0 as isTableRendererSupportedByRichContentP0, a1 as mapTableRendererToRichContentP0, a2 as normalizeTableAuthoringDocument, a3 as parseLegacyOrTableDocument, a4 as providePraxisFilterMetadata, a5 as providePraxisTableMetadata, a6 as serializeTableAuthoringDocument, a7 as toCanonicalTableConfig, a8 as validateTableAuthoringDocument } from './praxisui-table-praxisui-table-CzZSCTe1.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 PraxisFilter, n as PraxisFilterWidgetConfigEditor, o as PraxisTable, p as PraxisTableConfigEditor, q as PraxisTableInlineAuthoringEditorComponent, r as PraxisTableToolbar, s as PraxisTableWidgetConfigEditor, S as STRING_PRESETS, T as TABLE_AI_CAPABILITIES, t as TABLE_COMPONENT_AI_CAPABILITIES, u as TABLE_COMPONENT_EDIT_PLAN_ALLOWED_CHANGE_KINDS, v as TABLE_COMPONENT_EDIT_PLAN_BATCH_KIND, w as TABLE_COMPONENT_EDIT_PLAN_EXPECTED_PATHS, x as TABLE_COMPONENT_EDIT_PLAN_JSON_SCHEMA, y as TABLE_COMPONENT_EDIT_PLAN_KIND, E as TABLE_COMPONENT_EDIT_PLAN_VERSION, G as TASK_PRESETS, H as TableDefaultsProvider, I as TableRulesEditorComponent, K as ToolbarActionsEditorComponent, V as ValueMappingEditorComponent, L as VisualFormulaBuilderComponent, O as buildTableApplyPlan, Q as coerceTableComponentEditPlan, R as coerceTableComponentEditPlans, U as compileTableComponentEditPlan, W as compileTableComponentEditPlans, X as createTableAuthoringDocument, Y as getActionId, Z as getEnum, _ as getTableCapabilities, $ as getTableComponentEditPlanCapabilities, a0 as isTableRendererSupportedByRichContentP0, a1 as mapTableRendererToRichContentP0, a2 as normalizeTableAuthoringDocument, a3 as parseLegacyOrTableDocument, a4 as providePraxisFilterMetadata, a5 as providePraxisTableMetadata, a6 as serializeTableAuthoringDocument, a7 as toCanonicalTableConfig, a8 as validateTableAuthoringDocument } from './praxisui-table-praxisui-table-Mu4q753b.mjs';
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@praxisui/table",
3
- "version": "8.0.0-beta.77",
3
+ "version": "8.0.0-beta.79",
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.77",
9
- "@praxisui/core": "^8.0.0-beta.77",
10
- "@praxisui/dynamic-fields": "^8.0.0-beta.77",
11
- "@praxisui/dynamic-form": "^8.0.0-beta.77",
12
- "@praxisui/metadata-editor": "^8.0.0-beta.77",
13
- "@praxisui/rich-content": "^8.0.0-beta.77",
14
- "@praxisui/settings-panel": "^8.0.0-beta.77",
15
- "@praxisui/table-rule-builder": "^8.0.0-beta.77",
8
+ "@praxisui/ai": "^8.0.0-beta.79",
9
+ "@praxisui/core": "^8.0.0-beta.79",
10
+ "@praxisui/dynamic-fields": "^8.0.0-beta.79",
11
+ "@praxisui/dynamic-form": "^8.0.0-beta.79",
12
+ "@praxisui/metadata-editor": "^8.0.0-beta.79",
13
+ "@praxisui/rich-content": "^8.0.0-beta.79",
14
+ "@praxisui/settings-panel": "^8.0.0-beta.79",
15
+ "@praxisui/table-rule-builder": "^8.0.0-beta.79",
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.77",
20
+ "@praxisui/dialog": "^8.0.0-beta.79",
21
21
  "rxjs": "~7.8.0"
22
22
  },
23
23
  "dependencies": {