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/index.mjs
CHANGED
|
@@ -9182,7 +9182,7 @@ var Whiteboard = ({
|
|
|
9182
9182
|
"div",
|
|
9183
9183
|
{
|
|
9184
9184
|
className: cn(
|
|
9185
|
-
"flex items-center justify-center p-8 bg-background border border-
|
|
9185
|
+
"flex items-center justify-center p-8 bg-background border border-border-50 rounded-xl",
|
|
9186
9186
|
className
|
|
9187
9187
|
),
|
|
9188
9188
|
...rest,
|
|
@@ -9194,7 +9194,7 @@ var Whiteboard = ({
|
|
|
9194
9194
|
"div",
|
|
9195
9195
|
{
|
|
9196
9196
|
className: cn(
|
|
9197
|
-
"flex flex-col bg-background border border-
|
|
9197
|
+
"flex flex-col bg-background border border-border-50 p-4 gap-2 rounded-xl w-fit mx-auto",
|
|
9198
9198
|
className
|
|
9199
9199
|
),
|
|
9200
9200
|
...rest,
|
|
@@ -11506,80 +11506,83 @@ var Quiz = forwardRef21(({ children, className, variant = "default", ...props },
|
|
|
11506
11506
|
}, [variant, setVariant]);
|
|
11507
11507
|
return /* @__PURE__ */ jsx51("div", { ref, className: cn("flex flex-col", className), ...props, children });
|
|
11508
11508
|
});
|
|
11509
|
-
var QuizTitle = forwardRef21(
|
|
11510
|
-
|
|
11511
|
-
|
|
11512
|
-
|
|
11513
|
-
|
|
11514
|
-
|
|
11515
|
-
|
|
11516
|
-
|
|
11517
|
-
|
|
11518
|
-
|
|
11519
|
-
|
|
11520
|
-
|
|
11521
|
-
|
|
11522
|
-
|
|
11523
|
-
|
|
11524
|
-
|
|
11525
|
-
|
|
11526
|
-
|
|
11527
|
-
|
|
11528
|
-
|
|
11529
|
-
|
|
11530
|
-
|
|
11531
|
-
|
|
11509
|
+
var QuizTitle = forwardRef21(({ className, onBack, ...props }, ref) => {
|
|
11510
|
+
const {
|
|
11511
|
+
quiz,
|
|
11512
|
+
currentQuestionIndex,
|
|
11513
|
+
getTotalQuestions,
|
|
11514
|
+
getQuizTitle,
|
|
11515
|
+
timeElapsed,
|
|
11516
|
+
formatTime: formatTime2,
|
|
11517
|
+
isStarted
|
|
11518
|
+
} = useQuizStore();
|
|
11519
|
+
const [showExitConfirmation, setShowExitConfirmation] = useState21(false);
|
|
11520
|
+
const totalQuestions = getTotalQuestions();
|
|
11521
|
+
const quizTitle = getQuizTitle();
|
|
11522
|
+
const handleBackClick = () => {
|
|
11523
|
+
if (isStarted) {
|
|
11524
|
+
setShowExitConfirmation(true);
|
|
11525
|
+
} else {
|
|
11526
|
+
actionOnBack();
|
|
11527
|
+
}
|
|
11528
|
+
};
|
|
11529
|
+
const handleConfirmExit = () => {
|
|
11530
|
+
setShowExitConfirmation(false);
|
|
11531
|
+
actionOnBack();
|
|
11532
|
+
};
|
|
11533
|
+
const actionOnBack = () => {
|
|
11534
|
+
if (onBack) {
|
|
11535
|
+
onBack();
|
|
11536
|
+
} else {
|
|
11532
11537
|
window.history.back();
|
|
11533
|
-
}
|
|
11534
|
-
|
|
11535
|
-
|
|
11536
|
-
|
|
11537
|
-
|
|
11538
|
-
|
|
11539
|
-
|
|
11540
|
-
|
|
11541
|
-
|
|
11542
|
-
|
|
11543
|
-
|
|
11544
|
-
|
|
11545
|
-
|
|
11546
|
-
|
|
11547
|
-
|
|
11548
|
-
|
|
11549
|
-
|
|
11550
|
-
|
|
11551
|
-
|
|
11552
|
-
|
|
11553
|
-
|
|
11554
|
-
|
|
11555
|
-
|
|
11556
|
-
|
|
11557
|
-
/* @__PURE__ */ jsxs37("span", { className: "flex flex-col gap-2 text-center", children: [
|
|
11558
|
-
/* @__PURE__ */ jsx51("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
|
|
11559
|
-
/* @__PURE__ */ jsx51("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
|
|
11560
|
-
] }),
|
|
11561
|
-
/* @__PURE__ */ jsx51("span", { className: "flex flex-row items-center justify-center", children: /* @__PURE__ */ jsx51(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ jsx51(Clock2, {}), children: isStarted ? formatTime2(timeElapsed) : "00:00" }) })
|
|
11562
|
-
]
|
|
11563
|
-
}
|
|
11564
|
-
),
|
|
11565
|
-
/* @__PURE__ */ jsx51(
|
|
11566
|
-
AlertDialog,
|
|
11567
|
-
{
|
|
11568
|
-
isOpen: showExitConfirmation,
|
|
11569
|
-
onChangeOpen: setShowExitConfirmation,
|
|
11570
|
-
title: "Deseja sair?",
|
|
11571
|
-
description: getExitConfirmationText(
|
|
11572
|
-
quiz?.type || "SIMULADO" /* SIMULADO */
|
|
11538
|
+
}
|
|
11539
|
+
};
|
|
11540
|
+
const handleCancelExit = () => {
|
|
11541
|
+
setShowExitConfirmation(false);
|
|
11542
|
+
};
|
|
11543
|
+
return /* @__PURE__ */ jsxs37(Fragment12, { children: [
|
|
11544
|
+
/* @__PURE__ */ jsxs37(
|
|
11545
|
+
"div",
|
|
11546
|
+
{
|
|
11547
|
+
ref,
|
|
11548
|
+
className: cn(
|
|
11549
|
+
"flex flex-row justify-between items-center relative p-2",
|
|
11550
|
+
className
|
|
11551
|
+
),
|
|
11552
|
+
...props,
|
|
11553
|
+
children: [
|
|
11554
|
+
/* @__PURE__ */ jsx51(
|
|
11555
|
+
IconButton_default,
|
|
11556
|
+
{
|
|
11557
|
+
icon: /* @__PURE__ */ jsx51(CaretLeft2, { size: 24 }),
|
|
11558
|
+
size: "md",
|
|
11559
|
+
"aria-label": "Voltar",
|
|
11560
|
+
onClick: handleBackClick
|
|
11561
|
+
}
|
|
11573
11562
|
),
|
|
11574
|
-
|
|
11575
|
-
|
|
11576
|
-
|
|
11577
|
-
|
|
11578
|
-
|
|
11579
|
-
|
|
11580
|
-
|
|
11581
|
-
|
|
11582
|
-
|
|
11563
|
+
/* @__PURE__ */ jsxs37("span", { className: "flex flex-col gap-2 text-center", children: [
|
|
11564
|
+
/* @__PURE__ */ jsx51("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
|
|
11565
|
+
/* @__PURE__ */ jsx51("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
|
|
11566
|
+
] }),
|
|
11567
|
+
/* @__PURE__ */ jsx51("span", { className: "flex flex-row items-center justify-center", children: /* @__PURE__ */ jsx51(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ jsx51(Clock2, {}), children: isStarted ? formatTime2(timeElapsed) : "00:00" }) })
|
|
11568
|
+
]
|
|
11569
|
+
}
|
|
11570
|
+
),
|
|
11571
|
+
/* @__PURE__ */ jsx51(
|
|
11572
|
+
AlertDialog,
|
|
11573
|
+
{
|
|
11574
|
+
isOpen: showExitConfirmation,
|
|
11575
|
+
onChangeOpen: setShowExitConfirmation,
|
|
11576
|
+
title: "Deseja sair?",
|
|
11577
|
+
description: getExitConfirmationText(quiz?.type || "SIMULADO" /* SIMULADO */),
|
|
11578
|
+
cancelButtonLabel: "Voltar e revisar",
|
|
11579
|
+
submitButtonLabel: "Sair Mesmo Assim",
|
|
11580
|
+
onSubmit: handleConfirmExit,
|
|
11581
|
+
onCancel: handleCancelExit
|
|
11582
|
+
}
|
|
11583
|
+
)
|
|
11584
|
+
] });
|
|
11585
|
+
});
|
|
11583
11586
|
var QuizHeader = () => {
|
|
11584
11587
|
const { getCurrentQuestion, currentQuestionIndex } = useQuizStore();
|
|
11585
11588
|
const currentQuestion = getCurrentQuestion();
|