import { DataSource } from '@sisense/sdk-data'; import { WidgetProps } from '../../domains/widgets/components/widget/types'; import { ContextfulTransformer } from '../../shared/utils/utility-types/transformer'; import { DashboardConfig, WidgetsPanelColumnLayout } from './types.js'; export declare const getDividerStyle: (color: string, width: number) => string; /** * Resolves whether the dashboard header is visible from a dashboard config. * * The header is visible unless explicitly disabled. `header.visible` takes precedence; the * deprecated `toolbar.visible` is honored as a fallback for backward compatibility (and emits a * one-time deprecation warning when it is the value in effect). * * @param config - The dashboard config to resolve header visibility from. * @returns Whether the dashboard header should be rendered. */ export declare const isDashboardHeaderVisible: (config?: DashboardConfig) => boolean; /** * Gets the default layout for a set of widgets. * * Widgets are laid out in a single column vertically. * * @param widgets - The widgets to create a layout for. * @returns The default layout for the widgets. */ export declare const getDefaultWidgetsPanelLayout: (widgets: WidgetProps[]) => WidgetsPanelColumnLayout; /** * Contextful transformer that returns a copy of the layout with a new full-width row holding * `widgetId` appended to the end of the first column (a column is created if the layout has none). * * @param widgetId - The id of the widget to append. * @returns A transformer over a widgets-panel layout. */ export declare const withWidgetAppendedToPanelLayout: ContextfulTransformer; /** * Contextful transformer that resolves the data source for a widget being added to a dashboard. * * Keeps the widget's own `dataSource` when present; otherwise fills it from the first defined * fallback (e.g. the dashboard default, then the app default). Text widgets, which have no data * source, are returned unchanged. * * @param fallbackDataSources - Ordered fallback data sources; the first defined one is used. * @returns A transformer over a widget that resolves its `dataSource`. */ export declare const withResolvedWidgetDataSource: ContextfulTransformer>; /** * With optionally disabled auto height. * * @param widgetProps - The widget props to disable the auto height for. * @param shouldDisable - Whether to disable the auto height. * @returns The widget props with the auto height disabled if applicable. */ export declare const withOptionallyDisabledAutoHeight: (widgetProps: WidgetProps, shouldDisable: boolean) => WidgetProps; /** * Checks if all widgets have auto height and supports dynamic height. * * @param widgetProps - The widget props to check for auto height. * @returns True if all widgets have auto height, false otherwise. */ export declare const checkForAutoHeight: (widgetProps: WidgetProps[]) => boolean;