import { IndexFiltersProps } from '@shopify/polaris'; import { BulkActionsProps } from '@shopify/polaris/build/ts/src/components/BulkActions'; import { IndexTableHeading } from '@shopify/polaris/build/ts/src/components/IndexTable'; import { NonEmptyArray } from '@shopify/polaris/build/ts/src/types'; import { ReactNode, Dispatch, SetStateAction } from 'react'; import { a as WithDataSourceChildProps } from './withDataSource-tvEZcrJM.js'; declare enum VIEW_ACTIONS { CREATE = "createView", UPDATE = "updateView", DELETE = "deleteView", RENAME = "renameView", DUPLICATE = "duplicateView" } type ListTableView = { _id?: string; name: string; filters: { queryValue?: string; [key: string]: any; }; allowActions?: VIEW_ACTIONS[]; }; type ListTableFilter = { key: string; label: string; shortcut: boolean; filter: ReactNode | any; }; type ListTableData = { items?: T[]; selectedResources?: string[]; allResourcesSelected?: boolean; handleSelectionChange?: (mode: string, value: boolean) => void; clearSelection?: () => void; filterValues?: any; total?: number; page?: number; limit?: number; queryKey?: string; }; type ListTableProps = WithDataSourceChildProps & { t?: (key: string, options?: any) => string; limit?: number; views?: ListTableView[]; defaultViews?: ListTableView[]; filters?: ListTableFilter[]; condensed?: boolean; selectable?: boolean; showBorder?: boolean; showFilter?: boolean; emptyState?: ReactNode; abbreviated?: string; showPagination?: boolean; bulkActions?: BulkActionsProps['actions']; headings: NonEmptyArray; sortOptions?: IndexFiltersProps['sortOptions']; promotedBulkActions?: BulkActionsProps['promotedActions']; renderRowMarkup: (item: T, idx: number, selectedResources?: string[], context?: any) => ReactNode; renderFilterLabel?: (key: string, value: string | any[]) => string; resourceName?: { singular: string; plural: string; }; setListTableData?: Dispatch>>; onDataChange?: (data: ListTableData) => void; error?: Error; onlyLocalData?: boolean; localData?: T[]; queryPlaceholder?: string; viewsEndpoint?: string; fetchFunction?: (url: string, options?: RequestInit) => Promise; fetchFn?: (url: string, options?: RequestInit) => Promise; syncWithUrl?: boolean; loadingComponent?: ReactNode; }; type ListTableState = { views: ListTableView[]; selected: number; error?: Error; }; interface QueryUrlOptions { /** Page number */ page?: number; /** Items per page */ limit?: number; /** Sort field and direction: "field|asc" or "field|desc" */ sort?: string; /** Filter strings in format: "field|type|operator|value" or "field|value" */ filters?: string[]; /** Item ID for fetchItem */ id?: string; /** Skip pagination and return all results */ export?: boolean; /** Return only count, no items */ countOnly?: boolean; } export { type ListTableData, type ListTableFilter, type ListTableProps, type ListTableState, type ListTableView, type QueryUrlOptions, VIEW_ACTIONS };