UNPKG

ag-grid-enterprise

Version:

Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue

125 lines (124 loc) 5.61 kB
import type { AgComponentSelectorType, AgEventTypeParams, AgGridCommon, AgPromise, BeanCollection, GridOptionsService, GridOptionsWithDefaults, ICellRendererComp, RichSelectParams, _VerticalDirection } from 'ag-grid-community'; import { AgPickerField } from 'ag-grid-community'; import type { RichSelectAsyncValuesSource } from '../richSelect/richSelectAsyncRequestsFeature'; import type { AgRichSelectListEvent } from './agRichSelectList'; import { AgRichSelectList } from './agRichSelectList'; type AgRichSelectEvent = AgRichSelectListEvent; export declare class AgRichSelect<TValue = any> extends AgPickerField<BeanCollection, GridOptionsWithDefaults, AgEventTypeParams, AgGridCommon<any, any>, GridOptionsService, AgComponentSelectorType, TValue[] | TValue | null, RichSelectParams<TValue>, AgRichSelectEvent, AgRichSelectList<TValue, AgRichSelectEvent>> { private userCompFactory; private ariaAnnounce?; private registry; private onSearchCallbackDebounced?; wireBeans(beans: BeanCollection): void; private searchStrings?; private searchString; private listComponent; private pillContainer; protected values: TValue[] | undefined; private loadMoreRowsCallback?; private loadMoreRowsThreshold; private asyncRequests?; private hasPagedAsyncSource; private searchStringCreator; private readonly eInput; private readonly eDeselect; private ariaToggleSelection; private ariaDeselectAllItems; private ariaDeleteSelection; private skipWrapperAnnouncement?; private tooltipFeature?; private shouldDisplayTooltip?; private readonly valueFormatter; constructor(config?: RichSelectParams<TValue>); postConstruct(): void; private setupAriaProperties; private createListComponent; private renderSelectedValue; protected createPickerComponent(): AgRichSelectList<TValue, AgRichSelectListEvent>; setSearchStringCreator(searchStringFn: (values: TValue[]) => string[]): void; setAsyncValuesSource(params: { source: RichSelectAsyncValuesSource<TValue>; thresholdRows?: number; useAsyncSearch?: boolean; onMisconfiguredSearchSource?: () => void; onFirstValuesPageLoaded?: () => void; }): void; resetAsyncValues(searchString?: string): void; setLoadMoreRowsCallback(callback?: (direction?: _VerticalDirection) => void, thresholdRows?: number): void; setIsLoading(): void; private setValueListInternal; setValueList(params: { valueList: TValue[] | Promise<TValue[] | undefined> | undefined; refresh?: boolean; isInitial?: boolean; scrollToCurrentValue?: boolean; prependedRowCount?: number; }): void; /** * This method updates the list of select options */ private setValues; showPicker(): void; private createOrUpdatePillContainer; private scrollTypingMultiSelectPillsToEndOnAdd; private doWhileBlockingAnnouncement; private readonly onPillHorizontalArrowKeyDown; private isPreviousHorizontalNavigation; private isRtl; private isTypingInputAtPillBoundary; private focusTypingInputAtBoundary; private getActiveElementForKeyboardNavigation; private onWrapperFocus; private onWrapperFocusOut; private onDeselectAllMouseDown; private onDeselectAllClick; private buildSearchStringFromKeyboardEvent; private searchTextFromCharacter; searchTextFromString(str: string | null | undefined): void; private getSearchStringsFromValues; private filterListModel; private runSearch; private highlightEmptyValue; private highlightListValue; private getSuggestionsAndFilteredValues; private clearSearchString; setValue(value: TValue[] | TValue | null, silent?: boolean, fromPicker?: boolean, skipRendering?: boolean): this; private onNavigationKeyDown; protected onEnterKeyDown(e: KeyboardEvent): void; private getCurrentSelectionWithAppendedItem; private areValuesEquivalent; private resetTypingMultiSelectSearchState; private updateTypingMultiSelectPlaceholder; private updateTypingMultiSelectInputSize; private getTypingInputElement; private openPickerOnTypingIfNeeded; private onDeleteKeyDown; private onBackspaceKeyDown; private onTabKeyDown; private getValueFromSet; private onListValueSelected; private dispatchPickerEventAndHidePicker; getFocusableElement(): HTMLElement; private handleHorizontalNavigationKey; private handlePageNavigationKey; private handleVerticalNavigationKey; private handleEscapeKey; private handleEnterKey; private handleSpaceKey; private handleBackspaceKey; private handleDeleteKey; private handleSearchWithoutTyping; protected onKeyDown(e: KeyboardEvent): void; private announceAriaValue; destroy(): void; } /** * cell renderers are used in a few places. they bind to dom slightly differently to other cell renders as they * can return back strings (instead of html element) in the getGui() method. common code placed here to handle that. * @param {AgPromise<ICellRendererComp>} cellRendererPromise * @param {HTMLElement} eTarget */ export declare function _bindCellRendererToHtmlElement(cellRendererPromise: AgPromise<ICellRendererComp>, eTarget: HTMLElement): void; type RichSelectValueFormatter<TValue> = (value: TValue | TValue[] | null | undefined) => string; export declare function resolveRichSelectValueFormatter<TValue>(valueFormatter?: RichSelectParams<TValue>['valueFormatter']): RichSelectValueFormatter<TValue>; export {};