import * as React from "react"; import ReactDOM from "react-dom"; import { PerseusI18nContext } from "../../components/i18n-context"; import type { FocusPath, Widget, WidgetProps } from "../../types"; import type { PerseusTableWidgetOptions, PerseusTableUserInput } from "@khanacademy/perseus-core"; type EditorProps = { editableHeaders: boolean; Editor: any; onChange: (headers: PerseusTableWidgetOptions["headers"]) => void; }; type Props = WidgetProps & EditorProps; type DefaultProps = { apiOptions: Props["apiOptions"]; headers: Props["headers"]; editableHeaders: Props["editableHeaders"]; rows: Props["rows"]; columns: Props["columns"]; linterContext: Props["linterContext"]; }; declare class Table extends React.Component implements Widget { static contextType: React.Context; context: React.ContextType; headerRefs: Record; answerRefs: Record; static defaultProps: DefaultProps; _getRows(): number; _getColumns(): number; _getAnswersClone(): PerseusTableUserInput; onValueChange(row: number, column: number, eventOrValue: any): void; onHeaderChange(index: number, e: any): void; _handleFocus(inputPath: any): void; _handleBlur(inputPath: any): void; focus(): boolean; focusInputPath(path: FocusPath): void; blurInputPath(path: FocusPath): void; getDOMNodeForPath(path: FocusPath): ReturnType; getInputPaths(): string[][]; /** * @deprecated and likely very broken API * [LEMS-3185] do not trust serializedState */ getSerializedState(): { answers: PerseusTableUserInput; headers: string[]; rows: number; columns: number; trackInteraction: (extraData?: Empty | undefined) => void; widgetId: string; widgetIndex: number; alignment: string | null | undefined; static: boolean | null | undefined; problemNum: number | null | undefined; apiOptions: Readonly unknown; showAlignmentOptions?: boolean; readOnly?: boolean; editingDisabled?: boolean; answerableCallback?: (arg1: boolean) => unknown; getAnotherHint?: () => unknown; interactionCallback?: (widgetData: { [widgetId: string]: any; }) => void; imagePlaceholder?: React.ReactNode; widgetPlaceholder?: React.ReactNode; baseElements?: { Link: React.ComponentType; }; imagePreloader?: (dimensions: import("../../types").Dimensions) => React.ReactNode; trackInteraction?: (args: { type: string; id: string; correct?: boolean; } & Partial & Partial<{ visible: number; }>) => void; customKeypad?: boolean; nativeKeypadProxy?: (blur: () => void) => import("@khanacademy/math-input").KeypadAPI; isMobile?: boolean; isMobileApp?: boolean; setDrawingAreaAvailable?: (arg1: boolean) => unknown; hintProgressColor?: string; canScrollPage?: boolean; editorChangeDelay?: number; flags?: Record<"new-radio-widget" | "image-widget-upgrade-gif-controls" | "image-widget-upgrade-scale", boolean>; }> & { baseElements: NonNullable; canScrollPage: NonNullable; editorChangeDelay: NonNullable; isArticle: NonNullable; isMobile: NonNullable; isMobileApp: NonNullable; editingDisabled: NonNullable; onFocusChange: NonNullable; readOnly: NonNullable; setDrawingAreaAvailable: NonNullable; showAlignmentOptions: NonNullable; }>; keypadElement?: any; questionCompleted?: boolean; onFocus: (blurPath: FocusPath) => void; onBlur: (blurPath: FocusPath) => void; findWidgets: (criterion: import("../../types").FilterCriterion) => ReadonlyArray; reviewMode: boolean; showSolutions?: import("@khanacademy/perseus-core").ShowSolutions; handleUserInput: (newUserInput: PerseusTableUserInput, cb?: () => void, silent?: boolean) => void; linterContext: import("@khanacademy/perseus-linter").LinterContextProps; containerSizeClass: import("../../util/sizing-utils").SizeClass; Editor: any; onChange: (headers: PerseusTableWidgetOptions["headers"]) => void; }; render(): React.ReactNode; } declare function getStartUserInput(options: PerseusTableWidgetOptions): PerseusTableUserInput; /** * @deprecated - do not use in new code. */ declare function getUserInputFromSerializedState(serializedState: any): PerseusTableUserInput; declare const _default: { name: string; displayName: string; widget: typeof Table; hidden: true; isLintable: true; getStartUserInput: typeof getStartUserInput; getUserInputFromSerializedState: typeof getUserInputFromSerializedState; }; export default _default;