{"version":3,"file":"context.mjs","sources":["../../../../../../packages/components/table/src/context.ts"],"sourcesContent":["import type { InjectionKey, Slots } from 'vue'\nimport type { TableColumnData, TableData } from './types'\n\nexport interface TableContext {\n  slots?: Slots\n\n  scroll?: {\n    horScrollPosition?: 'left' | 'right' | 'middle'\n  }\n\n  sortStore?: {\n    activeSort?: 'ascend' | 'descend' | ''\n    activeProp?: string | number\n    isSortPopup?: boolean\n    handleSortChange?: (column: TableColumnData, direction?: 'ascend' | 'descend' | '') => void\n  }\n  // checkbox 全选 半选\n  opsStore?: {\n    // 已选中的行\n    selectionRows?: TableData[]\n    selectionRowKeys?: (string | number | undefined)[]\n    // 当前Table页下的所有可选行（不包含disabled）\n    allEnabledSelectionRows?: TableData[]\n    toggleSelectAll?: (v: boolean) => void\n    toggleSelect?: (row: TableData, v: boolean) => void\n    selectAll?: (checked: boolean) => void\n  }\n  // column resize width\n  resizeStore?: {\n    handleThMouseDown?: (prop: string, ev: MouseEvent) => void\n    prop?: string | number\n  }\n}\n\nexport interface TableColumnContext {\n  addChild?: (id: number, column: TableColumnData) => void\n  removeChild?: (id: number) => void\n  groupColumns?: TableColumnData[]\n  handleUpdateColumn?: (v: string[]) => void\n}\n\nexport const tableInjectionKey: InjectionKey<TableContext> = Symbol('table')\n\nexport const tableColumnInjectionKey: InjectionKey<TableColumnContext> = Symbol('tableColumn')\n"],"names":[],"mappings":"AAyCa,MAAA,iBAAA,GAAgD,OAAO,OAAO,EAAA;AAE9D,MAAA,uBAAA,GAA4D,OAAO,aAAa;;;;"}