UNPKG

6.18 kBSource Map (JSON)View Raw
1{"version":3,"file":"DetailsColumn.types.js","sourceRoot":"../src/","sources":["components/DetailsList/DetailsColumn.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { DetailsColumnBase } from './DetailsColumn.base';\nimport type { IColumn } from './DetailsList.types';\nimport type { IRenderFunction, IStyleFunctionOrObject } from '../../Utilities';\nimport type { ITooltipHostProps } from '../../Tooltip';\nimport type { IDragDropHelper } from '../../DragDrop';\nimport type { ICellStyleProps } from './DetailsRow.types';\nimport type { ITheme, IStyle } from '../../Styling';\nimport type { IIconProps } from '../Icon/Icon.types';\n\n/**\n * {@docgategory DetailsList}\n */\nexport interface IDetailsColumnRenderTooltipProps extends ITooltipHostProps {\n /**\n * Information about the column for which the tooltip is being rendered.\n * Use this to format status information about the column, such as its filter or sort state.\n */\n column?: IColumn;\n}\n\n/**\n * {@docCategory DetailsList}\n */\nexport interface IDetailsColumnProps extends React.ClassAttributes<DetailsColumnBase> {\n /**\n * The theme object to respect during render.\n */\n theme?: ITheme;\n /**\n * The component styles to respect during render.\n */\n styles?: IStyleFunctionOrObject<IDetailsColumnStyleProps, IDetailsColumnStyles>;\n /**\n * A reference to the component instance.\n */\n componentRef?: () => void;\n /**\n * The column definition for the component instance.\n */\n column: IColumn;\n /**\n * The column index for the component instance.\n */\n columnIndex: number;\n /**\n * Parent ID used for accessibility label(s).\n */\n parentId?: string;\n /**\n * Render function for providing a column header tooltip.\n */\n onRenderColumnHeaderTooltip?: IRenderFunction<IDetailsColumnRenderTooltipProps>;\n /**\n * Callback fired when click event occurs.\n */\n onColumnClick?: (ev: React.MouseEvent<HTMLElement>, column: IColumn) => void;\n /**\n * Callback fired on contextual menu event to provide contextual menu UI.\n */\n onColumnContextMenu?: (column: IColumn, ev: React.MouseEvent<HTMLElement>) => void;\n /**\n * The drag and drop helper for the component instance.\n */\n dragDropHelper?: IDragDropHelper | null;\n /**\n * Whether or not the column can be re-ordered via drag and drop.\n */\n isDraggable?: boolean;\n /**\n * @deprecated use `updateDragInfo`\n */\n setDraggedItemIndex?: (itemIndex: number) => void;\n /**\n * Callback on drag and drop event.\n */\n updateDragInfo?: (props: { itemIndex: number }, event?: MouseEvent) => void;\n /**\n * Whether or not the column has been dropped via drag and drop.\n */\n isDropped?: boolean;\n /**\n * Custom styles for cell rendering.\n */\n cellStyleProps?: ICellStyleProps;\n /**\n * Whether to use fast icon and check components. The icons can't be targeted by customization\n * but are still customizable via class names.\n * @defaultvalue true\n */\n useFastIcons?: boolean;\n}\n\n/**\n * {@docCategory DetailsList}\n */\nexport type IDetailsColumnStyleProps = Required<Pick<IDetailsColumnProps, 'theme' | 'cellStyleProps'>> & {\n /**\n * Classname to provide for header region.\n */\n headerClassName?: string;\n /**\n * Whether or not the column is actionable.\n */\n isActionable?: boolean;\n /**\n * Whether or not the column contains contents.\n */\n isEmpty?: boolean;\n /**\n * Whether or not the column has a visible icon.\n */\n isIconVisible?: boolean;\n /**\n * Whether or not the column is padded.\n */\n isPadded?: boolean;\n /**\n * Whether or not the column has icon only content/\n */\n isIconOnly?: boolean;\n /**\n * Classname to provide for the header's icon region.\n */\n iconClassName?: string;\n /**\n * CSS transition duration on drag event.\n */\n transitionDurationDrag?: number;\n /**\n * CSS transition duration on drop event.\n */\n transitionDurationDrop?: number;\n};\n\n/**\n * {@docCategory DetailsList}\n */\nexport interface IDetailsColumnStyles {\n /**\n * Styleable root region.\n */\n root: IStyle;\n /**\n * Styleable resize glyph region.\n */\n gripperBarVerticalStyle: IStyle;\n /**\n * Styleable cell tooltip region.\n */\n cellTooltip: IStyle;\n /**\n * Styleable cell title region.\n */\n cellTitle: IStyle;\n /**\n * Styleable cell name region.\n */\n cellName: IStyle;\n /**\n * Styleable icon region.\n */\n iconClassName: IStyle;\n /**\n * Styleable margin by icon region.\n */\n nearIcon: IStyle;\n /**\n * Styleable label region.\n */\n accessibleLabel: IStyle;\n /**\n * Styleable column sort icon region.\n */\n sortIcon: IStyle;\n /**\n * Styleable filter glyph.\n */\n filterChevron: IStyle;\n /**\n * Styleable border region after drag & drop.\n */\n borderAfterDropping: IStyle;\n /**\n * Transparent no border region after drag & drop to avoid content shift.\n */\n noBorderAfterDropping: IStyle;\n /**\n * Styleable border while drag & drop occurs.\n */\n borderWhileDragging: IStyle;\n /**\n * Transparent no border region while drag & drop occurs to avoid content shift.\n */\n noBorderWhileDragging: IStyle;\n}\n\n/**\n * {@docCategory DetailsList}\n */\nexport interface IDetailsColumnFilterIconProps extends IIconProps {\n columnProps?: IDetailsColumnProps;\n}\n\n/**\n * {@docCategory DetailsList}\n */\nexport interface IDetailsColumnFieldProps {\n /**\n * Item data to render.\n */\n item: any;\n /**\n * Index of the item in its list.\n */\n itemIndex: number;\n /**\n * Whether or not the row is selected.\n */\n isSelected?: boolean;\n /**\n * Column schema information.\n */\n column: IColumn;\n /**\n * Key representing the cell value, for change-detection.\n */\n cellValueKey?: string;\n /**\n * Class name to apply to the cell root element.\n */\n className?: string;\n /**\n * Original content render function for the cell\n */\n onRender: (item?: any, index?: any, column?: IColumn) => React.ReactNode;\n}\n"]}
\No newline at end of file