graph-explorer
Version:
Graph Explorer can be used to explore and RDF graphs in SPARQL endpoints or on the web.
30 lines (25 loc) • 925 B
text/typescript
import { PropTypes } from "../viewUtils/react";
import { EditorController } from "../editor/editorController";
export type WorkspaceEventHandler = (key: WorkspaceEventKey) => void;
export enum WorkspaceEventKey {
searchUpdateCriteria = "search:updateCriteria",
searchQueryItem = "search:queryItems",
connectionsLoadLinks = "connections:loadLinks",
connectionsExpandLink = "connections:expandLink",
connectionsLoadElements = "connections:loadElements",
editorChangeSelection = "editor:changeSelection",
editorToggleDialog = "editor:toggleDialog",
editorAddElements = "editor:addElements",
}
export interface WorkspaceContextWrapper {
workspace: WorkspaceContext;
}
export interface WorkspaceContext {
editor: EditorController;
triggerWorkspaceEvent: WorkspaceEventHandler;
}
export const WorkspaceContextTypes: {
[K in keyof WorkspaceContextWrapper]: any;
} = {
workspace: PropTypes.anything,
};