import { Data, Model } from '@singularsystems/neo-core'; import ComponentBase from '../ComponentBase'; export type ItemSource = T[] | Promise | Data.IAsyncDataSource | Data.IArrayCacheEntry; export interface IOption { value: string | number; label: string; item?: T; itemParent?: any; options?: IOption[]; } export interface ICommonDropDownProps { /** * The group member to use as the display for grouped items. */ groupDisplayMember?: NoInfer; /** * Name of the property on the parent which contains a child list. */ childListMember?: NoInfer; } export declare abstract class DropDownBase extends ComponentBase { protected valueMember: keyof TChild; protected displayMember: keyof TChild; protected defaultItemValue: any; protected hasDefaultItem: boolean; /** Type of the value member, inferred from the first item with a defined value. */ protected valueType: "string" | "number" | "boolean" | undefined; protected findMembers(item: any): void; protected isLoading: boolean; protected dataSource: Data.IAsyncDataSource | null; protected cachedDataSource: Data.IDataCacheEntry | null; protected fieldInfoContainer: Model.IModelFieldInfoContainer | null; protected getItems(itemSource: ItemSource): T[]; /** Returns either a flat list, or grouped options based on the provided props. */ protected mapItemsToOptions(items: T[], filterPredicate: ((item: TChild, itemParent?: T) => boolean) | undefined, bindValue: any): IOption[]; protected mapGroupedItemsToOptions(groupedItems: T[], filterPredicate: ((item: TChild, itemParent?: T) => boolean) | undefined, bindValue: any): IOption[]; private mapChildItemsToOptions; /** * Finds an option in the items list by value. * Handles both flat lists and grouped (nested) items. * @param items The items array to search in * @param value The value to search for * @returns The matching IOption or undefined if not found */ protected findOptionByValue(items: IOption[] | undefined, value: string | number | boolean): IOption | undefined; protected abstract get commonProps(): ICommonDropDownProps; protected get isGrouped(): boolean; afterRender(isInitial: boolean): Promise; private fieldDisplayInfo; protected setFieldInfo(bindProperty: Model.IPropertyInstance, displayValue: string, readableName?: string): void; protected getFirstChildItem(items: T[], childListMember: keyof T): TChild | null; }