synapse-react-client
Version:
[](https://badge.fury.io/js/synapse-react-client) [](https://github.com/prettier/prettie
31 lines • 1.71 kB
TypeScript
export type EvaluationEditorPageProps = {
/** Use if UPDATING an existing Evaluation. Id of the evaluation to edit */
readonly evaluationId?: string;
/** Use if CREATING a new Evaluation. Id of the Entity that will be associated with the Evaluation */
readonly entityId?: string;
/** Callback after successful deletion of the Evaluation */
readonly onDeleteSuccess: () => void;
};
/**
* Combined editor that allows editing an Evaluation's data and also it's associated rounds (once the Evaluation exists on Synapse)
*/
export declare function EvaluationEditorPage({ evaluationId, entityId, onDeleteSuccess, }: EvaluationEditorPageProps): import("react/jsx-runtime").JSX.Element;
/**
* special case handling when the evaluation has not been created yet (i.e. does not exist)
* in this case, we show a fake "add round" button that when clicked, will
* display an alert telling the user to first create an Evaluation
*
* Note: an alternative would be to modify the existing EvaluationRoundEditorList
* to accept a nullable evaluationId (i.e. `string?` instead of `string`)
* so that we can move this fake Alert functionality into it.
*
* Since the "uncreated Evaluation" edge case is currently only specific to the EvaluationEditorPage,
* I believe adopting this alternative would add unnecessary complexity,
* forcing EvaluationRoundEditorList to handle undefined `evaluationId`.
*/
declare function FakeEvaluationRoundEditorList(): import("react/jsx-runtime").JSX.Element;
export declare const HelpersToTest: {
FakeEvaluationRoundEditorList: typeof FakeEvaluationRoundEditorList;
};
export default EvaluationEditorPage;
//# sourceMappingURL=EvaluationEditorPage.d.ts.map