import { CoreComponent } from "cmf.core/src/core"; import * as ng from "@angular/core"; import { TileOrientationType, SelectionMode } from "cmf.core.controls/src/components/tile/tile"; import Cmf from "cmf.lbos"; /** * Tile wrapping mode. Wrap or don't wrap (hide tiles) */ export declare enum EntityTilesWrapMode { Wrap = 0, NoWrap = 1 } /** * Tile Spacing (Medium 8px / Large 16px) */ export declare enum EntityTilesSpacing { Medium = 0, Large = 1 } export { SelectionMode, TileOrientationType }; /** * Entity Tiles class that displays multiple instances * * Displays a panel of EntityTile for each of the EntityInstances passed as parameter. * Can wrap (resizable) content or not, depending on input. * * ## Inputs * * instances: An Array of instances to display * * orientation: Badge direction of type TileOrientationType (Horizontal or Vertical) (@see Tile) * * wrap-mode: Wrap mode, one of EntityTilesWrapMode.Wrap | EntityTilesWrapMode.NoWrap * * selection-mode: Selection instance mode, defaults to None. * One of SelectionMode.None | SelectionMode.Single | SelectionMode.Multiple (@see Tile) * * selected: set the selected instances * * navigable: Controls if double click navigates to instance page (defaults to false). * If dblclickable is set to true, navigation is performed on double click * * dblclickable: Boolean variable that determines if double click event is fired * * disable-progress-indicator: disables progress indicator. Defaults to false. (PI enabled) * * ## outputs * * click-instance([EntityInstance, Event]): click event, returns the instance and event * * click-icon([EntityInstance, Event]): icon click event, returns the instance and event * * dblclick-instance(EntityInstance): double click event, carries the instance of the tile where the event was triggered * * selected-instances(Array): Event that triggers when the selected instances changes, outputing the array of instances * * ## Example * * ```html * * ``` */ export declare class BusinessEntityTiles extends CoreComponent implements ng.AfterViewInit, ng.OnChanges, ng.OnInit, ng.OnDestroy { private _elementRef; private _changeDetector; /** * Stores the element query */ private _elementQuery; /** * Selected Instances */ private _selectedInstances; /** * Field sort */ private _fieldSort; /** * Instances to display on each entity tile */ instances: Array; /** * Instances to display on each entity tile - sorted */ sortedInstances: Array; /** * Keeps the Horizontal or Vertical orientation types */ orientation: TileOrientationType; /** * Tile wrap mode, defaults to wrap */ wrapMode: EntityTilesWrapMode; /** * The instance field that will be used to sort - note that it will always sort by name */ orderField: string; /** * Disable progress indicator on the entityTiles component */ disableProgressIndicator: boolean; /** * Show\hide progress from all entity tiles */ showProgressIndicatorFromEntityTiles: boolean; /** * Tiles spacing setter, defaults to Medium (8px) * @see EntityTilesSpacing */ /** * Property _orientation setter * * @param [value] */ entityTilesSpacing: EntityTilesSpacing | string; /** * Sets the selection mode of tiles in this entityTiles */ selectionMode: SelectionMode; /** * Click event triggered when a tile is clicked. */ click: ng.EventEmitter<[Cmf.Foundation.BusinessObjects.EntityInstance, Event]>; /** * Click event triggered when a tile icon is clicked. */ iconClick: ng.EventEmitter<[Cmf.Foundation.BusinessObjects.EntityInstance, Event]>; /** * Double click event triggered when a tile is double clicked. */ dblClick: ng.EventEmitter; /** * Selected Instances input */ /** * Sets the selected instances of this component. * * @param value Instances to select. Null value means that no instances should be selected. */ selected: Array; /** * Selected tile instances */ selectedChange: ng.EventEmitter | Cmf.Foundation.BusinessObjects.EntityInstance>; /** * boolean variable that determines if a tile is navigable */ navigable: boolean; /** * boolean variable that determines if double click event is fired */ dblClickable: boolean; /** * Wrap mode enum stored to use in template */ entityTilesWrapMode: typeof EntityTilesWrapMode; /** * Keeps the value of the tiles minimum width based on the base component width */ _minWidth: string; /** * Instances to display and selection mode */ _instancesSelection: { [instanceId: string]: boolean; }; /** * Tiles spacing, defaults to Medium (8px) * @see EntityTilesSpacing */ _entityTilesSpacing: EntityTilesSpacing; constructor(_elementRef: ng.ElementRef, _changeDetector: ng.ChangeDetectorRef); private emitSelection; /** * Update tile size based on width */ private updateTileSize; /** * Set the tile size upon init */ ngOnInit(): void; /** * Set the event handler for the content resize change */ ngAfterViewInit(): void; /** * Sort instances by the provided orderField, note that it will always sort by name * @param instancesToOrder instances to sort * @param orderField primary order field - note that it will always sort by name * @param fieldSort sort configuration */ sortInstances(instancesToOrder: Cmf.Foundation.BusinessObjects.EntityInstance[], orderField: string, fieldSort: Cmf.Foundation.Common.FieldSort): Cmf.Foundation.BusinessObjects.EntityInstance[]; /** * Check when instances are changed */ ngOnChanges(changes: ng.SimpleChanges): void; /** * Alter the selected instances to the ones passed as parameter * @param value Array of instances to select * @param throwEvent (optional) throw a selectedChange event on completion */ alterSelected(value: Cmf.Foundation.BusinessObjects.EntityInstance[], throwEvent?: boolean): void; /** * Handle instance click event. */ instanceClick(result: [Cmf.Foundation.BusinessObjects.EntityInstance, Event]): void; /** * Handle instance icon click event. */ instanceIconClick(result: [Cmf.Foundation.BusinessObjects.EntityInstance, Event]): void; /** * Handle instance click event. */ instanceDblClick(instance: Cmf.Foundation.BusinessObjects.EntityInstance): void; /** * Handle selection changed event, calculate selection based on selection mode and type of input */ selectionChanged(data: [boolean, Event], instance: Cmf.Foundation.BusinessObjects.EntityInstance): void; ngOnDestroy(): void; } export declare class BusinessEntityTilesModule { }