analytica-frontend-lib 1.1.84 → 1.1.86
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 +1 -0
- package/dist/Quiz/index.d.ts +1 -0
- package/dist/Quiz/index.js +75 -72
- package/dist/Quiz/index.js.map +1 -1
- package/dist/Quiz/index.mjs +75 -72
- package/dist/Quiz/index.mjs.map +1 -1
- package/dist/Whiteboard/index.js +2 -2
- package/dist/Whiteboard/index.js.map +1 -1
- package/dist/Whiteboard/index.mjs +2 -2
- package/dist/Whiteboard/index.mjs.map +1 -1
- package/dist/index.css +0 -3
- package/dist/index.css.map +1 -1
- package/dist/index.js +77 -74
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +77 -74
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +0 -3
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/Quiz/index.mjs
CHANGED
|
@@ -5559,80 +5559,83 @@ var Quiz = forwardRef11(({ children, className, variant = "default", ...props },
|
|
|
5559
5559
|
}, [variant, setVariant]);
|
|
5560
5560
|
return /* @__PURE__ */ jsx21("div", { ref, className: cn("flex flex-col", className), ...props, children });
|
|
5561
5561
|
});
|
|
5562
|
-
var QuizTitle = forwardRef11(
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5562
|
+
var QuizTitle = forwardRef11(({ className, onBack, ...props }, ref) => {
|
|
5563
|
+
const {
|
|
5564
|
+
quiz,
|
|
5565
|
+
currentQuestionIndex,
|
|
5566
|
+
getTotalQuestions,
|
|
5567
|
+
getQuizTitle,
|
|
5568
|
+
timeElapsed,
|
|
5569
|
+
formatTime,
|
|
5570
|
+
isStarted
|
|
5571
|
+
} = useQuizStore();
|
|
5572
|
+
const [showExitConfirmation, setShowExitConfirmation] = useState8(false);
|
|
5573
|
+
const totalQuestions = getTotalQuestions();
|
|
5574
|
+
const quizTitle = getQuizTitle();
|
|
5575
|
+
const handleBackClick = () => {
|
|
5576
|
+
if (isStarted) {
|
|
5577
|
+
setShowExitConfirmation(true);
|
|
5578
|
+
} else {
|
|
5579
|
+
actionOnBack();
|
|
5580
|
+
}
|
|
5581
|
+
};
|
|
5582
|
+
const handleConfirmExit = () => {
|
|
5583
|
+
setShowExitConfirmation(false);
|
|
5584
|
+
actionOnBack();
|
|
5585
|
+
};
|
|
5586
|
+
const actionOnBack = () => {
|
|
5587
|
+
if (onBack) {
|
|
5588
|
+
onBack();
|
|
5589
|
+
} else {
|
|
5585
5590
|
window.history.back();
|
|
5586
|
-
}
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
/* @__PURE__ */ jsxs17("span", { className: "flex flex-col gap-2 text-center", children: [
|
|
5611
|
-
/* @__PURE__ */ jsx21("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
|
|
5612
|
-
/* @__PURE__ */ jsx21("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
|
|
5613
|
-
] }),
|
|
5614
|
-
/* @__PURE__ */ jsx21("span", { className: "flex flex-row items-center justify-center", children: /* @__PURE__ */ jsx21(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ jsx21(Clock2, {}), children: isStarted ? formatTime(timeElapsed) : "00:00" }) })
|
|
5615
|
-
]
|
|
5616
|
-
}
|
|
5617
|
-
),
|
|
5618
|
-
/* @__PURE__ */ jsx21(
|
|
5619
|
-
AlertDialog,
|
|
5620
|
-
{
|
|
5621
|
-
isOpen: showExitConfirmation,
|
|
5622
|
-
onChangeOpen: setShowExitConfirmation,
|
|
5623
|
-
title: "Deseja sair?",
|
|
5624
|
-
description: getExitConfirmationText(
|
|
5625
|
-
quiz?.type || "SIMULADO" /* SIMULADO */
|
|
5591
|
+
}
|
|
5592
|
+
};
|
|
5593
|
+
const handleCancelExit = () => {
|
|
5594
|
+
setShowExitConfirmation(false);
|
|
5595
|
+
};
|
|
5596
|
+
return /* @__PURE__ */ jsxs17(Fragment7, { children: [
|
|
5597
|
+
/* @__PURE__ */ jsxs17(
|
|
5598
|
+
"div",
|
|
5599
|
+
{
|
|
5600
|
+
ref,
|
|
5601
|
+
className: cn(
|
|
5602
|
+
"flex flex-row justify-between items-center relative p-2",
|
|
5603
|
+
className
|
|
5604
|
+
),
|
|
5605
|
+
...props,
|
|
5606
|
+
children: [
|
|
5607
|
+
/* @__PURE__ */ jsx21(
|
|
5608
|
+
IconButton_default,
|
|
5609
|
+
{
|
|
5610
|
+
icon: /* @__PURE__ */ jsx21(CaretLeft, { size: 24 }),
|
|
5611
|
+
size: "md",
|
|
5612
|
+
"aria-label": "Voltar",
|
|
5613
|
+
onClick: handleBackClick
|
|
5614
|
+
}
|
|
5626
5615
|
),
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5616
|
+
/* @__PURE__ */ jsxs17("span", { className: "flex flex-col gap-2 text-center", children: [
|
|
5617
|
+
/* @__PURE__ */ jsx21("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
|
|
5618
|
+
/* @__PURE__ */ jsx21("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
|
|
5619
|
+
] }),
|
|
5620
|
+
/* @__PURE__ */ jsx21("span", { className: "flex flex-row items-center justify-center", children: /* @__PURE__ */ jsx21(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ jsx21(Clock2, {}), children: isStarted ? formatTime(timeElapsed) : "00:00" }) })
|
|
5621
|
+
]
|
|
5622
|
+
}
|
|
5623
|
+
),
|
|
5624
|
+
/* @__PURE__ */ jsx21(
|
|
5625
|
+
AlertDialog,
|
|
5626
|
+
{
|
|
5627
|
+
isOpen: showExitConfirmation,
|
|
5628
|
+
onChangeOpen: setShowExitConfirmation,
|
|
5629
|
+
title: "Deseja sair?",
|
|
5630
|
+
description: getExitConfirmationText(quiz?.type || "SIMULADO" /* SIMULADO */),
|
|
5631
|
+
cancelButtonLabel: "Voltar e revisar",
|
|
5632
|
+
submitButtonLabel: "Sair Mesmo Assim",
|
|
5633
|
+
onSubmit: handleConfirmExit,
|
|
5634
|
+
onCancel: handleCancelExit
|
|
5635
|
+
}
|
|
5636
|
+
)
|
|
5637
|
+
] });
|
|
5638
|
+
});
|
|
5636
5639
|
var QuizHeader = () => {
|
|
5637
5640
|
const { getCurrentQuestion, currentQuestionIndex } = useQuizStore();
|
|
5638
5641
|
const currentQuestion = getCurrentQuestion();
|