@praxisui/table 8.0.0-beta.41 → 8.0.0-beta.43

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.
@@ -37978,6 +37978,7 @@ class PraxisTable {
37978
37978
  crudContext;
37979
37979
  filterCriteria = {};
37980
37980
  queryContext = null;
37981
+ aiContext = null;
37981
37982
  advancedFilterValue = {};
37982
37983
  advancedFilterRuntimeVisibleFields = [];
37983
37984
  advancedFilterAlwaysVisibleCacheKey = '';
@@ -37986,6 +37987,7 @@ class PraxisTable {
37986
37987
  advancedFilterMetadataOverridesCacheSource;
37987
37988
  advancedFilterMetadataOverridesCache;
37988
37989
  rowClick = new EventEmitter();
37990
+ widgetEvent = new EventEmitter();
37989
37991
  rowDoubleClick = new EventEmitter();
37990
37992
  rowExpansionChange = new EventEmitter();
37991
37993
  rowAction = new EventEmitter();
@@ -39405,7 +39407,7 @@ class PraxisTable {
39405
39407
  if (this.aiAdapter || this.aiAdapterLoadStarted)
39406
39408
  return;
39407
39409
  this.aiAdapterLoadStarted = true;
39408
- import('./praxisui-table-table-ai.adapter-CH3MlaVE.mjs')
39410
+ import('./praxisui-table-table-ai.adapter-CNKK4L74.mjs')
39409
39411
  .then(({ TableAiAdapter }) => {
39410
39412
  this.aiAdapter = new TableAiAdapter(this);
39411
39413
  this.initializeAiAssistantController();
@@ -39555,7 +39557,7 @@ class PraxisTable {
39555
39557
  initializeAiAssistantController() {
39556
39558
  if (!this.aiAdapter || this.aiAssistantController)
39557
39559
  return;
39558
- import('./praxisui-table-table-agentic-authoring-turn-flow-FPpyS6u7.mjs')
39560
+ import('./praxisui-table-table-agentic-authoring-turn-flow-BX1o6_il.mjs')
39559
39561
  .then(({ TableAgenticAuthoringTurnFlow }) => {
39560
39562
  if (this.aiAssistantController || !this.aiAdapter)
39561
39563
  return;
@@ -40219,6 +40221,29 @@ class PraxisTable {
40219
40221
  }
40220
40222
  this.rowClick.emit({ row, index });
40221
40223
  }
40224
+ requestRecordSurfaceOpen(surface) {
40225
+ const selectedRows = this.getSelectedRowsSnapshot();
40226
+ const row = selectedRows[0];
40227
+ if (!row)
40228
+ return false;
40229
+ const index = Array.isArray(this.dataSource?.data)
40230
+ ? this.dataSource.data.indexOf(row)
40231
+ : -1;
40232
+ this.rowClick.emit({ row, index });
40233
+ this.widgetEvent.emit({
40234
+ sourceComponentId: 'praxis-table',
40235
+ output: 'recordSurfaceOpen',
40236
+ payload: {
40237
+ operationId: 'dynamicPage.surface.open',
40238
+ surface,
40239
+ selectedRow: row,
40240
+ selectedRows,
40241
+ selectedCount: selectedRows.length,
40242
+ tableId: this.tableId,
40243
+ },
40244
+ });
40245
+ return true;
40246
+ }
40222
40247
  isRowExpansionRuntimeEnabled() {
40223
40248
  return this.isRowExpansionSupported();
40224
40249
  }
@@ -51191,7 +51216,7 @@ class PraxisTable {
51191
51216
  this.removeViewportChangeListeners = null;
51192
51217
  }
51193
51218
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PraxisTable, deps: [{ token: i0.ChangeDetectorRef }, { token: i3$2.SettingsPanelService }, { token: i1.GenericCrudService }, { token: TableDefaultsProvider }, { token: FilterConfigService }, { token: DataFormattingService }, { token: i6$3.PraxisDialog }, { token: i2$2.MatSnackBar }, { token: ASYNC_CONFIG_STORAGE }, { token: CONNECTION_STORAGE }, { token: i0.ElementRef }, { token: i1.GlobalConfigService }, { token: i0.Injector }, { token: i1.ComponentKeyService }, { token: i1.LoadingOrchestrator }, { token: i1.GlobalActionService }, { token: PRAXIS_LOADING_RENDERER, optional: true }, { token: i6$2.ActivatedRoute, optional: true }, { token: i1.LoggerService, optional: true }, { token: AnalyticsTableStatsApiService, optional: true }], target: i0.ɵɵFactoryTarget.Component });
51194
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: PraxisTable, isStandalone: true, selector: "praxis-table", inputs: { config: "config", resourcePath: "resourcePath", data: "data", tableId: "tableId", componentInstanceId: "componentInstanceId", title: "title", subtitle: "subtitle", icon: "icon", autoDelete: "autoDelete", notifyIfOutdated: "notifyIfOutdated", snoozeMs: "snoozeMs", autoOpenSettingsOnOutdated: "autoOpenSettingsOnOutdated", crudContext: "crudContext", filterCriteria: "filterCriteria", queryContext: "queryContext", horizontalScroll: "horizontalScroll", enableCustomization: ["enableCustomization", "enableCustomization", booleanAttribute], dense: "dense" }, outputs: { rowClick: "rowClick", rowDoubleClick: "rowDoubleClick", rowExpansionChange: "rowExpansionChange", rowAction: "rowAction", toolbarAction: "toolbarAction", bulkAction: "bulkAction", exportAction: "exportAction", columnReorder: "columnReorder", columnReorderAttempt: "columnReorderAttempt", beforeDelete: "beforeDelete", afterDelete: "afterDelete", deleteError: "deleteError", beforeBulkDelete: "beforeBulkDelete", afterBulkDelete: "afterBulkDelete", bulkDeleteError: "bulkDeleteError", schemaStatusChange: "schemaStatusChange", configChange: "configChange", metadataChange: "metadataChange", loadingStateChange: "loadingStateChange", collectionLinksChange: "collectionLinksChange", selectionChange: "selectionChange" }, host: { properties: { "class.density-compact": "this.hostDensityCompactClass", "class.density-comfortable": "this.hostDensityComfortableClass", "class.density-spacious": "this.hostDensitySpaciousClass", "class.row-borders": "this.hostRowBordersClass", "class.col-borders": "this.hostColumnBordersClass" } }, providers: [
51219
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: PraxisTable, isStandalone: true, selector: "praxis-table", inputs: { config: "config", resourcePath: "resourcePath", data: "data", tableId: "tableId", componentInstanceId: "componentInstanceId", title: "title", subtitle: "subtitle", icon: "icon", autoDelete: "autoDelete", notifyIfOutdated: "notifyIfOutdated", snoozeMs: "snoozeMs", autoOpenSettingsOnOutdated: "autoOpenSettingsOnOutdated", crudContext: "crudContext", filterCriteria: "filterCriteria", queryContext: "queryContext", aiContext: "aiContext", horizontalScroll: "horizontalScroll", enableCustomization: ["enableCustomization", "enableCustomization", booleanAttribute], dense: "dense" }, outputs: { rowClick: "rowClick", widgetEvent: "widgetEvent", rowDoubleClick: "rowDoubleClick", rowExpansionChange: "rowExpansionChange", rowAction: "rowAction", toolbarAction: "toolbarAction", bulkAction: "bulkAction", exportAction: "exportAction", columnReorder: "columnReorder", columnReorderAttempt: "columnReorderAttempt", beforeDelete: "beforeDelete", afterDelete: "afterDelete", deleteError: "deleteError", beforeBulkDelete: "beforeBulkDelete", afterBulkDelete: "afterBulkDelete", bulkDeleteError: "bulkDeleteError", schemaStatusChange: "schemaStatusChange", configChange: "configChange", metadataChange: "metadataChange", loadingStateChange: "loadingStateChange", collectionLinksChange: "collectionLinksChange", selectionChange: "selectionChange" }, host: { properties: { "class.density-compact": "this.hostDensityCompactClass", "class.density-comfortable": "this.hostDensityComfortableClass", "class.density-spacious": "this.hostDensitySpaciousClass", "class.row-borders": "this.hostRowBordersClass", "class.col-borders": "this.hostColumnBordersClass" } }, providers: [
51195
51220
  providePraxisI18nConfig(RESOURCE_DISCOVERY_I18N_CONFIG),
51196
51221
  providePraxisI18nConfig(PRAXIS_TABLE_RUNTIME_I18N_CONFIG),
51197
51222
  MatPaginatorIntl,
@@ -51283,8 +51308,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
51283
51308
  type: Input
51284
51309
  }], queryContext: [{
51285
51310
  type: Input
51311
+ }], aiContext: [{
51312
+ type: Input
51286
51313
  }], rowClick: [{
51287
51314
  type: Output
51315
+ }], widgetEvent: [{
51316
+ type: Output
51288
51317
  }], rowDoubleClick: [{
51289
51318
  type: Output
51290
51319
  }], rowExpansionChange: [{
@@ -55898,6 +55927,20 @@ const PRAXIS_TABLE_PORTS = [
55898
55927
  description: 'Evento canonico de selecao de linhas; tambem alimenta o contexto sanitizado do assistente sem decidir intencao primaria.',
55899
55928
  exposure: { public: true, group: 'selection' },
55900
55929
  },
55930
+ {
55931
+ id: 'recordSurfaceOpen',
55932
+ label: 'Record Surface Open',
55933
+ direction: 'output',
55934
+ semanticKind: 'event',
55935
+ schema: {
55936
+ id: 'PraxisTableRecordSurfaceOpenEvent',
55937
+ kind: 'structural-shape',
55938
+ ref: '{ operationId: "dynamicPage.surface.open"; surface: RecordRelatedSurfaceContext; selectedRow: any; selectedRows: any[]; selectedCount: number; tableId?: string }',
55939
+ },
55940
+ cardinality: 'stream',
55941
+ description: 'Evento host-mediated emitido quando o assistente solicita abertura de uma superfície relacionada ao registro selecionado.',
55942
+ exposure: { public: true, group: 'ai-runtime' },
55943
+ },
55901
55944
  {
55902
55945
  id: 'loadingStateChange',
55903
55946
  label: 'Loading State',
@@ -55952,6 +55995,13 @@ const PRAXIS_TABLE_COMPONENT_METADATA = {
55952
55995
  description: 'Contrato semantico primario de consulta para orquestracao declarativa por pagina dinamica. A tabela compoe queryContext.filters sobre o pipeline de filtro efetivo existente e respeita sort, limit e page quando aplicavel.',
55953
55996
  default: null,
55954
55997
  },
55998
+ {
55999
+ name: 'aiContext',
56000
+ type: '{ recordSurfaces?: RecordRelatedSurfaceContextPack | null } | null',
56001
+ label: 'Contexto semântico para IA',
56002
+ description: 'Contexto governado pelo host para grounding do assistente, incluindo superfícies relacionadas ao registro derivadas da composição dinâmica.',
56003
+ default: null,
56004
+ },
55955
56005
  {
55956
56006
  name: 'filterCriteria',
55957
56007
  type: 'Record<string, any>',
@@ -56042,6 +56092,12 @@ const PRAXIS_TABLE_COMPONENT_METADATA = {
56042
56092
  label: 'Clique na linha',
56043
56093
  description: 'Emitido ao clicar em uma linha',
56044
56094
  },
56095
+ {
56096
+ name: 'widgetEvent',
56097
+ type: 'WidgetEventEnvelope',
56098
+ label: 'Evento de widget',
56099
+ description: 'Canal host-mediated para eventos runtime governados, incluindo abertura de superfície relacionada solicitada pelo assistente.',
56100
+ },
56045
56101
  {
56046
56102
  name: 'rowDoubleClick',
56047
56103
  type: '{ action: string; row: any }',
@@ -1428,9 +1428,22 @@ class TableAgenticAuthoringTurnFlow {
1428
1428
  'outros',
1429
1429
  ].some((token) => this.normalizedTextContainsApproxToken(normalized, token))
1430
1430
  || this.selectedRecordOperationalAudienceRequested(normalized)
1431
+ || this.selectedRecordSameFieldFilterRequested(normalized)
1431
1432
  || this.selectedRecordPrepositionalFilterRequested(normalized)
1432
1433
  || this.selectedRecordProximityFilterRequested(normalized);
1433
1434
  }
1435
+ selectedRecordSameFieldFilterRequested(normalizedPrompt) {
1436
+ if (!normalizedPrompt)
1437
+ return false;
1438
+ if (this.selectedRecordInformationalQuestionRequested(normalizedPrompt))
1439
+ return false;
1440
+ if (!this.selectedRecordReferentialRecordsPrompt(normalizedPrompt)
1441
+ && !this.selectedRecordExplicitSelectionPrompt(normalizedPrompt)) {
1442
+ return false;
1443
+ }
1444
+ const sameValueIntent = ['mesmo', 'mesma', 'mesmos', 'mesmas', 'igual', 'iguais'].some((token) => (this.normalizedTextContainsApproxToken(normalizedPrompt, token)));
1445
+ return sameValueIntent && this.selectedRecordPromptGroundsKnownFilterField(normalizedPrompt);
1446
+ }
1434
1447
  selectedRecordPrepositionalFilterRequested(normalizedPrompt) {
1435
1448
  if (/(^|\s)(qual|quais|oque|o que|como|quando|quanto|quantos|quantas)\s/u.test(normalizedPrompt)) {
1436
1449
  return false;
@@ -1478,8 +1491,6 @@ class TableAgenticAuthoringTurnFlow {
1478
1491
  'parecidos',
1479
1492
  'semelhante',
1480
1493
  'semelhantes',
1481
- 'relacionado',
1482
- 'relacionados',
1483
1494
  'comparavel',
1484
1495
  'comparaveis',
1485
1496
  ].some((token) => this.normalizedTextContainsApproxToken(normalized, token));
@@ -2011,6 +2022,12 @@ class TableAgenticAuthoringTurnFlow {
2011
2022
  const scope = this.describeExportScope(this.stringValue(input['scope']));
2012
2023
  return `Vou exportar ${scope}${format ? ` em **${format}**` : ''}.`;
2013
2024
  }
2025
+ if (operationId === 'dynamicPage.surface.open') {
2026
+ const surfaceId = this.stringValue(input['surfaceId'] ?? input['id']);
2027
+ return surfaceId
2028
+ ? `Vou abrir a superfície relacionada **${this.humanizeField(surfaceId)}**.`
2029
+ : 'Vou abrir a superfície relacionada solicitada.';
2030
+ }
2014
2031
  return null;
2015
2032
  }
2016
2033
  describeExportScope(scope) {
@@ -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-Cy5oXKp3.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-yrCWkQrc.mjs';
5
5
 
6
6
  const TABLE_COMPONENT_CONTEXT_PACK = {
7
7
  version: 'v1',
@@ -1885,7 +1885,7 @@ class TableDataProfiler {
1885
1885
 
1886
1886
  const TABLE_RUNTIME_OPERATION_PATCH_KEY = 'tableRuntimeOperations';
1887
1887
  const TABLE_RUNTIME_OPERATION_BATCH_KIND = 'praxis.table.runtime-operation.batch';
1888
- const TABLE_RUNTIME_OPERATION_IDS = ['table.filter.apply', 'table.export.run'];
1888
+ const TABLE_RUNTIME_OPERATION_IDS = ['table.filter.apply', 'table.export.run', 'dynamicPage.surface.open'];
1889
1889
  const TABLE_EXPORT_SCOPES = ['auto', 'selected', 'filtered', 'currentPage', 'all'];
1890
1890
  const TABLE_EXPORT_FORMATS = ['excel', 'pdf', 'csv', 'json', 'print'];
1891
1891
  const TABLE_UNSUPPORTED_FILTER_COMBINATOR_KEYS = new Set([
@@ -1982,6 +1982,7 @@ class TableAiAdapter extends BaseAiAdapter {
1982
1982
  const filterFieldCatalog = this.buildFilterFieldCatalog();
1983
1983
  const selectedRowsContext = this.getSelectedRowsAuthoringContext();
1984
1984
  const resourceCapabilities = this.getResourceCapabilityAuthoringContext();
1985
+ const recordSurfaces = this.getRecordSurfaceAuthoringContext();
1985
1986
  const filterExpressionSupported = resourceCapabilities?.filterExpressionSupported === true;
1986
1987
  const runtimeExportFormats = this.getRuntimeExportFormats();
1987
1988
  const runtimeOperations = [
@@ -2004,12 +2005,25 @@ class TableAiAdapter extends BaseAiAdapter {
2004
2005
  materializes: 'Dispara exportacao da tabela usando o pipeline canonico de Collection Export.',
2005
2006
  }]
2006
2007
  : []),
2008
+ ...(recordSurfaces?.surfaces?.length
2009
+ ? [{
2010
+ operationId: 'dynamicPage.surface.open',
2011
+ inputSchema: {
2012
+ surfaceId: recordSurfaces.surfaces.map((surface) => surface.id),
2013
+ source: ['selected-records'],
2014
+ },
2015
+ materializes: 'Solicita ao host da pagina dinamica abrir uma superficie relacionada ao registro selecionado.',
2016
+ }]
2017
+ : []),
2007
2018
  ];
2008
2019
  const runtimeRules = [
2009
2020
  'Use table.filter.apply only when the user asks to apply current table filters now; criteria must be grounded in declared filterFieldCatalog fields and selectedRecordsContext values when selection is the source.',
2010
2021
  'When selectedRecordsContext.filterCandidates contains a candidate whose label or field matches the requested selected-record filter, emit table.filter.apply with that candidate criteria exactly.',
2011
2022
  'For filterFieldCatalog fields with criterionKind "range" and selectedRecordsContext as the source, derive criteria from the minimum and maximum selected values in relatedColumnFields and emit { start, end }; for criterionKind "date-range", emit { startDate, endDate } from the earliest and latest selected dates.',
2012
- 'When the user asks for similar, matching, related, or comparable records from selected records without naming which property should define similarity, return clarification with options derived from filterFieldCatalog labels instead of info text or a patch.',
2023
+ 'When the user asks for similar, matching, or comparable records from selected records without naming which property should define similarity, return clarification with options derived from filterFieldCatalog labels instead of info text or a patch.',
2024
+ 'When recordSurfaces exists and the user asks to open, consult, view, navigate, or inspect information related to the selected record, answer from recordSurfaces before considering selection-derived filters.',
2025
+ 'Use dynamicPage.surface.open only when recordSurfaces declares the requested surface and the user asks to open, show, navigate to, or display that related surface now.',
2026
+ 'Do not use table.filter.apply for related-surface requests unless the user explicitly asks to find other records.',
2013
2027
  'When runtimeOperations.filterExpression.supported is not true, do not materialize OR, alternative groups, or nested boolean filters; ask which single filter field/value should be applied or explain the limitation.',
2014
2028
  'table.filter.apply accepts only simple conjunction criteria over declared fields; do not emit OR/AND groups, anyOf/oneOf/allOf, or nested boolean filter expressions. Ask for clarification or explain the limitation when the user needs alternatives.',
2015
2029
  ...(runtimeExportFormats.length
@@ -2038,6 +2052,9 @@ class TableAiAdapter extends BaseAiAdapter {
2038
2052
  'When runtimeState.selection exists, treat it as governed context for the rows selected by the user, using only its sanitized ids and sampleRows.',
2039
2053
  'When selectedRecordsContext.selectedCount is greater than zero, do not claim that no record is selected; answer from selectedRecordsContext.sampleRows even when there is only one selected row.',
2040
2054
  'When selectedRecordsContext.filterCandidates exists, treat those candidates as the canonical selection-derived bridge to advanced filters; prefer their labels and criteria over re-inferring values from prose.',
2055
+ 'When recordSurfaces exists and the user asks what can be opened, consulted, navigated, or viewed for selected records, answer or clarify using recordSurfaces before considering selection-derived filters.',
2056
+ 'Do not use selection-derived filters for requests about related surfaces, detail panels, timelines, teams, profiles, histories, payroll, or other record-adjacent information unless the user explicitly asks to find other records.',
2057
+ 'If the user asks for a related surface that is not declared in recordSurfaces, say that it is not available in the current context and list the declared surfaces in human-facing labels.',
2041
2058
  'When the user asks how selected records can drive advanced filters or export, bridge the selected records to declared filterFieldCatalog fields and export scopes conceptually; ask for clarification when the shared property or export scope is ambiguous.',
2042
2059
  'For ambiguous selected-record bridge requests that can become a real table operation, prefer type "clarification" with concise user-facing options grounded in filterFieldCatalog labels or export scopes; do not answer with a long documentation-style explanation.',
2043
2060
  'Keep selected-record bridge responses human-facing: mention selected record count and meaningful labels, but do not expose raw ids, endpoint paths, operationIds, internal field names, schema keys, or payload examples unless the user explicitly asks for technical details.',
@@ -2065,12 +2082,14 @@ class TableAiAdapter extends BaseAiAdapter {
2065
2082
  resourcePath: this.table.resourcePath || null,
2066
2083
  ...(resourceCapabilities ? { resourceCapabilities } : {}),
2067
2084
  ...(selectedRowsContext ? { selectedRecordsContext: selectedRowsContext } : {}),
2085
+ ...(recordSurfaces ? { recordSurfaces } : {}),
2068
2086
  answerableQuestionKinds: [
2069
2087
  'current-resource-path',
2070
2088
  'current-endpoint',
2071
2089
  'schema-fields',
2072
2090
  'selected-records',
2073
2091
  'selection-derived-filter-candidates',
2092
+ 'record-related-surfaces',
2074
2093
  'selection-derived-export-scope',
2075
2094
  'styling-capabilities',
2076
2095
  'conditional-renderers',
@@ -2145,6 +2164,27 @@ class TableAiAdapter extends BaseAiAdapter {
2145
2164
  return null;
2146
2165
  }
2147
2166
  }
2167
+ getRecordSurfaceAuthoringContext() {
2168
+ const recordSurfaces = this.table.aiContext?.recordSurfaces;
2169
+ if (!recordSurfaces || typeof recordSurfaces !== 'object')
2170
+ return null;
2171
+ const surfaces = Array.isArray(recordSurfaces.surfaces) ? recordSurfaces.surfaces : [];
2172
+ if (!surfaces.length)
2173
+ return null;
2174
+ return {
2175
+ source: recordSurfaces.source || 'dynamic-page-composition',
2176
+ surfaces: surfaces.map((surface) => ({
2177
+ id: surface.id,
2178
+ label: surface.label,
2179
+ relation: surface.relation,
2180
+ operationId: surface.operationId,
2181
+ ...(surface.description ? { description: surface.description } : {}),
2182
+ ...(surface.statePath ? { statePath: surface.statePath } : {}),
2183
+ source: surface.source,
2184
+ target: surface.target,
2185
+ })),
2186
+ };
2187
+ }
2148
2188
  getResourceCapabilityAuthoringContext() {
2149
2189
  const tableWithCapabilities = this.table;
2150
2190
  try {
@@ -2583,6 +2623,30 @@ class TableAiAdapter extends BaseAiAdapter {
2583
2623
  });
2584
2624
  continue;
2585
2625
  }
2626
+ if (operation.operationId === 'dynamicPage.surface.open') {
2627
+ const surfaceId = this.stringValue(operation.input['surfaceId'] ?? operation.input['id']);
2628
+ if (!surfaceId) {
2629
+ return {
2630
+ success: false,
2631
+ error: 'A operacao dynamicPage.surface.open exige surfaceId.',
2632
+ };
2633
+ }
2634
+ const surface = this.getRecordSurfaceById(surfaceId);
2635
+ if (!surface) {
2636
+ return {
2637
+ success: false,
2638
+ error: 'A operacao dynamicPage.surface.open exige uma superficie declarada em recordSurfaces.',
2639
+ };
2640
+ }
2641
+ const opened = this.table.requestRecordSurfaceOpen?.(surface);
2642
+ if (!opened) {
2643
+ return {
2644
+ success: false,
2645
+ error: 'A operacao dynamicPage.surface.open exige um registro selecionado e um host de pagina dinamica capaz de materializar a superficie.',
2646
+ };
2647
+ }
2648
+ continue;
2649
+ }
2586
2650
  warnings.push(`Operacao runtime ignorada: ${operation.operationId}`);
2587
2651
  }
2588
2652
  return {
@@ -2599,6 +2663,16 @@ class TableAiAdapter extends BaseAiAdapter {
2599
2663
  isExportScope(value) {
2600
2664
  return TABLE_EXPORT_SCOPES.includes(value);
2601
2665
  }
2666
+ getRecordSurfaceById(surfaceId) {
2667
+ const normalized = surfaceId.trim().toLowerCase();
2668
+ if (!normalized)
2669
+ return null;
2670
+ const recordSurfaces = this.getRecordSurfaceAuthoringContext();
2671
+ const surfaces = Array.isArray(recordSurfaces?.['surfaces']) ? recordSurfaces['surfaces'] : [];
2672
+ return surfaces
2673
+ .map((surface) => this.toRecord(surface))
2674
+ .find((surface) => this.stringValue(surface?.['id']).toLowerCase() === normalized) ?? null;
2675
+ }
2602
2676
  toRecord(value) {
2603
2677
  return value && typeof value === 'object' && !Array.isArray(value)
2604
2678
  ? value
@@ -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-Cy5oXKp3.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-yrCWkQrc.mjs';
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@praxisui/table",
3
- "version": "8.0.0-beta.41",
3
+ "version": "8.0.0-beta.43",
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.41",
9
- "@praxisui/core": "^8.0.0-beta.41",
10
- "@praxisui/dynamic-fields": "^8.0.0-beta.41",
11
- "@praxisui/dynamic-form": "^8.0.0-beta.41",
12
- "@praxisui/metadata-editor": "^8.0.0-beta.41",
13
- "@praxisui/rich-content": "^8.0.0-beta.41",
14
- "@praxisui/settings-panel": "^8.0.0-beta.41",
15
- "@praxisui/table-rule-builder": "^8.0.0-beta.41",
8
+ "@praxisui/ai": "^8.0.0-beta.43",
9
+ "@praxisui/core": "^8.0.0-beta.43",
10
+ "@praxisui/dynamic-fields": "^8.0.0-beta.43",
11
+ "@praxisui/dynamic-form": "^8.0.0-beta.43",
12
+ "@praxisui/metadata-editor": "^8.0.0-beta.43",
13
+ "@praxisui/rich-content": "^8.0.0-beta.43",
14
+ "@praxisui/settings-panel": "^8.0.0-beta.43",
15
+ "@praxisui/table-rule-builder": "^8.0.0-beta.43",
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.41",
20
+ "@praxisui/dialog": "^8.0.0-beta.43",
21
21
  "rxjs": "~7.8.0"
22
22
  },
23
23
  "dependencies": {
@@ -1,5 +1,5 @@
1
1
  import * as _praxisui_core from '@praxisui/core';
2
- import { TableConfig, LoggerService, PraxisI18nService, GlobalConfigService, AsyncConfigStorage, FieldMetadata, SchemaIdParams, FormConfig, GenericCrudService, DynamicFormService, SchemaNormalizerService, ComponentKeyService, ComponentDocMeta, PraxisTextValue, PraxisAnalyticsProjection, PraxisDataQueryContext, ApiUrlConfig, PraxisQueryFilterExpression, LoadingState, RestApiLinks, ColumnDefinition, RichBlockNode, ResourceCapabilityDigest, ConnectionStorage, LoadingOrchestrator, GlobalActionService, PraxisLoadingRenderer, TableDetailRichListNode, TableDetailCardGridNode, TableDetailCardGridCardNode, TableDetailTimelineNode, JsonLogicDataRecord, TableDetailListItemAction, TableDetailActionBarNode, TableDetailActionBarAction, TableDetailRefNode, TableDetailTemplateRefNode, TableDetailDiagramEmbedNode, TableDetailEmbedAction, PraxisExportScope, GlobalActionRef, PraxisRuntimeGlobalActionEffect, ResourceActionCatalogItem, ResourceSurfaceCatalogItem, JsonLogicExpression, GlobalActionCatalogEntry, IconPickerService, SurfaceOpenPayload, GlobalActionField, FieldDefinition, PraxisRuntimeConditionalEffectRule, PraxisJsonLogicService, TableConfigService, SettingsValueProvider as SettingsValueProvider$1, AnalyticsSchemaContractService, AnalyticsPresentationResolver, RichPresenterNode, RichComposeNode, ComponentAuthoringManifest, AiCapability, AiCapabilityCategory, AiValueKind, AiCapabilityCatalog } from '@praxisui/core';
2
+ import { TableConfig, LoggerService, PraxisI18nService, GlobalConfigService, AsyncConfigStorage, FieldMetadata, SchemaIdParams, FormConfig, GenericCrudService, DynamicFormService, SchemaNormalizerService, ComponentKeyService, ComponentDocMeta, PraxisTextValue, PraxisAnalyticsProjection, PraxisDataQueryContext, ApiUrlConfig, PraxisQueryFilterExpression, RecordRelatedSurfaceContextPack, LoadingState, RestApiLinks, ColumnDefinition, RichBlockNode, ResourceCapabilityDigest, ConnectionStorage, LoadingOrchestrator, GlobalActionService, PraxisLoadingRenderer, TableDetailRichListNode, TableDetailCardGridNode, TableDetailCardGridCardNode, TableDetailTimelineNode, JsonLogicDataRecord, TableDetailListItemAction, TableDetailActionBarNode, TableDetailActionBarAction, TableDetailRefNode, TableDetailTemplateRefNode, TableDetailDiagramEmbedNode, TableDetailEmbedAction, PraxisExportScope, GlobalActionRef, PraxisRuntimeGlobalActionEffect, ResourceActionCatalogItem, ResourceSurfaceCatalogItem, JsonLogicExpression, GlobalActionCatalogEntry, IconPickerService, SurfaceOpenPayload, GlobalActionField, FieldDefinition, PraxisRuntimeConditionalEffectRule, PraxisJsonLogicService, TableConfigService, SettingsValueProvider as SettingsValueProvider$1, AnalyticsSchemaContractService, AnalyticsPresentationResolver, RichPresenterNode, RichComposeNode, ComponentAuthoringManifest, AiCapability, AiCapabilityCategory, AiValueKind, AiCapabilityCatalog } from '@praxisui/core';
3
3
  import * as i0 from '@angular/core';
4
4
  import { OnDestroy, EventEmitter, ElementRef, OnInit, OnChanges, AfterViewInit, DoCheck, DestroyRef, ChangeDetectorRef, NgZone, SimpleChanges, ComponentRef, Provider, AfterContentInit, Injector } from '@angular/core';
5
5
  import { ActivatedRoute } from '@angular/router';
@@ -985,6 +985,9 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
985
985
  crudContext: any;
986
986
  filterCriteria: Record<string, any>;
987
987
  queryContext: PraxisDataQueryContextBridge | null;
988
+ aiContext: {
989
+ recordSurfaces?: RecordRelatedSurfaceContextPack | null;
990
+ } | null;
988
991
  advancedFilterValue: Record<string, any>;
989
992
  advancedFilterRuntimeVisibleFields: string[];
990
993
  private advancedFilterAlwaysVisibleCacheKey;
@@ -993,6 +996,7 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
993
996
  private advancedFilterMetadataOverridesCacheSource?;
994
997
  private advancedFilterMetadataOverridesCache?;
995
998
  rowClick: EventEmitter<any>;
999
+ widgetEvent: EventEmitter<any>;
996
1000
  rowDoubleClick: EventEmitter<any>;
997
1001
  rowExpansionChange: EventEmitter<RowExpansionChangeEvent>;
998
1002
  rowAction: EventEmitter<any>;
@@ -1320,6 +1324,7 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
1320
1324
  onPageChange(event: PageEvent): void;
1321
1325
  onSortChange(event: Sort): void;
1322
1326
  onRowClicked(row: any, index: number, event?: MouseEvent): void;
1327
+ requestRecordSurfaceOpen(surface: Record<string, unknown>): boolean;
1323
1328
  isRowExpansionRuntimeEnabled(): boolean;
1324
1329
  isExpansionIconTriggerEnabled(): boolean;
1325
1330
  isRowExpandable(row: any, index?: number): boolean;
@@ -2096,7 +2101,7 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
2096
2101
  private scheduleRowDiscoveryMarkForCheck;
2097
2102
  ngOnDestroy(): void;
2098
2103
  static ɵfac: i0.ɵɵFactoryDeclaration<PraxisTable, [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
2099
- static ɵcmp: i0.ɵɵComponentDeclaration<PraxisTable, "praxis-table", never, { "config": { "alias": "config"; "required": false; }; "resourcePath": { "alias": "resourcePath"; "required": false; }; "data": { "alias": "data"; "required": false; }; "tableId": { "alias": "tableId"; "required": true; }; "componentInstanceId": { "alias": "componentInstanceId"; "required": false; }; "title": { "alias": "title"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "autoDelete": { "alias": "autoDelete"; "required": false; }; "notifyIfOutdated": { "alias": "notifyIfOutdated"; "required": false; }; "snoozeMs": { "alias": "snoozeMs"; "required": false; }; "autoOpenSettingsOnOutdated": { "alias": "autoOpenSettingsOnOutdated"; "required": false; }; "crudContext": { "alias": "crudContext"; "required": false; }; "filterCriteria": { "alias": "filterCriteria"; "required": false; }; "queryContext": { "alias": "queryContext"; "required": false; }; "horizontalScroll": { "alias": "horizontalScroll"; "required": false; }; "enableCustomization": { "alias": "enableCustomization"; "required": false; }; "dense": { "alias": "dense"; "required": false; }; }, { "rowClick": "rowClick"; "rowDoubleClick": "rowDoubleClick"; "rowExpansionChange": "rowExpansionChange"; "rowAction": "rowAction"; "toolbarAction": "toolbarAction"; "bulkAction": "bulkAction"; "exportAction": "exportAction"; "columnReorder": "columnReorder"; "columnReorderAttempt": "columnReorderAttempt"; "beforeDelete": "beforeDelete"; "afterDelete": "afterDelete"; "deleteError": "deleteError"; "beforeBulkDelete": "beforeBulkDelete"; "afterBulkDelete": "afterBulkDelete"; "bulkDeleteError": "bulkDeleteError"; "schemaStatusChange": "schemaStatusChange"; "configChange": "configChange"; "metadataChange": "metadataChange"; "loadingStateChange": "loadingStateChange"; "collectionLinksChange": "collectionLinksChange"; "selectionChange": "selectionChange"; }, ["toolbar", "projectedFilter"], ["[advancedFilter]", "[toolbar]", "[advancedFilter]", "[toolbar]", "[advancedFilter]", "[toolbar]"], true, never>;
2104
+ static ɵcmp: i0.ɵɵComponentDeclaration<PraxisTable, "praxis-table", never, { "config": { "alias": "config"; "required": false; }; "resourcePath": { "alias": "resourcePath"; "required": false; }; "data": { "alias": "data"; "required": false; }; "tableId": { "alias": "tableId"; "required": true; }; "componentInstanceId": { "alias": "componentInstanceId"; "required": false; }; "title": { "alias": "title"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "autoDelete": { "alias": "autoDelete"; "required": false; }; "notifyIfOutdated": { "alias": "notifyIfOutdated"; "required": false; }; "snoozeMs": { "alias": "snoozeMs"; "required": false; }; "autoOpenSettingsOnOutdated": { "alias": "autoOpenSettingsOnOutdated"; "required": false; }; "crudContext": { "alias": "crudContext"; "required": false; }; "filterCriteria": { "alias": "filterCriteria"; "required": false; }; "queryContext": { "alias": "queryContext"; "required": false; }; "aiContext": { "alias": "aiContext"; "required": false; }; "horizontalScroll": { "alias": "horizontalScroll"; "required": false; }; "enableCustomization": { "alias": "enableCustomization"; "required": false; }; "dense": { "alias": "dense"; "required": false; }; }, { "rowClick": "rowClick"; "widgetEvent": "widgetEvent"; "rowDoubleClick": "rowDoubleClick"; "rowExpansionChange": "rowExpansionChange"; "rowAction": "rowAction"; "toolbarAction": "toolbarAction"; "bulkAction": "bulkAction"; "exportAction": "exportAction"; "columnReorder": "columnReorder"; "columnReorderAttempt": "columnReorderAttempt"; "beforeDelete": "beforeDelete"; "afterDelete": "afterDelete"; "deleteError": "deleteError"; "beforeBulkDelete": "beforeBulkDelete"; "afterBulkDelete": "afterBulkDelete"; "bulkDeleteError": "bulkDeleteError"; "schemaStatusChange": "schemaStatusChange"; "configChange": "configChange"; "metadataChange": "metadataChange"; "loadingStateChange": "loadingStateChange"; "collectionLinksChange": "collectionLinksChange"; "selectionChange": "selectionChange"; }, ["toolbar", "projectedFilter"], ["[advancedFilter]", "[toolbar]", "[advancedFilter]", "[toolbar]", "[advancedFilter]", "[toolbar]"], true, never>;
2100
2105
  static ngAcceptInputType_enableCustomization: unknown;
2101
2106
  }
2102
2107