UNPKG

@omnia/fx

Version:

Provide Omnia Fx typings and tooling for clientside Omnia development.

41 lines (40 loc) 1.52 kB
import { ImportLayoutResult, Block } from "../../../models"; import { Layout, LayoutItem } from "@omnia/fx-models"; import { LayoutCanvasStore } from ".."; /** * Manager to handle the layout */ export declare class LayoutManager { /** * Copies an layout and generates new ids * @param layoutItem to copy * @param ownerLayoutId is the new ownerLayoutId to set */ static copyLayout(layout: Layout, layoutId?: string): Layout; private static MigrateOldSettingsOnImport; private static RemoveLayoutBackgroundImage; private static MigrateBlockSettings; /** * Imports a layout and applies all the ids from the current page layout * @param pageLayoutDataString to import */ static importLayoutFromJsonString(layoutCanvasStore: LayoutCanvasStore, pageLayoutDataString: string): ImportLayoutResult; /** * Updates the ownerLayoutId for all layout items and its siblings * @param layoutItem to update * @param ownerLayoutId is the new ownerLayoutId to set */ private static updateOwnerLayoutId; /** * Updates the theming id to ensure a guid * @param layoutItem */ private static updateThemingId; private static ensureRemoveDeletedBlockSettings; static getBlocksInLayoutByType(layoutItem: LayoutItem, elementName: any): Array<Block>; /** * Get a block by name * @param blockName the name of the block */ static getBlockByName(container: LayoutItem, elementName: string): LayoutItem; }