import { CollectionView } from '../data/CollectionView'; import { EventHandler } from '../events/EventBus'; /** * Maps stored key values to display values for a column, so the grid can show a * friendly label (a country name) while the cell holds a raw value (a code). * Build it from a plain array of strings, an array of objects plus value/display * paths, or a {@link CollectionView}. */ export declare class DataMap { readonly collectionView: CollectionView; selectedValuePath: string; displayMemberPath: string; /** Allow values that are not on the map (free text). Default false. */ isEditable: boolean; /** Order the lookup list by display value. Default true. */ sortByDisplayValues: boolean; /** * Optional hook for dynamic data maps: given the row being edited, return the * subset of source items allowed for it. Lets one column's choices depend on * another (e.g. cities filtered by the row's country). */ itemsFilter?: (dataItem: unknown) => unknown[]; private events; constructor(itemsSource: unknown[] | CollectionView, selectedValuePath?: string, displayMemberPath?: string); on(type: 'mapChanged', handler: EventHandler): () => void; onMapChanged(): void; /** All keys, ordered by display value when sortByDisplayValues is on. */ getKeyValues(dataItem?: unknown): unknown[]; /** All display values, in the same order as getKeyValues. */ getDisplayValues(dataItem?: unknown): string[]; getDisplayValue(key: unknown): string; getKeyValue(displayValue: string): unknown; getDataItem(key: unknown): unknown; private get items(); private itemsFor; private keyOf; private displayOf; private ordered; }