analytica-frontend-lib 1.1.91 → 1.1.92
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/DownloadButton/index.js +0 -1
- package/dist/DownloadButton/index.js.map +1 -1
- package/dist/DownloadButton/index.mjs +0 -1
- package/dist/DownloadButton/index.mjs.map +1 -1
- package/dist/Quiz/index.js +10 -41
- package/dist/Quiz/index.js.map +1 -1
- package/dist/Quiz/index.mjs +10 -41
- package/dist/Quiz/index.mjs.map +1 -1
- package/dist/Quiz/useQuizStore/index.js +0 -13
- package/dist/Quiz/useQuizStore/index.js.map +1 -1
- package/dist/Quiz/useQuizStore/index.mjs +0 -13
- package/dist/Quiz/useQuizStore/index.mjs.map +1 -1
- package/dist/VideoPlayer/index.js +0 -1
- package/dist/VideoPlayer/index.js.map +1 -1
- package/dist/VideoPlayer/index.mjs +0 -1
- package/dist/VideoPlayer/index.mjs.map +1 -1
- package/dist/index.d.mts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +31 -47
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +31 -47
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -8331,7 +8331,6 @@ var DownloadButton = ({
|
|
|
8331
8331
|
await new Promise((resolve) => setTimeout(resolve, 200));
|
|
8332
8332
|
}
|
|
8333
8333
|
} catch (error) {
|
|
8334
|
-
console.error(`Erro ao baixar ${item.label}:`, error);
|
|
8335
8334
|
onDownloadError?.(
|
|
8336
8335
|
item.type,
|
|
8337
8336
|
error instanceof Error ? error : new Error(`Falha ao baixar ${item.label}`)
|
|
@@ -10215,7 +10214,6 @@ var useQuizStore = create9()(
|
|
|
10215
10214
|
const activityId = quiz.id;
|
|
10216
10215
|
const userId = get().getUserId();
|
|
10217
10216
|
if (!userId || userId === "") {
|
|
10218
|
-
console.warn("selectAnswer called before userId is set");
|
|
10219
10217
|
return;
|
|
10220
10218
|
}
|
|
10221
10219
|
const question = quiz.questions.find((q) => q.id === questionId);
|
|
@@ -10249,7 +10247,6 @@ var useQuizStore = create9()(
|
|
|
10249
10247
|
const activityId = quiz.id;
|
|
10250
10248
|
const userId = get().getUserId();
|
|
10251
10249
|
if (!userId || userId === "") {
|
|
10252
|
-
console.warn("selectMultipleAnswer called before userId is set");
|
|
10253
10250
|
return;
|
|
10254
10251
|
}
|
|
10255
10252
|
const question = quiz.questions.find((q) => q.id === questionId);
|
|
@@ -10284,16 +10281,10 @@ var useQuizStore = create9()(
|
|
|
10284
10281
|
const activityId = quiz.id;
|
|
10285
10282
|
const userId = get().getUserId();
|
|
10286
10283
|
if (!userId || userId === "") {
|
|
10287
|
-
console.warn(
|
|
10288
|
-
"selectDissertativeAnswer called before userId is set"
|
|
10289
|
-
);
|
|
10290
10284
|
return;
|
|
10291
10285
|
}
|
|
10292
10286
|
const question = quiz.questions.find((q) => q.id === questionId);
|
|
10293
10287
|
if (!question || question.questionType !== "DISSERTATIVA" /* DISSERTATIVA */) {
|
|
10294
|
-
console.warn(
|
|
10295
|
-
"selectDissertativeAnswer called for non-dissertative question"
|
|
10296
|
-
);
|
|
10297
10288
|
return;
|
|
10298
10289
|
}
|
|
10299
10290
|
const existingAnswerIndex = userAnswers.findIndex(
|
|
@@ -10327,7 +10318,6 @@ var useQuizStore = create9()(
|
|
|
10327
10318
|
const activityId = quiz.id;
|
|
10328
10319
|
const userId = get().getUserId();
|
|
10329
10320
|
if (!userId || userId === "") {
|
|
10330
|
-
console.warn("skipQuestion called before userId is set");
|
|
10331
10321
|
return;
|
|
10332
10322
|
}
|
|
10333
10323
|
const existingAnswerIndex = userAnswers.findIndex(
|
|
@@ -10360,7 +10350,6 @@ var useQuizStore = create9()(
|
|
|
10360
10350
|
const activityId = quiz.id;
|
|
10361
10351
|
const userId = get().getUserId();
|
|
10362
10352
|
if (!userId || userId === "") {
|
|
10363
|
-
console.warn("addUserAnswer called before userId is set");
|
|
10364
10353
|
return;
|
|
10365
10354
|
}
|
|
10366
10355
|
const question = quiz.questions.find((q) => q.id === questionId);
|
|
@@ -10588,9 +10577,6 @@ var useQuizStore = create9()(
|
|
|
10588
10577
|
);
|
|
10589
10578
|
}
|
|
10590
10579
|
if (questionIndex === -1) {
|
|
10591
|
-
console.warn(
|
|
10592
|
-
`Question with id "${question.id}" not found in active quiz`
|
|
10593
|
-
);
|
|
10594
10580
|
return;
|
|
10595
10581
|
}
|
|
10596
10582
|
set({ currentQuestionIndex: questionIndex });
|
|
@@ -11955,34 +11941,16 @@ var QuizFooter = forwardRef21(
|
|
|
11955
11941
|
children: "Avan\xE7ar"
|
|
11956
11942
|
}
|
|
11957
11943
|
)
|
|
11958
|
-
] }) : /* @__PURE__ */
|
|
11959
|
-
|
|
11960
|
-
|
|
11961
|
-
|
|
11962
|
-
|
|
11963
|
-
|
|
11964
|
-
|
|
11965
|
-
|
|
11966
|
-
|
|
11967
|
-
|
|
11968
|
-
) }),
|
|
11969
|
-
/* @__PURE__ */ jsx51(
|
|
11970
|
-
Button_default,
|
|
11971
|
-
{
|
|
11972
|
-
variant: "solid",
|
|
11973
|
-
action: "primary",
|
|
11974
|
-
size: "medium",
|
|
11975
|
-
onClick: () => {
|
|
11976
|
-
if (quiz?.canRetry) {
|
|
11977
|
-
onRepeat?.();
|
|
11978
|
-
} else {
|
|
11979
|
-
openModal("modalResolution");
|
|
11980
|
-
}
|
|
11981
|
-
},
|
|
11982
|
-
children: quiz?.canRetry ? `Repetir ${getTypeLabel(quiz.type)}` : "Ver Resolu\xE7\xE3o"
|
|
11983
|
-
}
|
|
11984
|
-
)
|
|
11985
|
-
] })
|
|
11944
|
+
] }) : /* @__PURE__ */ jsx51("div", { className: "flex flex-row items-center justify-center w-full", children: /* @__PURE__ */ jsx51(
|
|
11945
|
+
Button_default,
|
|
11946
|
+
{
|
|
11947
|
+
variant: "link",
|
|
11948
|
+
action: "primary",
|
|
11949
|
+
size: "medium",
|
|
11950
|
+
onClick: () => openModal("modalResolution"),
|
|
11951
|
+
children: "Ver resolu\xE7\xE3o"
|
|
11952
|
+
}
|
|
11953
|
+
) })
|
|
11986
11954
|
}
|
|
11987
11955
|
),
|
|
11988
11956
|
/* @__PURE__ */ jsx51(
|
|
@@ -12261,17 +12229,32 @@ var QuizHeaderResult = forwardRef22(
|
|
|
12261
12229
|
);
|
|
12262
12230
|
}
|
|
12263
12231
|
);
|
|
12264
|
-
var QuizResultHeaderTitle = forwardRef22(({ className, showBadge = true, ...props }, ref) => {
|
|
12232
|
+
var QuizResultHeaderTitle = forwardRef22(({ className, showBadge = true, onRepeat, canRetry, ...props }, ref) => {
|
|
12265
12233
|
const { quiz } = useQuizStore();
|
|
12266
12234
|
return /* @__PURE__ */ jsxs38(
|
|
12267
12235
|
"div",
|
|
12268
12236
|
{
|
|
12269
12237
|
ref,
|
|
12270
|
-
className: cn(
|
|
12238
|
+
className: cn(
|
|
12239
|
+
"flex flex-row pt-4 justify-between items-center",
|
|
12240
|
+
className
|
|
12241
|
+
),
|
|
12271
12242
|
...props,
|
|
12272
12243
|
children: [
|
|
12273
12244
|
/* @__PURE__ */ jsx52("p", { className: "text-text-950 font-bold text-2xl", children: "Resultado" }),
|
|
12274
|
-
|
|
12245
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex flex-row gap-3 items-center", children: [
|
|
12246
|
+
canRetry && onRepeat && /* @__PURE__ */ jsx52(
|
|
12247
|
+
Button_default,
|
|
12248
|
+
{
|
|
12249
|
+
variant: "solid",
|
|
12250
|
+
action: "primary",
|
|
12251
|
+
size: "medium",
|
|
12252
|
+
onClick: onRepeat,
|
|
12253
|
+
children: "Repetir question\xE1rio"
|
|
12254
|
+
}
|
|
12255
|
+
),
|
|
12256
|
+
showBadge && /* @__PURE__ */ jsx52(QuizBadge, { subtype: quiz?.subtype || void 0 })
|
|
12257
|
+
] })
|
|
12275
12258
|
]
|
|
12276
12259
|
}
|
|
12277
12260
|
);
|
|
@@ -12463,14 +12446,15 @@ var QuizListResult = forwardRef22(({ className, onSubjectClick, ...props }, ref)
|
|
|
12463
12446
|
});
|
|
12464
12447
|
var QuizListResultByMateria = ({
|
|
12465
12448
|
subject,
|
|
12466
|
-
onQuestionClick
|
|
12449
|
+
onQuestionClick,
|
|
12450
|
+
subjectName
|
|
12467
12451
|
}) => {
|
|
12468
12452
|
const { getQuestionsGroupedBySubject, getQuestionIndex } = useQuizStore();
|
|
12469
12453
|
const groupedQuestions = getQuestionsGroupedBySubject();
|
|
12470
12454
|
const answeredQuestions = groupedQuestions[subject] || [];
|
|
12471
12455
|
const formattedQuestions = subject == "all" ? Object.values(groupedQuestions).flat() : answeredQuestions;
|
|
12472
12456
|
return /* @__PURE__ */ jsxs38("div", { className: "flex flex-col", children: [
|
|
12473
|
-
/* @__PURE__ */ jsx52("div", { className: "flex flex-row pt-4 justify-between", children: /* @__PURE__ */ jsx52("p", { className: "text-text-950 font-bold text-2xl", children:
|
|
12457
|
+
/* @__PURE__ */ jsx52("div", { className: "flex flex-row pt-4 justify-between", children: /* @__PURE__ */ jsx52("p", { className: "text-text-950 font-bold text-2xl", children: subjectName || formattedQuestions?.[0]?.knowledgeMatrix?.[0]?.subject?.name || "Sem mat\xE9ria" }) }),
|
|
12474
12458
|
/* @__PURE__ */ jsxs38("section", { className: "flex flex-col ", children: [
|
|
12475
12459
|
/* @__PURE__ */ jsx52("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Resultado das quest\xF5es" }),
|
|
12476
12460
|
/* @__PURE__ */ jsx52("ul", { className: "flex flex-col gap-2 pt-4", children: formattedQuestions.map((question) => {
|