import React, { CSSProperties } from "react"; import { Variable, VariableMap, Unit, Annotation, SetState, TriggerSelector } from "../../types"; interface DocumentProps { /** A unit object, as created in JobServerClass (or standardizeUnit) */ unit: Unit; /** An array of annotations */ annotations: Annotation[]; /** An array of variables */ variables?: Variable[]; /** An object with settings. Supports "editAll" (and probably more to come) */ settings?: { [key: string]: any; editAll?: boolean; }; /** If true, always show all annotations. This makes sense if the annotations property * is already the selection you need. But when coding multiple variables, it can be * better to set to false, so coders only see annotations of the variable they're working on */ showAll?: boolean; /** for getting acces to annotations from the parent component * If not given, Document is automatically in read only mode (i.e. cannot make annotations) */ onChangeAnnotations?: (unitId: string, value: Annotation[]) => void; /** returnVariableMap */ returnVariableMap?: SetState; /** * a callback for returning a selector function to edit annotations */ returnSelectors?: SetState>; /** A callback function that is called when the document is ready. This is mainly usefull for * managing layout while waiting for document to load */ onReady?: Function; /** a boolean value for blocking all event listeners */ blockEvents?: boolean; /** Names of fields to focus on, or Annotation objects to focus on */ focus?: string[]; /** Should the text be centered? */ centered?: boolean; /** CSSProperties for the body container */ bodyStyle?: CSSProperties; } declare const _default: React.MemoExoticComponent<({ unit, annotations, variables, settings, showAll, onChangeAnnotations, returnVariableMap, returnSelectors, onReady, blockEvents, focus, centered, bodyStyle, }: DocumentProps) => JSX.Element>; export default _default;