@praxisui/table 8.0.0-beta.70 → 8.0.0-beta.72

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-DMlNQpdn.mjs')
39581
+ import('./praxisui-table-table-ai.adapter-ZaGeIt0F.mjs')
39582
39582
  .then(({ TableAiAdapter }) => {
39583
39583
  this.aiAdapter = new TableAiAdapter(this);
39584
39584
  this.initializeAiAssistantController();
@@ -39660,12 +39660,44 @@ class PraxisTable {
39660
39660
  });
39661
39661
  }
39662
39662
  onAiAssistantApply() {
39663
+ const pendingPatch = this.aiAssistantController?.snapshot().pendingPatch
39664
+ ?? this.aiAssistantViewState?.pendingPatch;
39663
39665
  this.aiAssistantController?.apply().subscribe((state) => {
39664
39666
  this.aiAssistantViewState = state;
39665
- this.syncAiAssistantSession();
39667
+ const shouldMinimizeAfterApply = state.state === 'success'
39668
+ && this.shouldMinimizeAiAssistantAfterApply(pendingPatch);
39669
+ if (shouldMinimizeAfterApply) {
39670
+ this.aiAssistantOpen = false;
39671
+ }
39672
+ this.syncAiAssistantSession(shouldMinimizeAfterApply ? 'minimized' : undefined);
39666
39673
  this.cdr.markForCheck();
39667
39674
  });
39668
39675
  }
39676
+ shouldMinimizeAiAssistantAfterApply(pendingPatch) {
39677
+ const patch = this.asPlainRecord(pendingPatch);
39678
+ const actions = this.asPlainRecord(patch?.['actions']);
39679
+ const row = this.asPlainRecord(actions?.['row']);
39680
+ const rowActions = row?.['actions'];
39681
+ return Array.isArray(rowActions)
39682
+ && rowActions.some((action) => this.isMaterializedRowActionPatch(action));
39683
+ }
39684
+ isMaterializedRowActionPatch(value) {
39685
+ const action = this.asPlainRecord(value);
39686
+ if (!action)
39687
+ return false;
39688
+ const actionId = typeof action['action'] === 'string' ? action['action'].trim() : '';
39689
+ const globalAction = this.asPlainRecord(action['globalAction']);
39690
+ const globalActionId = typeof globalAction?.['actionId'] === 'string'
39691
+ ? globalAction['actionId'].trim()
39692
+ : '';
39693
+ const effects = Array.isArray(action['effects']) ? action['effects'] : [];
39694
+ return Boolean(actionId || globalActionId || effects.length);
39695
+ }
39696
+ asPlainRecord(value) {
39697
+ return value && typeof value === 'object' && !Array.isArray(value)
39698
+ ? value
39699
+ : null;
39700
+ }
39669
39701
  onAiAssistantRetry() {
39670
39702
  this.aiAssistantController?.retry().subscribe((state) => {
39671
39703
  this.aiAssistantViewState = state;
@@ -51380,8 +51412,11 @@ class PraxisTable {
51380
51412
  && actionConfig['effects'].length > 0;
51381
51413
  const canGroundUnboundRowAction = !configuredGlobalActionId
51382
51414
  && !hasExplicitEffects;
51383
- if (configuredAction !== 'surface.open'
51384
- && configuredGlobalActionId !== 'surface.open'
51415
+ const isSurfaceOpenOperation = configuredAction === 'surface.open'
51416
+ || configuredAction === 'dynamicPage.surface.open'
51417
+ || configuredGlobalActionId === 'surface.open'
51418
+ || configuredGlobalActionId === 'dynamicPage.surface.open';
51419
+ if (!isSurfaceOpenOperation
51385
51420
  && !canGroundUnboundRowAction) {
51386
51421
  return null;
51387
51422
  }
@@ -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-CRPaOsiX.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-s848_dht.mjs';
5
5
 
6
6
  const TABLE_COMPONENT_CONTEXT_PACK = {
7
7
  version: 'v1',
@@ -1886,6 +1886,7 @@ class TableDataProfiler {
1886
1886
  const TABLE_RUNTIME_OPERATION_PATCH_KEY = 'tableRuntimeOperations';
1887
1887
  const TABLE_RUNTIME_OPERATION_BATCH_KIND = 'praxis.table.runtime-operation.batch';
1888
1888
  const TABLE_RUNTIME_OPERATION_IDS = ['table.filter.apply', 'table.export.run', 'dynamicPage.surface.open'];
1889
+ const TABLE_RECORD_SURFACE_OPEN_ACTION_IDS = new Set(['surface.open', 'dynamicPage.surface.open']);
1889
1890
  const TABLE_EXPORT_SCOPES = ['auto', 'selected', 'filtered', 'currentPage', 'all'];
1890
1891
  const TABLE_EXPORT_FORMATS = ['excel', 'pdf', 'csv', 'json', 'print'];
1891
1892
  const TABLE_UNSUPPORTED_FILTER_COMBINATOR_KEYS = new Set([
@@ -2879,7 +2880,7 @@ class TableAiAdapter extends BaseAiAdapter {
2879
2880
  || this.stringValue(this.toRecord(input['globalAction'])?.['actionId']);
2880
2881
  const surfaceEntry = declaredSurfaceId
2881
2882
  ? this.getRecordSurfaceById(declaredSurfaceId)
2882
- : actionId === 'surface.open'
2883
+ : TABLE_RECORD_SURFACE_OPEN_ACTION_IDS.has(actionId)
2883
2884
  ? this.getRecordSurfaceForOpenInput(input)
2884
2885
  : null;
2885
2886
  if (!surfaceEntry)
@@ -2898,7 +2899,7 @@ class TableAiAdapter extends BaseAiAdapter {
2898
2899
  ...input,
2899
2900
  id: this.stringValue(input['id']) || `open-${surfaceId}`,
2900
2901
  label,
2901
- action: this.stringValue(input['action']) || 'surface.open',
2902
+ action: 'surface.open',
2902
2903
  icon: this.stringValue(input['icon']) || 'open_in_new',
2903
2904
  recordSurface: resourceSurface,
2904
2905
  };
@@ -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-CRPaOsiX.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-s848_dht.mjs';
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@praxisui/table",
3
- "version": "8.0.0-beta.70",
3
+ "version": "8.0.0-beta.72",
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.70",
9
- "@praxisui/core": "^8.0.0-beta.70",
10
- "@praxisui/dynamic-fields": "^8.0.0-beta.70",
11
- "@praxisui/dynamic-form": "^8.0.0-beta.70",
12
- "@praxisui/metadata-editor": "^8.0.0-beta.70",
13
- "@praxisui/rich-content": "^8.0.0-beta.70",
14
- "@praxisui/settings-panel": "^8.0.0-beta.70",
15
- "@praxisui/table-rule-builder": "^8.0.0-beta.70",
8
+ "@praxisui/ai": "^8.0.0-beta.72",
9
+ "@praxisui/core": "^8.0.0-beta.72",
10
+ "@praxisui/dynamic-fields": "^8.0.0-beta.72",
11
+ "@praxisui/dynamic-form": "^8.0.0-beta.72",
12
+ "@praxisui/metadata-editor": "^8.0.0-beta.72",
13
+ "@praxisui/rich-content": "^8.0.0-beta.72",
14
+ "@praxisui/settings-panel": "^8.0.0-beta.72",
15
+ "@praxisui/table-rule-builder": "^8.0.0-beta.72",
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.70",
20
+ "@praxisui/dialog": "^8.0.0-beta.72",
21
21
  "rxjs": "~7.8.0"
22
22
  },
23
23
  "dependencies": {
@@ -1287,6 +1287,9 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
1287
1287
  onAiAssistantPromptChange(prompt: string): void;
1288
1288
  onAiAssistantSubmit(prompt: string): void;
1289
1289
  onAiAssistantApply(): void;
1290
+ private shouldMinimizeAiAssistantAfterApply;
1291
+ private isMaterializedRowActionPatch;
1292
+ private asPlainRecord;
1290
1293
  onAiAssistantRetry(): void;
1291
1294
  onAiAssistantCancel(): void;
1292
1295
  onAiAssistantQuickReply(reply: PraxisAssistantShellQuickReply): void;