/** * Use this component when needed to select one / multiple items having complex descriptions. * E.g.: choosing products to promote via ShoutOuts */ export default class ModalSelectorLayout extends React.PureComponent { static displayName: string; static propTypes: { /** applied as data-hook HTML attribute that can be used to create driver in testing */ dataHook: PropTypes.Requireable; /** Title of the modal */ title: PropTypes.Requireable; /** Fixed text displayed above the list */ subtitle: PropTypes.Requireable; /** OK button callback, called with the currently selected item */ onOk: PropTypes.Requireable<(...args: any[]) => any>; /** X button callback */ onClose: PropTypes.Requireable<(...args: any[]) => any>; /** Cancel button callback */ onCancel: PropTypes.Requireable<(...args: any[]) => any>; /** * paging function that should have a signature of * ```typescript * (searchQuery: string, offset: number, limit: number) => * Promise<{ * items: Array<{ * id: number | string, * title: node, * subtitle?: string, * extraText?: string, * extraNode?: node, * disabled?: boolean // show item as disabled, dont count it in "select all", exclude from `onOk` * selected?: boolean // force item as selected * image?: node * subtitleNode?: node, * belowNode?: node, * showBelowNodeOnSelect?: boolean, * }>, * totalCount: number * }> * ``` * `offset` - next requested item's index
* `limit` - number of items requested
* `totalCount` - total number of items that suffice the current search query * */ dataSource: PropTypes.Validator<(...args: any[]) => any>; /** Cancel button's text */ cancelButtonText: PropTypes.Requireable; /** OK button's text */ okButtonText: PropTypes.Requireable; /** Image icon size */ imageSize: PropTypes.Requireable; /** * Image icon shape, `rectangular` or `circle`.
* NOTE: `circle` is not compatible with `imageSize` of `portrait` or `cinema` * */ imageShape: (props: any, propName: any, componentName: any) => Error | undefined; /** Placeholder text of the search input */ searchPlaceholder: PropTypes.Requireable; /** * Component/element that will be rendered when there is nothing to display, * i.e. empty `{items:[], totalCount: 0}` was returned on the first call to `dataSource` * */ emptyState: PropTypes.Requireable; /** * Function that will get the current `searchQuery` and should return the component/element * that will be rendered when there are no items that suffice the entered search query * */ noResultsFoundStateFactory: PropTypes.Requireable<(...args: any[]) => any>; /** Number of items loaded each time the user scrolls down */ itemsPerPage: PropTypes.Requireable; /** Whether to display the search input or not */ withSearch: PropTypes.Requireable; /** Search debounce in milliseconds */ searchDebounceMs: PropTypes.Requireable; /** Height CSS property, sets the height of the modal */ height: PropTypes.Requireable; /** Max-height CSS property, sets the maximum height of the modal. */ maxHeight: PropTypes.Requireable; /** display checkbox and allow multi selection */ multiple: PropTypes.Requireable; /** string to be displayed in footer when `multiple` prop is used and no items are selected */ selectAllText: PropTypes.Requireable; /** string to be displayed in footer when `multiple` prop is used and some or all items ar selected */ deselectAllText: PropTypes.Requireable; /** to disable confirm button */ disableConfirmation: PropTypes.Requireable; /** callback that triggers on select and return selected item object*/ onSelect: PropTypes.Requireable<(...args: any[]) => any>; /** Used to display some side component in the footer. * Will override element select all in the footer when multiple=true */ sideActions: PropTypes.Requireable; }; static defaultProps: { title: string; okButtonText: string; cancelButtonText: string; searchPlaceholder: string; imageSize: string; imageShape: string; itemsPerPage: number; withSearch: boolean; height: string; maxHeight: string; selectAllText: string; deselectAllText: string; disableConfirmation: boolean; }; constructor(props: any); constructor(props: any, context: any); _getEnabledItems: (items: any) => any; render(): React.JSX.Element; } import React from 'react'; import PropTypes from 'prop-types'; //# sourceMappingURL=ModalSelectorLayout.d.ts.map