/** Angular2 */
import * as ng from "@angular/core";
/** Core */
import { CoreComponent } from "cmf.core/src/core";
import { Cmf } from "cmf.lbos";
import { ValidObjectDisplay, WhereUsedData } from "./entityWhereUsedDef";
/**
* Interface the represents an entity being displayed by the
* "entitiesSlimListing" component.
*/
export interface EntityToRender {
/**
* The object being displayed.
*/
entity: ValidObjectDisplay;
/**
* Flag indicating if the entity stored in this object is a
* relation.
*/
isRelation?: boolean;
/**
* Type of the entity stored in this object.
*
* This field is passed to the Navigation component in order to
* determine if the Navigation should display a Version field or
* not.
*/
type: Cmf.Foundation.Common.ReferenceType;
}
/**
* @whatItDoes
*
* Helper component that presents a small list of entities underneath
* an header with the possibility of loading additional entities into
* the list.
*
* All entities shown by this component need to be of the same entity
* type.
*
* @howToUse
* This component is used with the inputs and outputs mentioned below.
*
* ### Inputs
* `Cmf.Foundation.BusinessObjects.Entity[]` : **entities** - An array
* containing the entities to display.
* `string` : **title** - The title to display on the header.
* `number` : **totalRows** - The total number of entities that can be
* loaded by this component. This value is shown on the header
* together with the title.
*
* ### Outputs
* `string` : **loadMoreClick** - Emits an event when the user
* requests that more entities be loaded into the list.
*
* ### Example
* To use the component, assume the following HTML Templates as
* examples:
*
* ```HTML
*
*
* ```
*
* @description
*
* ## EntitiesSlimListing Component
*
* ### Dependencies
*
* #### Components
* Navigation : `cmf.core.business.controls`
*
* #### Services
* _This component does not depend on any service._
*
* #### Directives
* _This component does not depend on any directive._
*/
export declare class EntitiesSlimListing extends CoreComponent implements ng.OnChanges {
_elementRef: ng.ElementRef;
/**
* The entities to render on the DOM.
*/
_entities: EntityToRender[];
/**
* The entities to be rendered.
*/
entities: WhereUsedData[];
/**
* The title of the header.
*/
title: string | null;
/**
* The total amount of entities that can be displayed by this
* component.
*/
totalRows: number | null;
/**
* The CSS class used to display the icon on the header.
*/
titleIconClass: string;
/**
* Event emitter that triggers events whenever the user requests
* that more entities to be loaded unto the list.
*/
loadMoreClick: ng.EventEmitter;
/**
* Flag that controls whether or not the "Load more" button should
* be shown to the user. "true" means that the "Load more"
* functionality is shown to the user, "false" means that the
* functionality should be hidden.
*
* The "Load more" functionality is hidden whenever this component
* has loaded all of the available entity objects.
*/
showLoadMoreButton: boolean;
/**
* Creates an EntitySlim instance
* @param _elementRef The elementRef of the component
*/
constructor(_elementRef: ng.ElementRef);
/**
* Get the icon class that represents the entity type of the
* entity that will be displayed on the component.
*
* @param entity The Entity that will be displayed on the buffer.
*
* @returns A Promise that is fulfilled with a string containing
* the CSS class to use in order to display the correct icon.
*/
private getIconClassForEntity;
/**
* Get the ReferenceType of a given object.
*
* @param object The object to analyze.
*
* @returns The ReferenceType of the given object. Returns
* ReferenceType.None if it cannot determine the reference type of
* the object.
*/
private getTypeOfObject;
/**
* Angular On Change method.
*/
ngOnChanges(changes: ng.SimpleChanges): void;
/**
* Callback that is called when the user clicks on the "Load more"
* link that is shown on the component.
*
* @returns Nothing.
*/
onLoadMoreClick(): void;
}
export declare class EntitiesSlimListingModule {
}