analytica-frontend-lib 1.0.95 → 1.0.96
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/Quiz/index.d.mts +5 -1
- package/dist/Quiz/index.d.ts +5 -1
- package/dist/Quiz/index.js +450 -178
- package/dist/Quiz/index.js.map +1 -1
- package/dist/Quiz/index.mjs +445 -170
- package/dist/Quiz/index.mjs.map +1 -1
- package/dist/Quiz/useQuizStore/index.d.mts +12 -2
- package/dist/Quiz/useQuizStore/index.d.ts +12 -2
- package/dist/Quiz/useQuizStore/index.js +115 -16
- package/dist/Quiz/useQuizStore/index.js.map +1 -1
- package/dist/Quiz/useQuizStore/index.mjs +114 -16
- package/dist/Quiz/useQuizStore/index.mjs.map +1 -1
- package/dist/Select/index.d.mts +2 -1
- package/dist/Select/index.d.ts +2 -1
- package/dist/Select/index.js +22 -18
- package/dist/Select/index.js.map +1 -1
- package/dist/Select/index.mjs +22 -18
- package/dist/Select/index.mjs.map +1 -1
- package/dist/index.css +12 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +203 -65
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +201 -65
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +12 -0
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/Quiz/index.mjs
CHANGED
|
@@ -932,10 +932,10 @@ var IconButton_default = IconButton;
|
|
|
932
932
|
|
|
933
933
|
// src/components/Quiz/Quiz.tsx
|
|
934
934
|
import {
|
|
935
|
-
forwardRef as
|
|
935
|
+
forwardRef as forwardRef10,
|
|
936
936
|
useEffect as useEffect7,
|
|
937
937
|
useMemo,
|
|
938
|
-
useState as
|
|
938
|
+
useState as useState7,
|
|
939
939
|
useCallback,
|
|
940
940
|
useRef as useRef5
|
|
941
941
|
} from "react";
|
|
@@ -1022,6 +1022,10 @@ var useQuizStore = create2()(
|
|
|
1022
1022
|
console.warn("selectAnswer called before userId is set");
|
|
1023
1023
|
return;
|
|
1024
1024
|
}
|
|
1025
|
+
const question = activeQuiz.quiz.questions.find(
|
|
1026
|
+
(q) => q.id === questionId
|
|
1027
|
+
);
|
|
1028
|
+
if (!question) return;
|
|
1025
1029
|
const existingAnswerIndex = userAnswers.findIndex(
|
|
1026
1030
|
(answer) => answer.questionId === questionId
|
|
1027
1031
|
);
|
|
@@ -1029,8 +1033,10 @@ var useQuizStore = create2()(
|
|
|
1029
1033
|
questionId,
|
|
1030
1034
|
activityId,
|
|
1031
1035
|
userId,
|
|
1032
|
-
answer: null,
|
|
1033
|
-
optionId: answerId
|
|
1036
|
+
answer: question.type === "DISSERTATIVA" /* DISSERTATIVA */ ? answerId : null,
|
|
1037
|
+
optionId: question.type === "DISSERTATIVA" /* DISSERTATIVA */ ? null : answerId,
|
|
1038
|
+
questionType: question.type,
|
|
1039
|
+
answerStatus: "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */
|
|
1034
1040
|
};
|
|
1035
1041
|
let updatedUserAnswers;
|
|
1036
1042
|
if (existingAnswerIndex !== -1) {
|
|
@@ -1053,6 +1059,10 @@ var useQuizStore = create2()(
|
|
|
1053
1059
|
console.warn("selectMultipleAnswer called before userId is set");
|
|
1054
1060
|
return;
|
|
1055
1061
|
}
|
|
1062
|
+
const question = activeQuiz.quiz.questions.find(
|
|
1063
|
+
(q) => q.id === questionId
|
|
1064
|
+
);
|
|
1065
|
+
if (!question) return;
|
|
1056
1066
|
const filteredUserAnswers = userAnswers.filter(
|
|
1057
1067
|
(answer) => answer.questionId !== questionId
|
|
1058
1068
|
);
|
|
@@ -1062,7 +1072,11 @@ var useQuizStore = create2()(
|
|
|
1062
1072
|
activityId,
|
|
1063
1073
|
userId,
|
|
1064
1074
|
answer: null,
|
|
1065
|
-
|
|
1075
|
+
// selectMultipleAnswer is for non-dissertative questions
|
|
1076
|
+
optionId: answerId,
|
|
1077
|
+
// selectMultipleAnswer should only set optionId
|
|
1078
|
+
questionType: question.type,
|
|
1079
|
+
answerStatus: "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */
|
|
1066
1080
|
})
|
|
1067
1081
|
);
|
|
1068
1082
|
const updatedUserAnswers = [
|
|
@@ -1073,6 +1087,50 @@ var useQuizStore = create2()(
|
|
|
1073
1087
|
userAnswers: updatedUserAnswers
|
|
1074
1088
|
});
|
|
1075
1089
|
},
|
|
1090
|
+
selectDissertativeAnswer: (questionId, answer) => {
|
|
1091
|
+
const { getActiveQuiz, userAnswers } = get();
|
|
1092
|
+
const activeQuiz = getActiveQuiz();
|
|
1093
|
+
if (!activeQuiz) return;
|
|
1094
|
+
const activityId = activeQuiz.quiz.id;
|
|
1095
|
+
const userId = get().getUserId();
|
|
1096
|
+
if (!userId || userId === "") {
|
|
1097
|
+
console.warn(
|
|
1098
|
+
"selectDissertativeAnswer called before userId is set"
|
|
1099
|
+
);
|
|
1100
|
+
return;
|
|
1101
|
+
}
|
|
1102
|
+
const question = activeQuiz.quiz.questions.find(
|
|
1103
|
+
(q) => q.id === questionId
|
|
1104
|
+
);
|
|
1105
|
+
if (!question || question.type !== "DISSERTATIVA" /* DISSERTATIVA */) {
|
|
1106
|
+
console.warn(
|
|
1107
|
+
"selectDissertativeAnswer called for non-dissertative question"
|
|
1108
|
+
);
|
|
1109
|
+
return;
|
|
1110
|
+
}
|
|
1111
|
+
const existingAnswerIndex = userAnswers.findIndex(
|
|
1112
|
+
(answerItem) => answerItem.questionId === questionId
|
|
1113
|
+
);
|
|
1114
|
+
const newUserAnswer = {
|
|
1115
|
+
questionId,
|
|
1116
|
+
activityId,
|
|
1117
|
+
userId,
|
|
1118
|
+
answer,
|
|
1119
|
+
optionId: null,
|
|
1120
|
+
questionType: "DISSERTATIVA" /* DISSERTATIVA */,
|
|
1121
|
+
answerStatus: "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */
|
|
1122
|
+
};
|
|
1123
|
+
let updatedUserAnswers;
|
|
1124
|
+
if (existingAnswerIndex !== -1) {
|
|
1125
|
+
updatedUserAnswers = [...userAnswers];
|
|
1126
|
+
updatedUserAnswers[existingAnswerIndex] = newUserAnswer;
|
|
1127
|
+
} else {
|
|
1128
|
+
updatedUserAnswers = [...userAnswers, newUserAnswer];
|
|
1129
|
+
}
|
|
1130
|
+
set({
|
|
1131
|
+
userAnswers: updatedUserAnswers
|
|
1132
|
+
});
|
|
1133
|
+
},
|
|
1076
1134
|
skipQuestion: () => {
|
|
1077
1135
|
const { getCurrentQuestion, userAnswers, getActiveQuiz } = get();
|
|
1078
1136
|
const currentQuestion = getCurrentQuestion();
|
|
@@ -1093,7 +1151,9 @@ var useQuizStore = create2()(
|
|
|
1093
1151
|
activityId,
|
|
1094
1152
|
userId,
|
|
1095
1153
|
answer: null,
|
|
1096
|
-
optionId: null
|
|
1154
|
+
optionId: null,
|
|
1155
|
+
questionType: currentQuestion.type,
|
|
1156
|
+
answerStatus: "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */
|
|
1097
1157
|
};
|
|
1098
1158
|
let updatedUserAnswers;
|
|
1099
1159
|
if (existingAnswerIndex !== -1) {
|
|
@@ -1117,6 +1177,10 @@ var useQuizStore = create2()(
|
|
|
1117
1177
|
console.warn("addUserAnswer called before userId is set");
|
|
1118
1178
|
return;
|
|
1119
1179
|
}
|
|
1180
|
+
const question = activeQuiz.quiz.questions.find(
|
|
1181
|
+
(q) => q.id === questionId
|
|
1182
|
+
);
|
|
1183
|
+
if (!question) return;
|
|
1120
1184
|
const existingAnswerIndex = userAnswers.findIndex(
|
|
1121
1185
|
(answer) => answer.questionId === questionId
|
|
1122
1186
|
);
|
|
@@ -1124,8 +1188,10 @@ var useQuizStore = create2()(
|
|
|
1124
1188
|
questionId,
|
|
1125
1189
|
activityId,
|
|
1126
1190
|
userId,
|
|
1127
|
-
answer: null,
|
|
1128
|
-
optionId: answerId || null
|
|
1191
|
+
answer: question.type === "DISSERTATIVA" /* DISSERTATIVA */ ? answerId || null : null,
|
|
1192
|
+
optionId: question.type !== "DISSERTATIVA" /* DISSERTATIVA */ ? answerId || null : null,
|
|
1193
|
+
questionType: question.type,
|
|
1194
|
+
answerStatus: "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */
|
|
1129
1195
|
};
|
|
1130
1196
|
if (existingAnswerIndex !== -1) {
|
|
1131
1197
|
const updatedUserAnswers = [...userAnswers];
|
|
@@ -1175,7 +1241,9 @@ var useQuizStore = create2()(
|
|
|
1175
1241
|
},
|
|
1176
1242
|
getAnsweredQuestions: () => {
|
|
1177
1243
|
const { userAnswers } = get();
|
|
1178
|
-
return userAnswers.filter(
|
|
1244
|
+
return userAnswers.filter(
|
|
1245
|
+
(answer) => answer.optionId !== null || answer.answer !== null
|
|
1246
|
+
).length;
|
|
1179
1247
|
},
|
|
1180
1248
|
getUnansweredQuestions: () => {
|
|
1181
1249
|
const { getActiveQuiz, userAnswers } = get();
|
|
@@ -1186,8 +1254,8 @@ var useQuizStore = create2()(
|
|
|
1186
1254
|
const userAnswer = userAnswers.find(
|
|
1187
1255
|
(answer) => answer.questionId === question.id
|
|
1188
1256
|
);
|
|
1189
|
-
const isAnswered = userAnswer && userAnswer.optionId !== null;
|
|
1190
|
-
const isSkipped = userAnswer && userAnswer.optionId === null;
|
|
1257
|
+
const isAnswered = userAnswer && (userAnswer.optionId !== null || userAnswer.answer !== null);
|
|
1258
|
+
const isSkipped = userAnswer && userAnswer.optionId === null && userAnswer.answer === null;
|
|
1191
1259
|
if (!isAnswered && !isSkipped) {
|
|
1192
1260
|
unansweredQuestions.push(index + 1);
|
|
1193
1261
|
}
|
|
@@ -1196,7 +1264,9 @@ var useQuizStore = create2()(
|
|
|
1196
1264
|
},
|
|
1197
1265
|
getSkippedQuestions: () => {
|
|
1198
1266
|
const { userAnswers } = get();
|
|
1199
|
-
return userAnswers.filter(
|
|
1267
|
+
return userAnswers.filter(
|
|
1268
|
+
(answer) => answer.optionId === null && answer.answer === null
|
|
1269
|
+
).length;
|
|
1200
1270
|
},
|
|
1201
1271
|
getProgress: () => {
|
|
1202
1272
|
const { getTotalQuestions, getAnsweredQuestions } = get();
|
|
@@ -1209,14 +1279,14 @@ var useQuizStore = create2()(
|
|
|
1209
1279
|
const userAnswer = userAnswers.find(
|
|
1210
1280
|
(answer) => answer.questionId === questionId
|
|
1211
1281
|
);
|
|
1212
|
-
return userAnswer ? userAnswer.optionId !== null : false;
|
|
1282
|
+
return userAnswer ? userAnswer.optionId !== null || userAnswer.answer !== null : false;
|
|
1213
1283
|
},
|
|
1214
1284
|
isQuestionSkipped: (questionId) => {
|
|
1215
1285
|
const { userAnswers } = get();
|
|
1216
1286
|
const userAnswer = userAnswers.find(
|
|
1217
1287
|
(answer) => answer.questionId === questionId
|
|
1218
1288
|
);
|
|
1219
|
-
return userAnswer ? userAnswer.optionId === null : false;
|
|
1289
|
+
return userAnswer ? userAnswer.optionId === null && userAnswer.answer === null : false;
|
|
1220
1290
|
},
|
|
1221
1291
|
getCurrentAnswer: () => {
|
|
1222
1292
|
const { getCurrentQuestion, userAnswers } = get();
|
|
@@ -1225,7 +1295,7 @@ var useQuizStore = create2()(
|
|
|
1225
1295
|
const userAnswer = userAnswers.find(
|
|
1226
1296
|
(answer) => answer.questionId === currentQuestion.id
|
|
1227
1297
|
);
|
|
1228
|
-
return userAnswer
|
|
1298
|
+
return userAnswer;
|
|
1229
1299
|
},
|
|
1230
1300
|
getAllCurrentAnswer: () => {
|
|
1231
1301
|
const { getCurrentQuestion, userAnswers } = get();
|
|
@@ -1259,8 +1329,8 @@ var useQuizStore = create2()(
|
|
|
1259
1329
|
const userAnswer = userAnswers.find(
|
|
1260
1330
|
(answer) => answer.questionId === question.id
|
|
1261
1331
|
);
|
|
1262
|
-
const hasAnswer = userAnswer && userAnswer.optionId !== null;
|
|
1263
|
-
const isSkipped = userAnswer && userAnswer.optionId === null;
|
|
1332
|
+
const hasAnswer = userAnswer && (userAnswer.optionId !== null || userAnswer.answer !== null);
|
|
1333
|
+
const isSkipped = userAnswer && userAnswer.optionId === null && userAnswer.answer === null;
|
|
1264
1334
|
if (!hasAnswer || isSkipped) {
|
|
1265
1335
|
unansweredQuestions.push(index + 1);
|
|
1266
1336
|
}
|
|
@@ -1291,7 +1361,7 @@ var useQuizStore = create2()(
|
|
|
1291
1361
|
const answer = userAnswers.find(
|
|
1292
1362
|
(answer2) => answer2.questionId === questionId
|
|
1293
1363
|
);
|
|
1294
|
-
return answer ? answer.optionId !== null : false;
|
|
1364
|
+
return answer ? answer.optionId !== null || answer.answer !== null : false;
|
|
1295
1365
|
},
|
|
1296
1366
|
getQuestionStatusFromUserAnswers: (questionId) => {
|
|
1297
1367
|
const { userAnswers } = get();
|
|
@@ -1320,6 +1390,27 @@ var useQuizStore = create2()(
|
|
|
1320
1390
|
return;
|
|
1321
1391
|
}
|
|
1322
1392
|
set({ currentQuestionIndex: questionIndex });
|
|
1393
|
+
},
|
|
1394
|
+
setAnswerStatus: (questionId, status) => {
|
|
1395
|
+
const { userAnswers } = get();
|
|
1396
|
+
const existingAnswerIndex = userAnswers.findIndex(
|
|
1397
|
+
(answer) => answer.questionId === questionId
|
|
1398
|
+
);
|
|
1399
|
+
if (existingAnswerIndex !== -1) {
|
|
1400
|
+
const updatedUserAnswers = [...userAnswers];
|
|
1401
|
+
updatedUserAnswers[existingAnswerIndex] = {
|
|
1402
|
+
...updatedUserAnswers[existingAnswerIndex],
|
|
1403
|
+
answerStatus: status
|
|
1404
|
+
};
|
|
1405
|
+
set({ userAnswers: updatedUserAnswers });
|
|
1406
|
+
}
|
|
1407
|
+
},
|
|
1408
|
+
getAnswerStatus: (questionId) => {
|
|
1409
|
+
const { userAnswers } = get();
|
|
1410
|
+
const userAnswer = userAnswers.find(
|
|
1411
|
+
(answer) => answer.questionId === questionId
|
|
1412
|
+
);
|
|
1413
|
+
return userAnswer ? userAnswer.answerStatus : null;
|
|
1323
1414
|
}
|
|
1324
1415
|
};
|
|
1325
1416
|
},
|
|
@@ -1566,9 +1657,9 @@ import {
|
|
|
1566
1657
|
import { CaretDown, Check, WarningCircle } from "phosphor-react";
|
|
1567
1658
|
import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1568
1659
|
var VARIANT_CLASSES = {
|
|
1569
|
-
outlined: "border rounded-lg focus:border-primary-950",
|
|
1570
|
-
underlined: "border-b focus:border-primary-950",
|
|
1571
|
-
rounded: "border rounded-full focus:border-primary-950"
|
|
1660
|
+
outlined: "border-2 rounded-lg focus:border-primary-950",
|
|
1661
|
+
underlined: "border-b-2 focus:border-primary-950",
|
|
1662
|
+
rounded: "border-2 rounded-full focus:border-primary-950"
|
|
1572
1663
|
};
|
|
1573
1664
|
var SIZE_CLASSES6 = {
|
|
1574
1665
|
small: "text-sm",
|
|
@@ -1653,6 +1744,7 @@ var injectStore2 = (children, store, size, selectId) => {
|
|
|
1653
1744
|
var Select = ({
|
|
1654
1745
|
children,
|
|
1655
1746
|
defaultValue = "",
|
|
1747
|
+
className,
|
|
1656
1748
|
value: propValue,
|
|
1657
1749
|
onValueChange,
|
|
1658
1750
|
size = "small",
|
|
@@ -1734,7 +1826,7 @@ var Select = ({
|
|
|
1734
1826
|
}
|
|
1735
1827
|
}, [propValue]);
|
|
1736
1828
|
const sizeClasses = SIZE_CLASSES6[size];
|
|
1737
|
-
return /* @__PURE__ */ jsxs7("div", { className: "w-
|
|
1829
|
+
return /* @__PURE__ */ jsxs7("div", { className: cn("w-auto", className), children: [
|
|
1738
1830
|
label && /* @__PURE__ */ jsx9(
|
|
1739
1831
|
"label",
|
|
1740
1832
|
{
|
|
@@ -1743,8 +1835,8 @@ var Select = ({
|
|
|
1743
1835
|
children: label
|
|
1744
1836
|
}
|
|
1745
1837
|
),
|
|
1746
|
-
/* @__PURE__ */ jsx9("div", { className: cn("relative"
|
|
1747
|
-
/* @__PURE__ */ jsxs7("div", { className: "mt-1.5 gap-1.5", children: [
|
|
1838
|
+
/* @__PURE__ */ jsx9("div", { className: cn("relative"), ref: selectRef, children: injectStore2(children, store, size, selectId) }),
|
|
1839
|
+
(helperText || errorMessage) && /* @__PURE__ */ jsxs7("div", { className: "mt-1.5 gap-1.5", children: [
|
|
1748
1840
|
helperText && /* @__PURE__ */ jsx9("p", { className: "text-sm text-text-500", children: helperText }),
|
|
1749
1841
|
errorMessage && /* @__PURE__ */ jsxs7("p", { className: "flex gap-1 items-center text-sm text-indicator-error", children: [
|
|
1750
1842
|
/* @__PURE__ */ jsx9(WarningCircle, { size: 16 }),
|
|
@@ -1785,15 +1877,16 @@ var SelectTrigger = forwardRef5(
|
|
|
1785
1877
|
{
|
|
1786
1878
|
ref,
|
|
1787
1879
|
id: selectId,
|
|
1788
|
-
className:
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1880
|
+
className: cn(
|
|
1881
|
+
"flex w-full items-center justify-between border-border-300",
|
|
1882
|
+
heightClasses,
|
|
1883
|
+
paddingClasses,
|
|
1884
|
+
invalid && `${variant == "underlined" ? "border-b-2" : "border-2"} border-indicator-error text-text-600`,
|
|
1885
|
+
disabled ? "cursor-not-allowed text-text-400 pointer-events-none opacity-50" : "cursor-pointer hover:bg-background-50 focus:bg-accent focus:text-accent-foreground hover:bg-accent hover:text-accent-foreground",
|
|
1886
|
+
!invalid && !disabled ? "text-text-700" : "",
|
|
1887
|
+
variantClasses,
|
|
1888
|
+
className
|
|
1889
|
+
),
|
|
1797
1890
|
onClick: toggleOpen,
|
|
1798
1891
|
"aria-expanded": open,
|
|
1799
1892
|
"aria-haspopup": "listbox",
|
|
@@ -1866,10 +1959,12 @@ var SelectItem = forwardRef5(
|
|
|
1866
1959
|
const handleClick = (e) => {
|
|
1867
1960
|
const labelNode = getLabelAsNode(children);
|
|
1868
1961
|
if (!disabled) {
|
|
1869
|
-
|
|
1870
|
-
|
|
1962
|
+
const newValue = selectedValue === value ? "" : value;
|
|
1963
|
+
const newLabel = selectedValue === value ? "" : labelNode;
|
|
1964
|
+
setValue(newValue);
|
|
1965
|
+
setSelectedLabel(newLabel);
|
|
1871
1966
|
setOpen(false);
|
|
1872
|
-
onValueChange?.(
|
|
1967
|
+
onValueChange?.(newValue);
|
|
1873
1968
|
}
|
|
1874
1969
|
props.onClick?.(e);
|
|
1875
1970
|
};
|
|
@@ -4256,10 +4351,150 @@ var MultipleChoiceList = ({
|
|
|
4256
4351
|
);
|
|
4257
4352
|
};
|
|
4258
4353
|
|
|
4354
|
+
// src/components/TextArea/TextArea.tsx
|
|
4355
|
+
import {
|
|
4356
|
+
forwardRef as forwardRef9,
|
|
4357
|
+
useState as useState6,
|
|
4358
|
+
useId as useId6
|
|
4359
|
+
} from "react";
|
|
4360
|
+
import { WarningCircle as WarningCircle2 } from "phosphor-react";
|
|
4361
|
+
import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4362
|
+
var SIZE_CLASSES10 = {
|
|
4363
|
+
small: {
|
|
4364
|
+
textarea: "h-24 text-sm",
|
|
4365
|
+
// 96px height, 14px font
|
|
4366
|
+
textSize: "sm"
|
|
4367
|
+
},
|
|
4368
|
+
medium: {
|
|
4369
|
+
textarea: "h-24 text-base",
|
|
4370
|
+
// 96px height, 16px font
|
|
4371
|
+
textSize: "md"
|
|
4372
|
+
},
|
|
4373
|
+
large: {
|
|
4374
|
+
textarea: "h-24 text-lg",
|
|
4375
|
+
// 96px height, 18px font
|
|
4376
|
+
textSize: "lg"
|
|
4377
|
+
},
|
|
4378
|
+
extraLarge: {
|
|
4379
|
+
textarea: "h-24 text-xl",
|
|
4380
|
+
// 96px height, 20px font
|
|
4381
|
+
textSize: "xl"
|
|
4382
|
+
}
|
|
4383
|
+
};
|
|
4384
|
+
var BASE_TEXTAREA_CLASSES = "w-full box-border p-3 bg-background border border-solid rounded-[4px] resize-none focus:outline-none font-roboto font-normal leading-[150%] placeholder:text-text-600 transition-all duration-200";
|
|
4385
|
+
var STATE_CLASSES3 = {
|
|
4386
|
+
default: {
|
|
4387
|
+
base: "border-border-300 bg-background text-text-600",
|
|
4388
|
+
hover: "hover:border-border-400",
|
|
4389
|
+
focus: "focus:border-border-500"
|
|
4390
|
+
},
|
|
4391
|
+
hovered: {
|
|
4392
|
+
base: "border-border-400 bg-background text-text-600",
|
|
4393
|
+
hover: "",
|
|
4394
|
+
focus: "focus:border-border-500"
|
|
4395
|
+
},
|
|
4396
|
+
focused: {
|
|
4397
|
+
base: "border-2 border-primary-950 bg-background text-text-900",
|
|
4398
|
+
hover: "",
|
|
4399
|
+
focus: ""
|
|
4400
|
+
},
|
|
4401
|
+
invalid: {
|
|
4402
|
+
base: "border-2 border-red-700 bg-white text-gray-800",
|
|
4403
|
+
hover: "hover:border-red-700",
|
|
4404
|
+
focus: "focus:border-red-700"
|
|
4405
|
+
},
|
|
4406
|
+
disabled: {
|
|
4407
|
+
base: "border-border-300 bg-background text-text-600 cursor-not-allowed opacity-40",
|
|
4408
|
+
hover: "",
|
|
4409
|
+
focus: ""
|
|
4410
|
+
}
|
|
4411
|
+
};
|
|
4412
|
+
var TextArea = forwardRef9(
|
|
4413
|
+
({
|
|
4414
|
+
label,
|
|
4415
|
+
size = "medium",
|
|
4416
|
+
state = "default",
|
|
4417
|
+
errorMessage,
|
|
4418
|
+
helperMessage,
|
|
4419
|
+
className = "",
|
|
4420
|
+
labelClassName = "",
|
|
4421
|
+
disabled,
|
|
4422
|
+
id,
|
|
4423
|
+
onChange,
|
|
4424
|
+
placeholder,
|
|
4425
|
+
...props
|
|
4426
|
+
}, ref) => {
|
|
4427
|
+
const generatedId = useId6();
|
|
4428
|
+
const inputId = id ?? `textarea-${generatedId}`;
|
|
4429
|
+
const [isFocused, setIsFocused] = useState6(false);
|
|
4430
|
+
const handleChange = (event) => {
|
|
4431
|
+
onChange?.(event);
|
|
4432
|
+
};
|
|
4433
|
+
const handleFocus = (event) => {
|
|
4434
|
+
setIsFocused(true);
|
|
4435
|
+
props.onFocus?.(event);
|
|
4436
|
+
};
|
|
4437
|
+
const handleBlur = (event) => {
|
|
4438
|
+
setIsFocused(false);
|
|
4439
|
+
props.onBlur?.(event);
|
|
4440
|
+
};
|
|
4441
|
+
let currentState = disabled ? "disabled" : state;
|
|
4442
|
+
if (isFocused && currentState !== "invalid" && currentState !== "disabled") {
|
|
4443
|
+
currentState = "focused";
|
|
4444
|
+
}
|
|
4445
|
+
const sizeClasses = SIZE_CLASSES10[size];
|
|
4446
|
+
const stateClasses = STATE_CLASSES3[currentState];
|
|
4447
|
+
const textareaClasses = cn(
|
|
4448
|
+
BASE_TEXTAREA_CLASSES,
|
|
4449
|
+
sizeClasses.textarea,
|
|
4450
|
+
stateClasses.base,
|
|
4451
|
+
stateClasses.hover,
|
|
4452
|
+
stateClasses.focus,
|
|
4453
|
+
className
|
|
4454
|
+
);
|
|
4455
|
+
return /* @__PURE__ */ jsxs13("div", { className: `flex flex-col`, children: [
|
|
4456
|
+
label && /* @__PURE__ */ jsx16(
|
|
4457
|
+
Text_default,
|
|
4458
|
+
{
|
|
4459
|
+
as: "label",
|
|
4460
|
+
htmlFor: inputId,
|
|
4461
|
+
size: sizeClasses.textSize,
|
|
4462
|
+
weight: "medium",
|
|
4463
|
+
color: "text-text-950",
|
|
4464
|
+
className: cn("mb-1.5", labelClassName),
|
|
4465
|
+
children: label
|
|
4466
|
+
}
|
|
4467
|
+
),
|
|
4468
|
+
/* @__PURE__ */ jsx16(
|
|
4469
|
+
"textarea",
|
|
4470
|
+
{
|
|
4471
|
+
ref,
|
|
4472
|
+
id: inputId,
|
|
4473
|
+
disabled,
|
|
4474
|
+
onChange: handleChange,
|
|
4475
|
+
onFocus: handleFocus,
|
|
4476
|
+
onBlur: handleBlur,
|
|
4477
|
+
className: textareaClasses,
|
|
4478
|
+
placeholder,
|
|
4479
|
+
...props
|
|
4480
|
+
}
|
|
4481
|
+
),
|
|
4482
|
+
errorMessage && /* @__PURE__ */ jsxs13("p", { className: "flex gap-1 items-center text-sm text-indicator-error mt-1.5", children: [
|
|
4483
|
+
/* @__PURE__ */ jsx16(WarningCircle2, { size: 16 }),
|
|
4484
|
+
" ",
|
|
4485
|
+
errorMessage
|
|
4486
|
+
] }),
|
|
4487
|
+
helperMessage && !errorMessage && /* @__PURE__ */ jsx16(Text_default, { size: "sm", weight: "normal", className: "mt-1.5 text-text-500", children: helperMessage })
|
|
4488
|
+
] });
|
|
4489
|
+
}
|
|
4490
|
+
);
|
|
4491
|
+
TextArea.displayName = "TextArea";
|
|
4492
|
+
var TextArea_default = TextArea;
|
|
4493
|
+
|
|
4259
4494
|
// src/components/Quiz/Quiz.tsx
|
|
4260
|
-
import { Fragment as Fragment6, jsx as
|
|
4261
|
-
var Quiz =
|
|
4262
|
-
return /* @__PURE__ */
|
|
4495
|
+
import { Fragment as Fragment6, jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4496
|
+
var Quiz = forwardRef10(({ children, className, ...props }, ref) => {
|
|
4497
|
+
return /* @__PURE__ */ jsx17(
|
|
4263
4498
|
"div",
|
|
4264
4499
|
{
|
|
4265
4500
|
ref,
|
|
@@ -4272,38 +4507,21 @@ var Quiz = forwardRef9(({ children, className, ...props }, ref) => {
|
|
|
4272
4507
|
}
|
|
4273
4508
|
);
|
|
4274
4509
|
});
|
|
4275
|
-
var QuizHeaderResult =
|
|
4510
|
+
var QuizHeaderResult = forwardRef10(
|
|
4276
4511
|
({ className, ...props }, ref) => {
|
|
4277
|
-
const {
|
|
4278
|
-
const
|
|
4279
|
-
const
|
|
4280
|
-
const [isCorrect, setIsCorrect] = useState6(false);
|
|
4512
|
+
const { getAllCurrentAnswer } = useQuizStore();
|
|
4513
|
+
const usersAnswer = getAllCurrentAnswer();
|
|
4514
|
+
const [isCorrect, setIsCorrect] = useState7(false);
|
|
4281
4515
|
useEffect7(() => {
|
|
4282
|
-
if (
|
|
4283
|
-
const allCurrentAnswers = getAllCurrentAnswer();
|
|
4284
|
-
const isCorrectOption = currentQuestion.options.filter(
|
|
4285
|
-
(op) => op.isCorrect
|
|
4286
|
-
);
|
|
4287
|
-
if (allCurrentAnswers?.length !== isCorrectOption.length) {
|
|
4288
|
-
setIsCorrect(false);
|
|
4289
|
-
return;
|
|
4290
|
-
}
|
|
4291
|
-
setIsCorrect(true);
|
|
4292
|
-
allCurrentAnswers.forEach((answer) => {
|
|
4293
|
-
const findInCorrectOptions = isCorrectOption.find(
|
|
4294
|
-
(op) => op.id === answer.optionId
|
|
4295
|
-
);
|
|
4296
|
-
if (!findInCorrectOptions) {
|
|
4297
|
-
setIsCorrect(false);
|
|
4298
|
-
}
|
|
4299
|
-
});
|
|
4300
|
-
} else {
|
|
4516
|
+
if (usersAnswer) {
|
|
4301
4517
|
setIsCorrect(
|
|
4302
|
-
|
|
4518
|
+
usersAnswer.length > 0 ? usersAnswer.map(
|
|
4519
|
+
(answer) => answer.answerStatus === "RESPOSTA_CORRETA" /* RESPOSTA_CORRETA */
|
|
4520
|
+
).every(Boolean) : false
|
|
4303
4521
|
);
|
|
4304
4522
|
}
|
|
4305
|
-
}, [
|
|
4306
|
-
return /* @__PURE__ */
|
|
4523
|
+
}, [usersAnswer]);
|
|
4524
|
+
return /* @__PURE__ */ jsxs14(
|
|
4307
4525
|
"div",
|
|
4308
4526
|
{
|
|
4309
4527
|
ref,
|
|
@@ -4314,14 +4532,14 @@ var QuizHeaderResult = forwardRef9(
|
|
|
4314
4532
|
),
|
|
4315
4533
|
...props,
|
|
4316
4534
|
children: [
|
|
4317
|
-
/* @__PURE__ */
|
|
4318
|
-
/* @__PURE__ */
|
|
4535
|
+
/* @__PURE__ */ jsx17("p", { className: "text-text-950 font-bold text-lg", children: "Resultado" }),
|
|
4536
|
+
/* @__PURE__ */ jsx17("p", { className: "text-text-700 text-md", children: isCorrect ? "\u{1F389} Parab\xE9ns!!" : "N\xE3o foi dessa vez..." })
|
|
4319
4537
|
]
|
|
4320
4538
|
}
|
|
4321
4539
|
);
|
|
4322
4540
|
}
|
|
4323
4541
|
);
|
|
4324
|
-
var QuizTitle =
|
|
4542
|
+
var QuizTitle = forwardRef10(
|
|
4325
4543
|
({ className, ...props }, ref) => {
|
|
4326
4544
|
const {
|
|
4327
4545
|
currentQuestionIndex,
|
|
@@ -4333,7 +4551,7 @@ var QuizTitle = forwardRef9(
|
|
|
4333
4551
|
} = useQuizStore();
|
|
4334
4552
|
const totalQuestions = getTotalQuestions();
|
|
4335
4553
|
const quizTitle = getQuizTitle();
|
|
4336
|
-
return /* @__PURE__ */
|
|
4554
|
+
return /* @__PURE__ */ jsxs14(
|
|
4337
4555
|
"div",
|
|
4338
4556
|
{
|
|
4339
4557
|
ref,
|
|
@@ -4343,11 +4561,11 @@ var QuizTitle = forwardRef9(
|
|
|
4343
4561
|
),
|
|
4344
4562
|
...props,
|
|
4345
4563
|
children: [
|
|
4346
|
-
/* @__PURE__ */
|
|
4347
|
-
/* @__PURE__ */
|
|
4348
|
-
/* @__PURE__ */
|
|
4564
|
+
/* @__PURE__ */ jsxs14("span", { className: "flex flex-col gap-2 text-center", children: [
|
|
4565
|
+
/* @__PURE__ */ jsx17("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
|
|
4566
|
+
/* @__PURE__ */ jsx17("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
|
|
4349
4567
|
] }),
|
|
4350
|
-
/* @__PURE__ */
|
|
4568
|
+
/* @__PURE__ */ jsx17("span", { className: "absolute right-2", children: /* @__PURE__ */ jsx17(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ jsx17(Clock2, {}), children: isStarted ? formatTime(timeElapsed) : "00:00" }) })
|
|
4351
4569
|
]
|
|
4352
4570
|
}
|
|
4353
4571
|
);
|
|
@@ -4356,7 +4574,7 @@ var QuizTitle = forwardRef9(
|
|
|
4356
4574
|
var QuizHeader = () => {
|
|
4357
4575
|
const { getCurrentQuestion } = useQuizStore();
|
|
4358
4576
|
const currentQuestion = getCurrentQuestion();
|
|
4359
|
-
return /* @__PURE__ */
|
|
4577
|
+
return /* @__PURE__ */ jsx17(
|
|
4360
4578
|
HeaderAlternative,
|
|
4361
4579
|
{
|
|
4362
4580
|
title: currentQuestion ? `Quest\xE3o ${currentQuestion.id}` : "Quest\xE3o",
|
|
@@ -4365,27 +4583,43 @@ var QuizHeader = () => {
|
|
|
4365
4583
|
}
|
|
4366
4584
|
);
|
|
4367
4585
|
};
|
|
4368
|
-
var QuizContent =
|
|
4369
|
-
const { getCurrentQuestion } = useQuizStore();
|
|
4586
|
+
var QuizContent = forwardRef10(({ type = "Alternativas", className, variant, ...props }, ref) => {
|
|
4587
|
+
const { getCurrentQuestion, getCurrentAnswer } = useQuizStore();
|
|
4370
4588
|
const currentQuestion = getCurrentQuestion();
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
/* @__PURE__ */
|
|
4589
|
+
const currentAnswer = getCurrentAnswer();
|
|
4590
|
+
return /* @__PURE__ */ jsxs14(Fragment6, { children: [
|
|
4591
|
+
/* @__PURE__ */ jsx17("div", { className: "px-4 pb-2 pt-6", children: /* @__PURE__ */ jsx17("p", { className: "font-bold text-lg text-text-950", children: type }) }),
|
|
4592
|
+
/* @__PURE__ */ jsx17(
|
|
4374
4593
|
"div",
|
|
4375
4594
|
{
|
|
4376
4595
|
ref,
|
|
4377
4596
|
className: cn(
|
|
4378
|
-
"rounded-t-xl px-4 pt-4 pb-[80px] h-full flex flex-col gap-4 mb-auto",
|
|
4597
|
+
"bg-background rounded-t-xl px-4 pt-4 pb-[80px] h-full flex flex-col gap-4 mb-auto",
|
|
4379
4598
|
className
|
|
4380
4599
|
),
|
|
4381
4600
|
...props,
|
|
4382
|
-
children: currentQuestion && /* @__PURE__ */
|
|
4383
|
-
currentQuestion.type === "ALTERNATIVA" /* ALTERNATIVA */ && /* @__PURE__ */
|
|
4384
|
-
currentQuestion.type === "MULTIPLA_CHOICE" /* MULTIPLA_CHOICE */ && /* @__PURE__ */
|
|
4385
|
-
currentQuestion.type === "DISSERTATIVA" /* DISSERTATIVA */ && /* @__PURE__ */
|
|
4601
|
+
children: currentQuestion && /* @__PURE__ */ jsxs14(Fragment6, { children: [
|
|
4602
|
+
currentQuestion.type === "ALTERNATIVA" /* ALTERNATIVA */ && /* @__PURE__ */ jsx17(QuizAlternative, { variant }),
|
|
4603
|
+
currentQuestion.type === "MULTIPLA_CHOICE" /* MULTIPLA_CHOICE */ && /* @__PURE__ */ jsx17(QuizMultipleChoice, { variant }),
|
|
4604
|
+
currentQuestion.type === "DISSERTATIVA" /* DISSERTATIVA */ && /* @__PURE__ */ jsx17(QuizDissertative, { variant })
|
|
4386
4605
|
] })
|
|
4387
4606
|
}
|
|
4388
|
-
)
|
|
4607
|
+
),
|
|
4608
|
+
currentQuestion?.type === "DISSERTATIVA" /* DISSERTATIVA */ && variant === "result" && currentAnswer?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */ jsxs14(Fragment6, { children: [
|
|
4609
|
+
/* @__PURE__ */ jsx17("div", { className: "px-4 pb-2 pt-6", children: /* @__PURE__ */ jsx17("p", { className: "font-bold text-lg text-text-950", children: "Observa\xE7\xE3o do professor" }) }),
|
|
4610
|
+
/* @__PURE__ */ jsx17(
|
|
4611
|
+
"div",
|
|
4612
|
+
{
|
|
4613
|
+
ref,
|
|
4614
|
+
className: cn(
|
|
4615
|
+
"bg-background rounded-t-xl px-4 pt-4 pb-[80px] h-full flex flex-col gap-4 mb-auto",
|
|
4616
|
+
className
|
|
4617
|
+
),
|
|
4618
|
+
...props,
|
|
4619
|
+
children: /* @__PURE__ */ jsx17("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim. Mauris euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim." })
|
|
4620
|
+
}
|
|
4621
|
+
)
|
|
4622
|
+
] })
|
|
4389
4623
|
] });
|
|
4390
4624
|
});
|
|
4391
4625
|
var QuizAlternative = ({ variant = "default" }) => {
|
|
@@ -4400,7 +4634,7 @@ var QuizAlternative = ({ variant = "default" }) => {
|
|
|
4400
4634
|
);
|
|
4401
4635
|
if (isCorrectOption?.id === option.id) {
|
|
4402
4636
|
status = "correct" /* CORRECT */;
|
|
4403
|
-
} else if (currentAnswer === option.id && option.id !== isCorrectOption?.id) {
|
|
4637
|
+
} else if (currentAnswer?.optionId === option.id && option.id !== isCorrectOption?.id) {
|
|
4404
4638
|
status = "incorrect" /* INCORRECT */;
|
|
4405
4639
|
}
|
|
4406
4640
|
}
|
|
@@ -4411,16 +4645,16 @@ var QuizAlternative = ({ variant = "default" }) => {
|
|
|
4411
4645
|
};
|
|
4412
4646
|
});
|
|
4413
4647
|
if (!alternatives)
|
|
4414
|
-
return /* @__PURE__ */
|
|
4415
|
-
return /* @__PURE__ */
|
|
4648
|
+
return /* @__PURE__ */ jsx17("div", { children: /* @__PURE__ */ jsx17("p", { children: "N\xE3o h\xE1 Alternativas" }) });
|
|
4649
|
+
return /* @__PURE__ */ jsx17("div", { className: "space-y-4", children: /* @__PURE__ */ jsx17(
|
|
4416
4650
|
AlternativesList,
|
|
4417
4651
|
{
|
|
4418
4652
|
mode: variant === "default" ? "interactive" : "readonly",
|
|
4419
4653
|
name: `question-${currentQuestion?.id || "1"}`,
|
|
4420
4654
|
layout: "compact",
|
|
4421
4655
|
alternatives,
|
|
4422
|
-
value: currentAnswer,
|
|
4423
|
-
selectedValue: currentAnswer,
|
|
4656
|
+
value: currentAnswer?.optionId || "",
|
|
4657
|
+
selectedValue: currentAnswer?.optionId || "",
|
|
4424
4658
|
onValueChange: (value) => {
|
|
4425
4659
|
if (currentQuestion) {
|
|
4426
4660
|
selectAnswer(currentQuestion.id, value);
|
|
@@ -4488,8 +4722,8 @@ var QuizMultipleChoice = ({
|
|
|
4488
4722
|
};
|
|
4489
4723
|
});
|
|
4490
4724
|
if (!choices)
|
|
4491
|
-
return /* @__PURE__ */
|
|
4492
|
-
return /* @__PURE__ */
|
|
4725
|
+
return /* @__PURE__ */ jsx17("div", { children: /* @__PURE__ */ jsx17("p", { children: "N\xE3o h\xE1 Escolhas Multiplas" }) });
|
|
4726
|
+
return /* @__PURE__ */ jsx17("div", { className: "space-y-4", children: /* @__PURE__ */ jsx17(
|
|
4493
4727
|
MultipleChoiceList,
|
|
4494
4728
|
{
|
|
4495
4729
|
choices,
|
|
@@ -4501,6 +4735,46 @@ var QuizMultipleChoice = ({
|
|
|
4501
4735
|
questionKey
|
|
4502
4736
|
) });
|
|
4503
4737
|
};
|
|
4738
|
+
var QuizDissertative = ({
|
|
4739
|
+
variant = "default"
|
|
4740
|
+
}) => {
|
|
4741
|
+
const { getCurrentQuestion, getCurrentAnswer, selectDissertativeAnswer } = useQuizStore();
|
|
4742
|
+
const currentQuestion = getCurrentQuestion();
|
|
4743
|
+
const currentAnswer = getCurrentAnswer();
|
|
4744
|
+
const textareaRef = useRef5(null);
|
|
4745
|
+
const handleAnswerChange = (value) => {
|
|
4746
|
+
if (currentQuestion) {
|
|
4747
|
+
selectDissertativeAnswer(currentQuestion.id, value);
|
|
4748
|
+
}
|
|
4749
|
+
};
|
|
4750
|
+
const adjustTextareaHeight = useCallback(() => {
|
|
4751
|
+
if (textareaRef.current) {
|
|
4752
|
+
textareaRef.current.style.height = "auto";
|
|
4753
|
+
const scrollHeight = textareaRef.current.scrollHeight;
|
|
4754
|
+
const minHeight = 120;
|
|
4755
|
+
const maxHeight = 400;
|
|
4756
|
+
const newHeight = Math.min(Math.max(scrollHeight, minHeight), maxHeight);
|
|
4757
|
+
textareaRef.current.style.height = `${newHeight}px`;
|
|
4758
|
+
}
|
|
4759
|
+
}, []);
|
|
4760
|
+
useEffect7(() => {
|
|
4761
|
+
adjustTextareaHeight();
|
|
4762
|
+
}, [currentAnswer, adjustTextareaHeight]);
|
|
4763
|
+
if (!currentQuestion) {
|
|
4764
|
+
return /* @__PURE__ */ jsx17("div", { className: "space-y-4", children: /* @__PURE__ */ jsx17("p", { className: "text-text-600 text-md", children: "Nenhuma quest\xE3o dispon\xEDvel" }) });
|
|
4765
|
+
}
|
|
4766
|
+
return /* @__PURE__ */ jsx17("div", { className: "space-y-4 max-h-[600px] overflow-y-auto", children: variant === "default" ? /* @__PURE__ */ jsx17("div", { className: "space-y-4", children: /* @__PURE__ */ jsx17(
|
|
4767
|
+
TextArea_default,
|
|
4768
|
+
{
|
|
4769
|
+
ref: textareaRef,
|
|
4770
|
+
placeholder: "Escreva sua resposta",
|
|
4771
|
+
value: currentAnswer?.answer || "",
|
|
4772
|
+
onChange: (e) => handleAnswerChange(e.target.value),
|
|
4773
|
+
rows: 4,
|
|
4774
|
+
className: "min-h-[120px] max-h-[400px] resize-none overflow-y-auto"
|
|
4775
|
+
}
|
|
4776
|
+
) }) : /* @__PURE__ */ jsx17("div", { className: "space-y-4", children: /* @__PURE__ */ jsx17("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: currentAnswer?.answer || "Nenhuma resposta fornecida" }) }) });
|
|
4777
|
+
};
|
|
4504
4778
|
var QuizQuestionList = ({
|
|
4505
4779
|
filterType = "all",
|
|
4506
4780
|
onQuestionClick
|
|
@@ -4552,16 +4826,16 @@ var QuizQuestionList = ({
|
|
|
4552
4826
|
return "Em branco";
|
|
4553
4827
|
}
|
|
4554
4828
|
};
|
|
4555
|
-
return /* @__PURE__ */
|
|
4556
|
-
([subjectId, questions]) => /* @__PURE__ */
|
|
4557
|
-
/* @__PURE__ */
|
|
4558
|
-
/* @__PURE__ */
|
|
4559
|
-
/* @__PURE__ */
|
|
4829
|
+
return /* @__PURE__ */ jsx17("div", { className: "space-y-6 px-4", children: Object.entries(filteredGroupedQuestions).map(
|
|
4830
|
+
([subjectId, questions]) => /* @__PURE__ */ jsxs14("section", { className: "flex flex-col gap-2", children: [
|
|
4831
|
+
/* @__PURE__ */ jsxs14("span", { className: "pt-6 pb-4 flex flex-row gap-2", children: [
|
|
4832
|
+
/* @__PURE__ */ jsx17("div", { className: "bg-primary-500 p-1 rounded-sm flex items-center justify-center", children: /* @__PURE__ */ jsx17(BookOpen, { size: 17, className: "text-white" }) }),
|
|
4833
|
+
/* @__PURE__ */ jsx17("p", { className: "text-text-800 font-bold text-lg", children: subjectId })
|
|
4560
4834
|
] }),
|
|
4561
|
-
/* @__PURE__ */
|
|
4835
|
+
/* @__PURE__ */ jsx17("ul", { className: "flex flex-col gap-2", children: questions.map((question) => {
|
|
4562
4836
|
const status = getQuestionStatus(question.id);
|
|
4563
4837
|
const questionNumber = getQuestionIndex(question.id);
|
|
4564
|
-
return /* @__PURE__ */
|
|
4838
|
+
return /* @__PURE__ */ jsx17(
|
|
4565
4839
|
CardStatus,
|
|
4566
4840
|
{
|
|
4567
4841
|
header: `Quest\xE3o ${questionNumber.toString().padStart(2, "0")}`,
|
|
@@ -4577,7 +4851,7 @@ var QuizQuestionList = ({
|
|
|
4577
4851
|
] }, subjectId)
|
|
4578
4852
|
) });
|
|
4579
4853
|
};
|
|
4580
|
-
var QuizFooter =
|
|
4854
|
+
var QuizFooter = forwardRef10(
|
|
4581
4855
|
({
|
|
4582
4856
|
className,
|
|
4583
4857
|
onGoToSimulated,
|
|
@@ -4604,15 +4878,15 @@ var QuizFooter = forwardRef9(
|
|
|
4604
4878
|
const currentAnswer = getCurrentAnswer();
|
|
4605
4879
|
const currentQuestion = getCurrentQuestion();
|
|
4606
4880
|
const isCurrentQuestionSkipped = currentQuestion ? getQuestionStatusFromUserAnswers(currentQuestion.id) === "skipped" : false;
|
|
4607
|
-
const [alertDialogOpen, setAlertDialogOpen] =
|
|
4608
|
-
const [modalResultOpen, setModalResultOpen] =
|
|
4609
|
-
const [modalNavigateOpen, setModalNavigateOpen] =
|
|
4610
|
-
const [filterType, setFilterType] =
|
|
4881
|
+
const [alertDialogOpen, setAlertDialogOpen] = useState7(false);
|
|
4882
|
+
const [modalResultOpen, setModalResultOpen] = useState7(false);
|
|
4883
|
+
const [modalNavigateOpen, setModalNavigateOpen] = useState7(false);
|
|
4884
|
+
const [filterType, setFilterType] = useState7("all");
|
|
4611
4885
|
const unansweredQuestions = getUnansweredQuestionsFromUserAnswers();
|
|
4612
4886
|
const userAnswers = getUserAnswers();
|
|
4613
4887
|
const allQuestions = getTotalQuestions();
|
|
4614
|
-
return /* @__PURE__ */
|
|
4615
|
-
/* @__PURE__ */
|
|
4888
|
+
return /* @__PURE__ */ jsxs14(Fragment6, { children: [
|
|
4889
|
+
/* @__PURE__ */ jsx17(
|
|
4616
4890
|
"footer",
|
|
4617
4891
|
{
|
|
4618
4892
|
ref,
|
|
@@ -4621,17 +4895,17 @@ var QuizFooter = forwardRef9(
|
|
|
4621
4895
|
className
|
|
4622
4896
|
),
|
|
4623
4897
|
...props,
|
|
4624
|
-
children: variant === "default" ? /* @__PURE__ */
|
|
4625
|
-
/* @__PURE__ */
|
|
4626
|
-
/* @__PURE__ */
|
|
4898
|
+
children: variant === "default" ? /* @__PURE__ */ jsxs14(Fragment6, { children: [
|
|
4899
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex flex-row items-center gap-1", children: [
|
|
4900
|
+
/* @__PURE__ */ jsx17(
|
|
4627
4901
|
IconButton_default,
|
|
4628
4902
|
{
|
|
4629
|
-
icon: /* @__PURE__ */
|
|
4903
|
+
icon: /* @__PURE__ */ jsx17(SquaresFour, { size: 24, className: "text-text-950" }),
|
|
4630
4904
|
size: "md",
|
|
4631
4905
|
onClick: () => setModalNavigateOpen(true)
|
|
4632
4906
|
}
|
|
4633
4907
|
),
|
|
4634
|
-
isFirstQuestion ? /* @__PURE__ */
|
|
4908
|
+
isFirstQuestion ? /* @__PURE__ */ jsx17(
|
|
4635
4909
|
Button_default,
|
|
4636
4910
|
{
|
|
4637
4911
|
variant: "outline",
|
|
@@ -4642,13 +4916,13 @@ var QuizFooter = forwardRef9(
|
|
|
4642
4916
|
},
|
|
4643
4917
|
children: "Pular"
|
|
4644
4918
|
}
|
|
4645
|
-
) : /* @__PURE__ */
|
|
4919
|
+
) : /* @__PURE__ */ jsx17(
|
|
4646
4920
|
Button_default,
|
|
4647
4921
|
{
|
|
4648
4922
|
size: "medium",
|
|
4649
4923
|
variant: "link",
|
|
4650
4924
|
action: "primary",
|
|
4651
|
-
iconLeft: /* @__PURE__ */
|
|
4925
|
+
iconLeft: /* @__PURE__ */ jsx17(CaretLeft, { size: 18 }),
|
|
4652
4926
|
onClick: () => {
|
|
4653
4927
|
goToPreviousQuestion();
|
|
4654
4928
|
},
|
|
@@ -4656,7 +4930,7 @@ var QuizFooter = forwardRef9(
|
|
|
4656
4930
|
}
|
|
4657
4931
|
)
|
|
4658
4932
|
] }),
|
|
4659
|
-
!isFirstQuestion && /* @__PURE__ */
|
|
4933
|
+
!isFirstQuestion && /* @__PURE__ */ jsx17(
|
|
4660
4934
|
Button_default,
|
|
4661
4935
|
{
|
|
4662
4936
|
size: "small",
|
|
@@ -4669,7 +4943,7 @@ var QuizFooter = forwardRef9(
|
|
|
4669
4943
|
children: "Pular"
|
|
4670
4944
|
}
|
|
4671
4945
|
),
|
|
4672
|
-
isLastQuestion ? /* @__PURE__ */
|
|
4946
|
+
isLastQuestion ? /* @__PURE__ */ jsx17(
|
|
4673
4947
|
Button_default,
|
|
4674
4948
|
{
|
|
4675
4949
|
size: "medium",
|
|
@@ -4685,13 +4959,13 @@ var QuizFooter = forwardRef9(
|
|
|
4685
4959
|
},
|
|
4686
4960
|
children: "Finalizar"
|
|
4687
4961
|
}
|
|
4688
|
-
) : /* @__PURE__ */
|
|
4962
|
+
) : /* @__PURE__ */ jsx17(
|
|
4689
4963
|
Button_default,
|
|
4690
4964
|
{
|
|
4691
4965
|
size: "medium",
|
|
4692
4966
|
variant: "link",
|
|
4693
4967
|
action: "primary",
|
|
4694
|
-
iconRight: /* @__PURE__ */
|
|
4968
|
+
iconRight: /* @__PURE__ */ jsx17(CaretRight2, { size: 18 }),
|
|
4695
4969
|
disabled: !currentAnswer && !isCurrentQuestionSkipped,
|
|
4696
4970
|
onClick: () => {
|
|
4697
4971
|
goToNextQuestion();
|
|
@@ -4699,10 +4973,10 @@ var QuizFooter = forwardRef9(
|
|
|
4699
4973
|
children: "Avan\xE7ar"
|
|
4700
4974
|
}
|
|
4701
4975
|
)
|
|
4702
|
-
] }) : /* @__PURE__ */
|
|
4976
|
+
] }) : /* @__PURE__ */ jsx17("div", { className: "flex flex-row items-center justify-end w-full", children: /* @__PURE__ */ jsx17(Button_default, { variant: "solid", action: "primary", size: "medium", children: "Ver Resolu\xE7\xE3o" }) })
|
|
4703
4977
|
}
|
|
4704
4978
|
),
|
|
4705
|
-
/* @__PURE__ */
|
|
4979
|
+
/* @__PURE__ */ jsx17(
|
|
4706
4980
|
AlertDialog,
|
|
4707
4981
|
{
|
|
4708
4982
|
isOpen: alertDialogOpen,
|
|
@@ -4716,7 +4990,7 @@ var QuizFooter = forwardRef9(
|
|
|
4716
4990
|
}
|
|
4717
4991
|
}
|
|
4718
4992
|
),
|
|
4719
|
-
/* @__PURE__ */
|
|
4993
|
+
/* @__PURE__ */ jsx17(
|
|
4720
4994
|
Modal_default,
|
|
4721
4995
|
{
|
|
4722
4996
|
isOpen: modalResultOpen,
|
|
@@ -4726,8 +5000,8 @@ var QuizFooter = forwardRef9(
|
|
|
4726
5000
|
closeOnEscape: false,
|
|
4727
5001
|
hideCloseButton: true,
|
|
4728
5002
|
size: "md",
|
|
4729
|
-
children: /* @__PURE__ */
|
|
4730
|
-
/* @__PURE__ */
|
|
5003
|
+
children: /* @__PURE__ */ jsxs14("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
5004
|
+
/* @__PURE__ */ jsx17(
|
|
4731
5005
|
"img",
|
|
4732
5006
|
{
|
|
4733
5007
|
src: simulated_result_default,
|
|
@@ -4735,9 +5009,9 @@ var QuizFooter = forwardRef9(
|
|
|
4735
5009
|
className: "w-[282px] h-auto object-cover"
|
|
4736
5010
|
}
|
|
4737
5011
|
),
|
|
4738
|
-
/* @__PURE__ */
|
|
4739
|
-
/* @__PURE__ */
|
|
4740
|
-
/* @__PURE__ */
|
|
5012
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
5013
|
+
/* @__PURE__ */ jsx17("h2", { className: "text-text-950 font-bold text-lg", children: "Voc\xEA concluiu o simulado!" }),
|
|
5014
|
+
/* @__PURE__ */ jsxs14("p", { className: "text-text-500 font-sm", children: [
|
|
4741
5015
|
"Voc\xEA acertou",
|
|
4742
5016
|
" ",
|
|
4743
5017
|
(() => {
|
|
@@ -4759,8 +5033,8 @@ var QuizFooter = forwardRef9(
|
|
|
4759
5033
|
" quest\xF5es."
|
|
4760
5034
|
] })
|
|
4761
5035
|
] }),
|
|
4762
|
-
/* @__PURE__ */
|
|
4763
|
-
/* @__PURE__ */
|
|
5036
|
+
/* @__PURE__ */ jsxs14("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: [
|
|
5037
|
+
/* @__PURE__ */ jsx17(
|
|
4764
5038
|
Button_default,
|
|
4765
5039
|
{
|
|
4766
5040
|
variant: "outline",
|
|
@@ -4770,31 +5044,31 @@ var QuizFooter = forwardRef9(
|
|
|
4770
5044
|
children: "Ir para simulados"
|
|
4771
5045
|
}
|
|
4772
5046
|
),
|
|
4773
|
-
/* @__PURE__ */
|
|
5047
|
+
/* @__PURE__ */ jsx17(Button_default, { className: "w-full", onClick: onDetailResult, children: "Detalhar resultado" })
|
|
4774
5048
|
] })
|
|
4775
5049
|
] })
|
|
4776
5050
|
}
|
|
4777
5051
|
),
|
|
4778
|
-
/* @__PURE__ */
|
|
5052
|
+
/* @__PURE__ */ jsx17(
|
|
4779
5053
|
Modal_default,
|
|
4780
5054
|
{
|
|
4781
5055
|
isOpen: modalNavigateOpen,
|
|
4782
5056
|
onClose: () => setModalNavigateOpen(false),
|
|
4783
5057
|
title: "Quest\xF5es",
|
|
4784
5058
|
size: "lg",
|
|
4785
|
-
children: /* @__PURE__ */
|
|
4786
|
-
/* @__PURE__ */
|
|
4787
|
-
/* @__PURE__ */
|
|
4788
|
-
/* @__PURE__ */
|
|
4789
|
-
/* @__PURE__ */
|
|
4790
|
-
/* @__PURE__ */
|
|
4791
|
-
/* @__PURE__ */
|
|
4792
|
-
/* @__PURE__ */
|
|
4793
|
-
/* @__PURE__ */
|
|
5059
|
+
children: /* @__PURE__ */ jsxs14("div", { className: "flex flex-col w-full h-full", children: [
|
|
5060
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex flex-row justify-between items-center py-6 pt-6 pb-4 border-b border-border-200", children: [
|
|
5061
|
+
/* @__PURE__ */ jsx17("p", { className: "text-text-950 font-bold text-lg", children: "Filtrar por" }),
|
|
5062
|
+
/* @__PURE__ */ jsx17("span", { className: "max-w-[266px]", children: /* @__PURE__ */ jsxs14(Select_default, { value: filterType, onValueChange: setFilterType, children: [
|
|
5063
|
+
/* @__PURE__ */ jsx17(SelectTrigger, { variant: "rounded", className: "max-w-[266px]", children: /* @__PURE__ */ jsx17(SelectValue, { placeholder: "Selecione uma op\xE7\xE3o" }) }),
|
|
5064
|
+
/* @__PURE__ */ jsxs14(SelectContent, { children: [
|
|
5065
|
+
/* @__PURE__ */ jsx17(SelectItem, { value: "all", children: "Todas" }),
|
|
5066
|
+
/* @__PURE__ */ jsx17(SelectItem, { value: "unanswered", children: "Em branco" }),
|
|
5067
|
+
/* @__PURE__ */ jsx17(SelectItem, { value: "answered", children: "Respondidas" })
|
|
4794
5068
|
] })
|
|
4795
5069
|
] }) })
|
|
4796
5070
|
] }),
|
|
4797
|
-
/* @__PURE__ */
|
|
5071
|
+
/* @__PURE__ */ jsx17("div", { className: "flex flex-col gap-2 not-lg:h-[calc(100vh-200px)] lg:max-h-[687px] overflow-y-auto", children: /* @__PURE__ */ jsx17(
|
|
4798
5072
|
QuizQuestionList,
|
|
4799
5073
|
{
|
|
4800
5074
|
filterType,
|
|
@@ -4807,25 +5081,25 @@ var QuizFooter = forwardRef9(
|
|
|
4807
5081
|
] });
|
|
4808
5082
|
}
|
|
4809
5083
|
);
|
|
4810
|
-
var QuizResultHeaderTitle =
|
|
5084
|
+
var QuizResultHeaderTitle = forwardRef10(({ className, ...props }, ref) => {
|
|
4811
5085
|
const { bySimulated } = useQuizStore();
|
|
4812
|
-
return /* @__PURE__ */
|
|
5086
|
+
return /* @__PURE__ */ jsxs14(
|
|
4813
5087
|
"div",
|
|
4814
5088
|
{
|
|
4815
5089
|
ref,
|
|
4816
5090
|
className: cn("flex flex-row pt-4 justify-between", className),
|
|
4817
5091
|
...props,
|
|
4818
5092
|
children: [
|
|
4819
|
-
/* @__PURE__ */
|
|
4820
|
-
bySimulated && /* @__PURE__ */
|
|
5093
|
+
/* @__PURE__ */ jsx17("p", { className: "text-text-950 font-bold text-2xl", children: "Resultado" }),
|
|
5094
|
+
bySimulated && /* @__PURE__ */ jsx17(Badge_default, { variant: "solid", action: "info", children: bySimulated.category })
|
|
4821
5095
|
]
|
|
4822
5096
|
}
|
|
4823
5097
|
);
|
|
4824
5098
|
});
|
|
4825
|
-
var QuizResultTitle =
|
|
5099
|
+
var QuizResultTitle = forwardRef10(({ className, ...props }, ref) => {
|
|
4826
5100
|
const { getQuizTitle } = useQuizStore();
|
|
4827
5101
|
const quizTitle = getQuizTitle();
|
|
4828
|
-
return /* @__PURE__ */
|
|
5102
|
+
return /* @__PURE__ */ jsx17(
|
|
4829
5103
|
"p",
|
|
4830
5104
|
{
|
|
4831
5105
|
className: cn("pt-6 pb-4 text-text-950 font-bold text-lg", className),
|
|
@@ -4835,7 +5109,7 @@ var QuizResultTitle = forwardRef9(({ className, ...props }, ref) => {
|
|
|
4835
5109
|
}
|
|
4836
5110
|
);
|
|
4837
5111
|
});
|
|
4838
|
-
var QuizResultPerformance =
|
|
5112
|
+
var QuizResultPerformance = forwardRef10(
|
|
4839
5113
|
({ ...props }, ref) => {
|
|
4840
5114
|
const {
|
|
4841
5115
|
getTotalQuestions,
|
|
@@ -4883,15 +5157,15 @@ var QuizResultPerformance = forwardRef9(
|
|
|
4883
5157
|
});
|
|
4884
5158
|
}
|
|
4885
5159
|
const percentage = totalQuestions > 0 ? Math.round(correctAnswers / totalQuestions * 100) : 0;
|
|
4886
|
-
return /* @__PURE__ */
|
|
5160
|
+
return /* @__PURE__ */ jsxs14(
|
|
4887
5161
|
"div",
|
|
4888
5162
|
{
|
|
4889
5163
|
className: "flex flex-row gap-6 p-6 rounded-xl bg-background justify-between",
|
|
4890
5164
|
ref,
|
|
4891
5165
|
...props,
|
|
4892
5166
|
children: [
|
|
4893
|
-
/* @__PURE__ */
|
|
4894
|
-
/* @__PURE__ */
|
|
5167
|
+
/* @__PURE__ */ jsxs14("div", { className: "relative", children: [
|
|
5168
|
+
/* @__PURE__ */ jsx17(
|
|
4895
5169
|
ProgressCircle_default,
|
|
4896
5170
|
{
|
|
4897
5171
|
size: "medium",
|
|
@@ -4901,21 +5175,21 @@ var QuizResultPerformance = forwardRef9(
|
|
|
4901
5175
|
label: ""
|
|
4902
5176
|
}
|
|
4903
5177
|
),
|
|
4904
|
-
/* @__PURE__ */
|
|
4905
|
-
/* @__PURE__ */
|
|
4906
|
-
/* @__PURE__ */
|
|
4907
|
-
/* @__PURE__ */
|
|
5178
|
+
/* @__PURE__ */ jsxs14("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
5179
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-1 mb-1", children: [
|
|
5180
|
+
/* @__PURE__ */ jsx17(Clock2, { size: 12, weight: "regular", className: "text-text-800" }),
|
|
5181
|
+
/* @__PURE__ */ jsx17("span", { className: "text-2xs font-medium text-text-800", children: formatTime(timeElapsed) })
|
|
4908
5182
|
] }),
|
|
4909
|
-
/* @__PURE__ */
|
|
5183
|
+
/* @__PURE__ */ jsxs14("div", { className: "text-2xl font-medium text-text-800 leading-7", children: [
|
|
4910
5184
|
correctAnswers,
|
|
4911
5185
|
" de ",
|
|
4912
5186
|
totalQuestions
|
|
4913
5187
|
] }),
|
|
4914
|
-
/* @__PURE__ */
|
|
5188
|
+
/* @__PURE__ */ jsx17("div", { className: "text-2xs font-medium text-text-600 mt-1", children: "Corretas" })
|
|
4915
5189
|
] })
|
|
4916
5190
|
] }),
|
|
4917
|
-
/* @__PURE__ */
|
|
4918
|
-
/* @__PURE__ */
|
|
5191
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex flex-col gap-4 w-full", children: [
|
|
5192
|
+
/* @__PURE__ */ jsx17(
|
|
4919
5193
|
ProgressBar_default,
|
|
4920
5194
|
{
|
|
4921
5195
|
className: "w-full",
|
|
@@ -4929,7 +5203,7 @@ var QuizResultPerformance = forwardRef9(
|
|
|
4929
5203
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
4930
5204
|
}
|
|
4931
5205
|
),
|
|
4932
|
-
/* @__PURE__ */
|
|
5206
|
+
/* @__PURE__ */ jsx17(
|
|
4933
5207
|
ProgressBar_default,
|
|
4934
5208
|
{
|
|
4935
5209
|
className: "w-full",
|
|
@@ -4943,7 +5217,7 @@ var QuizResultPerformance = forwardRef9(
|
|
|
4943
5217
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
4944
5218
|
}
|
|
4945
5219
|
),
|
|
4946
|
-
/* @__PURE__ */
|
|
5220
|
+
/* @__PURE__ */ jsx17(
|
|
4947
5221
|
ProgressBar_default,
|
|
4948
5222
|
{
|
|
4949
5223
|
className: "w-full",
|
|
@@ -4963,7 +5237,7 @@ var QuizResultPerformance = forwardRef9(
|
|
|
4963
5237
|
);
|
|
4964
5238
|
}
|
|
4965
5239
|
);
|
|
4966
|
-
var QuizListResult =
|
|
5240
|
+
var QuizListResult = forwardRef10(({ className, onSubjectClick, ...props }, ref) => {
|
|
4967
5241
|
const {
|
|
4968
5242
|
getQuestionsGroupedBySubject,
|
|
4969
5243
|
isQuestionAnswered,
|
|
@@ -4994,9 +5268,9 @@ var QuizListResult = forwardRef9(({ className, onSubjectClick, ...props }, ref)
|
|
|
4994
5268
|
};
|
|
4995
5269
|
}
|
|
4996
5270
|
);
|
|
4997
|
-
return /* @__PURE__ */
|
|
4998
|
-
/* @__PURE__ */
|
|
4999
|
-
/* @__PURE__ */
|
|
5271
|
+
return /* @__PURE__ */ jsxs14("section", { ref, className, ...props, children: [
|
|
5272
|
+
/* @__PURE__ */ jsx17("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Mat\xE9rias" }),
|
|
5273
|
+
/* @__PURE__ */ jsx17("ul", { className: "flex flex-col gap-2", children: subjectsStats.map((subject) => /* @__PURE__ */ jsx17("li", { children: /* @__PURE__ */ jsx17(
|
|
5000
5274
|
CardResults,
|
|
5001
5275
|
{
|
|
5002
5276
|
onClick: () => onSubjectClick?.(subject.subject),
|
|
@@ -5004,7 +5278,7 @@ var QuizListResult = forwardRef9(({ className, onSubjectClick, ...props }, ref)
|
|
|
5004
5278
|
header: subject.subject,
|
|
5005
5279
|
correct_answers: subject.correct,
|
|
5006
5280
|
incorrect_answers: subject.incorrect,
|
|
5007
|
-
icon: /* @__PURE__ */
|
|
5281
|
+
icon: /* @__PURE__ */ jsx17(Book, { size: 20 }),
|
|
5008
5282
|
direction: "row"
|
|
5009
5283
|
}
|
|
5010
5284
|
) }, subject.subject)) })
|
|
@@ -5017,11 +5291,11 @@ var QuizListResultByMateria = ({
|
|
|
5017
5291
|
const { getQuestionsGroupedBySubject, getUserAnswerByQuestionId } = useQuizStore();
|
|
5018
5292
|
const groupedQuestions = getQuestionsGroupedBySubject();
|
|
5019
5293
|
const answeredQuestions = groupedQuestions[subject] || [];
|
|
5020
|
-
return /* @__PURE__ */
|
|
5021
|
-
/* @__PURE__ */
|
|
5022
|
-
/* @__PURE__ */
|
|
5023
|
-
/* @__PURE__ */
|
|
5024
|
-
/* @__PURE__ */
|
|
5294
|
+
return /* @__PURE__ */ jsxs14("div", { className: "w-full max-w-[1000px] flex flex-col mx-auto h-full relative not-lg:px-6", children: [
|
|
5295
|
+
/* @__PURE__ */ jsx17("div", { className: "flex flex-row pt-4 justify-between", children: /* @__PURE__ */ jsx17("p", { className: "text-text-950 font-bold text-2xl", children: subject }) }),
|
|
5296
|
+
/* @__PURE__ */ jsxs14("section", { className: "flex flex-col ", children: [
|
|
5297
|
+
/* @__PURE__ */ jsx17("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Resultado das quest\xF5es" }),
|
|
5298
|
+
/* @__PURE__ */ jsx17("ul", { className: "flex flex-col gap-2 pt-4", children: answeredQuestions.map((question) => /* @__PURE__ */ jsx17("li", { children: /* @__PURE__ */ jsx17(
|
|
5025
5299
|
CardStatus,
|
|
5026
5300
|
{
|
|
5027
5301
|
className: "max-w-full",
|
|
@@ -5043,6 +5317,7 @@ export {
|
|
|
5043
5317
|
Quiz,
|
|
5044
5318
|
QuizAlternative,
|
|
5045
5319
|
QuizContent,
|
|
5320
|
+
QuizDissertative,
|
|
5046
5321
|
QuizFooter,
|
|
5047
5322
|
QuizHeader,
|
|
5048
5323
|
QuizHeaderResult,
|