{"version":3,"file":"types.mjs","sources":["../../../../../../packages/components/table/src/types.ts"],"sourcesContent":["import type { RenderFunction, VNode } from 'vue'\n\nexport interface TableData {\n  key?: string\n  expand?: string | RenderFunction\n  children?: TableData[]\n  disabled?: boolean\n  isLeaf?: boolean\n  [name: string]: any\n}\n\nexport type ClassName = string\n\nexport interface TableSortable {\n  sortDirections: ('ascend' | 'descend')[]\n  sorter?:\n    | ((\n        a: TableData,\n        b: TableData,\n        extra: { dataIndex: string; direction: 'ascend' | 'descend' }\n      ) => number)\n    | boolean\n\n  sortOrder?: 'ascend' | 'descend' | ''\n}\n\nexport interface TableFilterData {\n  text: string | RenderFunction\n  value: string\n}\n\nexport interface TableFilterable {\n  filters?: TableFilterData[]\n  filter: (filteredValue: string[], record: TableData) => boolean\n  multiple?: boolean\n  filteredValue?: string[]\n  defaultFilteredValue?: string[]\n}\n\nexport const tableColumnTypes = ['checkbox', 'index'] as const\n\nexport type TableColumnTypes = (typeof tableColumnTypes)[number]\n\nexport interface TableColumnData {\n  type?: TableColumnTypes\n  prop?: string\n  title?: string\n  width?: number\n  minWidth?: number\n  align?: 'left' | 'center' | 'right'\n  fixed?: 'left' | 'right'\n  ellipsis?: boolean\n  tooltip?: boolean | Record<string, any>\n  sortable?: boolean\n  filterable?: TableFilterable\n  children?: TableColumnData[]\n  renderCell?: (data: {\n    row: TableData\n    column: TableColumnData\n    rowIndex: number\n  }) => VNode | string | number\n  renderHeader?: (data: { column: TableColumnData }) => VNode | string | number\n  renderIndex?: (data: { column: TableColumnData; index: number }) => number\n  slotName?: string\n  headerSlotName?: string\n  hiddenCheckboxAll?: boolean\n\n  hidden?: boolean\n  disabled?: boolean\n  checked?: boolean\n\n  // private\n  isLastLeftFixed?: boolean\n  isFirstRightFixed?: boolean\n  colSpan?: number\n  rowSpan?: number\n  index?: number\n  parent?: TableColumnData\n}\n\nexport interface TableDataWithRaw {\n  raw?: TableData\n  // private\n  key?: string\n  disabled?: boolean\n  expand?: string | RenderFunction\n  children?: TableDataWithRaw[]\n  isLeaf?: boolean\n  hasSubtree?: boolean\n}\n"],"names":[],"mappings":"AAuCa,MAAA,gBAAA,GAAmB,CAAC,UAAA,EAAY,OAAO;;;;"}