import { DataStorage } from '../utility/dataStorage'; import { EditorConfig, GlobalConfig } from '@blinkk/selective-edit'; import { EditorState } from './state'; import { LiveEditorApiComponent } from './api'; import { AppUi } from './ui/app'; import { LiveEditorLabels } from './template'; import { PreviewCommunicator } from './preview'; import { ProjectTypeComponent } from '../projectType/projectType'; /** * Global configuration used by the selective editor fields. * * Allows the fields to access the api. */ export interface LiveEditorGlobalConfig extends GlobalConfig { api: LiveEditorApiComponent; editor?: LiveEditor; labels: LiveEditorLabels; state: EditorState; } /** * Custom selective editor config. * * Customized to use the live editor global config interface. */ export interface LiveEditorSelectiveEditorConfig extends EditorConfig { global?: LiveEditorGlobalConfig; } /** * Configuration for the live editor. */ export interface LiveEditorConfig { /** * Api for working with the live editor project. */ api: LiveEditorApiComponent; /** * Custom UI labels for the editor UI. */ labels?: LiveEditorLabels; /** * Base configuration for the selective editor. */ selectiveConfig: LiveEditorSelectiveEditorConfig; /** * Editor state. */ state: EditorState; /** * Is the editor being used in a testing environment? * * For example: selenium or webdriver. */ isTest?: boolean; } export declare class LiveEditor { ui: AppUi; config: LiveEditorConfig; isPendingRender?: boolean; isRendering?: boolean; /** * Used to handle communiction between the editor and the preview iframe. */ preview: PreviewCommunicator; state: EditorState; storage: DataStorage; constructor(config: LiveEditorConfig, container: HTMLElement); get api(): LiveEditorApiComponent; render(): void; updateProjectType(projectType: ProjectTypeComponent): void; } /** * When using the selective configuration for different forms is uses a global * configuration, but the individual selective editors may try to change the * config since it is not immutable, so we need to deep copy the configuration * while preserving the references to objects. */ export declare function cloneSelectiveConfig(config: LiveEditorSelectiveEditorConfig): LiveEditorSelectiveEditorConfig;