questionlayoutrefactoring 0.0.90 → 0.0.91
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.
- package/dist/components/Molecules/PerformanceScreen/PreformanceResultScreen.d.ts +2 -0
- package/dist/components/Molecules/PerformanceScreen/PreformanceResultScreen.js +68 -24
- package/dist/components/Molecules/PerformanceScreen/PreformanceResultScreen.js.map +1 -1
- package/dist/components/Molecules/PerformanceScreen/PreformanceResultScreen.stories.d.ts +12 -0
- package/dist/components/Molecules/PerformanceScreen/PreformanceResultScreen.stories.js +10 -1
- package/dist/components/Molecules/PerformanceScreen/PreformanceResultScreen.stories.js.map +1 -1
- package/dist/components/Molecules/RecapNode/ContentView.d.ts +2 -0
- package/dist/components/Molecules/RecapNode/ContentView.js +43 -0
- package/dist/components/Molecules/RecapNode/ContentView.js.map +1 -0
- package/dist/components/Molecules/RecapNode/SectionView.d.ts +7 -0
- package/dist/components/Molecules/RecapNode/SectionView.js +151 -0
- package/dist/components/Molecules/RecapNode/SectionView.js.map +1 -0
- package/dist/components/Molecules/RecapNode/VideoView.d.ts +8 -0
- package/dist/components/Molecules/RecapNode/VideoView.js +54 -0
- package/dist/components/Molecules/RecapNode/VideoView.js.map +1 -0
- package/dist/components/Molecules/comprehension/SubQuestionLayout.js +2 -2
- package/dist/components/Molecules/comprehension/SubQuestionLayout.js.map +1 -1
- package/dist/components/Molecules/optionLayouts/Scq.js +1 -1
- package/dist/components/Molecules/optionLayouts/Scq.js.map +1 -1
- package/dist/components/Organisms/FlashCardNode/FlashCardNode.d.ts +3 -0
- package/dist/components/Organisms/FlashCardNode/FlashCardNode.js +102 -0
- package/dist/components/Organisms/FlashCardNode/FlashCardNode.js.map +1 -0
- package/dist/components/Organisms/FlashCardNode/FlashcardContainer.d.ts +29 -0
- package/dist/components/Organisms/FlashCardNode/FlashcardContainer.js +57 -0
- package/dist/components/Organisms/FlashCardNode/FlashcardContainer.js.map +1 -0
- package/dist/components/Organisms/FlashCardNode/FlashcardNode.stories.d.ts +15 -0
- package/dist/components/Organisms/FlashCardNode/FlashcardNode.stories.js +301 -0
- package/dist/components/Organisms/FlashCardNode/FlashcardNode.stories.js.map +1 -0
- package/dist/components/Organisms/FlashCardNode/IconBar.d.ts +7 -0
- package/dist/components/Organisms/FlashCardNode/IconBar.js +22 -0
- package/dist/components/Organisms/FlashCardNode/IconBar.js.map +1 -0
- package/dist/components/Organisms/FlashCardNode/MobileAccordionView.d.ts +11 -0
- package/dist/components/Organisms/FlashCardNode/MobileAccordionView.js +34 -0
- package/dist/components/Organisms/FlashCardNode/MobileAccordionView.js.map +1 -0
- package/dist/components/Organisms/FlashCardNode/NodeHandles.d.ts +3 -0
- package/dist/components/Organisms/FlashCardNode/NodeHandles.js +22 -0
- package/dist/components/Organisms/FlashCardNode/NodeHandles.js.map +1 -0
- package/dist/components/Organisms/RecapGraph/Example.stories.d.ts +3 -0
- package/dist/components/Organisms/RecapGraph/Example.stories.js +50 -0
- package/dist/components/Organisms/RecapGraph/Example.stories.js.map +1 -0
- package/dist/components/Organisms/RecapGraph/Reactgraphflow.d.ts +11 -0
- package/dist/components/Organisms/RecapGraph/Reactgraphflow.js +124 -0
- package/dist/components/Organisms/RecapGraph/Reactgraphflow.js.map +1 -0
- package/dist/components/Organisms/RecapGraph/RecapGraph.d.ts +11 -0
- package/dist/components/Organisms/RecapGraph/RecapGraph.js +17 -0
- package/dist/components/Organisms/RecapGraph/RecapGraph.js.map +1 -0
- package/dist/components/Organisms/RecapGraph/RecapGraphFlow.d.ts +10 -0
- package/dist/components/Organisms/RecapGraph/RecapGraphFlow.js +104 -0
- package/dist/components/Organisms/RecapGraph/RecapGraphFlow.js.map +1 -0
- package/dist/components/Organisms/RecapGraph/useRecapGraphLogic.d.ts +29 -0
- package/dist/components/Organisms/RecapGraph/useRecapGraphLogic.js +365 -0
- package/dist/components/Organisms/RecapGraph/useRecapGraphLogic.js.map +1 -0
- package/dist/components/Organisms/StudentEditor/components/EditorComponent.d.ts +4 -0
- package/dist/components/Organisms/StudentEditor/components/EditorComponent.js +148 -0
- package/dist/components/Organisms/StudentEditor/components/EditorComponent.js.map +1 -0
- package/dist/utils/RecapData.d.ts +694 -0
- package/dist/utils/RecapData.js +2258 -0
- package/dist/utils/RecapData.js.map +1 -0
- package/dist/utils/contentUtils.d.ts +40 -0
- package/dist/utils/contentUtils.js +66 -0
- package/dist/utils/contentUtils.js.map +1 -0
- package/package.json +1 -1
- package/dist/components/Molecules/optionLayouts/Scqnew.d.ts +0 -2
- package/dist/components/Molecules/optionLayouts/Scqnew.js +0 -491
- package/dist/components/Molecules/optionLayouts/Scqnew.js.map +0 -1
- package/dist/components/Molecules/questionLayouts/AnswerLayoutnew.d.ts +0 -1
- package/dist/components/Molecules/questionLayouts/AnswerLayoutnew.js +0 -61
- package/dist/components/Molecules/questionLayouts/AnswerLayoutnew.js.map +0 -1
- package/dist/components/Molecules/questionLayouts/QuestionLayoutnew.d.ts +0 -2
- package/dist/components/Molecules/questionLayouts/QuestionLayoutnew.js +0 -285
- package/dist/components/Molecules/questionLayouts/QuestionLayoutnew.js.map +0 -1
- package/dist/utils/revision-utils.d.ts +0 -13
- package/dist/utils/revision-utils.js +0 -90
- package/dist/utils/revision-utils.js.map +0 -1
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useRecapGraphLogic = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const contentUtils_1 = require("../../../utils/contentUtils");
|
|
6
|
+
const useRecapGraphLogic = (jsonData, contentMap, iconConfig) => {
|
|
7
|
+
const [expandedNodeId, setExpandedNodeId] = (0, react_1.useState)(null);
|
|
8
|
+
const [expandedNodeHeight, setExpandedNodeHeight] = (0, react_1.useState)(0);
|
|
9
|
+
const [activeExpandedNodeId, setActiveExpandedNodeId] = (0, react_1.useState)(null);
|
|
10
|
+
const [isTransitioning, setIsTransitioning] = (0, react_1.useState)(false);
|
|
11
|
+
const [expandedNodes, setExpandedNodes] = (0, react_1.useState)({});
|
|
12
|
+
const [contentExpanded, setContentExpanded] = (0, react_1.useState)({});
|
|
13
|
+
const [displayTypes, setDisplayTypes] = (0, react_1.useState)({});
|
|
14
|
+
const [videoIndices, setVideoIndices] = (0, react_1.useState)({});
|
|
15
|
+
(0, react_1.useEffect)(() => {
|
|
16
|
+
if (jsonData) {
|
|
17
|
+
setExpandedNodes((prev) => ({
|
|
18
|
+
...prev,
|
|
19
|
+
[jsonData._id]: true,
|
|
20
|
+
}));
|
|
21
|
+
}
|
|
22
|
+
}, [jsonData?._id]);
|
|
23
|
+
// Build color map with consistent logic
|
|
24
|
+
const colorMap = (0, react_1.useMemo)(() => {
|
|
25
|
+
const map = {};
|
|
26
|
+
let level1ColorIndex = 0;
|
|
27
|
+
const buildColorMap = (nodeData, level = 0, parentColorKey = null) => {
|
|
28
|
+
if (!nodeData)
|
|
29
|
+
return;
|
|
30
|
+
let colorKey;
|
|
31
|
+
if (level === 0) {
|
|
32
|
+
colorKey = "root";
|
|
33
|
+
}
|
|
34
|
+
else if (level === 1) {
|
|
35
|
+
colorKey = String(level1ColorIndex % 8);
|
|
36
|
+
level1ColorIndex++;
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
colorKey = parentColorKey;
|
|
40
|
+
}
|
|
41
|
+
map[nodeData._id] = { level, colorKey };
|
|
42
|
+
if (nodeData.children?.length) {
|
|
43
|
+
nodeData.children.forEach((child) => {
|
|
44
|
+
buildColorMap(child, level + 1, colorKey);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
if (jsonData)
|
|
49
|
+
buildColorMap(jsonData);
|
|
50
|
+
return map;
|
|
51
|
+
}, [jsonData]);
|
|
52
|
+
// Get colors for a node
|
|
53
|
+
const getNodeColors = (nodeId) => {
|
|
54
|
+
const colorInfo = colorMap[nodeId] || { level: 0, colorKey: "root" };
|
|
55
|
+
const headerColor = colorInfo.level === 0 ? contentUtils_1.COLOR_MAP.root : contentUtils_1.COLOR_MAP[colorInfo.colorKey];
|
|
56
|
+
const bgColor = colorInfo.level === 0
|
|
57
|
+
? contentUtils_1.LIGHT_COLOR_MAP.root
|
|
58
|
+
: contentUtils_1.LIGHT_COLOR_MAP[colorInfo.colorKey];
|
|
59
|
+
return { headerColor, bgColor, colorInfo };
|
|
60
|
+
};
|
|
61
|
+
// Check if node has content
|
|
62
|
+
const getNodeContent = (nodeId) => {
|
|
63
|
+
const nodeContent = contentMap[nodeId] || null;
|
|
64
|
+
const hasContent = nodeContent &&
|
|
65
|
+
((nodeContent.videos && nodeContent.videos.length > 0) ||
|
|
66
|
+
(nodeContent.recap && Object.keys(nodeContent.recap).length > 0));
|
|
67
|
+
return { nodeContent, hasContent };
|
|
68
|
+
};
|
|
69
|
+
// Build nodes for RecapGraph
|
|
70
|
+
const buildNodes = (data) => {
|
|
71
|
+
const nodes = [];
|
|
72
|
+
let level1ColorIndex = 0;
|
|
73
|
+
const processNode = (nodeData, lvl, parentColorKey = null) => {
|
|
74
|
+
let colorKey, nodeColor;
|
|
75
|
+
if (lvl === 0) {
|
|
76
|
+
colorKey = "root";
|
|
77
|
+
nodeColor = contentUtils_1.COLOR_MAP.root;
|
|
78
|
+
}
|
|
79
|
+
else if (lvl === 1) {
|
|
80
|
+
colorKey = String(level1ColorIndex % 8);
|
|
81
|
+
nodeColor = contentUtils_1.COLOR_MAP[colorKey];
|
|
82
|
+
level1ColorIndex++;
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
colorKey = parentColorKey;
|
|
86
|
+
nodeColor = contentUtils_1.LIGHT_COLOR_MAP[colorKey];
|
|
87
|
+
}
|
|
88
|
+
const { hasContent } = getNodeContent(nodeData._id);
|
|
89
|
+
nodes.push({
|
|
90
|
+
id: nodeData._id,
|
|
91
|
+
type: "flashcard",
|
|
92
|
+
data: {
|
|
93
|
+
id: nodeData._id,
|
|
94
|
+
label: nodeData?.description,
|
|
95
|
+
color: nodeColor,
|
|
96
|
+
content: contentMap[nodeData._id] || null,
|
|
97
|
+
hasContent,
|
|
98
|
+
bgColor: contentUtils_1.LIGHT_COLOR_MAP[colorKey],
|
|
99
|
+
colorKey,
|
|
100
|
+
level: lvl,
|
|
101
|
+
hasMultipleChildren: nodeData.children?.length > 1,
|
|
102
|
+
icons: iconConfig,
|
|
103
|
+
onExpandChange: (nodeId, isExpanded, height) => {
|
|
104
|
+
setIsTransitioning(true);
|
|
105
|
+
if (isExpanded) {
|
|
106
|
+
setExpandedNodeId(nodeId);
|
|
107
|
+
setExpandedNodeHeight(height);
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
setExpandedNodeId(null);
|
|
111
|
+
setExpandedNodeHeight(0);
|
|
112
|
+
}
|
|
113
|
+
const timer = setTimeout(() => {
|
|
114
|
+
setIsTransitioning(false);
|
|
115
|
+
}, 350);
|
|
116
|
+
return () => clearTimeout(timer);
|
|
117
|
+
},
|
|
118
|
+
onNodeExpand: (nodeId) => {
|
|
119
|
+
setIsTransitioning(true);
|
|
120
|
+
setActiveExpandedNodeId(nodeId);
|
|
121
|
+
},
|
|
122
|
+
shouldClose: activeExpandedNodeId !== null &&
|
|
123
|
+
activeExpandedNodeId !== nodeData._id,
|
|
124
|
+
},
|
|
125
|
+
position: { x: 0, y: 0 },
|
|
126
|
+
draggable: false,
|
|
127
|
+
style: {
|
|
128
|
+
zIndex: 1,
|
|
129
|
+
transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
nodeData.children?.forEach((child) => processNode(child, lvl + 1, colorKey));
|
|
133
|
+
};
|
|
134
|
+
if (data)
|
|
135
|
+
processNode(data, 0);
|
|
136
|
+
return nodes;
|
|
137
|
+
};
|
|
138
|
+
// Build edges for RecapGraph
|
|
139
|
+
const buildEdges = (data, nodes) => {
|
|
140
|
+
const edges = [];
|
|
141
|
+
const nodeColorMap = {};
|
|
142
|
+
nodes.forEach((n) => {
|
|
143
|
+
nodeColorMap[n.id] = n.data.color;
|
|
144
|
+
});
|
|
145
|
+
const processNode = (nodeData, parentLevel = 0) => {
|
|
146
|
+
const hasMultipleChildren = (nodeData.children?.length || 0) > 1;
|
|
147
|
+
nodeData.children?.forEach((child) => {
|
|
148
|
+
const sourceColor = nodeColorMap[nodeData._id] || "#94a3b8";
|
|
149
|
+
let sourceHandle = "bottom";
|
|
150
|
+
let targetHandle = "top";
|
|
151
|
+
if (parentLevel >= 1 && hasMultipleChildren) {
|
|
152
|
+
targetHandle = "left";
|
|
153
|
+
}
|
|
154
|
+
else if (parentLevel >= 1) {
|
|
155
|
+
targetHandle = "top";
|
|
156
|
+
}
|
|
157
|
+
edges.push({
|
|
158
|
+
id: `${nodeData._id}-${child._id}`,
|
|
159
|
+
source: nodeData._id,
|
|
160
|
+
target: child._id,
|
|
161
|
+
sourceHandle,
|
|
162
|
+
targetHandle,
|
|
163
|
+
type: "bezier",
|
|
164
|
+
style: { stroke: sourceColor, strokeWidth: 2 },
|
|
165
|
+
markerEnd: {
|
|
166
|
+
type: "arrowclosed",
|
|
167
|
+
color: sourceColor,
|
|
168
|
+
width: 10,
|
|
169
|
+
height: 10,
|
|
170
|
+
},
|
|
171
|
+
});
|
|
172
|
+
processNode(child, parentLevel + 1);
|
|
173
|
+
});
|
|
174
|
+
};
|
|
175
|
+
if (data)
|
|
176
|
+
processNode(data, 0);
|
|
177
|
+
return edges;
|
|
178
|
+
};
|
|
179
|
+
// Compute layout for RecapGraph
|
|
180
|
+
const computeCustomLayout = (inputNodes, inputEdges) => {
|
|
181
|
+
if (!inputNodes.length || !jsonData)
|
|
182
|
+
return { nodes: [], edges: [] };
|
|
183
|
+
const NODE_WIDTH = 390;
|
|
184
|
+
const NODE_HEIGHT = 80;
|
|
185
|
+
const HORIZONTAL_SPACING = 240;
|
|
186
|
+
const VERTICAL_SPACING = 120;
|
|
187
|
+
const VERTICAL_STACK_SPACING = 30;
|
|
188
|
+
const HORIZONTAL_OFFSET = 225;
|
|
189
|
+
const positions = {};
|
|
190
|
+
const childrenMap = {};
|
|
191
|
+
const levelMap = {};
|
|
192
|
+
const nodeHeights = {};
|
|
193
|
+
inputNodes.forEach((n) => {
|
|
194
|
+
if (n.id === expandedNodeId) {
|
|
195
|
+
nodeHeights[n.id] = NODE_HEIGHT + expandedNodeHeight + 100;
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
nodeHeights[n.id] = NODE_HEIGHT;
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
const buildMaps = (node, level = 0, parentId = null) => {
|
|
202
|
+
levelMap[node._id] = level;
|
|
203
|
+
if (parentId) {
|
|
204
|
+
if (!childrenMap[parentId])
|
|
205
|
+
childrenMap[parentId] = [];
|
|
206
|
+
childrenMap[parentId].push(node._id);
|
|
207
|
+
}
|
|
208
|
+
if (node.children) {
|
|
209
|
+
node.children.forEach((child) => buildMaps(child, level + 1, node._id));
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
buildMaps(jsonData);
|
|
213
|
+
const subtreeWidths = {};
|
|
214
|
+
const subtreeHeights = {};
|
|
215
|
+
const calcSubtreeDimensions = (nodeId) => {
|
|
216
|
+
const children = childrenMap[nodeId] || [];
|
|
217
|
+
const level = levelMap[nodeId];
|
|
218
|
+
const currentNodeHeight = nodeHeights[nodeId];
|
|
219
|
+
if (children.length === 0) {
|
|
220
|
+
subtreeWidths[nodeId] = NODE_WIDTH;
|
|
221
|
+
subtreeHeights[nodeId] = currentNodeHeight;
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
const hasMultipleChildren = children.length > 1;
|
|
225
|
+
if (level >= 1 && hasMultipleChildren) {
|
|
226
|
+
children.forEach((childId) => calcSubtreeDimensions(childId));
|
|
227
|
+
const maxChildWidth = Math.max(...children.map((cid) => subtreeWidths[cid]));
|
|
228
|
+
const totalHeight = children.reduce((sum, cid) => sum + subtreeHeights[cid], 0);
|
|
229
|
+
const spacing = (children.length - 1) * VERTICAL_STACK_SPACING;
|
|
230
|
+
subtreeWidths[nodeId] = NODE_WIDTH + HORIZONTAL_OFFSET + maxChildWidth;
|
|
231
|
+
subtreeHeights[nodeId] = Math.max(currentNodeHeight, totalHeight + spacing);
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
children.forEach((childId) => calcSubtreeDimensions(childId));
|
|
235
|
+
const childrenTotalWidth = children.reduce((sum, cid) => sum + subtreeWidths[cid], 0);
|
|
236
|
+
const spacing = (children.length - 1) * HORIZONTAL_SPACING;
|
|
237
|
+
subtreeWidths[nodeId] = Math.max(NODE_WIDTH, childrenTotalWidth + spacing);
|
|
238
|
+
subtreeHeights[nodeId] = currentNodeHeight;
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
const getAllNodeIds = (node) => {
|
|
242
|
+
let ids = [node._id];
|
|
243
|
+
if (node.children) {
|
|
244
|
+
node.children.forEach((child) => {
|
|
245
|
+
ids = ids.concat(getAllNodeIds(child));
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
return ids;
|
|
249
|
+
};
|
|
250
|
+
getAllNodeIds(jsonData).forEach((id) => calcSubtreeDimensions(id));
|
|
251
|
+
const positionNodes = () => {
|
|
252
|
+
positions[jsonData._id] = { x: 0, y: 0 };
|
|
253
|
+
const level1Children = childrenMap[jsonData._id] || [];
|
|
254
|
+
if (level1Children.length === 0)
|
|
255
|
+
return;
|
|
256
|
+
const totalWidth = level1Children.length * NODE_WIDTH;
|
|
257
|
+
const totalSpacing = (level1Children.length - 1) * HORIZONTAL_SPACING;
|
|
258
|
+
const fullWidth = totalWidth + totalSpacing;
|
|
259
|
+
let currentX = -fullWidth / 2;
|
|
260
|
+
const level1Y = nodeHeights[jsonData._id] + VERTICAL_SPACING;
|
|
261
|
+
level1Children.forEach((childId) => {
|
|
262
|
+
positions[childId] = {
|
|
263
|
+
x: currentX + NODE_WIDTH / 2,
|
|
264
|
+
y: level1Y,
|
|
265
|
+
};
|
|
266
|
+
currentX += NODE_WIDTH + HORIZONTAL_SPACING;
|
|
267
|
+
});
|
|
268
|
+
const positionSubtree = (parentId) => {
|
|
269
|
+
const children = childrenMap[parentId] || [];
|
|
270
|
+
if (children.length === 0)
|
|
271
|
+
return;
|
|
272
|
+
const parentPos = positions[parentId];
|
|
273
|
+
const parentLevel = levelMap[parentId];
|
|
274
|
+
const hasMultipleChildren = children.length > 1;
|
|
275
|
+
if (parentLevel >= 1 && hasMultipleChildren) {
|
|
276
|
+
let currentY = parentPos.y + nodeHeights[parentId] + VERTICAL_SPACING - 80;
|
|
277
|
+
const childX = parentPos.x + HORIZONTAL_OFFSET;
|
|
278
|
+
children.forEach((childId) => {
|
|
279
|
+
positions[childId] = {
|
|
280
|
+
x: childX,
|
|
281
|
+
y: currentY,
|
|
282
|
+
};
|
|
283
|
+
currentY += nodeHeights[childId] + VERTICAL_STACK_SPACING;
|
|
284
|
+
positionSubtree(childId);
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
const childrenTotalWidth = children.reduce((sum, cid) => sum + subtreeWidths[cid], 0);
|
|
289
|
+
const spacing = (children.length - 1) * HORIZONTAL_SPACING;
|
|
290
|
+
const fullChildrenWidth = childrenTotalWidth + spacing;
|
|
291
|
+
let childX = parentPos.x - fullChildrenWidth / 2;
|
|
292
|
+
const childY = parentPos.y + nodeHeights[parentId] + VERTICAL_SPACING;
|
|
293
|
+
children.forEach((childId) => {
|
|
294
|
+
const childWidth = subtreeWidths[childId];
|
|
295
|
+
positions[childId] = {
|
|
296
|
+
x: childX + childWidth / 2,
|
|
297
|
+
y: childY,
|
|
298
|
+
};
|
|
299
|
+
positionSubtree(childId);
|
|
300
|
+
childX += childWidth + HORIZONTAL_SPACING;
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
level1Children.forEach((childId) => positionSubtree(childId));
|
|
305
|
+
};
|
|
306
|
+
positionNodes();
|
|
307
|
+
const layoutNodes = inputNodes.map((n) => ({
|
|
308
|
+
...n,
|
|
309
|
+
position: positions[n.id] || { x: 0, y: 0 },
|
|
310
|
+
}));
|
|
311
|
+
return { nodes: layoutNodes, edges: inputEdges };
|
|
312
|
+
};
|
|
313
|
+
// Event handlers for mobile accordion view
|
|
314
|
+
const handleChevronClick = (nodeId) => {
|
|
315
|
+
setExpandedNodes((prev) => ({
|
|
316
|
+
...prev,
|
|
317
|
+
[nodeId]: !prev[nodeId],
|
|
318
|
+
}));
|
|
319
|
+
};
|
|
320
|
+
const handleIconClick = (nodeId, type, availableContentTypes) => {
|
|
321
|
+
const isSame = displayTypes[nodeId] === type;
|
|
322
|
+
setActiveExpandedNodeId(nodeId);
|
|
323
|
+
setContentExpanded((prev) => ({
|
|
324
|
+
...prev,
|
|
325
|
+
[nodeId]: isSame ? !prev[nodeId] : true,
|
|
326
|
+
}));
|
|
327
|
+
setDisplayTypes((prev) => ({
|
|
328
|
+
...prev,
|
|
329
|
+
[nodeId]: type,
|
|
330
|
+
}));
|
|
331
|
+
};
|
|
332
|
+
const setCurrentVideoIdx = (nodeId, idxOrUpdater) => {
|
|
333
|
+
setVideoIndices((prev) => {
|
|
334
|
+
const currentIdx = prev[nodeId] || 0;
|
|
335
|
+
const newIdx = idxOrUpdater(currentIdx);
|
|
336
|
+
return {
|
|
337
|
+
...prev,
|
|
338
|
+
[nodeId]: newIdx,
|
|
339
|
+
};
|
|
340
|
+
});
|
|
341
|
+
};
|
|
342
|
+
return {
|
|
343
|
+
// State
|
|
344
|
+
expandedNodeId,
|
|
345
|
+
expandedNodeHeight,
|
|
346
|
+
activeExpandedNodeId,
|
|
347
|
+
isTransitioning,
|
|
348
|
+
expandedNodes,
|
|
349
|
+
contentExpanded,
|
|
350
|
+
displayTypes,
|
|
351
|
+
videoIndices,
|
|
352
|
+
colorMap,
|
|
353
|
+
// Methods
|
|
354
|
+
getNodeColors,
|
|
355
|
+
getNodeContent,
|
|
356
|
+
buildNodes,
|
|
357
|
+
buildEdges,
|
|
358
|
+
computeCustomLayout,
|
|
359
|
+
handleChevronClick,
|
|
360
|
+
handleIconClick,
|
|
361
|
+
setCurrentVideoIdx,
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
exports.useRecapGraphLogic = useRecapGraphLogic;
|
|
365
|
+
//# sourceMappingURL=useRecapGraphLogic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRecapGraphLogic.js","sourceRoot":"","sources":["../../../../src/components/Organisms/RecapGraph/useRecapGraphLogic.js"],"names":[],"mappings":";;;AAAA,iCAAqD;AACrD,8DAAyE;AAElE,MAAM,kBAAkB,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE;IACrE,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC;IAC3D,MAAM,CAAC,kBAAkB,EAAE,qBAAqB,CAAC,GAAG,IAAA,gBAAQ,EAAC,CAAC,CAAC,CAAC;IAChE,MAAM,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,GAAG,IAAA,gBAAQ,EAAC,IAAI,CAAC,CAAC;IACvE,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAC9D,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,IAAA,gBAAQ,EAAC,EAAE,CAAC,CAAC;IACvD,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,IAAA,gBAAQ,EAAC,EAAE,CAAC,CAAC;IAC3D,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,IAAA,gBAAQ,EAAC,EAAE,CAAC,CAAC;IACrD,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,IAAA,gBAAQ,EAAC,EAAE,CAAC,CAAC;IAErD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,QAAQ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E,CAAC,CAAC;YAC5B,GAAG,IAAI;YACP,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI;SACxC,CAAC,CAAC,CAAC;QAEJ,eAAe,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACzB,GAAG,IAAI;YACP,CAAC,MAAM,CAAC,EAAE,IAAI;SACf,CAAC,CAAC,CAAC;IACN,CAAC,CAAC;IAEF,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,YAAY,EAAE,EAAE;QAClD,eAAe,CAAC,CAAC,IAAI,EAAE,EAAE;YACvB,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACrC,MAAM,MAAM,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC;YAExC,OAAO;gBACL,GAAG,IAAI;gBACP,CAAC,MAAM,CAAC,EAAE,MAAM;aACjB,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,OAAO;QACL,QAAQ;QACR,cAAc;QACd,kBAAkB;QAClB,oBAAoB;QACpB,eAAe;QACf,aAAa;QACb,eAAe;QACf,YAAY;QACZ,YAAY;QACZ,QAAQ;QACR,UAAU;QACV,aAAa;QACb,cAAc;QACd,UAAU;QACV,UAAU;QACV,mBAAmB;QACnB,kBAAkB;QAClB,eAAe;QACf,kBAAkB;KACnB,CAAC;AACJ,CAAC,CAAC;AA7aW,QAAA,kBAAkB,sBA6a7B"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.LearningCreditsWarning = exports.Icons = exports.EditorBox = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("@chakra-ui/react");
|
|
9
|
+
const common_utils_1 = require("../../../../utils/common-utils");
|
|
10
|
+
const EditorStyles_1 = require("./EditorStyles");
|
|
11
|
+
const LearningPathUtils_1 = require("../../../../utils/LearningPathUtils");
|
|
12
|
+
const react_2 = __importDefault(require("react"));
|
|
13
|
+
const slate_react_1 = require("slate-react");
|
|
14
|
+
exports.EditorBox = react_2.default.memo(({ editorRef, handleClick, height, handleKeyDown, handlePaste, handleDrop, handleDragOver, handleDragEnter, handleDragLeave, handleDragStart, isDisabled, showBottomBar, isRevision, renderElement, isMobile, isDescAnsQues, }) => {
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Box, { ref: editorRef, onClick: handleClick, flex: 1, width: ["100%", "auto"], sx: {
|
|
16
|
+
position: "relative",
|
|
17
|
+
minH: "0px",
|
|
18
|
+
maxH: height ?? "200px",
|
|
19
|
+
overflow: "auto",
|
|
20
|
+
}, children: (0, jsx_runtime_1.jsx)(react_1.Box, { sx: {
|
|
21
|
+
"[data-slate-placeholder]": {
|
|
22
|
+
color: "black !important",
|
|
23
|
+
pointerEvents: "none !important",
|
|
24
|
+
fontWeight: "400 !important",
|
|
25
|
+
fontSize: isMobile ? "12px" : "16px !important",
|
|
26
|
+
lineHeight: "24px",
|
|
27
|
+
},
|
|
28
|
+
}, children: (0, jsx_runtime_1.jsx)(slate_react_1.Editable, { "data-testid": "input-editor", renderElement: renderElement, placeholder: showBottomBar
|
|
29
|
+
? isRevision
|
|
30
|
+
? "Write your answer first — that's where real learning happens."
|
|
31
|
+
: isDescAnsQues
|
|
32
|
+
? isMobile
|
|
33
|
+
? "Answer in detail for accurate evaluation. You can also upload a handwritten note."
|
|
34
|
+
: "Please answer in full detail, step by step, for accurate evaluation. If it's easier, you can also upload a handwritten note."
|
|
35
|
+
: "Ask Vin any question or upload your work!"
|
|
36
|
+
: "", readOnly: isDisabled, onKeyDown: handleKeyDown, onPaste: handlePaste, onDrop: handleDrop, onDragOver: handleDragOver, onDragEnter: handleDragEnter, onDragLeave: handleDragLeave, onDragStart: handleDragStart, draggable: false, style: {
|
|
37
|
+
position: "relative",
|
|
38
|
+
outline: "none",
|
|
39
|
+
paddingBottom: !isMobile ? "20px" : "0px",
|
|
40
|
+
backgroundColor: "transparent",
|
|
41
|
+
cursor: isDisabled ? "not-allowed" : "text",
|
|
42
|
+
userSelect: isDisabled ? "none" : "auto",
|
|
43
|
+
pointerEvents: isDisabled ? "none" : "auto",
|
|
44
|
+
marginTop: "8px",
|
|
45
|
+
paddingLeft: "4px",
|
|
46
|
+
width: "100%",
|
|
47
|
+
display: "block",
|
|
48
|
+
overflow: "auto",
|
|
49
|
+
"&::-webkit-scrollbar": {
|
|
50
|
+
width: "0px",
|
|
51
|
+
height: "0px",
|
|
52
|
+
},
|
|
53
|
+
scrollbarWidth: "none",
|
|
54
|
+
} }) }) }));
|
|
55
|
+
});
|
|
56
|
+
exports.Icons = react_2.default.memo(({ tutorMode, taskType, isDisabledRevision, icons, isDisabled, openMathEditor, addImageRender, data, handleSubmit, handleChange, formulaIconRef, submitButtonRef, addImageNavRef, tabFocusedElement, setTabFocusedElement, handleTabNavigation, }) => {
|
|
57
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.HStack, { justifyContent: "flex-end", position: "relative", userSelect: "none", spacing: 5, children: [(tutorMode ||
|
|
58
|
+
(!tutorMode && taskType === LearningPathUtils_1.taskTypes.assessment) ||
|
|
59
|
+
isDisabledRevision) && ((0, jsx_runtime_1.jsxs)(react_1.HStack, { sx: { opacity: "1", zIndex: 2 }, spacing: 5, children: [icons?.formula && ((0, jsx_runtime_1.jsx)(react_1.Image, { "data-testid": "formula-icon", ref: formulaIconRef, tabIndex: isDisabled ? -1 : 0, sx: {
|
|
60
|
+
h: "28px",
|
|
61
|
+
w: "28px",
|
|
62
|
+
cursor: isDisabled ? "not-allowed" : "pointer",
|
|
63
|
+
border: tabFocusedElement === "formula"
|
|
64
|
+
? "2px solid #5F4DC7"
|
|
65
|
+
: "2px solid transparent",
|
|
66
|
+
borderRadius: "6px",
|
|
67
|
+
padding: "2px",
|
|
68
|
+
outline: "none",
|
|
69
|
+
transition: "border-color 0.2s ease-in-out",
|
|
70
|
+
}, src: icons?.formula, alt: "Add formula", onClick: () => {
|
|
71
|
+
!isDisabled && openMathEditor();
|
|
72
|
+
}, onFocus: () => setTabFocusedElement("formula"), onBlur: () => setTabFocusedElement(null), onKeyDown: (event) => {
|
|
73
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
74
|
+
event.preventDefault();
|
|
75
|
+
!isDisabled && openMathEditor();
|
|
76
|
+
}
|
|
77
|
+
else if (event.key === "Tab") {
|
|
78
|
+
handleTabNavigation(event);
|
|
79
|
+
}
|
|
80
|
+
} })), addImageRender &&
|
|
81
|
+
addImageRender({
|
|
82
|
+
onTabToNext: () => {
|
|
83
|
+
// Focus submit button when addImageRender wants to tab out
|
|
84
|
+
setTabFocusedElement("submit");
|
|
85
|
+
submitButtonRef.current?.focus();
|
|
86
|
+
},
|
|
87
|
+
setNavMethods: (methods) => {
|
|
88
|
+
// Store navigation methods for use in handleTabNavigation
|
|
89
|
+
addImageNavRef.current = methods || { focusFirst: null };
|
|
90
|
+
},
|
|
91
|
+
})] })), icons?.submit && ((0, jsx_runtime_1.jsx)(react_1.Image, { ref: submitButtonRef, tabIndex: isDisabled || (0, common_utils_1.isEmptyOrNull)(data) ? -1 : 0, "data-testid": "submit-icon", sx: {
|
|
92
|
+
h: "48px",
|
|
93
|
+
w: "48px",
|
|
94
|
+
zIndex: 2,
|
|
95
|
+
cursor: (0, common_utils_1.isEmptyOrNull)(data) ? "not-allowed" : "pointer",
|
|
96
|
+
opacity: (0, common_utils_1.isEmptyOrNull)(data) ? 0.6 : 1,
|
|
97
|
+
border: !isDisabled && tabFocusedElement === "submit"
|
|
98
|
+
? "2px solid #5F4DC7"
|
|
99
|
+
: "2px solid transparent",
|
|
100
|
+
borderRadius: "6px",
|
|
101
|
+
padding: "2px",
|
|
102
|
+
outline: "none",
|
|
103
|
+
transition: "border-color 0.2s ease-in-out",
|
|
104
|
+
}, src: icons?.submit, alt: "submit", onClick: () => {
|
|
105
|
+
if (!(0, common_utils_1.isEmptyOrNull)(data?.trim())) {
|
|
106
|
+
handleSubmit();
|
|
107
|
+
handleChange && handleChange("");
|
|
108
|
+
}
|
|
109
|
+
}, onFocus: () => !isDisabled && setTabFocusedElement("submit"), onBlur: () => setTabFocusedElement(null), onKeyDown: (event) => {
|
|
110
|
+
if (isDisabled)
|
|
111
|
+
return;
|
|
112
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
113
|
+
event.preventDefault();
|
|
114
|
+
if (!(0, common_utils_1.isEmptyOrNull)(data?.trim())) {
|
|
115
|
+
handleSubmit();
|
|
116
|
+
handleChange && handleChange("");
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
else if (event.key === "Tab") {
|
|
120
|
+
handleTabNavigation(event);
|
|
121
|
+
}
|
|
122
|
+
} }))] }));
|
|
123
|
+
});
|
|
124
|
+
exports.LearningCreditsWarning = react_2.default.memo(({ icons, data, handleSubmit, handleChange }) => ((0, jsx_runtime_1.jsxs)(react_1.HStack, { sx: { opacity: "1", zIndex: 2, width: "100%" }, spacing: 3, justifyContent: "space-between", children: [(0, jsx_runtime_1.jsxs)(react_1.HStack, { spacing: 3, children: [icons?.info && ((0, jsx_runtime_1.jsx)(react_1.Image, { sx: {
|
|
125
|
+
h: "28px",
|
|
126
|
+
w: "28px",
|
|
127
|
+
cursor: "not-allowed",
|
|
128
|
+
color: "#D0392E",
|
|
129
|
+
transform: "rotate(180deg)",
|
|
130
|
+
}, src: icons?.info, alt: "info" })), (0, jsx_runtime_1.jsxs)(react_1.Text, { as: "div", sx: {
|
|
131
|
+
...EditorStyles_1.styles.multiLineText,
|
|
132
|
+
...EditorStyles_1.styles.multiLineRed,
|
|
133
|
+
}, children: ["Since you do not have enough", " ", (0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", sx: { ...EditorStyles_1.styles.multiLineBold }, children: "Learning Credits Vin wont be able to help you." })] })] }), icons?.submit && ((0, jsx_runtime_1.jsx)(react_1.Image, { "data-testid": "submit-icon", sx: {
|
|
134
|
+
h: "48px",
|
|
135
|
+
w: "48px",
|
|
136
|
+
zIndex: 2,
|
|
137
|
+
cursor: (0, common_utils_1.isEmptyOrNull)(data) ? "not-allowed" : "pointer",
|
|
138
|
+
opacity: (0, common_utils_1.isEmptyOrNull)(data) ? 0.6 : 1,
|
|
139
|
+
}, src: icons?.submit, alt: "submit", onClick: () => {
|
|
140
|
+
if (!(0, common_utils_1.isEmptyOrNull)(data?.trim())) {
|
|
141
|
+
handleSubmit();
|
|
142
|
+
handleChange && handleChange("");
|
|
143
|
+
}
|
|
144
|
+
} }))] })));
|
|
145
|
+
exports.EditorBox.displayName = "EditorBox";
|
|
146
|
+
exports.Icons.displayName = "Icons";
|
|
147
|
+
exports.LearningCreditsWarning.displayName = "LearningCreditsWarning";
|
|
148
|
+
//# sourceMappingURL=EditorComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EditorComponent.js","sourceRoot":"","sources":["../../../../../src/components/Organisms/StudentEditor/components/EditorComponent.jsx"],"names":[],"mappings":";;;;;;;AAAA,4CAQ0B;AAC1B,iEAA+D;AAC/D,iDAAwC;AACxC,2EAAgE;AAChE,kDAA0B;AAC1B,6CAAuC;AAE1B,QAAA,SAAS,GAAG,eAAK,CAAC,IAAI,CACjC,CAAC,EACC,SAAS,EACT,WAAW,EACX,MAAM,EACN,aAAa,EACb,WAAW,EACX,UAAU,EACV,cAAc,EACd,eAAe,EACf,eAAe,EACf,eAAe,EACf,UAAU,EACV,aAAa,EACb,UAAU,EACV,aAAa,EACb,QAAQ,EACR,aAAa,GACd,EAAE,EAAE;IACH,OAAO,CACL,uBAAC,WAAG,IACF,GAAG,EAAE,SAAS,EACd,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,CAAC,EACP,K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