analytica-frontend-lib 1.1.7 → 1.1.8
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 +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +342 -222
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +312 -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.js
CHANGED
|
@@ -122,6 +122,7 @@ __export(src_exports, {
|
|
|
122
122
|
Toast: () => Toast_default,
|
|
123
123
|
Toaster: () => Toaster_default,
|
|
124
124
|
VideoPlayer: () => VideoPlayer_default,
|
|
125
|
+
Whiteboard: () => Whiteboard_default,
|
|
125
126
|
createZustandAuthAdapter: () => createZustandAuthAdapter,
|
|
126
127
|
getRootDomain: () => getRootDomain,
|
|
127
128
|
getStatusBadge: () => getStatusBadge,
|
|
@@ -7245,11 +7246,129 @@ var VideoPlayer = ({
|
|
|
7245
7246
|
};
|
|
7246
7247
|
var VideoPlayer_default = VideoPlayer;
|
|
7247
7248
|
|
|
7248
|
-
// src/components/
|
|
7249
|
+
// src/components/Whiteboard/Whiteboard.tsx
|
|
7249
7250
|
var import_react23 = require("react");
|
|
7250
|
-
var
|
|
7251
|
+
var import_phosphor_react19 = require("phosphor-react");
|
|
7251
7252
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
7252
|
-
var
|
|
7253
|
+
var IMAGE_WIDTH = 225;
|
|
7254
|
+
var IMAGE_HEIGHT = 90;
|
|
7255
|
+
var Whiteboard = ({
|
|
7256
|
+
images,
|
|
7257
|
+
showDownload = true,
|
|
7258
|
+
className,
|
|
7259
|
+
onDownload,
|
|
7260
|
+
imagesPerRow = 2,
|
|
7261
|
+
...rest
|
|
7262
|
+
}) => {
|
|
7263
|
+
const [imageErrors, setImageErrors] = (0, import_react23.useState)(/* @__PURE__ */ new Set());
|
|
7264
|
+
const handleDownload = (0, import_react23.useCallback)(
|
|
7265
|
+
(image) => {
|
|
7266
|
+
if (onDownload) {
|
|
7267
|
+
onDownload(image);
|
|
7268
|
+
} else {
|
|
7269
|
+
const link = document.createElement("a");
|
|
7270
|
+
link.href = image.imageUrl;
|
|
7271
|
+
link.download = image.title || `whiteboard-${image.id}`;
|
|
7272
|
+
link.target = "_blank";
|
|
7273
|
+
link.rel = "noopener noreferrer";
|
|
7274
|
+
document.body.appendChild(link);
|
|
7275
|
+
link.click();
|
|
7276
|
+
document.body.removeChild(link);
|
|
7277
|
+
}
|
|
7278
|
+
},
|
|
7279
|
+
[onDownload]
|
|
7280
|
+
);
|
|
7281
|
+
const handleImageError = (0, import_react23.useCallback)((imageId) => {
|
|
7282
|
+
setImageErrors((prev) => new Set(prev).add(imageId));
|
|
7283
|
+
}, []);
|
|
7284
|
+
const gridColsClass = images?.length === 1 ? "grid-cols-1" : {
|
|
7285
|
+
2: "grid-cols-1 sm:grid-cols-2",
|
|
7286
|
+
3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
|
|
7287
|
+
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"
|
|
7288
|
+
}[imagesPerRow];
|
|
7289
|
+
if (!images || images.length === 0) {
|
|
7290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
7291
|
+
"div",
|
|
7292
|
+
{
|
|
7293
|
+
className: cn(
|
|
7294
|
+
"flex items-center justify-center p-8 bg-white border border-gray-100 rounded-xl",
|
|
7295
|
+
className
|
|
7296
|
+
),
|
|
7297
|
+
...rest,
|
|
7298
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "text-gray-400 text-sm", children: "Nenhuma imagem dispon\xEDvel" })
|
|
7299
|
+
}
|
|
7300
|
+
);
|
|
7301
|
+
}
|
|
7302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
7303
|
+
"div",
|
|
7304
|
+
{
|
|
7305
|
+
className: cn(
|
|
7306
|
+
"flex flex-col bg-white border border-gray-100 p-4 gap-2 rounded-xl w-fit mx-auto",
|
|
7307
|
+
className
|
|
7308
|
+
),
|
|
7309
|
+
...rest,
|
|
7310
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: cn("grid gap-4", gridColsClass), children: images.map((image) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
7311
|
+
"div",
|
|
7312
|
+
{
|
|
7313
|
+
className: "relative group overflow-hidden bg-gray-100 rounded-lg",
|
|
7314
|
+
style: {
|
|
7315
|
+
width: `${IMAGE_WIDTH}px`
|
|
7316
|
+
},
|
|
7317
|
+
children: [
|
|
7318
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
7319
|
+
"div",
|
|
7320
|
+
{
|
|
7321
|
+
className: "relative",
|
|
7322
|
+
style: {
|
|
7323
|
+
width: `${IMAGE_WIDTH}px`,
|
|
7324
|
+
height: `${IMAGE_HEIGHT}px`
|
|
7325
|
+
},
|
|
7326
|
+
children: imageErrors.has(image.id) ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "absolute inset-0 flex items-center justify-center bg-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "text-gray-500 text-sm text-center px-2", children: "Imagem indispon\xEDvel" }) }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
|
|
7327
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
7328
|
+
"img",
|
|
7329
|
+
{
|
|
7330
|
+
src: image.imageUrl,
|
|
7331
|
+
alt: image.title || `Whiteboard ${image.id}`,
|
|
7332
|
+
className: "absolute inset-0 w-full h-full object-cover",
|
|
7333
|
+
loading: "lazy",
|
|
7334
|
+
onError: () => handleImageError(image.id)
|
|
7335
|
+
}
|
|
7336
|
+
),
|
|
7337
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "absolute inset-0 bg-gradient-to-t from-black/20 to-transparent" })
|
|
7338
|
+
] })
|
|
7339
|
+
}
|
|
7340
|
+
),
|
|
7341
|
+
showDownload && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
7342
|
+
"button",
|
|
7343
|
+
{
|
|
7344
|
+
type: "button",
|
|
7345
|
+
onClick: () => handleDownload(image),
|
|
7346
|
+
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",
|
|
7347
|
+
"aria-label": `Download ${image.title || "imagem"}`,
|
|
7348
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
7349
|
+
import_phosphor_react19.DownloadSimple,
|
|
7350
|
+
{
|
|
7351
|
+
size: 24,
|
|
7352
|
+
weight: "regular",
|
|
7353
|
+
className: "text-white group-hover/button:scale-110 transition-transform duration-200"
|
|
7354
|
+
}
|
|
7355
|
+
)
|
|
7356
|
+
}
|
|
7357
|
+
)
|
|
7358
|
+
]
|
|
7359
|
+
},
|
|
7360
|
+
image.id
|
|
7361
|
+
)) })
|
|
7362
|
+
}
|
|
7363
|
+
);
|
|
7364
|
+
};
|
|
7365
|
+
var Whiteboard_default = Whiteboard;
|
|
7366
|
+
|
|
7367
|
+
// src/components/Auth/Auth.tsx
|
|
7368
|
+
var import_react24 = require("react");
|
|
7369
|
+
var import_react_router_dom = require("react-router-dom");
|
|
7370
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
7371
|
+
var AuthContext = (0, import_react24.createContext)(void 0);
|
|
7253
7372
|
var AuthProvider = ({
|
|
7254
7373
|
children,
|
|
7255
7374
|
checkAuthFn,
|
|
@@ -7259,12 +7378,12 @@ var AuthProvider = ({
|
|
|
7259
7378
|
getSessionFn,
|
|
7260
7379
|
getTokensFn
|
|
7261
7380
|
}) => {
|
|
7262
|
-
const [authState, setAuthState] = (0,
|
|
7381
|
+
const [authState, setAuthState] = (0, import_react24.useState)({
|
|
7263
7382
|
isAuthenticated: false,
|
|
7264
7383
|
isLoading: true,
|
|
7265
7384
|
...initialAuthState
|
|
7266
7385
|
});
|
|
7267
|
-
const checkAuth = (0,
|
|
7386
|
+
const checkAuth = (0, import_react24.useCallback)(async () => {
|
|
7268
7387
|
try {
|
|
7269
7388
|
setAuthState((prev) => ({ ...prev, isLoading: true }));
|
|
7270
7389
|
if (!checkAuthFn) {
|
|
@@ -7295,7 +7414,7 @@ var AuthProvider = ({
|
|
|
7295
7414
|
return false;
|
|
7296
7415
|
}
|
|
7297
7416
|
}, [checkAuthFn, getUserFn, getSessionFn, getTokensFn]);
|
|
7298
|
-
const signOut = (0,
|
|
7417
|
+
const signOut = (0, import_react24.useCallback)(() => {
|
|
7299
7418
|
if (signOutFn) {
|
|
7300
7419
|
signOutFn();
|
|
7301
7420
|
}
|
|
@@ -7307,10 +7426,10 @@ var AuthProvider = ({
|
|
|
7307
7426
|
tokens: void 0
|
|
7308
7427
|
}));
|
|
7309
7428
|
}, [signOutFn]);
|
|
7310
|
-
(0,
|
|
7429
|
+
(0, import_react24.useEffect)(() => {
|
|
7311
7430
|
checkAuth();
|
|
7312
7431
|
}, [checkAuth]);
|
|
7313
|
-
const contextValue = (0,
|
|
7432
|
+
const contextValue = (0, import_react24.useMemo)(
|
|
7314
7433
|
() => ({
|
|
7315
7434
|
...authState,
|
|
7316
7435
|
checkAuth,
|
|
@@ -7318,10 +7437,10 @@ var AuthProvider = ({
|
|
|
7318
7437
|
}),
|
|
7319
7438
|
[authState, checkAuth, signOut]
|
|
7320
7439
|
);
|
|
7321
|
-
return /* @__PURE__ */ (0,
|
|
7440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AuthContext.Provider, { value: contextValue, children });
|
|
7322
7441
|
};
|
|
7323
7442
|
var useAuth = () => {
|
|
7324
|
-
const context = (0,
|
|
7443
|
+
const context = (0, import_react24.useContext)(AuthContext);
|
|
7325
7444
|
if (context === void 0) {
|
|
7326
7445
|
throw new Error("useAuth deve ser usado dentro de um AuthProvider");
|
|
7327
7446
|
}
|
|
@@ -7334,9 +7453,9 @@ var ProtectedRoute = ({
|
|
|
7334
7453
|
additionalCheck
|
|
7335
7454
|
}) => {
|
|
7336
7455
|
const { isAuthenticated, isLoading, ...authState } = useAuth();
|
|
7337
|
-
const defaultLoadingComponent = /* @__PURE__ */ (0,
|
|
7456
|
+
const defaultLoadingComponent = /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "text-text-950 text-lg", children: "Carregando..." }) });
|
|
7338
7457
|
if (isLoading) {
|
|
7339
|
-
return /* @__PURE__ */ (0,
|
|
7458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_jsx_runtime38.Fragment, { children: loadingComponent || defaultLoadingComponent });
|
|
7340
7459
|
}
|
|
7341
7460
|
if (!isAuthenticated) {
|
|
7342
7461
|
if (typeof window !== "undefined") {
|
|
@@ -7347,12 +7466,12 @@ var ProtectedRoute = ({
|
|
|
7347
7466
|
return null;
|
|
7348
7467
|
}
|
|
7349
7468
|
}
|
|
7350
|
-
return /* @__PURE__ */ (0,
|
|
7469
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_router_dom.Navigate, { to: redirectTo, replace: true });
|
|
7351
7470
|
}
|
|
7352
7471
|
if (additionalCheck && !additionalCheck({ isAuthenticated, isLoading, ...authState })) {
|
|
7353
|
-
return /* @__PURE__ */ (0,
|
|
7472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_router_dom.Navigate, { to: redirectTo, replace: true });
|
|
7354
7473
|
}
|
|
7355
|
-
return /* @__PURE__ */ (0,
|
|
7474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_jsx_runtime38.Fragment, { children });
|
|
7356
7475
|
};
|
|
7357
7476
|
var PublicRoute = ({
|
|
7358
7477
|
children,
|
|
@@ -7362,15 +7481,15 @@ var PublicRoute = ({
|
|
|
7362
7481
|
}) => {
|
|
7363
7482
|
const { isAuthenticated, isLoading } = useAuth();
|
|
7364
7483
|
if (checkAuthBeforeRender && isLoading) {
|
|
7365
|
-
return /* @__PURE__ */ (0,
|
|
7484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "text-text-950 text-lg", children: "Carregando..." }) });
|
|
7366
7485
|
}
|
|
7367
7486
|
if (isAuthenticated && redirectIfAuthenticated) {
|
|
7368
|
-
return /* @__PURE__ */ (0,
|
|
7487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_router_dom.Navigate, { to: redirectTo, replace: true });
|
|
7369
7488
|
}
|
|
7370
|
-
return /* @__PURE__ */ (0,
|
|
7489
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_jsx_runtime38.Fragment, { children });
|
|
7371
7490
|
};
|
|
7372
7491
|
var withAuth = (Component, options = {}) => {
|
|
7373
|
-
return (props) => /* @__PURE__ */ (0,
|
|
7492
|
+
return (props) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ProtectedRoute, { ...options, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Component, { ...props }) });
|
|
7374
7493
|
};
|
|
7375
7494
|
var useAuthGuard = (options = {}) => {
|
|
7376
7495
|
const authState = useAuth();
|
|
@@ -7385,7 +7504,7 @@ var useAuthGuard = (options = {}) => {
|
|
|
7385
7504
|
var useRouteAuth = (fallbackPath = "/") => {
|
|
7386
7505
|
const { isAuthenticated, isLoading } = useAuth();
|
|
7387
7506
|
const location = (0, import_react_router_dom.useLocation)();
|
|
7388
|
-
const redirectToLogin = () => /* @__PURE__ */ (0,
|
|
7507
|
+
const redirectToLogin = () => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_router_dom.Navigate, { to: fallbackPath, state: { from: location }, replace: true });
|
|
7389
7508
|
return {
|
|
7390
7509
|
isAuthenticated,
|
|
7391
7510
|
isLoading,
|
|
@@ -7461,7 +7580,7 @@ function createZustandAuthAdapter(useAuthStore) {
|
|
|
7461
7580
|
}
|
|
7462
7581
|
|
|
7463
7582
|
// src/components/Auth/useUrlAuthentication.ts
|
|
7464
|
-
var
|
|
7583
|
+
var import_react25 = require("react");
|
|
7465
7584
|
var import_react_router_dom2 = require("react-router-dom");
|
|
7466
7585
|
var getAuthParams = (location, extractParams) => {
|
|
7467
7586
|
const searchParams = new URLSearchParams(location.search);
|
|
@@ -7509,7 +7628,7 @@ var handleUserData = (responseData, setUser) => {
|
|
|
7509
7628
|
};
|
|
7510
7629
|
function useUrlAuthentication(options) {
|
|
7511
7630
|
const location = (0, import_react_router_dom2.useLocation)();
|
|
7512
|
-
(0,
|
|
7631
|
+
(0, import_react25.useEffect)(() => {
|
|
7513
7632
|
const handleAuthentication = async () => {
|
|
7514
7633
|
const authParams = getAuthParams(location, options.extractParams);
|
|
7515
7634
|
if (!hasValidAuthParams(authParams)) {
|
|
@@ -7548,9 +7667,9 @@ function useUrlAuthentication(options) {
|
|
|
7548
7667
|
}
|
|
7549
7668
|
|
|
7550
7669
|
// src/components/Auth/useApiConfig.ts
|
|
7551
|
-
var
|
|
7670
|
+
var import_react26 = require("react");
|
|
7552
7671
|
function useApiConfig(api) {
|
|
7553
|
-
return (0,
|
|
7672
|
+
return (0, import_react26.useMemo)(
|
|
7554
7673
|
() => ({
|
|
7555
7674
|
get: (endpoint, config) => api.get(endpoint, config)
|
|
7556
7675
|
}),
|
|
@@ -7559,8 +7678,8 @@ function useApiConfig(api) {
|
|
|
7559
7678
|
}
|
|
7560
7679
|
|
|
7561
7680
|
// src/components/Quiz/Quiz.tsx
|
|
7562
|
-
var
|
|
7563
|
-
var
|
|
7681
|
+
var import_phosphor_react20 = require("phosphor-react");
|
|
7682
|
+
var import_react27 = require("react");
|
|
7564
7683
|
|
|
7565
7684
|
// src/components/Quiz/useQuizStore.ts
|
|
7566
7685
|
var import_zustand7 = require("zustand");
|
|
@@ -8060,13 +8179,13 @@ var simulated_result_default = "./simulated-result-QN5HCUY5.png";
|
|
|
8060
8179
|
var mock_image_question_default = "./mock-image-question-HEZCLFDL.png";
|
|
8061
8180
|
|
|
8062
8181
|
// src/components/Quiz/Quiz.tsx
|
|
8063
|
-
var
|
|
8182
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
8064
8183
|
var getStatusBadge = (status) => {
|
|
8065
8184
|
switch (status) {
|
|
8066
8185
|
case "correct":
|
|
8067
|
-
return /* @__PURE__ */ (0,
|
|
8186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react20.CheckCircle, {}), children: "Resposta correta" });
|
|
8068
8187
|
case "incorrect":
|
|
8069
|
-
return /* @__PURE__ */ (0,
|
|
8188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react20.XCircle, {}), children: "Resposta incorreta" });
|
|
8070
8189
|
default:
|
|
8071
8190
|
return null;
|
|
8072
8191
|
}
|
|
@@ -8079,12 +8198,12 @@ var getStatusStyles = (variantCorrect) => {
|
|
|
8079
8198
|
return "bg-error-background border-error-300";
|
|
8080
8199
|
}
|
|
8081
8200
|
};
|
|
8082
|
-
var Quiz = (0,
|
|
8201
|
+
var Quiz = (0, import_react27.forwardRef)(({ children, className, variant = "default", ...props }, ref) => {
|
|
8083
8202
|
const { setVariant } = useQuizStore();
|
|
8084
|
-
(0,
|
|
8203
|
+
(0, import_react27.useEffect)(() => {
|
|
8085
8204
|
setVariant(variant);
|
|
8086
8205
|
}, [variant, setVariant]);
|
|
8087
|
-
return /* @__PURE__ */ (0,
|
|
8206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
8088
8207
|
"div",
|
|
8089
8208
|
{
|
|
8090
8209
|
ref,
|
|
@@ -8097,12 +8216,12 @@ var Quiz = (0, import_react26.forwardRef)(({ children, className, variant = "def
|
|
|
8097
8216
|
}
|
|
8098
8217
|
);
|
|
8099
8218
|
});
|
|
8100
|
-
var QuizHeaderResult = (0,
|
|
8219
|
+
var QuizHeaderResult = (0, import_react27.forwardRef)(
|
|
8101
8220
|
({ className, ...props }, ref) => {
|
|
8102
8221
|
const { getAllCurrentAnswer } = useQuizStore();
|
|
8103
8222
|
const usersAnswer = getAllCurrentAnswer();
|
|
8104
|
-
const [isCorrect, setIsCorrect] = (0,
|
|
8105
|
-
(0,
|
|
8223
|
+
const [isCorrect, setIsCorrect] = (0, import_react27.useState)(false);
|
|
8224
|
+
(0, import_react27.useEffect)(() => {
|
|
8106
8225
|
if (usersAnswer) {
|
|
8107
8226
|
setIsCorrect(
|
|
8108
8227
|
usersAnswer.length > 0 ? usersAnswer.map(
|
|
@@ -8111,7 +8230,7 @@ var QuizHeaderResult = (0, import_react26.forwardRef)(
|
|
|
8111
8230
|
);
|
|
8112
8231
|
}
|
|
8113
8232
|
}, [usersAnswer]);
|
|
8114
|
-
return /* @__PURE__ */ (0,
|
|
8233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
8115
8234
|
"div",
|
|
8116
8235
|
{
|
|
8117
8236
|
ref,
|
|
@@ -8122,14 +8241,14 @@ var QuizHeaderResult = (0, import_react26.forwardRef)(
|
|
|
8122
8241
|
),
|
|
8123
8242
|
...props,
|
|
8124
8243
|
children: [
|
|
8125
|
-
/* @__PURE__ */ (0,
|
|
8126
|
-
/* @__PURE__ */ (0,
|
|
8244
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-text-950 font-bold text-lg", children: "Resultado" }),
|
|
8245
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-text-700 text-md", children: isCorrect ? "\u{1F389} Parab\xE9ns!!" : "N\xE3o foi dessa vez..." })
|
|
8127
8246
|
]
|
|
8128
8247
|
}
|
|
8129
8248
|
);
|
|
8130
8249
|
}
|
|
8131
8250
|
);
|
|
8132
|
-
var QuizTitle = (0,
|
|
8251
|
+
var QuizTitle = (0, import_react27.forwardRef)(
|
|
8133
8252
|
({ className, ...props }, ref) => {
|
|
8134
8253
|
const {
|
|
8135
8254
|
currentQuestionIndex,
|
|
@@ -8141,7 +8260,7 @@ var QuizTitle = (0, import_react26.forwardRef)(
|
|
|
8141
8260
|
} = useQuizStore();
|
|
8142
8261
|
const totalQuestions = getTotalQuestions();
|
|
8143
8262
|
const quizTitle = getQuizTitle();
|
|
8144
|
-
return /* @__PURE__ */ (0,
|
|
8263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
8145
8264
|
"div",
|
|
8146
8265
|
{
|
|
8147
8266
|
ref,
|
|
@@ -8151,25 +8270,25 @@ var QuizTitle = (0, import_react26.forwardRef)(
|
|
|
8151
8270
|
),
|
|
8152
8271
|
...props,
|
|
8153
8272
|
children: [
|
|
8154
|
-
/* @__PURE__ */ (0,
|
|
8155
|
-
/* @__PURE__ */ (0,
|
|
8156
|
-
/* @__PURE__ */ (0,
|
|
8273
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "flex flex-col gap-2 text-center", children: [
|
|
8274
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
|
|
8275
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
|
|
8157
8276
|
] }),
|
|
8158
|
-
/* @__PURE__ */ (0,
|
|
8277
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "absolute right-2", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react20.Clock, {}), children: isStarted ? formatTime2(timeElapsed) : "00:00" }) })
|
|
8159
8278
|
]
|
|
8160
8279
|
}
|
|
8161
8280
|
);
|
|
8162
8281
|
}
|
|
8163
8282
|
);
|
|
8164
|
-
var QuizSubTitle = (0,
|
|
8283
|
+
var QuizSubTitle = (0, import_react27.forwardRef)(
|
|
8165
8284
|
({ subTitle, ...props }, ref) => {
|
|
8166
|
-
return /* @__PURE__ */ (0,
|
|
8285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "px-4 pb-2 pt-6", ...props, ref, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "font-bold text-lg text-text-950", children: subTitle }) });
|
|
8167
8286
|
}
|
|
8168
8287
|
);
|
|
8169
8288
|
var QuizHeader = () => {
|
|
8170
8289
|
const { getCurrentQuestion, currentQuestionIndex } = useQuizStore();
|
|
8171
8290
|
const currentQuestion = getCurrentQuestion();
|
|
8172
|
-
return /* @__PURE__ */ (0,
|
|
8291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
8173
8292
|
HeaderAlternative,
|
|
8174
8293
|
{
|
|
8175
8294
|
title: currentQuestion ? `Quest\xE3o ${currentQuestionIndex + 1}` : "Quest\xE3o",
|
|
@@ -8178,8 +8297,8 @@ var QuizHeader = () => {
|
|
|
8178
8297
|
}
|
|
8179
8298
|
);
|
|
8180
8299
|
};
|
|
8181
|
-
var QuizContainer = (0,
|
|
8182
|
-
return /* @__PURE__ */ (0,
|
|
8300
|
+
var QuizContainer = (0, import_react27.forwardRef)(({ children, className, ...props }, ref) => {
|
|
8301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
8183
8302
|
"div",
|
|
8184
8303
|
{
|
|
8185
8304
|
ref,
|
|
@@ -8192,7 +8311,7 @@ var QuizContainer = (0, import_react26.forwardRef)(({ children, className, ...pr
|
|
|
8192
8311
|
}
|
|
8193
8312
|
);
|
|
8194
8313
|
});
|
|
8195
|
-
var QuizContent = (0,
|
|
8314
|
+
var QuizContent = (0, import_react27.forwardRef)(({ paddingBottom }) => {
|
|
8196
8315
|
const { getCurrentQuestion, variant } = useQuizStore();
|
|
8197
8316
|
const currentQuestion = getCurrentQuestion();
|
|
8198
8317
|
const questionComponents = {
|
|
@@ -8205,7 +8324,7 @@ var QuizContent = (0, import_react26.forwardRef)(({ paddingBottom }) => {
|
|
|
8205
8324
|
["IMAGEM" /* IMAGEM */]: QuizImageQuestion
|
|
8206
8325
|
};
|
|
8207
8326
|
const QuestionComponent = currentQuestion ? questionComponents[currentQuestion.type] : null;
|
|
8208
|
-
return QuestionComponent ? /* @__PURE__ */ (0,
|
|
8327
|
+
return QuestionComponent ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(QuestionComponent, { variant, paddingBottom }) : null;
|
|
8209
8328
|
});
|
|
8210
8329
|
var QuizAlternative = ({
|
|
8211
8330
|
variant = "default",
|
|
@@ -8233,10 +8352,10 @@ var QuizAlternative = ({
|
|
|
8233
8352
|
};
|
|
8234
8353
|
});
|
|
8235
8354
|
if (!alternatives)
|
|
8236
|
-
return /* @__PURE__ */ (0,
|
|
8237
|
-
return /* @__PURE__ */ (0,
|
|
8238
|
-
/* @__PURE__ */ (0,
|
|
8239
|
-
/* @__PURE__ */ (0,
|
|
8355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { children: "N\xE3o h\xE1 Alternativas" }) });
|
|
8356
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
8357
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
8358
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
8240
8359
|
AlternativesList,
|
|
8241
8360
|
{
|
|
8242
8361
|
mode: variant === "default" ? "interactive" : "readonly",
|
|
@@ -8262,15 +8381,15 @@ var QuizMultipleChoice = ({
|
|
|
8262
8381
|
const { getCurrentQuestion, selectMultipleAnswer, getAllCurrentAnswer } = useQuizStore();
|
|
8263
8382
|
const currentQuestion = getCurrentQuestion();
|
|
8264
8383
|
const allCurrentAnswers = getAllCurrentAnswer();
|
|
8265
|
-
const prevSelectedValuesRef = (0,
|
|
8266
|
-
const prevQuestionIdRef = (0,
|
|
8267
|
-
const allCurrentAnswerIds = (0,
|
|
8384
|
+
const prevSelectedValuesRef = (0, import_react27.useRef)([]);
|
|
8385
|
+
const prevQuestionIdRef = (0, import_react27.useRef)("");
|
|
8386
|
+
const allCurrentAnswerIds = (0, import_react27.useMemo)(() => {
|
|
8268
8387
|
return allCurrentAnswers?.map((answer) => answer.optionId) || [];
|
|
8269
8388
|
}, [allCurrentAnswers]);
|
|
8270
|
-
const selectedValues = (0,
|
|
8389
|
+
const selectedValues = (0, import_react27.useMemo)(() => {
|
|
8271
8390
|
return allCurrentAnswerIds?.filter((id) => id !== null) || [];
|
|
8272
8391
|
}, [allCurrentAnswerIds]);
|
|
8273
|
-
const stableSelectedValues = (0,
|
|
8392
|
+
const stableSelectedValues = (0, import_react27.useMemo)(() => {
|
|
8274
8393
|
const currentQuestionId = currentQuestion?.id || "";
|
|
8275
8394
|
const hasQuestionChanged = prevQuestionIdRef.current !== currentQuestionId;
|
|
8276
8395
|
if (hasQuestionChanged) {
|
|
@@ -8285,7 +8404,7 @@ var QuizMultipleChoice = ({
|
|
|
8285
8404
|
}
|
|
8286
8405
|
return prevSelectedValuesRef.current;
|
|
8287
8406
|
}, [selectedValues, currentQuestion?.id]);
|
|
8288
|
-
const handleSelectedValues = (0,
|
|
8407
|
+
const handleSelectedValues = (0, import_react27.useCallback)(
|
|
8289
8408
|
(values) => {
|
|
8290
8409
|
if (currentQuestion) {
|
|
8291
8410
|
selectMultipleAnswer(currentQuestion.id, values);
|
|
@@ -8293,7 +8412,7 @@ var QuizMultipleChoice = ({
|
|
|
8293
8412
|
},
|
|
8294
8413
|
[currentQuestion, selectMultipleAnswer]
|
|
8295
8414
|
);
|
|
8296
|
-
const questionKey = (0,
|
|
8415
|
+
const questionKey = (0, import_react27.useMemo)(
|
|
8297
8416
|
() => `question-${currentQuestion?.id || "1"}`,
|
|
8298
8417
|
[currentQuestion?.id]
|
|
8299
8418
|
);
|
|
@@ -8314,10 +8433,10 @@ var QuizMultipleChoice = ({
|
|
|
8314
8433
|
};
|
|
8315
8434
|
});
|
|
8316
8435
|
if (!choices)
|
|
8317
|
-
return /* @__PURE__ */ (0,
|
|
8318
|
-
return /* @__PURE__ */ (0,
|
|
8319
|
-
/* @__PURE__ */ (0,
|
|
8320
|
-
/* @__PURE__ */ (0,
|
|
8436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { children: "N\xE3o h\xE1 Escolhas Multiplas" }) });
|
|
8437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
8438
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
8439
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
8321
8440
|
MultipleChoiceList,
|
|
8322
8441
|
{
|
|
8323
8442
|
choices,
|
|
@@ -8337,13 +8456,13 @@ var QuizDissertative = ({
|
|
|
8337
8456
|
const { getCurrentQuestion, getCurrentAnswer, selectDissertativeAnswer } = useQuizStore();
|
|
8338
8457
|
const currentQuestion = getCurrentQuestion();
|
|
8339
8458
|
const currentAnswer = getCurrentAnswer();
|
|
8340
|
-
const textareaRef = (0,
|
|
8459
|
+
const textareaRef = (0, import_react27.useRef)(null);
|
|
8341
8460
|
const handleAnswerChange = (value) => {
|
|
8342
8461
|
if (currentQuestion) {
|
|
8343
8462
|
selectDissertativeAnswer(currentQuestion.id, value);
|
|
8344
8463
|
}
|
|
8345
8464
|
};
|
|
8346
|
-
const adjustTextareaHeight = (0,
|
|
8465
|
+
const adjustTextareaHeight = (0, import_react27.useCallback)(() => {
|
|
8347
8466
|
if (textareaRef.current) {
|
|
8348
8467
|
textareaRef.current.style.height = "auto";
|
|
8349
8468
|
const scrollHeight = textareaRef.current.scrollHeight;
|
|
@@ -8353,15 +8472,15 @@ var QuizDissertative = ({
|
|
|
8353
8472
|
textareaRef.current.style.height = `${newHeight}px`;
|
|
8354
8473
|
}
|
|
8355
8474
|
}, []);
|
|
8356
|
-
(0,
|
|
8475
|
+
(0, import_react27.useEffect)(() => {
|
|
8357
8476
|
adjustTextareaHeight();
|
|
8358
8477
|
}, [currentAnswer, adjustTextareaHeight]);
|
|
8359
8478
|
if (!currentQuestion) {
|
|
8360
|
-
return /* @__PURE__ */ (0,
|
|
8479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-text-600 text-md", children: "Nenhuma quest\xE3o dispon\xEDvel" }) });
|
|
8361
8480
|
}
|
|
8362
|
-
return /* @__PURE__ */ (0,
|
|
8363
|
-
/* @__PURE__ */ (0,
|
|
8364
|
-
/* @__PURE__ */ (0,
|
|
8481
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
8482
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(QuizSubTitle, { subTitle: "Resposta" }),
|
|
8483
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(QuizContainer, { className: cn(variant != "result" && paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "space-y-4 max-h-[600px] overflow-y-auto", children: variant === "default" ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
8365
8484
|
TextArea_default,
|
|
8366
8485
|
{
|
|
8367
8486
|
ref: textareaRef,
|
|
@@ -8371,10 +8490,10 @@ var QuizDissertative = ({
|
|
|
8371
8490
|
rows: 4,
|
|
8372
8491
|
className: "min-h-[120px] max-h-[400px] resize-none overflow-y-auto"
|
|
8373
8492
|
}
|
|
8374
|
-
) }) : /* @__PURE__ */ (0,
|
|
8375
|
-
variant === "result" && currentAnswer?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */ (0,
|
|
8376
|
-
/* @__PURE__ */ (0,
|
|
8377
|
-
/* @__PURE__ */ (0,
|
|
8493
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: currentAnswer?.answer || "Nenhuma resposta fornecida" }) }) }) }),
|
|
8494
|
+
variant === "result" && currentAnswer?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
8495
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(QuizSubTitle, { subTitle: "Observa\xE7\xE3o do professor" }),
|
|
8496
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("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." }) })
|
|
8378
8497
|
] })
|
|
8379
8498
|
] });
|
|
8380
8499
|
};
|
|
@@ -8402,16 +8521,16 @@ var QuizTrueOrFalse = ({
|
|
|
8402
8521
|
];
|
|
8403
8522
|
const getLetterByIndex = (index) => String.fromCharCode(97 + index);
|
|
8404
8523
|
const isDefaultVariant = variant == "default";
|
|
8405
|
-
return /* @__PURE__ */ (0,
|
|
8406
|
-
/* @__PURE__ */ (0,
|
|
8407
|
-
/* @__PURE__ */ (0,
|
|
8524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
8525
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
8526
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
8408
8527
|
const variantCorrect = option.isCorrect ? "correct" : "incorrect";
|
|
8409
|
-
return /* @__PURE__ */ (0,
|
|
8528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
8410
8529
|
"section",
|
|
8411
8530
|
{
|
|
8412
8531
|
className: "flex flex-col gap-2",
|
|
8413
8532
|
children: [
|
|
8414
|
-
/* @__PURE__ */ (0,
|
|
8533
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
8415
8534
|
"div",
|
|
8416
8535
|
{
|
|
8417
8536
|
className: cn(
|
|
@@ -8419,20 +8538,20 @@ var QuizTrueOrFalse = ({
|
|
|
8419
8538
|
!isDefaultVariant ? getStatusStyles(variantCorrect) : ""
|
|
8420
8539
|
),
|
|
8421
8540
|
children: [
|
|
8422
|
-
/* @__PURE__ */ (0,
|
|
8423
|
-
isDefaultVariant ? /* @__PURE__ */ (0,
|
|
8424
|
-
/* @__PURE__ */ (0,
|
|
8425
|
-
/* @__PURE__ */ (0,
|
|
8426
|
-
/* @__PURE__ */ (0,
|
|
8427
|
-
/* @__PURE__ */ (0,
|
|
8541
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index).concat(") ").concat(option.label) }),
|
|
8542
|
+
isDefaultVariant ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Select_default, { size: "medium", children: [
|
|
8543
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectValue, { placeholder: "Selecione opc\xE3o" }) }),
|
|
8544
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(SelectContent, { children: [
|
|
8545
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectItem, { value: "V", children: "Verdadeiro" }),
|
|
8546
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectItem, { value: "F", children: "Falso" })
|
|
8428
8547
|
] })
|
|
8429
|
-
] }) : /* @__PURE__ */ (0,
|
|
8548
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex-shrink-0", children: getStatusBadge(variantCorrect) })
|
|
8430
8549
|
]
|
|
8431
8550
|
}
|
|
8432
8551
|
),
|
|
8433
|
-
!isDefaultVariant && /* @__PURE__ */ (0,
|
|
8434
|
-
/* @__PURE__ */ (0,
|
|
8435
|
-
!option.isCorrect && /* @__PURE__ */ (0,
|
|
8552
|
+
!isDefaultVariant && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
8553
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-text-800 text-2xs", children: "Resposta selecionada: V" }),
|
|
8554
|
+
!option.isCorrect && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-text-800 text-2xs", children: "Resposta correta: F" })
|
|
8436
8555
|
] })
|
|
8437
8556
|
]
|
|
8438
8557
|
},
|
|
@@ -8495,7 +8614,7 @@ var QuizConnectDots = ({
|
|
|
8495
8614
|
isCorrect: false
|
|
8496
8615
|
}
|
|
8497
8616
|
];
|
|
8498
|
-
const [userAnswers, setUserAnswers] = (0,
|
|
8617
|
+
const [userAnswers, setUserAnswers] = (0, import_react27.useState)(() => {
|
|
8499
8618
|
if (variant === "result") {
|
|
8500
8619
|
return mockUserAnswers;
|
|
8501
8620
|
}
|
|
@@ -8524,13 +8643,13 @@ var QuizConnectDots = ({
|
|
|
8524
8643
|
const assignedDots = new Set(
|
|
8525
8644
|
userAnswers.map((a) => a.dotOption).filter(Boolean)
|
|
8526
8645
|
);
|
|
8527
|
-
return /* @__PURE__ */ (0,
|
|
8528
|
-
/* @__PURE__ */ (0,
|
|
8529
|
-
/* @__PURE__ */ (0,
|
|
8646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
8647
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
8648
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
8530
8649
|
const answer = userAnswers[index];
|
|
8531
8650
|
const variantCorrect = answer.isCorrect ? "correct" : "incorrect";
|
|
8532
|
-
return /* @__PURE__ */ (0,
|
|
8533
|
-
/* @__PURE__ */ (0,
|
|
8651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("section", { className: "flex flex-col gap-2", children: [
|
|
8652
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
8534
8653
|
"div",
|
|
8535
8654
|
{
|
|
8536
8655
|
className: cn(
|
|
@@ -8538,30 +8657,30 @@ var QuizConnectDots = ({
|
|
|
8538
8657
|
!isDefaultVariant ? getStatusStyles(variantCorrect) : ""
|
|
8539
8658
|
),
|
|
8540
8659
|
children: [
|
|
8541
|
-
/* @__PURE__ */ (0,
|
|
8542
|
-
isDefaultVariant ? /* @__PURE__ */ (0,
|
|
8660
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index) + ") " + option.label }),
|
|
8661
|
+
isDefaultVariant ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
8543
8662
|
Select_default,
|
|
8544
8663
|
{
|
|
8545
8664
|
size: "medium",
|
|
8546
8665
|
value: answer.dotOption || void 0,
|
|
8547
8666
|
onValueChange: (value) => handleSelectDot(index, value),
|
|
8548
8667
|
children: [
|
|
8549
|
-
/* @__PURE__ */ (0,
|
|
8550
|
-
/* @__PURE__ */ (0,
|
|
8668
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectValue, { placeholder: "Selecione op\xE7\xE3o" }) }),
|
|
8669
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectContent, { children: dotsOptions.filter(
|
|
8551
8670
|
(dot) => !assignedDots.has(dot.label) || answer.dotOption === dot.label
|
|
8552
|
-
).map((dot) => /* @__PURE__ */ (0,
|
|
8671
|
+
).map((dot) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectItem, { value: dot.label, children: dot.label }, dot.label)) })
|
|
8553
8672
|
]
|
|
8554
8673
|
}
|
|
8555
|
-
) : /* @__PURE__ */ (0,
|
|
8674
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex-shrink-0", children: answer.isCorrect === null ? null : getStatusBadge(variantCorrect) })
|
|
8556
8675
|
]
|
|
8557
8676
|
}
|
|
8558
8677
|
),
|
|
8559
|
-
!isDefaultVariant && /* @__PURE__ */ (0,
|
|
8560
|
-
/* @__PURE__ */ (0,
|
|
8678
|
+
!isDefaultVariant && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
8679
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("p", { className: "text-text-800 text-2xs", children: [
|
|
8561
8680
|
"Resposta selecionada: ",
|
|
8562
8681
|
answer.dotOption || "Nenhuma"
|
|
8563
8682
|
] }),
|
|
8564
|
-
!answer.isCorrect && /* @__PURE__ */ (0,
|
|
8683
|
+
!answer.isCorrect && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("p", { className: "text-text-800 text-2xs", children: [
|
|
8565
8684
|
"Resposta correta: ",
|
|
8566
8685
|
answer.correctOption
|
|
8567
8686
|
] })
|
|
@@ -8616,8 +8735,8 @@ var QuizFill = ({
|
|
|
8616
8735
|
isCorrect: true
|
|
8617
8736
|
}
|
|
8618
8737
|
];
|
|
8619
|
-
const [answers, setAnswers] = (0,
|
|
8620
|
-
const baseId = (0,
|
|
8738
|
+
const [answers, setAnswers] = (0, import_react27.useState)({});
|
|
8739
|
+
const baseId = (0, import_react27.useId)();
|
|
8621
8740
|
const getAvailableOptionsForSelect = (selectId) => {
|
|
8622
8741
|
const usedOptions = Object.entries(answers).filter(([key]) => key !== selectId).map(([, value]) => value);
|
|
8623
8742
|
return options.filter((option) => !usedOptions.includes(option));
|
|
@@ -8630,18 +8749,18 @@ var QuizFill = ({
|
|
|
8630
8749
|
const mockAnswer = mockUserAnswers.find(
|
|
8631
8750
|
(answer) => answer.selectId === selectId
|
|
8632
8751
|
);
|
|
8633
|
-
return /* @__PURE__ */ (0,
|
|
8752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "inline-flex mb-2.5 text-success-600 font-semibold text-md border-b-2 border-success-600", children: mockAnswer?.correctAnswer });
|
|
8634
8753
|
};
|
|
8635
8754
|
const renderDefaultElement = (selectId, startIndex, selectedValue, availableOptionsForThisSelect) => {
|
|
8636
|
-
return /* @__PURE__ */ (0,
|
|
8755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
8637
8756
|
Select_default,
|
|
8638
8757
|
{
|
|
8639
8758
|
value: selectedValue,
|
|
8640
8759
|
onValueChange: (value) => handleSelectChange(selectId, value),
|
|
8641
8760
|
className: "inline-flex mb-2.5",
|
|
8642
8761
|
children: [
|
|
8643
|
-
/* @__PURE__ */ (0,
|
|
8644
|
-
/* @__PURE__ */ (0,
|
|
8762
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectTrigger, { className: "inline-flex w-auto min-w-[140px] h-8 mx-1 bg-white border-gray-300", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectValue, { placeholder: "Selecione op\xE7\xE3o" }) }),
|
|
8763
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectContent, { children: availableOptionsForThisSelect.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectItem, { value: option, children: option }, `${option}-${index}`)) })
|
|
8645
8764
|
]
|
|
8646
8765
|
},
|
|
8647
8766
|
`${selectId}-${startIndex}`
|
|
@@ -8653,8 +8772,8 @@ var QuizFill = ({
|
|
|
8653
8772
|
);
|
|
8654
8773
|
if (!mockAnswer) return null;
|
|
8655
8774
|
const action = mockAnswer.isCorrect ? "success" : "error";
|
|
8656
|
-
const icon = mockAnswer.isCorrect ? /* @__PURE__ */ (0,
|
|
8657
|
-
return /* @__PURE__ */ (0,
|
|
8775
|
+
const icon = mockAnswer.isCorrect ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react20.CheckCircle, {}) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react20.XCircle, {});
|
|
8776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
8658
8777
|
Badge_default,
|
|
8659
8778
|
{
|
|
8660
8779
|
variant: "solid",
|
|
@@ -8662,7 +8781,7 @@ var QuizFill = ({
|
|
|
8662
8781
|
iconRight: icon,
|
|
8663
8782
|
size: "large",
|
|
8664
8783
|
className: "py-3 w-[180px] justify-between mb-2.5",
|
|
8665
|
-
children: /* @__PURE__ */ (0,
|
|
8784
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-text-900", children: mockAnswer.userAnswer })
|
|
8666
8785
|
},
|
|
8667
8786
|
selectId
|
|
8668
8787
|
);
|
|
@@ -8718,25 +8837,25 @@ var QuizFill = ({
|
|
|
8718
8837
|
}
|
|
8719
8838
|
return elements;
|
|
8720
8839
|
};
|
|
8721
|
-
return /* @__PURE__ */ (0,
|
|
8722
|
-
/* @__PURE__ */ (0,
|
|
8723
|
-
/* @__PURE__ */ (0,
|
|
8840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
8841
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
8842
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(QuizContainer, { className: "h-auto pb-0", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "space-y-6 px-4 h-auto", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
8724
8843
|
"div",
|
|
8725
8844
|
{
|
|
8726
8845
|
className: cn(
|
|
8727
8846
|
"text-lg text-text-900 leading-8 h-auto",
|
|
8728
8847
|
variant != "result" && paddingBottom
|
|
8729
8848
|
),
|
|
8730
|
-
children: renderTextWithSelects(exampleText).map((element) => /* @__PURE__ */ (0,
|
|
8849
|
+
children: renderTextWithSelects(exampleText).map((element) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { children: element.element }, element.id))
|
|
8731
8850
|
}
|
|
8732
8851
|
) }) }),
|
|
8733
|
-
variant === "result" && /* @__PURE__ */ (0,
|
|
8734
|
-
/* @__PURE__ */ (0,
|
|
8735
|
-
/* @__PURE__ */ (0,
|
|
8852
|
+
variant === "result" && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
8853
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(QuizSubTitle, { subTitle: "Resultado" }),
|
|
8854
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(QuizContainer, { className: "h-auto pb-0", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "space-y-6 px-4", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
8736
8855
|
"div",
|
|
8737
8856
|
{
|
|
8738
8857
|
className: cn("text-lg text-text-900 leading-8", paddingBottom),
|
|
8739
|
-
children: renderTextWithSelects(exampleText, true).map((element) => /* @__PURE__ */ (0,
|
|
8858
|
+
children: renderTextWithSelects(exampleText, true).map((element) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { children: element.element }, element.id))
|
|
8740
8859
|
}
|
|
8741
8860
|
) }) })
|
|
8742
8861
|
] })
|
|
@@ -8756,7 +8875,7 @@ var QuizImageQuestion = ({
|
|
|
8756
8875
|
};
|
|
8757
8876
|
const correctRadiusRelative = calculateCorrectRadiusRelative();
|
|
8758
8877
|
const mockUserAnswerRelative = { x: 0.72, y: 0.348 };
|
|
8759
|
-
const [clickPositionRelative, setClickPositionRelative] = (0,
|
|
8878
|
+
const [clickPositionRelative, setClickPositionRelative] = (0, import_react27.useState)(variant == "result" ? mockUserAnswerRelative : null);
|
|
8760
8879
|
const convertToRelativeCoordinates = (x, y, rect) => {
|
|
8761
8880
|
const safeWidth = Math.max(rect.width, 1e-3);
|
|
8762
8881
|
const safeHeight = Math.max(rect.height, 1e-3);
|
|
@@ -8792,36 +8911,36 @@ var QuizImageQuestion = ({
|
|
|
8792
8911
|
}
|
|
8793
8912
|
return "bg-success-600/70 border-white";
|
|
8794
8913
|
};
|
|
8795
|
-
return /* @__PURE__ */ (0,
|
|
8796
|
-
/* @__PURE__ */ (0,
|
|
8797
|
-
/* @__PURE__ */ (0,
|
|
8914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
8915
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(QuizSubTitle, { subTitle: "Clique na \xE1rea correta" }),
|
|
8916
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
8798
8917
|
"div",
|
|
8799
8918
|
{
|
|
8800
8919
|
"data-testid": "quiz-image-container",
|
|
8801
8920
|
className: "space-y-6 p-3 relative inline-block",
|
|
8802
8921
|
children: [
|
|
8803
|
-
variant == "result" && /* @__PURE__ */ (0,
|
|
8922
|
+
variant == "result" && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
8804
8923
|
"div",
|
|
8805
8924
|
{
|
|
8806
8925
|
"data-testid": "quiz-legend",
|
|
8807
8926
|
className: "flex items-center gap-4 text-xs",
|
|
8808
8927
|
children: [
|
|
8809
|
-
/* @__PURE__ */ (0,
|
|
8810
|
-
/* @__PURE__ */ (0,
|
|
8811
|
-
/* @__PURE__ */ (0,
|
|
8928
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
8929
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "w-3 h-3 rounded-full bg-indicator-primary/70 border border-[#F8CC2E]" }),
|
|
8930
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-text-600 font-medium text-sm", children: "\xC1rea correta" })
|
|
8812
8931
|
] }),
|
|
8813
|
-
/* @__PURE__ */ (0,
|
|
8814
|
-
/* @__PURE__ */ (0,
|
|
8815
|
-
/* @__PURE__ */ (0,
|
|
8932
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
8933
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "w-3 h-3 rounded-full bg-success-600/70 border border-white" }),
|
|
8934
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-text-600 font-medium text-sm", children: "Resposta correta" })
|
|
8816
8935
|
] }),
|
|
8817
|
-
/* @__PURE__ */ (0,
|
|
8818
|
-
/* @__PURE__ */ (0,
|
|
8819
|
-
/* @__PURE__ */ (0,
|
|
8936
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
8937
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "w-3 h-3 rounded-full bg-indicator-error/70 border border-white" }),
|
|
8938
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-text-600 font-medium text-sm", children: "Resposta incorreta" })
|
|
8820
8939
|
] })
|
|
8821
8940
|
]
|
|
8822
8941
|
}
|
|
8823
8942
|
),
|
|
8824
|
-
/* @__PURE__ */ (0,
|
|
8943
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
8825
8944
|
"button",
|
|
8826
8945
|
{
|
|
8827
8946
|
"data-testid": "quiz-image-button",
|
|
@@ -8836,7 +8955,7 @@ var QuizImageQuestion = ({
|
|
|
8836
8955
|
},
|
|
8837
8956
|
"aria-label": "\xC1rea da imagem interativa",
|
|
8838
8957
|
children: [
|
|
8839
|
-
/* @__PURE__ */ (0,
|
|
8958
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
8840
8959
|
"img",
|
|
8841
8960
|
{
|
|
8842
8961
|
"data-testid": "quiz-image",
|
|
@@ -8845,7 +8964,7 @@ var QuizImageQuestion = ({
|
|
|
8845
8964
|
className: "w-full h-auto rounded-md"
|
|
8846
8965
|
}
|
|
8847
8966
|
),
|
|
8848
|
-
variant === "result" && /* @__PURE__ */ (0,
|
|
8967
|
+
variant === "result" && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
8849
8968
|
"div",
|
|
8850
8969
|
{
|
|
8851
8970
|
"data-testid": "quiz-correct-circle",
|
|
@@ -8860,7 +8979,7 @@ var QuizImageQuestion = ({
|
|
|
8860
8979
|
}
|
|
8861
8980
|
}
|
|
8862
8981
|
),
|
|
8863
|
-
clickPositionRelative && /* @__PURE__ */ (0,
|
|
8982
|
+
clickPositionRelative && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
8864
8983
|
"div",
|
|
8865
8984
|
{
|
|
8866
8985
|
"data-testid": "quiz-user-circle",
|
|
@@ -8928,16 +9047,16 @@ var QuizQuestionList = ({
|
|
|
8928
9047
|
return "Em branco";
|
|
8929
9048
|
}
|
|
8930
9049
|
};
|
|
8931
|
-
return /* @__PURE__ */ (0,
|
|
8932
|
-
([subjectId, questions]) => /* @__PURE__ */ (0,
|
|
8933
|
-
/* @__PURE__ */ (0,
|
|
8934
|
-
/* @__PURE__ */ (0,
|
|
8935
|
-
/* @__PURE__ */ (0,
|
|
9050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "space-y-6 px-4", children: Object.entries(filteredGroupedQuestions).map(
|
|
9051
|
+
([subjectId, questions]) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("section", { className: "flex flex-col gap-2", children: [
|
|
9052
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "pt-6 pb-4 flex flex-row gap-2", children: [
|
|
9053
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "bg-primary-500 p-1 rounded-sm flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react20.BookOpen, { size: 17, className: "text-white" }) }),
|
|
9054
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-text-800 font-bold text-lg", children: subjectId })
|
|
8936
9055
|
] }),
|
|
8937
|
-
/* @__PURE__ */ (0,
|
|
9056
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("ul", { className: "flex flex-col gap-2", children: questions.map((question) => {
|
|
8938
9057
|
const status = getQuestionStatus(question.id);
|
|
8939
9058
|
const questionNumber = getQuestionIndex(question.id);
|
|
8940
|
-
return /* @__PURE__ */ (0,
|
|
9059
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
8941
9060
|
CardStatus,
|
|
8942
9061
|
{
|
|
8943
9062
|
header: `Quest\xE3o ${questionNumber.toString().padStart(2, "0")}`,
|
|
@@ -8953,7 +9072,7 @@ var QuizQuestionList = ({
|
|
|
8953
9072
|
] }, subjectId)
|
|
8954
9073
|
) });
|
|
8955
9074
|
};
|
|
8956
|
-
var QuizFooter = (0,
|
|
9075
|
+
var QuizFooter = (0, import_react27.forwardRef)(
|
|
8957
9076
|
({
|
|
8958
9077
|
className,
|
|
8959
9078
|
onGoToSimulated,
|
|
@@ -8981,11 +9100,11 @@ var QuizFooter = (0, import_react26.forwardRef)(
|
|
|
8981
9100
|
const currentAnswer = getCurrentAnswer();
|
|
8982
9101
|
const currentQuestion = getCurrentQuestion();
|
|
8983
9102
|
const isCurrentQuestionSkipped = currentQuestion ? getQuestionStatusFromUserAnswers(currentQuestion.id) === "skipped" : false;
|
|
8984
|
-
const [alertDialogOpen, setAlertDialogOpen] = (0,
|
|
8985
|
-
const [modalResultOpen, setModalResultOpen] = (0,
|
|
8986
|
-
const [modalNavigateOpen, setModalNavigateOpen] = (0,
|
|
8987
|
-
const [modalResolutionOpen, setModalResolutionOpen] = (0,
|
|
8988
|
-
const [filterType, setFilterType] = (0,
|
|
9103
|
+
const [alertDialogOpen, setAlertDialogOpen] = (0, import_react27.useState)(false);
|
|
9104
|
+
const [modalResultOpen, setModalResultOpen] = (0, import_react27.useState)(false);
|
|
9105
|
+
const [modalNavigateOpen, setModalNavigateOpen] = (0, import_react27.useState)(false);
|
|
9106
|
+
const [modalResolutionOpen, setModalResolutionOpen] = (0, import_react27.useState)(false);
|
|
9107
|
+
const [filterType, setFilterType] = (0, import_react27.useState)("all");
|
|
8989
9108
|
const unansweredQuestions = getUnansweredQuestionsFromUserAnswers();
|
|
8990
9109
|
const userAnswers = getUserAnswers();
|
|
8991
9110
|
const allQuestions = getTotalQuestions();
|
|
@@ -9017,8 +9136,8 @@ var QuizFooter = (0, import_react26.forwardRef)(
|
|
|
9017
9136
|
setAlertDialogOpen(false);
|
|
9018
9137
|
}
|
|
9019
9138
|
};
|
|
9020
|
-
return /* @__PURE__ */ (0,
|
|
9021
|
-
/* @__PURE__ */ (0,
|
|
9139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
9140
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
9022
9141
|
"footer",
|
|
9023
9142
|
{
|
|
9024
9143
|
ref,
|
|
@@ -9027,17 +9146,17 @@ var QuizFooter = (0, import_react26.forwardRef)(
|
|
|
9027
9146
|
className
|
|
9028
9147
|
),
|
|
9029
9148
|
...props,
|
|
9030
|
-
children: variant === "default" ? /* @__PURE__ */ (0,
|
|
9031
|
-
/* @__PURE__ */ (0,
|
|
9032
|
-
/* @__PURE__ */ (0,
|
|
9149
|
+
children: variant === "default" ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
9150
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex flex-row items-center gap-1", children: [
|
|
9151
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
9033
9152
|
IconButton_default,
|
|
9034
9153
|
{
|
|
9035
|
-
icon: /* @__PURE__ */ (0,
|
|
9154
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react20.SquaresFour, { size: 24, className: "text-text-950" }),
|
|
9036
9155
|
size: "md",
|
|
9037
9156
|
onClick: () => setModalNavigateOpen(true)
|
|
9038
9157
|
}
|
|
9039
9158
|
),
|
|
9040
|
-
isFirstQuestion ? /* @__PURE__ */ (0,
|
|
9159
|
+
isFirstQuestion ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
9041
9160
|
Button_default,
|
|
9042
9161
|
{
|
|
9043
9162
|
variant: "outline",
|
|
@@ -9048,13 +9167,13 @@ var QuizFooter = (0, import_react26.forwardRef)(
|
|
|
9048
9167
|
},
|
|
9049
9168
|
children: "Pular"
|
|
9050
9169
|
}
|
|
9051
|
-
) : /* @__PURE__ */ (0,
|
|
9170
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
9052
9171
|
Button_default,
|
|
9053
9172
|
{
|
|
9054
9173
|
size: "medium",
|
|
9055
9174
|
variant: "link",
|
|
9056
9175
|
action: "primary",
|
|
9057
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
9176
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react20.CaretLeft, { size: 18 }),
|
|
9058
9177
|
onClick: () => {
|
|
9059
9178
|
goToPreviousQuestion();
|
|
9060
9179
|
},
|
|
@@ -9062,7 +9181,7 @@ var QuizFooter = (0, import_react26.forwardRef)(
|
|
|
9062
9181
|
}
|
|
9063
9182
|
)
|
|
9064
9183
|
] }),
|
|
9065
|
-
!isFirstQuestion && /* @__PURE__ */ (0,
|
|
9184
|
+
!isFirstQuestion && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
9066
9185
|
Button_default,
|
|
9067
9186
|
{
|
|
9068
9187
|
size: "small",
|
|
@@ -9075,7 +9194,7 @@ var QuizFooter = (0, import_react26.forwardRef)(
|
|
|
9075
9194
|
children: "Pular"
|
|
9076
9195
|
}
|
|
9077
9196
|
),
|
|
9078
|
-
isLastQuestion ? /* @__PURE__ */ (0,
|
|
9197
|
+
isLastQuestion ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
9079
9198
|
Button_default,
|
|
9080
9199
|
{
|
|
9081
9200
|
size: "medium",
|
|
@@ -9085,13 +9204,13 @@ var QuizFooter = (0, import_react26.forwardRef)(
|
|
|
9085
9204
|
onClick: handleFinishQuiz,
|
|
9086
9205
|
children: "Finalizar"
|
|
9087
9206
|
}
|
|
9088
|
-
) : /* @__PURE__ */ (0,
|
|
9207
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
9089
9208
|
Button_default,
|
|
9090
9209
|
{
|
|
9091
9210
|
size: "medium",
|
|
9092
9211
|
variant: "link",
|
|
9093
9212
|
action: "primary",
|
|
9094
|
-
iconRight: /* @__PURE__ */ (0,
|
|
9213
|
+
iconRight: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react20.CaretRight, { size: 18 }),
|
|
9095
9214
|
disabled: !currentAnswer && !isCurrentQuestionSkipped,
|
|
9096
9215
|
onClick: () => {
|
|
9097
9216
|
goToNextQuestion();
|
|
@@ -9099,7 +9218,7 @@ var QuizFooter = (0, import_react26.forwardRef)(
|
|
|
9099
9218
|
children: "Avan\xE7ar"
|
|
9100
9219
|
}
|
|
9101
9220
|
)
|
|
9102
|
-
] }) : /* @__PURE__ */ (0,
|
|
9221
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex flex-row items-center justify-end w-full", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
9103
9222
|
Button_default,
|
|
9104
9223
|
{
|
|
9105
9224
|
variant: "solid",
|
|
@@ -9111,7 +9230,7 @@ var QuizFooter = (0, import_react26.forwardRef)(
|
|
|
9111
9230
|
) })
|
|
9112
9231
|
}
|
|
9113
9232
|
),
|
|
9114
|
-
/* @__PURE__ */ (0,
|
|
9233
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
9115
9234
|
AlertDialog,
|
|
9116
9235
|
{
|
|
9117
9236
|
isOpen: alertDialogOpen,
|
|
@@ -9123,7 +9242,7 @@ var QuizFooter = (0, import_react26.forwardRef)(
|
|
|
9123
9242
|
onSubmit: handleAlertSubmit
|
|
9124
9243
|
}
|
|
9125
9244
|
),
|
|
9126
|
-
/* @__PURE__ */ (0,
|
|
9245
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
9127
9246
|
Modal_default,
|
|
9128
9247
|
{
|
|
9129
9248
|
isOpen: modalResultOpen,
|
|
@@ -9133,8 +9252,8 @@ var QuizFooter = (0, import_react26.forwardRef)(
|
|
|
9133
9252
|
closeOnEscape: false,
|
|
9134
9253
|
hideCloseButton: true,
|
|
9135
9254
|
size: "md",
|
|
9136
|
-
children: /* @__PURE__ */ (0,
|
|
9137
|
-
/* @__PURE__ */ (0,
|
|
9255
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
9256
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
9138
9257
|
"img",
|
|
9139
9258
|
{
|
|
9140
9259
|
src: simulated_result_default,
|
|
@@ -9142,9 +9261,9 @@ var QuizFooter = (0, import_react26.forwardRef)(
|
|
|
9142
9261
|
className: "w-[282px] h-auto object-cover"
|
|
9143
9262
|
}
|
|
9144
9263
|
),
|
|
9145
|
-
/* @__PURE__ */ (0,
|
|
9146
|
-
/* @__PURE__ */ (0,
|
|
9147
|
-
/* @__PURE__ */ (0,
|
|
9264
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
9265
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h2", { className: "text-text-950 font-bold text-lg", children: "Voc\xEA concluiu o simulado!" }),
|
|
9266
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("p", { className: "text-text-500 font-sm", children: [
|
|
9148
9267
|
"Voc\xEA acertou",
|
|
9149
9268
|
" ",
|
|
9150
9269
|
(() => {
|
|
@@ -9166,8 +9285,8 @@ var QuizFooter = (0, import_react26.forwardRef)(
|
|
|
9166
9285
|
" quest\xF5es."
|
|
9167
9286
|
] })
|
|
9168
9287
|
] }),
|
|
9169
|
-
/* @__PURE__ */ (0,
|
|
9170
|
-
/* @__PURE__ */ (0,
|
|
9288
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: [
|
|
9289
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
9171
9290
|
Button_default,
|
|
9172
9291
|
{
|
|
9173
9292
|
variant: "outline",
|
|
@@ -9177,31 +9296,31 @@ var QuizFooter = (0, import_react26.forwardRef)(
|
|
|
9177
9296
|
children: "Ir para simulados"
|
|
9178
9297
|
}
|
|
9179
9298
|
),
|
|
9180
|
-
/* @__PURE__ */ (0,
|
|
9299
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Button_default, { className: "w-full", onClick: onDetailResult, children: "Detalhar resultado" })
|
|
9181
9300
|
] })
|
|
9182
9301
|
] })
|
|
9183
9302
|
}
|
|
9184
9303
|
),
|
|
9185
|
-
/* @__PURE__ */ (0,
|
|
9304
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
9186
9305
|
Modal_default,
|
|
9187
9306
|
{
|
|
9188
9307
|
isOpen: modalNavigateOpen,
|
|
9189
9308
|
onClose: () => setModalNavigateOpen(false),
|
|
9190
9309
|
title: "Quest\xF5es",
|
|
9191
9310
|
size: "lg",
|
|
9192
|
-
children: /* @__PURE__ */ (0,
|
|
9193
|
-
/* @__PURE__ */ (0,
|
|
9194
|
-
/* @__PURE__ */ (0,
|
|
9195
|
-
/* @__PURE__ */ (0,
|
|
9196
|
-
/* @__PURE__ */ (0,
|
|
9197
|
-
/* @__PURE__ */ (0,
|
|
9198
|
-
/* @__PURE__ */ (0,
|
|
9199
|
-
/* @__PURE__ */ (0,
|
|
9200
|
-
/* @__PURE__ */ (0,
|
|
9311
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex flex-col w-full h-full", children: [
|
|
9312
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex flex-row justify-between items-center py-6 pt-6 pb-4 border-b border-border-200", children: [
|
|
9313
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-text-950 font-bold text-lg", children: "Filtrar por" }),
|
|
9314
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "max-w-[266px]", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Select_default, { value: filterType, onValueChange: setFilterType, children: [
|
|
9315
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectTrigger, { variant: "rounded", className: "max-w-[266px]", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectValue, { placeholder: "Selecione uma op\xE7\xE3o" }) }),
|
|
9316
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(SelectContent, { children: [
|
|
9317
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectItem, { value: "all", children: "Todas" }),
|
|
9318
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectItem, { value: "unanswered", children: "Em branco" }),
|
|
9319
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(SelectItem, { value: "answered", children: "Respondidas" })
|
|
9201
9320
|
] })
|
|
9202
9321
|
] }) })
|
|
9203
9322
|
] }),
|
|
9204
|
-
/* @__PURE__ */ (0,
|
|
9323
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex flex-col gap-2 not-lg:h-[calc(100vh-200px)] lg:max-h-[687px] overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
9205
9324
|
QuizQuestionList,
|
|
9206
9325
|
{
|
|
9207
9326
|
filterType,
|
|
@@ -9211,7 +9330,7 @@ var QuizFooter = (0, import_react26.forwardRef)(
|
|
|
9211
9330
|
] })
|
|
9212
9331
|
}
|
|
9213
9332
|
),
|
|
9214
|
-
/* @__PURE__ */ (0,
|
|
9333
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
9215
9334
|
Modal_default,
|
|
9216
9335
|
{
|
|
9217
9336
|
isOpen: modalResolutionOpen,
|
|
@@ -9224,25 +9343,25 @@ var QuizFooter = (0, import_react26.forwardRef)(
|
|
|
9224
9343
|
] });
|
|
9225
9344
|
}
|
|
9226
9345
|
);
|
|
9227
|
-
var QuizResultHeaderTitle = (0,
|
|
9346
|
+
var QuizResultHeaderTitle = (0, import_react27.forwardRef)(({ className, ...props }, ref) => {
|
|
9228
9347
|
const { bySimulated } = useQuizStore();
|
|
9229
|
-
return /* @__PURE__ */ (0,
|
|
9348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
9230
9349
|
"div",
|
|
9231
9350
|
{
|
|
9232
9351
|
ref,
|
|
9233
9352
|
className: cn("flex flex-row pt-4 justify-between", className),
|
|
9234
9353
|
...props,
|
|
9235
9354
|
children: [
|
|
9236
|
-
/* @__PURE__ */ (0,
|
|
9237
|
-
bySimulated && /* @__PURE__ */ (0,
|
|
9355
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: "Resultado" }),
|
|
9356
|
+
bySimulated && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Badge_default, { variant: "solid", action: "info", children: bySimulated.category })
|
|
9238
9357
|
]
|
|
9239
9358
|
}
|
|
9240
9359
|
);
|
|
9241
9360
|
});
|
|
9242
|
-
var QuizResultTitle = (0,
|
|
9361
|
+
var QuizResultTitle = (0, import_react27.forwardRef)(({ className, ...props }, ref) => {
|
|
9243
9362
|
const { getQuizTitle } = useQuizStore();
|
|
9244
9363
|
const quizTitle = getQuizTitle();
|
|
9245
|
-
return /* @__PURE__ */ (0,
|
|
9364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
9246
9365
|
"p",
|
|
9247
9366
|
{
|
|
9248
9367
|
className: cn("pt-6 pb-4 text-text-950 font-bold text-lg", className),
|
|
@@ -9252,7 +9371,7 @@ var QuizResultTitle = (0, import_react26.forwardRef)(({ className, ...props }, r
|
|
|
9252
9371
|
}
|
|
9253
9372
|
);
|
|
9254
9373
|
});
|
|
9255
|
-
var QuizResultPerformance = (0,
|
|
9374
|
+
var QuizResultPerformance = (0, import_react27.forwardRef)(
|
|
9256
9375
|
({ ...props }, ref) => {
|
|
9257
9376
|
const {
|
|
9258
9377
|
getTotalQuestions,
|
|
@@ -9298,15 +9417,15 @@ var QuizResultPerformance = (0, import_react26.forwardRef)(
|
|
|
9298
9417
|
});
|
|
9299
9418
|
}
|
|
9300
9419
|
const percentage = totalQuestions > 0 ? Math.round(correctAnswers / totalQuestions * 100) : 0;
|
|
9301
|
-
return /* @__PURE__ */ (0,
|
|
9420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
9302
9421
|
"div",
|
|
9303
9422
|
{
|
|
9304
9423
|
className: "flex flex-row gap-6 p-6 rounded-xl bg-background justify-between",
|
|
9305
9424
|
ref,
|
|
9306
9425
|
...props,
|
|
9307
9426
|
children: [
|
|
9308
|
-
/* @__PURE__ */ (0,
|
|
9309
|
-
/* @__PURE__ */ (0,
|
|
9427
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "relative", children: [
|
|
9428
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
9310
9429
|
ProgressCircle_default,
|
|
9311
9430
|
{
|
|
9312
9431
|
size: "medium",
|
|
@@ -9316,21 +9435,21 @@ var QuizResultPerformance = (0, import_react26.forwardRef)(
|
|
|
9316
9435
|
label: ""
|
|
9317
9436
|
}
|
|
9318
9437
|
),
|
|
9319
|
-
/* @__PURE__ */ (0,
|
|
9320
|
-
/* @__PURE__ */ (0,
|
|
9321
|
-
/* @__PURE__ */ (0,
|
|
9322
|
-
/* @__PURE__ */ (0,
|
|
9438
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
9439
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-1 mb-1", children: [
|
|
9440
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react20.Clock, { size: 12, weight: "regular", className: "text-text-800" }),
|
|
9441
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-2xs font-medium text-text-800", children: formatTime2(timeElapsed) })
|
|
9323
9442
|
] }),
|
|
9324
|
-
/* @__PURE__ */ (0,
|
|
9443
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "text-2xl font-medium text-text-800 leading-7", children: [
|
|
9325
9444
|
correctAnswers,
|
|
9326
9445
|
" de ",
|
|
9327
9446
|
totalQuestions
|
|
9328
9447
|
] }),
|
|
9329
|
-
/* @__PURE__ */ (0,
|
|
9448
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "text-2xs font-medium text-text-600 mt-1", children: "Corretas" })
|
|
9330
9449
|
] })
|
|
9331
9450
|
] }),
|
|
9332
|
-
/* @__PURE__ */ (0,
|
|
9333
|
-
/* @__PURE__ */ (0,
|
|
9451
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex flex-col gap-4 w-full", children: [
|
|
9452
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
9334
9453
|
ProgressBar_default,
|
|
9335
9454
|
{
|
|
9336
9455
|
className: "w-full",
|
|
@@ -9344,7 +9463,7 @@ var QuizResultPerformance = (0, import_react26.forwardRef)(
|
|
|
9344
9463
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
9345
9464
|
}
|
|
9346
9465
|
),
|
|
9347
|
-
/* @__PURE__ */ (0,
|
|
9466
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
9348
9467
|
ProgressBar_default,
|
|
9349
9468
|
{
|
|
9350
9469
|
className: "w-full",
|
|
@@ -9358,7 +9477,7 @@ var QuizResultPerformance = (0, import_react26.forwardRef)(
|
|
|
9358
9477
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
9359
9478
|
}
|
|
9360
9479
|
),
|
|
9361
|
-
/* @__PURE__ */ (0,
|
|
9480
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
9362
9481
|
ProgressBar_default,
|
|
9363
9482
|
{
|
|
9364
9483
|
className: "w-full",
|
|
@@ -9378,7 +9497,7 @@ var QuizResultPerformance = (0, import_react26.forwardRef)(
|
|
|
9378
9497
|
);
|
|
9379
9498
|
}
|
|
9380
9499
|
);
|
|
9381
|
-
var QuizListResult = (0,
|
|
9500
|
+
var QuizListResult = (0, import_react27.forwardRef)(({ className, onSubjectClick, ...props }, ref) => {
|
|
9382
9501
|
const {
|
|
9383
9502
|
getQuestionsGroupedBySubject,
|
|
9384
9503
|
isQuestionAnswered,
|
|
@@ -9407,9 +9526,9 @@ var QuizListResult = (0, import_react26.forwardRef)(({ className, onSubjectClick
|
|
|
9407
9526
|
};
|
|
9408
9527
|
}
|
|
9409
9528
|
);
|
|
9410
|
-
return /* @__PURE__ */ (0,
|
|
9411
|
-
/* @__PURE__ */ (0,
|
|
9412
|
-
/* @__PURE__ */ (0,
|
|
9529
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("section", { ref, className, ...props, children: [
|
|
9530
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Mat\xE9rias" }),
|
|
9531
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("ul", { className: "flex flex-col gap-2", children: subjectsStats.map((subject) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
9413
9532
|
CardResults,
|
|
9414
9533
|
{
|
|
9415
9534
|
onClick: () => onSubjectClick?.(subject.subject),
|
|
@@ -9417,7 +9536,7 @@ var QuizListResult = (0, import_react26.forwardRef)(({ className, onSubjectClick
|
|
|
9417
9536
|
header: subject.subject,
|
|
9418
9537
|
correct_answers: subject.correct,
|
|
9419
9538
|
incorrect_answers: subject.incorrect,
|
|
9420
|
-
icon: /* @__PURE__ */ (0,
|
|
9539
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react20.Book, { size: 20 }),
|
|
9421
9540
|
direction: "row"
|
|
9422
9541
|
}
|
|
9423
9542
|
) }, subject.subject)) })
|
|
@@ -9434,13 +9553,13 @@ var QuizListResultByMateria = ({
|
|
|
9434
9553
|
} = useQuizStore();
|
|
9435
9554
|
const groupedQuestions = getQuestionsGroupedBySubject();
|
|
9436
9555
|
const answeredQuestions = groupedQuestions[subject] || [];
|
|
9437
|
-
return /* @__PURE__ */ (0,
|
|
9438
|
-
/* @__PURE__ */ (0,
|
|
9439
|
-
/* @__PURE__ */ (0,
|
|
9440
|
-
/* @__PURE__ */ (0,
|
|
9441
|
-
/* @__PURE__ */ (0,
|
|
9556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "w-full max-w-[1000px] flex flex-col mx-auto h-full relative not-lg:px-6", children: [
|
|
9557
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex flex-row pt-4 justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: subject }) }),
|
|
9558
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("section", { className: "flex flex-col ", children: [
|
|
9559
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Resultado das quest\xF5es" }),
|
|
9560
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("ul", { className: "flex flex-col gap-2 pt-4", children: answeredQuestions.map((question) => {
|
|
9442
9561
|
const questionIndex = getQuestionIndex(question.id);
|
|
9443
|
-
return /* @__PURE__ */ (0,
|
|
9562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
9444
9563
|
CardStatus,
|
|
9445
9564
|
{
|
|
9446
9565
|
className: "max-w-full",
|
|
@@ -9554,6 +9673,7 @@ var QuizListResultByMateria = ({
|
|
|
9554
9673
|
Toast,
|
|
9555
9674
|
Toaster,
|
|
9556
9675
|
VideoPlayer,
|
|
9676
|
+
Whiteboard,
|
|
9557
9677
|
createZustandAuthAdapter,
|
|
9558
9678
|
getRootDomain,
|
|
9559
9679
|
getStatusBadge,
|