@praxisui/table 3.0.0-beta.8 → 4.0.0-beta.0
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.
- package/README.md +49 -0
- package/fesm2022/praxisui-table-filter-drawer-adapter.mjs +0 -1
- package/fesm2022/praxisui-table-filter-form-dialog-host.component-EHoM1uuJ.mjs +0 -1
- package/fesm2022/praxisui-table-table-ai.adapter-C5rjLb8E.mjs +0 -1
- package/fesm2022/praxisui-table.mjs +3056 -1023
- package/index.d.ts +197 -9
- package/package.json +7 -7
- package/fesm2022/praxisui-table-filter-drawer-adapter.mjs.map +0 -1
- package/fesm2022/praxisui-table-filter-form-dialog-host.component-EHoM1uuJ.mjs.map +0 -1
- package/fesm2022/praxisui-table-table-ai.adapter-C5rjLb8E.mjs.map +0 -1
- package/fesm2022/praxisui-table.mjs.map +0 -1
package/index.d.ts
CHANGED
|
@@ -10,13 +10,14 @@ import { CdkDragDrop, CdkDragEnd, CdkDrag, CdkDropList } from '@angular/cdk/drag
|
|
|
10
10
|
import { BehaviorSubject, Subscription, Observable } from 'rxjs';
|
|
11
11
|
import { SettingsPanelService, SettingsValueProvider } from '@praxisui/settings-panel';
|
|
12
12
|
import * as _praxisui_core from '@praxisui/core';
|
|
13
|
-
import { TableConfig, LoggerService, GlobalConfigService, AsyncConfigStorage, FieldMetadata, SchemaIdParams, FormConfig, GenericCrudService, DynamicFormService, SchemaNormalizerService, ComponentKeyService, ComponentDocMeta, LoadingState, ColumnDefinition, ConnectionStorage, LoadingOrchestrator, PraxisLoadingRenderer, GlobalActionSpec, IconPickerService, SurfaceOpenPayload, GlobalActionField, TableConfigService, FieldDefinition, AiCapabilityCategory, AiValueKind, AiCapability, AiCapabilityCatalog } from '@praxisui/core';
|
|
13
|
+
import { TableConfig, LoggerService, GlobalConfigService, AsyncConfigStorage, FieldMetadata, SchemaIdParams, FormConfig, GenericCrudService, DynamicFormService, SchemaNormalizerService, ComponentKeyService, ComponentDocMeta, LoadingState, RestApiLinks, ColumnDefinition, ConnectionStorage, ResourceDiscoveryService, LoadingOrchestrator, PraxisLoadingRenderer, ResourceActionCatalogItem, GlobalActionSpec, IconPickerService, SurfaceOpenPayload, GlobalActionField, TableConfigService, PraxisTextValue, PraxisAnalyticsProjection, PraxisDataQueryContext, ApiUrlConfig, AnalyticsSchemaContractService, AnalyticsPresentationResolver, FieldDefinition, AiCapabilityCategory, AiValueKind, AiCapability, AiCapabilityCatalog } from '@praxisui/core';
|
|
14
14
|
import { FunctionRegistry, DslParser } from '@praxisui/specification';
|
|
15
15
|
import { FormGroup, FormControl, FormBuilder } from '@angular/forms';
|
|
16
16
|
import { MatDialog } from '@angular/material/dialog';
|
|
17
17
|
import { CdkOverlayOrigin, ConnectedPosition } from '@angular/cdk/overlay';
|
|
18
18
|
import { PraxisDialog } from '@praxisui/dialog';
|
|
19
19
|
import { MatTabChangeEvent } from '@angular/material/tabs';
|
|
20
|
+
import { HttpClient } from '@angular/common/http';
|
|
20
21
|
import * as _angular_material_paginator_d_Zo1cMMo4 from '@angular/material/paginator.d-Zo1cMMo4';
|
|
21
22
|
import { MatCheckboxChange } from '@angular/material/checkbox';
|
|
22
23
|
import * as _praxisui_table_rule_builder from '@praxisui/table-rule-builder';
|
|
@@ -833,8 +834,20 @@ type RowActionRuntimeOptions = {
|
|
|
833
834
|
payload?: any;
|
|
834
835
|
actionConfig?: any;
|
|
835
836
|
};
|
|
837
|
+
type RuntimeRowAction = {
|
|
838
|
+
id: string;
|
|
839
|
+
action: string;
|
|
840
|
+
label?: string;
|
|
841
|
+
icon?: string;
|
|
842
|
+
color?: string;
|
|
843
|
+
tooltip?: string;
|
|
844
|
+
disabled?: boolean;
|
|
845
|
+
overflow?: boolean;
|
|
846
|
+
__praxisDiscoveredAction?: ResourceActionCatalogItem;
|
|
847
|
+
__praxisCapabilityDenied?: boolean;
|
|
848
|
+
};
|
|
836
849
|
type ExpansionDetailRuntimeStatus = 'idle' | 'loading' | 'ready' | 'error' | 'blocked';
|
|
837
|
-
type ExpansionDetailResolvedSource = 'inline' | 'resource' | 'resourcePath' | 'fallback';
|
|
850
|
+
type ExpansionDetailResolvedSource = 'inline' | 'resource' | 'resourcePath' | 'hypermedia' | 'fallback';
|
|
838
851
|
type ExpansionDetailViewState = {
|
|
839
852
|
status: ExpansionDetailRuntimeStatus;
|
|
840
853
|
schema: Record<string, unknown> | null;
|
|
@@ -854,6 +867,7 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
854
867
|
private connectionStorage;
|
|
855
868
|
private hostRef;
|
|
856
869
|
private global;
|
|
870
|
+
private resourceDiscovery;
|
|
857
871
|
private componentKeys;
|
|
858
872
|
private loadingOrchestrator;
|
|
859
873
|
private loadingRenderer?;
|
|
@@ -861,6 +875,10 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
861
875
|
private logger?;
|
|
862
876
|
private static dslRuntimeInstanceCounter;
|
|
863
877
|
private static readonly CELL_ANIMATION_CHANGE_CACHE_LIMIT;
|
|
878
|
+
private static readonly ROW_DISCOVERY_SUCCESS_CACHE_TTL_MS;
|
|
879
|
+
private static readonly ROW_DISCOVERY_ERROR_CACHE_TTL_MS;
|
|
880
|
+
private static readonly ROW_DISCOVERY_CACHE_LIMIT;
|
|
881
|
+
private static readonly ROW_DISCOVERY_MAX_CONCURRENT_REQUESTS;
|
|
864
882
|
private static readonly ROW_ANIMATION_PRESETS;
|
|
865
883
|
private static readonly ROW_ANIMATION_PRESET_ALIASES;
|
|
866
884
|
config: TableConfig;
|
|
@@ -896,6 +914,7 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
896
914
|
schemaStatusChange: EventEmitter<any>;
|
|
897
915
|
metadataChange: EventEmitter<any>;
|
|
898
916
|
loadingStateChange: EventEmitter<LoadingState>;
|
|
917
|
+
collectionLinksChange: EventEmitter<RestApiLinks | null>;
|
|
899
918
|
paginator: MatPaginator;
|
|
900
919
|
sort: MatSort;
|
|
901
920
|
materialTable?: MatTable<any>;
|
|
@@ -940,6 +959,24 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
940
959
|
private expansionDetailSourceByRowKey;
|
|
941
960
|
private expansionDetailAbortByRowKey;
|
|
942
961
|
private expansionDetailActiveTabByRowKey;
|
|
962
|
+
private rowCapabilitySnapshotByHref;
|
|
963
|
+
private rowCapabilityCachedAtByHref;
|
|
964
|
+
private rowCapabilityErrorHrefs;
|
|
965
|
+
private rowCapabilityErrorCachedAtByHref;
|
|
966
|
+
private rowCapabilityInFlightByHref;
|
|
967
|
+
private rowActionCatalogByHref;
|
|
968
|
+
private rowActionCachedAtByHref;
|
|
969
|
+
private rowActionErrorHrefs;
|
|
970
|
+
private rowActionErrorCachedAtByHref;
|
|
971
|
+
private rowActionInFlightByHref;
|
|
972
|
+
private rowDiscoveryMetricsByRel;
|
|
973
|
+
private rowContextRuntimeByRef;
|
|
974
|
+
private rowDiscoveryQueue;
|
|
975
|
+
private rowDiscoveryActiveRequests;
|
|
976
|
+
private rowDiscoveryEpoch;
|
|
977
|
+
private rowDiscoveryMarkForCheckScheduled;
|
|
978
|
+
private lastRowDiscoveryScopeKey;
|
|
979
|
+
private readonly i18n;
|
|
943
980
|
private schemaFieldsSnapshot;
|
|
944
981
|
private runtimeSchemaMeta;
|
|
945
982
|
schemaError: boolean;
|
|
@@ -1069,8 +1106,9 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
1069
1106
|
private filterConfigKey;
|
|
1070
1107
|
private ensureConfigDefaults;
|
|
1071
1108
|
private setShowToolbar;
|
|
1109
|
+
private shouldExposeToolbar;
|
|
1072
1110
|
private configureDslRuntime;
|
|
1073
|
-
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, componentKeys: ComponentKeyService, loadingOrchestrator: LoadingOrchestrator, loadingRenderer?: PraxisLoadingRenderer | undefined, route?: ActivatedRoute | undefined, logger?: LoggerService | undefined);
|
|
1111
|
+
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, resourceDiscovery: ResourceDiscoveryService, componentKeys: ComponentKeyService, loadingOrchestrator: LoadingOrchestrator, loadingRenderer?: PraxisLoadingRenderer | undefined, route?: ActivatedRoute | undefined, logger?: LoggerService | undefined);
|
|
1074
1112
|
private ensureAiAdapterLoaded;
|
|
1075
1113
|
private emitLoadingState;
|
|
1076
1114
|
private buildLoadingContext;
|
|
@@ -1128,6 +1166,7 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
1128
1166
|
private resolveExpansionDetailInlineSchema;
|
|
1129
1167
|
private resolveExpansionDetailFromResource;
|
|
1130
1168
|
private resolveExpansionDetailFromResourcePath;
|
|
1169
|
+
private resolveExpansionDetailFromHypermedia;
|
|
1131
1170
|
private normalizeExpansionDetailSchemaCandidate;
|
|
1132
1171
|
private sanitizeExpansionDetailSchema;
|
|
1133
1172
|
private sanitizeExpansionDetailNodes;
|
|
@@ -1142,6 +1181,13 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
1142
1181
|
private resolveExpansionContextValue;
|
|
1143
1182
|
private buildExpansionContextRecord;
|
|
1144
1183
|
private getExpansionFallbackMode;
|
|
1184
|
+
private loadExpansionHypermediaSnapshot;
|
|
1185
|
+
private buildExpansionHypermediaDetailSchema;
|
|
1186
|
+
private selectExpansionHypermediaPrimarySurface;
|
|
1187
|
+
private buildExpansionHypermediaOperationItems;
|
|
1188
|
+
private buildExpansionHypermediaWorkflowActionItems;
|
|
1189
|
+
private getExpansionHypermediaMessage;
|
|
1190
|
+
private describeExpansionHypermediaSurface;
|
|
1145
1191
|
private getExpansionFallbackNodePolicy;
|
|
1146
1192
|
private getExpansionAllowedNodesSet;
|
|
1147
1193
|
private validateExpansionDetailRendererContract;
|
|
@@ -1278,6 +1324,58 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
1278
1324
|
* Refined logic to reduce false positives
|
|
1279
1325
|
*/
|
|
1280
1326
|
private inferFieldTypeFromFieldName;
|
|
1327
|
+
private clearRowDiscoveryRuntime;
|
|
1328
|
+
private buildRowDiscoveryScopeKey;
|
|
1329
|
+
private resetRowContextRuntimeState;
|
|
1330
|
+
private enqueueRowDiscoveryRequest;
|
|
1331
|
+
private drainRowDiscoveryQueue;
|
|
1332
|
+
private buildRowDiscoveryOptions;
|
|
1333
|
+
private getRowLinks;
|
|
1334
|
+
private resolveRowDiscoveryHref;
|
|
1335
|
+
private prefetchRowDiscovery;
|
|
1336
|
+
private ensureRowDiscovery;
|
|
1337
|
+
private ensureRowCapabilitySnapshot;
|
|
1338
|
+
private ensureRowActionCatalog;
|
|
1339
|
+
private getCachedRowCapabilitySnapshot;
|
|
1340
|
+
private hasResolvedRowActionCatalog;
|
|
1341
|
+
isRowDiscoveryPending(row: any): boolean;
|
|
1342
|
+
private getCachedRowActionCatalog;
|
|
1343
|
+
private shouldUseRowDiscovery;
|
|
1344
|
+
private shouldPrefetchRowDiscovery;
|
|
1345
|
+
private hasRowContextualDiscoveryEntryPoint;
|
|
1346
|
+
private hasRowContextualDiscoveryEntryPointRaw;
|
|
1347
|
+
hasRowOverflowMenuLoadingState(row: any): boolean;
|
|
1348
|
+
getRowOverflowMenuLoadingLabel(): string;
|
|
1349
|
+
hasRowOverflowMenuEmptyState(row: any): boolean;
|
|
1350
|
+
getRowOverflowMenuEmptyLabel(row: any): string;
|
|
1351
|
+
private getLegacyRowOverflowMenuEmptyLabel;
|
|
1352
|
+
private getRowDiscoveryMetricSnapshot;
|
|
1353
|
+
private createEmptyRowDiscoveryMetricSnapshot;
|
|
1354
|
+
private incrementRowDiscoveryMetric;
|
|
1355
|
+
private setRowDiscoveryLastResolvedAt;
|
|
1356
|
+
private resolveRowDiscoveryRuntimeStatus;
|
|
1357
|
+
private resolveRowDiscoveryRuntimeStatusRaw;
|
|
1358
|
+
private getRowContextRuntimeState;
|
|
1359
|
+
private buildRowContextRuntimeState;
|
|
1360
|
+
private resolveRowContextRuntimeValidUntil;
|
|
1361
|
+
private resolveRowDiscoveryRelValidUntil;
|
|
1362
|
+
private getRowDiscoveryPendingRowCount;
|
|
1363
|
+
private getRowDiscoveryDebugSnapshot;
|
|
1364
|
+
private hasFreshRowCapabilitySnapshot;
|
|
1365
|
+
private hasFreshRowActionCatalog;
|
|
1366
|
+
private hasFreshRowCapabilityError;
|
|
1367
|
+
private hasFreshRowActionError;
|
|
1368
|
+
private hasFreshRowDiscoveryEntry;
|
|
1369
|
+
private hasFreshRowDiscoveryError;
|
|
1370
|
+
private rememberRowCapabilitySnapshot;
|
|
1371
|
+
private rememberRowActionCatalog;
|
|
1372
|
+
private rememberRowCapabilityError;
|
|
1373
|
+
private rememberRowActionError;
|
|
1374
|
+
private clearRowCapabilityError;
|
|
1375
|
+
private clearRowActionError;
|
|
1376
|
+
private enforceRowDiscoveryCacheLimit;
|
|
1377
|
+
private pruneRowDiscoveryCaches;
|
|
1378
|
+
private pruneRowDiscoveryCache;
|
|
1281
1379
|
private fetchData;
|
|
1282
1380
|
private getEffectiveFilterCriteria;
|
|
1283
1381
|
retryData(): void;
|
|
@@ -1549,15 +1647,33 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
1549
1647
|
getInlineRowActions(row: any): any[];
|
|
1550
1648
|
getOverflowRowActions(row: any): any[];
|
|
1551
1649
|
hasOverflowRowActions(row: any): boolean;
|
|
1650
|
+
onRowOverflowMenuOpened(row: any): void;
|
|
1552
1651
|
private getVisibleRowActions;
|
|
1652
|
+
private getResolvedRowActions;
|
|
1653
|
+
private buildResolvedRowActions;
|
|
1654
|
+
private splitVisibleRowActionsFromVisible;
|
|
1655
|
+
private decorateConfiguredRowAction;
|
|
1656
|
+
private getDiscoveredRowWorkflowActions;
|
|
1657
|
+
private getDiscoveredRowWorkflowActionsFromCatalog;
|
|
1658
|
+
private supportsRowCrudAction;
|
|
1659
|
+
private isCapabilityManagedCrudRowAction;
|
|
1660
|
+
private findItemWorkflowAction;
|
|
1661
|
+
private getUnavailableWorkflowMessage;
|
|
1662
|
+
private normalizeActionId;
|
|
1553
1663
|
private isActionVisible;
|
|
1554
1664
|
trackAction(index: number, item: any): any;
|
|
1555
1665
|
isActionDisabled(action: any, row: any): boolean;
|
|
1666
|
+
getRowActionRuntimeOptions(action: RuntimeRowAction, row: any): RowActionRuntimeOptions | undefined;
|
|
1667
|
+
isWorkflowRowAction(action: RuntimeRowAction | any): boolean;
|
|
1668
|
+
isBlockedWorkflowRowAction(action: RuntimeRowAction | any, row: any): boolean;
|
|
1669
|
+
getActionTooltip(action: RuntimeRowAction | any, row: any): string | null;
|
|
1670
|
+
getRowMenuTooltip(row: any): string;
|
|
1556
1671
|
getRowMenuButtonColor(): any;
|
|
1557
1672
|
getRowMenuIcon(): string;
|
|
1673
|
+
private scheduleRowDiscoveryMarkForCheck;
|
|
1558
1674
|
ngOnDestroy(): void;
|
|
1559
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisTable, [null, null, null, null, null, null, null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
1560
|
-
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; }; "dslFunctionRegistry": { "alias": "dslFunctionRegistry"; "required": false; }; "filterCriteria": { "alias": "filterCriteria"; "required": false; }; "queryContext": { "alias": "queryContext"; "required": false; }; "enableCustomization": { "alias": "enableCustomization"; "required": false; }; "dense": { "alias": "dense"; "required": false; }; }, { "rowClick": "rowClick"; "rowDoubleClick": "rowDoubleClick"; "rowExpansionChange": "rowExpansionChange"; "rowAction": "rowAction"; "toolbarAction": "toolbarAction"; "bulkAction": "bulkAction"; "columnReorder": "columnReorder"; "columnReorderAttempt": "columnReorderAttempt"; "beforeDelete": "beforeDelete"; "afterDelete": "afterDelete"; "deleteError": "deleteError"; "beforeBulkDelete": "beforeBulkDelete"; "afterBulkDelete": "afterBulkDelete"; "bulkDeleteError": "bulkDeleteError"; "schemaStatusChange": "schemaStatusChange"; "metadataChange": "metadataChange"; "loadingStateChange": "loadingStateChange"; }, ["toolbar", "projectedFilter"], ["[advancedFilter]", "[toolbar]", "[advancedFilter]", "[toolbar]", "[advancedFilter]", "[toolbar]"], true, never>;
|
|
1675
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PraxisTable, [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
1676
|
+
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; }; "dslFunctionRegistry": { "alias": "dslFunctionRegistry"; "required": false; }; "filterCriteria": { "alias": "filterCriteria"; "required": false; }; "queryContext": { "alias": "queryContext"; "required": false; }; "enableCustomization": { "alias": "enableCustomization"; "required": false; }; "dense": { "alias": "dense"; "required": false; }; }, { "rowClick": "rowClick"; "rowDoubleClick": "rowDoubleClick"; "rowExpansionChange": "rowExpansionChange"; "rowAction": "rowAction"; "toolbarAction": "toolbarAction"; "bulkAction": "bulkAction"; "columnReorder": "columnReorder"; "columnReorderAttempt": "columnReorderAttempt"; "beforeDelete": "beforeDelete"; "afterDelete": "afterDelete"; "deleteError": "deleteError"; "beforeBulkDelete": "beforeBulkDelete"; "afterBulkDelete": "afterBulkDelete"; "bulkDeleteError": "bulkDeleteError"; "schemaStatusChange": "schemaStatusChange"; "metadataChange": "metadataChange"; "loadingStateChange": "loadingStateChange"; "collectionLinksChange": "collectionLinksChange"; }, ["toolbar", "projectedFilter"], ["[advancedFilter]", "[toolbar]", "[advancedFilter]", "[toolbar]", "[advancedFilter]", "[toolbar]"], true, never>;
|
|
1561
1677
|
static ngAcceptInputType_enableCustomization: unknown;
|
|
1562
1678
|
}
|
|
1563
1679
|
|
|
@@ -2092,7 +2208,7 @@ interface ToolbarAction {
|
|
|
2092
2208
|
icon?: string;
|
|
2093
2209
|
type: 'button' | 'icon' | 'fab' | 'menu';
|
|
2094
2210
|
color?: 'primary' | 'accent' | 'warn';
|
|
2095
|
-
/**
|
|
2211
|
+
/** Material button appearance: filled (flat), outlined (stroked), elevated (raised), text, tonal */
|
|
2096
2212
|
appearance?: 'filled' | 'outlined' | 'elevated' | 'text' | 'tonal';
|
|
2097
2213
|
action: string;
|
|
2098
2214
|
position: 'start' | 'end';
|
|
@@ -2545,6 +2661,7 @@ type EffectiveDataMode = 'remote' | 'local' | 'empty';
|
|
|
2545
2661
|
declare class PraxisTableConfigEditor implements OnInit, OnDestroy, SettingsValueProvider {
|
|
2546
2662
|
private cdr;
|
|
2547
2663
|
private configService;
|
|
2664
|
+
private readonly i18n;
|
|
2548
2665
|
filterSettingsEditor?: FilterSettingsComponent;
|
|
2549
2666
|
behaviorEditor?: BehaviorConfigEditorComponent;
|
|
2550
2667
|
set crudEditorSetter(ref: any);
|
|
@@ -2609,7 +2726,6 @@ declare class PraxisTableConfigEditor implements OnInit, OnDestroy, SettingsValu
|
|
|
2609
2726
|
private readonly panelData;
|
|
2610
2727
|
private readonly crudService;
|
|
2611
2728
|
private readonly panelRef;
|
|
2612
|
-
private readonly i18n;
|
|
2613
2729
|
constructor(cdr: ChangeDetectorRef, configService: TableConfigService);
|
|
2614
2730
|
tx(key: string, fallback: string): string;
|
|
2615
2731
|
private isDebugLoggingEnabled;
|
|
@@ -2770,6 +2886,78 @@ declare class DataFormatterComponent implements OnInit, OnChanges {
|
|
|
2770
2886
|
static ɵcmp: i0.ɵɵComponentDeclaration<DataFormatterComponent, "data-formatter", never, { "columnType": { "alias": "columnType"; "required": false; }; "currentFormat": { "alias": "currentFormat"; "required": false; }; }, { "formatChange": "formatChange"; }, never, never, true, never>;
|
|
2771
2887
|
}
|
|
2772
2888
|
|
|
2889
|
+
type AnalyticsTableRow = Record<string, string | number | boolean | null>;
|
|
2890
|
+
type AnalyticsTableContractSource = 'remote' | 'fallback';
|
|
2891
|
+
interface AnalyticsTableViewModel {
|
|
2892
|
+
config: TableConfig;
|
|
2893
|
+
data: AnalyticsTableRow[];
|
|
2894
|
+
}
|
|
2895
|
+
interface AnalyticsTableContractDefinition<TKey extends string = string> {
|
|
2896
|
+
key: TKey;
|
|
2897
|
+
projectionId: string;
|
|
2898
|
+
path: string;
|
|
2899
|
+
title: PraxisTextValue;
|
|
2900
|
+
subtitle?: PraxisTextValue;
|
|
2901
|
+
fallbackProjection: PraxisAnalyticsProjection;
|
|
2902
|
+
fallbackRows?: AnalyticsTableRow[];
|
|
2903
|
+
}
|
|
2904
|
+
interface AnalyticsTableContractLoadOptions<TKey extends string = string> {
|
|
2905
|
+
cacheNamespace?: string;
|
|
2906
|
+
queryContexts?: Partial<Record<TKey, PraxisDataQueryContext | null>>;
|
|
2907
|
+
}
|
|
2908
|
+
interface AnalyticsTableContractLoadResult<TKey extends string = string> {
|
|
2909
|
+
views: Record<TKey, AnalyticsTableViewModel>;
|
|
2910
|
+
sources: Record<TKey, AnalyticsTableContractSource>;
|
|
2911
|
+
errors: Partial<Record<TKey, string>>;
|
|
2912
|
+
}
|
|
2913
|
+
|
|
2914
|
+
interface AnalyticsTableConfigAdapterOptions {
|
|
2915
|
+
title?: PraxisTextValue;
|
|
2916
|
+
subtitle?: PraxisTextValue;
|
|
2917
|
+
}
|
|
2918
|
+
declare class AnalyticsTableConfigAdapterService {
|
|
2919
|
+
toTableConfig(projection: PraxisAnalyticsProjection, options?: AnalyticsTableConfigAdapterOptions): TableConfig;
|
|
2920
|
+
private buildColumns;
|
|
2921
|
+
private getDisplayMetrics;
|
|
2922
|
+
private resolveTextValue;
|
|
2923
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AnalyticsTableConfigAdapterService, never>;
|
|
2924
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AnalyticsTableConfigAdapterService>;
|
|
2925
|
+
}
|
|
2926
|
+
|
|
2927
|
+
declare class AnalyticsTableStatsApiService {
|
|
2928
|
+
private readonly http;
|
|
2929
|
+
private readonly apiUrl;
|
|
2930
|
+
private readonly statsBuilder;
|
|
2931
|
+
constructor(http: HttpClient, apiUrl: ApiUrlConfig);
|
|
2932
|
+
execute(projection: PraxisAnalyticsProjection, queryContext?: PraxisDataQueryContext | null): Promise<AnalyticsTableRow[]>;
|
|
2933
|
+
private toTableRows;
|
|
2934
|
+
private resolveTimeSeriesCategory;
|
|
2935
|
+
private resolveBucketCategory;
|
|
2936
|
+
private projectMetricValues;
|
|
2937
|
+
private resolveMetricValue;
|
|
2938
|
+
private buildStatsUrl;
|
|
2939
|
+
private applyQueryContext;
|
|
2940
|
+
private normalizeError;
|
|
2941
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AnalyticsTableStatsApiService, never>;
|
|
2942
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AnalyticsTableStatsApiService>;
|
|
2943
|
+
}
|
|
2944
|
+
|
|
2945
|
+
declare class AnalyticsTableContractService {
|
|
2946
|
+
private readonly analyticsSchema;
|
|
2947
|
+
private readonly resolver;
|
|
2948
|
+
private readonly configAdapter;
|
|
2949
|
+
private readonly statsApi;
|
|
2950
|
+
constructor(analyticsSchema: AnalyticsSchemaContractService, resolver: AnalyticsPresentationResolver, configAdapter: AnalyticsTableConfigAdapterService, statsApi: AnalyticsTableStatsApiService);
|
|
2951
|
+
buildBootstrapTableViews<TKey extends string>(definitions: readonly AnalyticsTableContractDefinition<TKey>[]): Record<TKey, AnalyticsTableViewModel>;
|
|
2952
|
+
loadTableViews<TKey extends string>(definitions: readonly AnalyticsTableContractDefinition<TKey>[], options?: AnalyticsTableContractLoadOptions<TKey>): Promise<AnalyticsTableContractLoadResult<TKey>>;
|
|
2953
|
+
private loadSingleTableView;
|
|
2954
|
+
private buildTableView;
|
|
2955
|
+
private assertAnalyticTableProjection;
|
|
2956
|
+
private resolveQueryContext;
|
|
2957
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AnalyticsTableContractService, never>;
|
|
2958
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AnalyticsTableContractService>;
|
|
2959
|
+
}
|
|
2960
|
+
|
|
2773
2961
|
declare function createTableAuthoringDocument(source: {
|
|
2774
2962
|
config?: unknown;
|
|
2775
2963
|
bindings?: unknown;
|
|
@@ -3298,5 +3486,5 @@ interface CapabilityCatalog extends AiCapabilityCatalog {
|
|
|
3298
3486
|
}
|
|
3299
3487
|
declare const TABLE_COMPONENT_AI_CAPABILITIES: CapabilityCatalog;
|
|
3300
3488
|
|
|
3301
|
-
export { BOOLEAN_PRESETS, BehaviorConfigEditorComponent, CURRENCY_PRESETS, ColumnsConfigEditorComponent, DATE_PRESETS, DataFormatterComponent, DataFormattingService, FORMULA_TEMPLATES, FilterConfigService, FilterSettingsComponent, FormulaGeneratorService, JsonConfigEditorComponent, MessagesLocalizationEditorComponent, NUMBER_PRESETS, PERCENTAGE_PRESETS, PRAXIS_FILTER_COMPONENT_METADATA, PRAXIS_TABLE_COMPONENT_METADATA, PraxisFilter, PraxisTable, PraxisTableConfigEditor, PraxisTableToolbar, STRING_PRESETS, TABLE_AI_CAPABILITIES, TABLE_COMPONENT_AI_CAPABILITIES, TASK_PRESETS, TableDefaultsProvider, TableRulesEditorComponent, ToolbarActionsEditorComponent, ValueMappingEditorComponent, VisualFormulaBuilderComponent, buildTableApplyPlan, createTableAuthoringDocument, getActionId, getEnum, getTableCapabilities, hasJsonKey, jsonPathGet, jsonPathMatches, normalizeTableAuthoringDocument, parseLegacyOrTableDocument, providePraxisFilterMetadata, providePraxisTableMetadata, registerDateDslFunctions, registerJsonDslFunctions, serializeTableAuthoringDocument, toCanonicalTableConfig, validateTableAuthoringDocument };
|
|
3302
|
-
export type { ActionLike, ArithmeticParams, BehaviorConfigChange, BooleanFormatterOptions, BulkAction, Capability$1 as Capability, CapabilityCatalog$1 as CapabilityCatalog, CapabilityCategory$1 as CapabilityCategory, ColumnChange, ColumnDataType$1 as ColumnDataType, ConcatenationParams, ConditionalMappingParams, CurrencyFormatterOptions, DataFormattingOptions, DataMode, DateFormatterOptions, DefaultValueParams, EditorDiagnostic, EditorDocument, FieldSchema, FilterConfig, FilterTag, FormatPreset, FormatterConfig, FormulaDefinition, FormulaParameterSchema, FormulaParams, FormulaTemplate, FormulaType, I18n, JsonEditorEvent, JsonValidationResult, MessagesLocalizationChange, NestedPropertyParams, NumberFormatterOptions, PercentageFormatterOptions, ResourcePathIntent, RowAction, RowExpansionChangeBase, RowExpansionChangeEvent, RowExpansionReasonCode, RowExpansionTrigger, StringFormatterOptions, TableApplyPlan, TableAuthoringDocument, TableBindings, Capability as TableComponentCapability, CapabilityCatalog as TableComponentCapabilityCatalog, CapabilityCategory as TableComponentCapabilityCategory, ValueKind as TableComponentValueKind, TableHorizontalScroll, TableProjectionContext, TableRuntimeContext, TableValidationContext, ToolbarAction, ToolbarActionsChange, ValueKind$1 as ValueKind, ValueMappingPair };
|
|
3489
|
+
export { AnalyticsTableConfigAdapterService, AnalyticsTableContractService, AnalyticsTableStatsApiService, BOOLEAN_PRESETS, BehaviorConfigEditorComponent, CURRENCY_PRESETS, ColumnsConfigEditorComponent, DATE_PRESETS, DataFormatterComponent, DataFormattingService, FORMULA_TEMPLATES, FilterConfigService, FilterSettingsComponent, FormulaGeneratorService, JsonConfigEditorComponent, MessagesLocalizationEditorComponent, NUMBER_PRESETS, PERCENTAGE_PRESETS, PRAXIS_FILTER_COMPONENT_METADATA, PRAXIS_TABLE_COMPONENT_METADATA, PraxisFilter, PraxisTable, PraxisTableConfigEditor, PraxisTableToolbar, STRING_PRESETS, TABLE_AI_CAPABILITIES, TABLE_COMPONENT_AI_CAPABILITIES, TASK_PRESETS, TableDefaultsProvider, TableRulesEditorComponent, ToolbarActionsEditorComponent, ValueMappingEditorComponent, VisualFormulaBuilderComponent, buildTableApplyPlan, createTableAuthoringDocument, getActionId, getEnum, getTableCapabilities, hasJsonKey, jsonPathGet, jsonPathMatches, normalizeTableAuthoringDocument, parseLegacyOrTableDocument, providePraxisFilterMetadata, providePraxisTableMetadata, registerDateDslFunctions, registerJsonDslFunctions, serializeTableAuthoringDocument, toCanonicalTableConfig, validateTableAuthoringDocument };
|
|
3490
|
+
export type { ActionLike, AnalyticsTableConfigAdapterOptions, AnalyticsTableContractDefinition, AnalyticsTableContractLoadOptions, AnalyticsTableContractLoadResult, AnalyticsTableContractSource, AnalyticsTableRow, AnalyticsTableViewModel, ArithmeticParams, BehaviorConfigChange, BooleanFormatterOptions, BulkAction, Capability$1 as Capability, CapabilityCatalog$1 as CapabilityCatalog, CapabilityCategory$1 as CapabilityCategory, ColumnChange, ColumnDataType$1 as ColumnDataType, ConcatenationParams, ConditionalMappingParams, CurrencyFormatterOptions, DataFormattingOptions, DataMode, DateFormatterOptions, DefaultValueParams, EditorDiagnostic, EditorDocument, FieldSchema, FilterConfig, FilterTag, FormatPreset, FormatterConfig, FormulaDefinition, FormulaParameterSchema, FormulaParams, FormulaTemplate, FormulaType, I18n, JsonEditorEvent, JsonValidationResult, MessagesLocalizationChange, NestedPropertyParams, NumberFormatterOptions, PercentageFormatterOptions, ResourcePathIntent, RowAction, RowExpansionChangeBase, RowExpansionChangeEvent, RowExpansionReasonCode, RowExpansionTrigger, StringFormatterOptions, TableApplyPlan, TableAuthoringDocument, TableBindings, Capability as TableComponentCapability, CapabilityCatalog as TableComponentCapabilityCatalog, CapabilityCategory as TableComponentCapabilityCategory, ValueKind as TableComponentValueKind, TableHorizontalScroll, TableProjectionContext, TableRuntimeContext, TableValidationContext, ToolbarAction, ToolbarActionsChange, ValueKind$1 as ValueKind, ValueMappingPair };
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/table",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-beta.0",
|
|
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": "^20.0.0",
|
|
7
7
|
"@angular/core": "^20.0.0",
|
|
8
|
-
"@praxisui/core": "^
|
|
9
|
-
"@praxisui/dynamic-fields": "^
|
|
10
|
-
"@praxisui/dynamic-form": "^
|
|
11
|
-
"@praxisui/metadata-editor": "^
|
|
12
|
-
"@praxisui/settings-panel": "^
|
|
13
|
-
"@praxisui/table-rule-builder": "^
|
|
8
|
+
"@praxisui/core": "^4.0.0-beta.0",
|
|
9
|
+
"@praxisui/dynamic-fields": "^4.0.0-beta.0",
|
|
10
|
+
"@praxisui/dynamic-form": "^4.0.0-beta.0",
|
|
11
|
+
"@praxisui/metadata-editor": "^4.0.0-beta.0",
|
|
12
|
+
"@praxisui/settings-panel": "^4.0.0-beta.0",
|
|
13
|
+
"@praxisui/table-rule-builder": "^4.0.0-beta.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"tslib": "^2.3.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"praxisui-table-filter-drawer-adapter.mjs","sources":["../../../projects/praxis-table/filter-drawer-adapter/src/filter-drawer-adapter.ts","../../../projects/praxis-table/filter-drawer-adapter/praxisui-table-filter-drawer-adapter.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport type { FormConfig } from '@praxisui/core';\n\n/**\n * Configuração de abertura do Advanced Filter em gaveta pelo host.\n *\n * Notas para hosts que exibem botão \"Salvar como atalho\":\n * - Exiba a ação apenas quando `allowSaveTags === true`.\n * - Para habilitar o botão, verifique se há ao menos um filtro efetivo no DTO (campos não vazios).\n * - Monte o DTO para salvar mesclando `initialDto` e o valor atual do formulário (`lastValue`),\n * e limpe chaves com valores vazios ('' | null | undefined) antes de chamar `onSaveShortcut(dto)`.\n */\nexport interface FilterDrawerOpenConfig {\n resourcePath: string;\n formId: string;\n config: FormConfig;\n initialDto?: Record<string, any>;\n title?: string;\n onSubmit(dto: Record<string, any>): void;\n onClose?(): void;\n /** Permite que a UI do host exiba ação de salvar atalho (opcional, retrocompatível) */\n allowSaveTags?: boolean;\n /** Rótulo i18n para o botão de salvar atalho (opcional) */\n i18nSaveAsShortcut?: string;\n /** Callback disparado pelo host com o DTO atual quando o usuário optar por salvar um atalho */\n onSaveShortcut?: (dto: Record<string, any>) => void;\n}\n\nexport interface FilterDrawerAdapter {\n open(config: FilterDrawerOpenConfig): Promise<void> | void;\n}\n\nfunction getFilterDrawerAdapterToken(): InjectionToken<FilterDrawerAdapter> {\n const registryKey = '__PAX_FILTER_DRAWER_ADAPTER_TOKEN__';\n const globalRegistry = globalThis as typeof globalThis & {\n [registryKey]?: InjectionToken<FilterDrawerAdapter>;\n };\n if (!globalRegistry[registryKey]) {\n globalRegistry[registryKey] = new InjectionToken<FilterDrawerAdapter>('FILTER_DRAWER_ADAPTER');\n }\n return globalRegistry[registryKey];\n}\n\nexport const FILTER_DRAWER_ADAPTER = getFilterDrawerAdapterToken();\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAgCA,SAAS,2BAA2B,GAAA;IAClC,MAAM,WAAW,GAAG,qCAAqC;IACzD,MAAM,cAAc,GAAG,UAEtB;AACD,IAAA,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE;QAChC,cAAc,CAAC,WAAW,CAAC,GAAG,IAAI,cAAc,CAAsB,uBAAuB,CAAC;IAChG;AACA,IAAA,OAAO,cAAc,CAAC,WAAW,CAAC;AACpC;AAEO,MAAM,qBAAqB,GAAG,2BAA2B;;AC3ChE;;AAEG;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"praxisui-table-filter-form-dialog-host.component-EHoM1uuJ.mjs","sources":["../../../projects/praxis-table/src/lib/components/praxis-filter/filter-form-dialog-host.component.ts"],"sourcesContent":["import { Component, Inject } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatDialogModule, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatIconModule } from '@angular/material/icon';\nimport { FormGroup } from '@angular/forms';\nimport { PraxisFilterForm } from '@praxisui/dynamic-form';\n\n@Component({\n selector: 'praxis-filter-form-dialog-host',\n standalone: true,\n imports: [CommonModule, MatDialogModule, MatButtonModule, MatProgressBarModule, MatIconModule, PraxisFilterForm],\n template: `\n <div mat-dialog-title class=\"pfx-dialog-title\" id=\"filterDialogTitle\">\n <div class=\"pfx-dialog-title-text\">\n <mat-icon>tune</mat-icon>\n <span>{{ data.title || 'Filtro avançado' }}</span>\n </div>\n <button mat-icon-button type=\"button\" class=\"pfx-dialog-close\" (click)=\"close()\"\n [attr.aria-label]=\"data.i18n?.cancel || 'Fechar'\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n <mat-dialog-content class=\"pfx-filter-dialog-content\" aria-labelledby=\"filterDialogTitle\">\n <mat-progress-bar *ngIf=\"data?.schemaLoading\" mode=\"indeterminate\"></mat-progress-bar>\n <praxis-filter-form\n *ngIf=\"data?.config\"\n [formId]=\"data.formId\"\n [resourcePath]=\"data.resourcePath\"\n [mode]=\"'edit'\"\n [config]=\"data.config\"\n (formReady)=\"onReady($event)\"\n (valueChange)=\"onChange($event)\"\n (validityChange)=\"onValidity($event)\"\n ></praxis-filter-form>\n <p *ngIf=\"!data?.config && !data?.schemaLoading\" class=\"pfx-empty-state\">{{ data.i18n?.noData || 'Nenhum dado' }}</p>\n </mat-dialog-content>\n <mat-dialog-actions align=\"end\" class=\"pfx-dialog-actions\">\n <button mat-button type=\"button\"\n *ngIf=\"data?.allowSaveTags\"\n [disabled]=\"!canSave\"\n (click)=\"saveShortcut()\">\n {{ data.i18n?.saveAsShortcut || 'Salvar como atalho' }}\n </button>\n <button mat-stroked-button type=\"button\" (click)=\"close()\">{{ data.i18n?.cancel || 'Cancelar' }}</button>\n <button mat-flat-button color=\"primary\" (click)=\"apply()\" [disabled]=\"!valid\">\n {{ data.i18n?.apply || 'Aplicar' }}\n </button>\n </mat-dialog-actions>\n `,\n styles: [`\n .pfx-dialog-title {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n padding-right: 8px;\n }\n .pfx-dialog-title-text {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n font-weight: 600;\n color: var(--md-sys-color-on-surface);\n }\n .pfx-dialog-close {\n margin-left: auto;\n }\n .pfx-filter-dialog-content {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding-top: 8px;\n }\n .pfx-empty-state {\n margin: 8px 0 0;\n color: var(--md-sys-color-on-surface-variant);\n }\n .pfx-dialog-actions {\n padding: var(--pdx-dialog-actions-padding, 12px 24px 16px);\n border-top: 1px solid var(--md-sys-color-outline-variant);\n background: transparent;\n display: flex;\n align-items: center;\n gap: 8px;\n }\n `],\n})\nexport class FilterFormDialogHostComponent {\n valid = true;\n private lastValue: any = {};\n private formGroup: FormGroup<Record<string, any>> | null = null;\n canSave = false;\n constructor(\n @Inject(MAT_DIALOG_DATA)\n public data: {\n formId: string;\n resourcePath: string;\n config: any;\n title?: string;\n schemaLoading?: boolean;\n initialDto?: Record<string, any>;\n allowSaveTags?: boolean;\n i18n?: { saveAsShortcut?: string; cancel?: string; apply?: string; noData?: string };\n onSaveShortcut?: (dto: Record<string, any>) => void;\n },\n private ref: MatDialogRef<FilterFormDialogHostComponent>,\n ) {}\n\n onReady(ev: { formGroup: any }): void {\n try {\n this.formGroup = (ev?.formGroup as FormGroup<Record<string, any>>) || null;\n const dto = this.data?.initialDto || {};\n if (ev?.formGroup && dto && Object.keys(dto).length) {\n ev.formGroup.patchValue(dto, { emitEvent: false });\n }\n this.lastValue = this.formGroup?.getRawValue?.() ?? this.lastValue;\n this.updateCanSave();\n } catch {}\n }\n onChange(ev: { formData: Record<string, any> }): void {\n this.lastValue = ev?.formData ?? {};\n this.updateCanSave();\n }\n onValidity(v: boolean): void {\n this.valid = v;\n this.updateCanSave();\n }\n apply(): void {\n const formData =\n this.formGroup?.getRawValue?.() ??\n this.lastValue ??\n this.data?.initialDto ??\n {};\n this.ref.close({ formData });\n }\n close(): void { this.ref.close(); }\n\n private clean(obj: Record<string, any> | undefined | null): Record<string, any> {\n const out: Record<string, any> = {};\n Object.keys(obj || {}).forEach((k) => {\n const v = (obj as any)[k];\n if (v !== '' && v !== null && v !== undefined) out[k] = v;\n });\n return out;\n }\n private buildDtoForSave(): Record<string, any> {\n const base = this.data?.initialDto || {};\n const merged = { ...base, ...(this.lastValue || {}) };\n return this.clean(merged);\n }\n private updateCanSave(): void {\n this.canSave = Object.keys(this.buildDtoForSave() || {}).length > 0;\n }\n saveShortcut(): void {\n try {\n const dto = this.buildDtoForSave();\n if (!Object.keys(dto).length) return;\n this.data?.onSaveShortcut?.(dto);\n } catch {}\n }\n}\n"],"names":["i4"],"mappings":";;;;;;;;;;;;;;MAyFa,6BAA6B,CAAA;AAO/B,IAAA,IAAA;AAWC,IAAA,GAAA;IAjBV,KAAK,GAAG,IAAI;IACJ,SAAS,GAAQ,EAAE;IACnB,SAAS,GAA0C,IAAI;IAC/D,OAAO,GAAG,KAAK;IACf,WAAA,CAES,IAUN,EACO,GAAgD,EAAA;QAXjD,IAAA,CAAA,IAAI,GAAJ,IAAI;QAWH,IAAA,CAAA,GAAG,GAAH,GAAG;IACV;AAEH,IAAA,OAAO,CAAC,EAAsB,EAAA;AAC5B,QAAA,IAAI;YACF,IAAI,CAAC,SAAS,GAAI,EAAE,EAAE,SAA4C,IAAI,IAAI;YAC1E,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,EAAE,UAAU,IAAI,EAAE;AACvC,YAAA,IAAI,EAAE,EAAE,SAAS,IAAI,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE;AACnD,gBAAA,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;YACpD;AACA,YAAA,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE,WAAW,IAAI,IAAI,IAAI,CAAC,SAAS;YAClE,IAAI,CAAC,aAAa,EAAE;QACt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AAA,EAAA,OAAA,EAAA,CAAA,WAAA,EAAA,aAAA,EAAA,QAAA,EAAA,eAAA,EAAA,gBAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FA6EpG,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAhFzC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,gCAAgC,cAC9B,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,oBAAoB,EAAE,aAAa,EAAE,gBAAgB,CAAC,EAAA,QAAA,EACtG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,unBAAA,CAAA,EAAA;;0BA6CE,MAAM;2BAAC,eAAe;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"praxisui-table-table-ai.adapter-C5rjLb8E.mjs","sources":["../../../projects/praxis-table/src/lib/ai/table-data-profiler.ts","../../../projects/praxis-table/src/lib/ai/table-ai.adapter.ts"],"sourcesContent":["import { TableConfig } from '@praxisui/core';\n\nexport interface ColumnStats {\n field: string;\n header?: string;\n inferredType: 'string' | 'number' | 'boolean' | 'date' | 'mixed' | 'empty';\n cardinality: number; // Quantidade de valores únicos\n hasNulls: boolean;\n // Amostra de valores frequentes para contexto (limitado a 5)\n topValues: any[];\n // Para numbers\n min?: number;\n max?: number;\n // Para dates\n dateRange?: { start: string; end: string };\n // Flags úteis para sugestão\n isUrl?: boolean;\n isEmail?: boolean;\n isLongText?: boolean; // > 50 chars\n}\n\nexport interface DataProfile {\n rowCount: number;\n columns: Record<string, ColumnStats>;\n generatedAt: number;\n}\n\n/**\n * Analisa uma amostra de dados da tabela para gerar estatísticas\n * que ajudem a IA a sugerir renderers e formatos adequados.\n */\nexport class TableDataProfiler {\n private static SAMPLE_LIMIT = 3; // Analisa no máximo 3 linhas para performance\n private static VALUE_TRUNCATE = 50; // Trunca strings longas no contexto\n\n static profile(\n data: any[],\n config: TableConfig,\n options?: { sampleLimit?: number; rowCountOverride?: number }\n ): DataProfile {\n const sampleLimit = options?.sampleLimit ?? this.SAMPLE_LIMIT;\n const rowCount = options?.rowCountOverride ?? data.length;\n const profile: DataProfile = {\n rowCount,\n columns: {},\n generatedAt: Date.now()\n };\n\n if (!data || data.length === 0 || !config.columns) {\n return profile;\n }\n\n // 1. Selecionar amostra (início, meio e fim se possível, ou apenas slice)\n // Para simplicidade e estabilidade, pegamos os primeiros N itens.\n const sample = data.slice(0, sampleLimit);\n\n // 2. Iterar colunas configuradas\n for (const col of config.columns) {\n if (!col || !col.field) continue;\n const values = sample.map(row => this.getValue(row, col.field)).filter(v => v !== null && v !== undefined && v !== '');\n \n const stats: ColumnStats = {\n field: col.field,\n header: col.header,\n inferredType: 'empty',\n cardinality: 0,\n hasNulls: values.length < sample.length,\n topValues: []\n };\n\n if (values.length > 0) {\n stats.inferredType = this.inferType(values);\n stats.cardinality = new Set(values.map(v => String(v))).size;\n \n // Coletar Top Values (frequência)\n const freqMap = new Map<string, number>();\n values.forEach(v => {\n const k = String(v);\n freqMap.set(k, (freqMap.get(k) || 0) + 1);\n });\n \n stats.topValues = Array.from(freqMap.entries())\n .sort((a, b) => b[1] - a[1]) // Sort by count desc\n .slice(0, 5)\n .map(([val]) => this.sanitizeValue(val, stats.inferredType));\n\n // Stats específicas por tipo\n if (stats.inferredType === 'number') {\n const nums = values.map(v => Number(v)).filter(n => !isNaN(n));\n if (nums.length) {\n stats.min = Math.min(...nums);\n stats.max = Math.max(...nums);\n }\n } else if (stats.inferredType === 'date') {\n const dates = values.map(v => new Date(v).getTime()).filter(t => !isNaN(t));\n if (dates.length) {\n stats.dateRange = {\n start: new Date(Math.min(...dates)).toISOString(),\n end: new Date(Math.max(...dates)).toISOString()\n };\n }\n } else if (stats.inferredType === 'string') {\n const strVal = String(values[0]);\n stats.isUrl = strVal.startsWith('http');\n stats.isEmail = strVal.includes('@') && strVal.includes('.');\n stats.isLongText = values.some(v => String(v).length > 50);\n }\n }\n\n profile.columns[col.field] = stats;\n }\n\n return profile;\n }\n\n private static getValue(row: any, path: string): any {\n if (!path || typeof path !== 'string') return undefined;\n return path.split('.').reduce((obj, key) => obj?.[key], row);\n }\n\n private static inferType(values: any[]): ColumnStats['inferredType'] {\n const first = values[0];\n if (typeof first === 'number') return 'number';\n if (typeof first === 'boolean') return 'boolean';\n if (first instanceof Date) return 'date';\n \n // Check string formats\n const str = String(first);\n if (!isNaN(Number(str)) && str.trim() !== '') return 'number';\n if (!isNaN(Date.parse(str)) && str.length > 5) return 'date'; // length check avoids short strings being parsed as dates\n \n return 'string';\n }\n\n private static sanitizeValue(val: string, type: string): any {\n if (type === 'string' && val.length > this.VALUE_TRUNCATE) {\n return val.substring(0, this.VALUE_TRUNCATE) + '...';\n }\n return val;\n }\n}\n","import { firstValueFrom, Observable } from 'rxjs';\nimport { BaseAiAdapter, PatchResult, AiSuggestion, Capability } from '@praxisui/ai';\nimport { TableConfig, deepMerge, type AsyncConfigStorage } from '@praxisui/core';\nimport { PraxisTable } from '../praxis-table';\nimport { TABLE_AI_CAPABILITIES, TASK_PRESETS } from './table-ai-capabilities';\nimport { TableDataProfiler } from './table-data-profiler';\n\nexport interface AiServiceLike {\n classifyIntent: (input: string, columns: string[]) => any;\n executeEnrichedPrompt: (input: string, contextDesc: string, contextConfig: any, caps: Capability[]) => any;\n answerQuestion: (input: string, config: any) => Observable<string>;\n generateJson: <T>(prompt: string, modelName?: string, schema?: any) => Observable<T | null>;\n}\n\n/**\n * Adapter that connects the AI Engine to a specific PraxisTable instance.\n * Implements two-step intent flow + heuristics for contextual suggestions.\n */\nexport class TableAiAdapter extends BaseAiAdapter<TableConfig> {\n componentName = 'Data Table';\n componentId = 'praxis-table';\n componentType = 'table';\n\n constructor(private table: PraxisTable, private aiService?: AiServiceLike) {\n super();\n }\n\n // -------- Core contract --------\n\n getCurrentConfig(): TableConfig {\n try {\n return structuredClone(this.table.config);\n } catch {\n return JSON.parse(JSON.stringify(this.table.config));\n }\n }\n\n getCapabilities(): Capability[] {\n return TABLE_AI_CAPABILITIES.capabilities as unknown as Capability[];\n }\n\n override getTaskPresets(): Record<string, string[]> {\n return TASK_PRESETS;\n }\n\n override getRuntimeState(): Record<string, any> {\n return {\n rowsTotal: this.table.dataSource.data.length,\n rowsVisible: this.table.paginator ? this.table.paginator.pageSize : this.table.dataSource.data.length,\n pageIndex: this.table.paginator ? this.table.paginator.pageIndex : 0,\n sort: this.table.sort ? { active: this.table.sort.active, direction: this.table.sort.direction } : null,\n filters: this.table.filterCriteria,\n selectionCount: this.table.selection.selected.length,\n isLoading: false // TODO: expose real loading flag\n };\n }\n\n override getSuggestionContext(): Record<string, any> {\n const config = this.getCurrentConfig();\n const behavior = config.behavior || {};\n const actions = config.actions || {};\n const availableFeatures: string[] = [];\n const missingCapabilities: string[] = [];\n\n if (!this.table.resourcePath) {\n availableFeatures.push('data-connection');\n }\n if (!this.table.idField) {\n availableFeatures.push('bindings.idField');\n }\n if (!behavior.filtering?.enabled) {\n availableFeatures.push('behavior.filtering');\n missingCapabilities.push('filtering');\n }\n if (!behavior.sorting?.enabled) {\n availableFeatures.push('behavior.sorting');\n missingCapabilities.push('sorting');\n }\n if (!behavior.pagination?.enabled) {\n availableFeatures.push('behavior.pagination');\n missingCapabilities.push('pagination');\n }\n if (!behavior.selection?.enabled) {\n availableFeatures.push('behavior.selection');\n missingCapabilities.push('selection');\n }\n if (!config.toolbar?.visible) {\n availableFeatures.push('toolbar');\n missingCapabilities.push('toolbar');\n }\n if (!actions.row?.enabled) {\n availableFeatures.push('actions.row');\n missingCapabilities.push('actions');\n }\n if (!actions.bulk?.enabled) {\n availableFeatures.push('actions.bulk');\n missingCapabilities.push('actions');\n }\n if (!actions.context?.enabled) {\n availableFeatures.push('actions.context');\n missingCapabilities.push('actions');\n }\n if (!config.export?.enabled) {\n availableFeatures.push('export');\n missingCapabilities.push('export');\n }\n if (!config.localization) {\n availableFeatures.push('localization');\n missingCapabilities.push('localization');\n }\n if (!config.messages) {\n availableFeatures.push('messages');\n missingCapabilities.push('messages');\n }\n if (!config.performance) {\n availableFeatures.push('performance');\n missingCapabilities.push('performance');\n }\n if (!config.accessibility) {\n availableFeatures.push('accessibility');\n missingCapabilities.push('accessibility');\n }\n if (!config.rowConditionalStyles || config.rowConditionalStyles.length === 0) {\n availableFeatures.push('row-conditional-styles');\n missingCapabilities.push('conditional');\n }\n\n return {\n authoringContract: {\n kind: 'praxis.table.editor',\n usesBindings: true,\n bindingsPaths: ['bindings.resourcePath', 'bindings.idField', 'bindings.horizontalScroll'],\n runtimeConfigProjection: 'TableConfig',\n },\n availableFeatures,\n missingCapabilities: Array.from(new Set(missingCapabilities)),\n inputs: {\n resourcePath: this.table.resourcePath || null,\n idField: this.table.getIdField?.() || null,\n horizontalScroll: (this.table as any).horizontalScroll || null,\n },\n };\n }\n\n getDataProfile(): Record<string, any> {\n const data = this.table.dataSource.data || [];\n return TableDataProfiler.profile(data, this.table.config);\n }\n\n getSchemaFields(): Record<string, any>[] {\n try {\n return this.table.getSchemaFieldsSnapshot();\n } catch {\n return [];\n }\n }\n\n createSnapshot(): any {\n return this.getCurrentConfig();\n }\n\n async restoreSnapshot(snapshot: any): Promise<void> {\n if (!snapshot) return;\n this.applyConfig(snapshot);\n }\n\n async applyPatch(patch: Partial<TableConfig>, intent?: string): Promise<PatchResult> {\n const current = this.getCurrentConfig();\n const normalizedPatch = this.normalizePatch(patch);\n const nextConfig = this.smartMergeTableConfig(current, normalizedPatch);\n this.applyConfig(nextConfig);\n return { success: true };\n }\n\n // -------- Context & suggestions --------\n\n /**\n * Human-friendly summary for prompt/context (columns + feature flags + data stats).\n */\n getContextDescription(contextOverride?: Partial<TableConfig>): string {\n // 1. Generate Data Profile\n const data = this.table.dataSource.data || [];\n const effectiveConfig = contextOverride ? deepMerge(this.table.config, contextOverride) : this.table.config;\n const profile = TableDataProfiler.profile(data, effectiveConfig);\n \n // 2. Format Column Stats\n const colDetails = Object.values(profile.columns).map(stats => {\n let desc = `${stats.field} (${stats.inferredType})`;\n if (stats.cardinality > 0 && stats.cardinality < 10) {\n desc += `, values=[${stats.topValues.join(', ')}]`;\n } else if (stats.inferredType === 'number' && stats.min !== undefined) {\n desc += `, range=[${stats.min}-${stats.max}]`;\n }\n \n // Check existing config to see if it has renderer/format\n const colCfg = effectiveConfig.columns?.find(c => c.field === stats.field);\n if (colCfg?.renderer) desc += ` [has-renderer: ${colCfg.renderer.type}]`;\n if (colCfg?.format) desc += ` [has-format]`;\n \n return desc;\n });\n\n // 3. Active Features\n const behaviorFlags: string[] = [];\n const b = this.table.config?.behavior;\n if (b?.filtering?.enabled) behaviorFlags.push('filtering');\n if (b?.sorting?.enabled) behaviorFlags.push('sorting');\n if (b?.pagination?.enabled) behaviorFlags.push('pagination');\n if (b?.selection?.enabled) behaviorFlags.push('selection');\n\n return `\nDataset: ${profile.rowCount} rows.\nActive Features: ${behaviorFlags.join(', ') || 'None'}.\nColumns Analysis:\n- ${colDetails.join('\\n- ')}\n `.trim();\n }\n\n /**\n * Dynamic suggestions based on current config/data.\n * Uses AI Service if available, otherwise falls back to heuristics.\n */\n override async getSuggestions(forceReload = false): Promise<AiSuggestion[]> {\n const storage = (this.table as any)?.asyncConfigStorage as AsyncConfigStorage | undefined;\n const key = this.suggestionsKey();\n \n // 1. Try cache\n if (storage && !forceReload) {\n try {\n const cached = await firstValueFrom(storage.loadConfig<AiSuggestion[]>(key));\n if (cached && Array.isArray(cached) && cached.length) {\n return cached;\n }\n } catch {}\n }\n\n let suggestions: AiSuggestion[] = [];\n\n // 2. Clear cache explicitly when forcing reload\n if (forceReload && storage && typeof storage.clearConfig === 'function') {\n try { await firstValueFrom(storage.clearConfig(key)); } catch {}\n }\n\n // 3. Try AI Generation (if service available)\n if (this.aiService) {\n try {\n const filtered = this.filterCompletedColumnsFromContext();\n suggestions = await this.generateAiSuggestions(filtered);\n } catch (err) {\n console.warn('[TableAiAdapter] AI suggestion failed, falling back to heuristics', err);\n }\n }\n\n // 4. Fallback to Heuristics if AI failed or not available\n if (!suggestions.length) {\n suggestions = this.getHeuristicSuggestions();\n }\n\n // 5. Save to cache\n const sorted = suggestions.sort((a, b) => (b.score || 0) - (a.score || 0));\n if (storage && sorted.length > 0) {\n try {\n await firstValueFrom(storage.saveConfig(key, sorted));\n } catch {}\n }\n return sorted;\n }\n\n private async generateAiSuggestions(contextOverride?: Partial<TableConfig>): Promise<AiSuggestion[]> {\n if (!this.aiService) return [];\n\n const prompt = `\n Analyze the following data table context and stats.\n Suggest 3 to 5 specific UX/UI improvements based on the data distribution and active features.\n \n Guidelines for Suggestions:\n - Focus on: Data formatting (dates/currency), Visual indicators (badges/icons for low-cardinality or mapped fields), Filter types, and missing critical features (pagination/export).\n - Prefer explicit metadata (column types, value mappings, data stats). Avoid guessing semantics from field names.\n - Intents MUST be actionable user commands, not just labels.\n \n Intent Examples:\n [GOOD]: \"Format column 'birthDate' as dd/MM/yyyy\", \"Use badges for column 'state' (3 distinct values)\", \"Enable pagination with 10 rows\".\n [BAD]: \"Improve formatting\", \"Add badges\", \"Pagination settings\".\n\n Context:\n ${this.getContextDescription(contextOverride)}\n \n Return a JSON array of suggestions with: id, label, description, icon, group, intent (the actionable command), and score (0-1).\n `;\n\n const result = await firstValueFrom(this.aiService.generateJson<{ suggestions: AiSuggestion[] } | null>(prompt, undefined, {\n type: 'OBJECT',\n properties: {\n suggestions: {\n type: 'ARRAY',\n items: {\n type: 'OBJECT',\n properties: {\n id: { type: 'STRING' },\n label: { type: 'STRING' },\n description: { type: 'STRING' },\n icon: { type: 'STRING' },\n group: { type: 'STRING' },\n intent: { type: 'STRING' },\n score: { type: 'NUMBER' }\n },\n required: ['id', 'label', 'intent']\n }\n }\n }\n }));\n\n return result?.suggestions || [];\n }\n\n private getHeuristicSuggestions(): AiSuggestion[] {\n const suggestions: AiSuggestion[] = [];\n const config = this.table.config;\n const data = this.table.dataSource.data || [];\n const columns = config.columns || [];\n const profile = TableDataProfiler.profile(data, config);\n const profileColumns = profile.columns || {};\n const capabilities = this.getCapabilities?.() || [];\n const categorySet = new Set(\n capabilities\n .map((cap) => String(cap?.category || '').toLowerCase())\n .filter((cat) => cat.length > 0),\n );\n const allowCategory = (categories: string[]): boolean => {\n if (!categorySet.size) return false;\n return categories.some((cat) => categorySet.has(cat));\n };\n\n // Pagination if many rows and disabled\n if (allowCategory(['pagination', 'behavior']) && !config.behavior?.pagination?.enabled && data.length > 20) {\n suggestions.push({\n id: 'enable-paging',\n label: 'Habilitar Paginação',\n description: `Tabela tem ${data.length} linhas. Paginação melhora a performance.`,\n icon: 'list_alt',\n group: 'Performance',\n intent: 'Habilitar paginação com 10 itens por página',\n score: 0.9\n });\n }\n\n // Modo compacto se muitas colunas visíveis\n const visibleCols = columns.filter((c) => c.visible !== false).length;\n if (allowCategory(['appearance']) && visibleCols > 8 && config.appearance?.density !== 'compact') {\n suggestions.push({\n id: 'compact-mode',\n label: 'Modo Compacto',\n description: 'Muitas colunas visíveis. Modo compacto exibe mais dados.',\n icon: 'compress',\n group: 'Visual',\n intent: 'Usar densidade compacta',\n score: 0.8\n });\n }\n\n // Badge/Icon para valores discretos\n const badgeCardinalityMax = 6;\n const badgeCol = columns.find((col) => {\n if (!col || col.renderer || !col.field) return false;\n const stats = profileColumns[col.field];\n const inferredType = stats?.inferredType;\n const cardinality = stats?.cardinality ?? -1;\n const isLongText = stats?.isLongText ?? false;\n const hasValueMapping = !!col.valueMapping && Object.keys(col.valueMapping).length > 0;\n const typeMatch = col.type === 'boolean'\n || col.type === 'string'\n || inferredType === 'boolean'\n || inferredType === 'string';\n const lowCardinality = cardinality > 0 && cardinality <= badgeCardinalityMax;\n return !isLongText && (hasValueMapping || (typeMatch && lowCardinality));\n });\n if (allowCategory(['renderer', 'columns']) && badgeCol) {\n suggestions.push({\n id: 'status-badge',\n label: `Badges para ${badgeCol.header || badgeCol.field}`,\n description: 'Destacar valores com badges ou ícones.',\n icon: 'verified',\n group: 'Visual',\n intent: `Usar renderer badge para a coluna ${badgeCol.field}`,\n score: 0.7\n });\n }\n\n // Datas sem format\n const dateCol = columns.find((c) => c.type === 'date' && !c.format);\n if (allowCategory(['format', 'columns']) && dateCol) {\n suggestions.push({\n id: 'date-format',\n label: `Formatar ${dateCol.header || dateCol.field}`,\n description: 'Padronizar exibição de data.',\n icon: 'calendar_today',\n group: 'Formatação',\n intent: `Formatar coluna ${dateCol.field} como dd/MM/yyyy`,\n score: 0.6\n });\n }\n \n return suggestions;\n }\n\n /**\n * Remove colunas já formatadas/tipadas para evitar sugestões redundantes (ex.: salário já em currency)\n */\n private filterCompletedColumnsFromContext(): Partial<TableConfig> {\n const cfg = this.getCurrentConfig();\n const filteredCols = (cfg.columns || []).filter((col) => {\n // Keep if missing type or format (needs suggestion)\n if (!col.type) return true;\n if (col.type === 'currency' && col.format) return false;\n if (col.type === 'date' && col.format) return false;\n return true;\n });\n return { ...cfg, columns: filteredCols };\n }\n\n // -------- Two-step flow helpers --------\n\n getFilteredCapabilities(category?: string): Capability[] {\n const all = TABLE_AI_CAPABILITIES.capabilities as unknown as Capability[];\n if (!category || category === 'unknown') return all;\n\n const categoryMap: Record<string, string[]> = {\n columns: ['columns', 'format', 'mapping', 'renderer', 'conditional'],\n appearance: ['appearance', 'conditional'],\n conditional: ['conditional', 'renderer', 'columns'], // Include 'columns' to allow field context\n behavior: ['behavior', 'pagination', 'sorting', 'filtering', 'selection', 'interaction'],\n actions: ['actions', 'toolbar', 'export']\n };\n\n const targets = categoryMap[category] || [category];\n return all.filter((c) => targets.includes(c.category as string));\n }\n\n private suggestionsKey(): string {\n const id = this.table.tableId || 'default';\n const rp = this.table.resourcePath || 'default';\n // bump version to invalidate old cached suggestions\n return `ai-suggestions:v3:${id}:${rp}`;\n }\n\n private getColumnNames(): string[] {\n return (this.table.config?.columns || [])\n .map((c) => c.field)\n .filter((f) => !!f);\n }\n\n private extractContextForIntent(intent: any): { desc: string; config: any } {\n const fullConfig = this.getCurrentConfig();\n\n if ((intent.category === 'columns' || intent.category === 'conditional') && intent.targetField) {\n const col = fullConfig.columns?.find((c) => c.field === intent.targetField);\n if (col) {\n return { desc: `Contexto focado na coluna '${intent.targetField}'.`, config: { columns: [col] } };\n }\n }\n\n if (intent.category === 'behavior' && fullConfig.behavior) {\n return { desc: 'Contexto focado em Comportamento (pagination/sorting/filtering/selection).', config: { behavior: fullConfig.behavior } };\n }\n\n if (intent.category === 'appearance' && fullConfig.appearance) {\n return { desc: 'Contexto focado em Aparência.', config: { appearance: fullConfig.appearance } };\n }\n\n if (intent.category === 'actions' && (fullConfig.actions || fullConfig.toolbar)) {\n return { desc: 'Contexto focado em Ações e Toolbar.', config: { actions: fullConfig.actions, toolbar: fullConfig.toolbar } };\n }\n\n return { desc: 'Contexto completo da tabela.', config: fullConfig };\n }\n\n /**\n * Two-step flow: classify intent, build focused context, call enriched prompt.\n * Returns the patch WITHOUT applying, so the UI can review.\n */\n async processUserIntent(\n userInput: string,\n aiService: AiServiceLike // Use interface type\n ): Promise<{ patch?: any; explanation?: string; type?: string; message?: string; options?: string[]; warnings?: string[] }> {\n const classification: any = await firstValueFrom(aiService.classifyIntent(userInput, this.getColumnNames()));\n\n if (classification?.needsClarification) {\n return {\n type: 'clarification',\n message: 'Preciso de mais detalhes para continuar.',\n options: classification.options || []\n };\n }\n\n // Handle QA intent\n if (classification?.intent === 'ask_about_config') {\n const answer = await firstValueFrom(aiService.answerQuestion(userInput, this.getCurrentConfig()));\n return {\n type: 'info',\n message: answer,\n explanation: answer // Map to explanation for UI compatibility if needed, or UI should handle 'info' type\n };\n }\n\n const context = this.extractContextForIntent(classification);\n const caps = this.getFilteredCapabilities((classification as any)?.category);\n\n const result: any = await firstValueFrom(\n aiService.executeEnrichedPrompt(userInput, context.desc, context.config, caps)\n );\n\n if (!result || !result.patch) {\n return { type: 'error', message: 'Nenhum patch gerado.' };\n }\n\n const { sanitized, warnings } = this.validateAndSanitizePatch(result.patch, caps);\n // Passar warnings para o retorno, para que o UI possa mostrá-los\n // Se o patch estiver vazio após sanitização, informar ao usuário\n\n // Se sobrou algo válido\n if (Object.keys(sanitized).length > 0) {\n const explanation = result.explanation + (warnings.length ? ` (Ajustado: ${warnings.length} itens inválidos removidos)` : '');\n return { patch: sanitized, explanation, warnings };\n } else {\n return { type: 'error', message: 'O patch gerado não continha configurações válidas permitidas.', warnings };\n }\n }\n\n private validateAndSanitizePatch(patch: any, allowedCaps: Capability[]): { sanitized: any; warnings: string[] } {\n const allowedPaths = new Set(allowedCaps.map(c => c.path));\n const warnings: string[] = [];\n // Some schema-driven nodes are intentionally open objects and must be preserved as-is.\n const passthroughObjectPaths = new Set<string>([\n 'behavior.expansion.detail.source.inlineSchema',\n 'behavior.expansion.detail.source.resourcePath.paramsMap',\n ]);\n\n const recurse = (obj: any, currentPath: string): any => {\n if (typeof obj !== 'object' || obj === null) return obj;\n\n if (Array.isArray(obj)) {\n // Se estamos em um array conhecido (ex: columns), o path vira columns[]\n // Se não, assume que é valor final (ex: options: [1,2])\n const isRootArray = currentPath && (allowedPaths.has(currentPath + '[]') || Array.from(allowedPaths).some(p => p.startsWith(currentPath + '[].')));\n \n if (!isRootArray) return obj; // É um valor array (ex: tags), retorna direto\n\n return obj.map(item => recurse(item, currentPath + '[]'));\n }\n\n const cleanObj: any = {};\n for (const key of Object.keys(obj)) {\n const newPath = currentPath ? `${currentPath}.${key}` : key;\n // Verifica se este path exato é permitido OU se é um prefixo de algo permitido\n // Ex: 'columns' é permitido se 'columns[].width' existe\n // Special case: 'columns[].field' is identity, always allow it if we are inside columns[]\n const isIdentityField = currentPath === 'columns[]' && key === 'field';\n const exactMatch = allowedPaths.has(newPath) || isIdentityField;\n const prefixMatch = Array.from(allowedPaths).some(p => p.startsWith(newPath + '.') || p.startsWith(newPath + '['));\n\n if (exactMatch || prefixMatch) {\n if (\n exactMatch\n && passthroughObjectPaths.has(newPath)\n && typeof obj[key] === 'object'\n && obj[key] !== null\n ) {\n cleanObj[key] = obj[key];\n continue;\n }\n const val = recurse(obj[key], newPath);\n if (newPath === 'columns[].computed.expression') {\n if (typeof val !== 'string') {\n warnings.push(`Computed expression inválida: ${newPath} (não é string)`);\n continue;\n }\n const trimmed = val.trim();\n if (!trimmed) {\n warnings.push(`Computed expression vazia: ${newPath}`);\n continue;\n }\n if (trimmed.length > 200) {\n warnings.push(`Computed expression muito longa: ${newPath}`);\n continue;\n }\n cleanObj[key] = trimmed;\n continue;\n }\n // Se for objeto vazio após limpeza, não inclui (salvo se for intenção explicita de limpar config, mas patch geralmente é aditivo)\n if (typeof val === 'object' && val !== null && !Array.isArray(val) && Object.keys(val).length === 0) {\n // ignora\n } else {\n cleanObj[key] = val;\n }\n } else {\n warnings.push(`Campo ignorado: ${newPath}`);\n }\n }\n return cleanObj;\n };\n\n const sanitized = recurse(patch, '');\n return { sanitized, warnings };\n }\n\n \n\n // -------- Internal helpers --------\n\n /**\n * Specialized merge for TableConfig that handles Array reconciliation safely.\n * - 'columns': merges by 'field' ID.\n */\n private smartMergeTableConfig(base: TableConfig, patch: Partial<TableConfig>): TableConfig {\n const result = deepMerge(base, patch);\n\n if (patch.columns && Array.isArray(patch.columns)) {\n const originalCols = base.columns || [];\n const patchCols = patch.columns;\n\n const mergedCols = originalCols.map((origCol) => {\n const match = patchCols.find((p) => p.field === origCol.field);\n return match ? deepMerge(origCol, match) : origCol;\n });\n\n patchCols.forEach((pCol) => {\n if (!originalCols.find((o) => o.field === pCol.field)) {\n mergedCols.push(pCol as any);\n }\n });\n\n result.columns = mergedCols;\n }\n\n return result;\n }\n\n private applyConfig(config: TableConfig): void {\n const prev = this.table.config;\n this.table.config = config;\n\n this.table.ngOnChanges({\n config: {\n previousValue: prev,\n currentValue: config,\n firstChange: false,\n isFirstChange: () => false\n }\n });\n }\n\n /**\n * If a patch adds only a currency format, ensure the column type is set to 'currency'\n * so the formatter runs. Avoid overriding an explicit non-currency type.\n */\n private normalizePatch(patch: Partial<TableConfig>): Partial<TableConfig> {\n if (!patch.columns || !Array.isArray(patch.columns)) return patch;\n const cols = patch.columns.map((col) => this.normalizeColumn(col));\n return { ...patch, columns: cols };\n }\n\n private looksLikeCurrencyFormat(format: string | undefined | null): boolean {\n if (!format) return false;\n const fmt = format.trim();\n return /^[A-Z]{3}(\\|.*)?$/.test(fmt);\n }\n\n private looksLikeDateFormat(format: string | undefined | null): boolean {\n if (!format) return false;\n const fmt = format.trim();\n // Heuristics: contains date tokens like d/M/y or common date separators\n return /(d|M|y){2,}/i.test(fmt) || fmt.includes('/') || fmt.includes('-');\n }\n\n private isIconRendererHint(renderer: any): boolean {\n if (!renderer) return false;\n if (renderer.type && renderer.type !== 'icon') return false;\n const icon = renderer.icon || renderer.name || renderer.iconName;\n return typeof icon === 'string' || typeof renderer.color === 'string' || typeof renderer.size === 'number';\n }\n private normalizeColumn(col: any): any {\n if (!col) return col;\n const next = { ...col };\n\n // Normalize formats\n if (next.format && !next.type) {\n if (this.looksLikeCurrencyFormat(next.format)) {\n next.type = 'currency' as any;\n } else if (this.looksLikeDateFormat(next.format)) {\n next.type = 'date' as any;\n }\n }\n\n // Normalize renderer structure (icon shorthand)\n if (next.renderer) {\n next.renderer = this.normalizeRenderer(next.renderer);\n }\n\n // Normalize conditional renderers\n if (Array.isArray(next.conditionalRenderers)) {\n next.conditionalRenderers = next.conditionalRenderers.map((r: any) => {\n if (!r) return r;\n const out = { ...r };\n if (out.renderer) out.renderer = this.normalizeRenderer(out.renderer);\n return out;\n });\n }\n\n return next;\n }\n\n private normalizeRenderer(renderer: any): any {\n if (!renderer) return renderer;\n const out = { ...renderer };\n if (out.type === 'icon') {\n // Move icon shorthand to renderer.icon.*\n const iconObj: any = { ...(out.icon || {}) };\n if (renderer.icon && typeof renderer.icon === 'string') iconObj.name = renderer.icon;\n if (renderer.icon?.name) iconObj.name = renderer.icon.name;\n if (renderer.icon?.color) iconObj.color = renderer.icon.color;\n if (renderer.icon?.size) iconObj.size = renderer.icon.size;\n if (renderer.color && !iconObj.color) iconObj.color = renderer.color;\n if (renderer.size && !iconObj.size) iconObj.size = renderer.size;\n out.icon = iconObj;\n delete out.color;\n delete out.size;\n }\n\n // Badge shorthand (allow badge.color/variant/icon/text via renderer.badge or root)\n if (out.type === 'badge') {\n const badge = { ...(out.badge || {}) };\n if (renderer.color && !badge.color) badge.color = renderer.color;\n if (renderer.variant && !badge.variant) badge.variant = renderer.variant;\n if (renderer.text && !badge.text) badge.text = renderer.text;\n if (renderer.icon && !badge.icon && typeof renderer.icon === 'string') badge.icon = renderer.icon;\n out.badge = badge;\n delete out.color;\n delete out.variant;\n delete out.text;\n if (typeof out.icon === 'string') delete out.icon;\n }\n\n // Chip shorthand\n if (out.type === 'chip') {\n const chip = { ...(out.chip || {}) };\n if (renderer.color && !chip.color) chip.color = renderer.color;\n if (renderer.variant && !chip.variant) chip.variant = renderer.variant;\n if (renderer.text && !chip.text) chip.text = renderer.text;\n if (renderer.icon && !chip.icon && typeof renderer.icon === 'string') chip.icon = renderer.icon;\n out.chip = chip;\n delete out.color;\n delete out.variant;\n delete out.text;\n if (typeof out.icon === 'string') delete out.icon;\n }\n\n // Link shorthand\n if (out.type === 'link' && typeof renderer.href === 'string') {\n out.link = { ...(out.link || {}), href: renderer.href };\n delete out.href;\n }\n\n return out;\n }\n}\n"],"names":[],"mappings":";;;;;AA2BA;;;AAGG;MACU,iBAAiB,CAAA;AACpB,IAAA,OAAO,YAAY,GAAG,CAAC,CAAC;AACxB,IAAA,OAAO,cAAc,GAAG,EAAE,CAAC;AAEnC,IAAA,OAAO,OAAO,CACZ,IAAW,EACX,MAAmB,EACnB,OAA6D,EAAA;QAE7D,MAAM,WAAW,GAAG,OAAO,EAAE,WAAW,IAAI,IAAI,CAAC,YAAY;QAC7D,MAAM,QAAQ,GAAG,OAAO,EAAE,gBAAgB,IAAI,IAAI,CAAC,MAAM;AACzD,QAAA,MAAM,OAAO,GAAgB;YAC3B,QAAQ;AACR,YAAA,OAAO,EAAE,EAAE;AACX,YAAA,WAAW,EAA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