analytica-frontend-lib 1.2.67 → 1.2.69
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/ActivityCardQuestionBanks/index.js +827 -244
- package/dist/ActivityCardQuestionBanks/index.js.map +1 -1
- package/dist/ActivityCardQuestionBanks/index.mjs +828 -237
- package/dist/ActivityCardQuestionBanks/index.mjs.map +1 -1
- package/dist/ActivityCardQuestionPreview/index.js +650 -67
- package/dist/ActivityCardQuestionPreview/index.js.map +1 -1
- package/dist/ActivityCardQuestionPreview/index.mjs +655 -64
- package/dist/ActivityCardQuestionPreview/index.mjs.map +1 -1
- package/dist/ActivityDetails/index.d.ts +6 -4
- package/dist/ActivityDetails/index.d.ts.map +1 -1
- package/dist/ActivityDetails/index.js +2381 -1007
- package/dist/ActivityDetails/index.js.map +1 -1
- package/dist/ActivityDetails/index.mjs +2352 -953
- package/dist/ActivityDetails/index.mjs.map +1 -1
- package/dist/ActivityPreview/index.js +1175 -592
- package/dist/ActivityPreview/index.js.map +1 -1
- package/dist/ActivityPreview/index.mjs +1171 -580
- package/dist/ActivityPreview/index.mjs.map +1 -1
- package/dist/CorrectActivityModal/index.d.ts +4 -2
- package/dist/CorrectActivityModal/index.d.ts.map +1 -1
- package/dist/CorrectActivityModal/index.js +1999 -527
- package/dist/CorrectActivityModal/index.js.map +1 -1
- package/dist/CorrectActivityModal/index.mjs +2030 -529
- package/dist/CorrectActivityModal/index.mjs.map +1 -1
- package/dist/Quiz/index.js +2 -0
- package/dist/Quiz/index.js.map +1 -1
- package/dist/Quiz/index.mjs +2 -0
- package/dist/Quiz/index.mjs.map +1 -1
- package/dist/hooks/useSendActivity/index.d.ts +47 -0
- package/dist/hooks/useSendActivity/index.d.ts.map +1 -0
- package/dist/hooks/useSendActivity/index.js +194 -0
- package/dist/hooks/useSendActivity/index.js.map +1 -0
- package/dist/hooks/useSendActivity/index.mjs +159 -0
- package/dist/hooks/useSendActivity/index.mjs.map +1 -0
- package/dist/hooks/useSendActivity.d.ts +47 -0
- package/dist/hooks/useSendActivity.d.ts.map +1 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10284 -9202
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10170 -9087
- package/dist/index.mjs.map +1 -1
- package/dist/types/activities/index.d.ts +81 -0
- package/dist/types/activities/index.d.ts.map +1 -0
- package/dist/types/activities/index.js +52 -0
- package/dist/types/activities/index.js.map +1 -0
- package/dist/types/activities/index.mjs +25 -0
- package/dist/types/activities/index.mjs.map +1 -0
- package/dist/types/activities.d.ts +81 -0
- package/dist/types/activities.d.ts.map +1 -0
- package/dist/types/sendActivity/index.d.ts +127 -0
- package/dist/types/sendActivity/index.d.ts.map +1 -0
- package/dist/types/sendActivity/index.js +19 -0
- package/dist/types/sendActivity/index.js.map +1 -0
- package/dist/types/sendActivity/index.mjs +1 -0
- package/dist/types/sendActivity/index.mjs.map +1 -0
- package/dist/types/sendActivity.d.ts +127 -0
- package/dist/types/sendActivity.d.ts.map +1 -0
- package/dist/utils/questionRenderer/alternative/index.d.ts +8 -0
- package/dist/utils/questionRenderer/alternative/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/components/index.d.ts +25 -0
- package/dist/utils/questionRenderer/components/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/connectDots/index.d.ts +8 -0
- package/dist/utils/questionRenderer/connectDots/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/dissertative/index.d.ts +8 -0
- package/dist/utils/questionRenderer/dissertative/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/fill/index.d.ts +10 -0
- package/dist/utils/questionRenderer/fill/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/image/index.d.ts +8 -0
- package/dist/utils/questionRenderer/image/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/index.d.ts +31 -0
- package/dist/utils/questionRenderer/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/multipleChoice/index.d.ts +8 -0
- package/dist/utils/questionRenderer/multipleChoice/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/trueOrFalse/index.d.ts +9 -0
- package/dist/utils/questionRenderer/trueOrFalse/index.d.ts.map +1 -0
- package/dist/utils/questionRenderer/types.d.ts +14 -0
- package/dist/utils/questionRenderer/types.d.ts.map +1 -0
- package/dist/utils/studentActivityCorrection/constants.d.ts +13 -0
- package/dist/utils/studentActivityCorrection/constants.d.ts.map +1 -0
- package/dist/utils/studentActivityCorrection/converter.d.ts +13 -0
- package/dist/utils/studentActivityCorrection/converter.d.ts.map +1 -0
- package/dist/utils/studentActivityCorrection/index.d.ts +13 -0
- package/dist/utils/studentActivityCorrection/index.d.ts.map +1 -0
- package/dist/utils/studentActivityCorrection/types.d.ts +84 -0
- package/dist/utils/studentActivityCorrection/types.d.ts.map +1 -0
- package/dist/utils/studentActivityCorrection/utils.d.ts +30 -0
- package/dist/utils/studentActivityCorrection/utils.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/types/studentActivityCorrection.d.ts +0 -62
- package/dist/types/studentActivityCorrection.d.ts.map +0 -1
- package/dist/utils/questionRenderer.d.ts +0 -5
- package/dist/utils/questionRenderer.d.ts.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/components/ActivityPreview/ActivityPreview.tsx
|
|
2
|
-
import { useEffect as
|
|
2
|
+
import { useEffect as useEffect7, useMemo as useMemo3, useRef as useRef6, useState as useState9 } from "react";
|
|
3
3
|
import { File, DownloadSimple, Trash } from "phosphor-react";
|
|
4
4
|
|
|
5
5
|
// src/utils/utils.ts
|
|
@@ -1660,293 +1660,33 @@ var ProgressBar = ({
|
|
|
1660
1660
|
};
|
|
1661
1661
|
var ProgressBar_default = ProgressBar;
|
|
1662
1662
|
|
|
1663
|
-
// src/components/Alternative/Alternative.tsx
|
|
1664
|
-
import { CheckCircle, XCircle } from "phosphor-react";
|
|
1665
|
-
import { forwardRef as forwardRef5, useId as useId4, useState as useState3 } from "react";
|
|
1666
|
-
import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1667
|
-
var AlternativesList = ({
|
|
1668
|
-
alternatives,
|
|
1669
|
-
name,
|
|
1670
|
-
defaultValue,
|
|
1671
|
-
value,
|
|
1672
|
-
onValueChange,
|
|
1673
|
-
disabled = false,
|
|
1674
|
-
layout = "default",
|
|
1675
|
-
className = "",
|
|
1676
|
-
mode = "interactive",
|
|
1677
|
-
selectedValue
|
|
1678
|
-
}) => {
|
|
1679
|
-
const uniqueId = useId4();
|
|
1680
|
-
const groupName = name || `alternatives-${uniqueId}`;
|
|
1681
|
-
const [actualValue, setActualValue] = useState3(value);
|
|
1682
|
-
const isReadonly = mode === "readonly";
|
|
1683
|
-
const getStatusStyles = (status, isReadonly2) => {
|
|
1684
|
-
const hoverClass = isReadonly2 ? "" : "hover:bg-background-50";
|
|
1685
|
-
switch (status) {
|
|
1686
|
-
case "correct":
|
|
1687
|
-
return "bg-success-background border-success-300";
|
|
1688
|
-
case "incorrect":
|
|
1689
|
-
return "bg-error-background border-error-300";
|
|
1690
|
-
default:
|
|
1691
|
-
return `bg-background border-border-100 ${hoverClass}`;
|
|
1692
|
-
}
|
|
1693
|
-
};
|
|
1694
|
-
const getStatusBadge = (status) => {
|
|
1695
|
-
switch (status) {
|
|
1696
|
-
case "correct":
|
|
1697
|
-
return /* @__PURE__ */ jsx10(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx10(CheckCircle, {}), children: "Resposta correta" });
|
|
1698
|
-
case "incorrect":
|
|
1699
|
-
return /* @__PURE__ */ jsx10(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx10(XCircle, {}), children: "Resposta incorreta" });
|
|
1700
|
-
default:
|
|
1701
|
-
return null;
|
|
1702
|
-
}
|
|
1703
|
-
};
|
|
1704
|
-
const getLayoutClasses = () => {
|
|
1705
|
-
switch (layout) {
|
|
1706
|
-
case "compact":
|
|
1707
|
-
return "gap-2";
|
|
1708
|
-
case "detailed":
|
|
1709
|
-
return "gap-4";
|
|
1710
|
-
default:
|
|
1711
|
-
return "gap-3.5";
|
|
1712
|
-
}
|
|
1713
|
-
};
|
|
1714
|
-
const renderReadonlyAlternative = (alternative) => {
|
|
1715
|
-
const alternativeId = alternative.value;
|
|
1716
|
-
const isUserSelected = selectedValue === alternative.value;
|
|
1717
|
-
const isCorrectAnswer = alternative.status === "correct";
|
|
1718
|
-
let displayStatus = void 0;
|
|
1719
|
-
if (isUserSelected && !isCorrectAnswer) {
|
|
1720
|
-
displayStatus = "incorrect";
|
|
1721
|
-
} else if (isCorrectAnswer) {
|
|
1722
|
-
displayStatus = "correct";
|
|
1723
|
-
}
|
|
1724
|
-
const statusStyles = getStatusStyles(displayStatus, true);
|
|
1725
|
-
const statusBadge = getStatusBadge(displayStatus);
|
|
1726
|
-
const renderRadio = () => {
|
|
1727
|
-
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"}`;
|
|
1728
|
-
const dotClasses = "w-3 h-3 rounded-full bg-primary-950 transition-all duration-200";
|
|
1729
|
-
return /* @__PURE__ */ jsx10("div", { className: radioClasses, children: isUserSelected && /* @__PURE__ */ jsx10("div", { className: dotClasses }) });
|
|
1730
|
-
};
|
|
1731
|
-
if (layout === "detailed") {
|
|
1732
|
-
return /* @__PURE__ */ jsx10(
|
|
1733
|
-
"div",
|
|
1734
|
-
{
|
|
1735
|
-
className: cn(
|
|
1736
|
-
"border-2 rounded-lg p-4 w-full",
|
|
1737
|
-
statusStyles,
|
|
1738
|
-
alternative.disabled ? "opacity-50" : ""
|
|
1739
|
-
),
|
|
1740
|
-
children: /* @__PURE__ */ jsxs7("div", { className: "flex items-start justify-between gap-3", children: [
|
|
1741
|
-
/* @__PURE__ */ jsxs7("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
1742
|
-
/* @__PURE__ */ jsx10("div", { className: "mt-1", children: renderRadio() }),
|
|
1743
|
-
/* @__PURE__ */ jsxs7("div", { className: "flex-1", children: [
|
|
1744
|
-
/* @__PURE__ */ jsx10(
|
|
1745
|
-
"p",
|
|
1746
|
-
{
|
|
1747
|
-
className: cn(
|
|
1748
|
-
"block font-medium",
|
|
1749
|
-
selectedValue === alternative.value || statusBadge ? "text-text-950" : "text-text-600"
|
|
1750
|
-
),
|
|
1751
|
-
children: alternative.label
|
|
1752
|
-
}
|
|
1753
|
-
),
|
|
1754
|
-
alternative.description && /* @__PURE__ */ jsx10("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
|
|
1755
|
-
] })
|
|
1756
|
-
] }),
|
|
1757
|
-
statusBadge && /* @__PURE__ */ jsx10("div", { className: "flex-shrink-0", children: statusBadge })
|
|
1758
|
-
] })
|
|
1759
|
-
},
|
|
1760
|
-
alternativeId
|
|
1761
|
-
);
|
|
1762
|
-
}
|
|
1763
|
-
return /* @__PURE__ */ jsxs7(
|
|
1764
|
-
"div",
|
|
1765
|
-
{
|
|
1766
|
-
className: cn(
|
|
1767
|
-
"flex flex-row justify-between items-start gap-2 p-2 rounded-lg w-full",
|
|
1768
|
-
statusStyles,
|
|
1769
|
-
alternative.disabled ? "opacity-50" : ""
|
|
1770
|
-
),
|
|
1771
|
-
children: [
|
|
1772
|
-
/* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
1773
|
-
renderRadio(),
|
|
1774
|
-
/* @__PURE__ */ jsx10(
|
|
1775
|
-
"span",
|
|
1776
|
-
{
|
|
1777
|
-
className: cn(
|
|
1778
|
-
"flex-1",
|
|
1779
|
-
selectedValue === alternative.value || statusBadge ? "text-text-950" : "text-text-600"
|
|
1780
|
-
),
|
|
1781
|
-
children: alternative.label
|
|
1782
|
-
}
|
|
1783
|
-
)
|
|
1784
|
-
] }),
|
|
1785
|
-
statusBadge && /* @__PURE__ */ jsx10("div", { className: "flex-shrink-0", children: statusBadge })
|
|
1786
|
-
]
|
|
1787
|
-
},
|
|
1788
|
-
alternativeId
|
|
1789
|
-
);
|
|
1790
|
-
};
|
|
1791
|
-
if (isReadonly) {
|
|
1792
|
-
return /* @__PURE__ */ jsx10(
|
|
1793
|
-
"div",
|
|
1794
|
-
{
|
|
1795
|
-
className: cn("flex flex-col", getLayoutClasses(), "w-full", className),
|
|
1796
|
-
children: alternatives.map(
|
|
1797
|
-
(alternative) => renderReadonlyAlternative(alternative)
|
|
1798
|
-
)
|
|
1799
|
-
}
|
|
1800
|
-
);
|
|
1801
|
-
}
|
|
1802
|
-
return /* @__PURE__ */ jsx10(
|
|
1803
|
-
RadioGroup,
|
|
1804
|
-
{
|
|
1805
|
-
name: groupName,
|
|
1806
|
-
defaultValue,
|
|
1807
|
-
value,
|
|
1808
|
-
onValueChange: (value2) => {
|
|
1809
|
-
setActualValue(value2);
|
|
1810
|
-
onValueChange?.(value2);
|
|
1811
|
-
},
|
|
1812
|
-
disabled,
|
|
1813
|
-
className: cn("flex flex-col", getLayoutClasses(), className),
|
|
1814
|
-
children: alternatives.map((alternative, index) => {
|
|
1815
|
-
const alternativeId = alternative.value || `alt-${index}`;
|
|
1816
|
-
const statusStyles = getStatusStyles(alternative.status, false);
|
|
1817
|
-
const statusBadge = getStatusBadge(alternative.status);
|
|
1818
|
-
if (layout === "detailed") {
|
|
1819
|
-
return /* @__PURE__ */ jsx10(
|
|
1820
|
-
"div",
|
|
1821
|
-
{
|
|
1822
|
-
className: cn(
|
|
1823
|
-
"border-2 rounded-lg p-4 transition-all",
|
|
1824
|
-
statusStyles,
|
|
1825
|
-
alternative.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
1826
|
-
),
|
|
1827
|
-
children: /* @__PURE__ */ jsxs7("div", { className: "flex items-start justify-between gap-3", children: [
|
|
1828
|
-
/* @__PURE__ */ jsxs7("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
1829
|
-
/* @__PURE__ */ jsx10(
|
|
1830
|
-
RadioGroupItem,
|
|
1831
|
-
{
|
|
1832
|
-
value: alternative.value,
|
|
1833
|
-
id: alternativeId,
|
|
1834
|
-
disabled: alternative.disabled,
|
|
1835
|
-
className: "mt-1"
|
|
1836
|
-
}
|
|
1837
|
-
),
|
|
1838
|
-
/* @__PURE__ */ jsxs7("div", { className: "flex-1", children: [
|
|
1839
|
-
/* @__PURE__ */ jsx10(
|
|
1840
|
-
"label",
|
|
1841
|
-
{
|
|
1842
|
-
htmlFor: alternativeId,
|
|
1843
|
-
className: cn(
|
|
1844
|
-
"block font-medium",
|
|
1845
|
-
actualValue === alternative.value ? "text-text-950" : "text-text-600",
|
|
1846
|
-
alternative.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
1847
|
-
),
|
|
1848
|
-
children: alternative.label
|
|
1849
|
-
}
|
|
1850
|
-
),
|
|
1851
|
-
alternative.description && /* @__PURE__ */ jsx10("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
|
|
1852
|
-
] })
|
|
1853
|
-
] }),
|
|
1854
|
-
statusBadge && /* @__PURE__ */ jsx10("div", { className: "flex-shrink-0", children: statusBadge })
|
|
1855
|
-
] })
|
|
1856
|
-
},
|
|
1857
|
-
alternativeId
|
|
1858
|
-
);
|
|
1859
|
-
}
|
|
1860
|
-
return /* @__PURE__ */ jsxs7(
|
|
1861
|
-
"div",
|
|
1862
|
-
{
|
|
1863
|
-
className: cn(
|
|
1864
|
-
"flex flex-row justify-between gap-2 items-start p-2 rounded-lg transition-all",
|
|
1865
|
-
statusStyles,
|
|
1866
|
-
alternative.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
1867
|
-
),
|
|
1868
|
-
children: [
|
|
1869
|
-
/* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
1870
|
-
/* @__PURE__ */ jsx10(
|
|
1871
|
-
RadioGroupItem,
|
|
1872
|
-
{
|
|
1873
|
-
value: alternative.value,
|
|
1874
|
-
id: alternativeId,
|
|
1875
|
-
disabled: alternative.disabled
|
|
1876
|
-
}
|
|
1877
|
-
),
|
|
1878
|
-
/* @__PURE__ */ jsx10(
|
|
1879
|
-
"label",
|
|
1880
|
-
{
|
|
1881
|
-
htmlFor: alternativeId,
|
|
1882
|
-
className: cn(
|
|
1883
|
-
"flex-1",
|
|
1884
|
-
actualValue === alternative.value ? "text-text-950" : "text-text-600",
|
|
1885
|
-
alternative.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
1886
|
-
),
|
|
1887
|
-
children: alternative.label
|
|
1888
|
-
}
|
|
1889
|
-
)
|
|
1890
|
-
] }),
|
|
1891
|
-
statusBadge && /* @__PURE__ */ jsx10("div", { className: "flex-shrink-0", children: statusBadge })
|
|
1892
|
-
]
|
|
1893
|
-
},
|
|
1894
|
-
alternativeId
|
|
1895
|
-
);
|
|
1896
|
-
})
|
|
1897
|
-
}
|
|
1898
|
-
);
|
|
1899
|
-
};
|
|
1900
|
-
var HeaderAlternative = forwardRef5(
|
|
1901
|
-
({ className, title, subTitle, content, ...props }, ref) => {
|
|
1902
|
-
return /* @__PURE__ */ jsxs7(
|
|
1903
|
-
"div",
|
|
1904
|
-
{
|
|
1905
|
-
ref,
|
|
1906
|
-
className: cn(
|
|
1907
|
-
"bg-background p-4 flex flex-col gap-4 rounded-xl",
|
|
1908
|
-
className
|
|
1909
|
-
),
|
|
1910
|
-
...props,
|
|
1911
|
-
children: [
|
|
1912
|
-
/* @__PURE__ */ jsxs7("span", { className: "flex flex-col", children: [
|
|
1913
|
-
/* @__PURE__ */ jsx10("p", { className: "text-text-950 font-bold text-lg", children: title }),
|
|
1914
|
-
/* @__PURE__ */ jsx10("p", { className: "text-text-700 text-sm ", children: subTitle })
|
|
1915
|
-
] }),
|
|
1916
|
-
/* @__PURE__ */ jsx10("p", { className: "text-text-950 text-md", children: content })
|
|
1917
|
-
]
|
|
1918
|
-
}
|
|
1919
|
-
);
|
|
1920
|
-
}
|
|
1921
|
-
);
|
|
1922
|
-
|
|
1923
1663
|
// src/components/Accordation/Accordation.tsx
|
|
1924
1664
|
import {
|
|
1925
|
-
forwardRef as
|
|
1926
|
-
useId as
|
|
1927
|
-
useState as
|
|
1665
|
+
forwardRef as forwardRef6,
|
|
1666
|
+
useId as useId4,
|
|
1667
|
+
useState as useState4,
|
|
1928
1668
|
useEffect as useEffect4
|
|
1929
1669
|
} from "react";
|
|
1930
1670
|
|
|
1931
1671
|
// src/components/Card/Card.tsx
|
|
1932
1672
|
import {
|
|
1933
|
-
forwardRef as
|
|
1673
|
+
forwardRef as forwardRef5,
|
|
1934
1674
|
Fragment as Fragment3,
|
|
1935
|
-
useState as
|
|
1675
|
+
useState as useState3,
|
|
1936
1676
|
useRef as useRef3,
|
|
1937
1677
|
useEffect as useEffect3
|
|
1938
1678
|
} from "react";
|
|
1939
1679
|
import {
|
|
1940
1680
|
CaretRight,
|
|
1941
1681
|
ChatCircleText,
|
|
1942
|
-
CheckCircle
|
|
1682
|
+
CheckCircle,
|
|
1943
1683
|
Clock,
|
|
1944
1684
|
DotsThreeVertical,
|
|
1945
1685
|
Play,
|
|
1946
1686
|
SpeakerHigh,
|
|
1947
1687
|
SpeakerLow,
|
|
1948
1688
|
SpeakerSimpleX,
|
|
1949
|
-
XCircle
|
|
1689
|
+
XCircle
|
|
1950
1690
|
} from "phosphor-react";
|
|
1951
1691
|
|
|
1952
1692
|
// src/components/IconRender/IconRender.tsx
|
|
@@ -1954,8 +1694,8 @@ import { cloneElement as cloneElement3 } from "react";
|
|
|
1954
1694
|
import * as PhosphorIcons from "phosphor-react";
|
|
1955
1695
|
|
|
1956
1696
|
// src/assets/icons/subjects/ChatPT.tsx
|
|
1957
|
-
import { jsx as
|
|
1958
|
-
var ChatPT = ({ size, color }) => /* @__PURE__ */
|
|
1697
|
+
import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1698
|
+
var ChatPT = ({ size, color }) => /* @__PURE__ */ jsxs7(
|
|
1959
1699
|
"svg",
|
|
1960
1700
|
{
|
|
1961
1701
|
width: size,
|
|
@@ -1964,21 +1704,21 @@ var ChatPT = ({ size, color }) => /* @__PURE__ */ jsxs8(
|
|
|
1964
1704
|
fill: "none",
|
|
1965
1705
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1966
1706
|
children: [
|
|
1967
|
-
/* @__PURE__ */
|
|
1707
|
+
/* @__PURE__ */ jsx10(
|
|
1968
1708
|
"path",
|
|
1969
1709
|
{
|
|
1970
1710
|
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
1971
1711
|
fill: color
|
|
1972
1712
|
}
|
|
1973
1713
|
),
|
|
1974
|
-
/* @__PURE__ */
|
|
1714
|
+
/* @__PURE__ */ jsx10(
|
|
1975
1715
|
"path",
|
|
1976
1716
|
{
|
|
1977
1717
|
d: "M21.1758 12V20.5312H19.7168V12H21.1758ZM23.8535 12V13.1719H17.0625V12H23.8535Z",
|
|
1978
1718
|
fill: color
|
|
1979
1719
|
}
|
|
1980
1720
|
),
|
|
1981
|
-
/* @__PURE__ */
|
|
1721
|
+
/* @__PURE__ */ jsx10(
|
|
1982
1722
|
"path",
|
|
1983
1723
|
{
|
|
1984
1724
|
d: "M13.2402 17.3496H11.0195V16.1836H13.2402C13.627 16.1836 13.9395 16.1211 14.1777 15.9961C14.416 15.8711 14.5898 15.6992 14.6992 15.4805C14.8125 15.2578 14.8691 15.0039 14.8691 14.7188C14.8691 14.4492 14.8125 14.1973 14.6992 13.9629C14.5898 13.7246 14.416 13.5332 14.1777 13.3887C13.9395 13.2441 13.627 13.1719 13.2402 13.1719H11.4707V20.5312H10V12H13.2402C13.9004 12 14.4609 12.1172 14.9219 12.3516C15.3867 12.582 15.7402 12.9023 15.9824 13.3125C16.2246 13.7188 16.3457 14.1836 16.3457 14.707C16.3457 15.2578 16.2246 15.7305 15.9824 16.125C15.7402 16.5195 15.3867 16.8223 14.9219 17.0332C14.4609 17.2441 13.9004 17.3496 13.2402 17.3496Z",
|
|
@@ -1990,8 +1730,8 @@ var ChatPT = ({ size, color }) => /* @__PURE__ */ jsxs8(
|
|
|
1990
1730
|
);
|
|
1991
1731
|
|
|
1992
1732
|
// src/assets/icons/subjects/ChatEN.tsx
|
|
1993
|
-
import { jsx as
|
|
1994
|
-
var ChatEN = ({ size, color }) => /* @__PURE__ */
|
|
1733
|
+
import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1734
|
+
var ChatEN = ({ size, color }) => /* @__PURE__ */ jsxs8(
|
|
1995
1735
|
"svg",
|
|
1996
1736
|
{
|
|
1997
1737
|
width: size,
|
|
@@ -2000,21 +1740,21 @@ var ChatEN = ({ size, color }) => /* @__PURE__ */ jsxs9(
|
|
|
2000
1740
|
fill: "none",
|
|
2001
1741
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2002
1742
|
children: [
|
|
2003
|
-
/* @__PURE__ */
|
|
1743
|
+
/* @__PURE__ */ jsx11(
|
|
2004
1744
|
"path",
|
|
2005
1745
|
{
|
|
2006
1746
|
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
2007
1747
|
fill: color
|
|
2008
1748
|
}
|
|
2009
1749
|
),
|
|
2010
|
-
/* @__PURE__ */
|
|
1750
|
+
/* @__PURE__ */ jsx11(
|
|
2011
1751
|
"path",
|
|
2012
1752
|
{
|
|
2013
1753
|
d: "M22.5488 12V20.5312H21.0781L17.252 14.4199V20.5312H15.7812V12H17.252L21.0898 18.123V12H22.5488Z",
|
|
2014
1754
|
fill: color
|
|
2015
1755
|
}
|
|
2016
1756
|
),
|
|
2017
|
-
/* @__PURE__ */
|
|
1757
|
+
/* @__PURE__ */ jsx11(
|
|
2018
1758
|
"path",
|
|
2019
1759
|
{
|
|
2020
1760
|
d: "M14.584 19.3652V20.5312H10.0547V19.3652H14.584ZM10.4707 12V20.5312H9V12H10.4707ZM13.9922 15.5625V16.7109H10.0547V15.5625H13.9922ZM14.5547 12V13.1719H10.0547V12H14.5547Z",
|
|
@@ -2026,8 +1766,8 @@ var ChatEN = ({ size, color }) => /* @__PURE__ */ jsxs9(
|
|
|
2026
1766
|
);
|
|
2027
1767
|
|
|
2028
1768
|
// src/assets/icons/subjects/ChatES.tsx
|
|
2029
|
-
import { jsx as
|
|
2030
|
-
var ChatES = ({ size, color }) => /* @__PURE__ */
|
|
1769
|
+
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1770
|
+
var ChatES = ({ size, color }) => /* @__PURE__ */ jsxs9(
|
|
2031
1771
|
"svg",
|
|
2032
1772
|
{
|
|
2033
1773
|
width: size,
|
|
@@ -2036,21 +1776,21 @@ var ChatES = ({ size, color }) => /* @__PURE__ */ jsxs10(
|
|
|
2036
1776
|
fill: "none",
|
|
2037
1777
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2038
1778
|
children: [
|
|
2039
|
-
/* @__PURE__ */
|
|
1779
|
+
/* @__PURE__ */ jsx12(
|
|
2040
1780
|
"path",
|
|
2041
1781
|
{
|
|
2042
1782
|
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
2043
1783
|
fill: color
|
|
2044
1784
|
}
|
|
2045
1785
|
),
|
|
2046
|
-
/* @__PURE__ */
|
|
1786
|
+
/* @__PURE__ */ jsx12(
|
|
2047
1787
|
"path",
|
|
2048
1788
|
{
|
|
2049
1789
|
d: "M21.1426 17.8027C21.1426 17.627 21.1152 17.4707 21.0605 17.334C21.0098 17.1973 20.918 17.0723 20.7852 16.959C20.6523 16.8457 20.4648 16.7363 20.2227 16.6309C19.9844 16.5215 19.6797 16.4102 19.3086 16.2969C18.9023 16.1719 18.5273 16.0332 18.1836 15.8809C17.8438 15.7246 17.5469 15.5449 17.293 15.3418C17.0391 15.1348 16.8418 14.8984 16.7012 14.6328C16.5605 14.3633 16.4902 14.0527 16.4902 13.7012C16.4902 13.3535 16.5625 13.0371 16.707 12.752C16.8555 12.4668 17.0645 12.2207 17.334 12.0137C17.6074 11.8027 17.9297 11.6406 18.3008 11.5273C18.6719 11.4102 19.082 11.3516 19.5312 11.3516C20.1641 11.3516 20.709 11.4688 21.166 11.7031C21.627 11.9375 21.9805 12.252 22.2266 12.6465C22.4766 13.041 22.6016 13.4766 22.6016 13.9531H21.1426C21.1426 13.6719 21.082 13.4238 20.9609 13.209C20.8438 12.9902 20.6641 12.8184 20.4219 12.6934C20.1836 12.5684 19.8809 12.5059 19.5137 12.5059C19.166 12.5059 18.877 12.5586 18.6465 12.6641C18.416 12.7695 18.2441 12.9121 18.1309 13.0918C18.0176 13.2715 17.9609 13.4746 17.9609 13.7012C17.9609 13.8613 17.998 14.0078 18.0723 14.1406C18.1465 14.2695 18.2598 14.3906 18.4121 14.5039C18.5645 14.6133 18.7559 14.7168 18.9863 14.8145C19.2168 14.9121 19.4883 15.0059 19.8008 15.0957C20.2734 15.2363 20.6855 15.3926 21.0371 15.5645C21.3887 15.7324 21.6816 15.9238 21.916 16.1387C22.1504 16.3535 22.3262 16.5977 22.4434 16.8711C22.5605 17.1406 22.6191 17.4473 22.6191 17.791C22.6191 18.1504 22.5469 18.4746 22.4023 18.7637C22.2578 19.0488 22.0508 19.293 21.7812 19.4961C21.5156 19.6953 21.1953 19.8496 20.8203 19.959C20.4492 20.0645 20.0352 20.1172 19.5781 20.1172C19.168 20.1172 18.7637 20.0625 18.3652 19.9531C17.9707 19.8438 17.6113 19.6777 17.2871 19.4551C16.9629 19.2285 16.7051 18.9473 16.5137 18.6113C16.3223 18.2715 16.2266 17.875 16.2266 17.4219H17.6973C17.6973 17.6992 17.7441 17.9355 17.8379 18.1309C17.9355 18.3262 18.0703 18.4863 18.2422 18.6113C18.4141 18.7324 18.6133 18.8223 18.8398 18.8809C19.0703 18.9395 19.3164 18.9688 19.5781 18.9688C19.9219 18.9688 20.209 18.9199 20.4395 18.8223C20.6738 18.7246 20.8496 18.5879 20.9668 18.4121C21.084 18.2363 21.1426 18.0332 21.1426 17.8027Z",
|
|
2050
1790
|
fill: color
|
|
2051
1791
|
}
|
|
2052
1792
|
),
|
|
2053
|
-
/* @__PURE__ */
|
|
1793
|
+
/* @__PURE__ */ jsx12(
|
|
2054
1794
|
"path",
|
|
2055
1795
|
{
|
|
2056
1796
|
d: "M15.4512 18.834V20H10.9219V18.834H15.4512ZM11.3379 11.4688V20H9.86719V11.4688H11.3379ZM14.8594 15.0312V16.1797H10.9219V15.0312H14.8594ZM15.4219 11.4688V12.6406H10.9219V11.4688H15.4219Z",
|
|
@@ -2062,7 +1802,7 @@ var ChatES = ({ size, color }) => /* @__PURE__ */ jsxs10(
|
|
|
2062
1802
|
);
|
|
2063
1803
|
|
|
2064
1804
|
// src/components/IconRender/IconRender.tsx
|
|
2065
|
-
import { jsx as
|
|
1805
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
2066
1806
|
var IconRender = ({
|
|
2067
1807
|
iconName,
|
|
2068
1808
|
color = "#000000",
|
|
@@ -2072,14 +1812,14 @@ var IconRender = ({
|
|
|
2072
1812
|
if (typeof iconName === "string") {
|
|
2073
1813
|
switch (iconName) {
|
|
2074
1814
|
case "Chat_PT":
|
|
2075
|
-
return /* @__PURE__ */
|
|
1815
|
+
return /* @__PURE__ */ jsx13(ChatPT, { size, color });
|
|
2076
1816
|
case "Chat_EN":
|
|
2077
|
-
return /* @__PURE__ */
|
|
1817
|
+
return /* @__PURE__ */ jsx13(ChatEN, { size, color });
|
|
2078
1818
|
case "Chat_ES":
|
|
2079
|
-
return /* @__PURE__ */
|
|
1819
|
+
return /* @__PURE__ */ jsx13(ChatES, { size, color });
|
|
2080
1820
|
default: {
|
|
2081
1821
|
const IconComponent = PhosphorIcons[iconName] || PhosphorIcons.Question;
|
|
2082
|
-
return /* @__PURE__ */
|
|
1822
|
+
return /* @__PURE__ */ jsx13(IconComponent, { size, color, weight });
|
|
2083
1823
|
}
|
|
2084
1824
|
}
|
|
2085
1825
|
} else {
|
|
@@ -2092,7 +1832,7 @@ var IconRender = ({
|
|
|
2092
1832
|
var IconRender_default = IconRender;
|
|
2093
1833
|
|
|
2094
1834
|
// src/components/Card/Card.tsx
|
|
2095
|
-
import { Fragment as Fragment4, jsx as
|
|
1835
|
+
import { Fragment as Fragment4, jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2096
1836
|
var CARD_BASE_CLASSES = {
|
|
2097
1837
|
default: "w-full bg-background border border-border-50 rounded-xl",
|
|
2098
1838
|
compact: "w-full bg-background border border-border-50 rounded-lg",
|
|
@@ -2118,7 +1858,7 @@ var CARD_CURSOR_CLASSES = {
|
|
|
2118
1858
|
default: "",
|
|
2119
1859
|
pointer: "cursor-pointer"
|
|
2120
1860
|
};
|
|
2121
|
-
var CardBase =
|
|
1861
|
+
var CardBase = forwardRef5(
|
|
2122
1862
|
({
|
|
2123
1863
|
children,
|
|
2124
1864
|
variant = "default",
|
|
@@ -2134,7 +1874,7 @@ var CardBase = forwardRef6(
|
|
|
2134
1874
|
const minHeightClasses = CARD_MIN_HEIGHT_CLASSES[minHeight];
|
|
2135
1875
|
const layoutClasses = CARD_LAYOUT_CLASSES[layout];
|
|
2136
1876
|
const cursorClasses = CARD_CURSOR_CLASSES[cursor];
|
|
2137
|
-
return /* @__PURE__ */
|
|
1877
|
+
return /* @__PURE__ */ jsx14(
|
|
2138
1878
|
"div",
|
|
2139
1879
|
{
|
|
2140
1880
|
ref,
|
|
@@ -2176,7 +1916,7 @@ var ACTION_HEADER_CLASSES = {
|
|
|
2176
1916
|
error: "text-error-300",
|
|
2177
1917
|
info: "text-info-300"
|
|
2178
1918
|
};
|
|
2179
|
-
var CardActivitiesResults =
|
|
1919
|
+
var CardActivitiesResults = forwardRef5(
|
|
2180
1920
|
({
|
|
2181
1921
|
icon,
|
|
2182
1922
|
title,
|
|
@@ -2192,7 +1932,7 @@ var CardActivitiesResults = forwardRef6(
|
|
|
2192
1932
|
const actionIconClasses = ACTION_ICON_CLASSES[action];
|
|
2193
1933
|
const actionSubTitleClasses = ACTION_SUBTITLE_CLASSES[action];
|
|
2194
1934
|
const actionHeaderClasses = ACTION_HEADER_CLASSES[action];
|
|
2195
|
-
return /* @__PURE__ */
|
|
1935
|
+
return /* @__PURE__ */ jsxs10(
|
|
2196
1936
|
"div",
|
|
2197
1937
|
{
|
|
2198
1938
|
ref,
|
|
@@ -2202,7 +1942,7 @@ var CardActivitiesResults = forwardRef6(
|
|
|
2202
1942
|
),
|
|
2203
1943
|
...props,
|
|
2204
1944
|
children: [
|
|
2205
|
-
/* @__PURE__ */
|
|
1945
|
+
/* @__PURE__ */ jsxs10(
|
|
2206
1946
|
"div",
|
|
2207
1947
|
{
|
|
2208
1948
|
className: cn(
|
|
@@ -2211,7 +1951,7 @@ var CardActivitiesResults = forwardRef6(
|
|
|
2211
1951
|
extended ? "rounded-t-xl" : "rounded-xl"
|
|
2212
1952
|
),
|
|
2213
1953
|
children: [
|
|
2214
|
-
/* @__PURE__ */
|
|
1954
|
+
/* @__PURE__ */ jsx14(
|
|
2215
1955
|
"span",
|
|
2216
1956
|
{
|
|
2217
1957
|
className: cn(
|
|
@@ -2221,7 +1961,7 @@ var CardActivitiesResults = forwardRef6(
|
|
|
2221
1961
|
children: icon
|
|
2222
1962
|
}
|
|
2223
1963
|
),
|
|
2224
|
-
/* @__PURE__ */
|
|
1964
|
+
/* @__PURE__ */ jsx14(
|
|
2225
1965
|
Text_default,
|
|
2226
1966
|
{
|
|
2227
1967
|
size: "2xs",
|
|
@@ -2230,7 +1970,7 @@ var CardActivitiesResults = forwardRef6(
|
|
|
2230
1970
|
children: title
|
|
2231
1971
|
}
|
|
2232
1972
|
),
|
|
2233
|
-
/* @__PURE__ */
|
|
1973
|
+
/* @__PURE__ */ jsx14(
|
|
2234
1974
|
"p",
|
|
2235
1975
|
{
|
|
2236
1976
|
className: cn("text-lg font-bold truncate", actionSubTitleClasses),
|
|
@@ -2240,8 +1980,8 @@ var CardActivitiesResults = forwardRef6(
|
|
|
2240
1980
|
]
|
|
2241
1981
|
}
|
|
2242
1982
|
),
|
|
2243
|
-
extended && /* @__PURE__ */
|
|
2244
|
-
/* @__PURE__ */
|
|
1983
|
+
extended && /* @__PURE__ */ jsxs10("div", { className: "flex flex-col items-center gap-2.5 pb-9.5 pt-2.5", children: [
|
|
1984
|
+
/* @__PURE__ */ jsx14(
|
|
2245
1985
|
"p",
|
|
2246
1986
|
{
|
|
2247
1987
|
className: cn(
|
|
@@ -2251,14 +1991,14 @@ var CardActivitiesResults = forwardRef6(
|
|
|
2251
1991
|
children: header
|
|
2252
1992
|
}
|
|
2253
1993
|
),
|
|
2254
|
-
/* @__PURE__ */
|
|
1994
|
+
/* @__PURE__ */ jsx14(Badge_default, { size: "large", action: "info", children: description })
|
|
2255
1995
|
] })
|
|
2256
1996
|
]
|
|
2257
1997
|
}
|
|
2258
1998
|
);
|
|
2259
1999
|
}
|
|
2260
2000
|
);
|
|
2261
|
-
var CardQuestions =
|
|
2001
|
+
var CardQuestions = forwardRef5(
|
|
2262
2002
|
({
|
|
2263
2003
|
header,
|
|
2264
2004
|
state = "undone",
|
|
@@ -2270,7 +2010,7 @@ var CardQuestions = forwardRef6(
|
|
|
2270
2010
|
const isDone = state === "done";
|
|
2271
2011
|
const stateLabel = isDone ? "Realizado" : "N\xE3o Realizado";
|
|
2272
2012
|
const buttonLabel = isDone ? "Ver Resultado" : "Responder";
|
|
2273
|
-
return /* @__PURE__ */
|
|
2013
|
+
return /* @__PURE__ */ jsxs10(
|
|
2274
2014
|
CardBase,
|
|
2275
2015
|
{
|
|
2276
2016
|
ref,
|
|
@@ -2280,9 +2020,9 @@ var CardQuestions = forwardRef6(
|
|
|
2280
2020
|
className: cn("justify-between gap-4", className),
|
|
2281
2021
|
...props,
|
|
2282
2022
|
children: [
|
|
2283
|
-
/* @__PURE__ */
|
|
2284
|
-
/* @__PURE__ */
|
|
2285
|
-
/* @__PURE__ */
|
|
2023
|
+
/* @__PURE__ */ jsxs10("section", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
2024
|
+
/* @__PURE__ */ jsx14("p", { className: "font-bold text-xs text-text-950 truncate", children: header }),
|
|
2025
|
+
/* @__PURE__ */ jsx14("div", { className: "flex flex-row gap-6 items-center", children: /* @__PURE__ */ jsx14(
|
|
2286
2026
|
Badge_default,
|
|
2287
2027
|
{
|
|
2288
2028
|
size: "medium",
|
|
@@ -2292,7 +2032,7 @@ var CardQuestions = forwardRef6(
|
|
|
2292
2032
|
}
|
|
2293
2033
|
) })
|
|
2294
2034
|
] }),
|
|
2295
|
-
/* @__PURE__ */
|
|
2035
|
+
/* @__PURE__ */ jsx14("span", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx14(
|
|
2296
2036
|
Button_default,
|
|
2297
2037
|
{
|
|
2298
2038
|
size: "extra-small",
|
|
@@ -2306,7 +2046,7 @@ var CardQuestions = forwardRef6(
|
|
|
2306
2046
|
);
|
|
2307
2047
|
}
|
|
2308
2048
|
);
|
|
2309
|
-
var CardProgress =
|
|
2049
|
+
var CardProgress = forwardRef5(
|
|
2310
2050
|
({
|
|
2311
2051
|
header,
|
|
2312
2052
|
subhead,
|
|
@@ -2323,19 +2063,19 @@ var CardProgress = forwardRef6(
|
|
|
2323
2063
|
}, ref) => {
|
|
2324
2064
|
const isHorizontal = direction === "horizontal";
|
|
2325
2065
|
const contentComponent = {
|
|
2326
|
-
horizontal: /* @__PURE__ */
|
|
2327
|
-
showDates && /* @__PURE__ */
|
|
2328
|
-
initialDate && /* @__PURE__ */
|
|
2329
|
-
/* @__PURE__ */
|
|
2330
|
-
/* @__PURE__ */
|
|
2066
|
+
horizontal: /* @__PURE__ */ jsxs10(Fragment4, { children: [
|
|
2067
|
+
showDates && /* @__PURE__ */ jsxs10("div", { className: "flex flex-row gap-6 items-center", children: [
|
|
2068
|
+
initialDate && /* @__PURE__ */ jsxs10("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
2069
|
+
/* @__PURE__ */ jsx14("p", { className: "text-text-800 font-semibold", children: "In\xEDcio" }),
|
|
2070
|
+
/* @__PURE__ */ jsx14("p", { className: "text-text-600", children: initialDate })
|
|
2331
2071
|
] }),
|
|
2332
|
-
endDate && /* @__PURE__ */
|
|
2333
|
-
/* @__PURE__ */
|
|
2334
|
-
/* @__PURE__ */
|
|
2072
|
+
endDate && /* @__PURE__ */ jsxs10("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
2073
|
+
/* @__PURE__ */ jsx14("p", { className: "text-text-800 font-semibold", children: "Fim" }),
|
|
2074
|
+
/* @__PURE__ */ jsx14("p", { className: "text-text-600", children: endDate })
|
|
2335
2075
|
] })
|
|
2336
2076
|
] }),
|
|
2337
|
-
/* @__PURE__ */
|
|
2338
|
-
/* @__PURE__ */
|
|
2077
|
+
/* @__PURE__ */ jsxs10("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
2078
|
+
/* @__PURE__ */ jsx14(
|
|
2339
2079
|
ProgressBar_default,
|
|
2340
2080
|
{
|
|
2341
2081
|
size: "small",
|
|
@@ -2344,7 +2084,7 @@ var CardProgress = forwardRef6(
|
|
|
2344
2084
|
"data-testid": "progress-bar"
|
|
2345
2085
|
}
|
|
2346
2086
|
),
|
|
2347
|
-
/* @__PURE__ */
|
|
2087
|
+
/* @__PURE__ */ jsxs10(
|
|
2348
2088
|
Text_default,
|
|
2349
2089
|
{
|
|
2350
2090
|
size: "xs",
|
|
@@ -2360,9 +2100,9 @@ var CardProgress = forwardRef6(
|
|
|
2360
2100
|
)
|
|
2361
2101
|
] })
|
|
2362
2102
|
] }),
|
|
2363
|
-
vertical: /* @__PURE__ */
|
|
2103
|
+
vertical: /* @__PURE__ */ jsx14("p", { className: "text-sm text-text-800", children: subhead })
|
|
2364
2104
|
};
|
|
2365
|
-
return /* @__PURE__ */
|
|
2105
|
+
return /* @__PURE__ */ jsxs10(
|
|
2366
2106
|
CardBase,
|
|
2367
2107
|
{
|
|
2368
2108
|
ref,
|
|
@@ -2373,7 +2113,7 @@ var CardProgress = forwardRef6(
|
|
|
2373
2113
|
className: cn(isHorizontal ? "h-20" : "", className),
|
|
2374
2114
|
...props,
|
|
2375
2115
|
children: [
|
|
2376
|
-
/* @__PURE__ */
|
|
2116
|
+
/* @__PURE__ */ jsx14(
|
|
2377
2117
|
"div",
|
|
2378
2118
|
{
|
|
2379
2119
|
className: cn(
|
|
@@ -2386,7 +2126,7 @@ var CardProgress = forwardRef6(
|
|
|
2386
2126
|
children: icon
|
|
2387
2127
|
}
|
|
2388
2128
|
),
|
|
2389
|
-
/* @__PURE__ */
|
|
2129
|
+
/* @__PURE__ */ jsxs10(
|
|
2390
2130
|
"div",
|
|
2391
2131
|
{
|
|
2392
2132
|
className: cn(
|
|
@@ -2394,7 +2134,7 @@ var CardProgress = forwardRef6(
|
|
|
2394
2134
|
!isHorizontal && "gap-4"
|
|
2395
2135
|
),
|
|
2396
2136
|
children: [
|
|
2397
|
-
/* @__PURE__ */
|
|
2137
|
+
/* @__PURE__ */ jsx14(Text_default, { size: "sm", weight: "bold", className: "text-text-950 truncate", children: header }),
|
|
2398
2138
|
contentComponent[direction]
|
|
2399
2139
|
]
|
|
2400
2140
|
}
|
|
@@ -2404,7 +2144,7 @@ var CardProgress = forwardRef6(
|
|
|
2404
2144
|
);
|
|
2405
2145
|
}
|
|
2406
2146
|
);
|
|
2407
|
-
var CardTopic =
|
|
2147
|
+
var CardTopic = forwardRef5(
|
|
2408
2148
|
({
|
|
2409
2149
|
header,
|
|
2410
2150
|
subHead,
|
|
@@ -2414,7 +2154,7 @@ var CardTopic = forwardRef6(
|
|
|
2414
2154
|
className = "",
|
|
2415
2155
|
...props
|
|
2416
2156
|
}, ref) => {
|
|
2417
|
-
return /* @__PURE__ */
|
|
2157
|
+
return /* @__PURE__ */ jsxs10(
|
|
2418
2158
|
CardBase,
|
|
2419
2159
|
{
|
|
2420
2160
|
ref,
|
|
@@ -2425,13 +2165,13 @@ var CardTopic = forwardRef6(
|
|
|
2425
2165
|
className: cn("justify-center gap-2 py-2 px-4", className),
|
|
2426
2166
|
...props,
|
|
2427
2167
|
children: [
|
|
2428
|
-
subHead && /* @__PURE__ */
|
|
2429
|
-
/* @__PURE__ */
|
|
2430
|
-
index < subHead.length - 1 && /* @__PURE__ */
|
|
2168
|
+
subHead && /* @__PURE__ */ jsx14("span", { className: "text-text-600 text-2xs flex flex-row gap-1", children: subHead.map((text, index) => /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
2169
|
+
/* @__PURE__ */ jsx14("p", { children: text }),
|
|
2170
|
+
index < subHead.length - 1 && /* @__PURE__ */ jsx14("p", { children: "\u2022" })
|
|
2431
2171
|
] }, `${text} - ${index}`)) }),
|
|
2432
|
-
/* @__PURE__ */
|
|
2433
|
-
/* @__PURE__ */
|
|
2434
|
-
/* @__PURE__ */
|
|
2172
|
+
/* @__PURE__ */ jsx14("p", { className: "text-sm text-text-950 font-bold truncate", children: header }),
|
|
2173
|
+
/* @__PURE__ */ jsxs10("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
2174
|
+
/* @__PURE__ */ jsx14(
|
|
2435
2175
|
ProgressBar_default,
|
|
2436
2176
|
{
|
|
2437
2177
|
size: "small",
|
|
@@ -2440,7 +2180,7 @@ var CardTopic = forwardRef6(
|
|
|
2440
2180
|
"data-testid": "progress-bar"
|
|
2441
2181
|
}
|
|
2442
2182
|
),
|
|
2443
|
-
showPercentage && /* @__PURE__ */
|
|
2183
|
+
showPercentage && /* @__PURE__ */ jsxs10(
|
|
2444
2184
|
Text_default,
|
|
2445
2185
|
{
|
|
2446
2186
|
size: "xs",
|
|
@@ -2460,7 +2200,7 @@ var CardTopic = forwardRef6(
|
|
|
2460
2200
|
);
|
|
2461
2201
|
}
|
|
2462
2202
|
);
|
|
2463
|
-
var CardPerformance =
|
|
2203
|
+
var CardPerformance = forwardRef5(
|
|
2464
2204
|
({
|
|
2465
2205
|
header,
|
|
2466
2206
|
progress,
|
|
@@ -2474,7 +2214,7 @@ var CardPerformance = forwardRef6(
|
|
|
2474
2214
|
...props
|
|
2475
2215
|
}, ref) => {
|
|
2476
2216
|
const hasProgress = progress !== void 0;
|
|
2477
|
-
return /* @__PURE__ */
|
|
2217
|
+
return /* @__PURE__ */ jsxs10(
|
|
2478
2218
|
CardBase,
|
|
2479
2219
|
{
|
|
2480
2220
|
ref,
|
|
@@ -2488,10 +2228,10 @@ var CardPerformance = forwardRef6(
|
|
|
2488
2228
|
onClick: () => actionVariant == "caret" && onClickButton?.(valueButton),
|
|
2489
2229
|
...props,
|
|
2490
2230
|
children: [
|
|
2491
|
-
/* @__PURE__ */
|
|
2492
|
-
/* @__PURE__ */
|
|
2493
|
-
/* @__PURE__ */
|
|
2494
|
-
actionVariant === "button" && /* @__PURE__ */
|
|
2231
|
+
/* @__PURE__ */ jsxs10("div", { className: "w-full flex flex-col justify-between gap-2", children: [
|
|
2232
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex flex-row justify-between items-center gap-2", children: [
|
|
2233
|
+
/* @__PURE__ */ jsx14("p", { className: "text-lg font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
2234
|
+
actionVariant === "button" && /* @__PURE__ */ jsx14(
|
|
2495
2235
|
Button_default,
|
|
2496
2236
|
{
|
|
2497
2237
|
variant: "outline",
|
|
@@ -2502,16 +2242,16 @@ var CardPerformance = forwardRef6(
|
|
|
2502
2242
|
}
|
|
2503
2243
|
)
|
|
2504
2244
|
] }),
|
|
2505
|
-
/* @__PURE__ */
|
|
2245
|
+
/* @__PURE__ */ jsx14("div", { className: "w-full", children: hasProgress ? /* @__PURE__ */ jsx14(
|
|
2506
2246
|
ProgressBar_default,
|
|
2507
2247
|
{
|
|
2508
2248
|
value: progress,
|
|
2509
2249
|
label: `${progress}% ${labelProgress}`,
|
|
2510
2250
|
variant: progressVariant
|
|
2511
2251
|
}
|
|
2512
|
-
) : /* @__PURE__ */
|
|
2252
|
+
) : /* @__PURE__ */ jsx14("p", { className: "text-xs text-text-600 truncate", children: description }) })
|
|
2513
2253
|
] }),
|
|
2514
|
-
actionVariant == "caret" && /* @__PURE__ */
|
|
2254
|
+
actionVariant == "caret" && /* @__PURE__ */ jsx14(
|
|
2515
2255
|
CaretRight,
|
|
2516
2256
|
{
|
|
2517
2257
|
className: "size-4.5 text-text-800 cursor-pointer",
|
|
@@ -2523,7 +2263,7 @@ var CardPerformance = forwardRef6(
|
|
|
2523
2263
|
);
|
|
2524
2264
|
}
|
|
2525
2265
|
);
|
|
2526
|
-
var CardResults =
|
|
2266
|
+
var CardResults = forwardRef5(
|
|
2527
2267
|
({
|
|
2528
2268
|
header,
|
|
2529
2269
|
correct_answers,
|
|
@@ -2535,7 +2275,7 @@ var CardResults = forwardRef6(
|
|
|
2535
2275
|
...props
|
|
2536
2276
|
}, ref) => {
|
|
2537
2277
|
const isRow = direction == "row";
|
|
2538
|
-
return /* @__PURE__ */
|
|
2278
|
+
return /* @__PURE__ */ jsxs10(
|
|
2539
2279
|
CardBase,
|
|
2540
2280
|
{
|
|
2541
2281
|
ref,
|
|
@@ -2545,7 +2285,7 @@ var CardResults = forwardRef6(
|
|
|
2545
2285
|
className: cn("items-stretch cursor-pointer pr-4", className),
|
|
2546
2286
|
...props,
|
|
2547
2287
|
children: [
|
|
2548
|
-
/* @__PURE__ */
|
|
2288
|
+
/* @__PURE__ */ jsx14(
|
|
2549
2289
|
"div",
|
|
2550
2290
|
{
|
|
2551
2291
|
className: cn(
|
|
@@ -2554,11 +2294,11 @@ var CardResults = forwardRef6(
|
|
|
2554
2294
|
style: {
|
|
2555
2295
|
backgroundColor: color
|
|
2556
2296
|
},
|
|
2557
|
-
children: /* @__PURE__ */
|
|
2297
|
+
children: /* @__PURE__ */ jsx14(IconRender_default, { iconName: icon, color: "currentColor", size: 20 })
|
|
2558
2298
|
}
|
|
2559
2299
|
),
|
|
2560
|
-
/* @__PURE__ */
|
|
2561
|
-
/* @__PURE__ */
|
|
2300
|
+
/* @__PURE__ */ jsxs10("div", { className: "w-full flex flex-row justify-between items-center", children: [
|
|
2301
|
+
/* @__PURE__ */ jsxs10(
|
|
2562
2302
|
"div",
|
|
2563
2303
|
{
|
|
2564
2304
|
className: cn(
|
|
@@ -2566,28 +2306,28 @@ var CardResults = forwardRef6(
|
|
|
2566
2306
|
isRow ? "flex-row items-center gap-2" : "flex-col"
|
|
2567
2307
|
),
|
|
2568
2308
|
children: [
|
|
2569
|
-
/* @__PURE__ */
|
|
2570
|
-
/* @__PURE__ */
|
|
2571
|
-
/* @__PURE__ */
|
|
2309
|
+
/* @__PURE__ */ jsx14("p", { className: "text-sm font-bold text-text-950 flex-1", children: header }),
|
|
2310
|
+
/* @__PURE__ */ jsxs10("span", { className: "flex flex-wrap flex-row gap-1 items-center", children: [
|
|
2311
|
+
/* @__PURE__ */ jsxs10(
|
|
2572
2312
|
Badge_default,
|
|
2573
2313
|
{
|
|
2574
2314
|
action: "success",
|
|
2575
2315
|
variant: "solid",
|
|
2576
2316
|
size: "large",
|
|
2577
|
-
iconLeft: /* @__PURE__ */
|
|
2317
|
+
iconLeft: /* @__PURE__ */ jsx14(CheckCircle, {}),
|
|
2578
2318
|
children: [
|
|
2579
2319
|
correct_answers,
|
|
2580
2320
|
" Corretas"
|
|
2581
2321
|
]
|
|
2582
2322
|
}
|
|
2583
2323
|
),
|
|
2584
|
-
/* @__PURE__ */
|
|
2324
|
+
/* @__PURE__ */ jsxs10(
|
|
2585
2325
|
Badge_default,
|
|
2586
2326
|
{
|
|
2587
2327
|
action: "error",
|
|
2588
2328
|
variant: "solid",
|
|
2589
2329
|
size: "large",
|
|
2590
|
-
iconLeft: /* @__PURE__ */
|
|
2330
|
+
iconLeft: /* @__PURE__ */ jsx14(XCircle, {}),
|
|
2591
2331
|
children: [
|
|
2592
2332
|
incorrect_answers,
|
|
2593
2333
|
" Incorretas"
|
|
@@ -2598,14 +2338,14 @@ var CardResults = forwardRef6(
|
|
|
2598
2338
|
]
|
|
2599
2339
|
}
|
|
2600
2340
|
),
|
|
2601
|
-
/* @__PURE__ */
|
|
2341
|
+
/* @__PURE__ */ jsx14(CaretRight, { className: "min-w-6 min-h-6 text-text-800" })
|
|
2602
2342
|
] })
|
|
2603
2343
|
]
|
|
2604
2344
|
}
|
|
2605
2345
|
);
|
|
2606
2346
|
}
|
|
2607
2347
|
);
|
|
2608
|
-
var CardStatus =
|
|
2348
|
+
var CardStatus = forwardRef5(
|
|
2609
2349
|
({ header, className, status, label, ...props }, ref) => {
|
|
2610
2350
|
const getLabelBadge = (status2) => {
|
|
2611
2351
|
switch (status2) {
|
|
@@ -2624,13 +2364,13 @@ var CardStatus = forwardRef6(
|
|
|
2624
2364
|
const getIconBadge = (status2) => {
|
|
2625
2365
|
switch (status2) {
|
|
2626
2366
|
case "correct":
|
|
2627
|
-
return /* @__PURE__ */
|
|
2367
|
+
return /* @__PURE__ */ jsx14(CheckCircle, {});
|
|
2628
2368
|
case "incorrect":
|
|
2629
|
-
return /* @__PURE__ */
|
|
2369
|
+
return /* @__PURE__ */ jsx14(XCircle, {});
|
|
2630
2370
|
case "pending":
|
|
2631
|
-
return /* @__PURE__ */
|
|
2371
|
+
return /* @__PURE__ */ jsx14(Clock, {});
|
|
2632
2372
|
default:
|
|
2633
|
-
return /* @__PURE__ */
|
|
2373
|
+
return /* @__PURE__ */ jsx14(XCircle, {});
|
|
2634
2374
|
}
|
|
2635
2375
|
};
|
|
2636
2376
|
const getActionBadge = (status2) => {
|
|
@@ -2645,7 +2385,7 @@ var CardStatus = forwardRef6(
|
|
|
2645
2385
|
return "info";
|
|
2646
2386
|
}
|
|
2647
2387
|
};
|
|
2648
|
-
return /* @__PURE__ */
|
|
2388
|
+
return /* @__PURE__ */ jsx14(
|
|
2649
2389
|
CardBase,
|
|
2650
2390
|
{
|
|
2651
2391
|
ref,
|
|
@@ -2654,10 +2394,10 @@ var CardStatus = forwardRef6(
|
|
|
2654
2394
|
minHeight: "medium",
|
|
2655
2395
|
className: cn("items-center cursor-pointer", className),
|
|
2656
2396
|
...props,
|
|
2657
|
-
children: /* @__PURE__ */
|
|
2658
|
-
/* @__PURE__ */
|
|
2659
|
-
/* @__PURE__ */
|
|
2660
|
-
status && /* @__PURE__ */
|
|
2397
|
+
children: /* @__PURE__ */ jsxs10("div", { className: "flex justify-between w-full h-full flex-row items-center gap-2", children: [
|
|
2398
|
+
/* @__PURE__ */ jsx14("p", { className: "text-sm font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
2399
|
+
/* @__PURE__ */ jsxs10("span", { className: "flex flex-row gap-1 items-center flex-shrink-0", children: [
|
|
2400
|
+
status && /* @__PURE__ */ jsx14(
|
|
2661
2401
|
Badge_default,
|
|
2662
2402
|
{
|
|
2663
2403
|
action: getActionBadge(status),
|
|
@@ -2667,17 +2407,17 @@ var CardStatus = forwardRef6(
|
|
|
2667
2407
|
children: getLabelBadge(status)
|
|
2668
2408
|
}
|
|
2669
2409
|
),
|
|
2670
|
-
label && /* @__PURE__ */
|
|
2410
|
+
label && /* @__PURE__ */ jsx14("p", { className: "text-sm text-text-800", children: label })
|
|
2671
2411
|
] }),
|
|
2672
|
-
/* @__PURE__ */
|
|
2412
|
+
/* @__PURE__ */ jsx14(CaretRight, { className: "min-w-6 min-h-6 text-text-800 cursor-pointer flex-shrink-0 ml-2" })
|
|
2673
2413
|
] })
|
|
2674
2414
|
}
|
|
2675
2415
|
);
|
|
2676
2416
|
}
|
|
2677
2417
|
);
|
|
2678
|
-
var CardSettings =
|
|
2418
|
+
var CardSettings = forwardRef5(
|
|
2679
2419
|
({ header, className, icon, ...props }, ref) => {
|
|
2680
|
-
return /* @__PURE__ */
|
|
2420
|
+
return /* @__PURE__ */ jsxs10(
|
|
2681
2421
|
CardBase,
|
|
2682
2422
|
{
|
|
2683
2423
|
ref,
|
|
@@ -2690,17 +2430,17 @@ var CardSettings = forwardRef6(
|
|
|
2690
2430
|
),
|
|
2691
2431
|
...props,
|
|
2692
2432
|
children: [
|
|
2693
|
-
/* @__PURE__ */
|
|
2694
|
-
/* @__PURE__ */
|
|
2695
|
-
/* @__PURE__ */
|
|
2433
|
+
/* @__PURE__ */ jsx14("span", { className: "[&>svg]:size-6", children: icon }),
|
|
2434
|
+
/* @__PURE__ */ jsx14("p", { className: "w-full text-sm truncate", children: header }),
|
|
2435
|
+
/* @__PURE__ */ jsx14(CaretRight, { size: 24, className: "cursor-pointer" })
|
|
2696
2436
|
]
|
|
2697
2437
|
}
|
|
2698
2438
|
);
|
|
2699
2439
|
}
|
|
2700
2440
|
);
|
|
2701
|
-
var CardSupport =
|
|
2441
|
+
var CardSupport = forwardRef5(
|
|
2702
2442
|
({ header, className, direction = "col", children, ...props }, ref) => {
|
|
2703
|
-
return /* @__PURE__ */
|
|
2443
|
+
return /* @__PURE__ */ jsxs10(
|
|
2704
2444
|
CardBase,
|
|
2705
2445
|
{
|
|
2706
2446
|
ref,
|
|
@@ -2713,7 +2453,7 @@ var CardSupport = forwardRef6(
|
|
|
2713
2453
|
),
|
|
2714
2454
|
...props,
|
|
2715
2455
|
children: [
|
|
2716
|
-
/* @__PURE__ */
|
|
2456
|
+
/* @__PURE__ */ jsxs10(
|
|
2717
2457
|
"div",
|
|
2718
2458
|
{
|
|
2719
2459
|
className: cn(
|
|
@@ -2721,18 +2461,18 @@ var CardSupport = forwardRef6(
|
|
|
2721
2461
|
direction == "col" ? "flex-col" : "flex-row items-center"
|
|
2722
2462
|
),
|
|
2723
2463
|
children: [
|
|
2724
|
-
/* @__PURE__ */
|
|
2725
|
-
/* @__PURE__ */
|
|
2464
|
+
/* @__PURE__ */ jsx14("span", { className: "w-full min-w-0", children: /* @__PURE__ */ jsx14("p", { className: "text-sm text-text-950 font-bold truncate", children: header }) }),
|
|
2465
|
+
/* @__PURE__ */ jsx14("span", { className: "flex flex-row gap-1", children })
|
|
2726
2466
|
]
|
|
2727
2467
|
}
|
|
2728
2468
|
),
|
|
2729
|
-
/* @__PURE__ */
|
|
2469
|
+
/* @__PURE__ */ jsx14(CaretRight, { className: "text-text-800 cursor-pointer", size: 24 })
|
|
2730
2470
|
]
|
|
2731
2471
|
}
|
|
2732
2472
|
);
|
|
2733
2473
|
}
|
|
2734
2474
|
);
|
|
2735
|
-
var CardForum =
|
|
2475
|
+
var CardForum = forwardRef5(
|
|
2736
2476
|
({
|
|
2737
2477
|
title,
|
|
2738
2478
|
content,
|
|
@@ -2746,7 +2486,7 @@ var CardForum = forwardRef6(
|
|
|
2746
2486
|
hour,
|
|
2747
2487
|
...props
|
|
2748
2488
|
}, ref) => {
|
|
2749
|
-
return /* @__PURE__ */
|
|
2489
|
+
return /* @__PURE__ */ jsxs10(
|
|
2750
2490
|
CardBase,
|
|
2751
2491
|
{
|
|
2752
2492
|
ref,
|
|
@@ -2757,7 +2497,7 @@ var CardForum = forwardRef6(
|
|
|
2757
2497
|
className: cn("w-auto h-auto gap-3", className),
|
|
2758
2498
|
...props,
|
|
2759
2499
|
children: [
|
|
2760
|
-
/* @__PURE__ */
|
|
2500
|
+
/* @__PURE__ */ jsx14(
|
|
2761
2501
|
"button",
|
|
2762
2502
|
{
|
|
2763
2503
|
type: "button",
|
|
@@ -2766,18 +2506,18 @@ var CardForum = forwardRef6(
|
|
|
2766
2506
|
className: "min-w-8 h-8 rounded-full bg-background-950"
|
|
2767
2507
|
}
|
|
2768
2508
|
),
|
|
2769
|
-
/* @__PURE__ */
|
|
2770
|
-
/* @__PURE__ */
|
|
2771
|
-
/* @__PURE__ */
|
|
2772
|
-
/* @__PURE__ */
|
|
2509
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex flex-col gap-2 flex-1 min-w-0", children: [
|
|
2510
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex flex-row gap-1 items-center flex-wrap", children: [
|
|
2511
|
+
/* @__PURE__ */ jsx14("p", { className: "text-xs font-semibold text-primary-700 truncate", children: title }),
|
|
2512
|
+
/* @__PURE__ */ jsxs10("p", { className: "text-xs text-text-600", children: [
|
|
2773
2513
|
"\u2022 ",
|
|
2774
2514
|
date,
|
|
2775
2515
|
" \u2022 ",
|
|
2776
2516
|
hour
|
|
2777
2517
|
] })
|
|
2778
2518
|
] }),
|
|
2779
|
-
/* @__PURE__ */
|
|
2780
|
-
/* @__PURE__ */
|
|
2519
|
+
/* @__PURE__ */ jsx14("p", { className: "text-text-950 text-sm line-clamp-2 truncate", children: content }),
|
|
2520
|
+
/* @__PURE__ */ jsxs10(
|
|
2781
2521
|
"button",
|
|
2782
2522
|
{
|
|
2783
2523
|
type: "button",
|
|
@@ -2785,8 +2525,8 @@ var CardForum = forwardRef6(
|
|
|
2785
2525
|
onClick: () => onClickComments?.(valueComments),
|
|
2786
2526
|
className: "text-text-600 flex flex-row gap-2 items-center",
|
|
2787
2527
|
children: [
|
|
2788
|
-
/* @__PURE__ */
|
|
2789
|
-
/* @__PURE__ */
|
|
2528
|
+
/* @__PURE__ */ jsx14(ChatCircleText, { "aria-hidden": "true", size: 16 }),
|
|
2529
|
+
/* @__PURE__ */ jsxs10("p", { className: "text-xs", children: [
|
|
2790
2530
|
comments,
|
|
2791
2531
|
" respostas"
|
|
2792
2532
|
] })
|
|
@@ -2799,7 +2539,7 @@ var CardForum = forwardRef6(
|
|
|
2799
2539
|
);
|
|
2800
2540
|
}
|
|
2801
2541
|
);
|
|
2802
|
-
var CardAudio =
|
|
2542
|
+
var CardAudio = forwardRef5(
|
|
2803
2543
|
({
|
|
2804
2544
|
src,
|
|
2805
2545
|
title,
|
|
@@ -2813,13 +2553,13 @@ var CardAudio = forwardRef6(
|
|
|
2813
2553
|
className,
|
|
2814
2554
|
...props
|
|
2815
2555
|
}, ref) => {
|
|
2816
|
-
const [isPlaying, setIsPlaying] =
|
|
2817
|
-
const [currentTime, setCurrentTime] =
|
|
2818
|
-
const [duration, setDuration] =
|
|
2819
|
-
const [volume, setVolume] =
|
|
2820
|
-
const [showVolumeControl, setShowVolumeControl] =
|
|
2821
|
-
const [showSpeedMenu, setShowSpeedMenu] =
|
|
2822
|
-
const [playbackRate, setPlaybackRate] =
|
|
2556
|
+
const [isPlaying, setIsPlaying] = useState3(false);
|
|
2557
|
+
const [currentTime, setCurrentTime] = useState3(0);
|
|
2558
|
+
const [duration, setDuration] = useState3(0);
|
|
2559
|
+
const [volume, setVolume] = useState3(1);
|
|
2560
|
+
const [showVolumeControl, setShowVolumeControl] = useState3(false);
|
|
2561
|
+
const [showSpeedMenu, setShowSpeedMenu] = useState3(false);
|
|
2562
|
+
const [playbackRate, setPlaybackRate] = useState3(1);
|
|
2823
2563
|
const audioRef = useRef3(null);
|
|
2824
2564
|
const volumeControlRef = useRef3(null);
|
|
2825
2565
|
const speedMenuRef = useRef3(null);
|
|
@@ -2889,12 +2629,12 @@ var CardAudio = forwardRef6(
|
|
|
2889
2629
|
};
|
|
2890
2630
|
const getVolumeIcon = () => {
|
|
2891
2631
|
if (volume === 0) {
|
|
2892
|
-
return /* @__PURE__ */
|
|
2632
|
+
return /* @__PURE__ */ jsx14(SpeakerSimpleX, { size: 24 });
|
|
2893
2633
|
}
|
|
2894
2634
|
if (volume < 0.5) {
|
|
2895
|
-
return /* @__PURE__ */
|
|
2635
|
+
return /* @__PURE__ */ jsx14(SpeakerLow, { size: 24 });
|
|
2896
2636
|
}
|
|
2897
|
-
return /* @__PURE__ */
|
|
2637
|
+
return /* @__PURE__ */ jsx14(SpeakerHigh, { size: 24 });
|
|
2898
2638
|
};
|
|
2899
2639
|
useEffect3(() => {
|
|
2900
2640
|
const handleClickOutside = (event) => {
|
|
@@ -2910,7 +2650,7 @@ var CardAudio = forwardRef6(
|
|
|
2910
2650
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
2911
2651
|
};
|
|
2912
2652
|
}, []);
|
|
2913
|
-
return /* @__PURE__ */
|
|
2653
|
+
return /* @__PURE__ */ jsxs10(
|
|
2914
2654
|
CardBase,
|
|
2915
2655
|
{
|
|
2916
2656
|
ref,
|
|
@@ -2923,7 +2663,7 @@ var CardAudio = forwardRef6(
|
|
|
2923
2663
|
),
|
|
2924
2664
|
...props,
|
|
2925
2665
|
children: [
|
|
2926
|
-
/* @__PURE__ */
|
|
2666
|
+
/* @__PURE__ */ jsx14(
|
|
2927
2667
|
"audio",
|
|
2928
2668
|
{
|
|
2929
2669
|
ref: audioRef,
|
|
@@ -2935,7 +2675,7 @@ var CardAudio = forwardRef6(
|
|
|
2935
2675
|
onEnded: handleEnded,
|
|
2936
2676
|
"data-testid": "audio-element",
|
|
2937
2677
|
"aria-label": title,
|
|
2938
|
-
children: tracks ? tracks.map((track) => /* @__PURE__ */
|
|
2678
|
+
children: tracks ? tracks.map((track) => /* @__PURE__ */ jsx14(
|
|
2939
2679
|
"track",
|
|
2940
2680
|
{
|
|
2941
2681
|
kind: track.kind,
|
|
@@ -2945,7 +2685,7 @@ var CardAudio = forwardRef6(
|
|
|
2945
2685
|
default: track.default
|
|
2946
2686
|
},
|
|
2947
2687
|
track.src
|
|
2948
|
-
)) : /* @__PURE__ */
|
|
2688
|
+
)) : /* @__PURE__ */ jsx14(
|
|
2949
2689
|
"track",
|
|
2950
2690
|
{
|
|
2951
2691
|
kind: "captions",
|
|
@@ -2956,7 +2696,7 @@ var CardAudio = forwardRef6(
|
|
|
2956
2696
|
)
|
|
2957
2697
|
}
|
|
2958
2698
|
),
|
|
2959
|
-
/* @__PURE__ */
|
|
2699
|
+
/* @__PURE__ */ jsx14(
|
|
2960
2700
|
"button",
|
|
2961
2701
|
{
|
|
2962
2702
|
type: "button",
|
|
@@ -2964,14 +2704,14 @@ var CardAudio = forwardRef6(
|
|
|
2964
2704
|
disabled: !src,
|
|
2965
2705
|
className: "cursor-pointer text-text-950 hover:text-primary-600 disabled:text-text-400 disabled:cursor-not-allowed",
|
|
2966
2706
|
"aria-label": isPlaying ? "Pausar" : "Reproduzir",
|
|
2967
|
-
children: isPlaying ? /* @__PURE__ */
|
|
2968
|
-
/* @__PURE__ */
|
|
2969
|
-
/* @__PURE__ */
|
|
2970
|
-
] }) }) : /* @__PURE__ */
|
|
2707
|
+
children: isPlaying ? /* @__PURE__ */ jsx14("div", { className: "w-6 h-6 flex items-center justify-center", children: /* @__PURE__ */ jsxs10("div", { className: "flex gap-0.5", children: [
|
|
2708
|
+
/* @__PURE__ */ jsx14("div", { className: "w-1 h-4 bg-current rounded-sm" }),
|
|
2709
|
+
/* @__PURE__ */ jsx14("div", { className: "w-1 h-4 bg-current rounded-sm" })
|
|
2710
|
+
] }) }) : /* @__PURE__ */ jsx14(Play, { size: 24 })
|
|
2971
2711
|
}
|
|
2972
2712
|
),
|
|
2973
|
-
/* @__PURE__ */
|
|
2974
|
-
/* @__PURE__ */
|
|
2713
|
+
/* @__PURE__ */ jsx14("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime(currentTime) }),
|
|
2714
|
+
/* @__PURE__ */ jsx14("div", { className: "flex-1 relative", "data-testid": "progress-bar", children: /* @__PURE__ */ jsx14(
|
|
2975
2715
|
"button",
|
|
2976
2716
|
{
|
|
2977
2717
|
type: "button",
|
|
@@ -2986,7 +2726,7 @@ var CardAudio = forwardRef6(
|
|
|
2986
2726
|
}
|
|
2987
2727
|
},
|
|
2988
2728
|
"aria-label": "Barra de progresso do \xE1udio",
|
|
2989
|
-
children: /* @__PURE__ */
|
|
2729
|
+
children: /* @__PURE__ */ jsx14(
|
|
2990
2730
|
"div",
|
|
2991
2731
|
{
|
|
2992
2732
|
className: "h-full bg-primary-600 rounded-full transition-all duration-100",
|
|
@@ -2997,19 +2737,19 @@ var CardAudio = forwardRef6(
|
|
|
2997
2737
|
)
|
|
2998
2738
|
}
|
|
2999
2739
|
) }),
|
|
3000
|
-
/* @__PURE__ */
|
|
3001
|
-
/* @__PURE__ */
|
|
3002
|
-
/* @__PURE__ */
|
|
2740
|
+
/* @__PURE__ */ jsx14("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime(duration) }),
|
|
2741
|
+
/* @__PURE__ */ jsxs10("div", { className: "relative h-6", ref: volumeControlRef, children: [
|
|
2742
|
+
/* @__PURE__ */ jsx14(
|
|
3003
2743
|
"button",
|
|
3004
2744
|
{
|
|
3005
2745
|
type: "button",
|
|
3006
2746
|
onClick: toggleVolumeControl,
|
|
3007
2747
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
3008
2748
|
"aria-label": "Controle de volume",
|
|
3009
|
-
children: /* @__PURE__ */
|
|
2749
|
+
children: /* @__PURE__ */ jsx14("div", { className: "w-6 h-6 flex items-center justify-center", children: getVolumeIcon() })
|
|
3010
2750
|
}
|
|
3011
2751
|
),
|
|
3012
|
-
showVolumeControl && /* @__PURE__ */
|
|
2752
|
+
showVolumeControl && /* @__PURE__ */ jsx14(
|
|
3013
2753
|
"button",
|
|
3014
2754
|
{
|
|
3015
2755
|
type: "button",
|
|
@@ -3019,7 +2759,7 @@ var CardAudio = forwardRef6(
|
|
|
3019
2759
|
setShowVolumeControl(false);
|
|
3020
2760
|
}
|
|
3021
2761
|
},
|
|
3022
|
-
children: /* @__PURE__ */
|
|
2762
|
+
children: /* @__PURE__ */ jsx14(
|
|
3023
2763
|
"input",
|
|
3024
2764
|
{
|
|
3025
2765
|
type: "range",
|
|
@@ -3060,22 +2800,22 @@ var CardAudio = forwardRef6(
|
|
|
3060
2800
|
}
|
|
3061
2801
|
)
|
|
3062
2802
|
] }),
|
|
3063
|
-
/* @__PURE__ */
|
|
3064
|
-
/* @__PURE__ */
|
|
2803
|
+
/* @__PURE__ */ jsxs10("div", { className: "relative h-6", ref: speedMenuRef, children: [
|
|
2804
|
+
/* @__PURE__ */ jsx14(
|
|
3065
2805
|
"button",
|
|
3066
2806
|
{
|
|
3067
2807
|
type: "button",
|
|
3068
2808
|
onClick: toggleSpeedMenu,
|
|
3069
2809
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
3070
2810
|
"aria-label": "Op\xE7\xF5es de velocidade",
|
|
3071
|
-
children: /* @__PURE__ */
|
|
2811
|
+
children: /* @__PURE__ */ jsx14(DotsThreeVertical, { size: 24 })
|
|
3072
2812
|
}
|
|
3073
2813
|
),
|
|
3074
|
-
showSpeedMenu && /* @__PURE__ */
|
|
2814
|
+
showSpeedMenu && /* @__PURE__ */ jsx14("div", { className: "absolute bottom-full right-0 mb-2 p-2 bg-background border border-border-100 rounded-lg shadow-lg min-w-24 z-10", children: /* @__PURE__ */ jsx14("div", { className: "flex flex-col gap-1", children: [
|
|
3075
2815
|
{ speed: 1, label: "1x" },
|
|
3076
2816
|
{ speed: 1.5, label: "1.5x" },
|
|
3077
2817
|
{ speed: 2, label: "2x" }
|
|
3078
|
-
].map(({ speed, label }) => /* @__PURE__ */
|
|
2818
|
+
].map(({ speed, label }) => /* @__PURE__ */ jsx14(
|
|
3079
2819
|
"button",
|
|
3080
2820
|
{
|
|
3081
2821
|
type: "button",
|
|
@@ -3100,10 +2840,10 @@ var SIMULADO_BACKGROUND_CLASSES = {
|
|
|
3100
2840
|
simuladao: "bg-exam-3",
|
|
3101
2841
|
vestibular: "bg-exam-4"
|
|
3102
2842
|
};
|
|
3103
|
-
var CardSimulado =
|
|
2843
|
+
var CardSimulado = forwardRef5(
|
|
3104
2844
|
({ title, duration, info, backgroundColor, className, ...props }, ref) => {
|
|
3105
2845
|
const backgroundClass = SIMULADO_BACKGROUND_CLASSES[backgroundColor];
|
|
3106
|
-
return /* @__PURE__ */
|
|
2846
|
+
return /* @__PURE__ */ jsx14(
|
|
3107
2847
|
CardBase,
|
|
3108
2848
|
{
|
|
3109
2849
|
ref,
|
|
@@ -3116,18 +2856,18 @@ var CardSimulado = forwardRef6(
|
|
|
3116
2856
|
className
|
|
3117
2857
|
),
|
|
3118
2858
|
...props,
|
|
3119
|
-
children: /* @__PURE__ */
|
|
3120
|
-
/* @__PURE__ */
|
|
3121
|
-
/* @__PURE__ */
|
|
3122
|
-
/* @__PURE__ */
|
|
3123
|
-
duration && /* @__PURE__ */
|
|
3124
|
-
/* @__PURE__ */
|
|
3125
|
-
/* @__PURE__ */
|
|
2859
|
+
children: /* @__PURE__ */ jsxs10("div", { className: "flex justify-between items-center w-full gap-4", children: [
|
|
2860
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
2861
|
+
/* @__PURE__ */ jsx14(Text_default, { size: "lg", weight: "bold", className: "text-text-950 truncate", children: title }),
|
|
2862
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-4 text-text-700", children: [
|
|
2863
|
+
duration && /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-1", children: [
|
|
2864
|
+
/* @__PURE__ */ jsx14(Clock, { size: 16, className: "flex-shrink-0" }),
|
|
2865
|
+
/* @__PURE__ */ jsx14(Text_default, { size: "sm", children: duration })
|
|
3126
2866
|
] }),
|
|
3127
|
-
/* @__PURE__ */
|
|
2867
|
+
/* @__PURE__ */ jsx14(Text_default, { size: "sm", className: "truncate", children: info })
|
|
3128
2868
|
] })
|
|
3129
2869
|
] }),
|
|
3130
|
-
/* @__PURE__ */
|
|
2870
|
+
/* @__PURE__ */ jsx14(
|
|
3131
2871
|
CaretRight,
|
|
3132
2872
|
{
|
|
3133
2873
|
size: 24,
|
|
@@ -3140,7 +2880,7 @@ var CardSimulado = forwardRef6(
|
|
|
3140
2880
|
);
|
|
3141
2881
|
}
|
|
3142
2882
|
);
|
|
3143
|
-
var CardTest =
|
|
2883
|
+
var CardTest = forwardRef5(
|
|
3144
2884
|
({
|
|
3145
2885
|
title,
|
|
3146
2886
|
duration,
|
|
@@ -3172,7 +2912,7 @@ var CardTest = forwardRef6(
|
|
|
3172
2912
|
const interactiveClasses = isSelectable ? "cursor-pointer focus:outline-none focus:ring-2 focus:ring-primary-950 focus:ring-offset-2" : "";
|
|
3173
2913
|
const selectedClasses = selected ? "ring-2 ring-primary-950 ring-offset-2" : "";
|
|
3174
2914
|
if (isSelectable) {
|
|
3175
|
-
return /* @__PURE__ */
|
|
2915
|
+
return /* @__PURE__ */ jsx14(
|
|
3176
2916
|
"button",
|
|
3177
2917
|
{
|
|
3178
2918
|
ref,
|
|
@@ -3184,8 +2924,8 @@ var CardTest = forwardRef6(
|
|
|
3184
2924
|
onKeyDown: handleKeyDown,
|
|
3185
2925
|
"aria-pressed": selected,
|
|
3186
2926
|
...props,
|
|
3187
|
-
children: /* @__PURE__ */
|
|
3188
|
-
/* @__PURE__ */
|
|
2927
|
+
children: /* @__PURE__ */ jsxs10("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
2928
|
+
/* @__PURE__ */ jsx14(
|
|
3189
2929
|
Text_default,
|
|
3190
2930
|
{
|
|
3191
2931
|
size: "md",
|
|
@@ -3194,10 +2934,10 @@ var CardTest = forwardRef6(
|
|
|
3194
2934
|
children: title
|
|
3195
2935
|
}
|
|
3196
2936
|
),
|
|
3197
|
-
/* @__PURE__ */
|
|
3198
|
-
duration && /* @__PURE__ */
|
|
3199
|
-
/* @__PURE__ */
|
|
3200
|
-
/* @__PURE__ */
|
|
2937
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
2938
|
+
duration && /* @__PURE__ */ jsxs10("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
2939
|
+
/* @__PURE__ */ jsx14(Clock, { size: 16, className: "text-text-700" }),
|
|
2940
|
+
/* @__PURE__ */ jsx14(
|
|
3201
2941
|
Text_default,
|
|
3202
2942
|
{
|
|
3203
2943
|
size: "sm",
|
|
@@ -3206,7 +2946,7 @@ var CardTest = forwardRef6(
|
|
|
3206
2946
|
}
|
|
3207
2947
|
)
|
|
3208
2948
|
] }),
|
|
3209
|
-
/* @__PURE__ */
|
|
2949
|
+
/* @__PURE__ */ jsx14(
|
|
3210
2950
|
Text_default,
|
|
3211
2951
|
{
|
|
3212
2952
|
size: "sm",
|
|
@@ -3219,14 +2959,14 @@ var CardTest = forwardRef6(
|
|
|
3219
2959
|
}
|
|
3220
2960
|
);
|
|
3221
2961
|
}
|
|
3222
|
-
return /* @__PURE__ */
|
|
2962
|
+
return /* @__PURE__ */ jsx14(
|
|
3223
2963
|
"div",
|
|
3224
2964
|
{
|
|
3225
2965
|
ref,
|
|
3226
2966
|
className: cn(`${baseClasses} ${className}`.trim()),
|
|
3227
2967
|
...props,
|
|
3228
|
-
children: /* @__PURE__ */
|
|
3229
|
-
/* @__PURE__ */
|
|
2968
|
+
children: /* @__PURE__ */ jsxs10("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
2969
|
+
/* @__PURE__ */ jsx14(
|
|
3230
2970
|
Text_default,
|
|
3231
2971
|
{
|
|
3232
2972
|
size: "md",
|
|
@@ -3235,10 +2975,10 @@ var CardTest = forwardRef6(
|
|
|
3235
2975
|
children: title
|
|
3236
2976
|
}
|
|
3237
2977
|
),
|
|
3238
|
-
/* @__PURE__ */
|
|
3239
|
-
duration && /* @__PURE__ */
|
|
3240
|
-
/* @__PURE__ */
|
|
3241
|
-
/* @__PURE__ */
|
|
2978
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
2979
|
+
duration && /* @__PURE__ */ jsxs10("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
2980
|
+
/* @__PURE__ */ jsx14(Clock, { size: 16, className: "text-text-700" }),
|
|
2981
|
+
/* @__PURE__ */ jsx14(
|
|
3242
2982
|
Text_default,
|
|
3243
2983
|
{
|
|
3244
2984
|
size: "sm",
|
|
@@ -3247,7 +2987,7 @@ var CardTest = forwardRef6(
|
|
|
3247
2987
|
}
|
|
3248
2988
|
)
|
|
3249
2989
|
] }),
|
|
3250
|
-
/* @__PURE__ */
|
|
2990
|
+
/* @__PURE__ */ jsx14(
|
|
3251
2991
|
Text_default,
|
|
3252
2992
|
{
|
|
3253
2993
|
size: "sm",
|
|
@@ -3283,15 +3023,15 @@ var SIMULATION_TYPE_STYLES = {
|
|
|
3283
3023
|
text: "Vestibular"
|
|
3284
3024
|
}
|
|
3285
3025
|
};
|
|
3286
|
-
var CardSimulationHistory =
|
|
3287
|
-
return /* @__PURE__ */
|
|
3026
|
+
var CardSimulationHistory = forwardRef5(({ data, onSimulationClick, className, ...props }, ref) => {
|
|
3027
|
+
return /* @__PURE__ */ jsx14(
|
|
3288
3028
|
"div",
|
|
3289
3029
|
{
|
|
3290
3030
|
ref,
|
|
3291
3031
|
className: cn("w-full max-w-[992px] h-auto", className),
|
|
3292
3032
|
...props,
|
|
3293
|
-
children: /* @__PURE__ */
|
|
3294
|
-
data.map((section, sectionIndex) => /* @__PURE__ */
|
|
3033
|
+
children: /* @__PURE__ */ jsxs10("div", { className: "flex flex-col gap-0", children: [
|
|
3034
|
+
data.map((section, sectionIndex) => /* @__PURE__ */ jsx14("div", { className: "flex flex-col", children: /* @__PURE__ */ jsxs10(
|
|
3295
3035
|
"div",
|
|
3296
3036
|
{
|
|
3297
3037
|
className: cn(
|
|
@@ -3299,7 +3039,7 @@ var CardSimulationHistory = forwardRef6(({ data, onSimulationClick, className, .
|
|
|
3299
3039
|
sectionIndex === 0 ? "rounded-t-3xl" : ""
|
|
3300
3040
|
),
|
|
3301
3041
|
children: [
|
|
3302
|
-
/* @__PURE__ */
|
|
3042
|
+
/* @__PURE__ */ jsx14(
|
|
3303
3043
|
Text_default,
|
|
3304
3044
|
{
|
|
3305
3045
|
size: "xs",
|
|
@@ -3308,9 +3048,9 @@ var CardSimulationHistory = forwardRef6(({ data, onSimulationClick, className, .
|
|
|
3308
3048
|
children: section.date
|
|
3309
3049
|
}
|
|
3310
3050
|
),
|
|
3311
|
-
/* @__PURE__ */
|
|
3051
|
+
/* @__PURE__ */ jsx14("div", { className: "flex flex-col gap-2 flex-1", children: section.simulations.map((simulation) => {
|
|
3312
3052
|
const typeStyles = SIMULATION_TYPE_STYLES[simulation.type];
|
|
3313
|
-
return /* @__PURE__ */
|
|
3053
|
+
return /* @__PURE__ */ jsx14(
|
|
3314
3054
|
CardBase,
|
|
3315
3055
|
{
|
|
3316
3056
|
layout: "horizontal",
|
|
@@ -3322,9 +3062,9 @@ var CardSimulationHistory = forwardRef6(({ data, onSimulationClick, className, .
|
|
|
3322
3062
|
transition-shadow duration-200 h-auto min-h-[61px]`
|
|
3323
3063
|
),
|
|
3324
3064
|
onClick: () => onSimulationClick?.(simulation),
|
|
3325
|
-
children: /* @__PURE__ */
|
|
3326
|
-
/* @__PURE__ */
|
|
3327
|
-
/* @__PURE__ */
|
|
3065
|
+
children: /* @__PURE__ */ jsxs10("div", { className: "flex justify-between items-center w-full gap-2", children: [
|
|
3066
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex flex-wrap flex-col justify-between sm:flex-row gap-2 flex-1 min-w-0", children: [
|
|
3067
|
+
/* @__PURE__ */ jsx14(
|
|
3328
3068
|
Text_default,
|
|
3329
3069
|
{
|
|
3330
3070
|
size: "lg",
|
|
@@ -3333,8 +3073,8 @@ var CardSimulationHistory = forwardRef6(({ data, onSimulationClick, className, .
|
|
|
3333
3073
|
children: simulation.title
|
|
3334
3074
|
}
|
|
3335
3075
|
),
|
|
3336
|
-
/* @__PURE__ */
|
|
3337
|
-
/* @__PURE__ */
|
|
3076
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-2", children: [
|
|
3077
|
+
/* @__PURE__ */ jsx14(
|
|
3338
3078
|
Badge_default,
|
|
3339
3079
|
{
|
|
3340
3080
|
variant: "examsOutlined",
|
|
@@ -3343,10 +3083,10 @@ var CardSimulationHistory = forwardRef6(({ data, onSimulationClick, className, .
|
|
|
3343
3083
|
children: typeStyles.text
|
|
3344
3084
|
}
|
|
3345
3085
|
),
|
|
3346
|
-
/* @__PURE__ */
|
|
3086
|
+
/* @__PURE__ */ jsx14(Text_default, { size: "sm", className: "text-text-800 truncate", children: simulation.info })
|
|
3347
3087
|
] })
|
|
3348
3088
|
] }),
|
|
3349
|
-
/* @__PURE__ */
|
|
3089
|
+
/* @__PURE__ */ jsx14(
|
|
3350
3090
|
CaretRight,
|
|
3351
3091
|
{
|
|
3352
3092
|
size: 24,
|
|
@@ -3362,7 +3102,7 @@ var CardSimulationHistory = forwardRef6(({ data, onSimulationClick, className, .
|
|
|
3362
3102
|
]
|
|
3363
3103
|
}
|
|
3364
3104
|
) }, section.date)),
|
|
3365
|
-
data.length > 0 && /* @__PURE__ */
|
|
3105
|
+
data.length > 0 && /* @__PURE__ */ jsx14("div", { className: "w-full h-6 bg-background rounded-b-3xl" })
|
|
3366
3106
|
] })
|
|
3367
3107
|
}
|
|
3368
3108
|
);
|
|
@@ -3370,8 +3110,8 @@ var CardSimulationHistory = forwardRef6(({ data, onSimulationClick, className, .
|
|
|
3370
3110
|
|
|
3371
3111
|
// src/components/Accordation/Accordation.tsx
|
|
3372
3112
|
import { CaretRight as CaretRight2 } from "phosphor-react";
|
|
3373
|
-
import { jsx as
|
|
3374
|
-
var CardAccordation =
|
|
3113
|
+
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3114
|
+
var CardAccordation = forwardRef6(
|
|
3375
3115
|
({
|
|
3376
3116
|
trigger,
|
|
3377
3117
|
children,
|
|
@@ -3385,8 +3125,8 @@ var CardAccordation = forwardRef7(
|
|
|
3385
3125
|
contentClassName,
|
|
3386
3126
|
...props
|
|
3387
3127
|
}, ref) => {
|
|
3388
|
-
const [internalExpanded, setInternalExpanded] =
|
|
3389
|
-
const generatedId =
|
|
3128
|
+
const [internalExpanded, setInternalExpanded] = useState4(defaultExpanded);
|
|
3129
|
+
const generatedId = useId4();
|
|
3390
3130
|
const contentId = value ? `accordion-content-${value}` : generatedId;
|
|
3391
3131
|
const headerId = value ? `accordion-header-${value}` : `${generatedId}-header`;
|
|
3392
3132
|
const isControlled = controlledExpanded !== void 0;
|
|
@@ -3411,7 +3151,7 @@ var CardAccordation = forwardRef7(
|
|
|
3411
3151
|
handleToggle();
|
|
3412
3152
|
}
|
|
3413
3153
|
};
|
|
3414
|
-
return /* @__PURE__ */
|
|
3154
|
+
return /* @__PURE__ */ jsxs11(
|
|
3415
3155
|
CardBase,
|
|
3416
3156
|
{
|
|
3417
3157
|
ref,
|
|
@@ -3421,7 +3161,7 @@ var CardAccordation = forwardRef7(
|
|
|
3421
3161
|
className: cn("overflow-hidden", className),
|
|
3422
3162
|
...props,
|
|
3423
3163
|
children: [
|
|
3424
|
-
/* @__PURE__ */
|
|
3164
|
+
/* @__PURE__ */ jsxs11(
|
|
3425
3165
|
"button",
|
|
3426
3166
|
{
|
|
3427
3167
|
id: headerId,
|
|
@@ -3440,7 +3180,7 @@ var CardAccordation = forwardRef7(
|
|
|
3440
3180
|
"data-value": value,
|
|
3441
3181
|
children: [
|
|
3442
3182
|
trigger,
|
|
3443
|
-
/* @__PURE__ */
|
|
3183
|
+
/* @__PURE__ */ jsx15(
|
|
3444
3184
|
CaretRight2,
|
|
3445
3185
|
{
|
|
3446
3186
|
size: 20,
|
|
@@ -3455,7 +3195,7 @@ var CardAccordation = forwardRef7(
|
|
|
3455
3195
|
]
|
|
3456
3196
|
}
|
|
3457
3197
|
),
|
|
3458
|
-
/* @__PURE__ */
|
|
3198
|
+
/* @__PURE__ */ jsx15(
|
|
3459
3199
|
"section",
|
|
3460
3200
|
{
|
|
3461
3201
|
id: contentId,
|
|
@@ -3467,7 +3207,7 @@ var CardAccordation = forwardRef7(
|
|
|
3467
3207
|
),
|
|
3468
3208
|
"data-testid": "accordion-content",
|
|
3469
3209
|
"data-value": value,
|
|
3470
|
-
children: /* @__PURE__ */
|
|
3210
|
+
children: /* @__PURE__ */ jsx15("div", { className: cn("p-4 pt-0", contentClassName), children })
|
|
3471
3211
|
}
|
|
3472
3212
|
)
|
|
3473
3213
|
]
|
|
@@ -3477,21 +3217,316 @@ var CardAccordation = forwardRef7(
|
|
|
3477
3217
|
);
|
|
3478
3218
|
CardAccordation.displayName = "CardAccordation";
|
|
3479
3219
|
|
|
3480
|
-
// src/
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3220
|
+
// src/components/Alternative/Alternative.tsx
|
|
3221
|
+
import { CheckCircle as CheckCircle2, XCircle as XCircle2 } from "phosphor-react";
|
|
3222
|
+
import { forwardRef as forwardRef7, useId as useId5, useState as useState5 } from "react";
|
|
3223
|
+
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3224
|
+
var AlternativesList = ({
|
|
3225
|
+
alternatives,
|
|
3226
|
+
name,
|
|
3227
|
+
defaultValue,
|
|
3228
|
+
value,
|
|
3229
|
+
onValueChange,
|
|
3230
|
+
disabled = false,
|
|
3231
|
+
layout = "default",
|
|
3232
|
+
className = "",
|
|
3233
|
+
mode = "interactive",
|
|
3234
|
+
selectedValue
|
|
3235
|
+
}) => {
|
|
3236
|
+
const uniqueId = useId5();
|
|
3237
|
+
const groupName = name || `alternatives-${uniqueId}`;
|
|
3238
|
+
const [actualValue, setActualValue] = useState5(value);
|
|
3239
|
+
const isReadonly = mode === "readonly";
|
|
3240
|
+
const getStatusStyles2 = (status, isReadonly2) => {
|
|
3241
|
+
const hoverClass = isReadonly2 ? "" : "hover:bg-background-50";
|
|
3242
|
+
switch (status) {
|
|
3243
|
+
case "correct":
|
|
3244
|
+
return "bg-success-background border-success-300";
|
|
3245
|
+
case "incorrect":
|
|
3246
|
+
return "bg-error-background border-error-300";
|
|
3247
|
+
default:
|
|
3248
|
+
return `bg-background border-border-100 ${hoverClass}`;
|
|
3249
|
+
}
|
|
3250
|
+
};
|
|
3251
|
+
const getStatusBadge2 = (status) => {
|
|
3252
|
+
switch (status) {
|
|
3253
|
+
case "correct":
|
|
3254
|
+
return /* @__PURE__ */ jsx16(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx16(CheckCircle2, {}), children: "Resposta correta" });
|
|
3255
|
+
case "incorrect":
|
|
3256
|
+
return /* @__PURE__ */ jsx16(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx16(XCircle2, {}), children: "Resposta incorreta" });
|
|
3257
|
+
default:
|
|
3258
|
+
return null;
|
|
3259
|
+
}
|
|
3260
|
+
};
|
|
3261
|
+
const getLayoutClasses = () => {
|
|
3262
|
+
switch (layout) {
|
|
3263
|
+
case "compact":
|
|
3264
|
+
return "gap-2";
|
|
3265
|
+
case "detailed":
|
|
3266
|
+
return "gap-4";
|
|
3267
|
+
default:
|
|
3268
|
+
return "gap-3.5";
|
|
3269
|
+
}
|
|
3270
|
+
};
|
|
3271
|
+
const renderReadonlyAlternative = (alternative) => {
|
|
3272
|
+
const alternativeId = alternative.value;
|
|
3273
|
+
const isUserSelected = selectedValue === alternative.value;
|
|
3274
|
+
const isCorrectAnswer = alternative.status === "correct";
|
|
3275
|
+
let displayStatus = void 0;
|
|
3276
|
+
if (isUserSelected && !isCorrectAnswer) {
|
|
3277
|
+
displayStatus = "incorrect";
|
|
3278
|
+
} else if (isCorrectAnswer) {
|
|
3279
|
+
displayStatus = "correct";
|
|
3280
|
+
}
|
|
3281
|
+
const statusStyles = getStatusStyles2(displayStatus, true);
|
|
3282
|
+
const statusBadge = getStatusBadge2(displayStatus);
|
|
3283
|
+
const renderRadio = () => {
|
|
3284
|
+
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"}`;
|
|
3285
|
+
const dotClasses = "w-3 h-3 rounded-full bg-primary-950 transition-all duration-200";
|
|
3286
|
+
return /* @__PURE__ */ jsx16("div", { className: radioClasses, children: isUserSelected && /* @__PURE__ */ jsx16("div", { className: dotClasses }) });
|
|
3287
|
+
};
|
|
3288
|
+
if (layout === "detailed") {
|
|
3289
|
+
return /* @__PURE__ */ jsx16(
|
|
3290
|
+
"div",
|
|
3291
|
+
{
|
|
3292
|
+
className: cn(
|
|
3293
|
+
"border-2 rounded-lg p-4 w-full",
|
|
3294
|
+
statusStyles,
|
|
3295
|
+
alternative.disabled ? "opacity-50" : ""
|
|
3296
|
+
),
|
|
3297
|
+
children: /* @__PURE__ */ jsxs12("div", { className: "flex items-start justify-between gap-3", children: [
|
|
3298
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
3299
|
+
/* @__PURE__ */ jsx16("div", { className: "mt-1", children: renderRadio() }),
|
|
3300
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex-1", children: [
|
|
3301
|
+
/* @__PURE__ */ jsx16(
|
|
3302
|
+
"p",
|
|
3303
|
+
{
|
|
3304
|
+
className: cn(
|
|
3305
|
+
"block font-medium",
|
|
3306
|
+
selectedValue === alternative.value || statusBadge ? "text-text-950" : "text-text-600"
|
|
3307
|
+
),
|
|
3308
|
+
children: alternative.label
|
|
3309
|
+
}
|
|
3310
|
+
),
|
|
3311
|
+
alternative.description && /* @__PURE__ */ jsx16("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
|
|
3312
|
+
] })
|
|
3313
|
+
] }),
|
|
3314
|
+
statusBadge && /* @__PURE__ */ jsx16("div", { className: "flex-shrink-0", children: statusBadge })
|
|
3315
|
+
] })
|
|
3316
|
+
},
|
|
3317
|
+
alternativeId
|
|
3318
|
+
);
|
|
3319
|
+
}
|
|
3320
|
+
return /* @__PURE__ */ jsxs12(
|
|
3321
|
+
"div",
|
|
3322
|
+
{
|
|
3323
|
+
className: cn(
|
|
3324
|
+
"flex flex-row justify-between items-start gap-2 p-2 rounded-lg w-full",
|
|
3325
|
+
statusStyles,
|
|
3326
|
+
alternative.disabled ? "opacity-50" : ""
|
|
3327
|
+
),
|
|
3328
|
+
children: [
|
|
3329
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
3330
|
+
renderRadio(),
|
|
3331
|
+
/* @__PURE__ */ jsx16(
|
|
3332
|
+
"span",
|
|
3333
|
+
{
|
|
3334
|
+
className: cn(
|
|
3335
|
+
"flex-1",
|
|
3336
|
+
selectedValue === alternative.value || statusBadge ? "text-text-950" : "text-text-600"
|
|
3337
|
+
),
|
|
3338
|
+
children: alternative.label
|
|
3339
|
+
}
|
|
3340
|
+
)
|
|
3341
|
+
] }),
|
|
3342
|
+
statusBadge && /* @__PURE__ */ jsx16("div", { className: "flex-shrink-0", children: statusBadge })
|
|
3343
|
+
]
|
|
3344
|
+
},
|
|
3345
|
+
alternativeId
|
|
3346
|
+
);
|
|
3347
|
+
};
|
|
3348
|
+
if (isReadonly) {
|
|
3349
|
+
return /* @__PURE__ */ jsx16(
|
|
3350
|
+
"div",
|
|
3351
|
+
{
|
|
3352
|
+
className: cn("flex flex-col", getLayoutClasses(), "w-full", className),
|
|
3353
|
+
children: alternatives.map(
|
|
3354
|
+
(alternative) => renderReadonlyAlternative(alternative)
|
|
3355
|
+
)
|
|
3356
|
+
}
|
|
3357
|
+
);
|
|
3358
|
+
}
|
|
3359
|
+
return /* @__PURE__ */ jsx16(
|
|
3360
|
+
RadioGroup,
|
|
3361
|
+
{
|
|
3362
|
+
name: groupName,
|
|
3363
|
+
defaultValue,
|
|
3364
|
+
value,
|
|
3365
|
+
onValueChange: (value2) => {
|
|
3366
|
+
setActualValue(value2);
|
|
3367
|
+
onValueChange?.(value2);
|
|
3368
|
+
},
|
|
3369
|
+
disabled,
|
|
3370
|
+
className: cn("flex flex-col", getLayoutClasses(), className),
|
|
3371
|
+
children: alternatives.map((alternative, index) => {
|
|
3372
|
+
const alternativeId = alternative.value || `alt-${index}`;
|
|
3373
|
+
const statusStyles = getStatusStyles2(alternative.status, false);
|
|
3374
|
+
const statusBadge = getStatusBadge2(alternative.status);
|
|
3375
|
+
if (layout === "detailed") {
|
|
3376
|
+
return /* @__PURE__ */ jsx16(
|
|
3377
|
+
"div",
|
|
3378
|
+
{
|
|
3379
|
+
className: cn(
|
|
3380
|
+
"border-2 rounded-lg p-4 transition-all",
|
|
3381
|
+
statusStyles,
|
|
3382
|
+
alternative.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
3383
|
+
),
|
|
3384
|
+
children: /* @__PURE__ */ jsxs12("div", { className: "flex items-start justify-between gap-3", children: [
|
|
3385
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
3386
|
+
/* @__PURE__ */ jsx16(
|
|
3387
|
+
RadioGroupItem,
|
|
3388
|
+
{
|
|
3389
|
+
value: alternative.value,
|
|
3390
|
+
id: alternativeId,
|
|
3391
|
+
disabled: alternative.disabled,
|
|
3392
|
+
className: "mt-1"
|
|
3393
|
+
}
|
|
3394
|
+
),
|
|
3395
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex-1", children: [
|
|
3396
|
+
/* @__PURE__ */ jsx16(
|
|
3397
|
+
"label",
|
|
3398
|
+
{
|
|
3399
|
+
htmlFor: alternativeId,
|
|
3400
|
+
className: cn(
|
|
3401
|
+
"block font-medium",
|
|
3402
|
+
actualValue === alternative.value ? "text-text-950" : "text-text-600",
|
|
3403
|
+
alternative.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
3404
|
+
),
|
|
3405
|
+
children: alternative.label
|
|
3406
|
+
}
|
|
3407
|
+
),
|
|
3408
|
+
alternative.description && /* @__PURE__ */ jsx16("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
|
|
3409
|
+
] })
|
|
3410
|
+
] }),
|
|
3411
|
+
statusBadge && /* @__PURE__ */ jsx16("div", { className: "flex-shrink-0", children: statusBadge })
|
|
3412
|
+
] })
|
|
3413
|
+
},
|
|
3414
|
+
alternativeId
|
|
3415
|
+
);
|
|
3416
|
+
}
|
|
3417
|
+
return /* @__PURE__ */ jsxs12(
|
|
3418
|
+
"div",
|
|
3419
|
+
{
|
|
3420
|
+
className: cn(
|
|
3421
|
+
"flex flex-row justify-between gap-2 items-start p-2 rounded-lg transition-all",
|
|
3422
|
+
statusStyles,
|
|
3423
|
+
alternative.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
3424
|
+
),
|
|
3425
|
+
children: [
|
|
3426
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
3427
|
+
/* @__PURE__ */ jsx16(
|
|
3428
|
+
RadioGroupItem,
|
|
3429
|
+
{
|
|
3430
|
+
value: alternative.value,
|
|
3431
|
+
id: alternativeId,
|
|
3432
|
+
disabled: alternative.disabled
|
|
3433
|
+
}
|
|
3434
|
+
),
|
|
3435
|
+
/* @__PURE__ */ jsx16(
|
|
3436
|
+
"label",
|
|
3437
|
+
{
|
|
3438
|
+
htmlFor: alternativeId,
|
|
3439
|
+
className: cn(
|
|
3440
|
+
"flex-1",
|
|
3441
|
+
actualValue === alternative.value ? "text-text-950" : "text-text-600",
|
|
3442
|
+
alternative.disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
3443
|
+
),
|
|
3444
|
+
children: alternative.label
|
|
3445
|
+
}
|
|
3446
|
+
)
|
|
3447
|
+
] }),
|
|
3448
|
+
statusBadge && /* @__PURE__ */ jsx16("div", { className: "flex-shrink-0", children: statusBadge })
|
|
3449
|
+
]
|
|
3450
|
+
},
|
|
3451
|
+
alternativeId
|
|
3452
|
+
);
|
|
3453
|
+
})
|
|
3454
|
+
}
|
|
3455
|
+
);
|
|
3456
|
+
};
|
|
3457
|
+
var HeaderAlternative = forwardRef7(
|
|
3458
|
+
({ className, title, subTitle, content, ...props }, ref) => {
|
|
3459
|
+
return /* @__PURE__ */ jsxs12(
|
|
3460
|
+
"div",
|
|
3461
|
+
{
|
|
3462
|
+
ref,
|
|
3463
|
+
className: cn(
|
|
3464
|
+
"bg-background p-4 flex flex-col gap-4 rounded-xl",
|
|
3465
|
+
className
|
|
3466
|
+
),
|
|
3467
|
+
...props,
|
|
3468
|
+
children: [
|
|
3469
|
+
/* @__PURE__ */ jsxs12("span", { className: "flex flex-col", children: [
|
|
3470
|
+
/* @__PURE__ */ jsx16("p", { className: "text-text-950 font-bold text-lg", children: title }),
|
|
3471
|
+
/* @__PURE__ */ jsx16("p", { className: "text-text-700 text-sm ", children: subTitle })
|
|
3472
|
+
] }),
|
|
3473
|
+
/* @__PURE__ */ jsx16("p", { className: "text-text-950 text-md", children: content })
|
|
3474
|
+
]
|
|
3475
|
+
}
|
|
3476
|
+
);
|
|
3477
|
+
}
|
|
3478
|
+
);
|
|
3479
|
+
|
|
3480
|
+
// src/utils/questionRenderer/alternative/index.tsx
|
|
3481
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
3482
|
+
var renderQuestionAlternative = ({
|
|
3483
|
+
question,
|
|
3484
|
+
result
|
|
3485
|
+
}) => {
|
|
3486
|
+
const alternatives = question.options?.map((option) => {
|
|
3487
|
+
const isCorrectOption = result?.options?.find((op) => op.id === option.id)?.isCorrect || false;
|
|
3488
|
+
const isSelected = result?.selectedOptions?.some(
|
|
3489
|
+
(selectedOption) => selectedOption.optionId === option.id
|
|
3490
|
+
) || false;
|
|
3491
|
+
const shouldShowCorrectAnswers = result?.answerStatus !== "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */;
|
|
3492
|
+
let status;
|
|
3493
|
+
if (shouldShowCorrectAnswers) {
|
|
3494
|
+
if (isCorrectOption) {
|
|
3495
|
+
status = "correct" /* CORRECT */;
|
|
3496
|
+
} else if (isSelected && !isCorrectOption) {
|
|
3497
|
+
status = "incorrect" /* INCORRECT */;
|
|
3498
|
+
} else {
|
|
3499
|
+
status = "neutral" /* NEUTRAL */;
|
|
3500
|
+
}
|
|
3501
|
+
} else {
|
|
3502
|
+
status = "neutral" /* NEUTRAL */;
|
|
3503
|
+
}
|
|
3504
|
+
return {
|
|
3505
|
+
label: option.option,
|
|
3506
|
+
value: option.id,
|
|
3507
|
+
status
|
|
3508
|
+
};
|
|
3509
|
+
});
|
|
3510
|
+
if (!alternatives || alternatives.length === 0) {
|
|
3511
|
+
return /* @__PURE__ */ jsx17("div", { children: /* @__PURE__ */ jsx17(Text_default, { size: "sm", weight: "normal", children: "N\xE3o h\xE1 Alternativas" }) });
|
|
3512
|
+
}
|
|
3513
|
+
return /* @__PURE__ */ jsx17("div", { className: "pt-2", children: /* @__PURE__ */ jsx17(
|
|
3514
|
+
AlternativesList,
|
|
3515
|
+
{
|
|
3516
|
+
mode: "readonly",
|
|
3517
|
+
name: `question-${question.id}`,
|
|
3518
|
+
layout: "compact",
|
|
3519
|
+
alternatives,
|
|
3520
|
+
selectedValue: result?.selectedOptions?.[0]?.optionId || ""
|
|
3521
|
+
},
|
|
3522
|
+
`question-${question.id}`
|
|
3523
|
+
) });
|
|
3489
3524
|
};
|
|
3490
3525
|
|
|
3491
3526
|
// src/components/MultipleChoice/MultipleChoice.tsx
|
|
3492
3527
|
import { useEffect as useEffect5, useState as useState6 } from "react";
|
|
3493
3528
|
import { CheckCircle as CheckCircle3, XCircle as XCircle3, Check as Check2 } from "phosphor-react";
|
|
3494
|
-
import { jsx as
|
|
3529
|
+
import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3495
3530
|
var MultipleChoiceList = ({
|
|
3496
3531
|
disabled = false,
|
|
3497
3532
|
className = "",
|
|
@@ -3505,17 +3540,17 @@ var MultipleChoiceList = ({
|
|
|
3505
3540
|
useEffect5(() => {
|
|
3506
3541
|
setActualValue(selectedValues);
|
|
3507
3542
|
}, [selectedValues]);
|
|
3508
|
-
const
|
|
3543
|
+
const getStatusBadge2 = (status) => {
|
|
3509
3544
|
switch (status) {
|
|
3510
3545
|
case "correct":
|
|
3511
|
-
return /* @__PURE__ */
|
|
3546
|
+
return /* @__PURE__ */ jsx18(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx18(CheckCircle3, {}), children: "Resposta correta" });
|
|
3512
3547
|
case "incorrect":
|
|
3513
|
-
return /* @__PURE__ */
|
|
3548
|
+
return /* @__PURE__ */ jsx18(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx18(XCircle3, {}), children: "Resposta incorreta" });
|
|
3514
3549
|
default:
|
|
3515
3550
|
return null;
|
|
3516
3551
|
}
|
|
3517
3552
|
};
|
|
3518
|
-
const
|
|
3553
|
+
const getStatusStyles2 = (status) => {
|
|
3519
3554
|
switch (status) {
|
|
3520
3555
|
case "correct":
|
|
3521
3556
|
return "bg-success-background border-success-300";
|
|
@@ -3531,13 +3566,13 @@ var MultipleChoiceList = ({
|
|
|
3531
3566
|
isSelected ? "border-primary-950 bg-primary-950 text-text" : "border-border-400 bg-background",
|
|
3532
3567
|
isDisabled && "opacity-40 cursor-not-allowed"
|
|
3533
3568
|
);
|
|
3534
|
-
return /* @__PURE__ */
|
|
3569
|
+
return /* @__PURE__ */ jsx18("div", { className: checkboxClasses, children: isSelected && /* @__PURE__ */ jsx18(Check2, { size: 16, weight: "bold" }) });
|
|
3535
3570
|
};
|
|
3536
3571
|
if (mode === "readonly") {
|
|
3537
|
-
return /* @__PURE__ */
|
|
3572
|
+
return /* @__PURE__ */ jsx18("div", { className: cn("flex flex-col gap-2", className), children: choices.map((choice, i) => {
|
|
3538
3573
|
const isSelected = actualValue?.includes(choice.value) || false;
|
|
3539
|
-
const statusStyles =
|
|
3540
|
-
const statusBadge =
|
|
3574
|
+
const statusStyles = getStatusStyles2(choice.status);
|
|
3575
|
+
const statusBadge = getStatusBadge2(choice.status);
|
|
3541
3576
|
return /* @__PURE__ */ jsxs13(
|
|
3542
3577
|
"div",
|
|
3543
3578
|
{
|
|
@@ -3549,7 +3584,7 @@ var MultipleChoiceList = ({
|
|
|
3549
3584
|
children: [
|
|
3550
3585
|
/* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
3551
3586
|
renderVisualCheckbox(isSelected, choice.disabled || disabled),
|
|
3552
|
-
/* @__PURE__ */
|
|
3587
|
+
/* @__PURE__ */ jsx18(
|
|
3553
3588
|
"span",
|
|
3554
3589
|
{
|
|
3555
3590
|
className: cn(
|
|
@@ -3561,14 +3596,14 @@ var MultipleChoiceList = ({
|
|
|
3561
3596
|
}
|
|
3562
3597
|
)
|
|
3563
3598
|
] }),
|
|
3564
|
-
statusBadge && /* @__PURE__ */
|
|
3599
|
+
statusBadge && /* @__PURE__ */ jsx18("div", { className: "flex-shrink-0", children: statusBadge })
|
|
3565
3600
|
]
|
|
3566
3601
|
},
|
|
3567
3602
|
`readonly-${choice.value}-${i}`
|
|
3568
3603
|
);
|
|
3569
3604
|
}) });
|
|
3570
3605
|
}
|
|
3571
|
-
return /* @__PURE__ */
|
|
3606
|
+
return /* @__PURE__ */ jsx18(
|
|
3572
3607
|
"div",
|
|
3573
3608
|
{
|
|
3574
3609
|
className: cn(
|
|
@@ -3576,7 +3611,7 @@ var MultipleChoiceList = ({
|
|
|
3576
3611
|
disabled ? "opacity-50 cursor-not-allowed" : "",
|
|
3577
3612
|
className
|
|
3578
3613
|
),
|
|
3579
|
-
children: /* @__PURE__ */
|
|
3614
|
+
children: /* @__PURE__ */ jsx18(
|
|
3580
3615
|
CheckboxList_default,
|
|
3581
3616
|
{
|
|
3582
3617
|
name,
|
|
@@ -3591,7 +3626,7 @@ var MultipleChoiceList = ({
|
|
|
3591
3626
|
{
|
|
3592
3627
|
className: "flex flex-row gap-2 items-center",
|
|
3593
3628
|
children: [
|
|
3594
|
-
/* @__PURE__ */
|
|
3629
|
+
/* @__PURE__ */ jsx18(
|
|
3595
3630
|
CheckboxListItem,
|
|
3596
3631
|
{
|
|
3597
3632
|
value: choice.value,
|
|
@@ -3599,7 +3634,7 @@ var MultipleChoiceList = ({
|
|
|
3599
3634
|
disabled: choice.disabled || disabled
|
|
3600
3635
|
}
|
|
3601
3636
|
),
|
|
3602
|
-
/* @__PURE__ */
|
|
3637
|
+
/* @__PURE__ */ jsx18(
|
|
3603
3638
|
"label",
|
|
3604
3639
|
{
|
|
3605
3640
|
htmlFor: `interactive-${choice.value}-${i}`,
|
|
@@ -3621,33 +3656,589 @@ var MultipleChoiceList = ({
|
|
|
3621
3656
|
);
|
|
3622
3657
|
};
|
|
3623
3658
|
|
|
3624
|
-
// src/utils/questionRenderer.
|
|
3659
|
+
// src/utils/questionRenderer/multipleChoice/index.tsx
|
|
3660
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
3661
|
+
var renderQuestionMultipleChoice = ({
|
|
3662
|
+
question,
|
|
3663
|
+
result
|
|
3664
|
+
}) => {
|
|
3665
|
+
const choices = question.options?.map((option) => {
|
|
3666
|
+
const isCorrectOption = result?.options?.find((op) => op.id === option.id)?.isCorrect || false;
|
|
3667
|
+
const isSelected = result?.selectedOptions?.some(
|
|
3668
|
+
(op) => op.optionId === option.id
|
|
3669
|
+
);
|
|
3670
|
+
const shouldShowCorrectAnswers = result?.answerStatus !== "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */ && result?.answerStatus !== "NAO_RESPONDIDO" /* NAO_RESPONDIDO */;
|
|
3671
|
+
let status;
|
|
3672
|
+
if (shouldShowCorrectAnswers) {
|
|
3673
|
+
if (isCorrectOption) {
|
|
3674
|
+
status = "correct" /* CORRECT */;
|
|
3675
|
+
} else if (isSelected && !isCorrectOption) {
|
|
3676
|
+
status = "incorrect" /* INCORRECT */;
|
|
3677
|
+
} else {
|
|
3678
|
+
status = "neutral" /* NEUTRAL */;
|
|
3679
|
+
}
|
|
3680
|
+
} else {
|
|
3681
|
+
status = "neutral" /* NEUTRAL */;
|
|
3682
|
+
}
|
|
3683
|
+
return {
|
|
3684
|
+
label: option.option,
|
|
3685
|
+
value: option.id,
|
|
3686
|
+
status
|
|
3687
|
+
};
|
|
3688
|
+
});
|
|
3689
|
+
if (!choices || choices.length === 0) {
|
|
3690
|
+
return /* @__PURE__ */ jsx19("div", { children: /* @__PURE__ */ jsx19(Text_default, { size: "sm", weight: "normal", children: "N\xE3o h\xE1 Escolhas M\xFAltiplas" }) });
|
|
3691
|
+
}
|
|
3692
|
+
const selectedValues = result?.selectedOptions?.map((op) => op.optionId) || [];
|
|
3693
|
+
return /* @__PURE__ */ jsx19("div", { className: "pt-2", children: /* @__PURE__ */ jsx19(
|
|
3694
|
+
MultipleChoiceList,
|
|
3695
|
+
{
|
|
3696
|
+
mode: "readonly",
|
|
3697
|
+
name: `question-${question.id}`,
|
|
3698
|
+
choices,
|
|
3699
|
+
selectedValues
|
|
3700
|
+
},
|
|
3701
|
+
`question-${question.id}`
|
|
3702
|
+
) });
|
|
3703
|
+
};
|
|
3704
|
+
|
|
3705
|
+
// src/components/Quiz/QuizContent.tsx
|
|
3706
|
+
import {
|
|
3707
|
+
forwardRef as forwardRef8,
|
|
3708
|
+
useCallback,
|
|
3709
|
+
useEffect as useEffect6,
|
|
3710
|
+
useId as useId6,
|
|
3711
|
+
useMemo,
|
|
3712
|
+
useRef as useRef4,
|
|
3713
|
+
useState as useState7
|
|
3714
|
+
} from "react";
|
|
3715
|
+
import { CheckCircle as CheckCircle4, XCircle as XCircle4 } from "phosphor-react";
|
|
3716
|
+
|
|
3717
|
+
// src/assets/img/mock-image-question.png
|
|
3718
|
+
var mock_image_question_default = "../mock-image-question-HEZCLFDL.png";
|
|
3719
|
+
|
|
3720
|
+
// src/components/Quiz/QuizContent.tsx
|
|
3721
|
+
import { Fragment as Fragment5, jsx as jsx20, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3722
|
+
var getStatusStyles = (variantCorrect) => {
|
|
3723
|
+
switch (variantCorrect) {
|
|
3724
|
+
case "correct":
|
|
3725
|
+
return "bg-success-background border-success-300";
|
|
3726
|
+
case "incorrect":
|
|
3727
|
+
return "bg-error-background border-error-300";
|
|
3728
|
+
default:
|
|
3729
|
+
return "";
|
|
3730
|
+
}
|
|
3731
|
+
};
|
|
3732
|
+
var QuizSubTitle = forwardRef8(
|
|
3733
|
+
({ subTitle, ...props }, ref) => {
|
|
3734
|
+
return /* @__PURE__ */ jsx20("div", { className: "px-4 pb-2 pt-6", ...props, ref, children: /* @__PURE__ */ jsx20("p", { className: "font-bold text-lg text-text-950", children: subTitle }) });
|
|
3735
|
+
}
|
|
3736
|
+
);
|
|
3737
|
+
var QuizContainer = forwardRef8(({ children, className, ...props }, ref) => {
|
|
3738
|
+
return /* @__PURE__ */ jsx20(
|
|
3739
|
+
"div",
|
|
3740
|
+
{
|
|
3741
|
+
ref,
|
|
3742
|
+
className: cn(
|
|
3743
|
+
"bg-background rounded-t-xl px-4 pt-4 pb-[80px] h-auto flex flex-col gap-4 mb-auto",
|
|
3744
|
+
className
|
|
3745
|
+
),
|
|
3746
|
+
...props,
|
|
3747
|
+
children
|
|
3748
|
+
}
|
|
3749
|
+
);
|
|
3750
|
+
});
|
|
3751
|
+
|
|
3752
|
+
// src/utils/questionRenderer/components/index.tsx
|
|
3753
|
+
import { useId as useId7 } from "react";
|
|
3754
|
+
import { CheckCircle as CheckCircle5, XCircle as XCircle5 } from "phosphor-react";
|
|
3755
|
+
import { jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3756
|
+
var getStatusBadge = (status) => {
|
|
3757
|
+
switch (status) {
|
|
3758
|
+
case "correct":
|
|
3759
|
+
return /* @__PURE__ */ jsx21(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx21(CheckCircle5, {}), children: "Resposta correta" });
|
|
3760
|
+
case "incorrect":
|
|
3761
|
+
return /* @__PURE__ */ jsx21(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx21(XCircle5, {}), children: "Resposta incorreta" });
|
|
3762
|
+
default:
|
|
3763
|
+
return null;
|
|
3764
|
+
}
|
|
3765
|
+
};
|
|
3766
|
+
var QuestionContainer = ({
|
|
3767
|
+
children,
|
|
3768
|
+
className
|
|
3769
|
+
}) => {
|
|
3770
|
+
return /* @__PURE__ */ jsx21(
|
|
3771
|
+
"div",
|
|
3772
|
+
{
|
|
3773
|
+
className: cn(
|
|
3774
|
+
"bg-background rounded-t-xl px-4 pt-4 pb-[80px] h-auto flex flex-col gap-4 mb-auto",
|
|
3775
|
+
className
|
|
3776
|
+
),
|
|
3777
|
+
children
|
|
3778
|
+
}
|
|
3779
|
+
);
|
|
3780
|
+
};
|
|
3781
|
+
var QuestionSubTitle = ({ subTitle }) => {
|
|
3782
|
+
return /* @__PURE__ */ jsx21("div", { className: "px-4 pb-2 pt-6", children: /* @__PURE__ */ jsx21(Text_default, { size: "md", weight: "bold", color: "text-text-950", children: subTitle }) });
|
|
3783
|
+
};
|
|
3784
|
+
var FillQuestionContent = ({
|
|
3785
|
+
question,
|
|
3786
|
+
result
|
|
3787
|
+
}) => {
|
|
3788
|
+
const text = question.statement || "";
|
|
3789
|
+
const baseId = useId7();
|
|
3790
|
+
const studentAnswers = {};
|
|
3791
|
+
try {
|
|
3792
|
+
if (result?.answer) {
|
|
3793
|
+
const parsed = typeof result.answer === "string" ? JSON.parse(result.answer) : result.answer;
|
|
3794
|
+
if (typeof parsed === "object") {
|
|
3795
|
+
Object.assign(studentAnswers, parsed);
|
|
3796
|
+
}
|
|
3797
|
+
}
|
|
3798
|
+
} catch (error) {
|
|
3799
|
+
console.error("Error parsing answer:", error);
|
|
3800
|
+
}
|
|
3801
|
+
const regex = /\{\{([\p{L}\p{M}\d_]+)\}\}/gu;
|
|
3802
|
+
const placeholders = [];
|
|
3803
|
+
let match;
|
|
3804
|
+
while ((match = regex.exec(text)) !== null) {
|
|
3805
|
+
placeholders.push(match[1]);
|
|
3806
|
+
}
|
|
3807
|
+
const correctAnswers = {};
|
|
3808
|
+
placeholders.forEach((placeholder) => {
|
|
3809
|
+
correctAnswers[placeholder] = studentAnswers[placeholder]?.correctAnswer || `[${placeholder}]`;
|
|
3810
|
+
});
|
|
3811
|
+
const addTextElement = (elements, textContent, elementCounter) => {
|
|
3812
|
+
if (textContent) {
|
|
3813
|
+
elements.push({
|
|
3814
|
+
element: textContent,
|
|
3815
|
+
id: `${baseId}-text-${++elementCounter.current}`
|
|
3816
|
+
});
|
|
3817
|
+
}
|
|
3818
|
+
};
|
|
3819
|
+
const renderGabaritoPlaceholder = (selectId, elementCounter) => {
|
|
3820
|
+
const correctAnswer = correctAnswers[selectId] || `[${selectId}]`;
|
|
3821
|
+
return {
|
|
3822
|
+
element: /* @__PURE__ */ jsx21(
|
|
3823
|
+
Text_default,
|
|
3824
|
+
{
|
|
3825
|
+
size: "md",
|
|
3826
|
+
weight: "semibold",
|
|
3827
|
+
color: "text-success-600",
|
|
3828
|
+
className: "inline-flex mb-2.5 border-b-2 border-success-600",
|
|
3829
|
+
children: correctAnswer
|
|
3830
|
+
},
|
|
3831
|
+
`${baseId}-gabarito-${selectId}`
|
|
3832
|
+
),
|
|
3833
|
+
id: `${baseId}-gabarito-${++elementCounter.current}`
|
|
3834
|
+
};
|
|
3835
|
+
};
|
|
3836
|
+
const renderStudentPlaceholder = (selectId, elementCounter) => {
|
|
3837
|
+
const studentAnswer = studentAnswers[selectId];
|
|
3838
|
+
if (!studentAnswer) {
|
|
3839
|
+
return {
|
|
3840
|
+
element: /* @__PURE__ */ jsx21(
|
|
3841
|
+
Text_default,
|
|
3842
|
+
{
|
|
3843
|
+
size: "md",
|
|
3844
|
+
weight: "normal",
|
|
3845
|
+
color: "text-text-400",
|
|
3846
|
+
className: "inline-flex mb-2.5 border-b-2 border-text-300",
|
|
3847
|
+
children: "[N\xE3o respondido]"
|
|
3848
|
+
},
|
|
3849
|
+
`${baseId}-no-answer-${selectId}`
|
|
3850
|
+
),
|
|
3851
|
+
id: `${baseId}-no-answer-${++elementCounter.current}`
|
|
3852
|
+
};
|
|
3853
|
+
}
|
|
3854
|
+
const isCorrect = studentAnswer.isCorrect;
|
|
3855
|
+
const colorClass = isCorrect ? "text-success-600 border-success-600" : "text-error-600 border-error-600";
|
|
3856
|
+
return {
|
|
3857
|
+
element: /* @__PURE__ */ jsx21(
|
|
3858
|
+
Badge_default,
|
|
3859
|
+
{
|
|
3860
|
+
variant: "solid",
|
|
3861
|
+
action: isCorrect ? "success" : "error",
|
|
3862
|
+
iconRight: isCorrect ? /* @__PURE__ */ jsx21(CheckCircle5, {}) : /* @__PURE__ */ jsx21(XCircle5, {}),
|
|
3863
|
+
size: "large",
|
|
3864
|
+
className: `py-3 w-[180px] justify-between mb-2.5 ${colorClass}`,
|
|
3865
|
+
children: /* @__PURE__ */ jsx21("span", { className: "text-text-900", children: studentAnswer.answer })
|
|
3866
|
+
},
|
|
3867
|
+
`${baseId}-answer-${selectId}`
|
|
3868
|
+
),
|
|
3869
|
+
id: `${baseId}-answer-${++elementCounter.current}`
|
|
3870
|
+
};
|
|
3871
|
+
};
|
|
3872
|
+
const renderTextWithAnswers = (isGabarito = false) => {
|
|
3873
|
+
const elements = [];
|
|
3874
|
+
let lastIndex = 0;
|
|
3875
|
+
const elementCounter = { current: 0 };
|
|
3876
|
+
regex.lastIndex = 0;
|
|
3877
|
+
while ((match = regex.exec(text)) !== null) {
|
|
3878
|
+
const [fullMatch, selectId] = match;
|
|
3879
|
+
const startIndex = match.index;
|
|
3880
|
+
if (startIndex > lastIndex) {
|
|
3881
|
+
addTextElement(
|
|
3882
|
+
elements,
|
|
3883
|
+
text.slice(lastIndex, startIndex),
|
|
3884
|
+
elementCounter
|
|
3885
|
+
);
|
|
3886
|
+
}
|
|
3887
|
+
const placeholderElement = isGabarito ? renderGabaritoPlaceholder(selectId, elementCounter) : renderStudentPlaceholder(selectId, elementCounter);
|
|
3888
|
+
elements.push(placeholderElement);
|
|
3889
|
+
lastIndex = match.index + fullMatch.length;
|
|
3890
|
+
}
|
|
3891
|
+
if (lastIndex < text.length) {
|
|
3892
|
+
addTextElement(elements, text.slice(lastIndex), elementCounter);
|
|
3893
|
+
}
|
|
3894
|
+
return elements;
|
|
3895
|
+
};
|
|
3896
|
+
return /* @__PURE__ */ jsxs15("div", { className: "pt-2 space-y-4", children: [
|
|
3897
|
+
/* @__PURE__ */ jsxs15("div", { className: "space-y-2", children: [
|
|
3898
|
+
/* @__PURE__ */ jsx21(Text_default, { size: "xs", weight: "normal", color: "text-text-500", children: "Resposta do aluno:" }),
|
|
3899
|
+
/* @__PURE__ */ jsx21("div", { className: "p-3 bg-background-50 rounded-lg border border-border-100", children: /* @__PURE__ */ jsx21("div", { className: "leading-8", children: renderTextWithAnswers(false).map((element) => /* @__PURE__ */ jsx21(
|
|
3900
|
+
Text_default,
|
|
3901
|
+
{
|
|
3902
|
+
size: "md",
|
|
3903
|
+
weight: "normal",
|
|
3904
|
+
color: "text-text-900",
|
|
3905
|
+
children: element.element
|
|
3906
|
+
},
|
|
3907
|
+
element.id
|
|
3908
|
+
)) }) })
|
|
3909
|
+
] }),
|
|
3910
|
+
/* @__PURE__ */ jsxs15("div", { className: "space-y-2", children: [
|
|
3911
|
+
/* @__PURE__ */ jsx21(Text_default, { size: "xs", weight: "normal", color: "text-text-500", children: "Gabarito:" }),
|
|
3912
|
+
/* @__PURE__ */ jsx21("div", { className: "p-3 bg-background-50 rounded-lg border border-border-100", children: /* @__PURE__ */ jsx21("div", { className: "leading-8", children: renderTextWithAnswers(true).map((element) => /* @__PURE__ */ jsx21(
|
|
3913
|
+
Text_default,
|
|
3914
|
+
{
|
|
3915
|
+
size: "md",
|
|
3916
|
+
weight: "normal",
|
|
3917
|
+
color: "text-text-900",
|
|
3918
|
+
children: element.element
|
|
3919
|
+
},
|
|
3920
|
+
element.id
|
|
3921
|
+
)) }) })
|
|
3922
|
+
] })
|
|
3923
|
+
] });
|
|
3924
|
+
};
|
|
3925
|
+
|
|
3926
|
+
// src/utils/questionRenderer/trueOrFalse/index.tsx
|
|
3927
|
+
import { jsx as jsx22, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3928
|
+
var renderQuestionTrueOrFalse = ({
|
|
3929
|
+
question,
|
|
3930
|
+
result
|
|
3931
|
+
}) => {
|
|
3932
|
+
const options = question.options || [];
|
|
3933
|
+
const getLetterByIndex = (index) => String.fromCodePoint(97 + index);
|
|
3934
|
+
const shouldShowStatus = result?.answerStatus !== "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */ && result?.answerStatus !== "NAO_RESPONDIDO" /* NAO_RESPONDIDO */;
|
|
3935
|
+
return /* @__PURE__ */ jsx22("div", { className: "pt-2", children: /* @__PURE__ */ jsx22("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
3936
|
+
const statementIsTrue = result?.options?.find((op) => op.id === option.id)?.isCorrect || false;
|
|
3937
|
+
const isSelected = result?.selectedOptions?.some(
|
|
3938
|
+
(op) => op.optionId === option.id
|
|
3939
|
+
);
|
|
3940
|
+
const isStudentCorrect = statementIsTrue === isSelected;
|
|
3941
|
+
const variantCorrect = statementIsTrue ? "correct" : "incorrect";
|
|
3942
|
+
const studentAnswer = isSelected ? "V" : "F";
|
|
3943
|
+
const correctAnswer = statementIsTrue ? "V" : "F";
|
|
3944
|
+
return /* @__PURE__ */ jsxs16(
|
|
3945
|
+
"section",
|
|
3946
|
+
{
|
|
3947
|
+
className: "flex flex-col gap-2",
|
|
3948
|
+
children: [
|
|
3949
|
+
/* @__PURE__ */ jsxs16(
|
|
3950
|
+
"div",
|
|
3951
|
+
{
|
|
3952
|
+
className: cn(
|
|
3953
|
+
"flex flex-row justify-between items-center gap-2 p-2 rounded-md border",
|
|
3954
|
+
shouldShowStatus ? getStatusStyles(variantCorrect) : ""
|
|
3955
|
+
),
|
|
3956
|
+
children: [
|
|
3957
|
+
/* @__PURE__ */ jsx22(Text_default, { size: "sm", weight: "normal", color: "text-text-900", children: getLetterByIndex(index).concat(") ").concat(option.option) }),
|
|
3958
|
+
shouldShowStatus && /* @__PURE__ */ jsx22("div", { className: "flex-shrink-0", children: getStatusBadge(isStudentCorrect ? "correct" : "incorrect") })
|
|
3959
|
+
]
|
|
3960
|
+
}
|
|
3961
|
+
),
|
|
3962
|
+
shouldShowStatus && /* @__PURE__ */ jsxs16("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
3963
|
+
/* @__PURE__ */ jsxs16(Text_default, { size: "2xs", weight: "normal", color: "text-text-800", children: [
|
|
3964
|
+
"Resposta selecionada: ",
|
|
3965
|
+
studentAnswer
|
|
3966
|
+
] }),
|
|
3967
|
+
!isStudentCorrect && /* @__PURE__ */ jsxs16(Text_default, { size: "2xs", weight: "normal", color: "text-text-800", children: [
|
|
3968
|
+
"Resposta correta: ",
|
|
3969
|
+
correctAnswer
|
|
3970
|
+
] })
|
|
3971
|
+
] })
|
|
3972
|
+
]
|
|
3973
|
+
},
|
|
3974
|
+
option.id || `option-${index}`
|
|
3975
|
+
);
|
|
3976
|
+
}) }) });
|
|
3977
|
+
};
|
|
3978
|
+
|
|
3979
|
+
// src/utils/questionRenderer/dissertative/index.tsx
|
|
3980
|
+
import { jsx as jsx23, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3981
|
+
var renderQuestionDissertative = ({
|
|
3982
|
+
result
|
|
3983
|
+
}) => {
|
|
3984
|
+
const localAnswer = result?.answer || "";
|
|
3985
|
+
return /* @__PURE__ */ jsxs17("div", { className: "pt-2 space-y-4", children: [
|
|
3986
|
+
/* @__PURE__ */ jsxs17("div", { className: "space-y-2", children: [
|
|
3987
|
+
/* @__PURE__ */ jsx23(Text_default, { size: "sm", weight: "normal", color: "text-text-950", children: "Resposta do aluno" }),
|
|
3988
|
+
/* @__PURE__ */ jsx23("div", { className: "p-3 bg-background-50 rounded-lg border border-border-100", children: /* @__PURE__ */ jsx23(Text_default, { size: "sm", weight: "normal", color: "text-text-700", children: localAnswer || "Nenhuma resposta fornecida" }) })
|
|
3989
|
+
] }),
|
|
3990
|
+
result?.answerStatus === "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && result?.teacherFeedback && /* @__PURE__ */ jsxs17("div", { className: "space-y-2", children: [
|
|
3991
|
+
/* @__PURE__ */ jsx23(Text_default, { size: "xs", weight: "normal", color: "text-text-500", children: "Observa\xE7\xE3o do professor:" }),
|
|
3992
|
+
/* @__PURE__ */ jsx23("div", { className: "p-3 bg-background-50 rounded-lg border border-border-100", children: /* @__PURE__ */ jsx23(Text_default, { size: "sm", weight: "normal", color: "text-text-700", children: result.teacherFeedback }) })
|
|
3993
|
+
] })
|
|
3994
|
+
] });
|
|
3995
|
+
};
|
|
3996
|
+
|
|
3997
|
+
// src/utils/questionRenderer/fill/index.tsx
|
|
3998
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
3999
|
+
var renderQuestionFill = ({
|
|
4000
|
+
question,
|
|
4001
|
+
result
|
|
4002
|
+
}) => {
|
|
4003
|
+
return /* @__PURE__ */ jsx24(FillQuestionContent, { question, result });
|
|
4004
|
+
};
|
|
4005
|
+
|
|
4006
|
+
// src/utils/questionRenderer/image/index.tsx
|
|
4007
|
+
import { Fragment as Fragment6, jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4008
|
+
var renderQuestionImage = ({
|
|
4009
|
+
result
|
|
4010
|
+
}) => {
|
|
4011
|
+
const correctPositionRelative = { x: 0.48, y: 0.45 };
|
|
4012
|
+
const correctRadiusRelative = 0.1;
|
|
4013
|
+
let userPositionRelative = null;
|
|
4014
|
+
try {
|
|
4015
|
+
if (result?.answer) {
|
|
4016
|
+
const parsed = typeof result.answer === "string" ? JSON.parse(result.answer) : result.answer;
|
|
4017
|
+
if (parsed && typeof parsed.x === "number" && typeof parsed.y === "number") {
|
|
4018
|
+
userPositionRelative = { x: parsed.x, y: parsed.y };
|
|
4019
|
+
}
|
|
4020
|
+
}
|
|
4021
|
+
} catch {
|
|
4022
|
+
userPositionRelative = null;
|
|
4023
|
+
}
|
|
4024
|
+
const isCorrect = userPositionRelative ? Math.sqrt(
|
|
4025
|
+
Math.pow(userPositionRelative.x - correctPositionRelative.x, 2) + Math.pow(userPositionRelative.y - correctPositionRelative.y, 2)
|
|
4026
|
+
) <= correctRadiusRelative : false;
|
|
4027
|
+
const getUserCircleColorClasses = () => {
|
|
4028
|
+
if (!userPositionRelative) return "";
|
|
4029
|
+
return isCorrect ? "bg-success-600/70 border-white" : "bg-indicator-error/70 border-white";
|
|
4030
|
+
};
|
|
4031
|
+
const getPositionDescription = (x, y) => {
|
|
4032
|
+
const xPercent = Math.round(x * 100);
|
|
4033
|
+
const yPercent = Math.round(y * 100);
|
|
4034
|
+
return `${xPercent}% da esquerda, ${yPercent}% do topo`;
|
|
4035
|
+
};
|
|
4036
|
+
const getSpatialRelationship = () => {
|
|
4037
|
+
if (!userPositionRelative) {
|
|
4038
|
+
return `\xC1rea correta localizada em ${getPositionDescription(
|
|
4039
|
+
correctPositionRelative.x,
|
|
4040
|
+
correctPositionRelative.y
|
|
4041
|
+
)}. Nenhuma resposta do aluno fornecida.`;
|
|
4042
|
+
}
|
|
4043
|
+
const deltaX = userPositionRelative.x - correctPositionRelative.x;
|
|
4044
|
+
const deltaY = userPositionRelative.y - correctPositionRelative.y;
|
|
4045
|
+
const distance = Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));
|
|
4046
|
+
const distancePercent = Math.round(distance * 100);
|
|
4047
|
+
let direction = "";
|
|
4048
|
+
if (Math.abs(deltaX) > Math.abs(deltaY)) {
|
|
4049
|
+
direction = deltaX > 0 ? "\xE0 direita" : "\xE0 esquerda";
|
|
4050
|
+
} else {
|
|
4051
|
+
direction = deltaY > 0 ? "abaixo" : "acima";
|
|
4052
|
+
}
|
|
4053
|
+
const correctPos = getPositionDescription(
|
|
4054
|
+
correctPositionRelative.x,
|
|
4055
|
+
correctPositionRelative.y
|
|
4056
|
+
);
|
|
4057
|
+
const userPos = getPositionDescription(
|
|
4058
|
+
userPositionRelative.x,
|
|
4059
|
+
userPositionRelative.y
|
|
4060
|
+
);
|
|
4061
|
+
return `\xC1rea correta localizada em ${correctPos}. Resposta do aluno em ${userPos}. A resposta do aluno est\xE1 ${distancePercent}% de dist\xE2ncia ${direction} da \xE1rea correta. ${isCorrect ? "A resposta est\xE1 dentro da \xE1rea de toler\xE2ncia e \xE9 considerada correta." : "A resposta est\xE1 fora da \xE1rea de toler\xE2ncia e \xE9 considerada incorreta."}`;
|
|
4062
|
+
};
|
|
4063
|
+
const correctPositionDescription = getPositionDescription(
|
|
4064
|
+
correctPositionRelative.x,
|
|
4065
|
+
correctPositionRelative.y
|
|
4066
|
+
);
|
|
4067
|
+
const imageAltText = `Quest\xE3o de imagem com \xE1rea correta localizada em ${correctPositionDescription}`;
|
|
4068
|
+
return /* @__PURE__ */ jsxs18("div", { className: "pt-2 space-y-4", children: [
|
|
4069
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-4 text-xs", children: [
|
|
4070
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
|
|
4071
|
+
/* @__PURE__ */ jsx25("div", { className: "w-3 h-3 rounded-full bg-indicator-primary/70 border border-[#F8CC2E]" }),
|
|
4072
|
+
/* @__PURE__ */ jsx25(Text_default, { size: "sm", weight: "normal", color: "text-text-600", children: "\xC1rea correta" })
|
|
4073
|
+
] }),
|
|
4074
|
+
userPositionRelative && /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
4075
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
|
|
4076
|
+
/* @__PURE__ */ jsx25("div", { className: "w-3 h-3 rounded-full bg-success-600/70 border border-white" }),
|
|
4077
|
+
/* @__PURE__ */ jsx25(Text_default, { size: "sm", weight: "normal", color: "text-text-600", children: "Resposta correta" })
|
|
4078
|
+
] }),
|
|
4079
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
|
|
4080
|
+
/* @__PURE__ */ jsx25("div", { className: "w-3 h-3 rounded-full bg-indicator-error/70 border border-white" }),
|
|
4081
|
+
/* @__PURE__ */ jsx25(Text_default, { size: "sm", weight: "normal", color: "text-text-600", children: "Resposta incorreta" })
|
|
4082
|
+
] })
|
|
4083
|
+
] })
|
|
4084
|
+
] }),
|
|
4085
|
+
/* @__PURE__ */ jsxs18("div", { className: "relative w-full", children: [
|
|
4086
|
+
/* @__PURE__ */ jsx25("div", { className: "sr-only", children: getSpatialRelationship() }),
|
|
4087
|
+
/* @__PURE__ */ jsx25(
|
|
4088
|
+
"img",
|
|
4089
|
+
{
|
|
4090
|
+
src: mock_image_question_default,
|
|
4091
|
+
alt: imageAltText,
|
|
4092
|
+
className: "w-full h-auto rounded-md"
|
|
4093
|
+
}
|
|
4094
|
+
),
|
|
4095
|
+
/* @__PURE__ */ jsx25(
|
|
4096
|
+
"div",
|
|
4097
|
+
{
|
|
4098
|
+
role: "img",
|
|
4099
|
+
"aria-label": `\xC1rea correta marcada em ${correctPositionDescription}`,
|
|
4100
|
+
className: "absolute rounded-full bg-indicator-primary/70 border-4 border-[#F8CC2E] pointer-events-none",
|
|
4101
|
+
style: {
|
|
4102
|
+
minWidth: "50px",
|
|
4103
|
+
maxWidth: "160px",
|
|
4104
|
+
width: "15%",
|
|
4105
|
+
aspectRatio: "1 / 1",
|
|
4106
|
+
left: `calc(${correctPositionRelative.x * 100}% - 7.5%)`,
|
|
4107
|
+
top: `calc(${correctPositionRelative.y * 100}% - 15%)`
|
|
4108
|
+
},
|
|
4109
|
+
children: /* @__PURE__ */ jsxs18(
|
|
4110
|
+
Text_default,
|
|
4111
|
+
{
|
|
4112
|
+
size: "sm",
|
|
4113
|
+
weight: "normal",
|
|
4114
|
+
color: "text-text-600",
|
|
4115
|
+
className: "sr-only",
|
|
4116
|
+
children: [
|
|
4117
|
+
"C\xEDrculo amarelo indicando a \xE1rea correta da resposta, posicionado em",
|
|
4118
|
+
" ",
|
|
4119
|
+
correctPositionDescription
|
|
4120
|
+
]
|
|
4121
|
+
}
|
|
4122
|
+
)
|
|
4123
|
+
}
|
|
4124
|
+
),
|
|
4125
|
+
userPositionRelative && /* @__PURE__ */ jsx25(
|
|
4126
|
+
"div",
|
|
4127
|
+
{
|
|
4128
|
+
role: "img",
|
|
4129
|
+
"aria-label": `Resposta do aluno marcada em ${getPositionDescription(
|
|
4130
|
+
userPositionRelative.x,
|
|
4131
|
+
userPositionRelative.y
|
|
4132
|
+
)}, ${isCorrect ? "correta" : "incorreta"}`,
|
|
4133
|
+
className: `absolute rounded-full border-4 pointer-events-none ${getUserCircleColorClasses()}`,
|
|
4134
|
+
style: {
|
|
4135
|
+
minWidth: "30px",
|
|
4136
|
+
maxWidth: "52px",
|
|
4137
|
+
width: "5%",
|
|
4138
|
+
aspectRatio: "1 / 1",
|
|
4139
|
+
left: `calc(${userPositionRelative.x * 100}% - 2.5%)`,
|
|
4140
|
+
top: `calc(${userPositionRelative.y * 100}% - 2.5%)`
|
|
4141
|
+
},
|
|
4142
|
+
children: /* @__PURE__ */ jsxs18(
|
|
4143
|
+
Text_default,
|
|
4144
|
+
{
|
|
4145
|
+
size: "sm",
|
|
4146
|
+
weight: "normal",
|
|
4147
|
+
color: "text-text-600",
|
|
4148
|
+
className: "sr-only",
|
|
4149
|
+
children: [
|
|
4150
|
+
"C\xEDrculo ",
|
|
4151
|
+
isCorrect ? "verde" : "vermelho",
|
|
4152
|
+
" indicando a resposta do aluno, posicionado em",
|
|
4153
|
+
" ",
|
|
4154
|
+
getPositionDescription(
|
|
4155
|
+
userPositionRelative.x,
|
|
4156
|
+
userPositionRelative.y
|
|
4157
|
+
),
|
|
4158
|
+
". A resposta est\xE1",
|
|
4159
|
+
" ",
|
|
4160
|
+
Math.round(
|
|
4161
|
+
Math.sqrt(
|
|
4162
|
+
Math.pow(
|
|
4163
|
+
userPositionRelative.x - correctPositionRelative.x,
|
|
4164
|
+
2
|
|
4165
|
+
) + Math.pow(
|
|
4166
|
+
userPositionRelative.y - correctPositionRelative.y,
|
|
4167
|
+
2
|
|
4168
|
+
)
|
|
4169
|
+
) * 100
|
|
4170
|
+
),
|
|
4171
|
+
"% de dist\xE2ncia da \xE1rea correta e \xE9 considerada",
|
|
4172
|
+
" ",
|
|
4173
|
+
isCorrect ? "correta" : "incorreta",
|
|
4174
|
+
"."
|
|
4175
|
+
]
|
|
4176
|
+
}
|
|
4177
|
+
)
|
|
4178
|
+
}
|
|
4179
|
+
)
|
|
4180
|
+
] })
|
|
4181
|
+
] });
|
|
4182
|
+
};
|
|
4183
|
+
|
|
4184
|
+
// src/utils/questionRenderer/connectDots/index.tsx
|
|
4185
|
+
import { Fragment as Fragment7, jsx as jsx26, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4186
|
+
var renderQuestionConnectDots = ({
|
|
4187
|
+
paddingBottom
|
|
4188
|
+
} = {}) => {
|
|
4189
|
+
return /* @__PURE__ */ jsxs19(Fragment7, { children: [
|
|
4190
|
+
/* @__PURE__ */ jsx26(QuestionSubTitle, { subTitle: "Tipo de quest\xE3o: Ligar Pontos" }),
|
|
4191
|
+
/* @__PURE__ */ jsx26(QuestionContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx26("div", { className: "space-y-4", children: /* @__PURE__ */ jsx26(Text_default, { size: "md", weight: "normal", color: "text-text-600", children: "Tipo de quest\xE3o: Ligar Pontos (n\xE3o implementado)" }) }) })
|
|
4192
|
+
] });
|
|
4193
|
+
};
|
|
4194
|
+
|
|
4195
|
+
// src/utils/questionRenderer/index.tsx
|
|
4196
|
+
var questionRendererMap = {
|
|
4197
|
+
["ALTERNATIVA" /* ALTERNATIVA */]: renderQuestionAlternative,
|
|
4198
|
+
["MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */]: renderQuestionMultipleChoice,
|
|
4199
|
+
["VERDADEIRO_FALSO" /* VERDADEIRO_FALSO */]: renderQuestionTrueOrFalse,
|
|
4200
|
+
["DISSERTATIVA" /* DISSERTATIVA */]: renderQuestionDissertative,
|
|
4201
|
+
["PREENCHER" /* PREENCHER */]: renderQuestionFill,
|
|
4202
|
+
["IMAGEM" /* IMAGEM */]: renderQuestionImage,
|
|
4203
|
+
["LIGAR_PONTOS" /* LIGAR_PONTOS */]: renderQuestionConnectDots
|
|
4204
|
+
};
|
|
3625
4205
|
var renderFromMap = (renderers, questionType) => {
|
|
3626
4206
|
if (!questionType) return null;
|
|
3627
4207
|
const renderer = renderers[questionType];
|
|
3628
4208
|
return renderer ? renderer() : null;
|
|
3629
4209
|
};
|
|
3630
4210
|
|
|
4211
|
+
// src/types/questionTypes.ts
|
|
4212
|
+
var questionTypeLabels = {
|
|
4213
|
+
["ALTERNATIVA" /* ALTERNATIVA */]: "Alternativa",
|
|
4214
|
+
["VERDADEIRO_FALSO" /* VERDADEIRO_FALSO */]: "Verdadeiro ou Falso",
|
|
4215
|
+
["DISSERTATIVA" /* DISSERTATIVA */]: "Discursiva",
|
|
4216
|
+
["IMAGEM" /* IMAGEM */]: "Imagem",
|
|
4217
|
+
["MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */]: "M\xFAltipla Escolha",
|
|
4218
|
+
["LIGAR_PONTOS" /* LIGAR_PONTOS */]: "Ligar Pontos",
|
|
4219
|
+
["PREENCHER" /* PREENCHER */]: "Preencher Lacunas"
|
|
4220
|
+
};
|
|
4221
|
+
|
|
3631
4222
|
// src/components/ActivityCardQuestionPreview/ActivityCardQuestionPreview.tsx
|
|
3632
|
-
import { useMemo, useState as
|
|
3633
|
-
import { CheckCircle as
|
|
3634
|
-
import { jsx as
|
|
4223
|
+
import { useMemo as useMemo2, useState as useState8 } from "react";
|
|
4224
|
+
import { CheckCircle as CheckCircle6, XCircle as XCircle6 } from "phosphor-react";
|
|
4225
|
+
import { jsx as jsx27, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3635
4226
|
var QuestionHeader = ({
|
|
3636
4227
|
badgeColor,
|
|
3637
4228
|
iconName,
|
|
3638
4229
|
subjectName,
|
|
3639
4230
|
resolvedQuestionTypeLabel,
|
|
3640
4231
|
position
|
|
3641
|
-
}) => /* @__PURE__ */
|
|
3642
|
-
/* @__PURE__ */
|
|
3643
|
-
/* @__PURE__ */
|
|
4232
|
+
}) => /* @__PURE__ */ jsxs20("div", { className: "flex flex-row gap-2 text-text-650", children: [
|
|
4233
|
+
/* @__PURE__ */ jsxs20("div", { className: "py-1 px-2 flex flex-row items-center gap-1", children: [
|
|
4234
|
+
/* @__PURE__ */ jsx27(
|
|
3644
4235
|
"span",
|
|
3645
4236
|
{
|
|
3646
4237
|
className: "size-4 rounded-sm flex items-center justify-center shrink-0 text-text-950",
|
|
3647
4238
|
style: {
|
|
3648
4239
|
backgroundColor: badgeColor
|
|
3649
4240
|
},
|
|
3650
|
-
children: /* @__PURE__ */
|
|
4241
|
+
children: /* @__PURE__ */ jsx27(
|
|
3651
4242
|
IconRender_default,
|
|
3652
4243
|
{
|
|
3653
4244
|
iconName: iconName ?? "Book",
|
|
@@ -3657,13 +4248,13 @@ var QuestionHeader = ({
|
|
|
3657
4248
|
)
|
|
3658
4249
|
}
|
|
3659
4250
|
),
|
|
3660
|
-
/* @__PURE__ */
|
|
4251
|
+
/* @__PURE__ */ jsx27(Text_default, { size: "sm", children: subjectName ?? "Assunto n\xE3o informado" })
|
|
3661
4252
|
] }),
|
|
3662
|
-
typeof position === "number" && /* @__PURE__ */
|
|
4253
|
+
typeof position === "number" && /* @__PURE__ */ jsx27("div", { className: "py-1 px-2 flex flex-row items-center gap-1", children: /* @__PURE__ */ jsxs20(Text_default, { size: "sm", className: "text-text-700", children: [
|
|
3663
4254
|
"#",
|
|
3664
4255
|
position
|
|
3665
4256
|
] }) }),
|
|
3666
|
-
/* @__PURE__ */
|
|
4257
|
+
/* @__PURE__ */ jsx27("div", { className: "py-1 px-2 flex flex-row items-center gap-1", children: /* @__PURE__ */ jsx27(Text_default, { size: "sm", className: "", children: resolvedQuestionTypeLabel ?? "Tipo de quest\xE3o" }) })
|
|
3667
4258
|
] });
|
|
3668
4259
|
var ActivityCardQuestionPreview = ({
|
|
3669
4260
|
subjectName = "Assunto n\xE3o informado",
|
|
@@ -3681,13 +4272,13 @@ var ActivityCardQuestionPreview = ({
|
|
|
3681
4272
|
position
|
|
3682
4273
|
}) => {
|
|
3683
4274
|
const badgeColor = getSubjectColorWithOpacity(subjectColor, isDark) ?? subjectColor;
|
|
3684
|
-
const [isExpanded, setIsExpanded] =
|
|
4275
|
+
const [isExpanded, setIsExpanded] = useState8(defaultExpanded);
|
|
3685
4276
|
const correctOptionIds = question?.correctOptionIds || [];
|
|
3686
4277
|
const resolvedQuestionTypeLabel = questionType && questionTypeLabels[questionType] ? questionTypeLabels[questionType] : questionTypeLabel || "Tipo de quest\xE3o";
|
|
3687
4278
|
const safeSubjectName = subjectName ?? "Assunto n\xE3o informado";
|
|
3688
4279
|
const safeIconName = iconName ?? "Book";
|
|
3689
4280
|
const safeResolvedLabel = resolvedQuestionTypeLabel ?? "Tipo de quest\xE3o";
|
|
3690
|
-
const alternatives =
|
|
4281
|
+
const alternatives = useMemo2(() => {
|
|
3691
4282
|
if (!question?.options || questionType !== "ALTERNATIVA" /* ALTERNATIVA */)
|
|
3692
4283
|
return [];
|
|
3693
4284
|
return question.options.map((option) => {
|
|
@@ -3700,7 +4291,7 @@ var ActivityCardQuestionPreview = ({
|
|
|
3700
4291
|
};
|
|
3701
4292
|
});
|
|
3702
4293
|
}, [question, questionType, correctOptionIds]);
|
|
3703
|
-
const multipleChoices =
|
|
4294
|
+
const multipleChoices = useMemo2(() => {
|
|
3704
4295
|
if (!question?.options || questionType !== "MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */)
|
|
3705
4296
|
return [];
|
|
3706
4297
|
return question.options.map((option) => {
|
|
@@ -3715,7 +4306,7 @@ var ActivityCardQuestionPreview = ({
|
|
|
3715
4306
|
}, [question, questionType, correctOptionIds]);
|
|
3716
4307
|
const renderAlternative = () => {
|
|
3717
4308
|
if (alternatives.length === 0) return null;
|
|
3718
|
-
return /* @__PURE__ */
|
|
4309
|
+
return /* @__PURE__ */ jsx27("div", { className: "mt-4", children: /* @__PURE__ */ jsx27(
|
|
3719
4310
|
AlternativesList,
|
|
3720
4311
|
{
|
|
3721
4312
|
alternatives,
|
|
@@ -3728,7 +4319,7 @@ var ActivityCardQuestionPreview = ({
|
|
|
3728
4319
|
};
|
|
3729
4320
|
const renderMultipleChoice = () => {
|
|
3730
4321
|
if (multipleChoices.length === 0) return null;
|
|
3731
|
-
return /* @__PURE__ */
|
|
4322
|
+
return /* @__PURE__ */ jsx27("div", { className: "mt-4", children: /* @__PURE__ */ jsx27(
|
|
3732
4323
|
MultipleChoiceList,
|
|
3733
4324
|
{
|
|
3734
4325
|
choices: multipleChoices,
|
|
@@ -3740,10 +4331,10 @@ var ActivityCardQuestionPreview = ({
|
|
|
3740
4331
|
};
|
|
3741
4332
|
const renderTrueOrFalse = () => {
|
|
3742
4333
|
if (!question?.options || question.options.length === 0) return null;
|
|
3743
|
-
return /* @__PURE__ */
|
|
4334
|
+
return /* @__PURE__ */ jsx27("div", { className: "mt-4", children: /* @__PURE__ */ jsx27("div", { className: "flex flex-col gap-3.5", children: question.options.map((option, index) => {
|
|
3744
4335
|
const isCorrect = correctOptionIds.includes(option.id);
|
|
3745
4336
|
const correctAnswer = isCorrect ? "Verdadeiro" : "Falso";
|
|
3746
|
-
return /* @__PURE__ */
|
|
4337
|
+
return /* @__PURE__ */ jsx27("section", { className: "flex flex-col gap-2", children: /* @__PURE__ */ jsxs20(
|
|
3747
4338
|
"div",
|
|
3748
4339
|
{
|
|
3749
4340
|
className: cn(
|
|
@@ -3751,18 +4342,18 @@ var ActivityCardQuestionPreview = ({
|
|
|
3751
4342
|
isCorrect ? "bg-success-background border-success-300" : "bg-error-background border-error-300"
|
|
3752
4343
|
),
|
|
3753
4344
|
children: [
|
|
3754
|
-
/* @__PURE__ */
|
|
3755
|
-
/* @__PURE__ */
|
|
3756
|
-
/* @__PURE__ */
|
|
4345
|
+
/* @__PURE__ */ jsx27(Text_default, { size: "sm", className: "text-text-900", children: String.fromCodePoint(97 + index).concat(") ").concat(option.option) }),
|
|
4346
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex flex-row items-center gap-2 flex-shrink-0", children: [
|
|
4347
|
+
/* @__PURE__ */ jsxs20(Text_default, { size: "sm", className: "text-text-700", children: [
|
|
3757
4348
|
"Resposta correta: ",
|
|
3758
4349
|
correctAnswer
|
|
3759
4350
|
] }),
|
|
3760
|
-
/* @__PURE__ */
|
|
4351
|
+
/* @__PURE__ */ jsx27(
|
|
3761
4352
|
Badge_default,
|
|
3762
4353
|
{
|
|
3763
4354
|
variant: "solid",
|
|
3764
4355
|
action: isCorrect ? "success" : "error",
|
|
3765
|
-
iconLeft: isCorrect ? /* @__PURE__ */
|
|
4356
|
+
iconLeft: isCorrect ? /* @__PURE__ */ jsx27(CheckCircle6, {}) : /* @__PURE__ */ jsx27(XCircle6, {}),
|
|
3766
4357
|
children: isCorrect ? "Resposta correta" : "Resposta incorreta"
|
|
3767
4358
|
}
|
|
3768
4359
|
)
|
|
@@ -3773,7 +4364,7 @@ var ActivityCardQuestionPreview = ({
|
|
|
3773
4364
|
}) }) });
|
|
3774
4365
|
};
|
|
3775
4366
|
const renderDissertative = () => {
|
|
3776
|
-
return /* @__PURE__ */
|
|
4367
|
+
return /* @__PURE__ */ jsx27("div", { className: "mt-4 px-2 py-4", children: /* @__PURE__ */ jsx27(Text_default, { size: "sm", className: "text-text-600 italic", children: "Resposta do aluno" }) });
|
|
3777
4368
|
};
|
|
3778
4369
|
const renderConnectDots = () => null;
|
|
3779
4370
|
const renderFill = () => null;
|
|
@@ -3787,7 +4378,7 @@ var ActivityCardQuestionPreview = ({
|
|
|
3787
4378
|
["PREENCHER" /* PREENCHER */]: renderFill,
|
|
3788
4379
|
["IMAGEM" /* IMAGEM */]: renderImage
|
|
3789
4380
|
};
|
|
3790
|
-
return /* @__PURE__ */
|
|
4381
|
+
return /* @__PURE__ */ jsxs20(
|
|
3791
4382
|
"div",
|
|
3792
4383
|
{
|
|
3793
4384
|
className: "w-full",
|
|
@@ -3817,13 +4408,13 @@ var ActivityCardQuestionPreview = ({
|
|
|
3817
4408
|
}
|
|
3818
4409
|
},
|
|
3819
4410
|
children: [
|
|
3820
|
-
/* @__PURE__ */
|
|
4411
|
+
/* @__PURE__ */ jsx27(
|
|
3821
4412
|
"div",
|
|
3822
4413
|
{
|
|
3823
4414
|
"data-drag-preview": "true",
|
|
3824
4415
|
className: "fixed -left-[9999px] -top-[9999px] pointer-events-none z-[9999] w-[440px]",
|
|
3825
|
-
children: /* @__PURE__ */
|
|
3826
|
-
/* @__PURE__ */
|
|
4416
|
+
children: /* @__PURE__ */ jsx27("div", { className: "w-full rounded-lg border border-border-200 bg-background", children: /* @__PURE__ */ jsxs20("div", { className: "w-full min-w-0 flex flex-col gap-2 py-2", children: [
|
|
4417
|
+
/* @__PURE__ */ jsx27(
|
|
3827
4418
|
QuestionHeader,
|
|
3828
4419
|
{
|
|
3829
4420
|
badgeColor,
|
|
@@ -3833,7 +4424,7 @@ var ActivityCardQuestionPreview = ({
|
|
|
3833
4424
|
position
|
|
3834
4425
|
}
|
|
3835
4426
|
),
|
|
3836
|
-
/* @__PURE__ */
|
|
4427
|
+
/* @__PURE__ */ jsx27(
|
|
3837
4428
|
Text_default,
|
|
3838
4429
|
{
|
|
3839
4430
|
size: "md",
|
|
@@ -3845,7 +4436,7 @@ var ActivityCardQuestionPreview = ({
|
|
|
3845
4436
|
] }) })
|
|
3846
4437
|
}
|
|
3847
4438
|
),
|
|
3848
|
-
/* @__PURE__ */
|
|
4439
|
+
/* @__PURE__ */ jsxs20(
|
|
3849
4440
|
CardAccordation,
|
|
3850
4441
|
{
|
|
3851
4442
|
className: cn(
|
|
@@ -3856,8 +4447,8 @@ var ActivityCardQuestionPreview = ({
|
|
|
3856
4447
|
onToggleExpanded: setIsExpanded,
|
|
3857
4448
|
defaultExpanded,
|
|
3858
4449
|
value,
|
|
3859
|
-
trigger: /* @__PURE__ */
|
|
3860
|
-
/* @__PURE__ */
|
|
4450
|
+
trigger: /* @__PURE__ */ jsxs20("div", { className: "w-full min-w-0 flex flex-col gap-2 py-2", children: [
|
|
4451
|
+
/* @__PURE__ */ jsx27(
|
|
3861
4452
|
QuestionHeader,
|
|
3862
4453
|
{
|
|
3863
4454
|
badgeColor,
|
|
@@ -3867,7 +4458,7 @@ var ActivityCardQuestionPreview = ({
|
|
|
3867
4458
|
position
|
|
3868
4459
|
}
|
|
3869
4460
|
),
|
|
3870
|
-
!isExpanded && /* @__PURE__ */
|
|
4461
|
+
!isExpanded && /* @__PURE__ */ jsx27(
|
|
3871
4462
|
Text_default,
|
|
3872
4463
|
{
|
|
3873
4464
|
size: "md",
|
|
@@ -3878,7 +4469,7 @@ var ActivityCardQuestionPreview = ({
|
|
|
3878
4469
|
)
|
|
3879
4470
|
] }),
|
|
3880
4471
|
children: [
|
|
3881
|
-
/* @__PURE__ */
|
|
4472
|
+
/* @__PURE__ */ jsx27(
|
|
3882
4473
|
Text_default,
|
|
3883
4474
|
{
|
|
3884
4475
|
size: "md",
|
|
@@ -3898,9 +4489,9 @@ var ActivityCardQuestionPreview = ({
|
|
|
3898
4489
|
};
|
|
3899
4490
|
|
|
3900
4491
|
// src/components/QuestionsPdfGenerator/QuestionsPdfGenerator.tsx
|
|
3901
|
-
import { forwardRef as
|
|
3902
|
-
import { Fragment as
|
|
3903
|
-
var QuestionsPdfContent =
|
|
4492
|
+
import { forwardRef as forwardRef9, useRef as useRef5, useCallback as useCallback2 } from "react";
|
|
4493
|
+
import { Fragment as Fragment8, jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4494
|
+
var QuestionsPdfContent = forwardRef9(({ questions }, ref) => {
|
|
3904
4495
|
const getLetterByIndex = (index) => {
|
|
3905
4496
|
return String.fromCodePoint(97 + index);
|
|
3906
4497
|
};
|
|
@@ -3908,7 +4499,7 @@ var QuestionsPdfContent = forwardRef8(({ questions }, ref) => {
|
|
|
3908
4499
|
if (!question.question?.options || question.question.options.length === 0) {
|
|
3909
4500
|
return null;
|
|
3910
4501
|
}
|
|
3911
|
-
return /* @__PURE__ */
|
|
4502
|
+
return /* @__PURE__ */ jsx28(
|
|
3912
4503
|
"ol",
|
|
3913
4504
|
{
|
|
3914
4505
|
type: "a",
|
|
@@ -3917,14 +4508,14 @@ var QuestionsPdfContent = forwardRef8(({ questions }, ref) => {
|
|
|
3917
4508
|
marginBottom: "12px",
|
|
3918
4509
|
paddingLeft: "24px"
|
|
3919
4510
|
},
|
|
3920
|
-
children: question.question.options.map((option) => /* @__PURE__ */
|
|
4511
|
+
children: question.question.options.map((option) => /* @__PURE__ */ jsx28(
|
|
3921
4512
|
"li",
|
|
3922
4513
|
{
|
|
3923
4514
|
style: {
|
|
3924
4515
|
marginBottom: "8px",
|
|
3925
4516
|
lineHeight: "1.6"
|
|
3926
4517
|
},
|
|
3927
|
-
children: /* @__PURE__ */
|
|
4518
|
+
children: /* @__PURE__ */ jsx28(LatexRenderer_default, { content: option.option })
|
|
3928
4519
|
},
|
|
3929
4520
|
option.id
|
|
3930
4521
|
))
|
|
@@ -3935,7 +4526,7 @@ var QuestionsPdfContent = forwardRef8(({ questions }, ref) => {
|
|
|
3935
4526
|
if (!question.question?.options || question.question.options.length === 0) {
|
|
3936
4527
|
return null;
|
|
3937
4528
|
}
|
|
3938
|
-
return /* @__PURE__ */
|
|
4529
|
+
return /* @__PURE__ */ jsx28(
|
|
3939
4530
|
"div",
|
|
3940
4531
|
{
|
|
3941
4532
|
style: {
|
|
@@ -3944,7 +4535,7 @@ var QuestionsPdfContent = forwardRef8(({ questions }, ref) => {
|
|
|
3944
4535
|
},
|
|
3945
4536
|
children: question.question.options.map((option, index) => {
|
|
3946
4537
|
const letter = getLetterByIndex(index);
|
|
3947
|
-
return /* @__PURE__ */
|
|
4538
|
+
return /* @__PURE__ */ jsxs21(
|
|
3948
4539
|
"div",
|
|
3949
4540
|
{
|
|
3950
4541
|
style: {
|
|
@@ -3955,7 +4546,7 @@ var QuestionsPdfContent = forwardRef8(({ questions }, ref) => {
|
|
|
3955
4546
|
lineHeight: "1.6"
|
|
3956
4547
|
},
|
|
3957
4548
|
children: [
|
|
3958
|
-
/* @__PURE__ */
|
|
4549
|
+
/* @__PURE__ */ jsx28(
|
|
3959
4550
|
"span",
|
|
3960
4551
|
{
|
|
3961
4552
|
style: {
|
|
@@ -3966,7 +4557,7 @@ var QuestionsPdfContent = forwardRef8(({ questions }, ref) => {
|
|
|
3966
4557
|
children: "\u2610"
|
|
3967
4558
|
}
|
|
3968
4559
|
),
|
|
3969
|
-
/* @__PURE__ */
|
|
4560
|
+
/* @__PURE__ */ jsxs21(
|
|
3970
4561
|
"span",
|
|
3971
4562
|
{
|
|
3972
4563
|
style: {
|
|
@@ -3979,7 +4570,7 @@ var QuestionsPdfContent = forwardRef8(({ questions }, ref) => {
|
|
|
3979
4570
|
]
|
|
3980
4571
|
}
|
|
3981
4572
|
),
|
|
3982
|
-
/* @__PURE__ */
|
|
4573
|
+
/* @__PURE__ */ jsx28("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsx28(LatexRenderer_default, { content: option.option }) })
|
|
3983
4574
|
]
|
|
3984
4575
|
},
|
|
3985
4576
|
option.id
|
|
@@ -3989,14 +4580,14 @@ var QuestionsPdfContent = forwardRef8(({ questions }, ref) => {
|
|
|
3989
4580
|
);
|
|
3990
4581
|
};
|
|
3991
4582
|
const renderDissertative = () => {
|
|
3992
|
-
return /* @__PURE__ */
|
|
4583
|
+
return /* @__PURE__ */ jsx28(
|
|
3993
4584
|
"div",
|
|
3994
4585
|
{
|
|
3995
4586
|
style: {
|
|
3996
4587
|
marginTop: "12px",
|
|
3997
4588
|
marginBottom: "12px"
|
|
3998
4589
|
},
|
|
3999
|
-
children: /* @__PURE__ */
|
|
4590
|
+
children: /* @__PURE__ */ jsxs21(
|
|
4000
4591
|
"div",
|
|
4001
4592
|
{
|
|
4002
4593
|
style: {
|
|
@@ -4005,7 +4596,7 @@ var QuestionsPdfContent = forwardRef8(({ questions }, ref) => {
|
|
|
4005
4596
|
gap: "8px"
|
|
4006
4597
|
},
|
|
4007
4598
|
children: [
|
|
4008
|
-
/* @__PURE__ */
|
|
4599
|
+
/* @__PURE__ */ jsx28(
|
|
4009
4600
|
"span",
|
|
4010
4601
|
{
|
|
4011
4602
|
style: {
|
|
@@ -4015,7 +4606,7 @@ var QuestionsPdfContent = forwardRef8(({ questions }, ref) => {
|
|
|
4015
4606
|
children: "R:"
|
|
4016
4607
|
}
|
|
4017
4608
|
),
|
|
4018
|
-
/* @__PURE__ */
|
|
4609
|
+
/* @__PURE__ */ jsx28(
|
|
4019
4610
|
"div",
|
|
4020
4611
|
{
|
|
4021
4612
|
style: {
|
|
@@ -4034,7 +4625,7 @@ var QuestionsPdfContent = forwardRef8(({ questions }, ref) => {
|
|
|
4034
4625
|
if (!question.question?.options || question.question.options.length === 0) {
|
|
4035
4626
|
return null;
|
|
4036
4627
|
}
|
|
4037
|
-
return /* @__PURE__ */
|
|
4628
|
+
return /* @__PURE__ */ jsx28("div", { style: { marginTop: "12px", marginBottom: "12px" }, children: question.question.options.map((option, index) => /* @__PURE__ */ jsxs21(
|
|
4038
4629
|
"div",
|
|
4039
4630
|
{
|
|
4040
4631
|
style: {
|
|
@@ -4044,7 +4635,7 @@ var QuestionsPdfContent = forwardRef8(({ questions }, ref) => {
|
|
|
4044
4635
|
gap: "12px"
|
|
4045
4636
|
},
|
|
4046
4637
|
children: [
|
|
4047
|
-
/* @__PURE__ */
|
|
4638
|
+
/* @__PURE__ */ jsxs21(
|
|
4048
4639
|
"span",
|
|
4049
4640
|
{
|
|
4050
4641
|
style: {
|
|
@@ -4057,8 +4648,8 @@ var QuestionsPdfContent = forwardRef8(({ questions }, ref) => {
|
|
|
4057
4648
|
]
|
|
4058
4649
|
}
|
|
4059
4650
|
),
|
|
4060
|
-
/* @__PURE__ */
|
|
4061
|
-
/* @__PURE__ */
|
|
4651
|
+
/* @__PURE__ */ jsx28("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsx28(LatexRenderer_default, { content: option.option }) }),
|
|
4652
|
+
/* @__PURE__ */ jsx28(
|
|
4062
4653
|
"span",
|
|
4063
4654
|
{
|
|
4064
4655
|
style: {
|
|
@@ -4092,7 +4683,7 @@ var QuestionsPdfContent = forwardRef8(({ questions }, ref) => {
|
|
|
4092
4683
|
};
|
|
4093
4684
|
const renderQuestionContent = (question, index) => {
|
|
4094
4685
|
const questionNumber = index + 1;
|
|
4095
|
-
return /* @__PURE__ */
|
|
4686
|
+
return /* @__PURE__ */ jsxs21(
|
|
4096
4687
|
"div",
|
|
4097
4688
|
{
|
|
4098
4689
|
style: {
|
|
@@ -4100,7 +4691,7 @@ var QuestionsPdfContent = forwardRef8(({ questions }, ref) => {
|
|
|
4100
4691
|
pageBreakInside: "avoid"
|
|
4101
4692
|
},
|
|
4102
4693
|
children: [
|
|
4103
|
-
/* @__PURE__ */
|
|
4694
|
+
/* @__PURE__ */ jsxs21(
|
|
4104
4695
|
"h3",
|
|
4105
4696
|
{
|
|
4106
4697
|
style: {
|
|
@@ -4115,7 +4706,7 @@ var QuestionsPdfContent = forwardRef8(({ questions }, ref) => {
|
|
|
4115
4706
|
]
|
|
4116
4707
|
}
|
|
4117
4708
|
),
|
|
4118
|
-
question.enunciado && /* @__PURE__ */
|
|
4709
|
+
question.enunciado && /* @__PURE__ */ jsx28(
|
|
4119
4710
|
"div",
|
|
4120
4711
|
{
|
|
4121
4712
|
style: {
|
|
@@ -4123,7 +4714,7 @@ var QuestionsPdfContent = forwardRef8(({ questions }, ref) => {
|
|
|
4123
4714
|
lineHeight: "1.6",
|
|
4124
4715
|
color: "#000"
|
|
4125
4716
|
},
|
|
4126
|
-
children: /* @__PURE__ */
|
|
4717
|
+
children: /* @__PURE__ */ jsx28(LatexRenderer_default, { content: question.enunciado })
|
|
4127
4718
|
}
|
|
4128
4719
|
),
|
|
4129
4720
|
renderQuestionTypeContent(question)
|
|
@@ -4132,7 +4723,7 @@ var QuestionsPdfContent = forwardRef8(({ questions }, ref) => {
|
|
|
4132
4723
|
question.id
|
|
4133
4724
|
);
|
|
4134
4725
|
};
|
|
4135
|
-
return /* @__PURE__ */
|
|
4726
|
+
return /* @__PURE__ */ jsxs21(
|
|
4136
4727
|
"div",
|
|
4137
4728
|
{
|
|
4138
4729
|
ref,
|
|
@@ -4148,7 +4739,7 @@ var QuestionsPdfContent = forwardRef8(({ questions }, ref) => {
|
|
|
4148
4739
|
zIndex: -1
|
|
4149
4740
|
},
|
|
4150
4741
|
children: [
|
|
4151
|
-
/* @__PURE__ */
|
|
4742
|
+
/* @__PURE__ */ jsx28("style", { children: `
|
|
4152
4743
|
@media print {
|
|
4153
4744
|
@page {
|
|
4154
4745
|
margin: 20mm;
|
|
@@ -4186,7 +4777,7 @@ var QuestionsPdfContent = forwardRef8(({ questions }, ref) => {
|
|
|
4186
4777
|
}
|
|
4187
4778
|
}
|
|
4188
4779
|
` }),
|
|
4189
|
-
/* @__PURE__ */
|
|
4780
|
+
/* @__PURE__ */ jsx28("div", { style: { padding: "20px" }, children: questions.map(
|
|
4190
4781
|
(question, index) => renderQuestionContent(question, index)
|
|
4191
4782
|
) })
|
|
4192
4783
|
]
|
|
@@ -4314,8 +4905,8 @@ var setupPrintWindowHandler = (printWindow) => {
|
|
|
4314
4905
|
};
|
|
4315
4906
|
};
|
|
4316
4907
|
var useQuestionsPdfPrint = (questions, onPrint, onPrintError) => {
|
|
4317
|
-
const contentRef =
|
|
4318
|
-
const handlePrint =
|
|
4908
|
+
const contentRef = useRef5(null);
|
|
4909
|
+
const handlePrint = useCallback2(() => {
|
|
4319
4910
|
try {
|
|
4320
4911
|
onPrint?.();
|
|
4321
4912
|
if (!contentRef.current) {
|
|
@@ -4349,7 +4940,7 @@ var useQuestionsPdfPrint = (questions, onPrint, onPrintError) => {
|
|
|
4349
4940
|
};
|
|
4350
4941
|
|
|
4351
4942
|
// src/components/ActivityPreview/ActivityPreview.tsx
|
|
4352
|
-
import { jsx as
|
|
4943
|
+
import { jsx as jsx29, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4353
4944
|
var ActivityPreview = ({
|
|
4354
4945
|
title = "Pr\xE9via da atividade",
|
|
4355
4946
|
questions = [],
|
|
@@ -4361,19 +4952,19 @@ var ActivityPreview = ({
|
|
|
4361
4952
|
onPositionsChange,
|
|
4362
4953
|
isDark = false
|
|
4363
4954
|
}) => {
|
|
4364
|
-
const onPositionsChangeRef =
|
|
4955
|
+
const onPositionsChangeRef = useRef6(onPositionsChange);
|
|
4365
4956
|
onPositionsChangeRef.current = onPositionsChange;
|
|
4366
|
-
const normalizeWithPositions =
|
|
4957
|
+
const normalizeWithPositions = useMemo3(
|
|
4367
4958
|
() => (items) => items.map((item, index) => ({
|
|
4368
4959
|
...item,
|
|
4369
4960
|
position: index + 1
|
|
4370
4961
|
})),
|
|
4371
4962
|
[]
|
|
4372
4963
|
);
|
|
4373
|
-
const [orderedQuestions, setOrderedQuestions] =
|
|
4964
|
+
const [orderedQuestions, setOrderedQuestions] = useState9(
|
|
4374
4965
|
() => normalizeWithPositions(questions)
|
|
4375
4966
|
);
|
|
4376
|
-
|
|
4967
|
+
useEffect7(() => {
|
|
4377
4968
|
const normalized = normalizeWithPositions(questions);
|
|
4378
4969
|
setOrderedQuestions(normalized);
|
|
4379
4970
|
onPositionsChangeRef.current?.(normalized);
|
|
@@ -4411,7 +5002,7 @@ var ActivityPreview = ({
|
|
|
4411
5002
|
onReorder?.(normalized);
|
|
4412
5003
|
onPositionsChange?.(normalized);
|
|
4413
5004
|
};
|
|
4414
|
-
return /* @__PURE__ */
|
|
5005
|
+
return /* @__PURE__ */ jsxs22(
|
|
4415
5006
|
"div",
|
|
4416
5007
|
{
|
|
4417
5008
|
className: cn(
|
|
@@ -4419,24 +5010,24 @@ var ActivityPreview = ({
|
|
|
4419
5010
|
className
|
|
4420
5011
|
),
|
|
4421
5012
|
children: [
|
|
4422
|
-
/* @__PURE__ */
|
|
4423
|
-
/* @__PURE__ */
|
|
4424
|
-
/* @__PURE__ */
|
|
5013
|
+
/* @__PURE__ */ jsxs22("section", { className: "flex flex-row items-center gap-2 text-text-950", children: [
|
|
5014
|
+
/* @__PURE__ */ jsx29(File, { size: 24 }),
|
|
5015
|
+
/* @__PURE__ */ jsx29(Text_default, { size: "lg", weight: "bold", children: title })
|
|
4425
5016
|
] }),
|
|
4426
|
-
/* @__PURE__ */
|
|
4427
|
-
/* @__PURE__ */
|
|
4428
|
-
/* @__PURE__ */
|
|
5017
|
+
/* @__PURE__ */ jsxs22("section", { className: "flex flex-row justify-between items-center", children: [
|
|
5018
|
+
/* @__PURE__ */ jsx29(Text_default, { size: "sm", className: "text-text-800", children: totalLabel }),
|
|
5019
|
+
/* @__PURE__ */ jsx29(
|
|
4429
5020
|
Button_default,
|
|
4430
5021
|
{
|
|
4431
5022
|
size: "small",
|
|
4432
5023
|
variant: "outline",
|
|
4433
|
-
iconLeft: /* @__PURE__ */
|
|
5024
|
+
iconLeft: /* @__PURE__ */ jsx29(DownloadSimple, {}),
|
|
4434
5025
|
onClick: handleDownloadPdf,
|
|
4435
5026
|
children: "Baixar pdf"
|
|
4436
5027
|
}
|
|
4437
5028
|
)
|
|
4438
5029
|
] }),
|
|
4439
|
-
/* @__PURE__ */
|
|
5030
|
+
/* @__PURE__ */ jsx29("section", { className: "flex flex-col gap-3", children: orderedQuestions.map(
|
|
4440
5031
|
({
|
|
4441
5032
|
id,
|
|
4442
5033
|
subjectName = "Assunto n\xE3o informado",
|
|
@@ -4447,7 +5038,7 @@ var ActivityPreview = ({
|
|
|
4447
5038
|
enunciado,
|
|
4448
5039
|
question,
|
|
4449
5040
|
position
|
|
4450
|
-
}, index) => /* @__PURE__ */
|
|
5041
|
+
}, index) => /* @__PURE__ */ jsxs22(
|
|
4451
5042
|
"div",
|
|
4452
5043
|
{
|
|
4453
5044
|
draggable: true,
|
|
@@ -4491,11 +5082,11 @@ var ActivityPreview = ({
|
|
|
4491
5082
|
},
|
|
4492
5083
|
className: "rounded-lg border border-border-200 bg-background relative group",
|
|
4493
5084
|
children: [
|
|
4494
|
-
onRemoveQuestion && /* @__PURE__ */
|
|
5085
|
+
onRemoveQuestion && /* @__PURE__ */ jsx29("div", { className: "absolute top-2 right-2 z-10 opacity-0 group-hover:opacity-100 transition-opacity", children: /* @__PURE__ */ jsx29(
|
|
4495
5086
|
IconButton_default,
|
|
4496
5087
|
{
|
|
4497
5088
|
size: "sm",
|
|
4498
|
-
icon: /* @__PURE__ */
|
|
5089
|
+
icon: /* @__PURE__ */ jsx29(Trash, { size: 16 }),
|
|
4499
5090
|
onClick: (e) => {
|
|
4500
5091
|
e.stopPropagation();
|
|
4501
5092
|
onRemoveQuestion(id);
|
|
@@ -4503,7 +5094,7 @@ var ActivityPreview = ({
|
|
|
4503
5094
|
"aria-label": `Remover quest\xE3o ${position ?? index + 1}`
|
|
4504
5095
|
}
|
|
4505
5096
|
) }),
|
|
4506
|
-
/* @__PURE__ */
|
|
5097
|
+
/* @__PURE__ */ jsx29(
|
|
4507
5098
|
ActivityCardQuestionPreview,
|
|
4508
5099
|
{
|
|
4509
5100
|
subjectName,
|
|
@@ -4524,8 +5115,8 @@ var ActivityPreview = ({
|
|
|
4524
5115
|
id
|
|
4525
5116
|
)
|
|
4526
5117
|
) }),
|
|
4527
|
-
/* @__PURE__ */
|
|
4528
|
-
/* @__PURE__ */
|
|
5118
|
+
/* @__PURE__ */ jsx29(Button_default, { variant: "outline", onClick: onRemoveAll, children: "Remover tudo" }),
|
|
5119
|
+
/* @__PURE__ */ jsx29(QuestionsPdfContent, { ref: contentRef, questions: orderedQuestions })
|
|
4529
5120
|
]
|
|
4530
5121
|
}
|
|
4531
5122
|
);
|