/** Angular2 */ import * as ng from "@angular/core"; /** Core */ import { CoreComponent } from "cmf.core/src/core"; /** Services */ import { ComboBoxService, LookupComboBoxDef } from "./lookupComboBoxService"; import { StoreChangeEventArgs, OnStoreChanged } from "cmf.core/src/domain/store/storeDef"; /** * @whatItDoes * * LookupComboBox business component. Used to select an item of a given lookup table collection. * * @howToUse * * This component is used with the inputs and outputs mentioned below. * * ### Inputs * `string` : **placeholder** - Defines the component placeholder * `boolean` : **disabled** - Defines if the element is disabled to be filled * `boolean` : **required** - Defines if the component requires a value * `string` : **lookupTableId** - The id of the lookup table to get the values from * `string` : **lookupTableName** - The name/key of the lookup table to get the values from * `string[]` : **itemsToIgnore** - The items of the array will be compared with the field Value of the lookUpTableValue * `LookupTableValue` : **value** - The value of this component * `boolean` : **singleElementPreSelect** - Defines if the component should pre-select when there's only one element available * `string` : **orderField** - The entity type field that will be used to sort the data * * ### Outputs * `Object` : **valueChanged** - The selected value change event, so the component can inform the upper components * * ### Example * To use the component, assume this HTML Template as an example: * * ```html * * * * * ``` * * @description * * ## LookupComboBox Component * * ### Dependencies * * #### Components * (Provide a detailed list of components that this component depends on) Ex: * * BusinessComboBox : `cmf.core.business.controls` * * NavigationModule : `cmf.core.business.controls` * * #### Services * * ComboBoxService : `cmf.core.business.controls` * * LookupComboBoxService : `cmf.core.business.controls` * * LookupComboBoxDef : `cmf.core.business.controls` * * StoreChangeEventArgs : `cmf.core` * * OnStoreChanged : `cmf.core` */ export declare class LookupComboBox extends CoreComponent implements LookupComboBoxDef, ng.OnChanges, OnStoreChanged, ng.OnInit, ng.OnDestroy { private _comboBoxService; /** * Nested business combo box */ private _nestedComboBox; private _value; /** * The selected value change event, so the component can inform the upper components that the selected value has changed * * @property {ng.EventEmitter} init event */ valueChanged: ng.EventEmitter; /** * The currently selected/inserted value of the comboBox component * * @property {string} selected value of the select component */ /** * Value getter */ value: any; /** * An array of items to ignore. The items of the array will be compared with the field Value of the lookUpTableValue * * @property {string[]} array of Values to Ignore */ itemsToIgnore: string[]; /** * Defines if the component requires a value. Default is false. */ required: boolean; /** * Defines the component placeholder - overriding the default component placeholder (lookupTableName) */ placeholder: string; /** * Defines if the element is disabled to be filed */ disabled: boolean; /** * Defines if the component should pre-select when there's only one element available. Default is 'true'. */ singleElementPreSelect: boolean; /** * The id of the lookup table to get the values from * * @property {string} the id designation */ lookupTableId: string; /** * The name/key of the lookup table to get the values from * * @property {string} the name/key designation */ lookupTableName: string; constructor(_comboBoxService: ComboBoxService); ngOnChanges(changes: ng.SimpleChanges): void; /** * On init, observe the lookup store */ ngOnInit(): void; /** * On Destroy Angular handler */ ngOnDestroy(): void; /** * When lookup store changes * * @param {Core.StoreChangeEventArgs} [args] event object * @method onStoreChanged */ onStoreChanged: (args: StoreChangeEventArgs) => void; /** * When selected value changes - notify parent component */ onValueChange(value: any): void; } export declare class LookupComboBoxModule { }