/** Core */
import { CoreComponent } from "cmf.core/src/core";
/** Angular2 */
import * as ng from "@angular/core";
/** Validator */
import { OnValidate, OnValidateArgs } from '../../directives/validator/validator';
/**
* List view item data
*/
export interface ListViewItem {
disabled: boolean;
checked: boolean;
data: any;
}
/**
* ListView selection type
*/
export declare enum SelectionType {
Single = 0,
Multiple = 1,
None = 2
}
/**
* @whatItDoes
*
* List view is a list of iItems. Supports selection (single and multiple) and custom item template
*
* @howToUse
*
* This component is used with the inputs and outputs mentioned below.
*
* ### Inputs:
* `ListViewItem[]` : **items** - The data to populate the list ;
* `string` : **mainTitle** - If selection is required ;
* `ListViewItem[]` : **selected** - The items to select
* `boolean` : **required** - Defines if the input is mandatory to be filled ;
* `boolean` : **searchEnabled** - If search is enabled ;
* `string` : **searchField** - The filed of each item to search ;
* `string` : **searchPlaceholder** - The search placeholder text ;
* `SelectionType` : **selectionType** - The data collection used to populate the horizontalStepList component ;
* `boolean` : **noBorder** - If list view has no border ;
* `string` : **emptyMessage** - Message to show when there are no items.
* `boolean` : **showHeader** - If set to false, the header will not be displayed. Defaults to true.
*
* ### Outputs:
* `ListViewItem[]` : **selectionChange** : When the selected items change .
*
* ## Example
*
* Assume this HTML Template
*
* ```html
*
*
*
* item.{property1}
* item.{property2}
* (...)
*
*
*
* ```
*
* @class ListView
*/
export declare class ListView extends CoreComponent implements OnValidate, ng.OnChanges {
/**
* Item template
*/
_itemTemplate: ng.TemplateRef;
/**
* Number of selected items
*/
_numberOfSelectedItems: number;
/**
* If user input is valid
*/
_isValid: boolean;
/**
* Selection type
*/
_selectionType: SelectionType;
/**
* Value of the multi selection checkbox
*/
_selectAllValue: boolean;
/**
* Iterable differ
*/
private _iterableDiffer;
/**
* Rendered items
*/
_items: ListViewItem[];
/**
* Original items
*/
_originalItems: ListViewItem[];
/**
* Search text
*/
_searchText: string;
/**
* Search text normalized
*/
_searchTextNormalized: string;
/**
* Controls if the header is displayed.
* Defaults to true
*/
showHeader: boolean;
/**
* The items data
*/
items: ListViewItem[];
/**
* Values selected
*/
selected: ListViewItem[] | ListViewItem;
/**
* Deprecated title input
*/
title: string;
/**
* The list title
*/
mainTitle: string;
/**
* If any selection is required
*/
required: boolean;
/**
* If search is enabled
*/
searchEnabled: boolean;
/**
* Field to search
*/
searchField: string;
/**
* Search placeholder
*/
searchPlaceholder: string;
/**
* The selection type getter/setter
*/
selectionType: SelectionType | string;
/**
* Message to show when there are no items
*/
emptyMessage: string;
/**
* When the selected/checked values change
*
* @property {ng.EventEmitter} init event
*/
selectionChange: ng.EventEmitter;
/**
* Constructor
*/
constructor(_elementRef: ng.ElementRef);
/**
* On changes - update list view
*/
ngOnChanges(changes: any): void;
/**
* Clear search
*/
clearSearch(): void;
/**
* On search
*/
onSearch(searchText: string): void;
/**
* On change select all checkbox
*/
private updateSelectAllStatus;
/**
* Set checked state of all items
*/
private checkAll;
/**
* Check/Un-check all items
*/
selectAll(value: boolean): void;
/**
* Check only one item in Single selection mode
*/
private checkOnlyOneItem;
/**
* Update selection info
*/
private updateSelectionInfo;
/**
* When a list item is clicked
*
* @param {Taura.EventArgs} [event] object containing event data
* @param {ListViewItem} [item] the clicked item
*/
onItemClick(value: boolean, item: ListViewItem): void;
/**
* On Validate method
*
* @param args Validation arguments given by the framework
*/
onValidate(args: OnValidateArgs): Promise;
}
export declare class ListViewModule {
}