@praxisui/table 8.0.0-beta.54 → 8.0.0-beta.55

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.
@@ -39528,7 +39528,7 @@ class PraxisTable {
39528
39528
  if (this.aiAdapter || this.aiAdapterLoadStarted)
39529
39529
  return;
39530
39530
  this.aiAdapterLoadStarted = true;
39531
- import('./praxisui-table-table-ai.adapter-B3KQThqg.mjs')
39531
+ import('./praxisui-table-table-ai.adapter-CfqlZqod.mjs')
39532
39532
  .then(({ TableAiAdapter }) => {
39533
39533
  this.aiAdapter = new TableAiAdapter(this);
39534
39534
  this.initializeAiAssistantController();
@@ -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-KAnwisrq.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-B7_x2kDC.mjs';
5
5
 
6
6
  const TABLE_COMPONENT_CONTEXT_PACK = {
7
7
  version: 'v1',
@@ -2573,6 +2573,9 @@ class TableAiAdapter extends BaseAiAdapter {
2573
2573
  coerceTableRuntimeOperationBatch(source) {
2574
2574
  if (!source)
2575
2575
  return null;
2576
+ const textual = this.coerceTableRuntimeOperationBatchFromText(source);
2577
+ if (textual)
2578
+ return textual;
2576
2579
  const nestedPatch = this.toRecord(source['patch']);
2577
2580
  if (nestedPatch) {
2578
2581
  const nested = this.coerceTableRuntimeOperationBatch(nestedPatch);
@@ -2609,6 +2612,50 @@ class TableAiAdapter extends BaseAiAdapter {
2609
2612
  operations,
2610
2613
  };
2611
2614
  }
2615
+ coerceTableRuntimeOperationBatchFromText(source) {
2616
+ for (const key of ['message', 'assistantMessage', 'content', 'explanation']) {
2617
+ const text = this.stringValue(source[key]);
2618
+ if (!text || !text.includes(TABLE_RUNTIME_OPERATION_PATCH_KEY) || !text.includes('operationId')) {
2619
+ continue;
2620
+ }
2621
+ const parsed = this.parseRuntimeOperationJsonFromText(text);
2622
+ if (!parsed || parsed === source) {
2623
+ continue;
2624
+ }
2625
+ const batch = this.coerceTableRuntimeOperationBatch(parsed);
2626
+ if (batch)
2627
+ return batch;
2628
+ }
2629
+ return null;
2630
+ }
2631
+ parseRuntimeOperationJsonFromText(text) {
2632
+ const candidates = this.extractJsonObjectCandidates(text);
2633
+ for (const candidate of candidates) {
2634
+ try {
2635
+ const parsed = JSON.parse(candidate);
2636
+ const record = this.toRecord(parsed);
2637
+ if (record)
2638
+ return record;
2639
+ }
2640
+ catch {
2641
+ continue;
2642
+ }
2643
+ }
2644
+ return null;
2645
+ }
2646
+ extractJsonObjectCandidates(text) {
2647
+ const candidates = [];
2648
+ const fenced = text.match(/```(?:json)?\s*([\s\S]*?)```/iu);
2649
+ if (fenced?.[1]) {
2650
+ candidates.push(fenced[1].trim());
2651
+ }
2652
+ const firstBrace = text.indexOf('{');
2653
+ const lastBrace = text.lastIndexOf('}');
2654
+ if (firstBrace >= 0 && lastBrace > firstBrace) {
2655
+ candidates.push(text.slice(firstBrace, lastBrace + 1).trim());
2656
+ }
2657
+ return candidates.filter((candidate, index, values) => !!candidate && values.indexOf(candidate) === index);
2658
+ }
2612
2659
  coerceTableRuntimeOperation(value) {
2613
2660
  const record = this.toRecord(value);
2614
2661
  if (!record)
@@ -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-KAnwisrq.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-B7_x2kDC.mjs';
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@praxisui/table",
3
- "version": "8.0.0-beta.54",
3
+ "version": "8.0.0-beta.55",
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.54",
9
- "@praxisui/core": "^8.0.0-beta.54",
10
- "@praxisui/dynamic-fields": "^8.0.0-beta.54",
11
- "@praxisui/dynamic-form": "^8.0.0-beta.54",
12
- "@praxisui/metadata-editor": "^8.0.0-beta.54",
13
- "@praxisui/rich-content": "^8.0.0-beta.54",
14
- "@praxisui/settings-panel": "^8.0.0-beta.54",
15
- "@praxisui/table-rule-builder": "^8.0.0-beta.54",
8
+ "@praxisui/ai": "^8.0.0-beta.55",
9
+ "@praxisui/core": "^8.0.0-beta.55",
10
+ "@praxisui/dynamic-fields": "^8.0.0-beta.55",
11
+ "@praxisui/dynamic-form": "^8.0.0-beta.55",
12
+ "@praxisui/metadata-editor": "^8.0.0-beta.55",
13
+ "@praxisui/rich-content": "^8.0.0-beta.55",
14
+ "@praxisui/settings-panel": "^8.0.0-beta.55",
15
+ "@praxisui/table-rule-builder": "^8.0.0-beta.55",
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.54",
20
+ "@praxisui/dialog": "^8.0.0-beta.55",
21
21
  "rxjs": "~7.8.0"
22
22
  },
23
23
  "dependencies": {