@agile-team/mach-table 0.15.0 → 0.18.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/dist/index.d.ts CHANGED
@@ -47,6 +47,25 @@ interface RowNode<TData = any> {
47
47
  treeLoadError?: unknown;
48
48
  }
49
49
 
50
+ interface AdvancedFilterCondition {
51
+ kind: "condition";
52
+ colId: string;
53
+ filter: ColumnFilter;
54
+ }
55
+ interface AdvancedFilterGroup {
56
+ kind: "group";
57
+ operator: "and" | "or";
58
+ children: AdvancedFilterNode[];
59
+ /** Negates the complete group without changing its children. */
60
+ not?: boolean;
61
+ }
62
+ type AdvancedFilterNode = AdvancedFilterCondition | AdvancedFilterGroup;
63
+ /** Serializable, backend-friendly nested filter expression. */
64
+ interface AdvancedFilterModel {
65
+ version: 1;
66
+ root: AdvancedFilterNode;
67
+ }
68
+
50
69
  declare const EVENT_TYPES: readonly ["gridReady", "gridDestroyed", "modelUpdated", "cellClicked", "cellDoubleClicked", "cellContextMenu", "rowClicked", "rowDoubleClicked", "selectionChanged", "sortChanged", "filterChanged", "columnResized", "columnMoved", "columnVisibilityChanged", "cellValueChanged", "cellEditingStarted", "cellEditingStopped", "rowEditingStarted", "rowEditingStopped", "detailToggled", "treeChildrenLoaded", "treeChildrenLoadFailed", "rowDragEnd", "rangeSelectionChanged", "paginationChanged", "displayedColumnsChanged", "gridError", "dirtyStateChanged"];
51
70
  type GridEventType = (typeof EVENT_TYPES)[number];
52
71
  type GridErrorCode = "DATA_SOURCE_ERROR" | "DATA_INTEGRITY_ERROR" | "VALIDATION_ERROR" | "RENDERER_ERROR" | "EDITOR_ERROR" | "FEATURE_ERROR" | "STATE_ERROR" | "EVENT_HANDLER_ERROR" | "GRID_ERROR";
@@ -109,6 +128,7 @@ interface SortChangedEvent<TData = any> extends GridEventBase<TData> {
109
128
  interface FilterChangedEvent<TData = any> extends GridEventBase<TData> {
110
129
  type: "filterChanged";
111
130
  filterModel: FilterModel;
131
+ advancedFilterModel: AdvancedFilterModel | null;
112
132
  }
113
133
  interface ColumnResizedEvent<TData = any> extends GridEventBase<TData> {
114
134
  type: "columnResized";
@@ -322,10 +342,7 @@ declare function matchLocaleKey(match: string): RgLocaleKey;
322
342
  declare function formatText(template: string, n: number | string): string;
323
343
  declare function formatTwo(template: string, a: number | string, b: number | string): string;
324
344
 
325
- /** Serializable snapshot of user-visible grid state. */
326
- interface GridState {
327
- /** State schema version, independent from the package version. */
328
- version: 1;
345
+ interface GridStateBase {
329
346
  columns: ColumnState[];
330
347
  sortModel: SortModel;
331
348
  filterModel: FilterModel;
@@ -339,6 +356,17 @@ interface GridState {
339
356
  expandedRowIds: string[];
340
357
  expandedGroupIds: string[];
341
358
  }
359
+ /** Read-only compatibility shape accepted from MachTable 0.14/0.15. */
360
+ interface LegacyGridStateV1 extends GridStateBase {
361
+ version: 1;
362
+ }
363
+ /** Serializable snapshot of user-visible grid state. */
364
+ interface GridState extends GridStateBase {
365
+ /** State schema version, independent from the package version. */
366
+ version: 2;
367
+ advancedFilterModel: AdvancedFilterModel | null;
368
+ }
369
+ type GridStateInput = GridState | LegacyGridStateV1;
342
370
  type GridStateSection = "columns" | "sort" | "filter" | "pagination" | "selection" | "expansion";
343
371
  interface ApplyGridStateOptions {
344
372
  /** Applies all sections when omitted. */
@@ -368,8 +396,8 @@ interface ColumnStateStore {
368
396
  save(key: string, state: ColumnState[]): void | Promise<void>;
369
397
  }
370
398
  interface GridStateStore {
371
- load(key: string): GridState | null | Promise<GridState | null>;
372
- save(key: string, state: GridState): void | Promise<void>;
399
+ load(key: string): GridStateInput | null | Promise<GridStateInput | null>;
400
+ save(key: string, state: GridStateInput): void | Promise<void>;
373
401
  clear?(key: string): void | Promise<void>;
374
402
  }
375
403
  /** Per-grid component overrides. These take precedence over the global registry. */
@@ -392,6 +420,12 @@ interface GridFeatureContext<TData = any> {
392
420
  /** Composable extension point; feature instances are scoped to one grid. */
393
421
  interface GridFeature<TData = any> {
394
422
  readonly key: string;
423
+ /** Informational extension version exposed through diagnostics. */
424
+ readonly version?: string;
425
+ /** Feature keys that must be initialised before this feature. */
426
+ readonly requires?: readonly string[];
427
+ /** Mutually exclusive feature keys. Conflicting features are not initialised. */
428
+ readonly conflicts?: readonly string[];
395
429
  setup(context: GridFeatureContext<TData>): void | (() => void);
396
430
  destroy?(): void;
397
431
  }
@@ -410,6 +444,7 @@ interface InfiniteGetRowsParams<TData = any> {
410
444
  endRow: number;
411
445
  sortModel: SortModel;
412
446
  filterModel: FilterModel;
447
+ advancedFilterModel: AdvancedFilterModel | null;
413
448
  quickFilterText: string | null;
414
449
  signal: AbortSignal;
415
450
  onSuccess(rows: TData[], lastRow?: number): void;
@@ -509,6 +544,8 @@ interface GridOptions<TData = any> extends EventHandlers<TData> {
509
544
  showCellBorders?: boolean;
510
545
  theme?: ThemeMode;
511
546
  quickFilterText?: string | null;
547
+ /** Nested AND/OR filter expression, safe for local evaluation and backend serialization. */
548
+ advancedFilterModel?: AdvancedFilterModel | null;
512
549
  masterDetail?: boolean;
513
550
  detailRowHeight?: number;
514
551
  detailRowRenderer?: (params: DetailRowRendererParams<TData>) => string | HTMLElement | ICellRendererResult | null | undefined;
@@ -523,7 +560,7 @@ interface GridOptions<TData = any> extends EventHandlers<TData> {
523
560
  actionPolicy?: ActionPolicy<TData>;
524
561
  features?: readonly GridFeature<TData>[];
525
562
  /** State restored atomically after columns and initial rows are available. */
526
- initialState?: GridState;
563
+ initialState?: GridStateInput;
527
564
  /** Persist the complete user-visible GridState with a versioned store. */
528
565
  stateKey?: string | null;
529
566
  stateStore?: GridStateStore;
@@ -619,6 +656,7 @@ interface ResolvedGridOptions<TData = any> extends EventHandlers<TData> {
619
656
  showCellBorders: boolean;
620
657
  theme: ThemeMode;
621
658
  quickFilterText: string | null;
659
+ advancedFilterModel: AdvancedFilterModel | null;
622
660
  masterDetail: boolean;
623
661
  detailRowHeight: number;
624
662
  detailRowRenderer?: (params: DetailRowRendererParams<TData>) => string | HTMLElement | ICellRendererResult | null | undefined;
@@ -631,7 +669,7 @@ interface ResolvedGridOptions<TData = any> extends EventHandlers<TData> {
631
669
  components?: GridComponents;
632
670
  actionPolicy?: ActionPolicy<TData>;
633
671
  features: readonly GridFeature<TData>[];
634
- initialState?: GridState;
672
+ initialState?: GridStateInput;
635
673
  stateKey: string | null;
636
674
  stateStore?: GridStateStore;
637
675
  stateSaveDebounceMs: number;
@@ -751,6 +789,17 @@ interface GridDiagnosticError {
751
789
  timestamp: number;
752
790
  context?: Record<string, unknown>;
753
791
  }
792
+ interface GridPerformanceSnapshot {
793
+ sampleCount: number;
794
+ lastRenderMs: number;
795
+ averageRenderMs: number;
796
+ maxRenderMs: number;
797
+ p95RenderMs: number;
798
+ longRenderCount: number;
799
+ renderedRows: number;
800
+ renderedColumns: number;
801
+ renderedCells: number;
802
+ }
754
803
  interface ColumnWorkbenchItem {
755
804
  colId: string;
756
805
  label: string;
@@ -771,13 +820,37 @@ interface GridDiagnostics {
771
820
  columnCount: number;
772
821
  selectedRowCount: number;
773
822
  dirtyRowCount: number;
823
+ activeFeatures: ReadonlyArray<{
824
+ key: string;
825
+ version?: string;
826
+ }>;
827
+ performance: GridPerformanceSnapshot;
774
828
  recentErrors: readonly GridDiagnosticError[];
775
829
  }
776
- interface SaveChangesResult {
830
+ interface SaveChangeIssue {
831
+ rowId: string;
832
+ code?: string;
833
+ message: string;
834
+ colIds?: readonly string[];
835
+ retryable?: boolean;
836
+ }
837
+ interface SaveChangeConflict<TData = any> extends SaveChangeIssue {
838
+ serverData?: TData;
839
+ serverVersion?: string | number;
840
+ }
841
+ interface SaveChangesResult<TData = any> {
777
842
  /** Omit to acknowledge every submitted row; return a subset for partial batch success. */
778
843
  savedRowIds?: readonly string[];
844
+ failures?: readonly SaveChangeIssue[];
845
+ conflicts?: readonly SaveChangeConflict<TData>[];
846
+ }
847
+ interface GridBatchSaveResult<TData = any> {
848
+ submitted: GridChange<TData>[];
849
+ saved: GridChange<TData>[];
850
+ failures: SaveChangeIssue[];
851
+ conflicts: SaveChangeConflict<TData>[];
779
852
  }
780
- type SaveChangesHandler<TData = any> = (changes: readonly GridChange<TData>[]) => void | SaveChangesResult | Promise<void | SaveChangesResult>;
853
+ type SaveChangesHandler<TData = any> = (changes: readonly GridChange<TData>[]) => void | SaveChangesResult<TData> | Promise<void | SaveChangesResult<TData>>;
781
854
  interface GridApi<TData = any> {
782
855
  /** Resolves after the first layout frame and gridReady emission. */
783
856
  whenReady(): Promise<GridApi<TData>>;
@@ -810,6 +883,8 @@ interface GridApi<TData = any> {
810
883
  setSortModel(sortModel: SortModel | null): void;
811
884
  getFilterModel(): FilterModel;
812
885
  setFilterModel(filterModel: FilterModel | null): void;
886
+ getAdvancedFilterModel(): AdvancedFilterModel | null;
887
+ setAdvancedFilterModel(model: AdvancedFilterModel | null): void;
813
888
  isColumnFilterPresent(colId: string): boolean;
814
889
  setQuickFilter(text: string | null | undefined): void;
815
890
  getQuickFilter(): string | null;
@@ -855,6 +930,7 @@ interface GridApi<TData = any> {
855
930
  markChangesSaved(rowIds?: readonly string[]): void;
856
931
  /** Saves a stable snapshot; supports partial success and preserves edits made in flight. */
857
932
  saveChanges(handler: SaveChangesHandler<TData>, rowIds?: readonly string[]): Promise<GridChange<TData>[]>;
933
+ saveChangesDetailed(handler: SaveChangesHandler<TData>, rowIds?: readonly string[]): Promise<GridBatchSaveResult<TData>>;
858
934
  rollbackChanges(rowIds?: readonly string[]): boolean;
859
935
  setPinnedTopRowData(rows: TData[] | null): void;
860
936
  getPinnedTopRowData(): TData[];
@@ -900,9 +976,12 @@ interface GridApi<TData = any> {
900
976
  updateOptions(options: Partial<GridOptions<TData>>): void;
901
977
  getDataAsCsv(params?: CsvExportParams): string;
902
978
  getState(): GridState;
903
- applyState(state: GridState, options?: ApplyGridStateOptions): void;
979
+ applyState(state: GridStateInput, options?: ApplyGridStateOptions): void;
904
980
  /** Lightweight runtime snapshot suitable for support logs and health panels. */
905
981
  getDiagnostics(): GridDiagnostics;
982
+ /** Rolling viewport-render metrics for diagnostics and reproducible benchmarks. */
983
+ getPerformanceSnapshot(): GridPerformanceSnapshot;
984
+ resetPerformanceMetrics(): void;
906
985
  setOverlay(type: "loading" | "noRows" | "error" | null): void;
907
986
  hideOverlays(): void;
908
987
  addEventListener<K extends GridEventType>(eventType: K, listener: (event: GridEventMap<TData>[K]) => void): () => void;
@@ -990,6 +1069,8 @@ interface HeaderComponentParams<TData = any> {
990
1069
  }
991
1070
  interface ICellRendererResult {
992
1071
  el: HTMLElement;
1072
+ /** Reuses the mounted renderer for an update. Return false to request recreation. */
1073
+ refresh?(params: CellRendererParams): boolean | void;
993
1074
  destroy?: () => void;
994
1075
  }
995
1076
  type CellRendererOutput = string | HTMLElement | ICellRendererResult | null | undefined;
@@ -1208,6 +1289,7 @@ declare class RowModel<TData = any> {
1208
1289
  private displayed;
1209
1290
  private nodesById;
1210
1291
  private filterModel;
1292
+ private advancedFilterModel;
1211
1293
  private quickFilter;
1212
1294
  private expandedIds;
1213
1295
  private groupExpandedIds;
@@ -1256,6 +1338,8 @@ declare class RowModel<TData = any> {
1256
1338
  private reindexAll;
1257
1339
  setFilterModel(filterModel: FilterModel | null): boolean;
1258
1340
  getFilterModel(): FilterModel;
1341
+ setAdvancedFilterModel(model: AdvancedFilterModel | null | undefined): boolean;
1342
+ getAdvancedFilterModel(): AdvancedFilterModel | null;
1259
1343
  setQuickFilter(text: string | null | undefined): boolean;
1260
1344
  getQuickFilter(): string | null;
1261
1345
  isFilterPresent(): boolean;
@@ -1591,6 +1675,14 @@ declare class ChangeTrackingService<TData = any> {
1591
1675
  private emitChanged;
1592
1676
  }
1593
1677
 
1678
+ declare class PerformanceMonitor {
1679
+ private samples;
1680
+ start(): number;
1681
+ recordRender(startedAt: number, rows: number, columns: number): void;
1682
+ snapshot(): GridPerformanceSnapshot;
1683
+ reset(): void;
1684
+ }
1685
+
1594
1686
  type SkeletonContext = Pick<GridCore<any>, "options" | "relayout" | "reportError">;
1595
1687
  declare class GridSkeleton {
1596
1688
  private core;
@@ -1670,7 +1762,7 @@ interface NormalizedRange {
1670
1762
  c2: number;
1671
1763
  }
1672
1764
 
1673
- type BodyContext = Pick<GridCore<any>, "buildDefaultEmptyState" | "buildDefaultErrorState" | "columnModel" | "contextMenuService" | "editingService" | "emit" | "getApi" | "getCellValue" | "gridId" | "isDestroyed" | "options" | "pinnedRowsRenderer" | "reportError" | "resolveCellRenderer" | "rowModel" | "selectionService" | "setCellValue" | "skeleton" | "summaryRenderer" | "toggleDetail" | "tooltipService" | "undoService">;
1765
+ type BodyContext = Pick<GridCore<any>, "buildDefaultEmptyState" | "buildDefaultErrorState" | "columnModel" | "contextMenuService" | "editingService" | "emit" | "getApi" | "getCellValue" | "gridId" | "isDestroyed" | "options" | "performanceMonitor" | "pinnedRowsRenderer" | "reportError" | "resolveCellRenderer" | "rowModel" | "selectionService" | "setCellValue" | "skeleton" | "summaryRenderer" | "toggleDetail" | "tooltipService" | "undoService">;
1674
1766
  interface FocusedCell {
1675
1767
  rowIndex: number;
1676
1768
  colId: string;
@@ -1720,6 +1812,10 @@ declare class BodyRenderer {
1720
1812
  applyCellLayout(): void;
1721
1813
  private computeColWindow;
1722
1814
  updateRange(force?: boolean): void;
1815
+ private updateRangeInner;
1816
+ private calculateVisibleRange;
1817
+ private hideOutsideRange;
1818
+ private renderVirtualRange;
1723
1819
  private reconcileColumnWindow;
1724
1820
  private renderAutoHeightRange;
1725
1821
  private hideSlot;
@@ -1730,6 +1826,8 @@ declare class BodyRenderer {
1730
1826
  private renderDetailContent;
1731
1827
  private cleanupDetail;
1732
1828
  private renderCell;
1829
+ private cellRenderKind;
1830
+ private renderStructuralCell;
1733
1831
  private appendEditableIndicator;
1734
1832
  private releaseSlotEditors;
1735
1833
  private treeColumnCache;
@@ -1882,6 +1980,7 @@ declare class GridCore<TData = any> {
1882
1980
  readonly editingService: EditingService;
1883
1981
  readonly undoService: UndoRedoService;
1884
1982
  readonly changeTracker: ChangeTrackingService<TData>;
1983
+ readonly performanceMonitor: PerformanceMonitor;
1885
1984
  readonly filterPopup: FilterPopupService;
1886
1985
  readonly columnMenu: ColumnMenuService;
1887
1986
  readonly contextMenuService: ContextMenuService;
@@ -1909,6 +2008,7 @@ declare class GridCore<TData = any> {
1909
2008
  private settleReady;
1910
2009
  resolveCellRenderer(name: string): CellRendererFn | undefined;
1911
2010
  resolveCellEditor(name: string): CellEditorFactory | undefined;
2011
+ private inactiveFeatureDependency;
1912
2012
  setFeatures(features: readonly GridFeature<TData>[] | null | undefined): void;
1913
2013
  private destroyFeatures;
1914
2014
  isDestroyed(): boolean;
@@ -1983,6 +2083,15 @@ declare function computeColumnWidths(cols: WidthInput[], availableWidth: number)
1983
2083
  /** Fits columns into a viewport while honoring every min/max bound. */
1984
2084
  declare function fitColumnWidths(cols: WidthInput[], availableWidth: number): number[];
1985
2085
 
2086
+ declare function normalizeColumnFilter(input: unknown): ColumnFilter | null;
2087
+ /** Clones and bounds untrusted JSON before it reaches the row pipeline. */
2088
+ declare function normalizeAdvancedFilterModel(input: unknown, validColumnIds?: ReadonlySet<string>): AdvancedFilterModel | null;
2089
+ declare function advancedFilterCondition(colId: string, filter: ColumnFilter): AdvancedFilterCondition;
2090
+ declare function normalizeFilterModel(input: unknown, validColumnIds?: ReadonlySet<string>): FilterModel;
2091
+ declare function advancedFilterGroup(operator: "and" | "or", children: AdvancedFilterNode[], options?: {
2092
+ not?: boolean;
2093
+ }): AdvancedFilterGroup;
2094
+
1986
2095
  interface GridSizePreset {
1987
2096
  rowHeight: number;
1988
2097
  headerHeight: number;
@@ -2084,6 +2193,10 @@ declare const GRID_OPTION_META: {
2084
2193
  readonly kind: "string";
2085
2194
  readonly update: "quickFilter";
2086
2195
  };
2196
+ readonly advancedFilterModel: {
2197
+ readonly kind: "object";
2198
+ readonly update: "options";
2199
+ };
2087
2200
  readonly masterDetail: {
2088
2201
  readonly kind: "boolean";
2089
2202
  readonly update: "options";
@@ -2364,6 +2477,14 @@ declare const GRID_OPTION_META: {
2364
2477
  declare const GRID_OPTION_KEYS: readonly GridOptionKey[];
2365
2478
  declare const DIRECT_GRID_OPTION_KEYS: readonly GridOptionKey[];
2366
2479
 
2480
+ declare function matchesGridOptionKind(value: unknown, kind: GridOptionValueKind): boolean;
2481
+ /**
2482
+ * Drops unknown and runtime-invalid options before they can partially mutate a grid.
2483
+ * Validation still reports the original patch, while this function guarantees that
2484
+ * JavaScript/JSON callers receive the same safety boundary as TypeScript callers.
2485
+ */
2486
+ declare function sanitizeGridOptionPatch<TData>(input: Partial<GridOptions<TData>> | Record<string, unknown>): Partial<GridOptions<TData>>;
2487
+
2367
2488
  declare function describeFilter(filter: ColumnFilter): string;
2368
2489
 
2369
2490
  type GridValidationCode = "UNKNOWN_OPTION" | "INVALID_OPTION_VALUE" | "OPTION_CONFLICT" | "MISSING_STABLE_ROW_ID";
@@ -2376,6 +2497,23 @@ interface GridValidationIssue {
2376
2497
  /** Runtime validation for JavaScript, JSON/schema driven and dynamic options. */
2377
2498
  declare function validateGridOptions(options: Partial<GridOptions<any>> | Record<string, unknown>): GridValidationIssue[];
2378
2499
 
2500
+ type GridFeatureIssueCode = "DUPLICATE_FEATURE" | "FEATURE_CONFLICT" | "FEATURE_CYCLE" | "FEATURE_DEPENDENCY_SETUP_FAILED" | "INVALID_FEATURE_KEY" | "MISSING_FEATURE_DEPENDENCY";
2501
+ interface GridFeatureIssue {
2502
+ code: GridFeatureIssueCode;
2503
+ feature?: string;
2504
+ dependency?: string;
2505
+ message: string;
2506
+ }
2507
+ interface ResolvedGridFeatures<TData = any> {
2508
+ features: GridFeature<TData>[];
2509
+ issues: GridFeatureIssue[];
2510
+ }
2511
+ /**
2512
+ * Validates and dependency-orders per-grid features before any setup side effect runs.
2513
+ * Invalid features are isolated instead of leaving a partially initialised extension graph.
2514
+ */
2515
+ declare function resolveGridFeatures<TData>(input: readonly GridFeature<TData>[]): ResolvedGridFeatures<TData>;
2516
+
2379
2517
  type GridSchemaFieldType = "string" | "number" | "date" | "select" | "boolean";
2380
2518
  interface SchemaSelectOption {
2381
2519
  label: string;
@@ -2453,7 +2591,7 @@ declare function loadColumnState(key: string): ColumnState[] | null;
2453
2591
  declare function clearColumnState(key: string): void;
2454
2592
 
2455
2593
  interface StoredGridState {
2456
- schemaVersion: 1;
2594
+ schemaVersion: 2;
2457
2595
  savedAt: number;
2458
2596
  state: GridState;
2459
2597
  }
@@ -2470,7 +2608,7 @@ interface ManagedGridStateStore extends GridStateStore {
2470
2608
  }
2471
2609
  /** Safe, versioned localStorage adapter for full grid state. */
2472
2610
  declare function createLocalGridStateStore(options?: LocalGridStateStoreOptions): ManagedGridStateStore;
2473
- declare function saveGridState(key: string, state: GridState): void;
2611
+ declare function saveGridState(key: string, state: GridStateInput): void;
2474
2612
  declare function loadGridState(key: string): GridState | null;
2475
2613
  declare function clearGridState(key: string): void;
2476
2614
 
@@ -2715,10 +2853,68 @@ interface DictionaryRendererOptions {
2715
2853
  /** Async-safe renderer backed by createCachedDictionary; stale pooled cells are not mutated. */
2716
2854
  declare function createDictionaryRenderer<TKey extends DictionaryKey = DictionaryKey>(dictionary: CachedDictionary<TKey>, options?: DictionaryRendererOptions): CellRendererFn;
2717
2855
 
2856
+ declare function createSaveSnapshot<TData>(changes: readonly GridChange<TData>[], rowIds?: readonly string[]): GridChange<TData>[];
2857
+ declare function normalizeBatchSaveResult<TData>(submitted: GridChange<TData>[], response: void | SaveChangesResult<TData>): GridBatchSaveResult<TData>;
2858
+ declare function resolveSaveConflict<TData>(api: GridApi<TData>, conflict: SaveChangeConflict<TData>, strategy: "acceptServer" | "keepLocal"): boolean;
2859
+
2860
+ /** Migrates and bounds persisted state before it mutates a live grid. */
2861
+ declare function migrateGridState(input: unknown): GridState | null;
2862
+
2863
+ /** Portable user preference snapshot. Selection and row expansion are deliberately excluded. */
2864
+ interface GridViewState {
2865
+ version: 1;
2866
+ columns: ColumnState[];
2867
+ sortModel: SortModel;
2868
+ filterModel: FilterModel;
2869
+ advancedFilterModel: AdvancedFilterModel | null;
2870
+ quickFilterText: string | null;
2871
+ pageSize: number;
2872
+ }
2873
+ interface SavedGridView {
2874
+ schemaVersion: 1;
2875
+ id: string;
2876
+ name: string;
2877
+ createdAt: number;
2878
+ updatedAt: number;
2879
+ state: GridViewState;
2880
+ }
2881
+ interface GridViewStore {
2882
+ list(scope: string): readonly SavedGridView[] | Promise<readonly SavedGridView[]>;
2883
+ save(scope: string, view: SavedGridView): void | Promise<void>;
2884
+ remove(scope: string, id: string): void | Promise<void>;
2885
+ }
2886
+ interface GridViewManager {
2887
+ list(): Promise<SavedGridView[]>;
2888
+ save(name: string, id?: string): Promise<SavedGridView>;
2889
+ apply(viewOrId: SavedGridView | string, options?: {
2890
+ emitEvents?: boolean;
2891
+ }): Promise<SavedGridView>;
2892
+ remove(id: string): Promise<void>;
2893
+ }
2894
+
2895
+ interface LocalGridViewStoreOptions {
2896
+ namespace?: string;
2897
+ storage?: ColumnStateStorage;
2898
+ maxViews?: number;
2899
+ maxBytes?: number;
2900
+ onError?(error: unknown, operation: "list" | "save" | "remove", scope: string): void;
2901
+ }
2902
+ declare function normalizeGridViewState(input: unknown): GridViewState | null;
2903
+ declare function normalizeSavedGridView(input: unknown): SavedGridView | null;
2904
+ declare function captureGridViewState<TData>(api: GridApi<TData>): GridViewState;
2905
+ declare function applyGridViewState<TData>(api: GridApi<TData>, view: GridViewState, options?: {
2906
+ emitEvents?: boolean;
2907
+ }): boolean;
2908
+ declare function createLocalGridViewStore(options?: LocalGridViewStoreOptions): GridViewStore;
2909
+ declare function createGridViewManager<TData>(api: GridApi<TData>, options: {
2910
+ scope: string;
2911
+ store?: GridViewStore;
2912
+ }): GridViewManager;
2913
+
2718
2914
  declare function evaluateColumnFilter(value: any, filter: ColumnFilter): boolean;
2719
2915
 
2720
2916
  declare function sortNodes<TData>(nodes: RowNode<TData>[], sortModel: SortModel, columns: Column[], getCellValue: (node: RowNode<TData>, column: Column) => any): RowNode<TData>[];
2721
2917
 
2722
2918
  declare const version: string;
2723
2919
 
2724
- export { type ActionButtonsConfig, type ActionItem, type ActionOverflowMode, type ActionPolicy, type ActionPolicyContext, type ActionVariant, type AggFunction, type AggValues, type ApplyGridStateOptions, BUILTIN_AGG_FUNCS, type BuiltInActionIcon, type BusinessColumnType, type BusinessColumnTypeOptions, type CachedDictionary, type CachedDictionaryOptions, type CellAlign, type CellClassParams, type CellClassRule, type CellClickEvent, type CellContextMenuEvent, type CellDoubleClickEvent, type CellEditingStartedEvent, type CellEditingStoppedEvent, type CellEditorFactory, type CellEditorParams, type CellRendererFn, type CellRendererOutput, type CellRendererParams, type CellStyleRule, type CellValueChangedEvent, type ColDef, type ColDefGroup, type ColDefOrGroup, Column, type ColumnFilter, type ColumnHelper, type ColumnLayoutMode, type ColumnMovedEvent, type ColumnResizedEvent, type ColumnState, type ColumnStateKeyParts, type ColumnStateStorage, type ColumnStateStore, type ColumnVisibilityChangedEvent, type ColumnWorkbenchItem, type ContextMenuItem, type ContextMenuParams, type CsvExportParams, DEFAULT_LOCALE, DIRECT_GRID_OPTION_KEYS, type DateFilterCondition, type DateFilterMatch, type DetailRowRendererParams, type DetailToggledEvent, type DictionaryEntry, type DictionaryKey, type DictionaryRendererOptions, type DirtyStateChangedEvent, type DomLayoutMode, EVENT_TYPES, type EditableIndicator, type EditableParams, EventBus, type EventHandlers, type FieldPath, type FieldPathValue, type FilterChangedEvent, type FilterModel, type FilterType, GRID_OPTION_KEYS, GRID_OPTION_META, GRID_SIZE_PRESETS, type GetRowHeightParams, type GetRowIdParams, type GridApi, type GridCellChange, type GridCellRange, type GridChange, type GridComponents, GridCore, type GridDatasource, type GridDiagnosticError, type GridDiagnostics, type GridEditType, type GridErrorCode, type GridErrorEvent, type GridEventBase, type GridEventMap, type GridEventType, type GridFeature, type GridFeatureContext, type GridOptionKey, type GridOptionMetadata, type GridOptionUpdateMode, type GridOptionValueKind, type GridOptions, type GridReadyEvent, type GridSchema, type GridSchemaField, type GridSchemaFieldType, type GridSchemaGroup, type GridSize, type GridSizePreset, type GridState, type GridStateSection, type GridStateStore, type GridValidationCode, type GridValidationIssue, type HeaderComponentParams, type ICellEditor, type ICellRendererResult, type ImportCsvOptions, type InfiniteGetRowsParams, LOCALE_EN, type LocalColumnStateStoreOptions, type LocalGridStateStoreOptions, type MachTableCommandOptions, type MachTableCommands, type MachTableConfigWarning, type MachTableOptionExplanation, type MachTablePresetSelection, type MachTableRuntimeConfig, type ManagedColumnStateStore, type ManagedGridStateStore, type ModelUpdatedEvent, type NumberFilterCondition, type NumberFilterMatch, type OverlayContent, type OverlayTemplate, type PaginationChangedEvent, type PaginationConfig, type PinnedDirection, type PrintOptions, type ProgressConfig, type RangeSelectionChangedEvent, type ResolvedGridOptions, type ResolvedMachTableConfig, type ResolvedMachTableGridOptions, type RgLocale, type RgLocaleKey, type RowActionsConfig, type RowClickEvent, type RowDragEndEvent, type RowEditChange, type RowEditValidationParams, type RowEditValidationResult, type RowEditingStartedEvent, type RowEditingStoppedEvent, type RowNode, type RowSelectionMode, type RowTransaction, type SaveChangesHandler, type SaveChangesResult, type SchemaSelectOption, type SelectEditorParams, type SelectionChangedEvent, type SetFilterCondition, type SetFilterParams, type SortChangedEvent, type SortDirection, type SortModel, type SortModelItem, type StatusBarConfig, type StatusBarPanel, type StatusTagConfig, type StoredColumnState, type StoredGridState, type TagVariant, type TextFilterCondition, type TextFilterMatch, type ThemeMode, type TooltipParams, type TreeChildrenLoadFailedEvent, type TreeChildrenLoadedEvent, type TreeDataLoadParams, type ValueFormatterParams, type ValueGetterParams, type ValueSetterParams, type WatermarkConfig, type WidthInput, actionsColumn, buildColDefsFromSchema, clearColumnState, clearComponentRegistries, clearGridState, computeColumnWidths, createActionButtonsRenderer, createAggResolver, createBusinessColumnTypes, createCachedDictionary, createColumnHelper, createColumnStateKey, createDictionaryRenderer, createEnterprisePreset, createGrid, createLocalColumnStateStore, createLocalGridStateStore, createMachTableCommands, createMachTablePreset, createProgressBarRenderer, createRowActionsRenderer, createStatusTagRenderer, defaultComparator, defineColumns, defineGridOptions, defineMachTableConfig, defineMachTablePreset, describeFilter, downloadFile, dragColumn, escapeHtml, evaluateColumnFilter, fitColumnWidths, formatText, formatTwo, getByPath, getCellEditor, getCellRenderer, indexColumn, isColDefGroup, isSafePath, linkRenderer, loadColumnState, loadGridState, matchLocaleKey, mergeMachTableConfig, normalizeMachTableConfig, parseCsv, parseDelimited, parseTsv, registerBuiltinRenderers, registerCellEditor, registerCellRenderer, resolveMachTableGridOptions, resolveTagVariant, rowActionsColumn, sanitizeFormulaCell, saveColumnState, saveGridState, selectionColumn, setByPath, sortNodes, toTsv, validateGridOptions, version };
2920
+ export { type ActionButtonsConfig, type ActionItem, type ActionOverflowMode, type ActionPolicy, type ActionPolicyContext, type ActionVariant, type AdvancedFilterCondition, type AdvancedFilterGroup, type AdvancedFilterModel, type AdvancedFilterNode, type AggFunction, type AggValues, type ApplyGridStateOptions, BUILTIN_AGG_FUNCS, type BuiltInActionIcon, type BusinessColumnType, type BusinessColumnTypeOptions, type CachedDictionary, type CachedDictionaryOptions, type CellAlign, type CellClassParams, type CellClassRule, type CellClickEvent, type CellContextMenuEvent, type CellDoubleClickEvent, type CellEditingStartedEvent, type CellEditingStoppedEvent, type CellEditorFactory, type CellEditorParams, type CellRendererFn, type CellRendererOutput, type CellRendererParams, type CellStyleRule, type CellValueChangedEvent, type ColDef, type ColDefGroup, type ColDefOrGroup, Column, type ColumnFilter, type ColumnHelper, type ColumnLayoutMode, type ColumnMovedEvent, type ColumnResizedEvent, type ColumnState, type ColumnStateKeyParts, type ColumnStateStorage, type ColumnStateStore, type ColumnVisibilityChangedEvent, type ColumnWorkbenchItem, type ContextMenuItem, type ContextMenuParams, type CsvExportParams, DEFAULT_LOCALE, DIRECT_GRID_OPTION_KEYS, type DateFilterCondition, type DateFilterMatch, type DetailRowRendererParams, type DetailToggledEvent, type DictionaryEntry, type DictionaryKey, type DictionaryRendererOptions, type DirtyStateChangedEvent, type DomLayoutMode, EVENT_TYPES, type EditableIndicator, type EditableParams, EventBus, type EventHandlers, type FieldPath, type FieldPathValue, type FilterChangedEvent, type FilterModel, type FilterType, GRID_OPTION_KEYS, GRID_OPTION_META, GRID_SIZE_PRESETS, type GetRowHeightParams, type GetRowIdParams, type GridApi, type GridBatchSaveResult, type GridCellChange, type GridCellRange, type GridChange, type GridComponents, GridCore, type GridDatasource, type GridDiagnosticError, type GridDiagnostics, type GridEditType, type GridErrorCode, type GridErrorEvent, type GridEventBase, type GridEventMap, type GridEventType, type GridFeature, type GridFeatureContext, type GridFeatureIssue, type GridFeatureIssueCode, type GridOptionKey, type GridOptionMetadata, type GridOptionUpdateMode, type GridOptionValueKind, type GridOptions, type GridPerformanceSnapshot, type GridReadyEvent, type GridSchema, type GridSchemaField, type GridSchemaFieldType, type GridSchemaGroup, type GridSize, type GridSizePreset, type GridState, type GridStateInput, type GridStateSection, type GridStateStore, type GridValidationCode, type GridValidationIssue, type GridViewManager, type GridViewState, type GridViewStore, type HeaderComponentParams, type ICellEditor, type ICellRendererResult, type ImportCsvOptions, type InfiniteGetRowsParams, LOCALE_EN, type LegacyGridStateV1, type LocalColumnStateStoreOptions, type LocalGridStateStoreOptions, type LocalGridViewStoreOptions, type MachTableCommandOptions, type MachTableCommands, type MachTableConfigWarning, type MachTableOptionExplanation, type MachTablePresetSelection, type MachTableRuntimeConfig, type ManagedColumnStateStore, type ManagedGridStateStore, type ModelUpdatedEvent, type NumberFilterCondition, type NumberFilterMatch, type OverlayContent, type OverlayTemplate, type PaginationChangedEvent, type PaginationConfig, type PinnedDirection, type PrintOptions, type ProgressConfig, type RangeSelectionChangedEvent, type ResolvedGridFeatures, type ResolvedGridOptions, type ResolvedMachTableConfig, type ResolvedMachTableGridOptions, type RgLocale, type RgLocaleKey, type RowActionsConfig, type RowClickEvent, type RowDragEndEvent, type RowEditChange, type RowEditValidationParams, type RowEditValidationResult, type RowEditingStartedEvent, type RowEditingStoppedEvent, type RowNode, type RowSelectionMode, type RowTransaction, type SaveChangeConflict, type SaveChangeIssue, type SaveChangesHandler, type SaveChangesResult, type SavedGridView, type SchemaSelectOption, type SelectEditorParams, type SelectionChangedEvent, type SetFilterCondition, type SetFilterParams, type SortChangedEvent, type SortDirection, type SortModel, type SortModelItem, type StatusBarConfig, type StatusBarPanel, type StatusTagConfig, type StoredColumnState, type StoredGridState, type TagVariant, type TextFilterCondition, type TextFilterMatch, type ThemeMode, type TooltipParams, type TreeChildrenLoadFailedEvent, type TreeChildrenLoadedEvent, type TreeDataLoadParams, type ValueFormatterParams, type ValueGetterParams, type ValueSetterParams, type WatermarkConfig, type WidthInput, actionsColumn, advancedFilterCondition, advancedFilterGroup, applyGridViewState, buildColDefsFromSchema, captureGridViewState, clearColumnState, clearComponentRegistries, clearGridState, computeColumnWidths, createActionButtonsRenderer, createAggResolver, createBusinessColumnTypes, createCachedDictionary, createColumnHelper, createColumnStateKey, createDictionaryRenderer, createEnterprisePreset, createGrid, createGridViewManager, createLocalColumnStateStore, createLocalGridStateStore, createLocalGridViewStore, createMachTableCommands, createMachTablePreset, createProgressBarRenderer, createRowActionsRenderer, createSaveSnapshot, createStatusTagRenderer, defaultComparator, defineColumns, defineGridOptions, defineMachTableConfig, defineMachTablePreset, describeFilter, downloadFile, dragColumn, escapeHtml, evaluateColumnFilter, fitColumnWidths, formatText, formatTwo, getByPath, getCellEditor, getCellRenderer, indexColumn, isColDefGroup, isSafePath, linkRenderer, loadColumnState, loadGridState, matchLocaleKey, matchesGridOptionKind, mergeMachTableConfig, migrateGridState, normalizeAdvancedFilterModel, normalizeBatchSaveResult, normalizeColumnFilter, normalizeFilterModel, normalizeGridViewState, normalizeMachTableConfig, normalizeSavedGridView, parseCsv, parseDelimited, parseTsv, registerBuiltinRenderers, registerCellEditor, registerCellRenderer, resolveGridFeatures, resolveMachTableGridOptions, resolveSaveConflict, resolveTagVariant, rowActionsColumn, sanitizeFormulaCell, sanitizeGridOptionPatch, saveColumnState, saveGridState, selectionColumn, setByPath, sortNodes, toTsv, validateGridOptions, version };