import { WidgetsPanelColumn, WidgetsPanelColumnLayout, WidgetsPanelLayout, WidgetsPanelRow } from '../../../../domains/dashboarding/dashboard-model'; import { WidgetProps } from '../../../../domains/widgets/components/widget/types'; import { EditableLayoutDragData, EditableLayoutDropData } from './types.js'; /** * Updates the height of all cells in a specific row within a column layout. * * @param layout - The current layout to modify * @param height - The new height to set for the cells * @param columnIndex - The index of the column containing the row to update * @param rowIndex - The index of the row to update * * @returns A new layout with updated cell heights * * @internal */ export declare function updateRowHeight(layout: WidgetsPanelColumnLayout, height: number, columnIndex: number, rowIndex: number): { columns: WidgetsPanelColumn[]; }; /** * Updates the width percentages of columns or cells within a layout. * * @param layout - The current layout to modify * @param widths - Array of width percentages to apply * @param parentColumnIndex - Optional index of the parent column when updating cell widths * @param parentRowIndex - Optional index of the parent row when updating cell widths * * @returns A new layout with updated width percentages * * @internal */ export declare function updateLayoutWidths(layout: WidgetsPanelLayout, widths: number[], parentColumnIndex?: number, parentRowIndex?: number): WidgetsPanelColumnLayout; /** * Deletes a widget from a layout. * * @param layout - The current layout to modify * @param columnIndex - Index of the column containing the widget * @param rowIndex - Index of the row containing the widget * @param widgetId - ID of the widget to delete * * @returns A new layout with the widget removed * * @internal */ export declare function deleteWidgetFromLayout(layout: WidgetsPanelLayout, columnIndex: number, rowIndex: number, widgetId: string): { columns: WidgetsPanelColumn[]; }; /** * Deletes widgets from a layout. * * @param layout - The current layout to modify * @param widgetIds - IDs of the widgets to delete * * @returns A new layout with the widgets removed * * @internal */ export declare function deleteWidgetsFromLayout(layout: WidgetsPanelLayout, widgetIds: string[]): { columns: { rows: WidgetsPanelRow[]; widthPercentage: number; }[]; }; /** * Finds widgets that were deleted from a layout. * * @param previousLayout - The previous layout * @param newLayout - The new layout * * @returns An array of widget IDs that were deleted * * @internal */ export declare function findDeletedWidgetsFromLayout(previousLayout: WidgetsPanelLayout, newLayout: WidgetsPanelLayout): string[]; /** * Distributes equal width to all cells in a row. * * @param layout - The current layout to modify * @param columnIndex - Index of the column containing the row * @param rowIndex - Index of the row to distribute the width to * * @returns A new layout with the width distributed * * @internal */ export declare const distributeEqualWidthInRow: (layout: WidgetsPanelLayout, columnIndex: number, rowIndex: number) => { columns: WidgetsPanelColumn[]; }; /** * Updates the layout based on drag and drop operations. * * @param layout - The current layout to modify * @param dragData - Data about the dragged widget * @param dropData - Data about the drop target and operation type * * @returns A new layout reflecting the drag and drop operation * * @internal */ export declare function updateLayoutAfterDragAndDrop(layout: WidgetsPanelLayout, dragData: EditableLayoutDragData, dropData: EditableLayoutDropData): WidgetsPanelColumnLayout; /** * Updates the layout based on column change. * * @param layout - The current layout to modify * @param columnCount - The number of columns to update * * @returns A new layout with the columns updated * * @internal */ export declare function updateColumnsCountInLayout(layout: WidgetsPanelLayout, columnCount: number): WidgetsPanelColumnLayout; export declare function getRowHeight(row: WidgetsPanelRow, widgets: WidgetProps[]): number; export declare function getRowMaxHeight(row: WidgetsPanelRow): number; export declare function getRowMinHeight(row: WidgetsPanelRow): number; export declare function getColumnMinWidths(row: WidgetsPanelRow): number[]; export declare function getColumnMaxWidths(row: WidgetsPanelRow): number[];