Debian Codegraph @

node/@patternfly/react-table/dist/esm/components/Table/utils/headerUtils.d.ts

raw
1 /// <reference types="react" />
2 import { ICell, IRow, OnSelect, OnCollapse } from '../TableTypes';
3 export interface ISelectTransform {
4 onSelect: OnSelect;
5 canSelectAll: boolean;
6 }
7 export interface ICollapseTranform {
8 onCollapse: OnCollapse;
9 canCollapseAll: boolean;
10 firstUserColumnIndex: number;
11 }
12 /**
13 * Function to join parent and their children so they can be rendered in tbody.
14 *
15 * @param {*} rows raw data to find out if it's child or parent.
16 * @param {*} children data to render (array of react children).
17 */
18 export declare const mapOpenedRows: (rows: IRow[], children: any) => IRow[];
19 /**
20 * Function to calculate columns based on custom config.
21 * It adds some custom cells for collapse, select, if expanded row and actions.
22 *
23 * @param {*} headerRows custom object with described table header cells.
24 * @param {*} extra object with custom callbacks.
25 * @returns {*} expected object for react tabular table.
26 */
27 export declare const calculateColumns: (headerRows: (ICell | string)[], extra: any) => {
28 property: string;
29 extraParams: any;
30 data: any;
31 header: {
32 label: string | ICell;
33 transforms: (import("../TableTypes").ITransform | import("../base/types").transformType)[];
34 formatters: (import("../TableTypes").IFormatter | import("../base/types").formatterType)[];
35 props?: object;
36 property?: string;
37 info?: import("../base/types").ThInfoType;
38 };
39 cell: {
40 transforms: import("../TableTypes").ITransform[];
41 formatters: import("../TableTypes").IFormatter[];
42 title?: import("react").ReactNode;
43 cellTransforms?: import("../TableTypes").ITransform[];
44 columnTransforms?: import("../TableTypes").ITransform[];
45 cellFormatters?: import("../TableTypes").IFormatter[];
46 header?: import("../base/types").HeaderType;
47 props?: any;
48 data?: any;
49 cell?: any;
50 dataLabel?: string;
51 };
52 props: any;
53 }[];
54 //# sourceMappingURL=headerUtils.d.ts.map