import { ReactElement } from 'react'; import { FiltersMap } from '@wix/bex-core'; import { TableColumn } from '../../model'; import { InfiniteScrollTableState } from '../../state'; import type { TableDragAndDrop } from '../TableDragAndDrop'; import { CollectionTableWSRTableBaseProps } from './CollectionTableWSRTable'; import { BulkActionModalRenderProp, BulkActionToolbarRenderProp } from '../BulkAction'; import { CollectionTableBaseCommonProps } from './CollectionTableBaseCommonProps'; import type { DataExtensionType } from '../DataExtension'; import type { TagsElement } from '../Tags'; export interface CollectionTableBaseProps extends CollectionTableWSRTableBaseProps, CollectionTableBaseCommonProps { /** * Configuration of the table's columns.
* Each column needs to specify: * * `id`: A unique identifier of the column (required for some features like custom/sortable columns) * * `title`: a string or an element to display in the table header for this column * * `render`: a function which will be called for every row in `data` to display this row's value for this column
* * `sortable`: See [Sortable Columns](/pages/cairo/?path=/story/components-collection-features--sortable-columns) * * Read more on [Table API](https://www.docs.wixdesignsystem.com/?path=/story/components-lists-table--table) * @external */ columns: TableColumn[]; /** Indicates whether to show a selection column (with checkboxes).
* Read more on [Table API](https://www.docs.wixdesignsystem.com/?path=/story/components-lists-table--table) * @default false * @external */ showSelection?: boolean; /** * A callback method to be called on row click. Signature: `onRowClick(rowData, rowNum)`. To enable hover effect you should set this prop. * @external */ onRowClick?: (item: T, index: number) => void; /** * A [``](/pages/cairo/?path=/story/components-collection-features--exportto) react element to be added to the toolbar */ exportButton?: ReactElement; /** * Drag and drop implementation: `import { TableDragAndDrop } from '@wix/cairo';` * > In order to make the drag and drop also re-order the collection after drop, also add [OptimisticActions](/pages/cairo/?path=/story/components-collection-features--optimistic-actions). * @external */ dragAndDrop?: typeof TableDragAndDrop; /** * Data extension implementation: `import { DataExtension } from '@wix/cairo';` * @external */ dataExtension?: DataExtensionType; tags?: TagsElement; /** * Render a custom toolbar when more than 1 item is selected.
* The function accepts the following parameters * * `selectedValues`: The items that were checked via the selection column * * `uncheckedValues`: The items that were unchecked via the selection column * * `isSelectAll`: Indicates whether the "Select All" checkbox is checked * * `openModal`: Opens the modal that contains the component from `bulkActionModal` render prop * * `clearSelection`: Clears all existing selection, call this after the action on the selected items was done * * `total`: Total items in the server (taken from [`fetchData`](/pages/cairo/?path=/story/common-hooks--usecollection) return value). * * `openConfirmModal`: Opens a `` to confirm an action about to be applied on the selected items. * * `query`: ComputedQuery - Representation of the current paging, sorting & filtering applied. Usually for using together with bulk action such as `updateAll` and `deleteAll` * * > When passed, enables `showSelection` by default. * @external */ bulkActionToolbar?: BulkActionToolbarRenderProp; /** * Render a modal to be opened from `bulkActionToolbar`.
* The function accepts the following parameters * * `selectedValues`: The items that were checked via the selection column * * `uncheckedValues`: The items that were unchecked via the selection column * * `isSelectAll`: Indicates whether the "Select All" checkbox is checked * * `closeModal`: Closes the modal * * `query`: ComputedQuery - Representation of the current paging, sorting & filtering applied. Usually for using together with bulk action such as `updateAll` and `deleteAll` * @external */ bulkActionModal?: BulkActionModalRenderProp; /** * @deprecated Enabled by default */ useControlledFix?: boolean; } export interface CollectionTableProps extends CollectionTableBaseProps { state: InfiniteScrollTableState; } declare function _CollectionTable(props: CollectionTableProps): JSX.Element; export declare const CollectionTable: typeof _CollectionTable & { displayName: string; }; export {}; //# sourceMappingURL=CollectionTable.d.ts.map