import React from "react"; import { LocalizeString } from "ez-localize"; import { Form } from "./form"; import { Response, ResponseEvent } from "./response"; import { Schema } from "@mwater/expressions"; import { FormContext, InnerFormContext } from "./formContext"; export interface ResponseDisplayComponentProps { form: Form; response: Response; /** Schema including the form */ schema: Schema; formCtx: FormContext; apiUrl?: string; /** Defaults to english */ locale?: string; /** Current login (contains user, username, groups) */ login?: { client: string; user: string; username: string; groups: string[]; }; /** True to display complete history always */ forceCompleteHistory?: boolean; /** Controls whether complete history is shown. Uncontrolled if not present */ showCompleteHistory?: boolean; /** Called when user shows or hides complete history */ onShowCompleteHistoryChange?: (show: boolean) => void; /** True to hide the show/hide history links (e.g. when printing) */ hideHistoryControls?: boolean; /** If present, allows editing of draft name */ onEditDraftName?: (draftName: string) => void; } interface ResponseDisplayComponentState { innerFormCtx: InnerFormContext; T: LocalizeString; eventsUsernames: { [key: string]: { username: string; }; } | null; loadingUsernames: boolean; showCompleteHistory: any; history?: Response[]; showArchive: boolean; showPrevAnswers: boolean; loadingHistory: boolean; } export default class ResponseDisplayComponent extends React.Component { constructor(props: ResponseDisplayComponentProps); componentDidMount(): void; componentDidUpdate(prevProps: ResponseDisplayComponentProps): void; loadHistory(props: ResponseDisplayComponentProps): Promise; loadEventUsernames(events: ResponseEvent[]): Promise; createLocalizer(design: any, locale: any): LocalizeString; isShowingCompleteHistory(): any; handleHideHistory: () => void; handleShowHistory: () => void; renderEvent(ev: any): import("react/jsx-runtime").JSX.Element | null; renderHistory(): import("react/jsx-runtime").JSX.Element; renderStatus(): import("react/jsx-runtime").JSX.Element; renderArchives(): import("react/jsx-runtime").JSX.Element | null; renderHeader(): import("react/jsx-runtime").JSX.Element; renderAdminRegionForLocation: (location: any) => import("react/jsx-runtime").JSX.Element | null; render(): import("react/jsx-runtime").JSX.Element; } export {};