import { OptionType } from '../types'; import { ElTagColor } from '../ElTag.vue'; import { default as ElButton, ElButtonProps } from '../ElButton.vue'; import { ElListItemProps } from '../ElListItem.vue'; export type SelectOptions = OptionType[]; export type MobileTableFiltersStatus = { freeSearch?: string; fromDate?: number; multiSelect: { mainText?: string; secondaryRow?: string; tertiaryRow?: string; tags?: string; time?: string; amount?: string; avatar?: string; }; }; export type MobileTableFilter = { freeSearch?: { placeholder?: string; filterOn: ('mainText' | 'secondaryRow' | 'tertiaryRow' | 'amount' | 'tags' | 'time' | 'avatar')[]; initialValue?: string; }; multiValue?: { mainText?: { enabled: boolean; label: string; selectOptions?: SelectOptions; initialValue?: string; }; secondaryRow?: { enabled: boolean; label: string; selectOptions?: SelectOptions; initialValue?: string; }; tertiaryRow?: { enabled: boolean; label: string; selectOptions?: SelectOptions; initialValue?: string; }; amount?: { enabled: boolean; label: string; selectOptions?: SelectOptions; initialValue?: string; }; tags?: { enabled: boolean; label: string; selectOptions?: SelectOptions; initialValue?: string; }; time?: { enabled: boolean; label: string; selectOptions?: SelectOptions; initialValue?: string; }; avatar?: { enabled: boolean; label: string; selectOptions?: SelectOptions; initialValue?: string; }; }; dateRange?: { enabled: boolean; label: string; initialValue?: number; placeholder?: string; }; resetButton?: boolean; managed?: boolean; }; export type MobileTableRow = Omit & { id: string; rowNotSelectable?: boolean; relatedObject?: any; clickAction?: (payload: PointerEvent) => void; actions?: { primary: InstanceType['$props']; secondary?: InstanceType['$props']; }; sortableAndFilterableValue?: string; details: { label: string; value: { type?: 'default'; text: string; } | { type: 'tag'; text: string; color?: ElTagColor; } | { type: 'avatar'; label?: string; picture?: string; }; }[]; }; export interface ElMobileTableProps { color: 'primary' | 'secondary'; filters: MobileTableFilter; loading?: boolean; preventDefaultItemClick?: boolean; selection?: { enabled: boolean; selectionMode?: 'single' | 'multiple'; destructiveAction?: { enabled: boolean; button: Omit & { label?: (count: number) => string; }; }; bulkActionButton: Omit & { label: (count: number) => string; }; selectedLabel?: (selectionCount: number) => string; cancelText?: (selectionCount: number) => string; }; sortBy?: { on: 'mainText' | 'secondaryRow' | 'tertiaryRow' | 'amount' | 'tags' | 'time' | 'avatar'; order: 'asc' | 'desc'; }; itemsCountLabel?: (count: number) => string; noItemsCountLabel?: boolean; data: MobileTableRow[]; } declare function __VLS_template(): { default?(_: {}): any; "after-list"?(_: {}): any; }; declare const __VLS_component: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps, { filteredData: import('vue').ComputedRef; selectRows: (rowsIds: string[]) => void; unselectAllRows: () => void; getDataRows: () => MobileTableRow[]; getSelectedRows: () => MobileTableRow[]; closeItemDetails: () => void; }, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, { "destructive:click": (selectedItems: MobileTableRow[]) => void; "bulk:click": (selectedItems: MobileTableRow[]) => void; "item:click": (item: MobileTableRow) => void; "selection:exit": () => void; "rows-selected": (selectedItems: MobileTableRow[]) => void; "filters-updated": (filters: MobileTableFiltersStatus) => void; }, string, import('vue').PublicProps, Readonly>> & { "onRows-selected"?: ((selectedItems: MobileTableRow[]) => any) | undefined; "onDestructive:click"?: ((selectedItems: MobileTableRow[]) => any) | undefined; "onBulk:click"?: ((selectedItems: MobileTableRow[]) => any) | undefined; "onItem:click"?: ((item: MobileTableRow) => any) | undefined; "onSelection:exit"?: (() => any) | undefined; "onFilters-updated"?: ((filters: MobileTableFiltersStatus) => any) | undefined; }, {}, {}>; declare const _default: __VLS_WithTemplateSlots>; export default _default; type __VLS_NonUndefinedable = T extends undefined ? never : T; type __VLS_TypePropsToRuntimeProps = { [K in keyof T]-?: {} extends Pick ? { type: import('vue').PropType<__VLS_NonUndefinedable>; } : { type: import('vue').PropType; required: true; }; }; type __VLS_WithTemplateSlots = T & { new (): { $slots: S; }; };