UNPKG

@omnia/fx

Version:

Provide Omnia Fx typings and tooling for clientside Omnia development.

167 lines (166 loc) • 10.5 kB
import { Layout, LayoutEditorModes, LayoutItem, DisplayBreakPoint, LayoutItemActionState, SettingsPanelState, DisplayBreakPointSetting, DeleteItemFromLayoutPayLoad, AddItemToLayoutPayLoad, LayoutItemRegistration, LoadedLayout, ILayoutCanvasStore, LayoutCanvasModes, BlockRenderingModes, IBlockInstance, ILayoutSectionRenderer, GuidValue, Block, LayoutDrawerState, LayoutDrawerTabs, SectionSettings, SectionTypes, Section, LayoutInheritanceBehaviors, ThemeDefinition, ClipboardLayoutItem, BlockTemplate, ILayoutItemDelegator, IMessageBusSubscriptionHandler } from "../../../models"; import { EditorLayoutItemFactory } from "../factories"; import { LayoutEditorThemingManager, SectionOverride } from "../shared"; import { BlockSettingsProvider, LayoutDefinitionBuilder } from "../shared"; import { MessageBusExposeOnlySubscription } from "../../.."; import { ThemeStore } from "../../theming"; import { MultilingualStore, Store, StoreState } from "../../../stores"; import { ServiceContainerContext } from "../../../core"; import { MultilingualContext } from "../../MultilingualContext"; export interface IBlockInstanceExtends<TSettings = void> extends IBlockInstance<TSettings> { settings: TSettings; serviceContainerContext: ServiceContainerContext; } type BlockInstancesByManifestResult<TSettings = void> = { result: IBlockInstanceExtends<TSettings>[]; }; export declare class LayoutCanvasStore extends Store implements ILayoutCanvasStore { themeStore: ThemeStore; private serviceContainerContext; multilingualStore: MultilingualStore; multilingualContext: MultilingualContext; layout: StoreState<LoadedLayout>; previewUrl: StoreState<string>; provider: StoreState<string>; elementId: StoreState<string>; canvasMode: StoreState<LayoutCanvasModes>; editorMode: StoreState<LayoutEditorModes>; selectedLayoutItem: StoreState<LayoutItem>; selectedClipBoardItem: StoreState<ClipboardLayoutItem>; selectedDisplayBreakPoint: StoreState<DisplayBreakPoint>; activeLayoutItemAction: StoreState<LayoutItemActionState>; selectedLayoutItem4Action: StoreState<LayoutItem>; registrations: StoreState<LayoutItemRegistration[]>; definitions: StoreState<LayoutDefinitionBuilder>; blockInstances: StoreState<{ [id: string]: IBlockInstance<void>; }>; themeManager: LayoutEditorThemingManager; layoutItemFactory: EditorLayoutItemFactory; suggestedBlocks: StoreState<string[]>; layoutInheritanceBehaviors: StoreState<LayoutInheritanceBehaviors>; enableDisplayBreakpointSettings: StoreState<boolean>; sectionOverrides: StoreState<{ [layoutId: string]: SectionOverride; }>; sectionOverrideRefs: StoreState<{ [layoutItemId: string]: string; }>; blockThemeDefinition: StoreState<ThemeDefinition>; layoutThemeDefinition: StoreState<ThemeDefinition>; isDesignRender: StoreState<boolean>; authDisabled: StoreState<boolean>; private disabledAnchorLink; private onBlockInstanceCreatedHook; private onBlockRemovedHook; private onBlockCopiedHook; private onLayoutItemMovedHook; private onLayoutSectionRendererCreatedHook; private blockSettingsProvider; private onLayoutPastedHook; private layoutItemDelegatorSubHandler; private layoutItemDelegator; settingsPanel: StoreState<SettingsPanelState>; layoutDrawer: StoreState<LayoutDrawerState>; constructor(provider?: string); static getBlockInstancesByManifestId<TSettings = void>(manifestId: GuidValue): BlockInstancesByManifestResult<TSettings> & MessageBusExposeOnlySubscription<IBlockInstanceExtends<TSettings>[]>; onActivated(): void; onDisposing(): void; /** * Implementation of getters */ getters: { getSelectedLayoutItem: () => LayoutItem; extractSelectedLayoutItemForClipBoard: () => ClipboardLayoutItem; isEnableAnchorLink: () => boolean; getLayout: () => Layout; getSuggestedBlocks: () => string[]; getDefinitionBuilder: () => LayoutDefinitionBuilder; getLayoutBackgroundImageElementId: () => string; getLayoutItemDelegator: () => ILayoutItemDelegator; getSectionOverride: (id: string) => SectionOverride; getInheritedSectionOverride: (id: string) => SectionOverride; blockRenderMode: () => BlockRenderingModes; isLayoutItemLocked: (item: LayoutItem) => boolean; isTemplateEnabledLayout: () => boolean; isAdvancedModeActivated: () => boolean; getBlockSettingsProvider: () => BlockSettingsProvider; isSectionInlineManagementActivated: (section: Section) => boolean; isAuthDisabled: () => boolean; }; private realLayoutId; /** * Implementation of mutations */ mutations: { setLayout: (layout: Layout, delegator?: ILayoutItemDelegator) => void; createNewLayout: () => void; setTheme: (layoutThemeDefinition: ThemeDefinition, blockThemeDefinition: ThemeDefinition) => void; setCanvasMode: (mode: LayoutCanvasModes) => void; setSuggestedBlocks: (blocks: string[]) => void; setPreviewUrl: (url: string) => void; setEditorMode: (mode: LayoutEditorModes) => void; setActiveTab: (tab: LayoutDrawerTabs) => void; toggleSettingsPanel: (show: boolean) => void; removeSelectedLayoutItem: () => void; setLayoutBackgroundImageElementId: (elementId: string) => void; configureLayoutBehaviors: (layoutInheritanceBehaviors: LayoutInheritanceBehaviors) => void; enableDisplayBreakpointSettings: (enable: boolean) => void; disableAnchorLink: () => void; disableAuth: () => void; saveDelegatedLayouts: () => void; unlockBlock: import("../../../stores").StoreMutation<(layoutItem: LayoutItem) => void, (layoutItem: LayoutItem) => IMessageBusSubscriptionHandler>; lockBlock: import("../../../stores").StoreMutation<(layoutItem: LayoutItem) => void, (layoutItem: LayoutItem) => IMessageBusSubscriptionHandler>; setSelectedLayoutItem: import("../../../stores").StoreMutation<(item: LayoutItem, toggleSettings: boolean) => void, (item: LayoutItem, toggleSettings: boolean) => IMessageBusSubscriptionHandler>; toggleActionForLayoutItem: import("../../../stores").StoreMutation<(item: LayoutItem | ClipboardLayoutItem, action: LayoutItemActionState) => void, (item: ClipboardLayoutItem | LayoutItem, action: LayoutItemActionState) => IMessageBusSubscriptionHandler>; addDeviceBreakPointSetting: import("../../../stores").StoreMutation<(breakPointSetting: DisplayBreakPointSetting) => void, (breakPointSetting: DisplayBreakPointSetting) => IMessageBusSubscriptionHandler>; removeDeviceBreakPointSetting: import("../../../stores").StoreMutation<(propertyName: string, displayBreakPoint: DisplayBreakPoint) => void, (propertyName: string, displayBreakPoint: DisplayBreakPoint) => IMessageBusSubscriptionHandler>; moveItemInLayout: import("../../../stores").StoreMutation<(item2Move: LayoutItem, container: LayoutItem, siblingId?: string, postInsert?: boolean) => void, (item2Move: LayoutItem, container: LayoutItem, siblingId?: string, postInsert?: boolean) => IMessageBusSubscriptionHandler>; changeSectionType: import("../../../stores").StoreMutation<(section: Section, type: SectionTypes) => void, (section: Section<SectionSettings>, type: SectionTypes) => IMessageBusSubscriptionHandler>; copyItemInLayout: import("../../../stores").StoreMutation<(item2Copy: LayoutItem, container: LayoutItem, siblingId?: string, postInsert?: boolean) => void, (item2Copy: LayoutItem, container: LayoutItem, siblingId?: string, postInsert?: boolean) => IMessageBusSubscriptionHandler>; insertClipboardItemIntoLayout: import("../../../stores").StoreMutation<(clipboard: ClipboardLayoutItem, container: LayoutItem, siblingId?: string, postInsert?: boolean) => void, (clipboard: ClipboardLayoutItem, container: LayoutItem, siblingId?: string, postInsert?: boolean) => IMessageBusSubscriptionHandler>; insertBlockTemplateToLayout: import("../../../stores").StoreMutation<(blockTemplate: BlockTemplate, container: LayoutItem, siblingId?: string, postInsert?: boolean) => void, (blockTemplate: BlockTemplate, container: LayoutItem, siblingId?: string, postInsert?: boolean) => IMessageBusSubscriptionHandler>; addItem2Layout: import("../../../stores").StoreMutation<(itemreference: AddItemToLayoutPayLoad) => void, (itemreference: AddItemToLayoutPayLoad) => IMessageBusSubscriptionHandler>; deleteItemFromLayout: import("../../../stores").StoreMutation<(itemreference: DeleteItemFromLayoutPayLoad) => void, (itemreference: DeleteItemFromLayoutPayLoad) => IMessageBusSubscriptionHandler>; addSectionOverride: (section: Section) => SectionOverride; removeSectionOverride: (section: Section) => void; }; /** * Implementation of events */ events: { onBlockInstanceCreated: (cb: (blockInstance: IBlockInstance) => void) => void; onBlockRemoved: (cb: (block: Block) => void) => void; onBlockCopied: (cb: (originalBlock: Block, newBlock: Block) => void) => void; onLayoutItemMoved: (cb: (layoutItem: LayoutItem) => void) => void; onLayoutSectionRendererCreated: (cb: (layoutSectionRenderer: ILayoutSectionRenderer) => void) => void; onLayoutItemPasted: (cb: (layoutItem: ClipboardLayoutItem) => void) => void; }; onLayoutItemPasted(layoutItem: ClipboardLayoutItem): void; private onLayoutItemMoved; private onBlockRemoved; onBlockInstanceCreated(blockInstance: IBlockInstance): IBlockInstance<void>; onLayoutSectionRendererCreated(layoutSectionRenderer: ILayoutSectionRenderer): void; private createSectionOverride; private addSectionOverrideRef; private removeSectionOverrideRef; private ensureRemoveDeletedBlocks; private ensureRealLayoutId; private recursiveEnsureRealLayoutId; private ensureUniqueLayoutId; private recursiveEnsureOwnerLayoutId; private getOwnerLayoutItemsOverride; private recursiveEnsureProperties; private ensureTabDefaultSettings; private deleteItem; private addItem; private moveItem; private copyItem; private changeIdAndCopyData; private addItemAtCorrectSibling; private getLayoutItemFromParentLayout; private getBlocks; private renewOldBlockIdClipBoardItem; private renewOldBlockIdClipBoardLayout; } export {};