import { Config } from '../common/config'; import Undo from '../common/undo'; import StyleComponent from './style-component'; import Topic, { TopicData } from './topic'; import { StyleData } from './style'; import Theme, { ThemeData } from './theme'; import Relationship, { RelationshipData } from './relationship'; import Legend, { LegendData } from './legend'; export interface SheetSettingsData { "infoItems/infoItem": [{ "type": string; "mode": string; }]; "tab-color": [{ "rgb": string; }]; } export interface SheetData { id: string; title: string; rootTopic: TopicData; style?: StyleData; topicPositioning?: "free" | "fixed"; topicOverlapping?: "overlap" | "none"; theme?: ThemeData; relationships?: [RelationshipData, RelationshipData]; legend?: LegendData; settings?: SheetSettingsData; } export default class Sheet extends StyleComponent { componentType: string; private _legend; private _rootTopic; private _relationships; private _undoManager; private _theme; _config: Config; private _idMap; private _textTranslator; modelEvents: { topicAddMarker: string; topicChangeMarker: string; topicRemoveMarker: string; }; constructor(data: SheetData, options?: any); init(): void; _initLegend(): void; _initRootTopic(): void; _initRelationships(): void; getUndo(): Undo; ownerSheet(): this; getLegend(): Legend; getRootTopic(): Topic; replaceRootTopic(newRootTopicData: TopicData): void; getRelationships(): Array; addRelationship(relationshipData: RelationshipData, options?: any): void; removeRelationship(relationship: Relationship): void; getTheme(): Theme; _initTheme(themeData: any): void; changeTheme(themeData: ThemeData, options?: any): void; changeFreePosition(isFree: boolean): void; isFreePosition(): boolean; _changePositioning(nextStatus: "fixed" | "free"): void; /** * 如果以前在 free position 下编辑的,应该开启 topicPositioning */ _enableOldFreePosition(): void; changeOverlap(topicOverlapping: string): void; isTopicOverlapping(): boolean; createComponent(componentType: string, data: Object, options?: Object): import("./base-component").default; generateComponentId(): string; getTitle(): any; changeTitle(title: string): void; findComponentById(id: string): any; remove(): void; setTextTranslator(fn: Function): void; getTranslatedText(key: any): any; relationships(): Relationship[]; getLegendModel(): Legend; isFreePositionEnabled(): boolean; }