import React from 'react'; import { ClientConn, DataMap } from '@ticlo/core/editor'; import { DragState } from 'rc-dock'; import { BlockItem, FieldItem, Stage } from './Field'; import { LazyUpdateComponent } from '../component/LazyUpdateComponent'; export interface StageProps { conn: ClientConn; basePath: string; style?: React.CSSProperties; onSelect?: (paths: string[]) => void; } export declare abstract class BlockStageBase extends LazyUpdateComponent implements Stage { abstract getRefElement(): HTMLElement; abstract getRootElement(): HTMLElement; abstract onChildrenSizeChanged(): void; nextXYx: number; nextXYy: number; /** * 0 1 4 * 2 3 5 * 6 7 8 */ getNextXYW(): [number, number, number]; _blocks: Map; _blockLinks: Map>; _fields: Map; _fieldLinks: Map>; onSelect(): void; selectionChanged: boolean; selectBlock(path: string, ctrl?: boolean): void; _draggingBlocks?: [BlockItem, number, number, number][]; _dragingSelect?: [number, number]; isDraggingBlock(): boolean; startDragBlock(e: DragState): [BlockItem, number, number, number][]; onDragBlockMove(e: DragState): void; onDragBlockEnd(e: DragState): void; getBlock(path: string): BlockItem; linkParentBlock(parentPath: string, childBlock: BlockItem): void; unlinkParentBlock(parentPath: string, childBlock: BlockItem): void; linkField(sourcePath: string, targetField: FieldItem): void; unlinkField(sourcePath: string, targetField: FieldItem): void; registerField(path: string, item: FieldItem): void; unregisterField(path: string, item: FieldItem): void; watchListener: { onUpdate: (response: DataMap) => void; }; constructor(props: StageProps); UNSAFE_componentWillReceiveProps(nextProps: StageProps): void; createBlock: (name: string, blockData: { [key: string]: any; }) => Promise; deleteSelectedBlocks(): void; focus(): void; componentWillUnmount(): void; }