import { Entity, FilterValues, User } from "@rebasepro/types"; import { EntityTableController, AdminCollection } from "@rebasepro/cms-types"; import { ScrollRestorationController } from "./useScrollRestoration.js"; export declare const DEFAULT_PAGE_SIZE = 50; export type DataTableControllerProps = any> = { /** * Full path where the data of this table is located */ path: string; /** * The collection that is represented by this config. */ collection: AdminCollection; /** * List of entities that will be displayed on top, no matter the ordering. * This is used for reference fields selection */ entitiesDisplayedFirst?: Entity[]; lastDeleteTimestamp?: number; /** * Force filter to be applied to the table. */ fixedFilter?: FilterValues; scrollRestoration?: ScrollRestorationController; /** * When set to true the filters and sort will be updated in the URL */ updateUrl?: boolean; }; /** * Use this hook to build a controller for the {@link DataCollectionTable}. * This controller is bound to data in a path in your specified driver. * * Note that you can build your own hook returning a {@link EntityTableController} * if you would like to display different data. * * @param path * @param collection * @param scrollRestoration * @param entitiesDisplayedFirst * @param lastDeleteTimestamp * @param fixedFilterFromProps * @param updateUrl */ export declare function useDataTableController = any, USER extends User = User>({ path, collection, scrollRestoration, entitiesDisplayedFirst, lastDeleteTimestamp: _lastDeleteTimestamp, fixedFilter: fixedFilterFromProps, updateUrl }: DataTableControllerProps): EntityTableController;