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.js
CHANGED
|
@@ -9240,7 +9240,7 @@ var Whiteboard = ({
|
|
|
9240
9240
|
"div",
|
|
9241
9241
|
{
|
|
9242
9242
|
className: cn(
|
|
9243
|
-
"flex items-center justify-center p-8 bg-background border border-
|
|
9243
|
+
"flex items-center justify-center p-8 bg-background border border-border-50 rounded-xl",
|
|
9244
9244
|
className
|
|
9245
9245
|
),
|
|
9246
9246
|
...rest,
|
|
@@ -9252,7 +9252,7 @@ var Whiteboard = ({
|
|
|
9252
9252
|
"div",
|
|
9253
9253
|
{
|
|
9254
9254
|
className: cn(
|
|
9255
|
-
"flex flex-col bg-background border border-
|
|
9255
|
+
"flex flex-col bg-background border border-border-50 p-4 gap-2 rounded-xl w-fit mx-auto",
|
|
9256
9256
|
className
|
|
9257
9257
|
),
|
|
9258
9258
|
...rest,
|
|
@@ -11535,80 +11535,83 @@ var Quiz = (0, import_react36.forwardRef)(({ children, className, variant = "def
|
|
|
11535
11535
|
}, [variant, setVariant]);
|
|
11536
11536
|
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { ref, className: cn("flex flex-col", className), ...props, children });
|
|
11537
11537
|
});
|
|
11538
|
-
var QuizTitle = (0, import_react36.forwardRef)(
|
|
11539
|
-
|
|
11540
|
-
|
|
11541
|
-
|
|
11542
|
-
|
|
11543
|
-
|
|
11544
|
-
|
|
11545
|
-
|
|
11546
|
-
|
|
11547
|
-
|
|
11548
|
-
|
|
11549
|
-
|
|
11550
|
-
|
|
11551
|
-
|
|
11552
|
-
|
|
11553
|
-
|
|
11554
|
-
|
|
11555
|
-
|
|
11556
|
-
|
|
11557
|
-
|
|
11558
|
-
|
|
11559
|
-
|
|
11560
|
-
|
|
11538
|
+
var QuizTitle = (0, import_react36.forwardRef)(({ className, onBack, ...props }, ref) => {
|
|
11539
|
+
const {
|
|
11540
|
+
quiz,
|
|
11541
|
+
currentQuestionIndex,
|
|
11542
|
+
getTotalQuestions,
|
|
11543
|
+
getQuizTitle,
|
|
11544
|
+
timeElapsed,
|
|
11545
|
+
formatTime: formatTime2,
|
|
11546
|
+
isStarted
|
|
11547
|
+
} = useQuizStore();
|
|
11548
|
+
const [showExitConfirmation, setShowExitConfirmation] = (0, import_react36.useState)(false);
|
|
11549
|
+
const totalQuestions = getTotalQuestions();
|
|
11550
|
+
const quizTitle = getQuizTitle();
|
|
11551
|
+
const handleBackClick = () => {
|
|
11552
|
+
if (isStarted) {
|
|
11553
|
+
setShowExitConfirmation(true);
|
|
11554
|
+
} else {
|
|
11555
|
+
actionOnBack();
|
|
11556
|
+
}
|
|
11557
|
+
};
|
|
11558
|
+
const handleConfirmExit = () => {
|
|
11559
|
+
setShowExitConfirmation(false);
|
|
11560
|
+
actionOnBack();
|
|
11561
|
+
};
|
|
11562
|
+
const actionOnBack = () => {
|
|
11563
|
+
if (onBack) {
|
|
11564
|
+
onBack();
|
|
11565
|
+
} else {
|
|
11561
11566
|
window.history.back();
|
|
11562
|
-
}
|
|
11563
|
-
|
|
11564
|
-
|
|
11565
|
-
|
|
11566
|
-
|
|
11567
|
-
|
|
11568
|
-
|
|
11569
|
-
|
|
11570
|
-
|
|
11571
|
-
|
|
11572
|
-
|
|
11573
|
-
|
|
11574
|
-
|
|
11575
|
-
|
|
11576
|
-
|
|
11577
|
-
|
|
11578
|
-
|
|
11579
|
-
|
|
11580
|
-
|
|
11581
|
-
|
|
11582
|
-
|
|
11583
|
-
|
|
11584
|
-
|
|
11585
|
-
|
|
11586
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: "flex flex-col gap-2 text-center", children: [
|
|
11587
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
|
|
11588
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
|
|
11589
|
-
] }),
|
|
11590
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "flex flex-row items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_phosphor_react25.Clock, {}), children: isStarted ? formatTime2(timeElapsed) : "00:00" }) })
|
|
11591
|
-
]
|
|
11592
|
-
}
|
|
11593
|
-
),
|
|
11594
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11595
|
-
AlertDialog,
|
|
11596
|
-
{
|
|
11597
|
-
isOpen: showExitConfirmation,
|
|
11598
|
-
onChangeOpen: setShowExitConfirmation,
|
|
11599
|
-
title: "Deseja sair?",
|
|
11600
|
-
description: getExitConfirmationText(
|
|
11601
|
-
quiz?.type || "SIMULADO" /* SIMULADO */
|
|
11567
|
+
}
|
|
11568
|
+
};
|
|
11569
|
+
const handleCancelExit = () => {
|
|
11570
|
+
setShowExitConfirmation(false);
|
|
11571
|
+
};
|
|
11572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11573
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11574
|
+
"div",
|
|
11575
|
+
{
|
|
11576
|
+
ref,
|
|
11577
|
+
className: cn(
|
|
11578
|
+
"flex flex-row justify-between items-center relative p-2",
|
|
11579
|
+
className
|
|
11580
|
+
),
|
|
11581
|
+
...props,
|
|
11582
|
+
children: [
|
|
11583
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11584
|
+
IconButton_default,
|
|
11585
|
+
{
|
|
11586
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_phosphor_react25.CaretLeft, { size: 24 }),
|
|
11587
|
+
size: "md",
|
|
11588
|
+
"aria-label": "Voltar",
|
|
11589
|
+
onClick: handleBackClick
|
|
11590
|
+
}
|
|
11602
11591
|
),
|
|
11603
|
-
|
|
11604
|
-
|
|
11605
|
-
|
|
11606
|
-
|
|
11607
|
-
|
|
11608
|
-
|
|
11609
|
-
|
|
11610
|
-
|
|
11611
|
-
)
|
|
11592
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: "flex flex-col gap-2 text-center", children: [
|
|
11593
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
|
|
11594
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
|
|
11595
|
+
] }),
|
|
11596
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "flex flex-row items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_phosphor_react25.Clock, {}), children: isStarted ? formatTime2(timeElapsed) : "00:00" }) })
|
|
11597
|
+
]
|
|
11598
|
+
}
|
|
11599
|
+
),
|
|
11600
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11601
|
+
AlertDialog,
|
|
11602
|
+
{
|
|
11603
|
+
isOpen: showExitConfirmation,
|
|
11604
|
+
onChangeOpen: setShowExitConfirmation,
|
|
11605
|
+
title: "Deseja sair?",
|
|
11606
|
+
description: getExitConfirmationText(quiz?.type || "SIMULADO" /* SIMULADO */),
|
|
11607
|
+
cancelButtonLabel: "Voltar e revisar",
|
|
11608
|
+
submitButtonLabel: "Sair Mesmo Assim",
|
|
11609
|
+
onSubmit: handleConfirmExit,
|
|
11610
|
+
onCancel: handleCancelExit
|
|
11611
|
+
}
|
|
11612
|
+
)
|
|
11613
|
+
] });
|
|
11614
|
+
});
|
|
11612
11615
|
var QuizHeader = () => {
|
|
11613
11616
|
const { getCurrentQuestion, currentQuestionIndex } = useQuizStore();
|
|
11614
11617
|
const currentQuestion = getCurrentQuestion();
|