import { Generic } from "cmf.core/src/core"; import Cmf from "cmf.lbos"; import { PropertiesEditorProperty } from "../propertiesEditor/propertiesEditor"; import { PropertyOptions as ViewerPropertyOptions } from "../entityPropertiesViewer/entityPropertiesViewer"; export interface PropertyOptions extends ViewerPropertyOptions { propertiesEditorProperty?: PropertiesEditorProperty; } /** * Edit Mode for controls (Edit contemplates Update and UpdateTemplate) */ export declare enum EditMode { ReadOnly = 0, Create = 1, CreateFromTemplate = 2, Edit = 3 } export declare class EntityPropertyService extends Generic { /** * Current entity type in use */ private _currentEntityType; /** * Current entity type object in use */ private _currentEntityTypeObj; /** * Converter for the string default values into values of the property types */ private _defaultValueConverter; /** * Labels and properties that will be passed to the nested component */ private _allProperties; /** * Holds information about all instance mappable properties (that will contain custom attributes/properties) */ private _mapInstanceProperties; /** * the EditMode for the current context */ editMode: EditMode; constructor(); /** * Based on metadata properties and supplied labels/properties, updates component properties */ updateProperties(instance: Cmf.Foundation.BusinessObjects.Entity, properties: { [key: string]: PropertyOptions | string; }): Promise<{ [key: string]: PropertiesEditorProperty; }>; /** * Get internal property container */ private getInternalPropertyContainer; private getEntityTypeProperty; /** * Creates a property editor property based on the entity type property, * the instance and the definition for this property * @param instance Instance where this property is being created * @param prop Entity type property for which the property editor property is being created * @param propDef Specification of the property options * @returns Property editor property */ private fillProperty; /** * On changes method - fetch metadata properties and update component properties */ getPropertiesForInstance(instance: Cmf.Foundation.BusinessObjects.Entity, properties: { [key: string]: PropertyOptions | string; }): Promise<{ [key: string]: PropertiesEditorProperty; }>; }