import { CategoryOntology } from '../../Utils/CategoryUtils'; import { AttributeField, Question, RecordClass, TableField } from '../../Utils/WdkModel'; import { UserPreferences } from '../../Utils/WdkUser'; export declare const STANDARD_REPORTER_NAME = "standard"; /** * Typical attachment type vocabulary for reporter forms */ export declare let attachmentTypes: { value: string; display: string; }[]; export declare let tabularAttachmentTypes: { value: string; display: string; }[]; /** * Predicate to tell whether a given object should be shown in a reporter form */ export declare function isInReport(obj: { isInReport: boolean; }): boolean; /** * Retrieves attribute metadata objects from the passed record class that pass * the predicate and appends any reporter dynamic attribute metadata (that pass * the predicate) from the question. */ export declare function getAllAttributes(recordClass: RecordClass, question: Question, predicate: (attr: AttributeField) => boolean): AttributeField[]; /** * Retrieves table metadata objects from the passed record class that pass the * predicate. */ export declare function getAllTables(recordClass: RecordClass, predicate: (table: TableField) => boolean): TableField[]; /** * Initializes form attribute state based on: * 1. user preferences if they exist * 2. default columns for the question * Then must trim off any non-download-scope attributes */ export declare function getAttributeSelections(userPrefs: UserPreferences, question: Question, allReportScopedAttrs?: string[]): string[]; export declare function getAttributeTree(categoriesOntology: CategoryOntology, recordClassFullName: string, question: Question): import("../../Utils/CategoryUtils").CategoryTreeNode; export declare function getTableTree(categoriesOntology: CategoryOntology, recordClassFullName: string): import("../../Utils/TreeUtils").Node; export declare const getAllReportScopedAttributes: (categoriesOntology: CategoryOntology, recordClassFullName: string, question: Question) => string[]; /** * Special implementation of a regular form change handler that adds the * recordclass's primary key to any new value passed in */ export declare function getAttributesChangeHandler(inputName: string, onParentChange: (t: T) => void, previousState: T, recordClass: RecordClass): (newAttribsArray: string[]) => void; /** * Inspects the passed attributes array. If the recordClass's primary key * attribute is not already in the array, returns a copied array with the PK as * the first element. If not, simply returns the passed array. */ export declare function addPk(attributesArray: string[], recordClass: RecordClass): string[]; export declare function prependAttrib(attribName: string, attributesArray: string[]): string[]; //# sourceMappingURL=reporterUtils.d.ts.map