UNPKG

react-simple-crud-ui

Version:

Written in React with hooks, simple CRUD UI with authentication.

48 lines (47 loc) 1.65 kB
import { CrudStateModel, FilterModel } from "./Model"; export declare const crudStateGenerator: (paginationLimit: number, breadcrumbHome: string) => CrudStateModel; export declare const GET_ALL_START = "GET_ALL_START"; export declare const GET_ALL_SUCCESS = "GET_ALL_SUCCESS"; export declare const GET_ALL_FAIL = "GET_ALL_FAIL"; export declare const CHANGE_PAGE = "CHANGE_PAGE"; export declare const FILTER = "FILTER"; export declare const CHANGE_MODE = "CHANGE_MODE"; export declare const BREADCRUMB_RETURN_HOME = "BREADCRUMB_RETURN_HOME"; export declare const START = "START"; export declare const END = "END"; interface GetAllStartAction { type: typeof GET_ALL_START; } interface GetAllSuccessAction { type: typeof GET_ALL_SUCCESS; payload: Array<any>; } interface GetAllFailAction { type: typeof GET_ALL_FAIL; payload: any; } interface ChangePageAction { type: typeof CHANGE_PAGE; payload: number; } interface FilterAction { type: typeof FILTER; payload: FilterModel; } interface ChangeModeAction { type: typeof CHANGE_MODE; payload: string; editId?: string; } interface ReturnHomeAction { type: typeof BREADCRUMB_RETURN_HOME; } interface StartAction { type: typeof START; } interface EndAction { type: typeof END; } export declare type CrudActions = GetAllStartAction | GetAllSuccessAction | GetAllFailAction | ChangePageAction | FilterAction | ChangeModeAction | ReturnHomeAction | StartAction | EndAction; export declare const crudReducerGenerator: (filterFn: Function) => (state: CrudStateModel, action: CrudActions) => any; export {};