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 | import type { CompareProps } from '@rc-component/context/lib/Immutable';
|
27 | import * as React from 'react';
|
28 | import { EXPAND_COLUMN, INTERNAL_HOOKS } from './constant';
|
29 | import { FooterComponents } from './Footer';
|
30 | import type { ColumnsType, ColumnType, DefaultRecordType, Direction, ExpandableConfig, GetComponentProps, GetRowKey, LegacyExpandableProps, PanelRender, Reference, RowClassName, TableComponents, TableLayout, TableSticky } from './interface';
|
31 | import Column from './sugar/Column';
|
32 | import ColumnGroup from './sugar/ColumnGroup';
|
33 | export declare const DEFAULT_PREFIX = "rc-table";
|
34 | export interface TableProps<RecordType = any> extends Omit<LegacyExpandableProps<RecordType>, 'showExpandColumn'> {
|
35 | prefixCls?: string;
|
36 | className?: string;
|
37 | style?: React.CSSProperties;
|
38 | children?: React.ReactNode;
|
39 | data?: readonly RecordType[];
|
40 | columns?: ColumnsType<RecordType>;
|
41 | rowKey?: string | keyof RecordType | GetRowKey<RecordType>;
|
42 | tableLayout?: TableLayout;
|
43 | scroll?: {
|
44 | x?: number | true | string;
|
45 | y?: number | string;
|
46 | };
|
47 |
|
48 | expandable?: ExpandableConfig<RecordType>;
|
49 | indentSize?: number;
|
50 | rowClassName?: string | RowClassName<RecordType>;
|
51 | footer?: PanelRender<RecordType>;
|
52 | summary?: (data: readonly RecordType[]) => React.ReactNode;
|
53 | caption?: React.ReactNode;
|
54 | id?: string;
|
55 | showHeader?: boolean;
|
56 | components?: TableComponents<RecordType>;
|
57 | onRow?: GetComponentProps<RecordType>;
|
58 | onHeaderRow?: GetComponentProps<readonly ColumnType<RecordType>[]>;
|
59 | emptyText?: React.ReactNode | (() => React.ReactNode);
|
60 | direction?: Direction;
|
61 | sticky?: boolean | TableSticky;
|
62 | rowHoverable?: boolean;
|
63 | onScroll?: React.UIEventHandler<HTMLDivElement>;
|
64 | /**
|
65 | * @private Internal usage, may remove by refactor. Should always use `columns` instead.
|
66 | *
|
67 | * !!! DO NOT USE IN PRODUCTION ENVIRONMENT !!!
|
68 | */
|
69 | internalHooks?: string;
|
70 | /**
|
71 | * @private Internal usage, may remove by refactor. Should always use `columns` instead.
|
72 | *
|
73 | * !!! DO NOT USE IN PRODUCTION ENVIRONMENT !!!
|
74 | */
|
75 | transformColumns?: (columns: ColumnsType<RecordType>) => ColumnsType<RecordType>;
|
76 | |
77 |
|
78 |
|
79 |
|
80 |
|
81 | tailor?: boolean;
|
82 | |
83 |
|
84 |
|
85 |
|
86 |
|
87 | getContainerWidth?: (ele: HTMLElement, width: number) => number;
|
88 | |
89 |
|
90 |
|
91 |
|
92 |
|
93 | internalRefs?: {
|
94 | body: React.MutableRefObject<HTMLDivElement>;
|
95 | };
|
96 | }
|
97 | declare function Table<RecordType extends DefaultRecordType>(tableProps: TableProps<RecordType>, ref: React.Ref<Reference>): React.JSX.Element;
|
98 | export type ForwardGenericTable = (<RecordType extends DefaultRecordType = any>(props: TableProps<RecordType> & React.RefAttributes<Reference>) => React.ReactElement) & {
|
99 | displayName?: string;
|
100 | };
|
101 | export declare function genTable(shouldTriggerRender?: CompareProps<typeof Table>): ForwardGenericTable;
|
102 | declare const ImmutableTable: ForwardGenericTable;
|
103 | type ImmutableTableType = typeof ImmutableTable & {
|
104 | EXPAND_COLUMN: typeof EXPAND_COLUMN;
|
105 | INTERNAL_HOOKS: typeof INTERNAL_HOOKS;
|
106 | Column: typeof Column;
|
107 | ColumnGroup: typeof ColumnGroup;
|
108 | Summary: typeof FooterComponents;
|
109 | };
|
110 | declare const _default: ImmutableTableType;
|
111 | export default _default;
|
112 |
|
\ | No newline at end of file |