/** * 本文件中的内容用于UI编辑 * @author PAO */ import React from 'react'; import { Addon } from '../aop'; import { Dictionary } from '../base'; import { ConfigStore } from '../config'; import { SimpleStateMachine } from '../state'; import { ReactAddon } from './base'; export declare const PathSplit = "."; /***************************以下是通用对象***************************/ export declare type OnChangeHandler = (value: T) => void; export declare class ValueEditor extends ReactAddon { /** * 数据修改事件 */ onChange?: OnChangeHandler; } export interface EditingContextProps { isEditing: boolean; editingStateMachine?: SimpleStateMachine; focusedControl?: HTMLElement; } export declare const EditingContext: React.Context; /** * 就地编辑属性 * 本属性用于在编辑器之间传递数值 */ export interface InplaceProperty { /** * 属性值 */ value?: T; } /***************************以下是对象定义模板***************************/ export declare class ObjectDefTemplate extends Addon { name?: string; objectType?: string; title?: string; category?: string; extendProps?: Dictionary; } /** * 获取对象定义模板 * @param objectDef 对象定义 */ export declare function getAddonTemplatesByAddonType(addonType?: string): Dictionary; /** * 设置对象定义模板 * @param template 模板 */ export declare function addObjectTemplate(template: ObjectDefTemplate): void; /** * 设置对象定义模板 * @param template 模板 */ export declare function deleteAddonTemplate(objectType: string, name?: string): void; export declare const templateLoadStateMachine: SimpleStateMachine; /** * 读取对象模板 * @param configStore 读取对象模板 */ export declare function loadAddonTemplates(configStore: ConfigStore, templatePath?: string): Promise; /** * 保存对象模板 * @param configStore 读取对象模板 */ export declare function saveAddonTemplates(configStore: ConfigStore, templatePath?: string): Promise;