import { Attribute, CalculatedMeasureColumn, Column, Measure, MeasureColumn } from '@sisense/sdk-data'; import { StyledColumn, StyledMeasureColumn, AnyColumn, CategoryStyle, ValueStyle } from './types'; type AnyObject = Record; /** * Combines the properties of two objects, where: * - properties from "sourceToInherit" will be inherited by the result object. * - properties from "sourceToAbsorb" will be copied into the result object. * Properties from "sourceToAbsorb" will safely override properties with the same name from "sourceToInherit" without modifying the original object. * * @param sourceToInherit - The object whose properties will be inherited. * @param sourceToAbsorb - The object whose properties will be copied as own properties. * @returns - A new object that combines the properties of the two input objects. */ export declare const safeMerge: (sourceToInherit: T, sourceToAbsorb: S) => T & S; /** * Combines two objects into a single one with saving prototype inheritance of "sourceWithInheritance" argument * * @param sourceWithInheritance - The object that has own and inherited properties. * @param sourceToAbsorb - The object whose properties will be copied as own properties. * @returns - A new object that combines the properties of the two input objects. */ export declare const safeCombine: (sourceWithInheritance: T, sourceToAbsorb: AnyObject) => T; export declare const splitColumn: (targetColumn: C) => { column: Column | MeasureColumn | CalculatedMeasureColumn; style: CategoryStyle | ValueStyle; } | { column: C; style: CategoryStyle | ValueStyle; }; /** * Checks if the given argument is a measure column. * * @param arg * @internal */ export declare function isMeasureColumn(arg: AnyColumn): arg is MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn; /** * Returns the title of a column (data option). * * @param column - The column to get the title of. * @param name - The name of the column. * @returns The title of the column. */ export declare const getDataOptionTitle: (styledColumn: StyledColumn | StyledMeasureColumn) => string; export declare const getDataOptionGranularity: ({ column, granularity }: StyledColumn) => string; /** @internal */ export declare const translateColumnToAttribute: (c: Column | StyledColumn) => Attribute; export declare const translateColumnToMeasure: (c: MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn) => Measure; /** * Checks if column is a StyledColumns. * * @param category - The target column to check. * @internal */ export declare function isStyledColumn(targetColumn: AnyColumn): targetColumn is StyledColumn | StyledMeasureColumn; /** * Checks if an category is a StyledCategory. * * @param category - The category to check. * @internal */ export declare function isCategoryStyle(category: Column | CategoryStyle): category is CategoryStyle; export declare function normalizeColumn(targetColumn: Column | StyledColumn, defaultStyle?: CategoryStyle): StyledColumn; export declare function normalizeMeasureColumn(targetColumn: MeasureColumn | CalculatedMeasureColumn | StyledMeasureColumn, defaultStyle?: ValueStyle): StyledMeasureColumn; export declare function normalizeAnyColumn(targetColumn: AnyColumn, defaultStyle?: CategoryStyle | ValueStyle): StyledColumn | StyledMeasureColumn; export {}; //# sourceMappingURL=utils.d.ts.map