UNPKG

igniteui-angular-wrappers

Version:
336 lines (335 loc) 23.5 kB
import { ElementRef, IterableDiffers, KeyValueDiffers, ChangeDetectorRef, SimpleChanges, Renderer2, OnInit, OnChanges, DoCheck } from '@angular/core'; import { IgControlBase } from '../igcontrolbase/igcontrolbase'; import { ControlValueAccessor, NgModel } from '@angular/forms'; import * as i0 from "@angular/core"; export declare class IgComboComponent extends IgControlBase<IgCombo> implements ControlValueAccessor, OnInit, OnChanges, DoCheck { model: NgModel; set dataSource(value: any); private _dataSource; protected _model: any; private _changes; constructor(model: NgModel, el: ElementRef, renderer: Renderer2, differs: IterableDiffers, kvalDiffers: KeyValueDiffers, cdr: ChangeDetectorRef); ngOnInit(): void; writeValue(value: any): void; onChange: (_: any) => void; onTouched: () => void; registerOnChange(fn: () => any): void; registerOnTouched(fn: () => any): void; dataSourceApplyChanges(changes: any): void; updateComboItem(rec: any, val: any, key: any, index: any): void; ngOnChanges(changes: SimpleChanges): 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?: () => void, 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?: () => void, 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): any; /** * 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; static ɵfac: i0.ɵɵFactoryDeclaration<IgComboComponent, [{ optional: true; }, null, null, null, null, null]>; static ɵcmp: i0.ɵɵComponentDeclaration<IgComboComponent, "ig-combo", never, { "widgetId": { "alias": "widgetId"; "required": false; }; "options": { "alias": "options"; "required": false; }; "changeDetectionInterval": { "alias": "changeDetectionInterval"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "create": { "alias": "create"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "dropDownWidth": { "alias": "dropDownWidth"; "required": false; }; "dataSource": { "alias": "dataSource"; "required": false; }; "dataSourceType": { "alias": "dataSourceType"; "required": false; }; "dataSourceUrl": { "alias": "dataSourceUrl"; "required": false; }; "responseTotalRecCountKey": { "alias": "responseTotalRecCountKey"; "required": false; }; "responseDataKey": { "alias": "responseDataKey"; "required": false; }; "responseDataType": { "alias": "responseDataType"; "required": false; }; "responseContentType": { "alias": "responseContentType"; "required": false; }; "requestType": { "alias": "requestType"; "required": false; }; "valueKey": { "alias": "valueKey"; "required": false; }; "textKey": { "alias": "textKey"; "required": false; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; }; "headerTemplate": { "alias": "headerTemplate"; "required": false; }; "footerTemplate": { "alias": "footerTemplate"; "required": false; }; "inputName": { "alias": "inputName"; "required": false; }; "animationShowDuration": { "alias": "animationShowDuration"; "required": false; }; "animationHideDuration": { "alias": "animationHideDuration"; "required": false; }; "dropDownAttachedToBody": { "alias": "dropDownAttachedToBody"; "required": false; }; "filteringType": { "alias": "filteringType"; "required": false; }; "filterExprUrlKey": { "alias": "filterExprUrlKey"; "required": false; }; "filteringCondition": { "alias": "filteringCondition"; "required": false; }; "filteringLogic": { "alias": "filteringLogic"; "required": false; }; "noMatchFoundText": { "alias": "noMatchFoundText"; "required": false; }; "loadOnDemandSettings": { "alias": "loadOnDemandSettings"; "required": false; }; "visibleItemsCount": { "alias": "visibleItemsCount"; "required": false; }; "placeHolder": { "alias": "placeHolder"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "virtualization": { "alias": "virtualization"; "required": false; }; "multiSelection": { "alias": "multiSelection"; "required": false; }; "grouping": { "alias": "grouping"; "required": false; }; "validatorOptions": { "alias": "validatorOptions"; "required": false; }; "highlightMatchesMode": { "alias": "highlightMatchesMode"; "required": false; }; "caseSensitive": { "alias": "caseSensitive"; "required": false; }; "autoSelectFirstMatch": { "alias": "autoSelectFirstMatch"; "required": false; }; "autoComplete": { "alias": "autoComplete"; "required": false; }; "allowCustomValue": { "alias": "allowCustomValue"; "required": false; }; "closeDropDownOnBlur": { "alias": "closeDropDownOnBlur"; "required": false; }; "delayInputChangeProcessing": { "alias": "delayInputChangeProcessing"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "dropDownOnFocus": { "alias": "dropDownOnFocus"; "required": false; }; "closeDropDownOnSelect": { "alias": "closeDropDownOnSelect"; "required": false; }; "selectItemBySpaceKey": { "alias": "selectItemBySpaceKey"; "required": false; }; "initialSelectedItems": { "alias": "initialSelectedItems"; "required": false; }; "preventSubmitOnEnter": { "alias": "preventSubmitOnEnter"; "required": false; }; "format": { "alias": "format"; "required": false; }; "suppressKeyboard": { "alias": "suppressKeyboard"; "required": false; }; "enableClearButton": { "alias": "enableClearButton"; "required": false; }; "dropDownButtonTitle": { "alias": "dropDownButtonTitle"; "required": false; }; "clearButtonTitle": { "alias": "clearButtonTitle"; "required": false; }; "dropDownOrientation": { "alias": "dropDownOrientation"; "required": false; }; }, { "rendered": "rendered"; "dataBinding": "dataBinding"; "dataBound": "dataBound"; "filtering": "filtering"; "filtered": "filtered"; "itemsRendering": "itemsRendering"; "itemsRendered": "itemsRendered"; "dropDownOpening": "dropDownOpening"; "dropDownOpened": "dropDownOpened"; "dropDownClosing": "dropDownClosing"; "dropDownClosed": "dropDownClosed"; "selectionChanging": "selectionChanging"; "selectionChanged": "selectionChanged"; }, never, ["*"], false, never>; }