You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

0 lines
4.6 KiB

1 month ago
  1. {"ast":null,"code":"import { columns, expandColumnKey, rowKey } from './common.mjs';\nimport { virtualizedGridProps } from '../../virtual-list/src/props.mjs';\nimport { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';\nconst 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: void 0\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 rowKey,\n style: {\n type: definePropType(Object)\n }\n});\nexport { tableV2RowProps };","map":{"version":3,"names":["tableV2RowProps","buildProps","class","String","columns","columnsStyles","type","definePropType","Object","required","depth","Number","expandColumnKey","estimatedRowHeight","virtualizedGridProps","default","isScrolling","Boolean","onRowExpand","Function","onRowHover","onRowHeightChange","rowData","rowEventHandlers","rowIndex","rowKey","style"],"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<Record<KeyType, CSSProperties>>(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<RowExpandHandler>(Function),\n },\n onRowHover: {\n type: definePropType<RowHoverHandler>(Function),\n },\n onRowHeightChange: {\n type: definePropType<RowHeightChangeHandler>(Function),\n },\n rowData: {\n type: definePropType<any>(Object),\n required: true,\n },\n rowEventHandlers: {\n type: definePropType<RowEventHandlers>(Object),\n },\n rowIndex: {\n type: Number,\n required: true,\n },\n /**\n * Unique item key\n */\n rowKey,\n style: {\n type: definePropType<CSSProperties>(Object),\n },\n} as const)\n\nexport type TableV2RowProps = ExtractPropTypes<typeof tableV2RowProps>\n"],"mappings":";;;AAGY,MAACA,eAAe,GAAGC,UAAU,CAAC;EACxCC,KAAK,EAAEC,MAAM;EACbC,OAAO;EACPC,aAAa,EAAE;IACbC,IAAI,EAAEC,cAAc,CAACC,MAAM,CAAC;IAC5BC,QAAQ,EAAE;EACd,CAAG;EACDC,KAAK,EAAEC,MAAM;EACbC,eAAe;EACfC,kBAAkB,EAAE;IAClB,GAAGC,oBAAoB,CAACD,kBAAkB;IAC1CE,OAAO,EAAE,K