/** Angular2 */ import * as ng from "@angular/core"; /** Core */ import { CoreComponent } from "cmf.core/src/core"; /** Utils */ import { EnumControlsUtils, EnumControlElement, EnumControlOrderField } from "./enumControlsUtils"; export { EnumControlElement as EnumComboBoxElement }; export { EnumControlOrderField as EnumComboBoxOrderField }; /** * EnumComboBox business component. Used to select an item of a given enum * * ## Example * * Assume this HTML Template * * ```html * * * * ``` * * @class EnumComboBox */ export declare class EnumComboBox extends CoreComponent implements ng.OnChanges { /** * Enum obj */ private _enum; /** * Enum reference name. Default is "". */ private _enumReferenceName; /** * Nested comboBox place holder. Default is "". */ _placeholder: string; /** * The data collection, used to populate the nested comboBox component. */ _componentData: Array; /** * Component current value - Currently selected enum value */ private _value; /** * The object field that will be used to sort the values in the comboBox - by default and since it is an enum it will order by name */ _orderField: string; /** * Utils */ _utils: EnumControlsUtils; /** * Defines if the element is disabled to be filed */ disabled: boolean; /** * Defines if the component requires a value. Default is false. */ required: boolean; /** * Defines the component placeholder - overriding the default component placeholder (enum name) */ placeholder: string; /** * Property _enumObj getter * * @return {any} current enum object */ /** * Property enum setter. Will set both _enumReferenceName and _enumObj */ enum: any; /** * Property _value getter/setter */ value: any; /** * An array of items to ignore. The items of the array will be compared with both keys and values of the enum */ itemsToIgnore: string[]; /** * Defines if the component should pre-select when there's only one element available. Default is 'true'. */ singleElementPreSelect: boolean; /** * The object field that will be used to sort the values in the comboBox - by default and since it is an enum it will order by name */ /** * Property _value getter/setter */ orderField: EnumControlOrderField | string; /** * The value change event, so the component can inform the upper components that the value has changed */ valueChanged: ng.EventEmitter; constructor(); /** * If component value is of type string, try to find the corresponding object in the componentData array */ private updateValue; /** * Based on reference name - set placeholder */ private _setPlaceHolder; /** * Based on the currently enum object, updates the items (array of objects) that populate the nested combo box */ private _setComponentData; /** * On changes method - update property viewer value field */ ngOnChanges(changes: any): void; /** * When selected value changes - notify parent component * * @method onInit */ onSelectedChange(value: EnumControlElement): void; } export declare class EnumComboBoxModule { }