@finos/legend-extension-dsl-diagram
Version:
Legend extension for Diagram DSL
88 lines • 4.51 kB
TypeScript
/**
* Copyright (c) 2020-present, Goldman Sachs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { type DiagramRenderer } from '../../components/DiagramRenderer.js';
import { PanelDisplayState } from '@finos/legend-art';
import { type PackageableElement, type AbstractProperty, type PropertyReference } from '@finos/legend-graph';
import { type EditorStore, ClassEditorState, ElementEditorState } from '@finos/legend-application-studio';
import type { ClassView } from '../../graph/metamodel/pure/packageableElements/diagram/DSL_Diagram_ClassView.js';
import type { Point } from '../../graph/metamodel/pure/packageableElements/diagram/geometry/DSL_Diagram_Point.js';
import { Diagram } from '../../graph/metamodel/pure/packageableElements/diagram/DSL_Diagram_Diagram.js';
import type { CommandRegistrar } from '@finos/legend-application';
export declare abstract class DiagramEditorSidePanelState {
readonly uuid: string;
editorStore: EditorStore;
diagramEditorState: DiagramEditorState;
constructor(editorStore: EditorStore, diagramEditorState: DiagramEditorState);
}
export declare enum DIAGRAM_EDITOR_SIDE_PANEL_TAB {
ELEMENT = "ELEMENT",
VIEW = "VIEW"
}
export declare class DiagramEditorClassViewEditorSidePanelState extends DiagramEditorSidePanelState {
classEditorState: ClassEditorState;
classView: ClassView;
selectedTab: DIAGRAM_EDITOR_SIDE_PANEL_TAB;
constructor(editorStore: EditorStore, diagramEditorState: DiagramEditorState, classView: ClassView);
setSelectedTab(val: DIAGRAM_EDITOR_SIDE_PANEL_TAB): void;
}
export declare class DiagramEditorInlineClassCreatorState {
diagramEditorState: DiagramEditorState;
point: Point;
constructor(diagramEditorState: DiagramEditorState, point: Point);
}
export declare class DiagramEditorInlineClassRenamerState {
diagramEditorState: DiagramEditorState;
classView: ClassView;
point: Point;
constructor(diagramEditorState: DiagramEditorState, classView: ClassView, point: Point);
}
export declare class DiagramEditorInlinePropertyEditorState {
diagramEditorState: DiagramEditorState;
property: PropertyReference;
point: Point;
isEditingPropertyView: boolean;
constructor(diagramEditorState: DiagramEditorState, property: AbstractProperty, point: Point, isEditingPropertyView: boolean);
}
export declare class DiagramEditorState extends ElementEditorState implements CommandRegistrar {
_renderer?: DiagramRenderer | undefined;
showHotkeyInfosModal: boolean;
sidePanelDisplayState: PanelDisplayState;
sidePanelState?: DiagramEditorSidePanelState | undefined;
inlinePropertyEditorState?: DiagramEditorInlinePropertyEditorState | undefined;
inlineClassCreatorState?: DiagramEditorInlineClassCreatorState | undefined;
inlineClassRenamerState?: DiagramEditorInlineClassRenamerState | undefined;
showContextMenu: boolean;
contextMenuClassView?: ClassView | undefined;
constructor(editorStore: EditorStore, element: PackageableElement);
get diagram(): Diagram;
get renderer(): DiagramRenderer;
get isDiagramRendererInitialized(): boolean;
get diagramCursorClass(): string;
setRenderer(val: DiagramRenderer): void;
setShowHotkeyInfosModal(val: boolean): void;
setSidePanelState(val: DiagramEditorSidePanelState | undefined): void;
setInlinePropertyEditorState(val: DiagramEditorInlinePropertyEditorState | undefined): void;
setInlineClassRenamerState(val: DiagramEditorInlineClassRenamerState | undefined): void;
setInlineClassCreatorState(val: DiagramEditorInlineClassCreatorState | undefined): void;
setShowContextMenu(val: boolean): void;
setContextMenuClassView(val: ClassView | undefined): void;
closeContextMenu(): void;
setupRenderer(): void;
registerCommands(): void;
deregisterCommands(): void;
reprocess(newElement: PackageableElement, editorStore: EditorStore): ElementEditorState;
}
//# sourceMappingURL=DiagramEditorState.d.ts.map