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