analytica-frontend-lib 1.1.7 → 1.1.9
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/Whiteboard/index.d.mts +34 -0
- package/dist/Whiteboard/index.d.ts +34 -0
- package/dist/Whiteboard/index.js +151 -0
- package/dist/Whiteboard/index.js.map +1 -0
- package/dist/Whiteboard/index.mjs +130 -0
- package/dist/Whiteboard/index.mjs.map +1 -0
- package/dist/index.css +47 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +344 -222
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +313 -193
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +47 -0
- package/dist/styles.css.map +1 -1
- package/package.json +3 -2
package/dist/index.mjs
CHANGED
|
@@ -7205,17 +7205,135 @@ var VideoPlayer = ({
|
|
|
7205
7205
|
};
|
|
7206
7206
|
var VideoPlayer_default = VideoPlayer;
|
|
7207
7207
|
|
|
7208
|
+
// src/components/Whiteboard/Whiteboard.tsx
|
|
7209
|
+
import { useCallback as useCallback2, useState as useState14 } from "react";
|
|
7210
|
+
import { DownloadSimple } from "phosphor-react";
|
|
7211
|
+
import { Fragment as Fragment7, jsx as jsx37, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
7212
|
+
var IMAGE_WIDTH = 225;
|
|
7213
|
+
var IMAGE_HEIGHT = 90;
|
|
7214
|
+
var Whiteboard = ({
|
|
7215
|
+
images,
|
|
7216
|
+
showDownload = true,
|
|
7217
|
+
className,
|
|
7218
|
+
onDownload,
|
|
7219
|
+
imagesPerRow = 2,
|
|
7220
|
+
...rest
|
|
7221
|
+
}) => {
|
|
7222
|
+
const [imageErrors, setImageErrors] = useState14(/* @__PURE__ */ new Set());
|
|
7223
|
+
const handleDownload = useCallback2(
|
|
7224
|
+
(image) => {
|
|
7225
|
+
if (onDownload) {
|
|
7226
|
+
onDownload(image);
|
|
7227
|
+
} else {
|
|
7228
|
+
const link = document.createElement("a");
|
|
7229
|
+
link.href = image.imageUrl;
|
|
7230
|
+
link.download = image.title || `whiteboard-${image.id}`;
|
|
7231
|
+
link.target = "_blank";
|
|
7232
|
+
link.rel = "noopener noreferrer";
|
|
7233
|
+
document.body.appendChild(link);
|
|
7234
|
+
link.click();
|
|
7235
|
+
document.body.removeChild(link);
|
|
7236
|
+
}
|
|
7237
|
+
},
|
|
7238
|
+
[onDownload]
|
|
7239
|
+
);
|
|
7240
|
+
const handleImageError = useCallback2((imageId) => {
|
|
7241
|
+
setImageErrors((prev) => new Set(prev).add(imageId));
|
|
7242
|
+
}, []);
|
|
7243
|
+
const gridColsClass = images?.length === 1 ? "grid-cols-1" : {
|
|
7244
|
+
2: "grid-cols-1 sm:grid-cols-2",
|
|
7245
|
+
3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
7246
|
+
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"
|
|
7247
|
+
}[imagesPerRow];
|
|
7248
|
+
if (!images || images.length === 0) {
|
|
7249
|
+
return /* @__PURE__ */ jsx37(
|
|
7250
|
+
"div",
|
|
7251
|
+
{
|
|
7252
|
+
className: cn(
|
|
7253
|
+
"flex items-center justify-center p-8 bg-white border border-gray-100 rounded-xl",
|
|
7254
|
+
className
|
|
7255
|
+
),
|
|
7256
|
+
...rest,
|
|
7257
|
+
children: /* @__PURE__ */ jsx37("p", { className: "text-gray-400 text-sm", children: "Nenhuma imagem dispon\xEDvel" })
|
|
7258
|
+
}
|
|
7259
|
+
);
|
|
7260
|
+
}
|
|
7261
|
+
return /* @__PURE__ */ jsx37(
|
|
7262
|
+
"div",
|
|
7263
|
+
{
|
|
7264
|
+
className: cn(
|
|
7265
|
+
"flex flex-col bg-white border border-gray-100 p-4 gap-2 rounded-xl w-fit mx-auto",
|
|
7266
|
+
className
|
|
7267
|
+
),
|
|
7268
|
+
...rest,
|
|
7269
|
+
children: /* @__PURE__ */ jsx37("div", { className: cn("grid gap-4", gridColsClass), children: images.map((image) => /* @__PURE__ */ jsxs31(
|
|
7270
|
+
"div",
|
|
7271
|
+
{
|
|
7272
|
+
className: "relative group overflow-hidden bg-gray-100 rounded-lg",
|
|
7273
|
+
style: {
|
|
7274
|
+
width: `${IMAGE_WIDTH}px`
|
|
7275
|
+
},
|
|
7276
|
+
children: [
|
|
7277
|
+
/* @__PURE__ */ jsx37(
|
|
7278
|
+
"div",
|
|
7279
|
+
{
|
|
7280
|
+
className: "relative",
|
|
7281
|
+
style: {
|
|
7282
|
+
width: `${IMAGE_WIDTH}px`,
|
|
7283
|
+
height: `${IMAGE_HEIGHT}px`
|
|
7284
|
+
},
|
|
7285
|
+
children: imageErrors.has(image.id) ? /* @__PURE__ */ jsx37("div", { className: "absolute inset-0 flex items-center justify-center bg-gray-200", children: /* @__PURE__ */ jsx37("p", { className: "text-gray-500 text-sm text-center px-2", children: "Imagem indispon\xEDvel" }) }) : /* @__PURE__ */ jsxs31(Fragment7, { children: [
|
|
7286
|
+
/* @__PURE__ */ jsx37(
|
|
7287
|
+
"img",
|
|
7288
|
+
{
|
|
7289
|
+
src: image.imageUrl,
|
|
7290
|
+
alt: image.title || `Whiteboard ${image.id}`,
|
|
7291
|
+
className: "absolute inset-0 w-full h-full object-cover",
|
|
7292
|
+
loading: "lazy",
|
|
7293
|
+
onError: () => handleImageError(image.id)
|
|
7294
|
+
}
|
|
7295
|
+
),
|
|
7296
|
+
/* @__PURE__ */ jsx37("div", { className: "absolute inset-0 bg-gradient-to-t from-black/20 to-transparent" })
|
|
7297
|
+
] })
|
|
7298
|
+
}
|
|
7299
|
+
),
|
|
7300
|
+
showDownload && /* @__PURE__ */ jsx37(
|
|
7301
|
+
"button",
|
|
7302
|
+
{
|
|
7303
|
+
type: "button",
|
|
7304
|
+
onClick: () => handleDownload(image),
|
|
7305
|
+
className: "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",
|
|
7306
|
+
"aria-label": `Download ${image.title || "imagem"}`,
|
|
7307
|
+
children: /* @__PURE__ */ jsx37(
|
|
7308
|
+
DownloadSimple,
|
|
7309
|
+
{
|
|
7310
|
+
size: 24,
|
|
7311
|
+
weight: "regular",
|
|
7312
|
+
className: "text-white group-hover/button:scale-110 transition-transform duration-200"
|
|
7313
|
+
}
|
|
7314
|
+
)
|
|
7315
|
+
}
|
|
7316
|
+
)
|
|
7317
|
+
]
|
|
7318
|
+
},
|
|
7319
|
+
image.id
|
|
7320
|
+
)) })
|
|
7321
|
+
}
|
|
7322
|
+
);
|
|
7323
|
+
};
|
|
7324
|
+
var Whiteboard_default = Whiteboard;
|
|
7325
|
+
|
|
7208
7326
|
// src/components/Auth/Auth.tsx
|
|
7209
7327
|
import {
|
|
7210
7328
|
createContext,
|
|
7211
7329
|
useContext,
|
|
7212
7330
|
useEffect as useEffect12,
|
|
7213
|
-
useState as
|
|
7214
|
-
useCallback as
|
|
7331
|
+
useState as useState15,
|
|
7332
|
+
useCallback as useCallback3,
|
|
7215
7333
|
useMemo as useMemo4
|
|
7216
7334
|
} from "react";
|
|
7217
7335
|
import { useLocation, Navigate } from "react-router-dom";
|
|
7218
|
-
import { Fragment as
|
|
7336
|
+
import { Fragment as Fragment8, jsx as jsx38 } from "react/jsx-runtime";
|
|
7219
7337
|
var AuthContext = createContext(void 0);
|
|
7220
7338
|
var AuthProvider = ({
|
|
7221
7339
|
children,
|
|
@@ -7226,12 +7344,12 @@ var AuthProvider = ({
|
|
|
7226
7344
|
getSessionFn,
|
|
7227
7345
|
getTokensFn
|
|
7228
7346
|
}) => {
|
|
7229
|
-
const [authState, setAuthState] =
|
|
7347
|
+
const [authState, setAuthState] = useState15({
|
|
7230
7348
|
isAuthenticated: false,
|
|
7231
7349
|
isLoading: true,
|
|
7232
7350
|
...initialAuthState
|
|
7233
7351
|
});
|
|
7234
|
-
const checkAuth =
|
|
7352
|
+
const checkAuth = useCallback3(async () => {
|
|
7235
7353
|
try {
|
|
7236
7354
|
setAuthState((prev) => ({ ...prev, isLoading: true }));
|
|
7237
7355
|
if (!checkAuthFn) {
|
|
@@ -7262,7 +7380,7 @@ var AuthProvider = ({
|
|
|
7262
7380
|
return false;
|
|
7263
7381
|
}
|
|
7264
7382
|
}, [checkAuthFn, getUserFn, getSessionFn, getTokensFn]);
|
|
7265
|
-
const signOut =
|
|
7383
|
+
const signOut = useCallback3(() => {
|
|
7266
7384
|
if (signOutFn) {
|
|
7267
7385
|
signOutFn();
|
|
7268
7386
|
}
|
|
@@ -7285,7 +7403,7 @@ var AuthProvider = ({
|
|
|
7285
7403
|
}),
|
|
7286
7404
|
[authState, checkAuth, signOut]
|
|
7287
7405
|
);
|
|
7288
|
-
return /* @__PURE__ */
|
|
7406
|
+
return /* @__PURE__ */ jsx38(AuthContext.Provider, { value: contextValue, children });
|
|
7289
7407
|
};
|
|
7290
7408
|
var useAuth = () => {
|
|
7291
7409
|
const context = useContext(AuthContext);
|
|
@@ -7301,9 +7419,9 @@ var ProtectedRoute = ({
|
|
|
7301
7419
|
additionalCheck
|
|
7302
7420
|
}) => {
|
|
7303
7421
|
const { isAuthenticated, isLoading, ...authState } = useAuth();
|
|
7304
|
-
const defaultLoadingComponent = /* @__PURE__ */
|
|
7422
|
+
const defaultLoadingComponent = /* @__PURE__ */ jsx38("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ jsx38("div", { className: "text-text-950 text-lg", children: "Carregando..." }) });
|
|
7305
7423
|
if (isLoading) {
|
|
7306
|
-
return /* @__PURE__ */
|
|
7424
|
+
return /* @__PURE__ */ jsx38(Fragment8, { children: loadingComponent || defaultLoadingComponent });
|
|
7307
7425
|
}
|
|
7308
7426
|
if (!isAuthenticated) {
|
|
7309
7427
|
if (typeof window !== "undefined") {
|
|
@@ -7314,12 +7432,12 @@ var ProtectedRoute = ({
|
|
|
7314
7432
|
return null;
|
|
7315
7433
|
}
|
|
7316
7434
|
}
|
|
7317
|
-
return /* @__PURE__ */
|
|
7435
|
+
return /* @__PURE__ */ jsx38(Navigate, { to: redirectTo, replace: true });
|
|
7318
7436
|
}
|
|
7319
7437
|
if (additionalCheck && !additionalCheck({ isAuthenticated, isLoading, ...authState })) {
|
|
7320
|
-
return /* @__PURE__ */
|
|
7438
|
+
return /* @__PURE__ */ jsx38(Navigate, { to: redirectTo, replace: true });
|
|
7321
7439
|
}
|
|
7322
|
-
return /* @__PURE__ */
|
|
7440
|
+
return /* @__PURE__ */ jsx38(Fragment8, { children });
|
|
7323
7441
|
};
|
|
7324
7442
|
var PublicRoute = ({
|
|
7325
7443
|
children,
|
|
@@ -7329,15 +7447,15 @@ var PublicRoute = ({
|
|
|
7329
7447
|
}) => {
|
|
7330
7448
|
const { isAuthenticated, isLoading } = useAuth();
|
|
7331
7449
|
if (checkAuthBeforeRender && isLoading) {
|
|
7332
|
-
return /* @__PURE__ */
|
|
7450
|
+
return /* @__PURE__ */ jsx38("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ jsx38("div", { className: "text-text-950 text-lg", children: "Carregando..." }) });
|
|
7333
7451
|
}
|
|
7334
7452
|
if (isAuthenticated && redirectIfAuthenticated) {
|
|
7335
|
-
return /* @__PURE__ */
|
|
7453
|
+
return /* @__PURE__ */ jsx38(Navigate, { to: redirectTo, replace: true });
|
|
7336
7454
|
}
|
|
7337
|
-
return /* @__PURE__ */
|
|
7455
|
+
return /* @__PURE__ */ jsx38(Fragment8, { children });
|
|
7338
7456
|
};
|
|
7339
7457
|
var withAuth = (Component, options = {}) => {
|
|
7340
|
-
return (props) => /* @__PURE__ */
|
|
7458
|
+
return (props) => /* @__PURE__ */ jsx38(ProtectedRoute, { ...options, children: /* @__PURE__ */ jsx38(Component, { ...props }) });
|
|
7341
7459
|
};
|
|
7342
7460
|
var useAuthGuard = (options = {}) => {
|
|
7343
7461
|
const authState = useAuth();
|
|
@@ -7352,7 +7470,7 @@ var useAuthGuard = (options = {}) => {
|
|
|
7352
7470
|
var useRouteAuth = (fallbackPath = "/") => {
|
|
7353
7471
|
const { isAuthenticated, isLoading } = useAuth();
|
|
7354
7472
|
const location = useLocation();
|
|
7355
|
-
const redirectToLogin = () => /* @__PURE__ */
|
|
7473
|
+
const redirectToLogin = () => /* @__PURE__ */ jsx38(Navigate, { to: fallbackPath, state: { from: location }, replace: true });
|
|
7356
7474
|
return {
|
|
7357
7475
|
isAuthenticated,
|
|
7358
7476
|
isLoading,
|
|
@@ -7541,8 +7659,8 @@ import {
|
|
|
7541
7659
|
useEffect as useEffect14,
|
|
7542
7660
|
useMemo as useMemo6,
|
|
7543
7661
|
useId as useId10,
|
|
7544
|
-
useState as
|
|
7545
|
-
useCallback as
|
|
7662
|
+
useState as useState16,
|
|
7663
|
+
useCallback as useCallback4,
|
|
7546
7664
|
useRef as useRef10
|
|
7547
7665
|
} from "react";
|
|
7548
7666
|
|
|
@@ -8044,13 +8162,13 @@ var simulated_result_default = "./simulated-result-QN5HCUY5.png";
|
|
|
8044
8162
|
var mock_image_question_default = "./mock-image-question-HEZCLFDL.png";
|
|
8045
8163
|
|
|
8046
8164
|
// src/components/Quiz/Quiz.tsx
|
|
8047
|
-
import { Fragment as
|
|
8165
|
+
import { Fragment as Fragment9, jsx as jsx39, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
8048
8166
|
var getStatusBadge = (status) => {
|
|
8049
8167
|
switch (status) {
|
|
8050
8168
|
case "correct":
|
|
8051
|
-
return /* @__PURE__ */
|
|
8169
|
+
return /* @__PURE__ */ jsx39(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ jsx39(CheckCircle6, {}), children: "Resposta correta" });
|
|
8052
8170
|
case "incorrect":
|
|
8053
|
-
return /* @__PURE__ */
|
|
8171
|
+
return /* @__PURE__ */ jsx39(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ jsx39(XCircle5, {}), children: "Resposta incorreta" });
|
|
8054
8172
|
default:
|
|
8055
8173
|
return null;
|
|
8056
8174
|
}
|
|
@@ -8068,7 +8186,7 @@ var Quiz = forwardRef19(({ children, className, variant = "default", ...props },
|
|
|
8068
8186
|
useEffect14(() => {
|
|
8069
8187
|
setVariant(variant);
|
|
8070
8188
|
}, [variant, setVariant]);
|
|
8071
|
-
return /* @__PURE__ */
|
|
8189
|
+
return /* @__PURE__ */ jsx39(
|
|
8072
8190
|
"div",
|
|
8073
8191
|
{
|
|
8074
8192
|
ref,
|
|
@@ -8085,7 +8203,7 @@ var QuizHeaderResult = forwardRef19(
|
|
|
8085
8203
|
({ className, ...props }, ref) => {
|
|
8086
8204
|
const { getAllCurrentAnswer } = useQuizStore();
|
|
8087
8205
|
const usersAnswer = getAllCurrentAnswer();
|
|
8088
|
-
const [isCorrect, setIsCorrect] =
|
|
8206
|
+
const [isCorrect, setIsCorrect] = useState16(false);
|
|
8089
8207
|
useEffect14(() => {
|
|
8090
8208
|
if (usersAnswer) {
|
|
8091
8209
|
setIsCorrect(
|
|
@@ -8095,7 +8213,7 @@ var QuizHeaderResult = forwardRef19(
|
|
|
8095
8213
|
);
|
|
8096
8214
|
}
|
|
8097
8215
|
}, [usersAnswer]);
|
|
8098
|
-
return /* @__PURE__ */
|
|
8216
|
+
return /* @__PURE__ */ jsxs32(
|
|
8099
8217
|
"div",
|
|
8100
8218
|
{
|
|
8101
8219
|
ref,
|
|
@@ -8106,8 +8224,8 @@ var QuizHeaderResult = forwardRef19(
|
|
|
8106
8224
|
),
|
|
8107
8225
|
...props,
|
|
8108
8226
|
children: [
|
|
8109
|
-
/* @__PURE__ */
|
|
8110
|
-
/* @__PURE__ */
|
|
8227
|
+
/* @__PURE__ */ jsx39("p", { className: "text-text-950 font-bold text-lg", children: "Resultado" }),
|
|
8228
|
+
/* @__PURE__ */ jsx39("p", { className: "text-text-700 text-md", children: isCorrect ? "\u{1F389} Parab\xE9ns!!" : "N\xE3o foi dessa vez..." })
|
|
8111
8229
|
]
|
|
8112
8230
|
}
|
|
8113
8231
|
);
|
|
@@ -8125,7 +8243,7 @@ var QuizTitle = forwardRef19(
|
|
|
8125
8243
|
} = useQuizStore();
|
|
8126
8244
|
const totalQuestions = getTotalQuestions();
|
|
8127
8245
|
const quizTitle = getQuizTitle();
|
|
8128
|
-
return /* @__PURE__ */
|
|
8246
|
+
return /* @__PURE__ */ jsxs32(
|
|
8129
8247
|
"div",
|
|
8130
8248
|
{
|
|
8131
8249
|
ref,
|
|
@@ -8135,11 +8253,11 @@ var QuizTitle = forwardRef19(
|
|
|
8135
8253
|
),
|
|
8136
8254
|
...props,
|
|
8137
8255
|
children: [
|
|
8138
|
-
/* @__PURE__ */
|
|
8139
|
-
/* @__PURE__ */
|
|
8140
|
-
/* @__PURE__ */
|
|
8256
|
+
/* @__PURE__ */ jsxs32("span", { className: "flex flex-col gap-2 text-center", children: [
|
|
8257
|
+
/* @__PURE__ */ jsx39("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
|
|
8258
|
+
/* @__PURE__ */ jsx39("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
|
|
8141
8259
|
] }),
|
|
8142
|
-
/* @__PURE__ */
|
|
8260
|
+
/* @__PURE__ */ jsx39("span", { className: "absolute right-2", children: /* @__PURE__ */ jsx39(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ jsx39(Clock2, {}), children: isStarted ? formatTime2(timeElapsed) : "00:00" }) })
|
|
8143
8261
|
]
|
|
8144
8262
|
}
|
|
8145
8263
|
);
|
|
@@ -8147,13 +8265,13 @@ var QuizTitle = forwardRef19(
|
|
|
8147
8265
|
);
|
|
8148
8266
|
var QuizSubTitle = forwardRef19(
|
|
8149
8267
|
({ subTitle, ...props }, ref) => {
|
|
8150
|
-
return /* @__PURE__ */
|
|
8268
|
+
return /* @__PURE__ */ jsx39("div", { className: "px-4 pb-2 pt-6", ...props, ref, children: /* @__PURE__ */ jsx39("p", { className: "font-bold text-lg text-text-950", children: subTitle }) });
|
|
8151
8269
|
}
|
|
8152
8270
|
);
|
|
8153
8271
|
var QuizHeader = () => {
|
|
8154
8272
|
const { getCurrentQuestion, currentQuestionIndex } = useQuizStore();
|
|
8155
8273
|
const currentQuestion = getCurrentQuestion();
|
|
8156
|
-
return /* @__PURE__ */
|
|
8274
|
+
return /* @__PURE__ */ jsx39(
|
|
8157
8275
|
HeaderAlternative,
|
|
8158
8276
|
{
|
|
8159
8277
|
title: currentQuestion ? `Quest\xE3o ${currentQuestionIndex + 1}` : "Quest\xE3o",
|
|
@@ -8163,7 +8281,7 @@ var QuizHeader = () => {
|
|
|
8163
8281
|
);
|
|
8164
8282
|
};
|
|
8165
8283
|
var QuizContainer = forwardRef19(({ children, className, ...props }, ref) => {
|
|
8166
|
-
return /* @__PURE__ */
|
|
8284
|
+
return /* @__PURE__ */ jsx39(
|
|
8167
8285
|
"div",
|
|
8168
8286
|
{
|
|
8169
8287
|
ref,
|
|
@@ -8189,7 +8307,7 @@ var QuizContent = forwardRef19(({ paddingBottom }) => {
|
|
|
8189
8307
|
["IMAGEM" /* IMAGEM */]: QuizImageQuestion
|
|
8190
8308
|
};
|
|
8191
8309
|
const QuestionComponent = currentQuestion ? questionComponents[currentQuestion.type] : null;
|
|
8192
|
-
return QuestionComponent ? /* @__PURE__ */
|
|
8310
|
+
return QuestionComponent ? /* @__PURE__ */ jsx39(QuestionComponent, { variant, paddingBottom }) : null;
|
|
8193
8311
|
});
|
|
8194
8312
|
var QuizAlternative = ({
|
|
8195
8313
|
variant = "default",
|
|
@@ -8217,10 +8335,10 @@ var QuizAlternative = ({
|
|
|
8217
8335
|
};
|
|
8218
8336
|
});
|
|
8219
8337
|
if (!alternatives)
|
|
8220
|
-
return /* @__PURE__ */
|
|
8221
|
-
return /* @__PURE__ */
|
|
8222
|
-
/* @__PURE__ */
|
|
8223
|
-
/* @__PURE__ */
|
|
8338
|
+
return /* @__PURE__ */ jsx39("div", { children: /* @__PURE__ */ jsx39("p", { children: "N\xE3o h\xE1 Alternativas" }) });
|
|
8339
|
+
return /* @__PURE__ */ jsxs32(Fragment9, { children: [
|
|
8340
|
+
/* @__PURE__ */ jsx39(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
8341
|
+
/* @__PURE__ */ jsx39(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx39("div", { className: "space-y-4", children: /* @__PURE__ */ jsx39(
|
|
8224
8342
|
AlternativesList,
|
|
8225
8343
|
{
|
|
8226
8344
|
mode: variant === "default" ? "interactive" : "readonly",
|
|
@@ -8269,7 +8387,7 @@ var QuizMultipleChoice = ({
|
|
|
8269
8387
|
}
|
|
8270
8388
|
return prevSelectedValuesRef.current;
|
|
8271
8389
|
}, [selectedValues, currentQuestion?.id]);
|
|
8272
|
-
const handleSelectedValues =
|
|
8390
|
+
const handleSelectedValues = useCallback4(
|
|
8273
8391
|
(values) => {
|
|
8274
8392
|
if (currentQuestion) {
|
|
8275
8393
|
selectMultipleAnswer(currentQuestion.id, values);
|
|
@@ -8298,10 +8416,10 @@ var QuizMultipleChoice = ({
|
|
|
8298
8416
|
};
|
|
8299
8417
|
});
|
|
8300
8418
|
if (!choices)
|
|
8301
|
-
return /* @__PURE__ */
|
|
8302
|
-
return /* @__PURE__ */
|
|
8303
|
-
/* @__PURE__ */
|
|
8304
|
-
/* @__PURE__ */
|
|
8419
|
+
return /* @__PURE__ */ jsx39("div", { children: /* @__PURE__ */ jsx39("p", { children: "N\xE3o h\xE1 Escolhas Multiplas" }) });
|
|
8420
|
+
return /* @__PURE__ */ jsxs32(Fragment9, { children: [
|
|
8421
|
+
/* @__PURE__ */ jsx39(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
8422
|
+
/* @__PURE__ */ jsx39(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx39("div", { className: "space-y-4", children: /* @__PURE__ */ jsx39(
|
|
8305
8423
|
MultipleChoiceList,
|
|
8306
8424
|
{
|
|
8307
8425
|
choices,
|
|
@@ -8327,7 +8445,7 @@ var QuizDissertative = ({
|
|
|
8327
8445
|
selectDissertativeAnswer(currentQuestion.id, value);
|
|
8328
8446
|
}
|
|
8329
8447
|
};
|
|
8330
|
-
const adjustTextareaHeight =
|
|
8448
|
+
const adjustTextareaHeight = useCallback4(() => {
|
|
8331
8449
|
if (textareaRef.current) {
|
|
8332
8450
|
textareaRef.current.style.height = "auto";
|
|
8333
8451
|
const scrollHeight = textareaRef.current.scrollHeight;
|
|
@@ -8341,11 +8459,11 @@ var QuizDissertative = ({
|
|
|
8341
8459
|
adjustTextareaHeight();
|
|
8342
8460
|
}, [currentAnswer, adjustTextareaHeight]);
|
|
8343
8461
|
if (!currentQuestion) {
|
|
8344
|
-
return /* @__PURE__ */
|
|
8462
|
+
return /* @__PURE__ */ jsx39("div", { className: "space-y-4", children: /* @__PURE__ */ jsx39("p", { className: "text-text-600 text-md", children: "Nenhuma quest\xE3o dispon\xEDvel" }) });
|
|
8345
8463
|
}
|
|
8346
|
-
return /* @__PURE__ */
|
|
8347
|
-
/* @__PURE__ */
|
|
8348
|
-
/* @__PURE__ */
|
|
8464
|
+
return /* @__PURE__ */ jsxs32(Fragment9, { children: [
|
|
8465
|
+
/* @__PURE__ */ jsx39(QuizSubTitle, { subTitle: "Resposta" }),
|
|
8466
|
+
/* @__PURE__ */ jsx39(QuizContainer, { className: cn(variant != "result" && paddingBottom), children: /* @__PURE__ */ jsx39("div", { className: "space-y-4 max-h-[600px] overflow-y-auto", children: variant === "default" ? /* @__PURE__ */ jsx39("div", { className: "space-y-4", children: /* @__PURE__ */ jsx39(
|
|
8349
8467
|
TextArea_default,
|
|
8350
8468
|
{
|
|
8351
8469
|
ref: textareaRef,
|
|
@@ -8355,10 +8473,10 @@ var QuizDissertative = ({
|
|
|
8355
8473
|
rows: 4,
|
|
8356
8474
|
className: "min-h-[120px] max-h-[400px] resize-none overflow-y-auto"
|
|
8357
8475
|
}
|
|
8358
|
-
) }) : /* @__PURE__ */
|
|
8359
|
-
variant === "result" && currentAnswer?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */
|
|
8360
|
-
/* @__PURE__ */
|
|
8361
|
-
/* @__PURE__ */
|
|
8476
|
+
) }) : /* @__PURE__ */ jsx39("div", { className: "space-y-4", children: /* @__PURE__ */ jsx39("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: currentAnswer?.answer || "Nenhuma resposta fornecida" }) }) }) }),
|
|
8477
|
+
variant === "result" && currentAnswer?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */ jsxs32(Fragment9, { children: [
|
|
8478
|
+
/* @__PURE__ */ jsx39(QuizSubTitle, { subTitle: "Observa\xE7\xE3o do professor" }),
|
|
8479
|
+
/* @__PURE__ */ jsx39(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx39("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim. Mauris euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Integer euismod, urna eu tincidunt consectetur, nisi nisl aliquam nunc, eget aliquam massa nisl quis neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Suspendisse potenti. Nullam ac urna eu felis dapibus condimentum sit amet a augue. Sed non neque elit. Sed ut imperdiet nisi. Proin condimentum fermentum nunc. Etiam pharetra, erat sed fermentum feugiat, velit mauris egestas quam, ut aliquam massa nisl quis neque. Suspendisse in orci enim." }) })
|
|
8362
8480
|
] })
|
|
8363
8481
|
] });
|
|
8364
8482
|
};
|
|
@@ -8386,16 +8504,16 @@ var QuizTrueOrFalse = ({
|
|
|
8386
8504
|
];
|
|
8387
8505
|
const getLetterByIndex = (index) => String.fromCharCode(97 + index);
|
|
8388
8506
|
const isDefaultVariant = variant == "default";
|
|
8389
|
-
return /* @__PURE__ */
|
|
8390
|
-
/* @__PURE__ */
|
|
8391
|
-
/* @__PURE__ */
|
|
8507
|
+
return /* @__PURE__ */ jsxs32(Fragment9, { children: [
|
|
8508
|
+
/* @__PURE__ */ jsx39(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
8509
|
+
/* @__PURE__ */ jsx39(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx39("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
8392
8510
|
const variantCorrect = option.isCorrect ? "correct" : "incorrect";
|
|
8393
|
-
return /* @__PURE__ */
|
|
8511
|
+
return /* @__PURE__ */ jsxs32(
|
|
8394
8512
|
"section",
|
|
8395
8513
|
{
|
|
8396
8514
|
className: "flex flex-col gap-2",
|
|
8397
8515
|
children: [
|
|
8398
|
-
/* @__PURE__ */
|
|
8516
|
+
/* @__PURE__ */ jsxs32(
|
|
8399
8517
|
"div",
|
|
8400
8518
|
{
|
|
8401
8519
|
className: cn(
|
|
@@ -8403,20 +8521,20 @@ var QuizTrueOrFalse = ({
|
|
|
8403
8521
|
!isDefaultVariant ? getStatusStyles(variantCorrect) : ""
|
|
8404
8522
|
),
|
|
8405
8523
|
children: [
|
|
8406
|
-
/* @__PURE__ */
|
|
8407
|
-
isDefaultVariant ? /* @__PURE__ */
|
|
8408
|
-
/* @__PURE__ */
|
|
8409
|
-
/* @__PURE__ */
|
|
8410
|
-
/* @__PURE__ */
|
|
8411
|
-
/* @__PURE__ */
|
|
8524
|
+
/* @__PURE__ */ jsx39("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index).concat(") ").concat(option.label) }),
|
|
8525
|
+
isDefaultVariant ? /* @__PURE__ */ jsxs32(Select_default, { size: "medium", children: [
|
|
8526
|
+
/* @__PURE__ */ jsx39(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ jsx39(SelectValue, { placeholder: "Selecione opc\xE3o" }) }),
|
|
8527
|
+
/* @__PURE__ */ jsxs32(SelectContent, { children: [
|
|
8528
|
+
/* @__PURE__ */ jsx39(SelectItem, { value: "V", children: "Verdadeiro" }),
|
|
8529
|
+
/* @__PURE__ */ jsx39(SelectItem, { value: "F", children: "Falso" })
|
|
8412
8530
|
] })
|
|
8413
|
-
] }) : /* @__PURE__ */
|
|
8531
|
+
] }) : /* @__PURE__ */ jsx39("div", { className: "flex-shrink-0", children: getStatusBadge(variantCorrect) })
|
|
8414
8532
|
]
|
|
8415
8533
|
}
|
|
8416
8534
|
),
|
|
8417
|
-
!isDefaultVariant && /* @__PURE__ */
|
|
8418
|
-
/* @__PURE__ */
|
|
8419
|
-
!option.isCorrect && /* @__PURE__ */
|
|
8535
|
+
!isDefaultVariant && /* @__PURE__ */ jsxs32("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
8536
|
+
/* @__PURE__ */ jsx39("p", { className: "text-text-800 text-2xs", children: "Resposta selecionada: V" }),
|
|
8537
|
+
!option.isCorrect && /* @__PURE__ */ jsx39("p", { className: "text-text-800 text-2xs", children: "Resposta correta: F" })
|
|
8420
8538
|
] })
|
|
8421
8539
|
]
|
|
8422
8540
|
},
|
|
@@ -8479,7 +8597,7 @@ var QuizConnectDots = ({
|
|
|
8479
8597
|
isCorrect: false
|
|
8480
8598
|
}
|
|
8481
8599
|
];
|
|
8482
|
-
const [userAnswers, setUserAnswers] =
|
|
8600
|
+
const [userAnswers, setUserAnswers] = useState16(() => {
|
|
8483
8601
|
if (variant === "result") {
|
|
8484
8602
|
return mockUserAnswers;
|
|
8485
8603
|
}
|
|
@@ -8508,13 +8626,13 @@ var QuizConnectDots = ({
|
|
|
8508
8626
|
const assignedDots = new Set(
|
|
8509
8627
|
userAnswers.map((a) => a.dotOption).filter(Boolean)
|
|
8510
8628
|
);
|
|
8511
|
-
return /* @__PURE__ */
|
|
8512
|
-
/* @__PURE__ */
|
|
8513
|
-
/* @__PURE__ */
|
|
8629
|
+
return /* @__PURE__ */ jsxs32(Fragment9, { children: [
|
|
8630
|
+
/* @__PURE__ */ jsx39(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
8631
|
+
/* @__PURE__ */ jsx39(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsx39("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
8514
8632
|
const answer = userAnswers[index];
|
|
8515
8633
|
const variantCorrect = answer.isCorrect ? "correct" : "incorrect";
|
|
8516
|
-
return /* @__PURE__ */
|
|
8517
|
-
/* @__PURE__ */
|
|
8634
|
+
return /* @__PURE__ */ jsxs32("section", { className: "flex flex-col gap-2", children: [
|
|
8635
|
+
/* @__PURE__ */ jsxs32(
|
|
8518
8636
|
"div",
|
|
8519
8637
|
{
|
|
8520
8638
|
className: cn(
|
|
@@ -8522,30 +8640,30 @@ var QuizConnectDots = ({
|
|
|
8522
8640
|
!isDefaultVariant ? getStatusStyles(variantCorrect) : ""
|
|
8523
8641
|
),
|
|
8524
8642
|
children: [
|
|
8525
|
-
/* @__PURE__ */
|
|
8526
|
-
isDefaultVariant ? /* @__PURE__ */
|
|
8643
|
+
/* @__PURE__ */ jsx39("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index) + ") " + option.label }),
|
|
8644
|
+
isDefaultVariant ? /* @__PURE__ */ jsxs32(
|
|
8527
8645
|
Select_default,
|
|
8528
8646
|
{
|
|
8529
8647
|
size: "medium",
|
|
8530
8648
|
value: answer.dotOption || void 0,
|
|
8531
8649
|
onValueChange: (value) => handleSelectDot(index, value),
|
|
8532
8650
|
children: [
|
|
8533
|
-
/* @__PURE__ */
|
|
8534
|
-
/* @__PURE__ */
|
|
8651
|
+
/* @__PURE__ */ jsx39(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ jsx39(SelectValue, { placeholder: "Selecione op\xE7\xE3o" }) }),
|
|
8652
|
+
/* @__PURE__ */ jsx39(SelectContent, { children: dotsOptions.filter(
|
|
8535
8653
|
(dot) => !assignedDots.has(dot.label) || answer.dotOption === dot.label
|
|
8536
|
-
).map((dot) => /* @__PURE__ */
|
|
8654
|
+
).map((dot) => /* @__PURE__ */ jsx39(SelectItem, { value: dot.label, children: dot.label }, dot.label)) })
|
|
8537
8655
|
]
|
|
8538
8656
|
}
|
|
8539
|
-
) : /* @__PURE__ */
|
|
8657
|
+
) : /* @__PURE__ */ jsx39("div", { className: "flex-shrink-0", children: answer.isCorrect === null ? null : getStatusBadge(variantCorrect) })
|
|
8540
8658
|
]
|
|
8541
8659
|
}
|
|
8542
8660
|
),
|
|
8543
|
-
!isDefaultVariant && /* @__PURE__ */
|
|
8544
|
-
/* @__PURE__ */
|
|
8661
|
+
!isDefaultVariant && /* @__PURE__ */ jsxs32("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
8662
|
+
/* @__PURE__ */ jsxs32("p", { className: "text-text-800 text-2xs", children: [
|
|
8545
8663
|
"Resposta selecionada: ",
|
|
8546
8664
|
answer.dotOption || "Nenhuma"
|
|
8547
8665
|
] }),
|
|
8548
|
-
!answer.isCorrect && /* @__PURE__ */
|
|
8666
|
+
!answer.isCorrect && /* @__PURE__ */ jsxs32("p", { className: "text-text-800 text-2xs", children: [
|
|
8549
8667
|
"Resposta correta: ",
|
|
8550
8668
|
answer.correctOption
|
|
8551
8669
|
] })
|
|
@@ -8600,7 +8718,7 @@ var QuizFill = ({
|
|
|
8600
8718
|
isCorrect: true
|
|
8601
8719
|
}
|
|
8602
8720
|
];
|
|
8603
|
-
const [answers, setAnswers] =
|
|
8721
|
+
const [answers, setAnswers] = useState16({});
|
|
8604
8722
|
const baseId = useId10();
|
|
8605
8723
|
const getAvailableOptionsForSelect = (selectId) => {
|
|
8606
8724
|
const usedOptions = Object.entries(answers).filter(([key]) => key !== selectId).map(([, value]) => value);
|
|
@@ -8614,18 +8732,18 @@ var QuizFill = ({
|
|
|
8614
8732
|
const mockAnswer = mockUserAnswers.find(
|
|
8615
8733
|
(answer) => answer.selectId === selectId
|
|
8616
8734
|
);
|
|
8617
|
-
return /* @__PURE__ */
|
|
8735
|
+
return /* @__PURE__ */ jsx39("p", { className: "inline-flex mb-2.5 text-success-600 font-semibold text-md border-b-2 border-success-600", children: mockAnswer?.correctAnswer });
|
|
8618
8736
|
};
|
|
8619
8737
|
const renderDefaultElement = (selectId, startIndex, selectedValue, availableOptionsForThisSelect) => {
|
|
8620
|
-
return /* @__PURE__ */
|
|
8738
|
+
return /* @__PURE__ */ jsxs32(
|
|
8621
8739
|
Select_default,
|
|
8622
8740
|
{
|
|
8623
8741
|
value: selectedValue,
|
|
8624
8742
|
onValueChange: (value) => handleSelectChange(selectId, value),
|
|
8625
8743
|
className: "inline-flex mb-2.5",
|
|
8626
8744
|
children: [
|
|
8627
|
-
/* @__PURE__ */
|
|
8628
|
-
/* @__PURE__ */
|
|
8745
|
+
/* @__PURE__ */ jsx39(SelectTrigger, { className: "inline-flex w-auto min-w-[140px] h-8 mx-1 bg-white border-gray-300", children: /* @__PURE__ */ jsx39(SelectValue, { placeholder: "Selecione op\xE7\xE3o" }) }),
|
|
8746
|
+
/* @__PURE__ */ jsx39(SelectContent, { children: availableOptionsForThisSelect.map((option, index) => /* @__PURE__ */ jsx39(SelectItem, { value: option, children: option }, `${option}-${index}`)) })
|
|
8629
8747
|
]
|
|
8630
8748
|
},
|
|
8631
8749
|
`${selectId}-${startIndex}`
|
|
@@ -8637,8 +8755,8 @@ var QuizFill = ({
|
|
|
8637
8755
|
);
|
|
8638
8756
|
if (!mockAnswer) return null;
|
|
8639
8757
|
const action = mockAnswer.isCorrect ? "success" : "error";
|
|
8640
|
-
const icon = mockAnswer.isCorrect ? /* @__PURE__ */
|
|
8641
|
-
return /* @__PURE__ */
|
|
8758
|
+
const icon = mockAnswer.isCorrect ? /* @__PURE__ */ jsx39(CheckCircle6, {}) : /* @__PURE__ */ jsx39(XCircle5, {});
|
|
8759
|
+
return /* @__PURE__ */ jsx39(
|
|
8642
8760
|
Badge_default,
|
|
8643
8761
|
{
|
|
8644
8762
|
variant: "solid",
|
|
@@ -8646,7 +8764,7 @@ var QuizFill = ({
|
|
|
8646
8764
|
iconRight: icon,
|
|
8647
8765
|
size: "large",
|
|
8648
8766
|
className: "py-3 w-[180px] justify-between mb-2.5",
|
|
8649
|
-
children: /* @__PURE__ */
|
|
8767
|
+
children: /* @__PURE__ */ jsx39("span", { className: "text-text-900", children: mockAnswer.userAnswer })
|
|
8650
8768
|
},
|
|
8651
8769
|
selectId
|
|
8652
8770
|
);
|
|
@@ -8702,25 +8820,25 @@ var QuizFill = ({
|
|
|
8702
8820
|
}
|
|
8703
8821
|
return elements;
|
|
8704
8822
|
};
|
|
8705
|
-
return /* @__PURE__ */
|
|
8706
|
-
/* @__PURE__ */
|
|
8707
|
-
/* @__PURE__ */
|
|
8823
|
+
return /* @__PURE__ */ jsxs32(Fragment9, { children: [
|
|
8824
|
+
/* @__PURE__ */ jsx39(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
8825
|
+
/* @__PURE__ */ jsx39(QuizContainer, { className: "h-auto pb-0", children: /* @__PURE__ */ jsx39("div", { className: "space-y-6 px-4 h-auto", children: /* @__PURE__ */ jsx39(
|
|
8708
8826
|
"div",
|
|
8709
8827
|
{
|
|
8710
8828
|
className: cn(
|
|
8711
8829
|
"text-lg text-text-900 leading-8 h-auto",
|
|
8712
8830
|
variant != "result" && paddingBottom
|
|
8713
8831
|
),
|
|
8714
|
-
children: renderTextWithSelects(exampleText).map((element) => /* @__PURE__ */
|
|
8832
|
+
children: renderTextWithSelects(exampleText).map((element) => /* @__PURE__ */ jsx39("span", { children: element.element }, element.id))
|
|
8715
8833
|
}
|
|
8716
8834
|
) }) }),
|
|
8717
|
-
variant === "result" && /* @__PURE__ */
|
|
8718
|
-
/* @__PURE__ */
|
|
8719
|
-
/* @__PURE__ */
|
|
8835
|
+
variant === "result" && /* @__PURE__ */ jsxs32(Fragment9, { children: [
|
|
8836
|
+
/* @__PURE__ */ jsx39(QuizSubTitle, { subTitle: "Resultado" }),
|
|
8837
|
+
/* @__PURE__ */ jsx39(QuizContainer, { className: "h-auto pb-0", children: /* @__PURE__ */ jsx39("div", { className: "space-y-6 px-4", children: /* @__PURE__ */ jsx39(
|
|
8720
8838
|
"div",
|
|
8721
8839
|
{
|
|
8722
8840
|
className: cn("text-lg text-text-900 leading-8", paddingBottom),
|
|
8723
|
-
children: renderTextWithSelects(exampleText, true).map((element) => /* @__PURE__ */
|
|
8841
|
+
children: renderTextWithSelects(exampleText, true).map((element) => /* @__PURE__ */ jsx39("span", { children: element.element }, element.id))
|
|
8724
8842
|
}
|
|
8725
8843
|
) }) })
|
|
8726
8844
|
] })
|
|
@@ -8740,7 +8858,7 @@ var QuizImageQuestion = ({
|
|
|
8740
8858
|
};
|
|
8741
8859
|
const correctRadiusRelative = calculateCorrectRadiusRelative();
|
|
8742
8860
|
const mockUserAnswerRelative = { x: 0.72, y: 0.348 };
|
|
8743
|
-
const [clickPositionRelative, setClickPositionRelative] =
|
|
8861
|
+
const [clickPositionRelative, setClickPositionRelative] = useState16(variant == "result" ? mockUserAnswerRelative : null);
|
|
8744
8862
|
const convertToRelativeCoordinates = (x, y, rect) => {
|
|
8745
8863
|
const safeWidth = Math.max(rect.width, 1e-3);
|
|
8746
8864
|
const safeHeight = Math.max(rect.height, 1e-3);
|
|
@@ -8776,36 +8894,36 @@ var QuizImageQuestion = ({
|
|
|
8776
8894
|
}
|
|
8777
8895
|
return "bg-success-600/70 border-white";
|
|
8778
8896
|
};
|
|
8779
|
-
return /* @__PURE__ */
|
|
8780
|
-
/* @__PURE__ */
|
|
8781
|
-
/* @__PURE__ */
|
|
8897
|
+
return /* @__PURE__ */ jsxs32(Fragment9, { children: [
|
|
8898
|
+
/* @__PURE__ */ jsx39(QuizSubTitle, { subTitle: "Clique na \xE1rea correta" }),
|
|
8899
|
+
/* @__PURE__ */ jsx39(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ jsxs32(
|
|
8782
8900
|
"div",
|
|
8783
8901
|
{
|
|
8784
8902
|
"data-testid": "quiz-image-container",
|
|
8785
8903
|
className: "space-y-6 p-3 relative inline-block",
|
|
8786
8904
|
children: [
|
|
8787
|
-
variant == "result" && /* @__PURE__ */
|
|
8905
|
+
variant == "result" && /* @__PURE__ */ jsxs32(
|
|
8788
8906
|
"div",
|
|
8789
8907
|
{
|
|
8790
8908
|
"data-testid": "quiz-legend",
|
|
8791
8909
|
className: "flex items-center gap-4 text-xs",
|
|
8792
8910
|
children: [
|
|
8793
|
-
/* @__PURE__ */
|
|
8794
|
-
/* @__PURE__ */
|
|
8795
|
-
/* @__PURE__ */
|
|
8911
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2", children: [
|
|
8912
|
+
/* @__PURE__ */ jsx39("div", { className: "w-3 h-3 rounded-full bg-indicator-primary/70 border border-[#F8CC2E]" }),
|
|
8913
|
+
/* @__PURE__ */ jsx39("span", { className: "text-text-600 font-medium text-sm", children: "\xC1rea correta" })
|
|
8796
8914
|
] }),
|
|
8797
|
-
/* @__PURE__ */
|
|
8798
|
-
/* @__PURE__ */
|
|
8799
|
-
/* @__PURE__ */
|
|
8915
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2", children: [
|
|
8916
|
+
/* @__PURE__ */ jsx39("div", { className: "w-3 h-3 rounded-full bg-success-600/70 border border-white" }),
|
|
8917
|
+
/* @__PURE__ */ jsx39("span", { className: "text-text-600 font-medium text-sm", children: "Resposta correta" })
|
|
8800
8918
|
] }),
|
|
8801
|
-
/* @__PURE__ */
|
|
8802
|
-
/* @__PURE__ */
|
|
8803
|
-
/* @__PURE__ */
|
|
8919
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2", children: [
|
|
8920
|
+
/* @__PURE__ */ jsx39("div", { className: "w-3 h-3 rounded-full bg-indicator-error/70 border border-white" }),
|
|
8921
|
+
/* @__PURE__ */ jsx39("span", { className: "text-text-600 font-medium text-sm", children: "Resposta incorreta" })
|
|
8804
8922
|
] })
|
|
8805
8923
|
]
|
|
8806
8924
|
}
|
|
8807
8925
|
),
|
|
8808
|
-
/* @__PURE__ */
|
|
8926
|
+
/* @__PURE__ */ jsxs32(
|
|
8809
8927
|
"button",
|
|
8810
8928
|
{
|
|
8811
8929
|
"data-testid": "quiz-image-button",
|
|
@@ -8820,7 +8938,7 @@ var QuizImageQuestion = ({
|
|
|
8820
8938
|
},
|
|
8821
8939
|
"aria-label": "\xC1rea da imagem interativa",
|
|
8822
8940
|
children: [
|
|
8823
|
-
/* @__PURE__ */
|
|
8941
|
+
/* @__PURE__ */ jsx39(
|
|
8824
8942
|
"img",
|
|
8825
8943
|
{
|
|
8826
8944
|
"data-testid": "quiz-image",
|
|
@@ -8829,7 +8947,7 @@ var QuizImageQuestion = ({
|
|
|
8829
8947
|
className: "w-full h-auto rounded-md"
|
|
8830
8948
|
}
|
|
8831
8949
|
),
|
|
8832
|
-
variant === "result" && /* @__PURE__ */
|
|
8950
|
+
variant === "result" && /* @__PURE__ */ jsx39(
|
|
8833
8951
|
"div",
|
|
8834
8952
|
{
|
|
8835
8953
|
"data-testid": "quiz-correct-circle",
|
|
@@ -8844,7 +8962,7 @@ var QuizImageQuestion = ({
|
|
|
8844
8962
|
}
|
|
8845
8963
|
}
|
|
8846
8964
|
),
|
|
8847
|
-
clickPositionRelative && /* @__PURE__ */
|
|
8965
|
+
clickPositionRelative && /* @__PURE__ */ jsx39(
|
|
8848
8966
|
"div",
|
|
8849
8967
|
{
|
|
8850
8968
|
"data-testid": "quiz-user-circle",
|
|
@@ -8912,16 +9030,16 @@ var QuizQuestionList = ({
|
|
|
8912
9030
|
return "Em branco";
|
|
8913
9031
|
}
|
|
8914
9032
|
};
|
|
8915
|
-
return /* @__PURE__ */
|
|
8916
|
-
([subjectId, questions]) => /* @__PURE__ */
|
|
8917
|
-
/* @__PURE__ */
|
|
8918
|
-
/* @__PURE__ */
|
|
8919
|
-
/* @__PURE__ */
|
|
9033
|
+
return /* @__PURE__ */ jsx39("div", { className: "space-y-6 px-4", children: Object.entries(filteredGroupedQuestions).map(
|
|
9034
|
+
([subjectId, questions]) => /* @__PURE__ */ jsxs32("section", { className: "flex flex-col gap-2", children: [
|
|
9035
|
+
/* @__PURE__ */ jsxs32("span", { className: "pt-6 pb-4 flex flex-row gap-2", children: [
|
|
9036
|
+
/* @__PURE__ */ jsx39("div", { className: "bg-primary-500 p-1 rounded-sm flex items-center justify-center", children: /* @__PURE__ */ jsx39(BookOpen, { size: 17, className: "text-white" }) }),
|
|
9037
|
+
/* @__PURE__ */ jsx39("p", { className: "text-text-800 font-bold text-lg", children: subjectId })
|
|
8920
9038
|
] }),
|
|
8921
|
-
/* @__PURE__ */
|
|
9039
|
+
/* @__PURE__ */ jsx39("ul", { className: "flex flex-col gap-2", children: questions.map((question) => {
|
|
8922
9040
|
const status = getQuestionStatus(question.id);
|
|
8923
9041
|
const questionNumber = getQuestionIndex(question.id);
|
|
8924
|
-
return /* @__PURE__ */
|
|
9042
|
+
return /* @__PURE__ */ jsx39(
|
|
8925
9043
|
CardStatus,
|
|
8926
9044
|
{
|
|
8927
9045
|
header: `Quest\xE3o ${questionNumber.toString().padStart(2, "0")}`,
|
|
@@ -8965,11 +9083,11 @@ var QuizFooter = forwardRef19(
|
|
|
8965
9083
|
const currentAnswer = getCurrentAnswer();
|
|
8966
9084
|
const currentQuestion = getCurrentQuestion();
|
|
8967
9085
|
const isCurrentQuestionSkipped = currentQuestion ? getQuestionStatusFromUserAnswers(currentQuestion.id) === "skipped" : false;
|
|
8968
|
-
const [alertDialogOpen, setAlertDialogOpen] =
|
|
8969
|
-
const [modalResultOpen, setModalResultOpen] =
|
|
8970
|
-
const [modalNavigateOpen, setModalNavigateOpen] =
|
|
8971
|
-
const [modalResolutionOpen, setModalResolutionOpen] =
|
|
8972
|
-
const [filterType, setFilterType] =
|
|
9086
|
+
const [alertDialogOpen, setAlertDialogOpen] = useState16(false);
|
|
9087
|
+
const [modalResultOpen, setModalResultOpen] = useState16(false);
|
|
9088
|
+
const [modalNavigateOpen, setModalNavigateOpen] = useState16(false);
|
|
9089
|
+
const [modalResolutionOpen, setModalResolutionOpen] = useState16(false);
|
|
9090
|
+
const [filterType, setFilterType] = useState16("all");
|
|
8973
9091
|
const unansweredQuestions = getUnansweredQuestionsFromUserAnswers();
|
|
8974
9092
|
const userAnswers = getUserAnswers();
|
|
8975
9093
|
const allQuestions = getTotalQuestions();
|
|
@@ -9001,8 +9119,8 @@ var QuizFooter = forwardRef19(
|
|
|
9001
9119
|
setAlertDialogOpen(false);
|
|
9002
9120
|
}
|
|
9003
9121
|
};
|
|
9004
|
-
return /* @__PURE__ */
|
|
9005
|
-
/* @__PURE__ */
|
|
9122
|
+
return /* @__PURE__ */ jsxs32(Fragment9, { children: [
|
|
9123
|
+
/* @__PURE__ */ jsx39(
|
|
9006
9124
|
"footer",
|
|
9007
9125
|
{
|
|
9008
9126
|
ref,
|
|
@@ -9011,17 +9129,17 @@ var QuizFooter = forwardRef19(
|
|
|
9011
9129
|
className
|
|
9012
9130
|
),
|
|
9013
9131
|
...props,
|
|
9014
|
-
children: variant === "default" ? /* @__PURE__ */
|
|
9015
|
-
/* @__PURE__ */
|
|
9016
|
-
/* @__PURE__ */
|
|
9132
|
+
children: variant === "default" ? /* @__PURE__ */ jsxs32(Fragment9, { children: [
|
|
9133
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-row items-center gap-1", children: [
|
|
9134
|
+
/* @__PURE__ */ jsx39(
|
|
9017
9135
|
IconButton_default,
|
|
9018
9136
|
{
|
|
9019
|
-
icon: /* @__PURE__ */
|
|
9137
|
+
icon: /* @__PURE__ */ jsx39(SquaresFour, { size: 24, className: "text-text-950" }),
|
|
9020
9138
|
size: "md",
|
|
9021
9139
|
onClick: () => setModalNavigateOpen(true)
|
|
9022
9140
|
}
|
|
9023
9141
|
),
|
|
9024
|
-
isFirstQuestion ? /* @__PURE__ */
|
|
9142
|
+
isFirstQuestion ? /* @__PURE__ */ jsx39(
|
|
9025
9143
|
Button_default,
|
|
9026
9144
|
{
|
|
9027
9145
|
variant: "outline",
|
|
@@ -9032,13 +9150,13 @@ var QuizFooter = forwardRef19(
|
|
|
9032
9150
|
},
|
|
9033
9151
|
children: "Pular"
|
|
9034
9152
|
}
|
|
9035
|
-
) : /* @__PURE__ */
|
|
9153
|
+
) : /* @__PURE__ */ jsx39(
|
|
9036
9154
|
Button_default,
|
|
9037
9155
|
{
|
|
9038
9156
|
size: "medium",
|
|
9039
9157
|
variant: "link",
|
|
9040
9158
|
action: "primary",
|
|
9041
|
-
iconLeft: /* @__PURE__ */
|
|
9159
|
+
iconLeft: /* @__PURE__ */ jsx39(CaretLeft3, { size: 18 }),
|
|
9042
9160
|
onClick: () => {
|
|
9043
9161
|
goToPreviousQuestion();
|
|
9044
9162
|
},
|
|
@@ -9046,7 +9164,7 @@ var QuizFooter = forwardRef19(
|
|
|
9046
9164
|
}
|
|
9047
9165
|
)
|
|
9048
9166
|
] }),
|
|
9049
|
-
!isFirstQuestion && /* @__PURE__ */
|
|
9167
|
+
!isFirstQuestion && /* @__PURE__ */ jsx39(
|
|
9050
9168
|
Button_default,
|
|
9051
9169
|
{
|
|
9052
9170
|
size: "small",
|
|
@@ -9059,7 +9177,7 @@ var QuizFooter = forwardRef19(
|
|
|
9059
9177
|
children: "Pular"
|
|
9060
9178
|
}
|
|
9061
9179
|
),
|
|
9062
|
-
isLastQuestion ? /* @__PURE__ */
|
|
9180
|
+
isLastQuestion ? /* @__PURE__ */ jsx39(
|
|
9063
9181
|
Button_default,
|
|
9064
9182
|
{
|
|
9065
9183
|
size: "medium",
|
|
@@ -9069,13 +9187,13 @@ var QuizFooter = forwardRef19(
|
|
|
9069
9187
|
onClick: handleFinishQuiz,
|
|
9070
9188
|
children: "Finalizar"
|
|
9071
9189
|
}
|
|
9072
|
-
) : /* @__PURE__ */
|
|
9190
|
+
) : /* @__PURE__ */ jsx39(
|
|
9073
9191
|
Button_default,
|
|
9074
9192
|
{
|
|
9075
9193
|
size: "medium",
|
|
9076
9194
|
variant: "link",
|
|
9077
9195
|
action: "primary",
|
|
9078
|
-
iconRight: /* @__PURE__ */
|
|
9196
|
+
iconRight: /* @__PURE__ */ jsx39(CaretRight4, { size: 18 }),
|
|
9079
9197
|
disabled: !currentAnswer && !isCurrentQuestionSkipped,
|
|
9080
9198
|
onClick: () => {
|
|
9081
9199
|
goToNextQuestion();
|
|
@@ -9083,7 +9201,7 @@ var QuizFooter = forwardRef19(
|
|
|
9083
9201
|
children: "Avan\xE7ar"
|
|
9084
9202
|
}
|
|
9085
9203
|
)
|
|
9086
|
-
] }) : /* @__PURE__ */
|
|
9204
|
+
] }) : /* @__PURE__ */ jsx39("div", { className: "flex flex-row items-center justify-end w-full", children: /* @__PURE__ */ jsx39(
|
|
9087
9205
|
Button_default,
|
|
9088
9206
|
{
|
|
9089
9207
|
variant: "solid",
|
|
@@ -9095,7 +9213,7 @@ var QuizFooter = forwardRef19(
|
|
|
9095
9213
|
) })
|
|
9096
9214
|
}
|
|
9097
9215
|
),
|
|
9098
|
-
/* @__PURE__ */
|
|
9216
|
+
/* @__PURE__ */ jsx39(
|
|
9099
9217
|
AlertDialog,
|
|
9100
9218
|
{
|
|
9101
9219
|
isOpen: alertDialogOpen,
|
|
@@ -9107,7 +9225,7 @@ var QuizFooter = forwardRef19(
|
|
|
9107
9225
|
onSubmit: handleAlertSubmit
|
|
9108
9226
|
}
|
|
9109
9227
|
),
|
|
9110
|
-
/* @__PURE__ */
|
|
9228
|
+
/* @__PURE__ */ jsx39(
|
|
9111
9229
|
Modal_default,
|
|
9112
9230
|
{
|
|
9113
9231
|
isOpen: modalResultOpen,
|
|
@@ -9117,8 +9235,8 @@ var QuizFooter = forwardRef19(
|
|
|
9117
9235
|
closeOnEscape: false,
|
|
9118
9236
|
hideCloseButton: true,
|
|
9119
9237
|
size: "md",
|
|
9120
|
-
children: /* @__PURE__ */
|
|
9121
|
-
/* @__PURE__ */
|
|
9238
|
+
children: /* @__PURE__ */ jsxs32("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
9239
|
+
/* @__PURE__ */ jsx39(
|
|
9122
9240
|
"img",
|
|
9123
9241
|
{
|
|
9124
9242
|
src: simulated_result_default,
|
|
@@ -9126,9 +9244,9 @@ var QuizFooter = forwardRef19(
|
|
|
9126
9244
|
className: "w-[282px] h-auto object-cover"
|
|
9127
9245
|
}
|
|
9128
9246
|
),
|
|
9129
|
-
/* @__PURE__ */
|
|
9130
|
-
/* @__PURE__ */
|
|
9131
|
-
/* @__PURE__ */
|
|
9247
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
9248
|
+
/* @__PURE__ */ jsx39("h2", { className: "text-text-950 font-bold text-lg", children: "Voc\xEA concluiu o simulado!" }),
|
|
9249
|
+
/* @__PURE__ */ jsxs32("p", { className: "text-text-500 font-sm", children: [
|
|
9132
9250
|
"Voc\xEA acertou",
|
|
9133
9251
|
" ",
|
|
9134
9252
|
(() => {
|
|
@@ -9150,8 +9268,8 @@ var QuizFooter = forwardRef19(
|
|
|
9150
9268
|
" quest\xF5es."
|
|
9151
9269
|
] })
|
|
9152
9270
|
] }),
|
|
9153
|
-
/* @__PURE__ */
|
|
9154
|
-
/* @__PURE__ */
|
|
9271
|
+
/* @__PURE__ */ jsxs32("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: [
|
|
9272
|
+
/* @__PURE__ */ jsx39(
|
|
9155
9273
|
Button_default,
|
|
9156
9274
|
{
|
|
9157
9275
|
variant: "outline",
|
|
@@ -9161,31 +9279,31 @@ var QuizFooter = forwardRef19(
|
|
|
9161
9279
|
children: "Ir para simulados"
|
|
9162
9280
|
}
|
|
9163
9281
|
),
|
|
9164
|
-
/* @__PURE__ */
|
|
9282
|
+
/* @__PURE__ */ jsx39(Button_default, { className: "w-full", onClick: onDetailResult, children: "Detalhar resultado" })
|
|
9165
9283
|
] })
|
|
9166
9284
|
] })
|
|
9167
9285
|
}
|
|
9168
9286
|
),
|
|
9169
|
-
/* @__PURE__ */
|
|
9287
|
+
/* @__PURE__ */ jsx39(
|
|
9170
9288
|
Modal_default,
|
|
9171
9289
|
{
|
|
9172
9290
|
isOpen: modalNavigateOpen,
|
|
9173
9291
|
onClose: () => setModalNavigateOpen(false),
|
|
9174
9292
|
title: "Quest\xF5es",
|
|
9175
9293
|
size: "lg",
|
|
9176
|
-
children: /* @__PURE__ */
|
|
9177
|
-
/* @__PURE__ */
|
|
9178
|
-
/* @__PURE__ */
|
|
9179
|
-
/* @__PURE__ */
|
|
9180
|
-
/* @__PURE__ */
|
|
9181
|
-
/* @__PURE__ */
|
|
9182
|
-
/* @__PURE__ */
|
|
9183
|
-
/* @__PURE__ */
|
|
9184
|
-
/* @__PURE__ */
|
|
9294
|
+
children: /* @__PURE__ */ jsxs32("div", { className: "flex flex-col w-full h-full", children: [
|
|
9295
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-row justify-between items-center py-6 pt-6 pb-4 border-b border-border-200", children: [
|
|
9296
|
+
/* @__PURE__ */ jsx39("p", { className: "text-text-950 font-bold text-lg", children: "Filtrar por" }),
|
|
9297
|
+
/* @__PURE__ */ jsx39("span", { className: "max-w-[266px]", children: /* @__PURE__ */ jsxs32(Select_default, { value: filterType, onValueChange: setFilterType, children: [
|
|
9298
|
+
/* @__PURE__ */ jsx39(SelectTrigger, { variant: "rounded", className: "max-w-[266px]", children: /* @__PURE__ */ jsx39(SelectValue, { placeholder: "Selecione uma op\xE7\xE3o" }) }),
|
|
9299
|
+
/* @__PURE__ */ jsxs32(SelectContent, { children: [
|
|
9300
|
+
/* @__PURE__ */ jsx39(SelectItem, { value: "all", children: "Todas" }),
|
|
9301
|
+
/* @__PURE__ */ jsx39(SelectItem, { value: "unanswered", children: "Em branco" }),
|
|
9302
|
+
/* @__PURE__ */ jsx39(SelectItem, { value: "answered", children: "Respondidas" })
|
|
9185
9303
|
] })
|
|
9186
9304
|
] }) })
|
|
9187
9305
|
] }),
|
|
9188
|
-
/* @__PURE__ */
|
|
9306
|
+
/* @__PURE__ */ jsx39("div", { className: "flex flex-col gap-2 not-lg:h-[calc(100vh-200px)] lg:max-h-[687px] overflow-y-auto", children: /* @__PURE__ */ jsx39(
|
|
9189
9307
|
QuizQuestionList,
|
|
9190
9308
|
{
|
|
9191
9309
|
filterType,
|
|
@@ -9195,7 +9313,7 @@ var QuizFooter = forwardRef19(
|
|
|
9195
9313
|
] })
|
|
9196
9314
|
}
|
|
9197
9315
|
),
|
|
9198
|
-
/* @__PURE__ */
|
|
9316
|
+
/* @__PURE__ */ jsx39(
|
|
9199
9317
|
Modal_default,
|
|
9200
9318
|
{
|
|
9201
9319
|
isOpen: modalResolutionOpen,
|
|
@@ -9210,15 +9328,15 @@ var QuizFooter = forwardRef19(
|
|
|
9210
9328
|
);
|
|
9211
9329
|
var QuizResultHeaderTitle = forwardRef19(({ className, ...props }, ref) => {
|
|
9212
9330
|
const { bySimulated } = useQuizStore();
|
|
9213
|
-
return /* @__PURE__ */
|
|
9331
|
+
return /* @__PURE__ */ jsxs32(
|
|
9214
9332
|
"div",
|
|
9215
9333
|
{
|
|
9216
9334
|
ref,
|
|
9217
9335
|
className: cn("flex flex-row pt-4 justify-between", className),
|
|
9218
9336
|
...props,
|
|
9219
9337
|
children: [
|
|
9220
|
-
/* @__PURE__ */
|
|
9221
|
-
bySimulated && /* @__PURE__ */
|
|
9338
|
+
/* @__PURE__ */ jsx39("p", { className: "text-text-950 font-bold text-2xl", children: "Resultado" }),
|
|
9339
|
+
bySimulated && /* @__PURE__ */ jsx39(Badge_default, { variant: "solid", action: "info", children: bySimulated.category })
|
|
9222
9340
|
]
|
|
9223
9341
|
}
|
|
9224
9342
|
);
|
|
@@ -9226,7 +9344,7 @@ var QuizResultHeaderTitle = forwardRef19(({ className, ...props }, ref) => {
|
|
|
9226
9344
|
var QuizResultTitle = forwardRef19(({ className, ...props }, ref) => {
|
|
9227
9345
|
const { getQuizTitle } = useQuizStore();
|
|
9228
9346
|
const quizTitle = getQuizTitle();
|
|
9229
|
-
return /* @__PURE__ */
|
|
9347
|
+
return /* @__PURE__ */ jsx39(
|
|
9230
9348
|
"p",
|
|
9231
9349
|
{
|
|
9232
9350
|
className: cn("pt-6 pb-4 text-text-950 font-bold text-lg", className),
|
|
@@ -9282,15 +9400,15 @@ var QuizResultPerformance = forwardRef19(
|
|
|
9282
9400
|
});
|
|
9283
9401
|
}
|
|
9284
9402
|
const percentage = totalQuestions > 0 ? Math.round(correctAnswers / totalQuestions * 100) : 0;
|
|
9285
|
-
return /* @__PURE__ */
|
|
9403
|
+
return /* @__PURE__ */ jsxs32(
|
|
9286
9404
|
"div",
|
|
9287
9405
|
{
|
|
9288
9406
|
className: "flex flex-row gap-6 p-6 rounded-xl bg-background justify-between",
|
|
9289
9407
|
ref,
|
|
9290
9408
|
...props,
|
|
9291
9409
|
children: [
|
|
9292
|
-
/* @__PURE__ */
|
|
9293
|
-
/* @__PURE__ */
|
|
9410
|
+
/* @__PURE__ */ jsxs32("div", { className: "relative", children: [
|
|
9411
|
+
/* @__PURE__ */ jsx39(
|
|
9294
9412
|
ProgressCircle_default,
|
|
9295
9413
|
{
|
|
9296
9414
|
size: "medium",
|
|
@@ -9300,21 +9418,21 @@ var QuizResultPerformance = forwardRef19(
|
|
|
9300
9418
|
label: ""
|
|
9301
9419
|
}
|
|
9302
9420
|
),
|
|
9303
|
-
/* @__PURE__ */
|
|
9304
|
-
/* @__PURE__ */
|
|
9305
|
-
/* @__PURE__ */
|
|
9306
|
-
/* @__PURE__ */
|
|
9421
|
+
/* @__PURE__ */ jsxs32("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
9422
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-1 mb-1", children: [
|
|
9423
|
+
/* @__PURE__ */ jsx39(Clock2, { size: 12, weight: "regular", className: "text-text-800" }),
|
|
9424
|
+
/* @__PURE__ */ jsx39("span", { className: "text-2xs font-medium text-text-800", children: formatTime2(timeElapsed) })
|
|
9307
9425
|
] }),
|
|
9308
|
-
/* @__PURE__ */
|
|
9426
|
+
/* @__PURE__ */ jsxs32("div", { className: "text-2xl font-medium text-text-800 leading-7", children: [
|
|
9309
9427
|
correctAnswers,
|
|
9310
9428
|
" de ",
|
|
9311
9429
|
totalQuestions
|
|
9312
9430
|
] }),
|
|
9313
|
-
/* @__PURE__ */
|
|
9431
|
+
/* @__PURE__ */ jsx39("div", { className: "text-2xs font-medium text-text-600 mt-1", children: "Corretas" })
|
|
9314
9432
|
] })
|
|
9315
9433
|
] }),
|
|
9316
|
-
/* @__PURE__ */
|
|
9317
|
-
/* @__PURE__ */
|
|
9434
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-4 w-full", children: [
|
|
9435
|
+
/* @__PURE__ */ jsx39(
|
|
9318
9436
|
ProgressBar_default,
|
|
9319
9437
|
{
|
|
9320
9438
|
className: "w-full",
|
|
@@ -9328,7 +9446,7 @@ var QuizResultPerformance = forwardRef19(
|
|
|
9328
9446
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
9329
9447
|
}
|
|
9330
9448
|
),
|
|
9331
|
-
/* @__PURE__ */
|
|
9449
|
+
/* @__PURE__ */ jsx39(
|
|
9332
9450
|
ProgressBar_default,
|
|
9333
9451
|
{
|
|
9334
9452
|
className: "w-full",
|
|
@@ -9342,7 +9460,7 @@ var QuizResultPerformance = forwardRef19(
|
|
|
9342
9460
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
9343
9461
|
}
|
|
9344
9462
|
),
|
|
9345
|
-
/* @__PURE__ */
|
|
9463
|
+
/* @__PURE__ */ jsx39(
|
|
9346
9464
|
ProgressBar_default,
|
|
9347
9465
|
{
|
|
9348
9466
|
className: "w-full",
|
|
@@ -9391,9 +9509,9 @@ var QuizListResult = forwardRef19(({ className, onSubjectClick, ...props }, ref)
|
|
|
9391
9509
|
};
|
|
9392
9510
|
}
|
|
9393
9511
|
);
|
|
9394
|
-
return /* @__PURE__ */
|
|
9395
|
-
/* @__PURE__ */
|
|
9396
|
-
/* @__PURE__ */
|
|
9512
|
+
return /* @__PURE__ */ jsxs32("section", { ref, className, ...props, children: [
|
|
9513
|
+
/* @__PURE__ */ jsx39("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Mat\xE9rias" }),
|
|
9514
|
+
/* @__PURE__ */ jsx39("ul", { className: "flex flex-col gap-2", children: subjectsStats.map((subject) => /* @__PURE__ */ jsx39("li", { children: /* @__PURE__ */ jsx39(
|
|
9397
9515
|
CardResults,
|
|
9398
9516
|
{
|
|
9399
9517
|
onClick: () => onSubjectClick?.(subject.subject),
|
|
@@ -9401,7 +9519,7 @@ var QuizListResult = forwardRef19(({ className, onSubjectClick, ...props }, ref)
|
|
|
9401
9519
|
header: subject.subject,
|
|
9402
9520
|
correct_answers: subject.correct,
|
|
9403
9521
|
incorrect_answers: subject.incorrect,
|
|
9404
|
-
icon: /* @__PURE__ */
|
|
9522
|
+
icon: /* @__PURE__ */ jsx39(Book, { size: 20 }),
|
|
9405
9523
|
direction: "row"
|
|
9406
9524
|
}
|
|
9407
9525
|
) }, subject.subject)) })
|
|
@@ -9418,13 +9536,13 @@ var QuizListResultByMateria = ({
|
|
|
9418
9536
|
} = useQuizStore();
|
|
9419
9537
|
const groupedQuestions = getQuestionsGroupedBySubject();
|
|
9420
9538
|
const answeredQuestions = groupedQuestions[subject] || [];
|
|
9421
|
-
return /* @__PURE__ */
|
|
9422
|
-
/* @__PURE__ */
|
|
9423
|
-
/* @__PURE__ */
|
|
9424
|
-
/* @__PURE__ */
|
|
9425
|
-
/* @__PURE__ */
|
|
9539
|
+
return /* @__PURE__ */ jsxs32("div", { className: "w-full max-w-[1000px] flex flex-col mx-auto h-full relative not-lg:px-6", children: [
|
|
9540
|
+
/* @__PURE__ */ jsx39("div", { className: "flex flex-row pt-4 justify-between", children: /* @__PURE__ */ jsx39("p", { className: "text-text-950 font-bold text-2xl", children: subject }) }),
|
|
9541
|
+
/* @__PURE__ */ jsxs32("section", { className: "flex flex-col ", children: [
|
|
9542
|
+
/* @__PURE__ */ jsx39("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Resultado das quest\xF5es" }),
|
|
9543
|
+
/* @__PURE__ */ jsx39("ul", { className: "flex flex-col gap-2 pt-4", children: answeredQuestions.map((question) => {
|
|
9426
9544
|
const questionIndex = getQuestionIndex(question.id);
|
|
9427
|
-
return /* @__PURE__ */
|
|
9545
|
+
return /* @__PURE__ */ jsx39("li", { children: /* @__PURE__ */ jsx39(
|
|
9428
9546
|
CardStatus,
|
|
9429
9547
|
{
|
|
9430
9548
|
className: "max-w-full",
|
|
@@ -9454,6 +9572,7 @@ export {
|
|
|
9454
9572
|
Calendar_default as Calendar,
|
|
9455
9573
|
CardAccordation,
|
|
9456
9574
|
CardActivitiesResults,
|
|
9575
|
+
CardAudio,
|
|
9457
9576
|
CardPerformance,
|
|
9458
9577
|
CardProgress,
|
|
9459
9578
|
CardQuestions,
|
|
@@ -9537,6 +9656,7 @@ export {
|
|
|
9537
9656
|
Toast_default as Toast,
|
|
9538
9657
|
Toaster_default as Toaster,
|
|
9539
9658
|
VideoPlayer_default as VideoPlayer,
|
|
9659
|
+
Whiteboard_default as Whiteboard,
|
|
9540
9660
|
createZustandAuthAdapter,
|
|
9541
9661
|
getRootDomain,
|
|
9542
9662
|
getStatusBadge,
|