questionlayoutrefactoring 0.0.9 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -12,7 +12,6 @@ const CustomButton_1 = __importDefault(require("../../Atoms/CustomButton/CustomB
|
|
|
12
12
|
const ChatPresenter_1 = __importDefault(require("../../Organisms/ReviewComponent/ChatPresenter"));
|
|
13
13
|
const TextEditor_1 = __importDefault(require("../../Organisms/StudentEditor/components/TextEditor"));
|
|
14
14
|
const DescriptiveLabel_1 = __importDefault(require("../Descriptive/DescriptiveLabel"));
|
|
15
|
-
const revision_utils_1 = require("../../../utils/revision-utils");
|
|
16
15
|
const Assistant_1 = __importDefault(require("../Tutor/Assistant/Assistant"));
|
|
17
16
|
const presentationModes_1 = require("../../../utils/presentationModes");
|
|
18
17
|
const style = {
|
|
@@ -34,14 +33,98 @@ const style = {
|
|
|
34
33
|
cursor: isDisabled ? "not-allowed" : "pointer",
|
|
35
34
|
}),
|
|
36
35
|
};
|
|
36
|
+
// ============= UTILITY FUNCTIONS =============
|
|
37
|
+
const parsedUserAnswer = (userAnswer) => {
|
|
38
|
+
if (!userAnswer)
|
|
39
|
+
return null;
|
|
40
|
+
if (typeof userAnswer === "object") {
|
|
41
|
+
return userAnswer;
|
|
42
|
+
}
|
|
43
|
+
if (typeof userAnswer === "string") {
|
|
44
|
+
try {
|
|
45
|
+
return JSON.parse(userAnswer);
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
console.error("Failed to parse userAnswer:", error);
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return null;
|
|
53
|
+
};
|
|
54
|
+
const getRevisionPresentationConfig = (isRevision, parsedAnswer, showanswer, history, revisionMode) => {
|
|
55
|
+
if (!isRevision || !revisionMode)
|
|
56
|
+
return null;
|
|
57
|
+
const responseType = parsedAnswer?.response_type;
|
|
58
|
+
const hasHistory = history?.length > 0;
|
|
59
|
+
// Answered with history available
|
|
60
|
+
if (responseType === presentationModes_1.RevisionEvaluationStates.Answered) {
|
|
61
|
+
return revisionMode.Answered;
|
|
62
|
+
}
|
|
63
|
+
// User has viewed the answer - use Viewed config but make IsViewed toggleable
|
|
64
|
+
if (responseType === presentationModes_1.RevisionEvaluationStates.Viewed) {
|
|
65
|
+
return {
|
|
66
|
+
...revisionMode.Viewed,
|
|
67
|
+
IsViewed: showanswer,
|
|
68
|
+
UserAnswered: false,
|
|
69
|
+
ShowAnswerButton: true,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
// Default: not answered yet - CAN show editor
|
|
73
|
+
return {
|
|
74
|
+
...revisionMode.NotAnswered,
|
|
75
|
+
ShowAnswerButton: true,
|
|
76
|
+
IsViewed: showanswer,
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
const handleToggleAnswerLogic = async (showanswer, parsedAnswer, onToggleAnswer, qindex, isEditorDisabled, setShowAnswer) => {
|
|
80
|
+
if (isEditorDisabled) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const hasViewedResponse = parsedAnswer?.response_type === presentationModes_1.RevisionEvaluationStates.Viewed;
|
|
84
|
+
// If user already viewed, allow instant toggle
|
|
85
|
+
if (hasViewedResponse) {
|
|
86
|
+
setShowAnswer(!showanswer);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
// First time viewing - must call API to mark as viewed
|
|
90
|
+
try {
|
|
91
|
+
if (onToggleAnswer) {
|
|
92
|
+
const result = await onToggleAnswer(qindex);
|
|
93
|
+
if (result?.success) {
|
|
94
|
+
setShowAnswer(true);
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
console.error("❌ Failed to toggle answer - API call failed");
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
console.error("Error toggling answer:", error);
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
const shouldShowEditorInRevision = (isRevision, parsedAnswer) => {
|
|
107
|
+
if (!isRevision)
|
|
108
|
+
return false;
|
|
109
|
+
const responseType = parsedAnswer?.response_type;
|
|
110
|
+
return (responseType !== presentationModes_1.RevisionEvaluationStates.Answered &&
|
|
111
|
+
responseType !== presentationModes_1.RevisionEvaluationStates.Viewed);
|
|
112
|
+
};
|
|
113
|
+
const hasUserAnsweredInRevision = (presentationConfig) => {
|
|
114
|
+
return presentationConfig?.UserAnswered === true;
|
|
115
|
+
};
|
|
116
|
+
const isAnswerViewedInRevision = (presentationConfig) => {
|
|
117
|
+
return presentationConfig?.IsViewed === true;
|
|
118
|
+
};
|
|
119
|
+
// ============= SUB COMPONENTS =============
|
|
37
120
|
/**
|
|
38
121
|
* RevisionEditorSection - Handles editor display for unanswered questions
|
|
39
122
|
*/
|
|
40
|
-
const RevisionEditorSection = ({ showEditor, editorData, setEditorData, isEditorDisabled, isOCREnabled, addImageRender, qindex, questionObject, isMobile, isRevision, commonProps, onAnswerSubmit }) => {
|
|
123
|
+
const RevisionEditorSection = ({ showEditor, editorData, setEditorData, isEditorDisabled, isOCREnabled, addImageRender, qindex, questionObject, isMobile, isRevision, commonProps, onAnswerSubmit, }) => {
|
|
41
124
|
if (!showEditor)
|
|
42
125
|
return null;
|
|
43
126
|
return ((0, jsx_runtime_1.jsx)(react_1.Box, { position: "relative", opacity: isEditorDisabled ? 0.5 : 1, pointerEvents: isEditorDisabled ? "none" : "auto", mt: "20px", children: (0, jsx_runtime_1.jsx)(TextEditor_1.default, { data: editorData, handleChange: (data) => setEditorData(data), onSubmit: async (data, images) => {
|
|
44
|
-
if (
|
|
127
|
+
if (onAnswerSubmit) {
|
|
45
128
|
await onAnswerSubmit(data, images);
|
|
46
129
|
setEditorData("");
|
|
47
130
|
}
|
|
@@ -54,18 +137,18 @@ const RevisionEditorSection = ({ showEditor, editorData, setEditorData, isEditor
|
|
|
54
137
|
/**
|
|
55
138
|
* RevisionAnsweredSection - Shows chat presenter for answered questions
|
|
56
139
|
*/
|
|
57
|
-
const RevisionAnsweredSection = ({ presentationConfig, currentQuestion, history, isStudent, isEditorDisabled, isRevision, isRevisionBasedQuestion, }) => {
|
|
58
|
-
if (!
|
|
140
|
+
const RevisionAnsweredSection = ({ presentationConfig, currentQuestion, history, commonProps, isStudent, isEditorDisabled, isRevision, isRevisionBasedQuestion, }) => {
|
|
141
|
+
if (!hasUserAnsweredInRevision(presentationConfig))
|
|
59
142
|
return null;
|
|
60
143
|
return ((0, jsx_runtime_1.jsx)(react_1.Box, { mt: "20px", children: (0, jsx_runtime_1.jsx)(ChatPresenter_1.default, { showCoversation: true, isDescriptiveAnswer: true, question: currentQuestion, commonProps: commonProps, isStudent: isStudent, assistantInfo: history, tutor_mode: !isEditorDisabled, isRevision: isRevision, isRevisionBasedQuestion: isRevisionBasedQuestion }) }));
|
|
61
144
|
};
|
|
62
145
|
/**
|
|
63
146
|
* RevisionViewedSection - Shows sample answer for viewed questions
|
|
64
147
|
*/
|
|
65
|
-
const RevisionViewedSection = ({ presentationConfig, currentQuestion, commonProps, isStudent, isEditorDisabled, isRevision, }) => {
|
|
66
|
-
if (!
|
|
148
|
+
const RevisionViewedSection = ({ presentationConfig, currentQuestion, commonProps, history, isStudent, isEditorDisabled, isRevision, }) => {
|
|
149
|
+
if (!isAnswerViewedInRevision(presentationConfig))
|
|
67
150
|
return null;
|
|
68
|
-
return ((0, jsx_runtime_1.jsx)(react_1.Box, { mt: "20px", children: (0, jsx_runtime_1.jsx)(ChatPresenter_1.default, { showCoversation: true, isDescriptiveAnswer: true, question: currentQuestion, commonProps: commonProps, isStudent: isStudent, assistantInfo: history, tutor_mode: !isEditorDisabled, isRevision: isRevision,
|
|
151
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Box, { mt: "20px", children: (0, jsx_runtime_1.jsx)(ChatPresenter_1.default, { showCoversation: true, isDescriptiveAnswer: true, question: currentQuestion, commonProps: commonProps, isStudent: isStudent, assistantInfo: history, tutor_mode: !isEditorDisabled, isRevision: isRevision, isViewed: true }) }));
|
|
69
152
|
};
|
|
70
153
|
/**
|
|
71
154
|
* RevisionAnswerToggleButton - Show/Hide answer button
|
|
@@ -73,15 +156,16 @@ const RevisionViewedSection = ({ presentationConfig, currentQuestion, commonProp
|
|
|
73
156
|
const RevisionAnswerToggleButton = ({ presentationConfig, currentQuestion, isRevision, showanswer, isEditorDisabled, handleToggleAnswer, }) => {
|
|
74
157
|
if (!presentationConfig?.ShowAnswerButton)
|
|
75
158
|
return null;
|
|
76
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.Flex, { align: "center", justify: "space-between", w: "100%", mt: "25px", gap: "12px", children: [(0, jsx_runtime_1.jsx)(DescriptiveLabel_1.default, { questionType: currentQuestion?.question_type, isRevision: isRevision }), (0, jsx_runtime_1.jsx)(react_1.Box, { flex: "1", borderBottom: "1px dashed gray" }), (0, jsx_runtime_1.jsx)(CustomButton_1.default, { label: (0, jsx_runtime_1.jsxs)(react_1.Flex, { alignItems: "center", gap: "8px", children: [showanswer ? "Hide Answer" : "Show Answer", showanswer ? (
|
|
159
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Flex, { align: "center", justify: "space-between", w: "100%", mt: "25px", gap: "12px", children: [(0, jsx_runtime_1.jsx)(DescriptiveLabel_1.default, { questionType: currentQuestion?.question_type, isRevision: isRevision }), (0, jsx_runtime_1.jsx)(react_1.Box, { flex: "1", borderBottom: "1px dashed gray" }), (0, jsx_runtime_1.jsx)(CustomButton_1.default, { label: (0, jsx_runtime_1.jsxs)(react_1.Flex, { alignItems: "center", gap: "8px", children: [showanswer ? "Hide Answer" : "Show Answer", showanswer ? (0, jsx_runtime_1.jsx)(icons_1.ChevronUpIcon, {}) : (0, jsx_runtime_1.jsx)(icons_1.ChevronDownIcon, {})] }), customStyles: style?.showAnswerBtn(isEditorDisabled), handleClick: handleToggleAnswer })] }));
|
|
77
160
|
};
|
|
161
|
+
// ============= MAIN COMPONENT =============
|
|
78
162
|
/**
|
|
79
163
|
* RevisionView component - Main revision mode UI orchestrator
|
|
80
164
|
*/
|
|
81
165
|
const RevisionView = (props = {}) => {
|
|
82
|
-
const { isRevision, isRevisionBasedQuestion, onToggleAnswer, qindex, tutorMode, isOCREnabled, addImageRender, isMobile, questionObject, isStudent, commonProps, userAnswer, history, onAnswerSubmit, tutor_mode } = props;
|
|
166
|
+
const { isRevision, isRevisionBasedQuestion, onToggleAnswer, qindex, tutorMode, isOCREnabled, addImageRender, isMobile, questionObject, isStudent, commonProps, userAnswer, history, onAnswerSubmit, tutor_mode, } = props;
|
|
83
167
|
const [editorData, setEditorData] = (0, react_2.useState)("");
|
|
84
|
-
const parsedAnswer =
|
|
168
|
+
const parsedAnswer = parsedUserAnswer(userAnswer);
|
|
85
169
|
const [currentQuestion, setCurrentQuestion] = (0, react_2.useState)({});
|
|
86
170
|
const [showanswer, setShowAnswer] = (0, react_2.useState)(() => {
|
|
87
171
|
return parsedAnswer?.response_type === presentationModes_1.RevisionEvaluationStates.Viewed;
|
|
@@ -94,32 +178,26 @@ const RevisionView = (props = {}) => {
|
|
|
94
178
|
tutor_mode: tutor_mode,
|
|
95
179
|
});
|
|
96
180
|
}, [questionObject, history]);
|
|
97
|
-
// const isEditorDisabled = isRevision &&tutorMode===false &&tutor_mode === false;
|
|
98
181
|
const isEditorDisabled = false;
|
|
182
|
+
// Get revision mode
|
|
183
|
+
const revisionMode = (0, react_2.useMemo)(() => {
|
|
184
|
+
if (isRevision) {
|
|
185
|
+
return (0, presentationModes_1.getPresentationModeBasedOnTask)(presentationModes_1.presentationModes.Revision);
|
|
186
|
+
}
|
|
187
|
+
}, [isRevision]);
|
|
99
188
|
// Get presentation configuration based on revision state
|
|
100
189
|
const presentationConfig = (0, react_2.useMemo)(() => {
|
|
101
|
-
return
|
|
102
|
-
}, [isRevision, parsedAnswer, showanswer, history]);
|
|
190
|
+
return getRevisionPresentationConfig(isRevision, parsedAnswer, showanswer, history, revisionMode);
|
|
191
|
+
}, [isRevision, parsedAnswer, showanswer, history, revisionMode]);
|
|
103
192
|
// Handle answer toggle with proper logic
|
|
104
193
|
const handleToggleAnswer = (0, react_2.useCallback)(async () => {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
await (0, revision_utils_1.handleToggleAnswerLogic)(showanswer, parsedAnswer, qindex, onToggleAnswer, setShowAnswer);
|
|
108
|
-
}, [
|
|
109
|
-
showanswer,
|
|
110
|
-
parsedAnswer,
|
|
111
|
-
qindex,
|
|
112
|
-
onToggleAnswer,
|
|
113
|
-
setShowAnswer,
|
|
114
|
-
isEditorDisabled,
|
|
115
|
-
]);
|
|
194
|
+
await handleToggleAnswerLogic(showanswer, parsedAnswer, onToggleAnswer, qindex, isEditorDisabled, setShowAnswer);
|
|
195
|
+
}, [showanswer, parsedAnswer, qindex, onToggleAnswer, isEditorDisabled]);
|
|
116
196
|
// Show editor only when appropriate
|
|
117
|
-
const showEditor =
|
|
197
|
+
const showEditor = shouldShowEditorInRevision(isRevision, parsedAnswer);
|
|
118
198
|
if (!isRevision)
|
|
119
199
|
return null;
|
|
120
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.Box, { children: [(0, jsx_runtime_1.jsx)(Assistant_1.default, {
|
|
121
|
-
? currentQuestion?.question_layout
|
|
122
|
-
: "", isRevision: isRevision, qindex: qindex, isRevisionBasedQuestion: isRevisionBasedQuestion }), (0, jsx_runtime_1.jsx)(RevisionEditorSection, { showEditor: showEditor, editorData: editorData, setEditorData: setEditorData, isEditorDisabled: isEditorDisabled, isOCREnabled: isOCREnabled, addImageRender: addImageRender, qindex: qindex, questionObject: questionObject, isMobile: isMobile, commonProps: commonProps, onAnswerSubmit: onAnswerSubmit }), (0, jsx_runtime_1.jsx)(RevisionAnsweredSection, { presentationConfig: presentationConfig, currentQuestion: currentQuestion, history: history, commonProps: commonProps, isStudent: isStudent, isEditorDisabled: isEditorDisabled, isRevision: isRevision, isRevisionBasedQuestion: isRevisionBasedQuestion }), (0, jsx_runtime_1.jsx)(RevisionViewedSection, { presentationConfig: presentationConfig, currentQuestion: currentQuestion, commonProps: commonProps, isStudent: isStudent, isEditorDisabled: isEditorDisabled, isRevision: isRevision }), (0, jsx_runtime_1.jsx)(RevisionAnswerToggleButton, { presentationConfig: presentationConfig, currentQuestion: currentQuestion, isRevision: isRevision, showanswer: showanswer, isEditorDisabled: isEditorDisabled, handleToggleAnswer: handleToggleAnswer })] }));
|
|
200
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Box, { children: [(0, jsx_runtime_1.jsx)(Assistant_1.default, { text: currentQuestion?.question_layout ? currentQuestion?.question_layout : "", isRevision: isRevision, qindex: qindex, isRevisionBasedQuestion: isRevisionBasedQuestion }), (0, jsx_runtime_1.jsx)(RevisionEditorSection, { showEditor: showEditor, editorData: editorData, setEditorData: setEditorData, isEditorDisabled: isEditorDisabled, isOCREnabled: isOCREnabled, addImageRender: addImageRender, qindex: qindex, questionObject: questionObject, isMobile: isMobile, commonProps: commonProps, onAnswerSubmit: onAnswerSubmit }), (0, jsx_runtime_1.jsx)(RevisionAnsweredSection, { presentationConfig: presentationConfig, currentQuestion: currentQuestion, history: history, commonProps: commonProps, isStudent: isStudent, isEditorDisabled: isEditorDisabled, isRevision: isRevision, isRevisionBasedQuestion: isRevisionBasedQuestion }), (0, jsx_runtime_1.jsx)(RevisionViewedSection, { presentationConfig: presentationConfig, currentQuestion: currentQuestion, commonProps: commonProps, history: history, isStudent: isStudent, isEditorDisabled: isEditorDisabled, isRevision: isRevision }), (0, jsx_runtime_1.jsx)(RevisionAnswerToggleButton, { presentationConfig: presentationConfig, currentQuestion: currentQuestion, isRevision: isRevision, showanswer: showanswer, isEditorDisabled: isEditorDisabled, handleToggleAnswer: handleToggleAnswer })] }));
|
|
123
201
|
};
|
|
124
202
|
exports.RevisionView = RevisionView;
|
|
125
203
|
exports.default = exports.RevisionView;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Revision.js","sourceRoot":"","sources":["../../../../src/components/Molecules/Revision/Revision.jsx"],"names":[],"mappings":";;;;;;;AAAA,4CAA6C;AAC7C,4CAAkE;AAClE,iCAAkE;AAClE,yFAAiE;AACjE,kGAA0E;AAC1E,qGAA6E;AAC7E,uFAA+D;AAC/D,
|
|
1
|
+
{"version":3,"file":"Revision.js","sourceRoot":"","sources":["../../../../src/components/Molecules/Revision/Revision.jsx"],"names":[],"mappings":";;;;;;;AAAA,4CAA6C;AAC7C,4CAAkE;AAClE,iCAAkE;AAClE,yFAAiE;AACjE,kGAA0E;AAC1E,qGAA6E;AAC7E,uFAA+D;AAC/D,6EAAoD;AACpD,wEAA+H;AAE/H,MAAM,KAAK,GAAG;IACZ,aAAa,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QAC9B,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa;QAC1C,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB;QAC9D,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,iCAAiC;QACjE,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,SAAS;QACrB,QAAQ,EAAE,kCAAkC;QAC5C,UAAU,EAAE,KAAK;QACjB,UAAU,EAAE,kCAAkC;QAC9C,YAAY,EAAE,KAAK;QACnB,OAAO,EAAE,MAAM;QACf,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;QACxB,GAAG,EAAE,KAAK;QACV,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC7B,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS;KAC/C,CAAC;CACH,CAAC;AAEF,gDAAgD;AAEhD,MAAM,gBAAgB,GAAG,CAAC,UAAU,EAAE,EAAE;IACtC,IAAI,CAAC,UAAU;QAAE,OAAO,IAAI,CAAC;IAE7B,IAAI,OAAO,UAAU,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