import { RelationSpecification, Specification } from '../model-parsing/models/specification.models'; import { DataModel } from '../model/models/data-model.models'; import { TagModel } from '../model/models/tag.models'; import { ViewModel } from '../model/models/view-model.models'; import { Config } from './models/config.models'; import { ViewRequirements } from './models/view-requirements.models'; /** * Default colors for drilldown items when no specific coloring is available. * Used when drilldown coloring is enabled but no data exists for a specific drilldown item. */ export declare const DEFAULT_DRILLDOWN_COLORS: DrilldownColors; /** * Drilldown option containing the relation specification for drilldown navigation and additional legend coloring flag. * All properties are optional to allow flexible usage by end users. */ interface DrilldownOption { specification?: RelationSpecification; isLegendColoring?: boolean; } /** * Color information for drilldown items including text, background, and border colors. * * @property id - The legend item ID (-1 indicates "no data" / default colors) * @property color - Text color for the drilldown item * @property backgroundColor - Background color for the drilldown cell * @property borderColor - Border/circle color for the drilldown indicator */ interface DrilldownColors { id: number; color: string; backgroundColor: string; borderColor: string; } /** * Determines if the legend is ready for a drilldown operation. * This function checks various conditions to ensure that the base and target FactSheets * are compatible and have matching metadata for rendering the legend. * * All input parameters support partial/optional properties for flexibility. * Missing or invalid data returns false (safe default behavior). * * @param activeView - The currently active view specification, or null if none. * @param baseFactSheet - The type of the base FactSheet. * @param drilldownOption - The drilldown option containing the target specification. * @param dataModel - The data model containing FactSheet definitions. * @param viewModel - The view model containing FactSheet metadata. * @param tagModel - The tag model containing FactSheet tags data. * @returns True if the legend is ready for the drilldown, otherwise false. */ export declare function isLegendReadyDrilldown(activeView: Specification | null, baseFactSheet: string | undefined, drilldownOption: DrilldownOption | null, dataModel: DataModel | null, viewModel: ViewModel | null, tagModel: TagModel | undefined): boolean; /** * Computes colors for a drilldown item based on its view value. * This function applies the view configuration to determine the appropriate colors * for displaying the drilldown item in the report. * * Note: This function is not memoized. If memoization is needed, consumers should wrap this * function with their own memoization strategy (e.g., using memoize-one, useMemo, etc.). * * @param viewField - The view field name to compute colors for * @param viewValue - The view field value to compute colors for * @param config - Configuration object containing view settings * @param viewRequirements - View requirements including legend and aggregation settings * @returns DrilldownColors object with computed colors, or DEFAULT_DRILLDOWN_COLORS if computation fails */ export declare function computeDrilldownColors(viewField: string, viewValue: string | number | Record, config: Config, viewRequirements: ViewRequirements): DrilldownColors; /** * Determines if additional fields are needed for drilldown legend coloring. * Additional fields are required when legend coloring is enabled. * * @param view - The currently active view specification, or null if none * @param drilldown - The active drilldown option containing legend coloring settings, or null if none * @returns True if additional fields are needed for drilldown, otherwise false */ export declare function isAdditionalFieldsForDrilldownNeeded(view: Specification | null, drilldown: DrilldownOption | null): boolean; export {};