@famalabs/web-ui 1.0.0-beta.34 → 1.0.0-beta.35

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.
@@ -9,10 +9,11 @@ type FilterPayload = {
9
9
  active: ActiveFilter[];
10
10
  filterDto: Record<string, unknown>;
11
11
  };
12
+ type FetchDataDirection = 'left' | 'right' | 'current' | 'reset';
12
13
  interface FetchDataPayload {
13
14
  filters: FilterPayload;
14
15
  limit: number;
15
- direction?: 'left' | 'right' | 'reset';
16
+ direction?: FetchDataDirection;
16
17
  }
17
18
  interface FetchAllDataPayload {
18
19
  filters: FilterPayload;
@@ -35,4 +36,4 @@ interface RealtimeTableProps<T> extends CommonTableProps<T> {
35
36
  onColumnsPopoverClose?: (visibleColumns: string[]) => Promise<void> | void;
36
37
  }
37
38
 
38
- export type { FetchAllDataPayload, FetchDataPayload, FetchDataResponse, FetchInfoProps, FilterPayload, RealtimeTableInfoProps, RealtimeTableProps };
39
+ export type { FetchAllDataPayload, FetchDataDirection, FetchDataPayload, FetchDataResponse, FetchInfoProps, FilterPayload, RealtimeTableInfoProps, RealtimeTableProps };
@@ -1,4 +1,5 @@
1
1
  import { ButtonProps, IconButtonProps } from '@mui/material';
2
+ import { FetchDataDirection } from '../RealtimeTable/RealtimeTableTypes.js';
2
3
 
3
4
  declare const mongoOperators: {
4
5
  readonly string: readonly ["$regex"];
@@ -65,7 +66,7 @@ interface DynamicColumns<T> {
65
66
  Cell?: (props: CellProps<T>) => React.ReactNode;
66
67
  Tooltip?: TooltipProps;
67
68
  }
68
- type ActionEvent<T> = (actionType: string, selectedRows: T[], activeFilters: ActiveFilter[], allSelected?: boolean, refetch?: () => Promise<void>) => Promise<void> | void;
69
+ type ActionEvent<T> = (actionType: string, selectedRows: T[], activeFilters: ActiveFilter[], allSelected?: boolean, refetch?: (direction?: FetchDataDirection) => Promise<void>) => Promise<void> | void;
69
70
  interface ActionEventItem {
70
71
  type: string;
71
72
  label?: string;
package/dist/index.d.ts CHANGED
@@ -19,7 +19,7 @@ export { ISnackbar, Notifier, NotifierProps } from './components/snackbar/Notifi
19
19
  export { CardsTable } from './components/tables/CardsTable/CardsTable.js';
20
20
  export { CardFilters, CardItemInfo, CardsTableInfo, CardsTableProps, InfiniteViewType } from './components/tables/CardsTable/CardsTableTypes.js';
21
21
  export { RealtimeTable } from './components/tables/RealtimeTable/RealtimeTable.js';
22
- export { FetchAllDataPayload, FetchDataPayload, FetchDataResponse, FilterPayload, RealtimeTableProps } from './components/tables/RealtimeTable/RealtimeTableTypes.js';
22
+ export { FetchAllDataPayload, FetchDataDirection, FetchDataPayload, FetchDataResponse, FilterPayload, RealtimeTableProps } from './components/tables/RealtimeTable/RealtimeTableTypes.js';
23
23
  export { StaticTable } from './components/tables/StaticTable/StaticTable.js';
24
24
  export { StaticTableProps } from './components/tables/StaticTable/StaticTableTypes.js';
25
25
  export { ActionCell } from './components/tables/TableCells/ActionCell.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@famalabs/web-ui",
3
- "version": "1.0.0-beta.34",
3
+ "version": "1.0.0-beta.35",
4
4
  "author": " Fama Labs <info@famalabs.com>",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",