/** Angular2 */ import { PipeTransform } from "@angular/core"; /** Nested components*/ import { EntityTypePropertyValueType as SimpleType, ComplexType } from "cmf.core/src/domain/extensions/caches/entityType"; import { Generic } from "cmf.core/src/core"; /** * Given a type (SimpleType | ComplexType), and a value (object | any) returns a promise that resolves to an adequate representation of that value * * ### Example * * ``` * {{valueObj | cmfCoreBusinessControlsAsyncConvertComplexValue:complexTypeObj | async}} * {{plainValue | cmfCoreBusinessControlsAsyncConvertComplexValue:simpleType | async}} * ``` */ export declare class AsyncConvertComplexValue extends Generic implements PipeTransform { /** * Converts a state model or state model id into its name representation * @param cType Complex type containing the SimpleType identifying if we are working on state models or state model ids and the entity type name * @param value The Id of the state or state model * @returns Name of the state or state model */ convertStateModelIds(cType: ComplexType, value: string): Promise; /** * Converts a role id into its name, by fetching it from the role cache * @param id Id of the role * @returns The Name of the role or the id parameter, if unable to find a match */ convertRoleIds(id: string): Promise; /** * Converts a lookup value into its value or description, by fetching it from the lookup table cache * @param cType Complex type containing the SimpleType * @param value Id of the lookup value */ convertLookupValueIds(cType: ComplexType, value: string): Promise; /** * Given a complexType and a value returns an adequate representation of that value * @param value Plain or complex value to convert * @param type Complex type used to convert the value * @param shortFormat Short format flag */ getValue(value: any, receivedType: SimpleType | ComplexType, shortFormat?: boolean): Promise; /** * Transform * @param value Value * @param args args * @param shortFormat Short format flag */ transform(value: any, args: string[], shortFormat?: boolean): Promise; } export declare class AsyncConvertComplexValueModule { }