analytica-frontend-lib 1.1.94 → 1.1.95
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/StatisticsCard/index.d.mts +77 -0
- package/dist/StatisticsCard/index.d.ts +77 -0
- package/dist/StatisticsCard/index.js +608 -0
- package/dist/StatisticsCard/index.js.map +1 -0
- package/dist/StatisticsCard/index.mjs +589 -0
- package/dist/StatisticsCard/index.mjs.map +1 -0
- package/dist/index.css +38 -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 +459 -340
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +447 -329
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +38 -0
- package/dist/styles.css.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -128,6 +128,7 @@ __export(src_exports, {
|
|
|
128
128
|
SkeletonRounded: () => SkeletonRounded,
|
|
129
129
|
SkeletonTable: () => SkeletonTable,
|
|
130
130
|
SkeletonText: () => SkeletonText,
|
|
131
|
+
StatisticsCard: () => StatisticsCard,
|
|
131
132
|
Stepper: () => Stepper_default,
|
|
132
133
|
SubjectEnum: () => SubjectEnum,
|
|
133
134
|
SubjectInfo: () => SubjectInfo,
|
|
@@ -8154,8 +8155,125 @@ var CardSimulationHistory = (0, import_react25.forwardRef)(({ data, onSimulation
|
|
|
8154
8155
|
);
|
|
8155
8156
|
});
|
|
8156
8157
|
|
|
8157
|
-
// src/components/
|
|
8158
|
+
// src/components/StatisticsCard/StatisticsCard.tsx
|
|
8159
|
+
var import_phosphor_react18 = require("phosphor-react");
|
|
8158
8160
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
8161
|
+
var VARIANT_STYLES = {
|
|
8162
|
+
high: "bg-success-background",
|
|
8163
|
+
medium: "bg-warning-background",
|
|
8164
|
+
low: "bg-error-background",
|
|
8165
|
+
total: "bg-info-background"
|
|
8166
|
+
};
|
|
8167
|
+
var VALUE_TEXT_COLORS = {
|
|
8168
|
+
high: "text-success-700",
|
|
8169
|
+
medium: "text-warning-600",
|
|
8170
|
+
low: "text-error-700",
|
|
8171
|
+
total: "text-info-700"
|
|
8172
|
+
};
|
|
8173
|
+
var StatCard = ({ item }) => {
|
|
8174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
8175
|
+
"div",
|
|
8176
|
+
{
|
|
8177
|
+
className: `rounded-xl py-[17px] px-6 min-h-[105px] flex flex-col justify-center items-start gap-1 ${VARIANT_STYLES[item.variant]}`,
|
|
8178
|
+
children: [
|
|
8179
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
8180
|
+
Text_default,
|
|
8181
|
+
{
|
|
8182
|
+
size: "4xl",
|
|
8183
|
+
weight: "bold",
|
|
8184
|
+
className: `${VALUE_TEXT_COLORS[item.variant]} leading-[42px] tracking-[0.2px] self-stretch`,
|
|
8185
|
+
children: item.value
|
|
8186
|
+
}
|
|
8187
|
+
),
|
|
8188
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
8189
|
+
Text_default,
|
|
8190
|
+
{
|
|
8191
|
+
size: "xs",
|
|
8192
|
+
weight: "bold",
|
|
8193
|
+
className: "uppercase text-[8px] leading-[9px] text-text-800 self-stretch",
|
|
8194
|
+
children: item.label
|
|
8195
|
+
}
|
|
8196
|
+
)
|
|
8197
|
+
]
|
|
8198
|
+
}
|
|
8199
|
+
);
|
|
8200
|
+
};
|
|
8201
|
+
var StatisticsCard = ({
|
|
8202
|
+
title,
|
|
8203
|
+
data,
|
|
8204
|
+
emptyStateMessage,
|
|
8205
|
+
emptyStateButtonText,
|
|
8206
|
+
onEmptyStateButtonClick,
|
|
8207
|
+
dropdownOptions,
|
|
8208
|
+
selectedDropdownValue,
|
|
8209
|
+
onDropdownChange,
|
|
8210
|
+
selectPlaceholder = "Selecione um per\xEDodo",
|
|
8211
|
+
dropdownAriaLabel = "Filtro de per\xEDodo",
|
|
8212
|
+
className = ""
|
|
8213
|
+
}) => {
|
|
8214
|
+
const hasData = data && data.length > 0;
|
|
8215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
8216
|
+
"div",
|
|
8217
|
+
{
|
|
8218
|
+
className: `bg-background rounded-xl p-4 h-auto lg:h-[185px] flex flex-col gap-2 ${className}`,
|
|
8219
|
+
children: [
|
|
8220
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex flex-row justify-between items-center gap-4", children: [
|
|
8221
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text_default, { as: "h3", size: "sm", weight: "medium", color: "text-text-600", children: title }),
|
|
8222
|
+
dropdownOptions && dropdownOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "w-[99px]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
8223
|
+
Select_default,
|
|
8224
|
+
{
|
|
8225
|
+
value: selectedDropdownValue,
|
|
8226
|
+
onValueChange: onDropdownChange,
|
|
8227
|
+
size: "medium",
|
|
8228
|
+
children: [
|
|
8229
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
8230
|
+
SelectTrigger,
|
|
8231
|
+
{
|
|
8232
|
+
className: "border border-border-300 rounded whitespace-nowrap",
|
|
8233
|
+
"aria-label": dropdownAriaLabel,
|
|
8234
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SelectValue, { placeholder: selectPlaceholder })
|
|
8235
|
+
}
|
|
8236
|
+
),
|
|
8237
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SelectContent, { children: dropdownOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SelectItem, { value: option.value, children: option.label }, option.value)) })
|
|
8238
|
+
]
|
|
8239
|
+
}
|
|
8240
|
+
) })
|
|
8241
|
+
] }),
|
|
8242
|
+
hasData ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[13px]", children: data.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
8243
|
+
StatCard,
|
|
8244
|
+
{
|
|
8245
|
+
item
|
|
8246
|
+
},
|
|
8247
|
+
`${item.variant}-${item.label}-${index}`
|
|
8248
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "border border-dashed border-border-300 rounded-lg p-6 min-h-[105px] flex flex-col items-center justify-center gap-2", children: [
|
|
8249
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
8250
|
+
Text_default,
|
|
8251
|
+
{
|
|
8252
|
+
size: "sm",
|
|
8253
|
+
color: "text-text-600",
|
|
8254
|
+
className: "text-center max-w-md",
|
|
8255
|
+
children: emptyStateMessage
|
|
8256
|
+
}
|
|
8257
|
+
),
|
|
8258
|
+
onEmptyStateButtonClick && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
8259
|
+
Button_default,
|
|
8260
|
+
{
|
|
8261
|
+
variant: "outline",
|
|
8262
|
+
action: "primary",
|
|
8263
|
+
size: "small",
|
|
8264
|
+
onClick: onEmptyStateButtonClick,
|
|
8265
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_phosphor_react18.Plus, { size: 16, weight: "bold" }),
|
|
8266
|
+
children: emptyStateButtonText
|
|
8267
|
+
}
|
|
8268
|
+
)
|
|
8269
|
+
] })
|
|
8270
|
+
]
|
|
8271
|
+
}
|
|
8272
|
+
);
|
|
8273
|
+
};
|
|
8274
|
+
|
|
8275
|
+
// src/components/NotFound/NotFound.tsx
|
|
8276
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
8159
8277
|
var NotFound = ({
|
|
8160
8278
|
title,
|
|
8161
8279
|
description,
|
|
@@ -8198,22 +8316,22 @@ var NotFound = ({
|
|
|
8198
8316
|
const errorTitle = title || getDefaultTitle();
|
|
8199
8317
|
const errorDescription = description || getDefaultDescription();
|
|
8200
8318
|
const errorCode = getErrorCode();
|
|
8201
|
-
return /* @__PURE__ */ (0,
|
|
8319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
8202
8320
|
"div",
|
|
8203
8321
|
{
|
|
8204
8322
|
className: cn(
|
|
8205
8323
|
"flex flex-col w-full h-screen items-center justify-center bg-background-50 px-4",
|
|
8206
8324
|
className
|
|
8207
8325
|
),
|
|
8208
|
-
children: /* @__PURE__ */ (0,
|
|
8326
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
8209
8327
|
"main",
|
|
8210
8328
|
{
|
|
8211
8329
|
role: "main",
|
|
8212
8330
|
"aria-labelledby": "error-title",
|
|
8213
8331
|
"aria-describedby": "error-description",
|
|
8214
8332
|
className: "flex flex-col items-center text-center max-w-md space-y-6",
|
|
8215
|
-
children: /* @__PURE__ */ (0,
|
|
8216
|
-
/* @__PURE__ */ (0,
|
|
8333
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("section", { "aria-label": `Erro ${errorCode}`, children: [
|
|
8334
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
8217
8335
|
"div",
|
|
8218
8336
|
{
|
|
8219
8337
|
className: "text-8xl font-bold text-primary-300 select-none",
|
|
@@ -8221,8 +8339,8 @@ var NotFound = ({
|
|
|
8221
8339
|
children: errorCode
|
|
8222
8340
|
}
|
|
8223
8341
|
),
|
|
8224
|
-
/* @__PURE__ */ (0,
|
|
8225
|
-
/* @__PURE__ */ (0,
|
|
8342
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("header", { className: "space-y-2", children: [
|
|
8343
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
8226
8344
|
Text_default,
|
|
8227
8345
|
{
|
|
8228
8346
|
size: "xl",
|
|
@@ -8233,9 +8351,9 @@ var NotFound = ({
|
|
|
8233
8351
|
children: errorTitle
|
|
8234
8352
|
}
|
|
8235
8353
|
),
|
|
8236
|
-
/* @__PURE__ */ (0,
|
|
8354
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text_default, { size: "md", className: "text-text-600", id: "error-description", children: errorDescription })
|
|
8237
8355
|
] }),
|
|
8238
|
-
onButtonClick && /* @__PURE__ */ (0,
|
|
8356
|
+
onButtonClick && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("nav", { "aria-label": "Navega\xE7\xE3o de erro", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
8239
8357
|
Button_default,
|
|
8240
8358
|
{
|
|
8241
8359
|
onClick: handleButtonClick,
|
|
@@ -8258,12 +8376,12 @@ var NotFound_default = NotFound;
|
|
|
8258
8376
|
// src/components/VideoPlayer/VideoPlayer.tsx
|
|
8259
8377
|
var import_react27 = require("react");
|
|
8260
8378
|
var import_react_dom = require("react-dom");
|
|
8261
|
-
var
|
|
8379
|
+
var import_phosphor_react20 = require("phosphor-react");
|
|
8262
8380
|
|
|
8263
8381
|
// src/components/DownloadButton/DownloadButton.tsx
|
|
8264
8382
|
var import_react26 = require("react");
|
|
8265
|
-
var
|
|
8266
|
-
var
|
|
8383
|
+
var import_phosphor_react19 = require("phosphor-react");
|
|
8384
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
8267
8385
|
var getMimeType = (url) => {
|
|
8268
8386
|
const extension = getFileExtension(url);
|
|
8269
8387
|
const mimeTypes = {
|
|
@@ -8420,10 +8538,10 @@ var DownloadButton = ({
|
|
|
8420
8538
|
if (!hasContent) {
|
|
8421
8539
|
return null;
|
|
8422
8540
|
}
|
|
8423
|
-
return /* @__PURE__ */ (0,
|
|
8541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: cn("flex items-center", className), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
8424
8542
|
IconButton_default,
|
|
8425
8543
|
{
|
|
8426
|
-
icon: /* @__PURE__ */ (0,
|
|
8544
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_phosphor_react19.DownloadSimple, { size: 24 }),
|
|
8427
8545
|
onClick: handleDownload,
|
|
8428
8546
|
disabled: disabled || isDownloading,
|
|
8429
8547
|
"aria-label": (() => {
|
|
@@ -8444,7 +8562,7 @@ var DownloadButton = ({
|
|
|
8444
8562
|
var DownloadButton_default = DownloadButton;
|
|
8445
8563
|
|
|
8446
8564
|
// src/components/VideoPlayer/VideoPlayer.tsx
|
|
8447
|
-
var
|
|
8565
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
8448
8566
|
var CONTROLS_HIDE_TIMEOUT = 3e3;
|
|
8449
8567
|
var LEAVE_HIDE_TIMEOUT = 1e3;
|
|
8450
8568
|
var INIT_DELAY = 100;
|
|
@@ -8460,7 +8578,7 @@ var ProgressBar2 = ({
|
|
|
8460
8578
|
progressPercentage,
|
|
8461
8579
|
onSeek,
|
|
8462
8580
|
className = "px-4 pb-2"
|
|
8463
|
-
}) => /* @__PURE__ */ (0,
|
|
8581
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
8464
8582
|
"input",
|
|
8465
8583
|
{
|
|
8466
8584
|
type: "range",
|
|
@@ -8482,17 +8600,17 @@ var VolumeControls = ({
|
|
|
8482
8600
|
onToggleMute,
|
|
8483
8601
|
iconSize = 24,
|
|
8484
8602
|
showSlider = true
|
|
8485
|
-
}) => /* @__PURE__ */ (0,
|
|
8486
|
-
/* @__PURE__ */ (0,
|
|
8603
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
8604
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
8487
8605
|
IconButton_default,
|
|
8488
8606
|
{
|
|
8489
|
-
icon: isMuted ? /* @__PURE__ */ (0,
|
|
8607
|
+
icon: isMuted ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_phosphor_react20.SpeakerSlash, { size: iconSize }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_phosphor_react20.SpeakerHigh, { size: iconSize }),
|
|
8490
8608
|
onClick: onToggleMute,
|
|
8491
8609
|
"aria-label": isMuted ? "Unmute" : "Mute",
|
|
8492
8610
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
8493
8611
|
}
|
|
8494
8612
|
),
|
|
8495
|
-
showSlider && /* @__PURE__ */ (0,
|
|
8613
|
+
showSlider && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
8496
8614
|
"input",
|
|
8497
8615
|
{
|
|
8498
8616
|
type: "range",
|
|
@@ -8549,7 +8667,7 @@ var SpeedMenu = ({
|
|
|
8549
8667
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
8550
8668
|
};
|
|
8551
8669
|
}, [showSpeedMenu, onToggleMenu]);
|
|
8552
|
-
const menuContent = /* @__PURE__ */ (0,
|
|
8670
|
+
const menuContent = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
8553
8671
|
"div",
|
|
8554
8672
|
{
|
|
8555
8673
|
ref: speedMenuRef,
|
|
@@ -8560,7 +8678,7 @@ var SpeedMenu = ({
|
|
|
8560
8678
|
top: `${position.top}px`,
|
|
8561
8679
|
left: `${position.left}px`
|
|
8562
8680
|
},
|
|
8563
|
-
children: [0.5, 0.75, 1, 1.25, 1.5, 2].map((speed) => /* @__PURE__ */ (0,
|
|
8681
|
+
children: [0.5, 0.75, 1, 1.25, 1.5, 2].map((speed) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
8564
8682
|
"button",
|
|
8565
8683
|
{
|
|
8566
8684
|
role: "menuitemradio",
|
|
@@ -8577,12 +8695,12 @@ var SpeedMenu = ({
|
|
|
8577
8695
|
}
|
|
8578
8696
|
);
|
|
8579
8697
|
const portalContent = showSpeedMenu && globalThis.window !== void 0 && globalThis.document !== void 0 && !!globalThis.document?.body ? (0, import_react_dom.createPortal)(menuContent, globalThis.document.body) : null;
|
|
8580
|
-
return /* @__PURE__ */ (0,
|
|
8581
|
-
/* @__PURE__ */ (0,
|
|
8698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "relative", ref: speedMenuContainerRef, children: [
|
|
8699
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
8582
8700
|
IconButton_default,
|
|
8583
8701
|
{
|
|
8584
8702
|
ref: buttonRef,
|
|
8585
|
-
icon: /* @__PURE__ */ (0,
|
|
8703
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_phosphor_react20.DotsThreeVertical, { size: iconSize }),
|
|
8586
8704
|
onClick: onToggleMenu,
|
|
8587
8705
|
"aria-label": "Playback speed",
|
|
8588
8706
|
"aria-haspopup": "menu",
|
|
@@ -9098,10 +9216,10 @@ var VideoPlayer = ({
|
|
|
9098
9216
|
]
|
|
9099
9217
|
);
|
|
9100
9218
|
const groupedSubTitleValid = subtitles && subtitlesValidation === "valid";
|
|
9101
|
-
return /* @__PURE__ */ (0,
|
|
9102
|
-
(title || subtitleText) && /* @__PURE__ */ (0,
|
|
9103
|
-
/* @__PURE__ */ (0,
|
|
9104
|
-
title && /* @__PURE__ */ (0,
|
|
9219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: cn("flex flex-col", className), children: [
|
|
9220
|
+
(title || subtitleText) && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "bg-subject-1 px-8 py-4 flex items-end justify-between min-h-20", children: [
|
|
9221
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
9222
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9105
9223
|
Text_default,
|
|
9106
9224
|
{
|
|
9107
9225
|
as: "h2",
|
|
@@ -9112,7 +9230,7 @@ var VideoPlayer = ({
|
|
|
9112
9230
|
children: title
|
|
9113
9231
|
}
|
|
9114
9232
|
),
|
|
9115
|
-
subtitleText && /* @__PURE__ */ (0,
|
|
9233
|
+
subtitleText && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9116
9234
|
Text_default,
|
|
9117
9235
|
{
|
|
9118
9236
|
as: "p",
|
|
@@ -9124,7 +9242,7 @@ var VideoPlayer = ({
|
|
|
9124
9242
|
}
|
|
9125
9243
|
)
|
|
9126
9244
|
] }),
|
|
9127
|
-
showDownloadButton && downloadContent && /* @__PURE__ */ (0,
|
|
9245
|
+
showDownloadButton && downloadContent && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9128
9246
|
DownloadButton_default,
|
|
9129
9247
|
{
|
|
9130
9248
|
content: downloadContent,
|
|
@@ -9136,7 +9254,7 @@ var VideoPlayer = ({
|
|
|
9136
9254
|
}
|
|
9137
9255
|
)
|
|
9138
9256
|
] }),
|
|
9139
|
-
/* @__PURE__ */ (0,
|
|
9257
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
9140
9258
|
"section",
|
|
9141
9259
|
{
|
|
9142
9260
|
className: cn(
|
|
@@ -9151,7 +9269,7 @@ var VideoPlayer = ({
|
|
|
9151
9269
|
onTouchStart: handleMouseEnter,
|
|
9152
9270
|
onMouseLeave: handleMouseLeave,
|
|
9153
9271
|
children: [
|
|
9154
|
-
/* @__PURE__ */ (0,
|
|
9272
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9155
9273
|
"video",
|
|
9156
9274
|
{
|
|
9157
9275
|
ref: videoRef,
|
|
@@ -9166,7 +9284,7 @@ var VideoPlayer = ({
|
|
|
9166
9284
|
onKeyDown: handleVideoKeyDown,
|
|
9167
9285
|
tabIndex: 0,
|
|
9168
9286
|
"aria-label": title ? `Video: ${title}` : "Video player",
|
|
9169
|
-
children: /* @__PURE__ */ (0,
|
|
9287
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9170
9288
|
"track",
|
|
9171
9289
|
{
|
|
9172
9290
|
ref: trackRef,
|
|
@@ -9179,17 +9297,17 @@ var VideoPlayer = ({
|
|
|
9179
9297
|
)
|
|
9180
9298
|
}
|
|
9181
9299
|
),
|
|
9182
|
-
!isPlaying && /* @__PURE__ */ (0,
|
|
9300
|
+
!isPlaying && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9183
9301
|
"div",
|
|
9184
9302
|
{
|
|
9185
9303
|
className: cn(
|
|
9186
9304
|
"absolute inset-0 flex bg-black/30 transition-opacity",
|
|
9187
9305
|
getCenterPlayButtonPosition()
|
|
9188
9306
|
),
|
|
9189
|
-
children: /* @__PURE__ */ (0,
|
|
9307
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9190
9308
|
IconButton_default,
|
|
9191
9309
|
{
|
|
9192
|
-
icon: /* @__PURE__ */ (0,
|
|
9310
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_phosphor_react20.Play, { size: 32, weight: "regular", className: "ml-1" }),
|
|
9193
9311
|
onClick: togglePlayPause,
|
|
9194
9312
|
"aria-label": "Play video",
|
|
9195
9313
|
className: "!bg-transparent !text-white !w-auto !h-auto hover:!bg-transparent hover:!text-gray-200"
|
|
@@ -9197,17 +9315,17 @@ var VideoPlayer = ({
|
|
|
9197
9315
|
)
|
|
9198
9316
|
}
|
|
9199
9317
|
),
|
|
9200
|
-
/* @__PURE__ */ (0,
|
|
9318
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9201
9319
|
"div",
|
|
9202
9320
|
{
|
|
9203
9321
|
className: cn(
|
|
9204
9322
|
"absolute top-0 left-0 right-0 p-4 bg-gradient-to-b from-black/70 to-transparent transition-opacity",
|
|
9205
9323
|
getTopControlsOpacity()
|
|
9206
9324
|
),
|
|
9207
|
-
children: /* @__PURE__ */ (0,
|
|
9325
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9208
9326
|
IconButton_default,
|
|
9209
9327
|
{
|
|
9210
|
-
icon: isFullscreen ? /* @__PURE__ */ (0,
|
|
9328
|
+
icon: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_phosphor_react20.ArrowsInSimple, { size: 24 }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_phosphor_react20.ArrowsOutSimple, { size: 24 }),
|
|
9211
9329
|
onClick: toggleFullscreen,
|
|
9212
9330
|
"aria-label": isFullscreen ? "Exit fullscreen" : "Enter fullscreen",
|
|
9213
9331
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
@@ -9215,7 +9333,7 @@ var VideoPlayer = ({
|
|
|
9215
9333
|
) })
|
|
9216
9334
|
}
|
|
9217
9335
|
),
|
|
9218
|
-
/* @__PURE__ */ (0,
|
|
9336
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
9219
9337
|
"div",
|
|
9220
9338
|
{
|
|
9221
9339
|
className: cn(
|
|
@@ -9223,7 +9341,7 @@ var VideoPlayer = ({
|
|
|
9223
9341
|
getBottomControlsOpacity()
|
|
9224
9342
|
),
|
|
9225
9343
|
children: [
|
|
9226
|
-
/* @__PURE__ */ (0,
|
|
9344
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9227
9345
|
ProgressBar2,
|
|
9228
9346
|
{
|
|
9229
9347
|
currentTime,
|
|
@@ -9233,7 +9351,7 @@ var VideoPlayer = ({
|
|
|
9233
9351
|
className: getProgressBarPadding()
|
|
9234
9352
|
}
|
|
9235
9353
|
),
|
|
9236
|
-
/* @__PURE__ */ (0,
|
|
9354
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
9237
9355
|
"div",
|
|
9238
9356
|
{
|
|
9239
9357
|
className: cn(
|
|
@@ -9241,17 +9359,17 @@ var VideoPlayer = ({
|
|
|
9241
9359
|
getControlsPadding()
|
|
9242
9360
|
),
|
|
9243
9361
|
children: [
|
|
9244
|
-
/* @__PURE__ */ (0,
|
|
9245
|
-
/* @__PURE__ */ (0,
|
|
9362
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: cn("flex items-center", getControlsGap()), children: [
|
|
9363
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9246
9364
|
IconButton_default,
|
|
9247
9365
|
{
|
|
9248
|
-
icon: isPlaying ? /* @__PURE__ */ (0,
|
|
9366
|
+
icon: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_phosphor_react20.Pause, { size: getIconSize2() }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_phosphor_react20.Play, { size: getIconSize2() }),
|
|
9249
9367
|
onClick: togglePlayPause,
|
|
9250
9368
|
"aria-label": isPlaying ? "Pause" : "Play",
|
|
9251
9369
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
9252
9370
|
}
|
|
9253
9371
|
),
|
|
9254
|
-
/* @__PURE__ */ (0,
|
|
9372
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9255
9373
|
VolumeControls,
|
|
9256
9374
|
{
|
|
9257
9375
|
volume,
|
|
@@ -9262,10 +9380,10 @@ var VideoPlayer = ({
|
|
|
9262
9380
|
showSlider: !isUltraSmallMobile
|
|
9263
9381
|
}
|
|
9264
9382
|
),
|
|
9265
|
-
groupedSubTitleValid && /* @__PURE__ */ (0,
|
|
9383
|
+
groupedSubTitleValid && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9266
9384
|
IconButton_default,
|
|
9267
9385
|
{
|
|
9268
|
-
icon: /* @__PURE__ */ (0,
|
|
9386
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_phosphor_react20.ClosedCaptioning, { size: getIconSize2() }),
|
|
9269
9387
|
onClick: toggleCaptions,
|
|
9270
9388
|
"aria-label": showCaptions ? "Hide captions" : "Show captions",
|
|
9271
9389
|
className: cn(
|
|
@@ -9274,13 +9392,13 @@ var VideoPlayer = ({
|
|
|
9274
9392
|
)
|
|
9275
9393
|
}
|
|
9276
9394
|
),
|
|
9277
|
-
/* @__PURE__ */ (0,
|
|
9395
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Text_default, { size: "sm", weight: "medium", color: "text-white", children: [
|
|
9278
9396
|
formatTime(currentTime),
|
|
9279
9397
|
" / ",
|
|
9280
9398
|
formatTime(duration)
|
|
9281
9399
|
] })
|
|
9282
9400
|
] }),
|
|
9283
|
-
/* @__PURE__ */ (0,
|
|
9401
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex items-center gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9284
9402
|
SpeedMenu,
|
|
9285
9403
|
{
|
|
9286
9404
|
showSpeedMenu,
|
|
@@ -9307,8 +9425,8 @@ var VideoPlayer_default = VideoPlayer;
|
|
|
9307
9425
|
|
|
9308
9426
|
// src/components/Whiteboard/Whiteboard.tsx
|
|
9309
9427
|
var import_react28 = require("react");
|
|
9310
|
-
var
|
|
9311
|
-
var
|
|
9428
|
+
var import_phosphor_react21 = require("phosphor-react");
|
|
9429
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
9312
9430
|
var IMAGE_WIDTH = 225;
|
|
9313
9431
|
var IMAGE_HEIGHT = 90;
|
|
9314
9432
|
var Whiteboard = ({
|
|
@@ -9346,7 +9464,7 @@ var Whiteboard = ({
|
|
|
9346
9464
|
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"
|
|
9347
9465
|
}[imagesPerRow];
|
|
9348
9466
|
if (!images || images.length === 0) {
|
|
9349
|
-
return /* @__PURE__ */ (0,
|
|
9467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9350
9468
|
"div",
|
|
9351
9469
|
{
|
|
9352
9470
|
className: cn(
|
|
@@ -9354,11 +9472,11 @@ var Whiteboard = ({
|
|
|
9354
9472
|
className
|
|
9355
9473
|
),
|
|
9356
9474
|
...rest,
|
|
9357
|
-
children: /* @__PURE__ */ (0,
|
|
9475
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-gray-400 text-sm", children: "Nenhuma imagem dispon\xEDvel" })
|
|
9358
9476
|
}
|
|
9359
9477
|
);
|
|
9360
9478
|
}
|
|
9361
|
-
return /* @__PURE__ */ (0,
|
|
9479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9362
9480
|
"div",
|
|
9363
9481
|
{
|
|
9364
9482
|
className: cn(
|
|
@@ -9366,7 +9484,7 @@ var Whiteboard = ({
|
|
|
9366
9484
|
className
|
|
9367
9485
|
),
|
|
9368
9486
|
...rest,
|
|
9369
|
-
children: /* @__PURE__ */ (0,
|
|
9487
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: cn("grid gap-4", gridColsClass), children: images.map((image) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
9370
9488
|
"div",
|
|
9371
9489
|
{
|
|
9372
9490
|
className: "relative group overflow-hidden bg-gray-100 rounded-lg",
|
|
@@ -9374,7 +9492,7 @@ var Whiteboard = ({
|
|
|
9374
9492
|
width: `${IMAGE_WIDTH}px`
|
|
9375
9493
|
},
|
|
9376
9494
|
children: [
|
|
9377
|
-
/* @__PURE__ */ (0,
|
|
9495
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9378
9496
|
"div",
|
|
9379
9497
|
{
|
|
9380
9498
|
className: "relative",
|
|
@@ -9382,8 +9500,8 @@ var Whiteboard = ({
|
|
|
9382
9500
|
width: `${IMAGE_WIDTH}px`,
|
|
9383
9501
|
height: `${IMAGE_HEIGHT}px`
|
|
9384
9502
|
},
|
|
9385
|
-
children: imageErrors.has(image.id) ? /* @__PURE__ */ (0,
|
|
9386
|
-
/* @__PURE__ */ (0,
|
|
9503
|
+
children: imageErrors.has(image.id) ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "absolute inset-0 flex items-center justify-center bg-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-gray-500 text-sm text-center px-2", children: "Imagem indispon\xEDvel" }) }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
9504
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9387
9505
|
"img",
|
|
9388
9506
|
{
|
|
9389
9507
|
src: image.imageUrl,
|
|
@@ -9393,19 +9511,19 @@ var Whiteboard = ({
|
|
|
9393
9511
|
onError: () => handleImageError(image.id)
|
|
9394
9512
|
}
|
|
9395
9513
|
),
|
|
9396
|
-
/* @__PURE__ */ (0,
|
|
9514
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "absolute inset-0 bg-gradient-to-t from-black/20 to-transparent" })
|
|
9397
9515
|
] })
|
|
9398
9516
|
}
|
|
9399
9517
|
),
|
|
9400
|
-
showDownload && /* @__PURE__ */ (0,
|
|
9518
|
+
showDownload && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9401
9519
|
"button",
|
|
9402
9520
|
{
|
|
9403
9521
|
type: "button",
|
|
9404
9522
|
onClick: () => handleDownload(image),
|
|
9405
9523
|
className: "cursor-pointer absolute bottom-3 right-3 flex items-center justify-center bg-black/20 backdrop-blur-sm rounded hover:bg-black/30 transition-colors duration-200 group/button w-6 h-6",
|
|
9406
9524
|
"aria-label": `Download ${image.title || "imagem"}`,
|
|
9407
|
-
children: /* @__PURE__ */ (0,
|
|
9408
|
-
|
|
9525
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9526
|
+
import_phosphor_react21.ArrowsOut,
|
|
9409
9527
|
{
|
|
9410
9528
|
size: 24,
|
|
9411
9529
|
weight: "regular",
|
|
@@ -9426,7 +9544,7 @@ var Whiteboard_default = Whiteboard;
|
|
|
9426
9544
|
// src/components/Auth/Auth.tsx
|
|
9427
9545
|
var import_react29 = require("react");
|
|
9428
9546
|
var import_react_router_dom = require("react-router-dom");
|
|
9429
|
-
var
|
|
9547
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
9430
9548
|
var AuthContext = (0, import_react29.createContext)(void 0);
|
|
9431
9549
|
var AuthProvider = ({
|
|
9432
9550
|
children,
|
|
@@ -9496,7 +9614,7 @@ var AuthProvider = ({
|
|
|
9496
9614
|
}),
|
|
9497
9615
|
[authState, checkAuth, signOut]
|
|
9498
9616
|
);
|
|
9499
|
-
return /* @__PURE__ */ (0,
|
|
9617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(AuthContext.Provider, { value: contextValue, children });
|
|
9500
9618
|
};
|
|
9501
9619
|
var useAuth = () => {
|
|
9502
9620
|
const context = (0, import_react29.useContext)(AuthContext);
|
|
@@ -9512,9 +9630,9 @@ var ProtectedRoute = ({
|
|
|
9512
9630
|
additionalCheck
|
|
9513
9631
|
}) => {
|
|
9514
9632
|
const { isAuthenticated, isLoading, ...authState } = useAuth();
|
|
9515
|
-
const defaultLoadingComponent = /* @__PURE__ */ (0,
|
|
9633
|
+
const defaultLoadingComponent = /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "text-text-950 text-lg", children: "Carregando..." }) });
|
|
9516
9634
|
if (isLoading) {
|
|
9517
|
-
return /* @__PURE__ */ (0,
|
|
9635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children: loadingComponent || defaultLoadingComponent });
|
|
9518
9636
|
}
|
|
9519
9637
|
if (!isAuthenticated) {
|
|
9520
9638
|
if (typeof window !== "undefined") {
|
|
@@ -9525,12 +9643,12 @@ var ProtectedRoute = ({
|
|
|
9525
9643
|
return null;
|
|
9526
9644
|
}
|
|
9527
9645
|
}
|
|
9528
|
-
return /* @__PURE__ */ (0,
|
|
9646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_router_dom.Navigate, { to: redirectTo, replace: true });
|
|
9529
9647
|
}
|
|
9530
9648
|
if (additionalCheck && !additionalCheck({ isAuthenticated, isLoading, ...authState })) {
|
|
9531
|
-
return /* @__PURE__ */ (0,
|
|
9649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_router_dom.Navigate, { to: redirectTo, replace: true });
|
|
9532
9650
|
}
|
|
9533
|
-
return /* @__PURE__ */ (0,
|
|
9651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children });
|
|
9534
9652
|
};
|
|
9535
9653
|
var PublicRoute = ({
|
|
9536
9654
|
children,
|
|
@@ -9540,15 +9658,15 @@ var PublicRoute = ({
|
|
|
9540
9658
|
}) => {
|
|
9541
9659
|
const { isAuthenticated, isLoading } = useAuth();
|
|
9542
9660
|
if (checkAuthBeforeRender && isLoading) {
|
|
9543
|
-
return /* @__PURE__ */ (0,
|
|
9661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "text-text-950 text-lg", children: "Carregando..." }) });
|
|
9544
9662
|
}
|
|
9545
9663
|
if (isAuthenticated && redirectIfAuthenticated) {
|
|
9546
|
-
return /* @__PURE__ */ (0,
|
|
9664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_router_dom.Navigate, { to: redirectTo, replace: true });
|
|
9547
9665
|
}
|
|
9548
|
-
return /* @__PURE__ */ (0,
|
|
9666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children });
|
|
9549
9667
|
};
|
|
9550
9668
|
var withAuth = (Component, options = {}) => {
|
|
9551
|
-
return (props) => /* @__PURE__ */ (0,
|
|
9669
|
+
return (props) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ProtectedRoute, { ...options, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Component, { ...props }) });
|
|
9552
9670
|
};
|
|
9553
9671
|
var useAuthGuard = (options = {}) => {
|
|
9554
9672
|
const authState = useAuth();
|
|
@@ -9563,7 +9681,7 @@ var useAuthGuard = (options = {}) => {
|
|
|
9563
9681
|
var useRouteAuth = (fallbackPath = "/") => {
|
|
9564
9682
|
const { isAuthenticated, isLoading } = useAuth();
|
|
9565
9683
|
const location = (0, import_react_router_dom.useLocation)();
|
|
9566
|
-
const redirectToLogin = () => /* @__PURE__ */ (0,
|
|
9684
|
+
const redirectToLogin = () => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_router_dom.Navigate, { to: fallbackPath, state: { from: location }, replace: true });
|
|
9567
9685
|
return {
|
|
9568
9686
|
isAuthenticated,
|
|
9569
9687
|
isLoading,
|
|
@@ -9598,8 +9716,8 @@ var getRootDomain = () => {
|
|
|
9598
9716
|
|
|
9599
9717
|
// src/components/Accordation/Accordation.tsx
|
|
9600
9718
|
var import_react30 = require("react");
|
|
9601
|
-
var
|
|
9602
|
-
var
|
|
9719
|
+
var import_phosphor_react22 = require("phosphor-react");
|
|
9720
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
9603
9721
|
var CardAccordation = (0, import_react30.forwardRef)(
|
|
9604
9722
|
({
|
|
9605
9723
|
trigger,
|
|
@@ -9622,7 +9740,7 @@ var CardAccordation = (0, import_react30.forwardRef)(
|
|
|
9622
9740
|
handleToggle();
|
|
9623
9741
|
}
|
|
9624
9742
|
};
|
|
9625
|
-
return /* @__PURE__ */ (0,
|
|
9743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
9626
9744
|
CardBase,
|
|
9627
9745
|
{
|
|
9628
9746
|
ref,
|
|
@@ -9632,7 +9750,7 @@ var CardAccordation = (0, import_react30.forwardRef)(
|
|
|
9632
9750
|
className: cn("overflow-hidden", className),
|
|
9633
9751
|
...props,
|
|
9634
9752
|
children: [
|
|
9635
|
-
/* @__PURE__ */ (0,
|
|
9753
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
9636
9754
|
"button",
|
|
9637
9755
|
{
|
|
9638
9756
|
onClick: handleToggle,
|
|
@@ -9642,8 +9760,8 @@ var CardAccordation = (0, import_react30.forwardRef)(
|
|
|
9642
9760
|
"aria-controls": "accordion-content",
|
|
9643
9761
|
children: [
|
|
9644
9762
|
trigger,
|
|
9645
|
-
/* @__PURE__ */ (0,
|
|
9646
|
-
|
|
9763
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
9764
|
+
import_phosphor_react22.CaretRight,
|
|
9647
9765
|
{
|
|
9648
9766
|
size: 20,
|
|
9649
9767
|
className: cn(
|
|
@@ -9656,7 +9774,7 @@ var CardAccordation = (0, import_react30.forwardRef)(
|
|
|
9656
9774
|
]
|
|
9657
9775
|
}
|
|
9658
9776
|
),
|
|
9659
|
-
/* @__PURE__ */ (0,
|
|
9777
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
9660
9778
|
"div",
|
|
9661
9779
|
{
|
|
9662
9780
|
id: contentId,
|
|
@@ -9665,7 +9783,7 @@ var CardAccordation = (0, import_react30.forwardRef)(
|
|
|
9665
9783
|
isExpanded ? "max-h-screen opacity-100" : "max-h-0 opacity-0"
|
|
9666
9784
|
),
|
|
9667
9785
|
"data-testid": "accordion-content",
|
|
9668
|
-
children: /* @__PURE__ */ (0,
|
|
9786
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "p-4 pt-0 border-border-50", children })
|
|
9669
9787
|
}
|
|
9670
9788
|
)
|
|
9671
9789
|
]
|
|
@@ -9675,9 +9793,9 @@ var CardAccordation = (0, import_react30.forwardRef)(
|
|
|
9675
9793
|
);
|
|
9676
9794
|
|
|
9677
9795
|
// src/components/Alternative/Alternative.tsx
|
|
9678
|
-
var
|
|
9796
|
+
var import_phosphor_react23 = require("phosphor-react");
|
|
9679
9797
|
var import_react31 = require("react");
|
|
9680
|
-
var
|
|
9798
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
9681
9799
|
var AlternativesList = ({
|
|
9682
9800
|
alternatives,
|
|
9683
9801
|
name,
|
|
@@ -9708,9 +9826,9 @@ var AlternativesList = ({
|
|
|
9708
9826
|
const getStatusBadge2 = (status) => {
|
|
9709
9827
|
switch (status) {
|
|
9710
9828
|
case "correct":
|
|
9711
|
-
return /* @__PURE__ */ (0,
|
|
9829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_phosphor_react23.CheckCircle, {}), children: "Resposta correta" });
|
|
9712
9830
|
case "incorrect":
|
|
9713
|
-
return /* @__PURE__ */ (0,
|
|
9831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_phosphor_react23.XCircle, {}), children: "Resposta incorreta" });
|
|
9714
9832
|
default:
|
|
9715
9833
|
return null;
|
|
9716
9834
|
}
|
|
@@ -9740,10 +9858,10 @@ var AlternativesList = ({
|
|
|
9740
9858
|
const renderRadio = () => {
|
|
9741
9859
|
const radioClasses = `w-6 h-6 rounded-full border-2 cursor-default transition-all duration-200 flex items-center justify-center ${isUserSelected ? "border-primary-950 bg-background" : "border-border-400 bg-background"}`;
|
|
9742
9860
|
const dotClasses = "w-3 h-3 rounded-full bg-primary-950 transition-all duration-200";
|
|
9743
|
-
return /* @__PURE__ */ (0,
|
|
9861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: radioClasses, children: isUserSelected && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: dotClasses }) });
|
|
9744
9862
|
};
|
|
9745
9863
|
if (layout === "detailed") {
|
|
9746
|
-
return /* @__PURE__ */ (0,
|
|
9864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9747
9865
|
"div",
|
|
9748
9866
|
{
|
|
9749
9867
|
className: cn(
|
|
@@ -9751,11 +9869,11 @@ var AlternativesList = ({
|
|
|
9751
9869
|
statusStyles,
|
|
9752
9870
|
alternative.disabled ? "opacity-50" : ""
|
|
9753
9871
|
),
|
|
9754
|
-
children: /* @__PURE__ */ (0,
|
|
9755
|
-
/* @__PURE__ */ (0,
|
|
9756
|
-
/* @__PURE__ */ (0,
|
|
9757
|
-
/* @__PURE__ */ (0,
|
|
9758
|
-
/* @__PURE__ */ (0,
|
|
9872
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
9873
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
9874
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mt-1", children: renderRadio() }),
|
|
9875
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex-1", children: [
|
|
9876
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9759
9877
|
"p",
|
|
9760
9878
|
{
|
|
9761
9879
|
className: cn(
|
|
@@ -9765,16 +9883,16 @@ var AlternativesList = ({
|
|
|
9765
9883
|
children: alternative.label
|
|
9766
9884
|
}
|
|
9767
9885
|
),
|
|
9768
|
-
alternative.description && /* @__PURE__ */ (0,
|
|
9886
|
+
alternative.description && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
|
|
9769
9887
|
] })
|
|
9770
9888
|
] }),
|
|
9771
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
9889
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
9772
9890
|
] })
|
|
9773
9891
|
},
|
|
9774
9892
|
alternativeId
|
|
9775
9893
|
);
|
|
9776
9894
|
}
|
|
9777
|
-
return /* @__PURE__ */ (0,
|
|
9895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
9778
9896
|
"div",
|
|
9779
9897
|
{
|
|
9780
9898
|
className: cn(
|
|
@@ -9783,9 +9901,9 @@ var AlternativesList = ({
|
|
|
9783
9901
|
alternative.disabled ? "opacity-50" : ""
|
|
9784
9902
|
),
|
|
9785
9903
|
children: [
|
|
9786
|
-
/* @__PURE__ */ (0,
|
|
9904
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
9787
9905
|
renderRadio(),
|
|
9788
|
-
/* @__PURE__ */ (0,
|
|
9906
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9789
9907
|
"span",
|
|
9790
9908
|
{
|
|
9791
9909
|
className: cn(
|
|
@@ -9796,14 +9914,14 @@ var AlternativesList = ({
|
|
|
9796
9914
|
}
|
|
9797
9915
|
)
|
|
9798
9916
|
] }),
|
|
9799
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
9917
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
9800
9918
|
]
|
|
9801
9919
|
},
|
|
9802
9920
|
alternativeId
|
|
9803
9921
|
);
|
|
9804
9922
|
};
|
|
9805
9923
|
if (isReadonly) {
|
|
9806
|
-
return /* @__PURE__ */ (0,
|
|
9924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9807
9925
|
"div",
|
|
9808
9926
|
{
|
|
9809
9927
|
className: cn("flex flex-col", getLayoutClasses(), "w-full", className),
|
|
@@ -9813,7 +9931,7 @@ var AlternativesList = ({
|
|
|
9813
9931
|
}
|
|
9814
9932
|
);
|
|
9815
9933
|
}
|
|
9816
|
-
return /* @__PURE__ */ (0,
|
|
9934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9817
9935
|
RadioGroup,
|
|
9818
9936
|
{
|
|
9819
9937
|
name: groupName,
|
|
@@ -9830,7 +9948,7 @@ var AlternativesList = ({
|
|
|
9830
9948
|
const statusStyles = getStatusStyles2(alternative.status, false);
|
|
9831
9949
|
const statusBadge = getStatusBadge2(alternative.status);
|
|
9832
9950
|
if (layout === "detailed") {
|
|
9833
|
-
return /* @__PURE__ */ (0,
|
|
9951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9834
9952
|
"div",
|
|
9835
9953
|
{
|
|
9836
9954
|
className: cn(
|
|
@@ -9838,9 +9956,9 @@ var AlternativesList = ({
|
|
|
9838
9956
|
statusStyles,
|
|
9839
9957
|
alternative.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
9840
9958
|
),
|
|
9841
|
-
children: /* @__PURE__ */ (0,
|
|
9842
|
-
/* @__PURE__ */ (0,
|
|
9843
|
-
/* @__PURE__ */ (0,
|
|
9959
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
9960
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
9961
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9844
9962
|
RadioGroupItem,
|
|
9845
9963
|
{
|
|
9846
9964
|
value: alternative.value,
|
|
@@ -9849,8 +9967,8 @@ var AlternativesList = ({
|
|
|
9849
9967
|
className: "mt-1"
|
|
9850
9968
|
}
|
|
9851
9969
|
),
|
|
9852
|
-
/* @__PURE__ */ (0,
|
|
9853
|
-
/* @__PURE__ */ (0,
|
|
9970
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex-1", children: [
|
|
9971
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9854
9972
|
"label",
|
|
9855
9973
|
{
|
|
9856
9974
|
htmlFor: alternativeId,
|
|
@@ -9862,16 +9980,16 @@ var AlternativesList = ({
|
|
|
9862
9980
|
children: alternative.label
|
|
9863
9981
|
}
|
|
9864
9982
|
),
|
|
9865
|
-
alternative.description && /* @__PURE__ */ (0,
|
|
9983
|
+
alternative.description && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
|
|
9866
9984
|
] })
|
|
9867
9985
|
] }),
|
|
9868
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
9986
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
9869
9987
|
] })
|
|
9870
9988
|
},
|
|
9871
9989
|
alternativeId
|
|
9872
9990
|
);
|
|
9873
9991
|
}
|
|
9874
|
-
return /* @__PURE__ */ (0,
|
|
9992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
9875
9993
|
"div",
|
|
9876
9994
|
{
|
|
9877
9995
|
className: cn(
|
|
@@ -9880,8 +9998,8 @@ var AlternativesList = ({
|
|
|
9880
9998
|
alternative.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
9881
9999
|
),
|
|
9882
10000
|
children: [
|
|
9883
|
-
/* @__PURE__ */ (0,
|
|
9884
|
-
/* @__PURE__ */ (0,
|
|
10001
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
10002
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9885
10003
|
RadioGroupItem,
|
|
9886
10004
|
{
|
|
9887
10005
|
value: alternative.value,
|
|
@@ -9889,7 +10007,7 @@ var AlternativesList = ({
|
|
|
9889
10007
|
disabled: alternative.disabled
|
|
9890
10008
|
}
|
|
9891
10009
|
),
|
|
9892
|
-
/* @__PURE__ */ (0,
|
|
10010
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9893
10011
|
"label",
|
|
9894
10012
|
{
|
|
9895
10013
|
htmlFor: alternativeId,
|
|
@@ -9902,7 +10020,7 @@ var AlternativesList = ({
|
|
|
9902
10020
|
}
|
|
9903
10021
|
)
|
|
9904
10022
|
] }),
|
|
9905
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
10023
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
9906
10024
|
]
|
|
9907
10025
|
},
|
|
9908
10026
|
alternativeId
|
|
@@ -9913,7 +10031,7 @@ var AlternativesList = ({
|
|
|
9913
10031
|
};
|
|
9914
10032
|
var HeaderAlternative = (0, import_react31.forwardRef)(
|
|
9915
10033
|
({ className, title, subTitle, content, ...props }, ref) => {
|
|
9916
|
-
return /* @__PURE__ */ (0,
|
|
10034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
9917
10035
|
"div",
|
|
9918
10036
|
{
|
|
9919
10037
|
ref,
|
|
@@ -9923,11 +10041,11 @@ var HeaderAlternative = (0, import_react31.forwardRef)(
|
|
|
9923
10041
|
),
|
|
9924
10042
|
...props,
|
|
9925
10043
|
children: [
|
|
9926
|
-
/* @__PURE__ */ (0,
|
|
9927
|
-
/* @__PURE__ */ (0,
|
|
9928
|
-
/* @__PURE__ */ (0,
|
|
10044
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: "flex flex-col", children: [
|
|
10045
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-text-950 font-bold text-lg", children: title }),
|
|
10046
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-text-700 text-sm ", children: subTitle })
|
|
9929
10047
|
] }),
|
|
9930
|
-
/* @__PURE__ */ (0,
|
|
10048
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-text-950 text-md", children: content })
|
|
9931
10049
|
]
|
|
9932
10050
|
}
|
|
9933
10051
|
);
|
|
@@ -10108,7 +10226,7 @@ function useApiConfig(api) {
|
|
|
10108
10226
|
}
|
|
10109
10227
|
|
|
10110
10228
|
// src/components/Quiz/Quiz.tsx
|
|
10111
|
-
var
|
|
10229
|
+
var import_phosphor_react26 = require("phosphor-react");
|
|
10112
10230
|
var import_react36 = require("react");
|
|
10113
10231
|
|
|
10114
10232
|
// src/components/Quiz/useQuizStore.ts
|
|
@@ -10706,8 +10824,8 @@ var import_react35 = require("react");
|
|
|
10706
10824
|
|
|
10707
10825
|
// src/components/MultipleChoice/MultipleChoice.tsx
|
|
10708
10826
|
var import_react34 = require("react");
|
|
10709
|
-
var
|
|
10710
|
-
var
|
|
10827
|
+
var import_phosphor_react24 = require("phosphor-react");
|
|
10828
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
10711
10829
|
var MultipleChoiceList = ({
|
|
10712
10830
|
disabled = false,
|
|
10713
10831
|
className = "",
|
|
@@ -10724,9 +10842,9 @@ var MultipleChoiceList = ({
|
|
|
10724
10842
|
const getStatusBadge2 = (status) => {
|
|
10725
10843
|
switch (status) {
|
|
10726
10844
|
case "correct":
|
|
10727
|
-
return /* @__PURE__ */ (0,
|
|
10845
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_phosphor_react24.CheckCircle, {}), children: "Resposta correta" });
|
|
10728
10846
|
case "incorrect":
|
|
10729
|
-
return /* @__PURE__ */ (0,
|
|
10847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_phosphor_react24.XCircle, {}), children: "Resposta incorreta" });
|
|
10730
10848
|
default:
|
|
10731
10849
|
return null;
|
|
10732
10850
|
}
|
|
@@ -10747,14 +10865,14 @@ var MultipleChoiceList = ({
|
|
|
10747
10865
|
isSelected ? "border-primary-950 bg-primary-950 text-text" : "border-border-400 bg-background",
|
|
10748
10866
|
isDisabled && "opacity-40 cursor-not-allowed"
|
|
10749
10867
|
);
|
|
10750
|
-
return /* @__PURE__ */ (0,
|
|
10868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: checkboxClasses, children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_phosphor_react24.Check, { size: 16, weight: "bold" }) });
|
|
10751
10869
|
};
|
|
10752
10870
|
if (mode === "readonly") {
|
|
10753
|
-
return /* @__PURE__ */ (0,
|
|
10871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: cn("flex flex-col gap-2", className), children: choices.map((choice, i) => {
|
|
10754
10872
|
const isSelected = actualValue?.includes(choice.value) || false;
|
|
10755
10873
|
const statusStyles = getStatusStyles2(choice.status);
|
|
10756
10874
|
const statusBadge = getStatusBadge2(choice.status);
|
|
10757
|
-
return /* @__PURE__ */ (0,
|
|
10875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
10758
10876
|
"div",
|
|
10759
10877
|
{
|
|
10760
10878
|
className: cn(
|
|
@@ -10763,9 +10881,9 @@ var MultipleChoiceList = ({
|
|
|
10763
10881
|
choice.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
10764
10882
|
),
|
|
10765
10883
|
children: [
|
|
10766
|
-
/* @__PURE__ */ (0,
|
|
10884
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
10767
10885
|
renderVisualCheckbox(isSelected, choice.disabled || disabled),
|
|
10768
|
-
/* @__PURE__ */ (0,
|
|
10886
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
10769
10887
|
"span",
|
|
10770
10888
|
{
|
|
10771
10889
|
className: cn(
|
|
@@ -10777,14 +10895,14 @@ var MultipleChoiceList = ({
|
|
|
10777
10895
|
}
|
|
10778
10896
|
)
|
|
10779
10897
|
] }),
|
|
10780
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
10898
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
10781
10899
|
]
|
|
10782
10900
|
},
|
|
10783
10901
|
`readonly-${choice.value}-${i}`
|
|
10784
10902
|
);
|
|
10785
10903
|
}) });
|
|
10786
10904
|
}
|
|
10787
|
-
return /* @__PURE__ */ (0,
|
|
10905
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
10788
10906
|
"div",
|
|
10789
10907
|
{
|
|
10790
10908
|
className: cn(
|
|
@@ -10792,7 +10910,7 @@ var MultipleChoiceList = ({
|
|
|
10792
10910
|
disabled ? "opacity-50 cursor-not-allowed" : "",
|
|
10793
10911
|
className
|
|
10794
10912
|
),
|
|
10795
|
-
children: /* @__PURE__ */ (0,
|
|
10913
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
10796
10914
|
CheckboxList_default,
|
|
10797
10915
|
{
|
|
10798
10916
|
name,
|
|
@@ -10802,12 +10920,12 @@ var MultipleChoiceList = ({
|
|
|
10802
10920
|
onHandleSelectedValues?.(v);
|
|
10803
10921
|
},
|
|
10804
10922
|
disabled,
|
|
10805
|
-
children: choices.map((choice, i) => /* @__PURE__ */ (0,
|
|
10923
|
+
children: choices.map((choice, i) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
10806
10924
|
"div",
|
|
10807
10925
|
{
|
|
10808
10926
|
className: "flex flex-row gap-2 items-center",
|
|
10809
10927
|
children: [
|
|
10810
|
-
/* @__PURE__ */ (0,
|
|
10928
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
10811
10929
|
CheckboxListItem,
|
|
10812
10930
|
{
|
|
10813
10931
|
value: choice.value,
|
|
@@ -10815,7 +10933,7 @@ var MultipleChoiceList = ({
|
|
|
10815
10933
|
disabled: choice.disabled || disabled
|
|
10816
10934
|
}
|
|
10817
10935
|
),
|
|
10818
|
-
/* @__PURE__ */ (0,
|
|
10936
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
10819
10937
|
"label",
|
|
10820
10938
|
{
|
|
10821
10939
|
htmlFor: `interactive-${choice.value}-${i}`,
|
|
@@ -10838,19 +10956,19 @@ var MultipleChoiceList = ({
|
|
|
10838
10956
|
};
|
|
10839
10957
|
|
|
10840
10958
|
// src/components/Quiz/QuizContent.tsx
|
|
10841
|
-
var
|
|
10959
|
+
var import_phosphor_react25 = require("phosphor-react");
|
|
10842
10960
|
|
|
10843
10961
|
// src/assets/img/mock-image-question.png
|
|
10844
10962
|
var mock_image_question_default = "./mock-image-question-HEZCLFDL.png";
|
|
10845
10963
|
|
|
10846
10964
|
// src/components/Quiz/QuizContent.tsx
|
|
10847
|
-
var
|
|
10965
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
10848
10966
|
var getStatusBadge = (status) => {
|
|
10849
10967
|
switch (status) {
|
|
10850
10968
|
case "correct":
|
|
10851
|
-
return /* @__PURE__ */ (0,
|
|
10969
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_phosphor_react25.CheckCircle, {}), children: "Resposta correta" });
|
|
10852
10970
|
case "incorrect":
|
|
10853
|
-
return /* @__PURE__ */ (0,
|
|
10971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_phosphor_react25.XCircle, {}), children: "Resposta incorreta" });
|
|
10854
10972
|
default:
|
|
10855
10973
|
return null;
|
|
10856
10974
|
}
|
|
@@ -10865,11 +10983,11 @@ var getStatusStyles = (variantCorrect) => {
|
|
|
10865
10983
|
};
|
|
10866
10984
|
var QuizSubTitle = (0, import_react35.forwardRef)(
|
|
10867
10985
|
({ subTitle, ...props }, ref) => {
|
|
10868
|
-
return /* @__PURE__ */ (0,
|
|
10986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "px-4 pb-2 pt-6", ...props, ref, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "font-bold text-lg text-text-950", children: subTitle }) });
|
|
10869
10987
|
}
|
|
10870
10988
|
);
|
|
10871
10989
|
var QuizContainer = (0, import_react35.forwardRef)(({ children, className, ...props }, ref) => {
|
|
10872
|
-
return /* @__PURE__ */ (0,
|
|
10990
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
10873
10991
|
"div",
|
|
10874
10992
|
{
|
|
10875
10993
|
ref,
|
|
@@ -10917,10 +11035,10 @@ var QuizAlternative = ({ paddingBottom }) => {
|
|
|
10917
11035
|
};
|
|
10918
11036
|
});
|
|
10919
11037
|
if (!alternatives)
|
|
10920
|
-
return /* @__PURE__ */ (0,
|
|
10921
|
-
return /* @__PURE__ */ (0,
|
|
10922
|
-
/* @__PURE__ */ (0,
|
|
10923
|
-
/* @__PURE__ */ (0,
|
|
11038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { children: "N\xE3o h\xE1 Alternativas" }) });
|
|
11039
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11040
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
11041
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
10924
11042
|
AlternativesList,
|
|
10925
11043
|
{
|
|
10926
11044
|
mode: variant === "default" ? "interactive" : "readonly",
|
|
@@ -11018,10 +11136,10 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
|
|
|
11018
11136
|
};
|
|
11019
11137
|
});
|
|
11020
11138
|
if (!choices)
|
|
11021
|
-
return /* @__PURE__ */ (0,
|
|
11022
|
-
return /* @__PURE__ */ (0,
|
|
11023
|
-
/* @__PURE__ */ (0,
|
|
11024
|
-
/* @__PURE__ */ (0,
|
|
11139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { children: "N\xE3o h\xE1 Escolhas Multiplas" }) });
|
|
11140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11141
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
11142
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11025
11143
|
MultipleChoiceList,
|
|
11026
11144
|
{
|
|
11027
11145
|
choices,
|
|
@@ -11067,12 +11185,12 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
11067
11185
|
adjustTextareaHeight();
|
|
11068
11186
|
}, [currentAnswer, adjustTextareaHeight]);
|
|
11069
11187
|
if (!currentQuestion) {
|
|
11070
|
-
return /* @__PURE__ */ (0,
|
|
11188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-600 text-md", children: "Nenhuma quest\xE3o dispon\xEDvel" }) });
|
|
11071
11189
|
}
|
|
11072
11190
|
const localAnswer = (variant == "result" ? currentQuestionResult?.answer : currentAnswer?.answer) || "";
|
|
11073
|
-
return /* @__PURE__ */ (0,
|
|
11074
|
-
/* @__PURE__ */ (0,
|
|
11075
|
-
/* @__PURE__ */ (0,
|
|
11191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11192
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Resposta" }),
|
|
11193
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizContainer, { className: cn(variant != "result" && paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "space-y-4 max-h-[600px] overflow-y-auto", children: variant === "default" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11076
11194
|
TextArea_default,
|
|
11077
11195
|
{
|
|
11078
11196
|
ref: textareaRef,
|
|
@@ -11082,10 +11200,10 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
11082
11200
|
rows: 4,
|
|
11083
11201
|
className: "min-h-[120px] max-h-[400px] resize-none overflow-y-auto"
|
|
11084
11202
|
}
|
|
11085
|
-
) }) : /* @__PURE__ */ (0,
|
|
11086
|
-
variant === "result" && currentQuestionResult?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */ (0,
|
|
11087
|
-
/* @__PURE__ */ (0,
|
|
11088
|
-
/* @__PURE__ */ (0,
|
|
11203
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: localAnswer || "Nenhuma resposta fornecida" }) }) }) }),
|
|
11204
|
+
variant === "result" && currentQuestionResult?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11205
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Observa\xE7\xE3o do professor" }),
|
|
11206
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: currentQuestionResult?.teacherFeedback }) })
|
|
11089
11207
|
] })
|
|
11090
11208
|
] });
|
|
11091
11209
|
};
|
|
@@ -11111,16 +11229,16 @@ var QuizTrueOrFalse = ({ paddingBottom }) => {
|
|
|
11111
11229
|
];
|
|
11112
11230
|
const getLetterByIndex = (index) => String.fromCharCode(97 + index);
|
|
11113
11231
|
const isDefaultVariant = variant == "default";
|
|
11114
|
-
return /* @__PURE__ */ (0,
|
|
11115
|
-
/* @__PURE__ */ (0,
|
|
11116
|
-
/* @__PURE__ */ (0,
|
|
11232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11233
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
11234
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
11117
11235
|
const variantCorrect = option.isCorrect ? "correct" : "incorrect";
|
|
11118
|
-
return /* @__PURE__ */ (0,
|
|
11236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11119
11237
|
"section",
|
|
11120
11238
|
{
|
|
11121
11239
|
className: "flex flex-col gap-2",
|
|
11122
11240
|
children: [
|
|
11123
|
-
/* @__PURE__ */ (0,
|
|
11241
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11124
11242
|
"div",
|
|
11125
11243
|
{
|
|
11126
11244
|
className: cn(
|
|
@@ -11128,20 +11246,20 @@ var QuizTrueOrFalse = ({ paddingBottom }) => {
|
|
|
11128
11246
|
!isDefaultVariant ? getStatusStyles(variantCorrect) : ""
|
|
11129
11247
|
),
|
|
11130
11248
|
children: [
|
|
11131
|
-
/* @__PURE__ */ (0,
|
|
11132
|
-
isDefaultVariant ? /* @__PURE__ */ (0,
|
|
11133
|
-
/* @__PURE__ */ (0,
|
|
11134
|
-
/* @__PURE__ */ (0,
|
|
11135
|
-
/* @__PURE__ */ (0,
|
|
11136
|
-
/* @__PURE__ */ (0,
|
|
11249
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index).concat(") ").concat(option.label) }),
|
|
11250
|
+
isDefaultVariant ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Select_default, { size: "medium", children: [
|
|
11251
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectValue, { placeholder: "Selecione opc\xE3o" }) }),
|
|
11252
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(SelectContent, { children: [
|
|
11253
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectItem, { value: "V", children: "Verdadeiro" }),
|
|
11254
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectItem, { value: "F", children: "Falso" })
|
|
11137
11255
|
] })
|
|
11138
|
-
] }) : /* @__PURE__ */ (0,
|
|
11256
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex-shrink-0", children: getStatusBadge(variantCorrect) })
|
|
11139
11257
|
]
|
|
11140
11258
|
}
|
|
11141
11259
|
),
|
|
11142
|
-
!isDefaultVariant && /* @__PURE__ */ (0,
|
|
11143
|
-
/* @__PURE__ */ (0,
|
|
11144
|
-
!option.isCorrect && /* @__PURE__ */ (0,
|
|
11260
|
+
!isDefaultVariant && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
11261
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-800 text-2xs", children: "Resposta selecionada: V" }),
|
|
11262
|
+
!option.isCorrect && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-800 text-2xs", children: "Resposta correta: F" })
|
|
11145
11263
|
] })
|
|
11146
11264
|
]
|
|
11147
11265
|
},
|
|
@@ -11231,13 +11349,13 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
11231
11349
|
const assignedDots = new Set(
|
|
11232
11350
|
userAnswers.map((a) => a.dotOption).filter(Boolean)
|
|
11233
11351
|
);
|
|
11234
|
-
return /* @__PURE__ */ (0,
|
|
11235
|
-
/* @__PURE__ */ (0,
|
|
11236
|
-
/* @__PURE__ */ (0,
|
|
11352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11353
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
11354
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
11237
11355
|
const answer = userAnswers[index];
|
|
11238
11356
|
const variantCorrect = answer.isCorrect ? "correct" : "incorrect";
|
|
11239
|
-
return /* @__PURE__ */ (0,
|
|
11240
|
-
/* @__PURE__ */ (0,
|
|
11357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("section", { className: "flex flex-col gap-2", children: [
|
|
11358
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11241
11359
|
"div",
|
|
11242
11360
|
{
|
|
11243
11361
|
className: cn(
|
|
@@ -11245,30 +11363,30 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
11245
11363
|
!isDefaultVariant ? getStatusStyles(variantCorrect) : ""
|
|
11246
11364
|
),
|
|
11247
11365
|
children: [
|
|
11248
|
-
/* @__PURE__ */ (0,
|
|
11249
|
-
isDefaultVariant ? /* @__PURE__ */ (0,
|
|
11366
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index) + ") " + option.label }),
|
|
11367
|
+
isDefaultVariant ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11250
11368
|
Select_default,
|
|
11251
11369
|
{
|
|
11252
11370
|
size: "medium",
|
|
11253
11371
|
value: answer.dotOption || void 0,
|
|
11254
11372
|
onValueChange: (value) => handleSelectDot(index, value),
|
|
11255
11373
|
children: [
|
|
11256
|
-
/* @__PURE__ */ (0,
|
|
11257
|
-
/* @__PURE__ */ (0,
|
|
11374
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectValue, { placeholder: "Selecione op\xE7\xE3o" }) }),
|
|
11375
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectContent, { children: dotsOptions.filter(
|
|
11258
11376
|
(dot) => !assignedDots.has(dot.label) || answer.dotOption === dot.label
|
|
11259
|
-
).map((dot) => /* @__PURE__ */ (0,
|
|
11377
|
+
).map((dot) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectItem, { value: dot.label, children: dot.label }, dot.label)) })
|
|
11260
11378
|
]
|
|
11261
11379
|
}
|
|
11262
|
-
) : /* @__PURE__ */ (0,
|
|
11380
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex-shrink-0", children: answer.isCorrect === null ? null : getStatusBadge(variantCorrect) })
|
|
11263
11381
|
]
|
|
11264
11382
|
}
|
|
11265
11383
|
),
|
|
11266
|
-
!isDefaultVariant && /* @__PURE__ */ (0,
|
|
11267
|
-
/* @__PURE__ */ (0,
|
|
11384
|
+
!isDefaultVariant && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
11385
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("p", { className: "text-text-800 text-2xs", children: [
|
|
11268
11386
|
"Resposta selecionada: ",
|
|
11269
11387
|
answer.dotOption || "Nenhuma"
|
|
11270
11388
|
] }),
|
|
11271
|
-
!answer.isCorrect && /* @__PURE__ */ (0,
|
|
11389
|
+
!answer.isCorrect && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("p", { className: "text-text-800 text-2xs", children: [
|
|
11272
11390
|
"Resposta correta: ",
|
|
11273
11391
|
answer.correctOption
|
|
11274
11392
|
] })
|
|
@@ -11335,18 +11453,18 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
11335
11453
|
const mockAnswer = mockUserAnswers.find(
|
|
11336
11454
|
(answer) => answer.selectId === selectId
|
|
11337
11455
|
);
|
|
11338
|
-
return /* @__PURE__ */ (0,
|
|
11456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "inline-flex mb-2.5 text-success-600 font-semibold text-md border-b-2 border-success-600", children: mockAnswer?.correctAnswer });
|
|
11339
11457
|
};
|
|
11340
11458
|
const renderDefaultElement = (selectId, startIndex, selectedValue, availableOptionsForThisSelect) => {
|
|
11341
|
-
return /* @__PURE__ */ (0,
|
|
11459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11342
11460
|
Select_default,
|
|
11343
11461
|
{
|
|
11344
11462
|
value: selectedValue,
|
|
11345
11463
|
onValueChange: (value) => handleSelectChange(selectId, value),
|
|
11346
11464
|
className: "inline-flex mb-2.5",
|
|
11347
11465
|
children: [
|
|
11348
|
-
/* @__PURE__ */ (0,
|
|
11349
|
-
/* @__PURE__ */ (0,
|
|
11466
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectTrigger, { className: "inline-flex w-auto min-w-[140px] h-8 mx-1 bg-background border-gray-300", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectValue, { placeholder: "Selecione op\xE7\xE3o" }) }),
|
|
11467
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectContent, { children: availableOptionsForThisSelect.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectItem, { value: option, children: option }, `${option}-${index}`)) })
|
|
11350
11468
|
]
|
|
11351
11469
|
},
|
|
11352
11470
|
`${selectId}-${startIndex}`
|
|
@@ -11358,8 +11476,8 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
11358
11476
|
);
|
|
11359
11477
|
if (!mockAnswer) return null;
|
|
11360
11478
|
const action = mockAnswer.isCorrect ? "success" : "error";
|
|
11361
|
-
const icon = mockAnswer.isCorrect ? /* @__PURE__ */ (0,
|
|
11362
|
-
return /* @__PURE__ */ (0,
|
|
11479
|
+
const icon = mockAnswer.isCorrect ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_phosphor_react25.CheckCircle, {}) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_phosphor_react25.XCircle, {});
|
|
11480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11363
11481
|
Badge_default,
|
|
11364
11482
|
{
|
|
11365
11483
|
variant: "solid",
|
|
@@ -11367,7 +11485,7 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
11367
11485
|
iconRight: icon,
|
|
11368
11486
|
size: "large",
|
|
11369
11487
|
className: "py-3 w-[180px] justify-between mb-2.5",
|
|
11370
|
-
children: /* @__PURE__ */ (0,
|
|
11488
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-text-900", children: mockAnswer.userAnswer })
|
|
11371
11489
|
},
|
|
11372
11490
|
selectId
|
|
11373
11491
|
);
|
|
@@ -11423,25 +11541,25 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
11423
11541
|
}
|
|
11424
11542
|
return elements;
|
|
11425
11543
|
};
|
|
11426
|
-
return /* @__PURE__ */ (0,
|
|
11427
|
-
/* @__PURE__ */ (0,
|
|
11428
|
-
/* @__PURE__ */ (0,
|
|
11544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11545
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
11546
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizContainer, { className: "h-auto pb-0", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "space-y-6 px-4 h-auto", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11429
11547
|
"div",
|
|
11430
11548
|
{
|
|
11431
11549
|
className: cn(
|
|
11432
11550
|
"text-lg text-text-900 leading-8 h-auto",
|
|
11433
11551
|
variant != "result" && paddingBottom
|
|
11434
11552
|
),
|
|
11435
|
-
children: renderTextWithSelects(exampleText).map((element) => /* @__PURE__ */ (0,
|
|
11553
|
+
children: renderTextWithSelects(exampleText).map((element) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: element.element }, element.id))
|
|
11436
11554
|
}
|
|
11437
11555
|
) }) }),
|
|
11438
|
-
variant === "result" && /* @__PURE__ */ (0,
|
|
11439
|
-
/* @__PURE__ */ (0,
|
|
11440
|
-
/* @__PURE__ */ (0,
|
|
11556
|
+
variant === "result" && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11557
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Resultado" }),
|
|
11558
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizContainer, { className: "h-auto pb-0", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "space-y-6 px-4", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11441
11559
|
"div",
|
|
11442
11560
|
{
|
|
11443
11561
|
className: cn("text-lg text-text-900 leading-8", paddingBottom),
|
|
11444
|
-
children: renderTextWithSelects(exampleText, true).map((element) => /* @__PURE__ */ (0,
|
|
11562
|
+
children: renderTextWithSelects(exampleText, true).map((element) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: element.element }, element.id))
|
|
11445
11563
|
}
|
|
11446
11564
|
) }) })
|
|
11447
11565
|
] })
|
|
@@ -11495,36 +11613,36 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
11495
11613
|
}
|
|
11496
11614
|
return "bg-success-600/70 border-white";
|
|
11497
11615
|
};
|
|
11498
|
-
return /* @__PURE__ */ (0,
|
|
11499
|
-
/* @__PURE__ */ (0,
|
|
11500
|
-
/* @__PURE__ */ (0,
|
|
11616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11617
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Clique na \xE1rea correta" }),
|
|
11618
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11501
11619
|
"div",
|
|
11502
11620
|
{
|
|
11503
11621
|
"data-testid": "quiz-image-container",
|
|
11504
11622
|
className: "space-y-6 p-3 relative inline-block",
|
|
11505
11623
|
children: [
|
|
11506
|
-
variant == "result" && /* @__PURE__ */ (0,
|
|
11624
|
+
variant == "result" && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11507
11625
|
"div",
|
|
11508
11626
|
{
|
|
11509
11627
|
"data-testid": "quiz-legend",
|
|
11510
11628
|
className: "flex items-center gap-4 text-xs",
|
|
11511
11629
|
children: [
|
|
11512
|
-
/* @__PURE__ */ (0,
|
|
11513
|
-
/* @__PURE__ */ (0,
|
|
11514
|
-
/* @__PURE__ */ (0,
|
|
11630
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
11631
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "w-3 h-3 rounded-full bg-indicator-primary/70 border border-[#F8CC2E]" }),
|
|
11632
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-text-600 font-medium text-sm", children: "\xC1rea correta" })
|
|
11515
11633
|
] }),
|
|
11516
|
-
/* @__PURE__ */ (0,
|
|
11517
|
-
/* @__PURE__ */ (0,
|
|
11518
|
-
/* @__PURE__ */ (0,
|
|
11634
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
11635
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "w-3 h-3 rounded-full bg-success-600/70 border border-white" }),
|
|
11636
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-text-600 font-medium text-sm", children: "Resposta correta" })
|
|
11519
11637
|
] }),
|
|
11520
|
-
/* @__PURE__ */ (0,
|
|
11521
|
-
/* @__PURE__ */ (0,
|
|
11522
|
-
/* @__PURE__ */ (0,
|
|
11638
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
11639
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "w-3 h-3 rounded-full bg-indicator-error/70 border border-white" }),
|
|
11640
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-text-600 font-medium text-sm", children: "Resposta incorreta" })
|
|
11523
11641
|
] })
|
|
11524
11642
|
]
|
|
11525
11643
|
}
|
|
11526
11644
|
),
|
|
11527
|
-
/* @__PURE__ */ (0,
|
|
11645
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11528
11646
|
"button",
|
|
11529
11647
|
{
|
|
11530
11648
|
"data-testid": "quiz-image-button",
|
|
@@ -11539,7 +11657,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
11539
11657
|
},
|
|
11540
11658
|
"aria-label": "\xC1rea da imagem interativa",
|
|
11541
11659
|
children: [
|
|
11542
|
-
/* @__PURE__ */ (0,
|
|
11660
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11543
11661
|
"img",
|
|
11544
11662
|
{
|
|
11545
11663
|
"data-testid": "quiz-image",
|
|
@@ -11548,7 +11666,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
11548
11666
|
className: "w-full h-auto rounded-md"
|
|
11549
11667
|
}
|
|
11550
11668
|
),
|
|
11551
|
-
variant === "result" && /* @__PURE__ */ (0,
|
|
11669
|
+
variant === "result" && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11552
11670
|
"div",
|
|
11553
11671
|
{
|
|
11554
11672
|
"data-testid": "quiz-correct-circle",
|
|
@@ -11563,7 +11681,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
11563
11681
|
}
|
|
11564
11682
|
}
|
|
11565
11683
|
),
|
|
11566
|
-
clickPositionRelative && /* @__PURE__ */ (0,
|
|
11684
|
+
clickPositionRelative && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11567
11685
|
"div",
|
|
11568
11686
|
{
|
|
11569
11687
|
"data-testid": "quiz-user-circle",
|
|
@@ -11588,7 +11706,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
11588
11706
|
};
|
|
11589
11707
|
|
|
11590
11708
|
// src/components/Quiz/Quiz.tsx
|
|
11591
|
-
var
|
|
11709
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
11592
11710
|
var getQuizTypeConfig = (type) => {
|
|
11593
11711
|
const QUIZ_TYPE_CONFIG = {
|
|
11594
11712
|
["SIMULADO" /* SIMULADO */]: {
|
|
@@ -11630,7 +11748,7 @@ var Quiz = (0, import_react36.forwardRef)(({ children, className, variant = "def
|
|
|
11630
11748
|
(0, import_react36.useEffect)(() => {
|
|
11631
11749
|
setVariant(variant);
|
|
11632
11750
|
}, [variant, setVariant]);
|
|
11633
|
-
return /* @__PURE__ */ (0,
|
|
11751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { ref, className: cn("flex flex-col", className), ...props, children });
|
|
11634
11752
|
});
|
|
11635
11753
|
var QuizTitle = (0, import_react36.forwardRef)(({ className, onBack, ...props }, ref) => {
|
|
11636
11754
|
const {
|
|
@@ -11666,8 +11784,8 @@ var QuizTitle = (0, import_react36.forwardRef)(({ className, onBack, ...props },
|
|
|
11666
11784
|
const handleCancelExit = () => {
|
|
11667
11785
|
setShowExitConfirmation(false);
|
|
11668
11786
|
};
|
|
11669
|
-
return /* @__PURE__ */ (0,
|
|
11670
|
-
/* @__PURE__ */ (0,
|
|
11787
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
11788
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
11671
11789
|
"div",
|
|
11672
11790
|
{
|
|
11673
11791
|
ref,
|
|
@@ -11677,24 +11795,24 @@ var QuizTitle = (0, import_react36.forwardRef)(({ className, onBack, ...props },
|
|
|
11677
11795
|
),
|
|
11678
11796
|
...props,
|
|
11679
11797
|
children: [
|
|
11680
|
-
/* @__PURE__ */ (0,
|
|
11798
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11681
11799
|
IconButton_default,
|
|
11682
11800
|
{
|
|
11683
|
-
icon: /* @__PURE__ */ (0,
|
|
11801
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_phosphor_react26.CaretLeft, { size: 24 }),
|
|
11684
11802
|
size: "md",
|
|
11685
11803
|
"aria-label": "Voltar",
|
|
11686
11804
|
onClick: handleBackClick
|
|
11687
11805
|
}
|
|
11688
11806
|
),
|
|
11689
|
-
/* @__PURE__ */ (0,
|
|
11690
|
-
/* @__PURE__ */ (0,
|
|
11691
|
-
/* @__PURE__ */ (0,
|
|
11807
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: "flex flex-col gap-2 text-center", children: [
|
|
11808
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
|
|
11809
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
|
|
11692
11810
|
] }),
|
|
11693
|
-
/* @__PURE__ */ (0,
|
|
11811
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "flex flex-row items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_phosphor_react26.Clock, {}), children: isStarted ? formatTime2(timeElapsed) : "00:00" }) })
|
|
11694
11812
|
]
|
|
11695
11813
|
}
|
|
11696
11814
|
),
|
|
11697
|
-
/* @__PURE__ */ (0,
|
|
11815
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11698
11816
|
AlertDialog,
|
|
11699
11817
|
{
|
|
11700
11818
|
isOpen: showExitConfirmation,
|
|
@@ -11712,7 +11830,7 @@ var QuizTitle = (0, import_react36.forwardRef)(({ className, onBack, ...props },
|
|
|
11712
11830
|
var QuizHeader = () => {
|
|
11713
11831
|
const { getCurrentQuestion, currentQuestionIndex } = useQuizStore();
|
|
11714
11832
|
const currentQuestion = getCurrentQuestion();
|
|
11715
|
-
return /* @__PURE__ */ (0,
|
|
11833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11716
11834
|
HeaderAlternative,
|
|
11717
11835
|
{
|
|
11718
11836
|
title: currentQuestion ? `Quest\xE3o ${currentQuestionIndex + 1}` : "Quest\xE3o",
|
|
@@ -11734,7 +11852,7 @@ var QuizContent = ({ paddingBottom }) => {
|
|
|
11734
11852
|
["IMAGEM" /* IMAGEM */]: QuizImageQuestion
|
|
11735
11853
|
};
|
|
11736
11854
|
const QuestionComponent = currentQuestion ? questionComponents[currentQuestion.questionType] : null;
|
|
11737
|
-
return QuestionComponent ? /* @__PURE__ */ (0,
|
|
11855
|
+
return QuestionComponent ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(QuestionComponent, { paddingBottom }) : null;
|
|
11738
11856
|
};
|
|
11739
11857
|
var QuizQuestionList = ({
|
|
11740
11858
|
filterType = "all",
|
|
@@ -11781,18 +11899,18 @@ var QuizQuestionList = ({
|
|
|
11781
11899
|
return "Em branco";
|
|
11782
11900
|
}
|
|
11783
11901
|
};
|
|
11784
|
-
return /* @__PURE__ */ (0,
|
|
11785
|
-
Object.entries(filteredGroupedQuestions).length == 0 && /* @__PURE__ */ (0,
|
|
11902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "space-y-6 px-4 h-full", children: [
|
|
11903
|
+
Object.entries(filteredGroupedQuestions).length == 0 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex items-center justify-center text-gray-500 py-8 h-full", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-lg", children: "Nenhum resultado" }) }),
|
|
11786
11904
|
Object.entries(filteredGroupedQuestions).map(
|
|
11787
|
-
([subjectId, questions]) => /* @__PURE__ */ (0,
|
|
11788
|
-
/* @__PURE__ */ (0,
|
|
11789
|
-
/* @__PURE__ */ (0,
|
|
11790
|
-
/* @__PURE__ */ (0,
|
|
11905
|
+
([subjectId, questions]) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("section", { className: "flex flex-col gap-2", children: [
|
|
11906
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: "pt-6 pb-4 flex flex-row gap-2", children: [
|
|
11907
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "bg-primary-500 p-1 rounded-sm flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_phosphor_react26.BookOpen, { size: 17, className: "text-white" }) }),
|
|
11908
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-text-800 font-bold text-lg", children: questions?.[0]?.knowledgeMatrix?.[0]?.subject?.name ?? "Sem mat\xE9ria" })
|
|
11791
11909
|
] }),
|
|
11792
|
-
/* @__PURE__ */ (0,
|
|
11910
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("ul", { className: "flex flex-col gap-2", children: questions.map((question) => {
|
|
11793
11911
|
const status = getQuestionStatus(question.id);
|
|
11794
11912
|
const questionNumber = getQuestionIndex(question.id);
|
|
11795
|
-
return /* @__PURE__ */ (0,
|
|
11913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11796
11914
|
CardStatus,
|
|
11797
11915
|
{
|
|
11798
11916
|
header: `Quest\xE3o ${questionNumber.toString().padStart(2, "0")}`,
|
|
@@ -11897,8 +12015,8 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11897
12015
|
return;
|
|
11898
12016
|
}
|
|
11899
12017
|
};
|
|
11900
|
-
return /* @__PURE__ */ (0,
|
|
11901
|
-
/* @__PURE__ */ (0,
|
|
12018
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
12019
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11902
12020
|
"footer",
|
|
11903
12021
|
{
|
|
11904
12022
|
ref,
|
|
@@ -11907,17 +12025,17 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11907
12025
|
className
|
|
11908
12026
|
),
|
|
11909
12027
|
...props,
|
|
11910
|
-
children: variant === "default" ? /* @__PURE__ */ (0,
|
|
11911
|
-
/* @__PURE__ */ (0,
|
|
11912
|
-
/* @__PURE__ */ (0,
|
|
12028
|
+
children: variant === "default" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
12029
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-row items-center gap-1", children: [
|
|
12030
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11913
12031
|
IconButton_default,
|
|
11914
12032
|
{
|
|
11915
|
-
icon: /* @__PURE__ */ (0,
|
|
12033
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_phosphor_react26.SquaresFour, { size: 24, className: "text-text-950" }),
|
|
11916
12034
|
size: "md",
|
|
11917
12035
|
onClick: () => openModal("modalNavigate")
|
|
11918
12036
|
}
|
|
11919
12037
|
),
|
|
11920
|
-
isFirstQuestion ? /* @__PURE__ */ (0,
|
|
12038
|
+
isFirstQuestion ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11921
12039
|
Button_default,
|
|
11922
12040
|
{
|
|
11923
12041
|
variant: "outline",
|
|
@@ -11928,13 +12046,13 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11928
12046
|
},
|
|
11929
12047
|
children: "Pular"
|
|
11930
12048
|
}
|
|
11931
|
-
) : /* @__PURE__ */ (0,
|
|
12049
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11932
12050
|
Button_default,
|
|
11933
12051
|
{
|
|
11934
12052
|
size: "medium",
|
|
11935
12053
|
variant: "link",
|
|
11936
12054
|
action: "primary",
|
|
11937
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
12055
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_phosphor_react26.CaretLeft, { size: 18 }),
|
|
11938
12056
|
onClick: () => {
|
|
11939
12057
|
goToPreviousQuestion();
|
|
11940
12058
|
},
|
|
@@ -11942,7 +12060,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11942
12060
|
}
|
|
11943
12061
|
)
|
|
11944
12062
|
] }),
|
|
11945
|
-
!isFirstQuestion && !isLastQuestion && /* @__PURE__ */ (0,
|
|
12063
|
+
!isFirstQuestion && !isLastQuestion && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11946
12064
|
Button_default,
|
|
11947
12065
|
{
|
|
11948
12066
|
size: "small",
|
|
@@ -11955,7 +12073,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11955
12073
|
children: "Pular"
|
|
11956
12074
|
}
|
|
11957
12075
|
),
|
|
11958
|
-
isLastQuestion ? /* @__PURE__ */ (0,
|
|
12076
|
+
isLastQuestion ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11959
12077
|
Button_default,
|
|
11960
12078
|
{
|
|
11961
12079
|
size: "medium",
|
|
@@ -11965,13 +12083,13 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11965
12083
|
onClick: handleFinishQuiz,
|
|
11966
12084
|
children: "Finalizar"
|
|
11967
12085
|
}
|
|
11968
|
-
) : /* @__PURE__ */ (0,
|
|
12086
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11969
12087
|
Button_default,
|
|
11970
12088
|
{
|
|
11971
12089
|
size: "medium",
|
|
11972
12090
|
variant: "link",
|
|
11973
12091
|
action: "primary",
|
|
11974
|
-
iconRight: /* @__PURE__ */ (0,
|
|
12092
|
+
iconRight: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_phosphor_react26.CaretRight, { size: 18 }),
|
|
11975
12093
|
disabled: !currentAnswer && !isCurrentQuestionSkipped,
|
|
11976
12094
|
onClick: () => {
|
|
11977
12095
|
goToNextQuestion();
|
|
@@ -11979,7 +12097,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11979
12097
|
children: "Avan\xE7ar"
|
|
11980
12098
|
}
|
|
11981
12099
|
)
|
|
11982
|
-
] }) : /* @__PURE__ */ (0,
|
|
12100
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex flex-row items-center justify-center w-full", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11983
12101
|
Button_default,
|
|
11984
12102
|
{
|
|
11985
12103
|
variant: "link",
|
|
@@ -11991,7 +12109,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11991
12109
|
) })
|
|
11992
12110
|
}
|
|
11993
12111
|
),
|
|
11994
|
-
/* @__PURE__ */ (0,
|
|
12112
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11995
12113
|
AlertDialog,
|
|
11996
12114
|
{
|
|
11997
12115
|
isOpen: isModalOpen("alertDialog"),
|
|
@@ -12003,7 +12121,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12003
12121
|
onSubmit: handleAlertSubmit
|
|
12004
12122
|
}
|
|
12005
12123
|
),
|
|
12006
|
-
/* @__PURE__ */ (0,
|
|
12124
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12007
12125
|
Modal_default,
|
|
12008
12126
|
{
|
|
12009
12127
|
isOpen: isModalOpen("modalResult"),
|
|
@@ -12012,11 +12130,11 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12012
12130
|
closeOnEscape: false,
|
|
12013
12131
|
hideCloseButton: true,
|
|
12014
12132
|
size: "md",
|
|
12015
|
-
children: /* @__PURE__ */ (0,
|
|
12016
|
-
resultImageComponent ? /* @__PURE__ */ (0,
|
|
12017
|
-
/* @__PURE__ */ (0,
|
|
12018
|
-
/* @__PURE__ */ (0,
|
|
12019
|
-
/* @__PURE__ */ (0,
|
|
12133
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
12134
|
+
resultImageComponent ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "w-[282px] h-auto", children: resultImageComponent }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "w-[282px] h-[200px] bg-gray-100 rounded-md flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-gray-500 text-sm", children: "Imagem de resultado" }) }),
|
|
12135
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
12136
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h2", { className: "text-text-950 font-bold text-lg", children: getCompletionTitle(quizType) }),
|
|
12137
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("p", { className: "text-text-500 font-sm", children: [
|
|
12020
12138
|
"Voc\xEA acertou ",
|
|
12021
12139
|
correctAnswers ?? "--",
|
|
12022
12140
|
" de ",
|
|
@@ -12025,8 +12143,8 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12025
12143
|
"quest\xF5es."
|
|
12026
12144
|
] })
|
|
12027
12145
|
] }),
|
|
12028
|
-
/* @__PURE__ */ (0,
|
|
12029
|
-
/* @__PURE__ */ (0,
|
|
12146
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: [
|
|
12147
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12030
12148
|
Button_default,
|
|
12031
12149
|
{
|
|
12032
12150
|
variant: "outline",
|
|
@@ -12036,38 +12154,38 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12036
12154
|
children: quizTypeLabel === "Question\xE1rio" ? "Ir para aulas" : `Ir para ${quizTypeLabel.toLocaleLowerCase()}s`
|
|
12037
12155
|
}
|
|
12038
12156
|
),
|
|
12039
|
-
/* @__PURE__ */ (0,
|
|
12157
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button_default, { className: "w-full", onClick: onDetailResult, children: "Detalhar resultado" })
|
|
12040
12158
|
] })
|
|
12041
12159
|
] })
|
|
12042
12160
|
}
|
|
12043
12161
|
),
|
|
12044
|
-
/* @__PURE__ */ (0,
|
|
12162
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12045
12163
|
Modal_default,
|
|
12046
12164
|
{
|
|
12047
12165
|
isOpen: isModalOpen("modalNavigate"),
|
|
12048
12166
|
onClose: closeModal,
|
|
12049
12167
|
title: "Quest\xF5es",
|
|
12050
12168
|
size: "lg",
|
|
12051
|
-
children: /* @__PURE__ */ (0,
|
|
12052
|
-
/* @__PURE__ */ (0,
|
|
12053
|
-
/* @__PURE__ */ (0,
|
|
12054
|
-
/* @__PURE__ */ (0,
|
|
12055
|
-
/* @__PURE__ */ (0,
|
|
12169
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col w-full not-lg:h-[calc(100vh-200px)] lg:max-h-[687px] lg:h-[687px]", children: [
|
|
12170
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-row justify-between items-center py-6 pt-6 pb-4 border-b border-border-200 flex-shrink-0", children: [
|
|
12171
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-text-950 font-bold text-lg", children: "Filtrar por" }),
|
|
12172
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "max-w-[266px]", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Select_default, { value: filterType, onValueChange: setFilterType, children: [
|
|
12173
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12056
12174
|
SelectTrigger,
|
|
12057
12175
|
{
|
|
12058
12176
|
variant: "rounded",
|
|
12059
12177
|
className: "max-w-[266px] min-w-[160px]",
|
|
12060
|
-
children: /* @__PURE__ */ (0,
|
|
12178
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectValue, { placeholder: "Selecione uma op\xE7\xE3o" })
|
|
12061
12179
|
}
|
|
12062
12180
|
),
|
|
12063
|
-
/* @__PURE__ */ (0,
|
|
12064
|
-
/* @__PURE__ */ (0,
|
|
12065
|
-
/* @__PURE__ */ (0,
|
|
12066
|
-
/* @__PURE__ */ (0,
|
|
12181
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(SelectContent, { children: [
|
|
12182
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectItem, { value: "all", children: "Todas" }),
|
|
12183
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectItem, { value: "unanswered", children: "Em branco" }),
|
|
12184
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectItem, { value: "answered", children: "Respondidas" })
|
|
12067
12185
|
] })
|
|
12068
12186
|
] }) })
|
|
12069
12187
|
] }),
|
|
12070
|
-
/* @__PURE__ */ (0,
|
|
12188
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex flex-col gap-2 flex-1 min-h-0 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12071
12189
|
QuizQuestionList,
|
|
12072
12190
|
{
|
|
12073
12191
|
filterType,
|
|
@@ -12077,7 +12195,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12077
12195
|
] })
|
|
12078
12196
|
}
|
|
12079
12197
|
),
|
|
12080
|
-
/* @__PURE__ */ (0,
|
|
12198
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12081
12199
|
Modal_default,
|
|
12082
12200
|
{
|
|
12083
12201
|
isOpen: isModalOpen("modalResolution"),
|
|
@@ -12087,7 +12205,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12087
12205
|
children: currentQuestion?.solutionExplanation
|
|
12088
12206
|
}
|
|
12089
12207
|
),
|
|
12090
|
-
/* @__PURE__ */ (0,
|
|
12208
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12091
12209
|
Modal_default,
|
|
12092
12210
|
{
|
|
12093
12211
|
isOpen: isModalOpen("modalQuestionnaireAllCorrect"),
|
|
@@ -12096,17 +12214,17 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12096
12214
|
closeOnEscape: false,
|
|
12097
12215
|
hideCloseButton: true,
|
|
12098
12216
|
size: "md",
|
|
12099
|
-
children: /* @__PURE__ */ (0,
|
|
12100
|
-
resultImageComponent ? /* @__PURE__ */ (0,
|
|
12101
|
-
/* @__PURE__ */ (0,
|
|
12102
|
-
/* @__PURE__ */ (0,
|
|
12103
|
-
/* @__PURE__ */ (0,
|
|
12217
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
12218
|
+
resultImageComponent ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "w-[282px] h-auto", children: resultImageComponent }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "w-[282px] h-[200px] bg-gray-100 rounded-md flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-gray-500 text-sm", children: "Imagem de resultado" }) }),
|
|
12219
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
12220
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h2", { className: "text-text-950 font-bold text-lg", children: "\u{1F389} Parab\xE9ns!" }),
|
|
12221
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-text-500 font-sm", children: "Voc\xEA concluiu o m\xF3dulo Movimento Uniforme." })
|
|
12104
12222
|
] }),
|
|
12105
|
-
/* @__PURE__ */ (0,
|
|
12223
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button_default, { className: "w-full", onClick: onGoToNextModule, children: "Pr\xF3ximo m\xF3dulo" }) })
|
|
12106
12224
|
] })
|
|
12107
12225
|
}
|
|
12108
12226
|
),
|
|
12109
|
-
/* @__PURE__ */ (0,
|
|
12227
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12110
12228
|
Modal_default,
|
|
12111
12229
|
{
|
|
12112
12230
|
isOpen: isModalOpen("modalQuestionnaireAllIncorrect"),
|
|
@@ -12115,16 +12233,16 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12115
12233
|
closeOnEscape: false,
|
|
12116
12234
|
hideCloseButton: true,
|
|
12117
12235
|
size: "md",
|
|
12118
|
-
children: /* @__PURE__ */ (0,
|
|
12119
|
-
resultIncorrectImageComponent ? /* @__PURE__ */ (0,
|
|
12120
|
-
/* @__PURE__ */ (0,
|
|
12121
|
-
/* @__PURE__ */ (0,
|
|
12122
|
-
/* @__PURE__ */ (0,
|
|
12123
|
-
/* @__PURE__ */ (0,
|
|
12124
|
-
/* @__PURE__ */ (0,
|
|
12236
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
12237
|
+
resultIncorrectImageComponent ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "w-[282px] h-auto", children: resultIncorrectImageComponent }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "w-[282px] h-[200px] bg-gray-100 rounded-md flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-gray-500 text-sm", children: "Imagem de resultado" }) }),
|
|
12238
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
12239
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h2", { className: "text-text-950 font-bold text-lg", children: "\u{1F615} N\xE3o foi dessa vez..." }),
|
|
12240
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-text-500 font-sm", children: "Voc\xEA tirou 0 no question\xE1rio, mas n\xE3o se preocupe! Isso \xE9 apenas uma oportunidade de aprendizado." }),
|
|
12241
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-text-500 font-sm", children: "Que tal tentar novamente para melhorar sua nota? Estamos aqui para te ajudar a entender o conte\xFAdo e evoluir." }),
|
|
12242
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-text-500 font-sm", children: "Clique em Repetir Question\xE1rio e mostre do que voc\xEA \xE9 capaz! \u{1F4AA}" })
|
|
12125
12243
|
] }),
|
|
12126
|
-
/* @__PURE__ */ (0,
|
|
12127
|
-
/* @__PURE__ */ (0,
|
|
12244
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-row justify-center items-center gap-2 w-full", children: [
|
|
12245
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12128
12246
|
Button_default,
|
|
12129
12247
|
{
|
|
12130
12248
|
type: "button",
|
|
@@ -12138,7 +12256,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12138
12256
|
children: "Tentar depois"
|
|
12139
12257
|
}
|
|
12140
12258
|
),
|
|
12141
|
-
/* @__PURE__ */ (0,
|
|
12259
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12142
12260
|
Button_default,
|
|
12143
12261
|
{
|
|
12144
12262
|
variant: "outline",
|
|
@@ -12148,7 +12266,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12148
12266
|
children: "Detalhar resultado"
|
|
12149
12267
|
}
|
|
12150
12268
|
),
|
|
12151
|
-
/* @__PURE__ */ (0,
|
|
12269
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12152
12270
|
Button_default,
|
|
12153
12271
|
{
|
|
12154
12272
|
className: "w-auto",
|
|
@@ -12161,7 +12279,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12161
12279
|
] })
|
|
12162
12280
|
}
|
|
12163
12281
|
),
|
|
12164
|
-
/* @__PURE__ */ (0,
|
|
12282
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12165
12283
|
AlertDialog,
|
|
12166
12284
|
{
|
|
12167
12285
|
isOpen: isModalOpen("alertDialogTryLater"),
|
|
@@ -12186,25 +12304,25 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12186
12304
|
|
|
12187
12305
|
// src/components/Quiz/QuizResult.tsx
|
|
12188
12306
|
var import_react37 = require("react");
|
|
12189
|
-
var
|
|
12190
|
-
var
|
|
12307
|
+
var import_phosphor_react27 = require("phosphor-react");
|
|
12308
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
12191
12309
|
var QuizBadge = ({
|
|
12192
12310
|
subtype
|
|
12193
12311
|
}) => {
|
|
12194
12312
|
switch (subtype) {
|
|
12195
12313
|
case "PROVA" /* PROVA */:
|
|
12196
|
-
return /* @__PURE__ */ (0,
|
|
12314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Badge_default, { variant: "examsOutlined", action: "exam2", "data-testid": "quiz-badge", children: "Prova" });
|
|
12197
12315
|
case "ENEM_PROVA_1" /* ENEM_PROVA_1 */:
|
|
12198
12316
|
case "ENEM_PROVA_2" /* ENEM_PROVA_2 */:
|
|
12199
|
-
return /* @__PURE__ */ (0,
|
|
12317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Badge_default, { variant: "examsOutlined", action: "exam1", "data-testid": "quiz-badge", children: "Enem" });
|
|
12200
12318
|
case "VESTIBULAR" /* VESTIBULAR */:
|
|
12201
|
-
return /* @__PURE__ */ (0,
|
|
12319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Badge_default, { variant: "examsOutlined", action: "exam4", "data-testid": "quiz-badge", children: "Vestibular" });
|
|
12202
12320
|
case "SIMULADO" /* SIMULADO */:
|
|
12203
12321
|
case "SIMULADAO" /* SIMULADAO */:
|
|
12204
12322
|
case void 0:
|
|
12205
|
-
return /* @__PURE__ */ (0,
|
|
12323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Badge_default, { variant: "examsOutlined", action: "exam3", "data-testid": "quiz-badge", children: "Simulad\xE3o" });
|
|
12206
12324
|
default:
|
|
12207
|
-
return /* @__PURE__ */ (0,
|
|
12325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Badge_default, { variant: "solid", action: "info", "data-testid": "quiz-badge", children: subtype });
|
|
12208
12326
|
}
|
|
12209
12327
|
};
|
|
12210
12328
|
var QuizHeaderResult = (0, import_react37.forwardRef)(
|
|
@@ -12249,7 +12367,7 @@ var QuizHeaderResult = (0, import_react37.forwardRef)(
|
|
|
12249
12367
|
return "N\xE3o foi dessa vez...voc\xEA deixou a resposta em branco";
|
|
12250
12368
|
}
|
|
12251
12369
|
};
|
|
12252
|
-
return /* @__PURE__ */ (0,
|
|
12370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
12253
12371
|
"div",
|
|
12254
12372
|
{
|
|
12255
12373
|
ref,
|
|
@@ -12260,8 +12378,8 @@ var QuizHeaderResult = (0, import_react37.forwardRef)(
|
|
|
12260
12378
|
),
|
|
12261
12379
|
...props,
|
|
12262
12380
|
children: [
|
|
12263
|
-
/* @__PURE__ */ (0,
|
|
12264
|
-
/* @__PURE__ */ (0,
|
|
12381
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-text-950 font-bold text-lg", children: "Resultado" }),
|
|
12382
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-text-700 text-md", children: getLabelByAnswersStatus() })
|
|
12265
12383
|
]
|
|
12266
12384
|
}
|
|
12267
12385
|
);
|
|
@@ -12269,7 +12387,7 @@ var QuizHeaderResult = (0, import_react37.forwardRef)(
|
|
|
12269
12387
|
);
|
|
12270
12388
|
var QuizResultHeaderTitle = (0, import_react37.forwardRef)(({ className, showBadge = true, onRepeat, canRetry, ...props }, ref) => {
|
|
12271
12389
|
const { quiz } = useQuizStore();
|
|
12272
|
-
return /* @__PURE__ */ (0,
|
|
12390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
12273
12391
|
"div",
|
|
12274
12392
|
{
|
|
12275
12393
|
ref,
|
|
@@ -12279,9 +12397,9 @@ var QuizResultHeaderTitle = (0, import_react37.forwardRef)(({ className, showBad
|
|
|
12279
12397
|
),
|
|
12280
12398
|
...props,
|
|
12281
12399
|
children: [
|
|
12282
|
-
/* @__PURE__ */ (0,
|
|
12283
|
-
/* @__PURE__ */ (0,
|
|
12284
|
-
canRetry && onRepeat && /* @__PURE__ */ (0,
|
|
12400
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: "Resultado" }),
|
|
12401
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-row gap-3 items-center", children: [
|
|
12402
|
+
canRetry && onRepeat && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12285
12403
|
Button_default,
|
|
12286
12404
|
{
|
|
12287
12405
|
variant: "solid",
|
|
@@ -12291,7 +12409,7 @@ var QuizResultHeaderTitle = (0, import_react37.forwardRef)(({ className, showBad
|
|
|
12291
12409
|
children: "Repetir question\xE1rio"
|
|
12292
12410
|
}
|
|
12293
12411
|
),
|
|
12294
|
-
showBadge && /* @__PURE__ */ (0,
|
|
12412
|
+
showBadge && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(QuizBadge, { subtype: quiz?.subtype || void 0 })
|
|
12295
12413
|
] })
|
|
12296
12414
|
]
|
|
12297
12415
|
}
|
|
@@ -12300,7 +12418,7 @@ var QuizResultHeaderTitle = (0, import_react37.forwardRef)(({ className, showBad
|
|
|
12300
12418
|
var QuizResultTitle = (0, import_react37.forwardRef)(({ className, ...props }, ref) => {
|
|
12301
12419
|
const { getQuizTitle } = useQuizStore();
|
|
12302
12420
|
const quizTitle = getQuizTitle();
|
|
12303
|
-
return /* @__PURE__ */ (0,
|
|
12421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12304
12422
|
"p",
|
|
12305
12423
|
{
|
|
12306
12424
|
className: cn("pt-6 pb-4 text-text-950 font-bold text-lg", className),
|
|
@@ -12352,7 +12470,7 @@ var QuizResultPerformance = (0, import_react37.forwardRef)(({ showDetails = true
|
|
|
12352
12470
|
}
|
|
12353
12471
|
const percentage = totalQuestions > 0 ? Math.round(correctAnswers / totalQuestions * 100) : 0;
|
|
12354
12472
|
const classesJustifyBetween = showDetails ? "justify-between" : "justify-center";
|
|
12355
|
-
return /* @__PURE__ */ (0,
|
|
12473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
12356
12474
|
"div",
|
|
12357
12475
|
{
|
|
12358
12476
|
className: cn(
|
|
@@ -12362,8 +12480,8 @@ var QuizResultPerformance = (0, import_react37.forwardRef)(({ showDetails = true
|
|
|
12362
12480
|
ref,
|
|
12363
12481
|
...props,
|
|
12364
12482
|
children: [
|
|
12365
|
-
/* @__PURE__ */ (0,
|
|
12366
|
-
/* @__PURE__ */ (0,
|
|
12483
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "relative", children: [
|
|
12484
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12367
12485
|
ProgressCircle_default,
|
|
12368
12486
|
{
|
|
12369
12487
|
size: "medium",
|
|
@@ -12373,24 +12491,24 @@ var QuizResultPerformance = (0, import_react37.forwardRef)(({ showDetails = true
|
|
|
12373
12491
|
label: ""
|
|
12374
12492
|
}
|
|
12375
12493
|
),
|
|
12376
|
-
/* @__PURE__ */ (0,
|
|
12377
|
-
showDetails && /* @__PURE__ */ (0,
|
|
12378
|
-
/* @__PURE__ */ (0,
|
|
12379
|
-
/* @__PURE__ */ (0,
|
|
12494
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
12495
|
+
showDetails && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center gap-1 mb-1", children: [
|
|
12496
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_phosphor_react27.Clock, { size: 12, weight: "regular", className: "text-text-800" }),
|
|
12497
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "text-2xs font-medium text-text-800", children: formatTime2(
|
|
12380
12498
|
(getQuestionResultStatistics()?.timeSpent ?? 0) * 60
|
|
12381
12499
|
) })
|
|
12382
12500
|
] }),
|
|
12383
|
-
/* @__PURE__ */ (0,
|
|
12501
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "text-2xl font-medium text-text-800 leading-7", children: [
|
|
12384
12502
|
getQuestionResultStatistics()?.correctAnswers ?? "--",
|
|
12385
12503
|
" de",
|
|
12386
12504
|
" ",
|
|
12387
12505
|
totalQuestions
|
|
12388
12506
|
] }),
|
|
12389
|
-
/* @__PURE__ */ (0,
|
|
12507
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "text-2xs font-medium text-text-600 mt-1", children: "Corretas" })
|
|
12390
12508
|
] })
|
|
12391
12509
|
] }),
|
|
12392
|
-
showDetails && /* @__PURE__ */ (0,
|
|
12393
|
-
/* @__PURE__ */ (0,
|
|
12510
|
+
showDetails && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-col gap-4 w-full", children: [
|
|
12511
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12394
12512
|
ProgressBar_default,
|
|
12395
12513
|
{
|
|
12396
12514
|
className: "w-full",
|
|
@@ -12404,7 +12522,7 @@ var QuizResultPerformance = (0, import_react37.forwardRef)(({ showDetails = true
|
|
|
12404
12522
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
12405
12523
|
}
|
|
12406
12524
|
),
|
|
12407
|
-
/* @__PURE__ */ (0,
|
|
12525
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12408
12526
|
ProgressBar_default,
|
|
12409
12527
|
{
|
|
12410
12528
|
className: "w-full",
|
|
@@ -12418,7 +12536,7 @@ var QuizResultPerformance = (0, import_react37.forwardRef)(({ showDetails = true
|
|
|
12418
12536
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
12419
12537
|
}
|
|
12420
12538
|
),
|
|
12421
|
-
/* @__PURE__ */ (0,
|
|
12539
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12422
12540
|
ProgressBar_default,
|
|
12423
12541
|
{
|
|
12424
12542
|
className: "w-full",
|
|
@@ -12465,9 +12583,9 @@ var QuizListResult = (0, import_react37.forwardRef)(({ className, onSubjectClick
|
|
|
12465
12583
|
};
|
|
12466
12584
|
}
|
|
12467
12585
|
);
|
|
12468
|
-
return /* @__PURE__ */ (0,
|
|
12469
|
-
/* @__PURE__ */ (0,
|
|
12470
|
-
/* @__PURE__ */ (0,
|
|
12586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("section", { ref, className, ...props, children: [
|
|
12587
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Mat\xE9rias" }),
|
|
12588
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("ul", { className: "flex flex-col gap-2", children: subjectsStats.map((subject) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12471
12589
|
CardResults,
|
|
12472
12590
|
{
|
|
12473
12591
|
onClick: () => onSubjectClick?.(subject.subject.id),
|
|
@@ -12491,16 +12609,16 @@ var QuizListResultByMateria = ({
|
|
|
12491
12609
|
const groupedQuestions = getQuestionsGroupedBySubject();
|
|
12492
12610
|
const answeredQuestions = groupedQuestions[subject] || [];
|
|
12493
12611
|
const formattedQuestions = subject == "all" ? Object.values(groupedQuestions).flat() : answeredQuestions;
|
|
12494
|
-
return /* @__PURE__ */ (0,
|
|
12495
|
-
/* @__PURE__ */ (0,
|
|
12496
|
-
/* @__PURE__ */ (0,
|
|
12497
|
-
/* @__PURE__ */ (0,
|
|
12498
|
-
/* @__PURE__ */ (0,
|
|
12612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-col", children: [
|
|
12613
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex flex-row pt-4 justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: subjectName || formattedQuestions?.[0]?.knowledgeMatrix?.[0]?.subject?.name || "Sem mat\xE9ria" }) }),
|
|
12614
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("section", { className: "flex flex-col ", children: [
|
|
12615
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Resultado das quest\xF5es" }),
|
|
12616
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("ul", { className: "flex flex-col gap-2 pt-4", children: formattedQuestions.map((question) => {
|
|
12499
12617
|
const questionIndex = getQuestionIndex(
|
|
12500
12618
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12501
12619
|
question.questionId ?? question.id
|
|
12502
12620
|
);
|
|
12503
|
-
return /* @__PURE__ */ (0,
|
|
12621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12504
12622
|
CardStatus,
|
|
12505
12623
|
{
|
|
12506
12624
|
className: "max-w-full",
|
|
@@ -12526,7 +12644,7 @@ var QuizListResultByMateria = ({
|
|
|
12526
12644
|
|
|
12527
12645
|
// src/components/BreadcrumbMenu/BreadcrumbMenu.tsx
|
|
12528
12646
|
var import_react_router_dom3 = require("react-router-dom");
|
|
12529
|
-
var
|
|
12647
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
12530
12648
|
var BreadcrumbMenu = ({
|
|
12531
12649
|
breadcrumbs,
|
|
12532
12650
|
onBreadcrumbClick,
|
|
@@ -12539,17 +12657,17 @@ var BreadcrumbMenu = ({
|
|
|
12539
12657
|
}
|
|
12540
12658
|
navigate(breadcrumb.url);
|
|
12541
12659
|
};
|
|
12542
|
-
return /* @__PURE__ */ (0,
|
|
12660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
12543
12661
|
Menu,
|
|
12544
12662
|
{
|
|
12545
12663
|
value: `breadcrumb-${breadcrumbs.length - 1}`,
|
|
12546
12664
|
defaultValue: "breadcrumb-0",
|
|
12547
12665
|
variant: "breadcrumb",
|
|
12548
12666
|
className,
|
|
12549
|
-
children: /* @__PURE__ */ (0,
|
|
12667
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(MenuContent, { className: "w-full flex flex-row flex-wrap gap-2 !px-0", children: breadcrumbs.map((breadcrumb, index) => {
|
|
12550
12668
|
const isLast = index === breadcrumbs.length - 1;
|
|
12551
12669
|
const hasSeparator = !isLast;
|
|
12552
|
-
return /* @__PURE__ */ (0,
|
|
12670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
12553
12671
|
MenuItem,
|
|
12554
12672
|
{
|
|
12555
12673
|
variant: "breadcrumb",
|
|
@@ -13145,6 +13263,7 @@ function useAppContent(config) {
|
|
|
13145
13263
|
SkeletonRounded,
|
|
13146
13264
|
SkeletonTable,
|
|
13147
13265
|
SkeletonText,
|
|
13266
|
+
StatisticsCard,
|
|
13148
13267
|
Stepper,
|
|
13149
13268
|
SubjectEnum,
|
|
13150
13269
|
SubjectInfo,
|