import { CoreComponent } from "cmf.core/src/core"; import * as ng from "@angular/core"; import Cmf from "cmf.lbos"; import { TileOrientationType, SelectionMode } from "./entityTiles"; export { SelectionMode }; export interface MatrixColumnConfig { selectionMode?: SelectionMode; placeholder?: string; navigable?: boolean; dblClickable?: boolean; } /** * Entity Tiles matrix component to display a grid of entity tiles * * ## Inputs * * instances-matrix: Array<Array<Array| Entity>> Matrix that contains the instances. Typically something like: * * |A|B,B| * * |A| * * |A|B | * This matrix represents a matrix of instances. * The three dimensional nature of it arises from the need to represent more than one element for each cell. * E.g.: * [ * [ * [Element1](one element), * element1(one element same as first but no need to put in array), * [element1, element2, element3](multiple elements) * ], <- end of row 1 * [], <- row 2 (empty) * ... * ] * * column-config: Map<number, MatrixColumnConfig> Configurations to be applied to a whole column @see MatrixColumnConfig. * * pageSize: Number - Size of each page * * pageNumber: Number - Current page number * * loadMoreIsEnabled: boolean - load more is enabled or not * * totalRows: Number - total rows from service * ## Outputs * * dblclick-instance: Triggered when an instance is double clicked. Carries an array with [instance, row index, column index] * * selectedChange: Sends the array of instances selected * * loadMoreChange: sends the new page number */ export declare class EntityTilesMatrix extends CoreComponent implements ng.OnChanges { /** * Instances from input to display on the matrix */ instancesMatrix: Array | Cmf.Foundation.BusinessObjects.Entity>>; /** * All instances to be displayed on the matrix */ allInstancesMatrix: Array | Cmf.Foundation.BusinessObjects.Entity>>; /** * Column settings */ columnConfig: Map; /** * Single click output */ clickInstance: ng.EventEmitter<[Cmf.Foundation.BusinessObjects.Entity, number, number]>; /** * Double click output */ dblClickInstance: ng.EventEmitter<[Cmf.Foundation.BusinessObjects.Entity, number, number]>; /** * Selection change event */ selectedChange: ng.EventEmitter>; /** * Page Size */ pageSize: number; /** * Page Number */ pageNumber: number; /** * Page Number */ totalRows: number; /** * Input Flag enable or disable the load more button */ loadMoreIsEnabled: boolean; /** * Flag to show or hide the load more button */ showLoadMore: boolean; /** * Page Number change event */ loadMoreChange: ng.EventEmitter; _defaultOrientation: TileOrientationType; _columnConfig: Array; private _defaultMatrixColumnConfig; private _selectedMatrix; constructor(); /** * Check when matrix is changed */ ngOnChanges(changes: ng.SimpleChanges): void; private buildColumnConfig; click(event: any[], rowIndex: number, columnIndex: number): void; doubleClick(instance: Cmf.Foundation.BusinessObjects.Entity, rowIndex: number, columnIndex: number): void; getSelection(rowIndex: number, columnIndex: number): Array; entityTilesSelectedChange(instances: Array, rowIndex: number, columnIndex: number): void; loadMoreClick(): void; } export declare class EntityTilesMatrixModule { }