@praxisui/table 1.0.0-beta.60 → 1.0.0-beta.63

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/index.d.ts CHANGED
@@ -498,6 +498,11 @@ declare class PraxisFilter implements OnInit, OnChanges, AfterViewInit, OnDestro
498
498
  private configKey;
499
499
  private lastSchemaMeta?;
500
500
  private schemaLoadVersion;
501
+ private readonly storedSchemaMetaCache;
502
+ private schemaMetaIndexCache?;
503
+ private schemaMetaIndexLoadPromise?;
504
+ private verifySchemaInFlight;
505
+ private lastSchemaVerificationByContext;
501
506
  schemaOutdated: boolean;
502
507
  anchorRef?: CdkOverlayOrigin;
503
508
  addAnchor?: CdkOverlayOrigin;
@@ -589,6 +594,11 @@ declare class PraxisFilter implements OnInit, OnChanges, AfterViewInit, OnDestro
589
594
  private clearConfigStorageKey;
590
595
  private loadStoredSchemaMeta;
591
596
  private rememberSchemaMetaContext;
597
+ private ensureSchemaMetaIndexLoaded;
598
+ private saveStoredSchemaMeta;
599
+ private stableSerialize;
600
+ private normalizeStoredSchemaMetaForComparison;
601
+ private schemaVerificationContextKey;
592
602
  private getSchemaMetaKeyForContext;
593
603
  private isStoredSchemaMetaForContext;
594
604
  private isSameSchemaContext;
@@ -662,6 +672,7 @@ declare class PraxisFilter implements OnInit, OnChanges, AfterViewInit, OnDestro
662
672
  private setOutdatedNotified;
663
673
  private wasOutdatedNotified;
664
674
  private verifyServerSchemaVersion;
675
+ private runSchemaVerification;
665
676
  private maybeShowOutdatedSnack;
666
677
  ngOnDestroy(): void;
667
678
  isUserTag(tag: FilterTag): boolean;
@@ -874,6 +885,7 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
874
885
  private expansionDetailAbortByRowKey;
875
886
  private expansionDetailActiveTabByRowKey;
876
887
  private schemaFieldsSnapshot;
888
+ private runtimeSchemaMeta;
877
889
  schemaError: boolean;
878
890
  dataError: boolean;
879
891
  errorMessage: string | null;
@@ -1018,9 +1030,6 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
1018
1030
  private connectionKey;
1019
1031
  private saveConnection;
1020
1032
  private inputsKey;
1021
- private normalizeResourcePathIntent;
1022
- private resolveResourcePathIntentFromEditor;
1023
- private applyResourcePathIntentFromEditor;
1024
1033
  disconnect(): void;
1025
1034
  ngAfterViewInit(): void;
1026
1035
  onPageChange(event: PageEvent): void;
@@ -1139,7 +1148,9 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
1139
1148
  private showResetSuccessFeedback;
1140
1149
  openTableSettings(): void;
1141
1150
  private applyTableConfig;
1142
- private withFallbackAdvancedFilterSettings;
1151
+ private buildTableEditorRuntimeContext;
1152
+ private executeTableEditorApplyPlan;
1153
+ private attachRuntimeMetadataToEditorConfig;
1143
1154
  private syncInternalFilterSettings;
1144
1155
  private resetPreferencesToDefaults;
1145
1156
  onResetPreferences(): void;
@@ -1438,11 +1449,13 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
1438
1449
  onReconcileRequested(): void;
1439
1450
  onSnoozeOutdated(): void;
1440
1451
  onIgnoreOutdated(): void;
1441
- private updateTableMetaFromServerInfo;
1452
+ private updateRuntimeSchemaMetaFromServerInfo;
1442
1453
  private emitMetadataChange;
1443
1454
  private emitSchemaStatus;
1444
1455
  getRowId(row: any): any;
1445
1456
  getIdField(): string;
1457
+ private syncRuntimeSchemaMetaFromConfig;
1458
+ private getEffectiveMetadataSnapshot;
1446
1459
  getActionId(action: any): string;
1447
1460
  private setupResizeObserver;
1448
1461
  private setupViewportChangeListeners;
@@ -1484,10 +1497,84 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
1484
1497
  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; }; "editModeEnabled": { "alias": "editModeEnabled"; "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>;
1485
1498
  }
1486
1499
 
1500
+ interface EditorDocument<TConfig, TBindings = unknown> {
1501
+ kind: string;
1502
+ version: number;
1503
+ config: TConfig;
1504
+ bindings?: TBindings;
1505
+ }
1506
+ type TableHorizontalScroll = 'auto' | 'wrap' | 'none';
1507
+ interface TableBindings {
1508
+ resourcePath?: string | null;
1509
+ idField?: string;
1510
+ horizontalScroll?: TableHorizontalScroll;
1511
+ }
1512
+ interface TableAuthoringDocument extends EditorDocument<TableConfig, TableBindings> {
1513
+ kind: 'praxis.table.editor';
1514
+ version: 1;
1515
+ }
1516
+ interface EditorDiagnostic {
1517
+ level: 'error' | 'warning' | 'info';
1518
+ code: string;
1519
+ message: string;
1520
+ path?: string;
1521
+ }
1522
+ interface TableValidationContext {
1523
+ hasLocalDataInput?: boolean;
1524
+ localDataModeDefaultEnabled?: boolean;
1525
+ server?: {
1526
+ idField?: string;
1527
+ schemaHash?: string;
1528
+ };
1529
+ }
1530
+ interface TableProjectionContext {
1531
+ hasLocalDataInput?: boolean;
1532
+ localDataModeDefaultEnabled?: boolean;
1533
+ }
1534
+ interface TableRuntimeContext {
1535
+ hasLocalDataInput?: boolean;
1536
+ localDataModeDefaultEnabled?: boolean;
1537
+ server?: {
1538
+ idField?: string;
1539
+ schemaId?: string;
1540
+ schemaHash?: string;
1541
+ };
1542
+ crud?: {
1543
+ tableId: string;
1544
+ componentKeyId?: string;
1545
+ };
1546
+ currentBindings?: TableBindings;
1547
+ }
1548
+ interface TableApplyPlan {
1549
+ canonicalConfig: TableConfig;
1550
+ bindingsPatch?: TableBindings;
1551
+ persistence?: {
1552
+ saveConfig?: boolean;
1553
+ saveBindings?: boolean;
1554
+ };
1555
+ runtime?: {
1556
+ reconnectDataSource?: boolean;
1557
+ reloadSchema?: boolean;
1558
+ fetchData?: boolean;
1559
+ refreshLocalView?: boolean;
1560
+ };
1561
+ metadata?: {
1562
+ attachServerMeta?: boolean;
1563
+ };
1564
+ diff?: {
1565
+ resourcePathChanged?: boolean;
1566
+ idFieldChanged?: boolean;
1567
+ horizontalScrollChanged?: boolean;
1568
+ requiresDataRefresh?: boolean;
1569
+ };
1570
+ diagnostics: EditorDiagnostic[];
1571
+ }
1572
+
1487
1573
  interface JsonValidationResult {
1488
1574
  isValid: boolean;
1489
1575
  error?: string;
1490
- config?: TableConfig;
1576
+ document?: TableAuthoringDocument;
1577
+ diagnostics?: EditorDiagnostic[];
1491
1578
  }
1492
1579
  interface JsonEditorEvent {
1493
1580
  type: 'apply' | 'format' | 'validation';
@@ -1495,8 +1582,8 @@ interface JsonEditorEvent {
1495
1582
  }
1496
1583
  declare class JsonConfigEditorComponent implements OnInit, OnDestroy {
1497
1584
  private cdr;
1498
- config: TableConfig | null;
1499
- configChange: EventEmitter<_praxisui_core.TableConfigModern>;
1585
+ document: TableAuthoringDocument | null;
1586
+ documentChange: EventEmitter<TableAuthoringDocument>;
1500
1587
  validationChange: EventEmitter<JsonValidationResult>;
1501
1588
  editorEvent: EventEmitter<JsonEditorEvent>;
1502
1589
  jsonText: string;
@@ -1511,22 +1598,13 @@ declare class JsonConfigEditorComponent implements OnInit, OnDestroy {
1511
1598
  onJsonTextChange(text: string): void;
1512
1599
  applyJsonChanges(): void;
1513
1600
  formatJson(): void;
1514
- /**
1515
- * Método público para atualizar o JSON externamente
1516
- */
1517
- updateJsonFromConfig(config: TableConfig): void;
1518
- /**
1519
- * Método público para obter a configuração atual validada
1520
- */
1521
- getCurrentConfig(): TableConfig | null;
1522
- /**
1523
- * Método público para verificar se há alterações
1524
- */
1601
+ updateJsonFromDocument(document: TableAuthoringDocument): void;
1602
+ getCurrentDocument(): TableAuthoringDocument | null;
1525
1603
  hasChanges(): boolean;
1526
1604
  private validateJson;
1527
1605
  private updateValidationState;
1528
1606
  static ɵfac: i0.ɵɵFactoryDeclaration<JsonConfigEditorComponent, never>;
1529
- static ɵcmp: i0.ɵɵComponentDeclaration<JsonConfigEditorComponent, "json-config-editor", never, { "config": { "alias": "config"; "required": false; }; }, { "configChange": "configChange"; "validationChange": "validationChange"; "editorEvent": "editorEvent"; }, never, never, true, never>;
1607
+ static ɵcmp: i0.ɵɵComponentDeclaration<JsonConfigEditorComponent, "json-config-editor", never, { "document": { "alias": "document"; "required": false; }; }, { "documentChange": "documentChange"; "validationChange": "validationChange"; "editorEvent": "editorEvent"; }, never, never, true, never>;
1530
1608
  }
1531
1609
 
1532
1610
  type FormulaType = 'none' | 'concatenation' | 'arithmetic' | 'nested_property' | 'conditional_mapping' | 'default_value';
@@ -2418,6 +2496,7 @@ declare class PraxisTableConfigEditor implements OnInit, OnDestroy, SettingsValu
2418
2496
  private serverSchemaHash?;
2419
2497
  idFieldDiverges: boolean;
2420
2498
  schemaHashDiverges: boolean;
2499
+ schemaSnapshotMissing: boolean;
2421
2500
  isV2Config: boolean;
2422
2501
  canSave: boolean;
2423
2502
  hasErrors: boolean;
@@ -2443,9 +2522,10 @@ declare class PraxisTableConfigEditor implements OnInit, OnDestroy, SettingsValu
2443
2522
  private isDebugLoggingEnabled;
2444
2523
  private debugLog;
2445
2524
  ngOnInit(): void;
2446
- onJsonConfigChange(newConfig: TableConfig): void;
2525
+ onJsonConfigChange(newValue: TableConfig | TableAuthoringDocument): void;
2447
2526
  onJsonValidationChange(result: JsonValidationResult): void;
2448
2527
  onJsonEditorEvent(event: JsonEditorEvent): void;
2528
+ buildJsonAuthoringDocument(): TableAuthoringDocument;
2449
2529
  onColumnsConfigChange(newConfig: TableConfig): void;
2450
2530
  onColumnChange(change: ColumnChange): void;
2451
2531
  onFilterSettingsChange(cfg: FilterConfig): void;
@@ -2473,8 +2553,7 @@ declare class PraxisTableConfigEditor implements OnInit, OnDestroy, SettingsValu
2473
2553
  * Realiza comparação profunda de objetos, ignorando ordem de propriedades
2474
2554
  */
2475
2555
  private deepEqual;
2476
- getSettingsValue(): TableConfig;
2477
- private getResourcePathIntent;
2556
+ getSettingsValue(): any;
2478
2557
  private syncFilterSettingsFromEditor;
2479
2558
  private hasAdvancedSettingsProperty;
2480
2559
  private syncLastKnownFilterSettingsFromEditedConfig;
@@ -2494,7 +2573,7 @@ declare class PraxisTableConfigEditor implements OnInit, OnDestroy, SettingsValu
2494
2573
  * Returning the current `TableConfig` is therefore required for the table to
2495
2574
  * apply the new settings.
2496
2575
  */
2497
- onSave(): TableConfig | undefined;
2576
+ onSave(): any;
2498
2577
  /**
2499
2578
  * Atualiza as flags de versão baseado na configuração atual
2500
2579
  * Esta versão pode modificar a configuração, deve ser usada após mudanças
@@ -2598,6 +2677,21 @@ declare class DataFormatterComponent implements OnInit, OnChanges {
2598
2677
  static ɵcmp: i0.ɵɵComponentDeclaration<DataFormatterComponent, "data-formatter", never, { "columnType": { "alias": "columnType"; "required": false; }; "currentFormat": { "alias": "currentFormat"; "required": false; }; }, { "formatChange": "formatChange"; }, never, never, true, never>;
2599
2678
  }
2600
2679
 
2680
+ declare function createTableAuthoringDocument(source: {
2681
+ config?: unknown;
2682
+ bindings?: unknown;
2683
+ }): TableAuthoringDocument;
2684
+ declare function parseLegacyOrTableDocument(raw: unknown): TableAuthoringDocument;
2685
+ declare function normalizeTableAuthoringDocument(doc: TableAuthoringDocument): TableAuthoringDocument;
2686
+ declare function validateTableAuthoringDocument(doc: TableAuthoringDocument, context?: TableValidationContext): EditorDiagnostic[];
2687
+ declare function toCanonicalTableConfig(doc: TableAuthoringDocument, context?: TableProjectionContext): TableConfig;
2688
+ declare function buildTableApplyPlan(doc: TableAuthoringDocument, runtime?: TableRuntimeContext, options?: {
2689
+ saveConfig?: boolean;
2690
+ saveBindings?: boolean;
2691
+ attachServerMeta?: boolean;
2692
+ }): TableApplyPlan;
2693
+ declare function serializeTableAuthoringDocument(doc: TableAuthoringDocument): unknown;
2694
+
2601
2695
  interface ValueMappingPair {
2602
2696
  key: string | number | boolean;
2603
2697
  value: string;
@@ -3036,6 +3130,7 @@ declare function providePraxisTableMetadata(): Provider;
3036
3130
  declare module '@praxisui/core' {
3037
3131
  interface AiCapabilityCategoryMap {
3038
3132
  meta: true;
3133
+ bindings: true;
3039
3134
  columns: true;
3040
3135
  renderer: true;
3041
3136
  conditional: true;
@@ -3110,5 +3205,5 @@ interface CapabilityCatalog extends AiCapabilityCatalog {
3110
3205
  }
3111
3206
  declare const TABLE_COMPONENT_AI_CAPABILITIES: CapabilityCatalog;
3112
3207
 
3113
- export { BOOLEAN_PRESETS, BehaviorConfigEditorComponent, CURRENCY_PRESETS, ColumnsConfigEditorComponent, DATE_PRESETS, DataFormatterComponent, DataFormattingService, FORMULA_TEMPLATES, FilterConfigService, FilterSettingsComponent, FormulaGeneratorService, JsonConfigEditorComponent, MessagesLocalizationEditorComponent, NUMBER_PRESETS, PERCENTAGE_PRESETS, PRAXIS_TABLE_COMPONENT_METADATA, PraxisFilter, PraxisTable, PraxisTableConfigEditor, PraxisTableToolbar, STRING_PRESETS, TABLE_AI_CAPABILITIES, TABLE_COMPONENT_AI_CAPABILITIES, TASK_PRESETS, TableDefaultsProvider, TableRulesEditorComponent, ToolbarActionsEditorComponent, ValueMappingEditorComponent, VisualFormulaBuilderComponent, getActionId, getEnum, getTableCapabilities, hasJsonKey, jsonPathGet, jsonPathMatches, providePraxisTableMetadata, registerDateDslFunctions, registerJsonDslFunctions };
3114
- 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, DataMode, DateFormatterOptions, DefaultValueParams, FieldSchema, FilterConfig, FilterTag, FormatPreset, FormatterConfig, FormulaDefinition, FormulaParameterSchema, FormulaParams, FormulaTemplate, FormulaType, I18n, JsonEditorEvent, JsonValidationResult, MessagesLocalizationChange, NestedPropertyParams, NumberFormatterOptions, PercentageFormatterOptions, ResourcePathIntent, RowAction, RowExpansionChangeBase, RowExpansionChangeEvent, RowExpansionReasonCode, RowExpansionTrigger, StringFormatterOptions, Capability as TableComponentCapability, CapabilityCatalog as TableComponentCapabilityCatalog, CapabilityCategory as TableComponentCapabilityCategory, ValueKind as TableComponentValueKind, ToolbarAction, ToolbarActionsChange, ValueKind$1 as ValueKind, ValueMappingPair };
3208
+ export { BOOLEAN_PRESETS, BehaviorConfigEditorComponent, CURRENCY_PRESETS, ColumnsConfigEditorComponent, DATE_PRESETS, DataFormatterComponent, DataFormattingService, FORMULA_TEMPLATES, FilterConfigService, FilterSettingsComponent, FormulaGeneratorService, JsonConfigEditorComponent, MessagesLocalizationEditorComponent, NUMBER_PRESETS, PERCENTAGE_PRESETS, 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, providePraxisTableMetadata, registerDateDslFunctions, registerJsonDslFunctions, serializeTableAuthoringDocument, toCanonicalTableConfig, validateTableAuthoringDocument };
3209
+ 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, 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": "1.0.0-beta.60",
3
+ "version": "1.0.0-beta.63",
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": "^1.0.0-beta.60",
9
- "@praxisui/dynamic-fields": "^1.0.0-beta.60",
10
- "@praxisui/dynamic-form": "^1.0.0-beta.60",
11
- "@praxisui/metadata-editor": "^1.0.0-beta.60",
12
- "@praxisui/settings-panel": "^1.0.0-beta.60",
13
- "@praxisui/table-rule-builder": "^1.0.0-beta.60"
8
+ "@praxisui/core": "^1.0.0-beta.63",
9
+ "@praxisui/dynamic-fields": "^1.0.0-beta.63",
10
+ "@praxisui/dynamic-form": "^1.0.0-beta.63",
11
+ "@praxisui/metadata-editor": "^1.0.0-beta.63",
12
+ "@praxisui/settings-panel": "^1.0.0-beta.63",
13
+ "@praxisui/table-rule-builder": "^1.0.0-beta.63"
14
14
  },
15
15
  "dependencies": {
16
16
  "tslib": "^2.3.0"
@@ -23,7 +23,7 @@
23
23
  "type": "git",
24
24
  "url": "https://github.com/codexrodrigues/praxis-ui-angular"
25
25
  },
26
- "homepage": "https://github.com/codexrodrigues/praxis-ui-angular#readme",
26
+ "homepage": "https://praxisui.dev",
27
27
  "bugs": {
28
28
  "url": "https://github.com/codexrodrigues/praxis-ui-angular/issues"
29
29
  },
@@ -32,7 +32,8 @@
32
32
  "praxisui",
33
33
  "table",
34
34
  "data-grid",
35
- "ui",
35
+ "filtering",
36
+ "virtualization",
36
37
  "material"
37
38
  ],
38
39
  "sideEffects": false,