/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { default as PropTypes } from 'prop-types'; import { VirtualScroll } from './VirtualScrollStatic.js'; import { Navigation } from './Navigation.js'; import { ListItemProps } from './ListItem.js'; import { InternalState, DropDownStateBase, Page, DropDownsPopupSettings, VirtualizationSettings } from './settings.js'; import * as React from 'react'; /** * @hidden */ export interface DropDownComponentProps { data?: any[]; opened?: boolean; value?: any; disabled?: boolean; tabIndex?: number; dir?: string; defaultItem?: any; filterable?: boolean; filter?: string | null; textField?: string; dataItemKey?: string; popupSettings?: DropDownsPopupSettings; style?: React.CSSProperties; virtual?: VirtualizationSettings; onOpen?: (event: any) => void; onClose?: (event: any) => void; onFocus?: (event: any) => void; onBlur?: (event: any) => void; onChange?: (event: any) => void; onFilterChange?: (event: any) => void; onPageChange?: (event: any) => void; itemRender?: (li: React.ReactElement, itemProps: ListItemProps) => React.ReactNode; listNoDataRender?: (element: React.ReactElement) => React.ReactNode; header?: React.ReactNode; footer?: React.ReactNode; id?: string; } /** * @hidden */ export interface DropDownComponent { props: DropDownComponentProps; setState: Function; forceUpdate: Function; state: DropDownStateBase; element: HTMLSpanElement | null; handleItemSelect: Function; value: any; } /** * @hidden */ export default class DropDownBase { static basicPropTypes: { opened: PropTypes.Requireable; disabled: PropTypes.Requireable; dir: PropTypes.Requireable; tabIndex: PropTypes.Requireable; accessKey: PropTypes.Requireable; data: PropTypes.Requireable; textField: PropTypes.Requireable; className: PropTypes.Requireable; label: PropTypes.Requireable; loading: PropTypes.Requireable; popupSettings: PropTypes.Requireable; closeDuration: PropTypes.Requireable; }> | null | undefined>>; popupClass: PropTypes.Requireable; className: PropTypes.Requireable; appendTo: PropTypes.Requireable; width: PropTypes.Requireable>; height: PropTypes.Requireable>; }>>; onOpen: PropTypes.Requireable<(...args: any[]) => any>; onClose: PropTypes.Requireable<(...args: any[]) => any>; onFocus: PropTypes.Requireable<(...args: any[]) => any>; onBlur: PropTypes.Requireable<(...args: any[]) => any>; onChange: PropTypes.Requireable<(...args: any[]) => any>; itemRender: PropTypes.Requireable<(...args: any[]) => any>; listNoDataRender: PropTypes.Requireable<(...args: any[]) => any>; focusedItemIndex: PropTypes.Requireable<(...args: any[]) => any>; header: PropTypes.Requireable; footer: PropTypes.Requireable; }; static propTypes: { value: PropTypes.Requireable; defaultValue: PropTypes.Requireable; filterable: PropTypes.Requireable; filter: PropTypes.Requireable; virtual: PropTypes.Requireable; skip: PropTypes.Validator; total: PropTypes.Validator; }>>; onFilterChange: PropTypes.Requireable<(...args: any[]) => any>; onPageChange: PropTypes.Requireable<(...args: any[]) => any>; opened: PropTypes.Requireable; disabled: PropTypes.Requireable; dir: PropTypes.Requireable; tabIndex: PropTypes.Requireable; accessKey: PropTypes.Requireable; data: PropTypes.Requireable; textField: PropTypes.Requireable; className: PropTypes.Requireable; label: PropTypes.Requireable; loading: PropTypes.Requireable; popupSettings: PropTypes.Requireable; closeDuration: PropTypes.Requireable; }> | null | undefined>>; popupClass: PropTypes.Requireable; className: PropTypes.Requireable; appendTo: PropTypes.Requireable; width: PropTypes.Requireable>; height: PropTypes.Requireable>; }>>; onOpen: PropTypes.Requireable<(...args: any[]) => any>; onClose: PropTypes.Requireable<(...args: any[]) => any>; onFocus: PropTypes.Requireable<(...args: any[]) => any>; onBlur: PropTypes.Requireable<(...args: any[]) => any>; onChange: PropTypes.Requireable<(...args: any[]) => any>; itemRender: PropTypes.Requireable<(...args: any[]) => any>; listNoDataRender: PropTypes.Requireable<(...args: any[]) => any>; focusedItemIndex: PropTypes.Requireable<(...args: any[]) => any>; header: PropTypes.Requireable; footer: PropTypes.Requireable; }; static defaultProps: { popupSettings: { height: string; }; required: boolean; validityStyles: boolean; }; popupWidth?: string; wrapper: HTMLSpanElement | null; list: HTMLUListElement | null; dirCalculated?: string; readonly vs: VirtualScroll; readonly navigation: Navigation; readonly listBoxId: string; readonly guid: string; readonly component: DropDownComponent; constructor(component: DropDownComponent); didUpdate(): void; didMount(): void; calculateDir(): void; calculatePopupWidth(): void; scrollToItem(itemIndex: number, vsEnabled?: boolean, once?: boolean): void; updateComponentArgs(args: any): void; handleItemClick: (index: number, event: React.MouseEvent | React.KeyboardEvent) => void; handleFocus: React.FocusEventHandler; filterChanged: (text: string | null, state: InternalState) => void; initState(): InternalState; applyState(state: InternalState): void; togglePopup: (state: InternalState) => void; pageChange: (page: Page, syntheticEvent: React.SyntheticEvent) => void; triggerOnPageChange(state: InternalState, skip: number, take: number): void; triggerPageChangeCornerItems(item: any, state: InternalState): void; scrollToVirtualItem: (virtual: VirtualizationSettings, selectedItemIndex: number) => void; /** * @hidden * Scrolls the data inside the popup of a selected DropDown by `one page`. The page size * depends on the height of the popup. * * @param {number} direction Defines the direction(Up/Down) in which the page will be moved * @param {number} filterHeight Defines the heigh of the filter element that appears in the DropDownList and DropDownTree. * This property is added for handling the filtering scenarios of the mentioned components. */ scrollPopupByPageSize: (direction: number) => void; renderScrollElement: () => false | React.JSX.Element; getPopupSettings(): DropDownsPopupSettings; getAdaptiveAnimation(): boolean; getGroupedDataModernMode(data: any[], groupField: string): any[]; resetGroupStickyHeader: (groupName: string, that: any) => void; }