import { ExamComponentSkin } from "../core/skins"; import { GraderSpecificationFor } from "../graders/QuestionGrader"; import { ResponseHandler, SubmissionType } from "./responses"; export type DroppableSpecification = readonly { id: string; content: string; }[]; export type FITBDropSpecification = { kind: "fitb_drop"; content: string; droppables: DroppableSpecification; starter?: FITBDropSubmission; sample_solution?: SubmissionType<"fitb_drop">; default_grader?: GraderSpecificationFor<"fitb_drop">; group_id?: string; }; export type DropSubmissionItem = { id: string; children?: (string | DropSubmission)[]; }; export type DropSubmission = DropSubmissionItem[]; export type FITBDropSubmission = (string | DropSubmission)[]; export declare function activateDropLocations(elem: JQuery): void; export declare function activateFITBDropBank(elem: JQuery, group_id: string): void; export declare function getFirstLevelFITBDropElements(responseElem: JQuery): HTMLElement[]; export declare const FITB_DROP_HANDLER: ResponseHandler<"fitb_drop">; /** * Precondition: submission (if provided) is a valid submission encoding for the given * FITB-Drop response. That is, the number of strings in the submission matches the * number of blanks and boxes in the content. */ export declare function createFilledFITBDrop(content: string, dropOriginals: DroppableSpecification, group_id: string, skin?: ExamComponentSkin, submission?: FITBDropSubmission, blankRenderer?: typeof DEFAULT_BLANK_RENDERER, boxRenderer?: typeof DEFAULT_BOX_RENDERER, dropLocationRenderer?: typeof DEFAULT_DROP_LOCATION_RENDERER, dropBankRenderer?: typeof DEFAULT_DROP_BANK_RENDERER, encoder?: (s: string) => string): string; declare function DEFAULT_BLANK_RENDERER(submission_placeholder: string, length: number): string; declare function DEFAULT_BOX_RENDERER(submission_placeholder: string, lines: number, width: number): string; declare function DEFAULT_DROP_LOCATION_RENDERER(submission_placeholder: string, group_id: string, lines: number, width: number): string; declare function DEFAULT_DROP_BANK_RENDERER(group_id: string): string; export declare function renderFITBDropBank(droppables: DroppableSpecification, group_id: string, skin?: ExamComponentSkin): string; export declare function mapSkinOverSubmission(submission: FITBDropSubmission, skin: ExamComponentSkin): FITBDropSubmission; export {};