@praxisui/table 8.0.0-beta.50 → 8.0.0-beta.52

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.
@@ -33,7 +33,7 @@ import * as i13 from '@angular/cdk/drag-drop';
33
33
  import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
34
34
  import { Subject, debounceTime, takeUntil, of, firstValueFrom, BehaviorSubject, Subscription, take as take$1 } from 'rxjs';
35
35
  import * as i1 from '@praxisui/core';
36
- import { LoggerService, createCorporateLoggerConfig, ConsoleLoggerSink, PraxisJsonLogicService, PraxisIconDirective, PraxisI18nService, isTableConfigV2, providePraxisI18nConfig, PRAXIS_GLOBAL_ACTION_CATALOG, SURFACE_OPEN_I18N_NAMESPACE, isRequiredGlobalActionPayloadMissing, getGlobalActionUiSchema, getRequiredGlobalActionPayloadKeys, hasMeaningfulGlobalActionPayloadValue, SurfaceOpenActionEditorComponent, SURFACE_OPEN_I18N_CONFIG, INLINE_FILTER_CONTROL_TYPES, INLINE_FILTER_CONTROL_TYPE_VALUES, FieldControlType, normalizeControlTypeToken, ASYNC_CONFIG_STORAGE, resolveControlTypeAlias, mapFieldDefinitionsToMetadata, PraxisJsonLogicError, GLOBAL_ACTION_CATALOG, GenericCrudService, validateGlobalActionRefs, getGlobalActionCatalog, TableConfigService, createDefaultTableConfig, fillUndefined, deepMerge, INLINE_FILTER_ALIAS_TOKENS, GlobalConfigService, buildSchemaId, MemoryCacheAdapter, LocalStorageCacheAdapter, SchemaMetadataClient, resolveInlineFilterControlType, fetchWithETag, serializeEntityLookupValueForPayload, ComponentMetadataRegistry, AnalyticsStatsRequestBuilderService, buildApiUrl, normalizePraxisDataQueryContext, API_URL, PraxisCollectionExportService, ResourceDiscoveryService, ResourceQuickConnectComponent, translateResourceAvailabilityReason, assertPraxisCollectionExportArtifact, PRAXIS_LOADING_CTX, translateResourceDiscoveryText, supportsImplicitValuePresentation, resolveValuePresentation, translateUnavailableWorkflowMessage, CONNECTION_STORAGE, PRAXIS_LOADING_RENDERER, EmptyStateCardComponent, RESOURCE_DISCOVERY_I18N_CONFIG } from '@praxisui/core';
36
+ import { LoggerService, createCorporateLoggerConfig, ConsoleLoggerSink, PraxisJsonLogicService, PraxisIconDirective, PraxisI18nService, isTableConfigV2, providePraxisI18nConfig, PRAXIS_GLOBAL_ACTION_CATALOG, SURFACE_OPEN_I18N_NAMESPACE, isRequiredGlobalActionPayloadMissing, getGlobalActionUiSchema, getRequiredGlobalActionPayloadKeys, hasMeaningfulGlobalActionPayloadValue, SurfaceOpenActionEditorComponent, SURFACE_OPEN_I18N_CONFIG, INLINE_FILTER_CONTROL_TYPES, INLINE_FILTER_CONTROL_TYPE_VALUES, FieldControlType, normalizeControlTypeToken, ASYNC_CONFIG_STORAGE, resolveControlTypeAlias, mapFieldDefinitionsToMetadata, PraxisJsonLogicError, GLOBAL_ACTION_CATALOG, GenericCrudService, validateGlobalActionRefs, getGlobalActionCatalog, TableConfigService, createDefaultTableConfig, fillUndefined, deepMerge, INLINE_FILTER_ALIAS_TOKENS, GlobalConfigService, buildSchemaId, MemoryCacheAdapter, LocalStorageCacheAdapter, SchemaMetadataClient, resolveInlineFilterControlType, fetchWithETag, serializeEntityLookupValueForPayload, ComponentMetadataRegistry, AnalyticsStatsRequestBuilderService, buildApiUrl, normalizePraxisDataQueryContext, API_URL, PraxisCollectionExportService, ResourceDiscoveryService, ResourceSurfaceOpenAdapterService, ResourceQuickConnectComponent, translateResourceAvailabilityReason, assertPraxisCollectionExportArtifact, PRAXIS_LOADING_CTX, translateResourceDiscoveryText, supportsImplicitValuePresentation, resolveValuePresentation, translateUnavailableWorkflowMessage, CONNECTION_STORAGE, PRAXIS_LOADING_RENDERER, EmptyStateCardComponent, RESOURCE_DISCOVERY_I18N_CONFIG } from '@praxisui/core';
37
37
  import { PraxisRichContent } from '@praxisui/rich-content';
38
38
  import * as i2 from '@angular/material/toolbar';
39
39
  import { MatToolbarModule } from '@angular/material/toolbar';
@@ -37942,6 +37942,7 @@ class PraxisTable {
37942
37942
  static ROW_DISCOVERY_CACHE_LIMIT = 500;
37943
37943
  static ROW_DISCOVERY_MAX_CONCURRENT_REQUESTS = 2;
37944
37944
  _resourceDiscovery;
37945
+ _resourceSurfaceOpenAdapter;
37945
37946
  paginatorSelectConfig = {
37946
37947
  panelClass: 'praxis-table-paginator-select-panel',
37947
37948
  };
@@ -38732,6 +38733,44 @@ class PraxisTable {
38732
38733
  this.warnLog('[PraxisTable] Nao foi possivel preparar schema de filtro para contexto AI', error);
38733
38734
  }
38734
38735
  }
38736
+ async ensureAiAssistantRecordSurfaceContext() {
38737
+ const selectedRows = this.getSelectedRowsSnapshot()
38738
+ .slice(0, PraxisTable.AI_SELECTION_ROW_LIMIT);
38739
+ if (!selectedRows.length) {
38740
+ return;
38741
+ }
38742
+ await Promise.all(selectedRows.map((row) => this.ensureAiAssistantRowCapabilitySnapshot(row)));
38743
+ }
38744
+ getAiAssistantRecordSurfacesContext() {
38745
+ const configuredPack = this.aiContext?.recordSurfaces ?? null;
38746
+ const configuredSurfaces = Array.isArray(configuredPack?.surfaces)
38747
+ ? configuredPack.surfaces
38748
+ : [];
38749
+ const resourceSurfaces = this.buildAiAssistantResourceSurfaceContexts();
38750
+ if (!configuredSurfaces.length && !resourceSurfaces.length) {
38751
+ return null;
38752
+ }
38753
+ const surfacesById = new Map();
38754
+ for (const surface of configuredSurfaces) {
38755
+ if (!surface?.id)
38756
+ continue;
38757
+ surfacesById.set(String(surface.id), surface);
38758
+ }
38759
+ for (const surface of resourceSurfaces) {
38760
+ if (!surface?.id || surfacesById.has(surface.id))
38761
+ continue;
38762
+ surfacesById.set(surface.id, surface);
38763
+ }
38764
+ const source = configuredSurfaces.length && resourceSurfaces.length
38765
+ ? 'mixed'
38766
+ : resourceSurfaces.length
38767
+ ? 'resource-capabilities'
38768
+ : configuredPack?.source ?? 'dynamic-page-composition';
38769
+ return {
38770
+ source,
38771
+ surfaces: [...surfacesById.values()],
38772
+ };
38773
+ }
38735
38774
  getAiAssistantSelectedRowsContext() {
38736
38775
  const selectedRows = this.getSelectedRowsSnapshot();
38737
38776
  if (!selectedRows.length) {
@@ -38762,6 +38801,85 @@ class PraxisTable {
38762
38801
  fields,
38763
38802
  };
38764
38803
  }
38804
+ async ensureAiAssistantRowCapabilitySnapshot(row) {
38805
+ const rowLinks = this.getRowLinks(row);
38806
+ if (!rowLinks) {
38807
+ return;
38808
+ }
38809
+ const href = this.resolveRowDiscoveryHref(rowLinks, 'capabilities');
38810
+ if (!href || this.hasFreshRowCapabilitySnapshot(href)) {
38811
+ return;
38812
+ }
38813
+ const inFlight = this.rowCapabilityInFlightByHref.get(href);
38814
+ if (inFlight) {
38815
+ await inFlight;
38816
+ return;
38817
+ }
38818
+ try {
38819
+ const snapshot = await firstValueFrom(this.resourceDiscovery.getCapabilities(rowLinks, this.buildRowDiscoveryOptions())
38820
+ .pipe(take$1(1)));
38821
+ this.clearRowCapabilityError(href);
38822
+ this.rememberRowCapabilitySnapshot(href, snapshot);
38823
+ if (row && typeof row === 'object') {
38824
+ this.rowContextRuntimeByRef.delete(row);
38825
+ }
38826
+ }
38827
+ catch (error) {
38828
+ this.rememberRowCapabilityError(href);
38829
+ this.warnLog('[PraxisTable] Nao foi possivel preparar surfaces de registro para contexto AI', error);
38830
+ }
38831
+ }
38832
+ buildAiAssistantResourceSurfaceContexts() {
38833
+ const selectedRows = this.getSelectedRowsSnapshot();
38834
+ if (!selectedRows.length || !this.resourcePath) {
38835
+ return [];
38836
+ }
38837
+ const surfacesById = new Map();
38838
+ for (const row of selectedRows) {
38839
+ const snapshot = this.getCachedRowCapabilitySnapshot(row);
38840
+ for (const surface of snapshot?.surfaces ?? []) {
38841
+ if (!this.isRowSurfaceAction(surface)) {
38842
+ continue;
38843
+ }
38844
+ const id = String(surface.id || '').trim();
38845
+ if (!id || surfacesById.has(id)) {
38846
+ continue;
38847
+ }
38848
+ surfacesById.set(id, this.buildRecordRelatedSurfaceContextFromResourceSurface(surface));
38849
+ }
38850
+ }
38851
+ return [...surfacesById.values()];
38852
+ }
38853
+ buildRecordRelatedSurfaceContextFromResourceSurface(surface, sourceWidget = this.resolveAiAssistantOwnerId()) {
38854
+ const id = String(surface.id || '').trim();
38855
+ return {
38856
+ id,
38857
+ label: surface.title || this.humanizeResourceSurfaceLabel(id),
38858
+ relation: 'record.resource-surface',
38859
+ operationId: 'dynamicPage.surface.open',
38860
+ source: {
38861
+ widget: sourceWidget,
38862
+ componentType: 'praxis-table',
38863
+ port: 'rowSelection',
38864
+ resourcePath: this.resourcePath,
38865
+ },
38866
+ target: {
38867
+ widget: `${sourceWidget}.surface.${id}`,
38868
+ componentType: 'resource-surface',
38869
+ port: 'surface.open',
38870
+ resourcePath: this.resourcePath,
38871
+ },
38872
+ resourceSurface: this.cloneForEmit(surface),
38873
+ description: surface.description || null,
38874
+ };
38875
+ }
38876
+ humanizeResourceSurfaceLabel(value) {
38877
+ return String(value || '')
38878
+ .replace(/[-_]+/g, ' ')
38879
+ .replace(/([a-z])([A-Z])/g, '$1 $2')
38880
+ .replace(/\b\w/g, (match) => match.toUpperCase())
38881
+ .trim() || 'Superfície relacionada';
38882
+ }
38765
38883
  aiAdapter = null;
38766
38884
  aiAdapterLoadStarted = false;
38767
38885
  aiAssistantOpenAfterAdapterLoad = false;
@@ -39400,6 +39518,9 @@ class PraxisTable {
39400
39518
  get resourceDiscovery() {
39401
39519
  return this._resourceDiscovery ??= this.injector.get(ResourceDiscoveryService);
39402
39520
  }
39521
+ get resourceSurfaceOpenAdapter() {
39522
+ return this._resourceSurfaceOpenAdapter ??= this.injector.get(ResourceSurfaceOpenAdapterService);
39523
+ }
39403
39524
  ensureAiAdapterLoaded(openAfterLoad = false) {
39404
39525
  if (openAfterLoad && !this.aiAdapter) {
39405
39526
  this.aiAssistantOpenAfterAdapterLoad = true;
@@ -39407,7 +39528,7 @@ class PraxisTable {
39407
39528
  if (this.aiAdapter || this.aiAdapterLoadStarted)
39408
39529
  return;
39409
39530
  this.aiAdapterLoadStarted = true;
39410
- import('./praxisui-table-table-ai.adapter-hB4KVFil.mjs')
39531
+ import('./praxisui-table-table-ai.adapter-eGo1zPuy.mjs')
39411
39532
  .then(({ TableAiAdapter }) => {
39412
39533
  this.aiAdapter = new TableAiAdapter(this);
39413
39534
  this.initializeAiAssistantController();
@@ -40226,6 +40347,11 @@ class PraxisTable {
40226
40347
  const row = selectedRows[0];
40227
40348
  if (!row)
40228
40349
  return false;
40350
+ const resourceSurfaceContext = this.resolveResourceRecordSurfaceContext(surface);
40351
+ if (resourceSurfaceContext?.resourceSurface) {
40352
+ void this.openResourceRecordSurface(resourceSurfaceContext.resourceSurface, resourceSurfaceContext, row, selectedRows);
40353
+ return true;
40354
+ }
40229
40355
  const index = Array.isArray(this.dataSource?.data)
40230
40356
  ? this.dataSource.data.indexOf(row)
40231
40357
  : -1;
@@ -40244,6 +40370,72 @@ class PraxisTable {
40244
40370
  this.rowClick.emit({ row, index });
40245
40371
  return true;
40246
40372
  }
40373
+ resolveResourceRecordSurfaceContext(surface) {
40374
+ const directResourceSurface = surface?.['resourceSurface'];
40375
+ if (directResourceSurface && typeof directResourceSurface === 'object' && !Array.isArray(directResourceSurface)) {
40376
+ return surface;
40377
+ }
40378
+ const surfaceId = String(surface?.['id'] || '').trim();
40379
+ if (!surfaceId) {
40380
+ return null;
40381
+ }
40382
+ const contexts = this.getAiAssistantRecordSurfacesContext()?.surfaces ?? [];
40383
+ return contexts.find((candidate) => candidate.resourceSurface
40384
+ && String(candidate.id || '').trim().toLowerCase() === surfaceId.toLowerCase()) ?? null;
40385
+ }
40386
+ async openResourceRecordSurface(surface, contextSurface, row, selectedRows) {
40387
+ const resourceId = this.getRowId(row);
40388
+ try {
40389
+ const payload = this.resourceSurfaceOpenAdapter.toPayload(surface, {
40390
+ resourcePath: this.resourcePath,
40391
+ resourceId,
40392
+ endpointKey: this.crudContext?.endpointKey,
40393
+ title: surface.title || contextSurface.label,
40394
+ subtitle: surface.description || contextSurface.description || undefined,
40395
+ });
40396
+ const result = await this.globalActions.execute('surface.open', payload, {
40397
+ sourceId: this.tableId || this.componentInstanceId || 'praxis-table',
40398
+ output: 'recordSurfaceOpen',
40399
+ payload: {
40400
+ surface: contextSurface,
40401
+ selectedRow: row,
40402
+ selectedRows,
40403
+ selectedCount: selectedRows.length,
40404
+ tableId: this.tableId,
40405
+ },
40406
+ runtime: {
40407
+ row,
40408
+ selection: {
40409
+ selectedRows,
40410
+ selectedCount: selectedRows.length,
40411
+ },
40412
+ },
40413
+ meta: {
40414
+ actionId: 'dynamicPage.surface.open',
40415
+ surfaceId: contextSurface.id,
40416
+ actionConfig: surface,
40417
+ },
40418
+ });
40419
+ if (!result.success) {
40420
+ this.warnLog('[PraxisTable] Falha ao abrir surface de registro descoberta por capabilities', { surfaceId: surface.id, error: result.error }, { actionId: 'dynamicPage.surface.open' });
40421
+ this.showActionFeedbackMessage('errors', 'dynamicPage.surface.open', {
40422
+ label: surface.title || contextSurface.label,
40423
+ error: result.error,
40424
+ fallback: result.error || 'Erro ao abrir superfície relacionada',
40425
+ duration: 3000,
40426
+ });
40427
+ }
40428
+ }
40429
+ catch (error) {
40430
+ this.warnLog('[PraxisTable] Falha ao preparar surface de registro descoberta por capabilities', { surfaceId: surface.id, error }, { actionId: 'dynamicPage.surface.open' });
40431
+ this.showActionFeedbackMessage('errors', 'dynamicPage.surface.open', {
40432
+ label: surface.title || contextSurface.label,
40433
+ error,
40434
+ fallback: 'Erro ao abrir superfície relacionada',
40435
+ duration: 3000,
40436
+ });
40437
+ }
40438
+ }
40247
40439
  isRowExpansionRuntimeEnabled() {
40248
40440
  return this.isRowExpansionSupported();
40249
40441
  }
@@ -43362,6 +43554,10 @@ class PraxisTable {
43362
43554
  }
43363
43555
  async dispatchRowAction(action, row, runtimeOptions, extra) {
43364
43556
  const actionConfig = runtimeOptions?.actionConfig;
43557
+ if (this.isResourceSurfaceCatalogItem(actionConfig)) {
43558
+ await this.openResourceRecordSurface(actionConfig, this.buildRecordRelatedSurfaceContextFromResourceSurface(actionConfig), row, [row]);
43559
+ return;
43560
+ }
43365
43561
  if (this.resolveActionGlobalActionRef(actionConfig)) {
43366
43562
  const payload = Object.prototype.hasOwnProperty.call(runtimeOptions || {}, 'payload')
43367
43563
  ? runtimeOptions?.payload
@@ -49026,7 +49222,7 @@ class PraxisTable {
49026
49222
  return null;
49027
49223
  const text = Object.prototype.hasOwnProperty.call(cfg, 'text')
49028
49224
  ? cfg.text
49029
- : cfg.textField ? this.getNestedPropertyValue(row, cfg.textField) : null;
49225
+ : cfg.textField ? this.getRendererTextFieldValue(row, column, cfg.textField) : null;
49030
49226
  return text != null ? String(text) : null;
49031
49227
  }
49032
49228
  getBadgeIcon(row, column) {
@@ -49483,9 +49679,14 @@ class PraxisTable {
49483
49679
  return null;
49484
49680
  const t = Object.prototype.hasOwnProperty.call(cfg, 'text')
49485
49681
  ? cfg.text
49486
- : cfg.textField ? this.getNestedPropertyValue(row, cfg.textField) : null;
49682
+ : cfg.textField ? this.getRendererTextFieldValue(row, column, cfg.textField) : null;
49487
49683
  return t != null ? String(t) : null;
49488
49684
  }
49685
+ getRendererTextFieldValue(row, column, textField) {
49686
+ return textField === column.field
49687
+ ? this.getCellValue(row, column)
49688
+ : this.getNestedPropertyValue(row, textField);
49689
+ }
49489
49690
  getChipRichContentNodes(row, column) {
49490
49691
  const nodes = [];
49491
49692
  const icon = this.getChipIcon(row, column);
@@ -51069,6 +51270,17 @@ class PraxisTable {
51069
51270
  isRowSurfaceAction(surface) {
51070
51271
  return this.isWritableRowSurface(surface) || this.isReadableRowSurface(surface);
51071
51272
  }
51273
+ isResourceSurfaceCatalogItem(value) {
51274
+ if (!value || typeof value !== 'object' || Array.isArray(value)) {
51275
+ return false;
51276
+ }
51277
+ const candidate = value;
51278
+ return typeof candidate.id === 'string'
51279
+ && typeof candidate.kind === 'string'
51280
+ && typeof candidate.scope === 'string'
51281
+ && typeof candidate.path === 'string'
51282
+ && typeof candidate.method === 'string';
51283
+ }
51072
51284
  isWritableRowSurface(surface) {
51073
51285
  return surface.kind === 'FORM' || surface.kind === 'PARTIAL_FORM';
51074
51286
  }
@@ -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-Cuh8PYjH.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-GekTiEGg.mjs';
5
5
 
6
6
  const TABLE_COMPONENT_CONTEXT_PACK = {
7
7
  version: 'v1',
@@ -1918,6 +1918,7 @@ class TableAiAdapter extends BaseAiAdapter {
1918
1918
  async prepareAuthoringContext() {
1919
1919
  const tableWithFilterSchema = this.table;
1920
1920
  await tableWithFilterSchema.ensureFilterSchemaFieldsSnapshot?.();
1921
+ await tableWithFilterSchema.ensureAiAssistantRecordSurfaceContext?.();
1921
1922
  }
1922
1923
  compileAiResponse(response) {
1923
1924
  const runtimeOperations = this.coerceTableRuntimeOperationBatch(response);
@@ -2183,7 +2184,9 @@ class TableAiAdapter extends BaseAiAdapter {
2183
2184
  }
2184
2185
  }
2185
2186
  getRecordSurfaceAuthoringContext() {
2186
- const recordSurfaces = this.table.aiContext?.recordSurfaces;
2187
+ const tableWithRecordSurfaces = this.table;
2188
+ const recordSurfaces = tableWithRecordSurfaces.getAiAssistantRecordSurfacesContext?.()
2189
+ ?? this.table.aiContext?.recordSurfaces;
2187
2190
  if (!recordSurfaces || typeof recordSurfaces !== 'object')
2188
2191
  return null;
2189
2192
  const surfaces = Array.isArray(recordSurfaces.surfaces) ? recordSurfaces.surfaces : [];
@@ -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-Cuh8PYjH.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-GekTiEGg.mjs';
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@praxisui/table",
3
- "version": "8.0.0-beta.50",
3
+ "version": "8.0.0-beta.52",
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.50",
9
- "@praxisui/core": "^8.0.0-beta.50",
10
- "@praxisui/dynamic-fields": "^8.0.0-beta.50",
11
- "@praxisui/dynamic-form": "^8.0.0-beta.50",
12
- "@praxisui/metadata-editor": "^8.0.0-beta.50",
13
- "@praxisui/rich-content": "^8.0.0-beta.50",
14
- "@praxisui/settings-panel": "^8.0.0-beta.50",
15
- "@praxisui/table-rule-builder": "^8.0.0-beta.50",
8
+ "@praxisui/ai": "^8.0.0-beta.52",
9
+ "@praxisui/core": "^8.0.0-beta.52",
10
+ "@praxisui/dynamic-fields": "^8.0.0-beta.52",
11
+ "@praxisui/dynamic-form": "^8.0.0-beta.52",
12
+ "@praxisui/metadata-editor": "^8.0.0-beta.52",
13
+ "@praxisui/rich-content": "^8.0.0-beta.52",
14
+ "@praxisui/settings-panel": "^8.0.0-beta.52",
15
+ "@praxisui/table-rule-builder": "^8.0.0-beta.52",
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.50",
20
+ "@praxisui/dialog": "^8.0.0-beta.52",
21
21
  "rxjs": "~7.8.0"
22
22
  },
23
23
  "dependencies": {
@@ -967,6 +967,7 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
967
967
  private static readonly ROW_DISCOVERY_CACHE_LIMIT;
968
968
  private static readonly ROW_DISCOVERY_MAX_CONCURRENT_REQUESTS;
969
969
  private _resourceDiscovery?;
970
+ private _resourceSurfaceOpenAdapter?;
970
971
  readonly paginatorSelectConfig: MatPaginatorSelectConfig;
971
972
  private static readonly ROW_ANIMATION_PRESETS;
972
973
  private static readonly ROW_ANIMATION_PRESET_ALIASES;
@@ -1187,7 +1188,13 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
1187
1188
  getFilterSchemaFieldsSnapshot(): FilterSchemaFieldHint[];
1188
1189
  getResourceCapabilityDigest(): ResourceCapabilityDigest | null;
1189
1190
  ensureFilterSchemaFieldsSnapshot(): Promise<void>;
1191
+ ensureAiAssistantRecordSurfaceContext(): Promise<void>;
1192
+ getAiAssistantRecordSurfacesContext(): RecordRelatedSurfaceContextPack | null;
1190
1193
  getAiAssistantSelectedRowsContext(): Record<string, any> | null;
1194
+ private ensureAiAssistantRowCapabilitySnapshot;
1195
+ private buildAiAssistantResourceSurfaceContexts;
1196
+ private buildRecordRelatedSurfaceContextFromResourceSurface;
1197
+ private humanizeResourceSurfaceLabel;
1191
1198
  aiAdapter: any;
1192
1199
  private aiAdapterLoadStarted;
1193
1200
  private aiAssistantOpenAfterAdapterLoad;
@@ -1265,6 +1272,7 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
1265
1272
  private shouldExposeToolbar;
1266
1273
  constructor(cdr: ChangeDetectorRef, settingsPanel: SettingsPanelService, crudService: GenericCrudService<any, any>, tableDefaultsProvider: TableDefaultsProvider, filterConfig: FilterConfigService, formattingService: DataFormattingService, pxDialog: PraxisDialog, snackBar: MatSnackBar, asyncConfigStorage: AsyncConfigStorage, connectionStorage: ConnectionStorage, hostRef: ElementRef<HTMLElement>, global: GlobalConfigService, injector: Injector, componentKeys: ComponentKeyService, loadingOrchestrator: LoadingOrchestrator, globalActions: GlobalActionService, loadingRenderer?: PraxisLoadingRenderer | undefined, route?: ActivatedRoute | undefined, logger?: LoggerService | undefined, analyticsStatsApi?: AnalyticsTableStatsApiService | undefined);
1267
1274
  private get resourceDiscovery();
1275
+ private get resourceSurfaceOpenAdapter();
1268
1276
  private ensureAiAdapterLoaded;
1269
1277
  openAiAssistant(): void;
1270
1278
  aiAssistantTriggerTestId(position: string): string;
@@ -1325,6 +1333,8 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
1325
1333
  onSortChange(event: Sort): void;
1326
1334
  onRowClicked(row: any, index: number, event?: MouseEvent): void;
1327
1335
  requestRecordSurfaceOpen(surface: Record<string, unknown>): boolean;
1336
+ private resolveResourceRecordSurfaceContext;
1337
+ private openResourceRecordSurface;
1328
1338
  isRowExpansionRuntimeEnabled(): boolean;
1329
1339
  isExpansionIconTriggerEnabled(): boolean;
1330
1340
  isRowExpandable(row: any, index?: number): boolean;
@@ -1939,6 +1949,7 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
1939
1949
  private buildRendererActionRuntimeOptions;
1940
1950
  onButtonClick(row: any, column: ColumnDefinition, event: Event): void;
1941
1951
  getChipText(row: any, column: ColumnDefinition): string | null;
1952
+ private getRendererTextFieldValue;
1942
1953
  getChipRichContentNodes(row: any, column: ColumnDefinition): RichBlockNode[];
1943
1954
  getChipIcon(row: any, column: ColumnDefinition): string | null;
1944
1955
  getChipClasses(row: any, column: ColumnDefinition): string[];
@@ -2081,6 +2092,7 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
2081
2092
  private findItemWorkflowAction;
2082
2093
  private findItemSurface;
2083
2094
  private isRowSurfaceAction;
2095
+ private isResourceSurfaceCatalogItem;
2084
2096
  private isWritableRowSurface;
2085
2097
  private isReadableRowSurface;
2086
2098
  private getDiscoveredSurfaceIcon;