import React, { MutableRefObject, ReactNode } from "react"; import CustomBpmnJsModeler from "../bpmnio/bpmn/CustomBpmnJsModeler"; import { Event } from "../events"; export interface BpmnPropertiesPanelOptions { /** * This option disables the properties panel. * CAUTION: Element templates will not be imported either if this option is set! */ hidden?: boolean; /** * The initial, minimum, and maximum sizes of the properties panel. * Can be in % or px each. */ size?: { initial?: string; min?: string; max?: string; }; /** * The container to host the properties panel. By default, a styled div is created. If you * pass this option, make sure you set an ID and pass it via the `containerId` prop. * Pass `false` to prevent the rendering of this component. */ container?: ReactNode; /** * The ID of the container to host the properties panel. Only required if you want to * use your own container. */ containerId?: string; /** * The class name applied to the host of the properties panel. */ className?: string; /** * The element templates to import into the modeler. */ elementTemplates?: any[]; } export interface BpmnModelerOptions { /** * Will receive the reference to the modeler instance. */ refs?: MutableRefObject[]; /** * The initial, minimum, and maximum sizes of the modeler panel. * Can be in % or px each. */ size?: { initial?: string; min?: string; max?: string; }; /** * The container to host the modeler. By default, a styled div is created. If you pass * this option, make sure you set an ID and pass it via the `containerId` prop. * Pass `false` to prevent the rendering of this component. */ container?: ReactNode; /** * The ID of the container to host the modeler. Only required if you want to use your own * container. */ containerId?: string; /** * The class name applied to the host of the modeler. */ className?: string; } export interface BpmnEditorProps { /** * The class name applied to the root element. */ className?: string; /** * The xml to display in the editor. */ xml: string; /** * Whether this editor is currently active and visible to the user. */ active: boolean; /** * Called whenever an event occurs. */ onEvent: (event: Event) => void; /** * The options passed to the bpmn-js modeler. * * CAUTION: When this options object is changed, the old editor instance will be destroyed * and a new one will be created without automatic saving! */ bpmnJsOptions?: any; /** * The options to control the appearance of the properties panel. * * CAUTION: When this options object is changed, the old editor instance will be destroyed * and a new one will be created without automatic saving! */ propertiesPanelOptions?: BpmnPropertiesPanelOptions; /** * The options to control the appearance of the modeler. * * CAUTION: When this options object is changed, the old editor instance will be destroyed * and a new one will be created without automatic saving! */ modelerOptions?: BpmnModelerOptions; } declare const BpmnEditor: React.FC; export default BpmnEditor;