/** * Copyright (c) 2018 Dell Inc., or its subsidiaries. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 */ import * as React from "react"; import { Store } from "@sambego/storybook-state"; import { SortOrder, DataGridRow, DataGridFilterResult, DataGridColumn } from "."; import { DataGridPaginationProps } from "./DataGrid"; /** * General file description : * Data to render diffrent datagrids in storybook */ /** * Data for Columns */ export declare const normalColumns: DataGridColumn[]; export declare const hideableColumns: DataGridColumn[]; /** * Data for Rows */ export declare const normalRows: { rowData: ({ columnName: string; cellData: number; } | { columnName: string; cellData: string; })[]; }[]; /** * Data for Custom content rendering */ export declare const customRows: { rowData: ({ columnName: string; cellData: number; } | { columnName: string; cellData: string; } | { columnName: string; cellData: JSX.Element; })[]; }[]; export declare const customRowsWithPassword: { rowData: ({ columnName: string; cellData: number; } | { columnName: string; cellData: string; } | { columnName: string; cellData: JSX.Element; })[]; }[]; export declare const loadExpandableContent: (rows: DataGridRow) => Promise; export declare const expandableRows: DataGridRow[]; export declare function getRowData(): DataGridRow[]; export declare function getRowDataWithLink(functionToAttach: Function): DataGridRow[]; export declare const getSelectableRowsData: () => DataGridRow[]; export declare let selectedRows: number[]; export declare const getSelectedRowsData: () => DataGridRow[]; export declare const paginationRows: DataGridRow[]; export declare const paginationRowsWithLinks: (linkFunction: Function) => DataGridRow[]; export declare const alreadySelectedRows: DataGridRow[]; /** * Data for Footer */ export declare const customFooter: { footerData: string; showFooter: boolean; }; export declare const defaultFooter: { showFooter: boolean; }; export declare const noFooter: { showFooter: boolean; }; export declare const hideShowColFooter: { hideShowColumns: { hideShowColBtn: boolean; }; showFooter: boolean; }; export declare const filterFunction: (rows: DataGridRow[], columnValue: string, columnName: string) => Promise; /** * Data for Sorting */ export declare const sortFunction: (rows: DataGridRow[], sortOrder: SortOrder, columnName: string) => Promise; export declare const sortColumns: ({ columnName: string; sort: { defaultSortOrder: SortOrder; sortFunction: (rows: DataGridRow[], sortOrder: SortOrder, columnName: string) => Promise; isSorted?: undefined; }; } | { columnName: string; sort?: undefined; } | { columnName: string; sort: { defaultSortOrder: SortOrder; sortFunction: (rows: DataGridRow[], sortOrder: SortOrder, columnName: string) => Promise; isSorted: boolean; }; })[]; /** * Data for Pagination */ export declare const getPageDataForSelectedRows: (pageIndex: number, pageSize: number) => Promise; export declare const getPageDataForDetailPane: (pageIndex: number, pageSize: number) => Promise; export declare const getPageData: (pageIndex: number, pageSize: number) => Promise; export declare const paginationDetails: DataGridPaginationProps; export declare const paginationDetailsWithCompactFooter: DataGridPaginationProps; export declare const paginationDetailsForAlreadySelectedRows: DataGridPaginationProps; export declare const pageFilterFunction: (rows: DataGridRow[], columnValue: string, columnName: string) => Promise; /** * Data for Batch Actions */ declare type GridActionsState = { selectedRows: any[]; showEdit: boolean; }; export declare class GridActions extends React.PureComponent { state: { selectedRows: never[]; showEdit: boolean; }; updateActions(rows: any): void; render(): JSX.Element; } export declare const storeForDetailPane: Store<{ rows: DataGridRow[]; columns: DataGridColumn[]; }>; export declare const paginationDetailsForDetailsPane: { totalItems: number; getPageData: (pageIndex: number, pageSize: number) => Promise; pageSize: number; pageSizes: string[]; }; export declare const paginationDetailswithPageSizes: DataGridPaginationProps; export declare const paginationDetailsForLessThan10Records: DataGridPaginationProps; export {};