ia-table 0.14.4 → 0.14.5

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
@@ -501,7 +501,7 @@ export declare type SmartGridActionTypes = typeof ACTION_TYPES;
501
501
 
502
502
  export declare type SmartGridAggregationType = "sum" | "count" | "avg" | "min" | "max";
503
503
 
504
- export declare interface SmartGridAPI {
504
+ export declare interface SmartGridAPI extends SmartGridPaginationAPI, SmartGridApiExtra {
505
505
  getInfiniteRowModel: () => SmartGridInfiniteRowModel | null;
506
506
  getInfiniteCache: () => SmartGridInfiniteCache | null;
507
507
  getModel: () => SmartGridTableModel;
@@ -518,7 +518,6 @@ export declare interface SmartGridAPI {
518
518
  setSelectedRows: (rowIds: (string | number)[]) => void;
519
519
  clearSelection: () => void;
520
520
  selectAll: () => void;
521
- refreshCells: () => void;
522
521
  getCache: () => SmartGridInfiniteCache | null;
523
522
  getCacheState: () => SmartGridCacheState | null;
524
523
  getInfiniteCacheInstance: () => SmartGridInfiniteCache | null;
@@ -567,8 +566,11 @@ export declare interface SmartGridAPI {
567
566
  applySearch: () => void;
568
567
  getCurrentPageData: () => SmartGridRowData[];
569
568
  getWholeTableData: () => SmartGridRowData[];
570
- flashCells: () => void;
571
- redrawRows: () => void;
569
+ refreshCells: (params?: SmartGridRefreshCellsParams) => void;
570
+ flashCells: (params?: SmartGridFlashCellsParams) => void;
571
+ redrawRows: (params?: SmartGridRedrawRowsParams) => void;
572
+ applyTransaction: (transaction: SmartGridRowDataTransaction) => SmartGridRowNodeTransaction;
573
+ getSelectedNodes: () => SmartGridRowNode[];
572
574
  refreshClientSideRowModel: () => void;
573
575
  resetRecentSearchChanges: () => void;
574
576
  onFilterChanged: () => void;
@@ -588,12 +590,16 @@ export declare interface SmartGridAPI {
588
590
  fieldName: string;
589
591
  value: unknown;
590
592
  }) => void;
591
- setServerSideDataSource: (dataSource: SmartGridServerSideDataSource, resetCache?: boolean) => void;
593
+ setServerSideDataSource: (dataSource: SmartGridServerSideDataSource, resetCache?: boolean) => SmartGridWrappedDataSource | null;
592
594
  updateSmartGridTableData: (wholeData: SmartGridRowData[]) => void;
593
595
  downloadSmartGridExcel: (fileName?: string, visibleOnly?: boolean) => void;
594
596
  downloadSmartGridCSV: (fileName?: string, visibleOnly?: boolean) => void;
595
597
  }
596
598
 
599
+ export declare type SmartGridApiExtra = {
600
+ [key: string]: unknown;
601
+ };
602
+
597
603
  export declare type SmartGridBadgeColor = "default" | "success" | "warning" | "error" | "info";
598
604
 
599
605
  export declare interface SmartGridBadgeProps {
@@ -1457,6 +1463,7 @@ export declare type SmartGridDefaultColDef = {
1457
1463
  innerHeaderComponent: React.FC<SmartGridHeaderStyleParams> | null;
1458
1464
  };
1459
1465
  headerComponent?: React.FC<SmartGridHeaderStyleParams> | null;
1466
+ enableCellChangeFlash?: boolean;
1460
1467
  };
1461
1468
 
1462
1469
  export declare type SmartGridDispatch = (action: {
@@ -1658,6 +1665,24 @@ export declare interface SmartGridFilterModel {
1658
1665
  [key: string]: unknown;
1659
1666
  }
1660
1667
 
1668
+ /**
1669
+ * Parameters for flashCells API (AG Grid compatible)
1670
+ */
1671
+ export declare interface SmartGridFlashCellsParams {
1672
+ /** Optional list of row nodes to flash. If not provided with columns, nothing flashes. */
1673
+ rowNodes?: SmartGridRowNode[];
1674
+ /** Optional list of column IDs to flash. If not provided with rowNodes, nothing flashes. */
1675
+ columns?: string[];
1676
+ /** Duration of the flash in milliseconds. Default: 500 */
1677
+ flashDuration?: number;
1678
+ /** Duration of the fade animation in milliseconds. Default: 500 */
1679
+ fadeDuration?: number;
1680
+ /** Custom CSS class to apply during flash */
1681
+ flashCssClass?: string;
1682
+ /** Custom CSS class to apply during fade */
1683
+ fadeCssClass?: string;
1684
+ }
1685
+
1661
1686
  export declare type SmartGridFloatingType = "top" | "bottom" | null;
1662
1687
 
1663
1688
  export declare interface SmartGridFocusedCell extends SmartGridSelectedCell {
@@ -2279,6 +2304,19 @@ export declare interface SmartGridPagesPerPageSectionProps {
2279
2304
  selectedElement: number;
2280
2305
  }
2281
2306
 
2307
+ declare interface SmartGridPaginationAPI {
2308
+ paginationGetPageSize: () => number;
2309
+ paginationGetRowCount: () => number;
2310
+ paginationGetCurrentPage: () => number;
2311
+ paginationGetTotalPages: () => number;
2312
+ paginationGoToPage: (pageNumber: number) => void;
2313
+ paginationGoToFirstPage: () => void;
2314
+ paginationGoToLastPage: () => void;
2315
+ paginationGoToNextPage: () => void;
2316
+ paginationGoToPreviousPage: () => void;
2317
+ paginationIsLastPageFound: () => boolean;
2318
+ }
2319
+
2282
2320
  export declare interface SmartGridPaginationModel {
2283
2321
  currentPage: number;
2284
2322
  pageSize: number;
@@ -2613,6 +2651,14 @@ export declare type SmartGridRangeFilter = {
2613
2651
  operator?: string;
2614
2652
  };
2615
2653
 
2654
+ /**
2655
+ * Parameters for redrawRows API (AG Grid compatible)
2656
+ */
2657
+ export declare interface SmartGridRedrawRowsParams {
2658
+ /** Optional list of row nodes to redraw. If not provided, all rows are redrawn */
2659
+ rowNodes?: SmartGridRowNode[];
2660
+ }
2661
+
2616
2662
  export declare interface SmartGridRefreshCacheOptions {
2617
2663
  purge?: boolean;
2618
2664
  partialRefresh?: boolean;
@@ -2620,6 +2666,20 @@ export declare interface SmartGridRefreshCacheOptions {
2620
2666
  userInitiated?: boolean;
2621
2667
  }
2622
2668
 
2669
+ /**
2670
+ * Parameters for refreshCells API (AG Grid compatible)
2671
+ */
2672
+ export declare interface SmartGridRefreshCellsParams {
2673
+ /** Optional list of row nodes to refresh. If not provided, all rows are refreshed. */
2674
+ rowNodes?: SmartGridRowNode[];
2675
+ /** Optional list of column IDs to refresh. If not provided, all columns are refreshed. */
2676
+ columns?: string[];
2677
+ /** If true, forces refresh even if the cell value hasn't changed. Default: false */
2678
+ force?: boolean;
2679
+ /** If true, suppresses the flash animation. Default: false */
2680
+ suppressFlash?: boolean;
2681
+ }
2682
+
2623
2683
  export declare interface SmartGridRefreshOptions {
2624
2684
  purge?: boolean;
2625
2685
  resetPage?: boolean;
@@ -2682,6 +2742,20 @@ export declare interface SmartGridRowData {
2682
2742
  };
2683
2743
  }
2684
2744
 
2745
+ /**
2746
+ * Transaction object for applyTransaction API (AG Grid compatible)
2747
+ */
2748
+ export declare interface SmartGridRowDataTransaction {
2749
+ /** Rows to add */
2750
+ add?: SmartGridRowData[];
2751
+ /** Index position to add rows at. If not provided, rows are added at the end */
2752
+ addIndex?: number;
2753
+ /** Rows to remove. Only the row ID field is required */
2754
+ remove?: SmartGridRowData[];
2755
+ /** Rows to update. The row ID field is used to match rows */
2756
+ update?: SmartGridRowData[];
2757
+ }
2758
+
2685
2759
  export declare interface SmartGridRowDragEndParams {
2686
2760
  api: SmartGridAPI;
2687
2761
  type: "rowDragEnd";
@@ -2788,6 +2862,18 @@ export declare interface SmartGridRowNode extends SmartGridUpdateData {
2788
2862
  isGroup?: () => boolean;
2789
2863
  }
2790
2864
 
2865
+ /**
2866
+ * Result of applyTransaction API (AG Grid compatible)
2867
+ */
2868
+ export declare interface SmartGridRowNodeTransaction {
2869
+ /** Row nodes that were added */
2870
+ add: SmartGridRowNode[];
2871
+ /** Row nodes that were removed */
2872
+ remove: SmartGridRowNode[];
2873
+ /** Row nodes that were updated */
2874
+ update: SmartGridRowNode[];
2875
+ }
2876
+
2791
2877
  export declare interface SmartGridRowRenderer {
2792
2878
  firstRenderedRow: number;
2793
2879
  lastRenderedRow: number;