analytica-frontend-lib 1.0.96 → 1.0.97
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 +12 -14
- package/dist/Quiz/index.d.ts +12 -14
- package/dist/Quiz/index.js +493 -91
- package/dist/Quiz/index.js.map +1 -1
- package/dist/Quiz/index.mjs +492 -91
- package/dist/Quiz/index.mjs.map +1 -1
- package/dist/Quiz/useQuizStore/index.d.mts +4 -1
- package/dist/Quiz/useQuizStore/index.d.ts +4 -1
- package/dist/Quiz/useQuizStore/index.js +3 -0
- package/dist/Quiz/useQuizStore/index.js.map +1 -1
- package/dist/Quiz/useQuizStore/index.mjs +3 -0
- package/dist/Quiz/useQuizStore/index.mjs.map +1 -1
- package/dist/Select/index.js +3 -3
- package/dist/Select/index.js.map +1 -1
- package/dist/Select/index.mjs +3 -3
- package/dist/Select/index.mjs.map +1 -1
- package/dist/index.css +35 -3
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +489 -89
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +490 -90
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +35 -3
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5247,7 +5247,7 @@ var AlternativesList = ({
|
|
|
5247
5247
|
const groupName = name || `alternatives-${uniqueId}`;
|
|
5248
5248
|
const [actualValue, setActualValue] = useState10(value);
|
|
5249
5249
|
const isReadonly = mode === "readonly";
|
|
5250
|
-
const
|
|
5250
|
+
const getStatusStyles2 = (status, isReadonly2) => {
|
|
5251
5251
|
const hoverClass = isReadonly2 ? "" : "hover:bg-background-50";
|
|
5252
5252
|
switch (status) {
|
|
5253
5253
|
case "correct":
|
|
@@ -5258,7 +5258,7 @@ var AlternativesList = ({
|
|
|
5258
5258
|
return `bg-background border-border-100 ${hoverClass}`;
|
|
5259
5259
|
}
|
|
5260
5260
|
};
|
|
5261
|
-
const
|
|
5261
|
+
const getStatusBadge2 = (status) => {
|
|
5262
5262
|
switch (status) {
|
|
5263
5263
|
case "correct":
|
|
5264
5264
|
return /* @__PURE__ */ jsx28(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx28(CheckCircle4, {}), children: "Resposta correta" });
|
|
@@ -5288,8 +5288,8 @@ var AlternativesList = ({
|
|
|
5288
5288
|
} else if (isCorrectAnswer) {
|
|
5289
5289
|
displayStatus = "correct";
|
|
5290
5290
|
}
|
|
5291
|
-
const statusStyles =
|
|
5292
|
-
const statusBadge =
|
|
5291
|
+
const statusStyles = getStatusStyles2(displayStatus, true);
|
|
5292
|
+
const statusBadge = getStatusBadge2(displayStatus);
|
|
5293
5293
|
const renderRadio = () => {
|
|
5294
5294
|
const radioClasses = `w-6 h-6 rounded-full border-2 cursor-default transition-all duration-200 flex items-center justify-center ${isUserSelected ? "border-primary-950 bg-background" : "border-border-400 bg-background"}`;
|
|
5295
5295
|
const dotClasses = "w-3 h-3 rounded-full bg-primary-950 transition-all duration-200";
|
|
@@ -5380,8 +5380,8 @@ var AlternativesList = ({
|
|
|
5380
5380
|
className: cn("flex flex-col", getLayoutClasses(), className),
|
|
5381
5381
|
children: alternatives.map((alternative, index) => {
|
|
5382
5382
|
const alternativeId = alternative.value || `alt-${index}`;
|
|
5383
|
-
const statusStyles =
|
|
5384
|
-
const statusBadge =
|
|
5383
|
+
const statusStyles = getStatusStyles2(alternative.status, false);
|
|
5384
|
+
const statusBadge = getStatusBadge2(alternative.status);
|
|
5385
5385
|
if (layout === "detailed") {
|
|
5386
5386
|
return /* @__PURE__ */ jsx28(
|
|
5387
5387
|
"div",
|
|
@@ -5630,7 +5630,7 @@ var MultipleChoiceList = ({
|
|
|
5630
5630
|
useEffect8(() => {
|
|
5631
5631
|
setActualValue(selectedValues);
|
|
5632
5632
|
}, [selectedValues]);
|
|
5633
|
-
const
|
|
5633
|
+
const getStatusBadge2 = (status) => {
|
|
5634
5634
|
switch (status) {
|
|
5635
5635
|
case "correct":
|
|
5636
5636
|
return /* @__PURE__ */ jsx30(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx30(CheckCircle5, {}), children: "Resposta correta" });
|
|
@@ -5640,7 +5640,7 @@ var MultipleChoiceList = ({
|
|
|
5640
5640
|
return null;
|
|
5641
5641
|
}
|
|
5642
5642
|
};
|
|
5643
|
-
const
|
|
5643
|
+
const getStatusStyles2 = (status) => {
|
|
5644
5644
|
switch (status) {
|
|
5645
5645
|
case "correct":
|
|
5646
5646
|
return "bg-success-background border-success-300";
|
|
@@ -5661,8 +5661,8 @@ var MultipleChoiceList = ({
|
|
|
5661
5661
|
if (mode === "readonly") {
|
|
5662
5662
|
return /* @__PURE__ */ jsx30("div", { className: cn("flex flex-col gap-2", className), children: choices.map((choice, i) => {
|
|
5663
5663
|
const isSelected = actualValue?.includes(choice.value) || false;
|
|
5664
|
-
const statusStyles =
|
|
5665
|
-
const statusBadge =
|
|
5664
|
+
const statusStyles = getStatusStyles2(choice.status);
|
|
5665
|
+
const statusBadge = getStatusBadge2(choice.status);
|
|
5666
5666
|
return /* @__PURE__ */ jsxs24(
|
|
5667
5667
|
"div",
|
|
5668
5668
|
{
|
|
@@ -6052,7 +6052,7 @@ var Select = ({
|
|
|
6052
6052
|
}
|
|
6053
6053
|
}, [propValue]);
|
|
6054
6054
|
const sizeClasses = SIZE_CLASSES12[size];
|
|
6055
|
-
return /* @__PURE__ */ jsxs26("div", { className: cn("w-
|
|
6055
|
+
return /* @__PURE__ */ jsxs26("div", { className: cn("w-fit", className), children: [
|
|
6056
6056
|
label && /* @__PURE__ */ jsx32(
|
|
6057
6057
|
"label",
|
|
6058
6058
|
{
|
|
@@ -6061,7 +6061,7 @@ var Select = ({
|
|
|
6061
6061
|
children: label
|
|
6062
6062
|
}
|
|
6063
6063
|
),
|
|
6064
|
-
/* @__PURE__ */ jsx32("div", { className: cn("relative"), ref: selectRef, children: injectStore4(children, store, size, selectId) }),
|
|
6064
|
+
/* @__PURE__ */ jsx32("div", { className: cn("relative w-fit"), ref: selectRef, children: injectStore4(children, store, size, selectId) }),
|
|
6065
6065
|
(helperText || errorMessage) && /* @__PURE__ */ jsxs26("div", { className: "mt-1.5 gap-1.5", children: [
|
|
6066
6066
|
helperText && /* @__PURE__ */ jsx32("p", { className: "text-sm text-text-500", children: helperText }),
|
|
6067
6067
|
errorMessage && /* @__PURE__ */ jsxs26("p", { className: "flex gap-1 items-center text-sm text-indicator-error", children: [
|
|
@@ -6154,7 +6154,7 @@ var SelectContent = forwardRef16(
|
|
|
6154
6154
|
role: "menu",
|
|
6155
6155
|
ref,
|
|
6156
6156
|
className: cn(
|
|
6157
|
-
"bg-secondary z-50 min-w-[210px] overflow-hidden rounded-md border p-1 shadow-md border-border-100",
|
|
6157
|
+
"bg-secondary z-50 min-w-[210px] max-h-[300px] overflow-y-auto overflow-x-hidden rounded-md border p-1 shadow-md border-border-100",
|
|
6158
6158
|
getPositionClasses(),
|
|
6159
6159
|
className
|
|
6160
6160
|
),
|
|
@@ -7065,12 +7065,15 @@ import {
|
|
|
7065
7065
|
Clock as Clock2,
|
|
7066
7066
|
SquaresFour,
|
|
7067
7067
|
BookOpen,
|
|
7068
|
-
Book
|
|
7068
|
+
Book,
|
|
7069
|
+
CheckCircle as CheckCircle6,
|
|
7070
|
+
XCircle as XCircle5
|
|
7069
7071
|
} from "phosphor-react";
|
|
7070
7072
|
import {
|
|
7071
7073
|
forwardRef as forwardRef19,
|
|
7072
7074
|
useEffect as useEffect13,
|
|
7073
7075
|
useMemo as useMemo6,
|
|
7076
|
+
useId as useId10,
|
|
7074
7077
|
useState as useState14,
|
|
7075
7078
|
useCallback as useCallback2,
|
|
7076
7079
|
useRef as useRef9
|
|
@@ -7561,6 +7564,24 @@ var simulated_result_default = "./simulated-result-QN5HCUY5.png";
|
|
|
7561
7564
|
|
|
7562
7565
|
// src/components/Quiz/Quiz.tsx
|
|
7563
7566
|
import { Fragment as Fragment8, jsx as jsx37, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
7567
|
+
var getStatusBadge = (status) => {
|
|
7568
|
+
switch (status) {
|
|
7569
|
+
case "correct":
|
|
7570
|
+
return /* @__PURE__ */ jsx37(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx37(CheckCircle6, {}), children: "Resposta correta" });
|
|
7571
|
+
case "incorrect":
|
|
7572
|
+
return /* @__PURE__ */ jsx37(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx37(XCircle5, {}), children: "Resposta incorreta" });
|
|
7573
|
+
default:
|
|
7574
|
+
return null;
|
|
7575
|
+
}
|
|
7576
|
+
};
|
|
7577
|
+
var getStatusStyles = (variantCorrect) => {
|
|
7578
|
+
switch (variantCorrect) {
|
|
7579
|
+
case "correct":
|
|
7580
|
+
return "bg-success-background border-success-300";
|
|
7581
|
+
case "incorrect":
|
|
7582
|
+
return "bg-error-background border-error-300";
|
|
7583
|
+
}
|
|
7584
|
+
};
|
|
7564
7585
|
var Quiz = forwardRef19(({ children, className, ...props }, ref) => {
|
|
7565
7586
|
return /* @__PURE__ */ jsx37(
|
|
7566
7587
|
"div",
|
|
@@ -7639,6 +7660,11 @@ var QuizTitle = forwardRef19(
|
|
|
7639
7660
|
);
|
|
7640
7661
|
}
|
|
7641
7662
|
);
|
|
7663
|
+
var QuizSubTitle = forwardRef19(
|
|
7664
|
+
({ subTitle, ...props }, ref) => {
|
|
7665
|
+
return /* @__PURE__ */ jsx37("div", { className: "px-4 pb-2 pt-6", ...props, ref, children: /* @__PURE__ */ jsx37("p", { className: "font-bold text-lg text-text-950", children: subTitle }) });
|
|
7666
|
+
}
|
|
7667
|
+
);
|
|
7642
7668
|
var QuizHeader = () => {
|
|
7643
7669
|
const { getCurrentQuestion } = useQuizStore();
|
|
7644
7670
|
const currentQuestion = getCurrentQuestion();
|
|
@@ -7651,46 +7677,38 @@ var QuizHeader = () => {
|
|
|
7651
7677
|
}
|
|
7652
7678
|
);
|
|
7653
7679
|
};
|
|
7654
|
-
var
|
|
7655
|
-
|
|
7680
|
+
var QuizContainer = forwardRef19(({ children, className, ...props }, ref) => {
|
|
7681
|
+
return /* @__PURE__ */ jsx37(
|
|
7682
|
+
"div",
|
|
7683
|
+
{
|
|
7684
|
+
ref,
|
|
7685
|
+
className: cn(
|
|
7686
|
+
"bg-background rounded-t-xl px-4 pt-4 pb-[80px] h-auto flex flex-col gap-4 mb-auto",
|
|
7687
|
+
className
|
|
7688
|
+
),
|
|
7689
|
+
...props,
|
|
7690
|
+
children
|
|
7691
|
+
}
|
|
7692
|
+
);
|
|
7693
|
+
});
|
|
7694
|
+
var QuizContent = forwardRef19(({ variant, paddingBottom }) => {
|
|
7695
|
+
const { getCurrentQuestion } = useQuizStore();
|
|
7656
7696
|
const currentQuestion = getCurrentQuestion();
|
|
7657
|
-
const
|
|
7658
|
-
|
|
7659
|
-
|
|
7660
|
-
/*
|
|
7661
|
-
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
),
|
|
7668
|
-
...props,
|
|
7669
|
-
children: currentQuestion && /* @__PURE__ */ jsxs30(Fragment8, { children: [
|
|
7670
|
-
currentQuestion.type === "ALTERNATIVA" /* ALTERNATIVA */ && /* @__PURE__ */ jsx37(QuizAlternative, { variant }),
|
|
7671
|
-
currentQuestion.type === "MULTIPLA_CHOICE" /* MULTIPLA_CHOICE */ && /* @__PURE__ */ jsx37(QuizMultipleChoice, { variant }),
|
|
7672
|
-
currentQuestion.type === "DISSERTATIVA" /* DISSERTATIVA */ && /* @__PURE__ */ jsx37(QuizDissertative, { variant })
|
|
7673
|
-
] })
|
|
7674
|
-
}
|
|
7675
|
-
),
|
|
7676
|
-
currentQuestion?.type === "DISSERTATIVA" /* DISSERTATIVA */ && variant === "result" && currentAnswer?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */ jsxs30(Fragment8, { children: [
|
|
7677
|
-
/* @__PURE__ */ jsx37("div", { className: "px-4 pb-2 pt-6", children: /* @__PURE__ */ jsx37("p", { className: "font-bold text-lg text-text-950", children: "Observa\xE7\xE3o do professor" }) }),
|
|
7678
|
-
/* @__PURE__ */ jsx37(
|
|
7679
|
-
"div",
|
|
7680
|
-
{
|
|
7681
|
-
ref,
|
|
7682
|
-
className: cn(
|
|
7683
|
-
"bg-background rounded-t-xl px-4 pt-4 pb-[80px] h-full flex flex-col gap-4 mb-auto",
|
|
7684
|
-
className
|
|
7685
|
-
),
|
|
7686
|
-
...props,
|
|
7687
|
-
children: /* @__PURE__ */ jsx37("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim. Mauris euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim." })
|
|
7688
|
-
}
|
|
7689
|
-
)
|
|
7690
|
-
] })
|
|
7691
|
-
] });
|
|
7697
|
+
const questionComponents = {
|
|
7698
|
+
["ALTERNATIVA" /* ALTERNATIVA */]: QuizAlternative,
|
|
7699
|
+
["MULTIPLA_CHOICE" /* MULTIPLA_CHOICE */]: QuizMultipleChoice,
|
|
7700
|
+
["DISSERTATIVA" /* DISSERTATIVA */]: QuizDissertative,
|
|
7701
|
+
["VERDADEIRO_FALSO" /* VERDADEIRO_FALSO */]: QuizTrueOrFalse,
|
|
7702
|
+
["LIGAR_PONTOS" /* LIGAR_PONTOS */]: QuizConnectDots,
|
|
7703
|
+
["PREENCHER" /* PREENCHER */]: QuizFill
|
|
7704
|
+
};
|
|
7705
|
+
const QuestionComponent = currentQuestion ? questionComponents[currentQuestion.type] : null;
|
|
7706
|
+
return QuestionComponent ? /* @__PURE__ */ jsx37(QuestionComponent, { variant, paddingBottom }) : null;
|
|
7692
7707
|
});
|
|
7693
|
-
var QuizAlternative = ({
|
|
7708
|
+
var QuizAlternative = ({
|
|
7709
|
+
variant = "default",
|
|
7710
|
+
paddingBottom
|
|
7711
|
+
}) => {
|
|
7694
7712
|
const { getCurrentQuestion, selectAnswer, getCurrentAnswer } = useQuizStore();
|
|
7695
7713
|
const currentQuestion = getCurrentQuestion();
|
|
7696
7714
|
const currentAnswer = getCurrentAnswer();
|
|
@@ -7714,26 +7732,30 @@ var QuizAlternative = ({ variant = "default" }) => {
|
|
|
7714
7732
|
});
|
|
7715
7733
|
if (!alternatives)
|
|
7716
7734
|
return /* @__PURE__ */ jsx37("div", { children: /* @__PURE__ */ jsx37("p", { children: "N\xE3o h\xE1 Alternativas" }) });
|
|
7717
|
-
return /* @__PURE__ */
|
|
7718
|
-
|
|
7719
|
-
{
|
|
7720
|
-
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7735
|
+
return /* @__PURE__ */ jsxs30(Fragment8, { children: [
|
|
7736
|
+
/* @__PURE__ */ jsx37(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
7737
|
+
/* @__PURE__ */ jsx37(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx37("div", { className: "space-y-4", children: /* @__PURE__ */ jsx37(
|
|
7738
|
+
AlternativesList,
|
|
7739
|
+
{
|
|
7740
|
+
mode: variant === "default" ? "interactive" : "readonly",
|
|
7741
|
+
name: `question-${currentQuestion?.id || "1"}`,
|
|
7742
|
+
layout: "compact",
|
|
7743
|
+
alternatives,
|
|
7744
|
+
value: currentAnswer?.optionId || "",
|
|
7745
|
+
selectedValue: currentAnswer?.optionId || "",
|
|
7746
|
+
onValueChange: (value) => {
|
|
7747
|
+
if (currentQuestion) {
|
|
7748
|
+
selectAnswer(currentQuestion.id, value);
|
|
7749
|
+
}
|
|
7729
7750
|
}
|
|
7730
|
-
}
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
|
|
7751
|
+
},
|
|
7752
|
+
`question-${currentQuestion?.id || "1"}`
|
|
7753
|
+
) }) })
|
|
7754
|
+
] });
|
|
7734
7755
|
};
|
|
7735
7756
|
var QuizMultipleChoice = ({
|
|
7736
|
-
variant = "default"
|
|
7757
|
+
variant = "default",
|
|
7758
|
+
paddingBottom
|
|
7737
7759
|
}) => {
|
|
7738
7760
|
const { getCurrentQuestion, selectMultipleAnswer, getAllCurrentAnswer } = useQuizStore();
|
|
7739
7761
|
const currentQuestion = getCurrentQuestion();
|
|
@@ -7791,20 +7813,24 @@ var QuizMultipleChoice = ({
|
|
|
7791
7813
|
});
|
|
7792
7814
|
if (!choices)
|
|
7793
7815
|
return /* @__PURE__ */ jsx37("div", { children: /* @__PURE__ */ jsx37("p", { children: "N\xE3o h\xE1 Escolhas Multiplas" }) });
|
|
7794
|
-
return /* @__PURE__ */
|
|
7795
|
-
|
|
7796
|
-
{
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
|
|
7816
|
+
return /* @__PURE__ */ jsxs30(Fragment8, { children: [
|
|
7817
|
+
/* @__PURE__ */ jsx37(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
7818
|
+
/* @__PURE__ */ jsx37(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx37("div", { className: "space-y-4", children: /* @__PURE__ */ jsx37(
|
|
7819
|
+
MultipleChoiceList,
|
|
7820
|
+
{
|
|
7821
|
+
choices,
|
|
7822
|
+
name: questionKey,
|
|
7823
|
+
selectedValues: stableSelectedValues,
|
|
7824
|
+
onHandleSelectedValues: handleSelectedValues,
|
|
7825
|
+
mode: variant === "default" ? "interactive" : "readonly"
|
|
7826
|
+
},
|
|
7827
|
+
questionKey
|
|
7828
|
+
) }) })
|
|
7829
|
+
] });
|
|
7805
7830
|
};
|
|
7806
7831
|
var QuizDissertative = ({
|
|
7807
|
-
variant = "default"
|
|
7832
|
+
variant = "default",
|
|
7833
|
+
paddingBottom
|
|
7808
7834
|
}) => {
|
|
7809
7835
|
const { getCurrentQuestion, getCurrentAnswer, selectDissertativeAnswer } = useQuizStore();
|
|
7810
7836
|
const currentQuestion = getCurrentQuestion();
|
|
@@ -7831,17 +7857,388 @@ var QuizDissertative = ({
|
|
|
7831
7857
|
if (!currentQuestion) {
|
|
7832
7858
|
return /* @__PURE__ */ jsx37("div", { className: "space-y-4", children: /* @__PURE__ */ jsx37("p", { className: "text-text-600 text-md", children: "Nenhuma quest\xE3o dispon\xEDvel" }) });
|
|
7833
7859
|
}
|
|
7834
|
-
return /* @__PURE__ */
|
|
7835
|
-
|
|
7860
|
+
return /* @__PURE__ */ jsxs30(Fragment8, { children: [
|
|
7861
|
+
/* @__PURE__ */ jsx37(QuizSubTitle, { subTitle: "Resposta" }),
|
|
7862
|
+
/* @__PURE__ */ jsx37(QuizContainer, { className: cn(variant != "result" && paddingBottom), children: /* @__PURE__ */ jsx37("div", { className: "space-y-4 max-h-[600px] overflow-y-auto", children: variant === "default" ? /* @__PURE__ */ jsx37("div", { className: "space-y-4", children: /* @__PURE__ */ jsx37(
|
|
7863
|
+
TextArea_default,
|
|
7864
|
+
{
|
|
7865
|
+
ref: textareaRef,
|
|
7866
|
+
placeholder: "Escreva sua resposta",
|
|
7867
|
+
value: currentAnswer?.answer || "",
|
|
7868
|
+
onChange: (e) => handleAnswerChange(e.target.value),
|
|
7869
|
+
rows: 4,
|
|
7870
|
+
className: "min-h-[120px] max-h-[400px] resize-none overflow-y-auto"
|
|
7871
|
+
}
|
|
7872
|
+
) }) : /* @__PURE__ */ jsx37("div", { className: "space-y-4", children: /* @__PURE__ */ jsx37("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: currentAnswer?.answer || "Nenhuma resposta fornecida" }) }) }) }),
|
|
7873
|
+
variant === "result" && currentAnswer?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */ jsxs30(Fragment8, { children: [
|
|
7874
|
+
/* @__PURE__ */ jsx37(QuizSubTitle, { subTitle: "Observa\xE7\xE3o do professor" }),
|
|
7875
|
+
/* @__PURE__ */ jsx37(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx37("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim. Mauris euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim." }) })
|
|
7876
|
+
] })
|
|
7877
|
+
] });
|
|
7878
|
+
};
|
|
7879
|
+
var QuizTrueOrFalse = ({
|
|
7880
|
+
variant = "default",
|
|
7881
|
+
paddingBottom
|
|
7882
|
+
}) => {
|
|
7883
|
+
const options = [
|
|
7884
|
+
{
|
|
7885
|
+
label: "25 metros",
|
|
7886
|
+
isCorrect: true
|
|
7887
|
+
},
|
|
7888
|
+
{
|
|
7889
|
+
label: "30 metros",
|
|
7890
|
+
isCorrect: false
|
|
7891
|
+
},
|
|
7892
|
+
{
|
|
7893
|
+
label: "40 metros",
|
|
7894
|
+
isCorrect: false
|
|
7895
|
+
},
|
|
7896
|
+
{
|
|
7897
|
+
label: "50 metros",
|
|
7898
|
+
isCorrect: false
|
|
7899
|
+
}
|
|
7900
|
+
];
|
|
7901
|
+
const getLetterByIndex = (index) => String.fromCharCode(97 + index);
|
|
7902
|
+
const isDefaultVariant = variant == "default";
|
|
7903
|
+
return /* @__PURE__ */ jsxs30(Fragment8, { children: [
|
|
7904
|
+
/* @__PURE__ */ jsx37(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
7905
|
+
/* @__PURE__ */ jsx37(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx37("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
7906
|
+
const variantCorrect = option.isCorrect ? "correct" : "incorrect";
|
|
7907
|
+
return /* @__PURE__ */ jsxs30(
|
|
7908
|
+
"section",
|
|
7909
|
+
{
|
|
7910
|
+
className: "flex flex-col gap-2",
|
|
7911
|
+
children: [
|
|
7912
|
+
/* @__PURE__ */ jsxs30(
|
|
7913
|
+
"div",
|
|
7914
|
+
{
|
|
7915
|
+
className: cn(
|
|
7916
|
+
"flex flex-row justify-between items-center gap-2 p-2 rounded-md",
|
|
7917
|
+
!isDefaultVariant ? getStatusStyles(variantCorrect) : ""
|
|
7918
|
+
),
|
|
7919
|
+
children: [
|
|
7920
|
+
/* @__PURE__ */ jsx37("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index).concat(") ").concat(option.label) }),
|
|
7921
|
+
isDefaultVariant ? /* @__PURE__ */ jsxs30(Select_default, { size: "medium", children: [
|
|
7922
|
+
/* @__PURE__ */ jsx37(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ jsx37(SelectValue, { placeholder: "Selecione opc\xE3o" }) }),
|
|
7923
|
+
/* @__PURE__ */ jsxs30(SelectContent, { children: [
|
|
7924
|
+
/* @__PURE__ */ jsx37(SelectItem, { value: "V", children: "Verdadeiro" }),
|
|
7925
|
+
/* @__PURE__ */ jsx37(SelectItem, { value: "F", children: "Falso" })
|
|
7926
|
+
] })
|
|
7927
|
+
] }) : /* @__PURE__ */ jsx37("div", { className: "flex-shrink-0", children: getStatusBadge(variantCorrect) })
|
|
7928
|
+
]
|
|
7929
|
+
}
|
|
7930
|
+
),
|
|
7931
|
+
!isDefaultVariant && /* @__PURE__ */ jsxs30("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
7932
|
+
/* @__PURE__ */ jsx37("p", { className: "text-text-800 text-2xs", children: "Resposta selecionada: V" }),
|
|
7933
|
+
!option.isCorrect && /* @__PURE__ */ jsx37("p", { className: "text-text-800 text-2xs", children: "Resposta correta: F" })
|
|
7934
|
+
] })
|
|
7935
|
+
]
|
|
7936
|
+
},
|
|
7937
|
+
option.label.concat(`-${index}`)
|
|
7938
|
+
);
|
|
7939
|
+
}) }) })
|
|
7940
|
+
] });
|
|
7941
|
+
};
|
|
7942
|
+
var QuizConnectDots = ({
|
|
7943
|
+
variant = "default",
|
|
7944
|
+
paddingBottom
|
|
7945
|
+
}) => {
|
|
7946
|
+
const dotsOptions = [
|
|
7947
|
+
{ label: "Ra\xE7\xE3o" },
|
|
7948
|
+
{ label: "Rato" },
|
|
7949
|
+
{ label: "Grama" },
|
|
7950
|
+
{ label: "Peixe" }
|
|
7951
|
+
];
|
|
7952
|
+
const options = [
|
|
7953
|
+
{
|
|
7954
|
+
label: "Cachorro",
|
|
7955
|
+
correctOption: "Ra\xE7\xE3o"
|
|
7956
|
+
},
|
|
7957
|
+
{
|
|
7958
|
+
label: "Gato",
|
|
7959
|
+
correctOption: "Rato"
|
|
7960
|
+
},
|
|
7961
|
+
{
|
|
7962
|
+
label: "Cabra",
|
|
7963
|
+
correctOption: "Grama"
|
|
7964
|
+
},
|
|
7965
|
+
{
|
|
7966
|
+
label: "Baleia",
|
|
7967
|
+
correctOption: "Peixe"
|
|
7968
|
+
}
|
|
7969
|
+
];
|
|
7970
|
+
const mockUserAnswers = [
|
|
7971
|
+
{
|
|
7972
|
+
option: "Cachorro",
|
|
7973
|
+
dotOption: "Ra\xE7\xE3o",
|
|
7974
|
+
correctOption: "Ra\xE7\xE3o",
|
|
7975
|
+
isCorrect: true
|
|
7976
|
+
},
|
|
7836
7977
|
{
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7840
|
-
|
|
7841
|
-
|
|
7842
|
-
|
|
7978
|
+
option: "Gato",
|
|
7979
|
+
dotOption: "Rato",
|
|
7980
|
+
correctOption: "Rato",
|
|
7981
|
+
isCorrect: true
|
|
7982
|
+
},
|
|
7983
|
+
{
|
|
7984
|
+
option: "Cabra",
|
|
7985
|
+
dotOption: "Peixe",
|
|
7986
|
+
correctOption: "Grama",
|
|
7987
|
+
isCorrect: false
|
|
7988
|
+
},
|
|
7989
|
+
{
|
|
7990
|
+
option: "Baleia",
|
|
7991
|
+
dotOption: "Grama",
|
|
7992
|
+
correctOption: "Peixe",
|
|
7993
|
+
isCorrect: false
|
|
7994
|
+
}
|
|
7995
|
+
];
|
|
7996
|
+
const [userAnswers, setUserAnswers] = useState14(() => {
|
|
7997
|
+
if (variant === "result") {
|
|
7998
|
+
return mockUserAnswers;
|
|
7843
7999
|
}
|
|
7844
|
-
|
|
8000
|
+
return options.map((option) => ({
|
|
8001
|
+
option: option.label,
|
|
8002
|
+
dotOption: null,
|
|
8003
|
+
correctOption: option.correctOption,
|
|
8004
|
+
isCorrect: null
|
|
8005
|
+
}));
|
|
8006
|
+
});
|
|
8007
|
+
const handleSelectDot = (optionIndex, dotValue) => {
|
|
8008
|
+
setUserAnswers((prev) => {
|
|
8009
|
+
const next = [...prev];
|
|
8010
|
+
const { label: optionLabel, correctOption } = options[optionIndex];
|
|
8011
|
+
next[optionIndex] = {
|
|
8012
|
+
option: optionLabel,
|
|
8013
|
+
dotOption: dotValue,
|
|
8014
|
+
correctOption,
|
|
8015
|
+
isCorrect: dotValue ? dotValue === correctOption : null
|
|
8016
|
+
};
|
|
8017
|
+
return next;
|
|
8018
|
+
});
|
|
8019
|
+
};
|
|
8020
|
+
const getLetterByIndex = (index) => String.fromCharCode(97 + index);
|
|
8021
|
+
const isDefaultVariant = variant === "default";
|
|
8022
|
+
const assignedDots = new Set(
|
|
8023
|
+
userAnswers.map((a) => a.dotOption).filter(Boolean)
|
|
8024
|
+
);
|
|
8025
|
+
return /* @__PURE__ */ jsxs30(Fragment8, { children: [
|
|
8026
|
+
/* @__PURE__ */ jsx37(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
8027
|
+
/* @__PURE__ */ jsx37(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx37("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
8028
|
+
const answer = userAnswers[index];
|
|
8029
|
+
const variantCorrect = answer.isCorrect ? "correct" : "incorrect";
|
|
8030
|
+
return /* @__PURE__ */ jsxs30("section", { className: "flex flex-col gap-2", children: [
|
|
8031
|
+
/* @__PURE__ */ jsxs30(
|
|
8032
|
+
"div",
|
|
8033
|
+
{
|
|
8034
|
+
className: cn(
|
|
8035
|
+
"flex flex-row justify-between items-center gap-2 p-2 rounded-md",
|
|
8036
|
+
!isDefaultVariant ? getStatusStyles(variantCorrect) : ""
|
|
8037
|
+
),
|
|
8038
|
+
children: [
|
|
8039
|
+
/* @__PURE__ */ jsx37("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index) + ") " + option.label }),
|
|
8040
|
+
isDefaultVariant ? /* @__PURE__ */ jsxs30(
|
|
8041
|
+
Select_default,
|
|
8042
|
+
{
|
|
8043
|
+
size: "medium",
|
|
8044
|
+
value: answer.dotOption || void 0,
|
|
8045
|
+
onValueChange: (value) => handleSelectDot(index, value),
|
|
8046
|
+
children: [
|
|
8047
|
+
/* @__PURE__ */ jsx37(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ jsx37(SelectValue, { placeholder: "Selecione op\xE7\xE3o" }) }),
|
|
8048
|
+
/* @__PURE__ */ jsx37(SelectContent, { children: dotsOptions.filter(
|
|
8049
|
+
(dot) => !assignedDots.has(dot.label) || answer.dotOption === dot.label
|
|
8050
|
+
).map((dot) => /* @__PURE__ */ jsx37(SelectItem, { value: dot.label, children: dot.label }, dot.label)) })
|
|
8051
|
+
]
|
|
8052
|
+
}
|
|
8053
|
+
) : /* @__PURE__ */ jsx37("div", { className: "flex-shrink-0", children: answer.isCorrect === null ? null : getStatusBadge(variantCorrect) })
|
|
8054
|
+
]
|
|
8055
|
+
}
|
|
8056
|
+
),
|
|
8057
|
+
!isDefaultVariant && /* @__PURE__ */ jsxs30("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
8058
|
+
/* @__PURE__ */ jsxs30("p", { className: "text-text-800 text-2xs", children: [
|
|
8059
|
+
"Resposta selecionada: ",
|
|
8060
|
+
answer.dotOption || "Nenhuma"
|
|
8061
|
+
] }),
|
|
8062
|
+
!answer.isCorrect && /* @__PURE__ */ jsxs30("p", { className: "text-text-800 text-2xs", children: [
|
|
8063
|
+
"Resposta correta: ",
|
|
8064
|
+
answer.correctOption
|
|
8065
|
+
] })
|
|
8066
|
+
] })
|
|
8067
|
+
] }, option.label);
|
|
8068
|
+
}) }) })
|
|
8069
|
+
] });
|
|
8070
|
+
};
|
|
8071
|
+
var QuizFill = ({
|
|
8072
|
+
variant = "default",
|
|
8073
|
+
paddingBottom = "pb-[80px]"
|
|
8074
|
+
}) => {
|
|
8075
|
+
const options = [
|
|
8076
|
+
"ci\xEAncia",
|
|
8077
|
+
"disciplina",
|
|
8078
|
+
"\xE1rea",
|
|
8079
|
+
"especialidade",
|
|
8080
|
+
"varia\xE7\xF5es"
|
|
8081
|
+
];
|
|
8082
|
+
const exampleText = `A meteorologia \xE9 a {{ciencia}} que estuda os fen\xF4menos atmosf\xE9ricos e suas {{varia\xE7\xF5es}}. Esta disciplina cient\xEDfica tem como objetivo principal {{objetivo}} o comportamento da atmosfera terrestre.
|
|
8083
|
+
|
|
8084
|
+
Os meteorologistas utilizam diversos {{instrumentos}} para coletar dados atmosf\xE9ricos, incluindo term\xF4metros, bar\xF4metros e {{equipamentos}} modernos como radares meteorol\xF3gicos.`;
|
|
8085
|
+
const mockUserAnswers = [
|
|
8086
|
+
{
|
|
8087
|
+
selectId: "ciencia",
|
|
8088
|
+
userAnswer: "tecnologia",
|
|
8089
|
+
correctAnswer: "ci\xEAncia",
|
|
8090
|
+
isCorrect: false
|
|
8091
|
+
},
|
|
8092
|
+
{
|
|
8093
|
+
selectId: "varia\xE7\xF5es",
|
|
8094
|
+
userAnswer: "varia\xE7\xF5es",
|
|
8095
|
+
correctAnswer: "varia\xE7\xF5es",
|
|
8096
|
+
isCorrect: true
|
|
8097
|
+
},
|
|
8098
|
+
{
|
|
8099
|
+
selectId: "objetivo",
|
|
8100
|
+
userAnswer: "estudar",
|
|
8101
|
+
correctAnswer: "compreender",
|
|
8102
|
+
isCorrect: false
|
|
8103
|
+
},
|
|
8104
|
+
{
|
|
8105
|
+
selectId: "instrumentos",
|
|
8106
|
+
userAnswer: "ferramentas",
|
|
8107
|
+
correctAnswer: "instrumentos",
|
|
8108
|
+
isCorrect: false
|
|
8109
|
+
},
|
|
8110
|
+
{
|
|
8111
|
+
selectId: "equipamentos",
|
|
8112
|
+
userAnswer: "equipamentos",
|
|
8113
|
+
correctAnswer: "equipamentos",
|
|
8114
|
+
isCorrect: true
|
|
8115
|
+
}
|
|
8116
|
+
];
|
|
8117
|
+
const [answers, setAnswers] = useState14({});
|
|
8118
|
+
const baseId = useId10();
|
|
8119
|
+
const getAvailableOptionsForSelect = (selectId) => {
|
|
8120
|
+
const usedOptions = Object.entries(answers).filter(([key]) => key !== selectId).map(([, value]) => value);
|
|
8121
|
+
return options.filter((option) => !usedOptions.includes(option));
|
|
8122
|
+
};
|
|
8123
|
+
const handleSelectChange = (selectId, value) => {
|
|
8124
|
+
const newAnswers = { ...answers, [selectId]: value };
|
|
8125
|
+
setAnswers(newAnswers);
|
|
8126
|
+
};
|
|
8127
|
+
const renderResolutionElement = (selectId) => {
|
|
8128
|
+
const mockAnswer = mockUserAnswers.find(
|
|
8129
|
+
(answer) => answer.selectId === selectId
|
|
8130
|
+
);
|
|
8131
|
+
return /* @__PURE__ */ jsx37("p", { className: "inline-flex mb-2.5 text-success-600 font-semibold text-md border-b-2 border-success-600", children: mockAnswer?.correctAnswer });
|
|
8132
|
+
};
|
|
8133
|
+
const renderDefaultElement = (selectId, startIndex, selectedValue, availableOptionsForThisSelect) => {
|
|
8134
|
+
return /* @__PURE__ */ jsxs30(
|
|
8135
|
+
Select_default,
|
|
8136
|
+
{
|
|
8137
|
+
value: selectedValue,
|
|
8138
|
+
onValueChange: (value) => handleSelectChange(selectId, value),
|
|
8139
|
+
className: "inline-flex mb-2.5",
|
|
8140
|
+
children: [
|
|
8141
|
+
/* @__PURE__ */ jsx37(SelectTrigger, { className: "inline-flex w-auto min-w-[140px] h-8 mx-1 bg-white border-gray-300", children: /* @__PURE__ */ jsx37(SelectValue, { placeholder: "Selecione op\xE7\xE3o" }) }),
|
|
8142
|
+
/* @__PURE__ */ jsx37(SelectContent, { children: availableOptionsForThisSelect.map((option, index) => /* @__PURE__ */ jsx37(SelectItem, { value: option, children: option }, `${option}-${index}`)) })
|
|
8143
|
+
]
|
|
8144
|
+
},
|
|
8145
|
+
`${selectId}-${startIndex}`
|
|
8146
|
+
);
|
|
8147
|
+
};
|
|
8148
|
+
const renderResultElement = (selectId) => {
|
|
8149
|
+
const mockAnswer = mockUserAnswers.find(
|
|
8150
|
+
(answer) => answer.selectId === selectId
|
|
8151
|
+
);
|
|
8152
|
+
if (!mockAnswer) return null;
|
|
8153
|
+
const action = mockAnswer.isCorrect ? "success" : "error";
|
|
8154
|
+
const icon = mockAnswer.isCorrect ? /* @__PURE__ */ jsx37(CheckCircle6, {}) : /* @__PURE__ */ jsx37(XCircle5, {});
|
|
8155
|
+
return /* @__PURE__ */ jsx37(
|
|
8156
|
+
Badge_default,
|
|
8157
|
+
{
|
|
8158
|
+
variant: "solid",
|
|
8159
|
+
action,
|
|
8160
|
+
iconRight: icon,
|
|
8161
|
+
size: "large",
|
|
8162
|
+
className: "py-3 w-[180px] justify-between mb-2.5",
|
|
8163
|
+
children: /* @__PURE__ */ jsx37("span", { className: "text-text-900", children: mockAnswer.userAnswer })
|
|
8164
|
+
},
|
|
8165
|
+
selectId
|
|
8166
|
+
);
|
|
8167
|
+
};
|
|
8168
|
+
const renderTextWithSelects = (text, isResolution) => {
|
|
8169
|
+
const elements = [];
|
|
8170
|
+
let lastIndex = 0;
|
|
8171
|
+
let elementCounter = 0;
|
|
8172
|
+
const regex = /\{\{([\p{L}\p{M}\d_]+)\}\}/gu;
|
|
8173
|
+
let match;
|
|
8174
|
+
while ((match = regex.exec(text)) !== null) {
|
|
8175
|
+
const [fullMatch, selectId] = match;
|
|
8176
|
+
const startIndex = match.index;
|
|
8177
|
+
if (startIndex > lastIndex) {
|
|
8178
|
+
elements.push({
|
|
8179
|
+
element: text.slice(lastIndex, startIndex),
|
|
8180
|
+
id: `${baseId}-text-${++elementCounter}`
|
|
8181
|
+
});
|
|
8182
|
+
}
|
|
8183
|
+
const selectedValue = answers[selectId];
|
|
8184
|
+
const availableOptionsForThisSelect = getAvailableOptionsForSelect(selectId);
|
|
8185
|
+
if (isResolution) {
|
|
8186
|
+
elements.push({
|
|
8187
|
+
element: renderResolutionElement(selectId),
|
|
8188
|
+
id: `${baseId}-resolution-${++elementCounter}`
|
|
8189
|
+
});
|
|
8190
|
+
} else if (variant === "default") {
|
|
8191
|
+
elements.push({
|
|
8192
|
+
element: renderDefaultElement(
|
|
8193
|
+
selectId,
|
|
8194
|
+
startIndex,
|
|
8195
|
+
selectedValue,
|
|
8196
|
+
availableOptionsForThisSelect
|
|
8197
|
+
),
|
|
8198
|
+
id: `${baseId}-select-${++elementCounter}`
|
|
8199
|
+
});
|
|
8200
|
+
} else {
|
|
8201
|
+
const resultElement = renderResultElement(selectId);
|
|
8202
|
+
if (resultElement) {
|
|
8203
|
+
elements.push({
|
|
8204
|
+
element: resultElement,
|
|
8205
|
+
id: `${baseId}-result-${++elementCounter}`
|
|
8206
|
+
});
|
|
8207
|
+
}
|
|
8208
|
+
}
|
|
8209
|
+
lastIndex = match.index + fullMatch.length;
|
|
8210
|
+
}
|
|
8211
|
+
if (lastIndex < text.length) {
|
|
8212
|
+
elements.push({
|
|
8213
|
+
element: text.slice(lastIndex),
|
|
8214
|
+
id: `${baseId}-text-${++elementCounter}`
|
|
8215
|
+
});
|
|
8216
|
+
}
|
|
8217
|
+
return elements;
|
|
8218
|
+
};
|
|
8219
|
+
return /* @__PURE__ */ jsxs30(Fragment8, { children: [
|
|
8220
|
+
/* @__PURE__ */ jsx37(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
8221
|
+
/* @__PURE__ */ jsx37(QuizContainer, { className: "h-auto pb-0", children: /* @__PURE__ */ jsx37("div", { className: "space-y-6 px-4 h-auto", children: /* @__PURE__ */ jsx37(
|
|
8222
|
+
"div",
|
|
8223
|
+
{
|
|
8224
|
+
className: cn(
|
|
8225
|
+
"text-lg text-text-900 leading-8 h-auto",
|
|
8226
|
+
variant != "result" && paddingBottom
|
|
8227
|
+
),
|
|
8228
|
+
children: renderTextWithSelects(exampleText).map((element) => /* @__PURE__ */ jsx37("span", { children: element.element }, element.id))
|
|
8229
|
+
}
|
|
8230
|
+
) }) }),
|
|
8231
|
+
variant === "result" && /* @__PURE__ */ jsxs30(Fragment8, { children: [
|
|
8232
|
+
/* @__PURE__ */ jsx37(QuizSubTitle, { subTitle: "Resultado" }),
|
|
8233
|
+
/* @__PURE__ */ jsx37(QuizContainer, { className: "h-auto pb-0", children: /* @__PURE__ */ jsx37("div", { className: "space-y-6 px-4", children: /* @__PURE__ */ jsx37(
|
|
8234
|
+
"div",
|
|
8235
|
+
{
|
|
8236
|
+
className: cn("text-lg text-text-900 leading-8", paddingBottom),
|
|
8237
|
+
children: renderTextWithSelects(exampleText, true).map((element) => /* @__PURE__ */ jsx37("span", { children: element.element }, element.id))
|
|
8238
|
+
}
|
|
8239
|
+
) }) })
|
|
8240
|
+
] })
|
|
8241
|
+
] });
|
|
7845
8242
|
};
|
|
7846
8243
|
var QuizQuestionList = ({
|
|
7847
8244
|
filterType = "all",
|
|
@@ -8433,6 +8830,7 @@ export {
|
|
|
8433
8830
|
PublicRoute,
|
|
8434
8831
|
Quiz,
|
|
8435
8832
|
QuizAlternative,
|
|
8833
|
+
QuizConnectDots,
|
|
8436
8834
|
QuizContent,
|
|
8437
8835
|
QuizDissertative,
|
|
8438
8836
|
QuizFooter,
|
|
@@ -8446,6 +8844,7 @@ export {
|
|
|
8446
8844
|
QuizResultPerformance,
|
|
8447
8845
|
QuizResultTitle,
|
|
8448
8846
|
QuizTitle,
|
|
8847
|
+
QuizTrueOrFalse,
|
|
8449
8848
|
Radio_default as Radio,
|
|
8450
8849
|
RadioGroup,
|
|
8451
8850
|
RadioGroupItem,
|
|
@@ -8472,6 +8871,7 @@ export {
|
|
|
8472
8871
|
Toaster_default as Toaster,
|
|
8473
8872
|
createZustandAuthAdapter,
|
|
8474
8873
|
getRootDomain,
|
|
8874
|
+
getStatusBadge,
|
|
8475
8875
|
useApiConfig,
|
|
8476
8876
|
useAuth,
|
|
8477
8877
|
useAuthGuard,
|