analytica-frontend-lib 1.6.19 → 1.6.21
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/ActivitiesHistory/index.js +9 -9
- package/dist/ActivitiesHistory/index.mjs +8 -8
- package/dist/ActivityCardQuestionBanks/index.js +9 -9
- package/dist/ActivityCardQuestionBanks/index.mjs +8 -8
- package/dist/ActivityCardQuestionPreview/index.js +9 -9
- package/dist/ActivityCardQuestionPreview/index.mjs +8 -8
- package/dist/ActivityCreate/ActivityCreateContent/index.js +9 -9
- package/dist/ActivityCreate/ActivityCreateContent/index.mjs +8 -8
- package/dist/ActivityCreate/index.js +9 -9
- package/dist/ActivityCreate/index.mjs +8 -8
- package/dist/ActivityDetails/index.js +9 -9
- package/dist/ActivityDetails/index.mjs +8 -8
- package/dist/ActivityFilters/index.js +9 -9
- package/dist/ActivityFilters/index.mjs +8 -8
- package/dist/ActivityPageLayout/index.js +9 -9
- package/dist/ActivityPageLayout/index.mjs +8 -8
- package/dist/ActivityPreview/index.js +9 -9
- package/dist/ActivityPreview/index.mjs +8 -8
- package/dist/AlertManager/index.js +9 -9
- package/dist/AlertManager/index.mjs +8 -8
- package/dist/AppHeader/index.d.ts.map +1 -1
- package/dist/AppHeader/index.js +5 -5
- package/dist/AppHeader/index.mjs +4 -4
- package/dist/CalendarCard/index.js +3 -3
- package/dist/CalendarCard/index.mjs +2 -2
- package/dist/CheckBoxGroup/index.js +9 -9
- package/dist/CheckBoxGroup/index.mjs +8 -8
- package/dist/DropdownMenu/index.d.ts.map +1 -1
- package/dist/DropdownMenu/index.js +2 -2
- package/dist/DropdownMenu/index.mjs +1 -1
- package/dist/ExamDetailsLayout/ExamDetailsPage/index.js +9 -9
- package/dist/ExamDetailsLayout/ExamDetailsPage/index.mjs +8 -8
- package/dist/ExamPageLayout/index.js +9 -9
- package/dist/ExamPageLayout/index.mjs +8 -8
- package/dist/Forum/index.js +3 -3
- package/dist/Forum/index.mjs +2 -2
- package/dist/NotificationCard/index.js +3 -3
- package/dist/NotificationCard/index.mjs +2 -2
- package/dist/PrintableUsersTable/index.js +9 -9
- package/dist/PrintableUsersTable/index.mjs +8 -8
- package/dist/QuestionsPerformanceCard/index.js +9 -9
- package/dist/QuestionsPerformanceCard/index.mjs +8 -8
- package/dist/RecommendedLessonCreate/index.js +9 -9
- package/dist/RecommendedLessonCreate/index.mjs +8 -8
- package/dist/RecommendedLessonsHistory/index.js +9 -9
- package/dist/RecommendedLessonsHistory/index.mjs +8 -8
- package/dist/Search/index.js +3 -3
- package/dist/Search/index.mjs +2 -2
- package/dist/SendActivityModal/SendActivityModal.js +9 -9
- package/dist/SendActivityModal/SendActivityModal.mjs +8 -8
- package/dist/SendActivityModal/index.js +9 -9
- package/dist/SendActivityModal/index.mjs +8 -8
- package/dist/SendLessonModal/index.js +9 -9
- package/dist/SendLessonModal/index.mjs +8 -8
- package/dist/SimulatedPerformance/SimulatedPerformanceView/index.js +9 -9
- package/dist/SimulatedPerformance/SimulatedPerformanceView/index.mjs +8 -8
- package/dist/SimulatedStudentSimulationsModal/index.js +15 -15
- package/dist/SimulatedStudentSimulationsModal/index.mjs +1 -1
- package/dist/SimulationsPage/index.js +9 -9
- package/dist/SimulationsPage/index.mjs +8 -8
- package/dist/TableProvider/index.js +9 -9
- package/dist/TableProvider/index.mjs +8 -8
- package/dist/UnifiedDraftModelPage/index.js +9 -9
- package/dist/UnifiedDraftModelPage/index.mjs +8 -8
- package/dist/UnifiedHistoryPage/index.js +9 -9
- package/dist/UnifiedHistoryPage/index.mjs +8 -8
- package/dist/{chunk-OMNDC4BZ.js → chunk-7XWWI5EY.js} +25 -28
- package/dist/chunk-7XWWI5EY.js.map +1 -0
- package/dist/{chunk-6LJZGFSL.mjs → chunk-CFTQ24UT.mjs} +2 -2
- package/dist/{chunk-LLUJLIDC.mjs → chunk-CKSOC6YI.mjs} +5 -4
- package/dist/{chunk-LLUJLIDC.mjs.map → chunk-CKSOC6YI.mjs.map} +1 -1
- package/dist/{chunk-DXSNLRL4.mjs → chunk-CWGYVJTQ.mjs} +25 -28
- package/dist/chunk-CWGYVJTQ.mjs.map +1 -0
- package/dist/{chunk-OYEDIVC2.js → chunk-CWTCN6F7.js} +5 -5
- package/dist/{chunk-OYEDIVC2.js.map → chunk-CWTCN6F7.js.map} +1 -1
- package/dist/{chunk-QKRUOG3N.mjs → chunk-E4MLDRLD.mjs} +2 -2
- package/dist/{chunk-GP47TASX.mjs → chunk-ENCFJBY5.mjs} +2 -2
- package/dist/{chunk-FBA6QDJM.js → chunk-IUH7JW7H.js} +16 -15
- package/dist/chunk-IUH7JW7H.js.map +1 -0
- package/dist/{chunk-UEUGH2QZ.js → chunk-KYGFYAU7.js} +7 -7
- package/dist/{chunk-UEUGH2QZ.js.map → chunk-KYGFYAU7.js.map} +1 -1
- package/dist/{chunk-T3V5QTJZ.mjs → chunk-MUVQIQAG.mjs} +2 -2
- package/dist/{chunk-7HW4PZLV.js → chunk-MYQ2LJWO.js} +6 -6
- package/dist/{chunk-7HW4PZLV.js.map → chunk-MYQ2LJWO.js.map} +1 -1
- package/dist/{chunk-K2ILHIT6.mjs → chunk-NAOHJW6H.mjs} +4 -4
- package/dist/{chunk-S4CNM57F.js → chunk-QHXJB5QM.js} +10 -10
- package/dist/{chunk-S4CNM57F.js.map → chunk-QHXJB5QM.js.map} +1 -1
- package/dist/{chunk-IXZT6MKP.js → chunk-QN32O3J3.js} +19 -19
- package/dist/{chunk-IXZT6MKP.js.map → chunk-QN32O3J3.js.map} +1 -1
- package/dist/{chunk-PTFHHHQG.mjs → chunk-X2YQT5BS.mjs} +22 -7
- package/dist/chunk-X2YQT5BS.mjs.map +1 -0
- package/dist/{chunk-M5BZW7BG.js → chunk-Y64LT6BL.js} +22 -7
- package/dist/chunk-Y64LT6BL.js.map +1 -0
- package/dist/components/SimulationsPage/SimulationsDetailModal.d.ts.map +1 -1
- package/dist/hooks/useAppContent/index.js +9 -9
- package/dist/hooks/useAppContent/index.mjs +8 -8
- package/dist/index.js +9 -9
- package/dist/index.mjs +8 -8
- package/dist/utils/questionDuration.d.ts +14 -12
- package/dist/utils/questionDuration.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-DXSNLRL4.mjs.map +0 -1
- package/dist/chunk-FBA6QDJM.js.map +0 -1
- package/dist/chunk-M5BZW7BG.js.map +0 -1
- package/dist/chunk-OMNDC4BZ.js.map +0 -1
- package/dist/chunk-PTFHHHQG.mjs.map +0 -1
- /package/dist/{chunk-6LJZGFSL.mjs.map → chunk-CFTQ24UT.mjs.map} +0 -0
- /package/dist/{chunk-QKRUOG3N.mjs.map → chunk-E4MLDRLD.mjs.map} +0 -0
- /package/dist/{chunk-GP47TASX.mjs.map → chunk-ENCFJBY5.mjs.map} +0 -0
- /package/dist/{chunk-T3V5QTJZ.mjs.map → chunk-MUVQIQAG.mjs.map} +0 -0
- /package/dist/{chunk-K2ILHIT6.mjs.map → chunk-NAOHJW6H.mjs.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkQN32O3J3js = require('../chunk-QN32O3J3.js');
|
|
4
4
|
require('../chunk-WE4BA4BL.js');
|
|
5
5
|
require('../chunk-RN2GCADE.js');
|
|
6
6
|
require('../chunk-LPVZR4VS.js');
|
|
@@ -62,7 +62,7 @@ require('../chunk-RX4NMGD4.js');
|
|
|
62
62
|
require('../chunk-2LUIX33X.js');
|
|
63
63
|
require('../chunk-E73Z225T.js');
|
|
64
64
|
require('../chunk-OVBL4SRY.js');
|
|
65
|
-
require('../chunk-
|
|
65
|
+
require('../chunk-KYGFYAU7.js');
|
|
66
66
|
require('../chunk-G6FDXLIB.js');
|
|
67
67
|
require('../chunk-TBD2B4VV.js');
|
|
68
68
|
require('../chunk-PUSVQ5Y2.js');
|
|
@@ -109,7 +109,7 @@ require('../chunk-EDYAMS5T.js');
|
|
|
109
109
|
require('../chunk-PQH6A3JH.js');
|
|
110
110
|
require('../chunk-NGI3QFNE.js');
|
|
111
111
|
require('../chunk-W3ZQ5XVC.js');
|
|
112
|
-
require('../chunk-
|
|
112
|
+
require('../chunk-7XWWI5EY.js');
|
|
113
113
|
require('../chunk-TZA4XQPO.js');
|
|
114
114
|
require('../chunk-RGJQ6FBN.js');
|
|
115
115
|
require('../chunk-AWOZ5IUF.js');
|
|
@@ -142,7 +142,7 @@ require('../chunk-CMZWDAYX.js');
|
|
|
142
142
|
require('../chunk-EMW2C4NG.js');
|
|
143
143
|
require('../chunk-S76F5KLP.js');
|
|
144
144
|
require('../chunk-YXYL4DPW.js');
|
|
145
|
-
require('../chunk-
|
|
145
|
+
require('../chunk-IUH7JW7H.js');
|
|
146
146
|
require('../chunk-CWMSE7LG.js');
|
|
147
147
|
require('../chunk-MLT2WG3F.js');
|
|
148
148
|
require('../chunk-7LXFZKOI.js');
|
|
@@ -160,14 +160,14 @@ require('../chunk-MFO4S7T5.js');
|
|
|
160
160
|
require('../chunk-ZW6L2ZQA.js');
|
|
161
161
|
require('../chunk-HA7IHFOE.js');
|
|
162
162
|
require('../chunk-HOVTCEHK.js');
|
|
163
|
-
require('../chunk-
|
|
163
|
+
require('../chunk-QHXJB5QM.js');
|
|
164
164
|
require('../chunk-BDP7HKY7.js');
|
|
165
165
|
require('../chunk-RLYFBIIW.js');
|
|
166
166
|
require('../chunk-WQMY5PKP.js');
|
|
167
167
|
require('../chunk-P7W2VN4K.js');
|
|
168
168
|
require('../chunk-25RDPHVC.js');
|
|
169
169
|
require('../chunk-JZZ5DD3R.js');
|
|
170
|
-
require('../chunk-
|
|
170
|
+
require('../chunk-CWTCN6F7.js');
|
|
171
171
|
require('../chunk-ZHWRUIVE.js');
|
|
172
172
|
require('../chunk-K5DJZ2JP.js');
|
|
173
173
|
require('../chunk-AOEUY6IS.js');
|
|
@@ -220,7 +220,7 @@ require('../chunk-Q24ESPTC.js');
|
|
|
220
220
|
require('../chunk-JR4KWECX.js');
|
|
221
221
|
require('../chunk-37P7JO3S.js');
|
|
222
222
|
require('../chunk-U4I5RYH2.js');
|
|
223
|
-
require('../chunk-
|
|
223
|
+
require('../chunk-MYQ2LJWO.js');
|
|
224
224
|
require('../chunk-CMUIZOUV.js');
|
|
225
225
|
require('../chunk-VHUCLOBH.js');
|
|
226
226
|
require('../chunk-YCIBW5F4.js');
|
|
@@ -246,7 +246,7 @@ require('../chunk-BJMKBBN3.js');
|
|
|
246
246
|
require('../chunk-MNU45FM3.js');
|
|
247
247
|
require('../chunk-XVBSGC7V.js');
|
|
248
248
|
require('../chunk-WWXDXIV7.js');
|
|
249
|
-
require('../chunk-
|
|
249
|
+
require('../chunk-Y64LT6BL.js');
|
|
250
250
|
require('../chunk-IWTNX7UB.js');
|
|
251
251
|
require('../chunk-ONWBFEW5.js');
|
|
252
252
|
require('../chunk-EBA7URWC.js');
|
|
@@ -266,5 +266,5 @@ require('../chunk-XX4WE4TL.js');
|
|
|
266
266
|
require('../chunk-YQ3JVMVB.js');
|
|
267
267
|
|
|
268
268
|
|
|
269
|
-
exports.UnifiedDraftModelPage =
|
|
269
|
+
exports.UnifiedDraftModelPage = _chunkQN32O3J3js.UnifiedDraftModelPage;
|
|
270
270
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UnifiedDraftModelPage
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-NAOHJW6H.mjs";
|
|
4
4
|
import "../chunk-RRID37Y3.mjs";
|
|
5
5
|
import "../chunk-A4IPM7UN.mjs";
|
|
6
6
|
import "../chunk-MVSTDYCK.mjs";
|
|
@@ -62,7 +62,7 @@ import "../chunk-RL26IDPE.mjs";
|
|
|
62
62
|
import "../chunk-WKIDESGP.mjs";
|
|
63
63
|
import "../chunk-RHQWRNOI.mjs";
|
|
64
64
|
import "../chunk-DZMWZNQK.mjs";
|
|
65
|
-
import "../chunk-
|
|
65
|
+
import "../chunk-CFTQ24UT.mjs";
|
|
66
66
|
import "../chunk-CERPYLMY.mjs";
|
|
67
67
|
import "../chunk-IQEDRSDD.mjs";
|
|
68
68
|
import "../chunk-WAPPT3UV.mjs";
|
|
@@ -109,7 +109,7 @@ import "../chunk-WJQCWDGQ.mjs";
|
|
|
109
109
|
import "../chunk-4D3QCMQO.mjs";
|
|
110
110
|
import "../chunk-QLYFZSVZ.mjs";
|
|
111
111
|
import "../chunk-NCWGCMGJ.mjs";
|
|
112
|
-
import "../chunk-
|
|
112
|
+
import "../chunk-CWGYVJTQ.mjs";
|
|
113
113
|
import "../chunk-MHRJKJBN.mjs";
|
|
114
114
|
import "../chunk-7J5Y7KZC.mjs";
|
|
115
115
|
import "../chunk-YQK6QCA7.mjs";
|
|
@@ -142,7 +142,7 @@ import "../chunk-HSAOQTUD.mjs";
|
|
|
142
142
|
import "../chunk-IFPB6M2V.mjs";
|
|
143
143
|
import "../chunk-HDGN7BLD.mjs";
|
|
144
144
|
import "../chunk-GCRKLKBV.mjs";
|
|
145
|
-
import "../chunk-
|
|
145
|
+
import "../chunk-CKSOC6YI.mjs";
|
|
146
146
|
import "../chunk-SVCPRMUU.mjs";
|
|
147
147
|
import "../chunk-I2F2MK7M.mjs";
|
|
148
148
|
import "../chunk-C42YIXWP.mjs";
|
|
@@ -160,14 +160,14 @@ import "../chunk-LXX5KU3O.mjs";
|
|
|
160
160
|
import "../chunk-CKTHUTMH.mjs";
|
|
161
161
|
import "../chunk-YPQFSNET.mjs";
|
|
162
162
|
import "../chunk-4QZWLI7Q.mjs";
|
|
163
|
-
import "../chunk-
|
|
163
|
+
import "../chunk-ENCFJBY5.mjs";
|
|
164
164
|
import "../chunk-WXHQGU23.mjs";
|
|
165
165
|
import "../chunk-FTNZFPQR.mjs";
|
|
166
166
|
import "../chunk-JHSDRHZJ.mjs";
|
|
167
167
|
import "../chunk-CIWVKSO7.mjs";
|
|
168
168
|
import "../chunk-GDK3MUFS.mjs";
|
|
169
169
|
import "../chunk-TBX2ZHCS.mjs";
|
|
170
|
-
import "../chunk-
|
|
170
|
+
import "../chunk-MUVQIQAG.mjs";
|
|
171
171
|
import "../chunk-GKY77WVA.mjs";
|
|
172
172
|
import "../chunk-6NB6QH76.mjs";
|
|
173
173
|
import "../chunk-FXWNTGCG.mjs";
|
|
@@ -220,7 +220,7 @@ import "../chunk-DIJR2YRE.mjs";
|
|
|
220
220
|
import "../chunk-NLK3GG73.mjs";
|
|
221
221
|
import "../chunk-DCCEYMYO.mjs";
|
|
222
222
|
import "../chunk-QZHSY53O.mjs";
|
|
223
|
-
import "../chunk-
|
|
223
|
+
import "../chunk-E4MLDRLD.mjs";
|
|
224
224
|
import "../chunk-LDBWF6EA.mjs";
|
|
225
225
|
import "../chunk-KR4RAVEW.mjs";
|
|
226
226
|
import "../chunk-REYQHCVW.mjs";
|
|
@@ -246,7 +246,7 @@ import "../chunk-OEW3ST4F.mjs";
|
|
|
246
246
|
import "../chunk-VDUO65VK.mjs";
|
|
247
247
|
import "../chunk-TVFP3HZX.mjs";
|
|
248
248
|
import "../chunk-VN4ORBHU.mjs";
|
|
249
|
-
import "../chunk-
|
|
249
|
+
import "../chunk-X2YQT5BS.mjs";
|
|
250
250
|
import "../chunk-DYMXY7CJ.mjs";
|
|
251
251
|
import "../chunk-SDXANFNM.mjs";
|
|
252
252
|
import "../chunk-624IUGB4.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkQN32O3J3js = require('../chunk-QN32O3J3.js');
|
|
4
4
|
require('../chunk-WE4BA4BL.js');
|
|
5
5
|
require('../chunk-RN2GCADE.js');
|
|
6
6
|
require('../chunk-LPVZR4VS.js');
|
|
@@ -62,7 +62,7 @@ require('../chunk-RX4NMGD4.js');
|
|
|
62
62
|
require('../chunk-2LUIX33X.js');
|
|
63
63
|
require('../chunk-E73Z225T.js');
|
|
64
64
|
require('../chunk-OVBL4SRY.js');
|
|
65
|
-
require('../chunk-
|
|
65
|
+
require('../chunk-KYGFYAU7.js');
|
|
66
66
|
require('../chunk-G6FDXLIB.js');
|
|
67
67
|
require('../chunk-TBD2B4VV.js');
|
|
68
68
|
require('../chunk-PUSVQ5Y2.js');
|
|
@@ -109,7 +109,7 @@ require('../chunk-EDYAMS5T.js');
|
|
|
109
109
|
require('../chunk-PQH6A3JH.js');
|
|
110
110
|
require('../chunk-NGI3QFNE.js');
|
|
111
111
|
require('../chunk-W3ZQ5XVC.js');
|
|
112
|
-
require('../chunk-
|
|
112
|
+
require('../chunk-7XWWI5EY.js');
|
|
113
113
|
require('../chunk-TZA4XQPO.js');
|
|
114
114
|
require('../chunk-RGJQ6FBN.js');
|
|
115
115
|
require('../chunk-AWOZ5IUF.js');
|
|
@@ -142,7 +142,7 @@ require('../chunk-CMZWDAYX.js');
|
|
|
142
142
|
require('../chunk-EMW2C4NG.js');
|
|
143
143
|
require('../chunk-S76F5KLP.js');
|
|
144
144
|
require('../chunk-YXYL4DPW.js');
|
|
145
|
-
require('../chunk-
|
|
145
|
+
require('../chunk-IUH7JW7H.js');
|
|
146
146
|
require('../chunk-CWMSE7LG.js');
|
|
147
147
|
require('../chunk-MLT2WG3F.js');
|
|
148
148
|
require('../chunk-7LXFZKOI.js');
|
|
@@ -160,14 +160,14 @@ require('../chunk-MFO4S7T5.js');
|
|
|
160
160
|
require('../chunk-ZW6L2ZQA.js');
|
|
161
161
|
require('../chunk-HA7IHFOE.js');
|
|
162
162
|
require('../chunk-HOVTCEHK.js');
|
|
163
|
-
require('../chunk-
|
|
163
|
+
require('../chunk-QHXJB5QM.js');
|
|
164
164
|
require('../chunk-BDP7HKY7.js');
|
|
165
165
|
require('../chunk-RLYFBIIW.js');
|
|
166
166
|
require('../chunk-WQMY5PKP.js');
|
|
167
167
|
require('../chunk-P7W2VN4K.js');
|
|
168
168
|
require('../chunk-25RDPHVC.js');
|
|
169
169
|
require('../chunk-JZZ5DD3R.js');
|
|
170
|
-
require('../chunk-
|
|
170
|
+
require('../chunk-CWTCN6F7.js');
|
|
171
171
|
require('../chunk-ZHWRUIVE.js');
|
|
172
172
|
require('../chunk-K5DJZ2JP.js');
|
|
173
173
|
require('../chunk-AOEUY6IS.js');
|
|
@@ -220,7 +220,7 @@ require('../chunk-Q24ESPTC.js');
|
|
|
220
220
|
require('../chunk-JR4KWECX.js');
|
|
221
221
|
require('../chunk-37P7JO3S.js');
|
|
222
222
|
require('../chunk-U4I5RYH2.js');
|
|
223
|
-
require('../chunk-
|
|
223
|
+
require('../chunk-MYQ2LJWO.js');
|
|
224
224
|
require('../chunk-CMUIZOUV.js');
|
|
225
225
|
require('../chunk-VHUCLOBH.js');
|
|
226
226
|
require('../chunk-YCIBW5F4.js');
|
|
@@ -246,7 +246,7 @@ require('../chunk-BJMKBBN3.js');
|
|
|
246
246
|
require('../chunk-MNU45FM3.js');
|
|
247
247
|
require('../chunk-XVBSGC7V.js');
|
|
248
248
|
require('../chunk-WWXDXIV7.js');
|
|
249
|
-
require('../chunk-
|
|
249
|
+
require('../chunk-Y64LT6BL.js');
|
|
250
250
|
require('../chunk-IWTNX7UB.js');
|
|
251
251
|
require('../chunk-ONWBFEW5.js');
|
|
252
252
|
require('../chunk-EBA7URWC.js');
|
|
@@ -266,5 +266,5 @@ require('../chunk-XX4WE4TL.js');
|
|
|
266
266
|
require('../chunk-YQ3JVMVB.js');
|
|
267
267
|
|
|
268
268
|
|
|
269
|
-
exports.UnifiedHistoryPage =
|
|
269
|
+
exports.UnifiedHistoryPage = _chunkQN32O3J3js.UnifiedHistoryPage;
|
|
270
270
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UnifiedHistoryPage
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-NAOHJW6H.mjs";
|
|
4
4
|
import "../chunk-RRID37Y3.mjs";
|
|
5
5
|
import "../chunk-A4IPM7UN.mjs";
|
|
6
6
|
import "../chunk-MVSTDYCK.mjs";
|
|
@@ -62,7 +62,7 @@ import "../chunk-RL26IDPE.mjs";
|
|
|
62
62
|
import "../chunk-WKIDESGP.mjs";
|
|
63
63
|
import "../chunk-RHQWRNOI.mjs";
|
|
64
64
|
import "../chunk-DZMWZNQK.mjs";
|
|
65
|
-
import "../chunk-
|
|
65
|
+
import "../chunk-CFTQ24UT.mjs";
|
|
66
66
|
import "../chunk-CERPYLMY.mjs";
|
|
67
67
|
import "../chunk-IQEDRSDD.mjs";
|
|
68
68
|
import "../chunk-WAPPT3UV.mjs";
|
|
@@ -109,7 +109,7 @@ import "../chunk-WJQCWDGQ.mjs";
|
|
|
109
109
|
import "../chunk-4D3QCMQO.mjs";
|
|
110
110
|
import "../chunk-QLYFZSVZ.mjs";
|
|
111
111
|
import "../chunk-NCWGCMGJ.mjs";
|
|
112
|
-
import "../chunk-
|
|
112
|
+
import "../chunk-CWGYVJTQ.mjs";
|
|
113
113
|
import "../chunk-MHRJKJBN.mjs";
|
|
114
114
|
import "../chunk-7J5Y7KZC.mjs";
|
|
115
115
|
import "../chunk-YQK6QCA7.mjs";
|
|
@@ -142,7 +142,7 @@ import "../chunk-HSAOQTUD.mjs";
|
|
|
142
142
|
import "../chunk-IFPB6M2V.mjs";
|
|
143
143
|
import "../chunk-HDGN7BLD.mjs";
|
|
144
144
|
import "../chunk-GCRKLKBV.mjs";
|
|
145
|
-
import "../chunk-
|
|
145
|
+
import "../chunk-CKSOC6YI.mjs";
|
|
146
146
|
import "../chunk-SVCPRMUU.mjs";
|
|
147
147
|
import "../chunk-I2F2MK7M.mjs";
|
|
148
148
|
import "../chunk-C42YIXWP.mjs";
|
|
@@ -160,14 +160,14 @@ import "../chunk-LXX5KU3O.mjs";
|
|
|
160
160
|
import "../chunk-CKTHUTMH.mjs";
|
|
161
161
|
import "../chunk-YPQFSNET.mjs";
|
|
162
162
|
import "../chunk-4QZWLI7Q.mjs";
|
|
163
|
-
import "../chunk-
|
|
163
|
+
import "../chunk-ENCFJBY5.mjs";
|
|
164
164
|
import "../chunk-WXHQGU23.mjs";
|
|
165
165
|
import "../chunk-FTNZFPQR.mjs";
|
|
166
166
|
import "../chunk-JHSDRHZJ.mjs";
|
|
167
167
|
import "../chunk-CIWVKSO7.mjs";
|
|
168
168
|
import "../chunk-GDK3MUFS.mjs";
|
|
169
169
|
import "../chunk-TBX2ZHCS.mjs";
|
|
170
|
-
import "../chunk-
|
|
170
|
+
import "../chunk-MUVQIQAG.mjs";
|
|
171
171
|
import "../chunk-GKY77WVA.mjs";
|
|
172
172
|
import "../chunk-6NB6QH76.mjs";
|
|
173
173
|
import "../chunk-FXWNTGCG.mjs";
|
|
@@ -220,7 +220,7 @@ import "../chunk-DIJR2YRE.mjs";
|
|
|
220
220
|
import "../chunk-NLK3GG73.mjs";
|
|
221
221
|
import "../chunk-DCCEYMYO.mjs";
|
|
222
222
|
import "../chunk-QZHSY53O.mjs";
|
|
223
|
-
import "../chunk-
|
|
223
|
+
import "../chunk-E4MLDRLD.mjs";
|
|
224
224
|
import "../chunk-LDBWF6EA.mjs";
|
|
225
225
|
import "../chunk-KR4RAVEW.mjs";
|
|
226
226
|
import "../chunk-REYQHCVW.mjs";
|
|
@@ -246,7 +246,7 @@ import "../chunk-OEW3ST4F.mjs";
|
|
|
246
246
|
import "../chunk-VDUO65VK.mjs";
|
|
247
247
|
import "../chunk-TVFP3HZX.mjs";
|
|
248
248
|
import "../chunk-VN4ORBHU.mjs";
|
|
249
|
-
import "../chunk-
|
|
249
|
+
import "../chunk-X2YQT5BS.mjs";
|
|
250
250
|
import "../chunk-DYMXY7CJ.mjs";
|
|
251
251
|
import "../chunk-SDXANFNM.mjs";
|
|
252
252
|
import "../chunk-624IUGB4.mjs";
|
|
@@ -348,17 +348,7 @@ function formatQuestionDuration(seconds) {
|
|
|
348
348
|
if (total <= 0) {
|
|
349
349
|
return null;
|
|
350
350
|
}
|
|
351
|
-
|
|
352
|
-
const minutes = Math.floor(total % 3600 / 60);
|
|
353
|
-
const secs = total % 60;
|
|
354
|
-
const paddedSeconds = String(secs).padStart(2, "0");
|
|
355
|
-
if (hours > 0) {
|
|
356
|
-
return `${hours}h${String(minutes).padStart(2, "0")}'${paddedSeconds}"`;
|
|
357
|
-
}
|
|
358
|
-
if (minutes > 0) {
|
|
359
|
-
return `${minutes}'${paddedSeconds}"`;
|
|
360
|
-
}
|
|
361
|
-
return `${secs}"`;
|
|
351
|
+
return _chunkFPOKJGC6js.formatTimeSpent.call(void 0, total);
|
|
362
352
|
}
|
|
363
353
|
|
|
364
354
|
// src/hooks/useSimulationCardDetails.ts
|
|
@@ -559,11 +549,8 @@ function SimulationQuestionItem({
|
|
|
559
549
|
const badge = _chunkBTZANNVOjs.getQuestionStatusBadgeConfig.call(void 0,
|
|
560
550
|
QUESTION_STATUS_MAP[question.status]
|
|
561
551
|
);
|
|
562
|
-
const label = [
|
|
563
|
-
|
|
564
|
-
question.subject,
|
|
565
|
-
formatQuestionDuration(question.timeSpent)
|
|
566
|
-
].filter(Boolean).join(" - ");
|
|
552
|
+
const label = [`Quest\xE3o ${index + 1}`, question.subject].filter(Boolean).join(" - ");
|
|
553
|
+
const duration = formatQuestionDuration(question.timeSpent);
|
|
567
554
|
const alternatives = question.options.map((option) => {
|
|
568
555
|
let status;
|
|
569
556
|
if (option.isCorrect) {
|
|
@@ -630,17 +617,27 @@ function SimulationQuestionItem({
|
|
|
630
617
|
value: question.questionId,
|
|
631
618
|
trigger: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-1 items-center justify-between gap-3 py-3", children: [
|
|
632
619
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkANT66KVKjs.Text_default, { size: "sm", weight: "bold", className: "min-w-0 text-text-950", children: label }),
|
|
633
|
-
/* @__PURE__ */ _jsxruntime.
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
"
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
620
|
+
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
621
|
+
duration && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
622
|
+
_chunkANT66KVKjs.Text_default,
|
|
623
|
+
{
|
|
624
|
+
size: "xs",
|
|
625
|
+
className: "whitespace-nowrap tabular-nums text-text-600",
|
|
626
|
+
children: duration
|
|
627
|
+
}
|
|
628
|
+
),
|
|
629
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
630
|
+
"span",
|
|
631
|
+
{
|
|
632
|
+
className: _chunkTN3AYOMVjs.cn.call(void 0,
|
|
633
|
+
"inline-flex shrink-0 items-center rounded-full px-2 py-0.5 text-xs font-medium",
|
|
634
|
+
badge.bgColor,
|
|
635
|
+
badge.textColor
|
|
636
|
+
),
|
|
637
|
+
children: badge.label
|
|
638
|
+
}
|
|
639
|
+
)
|
|
640
|
+
] })
|
|
644
641
|
] }),
|
|
645
642
|
contentClassName: "px-3 pb-3",
|
|
646
643
|
children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-3", children: [
|
|
@@ -1086,4 +1083,4 @@ function SimulationsDetailModal({
|
|
|
1086
1083
|
|
|
1087
1084
|
|
|
1088
1085
|
exports.buildSimulationMeta = buildSimulationMeta; exports.SectionTitle = SectionTitle; exports.DataCard = DataCard; exports.SimulationStatCards = SimulationStatCards; exports.ContentCards = ContentCards; exports.SimulationCardShell = SimulationCardShell; exports.StudentSummaryHeader = StudentSummaryHeader; exports.useSimulationCardDetails = useSimulationCardDetails; exports.SimulationQuestionItem = SimulationQuestionItem; exports.SimulationNoteRow = SimulationNoteRow; exports.SimulationAnswers = SimulationAnswers; exports.SimulationsDetailModal = SimulationsDetailModal;
|
|
1089
|
-
//# sourceMappingURL=chunk-
|
|
1086
|
+
//# sourceMappingURL=chunk-7XWWI5EY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/analytica-frontend-lib/analytica-frontend-lib/dist/chunk-7XWWI5EY.js","../src/components/SimulationsPage/SimulationsDetailModal.tsx","../src/components/shared/SimulationSummaryCards.tsx","../src/utils/simulatedScore.ts","../src/utils/questionDuration.ts","../src/hooks/useSimulationCardDetails.ts"],"names":["jsx","jsxs"],"mappings":"AAAA;AACE;AACF,sDAA4B;AAC5B;AACE;AACA;AACA;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACE;AACA;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACE;AACA;AACF,sDAA4B;AAC5B;AACA;ACrDA,8BAAqD;AAErD,qEAA8B;AAC9B,qDAAsB;ADsDtB;AACA;AEzDA,2DAAyB;AACzB,yEAAgC;AAChC,iEAA4B;AAC5B,yEAAgC;AF2DhC;AACA;AGhDO,SAAS,mBAAA,CAAoB,UAAA,EAA4B;AAC9D,EAAA,OAAA,CAAQ,WAAA,EAAa,EAAA,CAAA,CAAI,cAAA,CAAe,OAAA,EAAS;AAAA,IAC/C,qBAAA,EAAuB,CAAA;AAAA,IACvB,qBAAA,EAAuB;AAAA,EACzB,CAAC,CAAA;AACH;AHkDA;AACA;AEVI,+CAAA;AAjBG,SAAS,mBAAA,CAAoB,UAAA,EAA0C;AAC5E,EAAA,MAAM,MAAA,EAAkB,CAAC,CAAA;AACzB,EAAA,GAAA,CAAI,UAAA,CAAW,iBAAA,IAAqB,KAAA,CAAA,EAAW;AAC7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AAA;AACe,sBAAA;AACjB,sBAAA;AACbA,wBAAAA;AAAC,UAAA;AAAA,UAAA;AACO,YAAA;AACwC,YAAA;AAAA,UAAA;AAChD,QAAA;AAEEA,QAAAA;AAAC,UAAA;AAAA,UAAA;AACO,YAAA;AAC8C,YAAA;AAAA,UAAA;AACtD,QAAA;AAEJ,MAAA;AACF,IAAA;AAImB,IAAA;AACiB,sBAAA;AAE3B,MAAA;AAQA,QAAA;AAAA,QAAA;AAOC,UAAA;AACA,UAAA;AACoC,UAAA;AACA,UAAA;AACP,UAAA;AACJ,UAAA;AACiB,UAAA;AACJ,UAAA;AACf,UAAA;AACV,YAAA;AACb,UAAA;AAAA,QAAA;AAXkD,QAAA;AAcxD,MAAA;AAEJ,IAAA;AAIR,EAAA;AAEJ;ADqO8E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/analytica-frontend-lib/analytica-frontend-lib/dist/chunk-7XWWI5EY.js","sourcesContent":[null,"import { useEffect, useMemo, useRef, useState } from 'react';\nimport type { ChangeEvent } from 'react';\nimport { PaperclipIcon } from '@phosphor-icons/react/dist/csr/Paperclip';\nimport { XIcon } from '@phosphor-icons/react/dist/csr/X';\nimport Modal from '../Modal/Modal';\nimport Text from '../Text/Text';\nimport Button from '../Button/Button';\nimport TextArea from '../TextArea/TextArea';\nimport { CardAccordation } from '../Accordation';\nimport { SkeletonCard } from '../Skeleton/Skeleton';\nimport { QuestionCommentField } from '../shared/QuestionCommentField';\nimport {\n TrueFalseStatementList,\n type TrueFalseStatement,\n} from '../shared/TrueFalseStatementList';\nimport { ImageAnswerView } from '../shared/ImageAnswerView';\nimport { DEFAULT_IMAGE_TOLERANCE } from '../../utils/image/imageAnswer.utils';\nimport { AlternativesList } from '../Alternative/Alternative';\nimport { HtmlMathRenderer } from '../HtmlMathRenderer';\nimport { OptionStatus } from '../../enums/Options';\nimport { QUESTION_TYPE } from '../Quiz/useQuizStore';\nimport {\n getQuestionStatusBadgeConfig,\n QUESTION_STATUS,\n type QuestionStatus,\n} from '../../utils/studentActivityCorrection';\nimport {\n buildSimulationMeta,\n ContentCards,\n DataCard,\n SectionTitle,\n SimulationCardShell,\n SimulationStatCards,\n StudentSummaryHeader,\n} from '../shared/SimulationSummaryCards';\nimport { cn } from '../../utils/utils';\nimport { formatQuestionDuration } from '../../utils/questionDuration';\nimport { formatTimeSpent } from '../../utils/activityDetailsUtils';\nimport type { BaseApiClient } from '../../types/api';\nimport { createUseSimulations } from '../../hooks/useSimulations';\nimport {\n useSimulationCardDetails,\n type SimulationCardHandlers,\n type SimulationDetailState,\n type SimulationNoteState,\n} from '../../hooks/useSimulationCardDetails';\nimport type {\n SimulationsListData,\n SimulationDetailQuestion,\n StudentSimulationItem,\n NoteData,\n} from '../../types/simulations';\n\nexport interface SimulationsDetailModalProps {\n /** API client used to fetch the student's simulations */\n readonly api: BaseApiClient;\n readonly isOpen: boolean;\n readonly onClose: () => void;\n /** The student whose simulations are shown (null closes the modal) */\n readonly student: { userInstitutionId: string; name: string } | null;\n}\n\n/** Map the simulation question status to the shared correction status. */\nconst QUESTION_STATUS_MAP: Record<\n SimulationDetailQuestion['status'],\n QuestionStatus\n> = {\n CORRECT: QUESTION_STATUS.CORRETA,\n INCORRECT: QUESTION_STATUS.INCORRETA,\n BLANK: QUESTION_STATUS.EM_BRANCO,\n PENDING: QUESTION_STATUS.PENDENTE,\n};\n\n/** Label of the inner accordion holding the student's answer. */\nfunction getAnswerAccordionTitle(questionType: string): string {\n if (questionType === QUESTION_TYPE.DISSERTATIVA) {\n return 'Resposta do aluno';\n }\n if (questionType === QUESTION_TYPE.VERDADEIRO_FALSO) {\n return 'Afirmações';\n }\n if (questionType === QUESTION_TYPE.IMAGEM) {\n return 'Imagem';\n }\n return 'Alternativas';\n}\n\n// ---------------------------------------------------------------------------\n// Level 2 — Question (reuses the shared alternatives renderer + status badge)\n// ---------------------------------------------------------------------------\n\nexport interface SimulationQuestionItemProps {\n readonly question: SimulationDetailQuestion;\n /** Zero-based position in the simulation; shown as \"Questão N\". */\n readonly index: number;\n /** Persist the teacher comment on this question; an empty string clears it. */\n readonly onSaveComment: (comment: string) => Promise<void>;\n}\n\n/**\n * One question of a student's simulation: an accordion with the status badge\n * in its header and, inside, the statement, the student's answer (alternatives,\n * true/false marks, essay text or image click, by question type) and the\n * teacher comment field.\n *\n * Exported so consumers that list a student's simulations in their own layout\n * (the Desempenho report of the teacher app) render questions exactly as the\n * Simulados page does.\n */\nexport function SimulationQuestionItem({\n question,\n index,\n onSaveComment,\n}: SimulationQuestionItemProps) {\n const badge = getQuestionStatusBadgeConfig(\n QUESTION_STATUS_MAP[question.status]\n );\n\n // The subject only joins the label when the question has one mapped in the\n // knowledge matrix; without it the row falls back to a plain \"Questão N\".\n const label = [`Questão ${index + 1}`, question.subject]\n .filter(Boolean)\n .join(' - ');\n\n // Time spent sits on the right, next to the badge, and not glued to the\n // label: it is a measurement, read down the column against the other\n // questions, not part of the question's name. Null when it was never\n // measured, and then the row shows nothing rather than `00:00:00`.\n const duration = formatQuestionDuration(question.timeSpent);\n\n const alternatives = question.options.map((option) => {\n let status: OptionStatus;\n if (option.isCorrect) {\n status = OptionStatus.CORRECT;\n } else if (option.isSelected) {\n status = OptionStatus.INCORRECT;\n } else {\n status = OptionStatus.NEUTRAL;\n }\n return { label: option.option, value: option.id, status };\n });\n\n // An essay has no alternatives to show — it has the text the student wrote.\n // Rendering the \"Alternativas\" accordion for it produced an empty box and hid\n // the answer entirely, leaving the teacher to comment on nothing.\n const isEssay = question.questionType === QUESTION_TYPE.DISSERTATIVA;\n\n // True/false never writes `option_id`, so `isSelected` is always false and the\n // student's marks live in each option's `selectedValue`. Sending it through\n // the alternatives branch showed the answer key as if it were the student's\n // answer, and no mark at all.\n const isTrueFalse = question.questionType === QUESTION_TYPE.VERDADEIRO_FALSO;\n const trueFalseStatements: TrueFalseStatement[] = question.options.map(\n (option) => ({\n id: option.id,\n statement: option.option,\n studentMark: option.selectedValue ?? null,\n isTrue: option.isCorrect,\n })\n );\n\n // IMAGEM has no alternatives either: the answer is a point on an image. The\n // alternatives branch rendered the answer key's raw JSON as an option label,\n // painted green, and never showed where the student clicked.\n const isImage = question.questionType === QUESTION_TYPE.IMAGEM;\n\n /**\n * Render the student's answer, shaped by the question type.\n */\n const renderAnswerArea = () => {\n if (isImage) {\n return (\n <ImageAnswerView\n imageUrl={question.additionalContent ?? ''}\n correctPoint={question.correctPoint}\n studentPoint={\n question.imageAnswer\n ? {\n x: question.imageAnswer.coordinateX,\n y: question.imageAnswer.coordinateY,\n }\n : null\n }\n toleranceRadius={question.imageTolerance ?? DEFAULT_IMAGE_TOLERANCE}\n />\n );\n }\n\n if (isEssay) {\n return (\n <div className=\"rounded-lg border border-border-100 bg-background-50 p-3\">\n {question.answer ? (\n <HtmlMathRenderer\n content={question.answer}\n className=\"text-sm text-text-800\"\n />\n ) : (\n <Text size=\"sm\" className=\"text-text-600\">\n Nenhuma resposta fornecida\n </Text>\n )}\n </div>\n );\n }\n\n if (isTrueFalse) {\n return <TrueFalseStatementList statements={trueFalseStatements} />;\n }\n\n return (\n <AlternativesList\n mode=\"readonly\"\n layout=\"compact\"\n name={`question-${question.questionId}`}\n alternatives={alternatives}\n selectedValue={question.selectedOptionId ?? ''}\n />\n );\n };\n\n return (\n <CardAccordation\n value={question.questionId}\n trigger={\n <div className=\"flex flex-1 items-center justify-between gap-3 py-3\">\n <Text size=\"sm\" weight=\"bold\" className=\"min-w-0 text-text-950\">\n {label}\n </Text>\n <div className=\"flex shrink-0 items-center gap-2\">\n {duration && (\n <Text\n size=\"xs\"\n className=\"whitespace-nowrap tabular-nums text-text-600\"\n >\n {duration}\n </Text>\n )}\n <span\n className={cn(\n 'inline-flex shrink-0 items-center rounded-full px-2 py-0.5 text-xs font-medium',\n badge.bgColor,\n badge.textColor\n )}\n >\n {badge.label}\n </span>\n </div>\n </div>\n }\n contentClassName=\"px-3 pb-3\"\n >\n <div className=\"flex flex-col gap-3\">\n <HtmlMathRenderer\n content={question.statement}\n className=\"text-sm text-text-800\"\n />\n <CardAccordation\n value={`${question.questionId}-answer`}\n trigger={\n <div className=\"flex-1 py-2\">\n <Text size=\"sm\" weight=\"medium\" className=\"text-text-950\">\n {getAnswerAccordionTitle(question.questionType)}\n </Text>\n </div>\n }\n contentClassName=\"px-3 pb-3\"\n >\n {renderAnswerArea()}\n </CardAccordation>\n <QuestionCommentField\n value={question.teacherComment ?? ''}\n onSave={onSaveComment}\n />\n </div>\n </CardAccordation>\n );\n}\n\n// ---------------------------------------------------------------------------\n// Note (\"Observação\")\n// ---------------------------------------------------------------------------\n\nexport interface SimulationNoteRowProps {\n /** Current observation, null when the teacher never wrote one. */\n readonly note: NoteData | null;\n readonly loading: boolean;\n /**\n * Message of a failed load. While it is set the row offers a retry instead\n * of the editor: writing over a note that could not be read would replace\n * it, and this save has no version to protect it.\n */\n readonly loadError?: string | null;\n /** Load the observation again; required whenever `loadError` can be set. */\n readonly onRetry?: () => void;\n /**\n * Persist the observation. `text` is already trimmed and non-empty; `file`\n * is a newly chosen attachment still to be uploaded (null when none), and\n * `existingAttachment` is the URL of the saved file the teacher kept — null\n * when there was none, when it was removed, or when a new file replaces it.\n */\n readonly onSave: (\n text: string,\n file: File | null,\n existingAttachment: string | null\n ) => Promise<void>;\n}\n\n/**\n * Human label of an attachment URL: its file name, or a generic word when the\n * URL carries none.\n */\nfunction getAttachmentLabel(url: string): string {\n const lastSegment = url.split('?')[0].split('/').pop() ?? '';\n try {\n return decodeURIComponent(lastSegment) || 'Anexo';\n } catch {\n return lastSegment || 'Anexo';\n }\n}\n\n/**\n * Grey pill naming an attached file. Links to the file when `href` is given\n * and offers a remove button when `onRemove` is given — the same chip the\n * activity correction modal uses for its observation attachment.\n */\nfunction AttachmentChip({\n label,\n href,\n onRemove,\n}: {\n readonly label: string;\n readonly href?: string;\n readonly onRemove?: () => void;\n}) {\n const content = (\n <>\n <PaperclipIcon size={18} className=\"shrink-0 text-text-800\" />\n <span className=\"truncate text-md font-medium text-text-800\">\n {label}\n </span>\n </>\n );\n\n return (\n <div className=\"flex h-10 min-w-0 max-w-[220px] items-center gap-2 rounded-full bg-secondary-500 px-5\">\n {href ? (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"flex min-w-0 items-center gap-2 hover:underline\"\n >\n {content}\n </a>\n ) : (\n content\n )}\n {onRemove && (\n <button\n type=\"button\"\n onClick={onRemove}\n className=\"shrink-0 text-text-700 hover:text-text-950\"\n aria-label={`Remover ${label}`}\n >\n <XIcon size={18} />\n </button>\n )}\n </div>\n );\n}\n\n/**\n * The simulation-wide teacher observation: a row with the saved text, the\n * attached file (if any) and an \"Incluir\"/\"Editar\" button that swaps into a\n * textarea with \"Anexar\" and \"Salvar\" — the same flow as the observation of\n * the activity correction modal.\n *\n * Exported for the same reason as {@link SimulationQuestionItem}.\n */\nexport function SimulationNoteRow({\n note,\n loading,\n loadError,\n onRetry,\n onSave,\n}: SimulationNoteRowProps) {\n const [editing, setEditing] = useState(false);\n const [draft, setDraft] = useState('');\n const [saving, setSaving] = useState(false);\n const [error, setError] = useState<string | null>(null);\n /** File chosen in this editing session, not uploaded yet. */\n const [pendingFile, setPendingFile] = useState<File | null>(null);\n /** Saved attachment the teacher is keeping; null once removed. */\n const [keptAttachment, setKeptAttachment] = useState<string | null>(null);\n const fileInputRef = useRef<HTMLInputElement>(null);\n\n const savedAttachment = note?.attachment ?? null;\n\n const startEditing = () => {\n setDraft(note?.note ?? '');\n setPendingFile(null);\n setKeptAttachment(savedAttachment);\n setError(null);\n setEditing(true);\n };\n\n const handleFileChange = (event: ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files?.[0] ?? null;\n if (file) setPendingFile(file);\n // Reset so the same file can be picked again after being removed.\n event.target.value = '';\n };\n\n const handleSave = async () => {\n if (!draft.trim()) return;\n setSaving(true);\n setError(null);\n try {\n await onSave(\n draft.trim(),\n pendingFile,\n pendingFile ? null : keptAttachment\n );\n setEditing(false);\n } catch {\n // Keep the editing UI open (draft preserved) and surface the failure.\n setError('Erro ao salvar a observação. Tente novamente.');\n } finally {\n setSaving(false);\n }\n };\n\n /** Left side of the footer: the chosen/kept file, or the \"Anexar\" button. */\n const renderAttachmentControl = () => {\n if (pendingFile) {\n return (\n <AttachmentChip\n label={pendingFile.name}\n onRemove={() => setPendingFile(null)}\n />\n );\n }\n if (keptAttachment) {\n return (\n <AttachmentChip\n label={getAttachmentLabel(keptAttachment)}\n href={keptAttachment}\n onRemove={() => setKeptAttachment(null)}\n />\n );\n }\n return (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"medium\"\n onClick={() => fileInputRef.current?.click()}\n className=\"flex items-center gap-2\"\n >\n <PaperclipIcon size={18} />\n Anexar\n </Button>\n );\n };\n\n if (loading) {\n return <SkeletonCard className=\"h-14\" />;\n }\n\n if (loadError) {\n return (\n <div className=\"flex items-center justify-between gap-2 rounded-lg border border-border-200 bg-background p-4\">\n <div className=\"flex min-w-0 flex-1 flex-col gap-1\">\n <Text size=\"md\" weight=\"bold\" className=\"text-text-950\">\n Observação\n </Text>\n <Text size=\"sm\" className=\"text-error-600\">\n {loadError}\n </Text>\n </div>\n {onRetry && (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"medium\"\n onClick={onRetry}\n className=\"shrink-0\"\n >\n Tentar novamente\n </Button>\n )}\n </div>\n );\n }\n\n if (editing) {\n return (\n <div className=\"flex flex-col gap-4 rounded-lg border border-border-200 bg-background p-4\">\n <Text size=\"md\" weight=\"bold\" className=\"text-text-950\">\n Observação\n </Text>\n <TextArea\n value={draft}\n onChange={(e) => setDraft(e.target.value)}\n placeholder=\"Escreva uma observação para este simulado\"\n rows={3}\n />\n {error && (\n <Text size=\"sm\" className=\"text-error-600\">\n {error}\n </Text>\n )}\n {/* Only images: the pre-signed upload endpoint accepts nothing else. */}\n <input\n type=\"file\"\n ref={fileInputRef}\n className=\"hidden\"\n accept=\"image/*\"\n onChange={handleFileChange}\n aria-label=\"Selecionar arquivo\"\n />\n <div className=\"flex flex-col-reverse gap-3 sm:flex-row sm:items-center sm:justify-between\">\n {renderAttachmentControl()}\n <Button\n type=\"button\"\n variant=\"solid\"\n size=\"medium\"\n onClick={handleSave}\n disabled={saving || !draft.trim()}\n >\n Salvar\n </Button>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"flex items-center justify-between gap-2 rounded-lg border border-border-200 bg-background p-4\">\n <div className=\"flex min-w-0 flex-1 flex-col gap-1\">\n <Text size=\"md\" weight=\"bold\" className=\"text-text-950\">\n Observação\n </Text>\n {note?.note && (\n <Text size=\"sm\" className=\"truncate text-text-700\">\n {note.note}\n </Text>\n )}\n </div>\n <div className=\"flex shrink-0 items-center gap-2\">\n {savedAttachment && (\n <AttachmentChip\n label={getAttachmentLabel(savedAttachment)}\n href={savedAttachment}\n />\n )}\n <Button\n type=\"button\"\n variant=\"solid\"\n size=\"medium\"\n onClick={startEditing}\n >\n {note?.note ? 'Editar' : 'Incluir'}\n </Button>\n </div>\n </div>\n );\n}\n\n// ---------------------------------------------------------------------------\n// Level 1 — Simulation\n// ---------------------------------------------------------------------------\n\n/**\n * Observation and question list of one simulado, loaded when its card is\n * first expanded.\n */\nexport function SimulationAnswers({\n detail,\n note,\n onRetryNote,\n onSaveNote,\n onSaveQuestionComment,\n}: {\n readonly detail: SimulationDetailState | undefined;\n readonly note: SimulationNoteState | undefined;\n /** Load the observation again after a failed request */\n readonly onRetryNote: () => void;\n readonly onSaveNote: SimulationNoteRowProps['onSave'];\n readonly onSaveQuestionComment: (\n questionId: string,\n comment: string\n ) => Promise<void>;\n}) {\n if (!detail || detail.loading) {\n return <SkeletonCard className=\"h-40\" />;\n }\n\n if (detail.error) {\n return (\n <Text size=\"sm\" className=\"text-error-600\">\n {detail.error}\n </Text>\n );\n }\n\n if (!detail.data) return null;\n\n return (\n <>\n <SimulationNoteRow\n note={note?.data ?? null}\n loading={note?.loading ?? false}\n loadError={note?.error ?? null}\n onRetry={onRetryNote}\n onSave={onSaveNote}\n />\n\n <div className=\"flex flex-col gap-2 pt-2\">\n <Text as=\"h4\" size=\"lg\" weight=\"bold\" className=\"text-text-950\">\n Respostas\n </Text>\n {detail.data.questions.map((question, qIndex) => (\n <SimulationQuestionItem\n key={question.questionId}\n question={question}\n index={qIndex}\n onSaveComment={(comment) =>\n onSaveQuestionComment(question.questionId, comment)\n }\n />\n ))}\n </div>\n </>\n );\n}\n\nfunction SimulationItem({\n simulation,\n index,\n expanded,\n onToggle,\n detail,\n note,\n onRetryNote,\n onSaveNote,\n onSaveQuestionComment,\n}: SimulationCardHandlers & {\n readonly simulation: StudentSimulationItem;\n readonly index: number;\n readonly expanded: boolean;\n readonly onToggle: () => void;\n}) {\n const title = simulation.title?.trim()\n ? simulation.title.trim()\n : `Simulado ${index + 1}`;\n const meta = buildSimulationMeta(simulation);\n\n return (\n <SimulationCardShell\n value={simulation.id}\n title={title}\n meta={meta}\n correct={simulation.correctCount}\n totalQuestions={simulation.totalQuestions}\n expanded={expanded}\n onToggle={onToggle}\n >\n <SimulationStatCards\n score={simulation.score}\n correct={simulation.correctCount}\n incorrect={simulation.incorrectCount}\n blank={simulation.blankCount}\n />\n {/* Essays awaiting grading used to be counted as blank. */}\n {detail?.data && detail.data.counts.pending > 0 && (\n <Text size=\"sm\" className=\"text-text-600\">\n {`${detail.data.counts.pending} ${detail.data.counts.pending === 1 ? 'questão dissertativa aguarda' : 'questões dissertativas aguardam'} correção`}\n </Text>\n )}\n <ContentCards\n best={simulation.bestContent ?? null}\n worst={simulation.worstContent ?? null}\n />\n {expanded && (\n <SimulationAnswers\n detail={detail}\n note={note}\n onRetryNote={onRetryNote}\n onSaveNote={onSaveNote}\n onSaveQuestionComment={onSaveQuestionComment}\n />\n )}\n </SimulationCardShell>\n );\n}\n\n// ---------------------------------------------------------------------------\n// Modal\n// ---------------------------------------------------------------------------\n\n/**\n * Modal that shows a single student's answered simulations as a nested\n * accordion (simulation -> question -> options), lazily loading each\n * simulation's detail when it is expanded. Reuses the shared StatCard and\n * AlternativesList components so the detail matches the activity correction UI.\n */\nexport function SimulationsDetailModal({\n api,\n isOpen,\n onClose,\n student,\n}: SimulationsDetailModalProps) {\n const useSimulations = useMemo(() => createUseSimulations(api), [api]);\n const { fetchStudentSimulations } = useSimulations();\n\n const [list, setList] = useState<SimulationsListData | null>(null);\n const [listLoading, setListLoading] = useState(false);\n const [listError, setListError] = useState<string | null>(null);\n\n const {\n expandedId,\n details,\n notes,\n toggle,\n retryNote,\n makeSaveNote,\n makeSaveQuestionComment,\n } = useSimulationCardDetails({\n api,\n userInstitutionId: student?.userInstitutionId ?? null,\n isOpen,\n });\n\n useEffect(() => {\n if (!isOpen || !student) return;\n\n setList(null);\n setListLoading(true);\n setListError(null);\n\n let active = true;\n fetchStudentSimulations(student.userInstitutionId)\n .then((data) => {\n if (active) setList(data);\n })\n .catch(() => {\n if (active) setListError('Erro ao carregar os simulados do estudante');\n })\n .finally(() => {\n if (active) setListLoading(false);\n });\n\n return () => {\n active = false;\n };\n }, [isOpen, student, fetchStudentSimulations]);\n\n return (\n <Modal isOpen={isOpen} onClose={onClose} title=\"Simulados\" size=\"xl\">\n {student && (\n <div className=\"flex max-h-[70vh] flex-col gap-6 overflow-y-auto pr-1\">\n <StudentSummaryHeader\n name={student.name}\n location={[\n list?.student.school,\n list?.student.class,\n list?.student.schoolYear,\n ]}\n />\n\n {listLoading && (\n <>\n <SkeletonCard className=\"h-20\" />\n <SkeletonCard className=\"h-40\" />\n </>\n )}\n {listError && (\n <Text size=\"sm\" className=\"text-error-600\">\n {listError}\n </Text>\n )}\n\n {list && (\n <section className=\"flex flex-col gap-3\">\n <SectionTitle>Dados de simulados</SectionTitle>\n <div className=\"flex flex-col gap-2 md:flex-row\">\n <DataCard\n label=\"Simulados realizados\"\n value={String(list.student.simulationsAnswered)}\n />\n {list.student.totalTimeSeconds !== undefined && (\n <DataCard\n label=\"Tempo total\"\n value={formatTimeSpent(list.student.totalTimeSeconds)}\n />\n )}\n </div>\n </section>\n )}\n\n {list && (\n <section className=\"flex flex-col gap-3\">\n <SectionTitle>Simulados realizados</SectionTitle>\n {list.simulations.data.length === 0 ? (\n <div className=\"flex items-center justify-center rounded-xl border border-border-50 bg-background p-6\">\n <Text size=\"sm\" className=\"text-text-600\">\n Este estudante ainda não respondeu nenhum simulado.\n </Text>\n </div>\n ) : (\n <div className=\"flex flex-col gap-2\">\n {list.simulations.data.map((simulation, index) => (\n <SimulationItem\n // Keyed by the student too: the comment fields below keep\n // a dirty draft through a `value` change so an in-flight\n // save cannot discard it, and a note written for one\n // student must never survive into another. Remounting\n // resets it for free.\n key={`${student.userInstitutionId}-${simulation.id}`}\n simulation={simulation}\n index={index}\n expanded={expandedId === simulation.id}\n onToggle={() => toggle(simulation.id)}\n detail={details[simulation.id]}\n note={notes[simulation.id]}\n onRetryNote={() => retryNote(simulation.id)}\n onSaveNote={makeSaveNote(simulation.id)}\n onSaveQuestionComment={makeSaveQuestionComment(\n simulation.id\n )}\n />\n ))}\n </div>\n )}\n </section>\n )}\n </div>\n )}\n </Modal>\n );\n}\n","import type { ReactNode } from 'react';\nimport { ExamIcon } from '@phosphor-icons/react/dist/csr/Exam';\nimport { CheckCircleIcon } from '@phosphor-icons/react/dist/csr/CheckCircle';\nimport { XCircleIcon } from '@phosphor-icons/react/dist/csr/XCircle';\nimport { MinusCircleIcon } from '@phosphor-icons/react/dist/csr/MinusCircle';\nimport Text from '../Text/Text';\nimport ProgressBar from '../ProgressBar/ProgressBar';\nimport { CardAccordation } from '../Accordation';\nimport { UserIcon } from '../UserIcon/UserIcon';\nimport { cn } from '../../utils/utils';\nimport { formatScoreOutOfTen } from '../../utils/simulatedScore';\nimport {\n formatDateToBrazilian,\n formatTimeSpent,\n} from '../../utils/activityDetailsUtils';\n\n/**\n * Summary blocks of a student's simulados: header, \"Dados de simulados\" cards,\n * the coloured stat cards and the best/worst subtema pair.\n *\n * Shared by the two modals that show them — the Simulados page modal and the\n * Simulados report modal — so the design is described once. Everything here is\n * presentational: it takes already-fetched numbers and returns markup.\n */\n\n/**\n * The only field these cards read from a subtema, so both the Simulados page\n * shape and the report shape satisfy it.\n */\nexport interface SimulationContentSummary {\n readonly contentName: string;\n}\n\n/** The fields the \"Duração · Nota · Feito em\" line reads from a simulado. */\nexport interface SimulationMetaSource {\n readonly timeSpentSeconds?: number;\n readonly score?: number;\n readonly answeredAt?: string | null;\n}\n\n/**\n * \"Duração · Nota · Feito em\" line of a simulado card. Each segment only joins\n * when its field came in the payload, so an older backend shows a shorter line\n * instead of \"undefined\".\n */\nexport function buildSimulationMeta(simulation: SimulationMetaSource): string {\n const parts: string[] = [];\n if (simulation.timeSpentSeconds !== undefined) {\n parts.push(`Duração: ${formatTimeSpent(simulation.timeSpentSeconds)}`);\n }\n if (simulation.score !== undefined) {\n parts.push(`Nota: ${formatScoreOutOfTen(simulation.score)}`);\n }\n if (simulation.answeredAt) {\n parts.push(`Feito em: ${formatDateToBrazilian(simulation.answeredAt)}`);\n }\n return parts.join(' · ');\n}\n\n/** Section heading, \"Dados de simulados\" and its siblings (14px bold). */\nexport function SectionTitle({ children }: { readonly children: ReactNode }) {\n return (\n <Text as=\"h3\" size=\"sm\" weight=\"bold\" className=\"text-text-950\">\n {children}\n </Text>\n );\n}\n\n/**\n * White card with a centred uppercase label and the value in a rectangular\n * info badge: the \"Dados de simulados\" pair.\n */\nexport function DataCard({\n label,\n value,\n}: {\n readonly label: string;\n readonly value: string;\n}) {\n return (\n <div className=\"flex flex-1 flex-col items-center gap-2 rounded-xl border border-border-50 bg-background px-3 py-4\">\n <Text\n size=\"2xs\"\n weight=\"medium\"\n className=\"text-center uppercase text-text-800\"\n >\n {label}\n </Text>\n <span className=\"rounded-sm bg-info-background px-2 py-1 text-sm text-info-800\">\n {value}\n </span>\n </div>\n );\n}\n\n/** Tone of a coloured stat card; each maps to one token family. */\ntype StatTone = 'grade' | 'correct' | 'incorrect' | 'blank';\n\nconst STAT_TONE_CLASSES: Record<\n StatTone,\n { card: string; circle: string; icon: string; value: string }\n> = {\n grade: {\n card: 'bg-warning-background',\n circle: 'bg-warning-300',\n icon: 'text-text',\n value: 'text-warning-600',\n },\n correct: {\n card: 'bg-success-200',\n circle: 'bg-indicator-positive',\n icon: 'text-text-950',\n value: 'text-success-700',\n },\n incorrect: {\n card: 'bg-error-100',\n circle: 'bg-error-500',\n icon: 'text-text',\n value: 'text-error-700',\n },\n blank: {\n card: 'bg-info-background',\n circle: 'bg-info-500',\n icon: 'text-text',\n value: 'text-info-700',\n },\n};\n\n/**\n * Coloured stat card, laid out as a centred column: icon in a circle, tiny\n * uppercase label and the large value.\n */\nfunction SimulationStatCard({\n tone,\n icon,\n label,\n value,\n}: {\n readonly tone: StatTone;\n readonly icon: ReactNode;\n readonly label: string;\n readonly value: string;\n}) {\n const classes = STAT_TONE_CLASSES[tone];\n return (\n <div\n className={cn(\n 'flex flex-1 flex-col items-center gap-1 rounded-xl border border-border-50 px-3 py-4',\n classes.card\n )}\n >\n <span\n className={cn(\n 'flex size-8 shrink-0 items-center justify-center rounded-full',\n classes.circle,\n classes.icon\n )}\n >\n {icon}\n </span>\n <Text\n as=\"span\"\n weight=\"bold\"\n className=\"text-center text-[8px] leading-3 uppercase text-text-800\"\n >\n {label}\n </Text>\n <Text\n size=\"xl\"\n weight=\"bold\"\n className={cn('text-center', classes.value)}\n >\n {value}\n </Text>\n </div>\n );\n}\n\n/**\n * The four cards of a cut: grade, correct, incorrect and blank. The grade card\n * is skipped when no score was sent, so an older API still renders the three\n * counts it always had.\n */\nexport function SimulationStatCards({\n score,\n correct,\n incorrect,\n blank,\n}: {\n readonly score: number | undefined;\n readonly correct: number;\n readonly incorrect: number;\n readonly blank: number;\n}) {\n return (\n <div className=\"grid grid-cols-2 gap-2 lg:grid-cols-4\">\n {score !== undefined && (\n <SimulationStatCard\n tone=\"grade\"\n icon={<ExamIcon size={16} weight=\"bold\" />}\n label=\"Nota média\"\n value={formatScoreOutOfTen(score)}\n />\n )}\n <SimulationStatCard\n tone=\"correct\"\n icon={<CheckCircleIcon size={16} weight=\"bold\" />}\n label=\"Nº de questões corretas\"\n value={String(correct)}\n />\n <SimulationStatCard\n tone=\"incorrect\"\n icon={<XCircleIcon size={16} weight=\"bold\" />}\n label=\"Nº de questões incorretas\"\n value={String(incorrect)}\n />\n <SimulationStatCard\n tone=\"blank\"\n icon={<MinusCircleIcon size={16} weight=\"bold\" />}\n label=\"Nº de questões em branco\"\n value={String(blank)}\n />\n </div>\n );\n}\n\n/** One subtema card: centred coloured label over the content name. */\nfunction ContentCard({\n label,\n labelClassName,\n content,\n}: {\n readonly label: string;\n readonly labelClassName: string;\n readonly content: SimulationContentSummary | null;\n}) {\n return (\n <div className=\"flex flex-1 flex-col items-center gap-2 rounded-xl border border-border-50 bg-background p-4\">\n <Text\n size=\"2xs\"\n weight=\"medium\"\n className={cn('text-center uppercase', labelClassName)}\n >\n {label}\n </Text>\n <Text size=\"md\" className=\"text-center text-text-950\">\n {content?.contentName ?? '—'}\n </Text>\n </div>\n );\n}\n\n/** Best/worst subtema pair; \"—\" when the cut has no answered content. */\nexport function ContentCards({\n best,\n worst,\n}: {\n readonly best: SimulationContentSummary | null;\n readonly worst: SimulationContentSummary | null;\n}) {\n return (\n <div className=\"grid grid-cols-1 gap-2 md:grid-cols-2\">\n <ContentCard\n label=\"Subtema com melhor resultado\"\n labelClassName=\"text-success-300\"\n content={best}\n />\n <ContentCard\n label=\"Subtema com maior dificuldade\"\n labelClassName=\"text-error-300\"\n content={worst}\n />\n </div>\n );\n}\n\n/**\n * Expandable card of one simulado: title and meta line on top, the hit\n * progress below, and whatever the caller renders inside.\n *\n * The two modals list simulados from different endpoints, with different field\n * names, but the card itself is the same object on screen — so the shape lives\n * here and each caller passes the values it has.\n */\nexport function SimulationCardShell({\n value,\n title,\n meta,\n correct,\n totalQuestions,\n expanded,\n onToggle,\n children,\n}: {\n /** Accordion id, unique within the list */\n readonly value: string;\n readonly title: string;\n /** \"Duração · Nota · Feito em\"; an empty string hides the line */\n readonly meta: string;\n readonly correct: number;\n readonly totalQuestions: number;\n readonly expanded: boolean;\n readonly onToggle: () => void;\n readonly children: ReactNode;\n}) {\n return (\n <CardAccordation\n value={value}\n expanded={expanded}\n onToggleExpanded={onToggle}\n triggerClassName=\"p-4\"\n contentClassName=\"flex flex-col gap-4 pt-0\"\n trigger={\n <div className=\"flex min-w-0 flex-1 flex-col gap-2\">\n <div className=\"flex items-center justify-between gap-3\">\n <Text size=\"lg\" weight=\"bold\" className=\"min-w-0 text-text-950\">\n {title}\n </Text>\n {meta && (\n <Text\n size=\"xs\"\n weight=\"semibold\"\n className=\"shrink-0 text-text-600\"\n >\n {meta}\n </Text>\n )}\n </div>\n <div className=\"flex items-center gap-2\">\n <ProgressBar\n value={correct}\n max={totalQuestions}\n variant=\"green\"\n size=\"small\"\n className=\"flex-1\"\n />\n <Text size=\"xs\" weight=\"medium\" className=\"shrink-0 text-text-950\">\n {`${correct} de ${totalQuestions} corretas`}\n </Text>\n </div>\n </div>\n }\n >\n {children}\n </CardAccordation>\n );\n}\n\n/**\n * Header: avatar, name, an optional badge and \"Escola • Turma • Ano\".\n *\n * `location` takes the parts in display order and drops the empty ones, so a\n * caller whose payload has not arrived yet simply shows the name alone.\n */\nexport function StudentSummaryHeader({\n name,\n location,\n badge,\n}: {\n readonly name: string;\n readonly location: readonly (string | null | undefined)[];\n readonly badge?: ReactNode;\n}) {\n const parts = location.filter((part): part is string => Boolean(part));\n\n return (\n <div className=\"flex flex-col gap-2 border-b border-border-200 pb-4\">\n <div className=\"flex items-center gap-2\">\n <UserIcon size={24} className=\"shrink-0\" />\n <Text size=\"md\" className=\"min-w-0 flex-1 truncate text-text-950\">\n {name}\n </Text>\n {badge}\n </div>\n {parts.length > 0 && (\n <div className=\"flex flex-wrap items-center gap-2\">\n {parts.map((part, index) => (\n <span key={part} className=\"flex items-center gap-2\">\n {index > 0 && (\n <span\n aria-hidden=\"true\"\n className=\"size-1 rounded-full bg-border-600\"\n />\n )}\n <Text size=\"xs\" className=\"text-text-600\">\n {part}\n </Text>\n </span>\n ))}\n </div>\n )}\n </div>\n );\n}\n","/**\n * Format a 0-100 score as a 0-10 grade with one decimal, in pt-BR.\n *\n * The simulados stack carries scores as percentages, while every screen shows\n * them as a grade out of ten. Keeping the conversion in one place is what stops\n * the modal, the table and the cards from rounding differently.\n *\n * @param percentage - Score in the 0-100 scale\n * @returns The grade as a pt-BR string, e.g. `'7,1'`\n *\n * @example\n * ```typescript\n * formatScoreOutOfTen(71.25); // '7,1'\n * formatScoreOutOfTen(100); // '10,0'\n * ```\n */\nexport function formatScoreOutOfTen(percentage: number): string {\n return (percentage / 10).toLocaleString('pt-BR', {\n minimumFractionDigits: 1,\n maximumFractionDigits: 1,\n });\n}\n","import { formatTimeSpent } from './activityDetailsUtils';\n\n/**\n * Format the time a student spent on a single question, the way the relatórios\n * of simulados present it: `HH:MM:SS` (`00:00:40`, `00:02:30`, `01:05:30`).\n *\n * The clock format is shared with `formatTimeSpent`, which renders the activity\n * and simulado totals — a question row and the \"Tempo total\" card above it read\n * the same way instead of each inventing its own notation.\n *\n * What this adds on top is the \"not measured\" rule: it returns `null` when\n * there is nothing meaningful to show — the value is zero, absent, negative or\n * not finite. Zero is not the same as \"answered instantly\": simulations\n * answered before per-question telemetry existed carry a zero, and so does a\n * question the student never opened. Rendering `00:00:00` there would read as\n * \"the student guessed\", which is the opposite of what the teacher should\n * conclude. Callers drop the whole segment from the row instead.\n *\n * @param seconds - Time spent in seconds\n * @returns Formatted duration in `HH:MM:SS`, or null when there is no measured time\n *\n * @example\n * ```typescript\n * formatQuestionDuration(150); // \"00:02:30\"\n * formatQuestionDuration(0); // null\n * ```\n */\nexport function formatQuestionDuration(\n seconds: number | null | undefined\n): string | null {\n if (seconds === null || seconds === undefined || !Number.isFinite(seconds)) {\n return null;\n }\n\n // Truncate before the zero check, not after: a fractional value below one\n // second floors to 0 and must take the same \"not measured\" path as a plain\n // 0, otherwise it would render a misleading `00:00:00`.\n const total = Math.floor(seconds);\n if (total <= 0) {\n return null;\n }\n\n return formatTimeSpent(total);\n}\n","import { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport type { BaseApiClient } from '../types/api';\nimport type { NoteData, SimulationDetailData } from '../types/simulations';\nimport { createUseSimulations } from './useSimulations';\n\n/** Lazily loaded question detail of one simulado. */\nexport interface SimulationDetailState {\n readonly loading: boolean;\n readonly error: string | null;\n readonly data: SimulationDetailData | null;\n}\n\n/**\n * Lazily loaded teacher observation of one simulado.\n *\n * `error` exists so a failed request is never shown as \"this simulado has no\n * observation\": that would offer the teacher an empty field whose save is a\n * create-or-replace, silently overwriting a note they were never shown.\n */\nexport interface SimulationNoteState {\n readonly loading: boolean;\n readonly error: string | null;\n readonly data: NoteData | null;\n}\n\n/** Save handler of one simulado's observation, as the note row expects it. */\nexport type SaveSimulationNote = (\n text: string,\n file: File | null,\n existingAttachment: string | null\n) => Promise<void>;\n\n/**\n * What one simulado card needs from this hook: the two loaded pieces and the\n * three actions on them, already bound to that simulado.\n */\nexport interface SimulationCardHandlers {\n readonly detail: SimulationDetailState | undefined;\n readonly note: SimulationNoteState | undefined;\n /** Load the observation again after a failed request */\n readonly onRetryNote: () => void;\n readonly onSaveNote: SaveSimulationNote;\n readonly onSaveQuestionComment: (\n questionId: string,\n comment: string\n ) => Promise<void>;\n}\n\nexport interface UseSimulationCardDetailsParams {\n /** API client used to load and save the per-simulado data */\n readonly api: BaseApiClient;\n /** Enrollment whose simulados are listed; null while there is no student */\n readonly userInstitutionId: string | null;\n /** Whether the modal is open; reopening starts a fresh session */\n readonly isOpen: boolean;\n}\n\nexport interface UseSimulationCardDetailsReturn {\n readonly expandedId: string | null;\n readonly details: Record<string, SimulationDetailState>;\n readonly notes: Record<string, SimulationNoteState>;\n /** Expand or collapse one simulado, loading its data the first time */\n readonly toggle: (simulationId: string) => void;\n /** Load the observation again after a failed request */\n readonly retryNote: (simulationId: string) => void;\n readonly makeSaveNote: (simulationId: string) => SaveSimulationNote;\n readonly makeSaveQuestionComment: (\n simulationId: string\n ) => (questionId: string, comment: string) => Promise<void>;\n}\n\n/**\n * Per-simulado detail state of a student's simulados modal.\n *\n * Owns what both modals that list simulados need: which card is expanded, the\n * questions and observation of each expanded card, and the two save actions.\n * The list itself stays with the caller, because each modal gets it from a\n * different endpoint.\n *\n * Responses are tagged with a session. The session changes whenever the modal\n * opens, the student changes or the API client changes, and a response from an\n * older session is dropped instead of written into the current one.\n *\n * @param params - API client, the enrollment being shown and the open flag\n * @returns Expanded card, loaded details and notes, and the actions on them\n *\n * @example\n * ```tsx\n * const { expandedId, details, notes, toggle } = useSimulationCardDetails({\n * api,\n * userInstitutionId: student?.userInstitutionId ?? null,\n * isOpen,\n * });\n * ```\n */\nexport function useSimulationCardDetails({\n api,\n userInstitutionId,\n isOpen,\n}: UseSimulationCardDetailsParams): UseSimulationCardDetailsReturn {\n const useSimulations = useMemo(() => createUseSimulations(api), [api]);\n const {\n fetchSimulationDetail,\n fetchNote,\n uploadNoteAttachment,\n saveNote,\n saveQuestionComment,\n } = useSimulations();\n\n const [expandedId, setExpandedId] = useState<string | null>(null);\n const [details, setDetails] = useState<Record<string, SimulationDetailState>>(\n {}\n );\n const [notes, setNotes] = useState<Record<string, SimulationNoteState>>({});\n\n // Guards state updates against the modal unmounting mid-request.\n const mountedRef = useRef(true);\n useEffect(() => {\n mountedRef.current = true;\n return () => {\n mountedRef.current = false;\n };\n }, []);\n\n // Bumped on every new session, so a slow response from the previous student\n // (or from a replaced API client) is dropped instead of written into the\n // current one.\n const sessionRef = useRef(0);\n useEffect(() => {\n sessionRef.current += 1;\n setExpandedId(null);\n setDetails({});\n setNotes({});\n }, [isOpen, userInstitutionId, api]);\n\n const isStale = useCallback(\n (session: number) => !mountedRef.current || sessionRef.current !== session,\n []\n );\n\n const loadDetail = useCallback(\n (enrollmentId: string, simulationId: string) => {\n const session = sessionRef.current;\n setDetails((previous) => ({\n ...previous,\n [simulationId]: { loading: true, error: null, data: null },\n }));\n fetchSimulationDetail(enrollmentId, simulationId)\n .then((data) => {\n if (isStale(session)) return;\n setDetails((previous) => ({\n ...previous,\n [simulationId]: { loading: false, error: null, data },\n }));\n })\n .catch(() => {\n if (isStale(session)) return;\n setDetails((previous) => ({\n ...previous,\n [simulationId]: {\n loading: false,\n error: 'Erro ao carregar o simulado',\n data: null,\n },\n }));\n });\n },\n [fetchSimulationDetail, isStale]\n );\n\n const loadNote = useCallback(\n (enrollmentId: string, simulationId: string) => {\n const session = sessionRef.current;\n setNotes((previous) => ({\n ...previous,\n [simulationId]: { loading: true, error: null, data: null },\n }));\n fetchNote(enrollmentId, simulationId)\n .then((data) => {\n if (isStale(session)) return;\n setNotes((previous) => ({\n ...previous,\n [simulationId]: { loading: false, error: null, data },\n }));\n })\n .catch(() => {\n if (isStale(session)) return;\n setNotes((previous) => ({\n ...previous,\n [simulationId]: {\n loading: false,\n error: 'Erro ao carregar a observação',\n data: null,\n },\n }));\n });\n },\n [fetchNote, isStale]\n );\n\n const toggle = useCallback(\n (simulationId: string) => {\n if (!userInstitutionId) return;\n const next = expandedId === simulationId ? null : simulationId;\n setExpandedId(next);\n if (!next) return;\n\n // The two requests are guarded separately: a loaded detail must not stop\n // the observation from being fetched, and the other way around.\n if (!details[simulationId]) loadDetail(userInstitutionId, simulationId);\n if (!notes[simulationId]) loadNote(userInstitutionId, simulationId);\n },\n [userInstitutionId, expandedId, details, notes, loadDetail, loadNote]\n );\n\n const retryNote = useCallback(\n (simulationId: string) => {\n if (!userInstitutionId) return;\n loadNote(userInstitutionId, simulationId);\n },\n [userInstitutionId, loadNote]\n );\n\n /**\n * Save the observation of one simulado, uploading a newly chosen file first\n * so only its public URL travels with the note.\n */\n const makeSaveNote = useCallback(\n (simulationId: string): SaveSimulationNote =>\n async (text, file, existingAttachment) => {\n if (!userInstitutionId) return;\n const session = sessionRef.current;\n const attachment = file\n ? await uploadNoteAttachment(file)\n : existingAttachment;\n const saved = await saveNote(\n userInstitutionId,\n simulationId,\n text,\n attachment\n );\n if (isStale(session)) return;\n setNotes((previous) => ({\n ...previous,\n [simulationId]: { loading: false, error: null, data: saved },\n }));\n },\n [userInstitutionId, uploadNoteAttachment, saveNote, isStale]\n );\n\n /**\n * Save a comment on one question and reflect it in the loaded detail, so the\n * field shows what the server now holds without a refetch.\n */\n const makeSaveQuestionComment = useCallback(\n (simulationId: string) => async (questionId: string, comment: string) => {\n if (!userInstitutionId) return;\n const session = sessionRef.current;\n const saved = await saveQuestionComment(\n userInstitutionId,\n simulationId,\n questionId,\n comment\n );\n if (isStale(session)) return;\n setDetails((previous) => {\n const current = previous[simulationId];\n if (!current?.data) return previous;\n return {\n ...previous,\n [simulationId]: {\n ...current,\n data: {\n ...current.data,\n questions: current.data.questions.map((question) =>\n question.questionId === questionId\n ? { ...question, teacherComment: saved?.teacherComment ?? '' }\n : question\n ),\n },\n },\n };\n });\n },\n [userInstitutionId, saveQuestionComment, isStale]\n );\n\n return {\n expandedId,\n details,\n notes,\n toggle,\n retryNote,\n makeSaveNote,\n makeSaveQuestionComment,\n };\n}\n"]}
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
DropdownMenuItem,
|
|
27
27
|
DropdownMenuTrigger,
|
|
28
28
|
DropdownMenu_default
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-X2YQT5BS.mjs";
|
|
30
30
|
import {
|
|
31
31
|
Modal_default
|
|
32
32
|
} from "./chunk-SDXANFNM.mjs";
|
|
@@ -932,4 +932,4 @@ export {
|
|
|
932
932
|
Forum,
|
|
933
933
|
Forum_default
|
|
934
934
|
};
|
|
935
|
-
//# sourceMappingURL=chunk-
|
|
935
|
+
//# sourceMappingURL=chunk-CFTQ24UT.mjs.map
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
} from "./chunk-GNLZTQRR.mjs";
|
|
7
7
|
import {
|
|
8
8
|
NotificationCard_default
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ENCFJBY5.mjs";
|
|
10
10
|
import {
|
|
11
11
|
CalendarCard_default
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MUVQIQAG.mjs";
|
|
13
13
|
import {
|
|
14
14
|
useMobile
|
|
15
15
|
} from "./chunk-GKY77WVA.mjs";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
ProfileMenuInfo,
|
|
30
30
|
ProfileMenuSection,
|
|
31
31
|
ProfileToggleTheme
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-X2YQT5BS.mjs";
|
|
33
33
|
import {
|
|
34
34
|
Text_default
|
|
35
35
|
} from "./chunk-IMCIR6TJ.mjs";
|
|
@@ -238,6 +238,7 @@ var AppHeader = ({
|
|
|
238
238
|
IconButton_default,
|
|
239
239
|
{
|
|
240
240
|
active: activeStates.profile,
|
|
241
|
+
"aria-label": "Abrir menu de perfil",
|
|
241
242
|
onClick: () => toggleActive("profile"),
|
|
242
243
|
icon: /* @__PURE__ */ jsx(
|
|
243
244
|
UserIcon,
|
|
@@ -309,4 +310,4 @@ export {
|
|
|
309
310
|
AppHeader,
|
|
310
311
|
AppHeader_default
|
|
311
312
|
};
|
|
312
|
-
//# sourceMappingURL=chunk-
|
|
313
|
+
//# sourceMappingURL=chunk-CKSOC6YI.mjs.map
|