/** @packageDocumentation * @module Picker */ import "@bentley/ui-ninezone/lib/ui-ninezone/toolbar/item/expandable/group/tool/Tool.scss"; import "./ListPicker.scss"; import * as React from "react"; import { CommonProps, SizeProps } from "@bentley/ui-core"; /** Enum for the list picker item type * @beta */ export declare enum ListItemType { Item = 0, Separator = 1, Container = 2 } /** List picker item * @beta */ export interface ListItem { [key: string]: any; name?: string; enabled: boolean; type?: ListItemType; children?: ListItem[]; } /** Properties for the [[ListPickerBase]] component * @beta */ export interface ListPickerProps { title: string; items: ListItem[]; iconSpec?: string | React.ReactNode; setEnabled: (item: ListItem, enabled: boolean) => any; onExpanded?: (expand: boolean) => void; onSizeKnown?: (size: SizeProps) => void; } /** State for the [[ListPickerBase]] component * @internal */ interface ListPickerState { expanded: boolean; } /** Properties for the [[ListPickerItem]] component * @beta */ export interface ListPickerItemProps extends CommonProps { key: any; isActive?: boolean; isFocused?: boolean; onClick?: () => void; label?: string; } /** List Picker Item React component * @beta */ export declare class ListPickerItem extends React.PureComponent { /** Renders ListPickerItem */ render(): JSX.Element; } /** Properties for the [[ExpandableSection]] component * @beta */ export interface ExpandableSectionProps extends CommonProps { title?: string; expanded?: boolean; } /** State for the [[ExpandableSection]] component * @internal */ interface ExpandableSectionState { expanded: boolean; } /** Expandable Section React component used by [[ListPickerBase]] * @beta */ export declare class ExpandableSection extends React.PureComponent { /** Creates an ExpandableSection */ constructor(props: ExpandableSectionProps); private _onClick; /** Renders ExpandableSection */ render(): JSX.Element; } /** * List picker base class. * Used to provide an expandable list of items to enable/disable items. * @beta */ export declare class ListPickerBase extends React.PureComponent { private _isMounted; private _closeOnPanelOpened; private _ref; /** Creates a ListPickerBase */ constructor(props: any); /** Minimizes the expandable component. */ minimize: () => void; /** Checks if ExpandableItem is expanded. */ isExpanded: () => boolean; /** @internal */ componentDidMount(): void; /** @internal */ componentWillUnmount(): void; /** Renders ListPickerBase */ render(): JSX.Element; /** Returns the list with the items */ getExpandedContent(): React.ReactNode; private _handleOnOutsideClick; private _handleToolPanelOpenedEvent; private _handleClick; } /** Properties for the [[ListPicker]] component * @beta */ export interface ListPickerPropsExtended extends ListPickerProps { enableAllFunc?: () => void; disableAllFunc?: () => void; invertFunc?: () => void; } /** * List Picker that lets the user pick from a list of items to enable/disable * It also provides options to enable all, disable all and invert selection * @beta */ export declare class ListPicker extends React.Component { static get Key_All(): number; static get Key_None(): number; static get Key_Invert(): number; static get Key_Separator(): number; /** Creates a ListPicker */ constructor(props: ListPickerPropsExtended); private createItems; /** * Checks if item is a special item. * @param item Item to check */ isSpecialItem(item: ListItem): boolean; private _setEnabled; /** Renders ListPicker */ render(): JSX.Element; } export {}; //# sourceMappingURL=ListPicker.d.ts.map