analytica-frontend-lib 1.1.94 → 1.1.96
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/CheckBox/index.d.mts +1 -1
- package/dist/CheckBox/index.d.ts +1 -1
- package/dist/Radio/index.d.mts +2 -2
- package/dist/Radio/index.d.ts +2 -2
- package/dist/Search/index.d.mts +1 -1
- package/dist/Search/index.d.ts +1 -1
- package/dist/StatisticsCard/index.d.mts +79 -0
- package/dist/StatisticsCard/index.d.ts +79 -0
- package/dist/StatisticsCard/index.js +623 -0
- package/dist/StatisticsCard/index.js.map +1 -0
- package/dist/StatisticsCard/index.mjs +604 -0
- package/dist/StatisticsCard/index.mjs.map +1 -0
- package/dist/index.css +43 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +474 -340
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +462 -329
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +43 -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,140 @@ 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, showPlaceholder = false }) => {
|
|
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: showPlaceholder ? "-" : 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 getGridColumnsClass = (itemCount) => {
|
|
8202
|
+
if (itemCount === 4) return "lg:grid-cols-4";
|
|
8203
|
+
if (itemCount === 3) return "lg:grid-cols-3";
|
|
8204
|
+
if (itemCount === 2) return "lg:grid-cols-2";
|
|
8205
|
+
return "lg:grid-cols-1";
|
|
8206
|
+
};
|
|
8207
|
+
var StatisticsCard = ({
|
|
8208
|
+
title,
|
|
8209
|
+
data,
|
|
8210
|
+
showPlaceholder = false,
|
|
8211
|
+
emptyStateMessage,
|
|
8212
|
+
emptyStateButtonText,
|
|
8213
|
+
onEmptyStateButtonClick,
|
|
8214
|
+
dropdownOptions,
|
|
8215
|
+
selectedDropdownValue,
|
|
8216
|
+
onDropdownChange,
|
|
8217
|
+
selectPlaceholder = "Selecione um per\xEDodo",
|
|
8218
|
+
dropdownAriaLabel = "Filtro de per\xEDodo",
|
|
8219
|
+
className = ""
|
|
8220
|
+
}) => {
|
|
8221
|
+
const hasData = data && data.length > 0;
|
|
8222
|
+
const gridColumnsClass = hasData ? getGridColumnsClass(data.length) : "";
|
|
8223
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
8224
|
+
"div",
|
|
8225
|
+
{
|
|
8226
|
+
className: `bg-background rounded-xl p-4 h-auto lg:h-[185px] flex flex-col gap-2 ${className}`,
|
|
8227
|
+
children: [
|
|
8228
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex flex-row justify-between items-center gap-4", children: [
|
|
8229
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text_default, { as: "h3", size: "sm", weight: "medium", color: "text-text-600", children: title }),
|
|
8230
|
+
dropdownOptions && dropdownOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "w-[99px]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
8231
|
+
Select_default,
|
|
8232
|
+
{
|
|
8233
|
+
value: selectedDropdownValue,
|
|
8234
|
+
onValueChange: onDropdownChange,
|
|
8235
|
+
size: "medium",
|
|
8236
|
+
children: [
|
|
8237
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
8238
|
+
SelectTrigger,
|
|
8239
|
+
{
|
|
8240
|
+
className: "border border-border-300 rounded whitespace-nowrap",
|
|
8241
|
+
"aria-label": dropdownAriaLabel,
|
|
8242
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SelectValue, { placeholder: selectPlaceholder })
|
|
8243
|
+
}
|
|
8244
|
+
),
|
|
8245
|
+
/* @__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)) })
|
|
8246
|
+
]
|
|
8247
|
+
}
|
|
8248
|
+
) })
|
|
8249
|
+
] }),
|
|
8250
|
+
hasData ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
8251
|
+
"div",
|
|
8252
|
+
{
|
|
8253
|
+
className: `grid grid-cols-1 sm:grid-cols-2 gap-[13px] ${gridColumnsClass}`,
|
|
8254
|
+
children: data.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
8255
|
+
StatCard,
|
|
8256
|
+
{
|
|
8257
|
+
item,
|
|
8258
|
+
showPlaceholder
|
|
8259
|
+
},
|
|
8260
|
+
`${item.variant}-${item.label}-${index}`
|
|
8261
|
+
))
|
|
8262
|
+
}
|
|
8263
|
+
) : /* @__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: [
|
|
8264
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
8265
|
+
Text_default,
|
|
8266
|
+
{
|
|
8267
|
+
size: "sm",
|
|
8268
|
+
color: "text-text-600",
|
|
8269
|
+
className: "text-center max-w-md",
|
|
8270
|
+
children: emptyStateMessage
|
|
8271
|
+
}
|
|
8272
|
+
),
|
|
8273
|
+
onEmptyStateButtonClick && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
8274
|
+
Button_default,
|
|
8275
|
+
{
|
|
8276
|
+
variant: "outline",
|
|
8277
|
+
action: "primary",
|
|
8278
|
+
size: "small",
|
|
8279
|
+
onClick: onEmptyStateButtonClick,
|
|
8280
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_phosphor_react18.Plus, { size: 16, weight: "bold" }),
|
|
8281
|
+
children: emptyStateButtonText
|
|
8282
|
+
}
|
|
8283
|
+
)
|
|
8284
|
+
] })
|
|
8285
|
+
]
|
|
8286
|
+
}
|
|
8287
|
+
);
|
|
8288
|
+
};
|
|
8289
|
+
|
|
8290
|
+
// src/components/NotFound/NotFound.tsx
|
|
8291
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
8159
8292
|
var NotFound = ({
|
|
8160
8293
|
title,
|
|
8161
8294
|
description,
|
|
@@ -8198,22 +8331,22 @@ var NotFound = ({
|
|
|
8198
8331
|
const errorTitle = title || getDefaultTitle();
|
|
8199
8332
|
const errorDescription = description || getDefaultDescription();
|
|
8200
8333
|
const errorCode = getErrorCode();
|
|
8201
|
-
return /* @__PURE__ */ (0,
|
|
8334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
8202
8335
|
"div",
|
|
8203
8336
|
{
|
|
8204
8337
|
className: cn(
|
|
8205
8338
|
"flex flex-col w-full h-screen items-center justify-center bg-background-50 px-4",
|
|
8206
8339
|
className
|
|
8207
8340
|
),
|
|
8208
|
-
children: /* @__PURE__ */ (0,
|
|
8341
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
8209
8342
|
"main",
|
|
8210
8343
|
{
|
|
8211
8344
|
role: "main",
|
|
8212
8345
|
"aria-labelledby": "error-title",
|
|
8213
8346
|
"aria-describedby": "error-description",
|
|
8214
8347
|
className: "flex flex-col items-center text-center max-w-md space-y-6",
|
|
8215
|
-
children: /* @__PURE__ */ (0,
|
|
8216
|
-
/* @__PURE__ */ (0,
|
|
8348
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("section", { "aria-label": `Erro ${errorCode}`, children: [
|
|
8349
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
8217
8350
|
"div",
|
|
8218
8351
|
{
|
|
8219
8352
|
className: "text-8xl font-bold text-primary-300 select-none",
|
|
@@ -8221,8 +8354,8 @@ var NotFound = ({
|
|
|
8221
8354
|
children: errorCode
|
|
8222
8355
|
}
|
|
8223
8356
|
),
|
|
8224
|
-
/* @__PURE__ */ (0,
|
|
8225
|
-
/* @__PURE__ */ (0,
|
|
8357
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("header", { className: "space-y-2", children: [
|
|
8358
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
8226
8359
|
Text_default,
|
|
8227
8360
|
{
|
|
8228
8361
|
size: "xl",
|
|
@@ -8233,9 +8366,9 @@ var NotFound = ({
|
|
|
8233
8366
|
children: errorTitle
|
|
8234
8367
|
}
|
|
8235
8368
|
),
|
|
8236
|
-
/* @__PURE__ */ (0,
|
|
8369
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text_default, { size: "md", className: "text-text-600", id: "error-description", children: errorDescription })
|
|
8237
8370
|
] }),
|
|
8238
|
-
onButtonClick && /* @__PURE__ */ (0,
|
|
8371
|
+
onButtonClick && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("nav", { "aria-label": "Navega\xE7\xE3o de erro", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
8239
8372
|
Button_default,
|
|
8240
8373
|
{
|
|
8241
8374
|
onClick: handleButtonClick,
|
|
@@ -8258,12 +8391,12 @@ var NotFound_default = NotFound;
|
|
|
8258
8391
|
// src/components/VideoPlayer/VideoPlayer.tsx
|
|
8259
8392
|
var import_react27 = require("react");
|
|
8260
8393
|
var import_react_dom = require("react-dom");
|
|
8261
|
-
var
|
|
8394
|
+
var import_phosphor_react20 = require("phosphor-react");
|
|
8262
8395
|
|
|
8263
8396
|
// src/components/DownloadButton/DownloadButton.tsx
|
|
8264
8397
|
var import_react26 = require("react");
|
|
8265
|
-
var
|
|
8266
|
-
var
|
|
8398
|
+
var import_phosphor_react19 = require("phosphor-react");
|
|
8399
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
8267
8400
|
var getMimeType = (url) => {
|
|
8268
8401
|
const extension = getFileExtension(url);
|
|
8269
8402
|
const mimeTypes = {
|
|
@@ -8420,10 +8553,10 @@ var DownloadButton = ({
|
|
|
8420
8553
|
if (!hasContent) {
|
|
8421
8554
|
return null;
|
|
8422
8555
|
}
|
|
8423
|
-
return /* @__PURE__ */ (0,
|
|
8556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: cn("flex items-center", className), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
8424
8557
|
IconButton_default,
|
|
8425
8558
|
{
|
|
8426
|
-
icon: /* @__PURE__ */ (0,
|
|
8559
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_phosphor_react19.DownloadSimple, { size: 24 }),
|
|
8427
8560
|
onClick: handleDownload,
|
|
8428
8561
|
disabled: disabled || isDownloading,
|
|
8429
8562
|
"aria-label": (() => {
|
|
@@ -8444,7 +8577,7 @@ var DownloadButton = ({
|
|
|
8444
8577
|
var DownloadButton_default = DownloadButton;
|
|
8445
8578
|
|
|
8446
8579
|
// src/components/VideoPlayer/VideoPlayer.tsx
|
|
8447
|
-
var
|
|
8580
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
8448
8581
|
var CONTROLS_HIDE_TIMEOUT = 3e3;
|
|
8449
8582
|
var LEAVE_HIDE_TIMEOUT = 1e3;
|
|
8450
8583
|
var INIT_DELAY = 100;
|
|
@@ -8460,7 +8593,7 @@ var ProgressBar2 = ({
|
|
|
8460
8593
|
progressPercentage,
|
|
8461
8594
|
onSeek,
|
|
8462
8595
|
className = "px-4 pb-2"
|
|
8463
|
-
}) => /* @__PURE__ */ (0,
|
|
8596
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
8464
8597
|
"input",
|
|
8465
8598
|
{
|
|
8466
8599
|
type: "range",
|
|
@@ -8482,17 +8615,17 @@ var VolumeControls = ({
|
|
|
8482
8615
|
onToggleMute,
|
|
8483
8616
|
iconSize = 24,
|
|
8484
8617
|
showSlider = true
|
|
8485
|
-
}) => /* @__PURE__ */ (0,
|
|
8486
|
-
/* @__PURE__ */ (0,
|
|
8618
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
8619
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
8487
8620
|
IconButton_default,
|
|
8488
8621
|
{
|
|
8489
|
-
icon: isMuted ? /* @__PURE__ */ (0,
|
|
8622
|
+
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
8623
|
onClick: onToggleMute,
|
|
8491
8624
|
"aria-label": isMuted ? "Unmute" : "Mute",
|
|
8492
8625
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
8493
8626
|
}
|
|
8494
8627
|
),
|
|
8495
|
-
showSlider && /* @__PURE__ */ (0,
|
|
8628
|
+
showSlider && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
8496
8629
|
"input",
|
|
8497
8630
|
{
|
|
8498
8631
|
type: "range",
|
|
@@ -8549,7 +8682,7 @@ var SpeedMenu = ({
|
|
|
8549
8682
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
8550
8683
|
};
|
|
8551
8684
|
}, [showSpeedMenu, onToggleMenu]);
|
|
8552
|
-
const menuContent = /* @__PURE__ */ (0,
|
|
8685
|
+
const menuContent = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
8553
8686
|
"div",
|
|
8554
8687
|
{
|
|
8555
8688
|
ref: speedMenuRef,
|
|
@@ -8560,7 +8693,7 @@ var SpeedMenu = ({
|
|
|
8560
8693
|
top: `${position.top}px`,
|
|
8561
8694
|
left: `${position.left}px`
|
|
8562
8695
|
},
|
|
8563
|
-
children: [0.5, 0.75, 1, 1.25, 1.5, 2].map((speed) => /* @__PURE__ */ (0,
|
|
8696
|
+
children: [0.5, 0.75, 1, 1.25, 1.5, 2].map((speed) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
8564
8697
|
"button",
|
|
8565
8698
|
{
|
|
8566
8699
|
role: "menuitemradio",
|
|
@@ -8577,12 +8710,12 @@ var SpeedMenu = ({
|
|
|
8577
8710
|
}
|
|
8578
8711
|
);
|
|
8579
8712
|
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,
|
|
8713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "relative", ref: speedMenuContainerRef, children: [
|
|
8714
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
8582
8715
|
IconButton_default,
|
|
8583
8716
|
{
|
|
8584
8717
|
ref: buttonRef,
|
|
8585
|
-
icon: /* @__PURE__ */ (0,
|
|
8718
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_phosphor_react20.DotsThreeVertical, { size: iconSize }),
|
|
8586
8719
|
onClick: onToggleMenu,
|
|
8587
8720
|
"aria-label": "Playback speed",
|
|
8588
8721
|
"aria-haspopup": "menu",
|
|
@@ -9098,10 +9231,10 @@ var VideoPlayer = ({
|
|
|
9098
9231
|
]
|
|
9099
9232
|
);
|
|
9100
9233
|
const groupedSubTitleValid = subtitles && subtitlesValidation === "valid";
|
|
9101
|
-
return /* @__PURE__ */ (0,
|
|
9102
|
-
(title || subtitleText) && /* @__PURE__ */ (0,
|
|
9103
|
-
/* @__PURE__ */ (0,
|
|
9104
|
-
title && /* @__PURE__ */ (0,
|
|
9234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: cn("flex flex-col", className), children: [
|
|
9235
|
+
(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: [
|
|
9236
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
9237
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9105
9238
|
Text_default,
|
|
9106
9239
|
{
|
|
9107
9240
|
as: "h2",
|
|
@@ -9112,7 +9245,7 @@ var VideoPlayer = ({
|
|
|
9112
9245
|
children: title
|
|
9113
9246
|
}
|
|
9114
9247
|
),
|
|
9115
|
-
subtitleText && /* @__PURE__ */ (0,
|
|
9248
|
+
subtitleText && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9116
9249
|
Text_default,
|
|
9117
9250
|
{
|
|
9118
9251
|
as: "p",
|
|
@@ -9124,7 +9257,7 @@ var VideoPlayer = ({
|
|
|
9124
9257
|
}
|
|
9125
9258
|
)
|
|
9126
9259
|
] }),
|
|
9127
|
-
showDownloadButton && downloadContent && /* @__PURE__ */ (0,
|
|
9260
|
+
showDownloadButton && downloadContent && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9128
9261
|
DownloadButton_default,
|
|
9129
9262
|
{
|
|
9130
9263
|
content: downloadContent,
|
|
@@ -9136,7 +9269,7 @@ var VideoPlayer = ({
|
|
|
9136
9269
|
}
|
|
9137
9270
|
)
|
|
9138
9271
|
] }),
|
|
9139
|
-
/* @__PURE__ */ (0,
|
|
9272
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
9140
9273
|
"section",
|
|
9141
9274
|
{
|
|
9142
9275
|
className: cn(
|
|
@@ -9151,7 +9284,7 @@ var VideoPlayer = ({
|
|
|
9151
9284
|
onTouchStart: handleMouseEnter,
|
|
9152
9285
|
onMouseLeave: handleMouseLeave,
|
|
9153
9286
|
children: [
|
|
9154
|
-
/* @__PURE__ */ (0,
|
|
9287
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9155
9288
|
"video",
|
|
9156
9289
|
{
|
|
9157
9290
|
ref: videoRef,
|
|
@@ -9166,7 +9299,7 @@ var VideoPlayer = ({
|
|
|
9166
9299
|
onKeyDown: handleVideoKeyDown,
|
|
9167
9300
|
tabIndex: 0,
|
|
9168
9301
|
"aria-label": title ? `Video: ${title}` : "Video player",
|
|
9169
|
-
children: /* @__PURE__ */ (0,
|
|
9302
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9170
9303
|
"track",
|
|
9171
9304
|
{
|
|
9172
9305
|
ref: trackRef,
|
|
@@ -9179,17 +9312,17 @@ var VideoPlayer = ({
|
|
|
9179
9312
|
)
|
|
9180
9313
|
}
|
|
9181
9314
|
),
|
|
9182
|
-
!isPlaying && /* @__PURE__ */ (0,
|
|
9315
|
+
!isPlaying && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9183
9316
|
"div",
|
|
9184
9317
|
{
|
|
9185
9318
|
className: cn(
|
|
9186
9319
|
"absolute inset-0 flex bg-black/30 transition-opacity",
|
|
9187
9320
|
getCenterPlayButtonPosition()
|
|
9188
9321
|
),
|
|
9189
|
-
children: /* @__PURE__ */ (0,
|
|
9322
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9190
9323
|
IconButton_default,
|
|
9191
9324
|
{
|
|
9192
|
-
icon: /* @__PURE__ */ (0,
|
|
9325
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_phosphor_react20.Play, { size: 32, weight: "regular", className: "ml-1" }),
|
|
9193
9326
|
onClick: togglePlayPause,
|
|
9194
9327
|
"aria-label": "Play video",
|
|
9195
9328
|
className: "!bg-transparent !text-white !w-auto !h-auto hover:!bg-transparent hover:!text-gray-200"
|
|
@@ -9197,17 +9330,17 @@ var VideoPlayer = ({
|
|
|
9197
9330
|
)
|
|
9198
9331
|
}
|
|
9199
9332
|
),
|
|
9200
|
-
/* @__PURE__ */ (0,
|
|
9333
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9201
9334
|
"div",
|
|
9202
9335
|
{
|
|
9203
9336
|
className: cn(
|
|
9204
9337
|
"absolute top-0 left-0 right-0 p-4 bg-gradient-to-b from-black/70 to-transparent transition-opacity",
|
|
9205
9338
|
getTopControlsOpacity()
|
|
9206
9339
|
),
|
|
9207
|
-
children: /* @__PURE__ */ (0,
|
|
9340
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9208
9341
|
IconButton_default,
|
|
9209
9342
|
{
|
|
9210
|
-
icon: isFullscreen ? /* @__PURE__ */ (0,
|
|
9343
|
+
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
9344
|
onClick: toggleFullscreen,
|
|
9212
9345
|
"aria-label": isFullscreen ? "Exit fullscreen" : "Enter fullscreen",
|
|
9213
9346
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
@@ -9215,7 +9348,7 @@ var VideoPlayer = ({
|
|
|
9215
9348
|
) })
|
|
9216
9349
|
}
|
|
9217
9350
|
),
|
|
9218
|
-
/* @__PURE__ */ (0,
|
|
9351
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
9219
9352
|
"div",
|
|
9220
9353
|
{
|
|
9221
9354
|
className: cn(
|
|
@@ -9223,7 +9356,7 @@ var VideoPlayer = ({
|
|
|
9223
9356
|
getBottomControlsOpacity()
|
|
9224
9357
|
),
|
|
9225
9358
|
children: [
|
|
9226
|
-
/* @__PURE__ */ (0,
|
|
9359
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9227
9360
|
ProgressBar2,
|
|
9228
9361
|
{
|
|
9229
9362
|
currentTime,
|
|
@@ -9233,7 +9366,7 @@ var VideoPlayer = ({
|
|
|
9233
9366
|
className: getProgressBarPadding()
|
|
9234
9367
|
}
|
|
9235
9368
|
),
|
|
9236
|
-
/* @__PURE__ */ (0,
|
|
9369
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
9237
9370
|
"div",
|
|
9238
9371
|
{
|
|
9239
9372
|
className: cn(
|
|
@@ -9241,17 +9374,17 @@ var VideoPlayer = ({
|
|
|
9241
9374
|
getControlsPadding()
|
|
9242
9375
|
),
|
|
9243
9376
|
children: [
|
|
9244
|
-
/* @__PURE__ */ (0,
|
|
9245
|
-
/* @__PURE__ */ (0,
|
|
9377
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: cn("flex items-center", getControlsGap()), children: [
|
|
9378
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9246
9379
|
IconButton_default,
|
|
9247
9380
|
{
|
|
9248
|
-
icon: isPlaying ? /* @__PURE__ */ (0,
|
|
9381
|
+
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
9382
|
onClick: togglePlayPause,
|
|
9250
9383
|
"aria-label": isPlaying ? "Pause" : "Play",
|
|
9251
9384
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
9252
9385
|
}
|
|
9253
9386
|
),
|
|
9254
|
-
/* @__PURE__ */ (0,
|
|
9387
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9255
9388
|
VolumeControls,
|
|
9256
9389
|
{
|
|
9257
9390
|
volume,
|
|
@@ -9262,10 +9395,10 @@ var VideoPlayer = ({
|
|
|
9262
9395
|
showSlider: !isUltraSmallMobile
|
|
9263
9396
|
}
|
|
9264
9397
|
),
|
|
9265
|
-
groupedSubTitleValid && /* @__PURE__ */ (0,
|
|
9398
|
+
groupedSubTitleValid && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9266
9399
|
IconButton_default,
|
|
9267
9400
|
{
|
|
9268
|
-
icon: /* @__PURE__ */ (0,
|
|
9401
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_phosphor_react20.ClosedCaptioning, { size: getIconSize2() }),
|
|
9269
9402
|
onClick: toggleCaptions,
|
|
9270
9403
|
"aria-label": showCaptions ? "Hide captions" : "Show captions",
|
|
9271
9404
|
className: cn(
|
|
@@ -9274,13 +9407,13 @@ var VideoPlayer = ({
|
|
|
9274
9407
|
)
|
|
9275
9408
|
}
|
|
9276
9409
|
),
|
|
9277
|
-
/* @__PURE__ */ (0,
|
|
9410
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Text_default, { size: "sm", weight: "medium", color: "text-white", children: [
|
|
9278
9411
|
formatTime(currentTime),
|
|
9279
9412
|
" / ",
|
|
9280
9413
|
formatTime(duration)
|
|
9281
9414
|
] })
|
|
9282
9415
|
] }),
|
|
9283
|
-
/* @__PURE__ */ (0,
|
|
9416
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex items-center gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9284
9417
|
SpeedMenu,
|
|
9285
9418
|
{
|
|
9286
9419
|
showSpeedMenu,
|
|
@@ -9307,8 +9440,8 @@ var VideoPlayer_default = VideoPlayer;
|
|
|
9307
9440
|
|
|
9308
9441
|
// src/components/Whiteboard/Whiteboard.tsx
|
|
9309
9442
|
var import_react28 = require("react");
|
|
9310
|
-
var
|
|
9311
|
-
var
|
|
9443
|
+
var import_phosphor_react21 = require("phosphor-react");
|
|
9444
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
9312
9445
|
var IMAGE_WIDTH = 225;
|
|
9313
9446
|
var IMAGE_HEIGHT = 90;
|
|
9314
9447
|
var Whiteboard = ({
|
|
@@ -9346,7 +9479,7 @@ var Whiteboard = ({
|
|
|
9346
9479
|
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"
|
|
9347
9480
|
}[imagesPerRow];
|
|
9348
9481
|
if (!images || images.length === 0) {
|
|
9349
|
-
return /* @__PURE__ */ (0,
|
|
9482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9350
9483
|
"div",
|
|
9351
9484
|
{
|
|
9352
9485
|
className: cn(
|
|
@@ -9354,11 +9487,11 @@ var Whiteboard = ({
|
|
|
9354
9487
|
className
|
|
9355
9488
|
),
|
|
9356
9489
|
...rest,
|
|
9357
|
-
children: /* @__PURE__ */ (0,
|
|
9490
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-gray-400 text-sm", children: "Nenhuma imagem dispon\xEDvel" })
|
|
9358
9491
|
}
|
|
9359
9492
|
);
|
|
9360
9493
|
}
|
|
9361
|
-
return /* @__PURE__ */ (0,
|
|
9494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9362
9495
|
"div",
|
|
9363
9496
|
{
|
|
9364
9497
|
className: cn(
|
|
@@ -9366,7 +9499,7 @@ var Whiteboard = ({
|
|
|
9366
9499
|
className
|
|
9367
9500
|
),
|
|
9368
9501
|
...rest,
|
|
9369
|
-
children: /* @__PURE__ */ (0,
|
|
9502
|
+
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
9503
|
"div",
|
|
9371
9504
|
{
|
|
9372
9505
|
className: "relative group overflow-hidden bg-gray-100 rounded-lg",
|
|
@@ -9374,7 +9507,7 @@ var Whiteboard = ({
|
|
|
9374
9507
|
width: `${IMAGE_WIDTH}px`
|
|
9375
9508
|
},
|
|
9376
9509
|
children: [
|
|
9377
|
-
/* @__PURE__ */ (0,
|
|
9510
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9378
9511
|
"div",
|
|
9379
9512
|
{
|
|
9380
9513
|
className: "relative",
|
|
@@ -9382,8 +9515,8 @@ var Whiteboard = ({
|
|
|
9382
9515
|
width: `${IMAGE_WIDTH}px`,
|
|
9383
9516
|
height: `${IMAGE_HEIGHT}px`
|
|
9384
9517
|
},
|
|
9385
|
-
children: imageErrors.has(image.id) ? /* @__PURE__ */ (0,
|
|
9386
|
-
/* @__PURE__ */ (0,
|
|
9518
|
+
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: [
|
|
9519
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9387
9520
|
"img",
|
|
9388
9521
|
{
|
|
9389
9522
|
src: image.imageUrl,
|
|
@@ -9393,19 +9526,19 @@ var Whiteboard = ({
|
|
|
9393
9526
|
onError: () => handleImageError(image.id)
|
|
9394
9527
|
}
|
|
9395
9528
|
),
|
|
9396
|
-
/* @__PURE__ */ (0,
|
|
9529
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "absolute inset-0 bg-gradient-to-t from-black/20 to-transparent" })
|
|
9397
9530
|
] })
|
|
9398
9531
|
}
|
|
9399
9532
|
),
|
|
9400
|
-
showDownload && /* @__PURE__ */ (0,
|
|
9533
|
+
showDownload && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9401
9534
|
"button",
|
|
9402
9535
|
{
|
|
9403
9536
|
type: "button",
|
|
9404
9537
|
onClick: () => handleDownload(image),
|
|
9405
9538
|
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
9539
|
"aria-label": `Download ${image.title || "imagem"}`,
|
|
9407
|
-
children: /* @__PURE__ */ (0,
|
|
9408
|
-
|
|
9540
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9541
|
+
import_phosphor_react21.ArrowsOut,
|
|
9409
9542
|
{
|
|
9410
9543
|
size: 24,
|
|
9411
9544
|
weight: "regular",
|
|
@@ -9426,7 +9559,7 @@ var Whiteboard_default = Whiteboard;
|
|
|
9426
9559
|
// src/components/Auth/Auth.tsx
|
|
9427
9560
|
var import_react29 = require("react");
|
|
9428
9561
|
var import_react_router_dom = require("react-router-dom");
|
|
9429
|
-
var
|
|
9562
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
9430
9563
|
var AuthContext = (0, import_react29.createContext)(void 0);
|
|
9431
9564
|
var AuthProvider = ({
|
|
9432
9565
|
children,
|
|
@@ -9496,7 +9629,7 @@ var AuthProvider = ({
|
|
|
9496
9629
|
}),
|
|
9497
9630
|
[authState, checkAuth, signOut]
|
|
9498
9631
|
);
|
|
9499
|
-
return /* @__PURE__ */ (0,
|
|
9632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(AuthContext.Provider, { value: contextValue, children });
|
|
9500
9633
|
};
|
|
9501
9634
|
var useAuth = () => {
|
|
9502
9635
|
const context = (0, import_react29.useContext)(AuthContext);
|
|
@@ -9512,9 +9645,9 @@ var ProtectedRoute = ({
|
|
|
9512
9645
|
additionalCheck
|
|
9513
9646
|
}) => {
|
|
9514
9647
|
const { isAuthenticated, isLoading, ...authState } = useAuth();
|
|
9515
|
-
const defaultLoadingComponent = /* @__PURE__ */ (0,
|
|
9648
|
+
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
9649
|
if (isLoading) {
|
|
9517
|
-
return /* @__PURE__ */ (0,
|
|
9650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children: loadingComponent || defaultLoadingComponent });
|
|
9518
9651
|
}
|
|
9519
9652
|
if (!isAuthenticated) {
|
|
9520
9653
|
if (typeof window !== "undefined") {
|
|
@@ -9525,12 +9658,12 @@ var ProtectedRoute = ({
|
|
|
9525
9658
|
return null;
|
|
9526
9659
|
}
|
|
9527
9660
|
}
|
|
9528
|
-
return /* @__PURE__ */ (0,
|
|
9661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_router_dom.Navigate, { to: redirectTo, replace: true });
|
|
9529
9662
|
}
|
|
9530
9663
|
if (additionalCheck && !additionalCheck({ isAuthenticated, isLoading, ...authState })) {
|
|
9531
|
-
return /* @__PURE__ */ (0,
|
|
9664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_router_dom.Navigate, { to: redirectTo, replace: true });
|
|
9532
9665
|
}
|
|
9533
|
-
return /* @__PURE__ */ (0,
|
|
9666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children });
|
|
9534
9667
|
};
|
|
9535
9668
|
var PublicRoute = ({
|
|
9536
9669
|
children,
|
|
@@ -9540,15 +9673,15 @@ var PublicRoute = ({
|
|
|
9540
9673
|
}) => {
|
|
9541
9674
|
const { isAuthenticated, isLoading } = useAuth();
|
|
9542
9675
|
if (checkAuthBeforeRender && isLoading) {
|
|
9543
|
-
return /* @__PURE__ */ (0,
|
|
9676
|
+
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
9677
|
}
|
|
9545
9678
|
if (isAuthenticated && redirectIfAuthenticated) {
|
|
9546
|
-
return /* @__PURE__ */ (0,
|
|
9679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_router_dom.Navigate, { to: redirectTo, replace: true });
|
|
9547
9680
|
}
|
|
9548
|
-
return /* @__PURE__ */ (0,
|
|
9681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children });
|
|
9549
9682
|
};
|
|
9550
9683
|
var withAuth = (Component, options = {}) => {
|
|
9551
|
-
return (props) => /* @__PURE__ */ (0,
|
|
9684
|
+
return (props) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ProtectedRoute, { ...options, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Component, { ...props }) });
|
|
9552
9685
|
};
|
|
9553
9686
|
var useAuthGuard = (options = {}) => {
|
|
9554
9687
|
const authState = useAuth();
|
|
@@ -9563,7 +9696,7 @@ var useAuthGuard = (options = {}) => {
|
|
|
9563
9696
|
var useRouteAuth = (fallbackPath = "/") => {
|
|
9564
9697
|
const { isAuthenticated, isLoading } = useAuth();
|
|
9565
9698
|
const location = (0, import_react_router_dom.useLocation)();
|
|
9566
|
-
const redirectToLogin = () => /* @__PURE__ */ (0,
|
|
9699
|
+
const redirectToLogin = () => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_router_dom.Navigate, { to: fallbackPath, state: { from: location }, replace: true });
|
|
9567
9700
|
return {
|
|
9568
9701
|
isAuthenticated,
|
|
9569
9702
|
isLoading,
|
|
@@ -9598,8 +9731,8 @@ var getRootDomain = () => {
|
|
|
9598
9731
|
|
|
9599
9732
|
// src/components/Accordation/Accordation.tsx
|
|
9600
9733
|
var import_react30 = require("react");
|
|
9601
|
-
var
|
|
9602
|
-
var
|
|
9734
|
+
var import_phosphor_react22 = require("phosphor-react");
|
|
9735
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
9603
9736
|
var CardAccordation = (0, import_react30.forwardRef)(
|
|
9604
9737
|
({
|
|
9605
9738
|
trigger,
|
|
@@ -9622,7 +9755,7 @@ var CardAccordation = (0, import_react30.forwardRef)(
|
|
|
9622
9755
|
handleToggle();
|
|
9623
9756
|
}
|
|
9624
9757
|
};
|
|
9625
|
-
return /* @__PURE__ */ (0,
|
|
9758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
9626
9759
|
CardBase,
|
|
9627
9760
|
{
|
|
9628
9761
|
ref,
|
|
@@ -9632,7 +9765,7 @@ var CardAccordation = (0, import_react30.forwardRef)(
|
|
|
9632
9765
|
className: cn("overflow-hidden", className),
|
|
9633
9766
|
...props,
|
|
9634
9767
|
children: [
|
|
9635
|
-
/* @__PURE__ */ (0,
|
|
9768
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
9636
9769
|
"button",
|
|
9637
9770
|
{
|
|
9638
9771
|
onClick: handleToggle,
|
|
@@ -9642,8 +9775,8 @@ var CardAccordation = (0, import_react30.forwardRef)(
|
|
|
9642
9775
|
"aria-controls": "accordion-content",
|
|
9643
9776
|
children: [
|
|
9644
9777
|
trigger,
|
|
9645
|
-
/* @__PURE__ */ (0,
|
|
9646
|
-
|
|
9778
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
9779
|
+
import_phosphor_react22.CaretRight,
|
|
9647
9780
|
{
|
|
9648
9781
|
size: 20,
|
|
9649
9782
|
className: cn(
|
|
@@ -9656,7 +9789,7 @@ var CardAccordation = (0, import_react30.forwardRef)(
|
|
|
9656
9789
|
]
|
|
9657
9790
|
}
|
|
9658
9791
|
),
|
|
9659
|
-
/* @__PURE__ */ (0,
|
|
9792
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
9660
9793
|
"div",
|
|
9661
9794
|
{
|
|
9662
9795
|
id: contentId,
|
|
@@ -9665,7 +9798,7 @@ var CardAccordation = (0, import_react30.forwardRef)(
|
|
|
9665
9798
|
isExpanded ? "max-h-screen opacity-100" : "max-h-0 opacity-0"
|
|
9666
9799
|
),
|
|
9667
9800
|
"data-testid": "accordion-content",
|
|
9668
|
-
children: /* @__PURE__ */ (0,
|
|
9801
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "p-4 pt-0 border-border-50", children })
|
|
9669
9802
|
}
|
|
9670
9803
|
)
|
|
9671
9804
|
]
|
|
@@ -9675,9 +9808,9 @@ var CardAccordation = (0, import_react30.forwardRef)(
|
|
|
9675
9808
|
);
|
|
9676
9809
|
|
|
9677
9810
|
// src/components/Alternative/Alternative.tsx
|
|
9678
|
-
var
|
|
9811
|
+
var import_phosphor_react23 = require("phosphor-react");
|
|
9679
9812
|
var import_react31 = require("react");
|
|
9680
|
-
var
|
|
9813
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
9681
9814
|
var AlternativesList = ({
|
|
9682
9815
|
alternatives,
|
|
9683
9816
|
name,
|
|
@@ -9708,9 +9841,9 @@ var AlternativesList = ({
|
|
|
9708
9841
|
const getStatusBadge2 = (status) => {
|
|
9709
9842
|
switch (status) {
|
|
9710
9843
|
case "correct":
|
|
9711
|
-
return /* @__PURE__ */ (0,
|
|
9844
|
+
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
9845
|
case "incorrect":
|
|
9713
|
-
return /* @__PURE__ */ (0,
|
|
9846
|
+
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
9847
|
default:
|
|
9715
9848
|
return null;
|
|
9716
9849
|
}
|
|
@@ -9740,10 +9873,10 @@ var AlternativesList = ({
|
|
|
9740
9873
|
const renderRadio = () => {
|
|
9741
9874
|
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
9875
|
const dotClasses = "w-3 h-3 rounded-full bg-primary-950 transition-all duration-200";
|
|
9743
|
-
return /* @__PURE__ */ (0,
|
|
9876
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: radioClasses, children: isUserSelected && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: dotClasses }) });
|
|
9744
9877
|
};
|
|
9745
9878
|
if (layout === "detailed") {
|
|
9746
|
-
return /* @__PURE__ */ (0,
|
|
9879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9747
9880
|
"div",
|
|
9748
9881
|
{
|
|
9749
9882
|
className: cn(
|
|
@@ -9751,11 +9884,11 @@ var AlternativesList = ({
|
|
|
9751
9884
|
statusStyles,
|
|
9752
9885
|
alternative.disabled ? "opacity-50" : ""
|
|
9753
9886
|
),
|
|
9754
|
-
children: /* @__PURE__ */ (0,
|
|
9755
|
-
/* @__PURE__ */ (0,
|
|
9756
|
-
/* @__PURE__ */ (0,
|
|
9757
|
-
/* @__PURE__ */ (0,
|
|
9758
|
-
/* @__PURE__ */ (0,
|
|
9887
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
9888
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
9889
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mt-1", children: renderRadio() }),
|
|
9890
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex-1", children: [
|
|
9891
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9759
9892
|
"p",
|
|
9760
9893
|
{
|
|
9761
9894
|
className: cn(
|
|
@@ -9765,16 +9898,16 @@ var AlternativesList = ({
|
|
|
9765
9898
|
children: alternative.label
|
|
9766
9899
|
}
|
|
9767
9900
|
),
|
|
9768
|
-
alternative.description && /* @__PURE__ */ (0,
|
|
9901
|
+
alternative.description && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
|
|
9769
9902
|
] })
|
|
9770
9903
|
] }),
|
|
9771
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
9904
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
9772
9905
|
] })
|
|
9773
9906
|
},
|
|
9774
9907
|
alternativeId
|
|
9775
9908
|
);
|
|
9776
9909
|
}
|
|
9777
|
-
return /* @__PURE__ */ (0,
|
|
9910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
9778
9911
|
"div",
|
|
9779
9912
|
{
|
|
9780
9913
|
className: cn(
|
|
@@ -9783,9 +9916,9 @@ var AlternativesList = ({
|
|
|
9783
9916
|
alternative.disabled ? "opacity-50" : ""
|
|
9784
9917
|
),
|
|
9785
9918
|
children: [
|
|
9786
|
-
/* @__PURE__ */ (0,
|
|
9919
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
9787
9920
|
renderRadio(),
|
|
9788
|
-
/* @__PURE__ */ (0,
|
|
9921
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9789
9922
|
"span",
|
|
9790
9923
|
{
|
|
9791
9924
|
className: cn(
|
|
@@ -9796,14 +9929,14 @@ var AlternativesList = ({
|
|
|
9796
9929
|
}
|
|
9797
9930
|
)
|
|
9798
9931
|
] }),
|
|
9799
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
9932
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
9800
9933
|
]
|
|
9801
9934
|
},
|
|
9802
9935
|
alternativeId
|
|
9803
9936
|
);
|
|
9804
9937
|
};
|
|
9805
9938
|
if (isReadonly) {
|
|
9806
|
-
return /* @__PURE__ */ (0,
|
|
9939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9807
9940
|
"div",
|
|
9808
9941
|
{
|
|
9809
9942
|
className: cn("flex flex-col", getLayoutClasses(), "w-full", className),
|
|
@@ -9813,7 +9946,7 @@ var AlternativesList = ({
|
|
|
9813
9946
|
}
|
|
9814
9947
|
);
|
|
9815
9948
|
}
|
|
9816
|
-
return /* @__PURE__ */ (0,
|
|
9949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9817
9950
|
RadioGroup,
|
|
9818
9951
|
{
|
|
9819
9952
|
name: groupName,
|
|
@@ -9830,7 +9963,7 @@ var AlternativesList = ({
|
|
|
9830
9963
|
const statusStyles = getStatusStyles2(alternative.status, false);
|
|
9831
9964
|
const statusBadge = getStatusBadge2(alternative.status);
|
|
9832
9965
|
if (layout === "detailed") {
|
|
9833
|
-
return /* @__PURE__ */ (0,
|
|
9966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9834
9967
|
"div",
|
|
9835
9968
|
{
|
|
9836
9969
|
className: cn(
|
|
@@ -9838,9 +9971,9 @@ var AlternativesList = ({
|
|
|
9838
9971
|
statusStyles,
|
|
9839
9972
|
alternative.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
9840
9973
|
),
|
|
9841
|
-
children: /* @__PURE__ */ (0,
|
|
9842
|
-
/* @__PURE__ */ (0,
|
|
9843
|
-
/* @__PURE__ */ (0,
|
|
9974
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
9975
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
9976
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9844
9977
|
RadioGroupItem,
|
|
9845
9978
|
{
|
|
9846
9979
|
value: alternative.value,
|
|
@@ -9849,8 +9982,8 @@ var AlternativesList = ({
|
|
|
9849
9982
|
className: "mt-1"
|
|
9850
9983
|
}
|
|
9851
9984
|
),
|
|
9852
|
-
/* @__PURE__ */ (0,
|
|
9853
|
-
/* @__PURE__ */ (0,
|
|
9985
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex-1", children: [
|
|
9986
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9854
9987
|
"label",
|
|
9855
9988
|
{
|
|
9856
9989
|
htmlFor: alternativeId,
|
|
@@ -9862,16 +9995,16 @@ var AlternativesList = ({
|
|
|
9862
9995
|
children: alternative.label
|
|
9863
9996
|
}
|
|
9864
9997
|
),
|
|
9865
|
-
alternative.description && /* @__PURE__ */ (0,
|
|
9998
|
+
alternative.description && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
|
|
9866
9999
|
] })
|
|
9867
10000
|
] }),
|
|
9868
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
10001
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
9869
10002
|
] })
|
|
9870
10003
|
},
|
|
9871
10004
|
alternativeId
|
|
9872
10005
|
);
|
|
9873
10006
|
}
|
|
9874
|
-
return /* @__PURE__ */ (0,
|
|
10007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
9875
10008
|
"div",
|
|
9876
10009
|
{
|
|
9877
10010
|
className: cn(
|
|
@@ -9880,8 +10013,8 @@ var AlternativesList = ({
|
|
|
9880
10013
|
alternative.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
9881
10014
|
),
|
|
9882
10015
|
children: [
|
|
9883
|
-
/* @__PURE__ */ (0,
|
|
9884
|
-
/* @__PURE__ */ (0,
|
|
10016
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
10017
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9885
10018
|
RadioGroupItem,
|
|
9886
10019
|
{
|
|
9887
10020
|
value: alternative.value,
|
|
@@ -9889,7 +10022,7 @@ var AlternativesList = ({
|
|
|
9889
10022
|
disabled: alternative.disabled
|
|
9890
10023
|
}
|
|
9891
10024
|
),
|
|
9892
|
-
/* @__PURE__ */ (0,
|
|
10025
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9893
10026
|
"label",
|
|
9894
10027
|
{
|
|
9895
10028
|
htmlFor: alternativeId,
|
|
@@ -9902,7 +10035,7 @@ var AlternativesList = ({
|
|
|
9902
10035
|
}
|
|
9903
10036
|
)
|
|
9904
10037
|
] }),
|
|
9905
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
10038
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
9906
10039
|
]
|
|
9907
10040
|
},
|
|
9908
10041
|
alternativeId
|
|
@@ -9913,7 +10046,7 @@ var AlternativesList = ({
|
|
|
9913
10046
|
};
|
|
9914
10047
|
var HeaderAlternative = (0, import_react31.forwardRef)(
|
|
9915
10048
|
({ className, title, subTitle, content, ...props }, ref) => {
|
|
9916
|
-
return /* @__PURE__ */ (0,
|
|
10049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
9917
10050
|
"div",
|
|
9918
10051
|
{
|
|
9919
10052
|
ref,
|
|
@@ -9923,11 +10056,11 @@ var HeaderAlternative = (0, import_react31.forwardRef)(
|
|
|
9923
10056
|
),
|
|
9924
10057
|
...props,
|
|
9925
10058
|
children: [
|
|
9926
|
-
/* @__PURE__ */ (0,
|
|
9927
|
-
/* @__PURE__ */ (0,
|
|
9928
|
-
/* @__PURE__ */ (0,
|
|
10059
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: "flex flex-col", children: [
|
|
10060
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-text-950 font-bold text-lg", children: title }),
|
|
10061
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-text-700 text-sm ", children: subTitle })
|
|
9929
10062
|
] }),
|
|
9930
|
-
/* @__PURE__ */ (0,
|
|
10063
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-text-950 text-md", children: content })
|
|
9931
10064
|
]
|
|
9932
10065
|
}
|
|
9933
10066
|
);
|
|
@@ -10108,7 +10241,7 @@ function useApiConfig(api) {
|
|
|
10108
10241
|
}
|
|
10109
10242
|
|
|
10110
10243
|
// src/components/Quiz/Quiz.tsx
|
|
10111
|
-
var
|
|
10244
|
+
var import_phosphor_react26 = require("phosphor-react");
|
|
10112
10245
|
var import_react36 = require("react");
|
|
10113
10246
|
|
|
10114
10247
|
// src/components/Quiz/useQuizStore.ts
|
|
@@ -10706,8 +10839,8 @@ var import_react35 = require("react");
|
|
|
10706
10839
|
|
|
10707
10840
|
// src/components/MultipleChoice/MultipleChoice.tsx
|
|
10708
10841
|
var import_react34 = require("react");
|
|
10709
|
-
var
|
|
10710
|
-
var
|
|
10842
|
+
var import_phosphor_react24 = require("phosphor-react");
|
|
10843
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
10711
10844
|
var MultipleChoiceList = ({
|
|
10712
10845
|
disabled = false,
|
|
10713
10846
|
className = "",
|
|
@@ -10724,9 +10857,9 @@ var MultipleChoiceList = ({
|
|
|
10724
10857
|
const getStatusBadge2 = (status) => {
|
|
10725
10858
|
switch (status) {
|
|
10726
10859
|
case "correct":
|
|
10727
|
-
return /* @__PURE__ */ (0,
|
|
10860
|
+
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
10861
|
case "incorrect":
|
|
10729
|
-
return /* @__PURE__ */ (0,
|
|
10862
|
+
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
10863
|
default:
|
|
10731
10864
|
return null;
|
|
10732
10865
|
}
|
|
@@ -10747,14 +10880,14 @@ var MultipleChoiceList = ({
|
|
|
10747
10880
|
isSelected ? "border-primary-950 bg-primary-950 text-text" : "border-border-400 bg-background",
|
|
10748
10881
|
isDisabled && "opacity-40 cursor-not-allowed"
|
|
10749
10882
|
);
|
|
10750
|
-
return /* @__PURE__ */ (0,
|
|
10883
|
+
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
10884
|
};
|
|
10752
10885
|
if (mode === "readonly") {
|
|
10753
|
-
return /* @__PURE__ */ (0,
|
|
10886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: cn("flex flex-col gap-2", className), children: choices.map((choice, i) => {
|
|
10754
10887
|
const isSelected = actualValue?.includes(choice.value) || false;
|
|
10755
10888
|
const statusStyles = getStatusStyles2(choice.status);
|
|
10756
10889
|
const statusBadge = getStatusBadge2(choice.status);
|
|
10757
|
-
return /* @__PURE__ */ (0,
|
|
10890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
10758
10891
|
"div",
|
|
10759
10892
|
{
|
|
10760
10893
|
className: cn(
|
|
@@ -10763,9 +10896,9 @@ var MultipleChoiceList = ({
|
|
|
10763
10896
|
choice.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
10764
10897
|
),
|
|
10765
10898
|
children: [
|
|
10766
|
-
/* @__PURE__ */ (0,
|
|
10899
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
10767
10900
|
renderVisualCheckbox(isSelected, choice.disabled || disabled),
|
|
10768
|
-
/* @__PURE__ */ (0,
|
|
10901
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
10769
10902
|
"span",
|
|
10770
10903
|
{
|
|
10771
10904
|
className: cn(
|
|
@@ -10777,14 +10910,14 @@ var MultipleChoiceList = ({
|
|
|
10777
10910
|
}
|
|
10778
10911
|
)
|
|
10779
10912
|
] }),
|
|
10780
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
10913
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
10781
10914
|
]
|
|
10782
10915
|
},
|
|
10783
10916
|
`readonly-${choice.value}-${i}`
|
|
10784
10917
|
);
|
|
10785
10918
|
}) });
|
|
10786
10919
|
}
|
|
10787
|
-
return /* @__PURE__ */ (0,
|
|
10920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
10788
10921
|
"div",
|
|
10789
10922
|
{
|
|
10790
10923
|
className: cn(
|
|
@@ -10792,7 +10925,7 @@ var MultipleChoiceList = ({
|
|
|
10792
10925
|
disabled ? "opacity-50 cursor-not-allowed" : "",
|
|
10793
10926
|
className
|
|
10794
10927
|
),
|
|
10795
|
-
children: /* @__PURE__ */ (0,
|
|
10928
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
10796
10929
|
CheckboxList_default,
|
|
10797
10930
|
{
|
|
10798
10931
|
name,
|
|
@@ -10802,12 +10935,12 @@ var MultipleChoiceList = ({
|
|
|
10802
10935
|
onHandleSelectedValues?.(v);
|
|
10803
10936
|
},
|
|
10804
10937
|
disabled,
|
|
10805
|
-
children: choices.map((choice, i) => /* @__PURE__ */ (0,
|
|
10938
|
+
children: choices.map((choice, i) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
10806
10939
|
"div",
|
|
10807
10940
|
{
|
|
10808
10941
|
className: "flex flex-row gap-2 items-center",
|
|
10809
10942
|
children: [
|
|
10810
|
-
/* @__PURE__ */ (0,
|
|
10943
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
10811
10944
|
CheckboxListItem,
|
|
10812
10945
|
{
|
|
10813
10946
|
value: choice.value,
|
|
@@ -10815,7 +10948,7 @@ var MultipleChoiceList = ({
|
|
|
10815
10948
|
disabled: choice.disabled || disabled
|
|
10816
10949
|
}
|
|
10817
10950
|
),
|
|
10818
|
-
/* @__PURE__ */ (0,
|
|
10951
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
10819
10952
|
"label",
|
|
10820
10953
|
{
|
|
10821
10954
|
htmlFor: `interactive-${choice.value}-${i}`,
|
|
@@ -10838,19 +10971,19 @@ var MultipleChoiceList = ({
|
|
|
10838
10971
|
};
|
|
10839
10972
|
|
|
10840
10973
|
// src/components/Quiz/QuizContent.tsx
|
|
10841
|
-
var
|
|
10974
|
+
var import_phosphor_react25 = require("phosphor-react");
|
|
10842
10975
|
|
|
10843
10976
|
// src/assets/img/mock-image-question.png
|
|
10844
10977
|
var mock_image_question_default = "./mock-image-question-HEZCLFDL.png";
|
|
10845
10978
|
|
|
10846
10979
|
// src/components/Quiz/QuizContent.tsx
|
|
10847
|
-
var
|
|
10980
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
10848
10981
|
var getStatusBadge = (status) => {
|
|
10849
10982
|
switch (status) {
|
|
10850
10983
|
case "correct":
|
|
10851
|
-
return /* @__PURE__ */ (0,
|
|
10984
|
+
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
10985
|
case "incorrect":
|
|
10853
|
-
return /* @__PURE__ */ (0,
|
|
10986
|
+
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
10987
|
default:
|
|
10855
10988
|
return null;
|
|
10856
10989
|
}
|
|
@@ -10865,11 +10998,11 @@ var getStatusStyles = (variantCorrect) => {
|
|
|
10865
10998
|
};
|
|
10866
10999
|
var QuizSubTitle = (0, import_react35.forwardRef)(
|
|
10867
11000
|
({ subTitle, ...props }, ref) => {
|
|
10868
|
-
return /* @__PURE__ */ (0,
|
|
11001
|
+
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
11002
|
}
|
|
10870
11003
|
);
|
|
10871
11004
|
var QuizContainer = (0, import_react35.forwardRef)(({ children, className, ...props }, ref) => {
|
|
10872
|
-
return /* @__PURE__ */ (0,
|
|
11005
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
10873
11006
|
"div",
|
|
10874
11007
|
{
|
|
10875
11008
|
ref,
|
|
@@ -10917,10 +11050,10 @@ var QuizAlternative = ({ paddingBottom }) => {
|
|
|
10917
11050
|
};
|
|
10918
11051
|
});
|
|
10919
11052
|
if (!alternatives)
|
|
10920
|
-
return /* @__PURE__ */ (0,
|
|
10921
|
-
return /* @__PURE__ */ (0,
|
|
10922
|
-
/* @__PURE__ */ (0,
|
|
10923
|
-
/* @__PURE__ */ (0,
|
|
11053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { children: "N\xE3o h\xE1 Alternativas" }) });
|
|
11054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11055
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
11056
|
+
/* @__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
11057
|
AlternativesList,
|
|
10925
11058
|
{
|
|
10926
11059
|
mode: variant === "default" ? "interactive" : "readonly",
|
|
@@ -11018,10 +11151,10 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
|
|
|
11018
11151
|
};
|
|
11019
11152
|
});
|
|
11020
11153
|
if (!choices)
|
|
11021
|
-
return /* @__PURE__ */ (0,
|
|
11022
|
-
return /* @__PURE__ */ (0,
|
|
11023
|
-
/* @__PURE__ */ (0,
|
|
11024
|
-
/* @__PURE__ */ (0,
|
|
11154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { children: "N\xE3o h\xE1 Escolhas Multiplas" }) });
|
|
11155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11156
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
11157
|
+
/* @__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
11158
|
MultipleChoiceList,
|
|
11026
11159
|
{
|
|
11027
11160
|
choices,
|
|
@@ -11067,12 +11200,12 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
11067
11200
|
adjustTextareaHeight();
|
|
11068
11201
|
}, [currentAnswer, adjustTextareaHeight]);
|
|
11069
11202
|
if (!currentQuestion) {
|
|
11070
|
-
return /* @__PURE__ */ (0,
|
|
11203
|
+
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
11204
|
}
|
|
11072
11205
|
const localAnswer = (variant == "result" ? currentQuestionResult?.answer : currentAnswer?.answer) || "";
|
|
11073
|
-
return /* @__PURE__ */ (0,
|
|
11074
|
-
/* @__PURE__ */ (0,
|
|
11075
|
-
/* @__PURE__ */ (0,
|
|
11206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11207
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Resposta" }),
|
|
11208
|
+
/* @__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
11209
|
TextArea_default,
|
|
11077
11210
|
{
|
|
11078
11211
|
ref: textareaRef,
|
|
@@ -11082,10 +11215,10 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
11082
11215
|
rows: 4,
|
|
11083
11216
|
className: "min-h-[120px] max-h-[400px] resize-none overflow-y-auto"
|
|
11084
11217
|
}
|
|
11085
|
-
) }) : /* @__PURE__ */ (0,
|
|
11086
|
-
variant === "result" && currentQuestionResult?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */ (0,
|
|
11087
|
-
/* @__PURE__ */ (0,
|
|
11088
|
-
/* @__PURE__ */ (0,
|
|
11218
|
+
) }) : /* @__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" }) }) }) }),
|
|
11219
|
+
variant === "result" && currentQuestionResult?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11220
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Observa\xE7\xE3o do professor" }),
|
|
11221
|
+
/* @__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
11222
|
] })
|
|
11090
11223
|
] });
|
|
11091
11224
|
};
|
|
@@ -11111,16 +11244,16 @@ var QuizTrueOrFalse = ({ paddingBottom }) => {
|
|
|
11111
11244
|
];
|
|
11112
11245
|
const getLetterByIndex = (index) => String.fromCharCode(97 + index);
|
|
11113
11246
|
const isDefaultVariant = variant == "default";
|
|
11114
|
-
return /* @__PURE__ */ (0,
|
|
11115
|
-
/* @__PURE__ */ (0,
|
|
11116
|
-
/* @__PURE__ */ (0,
|
|
11247
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11248
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
11249
|
+
/* @__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
11250
|
const variantCorrect = option.isCorrect ? "correct" : "incorrect";
|
|
11118
|
-
return /* @__PURE__ */ (0,
|
|
11251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11119
11252
|
"section",
|
|
11120
11253
|
{
|
|
11121
11254
|
className: "flex flex-col gap-2",
|
|
11122
11255
|
children: [
|
|
11123
|
-
/* @__PURE__ */ (0,
|
|
11256
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11124
11257
|
"div",
|
|
11125
11258
|
{
|
|
11126
11259
|
className: cn(
|
|
@@ -11128,20 +11261,20 @@ var QuizTrueOrFalse = ({ paddingBottom }) => {
|
|
|
11128
11261
|
!isDefaultVariant ? getStatusStyles(variantCorrect) : ""
|
|
11129
11262
|
),
|
|
11130
11263
|
children: [
|
|
11131
|
-
/* @__PURE__ */ (0,
|
|
11132
|
-
isDefaultVariant ? /* @__PURE__ */ (0,
|
|
11133
|
-
/* @__PURE__ */ (0,
|
|
11134
|
-
/* @__PURE__ */ (0,
|
|
11135
|
-
/* @__PURE__ */ (0,
|
|
11136
|
-
/* @__PURE__ */ (0,
|
|
11264
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index).concat(") ").concat(option.label) }),
|
|
11265
|
+
isDefaultVariant ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Select_default, { size: "medium", children: [
|
|
11266
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectValue, { placeholder: "Selecione opc\xE3o" }) }),
|
|
11267
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(SelectContent, { children: [
|
|
11268
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectItem, { value: "V", children: "Verdadeiro" }),
|
|
11269
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectItem, { value: "F", children: "Falso" })
|
|
11137
11270
|
] })
|
|
11138
|
-
] }) : /* @__PURE__ */ (0,
|
|
11271
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex-shrink-0", children: getStatusBadge(variantCorrect) })
|
|
11139
11272
|
]
|
|
11140
11273
|
}
|
|
11141
11274
|
),
|
|
11142
|
-
!isDefaultVariant && /* @__PURE__ */ (0,
|
|
11143
|
-
/* @__PURE__ */ (0,
|
|
11144
|
-
!option.isCorrect && /* @__PURE__ */ (0,
|
|
11275
|
+
!isDefaultVariant && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
11276
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-800 text-2xs", children: "Resposta selecionada: V" }),
|
|
11277
|
+
!option.isCorrect && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-800 text-2xs", children: "Resposta correta: F" })
|
|
11145
11278
|
] })
|
|
11146
11279
|
]
|
|
11147
11280
|
},
|
|
@@ -11231,13 +11364,13 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
11231
11364
|
const assignedDots = new Set(
|
|
11232
11365
|
userAnswers.map((a) => a.dotOption).filter(Boolean)
|
|
11233
11366
|
);
|
|
11234
|
-
return /* @__PURE__ */ (0,
|
|
11235
|
-
/* @__PURE__ */ (0,
|
|
11236
|
-
/* @__PURE__ */ (0,
|
|
11367
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11368
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
11369
|
+
/* @__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
11370
|
const answer = userAnswers[index];
|
|
11238
11371
|
const variantCorrect = answer.isCorrect ? "correct" : "incorrect";
|
|
11239
|
-
return /* @__PURE__ */ (0,
|
|
11240
|
-
/* @__PURE__ */ (0,
|
|
11372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("section", { className: "flex flex-col gap-2", children: [
|
|
11373
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11241
11374
|
"div",
|
|
11242
11375
|
{
|
|
11243
11376
|
className: cn(
|
|
@@ -11245,30 +11378,30 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
11245
11378
|
!isDefaultVariant ? getStatusStyles(variantCorrect) : ""
|
|
11246
11379
|
),
|
|
11247
11380
|
children: [
|
|
11248
|
-
/* @__PURE__ */ (0,
|
|
11249
|
-
isDefaultVariant ? /* @__PURE__ */ (0,
|
|
11381
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index) + ") " + option.label }),
|
|
11382
|
+
isDefaultVariant ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11250
11383
|
Select_default,
|
|
11251
11384
|
{
|
|
11252
11385
|
size: "medium",
|
|
11253
11386
|
value: answer.dotOption || void 0,
|
|
11254
11387
|
onValueChange: (value) => handleSelectDot(index, value),
|
|
11255
11388
|
children: [
|
|
11256
|
-
/* @__PURE__ */ (0,
|
|
11257
|
-
/* @__PURE__ */ (0,
|
|
11389
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectValue, { placeholder: "Selecione op\xE7\xE3o" }) }),
|
|
11390
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectContent, { children: dotsOptions.filter(
|
|
11258
11391
|
(dot) => !assignedDots.has(dot.label) || answer.dotOption === dot.label
|
|
11259
|
-
).map((dot) => /* @__PURE__ */ (0,
|
|
11392
|
+
).map((dot) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectItem, { value: dot.label, children: dot.label }, dot.label)) })
|
|
11260
11393
|
]
|
|
11261
11394
|
}
|
|
11262
|
-
) : /* @__PURE__ */ (0,
|
|
11395
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex-shrink-0", children: answer.isCorrect === null ? null : getStatusBadge(variantCorrect) })
|
|
11263
11396
|
]
|
|
11264
11397
|
}
|
|
11265
11398
|
),
|
|
11266
|
-
!isDefaultVariant && /* @__PURE__ */ (0,
|
|
11267
|
-
/* @__PURE__ */ (0,
|
|
11399
|
+
!isDefaultVariant && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
11400
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("p", { className: "text-text-800 text-2xs", children: [
|
|
11268
11401
|
"Resposta selecionada: ",
|
|
11269
11402
|
answer.dotOption || "Nenhuma"
|
|
11270
11403
|
] }),
|
|
11271
|
-
!answer.isCorrect && /* @__PURE__ */ (0,
|
|
11404
|
+
!answer.isCorrect && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("p", { className: "text-text-800 text-2xs", children: [
|
|
11272
11405
|
"Resposta correta: ",
|
|
11273
11406
|
answer.correctOption
|
|
11274
11407
|
] })
|
|
@@ -11335,18 +11468,18 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
11335
11468
|
const mockAnswer = mockUserAnswers.find(
|
|
11336
11469
|
(answer) => answer.selectId === selectId
|
|
11337
11470
|
);
|
|
11338
|
-
return /* @__PURE__ */ (0,
|
|
11471
|
+
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
11472
|
};
|
|
11340
11473
|
const renderDefaultElement = (selectId, startIndex, selectedValue, availableOptionsForThisSelect) => {
|
|
11341
|
-
return /* @__PURE__ */ (0,
|
|
11474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11342
11475
|
Select_default,
|
|
11343
11476
|
{
|
|
11344
11477
|
value: selectedValue,
|
|
11345
11478
|
onValueChange: (value) => handleSelectChange(selectId, value),
|
|
11346
11479
|
className: "inline-flex mb-2.5",
|
|
11347
11480
|
children: [
|
|
11348
|
-
/* @__PURE__ */ (0,
|
|
11349
|
-
/* @__PURE__ */ (0,
|
|
11481
|
+
/* @__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" }) }),
|
|
11482
|
+
/* @__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
11483
|
]
|
|
11351
11484
|
},
|
|
11352
11485
|
`${selectId}-${startIndex}`
|
|
@@ -11358,8 +11491,8 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
11358
11491
|
);
|
|
11359
11492
|
if (!mockAnswer) return null;
|
|
11360
11493
|
const action = mockAnswer.isCorrect ? "success" : "error";
|
|
11361
|
-
const icon = mockAnswer.isCorrect ? /* @__PURE__ */ (0,
|
|
11362
|
-
return /* @__PURE__ */ (0,
|
|
11494
|
+
const icon = mockAnswer.isCorrect ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_phosphor_react25.CheckCircle, {}) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_phosphor_react25.XCircle, {});
|
|
11495
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11363
11496
|
Badge_default,
|
|
11364
11497
|
{
|
|
11365
11498
|
variant: "solid",
|
|
@@ -11367,7 +11500,7 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
11367
11500
|
iconRight: icon,
|
|
11368
11501
|
size: "large",
|
|
11369
11502
|
className: "py-3 w-[180px] justify-between mb-2.5",
|
|
11370
|
-
children: /* @__PURE__ */ (0,
|
|
11503
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-text-900", children: mockAnswer.userAnswer })
|
|
11371
11504
|
},
|
|
11372
11505
|
selectId
|
|
11373
11506
|
);
|
|
@@ -11423,25 +11556,25 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
11423
11556
|
}
|
|
11424
11557
|
return elements;
|
|
11425
11558
|
};
|
|
11426
|
-
return /* @__PURE__ */ (0,
|
|
11427
|
-
/* @__PURE__ */ (0,
|
|
11428
|
-
/* @__PURE__ */ (0,
|
|
11559
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11560
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
11561
|
+
/* @__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
11562
|
"div",
|
|
11430
11563
|
{
|
|
11431
11564
|
className: cn(
|
|
11432
11565
|
"text-lg text-text-900 leading-8 h-auto",
|
|
11433
11566
|
variant != "result" && paddingBottom
|
|
11434
11567
|
),
|
|
11435
|
-
children: renderTextWithSelects(exampleText).map((element) => /* @__PURE__ */ (0,
|
|
11568
|
+
children: renderTextWithSelects(exampleText).map((element) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: element.element }, element.id))
|
|
11436
11569
|
}
|
|
11437
11570
|
) }) }),
|
|
11438
|
-
variant === "result" && /* @__PURE__ */ (0,
|
|
11439
|
-
/* @__PURE__ */ (0,
|
|
11440
|
-
/* @__PURE__ */ (0,
|
|
11571
|
+
variant === "result" && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11572
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Resultado" }),
|
|
11573
|
+
/* @__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
11574
|
"div",
|
|
11442
11575
|
{
|
|
11443
11576
|
className: cn("text-lg text-text-900 leading-8", paddingBottom),
|
|
11444
|
-
children: renderTextWithSelects(exampleText, true).map((element) => /* @__PURE__ */ (0,
|
|
11577
|
+
children: renderTextWithSelects(exampleText, true).map((element) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: element.element }, element.id))
|
|
11445
11578
|
}
|
|
11446
11579
|
) }) })
|
|
11447
11580
|
] })
|
|
@@ -11495,36 +11628,36 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
11495
11628
|
}
|
|
11496
11629
|
return "bg-success-600/70 border-white";
|
|
11497
11630
|
};
|
|
11498
|
-
return /* @__PURE__ */ (0,
|
|
11499
|
-
/* @__PURE__ */ (0,
|
|
11500
|
-
/* @__PURE__ */ (0,
|
|
11631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11632
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Clique na \xE1rea correta" }),
|
|
11633
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11501
11634
|
"div",
|
|
11502
11635
|
{
|
|
11503
11636
|
"data-testid": "quiz-image-container",
|
|
11504
11637
|
className: "space-y-6 p-3 relative inline-block",
|
|
11505
11638
|
children: [
|
|
11506
|
-
variant == "result" && /* @__PURE__ */ (0,
|
|
11639
|
+
variant == "result" && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11507
11640
|
"div",
|
|
11508
11641
|
{
|
|
11509
11642
|
"data-testid": "quiz-legend",
|
|
11510
11643
|
className: "flex items-center gap-4 text-xs",
|
|
11511
11644
|
children: [
|
|
11512
|
-
/* @__PURE__ */ (0,
|
|
11513
|
-
/* @__PURE__ */ (0,
|
|
11514
|
-
/* @__PURE__ */ (0,
|
|
11645
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
11646
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "w-3 h-3 rounded-full bg-indicator-primary/70 border border-[#F8CC2E]" }),
|
|
11647
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-text-600 font-medium text-sm", children: "\xC1rea correta" })
|
|
11515
11648
|
] }),
|
|
11516
|
-
/* @__PURE__ */ (0,
|
|
11517
|
-
/* @__PURE__ */ (0,
|
|
11518
|
-
/* @__PURE__ */ (0,
|
|
11649
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
11650
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "w-3 h-3 rounded-full bg-success-600/70 border border-white" }),
|
|
11651
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-text-600 font-medium text-sm", children: "Resposta correta" })
|
|
11519
11652
|
] }),
|
|
11520
|
-
/* @__PURE__ */ (0,
|
|
11521
|
-
/* @__PURE__ */ (0,
|
|
11522
|
-
/* @__PURE__ */ (0,
|
|
11653
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
11654
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "w-3 h-3 rounded-full bg-indicator-error/70 border border-white" }),
|
|
11655
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-text-600 font-medium text-sm", children: "Resposta incorreta" })
|
|
11523
11656
|
] })
|
|
11524
11657
|
]
|
|
11525
11658
|
}
|
|
11526
11659
|
),
|
|
11527
|
-
/* @__PURE__ */ (0,
|
|
11660
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11528
11661
|
"button",
|
|
11529
11662
|
{
|
|
11530
11663
|
"data-testid": "quiz-image-button",
|
|
@@ -11539,7 +11672,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
11539
11672
|
},
|
|
11540
11673
|
"aria-label": "\xC1rea da imagem interativa",
|
|
11541
11674
|
children: [
|
|
11542
|
-
/* @__PURE__ */ (0,
|
|
11675
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11543
11676
|
"img",
|
|
11544
11677
|
{
|
|
11545
11678
|
"data-testid": "quiz-image",
|
|
@@ -11548,7 +11681,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
11548
11681
|
className: "w-full h-auto rounded-md"
|
|
11549
11682
|
}
|
|
11550
11683
|
),
|
|
11551
|
-
variant === "result" && /* @__PURE__ */ (0,
|
|
11684
|
+
variant === "result" && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11552
11685
|
"div",
|
|
11553
11686
|
{
|
|
11554
11687
|
"data-testid": "quiz-correct-circle",
|
|
@@ -11563,7 +11696,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
11563
11696
|
}
|
|
11564
11697
|
}
|
|
11565
11698
|
),
|
|
11566
|
-
clickPositionRelative && /* @__PURE__ */ (0,
|
|
11699
|
+
clickPositionRelative && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11567
11700
|
"div",
|
|
11568
11701
|
{
|
|
11569
11702
|
"data-testid": "quiz-user-circle",
|
|
@@ -11588,7 +11721,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
11588
11721
|
};
|
|
11589
11722
|
|
|
11590
11723
|
// src/components/Quiz/Quiz.tsx
|
|
11591
|
-
var
|
|
11724
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
11592
11725
|
var getQuizTypeConfig = (type) => {
|
|
11593
11726
|
const QUIZ_TYPE_CONFIG = {
|
|
11594
11727
|
["SIMULADO" /* SIMULADO */]: {
|
|
@@ -11630,7 +11763,7 @@ var Quiz = (0, import_react36.forwardRef)(({ children, className, variant = "def
|
|
|
11630
11763
|
(0, import_react36.useEffect)(() => {
|
|
11631
11764
|
setVariant(variant);
|
|
11632
11765
|
}, [variant, setVariant]);
|
|
11633
|
-
return /* @__PURE__ */ (0,
|
|
11766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { ref, className: cn("flex flex-col", className), ...props, children });
|
|
11634
11767
|
});
|
|
11635
11768
|
var QuizTitle = (0, import_react36.forwardRef)(({ className, onBack, ...props }, ref) => {
|
|
11636
11769
|
const {
|
|
@@ -11666,8 +11799,8 @@ var QuizTitle = (0, import_react36.forwardRef)(({ className, onBack, ...props },
|
|
|
11666
11799
|
const handleCancelExit = () => {
|
|
11667
11800
|
setShowExitConfirmation(false);
|
|
11668
11801
|
};
|
|
11669
|
-
return /* @__PURE__ */ (0,
|
|
11670
|
-
/* @__PURE__ */ (0,
|
|
11802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
11803
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
11671
11804
|
"div",
|
|
11672
11805
|
{
|
|
11673
11806
|
ref,
|
|
@@ -11677,24 +11810,24 @@ var QuizTitle = (0, import_react36.forwardRef)(({ className, onBack, ...props },
|
|
|
11677
11810
|
),
|
|
11678
11811
|
...props,
|
|
11679
11812
|
children: [
|
|
11680
|
-
/* @__PURE__ */ (0,
|
|
11813
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11681
11814
|
IconButton_default,
|
|
11682
11815
|
{
|
|
11683
|
-
icon: /* @__PURE__ */ (0,
|
|
11816
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_phosphor_react26.CaretLeft, { size: 24 }),
|
|
11684
11817
|
size: "md",
|
|
11685
11818
|
"aria-label": "Voltar",
|
|
11686
11819
|
onClick: handleBackClick
|
|
11687
11820
|
}
|
|
11688
11821
|
),
|
|
11689
|
-
/* @__PURE__ */ (0,
|
|
11690
|
-
/* @__PURE__ */ (0,
|
|
11691
|
-
/* @__PURE__ */ (0,
|
|
11822
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: "flex flex-col gap-2 text-center", children: [
|
|
11823
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
|
|
11824
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
|
|
11692
11825
|
] }),
|
|
11693
|
-
/* @__PURE__ */ (0,
|
|
11826
|
+
/* @__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
11827
|
]
|
|
11695
11828
|
}
|
|
11696
11829
|
),
|
|
11697
|
-
/* @__PURE__ */ (0,
|
|
11830
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11698
11831
|
AlertDialog,
|
|
11699
11832
|
{
|
|
11700
11833
|
isOpen: showExitConfirmation,
|
|
@@ -11712,7 +11845,7 @@ var QuizTitle = (0, import_react36.forwardRef)(({ className, onBack, ...props },
|
|
|
11712
11845
|
var QuizHeader = () => {
|
|
11713
11846
|
const { getCurrentQuestion, currentQuestionIndex } = useQuizStore();
|
|
11714
11847
|
const currentQuestion = getCurrentQuestion();
|
|
11715
|
-
return /* @__PURE__ */ (0,
|
|
11848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11716
11849
|
HeaderAlternative,
|
|
11717
11850
|
{
|
|
11718
11851
|
title: currentQuestion ? `Quest\xE3o ${currentQuestionIndex + 1}` : "Quest\xE3o",
|
|
@@ -11734,7 +11867,7 @@ var QuizContent = ({ paddingBottom }) => {
|
|
|
11734
11867
|
["IMAGEM" /* IMAGEM */]: QuizImageQuestion
|
|
11735
11868
|
};
|
|
11736
11869
|
const QuestionComponent = currentQuestion ? questionComponents[currentQuestion.questionType] : null;
|
|
11737
|
-
return QuestionComponent ? /* @__PURE__ */ (0,
|
|
11870
|
+
return QuestionComponent ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(QuestionComponent, { paddingBottom }) : null;
|
|
11738
11871
|
};
|
|
11739
11872
|
var QuizQuestionList = ({
|
|
11740
11873
|
filterType = "all",
|
|
@@ -11781,18 +11914,18 @@ var QuizQuestionList = ({
|
|
|
11781
11914
|
return "Em branco";
|
|
11782
11915
|
}
|
|
11783
11916
|
};
|
|
11784
|
-
return /* @__PURE__ */ (0,
|
|
11785
|
-
Object.entries(filteredGroupedQuestions).length == 0 && /* @__PURE__ */ (0,
|
|
11917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "space-y-6 px-4 h-full", children: [
|
|
11918
|
+
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
11919
|
Object.entries(filteredGroupedQuestions).map(
|
|
11787
|
-
([subjectId, questions]) => /* @__PURE__ */ (0,
|
|
11788
|
-
/* @__PURE__ */ (0,
|
|
11789
|
-
/* @__PURE__ */ (0,
|
|
11790
|
-
/* @__PURE__ */ (0,
|
|
11920
|
+
([subjectId, questions]) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("section", { className: "flex flex-col gap-2", children: [
|
|
11921
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: "pt-6 pb-4 flex flex-row gap-2", children: [
|
|
11922
|
+
/* @__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" }) }),
|
|
11923
|
+
/* @__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
11924
|
] }),
|
|
11792
|
-
/* @__PURE__ */ (0,
|
|
11925
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("ul", { className: "flex flex-col gap-2", children: questions.map((question) => {
|
|
11793
11926
|
const status = getQuestionStatus(question.id);
|
|
11794
11927
|
const questionNumber = getQuestionIndex(question.id);
|
|
11795
|
-
return /* @__PURE__ */ (0,
|
|
11928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11796
11929
|
CardStatus,
|
|
11797
11930
|
{
|
|
11798
11931
|
header: `Quest\xE3o ${questionNumber.toString().padStart(2, "0")}`,
|
|
@@ -11897,8 +12030,8 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11897
12030
|
return;
|
|
11898
12031
|
}
|
|
11899
12032
|
};
|
|
11900
|
-
return /* @__PURE__ */ (0,
|
|
11901
|
-
/* @__PURE__ */ (0,
|
|
12033
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
12034
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11902
12035
|
"footer",
|
|
11903
12036
|
{
|
|
11904
12037
|
ref,
|
|
@@ -11907,17 +12040,17 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11907
12040
|
className
|
|
11908
12041
|
),
|
|
11909
12042
|
...props,
|
|
11910
|
-
children: variant === "default" ? /* @__PURE__ */ (0,
|
|
11911
|
-
/* @__PURE__ */ (0,
|
|
11912
|
-
/* @__PURE__ */ (0,
|
|
12043
|
+
children: variant === "default" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
12044
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-row items-center gap-1", children: [
|
|
12045
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11913
12046
|
IconButton_default,
|
|
11914
12047
|
{
|
|
11915
|
-
icon: /* @__PURE__ */ (0,
|
|
12048
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_phosphor_react26.SquaresFour, { size: 24, className: "text-text-950" }),
|
|
11916
12049
|
size: "md",
|
|
11917
12050
|
onClick: () => openModal("modalNavigate")
|
|
11918
12051
|
}
|
|
11919
12052
|
),
|
|
11920
|
-
isFirstQuestion ? /* @__PURE__ */ (0,
|
|
12053
|
+
isFirstQuestion ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11921
12054
|
Button_default,
|
|
11922
12055
|
{
|
|
11923
12056
|
variant: "outline",
|
|
@@ -11928,13 +12061,13 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11928
12061
|
},
|
|
11929
12062
|
children: "Pular"
|
|
11930
12063
|
}
|
|
11931
|
-
) : /* @__PURE__ */ (0,
|
|
12064
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11932
12065
|
Button_default,
|
|
11933
12066
|
{
|
|
11934
12067
|
size: "medium",
|
|
11935
12068
|
variant: "link",
|
|
11936
12069
|
action: "primary",
|
|
11937
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
12070
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_phosphor_react26.CaretLeft, { size: 18 }),
|
|
11938
12071
|
onClick: () => {
|
|
11939
12072
|
goToPreviousQuestion();
|
|
11940
12073
|
},
|
|
@@ -11942,7 +12075,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11942
12075
|
}
|
|
11943
12076
|
)
|
|
11944
12077
|
] }),
|
|
11945
|
-
!isFirstQuestion && !isLastQuestion && /* @__PURE__ */ (0,
|
|
12078
|
+
!isFirstQuestion && !isLastQuestion && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11946
12079
|
Button_default,
|
|
11947
12080
|
{
|
|
11948
12081
|
size: "small",
|
|
@@ -11955,7 +12088,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11955
12088
|
children: "Pular"
|
|
11956
12089
|
}
|
|
11957
12090
|
),
|
|
11958
|
-
isLastQuestion ? /* @__PURE__ */ (0,
|
|
12091
|
+
isLastQuestion ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11959
12092
|
Button_default,
|
|
11960
12093
|
{
|
|
11961
12094
|
size: "medium",
|
|
@@ -11965,13 +12098,13 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11965
12098
|
onClick: handleFinishQuiz,
|
|
11966
12099
|
children: "Finalizar"
|
|
11967
12100
|
}
|
|
11968
|
-
) : /* @__PURE__ */ (0,
|
|
12101
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11969
12102
|
Button_default,
|
|
11970
12103
|
{
|
|
11971
12104
|
size: "medium",
|
|
11972
12105
|
variant: "link",
|
|
11973
12106
|
action: "primary",
|
|
11974
|
-
iconRight: /* @__PURE__ */ (0,
|
|
12107
|
+
iconRight: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_phosphor_react26.CaretRight, { size: 18 }),
|
|
11975
12108
|
disabled: !currentAnswer && !isCurrentQuestionSkipped,
|
|
11976
12109
|
onClick: () => {
|
|
11977
12110
|
goToNextQuestion();
|
|
@@ -11979,7 +12112,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11979
12112
|
children: "Avan\xE7ar"
|
|
11980
12113
|
}
|
|
11981
12114
|
)
|
|
11982
|
-
] }) : /* @__PURE__ */ (0,
|
|
12115
|
+
] }) : /* @__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
12116
|
Button_default,
|
|
11984
12117
|
{
|
|
11985
12118
|
variant: "link",
|
|
@@ -11991,7 +12124,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11991
12124
|
) })
|
|
11992
12125
|
}
|
|
11993
12126
|
),
|
|
11994
|
-
/* @__PURE__ */ (0,
|
|
12127
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11995
12128
|
AlertDialog,
|
|
11996
12129
|
{
|
|
11997
12130
|
isOpen: isModalOpen("alertDialog"),
|
|
@@ -12003,7 +12136,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12003
12136
|
onSubmit: handleAlertSubmit
|
|
12004
12137
|
}
|
|
12005
12138
|
),
|
|
12006
|
-
/* @__PURE__ */ (0,
|
|
12139
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12007
12140
|
Modal_default,
|
|
12008
12141
|
{
|
|
12009
12142
|
isOpen: isModalOpen("modalResult"),
|
|
@@ -12012,11 +12145,11 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12012
12145
|
closeOnEscape: false,
|
|
12013
12146
|
hideCloseButton: true,
|
|
12014
12147
|
size: "md",
|
|
12015
|
-
children: /* @__PURE__ */ (0,
|
|
12016
|
-
resultImageComponent ? /* @__PURE__ */ (0,
|
|
12017
|
-
/* @__PURE__ */ (0,
|
|
12018
|
-
/* @__PURE__ */ (0,
|
|
12019
|
-
/* @__PURE__ */ (0,
|
|
12148
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
12149
|
+
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" }) }),
|
|
12150
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
12151
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h2", { className: "text-text-950 font-bold text-lg", children: getCompletionTitle(quizType) }),
|
|
12152
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("p", { className: "text-text-500 font-sm", children: [
|
|
12020
12153
|
"Voc\xEA acertou ",
|
|
12021
12154
|
correctAnswers ?? "--",
|
|
12022
12155
|
" de ",
|
|
@@ -12025,8 +12158,8 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12025
12158
|
"quest\xF5es."
|
|
12026
12159
|
] })
|
|
12027
12160
|
] }),
|
|
12028
|
-
/* @__PURE__ */ (0,
|
|
12029
|
-
/* @__PURE__ */ (0,
|
|
12161
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: [
|
|
12162
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12030
12163
|
Button_default,
|
|
12031
12164
|
{
|
|
12032
12165
|
variant: "outline",
|
|
@@ -12036,38 +12169,38 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12036
12169
|
children: quizTypeLabel === "Question\xE1rio" ? "Ir para aulas" : `Ir para ${quizTypeLabel.toLocaleLowerCase()}s`
|
|
12037
12170
|
}
|
|
12038
12171
|
),
|
|
12039
|
-
/* @__PURE__ */ (0,
|
|
12172
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button_default, { className: "w-full", onClick: onDetailResult, children: "Detalhar resultado" })
|
|
12040
12173
|
] })
|
|
12041
12174
|
] })
|
|
12042
12175
|
}
|
|
12043
12176
|
),
|
|
12044
|
-
/* @__PURE__ */ (0,
|
|
12177
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12045
12178
|
Modal_default,
|
|
12046
12179
|
{
|
|
12047
12180
|
isOpen: isModalOpen("modalNavigate"),
|
|
12048
12181
|
onClose: closeModal,
|
|
12049
12182
|
title: "Quest\xF5es",
|
|
12050
12183
|
size: "lg",
|
|
12051
|
-
children: /* @__PURE__ */ (0,
|
|
12052
|
-
/* @__PURE__ */ (0,
|
|
12053
|
-
/* @__PURE__ */ (0,
|
|
12054
|
-
/* @__PURE__ */ (0,
|
|
12055
|
-
/* @__PURE__ */ (0,
|
|
12184
|
+
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: [
|
|
12185
|
+
/* @__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: [
|
|
12186
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-text-950 font-bold text-lg", children: "Filtrar por" }),
|
|
12187
|
+
/* @__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: [
|
|
12188
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12056
12189
|
SelectTrigger,
|
|
12057
12190
|
{
|
|
12058
12191
|
variant: "rounded",
|
|
12059
12192
|
className: "max-w-[266px] min-w-[160px]",
|
|
12060
|
-
children: /* @__PURE__ */ (0,
|
|
12193
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectValue, { placeholder: "Selecione uma op\xE7\xE3o" })
|
|
12061
12194
|
}
|
|
12062
12195
|
),
|
|
12063
|
-
/* @__PURE__ */ (0,
|
|
12064
|
-
/* @__PURE__ */ (0,
|
|
12065
|
-
/* @__PURE__ */ (0,
|
|
12066
|
-
/* @__PURE__ */ (0,
|
|
12196
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(SelectContent, { children: [
|
|
12197
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectItem, { value: "all", children: "Todas" }),
|
|
12198
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectItem, { value: "unanswered", children: "Em branco" }),
|
|
12199
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectItem, { value: "answered", children: "Respondidas" })
|
|
12067
12200
|
] })
|
|
12068
12201
|
] }) })
|
|
12069
12202
|
] }),
|
|
12070
|
-
/* @__PURE__ */ (0,
|
|
12203
|
+
/* @__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
12204
|
QuizQuestionList,
|
|
12072
12205
|
{
|
|
12073
12206
|
filterType,
|
|
@@ -12077,7 +12210,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12077
12210
|
] })
|
|
12078
12211
|
}
|
|
12079
12212
|
),
|
|
12080
|
-
/* @__PURE__ */ (0,
|
|
12213
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12081
12214
|
Modal_default,
|
|
12082
12215
|
{
|
|
12083
12216
|
isOpen: isModalOpen("modalResolution"),
|
|
@@ -12087,7 +12220,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12087
12220
|
children: currentQuestion?.solutionExplanation
|
|
12088
12221
|
}
|
|
12089
12222
|
),
|
|
12090
|
-
/* @__PURE__ */ (0,
|
|
12223
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12091
12224
|
Modal_default,
|
|
12092
12225
|
{
|
|
12093
12226
|
isOpen: isModalOpen("modalQuestionnaireAllCorrect"),
|
|
@@ -12096,17 +12229,17 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12096
12229
|
closeOnEscape: false,
|
|
12097
12230
|
hideCloseButton: true,
|
|
12098
12231
|
size: "md",
|
|
12099
|
-
children: /* @__PURE__ */ (0,
|
|
12100
|
-
resultImageComponent ? /* @__PURE__ */ (0,
|
|
12101
|
-
/* @__PURE__ */ (0,
|
|
12102
|
-
/* @__PURE__ */ (0,
|
|
12103
|
-
/* @__PURE__ */ (0,
|
|
12232
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
12233
|
+
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" }) }),
|
|
12234
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
12235
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h2", { className: "text-text-950 font-bold text-lg", children: "\u{1F389} Parab\xE9ns!" }),
|
|
12236
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-text-500 font-sm", children: "Voc\xEA concluiu o m\xF3dulo Movimento Uniforme." })
|
|
12104
12237
|
] }),
|
|
12105
|
-
/* @__PURE__ */ (0,
|
|
12238
|
+
/* @__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
12239
|
] })
|
|
12107
12240
|
}
|
|
12108
12241
|
),
|
|
12109
|
-
/* @__PURE__ */ (0,
|
|
12242
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12110
12243
|
Modal_default,
|
|
12111
12244
|
{
|
|
12112
12245
|
isOpen: isModalOpen("modalQuestionnaireAllIncorrect"),
|
|
@@ -12115,16 +12248,16 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12115
12248
|
closeOnEscape: false,
|
|
12116
12249
|
hideCloseButton: true,
|
|
12117
12250
|
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,
|
|
12251
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
12252
|
+
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" }) }),
|
|
12253
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
12254
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h2", { className: "text-text-950 font-bold text-lg", children: "\u{1F615} N\xE3o foi dessa vez..." }),
|
|
12255
|
+
/* @__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." }),
|
|
12256
|
+
/* @__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." }),
|
|
12257
|
+
/* @__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
12258
|
] }),
|
|
12126
|
-
/* @__PURE__ */ (0,
|
|
12127
|
-
/* @__PURE__ */ (0,
|
|
12259
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-row justify-center items-center gap-2 w-full", children: [
|
|
12260
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12128
12261
|
Button_default,
|
|
12129
12262
|
{
|
|
12130
12263
|
type: "button",
|
|
@@ -12138,7 +12271,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12138
12271
|
children: "Tentar depois"
|
|
12139
12272
|
}
|
|
12140
12273
|
),
|
|
12141
|
-
/* @__PURE__ */ (0,
|
|
12274
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12142
12275
|
Button_default,
|
|
12143
12276
|
{
|
|
12144
12277
|
variant: "outline",
|
|
@@ -12148,7 +12281,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12148
12281
|
children: "Detalhar resultado"
|
|
12149
12282
|
}
|
|
12150
12283
|
),
|
|
12151
|
-
/* @__PURE__ */ (0,
|
|
12284
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12152
12285
|
Button_default,
|
|
12153
12286
|
{
|
|
12154
12287
|
className: "w-auto",
|
|
@@ -12161,7 +12294,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12161
12294
|
] })
|
|
12162
12295
|
}
|
|
12163
12296
|
),
|
|
12164
|
-
/* @__PURE__ */ (0,
|
|
12297
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12165
12298
|
AlertDialog,
|
|
12166
12299
|
{
|
|
12167
12300
|
isOpen: isModalOpen("alertDialogTryLater"),
|
|
@@ -12186,25 +12319,25 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12186
12319
|
|
|
12187
12320
|
// src/components/Quiz/QuizResult.tsx
|
|
12188
12321
|
var import_react37 = require("react");
|
|
12189
|
-
var
|
|
12190
|
-
var
|
|
12322
|
+
var import_phosphor_react27 = require("phosphor-react");
|
|
12323
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
12191
12324
|
var QuizBadge = ({
|
|
12192
12325
|
subtype
|
|
12193
12326
|
}) => {
|
|
12194
12327
|
switch (subtype) {
|
|
12195
12328
|
case "PROVA" /* PROVA */:
|
|
12196
|
-
return /* @__PURE__ */ (0,
|
|
12329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Badge_default, { variant: "examsOutlined", action: "exam2", "data-testid": "quiz-badge", children: "Prova" });
|
|
12197
12330
|
case "ENEM_PROVA_1" /* ENEM_PROVA_1 */:
|
|
12198
12331
|
case "ENEM_PROVA_2" /* ENEM_PROVA_2 */:
|
|
12199
|
-
return /* @__PURE__ */ (0,
|
|
12332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Badge_default, { variant: "examsOutlined", action: "exam1", "data-testid": "quiz-badge", children: "Enem" });
|
|
12200
12333
|
case "VESTIBULAR" /* VESTIBULAR */:
|
|
12201
|
-
return /* @__PURE__ */ (0,
|
|
12334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Badge_default, { variant: "examsOutlined", action: "exam4", "data-testid": "quiz-badge", children: "Vestibular" });
|
|
12202
12335
|
case "SIMULADO" /* SIMULADO */:
|
|
12203
12336
|
case "SIMULADAO" /* SIMULADAO */:
|
|
12204
12337
|
case void 0:
|
|
12205
|
-
return /* @__PURE__ */ (0,
|
|
12338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Badge_default, { variant: "examsOutlined", action: "exam3", "data-testid": "quiz-badge", children: "Simulad\xE3o" });
|
|
12206
12339
|
default:
|
|
12207
|
-
return /* @__PURE__ */ (0,
|
|
12340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Badge_default, { variant: "solid", action: "info", "data-testid": "quiz-badge", children: subtype });
|
|
12208
12341
|
}
|
|
12209
12342
|
};
|
|
12210
12343
|
var QuizHeaderResult = (0, import_react37.forwardRef)(
|
|
@@ -12249,7 +12382,7 @@ var QuizHeaderResult = (0, import_react37.forwardRef)(
|
|
|
12249
12382
|
return "N\xE3o foi dessa vez...voc\xEA deixou a resposta em branco";
|
|
12250
12383
|
}
|
|
12251
12384
|
};
|
|
12252
|
-
return /* @__PURE__ */ (0,
|
|
12385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
12253
12386
|
"div",
|
|
12254
12387
|
{
|
|
12255
12388
|
ref,
|
|
@@ -12260,8 +12393,8 @@ var QuizHeaderResult = (0, import_react37.forwardRef)(
|
|
|
12260
12393
|
),
|
|
12261
12394
|
...props,
|
|
12262
12395
|
children: [
|
|
12263
|
-
/* @__PURE__ */ (0,
|
|
12264
|
-
/* @__PURE__ */ (0,
|
|
12396
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-text-950 font-bold text-lg", children: "Resultado" }),
|
|
12397
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-text-700 text-md", children: getLabelByAnswersStatus() })
|
|
12265
12398
|
]
|
|
12266
12399
|
}
|
|
12267
12400
|
);
|
|
@@ -12269,7 +12402,7 @@ var QuizHeaderResult = (0, import_react37.forwardRef)(
|
|
|
12269
12402
|
);
|
|
12270
12403
|
var QuizResultHeaderTitle = (0, import_react37.forwardRef)(({ className, showBadge = true, onRepeat, canRetry, ...props }, ref) => {
|
|
12271
12404
|
const { quiz } = useQuizStore();
|
|
12272
|
-
return /* @__PURE__ */ (0,
|
|
12405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
12273
12406
|
"div",
|
|
12274
12407
|
{
|
|
12275
12408
|
ref,
|
|
@@ -12279,9 +12412,9 @@ var QuizResultHeaderTitle = (0, import_react37.forwardRef)(({ className, showBad
|
|
|
12279
12412
|
),
|
|
12280
12413
|
...props,
|
|
12281
12414
|
children: [
|
|
12282
|
-
/* @__PURE__ */ (0,
|
|
12283
|
-
/* @__PURE__ */ (0,
|
|
12284
|
-
canRetry && onRepeat && /* @__PURE__ */ (0,
|
|
12415
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: "Resultado" }),
|
|
12416
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-row gap-3 items-center", children: [
|
|
12417
|
+
canRetry && onRepeat && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12285
12418
|
Button_default,
|
|
12286
12419
|
{
|
|
12287
12420
|
variant: "solid",
|
|
@@ -12291,7 +12424,7 @@ var QuizResultHeaderTitle = (0, import_react37.forwardRef)(({ className, showBad
|
|
|
12291
12424
|
children: "Repetir question\xE1rio"
|
|
12292
12425
|
}
|
|
12293
12426
|
),
|
|
12294
|
-
showBadge && /* @__PURE__ */ (0,
|
|
12427
|
+
showBadge && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(QuizBadge, { subtype: quiz?.subtype || void 0 })
|
|
12295
12428
|
] })
|
|
12296
12429
|
]
|
|
12297
12430
|
}
|
|
@@ -12300,7 +12433,7 @@ var QuizResultHeaderTitle = (0, import_react37.forwardRef)(({ className, showBad
|
|
|
12300
12433
|
var QuizResultTitle = (0, import_react37.forwardRef)(({ className, ...props }, ref) => {
|
|
12301
12434
|
const { getQuizTitle } = useQuizStore();
|
|
12302
12435
|
const quizTitle = getQuizTitle();
|
|
12303
|
-
return /* @__PURE__ */ (0,
|
|
12436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12304
12437
|
"p",
|
|
12305
12438
|
{
|
|
12306
12439
|
className: cn("pt-6 pb-4 text-text-950 font-bold text-lg", className),
|
|
@@ -12352,7 +12485,7 @@ var QuizResultPerformance = (0, import_react37.forwardRef)(({ showDetails = true
|
|
|
12352
12485
|
}
|
|
12353
12486
|
const percentage = totalQuestions > 0 ? Math.round(correctAnswers / totalQuestions * 100) : 0;
|
|
12354
12487
|
const classesJustifyBetween = showDetails ? "justify-between" : "justify-center";
|
|
12355
|
-
return /* @__PURE__ */ (0,
|
|
12488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
12356
12489
|
"div",
|
|
12357
12490
|
{
|
|
12358
12491
|
className: cn(
|
|
@@ -12362,8 +12495,8 @@ var QuizResultPerformance = (0, import_react37.forwardRef)(({ showDetails = true
|
|
|
12362
12495
|
ref,
|
|
12363
12496
|
...props,
|
|
12364
12497
|
children: [
|
|
12365
|
-
/* @__PURE__ */ (0,
|
|
12366
|
-
/* @__PURE__ */ (0,
|
|
12498
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "relative", children: [
|
|
12499
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12367
12500
|
ProgressCircle_default,
|
|
12368
12501
|
{
|
|
12369
12502
|
size: "medium",
|
|
@@ -12373,24 +12506,24 @@ var QuizResultPerformance = (0, import_react37.forwardRef)(({ showDetails = true
|
|
|
12373
12506
|
label: ""
|
|
12374
12507
|
}
|
|
12375
12508
|
),
|
|
12376
|
-
/* @__PURE__ */ (0,
|
|
12377
|
-
showDetails && /* @__PURE__ */ (0,
|
|
12378
|
-
/* @__PURE__ */ (0,
|
|
12379
|
-
/* @__PURE__ */ (0,
|
|
12509
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
12510
|
+
showDetails && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center gap-1 mb-1", children: [
|
|
12511
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_phosphor_react27.Clock, { size: 12, weight: "regular", className: "text-text-800" }),
|
|
12512
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "text-2xs font-medium text-text-800", children: formatTime2(
|
|
12380
12513
|
(getQuestionResultStatistics()?.timeSpent ?? 0) * 60
|
|
12381
12514
|
) })
|
|
12382
12515
|
] }),
|
|
12383
|
-
/* @__PURE__ */ (0,
|
|
12516
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "text-2xl font-medium text-text-800 leading-7", children: [
|
|
12384
12517
|
getQuestionResultStatistics()?.correctAnswers ?? "--",
|
|
12385
12518
|
" de",
|
|
12386
12519
|
" ",
|
|
12387
12520
|
totalQuestions
|
|
12388
12521
|
] }),
|
|
12389
|
-
/* @__PURE__ */ (0,
|
|
12522
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "text-2xs font-medium text-text-600 mt-1", children: "Corretas" })
|
|
12390
12523
|
] })
|
|
12391
12524
|
] }),
|
|
12392
|
-
showDetails && /* @__PURE__ */ (0,
|
|
12393
|
-
/* @__PURE__ */ (0,
|
|
12525
|
+
showDetails && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-col gap-4 w-full", children: [
|
|
12526
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12394
12527
|
ProgressBar_default,
|
|
12395
12528
|
{
|
|
12396
12529
|
className: "w-full",
|
|
@@ -12404,7 +12537,7 @@ var QuizResultPerformance = (0, import_react37.forwardRef)(({ showDetails = true
|
|
|
12404
12537
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
12405
12538
|
}
|
|
12406
12539
|
),
|
|
12407
|
-
/* @__PURE__ */ (0,
|
|
12540
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12408
12541
|
ProgressBar_default,
|
|
12409
12542
|
{
|
|
12410
12543
|
className: "w-full",
|
|
@@ -12418,7 +12551,7 @@ var QuizResultPerformance = (0, import_react37.forwardRef)(({ showDetails = true
|
|
|
12418
12551
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
12419
12552
|
}
|
|
12420
12553
|
),
|
|
12421
|
-
/* @__PURE__ */ (0,
|
|
12554
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12422
12555
|
ProgressBar_default,
|
|
12423
12556
|
{
|
|
12424
12557
|
className: "w-full",
|
|
@@ -12465,9 +12598,9 @@ var QuizListResult = (0, import_react37.forwardRef)(({ className, onSubjectClick
|
|
|
12465
12598
|
};
|
|
12466
12599
|
}
|
|
12467
12600
|
);
|
|
12468
|
-
return /* @__PURE__ */ (0,
|
|
12469
|
-
/* @__PURE__ */ (0,
|
|
12470
|
-
/* @__PURE__ */ (0,
|
|
12601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("section", { ref, className, ...props, children: [
|
|
12602
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Mat\xE9rias" }),
|
|
12603
|
+
/* @__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
12604
|
CardResults,
|
|
12472
12605
|
{
|
|
12473
12606
|
onClick: () => onSubjectClick?.(subject.subject.id),
|
|
@@ -12491,16 +12624,16 @@ var QuizListResultByMateria = ({
|
|
|
12491
12624
|
const groupedQuestions = getQuestionsGroupedBySubject();
|
|
12492
12625
|
const answeredQuestions = groupedQuestions[subject] || [];
|
|
12493
12626
|
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,
|
|
12627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-col", children: [
|
|
12628
|
+
/* @__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" }) }),
|
|
12629
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("section", { className: "flex flex-col ", children: [
|
|
12630
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Resultado das quest\xF5es" }),
|
|
12631
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("ul", { className: "flex flex-col gap-2 pt-4", children: formattedQuestions.map((question) => {
|
|
12499
12632
|
const questionIndex = getQuestionIndex(
|
|
12500
12633
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12501
12634
|
question.questionId ?? question.id
|
|
12502
12635
|
);
|
|
12503
|
-
return /* @__PURE__ */ (0,
|
|
12636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12504
12637
|
CardStatus,
|
|
12505
12638
|
{
|
|
12506
12639
|
className: "max-w-full",
|
|
@@ -12526,7 +12659,7 @@ var QuizListResultByMateria = ({
|
|
|
12526
12659
|
|
|
12527
12660
|
// src/components/BreadcrumbMenu/BreadcrumbMenu.tsx
|
|
12528
12661
|
var import_react_router_dom3 = require("react-router-dom");
|
|
12529
|
-
var
|
|
12662
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
12530
12663
|
var BreadcrumbMenu = ({
|
|
12531
12664
|
breadcrumbs,
|
|
12532
12665
|
onBreadcrumbClick,
|
|
@@ -12539,17 +12672,17 @@ var BreadcrumbMenu = ({
|
|
|
12539
12672
|
}
|
|
12540
12673
|
navigate(breadcrumb.url);
|
|
12541
12674
|
};
|
|
12542
|
-
return /* @__PURE__ */ (0,
|
|
12675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
12543
12676
|
Menu,
|
|
12544
12677
|
{
|
|
12545
12678
|
value: `breadcrumb-${breadcrumbs.length - 1}`,
|
|
12546
12679
|
defaultValue: "breadcrumb-0",
|
|
12547
12680
|
variant: "breadcrumb",
|
|
12548
12681
|
className,
|
|
12549
|
-
children: /* @__PURE__ */ (0,
|
|
12682
|
+
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
12683
|
const isLast = index === breadcrumbs.length - 1;
|
|
12551
12684
|
const hasSeparator = !isLast;
|
|
12552
|
-
return /* @__PURE__ */ (0,
|
|
12685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
12553
12686
|
MenuItem,
|
|
12554
12687
|
{
|
|
12555
12688
|
variant: "breadcrumb",
|
|
@@ -13145,6 +13278,7 @@ function useAppContent(config) {
|
|
|
13145
13278
|
SkeletonRounded,
|
|
13146
13279
|
SkeletonTable,
|
|
13147
13280
|
SkeletonText,
|
|
13281
|
+
StatisticsCard,
|
|
13148
13282
|
Stepper,
|
|
13149
13283
|
SubjectEnum,
|
|
13150
13284
|
SubjectInfo,
|