import { type CaseReducer, type PayloadAction } from "@reduxjs/toolkit"; import { type IDashboardFilterReference, type IDashboardLayout, type IDashboardLayoutContainerDirection, type IDashboardLayoutSectionHeader, type IDrillDownIntersectionIgnoredAttributes, type IDrillDownReference, type IDrillToLegacyDashboard, type IInsightWidget, type IInsightWidgetConfiguration, type IKpiComparisonDirection, type IKpiComparisonTypeComparison, type IKpiWidgetConfiguration, type InsightDrillDefinition, type ObjRef, type ScreenSize, type VisualizationProperties } from "@gooddata/sdk-model"; import { type IVisualizationSizeInfo } from "@gooddata/sdk-ui-ext"; import { type IdentityMapping } from "../../../../_staging/dashboard/dashboardLayout.js"; import { type ObjRefMap } from "../../../../_staging/metadata/objRefMap.js"; import { type ILayoutItemPath, type ILayoutSectionPath } from "../../../../types.js"; import { type ExtendedDashboardItem, type ExtendedDashboardLayoutSection, type ExtendedDashboardWidget, type IItemWithHeight, type IItemWithWidth, type StashedDashboardItemsId } from "../../../types/layoutTypes.js"; import { type IWidgetDescription, type IWidgetHeader } from "../../../types/widgetTypes.js"; import { type ITabsState } from "../tabsState.js"; type LayoutReducer = CaseReducer>; type AdaptedLayoutReducer

= CaseReducer>; /** * Payload for updating widget identities for a specific tab. */ type UpdateWidgetIdentitiesForTabPayload = { tabId: string; mapping: ObjRefMap; }; type AddSectionActionPayload = { section: ExtendedDashboardLayoutSection; index: ILayoutSectionPath; usedStashes: StashedDashboardItemsId[]; }; type RemoveSectionActionPayload = { index: ILayoutSectionPath; stashIdentifier?: StashedDashboardItemsId; }; type ChangeSectionActionPayload = { index: ILayoutSectionPath; header: IDashboardLayoutSectionHeader; }; type ToggleLayoutSectionHeadersPayload = { layoutPath: ILayoutItemPath | undefined; enableSectionHeaders: boolean; }; type ToggleLayoutDirectionPayload = { layoutPath: ILayoutItemPath | undefined; direction: IDashboardLayoutContainerDirection; }; type changeItemsHeightActionPayload = { sectionIndex: ILayoutSectionPath; itemIndexes: number[]; height: number; }; type updateHeightOfMultipleItemsActionPayload = { itemsWithSizes: IItemWithHeight[]; }; type updateWidthOfMultipleItemsActionPayload = { itemsWithSizes: IItemWithWidth[]; }; type changeItemWidthActionPayload = { layoutPath: ILayoutItemPath; width: number; }; type MoveSectionActionPayload = { sectionIndex: ILayoutSectionPath; toIndex: ILayoutSectionPath; }; type AddSectionItemsActionPayload = { layoutPath: ILayoutItemPath; items: ExtendedDashboardItem[]; usedStashes: StashedDashboardItemsId[]; }; type MoveSectionItemActionPayload = { itemIndex: ILayoutItemPath; toItemIndex: ILayoutItemPath; }; type RemoveSectionItemActionPayload = { itemIndex: ILayoutItemPath; stashIdentifier?: StashedDashboardItemsId; }; type ReplaceSectionItemActionPayload = { layoutPath: ILayoutItemPath; newItems: ExtendedDashboardItem[]; stashIdentifier?: StashedDashboardItemsId; usedStashes: StashedDashboardItemsId[]; }; type ReplaceWidgetHeader = { ref: ObjRef; header: IWidgetHeader; }; type ReplaceWidgetDescription = { ref: ObjRef; description: IWidgetDescription; }; type ReplaceWidgetDrillDefinitions = { ref: ObjRef; drillDefinitions: InsightDrillDefinition[]; }; type ReplaceWidgetBlacklistHierarchies = { ref: ObjRef; blacklistHierarchies: IDrillDownReference[]; }; type ReplaceWidgetBlacklistAttributes = { ref: ObjRef; blacklistAttributes: ObjRef[]; }; type ReplaceWidgetDrillDownIntersectionIgnoredAttributes = { ref: ObjRef; ignoredDrillDownIntersectionIgnoredAttributes: IDrillDownIntersectionIgnoredAttributes[]; }; type ReplaceWidgetVisProperties = { ref: ObjRef; properties: VisualizationProperties | undefined; }; type ReplaceWidgetVisConfiguration = { ref: ObjRef; config: IInsightWidgetConfiguration | undefined; }; type ReplaceWidgetInsight = { ref: ObjRef; insightRef: ObjRef; properties: VisualizationProperties | undefined; header: IWidgetHeader | undefined; newSize?: IVisualizationSizeInfo; }; type ReplaceWidgetFilterSettings = { ref: ObjRef; ignoreDashboardFilters?: IDashboardFilterReference[]; dateDataSet?: ObjRef; }; type RemoveIgnoredAttributeFilter = { displayFormRefs: ObjRef[]; }; type ReplaceWidgetDateDataset = { ref: ObjRef; dateDataSet?: ObjRef; }; type RemoveIgnoredDateFilter = { dateDataSets: ObjRef[]; }; type RemoveIgnoredMeasureValueFilter = { measureRefs: ObjRef[]; }; type ReplaceKpiWidgetMeasure = { ref: ObjRef; measureRef: ObjRef; }; type ReplaceKpiWidgetComparison = { ref: ObjRef; comparisonType: IKpiComparisonTypeComparison; comparisonDirection?: IKpiComparisonDirection; }; type ReplaceKpiWidgetDrill = { ref: ObjRef; drill: IDrillToLegacyDashboard | undefined; }; type ReplaceKpiWidgetConfiguration = { ref: ObjRef; config: IKpiWidgetConfiguration | undefined; }; type ReplaceRichTextWidgetContent = { ref: ObjRef; content: string; }; type ChangeWidgetIgnoreCrossFiltering = { ref: ObjRef; ignoreCrossFiltering?: boolean; }; type AddVisualizationSwitcherWidgetVisualization = { ref: ObjRef; visualization: IInsightWidget; newSize?: IVisualizationSizeInfo; }; type UpdateVisualizationSwitcherWidgetVisualizations = { ref: ObjRef; visualizations: IInsightWidget[]; }; type ResizeVisualizationSwitcherOnInsightChanged = { ref: ObjRef; newSize?: IVisualizationSizeInfo; }; type SetScreenActionPayload = { screen: ScreenSize; }; export declare const layoutReducers: { setLayout: LayoutReducer>; setScreen: LayoutReducer; updateWidgetIdentities: LayoutReducer>; updateWidgetIdentitiesForTab: LayoutReducer; removeIgnoredAttributeFilter: LayoutReducer; removeIgnoredDateFilter: LayoutReducer; removeIgnoredMeasureValueFilter: LayoutReducer; addSection: AdaptedLayoutReducer & AddSectionActionPayload>; removeSection: AdaptedLayoutReducer & RemoveSectionActionPayload>; moveSection: AdaptedLayoutReducer & MoveSectionActionPayload>; changeSectionHeader: AdaptedLayoutReducer & ChangeSectionActionPayload>; addSectionItems: AdaptedLayoutReducer & AddSectionItemsActionPayload>; moveSectionItem: AdaptedLayoutReducer & MoveSectionItemActionPayload>; removeSectionItem: AdaptedLayoutReducer & RemoveSectionItemActionPayload>; replaceSectionItem: AdaptedLayoutReducer & ReplaceSectionItemActionPayload>; replaceWidgetHeader: AdaptedLayoutReducer & ReplaceWidgetHeader>; replaceWidgetDescription: AdaptedLayoutReducer & ReplaceWidgetDescription>; replaceWidgetDrillWithoutUndo: LayoutReducer; replaceWidgetDrills: AdaptedLayoutReducer & ReplaceWidgetDrillDefinitions>; replaceWidgetBlacklistHierarchies: AdaptedLayoutReducer & ReplaceWidgetBlacklistHierarchies>; replaceWidgetBlacklistAttributes: AdaptedLayoutReducer & ReplaceWidgetBlacklistAttributes>; replaceWidgetDrillDownIntersectionIgnoredAttributes: AdaptedLayoutReducer & ReplaceWidgetDrillDownIntersectionIgnoredAttributes>; replaceInsightWidgetVisProperties: AdaptedLayoutReducer & ReplaceWidgetVisProperties>; replaceInsightWidgetVisConfiguration: AdaptedLayoutReducer & ReplaceWidgetVisConfiguration>; replaceInsightWidgetInsight: AdaptedLayoutReducer & ReplaceWidgetInsight>; replaceWidgetFilterSettings: AdaptedLayoutReducer & ReplaceWidgetFilterSettings>; replaceWidgetDateDataset: AdaptedLayoutReducer & ReplaceWidgetDateDataset>; replaceKpiWidgetMeasure: AdaptedLayoutReducer & ReplaceKpiWidgetMeasure>; replaceKpiWidgetComparison: AdaptedLayoutReducer & ReplaceKpiWidgetComparison>; replaceKpiWidgetDrillWithoutUndo: LayoutReducer; replaceKpiWidgetDrill: AdaptedLayoutReducer & ReplaceKpiWidgetDrill>; replaceKpiWidgetConfiguration: AdaptedLayoutReducer & ReplaceKpiWidgetConfiguration>; replaceRichTextWidgetContent: AdaptedLayoutReducer & ReplaceRichTextWidgetContent>; addVisualizationSwitcherWidgetVisualization: AdaptedLayoutReducer & AddVisualizationSwitcherWidgetVisualization>; updateVisualizationSwitcherWidgetVisualizations: AdaptedLayoutReducer & UpdateVisualizationSwitcherWidgetVisualizations>; undoLayout: >(state: import("immer").WritableDraft, action: { payload: { undoDownTo: number; }; type: string; }) => void | ITabsState | import("immer").WritableDraft; clearLayoutHistory: AdaptedLayoutReducer; changeItemsHeight: LayoutReducer; changeItemWidth: LayoutReducer; changeWidgetIgnoreCrossFiltering: AdaptedLayoutReducer & ChangeWidgetIgnoreCrossFiltering>; resizeVisualizationSwitcherOnInsightChanged: AdaptedLayoutReducer & ResizeVisualizationSwitcherOnInsightChanged>; toggleLayoutSectionHeaders: AdaptedLayoutReducer & ToggleLayoutSectionHeadersPayload>; toggleLayoutDirection: AdaptedLayoutReducer & ToggleLayoutDirectionPayload>; updateHeightOfMultipleItems: LayoutReducer; updateWidthOfMultipleItems: LayoutReducer; }; export {}; //# sourceMappingURL=layoutReducers.d.ts.map