@ssplib/react-components
Version:
SSP React Components
30 lines (29 loc) • 1.38 kB
TypeScript
import { CsvConfigProp, FilterValue, OrderBy } from './types';
export declare const getCount: (countData: any[], itemsCount: number) => number;
export declare function transformArrayObjectInString(o: Object): String;
export declare function removePunctuationAndAccents(text: string): string;
export declare function formatarString(str: string | number): string;
interface FiltrarProps {
startData: any[];
filterData: FilterValue[];
filtersFuncData: {
[key: string]: (value: string) => any;
};
localTableName: string;
setList: (arg: any) => void;
setPagCount: (arg: any) => void;
setCurrentPage: (arg: number) => void;
setListPage: (arg: number) => void;
setListClone: (arg: any) => void;
itemsCount: number;
}
export declare function filtrarDados({ filterData, startData, filtersFuncData, localTableName, setCurrentPage, setList, setListClone, setListPage, setPagCount, itemsCount }: FiltrarProps): void;
interface OrdenarDadosProps {
order: OrderBy;
list: any[];
orderAsc: boolean;
}
export declare function ordenarDados({ order, list, orderAsc }: OrdenarDadosProps): any[];
export declare function downloadCSVFile(list: any[], config: CsvConfigProp, filters: FilterValue[]): Promise<void>;
export declare function downloadCSVAll(e: React.MouseEvent, list: any[], keys: string[], fileName: string): void;
export {};