@praxisui/table 8.0.0-beta.44 → 8.0.0-beta.46

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.
@@ -39407,7 +39407,7 @@ class PraxisTable {
39407
39407
  if (this.aiAdapter || this.aiAdapterLoadStarted)
39408
39408
  return;
39409
39409
  this.aiAdapterLoadStarted = true;
39410
- import('./praxisui-table-table-ai.adapter-BAQXQGnC.mjs')
39410
+ import('./praxisui-table-table-ai.adapter-ByuEEU1_.mjs')
39411
39411
  .then(({ TableAiAdapter }) => {
39412
39412
  this.aiAdapter = new TableAiAdapter(this);
39413
39413
  this.initializeAiAssistantController();
@@ -39557,7 +39557,7 @@ class PraxisTable {
39557
39557
  initializeAiAssistantController() {
39558
39558
  if (!this.aiAdapter || this.aiAssistantController)
39559
39559
  return;
39560
- import('./praxisui-table-table-agentic-authoring-turn-flow-BX1o6_il.mjs')
39560
+ import('./praxisui-table-table-agentic-authoring-turn-flow-Cvwa98Jb.mjs')
39561
39561
  .then(({ TableAgenticAuthoringTurnFlow }) => {
39562
39562
  if (this.aiAssistantController || !this.aiAdapter)
39563
39563
  return;
@@ -47,16 +47,7 @@ class TableAgenticAuthoringTurnFlow {
47
47
  this.selectedRecordFieldsForTurn = this.extractSelectedRecordFields(contextHints);
48
48
  this.selectedRecordsCountForTurn = this.extractSelectedRecordsCount(contextHints);
49
49
  this.filterExpressionSupportedForTurn = this.resolveFilterExpressionSupported(contextHints);
50
- const localResponse = this.selectedRecordMissingSelectionAnswer(request, contextHints)
51
- ?? this.selectedRecordExportOnlyRequest(request, contextHints)
52
- ?? this.selectedRecordSingleCandidateQuestionAnswer(request, contextHints)
53
- ?? this.selectedRecordFieldQuestionAnswer(request, contextHints)
54
- ?? this.selectedRecordMultiFieldQuestionAnswer(request, contextHints)
55
- ?? this.completeSelectedRecordFilterApplyRequest(request, contextHints)
56
- ?? this.selectedRecordCommonQuestionAnswer(request, contextHints)
57
- ?? this.completeSelectedRecordFilterClarification(request, contextHints)
58
- ?? this.selectedRecordMultipleFilterFieldClarification(request, contextHints)
59
- ?? this.selectedRecordSimilarityClarification(request, contextHints);
50
+ const localResponse = this.selectedRecordLocalResponse(request, contextHints);
60
51
  const messages = this.withCapabilitySystemMessages(this.toChatMessages(request.messages, prompt), contextHints);
61
52
  return {
62
53
  contextHints,
@@ -148,7 +139,9 @@ class TableAgenticAuthoringTurnFlow {
148
139
  try {
149
140
  emitProgress(this.buildSnapshotFallbackMessage(prompt, componentId));
150
141
  const result = await this.submitViaSnapshot(request, currentState, buildRequest);
151
- if (this.isProcessingTurnResult(result) && streamId && reconnectAttempts < this.streamTerminalReconnectLimit) {
142
+ if (this.isProcessingTurnResult(result)
143
+ && streamId
144
+ && reconnectAttempts < this.streamTerminalReconnectLimitFor(streamContextHints)) {
152
145
  subscriber.next(result);
153
146
  reconnectAttempts += 1;
154
147
  shouldClose = false;
@@ -180,7 +173,7 @@ class TableAgenticAuthoringTurnFlow {
180
173
  terminalWatchdog = setTimeout(() => {
181
174
  if (closed || !streamId)
182
175
  return;
183
- if (reconnectAttempts < this.streamTerminalReconnectLimit) {
176
+ if (reconnectAttempts < this.streamTerminalReconnectLimitFor(streamContextHints)) {
184
177
  reconnectAttempts += 1;
185
178
  emitProgress(this.buildStreamReplayMessage(prompt, componentId));
186
179
  openConnection();
@@ -201,7 +194,6 @@ class TableAgenticAuthoringTurnFlow {
201
194
  if (event?.eventId) {
202
195
  lastEventId = event.eventId;
203
196
  }
204
- armTerminalWatchdog();
205
197
  const terminal = this.toTerminalStreamResult(event, request, currentState);
206
198
  if (terminal) {
207
199
  subscriber.next(terminal);
@@ -210,13 +202,16 @@ class TableAgenticAuthoringTurnFlow {
210
202
  closeConnection();
211
203
  return;
212
204
  }
205
+ if (event.type !== 'heartbeat') {
206
+ armTerminalWatchdog();
207
+ }
213
208
  const progress = this.buildStreamProgressMessage(event.type, this.toRecord(event.payload) ?? {}, prompt, componentId);
214
209
  emitProgress(progress);
215
210
  },
216
211
  error: async () => {
217
212
  if (closed)
218
213
  return;
219
- if (streamId && reconnectAttempts < this.streamTerminalReconnectLimit) {
214
+ if (streamId && reconnectAttempts < this.streamTerminalReconnectLimitFor(streamContextHints)) {
220
215
  reconnectAttempts += 1;
221
216
  emitProgress(this.buildStreamReplayMessage(prompt, componentId));
222
217
  openConnection();
@@ -265,8 +260,30 @@ class TableAgenticAuthoringTurnFlow {
265
260
  }
266
261
  return this.streamTerminalWatchdogMs;
267
262
  }
263
+ streamTerminalReconnectLimitFor(contextHints) {
264
+ if (this.shouldUseSelectedRecordSurfaceSnapshotFallback(contextHints)
265
+ && this.selectedRecordFilterCandidates(contextHints).length === 0) {
266
+ return 0;
267
+ }
268
+ return this.streamTerminalReconnectLimit;
269
+ }
268
270
  shouldUseSelectedRecordSnapshotFallback(contextHints) {
269
- return this.selectedRecordsCountForTurn > 0 && this.selectedRecordFilterCandidates(contextHints).length > 0;
271
+ return this.selectedRecordsCountForTurn > 0
272
+ && (this.selectedRecordFilterCandidates(contextHints).length > 0
273
+ || this.shouldUseSelectedRecordSurfaceSnapshotFallback(contextHints));
274
+ }
275
+ shouldUseSelectedRecordSurfaceSnapshotFallback(contextHints) {
276
+ return this.selectedRecordsCountForTurn > 0
277
+ && this.selectedRecordSurfaces(contextHints).length > 0;
278
+ }
279
+ selectedRecordSurfaces(contextHints) {
280
+ const authoringContract = this.toRecord(contextHints?.['authoringContract']);
281
+ const consultativeContext = this.toRecord(authoringContract?.['consultativeContext']);
282
+ const recordSurfaces = this.toRecord(consultativeContext?.['recordSurfaces']);
283
+ const surfaces = Array.isArray(recordSurfaces?.['surfaces']) ? recordSurfaces['surfaces'] : [];
284
+ return surfaces
285
+ .map((surface) => this.toRecord(surface))
286
+ .filter((surface) => !!surface);
270
287
  }
271
288
  isProcessingTurnResult(result) {
272
289
  return result?.state === 'processing';
@@ -544,6 +561,26 @@ class TableAgenticAuthoringTurnFlow {
544
561
  isTurnInProgressResponse(response) {
545
562
  return this.normalizeLabel(response.code ?? '') === 'turn in progress';
546
563
  }
564
+ selectedRecordLocalResponse(request, contextHints) {
565
+ if (this.authoringContractHasResponseModes(contextHints)) {
566
+ return this.completeSelectedRecordFilterClarification(request, contextHints);
567
+ }
568
+ return this.selectedRecordMissingSelectionAnswer(request, contextHints)
569
+ ?? this.selectedRecordExportOnlyRequest(request, contextHints)
570
+ ?? this.selectedRecordSingleCandidateQuestionAnswer(request, contextHints)
571
+ ?? this.selectedRecordFieldQuestionAnswer(request, contextHints)
572
+ ?? this.selectedRecordMultiFieldQuestionAnswer(request, contextHints)
573
+ ?? this.completeSelectedRecordFilterApplyRequest(request, contextHints)
574
+ ?? this.selectedRecordCommonQuestionAnswer(request, contextHints)
575
+ ?? this.completeSelectedRecordFilterClarification(request, contextHints)
576
+ ?? this.selectedRecordMultipleFilterFieldClarification(request, contextHints)
577
+ ?? this.selectedRecordSimilarityClarification(request, contextHints);
578
+ }
579
+ authoringContractHasResponseModes(contextHints) {
580
+ const authoringContract = this.toRecord(contextHints?.['authoringContract']);
581
+ return Array.isArray(authoringContract?.['responseModes'])
582
+ && authoringContract['responseModes'].length > 0;
583
+ }
547
584
  compileAdapterResponse(response, request) {
548
585
  if (response.type === 'clarification' || response.type === 'info' || response.type === 'error') {
549
586
  return response;
@@ -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-CXSYVYVI.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-DSE9Et19.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 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-CXSYVYVI.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-DSE9Et19.mjs';
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@praxisui/table",
3
- "version": "8.0.0-beta.44",
3
+ "version": "8.0.0-beta.46",
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.44",
9
- "@praxisui/core": "^8.0.0-beta.44",
10
- "@praxisui/dynamic-fields": "^8.0.0-beta.44",
11
- "@praxisui/dynamic-form": "^8.0.0-beta.44",
12
- "@praxisui/metadata-editor": "^8.0.0-beta.44",
13
- "@praxisui/rich-content": "^8.0.0-beta.44",
14
- "@praxisui/settings-panel": "^8.0.0-beta.44",
15
- "@praxisui/table-rule-builder": "^8.0.0-beta.44",
8
+ "@praxisui/ai": "^8.0.0-beta.46",
9
+ "@praxisui/core": "^8.0.0-beta.46",
10
+ "@praxisui/dynamic-fields": "^8.0.0-beta.46",
11
+ "@praxisui/dynamic-form": "^8.0.0-beta.46",
12
+ "@praxisui/metadata-editor": "^8.0.0-beta.46",
13
+ "@praxisui/rich-content": "^8.0.0-beta.46",
14
+ "@praxisui/settings-panel": "^8.0.0-beta.46",
15
+ "@praxisui/table-rule-builder": "^8.0.0-beta.46",
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.44",
20
+ "@praxisui/dialog": "^8.0.0-beta.46",
21
21
  "rxjs": "~7.8.0"
22
22
  },
23
23
  "dependencies": {