UNPKG

@adaptabletools/adaptable

Version:

Powerful AG Grid extension which provides advanced, cutting-edge functionality to meet all DataGrid requirements

31 lines (30 loc) 1.76 kB
import { StyledColumn } from '../../AdaptableState/StyledColumnState'; import { IconStyle, IconStyleMapping } from '../../AdaptableState/StyledColumns/IconStyle'; import { AdaptableApi } from '../../Api/AdaptableApi'; import { AdaptableColumn } from '../../AdaptableState/Common/AdaptableColumn'; /** * Resolve the **effective** mapping list for an `IconStyle`: * * `[ ...presetMappings filtered by overrides, ...userMappings ]` * * Authoring contract: * - `Preset` alone is enough — the renderer pulls the shipped mappings. * - `Mappings` are *additions and overrides on top of the preset*. Any * user mapping whose `Key` matches a preset entry replaces the preset * entry; remaining preset entries pass through as-is. * - `Mappings` alone (no Preset) behaves exactly as before. * * Equality respects `IconStyle.MatchMode` so a user override with * `Key: 'gbp'` correctly shadows the preset's `'GBP'` when the column * is configured for case-insensitive matching. */ export declare const resolveEffectiveIconStyleMappings: (iconStyle: IconStyle | undefined) => IconStyleMapping[]; /** * Mapping list for wizard / settings summaries: custom mappings first so * user-authored entries are always visible, then any remaining preset * entries (after override filtering). */ export declare const resolveIconStyleMappingsForSummaryPreview: (iconStyle: IconStyle | undefined) => IconStyleMapping[]; export declare const getIconRendererForColumn: (styledColumn: StyledColumn, abColumn: AdaptableColumn, api: AdaptableApi) => any; /** Helper exposed for the tooltip getter in `AgGridColumnAdapter`. */ export declare const findIconStyleMappingForValue: (iconStyle: IconStyle | undefined, cellValue: any) => IconStyleMapping | undefined;