analytica-frontend-lib 1.1.64 → 1.1.66
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/Accordation/index.js +28 -2
- package/dist/Accordation/index.js.map +1 -1
- package/dist/Accordation/index.mjs +28 -2
- package/dist/Accordation/index.mjs.map +1 -1
- package/dist/Card/index.d.mts +1 -1
- package/dist/Card/index.d.ts +1 -1
- package/dist/Card/index.js +28 -2
- package/dist/Card/index.js.map +1 -1
- package/dist/Card/index.mjs +28 -2
- package/dist/Card/index.mjs.map +1 -1
- package/dist/NotificationCard/index.d.mts +1 -1
- package/dist/NotificationCard/index.d.ts +1 -1
- package/dist/NotificationCard/index.js +23 -2
- package/dist/NotificationCard/index.js.map +1 -1
- package/dist/NotificationCard/index.mjs +21 -1
- package/dist/NotificationCard/index.mjs.map +1 -1
- package/dist/{NotificationCard-4GgB0Nsf.d.mts → NotificationCard-DMdkuVEr.d.mts} +7 -2
- package/dist/{NotificationCard-4GgB0Nsf.d.ts → NotificationCard-DMdkuVEr.d.ts} +7 -2
- package/dist/Quiz/index.js +29 -3
- package/dist/Quiz/index.js.map +1 -1
- package/dist/Quiz/index.mjs +29 -3
- package/dist/Quiz/index.mjs.map +1 -1
- package/dist/Quiz/useQuizStore/index.d.mts +1 -1
- package/dist/Quiz/useQuizStore/index.d.ts +1 -1
- package/dist/Quiz/useQuizStore/index.js +1 -1
- package/dist/Quiz/useQuizStore/index.js.map +1 -1
- package/dist/Quiz/useQuizStore/index.mjs +1 -1
- package/dist/Quiz/useQuizStore/index.mjs.map +1 -1
- package/dist/index.d.mts +6 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.js +179 -127
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +178 -127
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -151,6 +151,7 @@ __export(src_exports, {
|
|
|
151
151
|
getSubjectIcon: () => getSubjectIcon,
|
|
152
152
|
getSubjectInfo: () => getSubjectInfo,
|
|
153
153
|
getSubjectName: () => getSubjectName,
|
|
154
|
+
syncNotificationState: () => syncNotificationState,
|
|
154
155
|
useApiConfig: () => useApiConfig,
|
|
155
156
|
useAuth: () => useAuth,
|
|
156
157
|
useAuthGuard: () => useAuthGuard,
|
|
@@ -5108,10 +5109,36 @@ var CardStatus = (0, import_react17.forwardRef)(
|
|
|
5108
5109
|
return "Incorreta";
|
|
5109
5110
|
case "unanswered":
|
|
5110
5111
|
return "Em branco";
|
|
5112
|
+
case "pending":
|
|
5113
|
+
return "Avalia\xE7\xE3o pendente";
|
|
5111
5114
|
default:
|
|
5112
5115
|
return "Em branco";
|
|
5113
5116
|
}
|
|
5114
5117
|
};
|
|
5118
|
+
const getIconBadge = (status2) => {
|
|
5119
|
+
switch (status2) {
|
|
5120
|
+
case "correct":
|
|
5121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_phosphor_react13.CheckCircle, {});
|
|
5122
|
+
case "incorrect":
|
|
5123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_phosphor_react13.XCircle, {});
|
|
5124
|
+
case "pending":
|
|
5125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_phosphor_react13.Clock, {});
|
|
5126
|
+
default:
|
|
5127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_phosphor_react13.XCircle, {});
|
|
5128
|
+
}
|
|
5129
|
+
};
|
|
5130
|
+
const getActionBadge = (status2) => {
|
|
5131
|
+
switch (status2) {
|
|
5132
|
+
case "correct":
|
|
5133
|
+
return "success";
|
|
5134
|
+
case "incorrect":
|
|
5135
|
+
return "error";
|
|
5136
|
+
case "pending":
|
|
5137
|
+
return "info";
|
|
5138
|
+
default:
|
|
5139
|
+
return "info";
|
|
5140
|
+
}
|
|
5141
|
+
};
|
|
5115
5142
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5116
5143
|
CardBase,
|
|
5117
5144
|
{
|
|
@@ -5127,10 +5154,10 @@ var CardStatus = (0, import_react17.forwardRef)(
|
|
|
5127
5154
|
status && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5128
5155
|
Badge_default,
|
|
5129
5156
|
{
|
|
5130
|
-
action: status
|
|
5157
|
+
action: getActionBadge(status),
|
|
5131
5158
|
variant: "solid",
|
|
5132
5159
|
size: "medium",
|
|
5133
|
-
iconLeft: status
|
|
5160
|
+
iconLeft: getIconBadge(status),
|
|
5134
5161
|
children: getLabelBadge(status)
|
|
5135
5162
|
}
|
|
5136
5163
|
),
|
|
@@ -8772,7 +8799,7 @@ var QUIZ_TYPE = /* @__PURE__ */ ((QUIZ_TYPE2) => {
|
|
|
8772
8799
|
var QUESTION_TYPE = /* @__PURE__ */ ((QUESTION_TYPE2) => {
|
|
8773
8800
|
QUESTION_TYPE2["ALTERNATIVA"] = "ALTERNATIVA";
|
|
8774
8801
|
QUESTION_TYPE2["DISSERTATIVA"] = "DISSERTATIVA";
|
|
8775
|
-
QUESTION_TYPE2["
|
|
8802
|
+
QUESTION_TYPE2["MULTIPLA_ESCOLHA"] = "MULTIPLA_ESCOLHA";
|
|
8776
8803
|
QUESTION_TYPE2["VERDADEIRO_FALSO"] = "VERDADEIRO_FALSO";
|
|
8777
8804
|
QUESTION_TYPE2["LIGAR_PONTOS"] = "LIGAR_PONTOS";
|
|
8778
8805
|
QUESTION_TYPE2["PREENCHER"] = "PREENCHER";
|
|
@@ -10244,7 +10271,7 @@ var QuizContent = (0, import_react32.forwardRef)(({ paddingBottom }) => {
|
|
|
10244
10271
|
const currentQuestion = getCurrentQuestion();
|
|
10245
10272
|
const questionComponents = {
|
|
10246
10273
|
["ALTERNATIVA" /* ALTERNATIVA */]: QuizAlternative,
|
|
10247
|
-
["
|
|
10274
|
+
["MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */]: QuizMultipleChoice,
|
|
10248
10275
|
["DISSERTATIVA" /* DISSERTATIVA */]: QuizDissertative,
|
|
10249
10276
|
["VERDADEIRO_FALSO" /* VERDADEIRO_FALSO */]: QuizTrueOrFalse,
|
|
10250
10277
|
["LIGAR_PONTOS" /* LIGAR_PONTOS */]: QuizConnectDots,
|
|
@@ -10785,7 +10812,7 @@ var QuizHeaderResult = (0, import_react33.forwardRef)(
|
|
|
10785
10812
|
);
|
|
10786
10813
|
}
|
|
10787
10814
|
);
|
|
10788
|
-
var QuizResultHeaderTitle = (0, import_react33.forwardRef)(({ className, ...props }, ref) => {
|
|
10815
|
+
var QuizResultHeaderTitle = (0, import_react33.forwardRef)(({ className, showBadge = true, ...props }, ref) => {
|
|
10789
10816
|
const { quiz } = useQuizStore();
|
|
10790
10817
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
10791
10818
|
"div",
|
|
@@ -10795,7 +10822,7 @@ var QuizResultHeaderTitle = (0, import_react33.forwardRef)(({ className, ...prop
|
|
|
10795
10822
|
...props,
|
|
10796
10823
|
children: [
|
|
10797
10824
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: "Resultado" }),
|
|
10798
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(QuizBadge, { subtype: quiz?.subtype || void 0 })
|
|
10825
|
+
showBadge && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(QuizBadge, { subtype: quiz?.subtype || void 0 })
|
|
10799
10826
|
]
|
|
10800
10827
|
}
|
|
10801
10828
|
);
|
|
@@ -10813,131 +10840,133 @@ var QuizResultTitle = (0, import_react33.forwardRef)(({ className, ...props }, r
|
|
|
10813
10840
|
}
|
|
10814
10841
|
);
|
|
10815
10842
|
});
|
|
10816
|
-
var QuizResultPerformance = (0, import_react33.forwardRef)(
|
|
10817
|
-
|
|
10818
|
-
|
|
10819
|
-
|
|
10820
|
-
|
|
10821
|
-
|
|
10822
|
-
|
|
10823
|
-
|
|
10824
|
-
|
|
10825
|
-
|
|
10826
|
-
|
|
10827
|
-
|
|
10828
|
-
|
|
10829
|
-
|
|
10830
|
-
|
|
10831
|
-
|
|
10832
|
-
|
|
10833
|
-
|
|
10834
|
-
|
|
10835
|
-
|
|
10843
|
+
var QuizResultPerformance = (0, import_react33.forwardRef)(({ showDetails = true, ...props }, ref) => {
|
|
10844
|
+
const {
|
|
10845
|
+
getTotalQuestions,
|
|
10846
|
+
formatTime: formatTime2,
|
|
10847
|
+
getQuestionResultStatistics,
|
|
10848
|
+
getQuestionResult
|
|
10849
|
+
} = useQuizStore();
|
|
10850
|
+
const totalQuestions = getTotalQuestions();
|
|
10851
|
+
const questionResult = getQuestionResult();
|
|
10852
|
+
let correctAnswers = 0;
|
|
10853
|
+
let correctEasyAnswers = 0;
|
|
10854
|
+
let correctMediumAnswers = 0;
|
|
10855
|
+
let correctDifficultAnswers = 0;
|
|
10856
|
+
let totalEasyQuestions = 0;
|
|
10857
|
+
let totalMediumQuestions = 0;
|
|
10858
|
+
let totalDifficultQuestions = 0;
|
|
10859
|
+
if (questionResult) {
|
|
10860
|
+
questionResult.answers.forEach((answer) => {
|
|
10861
|
+
const isCorrect = answer.answerStatus == "RESPOSTA_CORRETA" /* RESPOSTA_CORRETA */;
|
|
10862
|
+
if (isCorrect) {
|
|
10863
|
+
correctAnswers++;
|
|
10864
|
+
}
|
|
10865
|
+
if (answer.difficultyLevel === "FACIL" /* FACIL */) {
|
|
10866
|
+
totalEasyQuestions++;
|
|
10836
10867
|
if (isCorrect) {
|
|
10837
|
-
|
|
10868
|
+
correctEasyAnswers++;
|
|
10838
10869
|
}
|
|
10839
|
-
|
|
10840
|
-
|
|
10841
|
-
|
|
10842
|
-
|
|
10843
|
-
|
|
10844
|
-
|
|
10845
|
-
|
|
10846
|
-
|
|
10847
|
-
|
|
10848
|
-
}
|
|
10849
|
-
} else if (answer.difficultyLevel === "DIFICIL" /* DIFICIL */) {
|
|
10850
|
-
totalDifficultQuestions++;
|
|
10851
|
-
if (isCorrect) {
|
|
10852
|
-
correctDifficultAnswers++;
|
|
10853
|
-
}
|
|
10870
|
+
} else if (answer.difficultyLevel === "MEDIO" /* MEDIO */) {
|
|
10871
|
+
totalMediumQuestions++;
|
|
10872
|
+
if (isCorrect) {
|
|
10873
|
+
correctMediumAnswers++;
|
|
10874
|
+
}
|
|
10875
|
+
} else if (answer.difficultyLevel === "DIFICIL" /* DIFICIL */) {
|
|
10876
|
+
totalDifficultQuestions++;
|
|
10877
|
+
if (isCorrect) {
|
|
10878
|
+
correctDifficultAnswers++;
|
|
10854
10879
|
}
|
|
10855
|
-
});
|
|
10856
|
-
}
|
|
10857
|
-
const percentage = totalQuestions > 0 ? Math.round(correctAnswers / totalQuestions * 100) : 0;
|
|
10858
|
-
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
10859
|
-
"div",
|
|
10860
|
-
{
|
|
10861
|
-
className: "flex flex-row gap-6 p-6 rounded-xl bg-background justify-between",
|
|
10862
|
-
ref,
|
|
10863
|
-
...props,
|
|
10864
|
-
children: [
|
|
10865
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "relative", children: [
|
|
10866
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10867
|
-
ProgressCircle_default,
|
|
10868
|
-
{
|
|
10869
|
-
size: "medium",
|
|
10870
|
-
variant: "green",
|
|
10871
|
-
value: percentage,
|
|
10872
|
-
showPercentage: false,
|
|
10873
|
-
label: ""
|
|
10874
|
-
}
|
|
10875
|
-
),
|
|
10876
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
10877
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-1 mb-1", children: [
|
|
10878
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_phosphor_react24.Clock, { size: 12, weight: "regular", className: "text-text-800" }),
|
|
10879
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-2xs font-medium text-text-800", children: formatTime2(
|
|
10880
|
-
(getQuestionResultStatistics()?.timeSpent ?? 0) * 60
|
|
10881
|
-
) })
|
|
10882
|
-
] }),
|
|
10883
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "text-2xl font-medium text-text-800 leading-7", children: [
|
|
10884
|
-
getQuestionResultStatistics()?.correctAnswers ?? "--",
|
|
10885
|
-
" de",
|
|
10886
|
-
" ",
|
|
10887
|
-
totalQuestions
|
|
10888
|
-
] }),
|
|
10889
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "text-2xs font-medium text-text-600 mt-1", children: "Corretas" })
|
|
10890
|
-
] })
|
|
10891
|
-
] }),
|
|
10892
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col gap-4 w-full", children: [
|
|
10893
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10894
|
-
ProgressBar_default,
|
|
10895
|
-
{
|
|
10896
|
-
className: "w-full",
|
|
10897
|
-
layout: "stacked",
|
|
10898
|
-
variant: "green",
|
|
10899
|
-
value: correctEasyAnswers,
|
|
10900
|
-
max: totalEasyQuestions,
|
|
10901
|
-
label: "F\xE1ceis",
|
|
10902
|
-
showHitCount: true,
|
|
10903
|
-
labelClassName: "text-base font-medium text-text-800 leading-none",
|
|
10904
|
-
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
10905
|
-
}
|
|
10906
|
-
),
|
|
10907
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10908
|
-
ProgressBar_default,
|
|
10909
|
-
{
|
|
10910
|
-
className: "w-full",
|
|
10911
|
-
layout: "stacked",
|
|
10912
|
-
variant: "green",
|
|
10913
|
-
value: correctMediumAnswers,
|
|
10914
|
-
max: totalMediumQuestions,
|
|
10915
|
-
label: "M\xE9dias",
|
|
10916
|
-
showHitCount: true,
|
|
10917
|
-
labelClassName: "text-base font-medium text-text-800 leading-none",
|
|
10918
|
-
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
10919
|
-
}
|
|
10920
|
-
),
|
|
10921
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10922
|
-
ProgressBar_default,
|
|
10923
|
-
{
|
|
10924
|
-
className: "w-full",
|
|
10925
|
-
layout: "stacked",
|
|
10926
|
-
variant: "green",
|
|
10927
|
-
value: correctDifficultAnswers,
|
|
10928
|
-
max: totalDifficultQuestions,
|
|
10929
|
-
label: "Dif\xEDceis",
|
|
10930
|
-
showHitCount: true,
|
|
10931
|
-
labelClassName: "text-base font-medium text-text-800 leading-none",
|
|
10932
|
-
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
10933
|
-
}
|
|
10934
|
-
)
|
|
10935
|
-
] })
|
|
10936
|
-
]
|
|
10937
10880
|
}
|
|
10938
|
-
);
|
|
10881
|
+
});
|
|
10939
10882
|
}
|
|
10940
|
-
);
|
|
10883
|
+
const percentage = totalQuestions > 0 ? Math.round(correctAnswers / totalQuestions * 100) : 0;
|
|
10884
|
+
const classesJustifyBetween = showDetails ? "justify-between" : "justify-center";
|
|
10885
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
10886
|
+
"div",
|
|
10887
|
+
{
|
|
10888
|
+
className: cn(
|
|
10889
|
+
"flex flex-row gap-6 p-6 rounded-xl bg-background",
|
|
10890
|
+
classesJustifyBetween
|
|
10891
|
+
),
|
|
10892
|
+
ref,
|
|
10893
|
+
...props,
|
|
10894
|
+
children: [
|
|
10895
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "relative", children: [
|
|
10896
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10897
|
+
ProgressCircle_default,
|
|
10898
|
+
{
|
|
10899
|
+
size: "medium",
|
|
10900
|
+
variant: "green",
|
|
10901
|
+
value: percentage,
|
|
10902
|
+
showPercentage: false,
|
|
10903
|
+
label: ""
|
|
10904
|
+
}
|
|
10905
|
+
),
|
|
10906
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
10907
|
+
showDetails && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-1 mb-1", children: [
|
|
10908
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_phosphor_react24.Clock, { size: 12, weight: "regular", className: "text-text-800" }),
|
|
10909
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-2xs font-medium text-text-800", children: formatTime2(
|
|
10910
|
+
(getQuestionResultStatistics()?.timeSpent ?? 0) * 60
|
|
10911
|
+
) })
|
|
10912
|
+
] }),
|
|
10913
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "text-2xl font-medium text-text-800 leading-7", children: [
|
|
10914
|
+
getQuestionResultStatistics()?.correctAnswers ?? "--",
|
|
10915
|
+
" de",
|
|
10916
|
+
" ",
|
|
10917
|
+
totalQuestions
|
|
10918
|
+
] }),
|
|
10919
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "text-2xs font-medium text-text-600 mt-1", children: "Corretas" })
|
|
10920
|
+
] })
|
|
10921
|
+
] }),
|
|
10922
|
+
showDetails && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col gap-4 w-full", children: [
|
|
10923
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10924
|
+
ProgressBar_default,
|
|
10925
|
+
{
|
|
10926
|
+
className: "w-full",
|
|
10927
|
+
layout: "stacked",
|
|
10928
|
+
variant: "green",
|
|
10929
|
+
value: correctEasyAnswers,
|
|
10930
|
+
max: totalEasyQuestions,
|
|
10931
|
+
label: "F\xE1ceis",
|
|
10932
|
+
showHitCount: true,
|
|
10933
|
+
labelClassName: "text-base font-medium text-text-800 leading-none",
|
|
10934
|
+
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
10935
|
+
}
|
|
10936
|
+
),
|
|
10937
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10938
|
+
ProgressBar_default,
|
|
10939
|
+
{
|
|
10940
|
+
className: "w-full",
|
|
10941
|
+
layout: "stacked",
|
|
10942
|
+
variant: "green",
|
|
10943
|
+
value: correctMediumAnswers,
|
|
10944
|
+
max: totalMediumQuestions,
|
|
10945
|
+
label: "M\xE9dias",
|
|
10946
|
+
showHitCount: true,
|
|
10947
|
+
labelClassName: "text-base font-medium text-text-800 leading-none",
|
|
10948
|
+
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
10949
|
+
}
|
|
10950
|
+
),
|
|
10951
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10952
|
+
ProgressBar_default,
|
|
10953
|
+
{
|
|
10954
|
+
className: "w-full",
|
|
10955
|
+
layout: "stacked",
|
|
10956
|
+
variant: "green",
|
|
10957
|
+
value: correctDifficultAnswers,
|
|
10958
|
+
max: totalDifficultQuestions,
|
|
10959
|
+
label: "Dif\xEDceis",
|
|
10960
|
+
showHitCount: true,
|
|
10961
|
+
labelClassName: "text-base font-medium text-text-800 leading-none",
|
|
10962
|
+
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
10963
|
+
}
|
|
10964
|
+
)
|
|
10965
|
+
] })
|
|
10966
|
+
]
|
|
10967
|
+
}
|
|
10968
|
+
);
|
|
10969
|
+
});
|
|
10941
10970
|
var QuizListResult = (0, import_react33.forwardRef)(({ className, onSubjectClick, ...props }, ref) => {
|
|
10942
10971
|
const { getQuestionsGroupedBySubject } = useQuizStore();
|
|
10943
10972
|
const groupedQuestions = getQuestionsGroupedBySubject();
|
|
@@ -10989,11 +11018,12 @@ var QuizListResultByMateria = ({
|
|
|
10989
11018
|
const { getQuestionsGroupedBySubject, getQuestionIndex } = useQuizStore();
|
|
10990
11019
|
const groupedQuestions = getQuestionsGroupedBySubject();
|
|
10991
11020
|
const answeredQuestions = groupedQuestions[subject] || [];
|
|
11021
|
+
const formattedQuestions = subject == "all" ? Object.values(groupedQuestions).flat() : answeredQuestions;
|
|
10992
11022
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col", children: [
|
|
10993
11023
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex flex-row pt-4 justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: answeredQuestions?.[0]?.knowledgeMatrix?.[0]?.subject?.name ?? "Sem mat\xE9ria" }) }),
|
|
10994
11024
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("section", { className: "flex flex-col ", children: [
|
|
10995
11025
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Resultado das quest\xF5es" }),
|
|
10996
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("ul", { className: "flex flex-col gap-2 pt-4", children:
|
|
11026
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("ul", { className: "flex flex-col gap-2 pt-4", children: formattedQuestions.map((question) => {
|
|
10997
11027
|
const questionIndex = getQuestionIndex(
|
|
10998
11028
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10999
11029
|
question.questionId ?? question.id
|
|
@@ -11010,6 +11040,8 @@ var QuizListResultByMateria = ({
|
|
|
11010
11040
|
return "incorrect";
|
|
11011
11041
|
if (question.answerStatus === "NAO_RESPONDIDO" /* NAO_RESPONDIDO */)
|
|
11012
11042
|
return "unanswered";
|
|
11043
|
+
if (question.answerStatus === "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */)
|
|
11044
|
+
return "pending";
|
|
11013
11045
|
return void 0;
|
|
11014
11046
|
})(),
|
|
11015
11047
|
onClick: () => onQuestionClick?.(question)
|
|
@@ -11325,6 +11357,11 @@ var mock_content_default = "./mock-content-K2CDVG6P.png";
|
|
|
11325
11357
|
|
|
11326
11358
|
// src/components/NotificationCard/NotificationCard.tsx
|
|
11327
11359
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
11360
|
+
var syncNotificationState = (open, isNotificationActive, setActiveStates, key = "notifications") => {
|
|
11361
|
+
if (!open && isNotificationActive) {
|
|
11362
|
+
setActiveStates((prev) => ({ ...prev, [key]: false }));
|
|
11363
|
+
}
|
|
11364
|
+
};
|
|
11328
11365
|
var NotificationEmpty = ({
|
|
11329
11366
|
emptyStateImage,
|
|
11330
11367
|
emptyStateTitle = "Nenhuma notifica\xE7\xE3o no momento",
|
|
@@ -11661,6 +11698,20 @@ var NotificationCenter = ({
|
|
|
11661
11698
|
) })
|
|
11662
11699
|
] })
|
|
11663
11700
|
}
|
|
11701
|
+
),
|
|
11702
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11703
|
+
Modal_default,
|
|
11704
|
+
{
|
|
11705
|
+
isOpen: globalNotificationModal.isOpen,
|
|
11706
|
+
onClose: () => setGlobalNotificationModal({ isOpen: false, notification: null }),
|
|
11707
|
+
title: globalNotificationModal.notification?.title || "",
|
|
11708
|
+
variant: "activity",
|
|
11709
|
+
description: globalNotificationModal.notification?.message,
|
|
11710
|
+
image: emptyStateImage || mock_content_default,
|
|
11711
|
+
actionLink: globalNotificationModal.notification?.actionLink || void 0,
|
|
11712
|
+
actionLabel: "Ver mais",
|
|
11713
|
+
size: "lg"
|
|
11714
|
+
}
|
|
11664
11715
|
)
|
|
11665
11716
|
] });
|
|
11666
11717
|
}
|
|
@@ -12039,6 +12090,7 @@ var createNotificationsHook = (apiClient) => {
|
|
|
12039
12090
|
getSubjectIcon,
|
|
12040
12091
|
getSubjectInfo,
|
|
12041
12092
|
getSubjectName,
|
|
12093
|
+
syncNotificationState,
|
|
12042
12094
|
useApiConfig,
|
|
12043
12095
|
useAuth,
|
|
12044
12096
|
useAuthGuard,
|