dmeditor
Version:
dmeditor is a block-style visual editor. Data is in json format.
17 lines (16 loc) • 1.58 kB
TypeScript
import { ContextPathType } from 'dmeditor/core/config';
import type { DMEData } from '../../types/dmeditor';
export declare const getBlockByID: (id: string, list: DMEData.BlockList) => DMEData.Block | null;
export declare const getChildList: (block: DMEData.Block) => Array<DMEData.Block>;
export declare const iterateBlockList: (blocklist: DMEData.BlockList, callback: (blockItem: DMEData.Block) => boolean | void) => boolean | void;
export declare const iterateBlockTree: (block: DMEData.Block, callback: (blockItem: DMEData.Block) => boolean | void) => boolean | void;
export declare const getChildByID: (id: string, block: DMEData.Block) => DMEData.Block | null;
export declare const loadData: (data: string | DMEData.BlockList) => DMEData.BlockList;
export declare const iteratePath: (pathArray: Array<number | string>, rootList: DMEData.BlockList, callback: (item: DMEData.Block, path: Array<number | string>) => void) => void;
export declare const getDataByPath: (data: DMEData.BlockList | DMEData.BlockMap, path: Array<number | string>) => DMEData.Block | null;
export declare const getListByPath: (data: DMEData.BlockList, path: Array<number | string>) => DMEData.BlockList | null;
export declare const getDependencyOptions: (widget: string, data: DMEData.BlockList) => DMEData.Block<DMEData.DefaultDataType, DMEData.DefaultBlockType[]>[] | null;
export declare const getContextInMixed: (blockPath: Array<string | number>, storage: Array<DMEData.Block>) => {
root: DMEData.Block<DMEData.DefaultDataType, DMEData.DefaultBlockType[]> | null;
path: ContextPathType;
};