analytica-frontend-lib 1.2.9 → 1.2.11
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/NoSearchResult/index.d.mts +37 -0
- package/dist/NoSearchResult/index.d.ts +37 -0
- package/dist/NoSearchResult/index.js +113 -0
- package/dist/NoSearchResult/index.js.map +1 -0
- package/dist/NoSearchResult/index.mjs +90 -0
- package/dist/NoSearchResult/index.mjs.map +1 -0
- package/dist/Quiz/index.js +38 -5
- package/dist/Quiz/index.js.map +1 -1
- package/dist/Quiz/index.mjs +38 -5
- package/dist/Quiz/index.mjs.map +1 -1
- package/dist/Quiz/useQuizStore/index.d.mts +3 -0
- package/dist/Quiz/useQuizStore/index.d.ts +3 -0
- package/dist/Quiz/useQuizStore/index.js +10 -2
- package/dist/Quiz/useQuizStore/index.js.map +1 -1
- package/dist/Quiz/useQuizStore/index.mjs +10 -2
- package/dist/Quiz/useQuizStore/index.mjs.map +1 -1
- package/dist/TextArea/index.d.mts +4 -0
- package/dist/TextArea/index.d.ts +4 -0
- package/dist/TextArea/index.js +22 -1
- package/dist/TextArea/index.js.map +1 -1
- package/dist/TextArea/index.mjs +22 -1
- package/dist/TextArea/index.mjs.map +1 -1
- package/dist/index.css +17 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +392 -328
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +391 -328
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +17 -0
- package/dist/styles.css.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -78,6 +78,7 @@ __export(src_exports, {
|
|
|
78
78
|
Modal: () => Modal_default,
|
|
79
79
|
MultipleChoiceList: () => MultipleChoiceList,
|
|
80
80
|
NavButton: () => NavButton_default,
|
|
81
|
+
NoSearchResult: () => NoSearchResult_default,
|
|
81
82
|
NotFound: () => NotFound_default,
|
|
82
83
|
NotificationCard: () => NotificationCard_default,
|
|
83
84
|
NotificationEntityType: () => NotificationEntityType,
|
|
@@ -2030,11 +2031,16 @@ var TextArea = (0, import_react9.forwardRef)(
|
|
|
2030
2031
|
onChange,
|
|
2031
2032
|
placeholder,
|
|
2032
2033
|
required,
|
|
2034
|
+
showCharacterCount = false,
|
|
2035
|
+
maxLength,
|
|
2036
|
+
value,
|
|
2033
2037
|
...props
|
|
2034
2038
|
}, ref) => {
|
|
2035
2039
|
const generatedId = (0, import_react9.useId)();
|
|
2036
2040
|
const inputId = id ?? `textarea-${generatedId}`;
|
|
2037
2041
|
const [isFocused, setIsFocused] = (0, import_react9.useState)(false);
|
|
2042
|
+
const currentLength = typeof value === "string" ? value.length : 0;
|
|
2043
|
+
const isNearLimit = maxLength && currentLength >= maxLength * 0.8;
|
|
2038
2044
|
const handleChange = (event) => {
|
|
2039
2045
|
onChange?.(event);
|
|
2040
2046
|
};
|
|
@@ -2089,6 +2095,8 @@ var TextArea = (0, import_react9.forwardRef)(
|
|
|
2089
2095
|
className: textareaClasses,
|
|
2090
2096
|
placeholder,
|
|
2091
2097
|
required,
|
|
2098
|
+
maxLength,
|
|
2099
|
+
value,
|
|
2092
2100
|
...props
|
|
2093
2101
|
}
|
|
2094
2102
|
),
|
|
@@ -2097,7 +2105,21 @@ var TextArea = (0, import_react9.forwardRef)(
|
|
|
2097
2105
|
" ",
|
|
2098
2106
|
errorMessage
|
|
2099
2107
|
] }),
|
|
2100
|
-
|
|
2108
|
+
!errorMessage && showCharacterCount && maxLength && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
2109
|
+
Text_default,
|
|
2110
|
+
{
|
|
2111
|
+
size: "sm",
|
|
2112
|
+
weight: "normal",
|
|
2113
|
+
className: `mt-1.5 ${isNearLimit ? "text-indicator-warning" : "text-text-500"}`,
|
|
2114
|
+
children: [
|
|
2115
|
+
currentLength,
|
|
2116
|
+
"/",
|
|
2117
|
+
maxLength,
|
|
2118
|
+
" caracteres"
|
|
2119
|
+
]
|
|
2120
|
+
}
|
|
2121
|
+
),
|
|
2122
|
+
!errorMessage && helperMessage && !(showCharacterCount && maxLength) && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Text_default, { size: "sm", weight: "normal", className: "mt-1.5 text-text-500", children: helperMessage })
|
|
2101
2123
|
] });
|
|
2102
2124
|
}
|
|
2103
2125
|
);
|
|
@@ -9092,6 +9114,35 @@ var NotFound = ({
|
|
|
9092
9114
|
};
|
|
9093
9115
|
var NotFound_default = NotFound;
|
|
9094
9116
|
|
|
9117
|
+
// src/components/NoSearchResult/NoSearchResult.tsx
|
|
9118
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
9119
|
+
var NoSearchResult = ({ image, title, description }) => {
|
|
9120
|
+
const displayTitle = title || "Nenhum resultado encontrado";
|
|
9121
|
+
const displayDescription = description || "N\xE3o encontramos nenhum resultado com esse nome. Tente revisar a busca ou usar outra palavra-chave.";
|
|
9122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-row justify-center items-center gap-8 w-full max-w-4xl min-h-96", children: [
|
|
9123
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "w-72 h-72 flex-shrink-0 relative", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9124
|
+
"img",
|
|
9125
|
+
{
|
|
9126
|
+
src: image,
|
|
9127
|
+
alt: "No search results",
|
|
9128
|
+
className: "w-full h-full object-contain"
|
|
9129
|
+
}
|
|
9130
|
+
) }),
|
|
9131
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: "flex flex-col items-start w-full max-w-md", children: [
|
|
9132
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex flex-row justify-between items-end px-6 pt-6 pb-4 w-full rounded-t-xl", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9133
|
+
Text_default,
|
|
9134
|
+
{
|
|
9135
|
+
as: "h2",
|
|
9136
|
+
className: "text-text-950 font-semibold text-3xl leading-tight w-full flex items-center",
|
|
9137
|
+
children: displayTitle
|
|
9138
|
+
}
|
|
9139
|
+
) }),
|
|
9140
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex flex-row justify-center items-center px-6 gap-2 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text_default, { className: "text-text-600 font-normal text-lg leading-relaxed w-full text-justify", children: displayDescription }) })
|
|
9141
|
+
] })
|
|
9142
|
+
] });
|
|
9143
|
+
};
|
|
9144
|
+
var NoSearchResult_default = NoSearchResult;
|
|
9145
|
+
|
|
9095
9146
|
// src/components/VideoPlayer/VideoPlayer.tsx
|
|
9096
9147
|
var import_react29 = require("react");
|
|
9097
9148
|
var import_react_dom = require("react-dom");
|
|
@@ -9100,7 +9151,7 @@ var import_phosphor_react22 = require("phosphor-react");
|
|
|
9100
9151
|
// src/components/DownloadButton/DownloadButton.tsx
|
|
9101
9152
|
var import_react28 = require("react");
|
|
9102
9153
|
var import_phosphor_react21 = require("phosphor-react");
|
|
9103
|
-
var
|
|
9154
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
9104
9155
|
var getMimeType = (url) => {
|
|
9105
9156
|
const extension = getFileExtension(url);
|
|
9106
9157
|
const mimeTypes = {
|
|
@@ -9257,10 +9308,10 @@ var DownloadButton = ({
|
|
|
9257
9308
|
if (!hasContent) {
|
|
9258
9309
|
return null;
|
|
9259
9310
|
}
|
|
9260
|
-
return /* @__PURE__ */ (0,
|
|
9311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: cn("flex items-center", className), children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
9261
9312
|
IconButton_default,
|
|
9262
9313
|
{
|
|
9263
|
-
icon: /* @__PURE__ */ (0,
|
|
9314
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_phosphor_react21.DownloadSimple, { size: 24 }),
|
|
9264
9315
|
onClick: handleDownload,
|
|
9265
9316
|
disabled: disabled || isDownloading,
|
|
9266
9317
|
"aria-label": (() => {
|
|
@@ -9281,7 +9332,7 @@ var DownloadButton = ({
|
|
|
9281
9332
|
var DownloadButton_default = DownloadButton;
|
|
9282
9333
|
|
|
9283
9334
|
// src/components/VideoPlayer/VideoPlayer.tsx
|
|
9284
|
-
var
|
|
9335
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
9285
9336
|
var CONTROLS_HIDE_TIMEOUT = 3e3;
|
|
9286
9337
|
var LEAVE_HIDE_TIMEOUT = 1e3;
|
|
9287
9338
|
var INIT_DELAY = 100;
|
|
@@ -9297,7 +9348,7 @@ var ProgressBar2 = ({
|
|
|
9297
9348
|
progressPercentage,
|
|
9298
9349
|
onSeek,
|
|
9299
9350
|
className = "px-4 pb-2"
|
|
9300
|
-
}) => /* @__PURE__ */ (0,
|
|
9351
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
9301
9352
|
"input",
|
|
9302
9353
|
{
|
|
9303
9354
|
type: "range",
|
|
@@ -9319,17 +9370,17 @@ var VolumeControls = ({
|
|
|
9319
9370
|
onToggleMute,
|
|
9320
9371
|
iconSize = 24,
|
|
9321
9372
|
showSlider = true
|
|
9322
|
-
}) => /* @__PURE__ */ (0,
|
|
9323
|
-
/* @__PURE__ */ (0,
|
|
9373
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
9374
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
9324
9375
|
IconButton_default,
|
|
9325
9376
|
{
|
|
9326
|
-
icon: isMuted ? /* @__PURE__ */ (0,
|
|
9377
|
+
icon: isMuted ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_phosphor_react22.SpeakerSlash, { size: iconSize }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_phosphor_react22.SpeakerHigh, { size: iconSize }),
|
|
9327
9378
|
onClick: onToggleMute,
|
|
9328
9379
|
"aria-label": isMuted ? "Unmute" : "Mute",
|
|
9329
9380
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
9330
9381
|
}
|
|
9331
9382
|
),
|
|
9332
|
-
showSlider && /* @__PURE__ */ (0,
|
|
9383
|
+
showSlider && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
9333
9384
|
"input",
|
|
9334
9385
|
{
|
|
9335
9386
|
type: "range",
|
|
@@ -9386,7 +9437,7 @@ var SpeedMenu = ({
|
|
|
9386
9437
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
9387
9438
|
};
|
|
9388
9439
|
}, [showSpeedMenu, onToggleMenu]);
|
|
9389
|
-
const menuContent = /* @__PURE__ */ (0,
|
|
9440
|
+
const menuContent = /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
9390
9441
|
"div",
|
|
9391
9442
|
{
|
|
9392
9443
|
ref: speedMenuRef,
|
|
@@ -9397,7 +9448,7 @@ var SpeedMenu = ({
|
|
|
9397
9448
|
top: `${position.top}px`,
|
|
9398
9449
|
left: `${position.left}px`
|
|
9399
9450
|
},
|
|
9400
|
-
children: [0.5, 0.75, 1, 1.25, 1.5, 2].map((speed) => /* @__PURE__ */ (0,
|
|
9451
|
+
children: [0.5, 0.75, 1, 1.25, 1.5, 2].map((speed) => /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
9401
9452
|
"button",
|
|
9402
9453
|
{
|
|
9403
9454
|
role: "menuitemradio",
|
|
@@ -9414,12 +9465,12 @@ var SpeedMenu = ({
|
|
|
9414
9465
|
}
|
|
9415
9466
|
);
|
|
9416
9467
|
const portalContent = showSpeedMenu && globalThis.window !== void 0 && globalThis.document !== void 0 && !!globalThis.document?.body ? (0, import_react_dom.createPortal)(menuContent, globalThis.document.body) : null;
|
|
9417
|
-
return /* @__PURE__ */ (0,
|
|
9418
|
-
/* @__PURE__ */ (0,
|
|
9468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "relative", ref: speedMenuContainerRef, children: [
|
|
9469
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
9419
9470
|
IconButton_default,
|
|
9420
9471
|
{
|
|
9421
9472
|
ref: buttonRef,
|
|
9422
|
-
icon: /* @__PURE__ */ (0,
|
|
9473
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_phosphor_react22.DotsThreeVertical, { size: iconSize }),
|
|
9423
9474
|
onClick: onToggleMenu,
|
|
9424
9475
|
"aria-label": "Playback speed",
|
|
9425
9476
|
"aria-haspopup": "menu",
|
|
@@ -9935,10 +9986,10 @@ var VideoPlayer = ({
|
|
|
9935
9986
|
]
|
|
9936
9987
|
);
|
|
9937
9988
|
const groupedSubTitleValid = subtitles && subtitlesValidation === "valid";
|
|
9938
|
-
return /* @__PURE__ */ (0,
|
|
9939
|
-
(title || subtitleText) && /* @__PURE__ */ (0,
|
|
9940
|
-
/* @__PURE__ */ (0,
|
|
9941
|
-
title && /* @__PURE__ */ (0,
|
|
9989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: cn("flex flex-col", className), children: [
|
|
9990
|
+
(title || subtitleText) && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "bg-subject-1 px-8 py-4 flex items-end justify-between min-h-20", children: [
|
|
9991
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
9992
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
9942
9993
|
Text_default,
|
|
9943
9994
|
{
|
|
9944
9995
|
as: "h2",
|
|
@@ -9949,7 +10000,7 @@ var VideoPlayer = ({
|
|
|
9949
10000
|
children: title
|
|
9950
10001
|
}
|
|
9951
10002
|
),
|
|
9952
|
-
subtitleText && /* @__PURE__ */ (0,
|
|
10003
|
+
subtitleText && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
9953
10004
|
Text_default,
|
|
9954
10005
|
{
|
|
9955
10006
|
as: "p",
|
|
@@ -9961,7 +10012,7 @@ var VideoPlayer = ({
|
|
|
9961
10012
|
}
|
|
9962
10013
|
)
|
|
9963
10014
|
] }),
|
|
9964
|
-
showDownloadButton && downloadContent && /* @__PURE__ */ (0,
|
|
10015
|
+
showDownloadButton && downloadContent && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
9965
10016
|
DownloadButton_default,
|
|
9966
10017
|
{
|
|
9967
10018
|
content: downloadContent,
|
|
@@ -9973,7 +10024,7 @@ var VideoPlayer = ({
|
|
|
9973
10024
|
}
|
|
9974
10025
|
)
|
|
9975
10026
|
] }),
|
|
9976
|
-
/* @__PURE__ */ (0,
|
|
10027
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
9977
10028
|
"section",
|
|
9978
10029
|
{
|
|
9979
10030
|
className: cn(
|
|
@@ -9988,7 +10039,7 @@ var VideoPlayer = ({
|
|
|
9988
10039
|
onTouchStart: handleMouseEnter,
|
|
9989
10040
|
onMouseLeave: handleMouseLeave,
|
|
9990
10041
|
children: [
|
|
9991
|
-
/* @__PURE__ */ (0,
|
|
10042
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
9992
10043
|
"video",
|
|
9993
10044
|
{
|
|
9994
10045
|
ref: videoRef,
|
|
@@ -10003,7 +10054,7 @@ var VideoPlayer = ({
|
|
|
10003
10054
|
onKeyDown: handleVideoKeyDown,
|
|
10004
10055
|
tabIndex: 0,
|
|
10005
10056
|
"aria-label": title ? `Video: ${title}` : "Video player",
|
|
10006
|
-
children: /* @__PURE__ */ (0,
|
|
10057
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
10007
10058
|
"track",
|
|
10008
10059
|
{
|
|
10009
10060
|
ref: trackRef,
|
|
@@ -10016,17 +10067,17 @@ var VideoPlayer = ({
|
|
|
10016
10067
|
)
|
|
10017
10068
|
}
|
|
10018
10069
|
),
|
|
10019
|
-
!isPlaying && /* @__PURE__ */ (0,
|
|
10070
|
+
!isPlaying && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
10020
10071
|
"div",
|
|
10021
10072
|
{
|
|
10022
10073
|
className: cn(
|
|
10023
10074
|
"absolute inset-0 flex bg-black/30 transition-opacity",
|
|
10024
10075
|
getCenterPlayButtonPosition()
|
|
10025
10076
|
),
|
|
10026
|
-
children: /* @__PURE__ */ (0,
|
|
10077
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
10027
10078
|
IconButton_default,
|
|
10028
10079
|
{
|
|
10029
|
-
icon: /* @__PURE__ */ (0,
|
|
10080
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_phosphor_react22.Play, { size: 32, weight: "regular", className: "ml-1" }),
|
|
10030
10081
|
onClick: togglePlayPause,
|
|
10031
10082
|
"aria-label": "Play video",
|
|
10032
10083
|
className: "!bg-transparent !text-white !w-auto !h-auto hover:!bg-transparent hover:!text-gray-200"
|
|
@@ -10034,17 +10085,17 @@ var VideoPlayer = ({
|
|
|
10034
10085
|
)
|
|
10035
10086
|
}
|
|
10036
10087
|
),
|
|
10037
|
-
/* @__PURE__ */ (0,
|
|
10088
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
10038
10089
|
"div",
|
|
10039
10090
|
{
|
|
10040
10091
|
className: cn(
|
|
10041
10092
|
"absolute top-0 left-0 right-0 p-4 bg-gradient-to-b from-black/70 to-transparent transition-opacity",
|
|
10042
10093
|
getTopControlsOpacity()
|
|
10043
10094
|
),
|
|
10044
|
-
children: /* @__PURE__ */ (0,
|
|
10095
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "flex justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
10045
10096
|
IconButton_default,
|
|
10046
10097
|
{
|
|
10047
|
-
icon: isFullscreen ? /* @__PURE__ */ (0,
|
|
10098
|
+
icon: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_phosphor_react22.ArrowsInSimple, { size: 24 }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_phosphor_react22.ArrowsOutSimple, { size: 24 }),
|
|
10048
10099
|
onClick: toggleFullscreen,
|
|
10049
10100
|
"aria-label": isFullscreen ? "Exit fullscreen" : "Enter fullscreen",
|
|
10050
10101
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
@@ -10052,7 +10103,7 @@ var VideoPlayer = ({
|
|
|
10052
10103
|
) })
|
|
10053
10104
|
}
|
|
10054
10105
|
),
|
|
10055
|
-
/* @__PURE__ */ (0,
|
|
10106
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
10056
10107
|
"div",
|
|
10057
10108
|
{
|
|
10058
10109
|
className: cn(
|
|
@@ -10060,7 +10111,7 @@ var VideoPlayer = ({
|
|
|
10060
10111
|
getBottomControlsOpacity()
|
|
10061
10112
|
),
|
|
10062
10113
|
children: [
|
|
10063
|
-
/* @__PURE__ */ (0,
|
|
10114
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
10064
10115
|
ProgressBar2,
|
|
10065
10116
|
{
|
|
10066
10117
|
currentTime,
|
|
@@ -10070,7 +10121,7 @@ var VideoPlayer = ({
|
|
|
10070
10121
|
className: getProgressBarPadding()
|
|
10071
10122
|
}
|
|
10072
10123
|
),
|
|
10073
|
-
/* @__PURE__ */ (0,
|
|
10124
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
10074
10125
|
"div",
|
|
10075
10126
|
{
|
|
10076
10127
|
className: cn(
|
|
@@ -10078,17 +10129,17 @@ var VideoPlayer = ({
|
|
|
10078
10129
|
getControlsPadding()
|
|
10079
10130
|
),
|
|
10080
10131
|
children: [
|
|
10081
|
-
/* @__PURE__ */ (0,
|
|
10082
|
-
/* @__PURE__ */ (0,
|
|
10132
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: cn("flex items-center", getControlsGap()), children: [
|
|
10133
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
10083
10134
|
IconButton_default,
|
|
10084
10135
|
{
|
|
10085
|
-
icon: isPlaying ? /* @__PURE__ */ (0,
|
|
10136
|
+
icon: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_phosphor_react22.Pause, { size: getIconSize2() }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_phosphor_react22.Play, { size: getIconSize2() }),
|
|
10086
10137
|
onClick: togglePlayPause,
|
|
10087
10138
|
"aria-label": isPlaying ? "Pause" : "Play",
|
|
10088
10139
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
10089
10140
|
}
|
|
10090
10141
|
),
|
|
10091
|
-
/* @__PURE__ */ (0,
|
|
10142
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
10092
10143
|
VolumeControls,
|
|
10093
10144
|
{
|
|
10094
10145
|
volume,
|
|
@@ -10099,10 +10150,10 @@ var VideoPlayer = ({
|
|
|
10099
10150
|
showSlider: !isUltraSmallMobile
|
|
10100
10151
|
}
|
|
10101
10152
|
),
|
|
10102
|
-
groupedSubTitleValid && /* @__PURE__ */ (0,
|
|
10153
|
+
groupedSubTitleValid && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
10103
10154
|
IconButton_default,
|
|
10104
10155
|
{
|
|
10105
|
-
icon: /* @__PURE__ */ (0,
|
|
10156
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_phosphor_react22.ClosedCaptioning, { size: getIconSize2() }),
|
|
10106
10157
|
onClick: toggleCaptions,
|
|
10107
10158
|
"aria-label": showCaptions ? "Hide captions" : "Show captions",
|
|
10108
10159
|
className: cn(
|
|
@@ -10111,13 +10162,13 @@ var VideoPlayer = ({
|
|
|
10111
10162
|
)
|
|
10112
10163
|
}
|
|
10113
10164
|
),
|
|
10114
|
-
/* @__PURE__ */ (0,
|
|
10165
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Text_default, { size: "sm", weight: "medium", color: "text-white", children: [
|
|
10115
10166
|
formatTime(currentTime),
|
|
10116
10167
|
" / ",
|
|
10117
10168
|
formatTime(duration)
|
|
10118
10169
|
] })
|
|
10119
10170
|
] }),
|
|
10120
|
-
/* @__PURE__ */ (0,
|
|
10171
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "flex items-center gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
10121
10172
|
SpeedMenu,
|
|
10122
10173
|
{
|
|
10123
10174
|
showSpeedMenu,
|
|
@@ -10145,7 +10196,7 @@ var VideoPlayer_default = VideoPlayer;
|
|
|
10145
10196
|
// src/components/Whiteboard/Whiteboard.tsx
|
|
10146
10197
|
var import_react30 = require("react");
|
|
10147
10198
|
var import_phosphor_react23 = require("phosphor-react");
|
|
10148
|
-
var
|
|
10199
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
10149
10200
|
var IMAGE_WIDTH = 225;
|
|
10150
10201
|
var IMAGE_HEIGHT = 90;
|
|
10151
10202
|
var Whiteboard = ({
|
|
@@ -10183,7 +10234,7 @@ var Whiteboard = ({
|
|
|
10183
10234
|
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"
|
|
10184
10235
|
}[imagesPerRow];
|
|
10185
10236
|
if (!images || images.length === 0) {
|
|
10186
|
-
return /* @__PURE__ */ (0,
|
|
10237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10187
10238
|
"div",
|
|
10188
10239
|
{
|
|
10189
10240
|
className: cn(
|
|
@@ -10191,11 +10242,11 @@ var Whiteboard = ({
|
|
|
10191
10242
|
className
|
|
10192
10243
|
),
|
|
10193
10244
|
...rest,
|
|
10194
|
-
children: /* @__PURE__ */ (0,
|
|
10245
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-gray-400 text-sm", children: "Nenhuma imagem dispon\xEDvel" })
|
|
10195
10246
|
}
|
|
10196
10247
|
);
|
|
10197
10248
|
}
|
|
10198
|
-
return /* @__PURE__ */ (0,
|
|
10249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10199
10250
|
"div",
|
|
10200
10251
|
{
|
|
10201
10252
|
className: cn(
|
|
@@ -10203,7 +10254,7 @@ var Whiteboard = ({
|
|
|
10203
10254
|
className
|
|
10204
10255
|
),
|
|
10205
10256
|
...rest,
|
|
10206
|
-
children: /* @__PURE__ */ (0,
|
|
10257
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: cn("grid gap-4", gridColsClass), children: images.map((image) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
10207
10258
|
"div",
|
|
10208
10259
|
{
|
|
10209
10260
|
className: "relative group overflow-hidden bg-gray-100 rounded-lg",
|
|
@@ -10211,7 +10262,7 @@ var Whiteboard = ({
|
|
|
10211
10262
|
width: `${IMAGE_WIDTH}px`
|
|
10212
10263
|
},
|
|
10213
10264
|
children: [
|
|
10214
|
-
/* @__PURE__ */ (0,
|
|
10265
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10215
10266
|
"div",
|
|
10216
10267
|
{
|
|
10217
10268
|
className: "relative",
|
|
@@ -10219,8 +10270,8 @@ var Whiteboard = ({
|
|
|
10219
10270
|
width: `${IMAGE_WIDTH}px`,
|
|
10220
10271
|
height: `${IMAGE_HEIGHT}px`
|
|
10221
10272
|
},
|
|
10222
|
-
children: imageErrors.has(image.id) ? /* @__PURE__ */ (0,
|
|
10223
|
-
/* @__PURE__ */ (0,
|
|
10273
|
+
children: imageErrors.has(image.id) ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "absolute inset-0 flex items-center justify-center bg-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-gray-500 text-sm text-center px-2", children: "Imagem indispon\xEDvel" }) }) : /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
10274
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10224
10275
|
"img",
|
|
10225
10276
|
{
|
|
10226
10277
|
src: image.imageUrl,
|
|
@@ -10230,18 +10281,18 @@ var Whiteboard = ({
|
|
|
10230
10281
|
onError: () => handleImageError(image.id)
|
|
10231
10282
|
}
|
|
10232
10283
|
),
|
|
10233
|
-
/* @__PURE__ */ (0,
|
|
10284
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "absolute inset-0 bg-gradient-to-t from-black/20 to-transparent" })
|
|
10234
10285
|
] })
|
|
10235
10286
|
}
|
|
10236
10287
|
),
|
|
10237
|
-
showDownload && /* @__PURE__ */ (0,
|
|
10288
|
+
showDownload && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10238
10289
|
"button",
|
|
10239
10290
|
{
|
|
10240
10291
|
type: "button",
|
|
10241
10292
|
onClick: () => handleDownload(image),
|
|
10242
10293
|
className: "cursor-pointer absolute bottom-3 right-3 flex items-center justify-center bg-black/20 backdrop-blur-sm rounded hover:bg-black/30 transition-colors duration-200 group/button w-6 h-6",
|
|
10243
10294
|
"aria-label": `Download ${image.title || "imagem"}`,
|
|
10244
|
-
children: /* @__PURE__ */ (0,
|
|
10295
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
10245
10296
|
import_phosphor_react23.ArrowsOut,
|
|
10246
10297
|
{
|
|
10247
10298
|
size: 24,
|
|
@@ -10263,7 +10314,7 @@ var Whiteboard_default = Whiteboard;
|
|
|
10263
10314
|
// src/components/Auth/Auth.tsx
|
|
10264
10315
|
var import_react31 = require("react");
|
|
10265
10316
|
var import_react_router_dom = require("react-router-dom");
|
|
10266
|
-
var
|
|
10317
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
10267
10318
|
var AuthContext = (0, import_react31.createContext)(void 0);
|
|
10268
10319
|
var AuthProvider = ({
|
|
10269
10320
|
children,
|
|
@@ -10333,7 +10384,7 @@ var AuthProvider = ({
|
|
|
10333
10384
|
}),
|
|
10334
10385
|
[authState, checkAuth, signOut]
|
|
10335
10386
|
);
|
|
10336
|
-
return /* @__PURE__ */ (0,
|
|
10387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(AuthContext.Provider, { value: contextValue, children });
|
|
10337
10388
|
};
|
|
10338
10389
|
var useAuth = () => {
|
|
10339
10390
|
const context = (0, import_react31.useContext)(AuthContext);
|
|
@@ -10349,9 +10400,9 @@ var ProtectedRoute = ({
|
|
|
10349
10400
|
additionalCheck
|
|
10350
10401
|
}) => {
|
|
10351
10402
|
const { isAuthenticated, isLoading, ...authState } = useAuth();
|
|
10352
|
-
const defaultLoadingComponent = /* @__PURE__ */ (0,
|
|
10403
|
+
const defaultLoadingComponent = /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "text-text-950 text-lg", children: "Carregando..." }) });
|
|
10353
10404
|
if (isLoading) {
|
|
10354
|
-
return /* @__PURE__ */ (0,
|
|
10405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx_runtime50.Fragment, { children: loadingComponent || defaultLoadingComponent });
|
|
10355
10406
|
}
|
|
10356
10407
|
if (!isAuthenticated) {
|
|
10357
10408
|
if (typeof window !== "undefined") {
|
|
@@ -10362,12 +10413,12 @@ var ProtectedRoute = ({
|
|
|
10362
10413
|
return null;
|
|
10363
10414
|
}
|
|
10364
10415
|
}
|
|
10365
|
-
return /* @__PURE__ */ (0,
|
|
10416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_router_dom.Navigate, { to: redirectTo, replace: true });
|
|
10366
10417
|
}
|
|
10367
10418
|
if (additionalCheck && !additionalCheck({ isAuthenticated, isLoading, ...authState })) {
|
|
10368
|
-
return /* @__PURE__ */ (0,
|
|
10419
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_router_dom.Navigate, { to: redirectTo, replace: true });
|
|
10369
10420
|
}
|
|
10370
|
-
return /* @__PURE__ */ (0,
|
|
10421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx_runtime50.Fragment, { children });
|
|
10371
10422
|
};
|
|
10372
10423
|
var PublicRoute = ({
|
|
10373
10424
|
children,
|
|
@@ -10377,15 +10428,15 @@ var PublicRoute = ({
|
|
|
10377
10428
|
}) => {
|
|
10378
10429
|
const { isAuthenticated, isLoading } = useAuth();
|
|
10379
10430
|
if (checkAuthBeforeRender && isLoading) {
|
|
10380
|
-
return /* @__PURE__ */ (0,
|
|
10431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "text-text-950 text-lg", children: "Carregando..." }) });
|
|
10381
10432
|
}
|
|
10382
10433
|
if (isAuthenticated && redirectIfAuthenticated) {
|
|
10383
|
-
return /* @__PURE__ */ (0,
|
|
10434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_router_dom.Navigate, { to: redirectTo, replace: true });
|
|
10384
10435
|
}
|
|
10385
|
-
return /* @__PURE__ */ (0,
|
|
10436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx_runtime50.Fragment, { children });
|
|
10386
10437
|
};
|
|
10387
10438
|
var withAuth = (Component, options = {}) => {
|
|
10388
|
-
return (props) => /* @__PURE__ */ (0,
|
|
10439
|
+
return (props) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ProtectedRoute, { ...options, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Component, { ...props }) });
|
|
10389
10440
|
};
|
|
10390
10441
|
var useAuthGuard = (options = {}) => {
|
|
10391
10442
|
const authState = useAuth();
|
|
@@ -10400,7 +10451,7 @@ var useAuthGuard = (options = {}) => {
|
|
|
10400
10451
|
var useRouteAuth = (fallbackPath = "/") => {
|
|
10401
10452
|
const { isAuthenticated, isLoading } = useAuth();
|
|
10402
10453
|
const location = (0, import_react_router_dom.useLocation)();
|
|
10403
|
-
const redirectToLogin = () => /* @__PURE__ */ (0,
|
|
10454
|
+
const redirectToLogin = () => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_router_dom.Navigate, { to: fallbackPath, state: { from: location }, replace: true });
|
|
10404
10455
|
return {
|
|
10405
10456
|
isAuthenticated,
|
|
10406
10457
|
isLoading,
|
|
@@ -10436,7 +10487,7 @@ var getRootDomain = () => {
|
|
|
10436
10487
|
// src/components/Accordation/Accordation.tsx
|
|
10437
10488
|
var import_react32 = require("react");
|
|
10438
10489
|
var import_phosphor_react24 = require("phosphor-react");
|
|
10439
|
-
var
|
|
10490
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
10440
10491
|
var CardAccordation = (0, import_react32.forwardRef)(
|
|
10441
10492
|
({
|
|
10442
10493
|
trigger,
|
|
@@ -10475,7 +10526,7 @@ var CardAccordation = (0, import_react32.forwardRef)(
|
|
|
10475
10526
|
handleToggle();
|
|
10476
10527
|
}
|
|
10477
10528
|
};
|
|
10478
|
-
return /* @__PURE__ */ (0,
|
|
10529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
10479
10530
|
CardBase,
|
|
10480
10531
|
{
|
|
10481
10532
|
ref,
|
|
@@ -10485,7 +10536,7 @@ var CardAccordation = (0, import_react32.forwardRef)(
|
|
|
10485
10536
|
className: cn("overflow-hidden", className),
|
|
10486
10537
|
...props,
|
|
10487
10538
|
children: [
|
|
10488
|
-
/* @__PURE__ */ (0,
|
|
10539
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
10489
10540
|
"button",
|
|
10490
10541
|
{
|
|
10491
10542
|
id: headerId,
|
|
@@ -10503,7 +10554,7 @@ var CardAccordation = (0, import_react32.forwardRef)(
|
|
|
10503
10554
|
"data-value": value,
|
|
10504
10555
|
children: [
|
|
10505
10556
|
trigger,
|
|
10506
|
-
/* @__PURE__ */ (0,
|
|
10557
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
10507
10558
|
import_phosphor_react24.CaretRight,
|
|
10508
10559
|
{
|
|
10509
10560
|
size: 20,
|
|
@@ -10518,7 +10569,7 @@ var CardAccordation = (0, import_react32.forwardRef)(
|
|
|
10518
10569
|
]
|
|
10519
10570
|
}
|
|
10520
10571
|
),
|
|
10521
|
-
/* @__PURE__ */ (0,
|
|
10572
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
10522
10573
|
"section",
|
|
10523
10574
|
{
|
|
10524
10575
|
id: contentId,
|
|
@@ -10530,7 +10581,7 @@ var CardAccordation = (0, import_react32.forwardRef)(
|
|
|
10530
10581
|
),
|
|
10531
10582
|
"data-testid": "accordion-content",
|
|
10532
10583
|
"data-value": value,
|
|
10533
|
-
children: /* @__PURE__ */ (0,
|
|
10584
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "p-4 pt-0", children })
|
|
10534
10585
|
}
|
|
10535
10586
|
)
|
|
10536
10587
|
]
|
|
@@ -10543,7 +10594,7 @@ CardAccordation.displayName = "CardAccordation";
|
|
|
10543
10594
|
// src/components/Accordation/AccordionGroup.tsx
|
|
10544
10595
|
var import_react33 = require("react");
|
|
10545
10596
|
var import_zustand9 = require("zustand");
|
|
10546
|
-
var
|
|
10597
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
10547
10598
|
function createAccordionGroupStore(type, initialValue, collapsible) {
|
|
10548
10599
|
return (0, import_zustand9.create)((set, get) => ({
|
|
10549
10600
|
type,
|
|
@@ -10683,7 +10734,7 @@ var AccordionGroup = (0, import_react33.forwardRef)(
|
|
|
10683
10734
|
indexRef,
|
|
10684
10735
|
handleItemToggle
|
|
10685
10736
|
);
|
|
10686
|
-
return /* @__PURE__ */ (0,
|
|
10737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { ref, className, ...props, children: enhancedChildren });
|
|
10687
10738
|
}
|
|
10688
10739
|
);
|
|
10689
10740
|
AccordionGroup.displayName = "AccordionGroup";
|
|
@@ -10691,7 +10742,7 @@ AccordionGroup.displayName = "AccordionGroup";
|
|
|
10691
10742
|
// src/components/Alternative/Alternative.tsx
|
|
10692
10743
|
var import_phosphor_react25 = require("phosphor-react");
|
|
10693
10744
|
var import_react34 = require("react");
|
|
10694
|
-
var
|
|
10745
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
10695
10746
|
var AlternativesList = ({
|
|
10696
10747
|
alternatives,
|
|
10697
10748
|
name,
|
|
@@ -10722,9 +10773,9 @@ var AlternativesList = ({
|
|
|
10722
10773
|
const getStatusBadge2 = (status) => {
|
|
10723
10774
|
switch (status) {
|
|
10724
10775
|
case "correct":
|
|
10725
|
-
return /* @__PURE__ */ (0,
|
|
10776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_phosphor_react25.CheckCircle, {}), children: "Resposta correta" });
|
|
10726
10777
|
case "incorrect":
|
|
10727
|
-
return /* @__PURE__ */ (0,
|
|
10778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_phosphor_react25.XCircle, {}), children: "Resposta incorreta" });
|
|
10728
10779
|
default:
|
|
10729
10780
|
return null;
|
|
10730
10781
|
}
|
|
@@ -10754,10 +10805,10 @@ var AlternativesList = ({
|
|
|
10754
10805
|
const renderRadio = () => {
|
|
10755
10806
|
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"}`;
|
|
10756
10807
|
const dotClasses = "w-3 h-3 rounded-full bg-primary-950 transition-all duration-200";
|
|
10757
|
-
return /* @__PURE__ */ (0,
|
|
10808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: radioClasses, children: isUserSelected && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: dotClasses }) });
|
|
10758
10809
|
};
|
|
10759
10810
|
if (layout === "detailed") {
|
|
10760
|
-
return /* @__PURE__ */ (0,
|
|
10811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
10761
10812
|
"div",
|
|
10762
10813
|
{
|
|
10763
10814
|
className: cn(
|
|
@@ -10765,11 +10816,11 @@ var AlternativesList = ({
|
|
|
10765
10816
|
statusStyles,
|
|
10766
10817
|
alternative.disabled ? "opacity-50" : ""
|
|
10767
10818
|
),
|
|
10768
|
-
children: /* @__PURE__ */ (0,
|
|
10769
|
-
/* @__PURE__ */ (0,
|
|
10770
|
-
/* @__PURE__ */ (0,
|
|
10771
|
-
/* @__PURE__ */ (0,
|
|
10772
|
-
/* @__PURE__ */ (0,
|
|
10819
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
10820
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
10821
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "mt-1", children: renderRadio() }),
|
|
10822
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex-1", children: [
|
|
10823
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
10773
10824
|
"p",
|
|
10774
10825
|
{
|
|
10775
10826
|
className: cn(
|
|
@@ -10779,16 +10830,16 @@ var AlternativesList = ({
|
|
|
10779
10830
|
children: alternative.label
|
|
10780
10831
|
}
|
|
10781
10832
|
),
|
|
10782
|
-
alternative.description && /* @__PURE__ */ (0,
|
|
10833
|
+
alternative.description && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
|
|
10783
10834
|
] })
|
|
10784
10835
|
] }),
|
|
10785
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
10836
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
10786
10837
|
] })
|
|
10787
10838
|
},
|
|
10788
10839
|
alternativeId
|
|
10789
10840
|
);
|
|
10790
10841
|
}
|
|
10791
|
-
return /* @__PURE__ */ (0,
|
|
10842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
10792
10843
|
"div",
|
|
10793
10844
|
{
|
|
10794
10845
|
className: cn(
|
|
@@ -10797,9 +10848,9 @@ var AlternativesList = ({
|
|
|
10797
10848
|
alternative.disabled ? "opacity-50" : ""
|
|
10798
10849
|
),
|
|
10799
10850
|
children: [
|
|
10800
|
-
/* @__PURE__ */ (0,
|
|
10851
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
10801
10852
|
renderRadio(),
|
|
10802
|
-
/* @__PURE__ */ (0,
|
|
10853
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
10803
10854
|
"span",
|
|
10804
10855
|
{
|
|
10805
10856
|
className: cn(
|
|
@@ -10810,14 +10861,14 @@ var AlternativesList = ({
|
|
|
10810
10861
|
}
|
|
10811
10862
|
)
|
|
10812
10863
|
] }),
|
|
10813
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
10864
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
10814
10865
|
]
|
|
10815
10866
|
},
|
|
10816
10867
|
alternativeId
|
|
10817
10868
|
);
|
|
10818
10869
|
};
|
|
10819
10870
|
if (isReadonly) {
|
|
10820
|
-
return /* @__PURE__ */ (0,
|
|
10871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
10821
10872
|
"div",
|
|
10822
10873
|
{
|
|
10823
10874
|
className: cn("flex flex-col", getLayoutClasses(), "w-full", className),
|
|
@@ -10827,7 +10878,7 @@ var AlternativesList = ({
|
|
|
10827
10878
|
}
|
|
10828
10879
|
);
|
|
10829
10880
|
}
|
|
10830
|
-
return /* @__PURE__ */ (0,
|
|
10881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
10831
10882
|
RadioGroup,
|
|
10832
10883
|
{
|
|
10833
10884
|
name: groupName,
|
|
@@ -10844,7 +10895,7 @@ var AlternativesList = ({
|
|
|
10844
10895
|
const statusStyles = getStatusStyles2(alternative.status, false);
|
|
10845
10896
|
const statusBadge = getStatusBadge2(alternative.status);
|
|
10846
10897
|
if (layout === "detailed") {
|
|
10847
|
-
return /* @__PURE__ */ (0,
|
|
10898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
10848
10899
|
"div",
|
|
10849
10900
|
{
|
|
10850
10901
|
className: cn(
|
|
@@ -10852,9 +10903,9 @@ var AlternativesList = ({
|
|
|
10852
10903
|
statusStyles,
|
|
10853
10904
|
alternative.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
10854
10905
|
),
|
|
10855
|
-
children: /* @__PURE__ */ (0,
|
|
10856
|
-
/* @__PURE__ */ (0,
|
|
10857
|
-
/* @__PURE__ */ (0,
|
|
10906
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
10907
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
10908
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
10858
10909
|
RadioGroupItem,
|
|
10859
10910
|
{
|
|
10860
10911
|
value: alternative.value,
|
|
@@ -10863,8 +10914,8 @@ var AlternativesList = ({
|
|
|
10863
10914
|
className: "mt-1"
|
|
10864
10915
|
}
|
|
10865
10916
|
),
|
|
10866
|
-
/* @__PURE__ */ (0,
|
|
10867
|
-
/* @__PURE__ */ (0,
|
|
10917
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex-1", children: [
|
|
10918
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
10868
10919
|
"label",
|
|
10869
10920
|
{
|
|
10870
10921
|
htmlFor: alternativeId,
|
|
@@ -10876,16 +10927,16 @@ var AlternativesList = ({
|
|
|
10876
10927
|
children: alternative.label
|
|
10877
10928
|
}
|
|
10878
10929
|
),
|
|
10879
|
-
alternative.description && /* @__PURE__ */ (0,
|
|
10930
|
+
alternative.description && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
|
|
10880
10931
|
] })
|
|
10881
10932
|
] }),
|
|
10882
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
10933
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
10883
10934
|
] })
|
|
10884
10935
|
},
|
|
10885
10936
|
alternativeId
|
|
10886
10937
|
);
|
|
10887
10938
|
}
|
|
10888
|
-
return /* @__PURE__ */ (0,
|
|
10939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
10889
10940
|
"div",
|
|
10890
10941
|
{
|
|
10891
10942
|
className: cn(
|
|
@@ -10894,8 +10945,8 @@ var AlternativesList = ({
|
|
|
10894
10945
|
alternative.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
10895
10946
|
),
|
|
10896
10947
|
children: [
|
|
10897
|
-
/* @__PURE__ */ (0,
|
|
10898
|
-
/* @__PURE__ */ (0,
|
|
10948
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
10949
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
10899
10950
|
RadioGroupItem,
|
|
10900
10951
|
{
|
|
10901
10952
|
value: alternative.value,
|
|
@@ -10903,7 +10954,7 @@ var AlternativesList = ({
|
|
|
10903
10954
|
disabled: alternative.disabled
|
|
10904
10955
|
}
|
|
10905
10956
|
),
|
|
10906
|
-
/* @__PURE__ */ (0,
|
|
10957
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
10907
10958
|
"label",
|
|
10908
10959
|
{
|
|
10909
10960
|
htmlFor: alternativeId,
|
|
@@ -10916,7 +10967,7 @@ var AlternativesList = ({
|
|
|
10916
10967
|
}
|
|
10917
10968
|
)
|
|
10918
10969
|
] }),
|
|
10919
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
10970
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
10920
10971
|
]
|
|
10921
10972
|
},
|
|
10922
10973
|
alternativeId
|
|
@@ -10927,7 +10978,7 @@ var AlternativesList = ({
|
|
|
10927
10978
|
};
|
|
10928
10979
|
var HeaderAlternative = (0, import_react34.forwardRef)(
|
|
10929
10980
|
({ className, title, subTitle, content, ...props }, ref) => {
|
|
10930
|
-
return /* @__PURE__ */ (0,
|
|
10981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
10931
10982
|
"div",
|
|
10932
10983
|
{
|
|
10933
10984
|
ref,
|
|
@@ -10937,11 +10988,11 @@ var HeaderAlternative = (0, import_react34.forwardRef)(
|
|
|
10937
10988
|
),
|
|
10938
10989
|
...props,
|
|
10939
10990
|
children: [
|
|
10940
|
-
/* @__PURE__ */ (0,
|
|
10941
|
-
/* @__PURE__ */ (0,
|
|
10942
|
-
/* @__PURE__ */ (0,
|
|
10991
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: "flex flex-col", children: [
|
|
10992
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-text-950 font-bold text-lg", children: title }),
|
|
10993
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-text-700 text-sm ", children: subTitle })
|
|
10943
10994
|
] }),
|
|
10944
|
-
/* @__PURE__ */ (0,
|
|
10995
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-text-950 text-md", children: content })
|
|
10945
10996
|
]
|
|
10946
10997
|
}
|
|
10947
10998
|
);
|
|
@@ -11238,6 +11289,7 @@ var useQuizStore = (0, import_zustand10.create)()(
|
|
|
11238
11289
|
userId: "",
|
|
11239
11290
|
variant: "default",
|
|
11240
11291
|
minuteCallback: null,
|
|
11292
|
+
dissertativeCharLimit: void 0,
|
|
11241
11293
|
questionsResult: null,
|
|
11242
11294
|
currentQuestionResult: null,
|
|
11243
11295
|
// Setters
|
|
@@ -11247,6 +11299,8 @@ var useQuizStore = (0, import_zustand10.create)()(
|
|
|
11247
11299
|
getUserId: () => get().userId,
|
|
11248
11300
|
setVariant: (variant) => set({ variant }),
|
|
11249
11301
|
setQuestionResult: (questionsResult) => set({ questionsResult }),
|
|
11302
|
+
setDissertativeCharLimit: (limit) => set({ dissertativeCharLimit: limit }),
|
|
11303
|
+
getDissertativeCharLimit: () => get().dissertativeCharLimit,
|
|
11250
11304
|
// Navigation
|
|
11251
11305
|
goToNextQuestion: () => {
|
|
11252
11306
|
const { currentQuestionIndex, getTotalQuestions } = get();
|
|
@@ -11336,7 +11390,7 @@ var useQuizStore = (0, import_zustand10.create)()(
|
|
|
11336
11390
|
});
|
|
11337
11391
|
},
|
|
11338
11392
|
selectDissertativeAnswer: (questionId, answer) => {
|
|
11339
|
-
const { quiz, userAnswers } = get();
|
|
11393
|
+
const { quiz, userAnswers, dissertativeCharLimit } = get();
|
|
11340
11394
|
if (!quiz) return;
|
|
11341
11395
|
const activityId = quiz.id;
|
|
11342
11396
|
const userId = get().getUserId();
|
|
@@ -11347,6 +11401,10 @@ var useQuizStore = (0, import_zustand10.create)()(
|
|
|
11347
11401
|
if (!question || question.questionType !== "DISSERTATIVA" /* DISSERTATIVA */) {
|
|
11348
11402
|
return;
|
|
11349
11403
|
}
|
|
11404
|
+
let validatedAnswer = answer;
|
|
11405
|
+
if (dissertativeCharLimit !== void 0 && answer.length > dissertativeCharLimit) {
|
|
11406
|
+
validatedAnswer = answer.substring(0, dissertativeCharLimit);
|
|
11407
|
+
}
|
|
11350
11408
|
const existingAnswerIndex = userAnswers.findIndex(
|
|
11351
11409
|
(answerItem) => answerItem.questionId === questionId
|
|
11352
11410
|
);
|
|
@@ -11354,7 +11412,7 @@ var useQuizStore = (0, import_zustand10.create)()(
|
|
|
11354
11412
|
questionId,
|
|
11355
11413
|
activityId,
|
|
11356
11414
|
userId,
|
|
11357
|
-
answer,
|
|
11415
|
+
answer: validatedAnswer,
|
|
11358
11416
|
optionId: null,
|
|
11359
11417
|
questionType: "DISSERTATIVA" /* DISSERTATIVA */,
|
|
11360
11418
|
answerStatus: "PENDENTE_AVALIACAO" /* PENDENTE_AVALIACAO */
|
|
@@ -11467,6 +11525,7 @@ var useQuizStore = (0, import_zustand10.create)()(
|
|
|
11467
11525
|
userId: "",
|
|
11468
11526
|
variant: "default",
|
|
11469
11527
|
minuteCallback: null,
|
|
11528
|
+
dissertativeCharLimit: void 0,
|
|
11470
11529
|
questionsResult: null,
|
|
11471
11530
|
currentQuestionResult: null
|
|
11472
11531
|
});
|
|
@@ -11730,7 +11789,7 @@ var import_react38 = require("react");
|
|
|
11730
11789
|
// src/components/MultipleChoice/MultipleChoice.tsx
|
|
11731
11790
|
var import_react37 = require("react");
|
|
11732
11791
|
var import_phosphor_react26 = require("phosphor-react");
|
|
11733
|
-
var
|
|
11792
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
11734
11793
|
var MultipleChoiceList = ({
|
|
11735
11794
|
disabled = false,
|
|
11736
11795
|
className = "",
|
|
@@ -11747,9 +11806,9 @@ var MultipleChoiceList = ({
|
|
|
11747
11806
|
const getStatusBadge2 = (status) => {
|
|
11748
11807
|
switch (status) {
|
|
11749
11808
|
case "correct":
|
|
11750
|
-
return /* @__PURE__ */ (0,
|
|
11809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_phosphor_react26.CheckCircle, {}), children: "Resposta correta" });
|
|
11751
11810
|
case "incorrect":
|
|
11752
|
-
return /* @__PURE__ */ (0,
|
|
11811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_phosphor_react26.XCircle, {}), children: "Resposta incorreta" });
|
|
11753
11812
|
default:
|
|
11754
11813
|
return null;
|
|
11755
11814
|
}
|
|
@@ -11770,14 +11829,14 @@ var MultipleChoiceList = ({
|
|
|
11770
11829
|
isSelected ? "border-primary-950 bg-primary-950 text-text" : "border-border-400 bg-background",
|
|
11771
11830
|
isDisabled && "opacity-40 cursor-not-allowed"
|
|
11772
11831
|
);
|
|
11773
|
-
return /* @__PURE__ */ (0,
|
|
11832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: checkboxClasses, children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(import_phosphor_react26.Check, { size: 16, weight: "bold" }) });
|
|
11774
11833
|
};
|
|
11775
11834
|
if (mode === "readonly") {
|
|
11776
|
-
return /* @__PURE__ */ (0,
|
|
11835
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: cn("flex flex-col gap-2", className), children: choices.map((choice, i) => {
|
|
11777
11836
|
const isSelected = actualValue?.includes(choice.value) || false;
|
|
11778
11837
|
const statusStyles = getStatusStyles2(choice.status);
|
|
11779
11838
|
const statusBadge = getStatusBadge2(choice.status);
|
|
11780
|
-
return /* @__PURE__ */ (0,
|
|
11839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
11781
11840
|
"div",
|
|
11782
11841
|
{
|
|
11783
11842
|
className: cn(
|
|
@@ -11786,9 +11845,9 @@ var MultipleChoiceList = ({
|
|
|
11786
11845
|
choice.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
11787
11846
|
),
|
|
11788
11847
|
children: [
|
|
11789
|
-
/* @__PURE__ */ (0,
|
|
11848
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
11790
11849
|
renderVisualCheckbox(isSelected, choice.disabled || disabled),
|
|
11791
|
-
/* @__PURE__ */ (0,
|
|
11850
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
11792
11851
|
"span",
|
|
11793
11852
|
{
|
|
11794
11853
|
className: cn(
|
|
@@ -11800,14 +11859,14 @@ var MultipleChoiceList = ({
|
|
|
11800
11859
|
}
|
|
11801
11860
|
)
|
|
11802
11861
|
] }),
|
|
11803
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
11862
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
11804
11863
|
]
|
|
11805
11864
|
},
|
|
11806
11865
|
`readonly-${choice.value}-${i}`
|
|
11807
11866
|
);
|
|
11808
11867
|
}) });
|
|
11809
11868
|
}
|
|
11810
|
-
return /* @__PURE__ */ (0,
|
|
11869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
11811
11870
|
"div",
|
|
11812
11871
|
{
|
|
11813
11872
|
className: cn(
|
|
@@ -11815,7 +11874,7 @@ var MultipleChoiceList = ({
|
|
|
11815
11874
|
disabled ? "opacity-50 cursor-not-allowed" : "",
|
|
11816
11875
|
className
|
|
11817
11876
|
),
|
|
11818
|
-
children: /* @__PURE__ */ (0,
|
|
11877
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
11819
11878
|
CheckboxList_default,
|
|
11820
11879
|
{
|
|
11821
11880
|
name,
|
|
@@ -11825,12 +11884,12 @@ var MultipleChoiceList = ({
|
|
|
11825
11884
|
onHandleSelectedValues?.(v);
|
|
11826
11885
|
},
|
|
11827
11886
|
disabled,
|
|
11828
|
-
children: choices.map((choice, i) => /* @__PURE__ */ (0,
|
|
11887
|
+
children: choices.map((choice, i) => /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
11829
11888
|
"div",
|
|
11830
11889
|
{
|
|
11831
11890
|
className: "flex flex-row gap-2 items-center",
|
|
11832
11891
|
children: [
|
|
11833
|
-
/* @__PURE__ */ (0,
|
|
11892
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
11834
11893
|
CheckboxListItem,
|
|
11835
11894
|
{
|
|
11836
11895
|
value: choice.value,
|
|
@@ -11838,7 +11897,7 @@ var MultipleChoiceList = ({
|
|
|
11838
11897
|
disabled: choice.disabled || disabled
|
|
11839
11898
|
}
|
|
11840
11899
|
),
|
|
11841
|
-
/* @__PURE__ */ (0,
|
|
11900
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
11842
11901
|
"label",
|
|
11843
11902
|
{
|
|
11844
11903
|
htmlFor: `interactive-${choice.value}-${i}`,
|
|
@@ -11867,13 +11926,13 @@ var import_phosphor_react27 = require("phosphor-react");
|
|
|
11867
11926
|
var mock_image_question_default = "./mock-image-question-HEZCLFDL.png";
|
|
11868
11927
|
|
|
11869
11928
|
// src/components/Quiz/QuizContent.tsx
|
|
11870
|
-
var
|
|
11929
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
11871
11930
|
var getStatusBadge = (status) => {
|
|
11872
11931
|
switch (status) {
|
|
11873
11932
|
case "correct":
|
|
11874
|
-
return /* @__PURE__ */ (0,
|
|
11933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_phosphor_react27.CheckCircle, {}), children: "Resposta correta" });
|
|
11875
11934
|
case "incorrect":
|
|
11876
|
-
return /* @__PURE__ */ (0,
|
|
11935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_phosphor_react27.XCircle, {}), children: "Resposta incorreta" });
|
|
11877
11936
|
default:
|
|
11878
11937
|
return null;
|
|
11879
11938
|
}
|
|
@@ -11888,11 +11947,11 @@ var getStatusStyles = (variantCorrect) => {
|
|
|
11888
11947
|
};
|
|
11889
11948
|
var QuizSubTitle = (0, import_react38.forwardRef)(
|
|
11890
11949
|
({ subTitle, ...props }, ref) => {
|
|
11891
|
-
return /* @__PURE__ */ (0,
|
|
11950
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "px-4 pb-2 pt-6", ...props, ref, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "font-bold text-lg text-text-950", children: subTitle }) });
|
|
11892
11951
|
}
|
|
11893
11952
|
);
|
|
11894
11953
|
var QuizContainer = (0, import_react38.forwardRef)(({ children, className, ...props }, ref) => {
|
|
11895
|
-
return /* @__PURE__ */ (0,
|
|
11954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
11896
11955
|
"div",
|
|
11897
11956
|
{
|
|
11898
11957
|
ref,
|
|
@@ -11945,10 +12004,10 @@ var QuizAlternative = ({ paddingBottom }) => {
|
|
|
11945
12004
|
};
|
|
11946
12005
|
});
|
|
11947
12006
|
if (!alternatives)
|
|
11948
|
-
return /* @__PURE__ */ (0,
|
|
11949
|
-
return /* @__PURE__ */ (0,
|
|
11950
|
-
/* @__PURE__ */ (0,
|
|
11951
|
-
/* @__PURE__ */ (0,
|
|
12007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { children: "N\xE3o h\xE1 Alternativas" }) });
|
|
12008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
12009
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
12010
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
11952
12011
|
AlternativesList,
|
|
11953
12012
|
{
|
|
11954
12013
|
mode: variant === "default" ? "interactive" : "readonly",
|
|
@@ -12051,10 +12110,10 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
|
|
|
12051
12110
|
};
|
|
12052
12111
|
});
|
|
12053
12112
|
if (!choices)
|
|
12054
|
-
return /* @__PURE__ */ (0,
|
|
12055
|
-
return /* @__PURE__ */ (0,
|
|
12056
|
-
/* @__PURE__ */ (0,
|
|
12057
|
-
/* @__PURE__ */ (0,
|
|
12113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { children: "N\xE3o h\xE1 Escolhas Multiplas" }) });
|
|
12114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
12115
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
12116
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
12058
12117
|
MultipleChoiceList,
|
|
12059
12118
|
{
|
|
12060
12119
|
choices,
|
|
@@ -12073,7 +12132,8 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
12073
12132
|
getCurrentAnswer,
|
|
12074
12133
|
selectDissertativeAnswer,
|
|
12075
12134
|
getQuestionResultByQuestionId,
|
|
12076
|
-
variant
|
|
12135
|
+
variant,
|
|
12136
|
+
getDissertativeCharLimit
|
|
12077
12137
|
} = useQuizStore();
|
|
12078
12138
|
const currentQuestion = getCurrentQuestion();
|
|
12079
12139
|
const currentQuestionResult = getQuestionResultByQuestionId(
|
|
@@ -12081,6 +12141,7 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
12081
12141
|
);
|
|
12082
12142
|
const currentAnswer = getCurrentAnswer();
|
|
12083
12143
|
const textareaRef = (0, import_react38.useRef)(null);
|
|
12144
|
+
const charLimit = getDissertativeCharLimit();
|
|
12084
12145
|
const handleAnswerChange = (value) => {
|
|
12085
12146
|
if (currentQuestion) {
|
|
12086
12147
|
selectDissertativeAnswer(currentQuestion.id, value);
|
|
@@ -12100,12 +12161,12 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
12100
12161
|
adjustTextareaHeight();
|
|
12101
12162
|
}, [currentAnswer, adjustTextareaHeight]);
|
|
12102
12163
|
if (!currentQuestion) {
|
|
12103
|
-
return /* @__PURE__ */ (0,
|
|
12164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "text-text-600 text-md", children: "Nenhuma quest\xE3o dispon\xEDvel" }) });
|
|
12104
12165
|
}
|
|
12105
12166
|
const localAnswer = (variant == "result" ? currentQuestionResult?.answer : currentAnswer?.answer) || "";
|
|
12106
|
-
return /* @__PURE__ */ (0,
|
|
12107
|
-
/* @__PURE__ */ (0,
|
|
12108
|
-
/* @__PURE__ */ (0,
|
|
12167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
12168
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(QuizSubTitle, { subTitle: "Resposta" }),
|
|
12169
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(QuizContainer, { className: cn(variant != "result" && paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "space-y-4 max-h-[600px] overflow-y-auto", children: variant === "default" ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
12109
12170
|
TextArea_default,
|
|
12110
12171
|
{
|
|
12111
12172
|
ref: textareaRef,
|
|
@@ -12113,12 +12174,14 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
12113
12174
|
value: localAnswer,
|
|
12114
12175
|
onChange: (e) => handleAnswerChange(e.target.value),
|
|
12115
12176
|
rows: 4,
|
|
12116
|
-
className: "min-h-[120px] max-h-[400px] resize-none overflow-y-auto"
|
|
12117
|
-
|
|
12118
|
-
|
|
12119
|
-
|
|
12120
|
-
|
|
12121
|
-
|
|
12177
|
+
className: "min-h-[120px] max-h-[400px] resize-none overflow-y-auto",
|
|
12178
|
+
maxLength: charLimit,
|
|
12179
|
+
showCharacterCount: !!charLimit
|
|
12180
|
+
}
|
|
12181
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: localAnswer || "Nenhuma resposta fornecida" }) }) }) }),
|
|
12182
|
+
variant === "result" && currentQuestionResult?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
12183
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(QuizSubTitle, { subTitle: "Observa\xE7\xE3o do professor" }),
|
|
12184
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: currentQuestionResult?.teacherFeedback }) })
|
|
12122
12185
|
] })
|
|
12123
12186
|
] });
|
|
12124
12187
|
};
|
|
@@ -12144,16 +12207,16 @@ var QuizTrueOrFalse = ({ paddingBottom }) => {
|
|
|
12144
12207
|
];
|
|
12145
12208
|
const getLetterByIndex = (index) => String.fromCodePoint(97 + index);
|
|
12146
12209
|
const isDefaultVariant = variant === "default";
|
|
12147
|
-
return /* @__PURE__ */ (0,
|
|
12148
|
-
/* @__PURE__ */ (0,
|
|
12149
|
-
/* @__PURE__ */ (0,
|
|
12210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
12211
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
12212
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
12150
12213
|
const variantCorrect = option.isCorrect ? "correct" : "incorrect";
|
|
12151
|
-
return /* @__PURE__ */ (0,
|
|
12214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
12152
12215
|
"section",
|
|
12153
12216
|
{
|
|
12154
12217
|
className: "flex flex-col gap-2",
|
|
12155
12218
|
children: [
|
|
12156
|
-
/* @__PURE__ */ (0,
|
|
12219
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
12157
12220
|
"div",
|
|
12158
12221
|
{
|
|
12159
12222
|
className: cn(
|
|
@@ -12161,20 +12224,20 @@ var QuizTrueOrFalse = ({ paddingBottom }) => {
|
|
|
12161
12224
|
isDefaultVariant ? "" : getStatusStyles(variantCorrect)
|
|
12162
12225
|
),
|
|
12163
12226
|
children: [
|
|
12164
|
-
/* @__PURE__ */ (0,
|
|
12165
|
-
isDefaultVariant ? /* @__PURE__ */ (0,
|
|
12166
|
-
/* @__PURE__ */ (0,
|
|
12167
|
-
/* @__PURE__ */ (0,
|
|
12168
|
-
/* @__PURE__ */ (0,
|
|
12169
|
-
/* @__PURE__ */ (0,
|
|
12227
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index).concat(") ").concat(option.label) }),
|
|
12228
|
+
isDefaultVariant ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Select_default, { size: "medium", children: [
|
|
12229
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SelectValue, { placeholder: "Selecione opc\xE3o" }) }),
|
|
12230
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(SelectContent, { children: [
|
|
12231
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SelectItem, { value: "V", children: "Verdadeiro" }),
|
|
12232
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SelectItem, { value: "F", children: "Falso" })
|
|
12170
12233
|
] })
|
|
12171
|
-
] }) : /* @__PURE__ */ (0,
|
|
12234
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "flex-shrink-0", children: getStatusBadge(variantCorrect) })
|
|
12172
12235
|
]
|
|
12173
12236
|
}
|
|
12174
12237
|
),
|
|
12175
|
-
!isDefaultVariant && /* @__PURE__ */ (0,
|
|
12176
|
-
/* @__PURE__ */ (0,
|
|
12177
|
-
!option.isCorrect && /* @__PURE__ */ (0,
|
|
12238
|
+
!isDefaultVariant && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
12239
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "text-text-800 text-2xs", children: "Resposta selecionada: V" }),
|
|
12240
|
+
!option.isCorrect && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "text-text-800 text-2xs", children: "Resposta correta: F" })
|
|
12178
12241
|
] })
|
|
12179
12242
|
]
|
|
12180
12243
|
},
|
|
@@ -12264,13 +12327,13 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
12264
12327
|
const assignedDots = new Set(
|
|
12265
12328
|
userAnswers.map((a) => a.dotOption).filter(Boolean)
|
|
12266
12329
|
);
|
|
12267
|
-
return /* @__PURE__ */ (0,
|
|
12268
|
-
/* @__PURE__ */ (0,
|
|
12269
|
-
/* @__PURE__ */ (0,
|
|
12330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
12331
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
12332
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
12270
12333
|
const answer = userAnswers[index];
|
|
12271
12334
|
const variantCorrect = answer.isCorrect ? "correct" : "incorrect";
|
|
12272
|
-
return /* @__PURE__ */ (0,
|
|
12273
|
-
/* @__PURE__ */ (0,
|
|
12335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("section", { className: "flex flex-col gap-2", children: [
|
|
12336
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
12274
12337
|
"div",
|
|
12275
12338
|
{
|
|
12276
12339
|
className: cn(
|
|
@@ -12278,30 +12341,30 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
12278
12341
|
isDefaultVariant ? "" : getStatusStyles(variantCorrect)
|
|
12279
12342
|
),
|
|
12280
12343
|
children: [
|
|
12281
|
-
/* @__PURE__ */ (0,
|
|
12282
|
-
isDefaultVariant ? /* @__PURE__ */ (0,
|
|
12344
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index) + ") " + option.label }),
|
|
12345
|
+
isDefaultVariant ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
12283
12346
|
Select_default,
|
|
12284
12347
|
{
|
|
12285
12348
|
size: "medium",
|
|
12286
12349
|
value: answer.dotOption || void 0,
|
|
12287
12350
|
onValueChange: (value) => handleSelectDot(index, value),
|
|
12288
12351
|
children: [
|
|
12289
|
-
/* @__PURE__ */ (0,
|
|
12290
|
-
/* @__PURE__ */ (0,
|
|
12352
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SelectValue, { placeholder: "Selecione op\xE7\xE3o" }) }),
|
|
12353
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SelectContent, { children: dotsOptions.filter(
|
|
12291
12354
|
(dot) => !assignedDots.has(dot.label) || answer.dotOption === dot.label
|
|
12292
|
-
).map((dot) => /* @__PURE__ */ (0,
|
|
12355
|
+
).map((dot) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SelectItem, { value: dot.label, children: dot.label }, dot.label)) })
|
|
12293
12356
|
]
|
|
12294
12357
|
}
|
|
12295
|
-
) : /* @__PURE__ */ (0,
|
|
12358
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "flex-shrink-0", children: answer.isCorrect === null ? null : getStatusBadge(variantCorrect) })
|
|
12296
12359
|
]
|
|
12297
12360
|
}
|
|
12298
12361
|
),
|
|
12299
|
-
!isDefaultVariant && /* @__PURE__ */ (0,
|
|
12300
|
-
/* @__PURE__ */ (0,
|
|
12362
|
+
!isDefaultVariant && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
12363
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("p", { className: "text-text-800 text-2xs", children: [
|
|
12301
12364
|
"Resposta selecionada: ",
|
|
12302
12365
|
answer.dotOption || "Nenhuma"
|
|
12303
12366
|
] }),
|
|
12304
|
-
!answer.isCorrect && /* @__PURE__ */ (0,
|
|
12367
|
+
!answer.isCorrect && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("p", { className: "text-text-800 text-2xs", children: [
|
|
12305
12368
|
"Resposta correta: ",
|
|
12306
12369
|
answer.correctOption
|
|
12307
12370
|
] })
|
|
@@ -12370,18 +12433,18 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
12370
12433
|
const mockAnswer = mockUserAnswers.find(
|
|
12371
12434
|
(answer) => answer.selectId === selectId
|
|
12372
12435
|
);
|
|
12373
|
-
return /* @__PURE__ */ (0,
|
|
12436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "inline-flex mb-2.5 text-success-600 font-semibold text-md border-b-2 border-success-600", children: mockAnswer?.correctAnswer });
|
|
12374
12437
|
};
|
|
12375
12438
|
const renderDefaultElement = (selectId, startIndex, selectedValue, availableOptionsForThisSelect) => {
|
|
12376
|
-
return /* @__PURE__ */ (0,
|
|
12439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
12377
12440
|
Select_default,
|
|
12378
12441
|
{
|
|
12379
12442
|
value: selectedValue,
|
|
12380
12443
|
onValueChange: (value) => handleSelectChange(selectId, value),
|
|
12381
12444
|
className: "inline-flex mb-2.5",
|
|
12382
12445
|
children: [
|
|
12383
|
-
/* @__PURE__ */ (0,
|
|
12384
|
-
/* @__PURE__ */ (0,
|
|
12446
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SelectTrigger, { className: "inline-flex w-auto min-w-[140px] h-8 mx-1 bg-background border-gray-300", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SelectValue, { placeholder: "Selecione op\xE7\xE3o" }) }),
|
|
12447
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SelectContent, { children: availableOptionsForThisSelect.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(SelectItem, { value: option, children: option }, `${option}-${index}`)) })
|
|
12385
12448
|
]
|
|
12386
12449
|
},
|
|
12387
12450
|
`${selectId}-${startIndex}`
|
|
@@ -12393,8 +12456,8 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
12393
12456
|
);
|
|
12394
12457
|
if (!mockAnswer) return null;
|
|
12395
12458
|
const action = mockAnswer.isCorrect ? "success" : "error";
|
|
12396
|
-
const icon = mockAnswer.isCorrect ? /* @__PURE__ */ (0,
|
|
12397
|
-
return /* @__PURE__ */ (0,
|
|
12459
|
+
const icon = mockAnswer.isCorrect ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_phosphor_react27.CheckCircle, {}) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_phosphor_react27.XCircle, {});
|
|
12460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
12398
12461
|
Badge_default,
|
|
12399
12462
|
{
|
|
12400
12463
|
variant: "solid",
|
|
@@ -12402,7 +12465,7 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
12402
12465
|
iconRight: icon,
|
|
12403
12466
|
size: "large",
|
|
12404
12467
|
className: "py-3 w-[180px] justify-between mb-2.5",
|
|
12405
|
-
children: /* @__PURE__ */ (0,
|
|
12468
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "text-text-900", children: mockAnswer.userAnswer })
|
|
12406
12469
|
},
|
|
12407
12470
|
selectId
|
|
12408
12471
|
);
|
|
@@ -12458,25 +12521,25 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
12458
12521
|
}
|
|
12459
12522
|
return elements;
|
|
12460
12523
|
};
|
|
12461
|
-
return /* @__PURE__ */ (0,
|
|
12462
|
-
/* @__PURE__ */ (0,
|
|
12463
|
-
/* @__PURE__ */ (0,
|
|
12524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
12525
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
12526
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(QuizContainer, { className: "h-auto pb-0", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "space-y-6 px-4 h-auto", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
12464
12527
|
"div",
|
|
12465
12528
|
{
|
|
12466
12529
|
className: cn(
|
|
12467
12530
|
"text-lg text-text-900 leading-8 h-auto",
|
|
12468
12531
|
variant != "result" && paddingBottom
|
|
12469
12532
|
),
|
|
12470
|
-
children: renderTextWithSelects(exampleText).map((element) => /* @__PURE__ */ (0,
|
|
12533
|
+
children: renderTextWithSelects(exampleText).map((element) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { children: element.element }, element.id))
|
|
12471
12534
|
}
|
|
12472
12535
|
) }) }),
|
|
12473
|
-
variant === "result" && /* @__PURE__ */ (0,
|
|
12474
|
-
/* @__PURE__ */ (0,
|
|
12475
|
-
/* @__PURE__ */ (0,
|
|
12536
|
+
variant === "result" && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
12537
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(QuizSubTitle, { subTitle: "Resultado" }),
|
|
12538
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(QuizContainer, { className: "h-auto pb-0", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "space-y-6 px-4", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
12476
12539
|
"div",
|
|
12477
12540
|
{
|
|
12478
12541
|
className: cn("text-lg text-text-900 leading-8", paddingBottom),
|
|
12479
|
-
children: renderTextWithSelects(exampleText, true).map((element) => /* @__PURE__ */ (0,
|
|
12542
|
+
children: renderTextWithSelects(exampleText, true).map((element) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { children: element.element }, element.id))
|
|
12480
12543
|
}
|
|
12481
12544
|
) }) })
|
|
12482
12545
|
] })
|
|
@@ -12530,36 +12593,36 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
12530
12593
|
}
|
|
12531
12594
|
return "bg-success-600/70 border-white";
|
|
12532
12595
|
};
|
|
12533
|
-
return /* @__PURE__ */ (0,
|
|
12534
|
-
/* @__PURE__ */ (0,
|
|
12535
|
-
/* @__PURE__ */ (0,
|
|
12596
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
12597
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(QuizSubTitle, { subTitle: "Clique na \xE1rea correta" }),
|
|
12598
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
12536
12599
|
"div",
|
|
12537
12600
|
{
|
|
12538
12601
|
"data-testid": "quiz-image-container",
|
|
12539
12602
|
className: "space-y-6 p-3 relative inline-block",
|
|
12540
12603
|
children: [
|
|
12541
|
-
variant == "result" && /* @__PURE__ */ (0,
|
|
12604
|
+
variant == "result" && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
12542
12605
|
"div",
|
|
12543
12606
|
{
|
|
12544
12607
|
"data-testid": "quiz-legend",
|
|
12545
12608
|
className: "flex items-center gap-4 text-xs",
|
|
12546
12609
|
children: [
|
|
12547
|
-
/* @__PURE__ */ (0,
|
|
12548
|
-
/* @__PURE__ */ (0,
|
|
12549
|
-
/* @__PURE__ */ (0,
|
|
12610
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
12611
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "w-3 h-3 rounded-full bg-indicator-primary/70 border border-[#F8CC2E]" }),
|
|
12612
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "text-text-600 font-medium text-sm", children: "\xC1rea correta" })
|
|
12550
12613
|
] }),
|
|
12551
|
-
/* @__PURE__ */ (0,
|
|
12552
|
-
/* @__PURE__ */ (0,
|
|
12553
|
-
/* @__PURE__ */ (0,
|
|
12614
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
12615
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "w-3 h-3 rounded-full bg-success-600/70 border border-white" }),
|
|
12616
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "text-text-600 font-medium text-sm", children: "Resposta correta" })
|
|
12554
12617
|
] }),
|
|
12555
|
-
/* @__PURE__ */ (0,
|
|
12556
|
-
/* @__PURE__ */ (0,
|
|
12557
|
-
/* @__PURE__ */ (0,
|
|
12618
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
12619
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "w-3 h-3 rounded-full bg-indicator-error/70 border border-white" }),
|
|
12620
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "text-text-600 font-medium text-sm", children: "Resposta incorreta" })
|
|
12558
12621
|
] })
|
|
12559
12622
|
]
|
|
12560
12623
|
}
|
|
12561
12624
|
),
|
|
12562
|
-
/* @__PURE__ */ (0,
|
|
12625
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
12563
12626
|
"button",
|
|
12564
12627
|
{
|
|
12565
12628
|
"data-testid": "quiz-image-button",
|
|
@@ -12574,7 +12637,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
12574
12637
|
},
|
|
12575
12638
|
"aria-label": "\xC1rea da imagem interativa",
|
|
12576
12639
|
children: [
|
|
12577
|
-
/* @__PURE__ */ (0,
|
|
12640
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
12578
12641
|
"img",
|
|
12579
12642
|
{
|
|
12580
12643
|
"data-testid": "quiz-image",
|
|
@@ -12583,7 +12646,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
12583
12646
|
className: "w-full h-auto rounded-md"
|
|
12584
12647
|
}
|
|
12585
12648
|
),
|
|
12586
|
-
variant === "result" && /* @__PURE__ */ (0,
|
|
12649
|
+
variant === "result" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
12587
12650
|
"div",
|
|
12588
12651
|
{
|
|
12589
12652
|
"data-testid": "quiz-correct-circle",
|
|
@@ -12598,7 +12661,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
12598
12661
|
}
|
|
12599
12662
|
}
|
|
12600
12663
|
),
|
|
12601
|
-
clickPositionRelative && /* @__PURE__ */ (0,
|
|
12664
|
+
clickPositionRelative && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
12602
12665
|
"div",
|
|
12603
12666
|
{
|
|
12604
12667
|
"data-testid": "quiz-user-circle",
|
|
@@ -12623,7 +12686,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
12623
12686
|
};
|
|
12624
12687
|
|
|
12625
12688
|
// src/components/Quiz/Quiz.tsx
|
|
12626
|
-
var
|
|
12689
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
12627
12690
|
var getQuizTypeConfig = (type) => {
|
|
12628
12691
|
const QUIZ_TYPE_CONFIG = {
|
|
12629
12692
|
["SIMULADO" /* SIMULADO */]: {
|
|
@@ -12665,7 +12728,7 @@ var Quiz = (0, import_react39.forwardRef)(({ children, className, variant = "def
|
|
|
12665
12728
|
(0, import_react39.useEffect)(() => {
|
|
12666
12729
|
setVariant(variant);
|
|
12667
12730
|
}, [variant, setVariant]);
|
|
12668
|
-
return /* @__PURE__ */ (0,
|
|
12731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { ref, className: cn("flex flex-col", className), ...props, children });
|
|
12669
12732
|
});
|
|
12670
12733
|
var QuizTitle = (0, import_react39.forwardRef)(({ className, onBack, ...props }, ref) => {
|
|
12671
12734
|
const {
|
|
@@ -12701,8 +12764,8 @@ var QuizTitle = (0, import_react39.forwardRef)(({ className, onBack, ...props },
|
|
|
12701
12764
|
const handleCancelExit = () => {
|
|
12702
12765
|
setShowExitConfirmation(false);
|
|
12703
12766
|
};
|
|
12704
|
-
return /* @__PURE__ */ (0,
|
|
12705
|
-
/* @__PURE__ */ (0,
|
|
12767
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
|
|
12768
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
12706
12769
|
"div",
|
|
12707
12770
|
{
|
|
12708
12771
|
ref,
|
|
@@ -12712,24 +12775,24 @@ var QuizTitle = (0, import_react39.forwardRef)(({ className, onBack, ...props },
|
|
|
12712
12775
|
),
|
|
12713
12776
|
...props,
|
|
12714
12777
|
children: [
|
|
12715
|
-
/* @__PURE__ */ (0,
|
|
12778
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
12716
12779
|
IconButton_default,
|
|
12717
12780
|
{
|
|
12718
|
-
icon: /* @__PURE__ */ (0,
|
|
12781
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_phosphor_react28.CaretLeft, { size: 24 }),
|
|
12719
12782
|
size: "md",
|
|
12720
12783
|
"aria-label": "Voltar",
|
|
12721
12784
|
onClick: handleBackClick
|
|
12722
12785
|
}
|
|
12723
12786
|
),
|
|
12724
|
-
/* @__PURE__ */ (0,
|
|
12725
|
-
/* @__PURE__ */ (0,
|
|
12726
|
-
/* @__PURE__ */ (0,
|
|
12787
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: "flex flex-col gap-2 text-center", children: [
|
|
12788
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
|
|
12789
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
|
|
12727
12790
|
] }),
|
|
12728
|
-
/* @__PURE__ */ (0,
|
|
12791
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "flex flex-row items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_phosphor_react28.Clock, {}), children: isStarted ? formatTime2(timeElapsed) : "00:00" }) })
|
|
12729
12792
|
]
|
|
12730
12793
|
}
|
|
12731
12794
|
),
|
|
12732
|
-
/* @__PURE__ */ (0,
|
|
12795
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
12733
12796
|
AlertDialog,
|
|
12734
12797
|
{
|
|
12735
12798
|
isOpen: showExitConfirmation,
|
|
@@ -12749,7 +12812,7 @@ var QuizHeader = () => {
|
|
|
12749
12812
|
const currentQuestion = getCurrentQuestion();
|
|
12750
12813
|
let currentId = currentQuestion && "questionId" in currentQuestion ? currentQuestion.questionId : currentQuestion?.id;
|
|
12751
12814
|
const questionIndex = getQuestionIndex(currentId);
|
|
12752
|
-
return /* @__PURE__ */ (0,
|
|
12815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
12753
12816
|
HeaderAlternative,
|
|
12754
12817
|
{
|
|
12755
12818
|
title: currentQuestion ? `Quest\xE3o ${questionIndex.toString().padStart(2, "0")}` : "Quest\xE3o",
|
|
@@ -12771,7 +12834,7 @@ var QuizContent = ({ paddingBottom }) => {
|
|
|
12771
12834
|
["IMAGEM" /* IMAGEM */]: QuizImageQuestion
|
|
12772
12835
|
};
|
|
12773
12836
|
const QuestionComponent = currentQuestion ? questionComponents[currentQuestion.questionType] : null;
|
|
12774
|
-
return QuestionComponent ? /* @__PURE__ */ (0,
|
|
12837
|
+
return QuestionComponent ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(QuestionComponent, { paddingBottom }) : null;
|
|
12775
12838
|
};
|
|
12776
12839
|
var QuizQuestionList = ({
|
|
12777
12840
|
filterType = "all",
|
|
@@ -12818,18 +12881,18 @@ var QuizQuestionList = ({
|
|
|
12818
12881
|
return "Em branco";
|
|
12819
12882
|
}
|
|
12820
12883
|
};
|
|
12821
|
-
return /* @__PURE__ */ (0,
|
|
12822
|
-
Object.entries(filteredGroupedQuestions).length == 0 && /* @__PURE__ */ (0,
|
|
12884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "space-y-6 px-4 h-full", children: [
|
|
12885
|
+
Object.entries(filteredGroupedQuestions).length == 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "flex items-center justify-center text-gray-500 py-8 h-full", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "text-lg", children: "Nenhum resultado" }) }),
|
|
12823
12886
|
Object.entries(filteredGroupedQuestions).map(
|
|
12824
|
-
([subjectId, questions]) => /* @__PURE__ */ (0,
|
|
12825
|
-
/* @__PURE__ */ (0,
|
|
12826
|
-
/* @__PURE__ */ (0,
|
|
12827
|
-
/* @__PURE__ */ (0,
|
|
12887
|
+
([subjectId, questions]) => /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("section", { className: "flex flex-col gap-2", children: [
|
|
12888
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: "pt-6 pb-4 flex flex-row gap-2", children: [
|
|
12889
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "bg-primary-500 p-1 rounded-sm flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_phosphor_react28.BookOpen, { size: 17, className: "text-white" }) }),
|
|
12890
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "text-text-800 font-bold text-lg", children: questions?.[0]?.knowledgeMatrix?.[0]?.subject?.name ?? "Sem mat\xE9ria" })
|
|
12828
12891
|
] }),
|
|
12829
|
-
/* @__PURE__ */ (0,
|
|
12892
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("ul", { className: "flex flex-col gap-2", children: questions.map((question) => {
|
|
12830
12893
|
const status = getQuestionStatus(question.id);
|
|
12831
12894
|
const questionNumber = getQuestionIndex(question.id);
|
|
12832
|
-
return /* @__PURE__ */ (0,
|
|
12895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
12833
12896
|
CardStatus,
|
|
12834
12897
|
{
|
|
12835
12898
|
header: `Quest\xE3o ${questionNumber.toString().padStart(2, "0")}`,
|
|
@@ -12936,8 +12999,8 @@ var QuizFooter = (0, import_react39.forwardRef)(
|
|
|
12936
12999
|
return;
|
|
12937
13000
|
}
|
|
12938
13001
|
};
|
|
12939
|
-
return /* @__PURE__ */ (0,
|
|
12940
|
-
/* @__PURE__ */ (0,
|
|
13002
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
|
|
13003
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
12941
13004
|
"footer",
|
|
12942
13005
|
{
|
|
12943
13006
|
ref,
|
|
@@ -12946,17 +13009,17 @@ var QuizFooter = (0, import_react39.forwardRef)(
|
|
|
12946
13009
|
className
|
|
12947
13010
|
),
|
|
12948
13011
|
...props,
|
|
12949
|
-
children: variant === "default" ? /* @__PURE__ */ (0,
|
|
12950
|
-
/* @__PURE__ */ (0,
|
|
12951
|
-
/* @__PURE__ */ (0,
|
|
13012
|
+
children: variant === "default" ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
|
|
13013
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex flex-row items-center gap-1", children: [
|
|
13014
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
12952
13015
|
IconButton_default,
|
|
12953
13016
|
{
|
|
12954
|
-
icon: /* @__PURE__ */ (0,
|
|
13017
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_phosphor_react28.SquaresFour, { size: 24, className: "text-text-950" }),
|
|
12955
13018
|
size: "md",
|
|
12956
13019
|
onClick: () => openModal("modalNavigate")
|
|
12957
13020
|
}
|
|
12958
13021
|
),
|
|
12959
|
-
isFirstQuestion ? /* @__PURE__ */ (0,
|
|
13022
|
+
isFirstQuestion ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
12960
13023
|
Button_default,
|
|
12961
13024
|
{
|
|
12962
13025
|
variant: "outline",
|
|
@@ -12967,13 +13030,13 @@ var QuizFooter = (0, import_react39.forwardRef)(
|
|
|
12967
13030
|
},
|
|
12968
13031
|
children: "Pular"
|
|
12969
13032
|
}
|
|
12970
|
-
) : /* @__PURE__ */ (0,
|
|
13033
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
12971
13034
|
Button_default,
|
|
12972
13035
|
{
|
|
12973
13036
|
size: "medium",
|
|
12974
13037
|
variant: "link",
|
|
12975
13038
|
action: "primary",
|
|
12976
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
13039
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_phosphor_react28.CaretLeft, { size: 18 }),
|
|
12977
13040
|
onClick: () => {
|
|
12978
13041
|
goToPreviousQuestion();
|
|
12979
13042
|
},
|
|
@@ -12981,7 +13044,7 @@ var QuizFooter = (0, import_react39.forwardRef)(
|
|
|
12981
13044
|
}
|
|
12982
13045
|
)
|
|
12983
13046
|
] }),
|
|
12984
|
-
!isFirstQuestion && !isLastQuestion && /* @__PURE__ */ (0,
|
|
13047
|
+
!isFirstQuestion && !isLastQuestion && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
12985
13048
|
Button_default,
|
|
12986
13049
|
{
|
|
12987
13050
|
size: "small",
|
|
@@ -12994,7 +13057,7 @@ var QuizFooter = (0, import_react39.forwardRef)(
|
|
|
12994
13057
|
children: "Pular"
|
|
12995
13058
|
}
|
|
12996
13059
|
),
|
|
12997
|
-
isLastQuestion ? /* @__PURE__ */ (0,
|
|
13060
|
+
isLastQuestion ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
12998
13061
|
Button_default,
|
|
12999
13062
|
{
|
|
13000
13063
|
size: "medium",
|
|
@@ -13003,13 +13066,13 @@ var QuizFooter = (0, import_react39.forwardRef)(
|
|
|
13003
13066
|
onClick: handleFinishQuiz,
|
|
13004
13067
|
children: "Finalizar"
|
|
13005
13068
|
}
|
|
13006
|
-
) : /* @__PURE__ */ (0,
|
|
13069
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
13007
13070
|
Button_default,
|
|
13008
13071
|
{
|
|
13009
13072
|
size: "medium",
|
|
13010
13073
|
variant: "link",
|
|
13011
13074
|
action: "primary",
|
|
13012
|
-
iconRight: /* @__PURE__ */ (0,
|
|
13075
|
+
iconRight: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_phosphor_react28.CaretRight, { size: 18 }),
|
|
13013
13076
|
disabled: !currentAnswer && !isCurrentQuestionSkipped,
|
|
13014
13077
|
onClick: () => {
|
|
13015
13078
|
goToNextQuestion();
|
|
@@ -13017,7 +13080,7 @@ var QuizFooter = (0, import_react39.forwardRef)(
|
|
|
13017
13080
|
children: "Avan\xE7ar"
|
|
13018
13081
|
}
|
|
13019
13082
|
)
|
|
13020
|
-
] }) : /* @__PURE__ */ (0,
|
|
13083
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "flex flex-row items-center justify-center w-full", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
13021
13084
|
Button_default,
|
|
13022
13085
|
{
|
|
13023
13086
|
variant: "link",
|
|
@@ -13029,7 +13092,7 @@ var QuizFooter = (0, import_react39.forwardRef)(
|
|
|
13029
13092
|
) })
|
|
13030
13093
|
}
|
|
13031
13094
|
),
|
|
13032
|
-
/* @__PURE__ */ (0,
|
|
13095
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
13033
13096
|
AlertDialog,
|
|
13034
13097
|
{
|
|
13035
13098
|
isOpen: isModalOpen("alertDialog"),
|
|
@@ -13041,7 +13104,7 @@ var QuizFooter = (0, import_react39.forwardRef)(
|
|
|
13041
13104
|
onSubmit: handleAlertSubmit
|
|
13042
13105
|
}
|
|
13043
13106
|
),
|
|
13044
|
-
/* @__PURE__ */ (0,
|
|
13107
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
13045
13108
|
Modal_default,
|
|
13046
13109
|
{
|
|
13047
13110
|
isOpen: isModalOpen("modalResult"),
|
|
@@ -13050,11 +13113,11 @@ var QuizFooter = (0, import_react39.forwardRef)(
|
|
|
13050
13113
|
closeOnEscape: false,
|
|
13051
13114
|
hideCloseButton: true,
|
|
13052
13115
|
size: "md",
|
|
13053
|
-
children: /* @__PURE__ */ (0,
|
|
13054
|
-
resultImageComponent ? /* @__PURE__ */ (0,
|
|
13055
|
-
/* @__PURE__ */ (0,
|
|
13056
|
-
/* @__PURE__ */ (0,
|
|
13057
|
-
/* @__PURE__ */ (0,
|
|
13116
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
13117
|
+
resultImageComponent ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "w-[282px] h-auto", children: resultImageComponent }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "w-[282px] h-[200px] bg-gray-100 rounded-md flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "text-gray-500 text-sm", children: "Imagem de resultado" }) }),
|
|
13118
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
13119
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("h2", { className: "text-text-950 font-bold text-lg", children: getCompletionTitle(quizType) }),
|
|
13120
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("p", { className: "text-text-500 font-sm", children: [
|
|
13058
13121
|
"Voc\xEA acertou ",
|
|
13059
13122
|
correctAnswers ?? "--",
|
|
13060
13123
|
" de ",
|
|
@@ -13063,8 +13126,8 @@ var QuizFooter = (0, import_react39.forwardRef)(
|
|
|
13063
13126
|
"quest\xF5es."
|
|
13064
13127
|
] })
|
|
13065
13128
|
] }),
|
|
13066
|
-
/* @__PURE__ */ (0,
|
|
13067
|
-
/* @__PURE__ */ (0,
|
|
13129
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: [
|
|
13130
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
13068
13131
|
Button_default,
|
|
13069
13132
|
{
|
|
13070
13133
|
variant: "outline",
|
|
@@ -13074,38 +13137,38 @@ var QuizFooter = (0, import_react39.forwardRef)(
|
|
|
13074
13137
|
children: quizTypeLabel === "Question\xE1rio" ? "Ir para aulas" : `Ir para ${quizTypeLabel.toLocaleLowerCase()}s`
|
|
13075
13138
|
}
|
|
13076
13139
|
),
|
|
13077
|
-
/* @__PURE__ */ (0,
|
|
13140
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Button_default, { className: "w-full", onClick: onDetailResult, children: "Detalhar resultado" })
|
|
13078
13141
|
] })
|
|
13079
13142
|
] })
|
|
13080
13143
|
}
|
|
13081
13144
|
),
|
|
13082
|
-
/* @__PURE__ */ (0,
|
|
13145
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
13083
13146
|
Modal_default,
|
|
13084
13147
|
{
|
|
13085
13148
|
isOpen: isModalOpen("modalNavigate"),
|
|
13086
13149
|
onClose: closeModal,
|
|
13087
13150
|
title: "Quest\xF5es",
|
|
13088
13151
|
size: "lg",
|
|
13089
|
-
children: /* @__PURE__ */ (0,
|
|
13090
|
-
/* @__PURE__ */ (0,
|
|
13091
|
-
/* @__PURE__ */ (0,
|
|
13092
|
-
/* @__PURE__ */ (0,
|
|
13093
|
-
/* @__PURE__ */ (0,
|
|
13152
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex flex-col w-full not-lg:h-[calc(100vh-200px)] lg:max-h-[687px] lg:h-[687px]", children: [
|
|
13153
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex flex-row justify-between items-center py-6 pt-6 pb-4 border-b border-border-200 flex-shrink-0", children: [
|
|
13154
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "text-text-950 font-bold text-lg", children: "Filtrar por" }),
|
|
13155
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "max-w-[266px]", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Select_default, { value: filterType, onValueChange: setFilterType, children: [
|
|
13156
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
13094
13157
|
SelectTrigger,
|
|
13095
13158
|
{
|
|
13096
13159
|
variant: "rounded",
|
|
13097
13160
|
className: "max-w-[266px] min-w-[160px]",
|
|
13098
|
-
children: /* @__PURE__ */ (0,
|
|
13161
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SelectValue, { placeholder: "Selecione uma op\xE7\xE3o" })
|
|
13099
13162
|
}
|
|
13100
13163
|
),
|
|
13101
|
-
/* @__PURE__ */ (0,
|
|
13102
|
-
/* @__PURE__ */ (0,
|
|
13103
|
-
/* @__PURE__ */ (0,
|
|
13104
|
-
/* @__PURE__ */ (0,
|
|
13164
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(SelectContent, { children: [
|
|
13165
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SelectItem, { value: "all", children: "Todas" }),
|
|
13166
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SelectItem, { value: "unanswered", children: "Em branco" }),
|
|
13167
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(SelectItem, { value: "answered", children: "Respondidas" })
|
|
13105
13168
|
] })
|
|
13106
13169
|
] }) })
|
|
13107
13170
|
] }),
|
|
13108
|
-
/* @__PURE__ */ (0,
|
|
13171
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "flex flex-col gap-2 flex-1 min-h-0 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
13109
13172
|
QuizQuestionList,
|
|
13110
13173
|
{
|
|
13111
13174
|
filterType,
|
|
@@ -13115,7 +13178,7 @@ var QuizFooter = (0, import_react39.forwardRef)(
|
|
|
13115
13178
|
] })
|
|
13116
13179
|
}
|
|
13117
13180
|
),
|
|
13118
|
-
/* @__PURE__ */ (0,
|
|
13181
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
13119
13182
|
Modal_default,
|
|
13120
13183
|
{
|
|
13121
13184
|
isOpen: isModalOpen("modalResolution"),
|
|
@@ -13125,7 +13188,7 @@ var QuizFooter = (0, import_react39.forwardRef)(
|
|
|
13125
13188
|
children: currentQuestion?.solutionExplanation
|
|
13126
13189
|
}
|
|
13127
13190
|
),
|
|
13128
|
-
/* @__PURE__ */ (0,
|
|
13191
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
13129
13192
|
Modal_default,
|
|
13130
13193
|
{
|
|
13131
13194
|
isOpen: isModalOpen("modalQuestionnaireAllCorrect"),
|
|
@@ -13134,17 +13197,17 @@ var QuizFooter = (0, import_react39.forwardRef)(
|
|
|
13134
13197
|
closeOnEscape: false,
|
|
13135
13198
|
hideCloseButton: true,
|
|
13136
13199
|
size: "md",
|
|
13137
|
-
children: /* @__PURE__ */ (0,
|
|
13138
|
-
resultImageComponent ? /* @__PURE__ */ (0,
|
|
13139
|
-
/* @__PURE__ */ (0,
|
|
13140
|
-
/* @__PURE__ */ (0,
|
|
13141
|
-
/* @__PURE__ */ (0,
|
|
13200
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
13201
|
+
resultImageComponent ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "w-[282px] h-auto", children: resultImageComponent }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "w-[282px] h-[200px] bg-gray-100 rounded-md flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "text-gray-500 text-sm", children: "Imagem de resultado" }) }),
|
|
13202
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
13203
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("h2", { className: "text-text-950 font-bold text-lg", children: "\u{1F389} Parab\xE9ns!" }),
|
|
13204
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "text-text-500 font-sm", children: "Voc\xEA concluiu o m\xF3dulo Movimento Uniforme." })
|
|
13142
13205
|
] }),
|
|
13143
|
-
/* @__PURE__ */ (0,
|
|
13206
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Button_default, { className: "w-full", onClick: onGoToNextModule, children: "Pr\xF3ximo m\xF3dulo" }) })
|
|
13144
13207
|
] })
|
|
13145
13208
|
}
|
|
13146
13209
|
),
|
|
13147
|
-
/* @__PURE__ */ (0,
|
|
13210
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
13148
13211
|
Modal_default,
|
|
13149
13212
|
{
|
|
13150
13213
|
isOpen: isModalOpen("modalQuestionnaireAllIncorrect"),
|
|
@@ -13153,16 +13216,16 @@ var QuizFooter = (0, import_react39.forwardRef)(
|
|
|
13153
13216
|
closeOnEscape: false,
|
|
13154
13217
|
hideCloseButton: true,
|
|
13155
13218
|
size: "md",
|
|
13156
|
-
children: /* @__PURE__ */ (0,
|
|
13157
|
-
resultIncorrectImageComponent ? /* @__PURE__ */ (0,
|
|
13158
|
-
/* @__PURE__ */ (0,
|
|
13159
|
-
/* @__PURE__ */ (0,
|
|
13160
|
-
/* @__PURE__ */ (0,
|
|
13161
|
-
/* @__PURE__ */ (0,
|
|
13162
|
-
/* @__PURE__ */ (0,
|
|
13219
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
13220
|
+
resultIncorrectImageComponent ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "w-[282px] h-auto", children: resultIncorrectImageComponent }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "w-[282px] h-[200px] bg-gray-100 rounded-md flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "text-gray-500 text-sm", children: "Imagem de resultado" }) }),
|
|
13221
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
13222
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("h2", { className: "text-text-950 font-bold text-lg", children: "\u{1F615} N\xE3o foi dessa vez..." }),
|
|
13223
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "text-text-500 font-sm", children: "Voc\xEA tirou 0 no question\xE1rio, mas n\xE3o se preocupe! Isso \xE9 apenas uma oportunidade de aprendizado." }),
|
|
13224
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "text-text-500 font-sm", children: "Que tal tentar novamente para melhorar sua nota? Estamos aqui para te ajudar a entender o conte\xFAdo e evoluir." }),
|
|
13225
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("p", { className: "text-text-500 font-sm", children: "Clique em Repetir Question\xE1rio e mostre do que voc\xEA \xE9 capaz! \u{1F4AA}" })
|
|
13163
13226
|
] }),
|
|
13164
|
-
/* @__PURE__ */ (0,
|
|
13165
|
-
/* @__PURE__ */ (0,
|
|
13227
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "flex flex-row justify-center items-center gap-2 w-full", children: [
|
|
13228
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
13166
13229
|
Button_default,
|
|
13167
13230
|
{
|
|
13168
13231
|
type: "button",
|
|
@@ -13176,7 +13239,7 @@ var QuizFooter = (0, import_react39.forwardRef)(
|
|
|
13176
13239
|
children: "Tentar depois"
|
|
13177
13240
|
}
|
|
13178
13241
|
),
|
|
13179
|
-
/* @__PURE__ */ (0,
|
|
13242
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
13180
13243
|
Button_default,
|
|
13181
13244
|
{
|
|
13182
13245
|
variant: "outline",
|
|
@@ -13186,7 +13249,7 @@ var QuizFooter = (0, import_react39.forwardRef)(
|
|
|
13186
13249
|
children: "Detalhar resultado"
|
|
13187
13250
|
}
|
|
13188
13251
|
),
|
|
13189
|
-
/* @__PURE__ */ (0,
|
|
13252
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
13190
13253
|
Button_default,
|
|
13191
13254
|
{
|
|
13192
13255
|
className: "w-auto",
|
|
@@ -13199,7 +13262,7 @@ var QuizFooter = (0, import_react39.forwardRef)(
|
|
|
13199
13262
|
] })
|
|
13200
13263
|
}
|
|
13201
13264
|
),
|
|
13202
|
-
/* @__PURE__ */ (0,
|
|
13265
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
13203
13266
|
AlertDialog,
|
|
13204
13267
|
{
|
|
13205
13268
|
isOpen: isModalOpen("alertDialogTryLater"),
|
|
@@ -13225,24 +13288,24 @@ var QuizFooter = (0, import_react39.forwardRef)(
|
|
|
13225
13288
|
// src/components/Quiz/QuizResult.tsx
|
|
13226
13289
|
var import_react40 = require("react");
|
|
13227
13290
|
var import_phosphor_react29 = require("phosphor-react");
|
|
13228
|
-
var
|
|
13291
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
13229
13292
|
var QuizBadge = ({
|
|
13230
13293
|
subtype
|
|
13231
13294
|
}) => {
|
|
13232
13295
|
switch (subtype) {
|
|
13233
13296
|
case "PROVA" /* PROVA */:
|
|
13234
|
-
return /* @__PURE__ */ (0,
|
|
13297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Badge_default, { variant: "examsOutlined", action: "exam2", "data-testid": "quiz-badge", children: "Prova" });
|
|
13235
13298
|
case "ENEM_PROVA_1" /* ENEM_PROVA_1 */:
|
|
13236
13299
|
case "ENEM_PROVA_2" /* ENEM_PROVA_2 */:
|
|
13237
|
-
return /* @__PURE__ */ (0,
|
|
13300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Badge_default, { variant: "examsOutlined", action: "exam1", "data-testid": "quiz-badge", children: "Enem" });
|
|
13238
13301
|
case "VESTIBULAR" /* VESTIBULAR */:
|
|
13239
|
-
return /* @__PURE__ */ (0,
|
|
13302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Badge_default, { variant: "examsOutlined", action: "exam4", "data-testid": "quiz-badge", children: "Vestibular" });
|
|
13240
13303
|
case "SIMULADO" /* SIMULADO */:
|
|
13241
13304
|
case "SIMULADAO" /* SIMULADAO */:
|
|
13242
13305
|
case void 0:
|
|
13243
|
-
return /* @__PURE__ */ (0,
|
|
13306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Badge_default, { variant: "examsOutlined", action: "exam3", "data-testid": "quiz-badge", children: "Simulad\xE3o" });
|
|
13244
13307
|
default:
|
|
13245
|
-
return /* @__PURE__ */ (0,
|
|
13308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Badge_default, { variant: "solid", action: "info", "data-testid": "quiz-badge", children: subtype });
|
|
13246
13309
|
}
|
|
13247
13310
|
};
|
|
13248
13311
|
var QuizHeaderResult = (0, import_react40.forwardRef)(
|
|
@@ -13299,7 +13362,7 @@ var QuizHeaderResult = (0, import_react40.forwardRef)(
|
|
|
13299
13362
|
return "N\xE3o foi dessa vez...voc\xEA deixou a resposta em branco";
|
|
13300
13363
|
}
|
|
13301
13364
|
};
|
|
13302
|
-
return /* @__PURE__ */ (0,
|
|
13365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
13303
13366
|
"div",
|
|
13304
13367
|
{
|
|
13305
13368
|
ref,
|
|
@@ -13310,8 +13373,8 @@ var QuizHeaderResult = (0, import_react40.forwardRef)(
|
|
|
13310
13373
|
),
|
|
13311
13374
|
...props,
|
|
13312
13375
|
children: [
|
|
13313
|
-
/* @__PURE__ */ (0,
|
|
13314
|
-
/* @__PURE__ */ (0,
|
|
13376
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-text-950 font-bold text-lg", children: "Resultado" }),
|
|
13377
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-text-700 text-md", children: getLabelByAnswersStatus() })
|
|
13315
13378
|
]
|
|
13316
13379
|
}
|
|
13317
13380
|
);
|
|
@@ -13319,7 +13382,7 @@ var QuizHeaderResult = (0, import_react40.forwardRef)(
|
|
|
13319
13382
|
);
|
|
13320
13383
|
var QuizResultHeaderTitle = (0, import_react40.forwardRef)(({ className, showBadge = true, onRepeat, canRetry, ...props }, ref) => {
|
|
13321
13384
|
const { quiz } = useQuizStore();
|
|
13322
|
-
return /* @__PURE__ */ (0,
|
|
13385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
13323
13386
|
"div",
|
|
13324
13387
|
{
|
|
13325
13388
|
ref,
|
|
@@ -13329,9 +13392,9 @@ var QuizResultHeaderTitle = (0, import_react40.forwardRef)(({ className, showBad
|
|
|
13329
13392
|
),
|
|
13330
13393
|
...props,
|
|
13331
13394
|
children: [
|
|
13332
|
-
/* @__PURE__ */ (0,
|
|
13333
|
-
/* @__PURE__ */ (0,
|
|
13334
|
-
canRetry && onRepeat && /* @__PURE__ */ (0,
|
|
13395
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: "Resultado" }),
|
|
13396
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-row gap-3 items-center", children: [
|
|
13397
|
+
canRetry && onRepeat && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
13335
13398
|
Button_default,
|
|
13336
13399
|
{
|
|
13337
13400
|
variant: "solid",
|
|
@@ -13341,7 +13404,7 @@ var QuizResultHeaderTitle = (0, import_react40.forwardRef)(({ className, showBad
|
|
|
13341
13404
|
children: "Repetir question\xE1rio"
|
|
13342
13405
|
}
|
|
13343
13406
|
),
|
|
13344
|
-
showBadge && /* @__PURE__ */ (0,
|
|
13407
|
+
showBadge && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(QuizBadge, { subtype: quiz?.subtype || void 0 })
|
|
13345
13408
|
] })
|
|
13346
13409
|
]
|
|
13347
13410
|
}
|
|
@@ -13350,7 +13413,7 @@ var QuizResultHeaderTitle = (0, import_react40.forwardRef)(({ className, showBad
|
|
|
13350
13413
|
var QuizResultTitle = (0, import_react40.forwardRef)(({ className, ...props }, ref) => {
|
|
13351
13414
|
const { getQuizTitle } = useQuizStore();
|
|
13352
13415
|
const quizTitle = getQuizTitle();
|
|
13353
|
-
return /* @__PURE__ */ (0,
|
|
13416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
13354
13417
|
"p",
|
|
13355
13418
|
{
|
|
13356
13419
|
className: cn("pt-6 pb-4 text-text-950 font-bold text-lg", className),
|
|
@@ -13411,7 +13474,7 @@ var QuizResultPerformance = (0, import_react40.forwardRef)(({ showDetails = true
|
|
|
13411
13474
|
};
|
|
13412
13475
|
const percentage = totalQuestions > 0 ? Math.round(stats.correctAnswers / totalQuestions * 100) : 0;
|
|
13413
13476
|
const classesJustifyBetween = showDetails ? "justify-between" : "justify-center";
|
|
13414
|
-
return /* @__PURE__ */ (0,
|
|
13477
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
13415
13478
|
"div",
|
|
13416
13479
|
{
|
|
13417
13480
|
className: cn(
|
|
@@ -13421,8 +13484,8 @@ var QuizResultPerformance = (0, import_react40.forwardRef)(({ showDetails = true
|
|
|
13421
13484
|
ref,
|
|
13422
13485
|
...props,
|
|
13423
13486
|
children: [
|
|
13424
|
-
/* @__PURE__ */ (0,
|
|
13425
|
-
/* @__PURE__ */ (0,
|
|
13487
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "relative", children: [
|
|
13488
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
13426
13489
|
ProgressCircle_default,
|
|
13427
13490
|
{
|
|
13428
13491
|
size: "medium",
|
|
@@ -13432,24 +13495,24 @@ var QuizResultPerformance = (0, import_react40.forwardRef)(({ showDetails = true
|
|
|
13432
13495
|
label: ""
|
|
13433
13496
|
}
|
|
13434
13497
|
),
|
|
13435
|
-
/* @__PURE__ */ (0,
|
|
13436
|
-
showDetails && /* @__PURE__ */ (0,
|
|
13437
|
-
/* @__PURE__ */ (0,
|
|
13438
|
-
/* @__PURE__ */ (0,
|
|
13498
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
13499
|
+
showDetails && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex items-center gap-1 mb-1", children: [
|
|
13500
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_phosphor_react29.Clock, { size: 12, weight: "regular", className: "text-text-800" }),
|
|
13501
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-2xs font-medium text-text-800", children: formatTime2(
|
|
13439
13502
|
(getQuestionResultStatistics()?.timeSpent ?? 0) * 60
|
|
13440
13503
|
) })
|
|
13441
13504
|
] }),
|
|
13442
|
-
/* @__PURE__ */ (0,
|
|
13505
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "text-2xl font-medium text-text-800 leading-7", children: [
|
|
13443
13506
|
getQuestionResultStatistics()?.correctAnswers ?? "--",
|
|
13444
13507
|
" de",
|
|
13445
13508
|
" ",
|
|
13446
13509
|
totalQuestions
|
|
13447
13510
|
] }),
|
|
13448
|
-
/* @__PURE__ */ (0,
|
|
13511
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "text-2xs font-medium text-text-600 mt-1", children: "Corretas" })
|
|
13449
13512
|
] })
|
|
13450
13513
|
] }),
|
|
13451
|
-
showDetails && /* @__PURE__ */ (0,
|
|
13452
|
-
/* @__PURE__ */ (0,
|
|
13514
|
+
showDetails && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-col gap-4 w-full", children: [
|
|
13515
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
13453
13516
|
ProgressBar_default,
|
|
13454
13517
|
{
|
|
13455
13518
|
className: "w-full",
|
|
@@ -13463,7 +13526,7 @@ var QuizResultPerformance = (0, import_react40.forwardRef)(({ showDetails = true
|
|
|
13463
13526
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
13464
13527
|
}
|
|
13465
13528
|
),
|
|
13466
|
-
/* @__PURE__ */ (0,
|
|
13529
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
13467
13530
|
ProgressBar_default,
|
|
13468
13531
|
{
|
|
13469
13532
|
className: "w-full",
|
|
@@ -13477,7 +13540,7 @@ var QuizResultPerformance = (0, import_react40.forwardRef)(({ showDetails = true
|
|
|
13477
13540
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
13478
13541
|
}
|
|
13479
13542
|
),
|
|
13480
|
-
/* @__PURE__ */ (0,
|
|
13543
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
13481
13544
|
ProgressBar_default,
|
|
13482
13545
|
{
|
|
13483
13546
|
className: "w-full",
|
|
@@ -13524,9 +13587,9 @@ var QuizListResult = (0, import_react40.forwardRef)(({ className, onSubjectClick
|
|
|
13524
13587
|
};
|
|
13525
13588
|
}
|
|
13526
13589
|
);
|
|
13527
|
-
return /* @__PURE__ */ (0,
|
|
13528
|
-
/* @__PURE__ */ (0,
|
|
13529
|
-
/* @__PURE__ */ (0,
|
|
13590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("section", { ref, className, ...props, children: [
|
|
13591
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Mat\xE9rias" }),
|
|
13592
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("ul", { className: "flex flex-col gap-2", children: subjectsStats.map((subject) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
13530
13593
|
CardResults,
|
|
13531
13594
|
{
|
|
13532
13595
|
onClick: () => onSubjectClick?.(subject.subject.id),
|
|
@@ -13550,16 +13613,16 @@ var QuizListResultByMateria = ({
|
|
|
13550
13613
|
const groupedQuestions = getQuestionsGroupedBySubject();
|
|
13551
13614
|
const answeredQuestions = groupedQuestions[subject] || [];
|
|
13552
13615
|
const formattedQuestions = subject == "all" ? Object.values(groupedQuestions).flat() : answeredQuestions;
|
|
13553
|
-
return /* @__PURE__ */ (0,
|
|
13554
|
-
/* @__PURE__ */ (0,
|
|
13555
|
-
/* @__PURE__ */ (0,
|
|
13556
|
-
/* @__PURE__ */ (0,
|
|
13557
|
-
/* @__PURE__ */ (0,
|
|
13616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "flex flex-col", children: [
|
|
13617
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "flex flex-row pt-4 justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: subjectName || formattedQuestions?.[0]?.knowledgeMatrix?.[0]?.subject?.name || "Sem mat\xE9ria" }) }),
|
|
13618
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("section", { className: "flex flex-col ", children: [
|
|
13619
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Resultado das quest\xF5es" }),
|
|
13620
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("ul", { className: "flex flex-col gap-2 pt-4", children: formattedQuestions.map((question) => {
|
|
13558
13621
|
const questionIndex = getQuestionIndex(
|
|
13559
13622
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13560
13623
|
question.questionId ?? question.id
|
|
13561
13624
|
);
|
|
13562
|
-
return /* @__PURE__ */ (0,
|
|
13625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
13563
13626
|
CardStatus,
|
|
13564
13627
|
{
|
|
13565
13628
|
className: "max-w-full",
|
|
@@ -13585,7 +13648,7 @@ var QuizListResultByMateria = ({
|
|
|
13585
13648
|
|
|
13586
13649
|
// src/components/BreadcrumbMenu/BreadcrumbMenu.tsx
|
|
13587
13650
|
var import_react_router_dom3 = require("react-router-dom");
|
|
13588
|
-
var
|
|
13651
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
13589
13652
|
var BreadcrumbMenu = ({
|
|
13590
13653
|
breadcrumbs,
|
|
13591
13654
|
onBreadcrumbClick,
|
|
@@ -13598,17 +13661,17 @@ var BreadcrumbMenu = ({
|
|
|
13598
13661
|
}
|
|
13599
13662
|
navigate(breadcrumb.url);
|
|
13600
13663
|
};
|
|
13601
|
-
return /* @__PURE__ */ (0,
|
|
13664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
13602
13665
|
Menu,
|
|
13603
13666
|
{
|
|
13604
13667
|
value: `breadcrumb-${breadcrumbs.length - 1}`,
|
|
13605
13668
|
defaultValue: "breadcrumb-0",
|
|
13606
13669
|
variant: "breadcrumb",
|
|
13607
13670
|
className,
|
|
13608
|
-
children: /* @__PURE__ */ (0,
|
|
13671
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(MenuContent, { className: "w-full flex flex-row flex-wrap gap-2 !px-0", children: breadcrumbs.map((breadcrumb, index) => {
|
|
13609
13672
|
const isLast = index === breadcrumbs.length - 1;
|
|
13610
13673
|
const hasSeparator = !isLast;
|
|
13611
|
-
return /* @__PURE__ */ (0,
|
|
13674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
13612
13675
|
MenuItem,
|
|
13613
13676
|
{
|
|
13614
13677
|
variant: "breadcrumb",
|
|
@@ -14154,6 +14217,7 @@ function useAppContent(config) {
|
|
|
14154
14217
|
Modal,
|
|
14155
14218
|
MultipleChoiceList,
|
|
14156
14219
|
NavButton,
|
|
14220
|
+
NoSearchResult,
|
|
14157
14221
|
NotFound,
|
|
14158
14222
|
NotificationCard,
|
|
14159
14223
|
NotificationEntityType,
|