///
import "../../FabricInit";
import { IBaseProps } from "office-ui-fabric-react/lib/Utilities";
import { IContextualMenuItem } from "office-ui-fabric-react/lib/ContextualMenu";
import { IDetailsList, IDetailsListProps, IColumn } from "office-ui-fabric-react/lib/DetailsList";
import { IVssContextualMenuItemProvider } from "../../VssContextualMenu";
import { IItemIndicatorProps } from "../../ItemIndicator";
import { IVssIconProps } from "../../VssIcon";
export { IColumn };
export declare enum VssDetailsListRowStyle {
/**
* Default row style - single line of text
*/
oneLine = 0,
/**
* Two stacked lines of text in primary cell
*/
twoLine = 1
}
export declare enum VssDetailsListPresentationStyles {
empty = 0,
hideActionsButton = 1,
singleLine = 2,
flexCellLayout = 4,
paddingInCells = 8,
colors = 16,
linkStyles = 32,
headerRowStyles = 64
}
export interface IVssDetailsListProps extends IDetailsListProps {
/**
* Optional callback to access the IVssDetailsList interface. Use this instead of ref for accessing
* the public methods and properties of the component.
*/
componentRef?: (component: IVssDetailsList | IDetailsList | null) => void;
/**
* Which column should contain the actions button trigger
*/
actionsColumnKey?: string;
/**
* Whether or not the actions button should use display: none or visibility: hidden while it is not visible.
*/
allocateSpaceForActionsButtonWhileHidden?: boolean;
/**
* A callback used to dynamically create the list of menu items
*/
getMenuItems?: (activatedItem: any) => IContextualMenuItem[];
/**
* A callback used to dynamically create the list of menu item providers. These can be used to asynchronously load menu items.
*/
getMenuItemProviders?: (activatedItem: any) => IVssContextualMenuItemProvider[];
/**
* Row style to use - defaults to OneLine.
*/
rowStyle?: VssDetailsListRowStyle;
/**
* If showing groups, this option indicates whether or not to hide the expand/collapse column
*/
hideGroupExpansion?: boolean;
/**
* A callback used to determine if the item should display the context menu. Be mindful that extension authors may
* still want to target this item, so be confident there is no use case for actions to be displayed.
*/
shouldDisplayActions?: (item: any) => boolean;
/**
* Controls styling that should be applied to VssDetailsList.
* If a value here is provided, we will rip off all styling of DetailsList
* related to presentation, leaving only 'layout' styles.
* Then, we will add back styles, specific to VssDetailsList, based on the
* options provided in this prop.
* If no value is provided, we will use standard presentationStyles.
*/
presentationStyles?: VssDetailsListPresentationStyles;
/**
* For compat/migration purposes. If this value is true and no presentationStyles
* are passed, we will use a set of standard presentationStyles.
*
* Once we are ready to move to presentationStyles for all VssDetailsLists,
* we will deprecate this prop.
*/
usePresentationStyles?: boolean;
}
export interface IVssDetailsListIndicator {
/**
* Returns an indicator for the item
*/
getItemIndicator: () => IItemIndicatorProps;
}
export interface IVssDetailsListTitleCellProps extends IBaseProps {
/**
* aria-label placed on the cell
*/
ariaLabel?: string;
/**
* Defines the icon to use for the title cell
*/
iconProps?: IVssIconProps;
/**
* Whether or not the data represented in the cell is disabled
*/
disabled?: boolean;
/**
* Render function for non-standard primary text
*/
onRenderPrimaryText?: () => JSX.Element;
/**
* Render function for non-standard secondary text
*/
onRenderSecondaryText?: () => JSX.Element;
/**
* If provided, the primary text is rendered as a link with this value as the href
*/
primaryAction?: string | (() => void);
/**
* Target property to use in for primary text
*/
primaryTarget?: string;
/**
* Text to display in first (or only) line of the cell
*/
primaryText?: string;
/**
* Role to be used in the primary action . If not provided, will fallback to
* role='button' if the primaryAction is a function and role='link' if the primaryAction is a
* string.
*/
primaryActionRole?: string;
/**
* Text to display in the second line of the cell
*/
secondaryText?: string;
/**
* Optional indicators to display right-aligned within the title cell
*/
indicators?: IVssDetailsListIndicator[];
}
/**
* Properties for a group header component within a VssDetailsList
*/
export interface IVssDetailsListGroupHeaderProps extends IBaseProps {
/**
* The text to show for this group (ignored if onRenderContent is supplied)
*/
text?: string;
/**
* Custom CSS class name for the element hosting the header text (ignored if onRenderContent is supplied)
*/
textCssClassName?: string;
/**
* Custom Render function for content that is not simple text
*/
onRenderContent?: () => JSX.Element;
}
/**
* Interface for VssDetailsList
*/
export interface IVssDetailsList {
/**
* The underlying DetailsList composed by VSSDetailsList
*/
detailsList?: IDetailsList;
}