/// import { ElementRef, Renderer, IterableDiffers } from "@angular/core"; import { IgControlBase } from "../igcontrolbase/igcontrolbase"; import { ControlValueAccessor, NgModel } from "@angular/forms"; export declare class IgComboComponent extends IgControlBase implements ControlValueAccessor { model: NgModel; protected _model: any; private _dataSource; private _changes; constructor(model: NgModel, el: ElementRef, renderer: Renderer, differs: IterableDiffers); ngOnInit(): void; writeValue(value: any): void; onChange: (_: any) => void; onTouched: () => void; registerOnChange(fn: () => any): void; registerOnTouched(fn: () => any): void; ngDoCheck(): void; /** * Performs databinding on the combo box. The [databinding](ui.igcombo#events:dataBinding) and [dataBound](ui.igcombo#events:dataBound) events are always raised. */ dataBind(): Object; /** * Forces an update of the igCombo value according to the current text in the igCombo input. * * The refresh is primarily intended to be used with [allowCustomValue](ui.igcombo#options:allowCustomValue) set to true. * The refresh will take the current text and, if no selection is applied, will set it as igCombo value provided that [allowCustomValue](ui.igcombo#options:allowCustomValue) true. */ refreshValue(): Object; /** * Gets the associated data of an item by value matching it's [valueKey](ui.igcombo#options:valueKey) property. * * @param value Value matching the valueKey property of item to be tested if it is selected */ dataForValue(value: Object): Object; /** * Gets the associated data of li element in the combo. * * @param $element jQuery element of item in the drop down list */ dataForElement($element: Object): Object; /** * Gets object/s containing data and list item in the combo by element/s. * * @param $element jQuery object with drop down list item element or elements */ itemsFromElement($element: Object): Object; /** * Gets object/s containing data and list item in the combo by value/s. * * @param value Value of item in the drop down list or array with values. */ itemsFromValue(value: Object): Object; /** * Gets object/s containing data and list item in the combo by index/es. * * @param index Index or array of indexes of items in the drop down list */ itemsFromIndex(index: number): Object; /** * Gets array with data and objects representing li elements in combo box. */ items(): any[]; /** * Gets array with objects representing the filtered li elements in combo box. */ filteredItems(): any[]; /** * Gets array with objects representing selected li elements in combo box. */ selectedItems(): any[]; /** * Triggers filtering. * * @param texts Filter by string, or array of strings. * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [filtering](ui.igcombo#events:filtering) and [filtered](ui.igcombo#events:filtered) events. */ filter(texts?: Object, event?: Object): Object; /** * Clears filtering. * * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [filtering](ui.igcombo#events:filtering) and [filtered](ui.igcombo#events:filtered) events. */ clearFiltering(event?: Object): Object; /** * Opens the drop-down. * * @param callback Specifies callback function to be executed when open animation is completed. * @param focusCombo Set to false to not focus combo"s text input after the drop down is opened. By default the combo's input is focused. * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [dropDownOpening](ui.igcombo#events:dropDownOpening) and [dropDownOpened](ui.igcombo#events:dropDownOpened) events. */ openDropDown(callback?: Function, focusCombo?: boolean, event?: Object): Object; /** * Closes the drop down. * * @param callback Specifies callback function to be executed when close animation is completed. * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [dropDownClosing](ui.igcombo#events:dropDownClosing) and [dropDownClosed](ui.igcombo#events:dropDownClosed) events. */ closeDropDown(callback?: Function, event?: Object): Object; /** * Clears the input text, resets highlighting, filtering and selection. * * @param options Object with set of options controlling the behavior of this api method. focusCombo (boolean): Set to true to focus combo after clearing the input. * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [selectionChanging](ui.igcombo#events:selectionChanging) and [selectionChanged](ui.igcombo#events:selectionChanged) events. */ clearInput(options?: Object, event?: Object): Object; /** * Verifies whether a specified value is selected. * * @param value Value matching the [valueKey](ui.igcombo#options:valueKey) property of item to be tested if it is selected */ isValueSelected(value: Object): boolean; /** * Verifies whether the li representing the data source's record at the specified index is selected. * * @param index Index of data source record */ isIndexSelected(index: Object): boolean; /** * Selects list item/items from the drop-down list by specified value or array of values. When called witout params will return the value of the selected item or if [multiSelection](ui.igcombo#options:multiSelection) is enabled array of selected values. * * @param value Value or array of values matching the valueKey property of item/items to be selected * @param options Object with set of options controlling the behavior of this api method. closeDropDown (boolean): Set to true to close the drop down list after the selection. focusCombo (boolean): Set to true to focus combo after the selection. additive (boolean): Set to true to select the item without losing other selection. Works only when multi selection is enabled. keepFiltering (boolean): Set to true to keep filtering after the selection. By default the filtering is cleared. keepInputText (boolean): Set to true to keep input text unchanged after the selection. By default input text is updated. keepHighlighting (boolean): Set to true to keep highlighting unchanged after the selection. By default highlighting is removed. keepNavItem (boolean): Set to true to keep current navigation item unchanged after the selection. By default the navigation item is changed to the new selected item. keepScrollPosition (boolean): Set to true to keep current scroll position. By default the scroll position will change so that the last selected item is visible. * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [selectionChanging](ui.igcombo#events:selectionChanging) and [selectionChanged](ui.igcombo#events:selectionChanged) events. */ value(value?: Object, options?: Object, event?: Object): Object; /** * Selects a list item from the drop-down list. * * @param $items jQuery object with item or items to be selected. * @param options Object with set of options controlling the behavior of this api method. closeDropDown (boolean): Set to true to close the drop down list after the selection. focusCombo (boolean): Set to true to focus combo after the selection. additive (boolean): Set to true to select the item without losing other selection. Works only when multi selection is enabled. keepFiltering (boolean): Set to true to keep filtering after the selection. By default the filtering is cleared. keepInputText (boolean): Set to true to keep input text unchanged after the selection. By default input text is updated. keepHighlighting (boolean): Set to true to keep highlighting unchanged after the selection. By default highlighting is removed. keepNavItem (boolean): Set to true to keep current navigation item unchanged after the selection. By default the navigation item is changed to the new selected item. keepScrollPosition (boolean): Set to true to keep current scroll position. By default the scroll position will change so that the last selected item is visible. * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [selectionChanging](ui.igcombo#events:selectionChanging) and [selectionChanged](ui.igcombo#events:selectionChanged) events. */ select($items: Object, options?: Object, event?: Object): Object; /** * Gets/Sets selected item/s from the drop-down list by specified index. * * @param index Index or array of indexes of items to be selected * @param options Object with set of options controlling the behavior of this api method. closeDropDown (boolean): Set to true to close the drop down list after the selection. focusCombo (boolean): Set to true to focus combo after the selection. additive (boolean): Set to true to select the item without losing other selection. Works only when multi selection is enabled. keepFiltering (boolean): Set to true to keep filtering after the selection. By default the filtering is cleared. keepInputText (boolean): Set to true to keep input text unchanged after the selection. By default input text is updated. keepHighlighting (boolean): Set to true to keep highlighting unchanged after the selection. By default highlighting is removed. keepNavItem (boolean): Set to true to keep current navigation item unchanged after the selection. By default the navigation item is changed to the new selected item. keepScrollPosition (boolean): Set to true to keep current scroll position. By default the scroll position will change so that the last selected item is visible. * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [selectionChanging](ui.igcombo#events:selectionChanging) and [selectionChanged](ui.igcombo#events:selectionChanged) events. */ index(index?: Object, options?: Object, event?: Object): Object; /** * Selects all items from the drop-down list. * * @param options Object with set of options controlling the behavior of this api method. closeDropDown (boolean): Set to true to close the drop down list after the selection. focusCombo (boolean): Set to true to focus combo after the selection. keepFiltering (boolean): Set to true to keep filtering after the selection. By default the filtering is cleared. keepInputText (boolean): Set to true to keep input text unchanged after the selection. By default input text is updated. keepHighlighting (boolean): Set to true to keep highlighting unchanged after the selection. By default highlighting is removed. keepNavItem (boolean): Set to true to keep current navigation item unchanged after the selection. By default the navigation item is changed to the new selected item. keepScrollPosition (boolean): Set to true to keep current scroll position. By default the scroll position will change so that the last selected item is visible. * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [selectionChanging](ui.igcombo#events:selectionChanging) and [selectionChanged](ui.igcombo#events:selectionChanged) events. */ selectAll(options?: Object, event?: Object): Object; /** * Deselects a list item from the drop down list by value. * * @param value Value or array of values matching the [valueKey](ui.igcombo#options:valueKey) property of item/items to be deselected * @param options Object with set of options controlling the behavior of this api method. focusCombo (boolean): Set to true to focus combo after the deselection. keepInputText (boolean): Set to true to keep input text unchanged after the deselection. By default input text is updated. * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [selectionChanging](ui.igcombo#events:selectionChanging) and [selectionChanged](ui.igcombo#events:selectionChanged) events. */ deselectByValue(value: Object, options?: Object, event?: Object): Object; /** * Deselects a list item from the drop down list. * * @param $items jQuery object with item or items to be deselected * @param options Object with set of options controlling the behavior of this api method. focusCombo (boolean): Set to true to focus combo after the deselection. keepInputText (boolean): Set to true to keep input text unchanged after the deselection. By default input text is updated. * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [selectionChanging](ui.igcombo#events:selectionChanging) and [selectionChanged](ui.igcombo#events:selectionChanged) events. */ deselect($items: Object, options?: Object, event?: Object): Object; /** * Deselects a list item from the drop down list by index. * * @param index Index or array of indexes of items to be selected * @param options Object with set of options controlling the behavior of this api method. focusCombo (boolean): Set to true to focus combo after the deselection. keepInputText (boolean): Set to true to keep input text unchanged after the deselection. By default input text is updated. * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [selectionChanging](ui.igcombo#events:selectionChanging) and [selectionChanged](ui.igcombo#events:selectionChanged) events. */ deselectByIndex(index: Object, options?: Object, event?: Object): Object; /** * Deselects all selected items from the drop down list. * * @param options Object with set of options controlling the behavior of this api method. focusCombo (boolean): Set to true to focus combo after the deselection. keepInputText (boolean): Set to true to keep input text unchanged after the deselection. By default input text is updated. * @param event Indicates the browser event which triggered this action (not API). Calling the method with this param set to "true" will trigger [selectionChanging](ui.igcombo#events:selectionChanging) and [selectionChanged](ui.igcombo#events:selectionChanged) events. */ deselectAll(options?: Object, event?: Object): Object; /** * Gets/Sets index of active item in list. * * @param index New active index for list. In order to clear active item, use -1. * @return number|object Returns index of active item in list or -1, if parameter is undefined. Otherwise, it returns reference to this igCombo. */ activeIndex(index?: number): number | Object; /** * Gets/Sets text in text input field. * * @param text New text value for combo's input field. * @return string|object If parameter is undefined, then current text in field is returned. Otherwise, it returns reference to this igCombo. */ text(text?: string): string | Object; /** * Gets/Sets scrollTop attribute of html element, which scrolls drop-down list of items. * * @param value New value for scroll top in list. Note: if list is closed and new value is provided, then openDropDown() is called automatically. * @return number|object If parameter is undefined, then scrollTop is returned. Otherwise, it returns reference to this igCombo. */ listScrollTop(value?: number): number | Object; /** * Gets jQuery objects representing all rendered list items in the combo drop down list. */ listItems(): Object; /** * Gets jQuery object of the outer element of the combo. */ comboWrapper(): Object; /** * Gets jQuery object of the drop down associated with this combo widget */ dropDown(): Object; /** * Gets jQuery object of the container that holds the list with items. */ list(): Object; /** * Gets jQuery object of the text input associated with this combo widget. */ textInput(): Object; /** * Gets jQuery object of the value input associated with this combo widget. */ valueInput(): Object; /** * Gets reference to [igValidator](ui.igvalidator) used by igCombo. * * @param destroy Request to destroy validator. */ validator(destroy?: boolean): Object; /** * Trigger validation. */ validate(): boolean; /** * Returns boolean representing whether the combo drop down list is opened. */ dropDownOpened(): boolean; /** * Repositions drop down under combo input. Has effect only when the drop down is attached to body. */ positionDropDown(): Object; /** * Destroys the igCombo widget. */ destroy(): Object; }