oak-frontend-base/es/components/listPro/index.d.ts

43 lines
1.8 KiB
TypeScript

import React from 'react';
import { TableProps } from 'antd';
import { StorageSchema } from 'oak-domain/lib/types/Storage';
import { OakAbsAttrDef, onActionFnDef, OakExtraActionProps, ListButtonProps, ED, OakAbsAttrJudgeDef } from '../../types/AbstractComponent';
import { RowWithActions } from '../../types/Page';
type Props<ED2 extends ED, T extends keyof ED2> = {
title?: string | React.ReactNode;
extraContent?: React.ReactNode;
hideDefaultButtons?: boolean;
buttonGroup?: ListButtonProps[];
onReload?: () => void;
entity: T;
extraActions?: OakExtraActionProps[] | ((row: RowWithActions<ED2, T>) => OakExtraActionProps[]);
onAction?: onActionFnDef;
disabledOp?: boolean;
attributes: OakAbsAttrDef[];
data: RowWithActions<ED2, T>[];
loading?: boolean;
tablePagination?: TableProps<RowWithActions<ED2, T>>['pagination'];
rowSelection?: TableProps<RowWithActions<ED2, T>>['rowSelection'];
disableSerialNumber?: boolean;
size?: 'large' | 'middle' | 'small';
scroll?: TableProps<RowWithActions<ED2, T>>['scroll'];
locale?: TableProps<RowWithActions<ED2, T>>['locale'];
opWidth?: number;
};
export type TableAttributeType = {
attribute: OakAbsAttrJudgeDef;
show: boolean;
disabled?: boolean;
disableCheckbox?: boolean;
};
export declare const TableContext: React.Context<{
tableAttributes: TableAttributeType[] | undefined;
entity: keyof ED | undefined;
schema: StorageSchema<ED> | undefined;
setTableAttributes: ((attributes: TableAttributeType[]) => void) | undefined;
setSchema: ((schema: any) => void) | undefined;
onReset: (() => void) | undefined;
}>;
declare const ProList: <ED2 extends ED, T extends keyof ED2>(props: Props<ED2, T>) => React.JSX.Element;
export default ProList;