/** Core */ import { CoreComponent } from "cmf.core/src/core"; import Cmf from "cmf.lbos"; /** cmf.core.business.controls */ import { PropertyOptions } from "../entityPropertiesViewer/entityPropertiesViewer"; /** Angular */ import * as ng from "@angular/core"; import { CUSTOM_PROPERTY_ICON_CLASS } from "./entityAttributesUtil"; export { CUSTOM_PROPERTY_ICON_CLASS }; /** * @whatItDoes * EntityAttributes component is used to view the attributes of an entity, including Custom Properties. * Both the Definition and Version Attributes and Custom Properties are supported. * The Entity instance must be provided and the EntityType is Optional. If it isn't provided, the component calculates it on the OnInit Angular hook. * * @howToUse * * This component is used with the inputs mentioned below. * * ### Inputs * `Cmf.Foundation.BusinessObjects.Entity` : **instance** - The Entity instance. * `Cmf.Foundation.BusinessObjects.EntityType` : **entityType** - The Entity Type of the instance. [Optional] * * * ### Example * To use the component, assume this HTML Template as an example: * * ```HTML * * * ``` * * ### _NOTES_ * The entityType input is Optional. If it isn't provided, the component calculates it on the OnInit Angular hook. * * @description * * ### Dependencies * * #### Components * * BaseWidgetModule : `cmf.core.controls` * * EntityPropertiesViewerModule : `cmf.core.business.controls` */ export declare class EntityAttributes extends CoreComponent implements ng.OnChanges { private _elementRef; /** * Entity instance. */ instance: Cmf.Foundation.BusinessObjects.Entity; /** * Entity instance's EntityType. */ entityType: Cmf.Foundation.BusinessObjects.EntityType; /** * Determines if the Entity is versioned or not. It uses the isVersioned property of the EntityType. */ isVersioned: boolean; /** * The Attributes collection that belong to the Entity. If the Entity is versioned, this has the Entity Version Attributes. */ attributes: { [key: string]: string | PropertyOptions; }; /** * Determines if there are attributes to display. If the Entity is versioned, this determines if there are Entity Version Attributes to display. */ hasAttributes: boolean; /** * The Attributes collection that belong to the Entity Definition. */ definitionAttributes: { [key: string]: string | PropertyOptions; }; /** * Determines if there are definition attributes to display. */ hasDefinitionAttributes: boolean; /** * Constructor * * @param viewContainerRef the reference to the component view container */ constructor(viewContainerRef: ng.ViewContainerRef, _elementRef: ng.ElementRef); /** * Fills the attributes from the provided entity instance, taking into account also the provided attributes to hide array. * @param entity the entity instance to be used to fill the Attributes collections. Cmf.Foundation.BusinessObjects.Entity * @param attributesToHide the attributes to be hidden. string[] */ private fillAttributes; /** * On changes method. Angular hook. * * @param changes the changes made to the component properties */ ngOnChanges(changes: ng.SimpleChanges): void; } export declare class EntityAttributesModule { }