/** Core */ import { CoreComponent } from "cmf.core/src/core"; import Cmf from "cmf.lbos"; /** Nested modules */ import { ListViewItem, SelectionType } from "cmf.core.controls/src/components/listView/listView"; /** Angular */ import * as ng from "@angular/core"; /** * @whatItDoes * * Used to display a list of entities * * @howToUse * * The template for each item content must be provided. It can be anything in html and it has access to each item properties. * * ### Inputs * * `Array` : **entities** - List of entities to feed the list view * * `Cmf.Foundation.BusinessObjects.Entity[]` : **disabledEntities** - Entities to appear disabled * * `Array` : **selectedEntities** - Selected entities * * `SelectionType` : **selection-type** - ListView selection type * * `string` : **title-property-path** - Property path of the entity to be displayed on each item title * * `string` : **subtitle-property-path** - Property path of the entity to be displayed on each item subtitle * * `boolean` : **searchEnabled** - If search is enabled * * `string` : **searchField** - The filed of each item to search * * `string` : **searchPlaceholder** - The search placeholder text * * `boolean` : **autoSelectFirstElement** - If true, the list view will set the first item on list as the select one * * `boolean` : **keepSelection** - If keep selection is enabled * ### Outputs * * `selectedEntitiesChange` : **Array** - Selected entities * * ## Example * To use the component, assume this HTML Template as an example: * * ```HTML * * * item.{property1} *
item.{property2}
* (...) *
*
* ``` * * @description * * ## EntityListView Component * * ### Dependencies * * #### Components * * ListViewModule : `cmf.core.controls` * * #### Services * _The component component does not depend on any service_ * * #### Directives * _The component component does not depend on any directives_ * */ export declare class BusinessEntityListView extends CoreComponent implements ng.OnChanges { private _element; /** * Entities */ private _entities; /** * List View Items */ _listViewItemsEntities: ListViewItem[]; /** * Selected entity */ private _selectedEntities; /** * Disabled entities */ private _disabledEntities; /** * Auto select first element if selected items is null */ autoSelectFirstElement: boolean; /** * When the selected values change */ selectedEntitiesChange: ng.EventEmitter>; selectionType: SelectionType | string; /** * Title property path */ titlePropertyPath: string; /** * Subtitle property path */ subtitlePropertyPath: string; searchEnabled: boolean; /** * Field to search */ searchField: string; /** * Search placeholder */ searchPlaceholder: string; /** * Selection type */ _selectionType: SelectionType; /** * Keep selection flag to enable or disable */ keepSelection: boolean; /** * Constructor */ constructor(_element: ng.ElementRef); /** * On changes method */ ngOnChanges(changes: { [key: string]: ng.SimpleChange; }): any; /** * Clear any selection made on the list view items */ clearSelectionFromList(): void; /** * Verify if a entity exists * * @param {Cmf.Foundation.BusinessObjects.Entity} The entity to find * @param {Cmf.Foundation.BusinessObjects.Entity | Array } The object to compare/find the entity */ private isEntityExisting; /** * Build the listViewItem with the data of the entity * * @param {Cmf.Foundation.BusinessObjects.Entity} entity do add in the entity list view * @param {boolean} Set if the entity is select by default or not */ private buildListViewItem; /** * Returns the disabled state of an entity * @param entity Entity to check * @returns boolean if the entity should be disabled */ private isEntityDisabled; /** * Selection event */ onSelectionChange(items: Array): void; /** * Method used to remove border from template and put it in parent li, existing in the parent listView component. * Only used in multiple selection */ private changeBorderLocation; } export declare class EntityListViewModule { }