analytica-frontend-lib 1.1.98 → 1.2.0
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.js +11 -0
- package/dist/Quiz/index.js.map +1 -1
- package/dist/Quiz/index.mjs +11 -0
- package/dist/Quiz/index.mjs.map +1 -1
- package/dist/Quiz/useQuizStore/index.d.mts +1 -0
- package/dist/Quiz/useQuizStore/index.d.ts +1 -0
- package/dist/Quiz/useQuizStore/index.js +9 -0
- package/dist/Quiz/useQuizStore/index.js.map +1 -1
- package/dist/Quiz/useQuizStore/index.mjs +9 -0
- package/dist/Quiz/useQuizStore/index.mjs.map +1 -1
- package/dist/index.css +3 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -0
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +3 -0
- package/dist/styles.css.map +1 -1
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -10701,6 +10701,15 @@ var useQuizStore = create10()(
|
|
|
10701
10701
|
});
|
|
10702
10702
|
}
|
|
10703
10703
|
},
|
|
10704
|
+
skipCurrentQuestionIfUnanswered: () => {
|
|
10705
|
+
const { getCurrentQuestion, getCurrentAnswer, skipQuestion } = get();
|
|
10706
|
+
const currentQuestion = getCurrentQuestion();
|
|
10707
|
+
const currentAnswer = getCurrentAnswer();
|
|
10708
|
+
if (!currentQuestion) return;
|
|
10709
|
+
if (!currentAnswer || currentAnswer.optionId === null && currentAnswer.answer === null) {
|
|
10710
|
+
skipQuestion();
|
|
10711
|
+
}
|
|
10712
|
+
},
|
|
10704
10713
|
addUserAnswer: (questionId, answerId) => {
|
|
10705
10714
|
const { quiz, userAnswers } = get();
|
|
10706
10715
|
if (!quiz) return;
|
|
@@ -12150,6 +12159,7 @@ var QuizFooter = forwardRef22(
|
|
|
12150
12159
|
getUnansweredQuestionsFromUserAnswers,
|
|
12151
12160
|
getCurrentAnswer,
|
|
12152
12161
|
skipQuestion,
|
|
12162
|
+
skipCurrentQuestionIfUnanswered,
|
|
12153
12163
|
getCurrentQuestion,
|
|
12154
12164
|
getQuestionStatusFromUserAnswers,
|
|
12155
12165
|
variant,
|
|
@@ -12174,6 +12184,7 @@ var QuizFooter = forwardRef22(
|
|
|
12174
12184
|
const quizType = quiz?.type || "SIMULADO" /* SIMULADO */;
|
|
12175
12185
|
const quizTypeLabel = getTypeLabel(quizType);
|
|
12176
12186
|
const handleFinishQuiz = async () => {
|
|
12187
|
+
skipCurrentQuestionIfUnanswered();
|
|
12177
12188
|
if (unansweredQuestions.length > 0) {
|
|
12178
12189
|
openModal("alertDialog");
|
|
12179
12190
|
return;
|