All files / src/shared/types lazyParams.ts

0% Statements 0/0
0% Branches 1/1
0% Functions 1/1
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46                                                                                           
import { IDictType } from '@/shared/types/dictionaryTypes'; // Replace with the correct path
 
export type ITableIconsType = 'VIEW' | 'EDIT' | 'DELETE' | 'ASSIGN';
 
export type ITableColumnsType = 'Text' | 'DateTime' | 'Checkbox' | 'Boolean';
 
export type MatchModeTypes = 'equals' | 'startsWith' | 'contains' | 'in' | 'notContains' | 'endsWith' | 'notEquals' | 'inputIn';
 
export interface ITableColumns {
  field?: string;
  header?: string;
  type?: ITableColumnsType;
  sortField?: string;
  sortable?: boolean;
  formatDate?: string;
  dictName?: string;
  dictionary?: IDictType[];
  customHeader?: string;
  userLogoSize?: number;
  format?: string;
  diableFiltrSort?: boolean;
  filterType?: 'select' | 'input' | 'datepicker' | 'checkbox';
 
  filter?: {
    field?: string;
    type?: 'select' | 'input' | 'datepicker' | 'checkbox';
    matchMode?: MatchModeTypes;
    options?: { label: string; value: any }[];
    placeholder?: string;
    dateTimeType?: 'month' | 'year' | 'date';
    dateTimeMode?: 'single' | 'range';
    format?: string;
  };
  customizeValue?: <T>(val: T) => T | string;
}
 
export interface ILazyState {
  sortBy?: string;
  sortOrder?: 'asc' | 'desc';
  sort?: { field?: string | null; order?: undefined | null | 0 | 1 | -1 };
  filters?: Record<string, { value: any; matchMode?: MatchModeTypes }>;
  page?: number;
  pageSize?: number;
  pages?: number;
}