/** Angular2 */ import * as ng from "@angular/core"; /** Core */ import { CoreComponent } from "cmf.core/src/core"; import { EntityTypePropertyValueType as InputType, CollectionType as PropertyEditorCollectionType } from "cmf.core/src/domain/extensions/caches/entityType"; import { OnValidate, OnValidateArgs, ValidatorModel } from "../../directives/validator/validator"; import { ValueValidator } from "../multiStringInput/multiStringInput"; import Cmf from "cmf.lbos"; export { InputType }; export { ValueValidator }; export { PropertyEditorCollectionType }; /** * Display value type, only used internally */ export declare enum InputEditorType { Spinner = 0, DateTimePicker = 1, CheckBox = 2, Input = 3, Timespan = 4, Switch = 5, Color = 6, Currency = 7, TextArea = 8 } /** * @whatItDoes * Renderers the right component according to the type given. * * @howToUse * This component is used with the inputs and outputs mentioned below. * * ### Inputs * `string` : **placeholder** - Placeholder to display (if none provided will infer from the value type) ; * `boolean` : **required** - Defines if the input is mandatory to be filled ; * `boolean` : **disabled** - Defines if the input is disabled ; * `InputType` : **type** - Defines the type of input to render ; * `any` : **value** - The value of this component ; * `Cmf.Foundation.Common.RangeType` : **range-type** - Used in conjunction with max and min properties ; * `number` : **step** - Spinner step (used in input types: Integer, Decimal, Long) ; * `number` : **min** - Minimum Value. Only used for numeric inputs ; * `number` : **max** - Maximum Value. Only used for numeric inputs ; * `number` : **numberOfDecimals** - Maximum number of decimal places. Above this number, the value is rounded. This value is defined externally ; * `InputEditorType | string` : **nestedEditorType** - Sets the nested editor type . * `PropertyEditorCollectionType` : **collectionType** - Indicates the type of list in what the property will be displayed. * `ValueValidator` : **valueValidator** - Defines a function to validate the input value, with return Promise * `boolean` : **supportTokens** - Defines if tokens are to be supported. Currently only used in DateTimePicker. Defaults to false. * * ### Outputs * `any` : **valueChange** - Triggered when the value change . * * ### Example * To use the component, assume this HTML Template as an example: * * ```HTML * * * * To Use Array *