import type { Attribute, Dimension, Measure } from '@sisense/sdk-data'; import { PivotTableDataOptions } from '../../../../domains/visualizations/core/chart-data-options/types'; import type { Panel } from '../../../../domains/widgets/components/widget-by-id/types'; import { WidgetProps } from '../../../../domains/widgets/components/widget/types'; import type { JtdConfig, JtdTarget, JumpToDashboardConfig, JumpToDashboardConfigForPivot, PivotDimId } from './jtd-types.js'; /** * Transform legacy JtdConfig to new JumpToDashboardConfig format * * @param jtdConfig - The legacy JTD configuration * @returns Transformed Jump To Dashboard configuration * @internal */ export declare const transformJtdConfigToJumpToDashboardConfig: (jtdConfig: JtdConfig) => JumpToDashboardConfig; export declare const isPivotJumpToDashboardConfig: (config: JumpToDashboardConfig | JumpToDashboardConfigForPivot) => config is JumpToDashboardConfigForPivot; /** * Transform common part of public JumpToDashboardConfig to inner JtdConfig format * * @param jumpConfig - The new Jump To Dashboard configuration * @returns Transformed legacy JTD configuration * @internal */ export declare const transformJumpToDashboardConfigToJtdConfigCommon: (jumpConfig: JumpToDashboardConfig | JumpToDashboardConfigForPivot) => Omit; export declare const transformJumpToDashboardConfigToJtdConfigForPivot: (jumpConfig: JumpToDashboardConfigForPivot, dataOptions: PivotTableDataOptions) => JtdConfig; /** * Type guard to check if a config is a JumpToDashboardConfig * * @param config - The configuration to check * @returns True if the config is a JumpToDashboardConfig * @internal */ export declare const isJumpToDashboardConfig: (config: JtdConfig | JumpToDashboardConfig | JumpToDashboardConfigForPivot) => config is JumpToDashboardConfig | JumpToDashboardConfigForPivot; /** * Normalize configuration to JumpToDashboardConfig format * Accepts both legacy JtdConfig and new JumpToDashboardConfig * * @internal * @param config - Either JtdConfig or JumpToDashboardConfig * @returns Normalized JumpToDashboardConfig */ export declare const normalizeToJumpToDashboardConfig: (config: JtdConfig | JumpToDashboardConfig) => JumpToDashboardConfig; /** * Normalize configuration to legacy JtdConfig format * Accepts both legacy JtdConfig and new JumpToDashboardConfig * * @internal * @param config - Either JtdConfig or JumpToDashboardConfig * @returns Normalized JtdConfig */ export declare const normalizeToJtdConfig: (config: JtdConfig | JumpToDashboardConfig | JumpToDashboardConfigForPivot, widgetProps: WidgetProps) => JtdConfig; /** * Enhanced matching strategy that considers location, expression, level, and other properties * @param dimension - The dimension or measure object * @param panels - Constructed panels with PanelItems * @returns PivotDimId like "columns.0", "rows.1", "values.0" * @internal */ export declare const dimensionToPivotDimId: (dimension: Attribute | Measure | { dimension: Attribute; location: 'row' | 'column' | 'value'; }, panels: Panel[]) => PivotDimId | null; /** * Convert PivotDimId back to Dimension/Measure using widget structure * @param pivotDimId - PivotDimId like "columns.0", "rows.1", "values.0" * @param widgetStructure - Widget structure with rows/columns/values arrays * @returns The dimension or measure object, or null if not found * @internal */ export declare const pivotDimIdToDimension: (pivotDimId: PivotDimId, widgetStructure: { rows?: Array; columns?: Array; values?: Array; }) => Dimension | Measure | null; /** * Convert Map-based pivot targets to array-based pivot targets (for internal JtdConfig) * @param targetsMap - Map of dimensions/measures to targets * @param panels - Widget metadata panels (source of truth for dimension positions) * @returns Array of targets with pivotDimensions * @internal */ export declare const mapTargetsToArrayTargets: (targetsMap: Map, panels: Panel[]) => Array;