UNPKG

@doreamonjs/page-creator

Version:
53 lines (52 loc) 1.73 kB
import * as React from 'react'; import { FC, CSSProperties } from 'react'; import { IColumn, TableProps } from '@doreamonjs/components'; import { IFilterTable } from '@doreamonjs/components'; import { INutField } from '@doreamonjs/components'; import { NamespaceUtils } from './utils'; import { Manifest } from './manifest'; import { Config } from './config'; interface Attributes extends TableProps<any> { filters: INutField[]; columns: IColumn<any>[]; table: any; config: Config; manifest: Manifest; } interface Datasets { table?: any[]; values?: any; } interface Constraints { where: Record<string, any>; orderBy: string[]; } export interface PageProps extends TableProps<any> { style?: CSSProperties; headerStyle?: CSSProperties; bodyStyle?: CSSProperties; className?: string; attributes: Attributes; datasets: Datasets; constraints: Constraints; onActionTrigger: TableProps<any>['onActionTrigger']; onTableChange: TableProps<any>['onTableChange']; onCategoryChange: TableProps<any>['onCategoryChange']; onFilterChange: IFilterTable<any>['onFilterChange']; onReset: () => void; onRefresh: () => void; } export interface CreateOptions { displayName?: string; component?: FC<PageProps>; style?: CSSProperties; headerStyle?: CSSProperties; bodyStyle?: CSSProperties; className?: string; renderHeader?: (props: PageProps) => React.ReactNode; renderFooter?: (props: PageProps) => React.ReactNode; utils?: NamespaceUtils; } export declare function createWithConnect(namespace: string, options?: CreateOptions): FC; export declare function create(namespace: string, options?: CreateOptions): FC<any>; export {};