import React from 'react'; import { getSelectedNodes, getSelectedEdges } from '@/utils'; import { GraphState, EditorEvent } from '@/common/constants'; import { EditorContextProps, withEditorContext } from '@/components/EditorContext'; import { Node, Edge, GraphStateEvent } from '@/common/interfaces'; type DetailPanelType = 'node' | 'edge' | 'multi' | 'canvas'; export interface DetailPanelComponentProps { type: DetailPanelType; nodes: Node[]; edges: Edge[]; } class DetailPanel { static create = function
(type: DetailPanelType) { return function(WrappedComponent: React.ComponentType
) { type TypedPanelProps = EditorContextProps & Omit
;
type TypedPanelState = { graphState: GraphState };
class TypedPanel extends React.Component