/** Angular2 */ import * as ng from "@angular/core"; /** Core */ import { CoreComponent } from "cmf.core/src/core"; import Cmf from "cmf.lbos"; import { CollectionType } from "cmf.core/src/domain/extensions/caches/entityType"; /** Nested components */ import { PropertyViewerType, DisplayValueType } from "../propertyViewer/propertyViewer"; /** * @whatItDoes * * Used to view a property of an entity instance. * * * @howToUse * * This component is used with the inputs and outputs mentioned below. * * * ### Inputs * `string` : **label** - Label to be showed besides the value. If none is given it will be inferred the entity type property * `Cmf.Foundation.BusinessObjects.Entity` : **instance** - Instance for which the property will be showed * `Cmf.Foundation.BusinessObjects.EntityTypeProperty | string` : **property** - Entity type property to be displayed or string for path * `string | boolean`: **optional** - If property to be displayed is optional. If it's not optional and property does not exist error is throwed. * `string`: **symbol** - String literal that will be displayed as symbol * `string`: **symbolProperty** - Property that belongs to entity type and that will be used to be displayed as symbol * `string | boolean`: **symbolParentheses** - If symbol should be enclosed within Parentheses * `string | boolean`: **showLabel** - If label should be showed * `boolean`: **labelHidden** - Hide label and maintain label area * `string | DisplayValueType`: **nestedViewerType** - Nested viewer type for property viewer * `CollectionType`: **collectionType** - Collection type for the property to be displayed (Array\None) * `string` : **propertyIconClass** - icon class to appear to the left of the label text. * * The first use case was to identify Custom Properties of an Entity. [Optional]. * * ### Example * To use the component, assume this HTML Template as an example: * * ```HTML * * * ``` * * @description * * ## EntityPropertyViewer Component * * ### Dependencies * * #### Components * * PropertyViewer : `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 EntityPropertyViewer extends CoreComponent implements ng.OnChanges { private _ngZone; /** * Entity type name */ private _entityTypeName; /** * Property Name */ private _propertyName; /** * Entity property viewer label. Default "". This label is defined by the component input. Default "". */ private _label; /** * Nested Property viewer label. If no label is provided in the component input, it will be inferred from the entity type property. */ _propertyViewerLabel: string; /** * Nested Property viewer string value. Default "". */ _propertyViewerValue: string; /** * Determines if the entity type property is optional */ private _optional; /** * Determines if the entity type property will be displayed. Only used when optional is true. */ _display: boolean; /** * Nested Property viewer value type. Default is PropertyViewerType.String. */ _propertyViewerValueType: PropertyViewerType; /** * Nested Property viewer value reference type. Default is Cmf.Foundation.Common.ReferenceType.None; */ _propertyViewerValueReferenceType: Cmf.Foundation.Common.ReferenceType; /** * Nested Property viewer value reference type name. Default is ""; */ _propertyViewerValueReferenceTypeName: string; /** * Property display value type. Default is DisplayValueType.Text. */ _displayValueType: DisplayValueType; /** * Gets or sets if the component is display only * Example - if the navigation component is display only */ isDisplayOnly: boolean; /** * Label hidden */ labelHidden: boolean; /** * Entity */ instance: Cmf.Foundation.BusinessObjects.Entity; /** * Entity type property */ property: Cmf.Foundation.BusinessObjects.EntityTypeProperty | string; /** * String literal that will be displayed as symbol */ symbol: string; /** * Property that belongs to entity type and that will be used to be displayed as symbol */ symbolProperty: string; /** * The symbol value to be displayed */ symbolValue: string; /** * The symbol value to be displayed */ symbolParenthesesValue: boolean; /** * If label should be displayed */ showLabelValue: boolean; /** * What type of collection is being displayed */ collectionType: CollectionType; /** * Entity property label getter * * @return {any} current value for property label */ /** * Entity property label setter * * @param {any} [value] new value for property label */ label: string; /** * Property _optional getter * * @return {boolean} current value of property _optional */ /** * Property _optional setter * * @param {string | boolean} [value] new value for property _optional */ optional: string | boolean; /** * Property symbolParenthesesValue getter */ /** * Property symbolParenthesesValue setter */ symbolParentheses: string | boolean; /** * Property symbolParenthesesValue getter */ /** * Property showLabel setter */ showLabel: string | boolean; /** * Nested viewer type property getter */ /** * Nested viewer type property setter */ nestedViewerType: DisplayValueType | string; /** * Icon class for the property label. */ propertyIconClass: string; constructor(_ngZone: ng.NgZone); /** * Entity property viewer property field update method */ private updateProperty; /** * Update symbol value */ private updateSymbolValue; /** * Get attribute value */ private getAttributeValue; /** * Entity property viewer value field update method */ private updateValue; /** * This method inferes the possible value type and reference type according to the given value * and updates the relevant properties in order for the value to be displayed */ private updateCalculatedValue; /** * Builds the label when a localized message is found for the provided property. * @param entityTypeProperty The EntityTypePropery to check for a localized message. */ private calculateLabelWithLocalizedMessage; /** * On changes method - get entity type properties and set value field */ ngOnChanges(changes: any): void; } export declare class EntityPropertyViewerModule { }