{"version":3,"file":"row.js","sources":["../../../../../../packages/components/table-v2/src/row.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { virtualizedGridProps } from '@element-plus/components/virtual-list'\nimport { columns, expandColumnKey, rowKey } from './common'\n\nimport type { CSSProperties, ExtractPropTypes } from 'vue'\nimport type { FixedDirection, KeyType, RowCommonParams } from './types'\n\nexport type RowExpandParams = {\n expanded: boolean\n rowKey: KeyType\n} & RowCommonParams\n\nexport type RowHoverParams = {\n event: MouseEvent\n hovered: boolean\n rowKey: KeyType\n} & RowCommonParams\n\nexport type RowEventHandlerParams = {\n rowKey: KeyType\n event: Event\n} & RowCommonParams\n\nexport type RowHeightChangedParams = {\n rowKey: KeyType\n height: number\n rowIndex: number\n}\n\nexport type RowExpandHandler = (params: RowExpandParams) => void\nexport type RowHoverHandler = (params: RowHoverParams) => void\nexport type RowEventHandler = (params: RowEventHandlerParams) => void\nexport type RowHeightChangeHandler = (\n row: RowHeightChangedParams,\n fixedDirection: boolean | FixedDirection | undefined\n) => void\n\nexport type RowEventHandlers = {\n onClick?: RowEventHandler\n onContextmenu?: RowEventHandler\n onDblclick?: RowEventHandler\n onMouseenter?: RowEventHandler\n onMouseleave?: RowEventHandler\n}\n\nexport const tableV2RowProps = buildProps({\n class: String,\n columns,\n columnsStyles: {\n type: definePropType>(Object),\n required: true,\n },\n depth: Number,\n expandColumnKey,\n estimatedRowHeight: {\n ...virtualizedGridProps.estimatedRowHeight,\n default: undefined,\n },\n isScrolling: Boolean,\n onRowExpand: {\n type: definePropType(Function),\n },\n onRowHover: {\n type: definePropType(Function),\n },\n onRowHeightChange: {\n type: definePropType(Function),\n },\n rowData: {\n type: definePropType(Object),\n required: true,\n },\n rowEventHandlers: {\n type: definePropType(Object),\n },\n rowIndex: {\n type: Number,\n required: true,\n },\n /**\n * Unique item key\n */\n rowKey,\n style: {\n type: definePropType(Object),\n },\n} as const)\n\nexport type TableV2RowProps = ExtractPropTypes\n"],"names":["buildProps","columns","definePropType","expandColumnKey","virtualizedGridProps","rowKey"],"mappings":";;;;;;;;;;AAGY,MAAC,eAAe,GAAGA,kBAAU,CAAC;AAC1C,EAAE,KAAK,EAAE,MAAM;AACf,WAAEC,cAAO;AACT,EAAE,aAAa,EAAE;AACjB,IAAI,IAAI,EAAEC,sBAAc,CAAC,MAAM,CAAC;AAChC,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,KAAK,EAAE,MAAM;AACf,mBAAEC,sBAAe;AACjB,EAAE,kBAAkB,EAAE;AACtB,IAAI,GAAGC,0BAAoB,CAAC,kBAAkB;AAC9C,IAAI,OAAO,EAAE,KAAK,CAAC;AACnB,GAAG;AACH,EAAE,WAAW,EAAE,OAAO;AACtB,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAEF,sBAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAEA,sBAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,iBAAiB,EAAE;AACrB,IAAI,IAAI,EAAEA,sBAAc,CAAC,QAAQ,CAAC;AAClC,GAAG;AACH,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAEA,sBAAc,CAAC,MAAM,CAAC;AAChC,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,EAAE,gBAAgB,EAAE;AACpB,IAAI,IAAI,EAAEA,sBAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,EAAE,QAAQ,EAAE;AACZ,IAAI,IAAI,EAAE,MAAM;AAChB,IAAI,QAAQ,EAAE,IAAI;AAClB,GAAG;AACH,UAAEG,aAAM;AACR,EAAE,KAAK,EAAE;AACT,IAAI,IAAI,EAAEH,sBAAc,CAAC,MAAM,CAAC;AAChC,GAAG;AACH,CAAC;;;;"}