import { DisplayObject } from "pixi.js"; import { DBase } from "./d-base"; import { DDialogLayered, DDialogLayeredEvents, DDialogLayeredOptions, DThemeDialogLayered } from "./d-dialog-layered"; import { DDialogSelectList, DDialogSelectListOptions } from "./d-dialog-select-list"; import { DInputSearch, DInputSearchOptions } from "./d-input-search"; import { DLayoutHorizontal } from "./d-layout-horizontal"; import { DLayoutSpace } from "./d-layout-space"; import { DListOptions } from "./d-list"; import { DListDataSelection } from "./d-list-data-selection"; import { DNote, DNoteOptions } from "./d-note"; import { DOnOptions } from "./d-on-options"; import { DDialogSelectSearch } from "./d-dialog-select-search"; import { DSelect, DSelectOptions } from "./d-select"; import { DDialogSelectSearchFunction } from "./d-dialog-select-search-function"; import { DButton, DButtonOptions } from "./d-button"; export interface DDialogSelectInputOpitons extends DInputSearchOptions { margin?: number; } /** * {@link DDialogSelect} controller. */ export interface DDialogSelectController { search: DDialogSelectSearch | DDialogSelectSearchFunction; } /** * {@link DDialogSelect} note options. */ export interface DDialogSelectNoteOptions { error?: DNoteOptions | null; noItemsFound?: DNoteOptions | null; searching?: DNoteOptions | null; } export type DDialogSelectItemToLabel = (result: VALUE, caller: any) => string; export type DDialogSelectItemIsEqual = (a: VALUE, b: VALUE, caller: any) => boolean; /** * {@link DDialogSelect} events. */ export interface DDialogSelectEvents extends DDialogLayeredEvents { select(value: VALUE, self: EMITTER): void; } /** * {@link DDialogSelect} category dismiss options. */ export interface DDialogSelectCategoryDismissOptions { enable?: boolean; label?: string; } export interface DDialogSelectCategory { id: CATEGORY_ID; label: string; } /** * {@link DDialogSelect} category options. */ export interface DDialogSelectCategoryOptions extends DSelectOptions { dismiss?: DDialogSelectCategoryDismissOptions; items?: DDialogSelectCategory[]; } /** * {@link DDialogSelect} "on" options. */ export interface DDialogSelectOnOptions extends Partial>, DOnOptions { } /** * {@link DDialogSelect} "dismiss" options. */ export interface DDialogSelectDismissableOptions extends DButtonOptions { enabled?: boolean; } /** * {@link DDialogSelect} options. */ export interface DDialogSelectOptions = DThemeDialogSelect, EMITTER = any> extends DDialogLayeredOptions { controller?: DDialogSelectController; category?: DDialogSelectCategoryOptions; dismiss?: DDialogSelectDismissableOptions; input?: DDialogSelectInputOpitons; list?: DListOptions; note?: DDialogSelectNoteOptions; on?: DDialogSelectOnOptions; } /** * {@link DDialogSelect} theme. */ export interface DThemeDialogSelect extends DThemeDialogLayered { getInputMargin(): number; isDismissable(): boolean; getDismissLabel(): string; isCategoryDismissable(): boolean; getCategoryDismissLabel(): string; } export declare class DDialogSelect = DThemeDialogSelect, OPTIONS extends DDialogSelectOptions = DDialogSelectOptions> extends DDialogLayered { protected _value: VALUE | null; protected _selectCategory?: DSelect; protected _isCategoryFetched?: boolean; protected _categories: DDialogSelectCategory[]; protected _input?: DInputSearch; protected _inputLayout?: DLayoutHorizontal; protected _list?: DDialogSelectList; protected _search?: DDialogSelectSearch; protected _noteError?: DNote | null; protected _noteNoItemsFound?: DNote | null; protected _noteSearching?: DNote | null; protected _buttonDismiss?: DButton | null; constructor(options?: OPTIONS); protected newContentChildren(theme: THEME, options?: OPTIONS): Array; protected get inputLayout(): DLayoutHorizontal; protected newInputLayout(): DLayoutHorizontal; protected newSpace(): DLayoutSpace; protected get selectCategory(): DSelect; protected newSelectCategory(): DSelect; protected toSelectCategoryOptions(theme: THEME, options?: OPTIONS): DSelectOptions; protected onSelectCategoryChange(categoryId: CATEGORY_ID): void; get input(): DInputSearch; protected newInput(): DInputSearch; protected toInputOptions(theme: THEME, options?: OPTIONS): DInputSearchOptions; protected toInputMargin(theme: THEME, options?: OPTIONS): number; protected onInputInput(value: string): void; get list(): DDialogSelectList; protected newList(): DDialogSelectList; protected onListSelectionChange(selection: DListDataSelection): void; protected toListOptions(theme: THEME, options?: OPTIONS): DDialogSelectListOptions; protected get noteError(): DNote | null; protected newNoteError(): DNote | null; protected get noteNoItemsFound(): DNote | null; protected newNoteNoItemsFound(): DNote | null; protected get noteSearching(): DNote | null; protected newNoteSearching(): DNote | null; protected toNoteOptions(parent: DBase, options?: DNoteOptions): DNoteOptions; protected get search(): DDialogSelectSearch; protected newSearch(): DDialogSelectSearch; protected get buttonDismiss(): DButton | null; protected newButtonDismiss(): DButton | null; protected toButtonDismissOptions(options?: OPTIONS): DDialogSelectDismissableOptions; get value(): VALUE | null; protected onSearched(results: VALUE[]): void; protected getResolvedValue(): VALUE | null | PromiseLike; protected getType(): string; protected onOpen(): void; get categories(): DDialogSelectCategory[]; set categories(categories: DDialogSelectCategory[]); protected onCategoriesChange(categories: DDialogSelectCategory[]): void; protected onOk(value: VALUE | null | PromiseLike): void; destroy(): void; }