analytica-frontend-lib 1.1.93 → 1.1.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BreadcrumbMenu/breadcrumbStore/index.d.mts +77 -0
- package/dist/BreadcrumbMenu/breadcrumbStore/index.d.ts +77 -0
- package/dist/BreadcrumbMenu/breadcrumbStore/index.js +146 -0
- package/dist/BreadcrumbMenu/breadcrumbStore/index.js.map +1 -0
- package/dist/BreadcrumbMenu/breadcrumbStore/index.mjs +120 -0
- package/dist/BreadcrumbMenu/breadcrumbStore/index.mjs.map +1 -0
- package/dist/BreadcrumbMenu/index.d.mts +31 -0
- package/dist/BreadcrumbMenu/index.d.ts +31 -0
- package/dist/BreadcrumbMenu/index.js +308 -0
- package/dist/BreadcrumbMenu/index.js.map +1 -0
- package/dist/BreadcrumbMenu/index.mjs +289 -0
- package/dist/BreadcrumbMenu/index.mjs.map +1 -0
- package/dist/BreadcrumbMenu/useBreadcrumbBuilder/index.d.mts +48 -0
- package/dist/BreadcrumbMenu/useBreadcrumbBuilder/index.d.ts +48 -0
- package/dist/BreadcrumbMenu/useBreadcrumbBuilder/index.js +189 -0
- package/dist/BreadcrumbMenu/useBreadcrumbBuilder/index.js.map +1 -0
- package/dist/BreadcrumbMenu/useBreadcrumbBuilder/index.mjs +164 -0
- package/dist/BreadcrumbMenu/useBreadcrumbBuilder/index.mjs.map +1 -0
- package/dist/BreadcrumbMenu/useUrlParams/index.d.mts +28 -0
- package/dist/BreadcrumbMenu/useUrlParams/index.d.ts +28 -0
- package/dist/BreadcrumbMenu/useUrlParams/index.js +43 -0
- package/dist/BreadcrumbMenu/useUrlParams/index.js.map +1 -0
- package/dist/BreadcrumbMenu/useUrlParams/index.mjs +18 -0
- package/dist/BreadcrumbMenu/useUrlParams/index.mjs.map +1 -0
- package/dist/StatisticsCard/index.d.mts +77 -0
- package/dist/StatisticsCard/index.d.ts +77 -0
- package/dist/StatisticsCard/index.js +608 -0
- package/dist/StatisticsCard/index.js.map +1 -0
- package/dist/StatisticsCard/index.mjs +589 -0
- package/dist/StatisticsCard/index.mjs.map +1 -0
- package/dist/index.css +41 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +699 -354
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +679 -339
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +41 -0
- package/dist/styles.css.map +1 -1
- package/package.json +3 -1
package/dist/index.js
CHANGED
|
@@ -36,6 +36,7 @@ __export(src_exports, {
|
|
|
36
36
|
AlternativesList: () => AlternativesList,
|
|
37
37
|
AuthProvider: () => AuthProvider,
|
|
38
38
|
Badge: () => Badge_default,
|
|
39
|
+
BreadcrumbMenu: () => BreadcrumbMenu,
|
|
39
40
|
Button: () => Button_default,
|
|
40
41
|
Calendar: () => Calendar_default,
|
|
41
42
|
CardAccordation: () => CardAccordation,
|
|
@@ -127,6 +128,7 @@ __export(src_exports, {
|
|
|
127
128
|
SkeletonRounded: () => SkeletonRounded,
|
|
128
129
|
SkeletonTable: () => SkeletonTable,
|
|
129
130
|
SkeletonText: () => SkeletonText,
|
|
131
|
+
StatisticsCard: () => StatisticsCard,
|
|
130
132
|
Stepper: () => Stepper_default,
|
|
131
133
|
SubjectEnum: () => SubjectEnum,
|
|
132
134
|
SubjectInfo: () => SubjectInfo,
|
|
@@ -161,6 +163,8 @@ __export(src_exports, {
|
|
|
161
163
|
useAuth: () => useAuth,
|
|
162
164
|
useAuthGuard: () => useAuthGuard,
|
|
163
165
|
useAuthStore: () => useAuthStore,
|
|
166
|
+
useBreadcrumb: () => useBreadcrumb,
|
|
167
|
+
useBreadcrumbBuilder: () => useBreadcrumbBuilder,
|
|
164
168
|
useInstitutionId: () => useInstitutionId,
|
|
165
169
|
useMobile: () => useMobile,
|
|
166
170
|
useQuizStore: () => useQuizStore,
|
|
@@ -169,6 +173,7 @@ __export(src_exports, {
|
|
|
169
173
|
useThemeStore: () => useThemeStore,
|
|
170
174
|
useToastStore: () => ToastStore_default,
|
|
171
175
|
useUrlAuthentication: () => useUrlAuthentication,
|
|
176
|
+
useUrlParams: () => useUrlParams,
|
|
172
177
|
withAuth: () => withAuth
|
|
173
178
|
});
|
|
174
179
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -8150,8 +8155,125 @@ var CardSimulationHistory = (0, import_react25.forwardRef)(({ data, onSimulation
|
|
|
8150
8155
|
);
|
|
8151
8156
|
});
|
|
8152
8157
|
|
|
8153
|
-
// src/components/
|
|
8158
|
+
// src/components/StatisticsCard/StatisticsCard.tsx
|
|
8159
|
+
var import_phosphor_react18 = require("phosphor-react");
|
|
8154
8160
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
8161
|
+
var VARIANT_STYLES = {
|
|
8162
|
+
high: "bg-success-background",
|
|
8163
|
+
medium: "bg-warning-background",
|
|
8164
|
+
low: "bg-error-background",
|
|
8165
|
+
total: "bg-info-background"
|
|
8166
|
+
};
|
|
8167
|
+
var VALUE_TEXT_COLORS = {
|
|
8168
|
+
high: "text-success-700",
|
|
8169
|
+
medium: "text-warning-600",
|
|
8170
|
+
low: "text-error-700",
|
|
8171
|
+
total: "text-info-700"
|
|
8172
|
+
};
|
|
8173
|
+
var StatCard = ({ item }) => {
|
|
8174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
8175
|
+
"div",
|
|
8176
|
+
{
|
|
8177
|
+
className: `rounded-xl py-[17px] px-6 min-h-[105px] flex flex-col justify-center items-start gap-1 ${VARIANT_STYLES[item.variant]}`,
|
|
8178
|
+
children: [
|
|
8179
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
8180
|
+
Text_default,
|
|
8181
|
+
{
|
|
8182
|
+
size: "4xl",
|
|
8183
|
+
weight: "bold",
|
|
8184
|
+
className: `${VALUE_TEXT_COLORS[item.variant]} leading-[42px] tracking-[0.2px] self-stretch`,
|
|
8185
|
+
children: item.value
|
|
8186
|
+
}
|
|
8187
|
+
),
|
|
8188
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
8189
|
+
Text_default,
|
|
8190
|
+
{
|
|
8191
|
+
size: "xs",
|
|
8192
|
+
weight: "bold",
|
|
8193
|
+
className: "uppercase text-[8px] leading-[9px] text-text-800 self-stretch",
|
|
8194
|
+
children: item.label
|
|
8195
|
+
}
|
|
8196
|
+
)
|
|
8197
|
+
]
|
|
8198
|
+
}
|
|
8199
|
+
);
|
|
8200
|
+
};
|
|
8201
|
+
var StatisticsCard = ({
|
|
8202
|
+
title,
|
|
8203
|
+
data,
|
|
8204
|
+
emptyStateMessage,
|
|
8205
|
+
emptyStateButtonText,
|
|
8206
|
+
onEmptyStateButtonClick,
|
|
8207
|
+
dropdownOptions,
|
|
8208
|
+
selectedDropdownValue,
|
|
8209
|
+
onDropdownChange,
|
|
8210
|
+
selectPlaceholder = "Selecione um per\xEDodo",
|
|
8211
|
+
dropdownAriaLabel = "Filtro de per\xEDodo",
|
|
8212
|
+
className = ""
|
|
8213
|
+
}) => {
|
|
8214
|
+
const hasData = data && data.length > 0;
|
|
8215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
8216
|
+
"div",
|
|
8217
|
+
{
|
|
8218
|
+
className: `bg-background rounded-xl p-4 h-auto lg:h-[185px] flex flex-col gap-2 ${className}`,
|
|
8219
|
+
children: [
|
|
8220
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex flex-row justify-between items-center gap-4", children: [
|
|
8221
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text_default, { as: "h3", size: "sm", weight: "medium", color: "text-text-600", children: title }),
|
|
8222
|
+
dropdownOptions && dropdownOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "w-[99px]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
8223
|
+
Select_default,
|
|
8224
|
+
{
|
|
8225
|
+
value: selectedDropdownValue,
|
|
8226
|
+
onValueChange: onDropdownChange,
|
|
8227
|
+
size: "medium",
|
|
8228
|
+
children: [
|
|
8229
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
8230
|
+
SelectTrigger,
|
|
8231
|
+
{
|
|
8232
|
+
className: "border border-border-300 rounded whitespace-nowrap",
|
|
8233
|
+
"aria-label": dropdownAriaLabel,
|
|
8234
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SelectValue, { placeholder: selectPlaceholder })
|
|
8235
|
+
}
|
|
8236
|
+
),
|
|
8237
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SelectContent, { children: dropdownOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(SelectItem, { value: option.value, children: option.label }, option.value)) })
|
|
8238
|
+
]
|
|
8239
|
+
}
|
|
8240
|
+
) })
|
|
8241
|
+
] }),
|
|
8242
|
+
hasData ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[13px]", children: data.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
8243
|
+
StatCard,
|
|
8244
|
+
{
|
|
8245
|
+
item
|
|
8246
|
+
},
|
|
8247
|
+
`${item.variant}-${item.label}-${index}`
|
|
8248
|
+
)) }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "border border-dashed border-border-300 rounded-lg p-6 min-h-[105px] flex flex-col items-center justify-center gap-2", children: [
|
|
8249
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
8250
|
+
Text_default,
|
|
8251
|
+
{
|
|
8252
|
+
size: "sm",
|
|
8253
|
+
color: "text-text-600",
|
|
8254
|
+
className: "text-center max-w-md",
|
|
8255
|
+
children: emptyStateMessage
|
|
8256
|
+
}
|
|
8257
|
+
),
|
|
8258
|
+
onEmptyStateButtonClick && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
8259
|
+
Button_default,
|
|
8260
|
+
{
|
|
8261
|
+
variant: "outline",
|
|
8262
|
+
action: "primary",
|
|
8263
|
+
size: "small",
|
|
8264
|
+
onClick: onEmptyStateButtonClick,
|
|
8265
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_phosphor_react18.Plus, { size: 16, weight: "bold" }),
|
|
8266
|
+
children: emptyStateButtonText
|
|
8267
|
+
}
|
|
8268
|
+
)
|
|
8269
|
+
] })
|
|
8270
|
+
]
|
|
8271
|
+
}
|
|
8272
|
+
);
|
|
8273
|
+
};
|
|
8274
|
+
|
|
8275
|
+
// src/components/NotFound/NotFound.tsx
|
|
8276
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
8155
8277
|
var NotFound = ({
|
|
8156
8278
|
title,
|
|
8157
8279
|
description,
|
|
@@ -8194,22 +8316,22 @@ var NotFound = ({
|
|
|
8194
8316
|
const errorTitle = title || getDefaultTitle();
|
|
8195
8317
|
const errorDescription = description || getDefaultDescription();
|
|
8196
8318
|
const errorCode = getErrorCode();
|
|
8197
|
-
return /* @__PURE__ */ (0,
|
|
8319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
8198
8320
|
"div",
|
|
8199
8321
|
{
|
|
8200
8322
|
className: cn(
|
|
8201
8323
|
"flex flex-col w-full h-screen items-center justify-center bg-background-50 px-4",
|
|
8202
8324
|
className
|
|
8203
8325
|
),
|
|
8204
|
-
children: /* @__PURE__ */ (0,
|
|
8326
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
8205
8327
|
"main",
|
|
8206
8328
|
{
|
|
8207
8329
|
role: "main",
|
|
8208
8330
|
"aria-labelledby": "error-title",
|
|
8209
8331
|
"aria-describedby": "error-description",
|
|
8210
8332
|
className: "flex flex-col items-center text-center max-w-md space-y-6",
|
|
8211
|
-
children: /* @__PURE__ */ (0,
|
|
8212
|
-
/* @__PURE__ */ (0,
|
|
8333
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("section", { "aria-label": `Erro ${errorCode}`, children: [
|
|
8334
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
8213
8335
|
"div",
|
|
8214
8336
|
{
|
|
8215
8337
|
className: "text-8xl font-bold text-primary-300 select-none",
|
|
@@ -8217,8 +8339,8 @@ var NotFound = ({
|
|
|
8217
8339
|
children: errorCode
|
|
8218
8340
|
}
|
|
8219
8341
|
),
|
|
8220
|
-
/* @__PURE__ */ (0,
|
|
8221
|
-
/* @__PURE__ */ (0,
|
|
8342
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("header", { className: "space-y-2", children: [
|
|
8343
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
8222
8344
|
Text_default,
|
|
8223
8345
|
{
|
|
8224
8346
|
size: "xl",
|
|
@@ -8229,9 +8351,9 @@ var NotFound = ({
|
|
|
8229
8351
|
children: errorTitle
|
|
8230
8352
|
}
|
|
8231
8353
|
),
|
|
8232
|
-
/* @__PURE__ */ (0,
|
|
8354
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text_default, { size: "md", className: "text-text-600", id: "error-description", children: errorDescription })
|
|
8233
8355
|
] }),
|
|
8234
|
-
onButtonClick && /* @__PURE__ */ (0,
|
|
8356
|
+
onButtonClick && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("nav", { "aria-label": "Navega\xE7\xE3o de erro", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
8235
8357
|
Button_default,
|
|
8236
8358
|
{
|
|
8237
8359
|
onClick: handleButtonClick,
|
|
@@ -8254,12 +8376,12 @@ var NotFound_default = NotFound;
|
|
|
8254
8376
|
// src/components/VideoPlayer/VideoPlayer.tsx
|
|
8255
8377
|
var import_react27 = require("react");
|
|
8256
8378
|
var import_react_dom = require("react-dom");
|
|
8257
|
-
var
|
|
8379
|
+
var import_phosphor_react20 = require("phosphor-react");
|
|
8258
8380
|
|
|
8259
8381
|
// src/components/DownloadButton/DownloadButton.tsx
|
|
8260
8382
|
var import_react26 = require("react");
|
|
8261
|
-
var
|
|
8262
|
-
var
|
|
8383
|
+
var import_phosphor_react19 = require("phosphor-react");
|
|
8384
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
8263
8385
|
var getMimeType = (url) => {
|
|
8264
8386
|
const extension = getFileExtension(url);
|
|
8265
8387
|
const mimeTypes = {
|
|
@@ -8416,10 +8538,10 @@ var DownloadButton = ({
|
|
|
8416
8538
|
if (!hasContent) {
|
|
8417
8539
|
return null;
|
|
8418
8540
|
}
|
|
8419
|
-
return /* @__PURE__ */ (0,
|
|
8541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: cn("flex items-center", className), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
8420
8542
|
IconButton_default,
|
|
8421
8543
|
{
|
|
8422
|
-
icon: /* @__PURE__ */ (0,
|
|
8544
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_phosphor_react19.DownloadSimple, { size: 24 }),
|
|
8423
8545
|
onClick: handleDownload,
|
|
8424
8546
|
disabled: disabled || isDownloading,
|
|
8425
8547
|
"aria-label": (() => {
|
|
@@ -8440,7 +8562,7 @@ var DownloadButton = ({
|
|
|
8440
8562
|
var DownloadButton_default = DownloadButton;
|
|
8441
8563
|
|
|
8442
8564
|
// src/components/VideoPlayer/VideoPlayer.tsx
|
|
8443
|
-
var
|
|
8565
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
8444
8566
|
var CONTROLS_HIDE_TIMEOUT = 3e3;
|
|
8445
8567
|
var LEAVE_HIDE_TIMEOUT = 1e3;
|
|
8446
8568
|
var INIT_DELAY = 100;
|
|
@@ -8456,7 +8578,7 @@ var ProgressBar2 = ({
|
|
|
8456
8578
|
progressPercentage,
|
|
8457
8579
|
onSeek,
|
|
8458
8580
|
className = "px-4 pb-2"
|
|
8459
|
-
}) => /* @__PURE__ */ (0,
|
|
8581
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
8460
8582
|
"input",
|
|
8461
8583
|
{
|
|
8462
8584
|
type: "range",
|
|
@@ -8478,17 +8600,17 @@ var VolumeControls = ({
|
|
|
8478
8600
|
onToggleMute,
|
|
8479
8601
|
iconSize = 24,
|
|
8480
8602
|
showSlider = true
|
|
8481
|
-
}) => /* @__PURE__ */ (0,
|
|
8482
|
-
/* @__PURE__ */ (0,
|
|
8603
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
8604
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
8483
8605
|
IconButton_default,
|
|
8484
8606
|
{
|
|
8485
|
-
icon: isMuted ? /* @__PURE__ */ (0,
|
|
8607
|
+
icon: isMuted ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_phosphor_react20.SpeakerSlash, { size: iconSize }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_phosphor_react20.SpeakerHigh, { size: iconSize }),
|
|
8486
8608
|
onClick: onToggleMute,
|
|
8487
8609
|
"aria-label": isMuted ? "Unmute" : "Mute",
|
|
8488
8610
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
8489
8611
|
}
|
|
8490
8612
|
),
|
|
8491
|
-
showSlider && /* @__PURE__ */ (0,
|
|
8613
|
+
showSlider && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
8492
8614
|
"input",
|
|
8493
8615
|
{
|
|
8494
8616
|
type: "range",
|
|
@@ -8545,7 +8667,7 @@ var SpeedMenu = ({
|
|
|
8545
8667
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
8546
8668
|
};
|
|
8547
8669
|
}, [showSpeedMenu, onToggleMenu]);
|
|
8548
|
-
const menuContent = /* @__PURE__ */ (0,
|
|
8670
|
+
const menuContent = /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
8549
8671
|
"div",
|
|
8550
8672
|
{
|
|
8551
8673
|
ref: speedMenuRef,
|
|
@@ -8556,7 +8678,7 @@ var SpeedMenu = ({
|
|
|
8556
8678
|
top: `${position.top}px`,
|
|
8557
8679
|
left: `${position.left}px`
|
|
8558
8680
|
},
|
|
8559
|
-
children: [0.5, 0.75, 1, 1.25, 1.5, 2].map((speed) => /* @__PURE__ */ (0,
|
|
8681
|
+
children: [0.5, 0.75, 1, 1.25, 1.5, 2].map((speed) => /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
8560
8682
|
"button",
|
|
8561
8683
|
{
|
|
8562
8684
|
role: "menuitemradio",
|
|
@@ -8573,12 +8695,12 @@ var SpeedMenu = ({
|
|
|
8573
8695
|
}
|
|
8574
8696
|
);
|
|
8575
8697
|
const portalContent = showSpeedMenu && globalThis.window !== void 0 && globalThis.document !== void 0 && !!globalThis.document?.body ? (0, import_react_dom.createPortal)(menuContent, globalThis.document.body) : null;
|
|
8576
|
-
return /* @__PURE__ */ (0,
|
|
8577
|
-
/* @__PURE__ */ (0,
|
|
8698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "relative", ref: speedMenuContainerRef, children: [
|
|
8699
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
8578
8700
|
IconButton_default,
|
|
8579
8701
|
{
|
|
8580
8702
|
ref: buttonRef,
|
|
8581
|
-
icon: /* @__PURE__ */ (0,
|
|
8703
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_phosphor_react20.DotsThreeVertical, { size: iconSize }),
|
|
8582
8704
|
onClick: onToggleMenu,
|
|
8583
8705
|
"aria-label": "Playback speed",
|
|
8584
8706
|
"aria-haspopup": "menu",
|
|
@@ -9094,10 +9216,10 @@ var VideoPlayer = ({
|
|
|
9094
9216
|
]
|
|
9095
9217
|
);
|
|
9096
9218
|
const groupedSubTitleValid = subtitles && subtitlesValidation === "valid";
|
|
9097
|
-
return /* @__PURE__ */ (0,
|
|
9098
|
-
(title || subtitleText) && /* @__PURE__ */ (0,
|
|
9099
|
-
/* @__PURE__ */ (0,
|
|
9100
|
-
title && /* @__PURE__ */ (0,
|
|
9219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: cn("flex flex-col", className), children: [
|
|
9220
|
+
(title || subtitleText) && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "bg-subject-1 px-8 py-4 flex items-end justify-between min-h-20", children: [
|
|
9221
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
9222
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9101
9223
|
Text_default,
|
|
9102
9224
|
{
|
|
9103
9225
|
as: "h2",
|
|
@@ -9108,7 +9230,7 @@ var VideoPlayer = ({
|
|
|
9108
9230
|
children: title
|
|
9109
9231
|
}
|
|
9110
9232
|
),
|
|
9111
|
-
subtitleText && /* @__PURE__ */ (0,
|
|
9233
|
+
subtitleText && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9112
9234
|
Text_default,
|
|
9113
9235
|
{
|
|
9114
9236
|
as: "p",
|
|
@@ -9120,7 +9242,7 @@ var VideoPlayer = ({
|
|
|
9120
9242
|
}
|
|
9121
9243
|
)
|
|
9122
9244
|
] }),
|
|
9123
|
-
showDownloadButton && downloadContent && /* @__PURE__ */ (0,
|
|
9245
|
+
showDownloadButton && downloadContent && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9124
9246
|
DownloadButton_default,
|
|
9125
9247
|
{
|
|
9126
9248
|
content: downloadContent,
|
|
@@ -9132,7 +9254,7 @@ var VideoPlayer = ({
|
|
|
9132
9254
|
}
|
|
9133
9255
|
)
|
|
9134
9256
|
] }),
|
|
9135
|
-
/* @__PURE__ */ (0,
|
|
9257
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
9136
9258
|
"section",
|
|
9137
9259
|
{
|
|
9138
9260
|
className: cn(
|
|
@@ -9147,7 +9269,7 @@ var VideoPlayer = ({
|
|
|
9147
9269
|
onTouchStart: handleMouseEnter,
|
|
9148
9270
|
onMouseLeave: handleMouseLeave,
|
|
9149
9271
|
children: [
|
|
9150
|
-
/* @__PURE__ */ (0,
|
|
9272
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9151
9273
|
"video",
|
|
9152
9274
|
{
|
|
9153
9275
|
ref: videoRef,
|
|
@@ -9162,7 +9284,7 @@ var VideoPlayer = ({
|
|
|
9162
9284
|
onKeyDown: handleVideoKeyDown,
|
|
9163
9285
|
tabIndex: 0,
|
|
9164
9286
|
"aria-label": title ? `Video: ${title}` : "Video player",
|
|
9165
|
-
children: /* @__PURE__ */ (0,
|
|
9287
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9166
9288
|
"track",
|
|
9167
9289
|
{
|
|
9168
9290
|
ref: trackRef,
|
|
@@ -9175,17 +9297,17 @@ var VideoPlayer = ({
|
|
|
9175
9297
|
)
|
|
9176
9298
|
}
|
|
9177
9299
|
),
|
|
9178
|
-
!isPlaying && /* @__PURE__ */ (0,
|
|
9300
|
+
!isPlaying && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9179
9301
|
"div",
|
|
9180
9302
|
{
|
|
9181
9303
|
className: cn(
|
|
9182
9304
|
"absolute inset-0 flex bg-black/30 transition-opacity",
|
|
9183
9305
|
getCenterPlayButtonPosition()
|
|
9184
9306
|
),
|
|
9185
|
-
children: /* @__PURE__ */ (0,
|
|
9307
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9186
9308
|
IconButton_default,
|
|
9187
9309
|
{
|
|
9188
|
-
icon: /* @__PURE__ */ (0,
|
|
9310
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_phosphor_react20.Play, { size: 32, weight: "regular", className: "ml-1" }),
|
|
9189
9311
|
onClick: togglePlayPause,
|
|
9190
9312
|
"aria-label": "Play video",
|
|
9191
9313
|
className: "!bg-transparent !text-white !w-auto !h-auto hover:!bg-transparent hover:!text-gray-200"
|
|
@@ -9193,17 +9315,17 @@ var VideoPlayer = ({
|
|
|
9193
9315
|
)
|
|
9194
9316
|
}
|
|
9195
9317
|
),
|
|
9196
|
-
/* @__PURE__ */ (0,
|
|
9318
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9197
9319
|
"div",
|
|
9198
9320
|
{
|
|
9199
9321
|
className: cn(
|
|
9200
9322
|
"absolute top-0 left-0 right-0 p-4 bg-gradient-to-b from-black/70 to-transparent transition-opacity",
|
|
9201
9323
|
getTopControlsOpacity()
|
|
9202
9324
|
),
|
|
9203
|
-
children: /* @__PURE__ */ (0,
|
|
9325
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9204
9326
|
IconButton_default,
|
|
9205
9327
|
{
|
|
9206
|
-
icon: isFullscreen ? /* @__PURE__ */ (0,
|
|
9328
|
+
icon: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_phosphor_react20.ArrowsInSimple, { size: 24 }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_phosphor_react20.ArrowsOutSimple, { size: 24 }),
|
|
9207
9329
|
onClick: toggleFullscreen,
|
|
9208
9330
|
"aria-label": isFullscreen ? "Exit fullscreen" : "Enter fullscreen",
|
|
9209
9331
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
@@ -9211,7 +9333,7 @@ var VideoPlayer = ({
|
|
|
9211
9333
|
) })
|
|
9212
9334
|
}
|
|
9213
9335
|
),
|
|
9214
|
-
/* @__PURE__ */ (0,
|
|
9336
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
9215
9337
|
"div",
|
|
9216
9338
|
{
|
|
9217
9339
|
className: cn(
|
|
@@ -9219,7 +9341,7 @@ var VideoPlayer = ({
|
|
|
9219
9341
|
getBottomControlsOpacity()
|
|
9220
9342
|
),
|
|
9221
9343
|
children: [
|
|
9222
|
-
/* @__PURE__ */ (0,
|
|
9344
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9223
9345
|
ProgressBar2,
|
|
9224
9346
|
{
|
|
9225
9347
|
currentTime,
|
|
@@ -9229,7 +9351,7 @@ var VideoPlayer = ({
|
|
|
9229
9351
|
className: getProgressBarPadding()
|
|
9230
9352
|
}
|
|
9231
9353
|
),
|
|
9232
|
-
/* @__PURE__ */ (0,
|
|
9354
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
9233
9355
|
"div",
|
|
9234
9356
|
{
|
|
9235
9357
|
className: cn(
|
|
@@ -9237,17 +9359,17 @@ var VideoPlayer = ({
|
|
|
9237
9359
|
getControlsPadding()
|
|
9238
9360
|
),
|
|
9239
9361
|
children: [
|
|
9240
|
-
/* @__PURE__ */ (0,
|
|
9241
|
-
/* @__PURE__ */ (0,
|
|
9362
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: cn("flex items-center", getControlsGap()), children: [
|
|
9363
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9242
9364
|
IconButton_default,
|
|
9243
9365
|
{
|
|
9244
|
-
icon: isPlaying ? /* @__PURE__ */ (0,
|
|
9366
|
+
icon: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_phosphor_react20.Pause, { size: getIconSize2() }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_phosphor_react20.Play, { size: getIconSize2() }),
|
|
9245
9367
|
onClick: togglePlayPause,
|
|
9246
9368
|
"aria-label": isPlaying ? "Pause" : "Play",
|
|
9247
9369
|
className: "!bg-transparent !text-white hover:!bg-white/20"
|
|
9248
9370
|
}
|
|
9249
9371
|
),
|
|
9250
|
-
/* @__PURE__ */ (0,
|
|
9372
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9251
9373
|
VolumeControls,
|
|
9252
9374
|
{
|
|
9253
9375
|
volume,
|
|
@@ -9258,10 +9380,10 @@ var VideoPlayer = ({
|
|
|
9258
9380
|
showSlider: !isUltraSmallMobile
|
|
9259
9381
|
}
|
|
9260
9382
|
),
|
|
9261
|
-
groupedSubTitleValid && /* @__PURE__ */ (0,
|
|
9383
|
+
groupedSubTitleValid && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9262
9384
|
IconButton_default,
|
|
9263
9385
|
{
|
|
9264
|
-
icon: /* @__PURE__ */ (0,
|
|
9386
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_phosphor_react20.ClosedCaptioning, { size: getIconSize2() }),
|
|
9265
9387
|
onClick: toggleCaptions,
|
|
9266
9388
|
"aria-label": showCaptions ? "Hide captions" : "Show captions",
|
|
9267
9389
|
className: cn(
|
|
@@ -9270,13 +9392,13 @@ var VideoPlayer = ({
|
|
|
9270
9392
|
)
|
|
9271
9393
|
}
|
|
9272
9394
|
),
|
|
9273
|
-
/* @__PURE__ */ (0,
|
|
9395
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Text_default, { size: "sm", weight: "medium", color: "text-white", children: [
|
|
9274
9396
|
formatTime(currentTime),
|
|
9275
9397
|
" / ",
|
|
9276
9398
|
formatTime(duration)
|
|
9277
9399
|
] })
|
|
9278
9400
|
] }),
|
|
9279
|
-
/* @__PURE__ */ (0,
|
|
9401
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "flex items-center gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
9280
9402
|
SpeedMenu,
|
|
9281
9403
|
{
|
|
9282
9404
|
showSpeedMenu,
|
|
@@ -9303,8 +9425,8 @@ var VideoPlayer_default = VideoPlayer;
|
|
|
9303
9425
|
|
|
9304
9426
|
// src/components/Whiteboard/Whiteboard.tsx
|
|
9305
9427
|
var import_react28 = require("react");
|
|
9306
|
-
var
|
|
9307
|
-
var
|
|
9428
|
+
var import_phosphor_react21 = require("phosphor-react");
|
|
9429
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
9308
9430
|
var IMAGE_WIDTH = 225;
|
|
9309
9431
|
var IMAGE_HEIGHT = 90;
|
|
9310
9432
|
var Whiteboard = ({
|
|
@@ -9342,7 +9464,7 @@ var Whiteboard = ({
|
|
|
9342
9464
|
4: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"
|
|
9343
9465
|
}[imagesPerRow];
|
|
9344
9466
|
if (!images || images.length === 0) {
|
|
9345
|
-
return /* @__PURE__ */ (0,
|
|
9467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9346
9468
|
"div",
|
|
9347
9469
|
{
|
|
9348
9470
|
className: cn(
|
|
@@ -9350,11 +9472,11 @@ var Whiteboard = ({
|
|
|
9350
9472
|
className
|
|
9351
9473
|
),
|
|
9352
9474
|
...rest,
|
|
9353
|
-
children: /* @__PURE__ */ (0,
|
|
9475
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-gray-400 text-sm", children: "Nenhuma imagem dispon\xEDvel" })
|
|
9354
9476
|
}
|
|
9355
9477
|
);
|
|
9356
9478
|
}
|
|
9357
|
-
return /* @__PURE__ */ (0,
|
|
9479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9358
9480
|
"div",
|
|
9359
9481
|
{
|
|
9360
9482
|
className: cn(
|
|
@@ -9362,7 +9484,7 @@ var Whiteboard = ({
|
|
|
9362
9484
|
className
|
|
9363
9485
|
),
|
|
9364
9486
|
...rest,
|
|
9365
|
-
children: /* @__PURE__ */ (0,
|
|
9487
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: cn("grid gap-4", gridColsClass), children: images.map((image) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
9366
9488
|
"div",
|
|
9367
9489
|
{
|
|
9368
9490
|
className: "relative group overflow-hidden bg-gray-100 rounded-lg",
|
|
@@ -9370,7 +9492,7 @@ var Whiteboard = ({
|
|
|
9370
9492
|
width: `${IMAGE_WIDTH}px`
|
|
9371
9493
|
},
|
|
9372
9494
|
children: [
|
|
9373
|
-
/* @__PURE__ */ (0,
|
|
9495
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9374
9496
|
"div",
|
|
9375
9497
|
{
|
|
9376
9498
|
className: "relative",
|
|
@@ -9378,8 +9500,8 @@ var Whiteboard = ({
|
|
|
9378
9500
|
width: `${IMAGE_WIDTH}px`,
|
|
9379
9501
|
height: `${IMAGE_HEIGHT}px`
|
|
9380
9502
|
},
|
|
9381
|
-
children: imageErrors.has(image.id) ? /* @__PURE__ */ (0,
|
|
9382
|
-
/* @__PURE__ */ (0,
|
|
9503
|
+
children: imageErrors.has(image.id) ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "absolute inset-0 flex items-center justify-center bg-gray-200", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-gray-500 text-sm text-center px-2", children: "Imagem indispon\xEDvel" }) }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
9504
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9383
9505
|
"img",
|
|
9384
9506
|
{
|
|
9385
9507
|
src: image.imageUrl,
|
|
@@ -9389,19 +9511,19 @@ var Whiteboard = ({
|
|
|
9389
9511
|
onError: () => handleImageError(image.id)
|
|
9390
9512
|
}
|
|
9391
9513
|
),
|
|
9392
|
-
/* @__PURE__ */ (0,
|
|
9514
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "absolute inset-0 bg-gradient-to-t from-black/20 to-transparent" })
|
|
9393
9515
|
] })
|
|
9394
9516
|
}
|
|
9395
9517
|
),
|
|
9396
|
-
showDownload && /* @__PURE__ */ (0,
|
|
9518
|
+
showDownload && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9397
9519
|
"button",
|
|
9398
9520
|
{
|
|
9399
9521
|
type: "button",
|
|
9400
9522
|
onClick: () => handleDownload(image),
|
|
9401
9523
|
className: "cursor-pointer absolute bottom-3 right-3 flex items-center justify-center bg-black/20 backdrop-blur-sm rounded hover:bg-black/30 transition-colors duration-200 group/button w-6 h-6",
|
|
9402
9524
|
"aria-label": `Download ${image.title || "imagem"}`,
|
|
9403
|
-
children: /* @__PURE__ */ (0,
|
|
9404
|
-
|
|
9525
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
9526
|
+
import_phosphor_react21.ArrowsOut,
|
|
9405
9527
|
{
|
|
9406
9528
|
size: 24,
|
|
9407
9529
|
weight: "regular",
|
|
@@ -9422,7 +9544,7 @@ var Whiteboard_default = Whiteboard;
|
|
|
9422
9544
|
// src/components/Auth/Auth.tsx
|
|
9423
9545
|
var import_react29 = require("react");
|
|
9424
9546
|
var import_react_router_dom = require("react-router-dom");
|
|
9425
|
-
var
|
|
9547
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
9426
9548
|
var AuthContext = (0, import_react29.createContext)(void 0);
|
|
9427
9549
|
var AuthProvider = ({
|
|
9428
9550
|
children,
|
|
@@ -9492,7 +9614,7 @@ var AuthProvider = ({
|
|
|
9492
9614
|
}),
|
|
9493
9615
|
[authState, checkAuth, signOut]
|
|
9494
9616
|
);
|
|
9495
|
-
return /* @__PURE__ */ (0,
|
|
9617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(AuthContext.Provider, { value: contextValue, children });
|
|
9496
9618
|
};
|
|
9497
9619
|
var useAuth = () => {
|
|
9498
9620
|
const context = (0, import_react29.useContext)(AuthContext);
|
|
@@ -9508,9 +9630,9 @@ var ProtectedRoute = ({
|
|
|
9508
9630
|
additionalCheck
|
|
9509
9631
|
}) => {
|
|
9510
9632
|
const { isAuthenticated, isLoading, ...authState } = useAuth();
|
|
9511
|
-
const defaultLoadingComponent = /* @__PURE__ */ (0,
|
|
9633
|
+
const defaultLoadingComponent = /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "text-text-950 text-lg", children: "Carregando..." }) });
|
|
9512
9634
|
if (isLoading) {
|
|
9513
|
-
return /* @__PURE__ */ (0,
|
|
9635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children: loadingComponent || defaultLoadingComponent });
|
|
9514
9636
|
}
|
|
9515
9637
|
if (!isAuthenticated) {
|
|
9516
9638
|
if (typeof window !== "undefined") {
|
|
@@ -9521,12 +9643,12 @@ var ProtectedRoute = ({
|
|
|
9521
9643
|
return null;
|
|
9522
9644
|
}
|
|
9523
9645
|
}
|
|
9524
|
-
return /* @__PURE__ */ (0,
|
|
9646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_router_dom.Navigate, { to: redirectTo, replace: true });
|
|
9525
9647
|
}
|
|
9526
9648
|
if (additionalCheck && !additionalCheck({ isAuthenticated, isLoading, ...authState })) {
|
|
9527
|
-
return /* @__PURE__ */ (0,
|
|
9649
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_router_dom.Navigate, { to: redirectTo, replace: true });
|
|
9528
9650
|
}
|
|
9529
|
-
return /* @__PURE__ */ (0,
|
|
9651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children });
|
|
9530
9652
|
};
|
|
9531
9653
|
var PublicRoute = ({
|
|
9532
9654
|
children,
|
|
@@ -9536,15 +9658,15 @@ var PublicRoute = ({
|
|
|
9536
9658
|
}) => {
|
|
9537
9659
|
const { isAuthenticated, isLoading } = useAuth();
|
|
9538
9660
|
if (checkAuthBeforeRender && isLoading) {
|
|
9539
|
-
return /* @__PURE__ */ (0,
|
|
9661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "text-text-950 text-lg", children: "Carregando..." }) });
|
|
9540
9662
|
}
|
|
9541
9663
|
if (isAuthenticated && redirectIfAuthenticated) {
|
|
9542
|
-
return /* @__PURE__ */ (0,
|
|
9664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_router_dom.Navigate, { to: redirectTo, replace: true });
|
|
9543
9665
|
}
|
|
9544
|
-
return /* @__PURE__ */ (0,
|
|
9666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children });
|
|
9545
9667
|
};
|
|
9546
9668
|
var withAuth = (Component, options = {}) => {
|
|
9547
|
-
return (props) => /* @__PURE__ */ (0,
|
|
9669
|
+
return (props) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ProtectedRoute, { ...options, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Component, { ...props }) });
|
|
9548
9670
|
};
|
|
9549
9671
|
var useAuthGuard = (options = {}) => {
|
|
9550
9672
|
const authState = useAuth();
|
|
@@ -9559,7 +9681,7 @@ var useAuthGuard = (options = {}) => {
|
|
|
9559
9681
|
var useRouteAuth = (fallbackPath = "/") => {
|
|
9560
9682
|
const { isAuthenticated, isLoading } = useAuth();
|
|
9561
9683
|
const location = (0, import_react_router_dom.useLocation)();
|
|
9562
|
-
const redirectToLogin = () => /* @__PURE__ */ (0,
|
|
9684
|
+
const redirectToLogin = () => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_router_dom.Navigate, { to: fallbackPath, state: { from: location }, replace: true });
|
|
9563
9685
|
return {
|
|
9564
9686
|
isAuthenticated,
|
|
9565
9687
|
isLoading,
|
|
@@ -9594,8 +9716,8 @@ var getRootDomain = () => {
|
|
|
9594
9716
|
|
|
9595
9717
|
// src/components/Accordation/Accordation.tsx
|
|
9596
9718
|
var import_react30 = require("react");
|
|
9597
|
-
var
|
|
9598
|
-
var
|
|
9719
|
+
var import_phosphor_react22 = require("phosphor-react");
|
|
9720
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
9599
9721
|
var CardAccordation = (0, import_react30.forwardRef)(
|
|
9600
9722
|
({
|
|
9601
9723
|
trigger,
|
|
@@ -9618,7 +9740,7 @@ var CardAccordation = (0, import_react30.forwardRef)(
|
|
|
9618
9740
|
handleToggle();
|
|
9619
9741
|
}
|
|
9620
9742
|
};
|
|
9621
|
-
return /* @__PURE__ */ (0,
|
|
9743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
9622
9744
|
CardBase,
|
|
9623
9745
|
{
|
|
9624
9746
|
ref,
|
|
@@ -9628,7 +9750,7 @@ var CardAccordation = (0, import_react30.forwardRef)(
|
|
|
9628
9750
|
className: cn("overflow-hidden", className),
|
|
9629
9751
|
...props,
|
|
9630
9752
|
children: [
|
|
9631
|
-
/* @__PURE__ */ (0,
|
|
9753
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
9632
9754
|
"button",
|
|
9633
9755
|
{
|
|
9634
9756
|
onClick: handleToggle,
|
|
@@ -9638,8 +9760,8 @@ var CardAccordation = (0, import_react30.forwardRef)(
|
|
|
9638
9760
|
"aria-controls": "accordion-content",
|
|
9639
9761
|
children: [
|
|
9640
9762
|
trigger,
|
|
9641
|
-
/* @__PURE__ */ (0,
|
|
9642
|
-
|
|
9763
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
9764
|
+
import_phosphor_react22.CaretRight,
|
|
9643
9765
|
{
|
|
9644
9766
|
size: 20,
|
|
9645
9767
|
className: cn(
|
|
@@ -9652,7 +9774,7 @@ var CardAccordation = (0, import_react30.forwardRef)(
|
|
|
9652
9774
|
]
|
|
9653
9775
|
}
|
|
9654
9776
|
),
|
|
9655
|
-
/* @__PURE__ */ (0,
|
|
9777
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
9656
9778
|
"div",
|
|
9657
9779
|
{
|
|
9658
9780
|
id: contentId,
|
|
@@ -9661,7 +9783,7 @@ var CardAccordation = (0, import_react30.forwardRef)(
|
|
|
9661
9783
|
isExpanded ? "max-h-screen opacity-100" : "max-h-0 opacity-0"
|
|
9662
9784
|
),
|
|
9663
9785
|
"data-testid": "accordion-content",
|
|
9664
|
-
children: /* @__PURE__ */ (0,
|
|
9786
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "p-4 pt-0 border-border-50", children })
|
|
9665
9787
|
}
|
|
9666
9788
|
)
|
|
9667
9789
|
]
|
|
@@ -9671,9 +9793,9 @@ var CardAccordation = (0, import_react30.forwardRef)(
|
|
|
9671
9793
|
);
|
|
9672
9794
|
|
|
9673
9795
|
// src/components/Alternative/Alternative.tsx
|
|
9674
|
-
var
|
|
9796
|
+
var import_phosphor_react23 = require("phosphor-react");
|
|
9675
9797
|
var import_react31 = require("react");
|
|
9676
|
-
var
|
|
9798
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
9677
9799
|
var AlternativesList = ({
|
|
9678
9800
|
alternatives,
|
|
9679
9801
|
name,
|
|
@@ -9704,9 +9826,9 @@ var AlternativesList = ({
|
|
|
9704
9826
|
const getStatusBadge2 = (status) => {
|
|
9705
9827
|
switch (status) {
|
|
9706
9828
|
case "correct":
|
|
9707
|
-
return /* @__PURE__ */ (0,
|
|
9829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_phosphor_react23.CheckCircle, {}), children: "Resposta correta" });
|
|
9708
9830
|
case "incorrect":
|
|
9709
|
-
return /* @__PURE__ */ (0,
|
|
9831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_phosphor_react23.XCircle, {}), children: "Resposta incorreta" });
|
|
9710
9832
|
default:
|
|
9711
9833
|
return null;
|
|
9712
9834
|
}
|
|
@@ -9736,10 +9858,10 @@ var AlternativesList = ({
|
|
|
9736
9858
|
const renderRadio = () => {
|
|
9737
9859
|
const radioClasses = `w-6 h-6 rounded-full border-2 cursor-default transition-all duration-200 flex items-center justify-center ${isUserSelected ? "border-primary-950 bg-background" : "border-border-400 bg-background"}`;
|
|
9738
9860
|
const dotClasses = "w-3 h-3 rounded-full bg-primary-950 transition-all duration-200";
|
|
9739
|
-
return /* @__PURE__ */ (0,
|
|
9861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: radioClasses, children: isUserSelected && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: dotClasses }) });
|
|
9740
9862
|
};
|
|
9741
9863
|
if (layout === "detailed") {
|
|
9742
|
-
return /* @__PURE__ */ (0,
|
|
9864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9743
9865
|
"div",
|
|
9744
9866
|
{
|
|
9745
9867
|
className: cn(
|
|
@@ -9747,11 +9869,11 @@ var AlternativesList = ({
|
|
|
9747
9869
|
statusStyles,
|
|
9748
9870
|
alternative.disabled ? "opacity-50" : ""
|
|
9749
9871
|
),
|
|
9750
|
-
children: /* @__PURE__ */ (0,
|
|
9751
|
-
/* @__PURE__ */ (0,
|
|
9752
|
-
/* @__PURE__ */ (0,
|
|
9753
|
-
/* @__PURE__ */ (0,
|
|
9754
|
-
/* @__PURE__ */ (0,
|
|
9872
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
9873
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
9874
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mt-1", children: renderRadio() }),
|
|
9875
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex-1", children: [
|
|
9876
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9755
9877
|
"p",
|
|
9756
9878
|
{
|
|
9757
9879
|
className: cn(
|
|
@@ -9761,16 +9883,16 @@ var AlternativesList = ({
|
|
|
9761
9883
|
children: alternative.label
|
|
9762
9884
|
}
|
|
9763
9885
|
),
|
|
9764
|
-
alternative.description && /* @__PURE__ */ (0,
|
|
9886
|
+
alternative.description && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
|
|
9765
9887
|
] })
|
|
9766
9888
|
] }),
|
|
9767
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
9889
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
9768
9890
|
] })
|
|
9769
9891
|
},
|
|
9770
9892
|
alternativeId
|
|
9771
9893
|
);
|
|
9772
9894
|
}
|
|
9773
|
-
return /* @__PURE__ */ (0,
|
|
9895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
9774
9896
|
"div",
|
|
9775
9897
|
{
|
|
9776
9898
|
className: cn(
|
|
@@ -9779,9 +9901,9 @@ var AlternativesList = ({
|
|
|
9779
9901
|
alternative.disabled ? "opacity-50" : ""
|
|
9780
9902
|
),
|
|
9781
9903
|
children: [
|
|
9782
|
-
/* @__PURE__ */ (0,
|
|
9904
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
9783
9905
|
renderRadio(),
|
|
9784
|
-
/* @__PURE__ */ (0,
|
|
9906
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9785
9907
|
"span",
|
|
9786
9908
|
{
|
|
9787
9909
|
className: cn(
|
|
@@ -9792,14 +9914,14 @@ var AlternativesList = ({
|
|
|
9792
9914
|
}
|
|
9793
9915
|
)
|
|
9794
9916
|
] }),
|
|
9795
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
9917
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
9796
9918
|
]
|
|
9797
9919
|
},
|
|
9798
9920
|
alternativeId
|
|
9799
9921
|
);
|
|
9800
9922
|
};
|
|
9801
9923
|
if (isReadonly) {
|
|
9802
|
-
return /* @__PURE__ */ (0,
|
|
9924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9803
9925
|
"div",
|
|
9804
9926
|
{
|
|
9805
9927
|
className: cn("flex flex-col", getLayoutClasses(), "w-full", className),
|
|
@@ -9809,7 +9931,7 @@ var AlternativesList = ({
|
|
|
9809
9931
|
}
|
|
9810
9932
|
);
|
|
9811
9933
|
}
|
|
9812
|
-
return /* @__PURE__ */ (0,
|
|
9934
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9813
9935
|
RadioGroup,
|
|
9814
9936
|
{
|
|
9815
9937
|
name: groupName,
|
|
@@ -9826,7 +9948,7 @@ var AlternativesList = ({
|
|
|
9826
9948
|
const statusStyles = getStatusStyles2(alternative.status, false);
|
|
9827
9949
|
const statusBadge = getStatusBadge2(alternative.status);
|
|
9828
9950
|
if (layout === "detailed") {
|
|
9829
|
-
return /* @__PURE__ */ (0,
|
|
9951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9830
9952
|
"div",
|
|
9831
9953
|
{
|
|
9832
9954
|
className: cn(
|
|
@@ -9834,9 +9956,9 @@ var AlternativesList = ({
|
|
|
9834
9956
|
statusStyles,
|
|
9835
9957
|
alternative.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
9836
9958
|
),
|
|
9837
|
-
children: /* @__PURE__ */ (0,
|
|
9838
|
-
/* @__PURE__ */ (0,
|
|
9839
|
-
/* @__PURE__ */ (0,
|
|
9959
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
|
|
9960
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-start gap-3 flex-1", children: [
|
|
9961
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9840
9962
|
RadioGroupItem,
|
|
9841
9963
|
{
|
|
9842
9964
|
value: alternative.value,
|
|
@@ -9845,8 +9967,8 @@ var AlternativesList = ({
|
|
|
9845
9967
|
className: "mt-1"
|
|
9846
9968
|
}
|
|
9847
9969
|
),
|
|
9848
|
-
/* @__PURE__ */ (0,
|
|
9849
|
-
/* @__PURE__ */ (0,
|
|
9970
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex-1", children: [
|
|
9971
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9850
9972
|
"label",
|
|
9851
9973
|
{
|
|
9852
9974
|
htmlFor: alternativeId,
|
|
@@ -9858,16 +9980,16 @@ var AlternativesList = ({
|
|
|
9858
9980
|
children: alternative.label
|
|
9859
9981
|
}
|
|
9860
9982
|
),
|
|
9861
|
-
alternative.description && /* @__PURE__ */ (0,
|
|
9983
|
+
alternative.description && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-sm text-text-600 mt-1", children: alternative.description })
|
|
9862
9984
|
] })
|
|
9863
9985
|
] }),
|
|
9864
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
9986
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
9865
9987
|
] })
|
|
9866
9988
|
},
|
|
9867
9989
|
alternativeId
|
|
9868
9990
|
);
|
|
9869
9991
|
}
|
|
9870
|
-
return /* @__PURE__ */ (0,
|
|
9992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
9871
9993
|
"div",
|
|
9872
9994
|
{
|
|
9873
9995
|
className: cn(
|
|
@@ -9876,8 +9998,8 @@ var AlternativesList = ({
|
|
|
9876
9998
|
alternative.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
9877
9999
|
),
|
|
9878
10000
|
children: [
|
|
9879
|
-
/* @__PURE__ */ (0,
|
|
9880
|
-
/* @__PURE__ */ (0,
|
|
10001
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
10002
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9881
10003
|
RadioGroupItem,
|
|
9882
10004
|
{
|
|
9883
10005
|
value: alternative.value,
|
|
@@ -9885,7 +10007,7 @@ var AlternativesList = ({
|
|
|
9885
10007
|
disabled: alternative.disabled
|
|
9886
10008
|
}
|
|
9887
10009
|
),
|
|
9888
|
-
/* @__PURE__ */ (0,
|
|
10010
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
9889
10011
|
"label",
|
|
9890
10012
|
{
|
|
9891
10013
|
htmlFor: alternativeId,
|
|
@@ -9898,7 +10020,7 @@ var AlternativesList = ({
|
|
|
9898
10020
|
}
|
|
9899
10021
|
)
|
|
9900
10022
|
] }),
|
|
9901
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
10023
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
9902
10024
|
]
|
|
9903
10025
|
},
|
|
9904
10026
|
alternativeId
|
|
@@ -9909,7 +10031,7 @@ var AlternativesList = ({
|
|
|
9909
10031
|
};
|
|
9910
10032
|
var HeaderAlternative = (0, import_react31.forwardRef)(
|
|
9911
10033
|
({ className, title, subTitle, content, ...props }, ref) => {
|
|
9912
|
-
return /* @__PURE__ */ (0,
|
|
10034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
9913
10035
|
"div",
|
|
9914
10036
|
{
|
|
9915
10037
|
ref,
|
|
@@ -9919,11 +10041,11 @@ var HeaderAlternative = (0, import_react31.forwardRef)(
|
|
|
9919
10041
|
),
|
|
9920
10042
|
...props,
|
|
9921
10043
|
children: [
|
|
9922
|
-
/* @__PURE__ */ (0,
|
|
9923
|
-
/* @__PURE__ */ (0,
|
|
9924
|
-
/* @__PURE__ */ (0,
|
|
10044
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: "flex flex-col", children: [
|
|
10045
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-text-950 font-bold text-lg", children: title }),
|
|
10046
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-text-700 text-sm ", children: subTitle })
|
|
9925
10047
|
] }),
|
|
9926
|
-
/* @__PURE__ */ (0,
|
|
10048
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-text-950 text-md", children: content })
|
|
9927
10049
|
]
|
|
9928
10050
|
}
|
|
9929
10051
|
);
|
|
@@ -10104,7 +10226,7 @@ function useApiConfig(api) {
|
|
|
10104
10226
|
}
|
|
10105
10227
|
|
|
10106
10228
|
// src/components/Quiz/Quiz.tsx
|
|
10107
|
-
var
|
|
10229
|
+
var import_phosphor_react26 = require("phosphor-react");
|
|
10108
10230
|
var import_react36 = require("react");
|
|
10109
10231
|
|
|
10110
10232
|
// src/components/Quiz/useQuizStore.ts
|
|
@@ -10702,8 +10824,8 @@ var import_react35 = require("react");
|
|
|
10702
10824
|
|
|
10703
10825
|
// src/components/MultipleChoice/MultipleChoice.tsx
|
|
10704
10826
|
var import_react34 = require("react");
|
|
10705
|
-
var
|
|
10706
|
-
var
|
|
10827
|
+
var import_phosphor_react24 = require("phosphor-react");
|
|
10828
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
10707
10829
|
var MultipleChoiceList = ({
|
|
10708
10830
|
disabled = false,
|
|
10709
10831
|
className = "",
|
|
@@ -10720,9 +10842,9 @@ var MultipleChoiceList = ({
|
|
|
10720
10842
|
const getStatusBadge2 = (status) => {
|
|
10721
10843
|
switch (status) {
|
|
10722
10844
|
case "correct":
|
|
10723
|
-
return /* @__PURE__ */ (0,
|
|
10845
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_phosphor_react24.CheckCircle, {}), children: "Resposta correta" });
|
|
10724
10846
|
case "incorrect":
|
|
10725
|
-
return /* @__PURE__ */ (0,
|
|
10847
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_phosphor_react24.XCircle, {}), children: "Resposta incorreta" });
|
|
10726
10848
|
default:
|
|
10727
10849
|
return null;
|
|
10728
10850
|
}
|
|
@@ -10743,14 +10865,14 @@ var MultipleChoiceList = ({
|
|
|
10743
10865
|
isSelected ? "border-primary-950 bg-primary-950 text-text" : "border-border-400 bg-background",
|
|
10744
10866
|
isDisabled && "opacity-40 cursor-not-allowed"
|
|
10745
10867
|
);
|
|
10746
|
-
return /* @__PURE__ */ (0,
|
|
10868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: checkboxClasses, children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_phosphor_react24.Check, { size: 16, weight: "bold" }) });
|
|
10747
10869
|
};
|
|
10748
10870
|
if (mode === "readonly") {
|
|
10749
|
-
return /* @__PURE__ */ (0,
|
|
10871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: cn("flex flex-col gap-2", className), children: choices.map((choice, i) => {
|
|
10750
10872
|
const isSelected = actualValue?.includes(choice.value) || false;
|
|
10751
10873
|
const statusStyles = getStatusStyles2(choice.status);
|
|
10752
10874
|
const statusBadge = getStatusBadge2(choice.status);
|
|
10753
|
-
return /* @__PURE__ */ (0,
|
|
10875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
10754
10876
|
"div",
|
|
10755
10877
|
{
|
|
10756
10878
|
className: cn(
|
|
@@ -10759,9 +10881,9 @@ var MultipleChoiceList = ({
|
|
|
10759
10881
|
choice.disabled ? "opacity-50 cursor-not-allowed" : ""
|
|
10760
10882
|
),
|
|
10761
10883
|
children: [
|
|
10762
|
-
/* @__PURE__ */ (0,
|
|
10884
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center gap-2 flex-1", children: [
|
|
10763
10885
|
renderVisualCheckbox(isSelected, choice.disabled || disabled),
|
|
10764
|
-
/* @__PURE__ */ (0,
|
|
10886
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
10765
10887
|
"span",
|
|
10766
10888
|
{
|
|
10767
10889
|
className: cn(
|
|
@@ -10773,14 +10895,14 @@ var MultipleChoiceList = ({
|
|
|
10773
10895
|
}
|
|
10774
10896
|
)
|
|
10775
10897
|
] }),
|
|
10776
|
-
statusBadge && /* @__PURE__ */ (0,
|
|
10898
|
+
statusBadge && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex-shrink-0", children: statusBadge })
|
|
10777
10899
|
]
|
|
10778
10900
|
},
|
|
10779
10901
|
`readonly-${choice.value}-${i}`
|
|
10780
10902
|
);
|
|
10781
10903
|
}) });
|
|
10782
10904
|
}
|
|
10783
|
-
return /* @__PURE__ */ (0,
|
|
10905
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
10784
10906
|
"div",
|
|
10785
10907
|
{
|
|
10786
10908
|
className: cn(
|
|
@@ -10788,7 +10910,7 @@ var MultipleChoiceList = ({
|
|
|
10788
10910
|
disabled ? "opacity-50 cursor-not-allowed" : "",
|
|
10789
10911
|
className
|
|
10790
10912
|
),
|
|
10791
|
-
children: /* @__PURE__ */ (0,
|
|
10913
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
10792
10914
|
CheckboxList_default,
|
|
10793
10915
|
{
|
|
10794
10916
|
name,
|
|
@@ -10798,12 +10920,12 @@ var MultipleChoiceList = ({
|
|
|
10798
10920
|
onHandleSelectedValues?.(v);
|
|
10799
10921
|
},
|
|
10800
10922
|
disabled,
|
|
10801
|
-
children: choices.map((choice, i) => /* @__PURE__ */ (0,
|
|
10923
|
+
children: choices.map((choice, i) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
|
|
10802
10924
|
"div",
|
|
10803
10925
|
{
|
|
10804
10926
|
className: "flex flex-row gap-2 items-center",
|
|
10805
10927
|
children: [
|
|
10806
|
-
/* @__PURE__ */ (0,
|
|
10928
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
10807
10929
|
CheckboxListItem,
|
|
10808
10930
|
{
|
|
10809
10931
|
value: choice.value,
|
|
@@ -10811,7 +10933,7 @@ var MultipleChoiceList = ({
|
|
|
10811
10933
|
disabled: choice.disabled || disabled
|
|
10812
10934
|
}
|
|
10813
10935
|
),
|
|
10814
|
-
/* @__PURE__ */ (0,
|
|
10936
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
10815
10937
|
"label",
|
|
10816
10938
|
{
|
|
10817
10939
|
htmlFor: `interactive-${choice.value}-${i}`,
|
|
@@ -10834,19 +10956,19 @@ var MultipleChoiceList = ({
|
|
|
10834
10956
|
};
|
|
10835
10957
|
|
|
10836
10958
|
// src/components/Quiz/QuizContent.tsx
|
|
10837
|
-
var
|
|
10959
|
+
var import_phosphor_react25 = require("phosphor-react");
|
|
10838
10960
|
|
|
10839
10961
|
// src/assets/img/mock-image-question.png
|
|
10840
10962
|
var mock_image_question_default = "./mock-image-question-HEZCLFDL.png";
|
|
10841
10963
|
|
|
10842
10964
|
// src/components/Quiz/QuizContent.tsx
|
|
10843
|
-
var
|
|
10965
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
10844
10966
|
var getStatusBadge = (status) => {
|
|
10845
10967
|
switch (status) {
|
|
10846
10968
|
case "correct":
|
|
10847
|
-
return /* @__PURE__ */ (0,
|
|
10969
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Badge_default, { variant: "solid", action: "success", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_phosphor_react25.CheckCircle, {}), children: "Resposta correta" });
|
|
10848
10970
|
case "incorrect":
|
|
10849
|
-
return /* @__PURE__ */ (0,
|
|
10971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Badge_default, { variant: "solid", action: "error", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_phosphor_react25.XCircle, {}), children: "Resposta incorreta" });
|
|
10850
10972
|
default:
|
|
10851
10973
|
return null;
|
|
10852
10974
|
}
|
|
@@ -10861,11 +10983,11 @@ var getStatusStyles = (variantCorrect) => {
|
|
|
10861
10983
|
};
|
|
10862
10984
|
var QuizSubTitle = (0, import_react35.forwardRef)(
|
|
10863
10985
|
({ subTitle, ...props }, ref) => {
|
|
10864
|
-
return /* @__PURE__ */ (0,
|
|
10986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "px-4 pb-2 pt-6", ...props, ref, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "font-bold text-lg text-text-950", children: subTitle }) });
|
|
10865
10987
|
}
|
|
10866
10988
|
);
|
|
10867
10989
|
var QuizContainer = (0, import_react35.forwardRef)(({ children, className, ...props }, ref) => {
|
|
10868
|
-
return /* @__PURE__ */ (0,
|
|
10990
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
10869
10991
|
"div",
|
|
10870
10992
|
{
|
|
10871
10993
|
ref,
|
|
@@ -10913,10 +11035,10 @@ var QuizAlternative = ({ paddingBottom }) => {
|
|
|
10913
11035
|
};
|
|
10914
11036
|
});
|
|
10915
11037
|
if (!alternatives)
|
|
10916
|
-
return /* @__PURE__ */ (0,
|
|
10917
|
-
return /* @__PURE__ */ (0,
|
|
10918
|
-
/* @__PURE__ */ (0,
|
|
10919
|
-
/* @__PURE__ */ (0,
|
|
11038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { children: "N\xE3o h\xE1 Alternativas" }) });
|
|
11039
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11040
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
11041
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
10920
11042
|
AlternativesList,
|
|
10921
11043
|
{
|
|
10922
11044
|
mode: variant === "default" ? "interactive" : "readonly",
|
|
@@ -11014,10 +11136,10 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
|
|
|
11014
11136
|
};
|
|
11015
11137
|
});
|
|
11016
11138
|
if (!choices)
|
|
11017
|
-
return /* @__PURE__ */ (0,
|
|
11018
|
-
return /* @__PURE__ */ (0,
|
|
11019
|
-
/* @__PURE__ */ (0,
|
|
11020
|
-
/* @__PURE__ */ (0,
|
|
11139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { children: "N\xE3o h\xE1 Escolhas Multiplas" }) });
|
|
11140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11141
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
11142
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11021
11143
|
MultipleChoiceList,
|
|
11022
11144
|
{
|
|
11023
11145
|
choices,
|
|
@@ -11063,12 +11185,12 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
11063
11185
|
adjustTextareaHeight();
|
|
11064
11186
|
}, [currentAnswer, adjustTextareaHeight]);
|
|
11065
11187
|
if (!currentQuestion) {
|
|
11066
|
-
return /* @__PURE__ */ (0,
|
|
11188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-600 text-md", children: "Nenhuma quest\xE3o dispon\xEDvel" }) });
|
|
11067
11189
|
}
|
|
11068
11190
|
const localAnswer = (variant == "result" ? currentQuestionResult?.answer : currentAnswer?.answer) || "";
|
|
11069
|
-
return /* @__PURE__ */ (0,
|
|
11070
|
-
/* @__PURE__ */ (0,
|
|
11071
|
-
/* @__PURE__ */ (0,
|
|
11191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11192
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Resposta" }),
|
|
11193
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizContainer, { className: cn(variant != "result" && paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "space-y-4 max-h-[600px] overflow-y-auto", children: variant === "default" ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11072
11194
|
TextArea_default,
|
|
11073
11195
|
{
|
|
11074
11196
|
ref: textareaRef,
|
|
@@ -11078,10 +11200,10 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
11078
11200
|
rows: 4,
|
|
11079
11201
|
className: "min-h-[120px] max-h-[400px] resize-none overflow-y-auto"
|
|
11080
11202
|
}
|
|
11081
|
-
) }) : /* @__PURE__ */ (0,
|
|
11082
|
-
variant === "result" && currentQuestionResult?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */ (0,
|
|
11083
|
-
/* @__PURE__ */ (0,
|
|
11084
|
-
/* @__PURE__ */ (0,
|
|
11203
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: localAnswer || "Nenhuma resposta fornecida" }) }) }) }),
|
|
11204
|
+
variant === "result" && currentQuestionResult?.answerStatus == "RESPOSTA_INCORRETA" /* RESPOSTA_INCORRETA */ && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11205
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Observa\xE7\xE3o do professor" }),
|
|
11206
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-600 text-md whitespace-pre-wrap", children: currentQuestionResult?.teacherFeedback }) })
|
|
11085
11207
|
] })
|
|
11086
11208
|
] });
|
|
11087
11209
|
};
|
|
@@ -11107,16 +11229,16 @@ var QuizTrueOrFalse = ({ paddingBottom }) => {
|
|
|
11107
11229
|
];
|
|
11108
11230
|
const getLetterByIndex = (index) => String.fromCharCode(97 + index);
|
|
11109
11231
|
const isDefaultVariant = variant == "default";
|
|
11110
|
-
return /* @__PURE__ */ (0,
|
|
11111
|
-
/* @__PURE__ */ (0,
|
|
11112
|
-
/* @__PURE__ */ (0,
|
|
11232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11233
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
11234
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
11113
11235
|
const variantCorrect = option.isCorrect ? "correct" : "incorrect";
|
|
11114
|
-
return /* @__PURE__ */ (0,
|
|
11236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11115
11237
|
"section",
|
|
11116
11238
|
{
|
|
11117
11239
|
className: "flex flex-col gap-2",
|
|
11118
11240
|
children: [
|
|
11119
|
-
/* @__PURE__ */ (0,
|
|
11241
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11120
11242
|
"div",
|
|
11121
11243
|
{
|
|
11122
11244
|
className: cn(
|
|
@@ -11124,20 +11246,20 @@ var QuizTrueOrFalse = ({ paddingBottom }) => {
|
|
|
11124
11246
|
!isDefaultVariant ? getStatusStyles(variantCorrect) : ""
|
|
11125
11247
|
),
|
|
11126
11248
|
children: [
|
|
11127
|
-
/* @__PURE__ */ (0,
|
|
11128
|
-
isDefaultVariant ? /* @__PURE__ */ (0,
|
|
11129
|
-
/* @__PURE__ */ (0,
|
|
11130
|
-
/* @__PURE__ */ (0,
|
|
11131
|
-
/* @__PURE__ */ (0,
|
|
11132
|
-
/* @__PURE__ */ (0,
|
|
11249
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index).concat(") ").concat(option.label) }),
|
|
11250
|
+
isDefaultVariant ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Select_default, { size: "medium", children: [
|
|
11251
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectValue, { placeholder: "Selecione opc\xE3o" }) }),
|
|
11252
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(SelectContent, { children: [
|
|
11253
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectItem, { value: "V", children: "Verdadeiro" }),
|
|
11254
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectItem, { value: "F", children: "Falso" })
|
|
11133
11255
|
] })
|
|
11134
|
-
] }) : /* @__PURE__ */ (0,
|
|
11256
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex-shrink-0", children: getStatusBadge(variantCorrect) })
|
|
11135
11257
|
]
|
|
11136
11258
|
}
|
|
11137
11259
|
),
|
|
11138
|
-
!isDefaultVariant && /* @__PURE__ */ (0,
|
|
11139
|
-
/* @__PURE__ */ (0,
|
|
11140
|
-
!option.isCorrect && /* @__PURE__ */ (0,
|
|
11260
|
+
!isDefaultVariant && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
11261
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-800 text-2xs", children: "Resposta selecionada: V" }),
|
|
11262
|
+
!option.isCorrect && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-800 text-2xs", children: "Resposta correta: F" })
|
|
11141
11263
|
] })
|
|
11142
11264
|
]
|
|
11143
11265
|
},
|
|
@@ -11227,13 +11349,13 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
11227
11349
|
const assignedDots = new Set(
|
|
11228
11350
|
userAnswers.map((a) => a.dotOption).filter(Boolean)
|
|
11229
11351
|
);
|
|
11230
|
-
return /* @__PURE__ */ (0,
|
|
11231
|
-
/* @__PURE__ */ (0,
|
|
11232
|
-
/* @__PURE__ */ (0,
|
|
11352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11353
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
11354
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex flex-col gap-3.5", children: options.map((option, index) => {
|
|
11233
11355
|
const answer = userAnswers[index];
|
|
11234
11356
|
const variantCorrect = answer.isCorrect ? "correct" : "incorrect";
|
|
11235
|
-
return /* @__PURE__ */ (0,
|
|
11236
|
-
/* @__PURE__ */ (0,
|
|
11357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("section", { className: "flex flex-col gap-2", children: [
|
|
11358
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11237
11359
|
"div",
|
|
11238
11360
|
{
|
|
11239
11361
|
className: cn(
|
|
@@ -11241,30 +11363,30 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
11241
11363
|
!isDefaultVariant ? getStatusStyles(variantCorrect) : ""
|
|
11242
11364
|
),
|
|
11243
11365
|
children: [
|
|
11244
|
-
/* @__PURE__ */ (0,
|
|
11245
|
-
isDefaultVariant ? /* @__PURE__ */ (0,
|
|
11366
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "text-text-900 text-sm", children: getLetterByIndex(index) + ") " + option.label }),
|
|
11367
|
+
isDefaultVariant ? /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11246
11368
|
Select_default,
|
|
11247
11369
|
{
|
|
11248
11370
|
size: "medium",
|
|
11249
11371
|
value: answer.dotOption || void 0,
|
|
11250
11372
|
onValueChange: (value) => handleSelectDot(index, value),
|
|
11251
11373
|
children: [
|
|
11252
|
-
/* @__PURE__ */ (0,
|
|
11253
|
-
/* @__PURE__ */ (0,
|
|
11374
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectValue, { placeholder: "Selecione op\xE7\xE3o" }) }),
|
|
11375
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectContent, { children: dotsOptions.filter(
|
|
11254
11376
|
(dot) => !assignedDots.has(dot.label) || answer.dotOption === dot.label
|
|
11255
|
-
).map((dot) => /* @__PURE__ */ (0,
|
|
11377
|
+
).map((dot) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectItem, { value: dot.label, children: dot.label }, dot.label)) })
|
|
11256
11378
|
]
|
|
11257
11379
|
}
|
|
11258
|
-
) : /* @__PURE__ */ (0,
|
|
11380
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex-shrink-0", children: answer.isCorrect === null ? null : getStatusBadge(variantCorrect) })
|
|
11259
11381
|
]
|
|
11260
11382
|
}
|
|
11261
11383
|
),
|
|
11262
|
-
!isDefaultVariant && /* @__PURE__ */ (0,
|
|
11263
|
-
/* @__PURE__ */ (0,
|
|
11384
|
+
!isDefaultVariant && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: "flex flex-row gap-2 items-center", children: [
|
|
11385
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("p", { className: "text-text-800 text-2xs", children: [
|
|
11264
11386
|
"Resposta selecionada: ",
|
|
11265
11387
|
answer.dotOption || "Nenhuma"
|
|
11266
11388
|
] }),
|
|
11267
|
-
!answer.isCorrect && /* @__PURE__ */ (0,
|
|
11389
|
+
!answer.isCorrect && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("p", { className: "text-text-800 text-2xs", children: [
|
|
11268
11390
|
"Resposta correta: ",
|
|
11269
11391
|
answer.correctOption
|
|
11270
11392
|
] })
|
|
@@ -11331,18 +11453,18 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
11331
11453
|
const mockAnswer = mockUserAnswers.find(
|
|
11332
11454
|
(answer) => answer.selectId === selectId
|
|
11333
11455
|
);
|
|
11334
|
-
return /* @__PURE__ */ (0,
|
|
11456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("p", { className: "inline-flex mb-2.5 text-success-600 font-semibold text-md border-b-2 border-success-600", children: mockAnswer?.correctAnswer });
|
|
11335
11457
|
};
|
|
11336
11458
|
const renderDefaultElement = (selectId, startIndex, selectedValue, availableOptionsForThisSelect) => {
|
|
11337
|
-
return /* @__PURE__ */ (0,
|
|
11459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11338
11460
|
Select_default,
|
|
11339
11461
|
{
|
|
11340
11462
|
value: selectedValue,
|
|
11341
11463
|
onValueChange: (value) => handleSelectChange(selectId, value),
|
|
11342
11464
|
className: "inline-flex mb-2.5",
|
|
11343
11465
|
children: [
|
|
11344
|
-
/* @__PURE__ */ (0,
|
|
11345
|
-
/* @__PURE__ */ (0,
|
|
11466
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectTrigger, { className: "inline-flex w-auto min-w-[140px] h-8 mx-1 bg-background border-gray-300", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectValue, { placeholder: "Selecione op\xE7\xE3o" }) }),
|
|
11467
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectContent, { children: availableOptionsForThisSelect.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SelectItem, { value: option, children: option }, `${option}-${index}`)) })
|
|
11346
11468
|
]
|
|
11347
11469
|
},
|
|
11348
11470
|
`${selectId}-${startIndex}`
|
|
@@ -11354,8 +11476,8 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
11354
11476
|
);
|
|
11355
11477
|
if (!mockAnswer) return null;
|
|
11356
11478
|
const action = mockAnswer.isCorrect ? "success" : "error";
|
|
11357
|
-
const icon = mockAnswer.isCorrect ? /* @__PURE__ */ (0,
|
|
11358
|
-
return /* @__PURE__ */ (0,
|
|
11479
|
+
const icon = mockAnswer.isCorrect ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_phosphor_react25.CheckCircle, {}) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_phosphor_react25.XCircle, {});
|
|
11480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11359
11481
|
Badge_default,
|
|
11360
11482
|
{
|
|
11361
11483
|
variant: "solid",
|
|
@@ -11363,7 +11485,7 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
11363
11485
|
iconRight: icon,
|
|
11364
11486
|
size: "large",
|
|
11365
11487
|
className: "py-3 w-[180px] justify-between mb-2.5",
|
|
11366
|
-
children: /* @__PURE__ */ (0,
|
|
11488
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-text-900", children: mockAnswer.userAnswer })
|
|
11367
11489
|
},
|
|
11368
11490
|
selectId
|
|
11369
11491
|
);
|
|
@@ -11419,25 +11541,25 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
11419
11541
|
}
|
|
11420
11542
|
return elements;
|
|
11421
11543
|
};
|
|
11422
|
-
return /* @__PURE__ */ (0,
|
|
11423
|
-
/* @__PURE__ */ (0,
|
|
11424
|
-
/* @__PURE__ */ (0,
|
|
11544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11545
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Alternativas" }),
|
|
11546
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizContainer, { className: "h-auto pb-0", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "space-y-6 px-4 h-auto", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11425
11547
|
"div",
|
|
11426
11548
|
{
|
|
11427
11549
|
className: cn(
|
|
11428
11550
|
"text-lg text-text-900 leading-8 h-auto",
|
|
11429
11551
|
variant != "result" && paddingBottom
|
|
11430
11552
|
),
|
|
11431
|
-
children: renderTextWithSelects(exampleText).map((element) => /* @__PURE__ */ (0,
|
|
11553
|
+
children: renderTextWithSelects(exampleText).map((element) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: element.element }, element.id))
|
|
11432
11554
|
}
|
|
11433
11555
|
) }) }),
|
|
11434
|
-
variant === "result" && /* @__PURE__ */ (0,
|
|
11435
|
-
/* @__PURE__ */ (0,
|
|
11436
|
-
/* @__PURE__ */ (0,
|
|
11556
|
+
variant === "result" && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11557
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Resultado" }),
|
|
11558
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizContainer, { className: "h-auto pb-0", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "space-y-6 px-4", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11437
11559
|
"div",
|
|
11438
11560
|
{
|
|
11439
11561
|
className: cn("text-lg text-text-900 leading-8", paddingBottom),
|
|
11440
|
-
children: renderTextWithSelects(exampleText, true).map((element) => /* @__PURE__ */ (0,
|
|
11562
|
+
children: renderTextWithSelects(exampleText, true).map((element) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: element.element }, element.id))
|
|
11441
11563
|
}
|
|
11442
11564
|
) }) })
|
|
11443
11565
|
] })
|
|
@@ -11491,36 +11613,36 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
11491
11613
|
}
|
|
11492
11614
|
return "bg-success-600/70 border-white";
|
|
11493
11615
|
};
|
|
11494
|
-
return /* @__PURE__ */ (0,
|
|
11495
|
-
/* @__PURE__ */ (0,
|
|
11496
|
-
/* @__PURE__ */ (0,
|
|
11616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
11617
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizSubTitle, { subTitle: "Clique na \xE1rea correta" }),
|
|
11618
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(QuizContainer, { className: cn("", paddingBottom), children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11497
11619
|
"div",
|
|
11498
11620
|
{
|
|
11499
11621
|
"data-testid": "quiz-image-container",
|
|
11500
11622
|
className: "space-y-6 p-3 relative inline-block",
|
|
11501
11623
|
children: [
|
|
11502
|
-
variant == "result" && /* @__PURE__ */ (0,
|
|
11624
|
+
variant == "result" && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11503
11625
|
"div",
|
|
11504
11626
|
{
|
|
11505
11627
|
"data-testid": "quiz-legend",
|
|
11506
11628
|
className: "flex items-center gap-4 text-xs",
|
|
11507
11629
|
children: [
|
|
11508
|
-
/* @__PURE__ */ (0,
|
|
11509
|
-
/* @__PURE__ */ (0,
|
|
11510
|
-
/* @__PURE__ */ (0,
|
|
11630
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
11631
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "w-3 h-3 rounded-full bg-indicator-primary/70 border border-[#F8CC2E]" }),
|
|
11632
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-text-600 font-medium text-sm", children: "\xC1rea correta" })
|
|
11511
11633
|
] }),
|
|
11512
|
-
/* @__PURE__ */ (0,
|
|
11513
|
-
/* @__PURE__ */ (0,
|
|
11514
|
-
/* @__PURE__ */ (0,
|
|
11634
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
11635
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "w-3 h-3 rounded-full bg-success-600/70 border border-white" }),
|
|
11636
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-text-600 font-medium text-sm", children: "Resposta correta" })
|
|
11515
11637
|
] }),
|
|
11516
|
-
/* @__PURE__ */ (0,
|
|
11517
|
-
/* @__PURE__ */ (0,
|
|
11518
|
-
/* @__PURE__ */ (0,
|
|
11638
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
11639
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "w-3 h-3 rounded-full bg-indicator-error/70 border border-white" }),
|
|
11640
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "text-text-600 font-medium text-sm", children: "Resposta incorreta" })
|
|
11519
11641
|
] })
|
|
11520
11642
|
]
|
|
11521
11643
|
}
|
|
11522
11644
|
),
|
|
11523
|
-
/* @__PURE__ */ (0,
|
|
11645
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
11524
11646
|
"button",
|
|
11525
11647
|
{
|
|
11526
11648
|
"data-testid": "quiz-image-button",
|
|
@@ -11535,7 +11657,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
11535
11657
|
},
|
|
11536
11658
|
"aria-label": "\xC1rea da imagem interativa",
|
|
11537
11659
|
children: [
|
|
11538
|
-
/* @__PURE__ */ (0,
|
|
11660
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11539
11661
|
"img",
|
|
11540
11662
|
{
|
|
11541
11663
|
"data-testid": "quiz-image",
|
|
@@ -11544,7 +11666,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
11544
11666
|
className: "w-full h-auto rounded-md"
|
|
11545
11667
|
}
|
|
11546
11668
|
),
|
|
11547
|
-
variant === "result" && /* @__PURE__ */ (0,
|
|
11669
|
+
variant === "result" && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11548
11670
|
"div",
|
|
11549
11671
|
{
|
|
11550
11672
|
"data-testid": "quiz-correct-circle",
|
|
@@ -11559,7 +11681,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
11559
11681
|
}
|
|
11560
11682
|
}
|
|
11561
11683
|
),
|
|
11562
|
-
clickPositionRelative && /* @__PURE__ */ (0,
|
|
11684
|
+
clickPositionRelative && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
11563
11685
|
"div",
|
|
11564
11686
|
{
|
|
11565
11687
|
"data-testid": "quiz-user-circle",
|
|
@@ -11584,7 +11706,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
11584
11706
|
};
|
|
11585
11707
|
|
|
11586
11708
|
// src/components/Quiz/Quiz.tsx
|
|
11587
|
-
var
|
|
11709
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
11588
11710
|
var getQuizTypeConfig = (type) => {
|
|
11589
11711
|
const QUIZ_TYPE_CONFIG = {
|
|
11590
11712
|
["SIMULADO" /* SIMULADO */]: {
|
|
@@ -11626,7 +11748,7 @@ var Quiz = (0, import_react36.forwardRef)(({ children, className, variant = "def
|
|
|
11626
11748
|
(0, import_react36.useEffect)(() => {
|
|
11627
11749
|
setVariant(variant);
|
|
11628
11750
|
}, [variant, setVariant]);
|
|
11629
|
-
return /* @__PURE__ */ (0,
|
|
11751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { ref, className: cn("flex flex-col", className), ...props, children });
|
|
11630
11752
|
});
|
|
11631
11753
|
var QuizTitle = (0, import_react36.forwardRef)(({ className, onBack, ...props }, ref) => {
|
|
11632
11754
|
const {
|
|
@@ -11662,8 +11784,8 @@ var QuizTitle = (0, import_react36.forwardRef)(({ className, onBack, ...props },
|
|
|
11662
11784
|
const handleCancelExit = () => {
|
|
11663
11785
|
setShowExitConfirmation(false);
|
|
11664
11786
|
};
|
|
11665
|
-
return /* @__PURE__ */ (0,
|
|
11666
|
-
/* @__PURE__ */ (0,
|
|
11787
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
11788
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
11667
11789
|
"div",
|
|
11668
11790
|
{
|
|
11669
11791
|
ref,
|
|
@@ -11673,24 +11795,24 @@ var QuizTitle = (0, import_react36.forwardRef)(({ className, onBack, ...props },
|
|
|
11673
11795
|
),
|
|
11674
11796
|
...props,
|
|
11675
11797
|
children: [
|
|
11676
|
-
/* @__PURE__ */ (0,
|
|
11798
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11677
11799
|
IconButton_default,
|
|
11678
11800
|
{
|
|
11679
|
-
icon: /* @__PURE__ */ (0,
|
|
11801
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_phosphor_react26.CaretLeft, { size: 24 }),
|
|
11680
11802
|
size: "md",
|
|
11681
11803
|
"aria-label": "Voltar",
|
|
11682
11804
|
onClick: handleBackClick
|
|
11683
11805
|
}
|
|
11684
11806
|
),
|
|
11685
|
-
/* @__PURE__ */ (0,
|
|
11686
|
-
/* @__PURE__ */ (0,
|
|
11687
|
-
/* @__PURE__ */ (0,
|
|
11807
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: "flex flex-col gap-2 text-center", children: [
|
|
11808
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
|
|
11809
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
|
|
11688
11810
|
] }),
|
|
11689
|
-
/* @__PURE__ */ (0,
|
|
11811
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "flex flex-row items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_phosphor_react26.Clock, {}), children: isStarted ? formatTime2(timeElapsed) : "00:00" }) })
|
|
11690
11812
|
]
|
|
11691
11813
|
}
|
|
11692
11814
|
),
|
|
11693
|
-
/* @__PURE__ */ (0,
|
|
11815
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11694
11816
|
AlertDialog,
|
|
11695
11817
|
{
|
|
11696
11818
|
isOpen: showExitConfirmation,
|
|
@@ -11708,7 +11830,7 @@ var QuizTitle = (0, import_react36.forwardRef)(({ className, onBack, ...props },
|
|
|
11708
11830
|
var QuizHeader = () => {
|
|
11709
11831
|
const { getCurrentQuestion, currentQuestionIndex } = useQuizStore();
|
|
11710
11832
|
const currentQuestion = getCurrentQuestion();
|
|
11711
|
-
return /* @__PURE__ */ (0,
|
|
11833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11712
11834
|
HeaderAlternative,
|
|
11713
11835
|
{
|
|
11714
11836
|
title: currentQuestion ? `Quest\xE3o ${currentQuestionIndex + 1}` : "Quest\xE3o",
|
|
@@ -11730,7 +11852,7 @@ var QuizContent = ({ paddingBottom }) => {
|
|
|
11730
11852
|
["IMAGEM" /* IMAGEM */]: QuizImageQuestion
|
|
11731
11853
|
};
|
|
11732
11854
|
const QuestionComponent = currentQuestion ? questionComponents[currentQuestion.questionType] : null;
|
|
11733
|
-
return QuestionComponent ? /* @__PURE__ */ (0,
|
|
11855
|
+
return QuestionComponent ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(QuestionComponent, { paddingBottom }) : null;
|
|
11734
11856
|
};
|
|
11735
11857
|
var QuizQuestionList = ({
|
|
11736
11858
|
filterType = "all",
|
|
@@ -11777,18 +11899,18 @@ var QuizQuestionList = ({
|
|
|
11777
11899
|
return "Em branco";
|
|
11778
11900
|
}
|
|
11779
11901
|
};
|
|
11780
|
-
return /* @__PURE__ */ (0,
|
|
11781
|
-
Object.entries(filteredGroupedQuestions).length == 0 && /* @__PURE__ */ (0,
|
|
11902
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "space-y-6 px-4 h-full", children: [
|
|
11903
|
+
Object.entries(filteredGroupedQuestions).length == 0 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex items-center justify-center text-gray-500 py-8 h-full", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-lg", children: "Nenhum resultado" }) }),
|
|
11782
11904
|
Object.entries(filteredGroupedQuestions).map(
|
|
11783
|
-
([subjectId, questions]) => /* @__PURE__ */ (0,
|
|
11784
|
-
/* @__PURE__ */ (0,
|
|
11785
|
-
/* @__PURE__ */ (0,
|
|
11786
|
-
/* @__PURE__ */ (0,
|
|
11905
|
+
([subjectId, questions]) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("section", { className: "flex flex-col gap-2", children: [
|
|
11906
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: "pt-6 pb-4 flex flex-row gap-2", children: [
|
|
11907
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "bg-primary-500 p-1 rounded-sm flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_phosphor_react26.BookOpen, { size: 17, className: "text-white" }) }),
|
|
11908
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-text-800 font-bold text-lg", children: questions?.[0]?.knowledgeMatrix?.[0]?.subject?.name ?? "Sem mat\xE9ria" })
|
|
11787
11909
|
] }),
|
|
11788
|
-
/* @__PURE__ */ (0,
|
|
11910
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("ul", { className: "flex flex-col gap-2", children: questions.map((question) => {
|
|
11789
11911
|
const status = getQuestionStatus(question.id);
|
|
11790
11912
|
const questionNumber = getQuestionIndex(question.id);
|
|
11791
|
-
return /* @__PURE__ */ (0,
|
|
11913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11792
11914
|
CardStatus,
|
|
11793
11915
|
{
|
|
11794
11916
|
header: `Quest\xE3o ${questionNumber.toString().padStart(2, "0")}`,
|
|
@@ -11893,8 +12015,8 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11893
12015
|
return;
|
|
11894
12016
|
}
|
|
11895
12017
|
};
|
|
11896
|
-
return /* @__PURE__ */ (0,
|
|
11897
|
-
/* @__PURE__ */ (0,
|
|
12018
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
12019
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11898
12020
|
"footer",
|
|
11899
12021
|
{
|
|
11900
12022
|
ref,
|
|
@@ -11903,17 +12025,17 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11903
12025
|
className
|
|
11904
12026
|
),
|
|
11905
12027
|
...props,
|
|
11906
|
-
children: variant === "default" ? /* @__PURE__ */ (0,
|
|
11907
|
-
/* @__PURE__ */ (0,
|
|
11908
|
-
/* @__PURE__ */ (0,
|
|
12028
|
+
children: variant === "default" ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_jsx_runtime52.Fragment, { children: [
|
|
12029
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-row items-center gap-1", children: [
|
|
12030
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11909
12031
|
IconButton_default,
|
|
11910
12032
|
{
|
|
11911
|
-
icon: /* @__PURE__ */ (0,
|
|
12033
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_phosphor_react26.SquaresFour, { size: 24, className: "text-text-950" }),
|
|
11912
12034
|
size: "md",
|
|
11913
12035
|
onClick: () => openModal("modalNavigate")
|
|
11914
12036
|
}
|
|
11915
12037
|
),
|
|
11916
|
-
isFirstQuestion ? /* @__PURE__ */ (0,
|
|
12038
|
+
isFirstQuestion ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11917
12039
|
Button_default,
|
|
11918
12040
|
{
|
|
11919
12041
|
variant: "outline",
|
|
@@ -11924,13 +12046,13 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11924
12046
|
},
|
|
11925
12047
|
children: "Pular"
|
|
11926
12048
|
}
|
|
11927
|
-
) : /* @__PURE__ */ (0,
|
|
12049
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11928
12050
|
Button_default,
|
|
11929
12051
|
{
|
|
11930
12052
|
size: "medium",
|
|
11931
12053
|
variant: "link",
|
|
11932
12054
|
action: "primary",
|
|
11933
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
12055
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_phosphor_react26.CaretLeft, { size: 18 }),
|
|
11934
12056
|
onClick: () => {
|
|
11935
12057
|
goToPreviousQuestion();
|
|
11936
12058
|
},
|
|
@@ -11938,7 +12060,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11938
12060
|
}
|
|
11939
12061
|
)
|
|
11940
12062
|
] }),
|
|
11941
|
-
!isFirstQuestion && !isLastQuestion && /* @__PURE__ */ (0,
|
|
12063
|
+
!isFirstQuestion && !isLastQuestion && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11942
12064
|
Button_default,
|
|
11943
12065
|
{
|
|
11944
12066
|
size: "small",
|
|
@@ -11951,7 +12073,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11951
12073
|
children: "Pular"
|
|
11952
12074
|
}
|
|
11953
12075
|
),
|
|
11954
|
-
isLastQuestion ? /* @__PURE__ */ (0,
|
|
12076
|
+
isLastQuestion ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11955
12077
|
Button_default,
|
|
11956
12078
|
{
|
|
11957
12079
|
size: "medium",
|
|
@@ -11961,13 +12083,13 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11961
12083
|
onClick: handleFinishQuiz,
|
|
11962
12084
|
children: "Finalizar"
|
|
11963
12085
|
}
|
|
11964
|
-
) : /* @__PURE__ */ (0,
|
|
12086
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11965
12087
|
Button_default,
|
|
11966
12088
|
{
|
|
11967
12089
|
size: "medium",
|
|
11968
12090
|
variant: "link",
|
|
11969
12091
|
action: "primary",
|
|
11970
|
-
iconRight: /* @__PURE__ */ (0,
|
|
12092
|
+
iconRight: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_phosphor_react26.CaretRight, { size: 18 }),
|
|
11971
12093
|
disabled: !currentAnswer && !isCurrentQuestionSkipped,
|
|
11972
12094
|
onClick: () => {
|
|
11973
12095
|
goToNextQuestion();
|
|
@@ -11975,7 +12097,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11975
12097
|
children: "Avan\xE7ar"
|
|
11976
12098
|
}
|
|
11977
12099
|
)
|
|
11978
|
-
] }) : /* @__PURE__ */ (0,
|
|
12100
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex flex-row items-center justify-center w-full", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11979
12101
|
Button_default,
|
|
11980
12102
|
{
|
|
11981
12103
|
variant: "link",
|
|
@@ -11987,7 +12109,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11987
12109
|
) })
|
|
11988
12110
|
}
|
|
11989
12111
|
),
|
|
11990
|
-
/* @__PURE__ */ (0,
|
|
12112
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
11991
12113
|
AlertDialog,
|
|
11992
12114
|
{
|
|
11993
12115
|
isOpen: isModalOpen("alertDialog"),
|
|
@@ -11999,7 +12121,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
11999
12121
|
onSubmit: handleAlertSubmit
|
|
12000
12122
|
}
|
|
12001
12123
|
),
|
|
12002
|
-
/* @__PURE__ */ (0,
|
|
12124
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12003
12125
|
Modal_default,
|
|
12004
12126
|
{
|
|
12005
12127
|
isOpen: isModalOpen("modalResult"),
|
|
@@ -12008,11 +12130,11 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12008
12130
|
closeOnEscape: false,
|
|
12009
12131
|
hideCloseButton: true,
|
|
12010
12132
|
size: "md",
|
|
12011
|
-
children: /* @__PURE__ */ (0,
|
|
12012
|
-
resultImageComponent ? /* @__PURE__ */ (0,
|
|
12013
|
-
/* @__PURE__ */ (0,
|
|
12014
|
-
/* @__PURE__ */ (0,
|
|
12015
|
-
/* @__PURE__ */ (0,
|
|
12133
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
12134
|
+
resultImageComponent ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "w-[282px] h-auto", children: resultImageComponent }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "w-[282px] h-[200px] bg-gray-100 rounded-md flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-gray-500 text-sm", children: "Imagem de resultado" }) }),
|
|
12135
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
12136
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h2", { className: "text-text-950 font-bold text-lg", children: getCompletionTitle(quizType) }),
|
|
12137
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("p", { className: "text-text-500 font-sm", children: [
|
|
12016
12138
|
"Voc\xEA acertou ",
|
|
12017
12139
|
correctAnswers ?? "--",
|
|
12018
12140
|
" de ",
|
|
@@ -12021,8 +12143,8 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12021
12143
|
"quest\xF5es."
|
|
12022
12144
|
] })
|
|
12023
12145
|
] }),
|
|
12024
|
-
/* @__PURE__ */ (0,
|
|
12025
|
-
/* @__PURE__ */ (0,
|
|
12146
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: [
|
|
12147
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12026
12148
|
Button_default,
|
|
12027
12149
|
{
|
|
12028
12150
|
variant: "outline",
|
|
@@ -12032,38 +12154,38 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12032
12154
|
children: quizTypeLabel === "Question\xE1rio" ? "Ir para aulas" : `Ir para ${quizTypeLabel.toLocaleLowerCase()}s`
|
|
12033
12155
|
}
|
|
12034
12156
|
),
|
|
12035
|
-
/* @__PURE__ */ (0,
|
|
12157
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button_default, { className: "w-full", onClick: onDetailResult, children: "Detalhar resultado" })
|
|
12036
12158
|
] })
|
|
12037
12159
|
] })
|
|
12038
12160
|
}
|
|
12039
12161
|
),
|
|
12040
|
-
/* @__PURE__ */ (0,
|
|
12162
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12041
12163
|
Modal_default,
|
|
12042
12164
|
{
|
|
12043
12165
|
isOpen: isModalOpen("modalNavigate"),
|
|
12044
12166
|
onClose: closeModal,
|
|
12045
12167
|
title: "Quest\xF5es",
|
|
12046
12168
|
size: "lg",
|
|
12047
|
-
children: /* @__PURE__ */ (0,
|
|
12048
|
-
/* @__PURE__ */ (0,
|
|
12049
|
-
/* @__PURE__ */ (0,
|
|
12050
|
-
/* @__PURE__ */ (0,
|
|
12051
|
-
/* @__PURE__ */ (0,
|
|
12169
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col w-full not-lg:h-[calc(100vh-200px)] lg:max-h-[687px] lg:h-[687px]", children: [
|
|
12170
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-row justify-between items-center py-6 pt-6 pb-4 border-b border-border-200 flex-shrink-0", children: [
|
|
12171
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-text-950 font-bold text-lg", children: "Filtrar por" }),
|
|
12172
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "max-w-[266px]", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Select_default, { value: filterType, onValueChange: setFilterType, children: [
|
|
12173
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12052
12174
|
SelectTrigger,
|
|
12053
12175
|
{
|
|
12054
12176
|
variant: "rounded",
|
|
12055
12177
|
className: "max-w-[266px] min-w-[160px]",
|
|
12056
|
-
children: /* @__PURE__ */ (0,
|
|
12178
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectValue, { placeholder: "Selecione uma op\xE7\xE3o" })
|
|
12057
12179
|
}
|
|
12058
12180
|
),
|
|
12059
|
-
/* @__PURE__ */ (0,
|
|
12060
|
-
/* @__PURE__ */ (0,
|
|
12061
|
-
/* @__PURE__ */ (0,
|
|
12062
|
-
/* @__PURE__ */ (0,
|
|
12181
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(SelectContent, { children: [
|
|
12182
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectItem, { value: "all", children: "Todas" }),
|
|
12183
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectItem, { value: "unanswered", children: "Em branco" }),
|
|
12184
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SelectItem, { value: "answered", children: "Respondidas" })
|
|
12063
12185
|
] })
|
|
12064
12186
|
] }) })
|
|
12065
12187
|
] }),
|
|
12066
|
-
/* @__PURE__ */ (0,
|
|
12188
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex flex-col gap-2 flex-1 min-h-0 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12067
12189
|
QuizQuestionList,
|
|
12068
12190
|
{
|
|
12069
12191
|
filterType,
|
|
@@ -12073,7 +12195,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12073
12195
|
] })
|
|
12074
12196
|
}
|
|
12075
12197
|
),
|
|
12076
|
-
/* @__PURE__ */ (0,
|
|
12198
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12077
12199
|
Modal_default,
|
|
12078
12200
|
{
|
|
12079
12201
|
isOpen: isModalOpen("modalResolution"),
|
|
@@ -12083,7 +12205,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12083
12205
|
children: currentQuestion?.solutionExplanation
|
|
12084
12206
|
}
|
|
12085
12207
|
),
|
|
12086
|
-
/* @__PURE__ */ (0,
|
|
12208
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12087
12209
|
Modal_default,
|
|
12088
12210
|
{
|
|
12089
12211
|
isOpen: isModalOpen("modalQuestionnaireAllCorrect"),
|
|
@@ -12092,17 +12214,17 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12092
12214
|
closeOnEscape: false,
|
|
12093
12215
|
hideCloseButton: true,
|
|
12094
12216
|
size: "md",
|
|
12095
|
-
children: /* @__PURE__ */ (0,
|
|
12096
|
-
resultImageComponent ? /* @__PURE__ */ (0,
|
|
12097
|
-
/* @__PURE__ */ (0,
|
|
12098
|
-
/* @__PURE__ */ (0,
|
|
12099
|
-
/* @__PURE__ */ (0,
|
|
12217
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
12218
|
+
resultImageComponent ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "w-[282px] h-auto", children: resultImageComponent }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "w-[282px] h-[200px] bg-gray-100 rounded-md flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-gray-500 text-sm", children: "Imagem de resultado" }) }),
|
|
12219
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
12220
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h2", { className: "text-text-950 font-bold text-lg", children: "\u{1F389} Parab\xE9ns!" }),
|
|
12221
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-text-500 font-sm", children: "Voc\xEA concluiu o m\xF3dulo Movimento Uniforme." })
|
|
12100
12222
|
] }),
|
|
12101
|
-
/* @__PURE__ */ (0,
|
|
12223
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Button_default, { className: "w-full", onClick: onGoToNextModule, children: "Pr\xF3ximo m\xF3dulo" }) })
|
|
12102
12224
|
] })
|
|
12103
12225
|
}
|
|
12104
12226
|
),
|
|
12105
|
-
/* @__PURE__ */ (0,
|
|
12227
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12106
12228
|
Modal_default,
|
|
12107
12229
|
{
|
|
12108
12230
|
isOpen: isModalOpen("modalQuestionnaireAllIncorrect"),
|
|
@@ -12111,16 +12233,16 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12111
12233
|
closeOnEscape: false,
|
|
12112
12234
|
hideCloseButton: true,
|
|
12113
12235
|
size: "md",
|
|
12114
|
-
children: /* @__PURE__ */ (0,
|
|
12115
|
-
resultIncorrectImageComponent ? /* @__PURE__ */ (0,
|
|
12116
|
-
/* @__PURE__ */ (0,
|
|
12117
|
-
/* @__PURE__ */ (0,
|
|
12118
|
-
/* @__PURE__ */ (0,
|
|
12119
|
-
/* @__PURE__ */ (0,
|
|
12120
|
-
/* @__PURE__ */ (0,
|
|
12236
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
12237
|
+
resultIncorrectImageComponent ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "w-[282px] h-auto", children: resultIncorrectImageComponent }) : /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "w-[282px] h-[200px] bg-gray-100 rounded-md flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-gray-500 text-sm", children: "Imagem de resultado" }) }),
|
|
12238
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
12239
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h2", { className: "text-text-950 font-bold text-lg", children: "\u{1F615} N\xE3o foi dessa vez..." }),
|
|
12240
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-text-500 font-sm", children: "Voc\xEA tirou 0 no question\xE1rio, mas n\xE3o se preocupe! Isso \xE9 apenas uma oportunidade de aprendizado." }),
|
|
12241
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-text-500 font-sm", children: "Que tal tentar novamente para melhorar sua nota? Estamos aqui para te ajudar a entender o conte\xFAdo e evoluir." }),
|
|
12242
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "text-text-500 font-sm", children: "Clique em Repetir Question\xE1rio e mostre do que voc\xEA \xE9 capaz! \u{1F4AA}" })
|
|
12121
12243
|
] }),
|
|
12122
|
-
/* @__PURE__ */ (0,
|
|
12123
|
-
/* @__PURE__ */ (0,
|
|
12244
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "flex flex-row justify-center items-center gap-2 w-full", children: [
|
|
12245
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12124
12246
|
Button_default,
|
|
12125
12247
|
{
|
|
12126
12248
|
type: "button",
|
|
@@ -12134,7 +12256,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12134
12256
|
children: "Tentar depois"
|
|
12135
12257
|
}
|
|
12136
12258
|
),
|
|
12137
|
-
/* @__PURE__ */ (0,
|
|
12259
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12138
12260
|
Button_default,
|
|
12139
12261
|
{
|
|
12140
12262
|
variant: "outline",
|
|
@@ -12144,7 +12266,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12144
12266
|
children: "Detalhar resultado"
|
|
12145
12267
|
}
|
|
12146
12268
|
),
|
|
12147
|
-
/* @__PURE__ */ (0,
|
|
12269
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12148
12270
|
Button_default,
|
|
12149
12271
|
{
|
|
12150
12272
|
className: "w-auto",
|
|
@@ -12157,7 +12279,7 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12157
12279
|
] })
|
|
12158
12280
|
}
|
|
12159
12281
|
),
|
|
12160
|
-
/* @__PURE__ */ (0,
|
|
12282
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
12161
12283
|
AlertDialog,
|
|
12162
12284
|
{
|
|
12163
12285
|
isOpen: isModalOpen("alertDialogTryLater"),
|
|
@@ -12182,25 +12304,25 @@ var QuizFooter = (0, import_react36.forwardRef)(
|
|
|
12182
12304
|
|
|
12183
12305
|
// src/components/Quiz/QuizResult.tsx
|
|
12184
12306
|
var import_react37 = require("react");
|
|
12185
|
-
var
|
|
12186
|
-
var
|
|
12307
|
+
var import_phosphor_react27 = require("phosphor-react");
|
|
12308
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
12187
12309
|
var QuizBadge = ({
|
|
12188
12310
|
subtype
|
|
12189
12311
|
}) => {
|
|
12190
12312
|
switch (subtype) {
|
|
12191
12313
|
case "PROVA" /* PROVA */:
|
|
12192
|
-
return /* @__PURE__ */ (0,
|
|
12314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Badge_default, { variant: "examsOutlined", action: "exam2", "data-testid": "quiz-badge", children: "Prova" });
|
|
12193
12315
|
case "ENEM_PROVA_1" /* ENEM_PROVA_1 */:
|
|
12194
12316
|
case "ENEM_PROVA_2" /* ENEM_PROVA_2 */:
|
|
12195
|
-
return /* @__PURE__ */ (0,
|
|
12317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Badge_default, { variant: "examsOutlined", action: "exam1", "data-testid": "quiz-badge", children: "Enem" });
|
|
12196
12318
|
case "VESTIBULAR" /* VESTIBULAR */:
|
|
12197
|
-
return /* @__PURE__ */ (0,
|
|
12319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Badge_default, { variant: "examsOutlined", action: "exam4", "data-testid": "quiz-badge", children: "Vestibular" });
|
|
12198
12320
|
case "SIMULADO" /* SIMULADO */:
|
|
12199
12321
|
case "SIMULADAO" /* SIMULADAO */:
|
|
12200
12322
|
case void 0:
|
|
12201
|
-
return /* @__PURE__ */ (0,
|
|
12323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Badge_default, { variant: "examsOutlined", action: "exam3", "data-testid": "quiz-badge", children: "Simulad\xE3o" });
|
|
12202
12324
|
default:
|
|
12203
|
-
return /* @__PURE__ */ (0,
|
|
12325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Badge_default, { variant: "solid", action: "info", "data-testid": "quiz-badge", children: subtype });
|
|
12204
12326
|
}
|
|
12205
12327
|
};
|
|
12206
12328
|
var QuizHeaderResult = (0, import_react37.forwardRef)(
|
|
@@ -12245,7 +12367,7 @@ var QuizHeaderResult = (0, import_react37.forwardRef)(
|
|
|
12245
12367
|
return "N\xE3o foi dessa vez...voc\xEA deixou a resposta em branco";
|
|
12246
12368
|
}
|
|
12247
12369
|
};
|
|
12248
|
-
return /* @__PURE__ */ (0,
|
|
12370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
12249
12371
|
"div",
|
|
12250
12372
|
{
|
|
12251
12373
|
ref,
|
|
@@ -12256,8 +12378,8 @@ var QuizHeaderResult = (0, import_react37.forwardRef)(
|
|
|
12256
12378
|
),
|
|
12257
12379
|
...props,
|
|
12258
12380
|
children: [
|
|
12259
|
-
/* @__PURE__ */ (0,
|
|
12260
|
-
/* @__PURE__ */ (0,
|
|
12381
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-text-950 font-bold text-lg", children: "Resultado" }),
|
|
12382
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-text-700 text-md", children: getLabelByAnswersStatus() })
|
|
12261
12383
|
]
|
|
12262
12384
|
}
|
|
12263
12385
|
);
|
|
@@ -12265,7 +12387,7 @@ var QuizHeaderResult = (0, import_react37.forwardRef)(
|
|
|
12265
12387
|
);
|
|
12266
12388
|
var QuizResultHeaderTitle = (0, import_react37.forwardRef)(({ className, showBadge = true, onRepeat, canRetry, ...props }, ref) => {
|
|
12267
12389
|
const { quiz } = useQuizStore();
|
|
12268
|
-
return /* @__PURE__ */ (0,
|
|
12390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
12269
12391
|
"div",
|
|
12270
12392
|
{
|
|
12271
12393
|
ref,
|
|
@@ -12275,9 +12397,9 @@ var QuizResultHeaderTitle = (0, import_react37.forwardRef)(({ className, showBad
|
|
|
12275
12397
|
),
|
|
12276
12398
|
...props,
|
|
12277
12399
|
children: [
|
|
12278
|
-
/* @__PURE__ */ (0,
|
|
12279
|
-
/* @__PURE__ */ (0,
|
|
12280
|
-
canRetry && onRepeat && /* @__PURE__ */ (0,
|
|
12400
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: "Resultado" }),
|
|
12401
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-row gap-3 items-center", children: [
|
|
12402
|
+
canRetry && onRepeat && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12281
12403
|
Button_default,
|
|
12282
12404
|
{
|
|
12283
12405
|
variant: "solid",
|
|
@@ -12287,7 +12409,7 @@ var QuizResultHeaderTitle = (0, import_react37.forwardRef)(({ className, showBad
|
|
|
12287
12409
|
children: "Repetir question\xE1rio"
|
|
12288
12410
|
}
|
|
12289
12411
|
),
|
|
12290
|
-
showBadge && /* @__PURE__ */ (0,
|
|
12412
|
+
showBadge && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(QuizBadge, { subtype: quiz?.subtype || void 0 })
|
|
12291
12413
|
] })
|
|
12292
12414
|
]
|
|
12293
12415
|
}
|
|
@@ -12296,7 +12418,7 @@ var QuizResultHeaderTitle = (0, import_react37.forwardRef)(({ className, showBad
|
|
|
12296
12418
|
var QuizResultTitle = (0, import_react37.forwardRef)(({ className, ...props }, ref) => {
|
|
12297
12419
|
const { getQuizTitle } = useQuizStore();
|
|
12298
12420
|
const quizTitle = getQuizTitle();
|
|
12299
|
-
return /* @__PURE__ */ (0,
|
|
12421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12300
12422
|
"p",
|
|
12301
12423
|
{
|
|
12302
12424
|
className: cn("pt-6 pb-4 text-text-950 font-bold text-lg", className),
|
|
@@ -12348,7 +12470,7 @@ var QuizResultPerformance = (0, import_react37.forwardRef)(({ showDetails = true
|
|
|
12348
12470
|
}
|
|
12349
12471
|
const percentage = totalQuestions > 0 ? Math.round(correctAnswers / totalQuestions * 100) : 0;
|
|
12350
12472
|
const classesJustifyBetween = showDetails ? "justify-between" : "justify-center";
|
|
12351
|
-
return /* @__PURE__ */ (0,
|
|
12473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
12352
12474
|
"div",
|
|
12353
12475
|
{
|
|
12354
12476
|
className: cn(
|
|
@@ -12358,8 +12480,8 @@ var QuizResultPerformance = (0, import_react37.forwardRef)(({ showDetails = true
|
|
|
12358
12480
|
ref,
|
|
12359
12481
|
...props,
|
|
12360
12482
|
children: [
|
|
12361
|
-
/* @__PURE__ */ (0,
|
|
12362
|
-
/* @__PURE__ */ (0,
|
|
12483
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "relative", children: [
|
|
12484
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12363
12485
|
ProgressCircle_default,
|
|
12364
12486
|
{
|
|
12365
12487
|
size: "medium",
|
|
@@ -12369,24 +12491,24 @@ var QuizResultPerformance = (0, import_react37.forwardRef)(({ showDetails = true
|
|
|
12369
12491
|
label: ""
|
|
12370
12492
|
}
|
|
12371
12493
|
),
|
|
12372
|
-
/* @__PURE__ */ (0,
|
|
12373
|
-
showDetails && /* @__PURE__ */ (0,
|
|
12374
|
-
/* @__PURE__ */ (0,
|
|
12375
|
-
/* @__PURE__ */ (0,
|
|
12494
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
12495
|
+
showDetails && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center gap-1 mb-1", children: [
|
|
12496
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_phosphor_react27.Clock, { size: 12, weight: "regular", className: "text-text-800" }),
|
|
12497
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "text-2xs font-medium text-text-800", children: formatTime2(
|
|
12376
12498
|
(getQuestionResultStatistics()?.timeSpent ?? 0) * 60
|
|
12377
12499
|
) })
|
|
12378
12500
|
] }),
|
|
12379
|
-
/* @__PURE__ */ (0,
|
|
12501
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "text-2xl font-medium text-text-800 leading-7", children: [
|
|
12380
12502
|
getQuestionResultStatistics()?.correctAnswers ?? "--",
|
|
12381
12503
|
" de",
|
|
12382
12504
|
" ",
|
|
12383
12505
|
totalQuestions
|
|
12384
12506
|
] }),
|
|
12385
|
-
/* @__PURE__ */ (0,
|
|
12507
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "text-2xs font-medium text-text-600 mt-1", children: "Corretas" })
|
|
12386
12508
|
] })
|
|
12387
12509
|
] }),
|
|
12388
|
-
showDetails && /* @__PURE__ */ (0,
|
|
12389
|
-
/* @__PURE__ */ (0,
|
|
12510
|
+
showDetails && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-col gap-4 w-full", children: [
|
|
12511
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12390
12512
|
ProgressBar_default,
|
|
12391
12513
|
{
|
|
12392
12514
|
className: "w-full",
|
|
@@ -12400,7 +12522,7 @@ var QuizResultPerformance = (0, import_react37.forwardRef)(({ showDetails = true
|
|
|
12400
12522
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
12401
12523
|
}
|
|
12402
12524
|
),
|
|
12403
|
-
/* @__PURE__ */ (0,
|
|
12525
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12404
12526
|
ProgressBar_default,
|
|
12405
12527
|
{
|
|
12406
12528
|
className: "w-full",
|
|
@@ -12414,7 +12536,7 @@ var QuizResultPerformance = (0, import_react37.forwardRef)(({ showDetails = true
|
|
|
12414
12536
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
12415
12537
|
}
|
|
12416
12538
|
),
|
|
12417
|
-
/* @__PURE__ */ (0,
|
|
12539
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12418
12540
|
ProgressBar_default,
|
|
12419
12541
|
{
|
|
12420
12542
|
className: "w-full",
|
|
@@ -12461,9 +12583,9 @@ var QuizListResult = (0, import_react37.forwardRef)(({ className, onSubjectClick
|
|
|
12461
12583
|
};
|
|
12462
12584
|
}
|
|
12463
12585
|
);
|
|
12464
|
-
return /* @__PURE__ */ (0,
|
|
12465
|
-
/* @__PURE__ */ (0,
|
|
12466
|
-
/* @__PURE__ */ (0,
|
|
12586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("section", { ref, className, ...props, children: [
|
|
12587
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Mat\xE9rias" }),
|
|
12588
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("ul", { className: "flex flex-col gap-2", children: subjectsStats.map((subject) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12467
12589
|
CardResults,
|
|
12468
12590
|
{
|
|
12469
12591
|
onClick: () => onSubjectClick?.(subject.subject.id),
|
|
@@ -12487,16 +12609,16 @@ var QuizListResultByMateria = ({
|
|
|
12487
12609
|
const groupedQuestions = getQuestionsGroupedBySubject();
|
|
12488
12610
|
const answeredQuestions = groupedQuestions[subject] || [];
|
|
12489
12611
|
const formattedQuestions = subject == "all" ? Object.values(groupedQuestions).flat() : answeredQuestions;
|
|
12490
|
-
return /* @__PURE__ */ (0,
|
|
12491
|
-
/* @__PURE__ */ (0,
|
|
12492
|
-
/* @__PURE__ */ (0,
|
|
12493
|
-
/* @__PURE__ */ (0,
|
|
12494
|
-
/* @__PURE__ */ (0,
|
|
12612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex flex-col", children: [
|
|
12613
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "flex flex-row pt-4 justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: subjectName || formattedQuestions?.[0]?.knowledgeMatrix?.[0]?.subject?.name || "Sem mat\xE9ria" }) }),
|
|
12614
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("section", { className: "flex flex-col ", children: [
|
|
12615
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Resultado das quest\xF5es" }),
|
|
12616
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("ul", { className: "flex flex-col gap-2 pt-4", children: formattedQuestions.map((question) => {
|
|
12495
12617
|
const questionIndex = getQuestionIndex(
|
|
12496
12618
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
12497
12619
|
question.questionId ?? question.id
|
|
12498
12620
|
);
|
|
12499
|
-
return /* @__PURE__ */ (0,
|
|
12621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
12500
12622
|
CardStatus,
|
|
12501
12623
|
{
|
|
12502
12624
|
className: "max-w-full",
|
|
@@ -12520,16 +12642,234 @@ var QuizListResultByMateria = ({
|
|
|
12520
12642
|
] });
|
|
12521
12643
|
};
|
|
12522
12644
|
|
|
12523
|
-
// src/
|
|
12645
|
+
// src/components/BreadcrumbMenu/BreadcrumbMenu.tsx
|
|
12646
|
+
var import_react_router_dom3 = require("react-router-dom");
|
|
12647
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
12648
|
+
var BreadcrumbMenu = ({
|
|
12649
|
+
breadcrumbs,
|
|
12650
|
+
onBreadcrumbClick,
|
|
12651
|
+
className = "!px-0 py-4 flex-wrap w-full"
|
|
12652
|
+
}) => {
|
|
12653
|
+
const navigate = (0, import_react_router_dom3.useNavigate)();
|
|
12654
|
+
const handleClick = (breadcrumb, index) => {
|
|
12655
|
+
if (onBreadcrumbClick) {
|
|
12656
|
+
onBreadcrumbClick(breadcrumb, index);
|
|
12657
|
+
}
|
|
12658
|
+
navigate(breadcrumb.url);
|
|
12659
|
+
};
|
|
12660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
12661
|
+
Menu,
|
|
12662
|
+
{
|
|
12663
|
+
value: `breadcrumb-${breadcrumbs.length - 1}`,
|
|
12664
|
+
defaultValue: "breadcrumb-0",
|
|
12665
|
+
variant: "breadcrumb",
|
|
12666
|
+
className,
|
|
12667
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(MenuContent, { className: "w-full flex flex-row flex-wrap gap-2 !px-0", children: breadcrumbs.map((breadcrumb, index) => {
|
|
12668
|
+
const isLast = index === breadcrumbs.length - 1;
|
|
12669
|
+
const hasSeparator = !isLast;
|
|
12670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
12671
|
+
MenuItem,
|
|
12672
|
+
{
|
|
12673
|
+
variant: "breadcrumb",
|
|
12674
|
+
value: `breadcrumb-${index}`,
|
|
12675
|
+
className: "!p-0 whitespace-nowrap",
|
|
12676
|
+
onClick: () => handleClick(breadcrumb, index),
|
|
12677
|
+
separator: hasSeparator,
|
|
12678
|
+
children: breadcrumb.name
|
|
12679
|
+
},
|
|
12680
|
+
breadcrumb.id
|
|
12681
|
+
);
|
|
12682
|
+
}) })
|
|
12683
|
+
}
|
|
12684
|
+
);
|
|
12685
|
+
};
|
|
12686
|
+
|
|
12687
|
+
// src/components/BreadcrumbMenu/useBreadcrumbBuilder.ts
|
|
12688
|
+
var import_react38 = require("react");
|
|
12689
|
+
|
|
12690
|
+
// src/components/BreadcrumbMenu/breadcrumbStore.ts
|
|
12691
|
+
var import_zustand10 = require("zustand");
|
|
12692
|
+
var useBreadcrumbStore = (0, import_zustand10.create)((set, get) => ({
|
|
12693
|
+
breadcrumbs: {},
|
|
12694
|
+
setBreadcrumbs: (namespace, items) => {
|
|
12695
|
+
set((state) => ({
|
|
12696
|
+
breadcrumbs: {
|
|
12697
|
+
...state.breadcrumbs,
|
|
12698
|
+
[namespace]: items
|
|
12699
|
+
}
|
|
12700
|
+
}));
|
|
12701
|
+
},
|
|
12702
|
+
addBreadcrumb: (namespace, item) => {
|
|
12703
|
+
set((state) => {
|
|
12704
|
+
const current = state.breadcrumbs[namespace] || [];
|
|
12705
|
+
return {
|
|
12706
|
+
breadcrumbs: {
|
|
12707
|
+
...state.breadcrumbs,
|
|
12708
|
+
[namespace]: [...current, item]
|
|
12709
|
+
}
|
|
12710
|
+
};
|
|
12711
|
+
});
|
|
12712
|
+
},
|
|
12713
|
+
updateBreadcrumb: (namespace, itemId, updates) => {
|
|
12714
|
+
set((state) => {
|
|
12715
|
+
const current = state.breadcrumbs[namespace] || [];
|
|
12716
|
+
return {
|
|
12717
|
+
breadcrumbs: {
|
|
12718
|
+
...state.breadcrumbs,
|
|
12719
|
+
[namespace]: current.map(
|
|
12720
|
+
(item) => item.id === itemId ? { ...item, ...updates } : item
|
|
12721
|
+
)
|
|
12722
|
+
}
|
|
12723
|
+
};
|
|
12724
|
+
});
|
|
12725
|
+
},
|
|
12726
|
+
removeBreadcrumbFrom: (namespace, itemId) => {
|
|
12727
|
+
set((state) => {
|
|
12728
|
+
const current = state.breadcrumbs[namespace] || [];
|
|
12729
|
+
const index = current.findIndex((item) => item.id === itemId);
|
|
12730
|
+
if (index === -1) return state;
|
|
12731
|
+
return {
|
|
12732
|
+
breadcrumbs: {
|
|
12733
|
+
...state.breadcrumbs,
|
|
12734
|
+
[namespace]: current.slice(0, index)
|
|
12735
|
+
}
|
|
12736
|
+
};
|
|
12737
|
+
});
|
|
12738
|
+
},
|
|
12739
|
+
sliceBreadcrumbs: (namespace, index) => {
|
|
12740
|
+
set((state) => {
|
|
12741
|
+
const current = state.breadcrumbs[namespace] || [];
|
|
12742
|
+
return {
|
|
12743
|
+
breadcrumbs: {
|
|
12744
|
+
...state.breadcrumbs,
|
|
12745
|
+
[namespace]: current.slice(0, index + 1)
|
|
12746
|
+
}
|
|
12747
|
+
};
|
|
12748
|
+
});
|
|
12749
|
+
},
|
|
12750
|
+
clearBreadcrumbs: (namespace) => {
|
|
12751
|
+
set((state) => {
|
|
12752
|
+
const { [namespace]: _, ...rest } = state.breadcrumbs;
|
|
12753
|
+
return {
|
|
12754
|
+
breadcrumbs: rest
|
|
12755
|
+
};
|
|
12756
|
+
});
|
|
12757
|
+
},
|
|
12758
|
+
getBreadcrumbs: (namespace) => {
|
|
12759
|
+
return get().breadcrumbs[namespace] || [];
|
|
12760
|
+
}
|
|
12761
|
+
}));
|
|
12762
|
+
var useBreadcrumb = (namespace) => {
|
|
12763
|
+
const store = useBreadcrumbStore();
|
|
12764
|
+
const breadcrumbs = store.breadcrumbs[namespace] || [];
|
|
12765
|
+
return {
|
|
12766
|
+
breadcrumbs,
|
|
12767
|
+
/**
|
|
12768
|
+
* Define todos os breadcrumbs de uma vez
|
|
12769
|
+
*/
|
|
12770
|
+
setBreadcrumbs: (items) => {
|
|
12771
|
+
store.setBreadcrumbs(namespace, items);
|
|
12772
|
+
},
|
|
12773
|
+
/**
|
|
12774
|
+
* Adiciona um novo breadcrumb ao final
|
|
12775
|
+
*/
|
|
12776
|
+
addBreadcrumb: (item) => {
|
|
12777
|
+
store.addBreadcrumb(namespace, item);
|
|
12778
|
+
},
|
|
12779
|
+
/**
|
|
12780
|
+
* Atualiza um breadcrumb existente
|
|
12781
|
+
*/
|
|
12782
|
+
updateBreadcrumb: (itemId, updates) => {
|
|
12783
|
+
store.updateBreadcrumb(namespace, itemId, updates);
|
|
12784
|
+
},
|
|
12785
|
+
/**
|
|
12786
|
+
* Remove um breadcrumb e todos os seguintes
|
|
12787
|
+
*/
|
|
12788
|
+
removeBreadcrumbFrom: (itemId) => {
|
|
12789
|
+
store.removeBreadcrumbFrom(namespace, itemId);
|
|
12790
|
+
},
|
|
12791
|
+
/**
|
|
12792
|
+
* Mantém apenas os breadcrumbs até o índice especificado (inclusivo)
|
|
12793
|
+
*/
|
|
12794
|
+
sliceBreadcrumbs: (index) => {
|
|
12795
|
+
store.sliceBreadcrumbs(namespace, index);
|
|
12796
|
+
},
|
|
12797
|
+
/**
|
|
12798
|
+
* Limpa todos os breadcrumbs
|
|
12799
|
+
*/
|
|
12800
|
+
clearBreadcrumbs: () => {
|
|
12801
|
+
store.clearBreadcrumbs(namespace);
|
|
12802
|
+
}
|
|
12803
|
+
};
|
|
12804
|
+
};
|
|
12805
|
+
|
|
12806
|
+
// src/components/BreadcrumbMenu/useBreadcrumbBuilder.ts
|
|
12807
|
+
var isBreadcrumbWithData = (level) => {
|
|
12808
|
+
return "data" in level;
|
|
12809
|
+
};
|
|
12810
|
+
var useBreadcrumbBuilder = (config) => {
|
|
12811
|
+
const { namespace, root, levels } = config;
|
|
12812
|
+
const { breadcrumbs, setBreadcrumbs, sliceBreadcrumbs } = useBreadcrumb(namespace);
|
|
12813
|
+
const levelDependencies = levels.map(
|
|
12814
|
+
(level) => isBreadcrumbWithData(level) ? level.data : null
|
|
12815
|
+
);
|
|
12816
|
+
const levelUrlIds = levels.map((level) => level.urlId);
|
|
12817
|
+
(0, import_react38.useEffect)(() => {
|
|
12818
|
+
const newBreadcrumbs = [root];
|
|
12819
|
+
const previousIds = [];
|
|
12820
|
+
for (const level of levels) {
|
|
12821
|
+
const { urlId } = level;
|
|
12822
|
+
if (isBreadcrumbWithData(level)) {
|
|
12823
|
+
const { data, getId, getName, getUrl } = level;
|
|
12824
|
+
if (!data) break;
|
|
12825
|
+
const dataId = getId(data);
|
|
12826
|
+
if (urlId === void 0 || dataId !== urlId) break;
|
|
12827
|
+
newBreadcrumbs.push({
|
|
12828
|
+
id: dataId,
|
|
12829
|
+
name: getName(data),
|
|
12830
|
+
url: getUrl(data, previousIds)
|
|
12831
|
+
});
|
|
12832
|
+
previousIds.push(dataId);
|
|
12833
|
+
} else {
|
|
12834
|
+
const { breadcrumb } = level;
|
|
12835
|
+
if (urlId === void 0) break;
|
|
12836
|
+
newBreadcrumbs.push(breadcrumb);
|
|
12837
|
+
previousIds.push(breadcrumb.id);
|
|
12838
|
+
}
|
|
12839
|
+
}
|
|
12840
|
+
setBreadcrumbs(newBreadcrumbs);
|
|
12841
|
+
}, [namespace, ...levelDependencies, ...levelUrlIds, root.id]);
|
|
12842
|
+
return {
|
|
12843
|
+
breadcrumbs,
|
|
12844
|
+
sliceBreadcrumbs
|
|
12845
|
+
};
|
|
12846
|
+
};
|
|
12847
|
+
|
|
12848
|
+
// src/components/BreadcrumbMenu/useUrlParams.ts
|
|
12524
12849
|
var import_react39 = require("react");
|
|
12850
|
+
var import_react_router_dom4 = require("react-router-dom");
|
|
12851
|
+
var useUrlParams = (config) => {
|
|
12852
|
+
const location = (0, import_react_router_dom4.useLocation)();
|
|
12853
|
+
return (0, import_react39.useMemo)(() => {
|
|
12854
|
+
const segments = location.pathname.split("/").filter(Boolean);
|
|
12855
|
+
const params = {};
|
|
12856
|
+
for (const [key, index] of Object.entries(config)) {
|
|
12857
|
+
params[key] = segments[index];
|
|
12858
|
+
}
|
|
12859
|
+
return params;
|
|
12860
|
+
}, [location.pathname, config]);
|
|
12861
|
+
};
|
|
12862
|
+
|
|
12863
|
+
// src/hooks/useAppInitialization.ts
|
|
12864
|
+
var import_react41 = require("react");
|
|
12525
12865
|
|
|
12526
12866
|
// src/hooks/useInstitution.ts
|
|
12527
|
-
var
|
|
12867
|
+
var import_react40 = require("react");
|
|
12528
12868
|
function useInstitutionId() {
|
|
12529
|
-
const [institutionId, setInstitutionId] = (0,
|
|
12869
|
+
const [institutionId, setInstitutionId] = (0, import_react40.useState)(() => {
|
|
12530
12870
|
return document.querySelector('meta[name="institution-id"]')?.getAttribute("content") ?? null;
|
|
12531
12871
|
});
|
|
12532
|
-
(0,
|
|
12872
|
+
(0, import_react40.useEffect)(() => {
|
|
12533
12873
|
const metaTag = document.querySelector('meta[name="institution-id"]');
|
|
12534
12874
|
if (!metaTag) return;
|
|
12535
12875
|
const observer = new MutationObserver(() => {
|
|
@@ -12546,9 +12886,9 @@ function useInstitutionId() {
|
|
|
12546
12886
|
}
|
|
12547
12887
|
|
|
12548
12888
|
// src/store/appStore.ts
|
|
12549
|
-
var
|
|
12889
|
+
var import_zustand11 = require("zustand");
|
|
12550
12890
|
var import_middleware4 = require("zustand/middleware");
|
|
12551
|
-
var useAppStore = (0,
|
|
12891
|
+
var useAppStore = (0, import_zustand11.create)()(
|
|
12552
12892
|
(0, import_middleware4.persist)(
|
|
12553
12893
|
(set, get) => ({
|
|
12554
12894
|
institutionId: null,
|
|
@@ -12592,9 +12932,9 @@ var useAppStore = (0, import_zustand10.create)()(
|
|
|
12592
12932
|
);
|
|
12593
12933
|
|
|
12594
12934
|
// src/store/authStore.ts
|
|
12595
|
-
var
|
|
12935
|
+
var import_zustand12 = require("zustand");
|
|
12596
12936
|
var import_middleware5 = require("zustand/middleware");
|
|
12597
|
-
var useAuthStore = (0,
|
|
12937
|
+
var useAuthStore = (0, import_zustand12.create)()(
|
|
12598
12938
|
(0, import_middleware5.persist)(
|
|
12599
12939
|
(set, get) => ({
|
|
12600
12940
|
user: null,
|
|
@@ -12696,7 +13036,7 @@ var useAuthStore = (0, import_zustand11.create)()(
|
|
|
12696
13036
|
function useAppInitialization() {
|
|
12697
13037
|
const getInstitutionId = useInstitutionId();
|
|
12698
13038
|
const { initialize, initialized, institutionId } = useAppStore();
|
|
12699
|
-
const authFunctions = (0,
|
|
13039
|
+
const authFunctions = (0, import_react41.useMemo)(
|
|
12700
13040
|
() => ({
|
|
12701
13041
|
checkAuth: async () => {
|
|
12702
13042
|
const { sessionInfo, tokens } = useAuthStore.getState();
|
|
@@ -12733,10 +13073,10 @@ function useAppInitialization() {
|
|
|
12733
13073
|
}
|
|
12734
13074
|
|
|
12735
13075
|
// src/hooks/useAppContent.ts
|
|
12736
|
-
var
|
|
12737
|
-
var
|
|
13076
|
+
var import_react42 = require("react");
|
|
13077
|
+
var import_react_router_dom5 = require("react-router-dom");
|
|
12738
13078
|
function useAppContent(config) {
|
|
12739
|
-
const navigate = (0,
|
|
13079
|
+
const navigate = (0, import_react_router_dom5.useNavigate)();
|
|
12740
13080
|
const { setTokens, setSessionInfo, setSelectedProfile } = useAuthStore();
|
|
12741
13081
|
const {
|
|
12742
13082
|
api,
|
|
@@ -12759,20 +13099,20 @@ function useAppContent(config) {
|
|
|
12759
13099
|
navigate("/painel");
|
|
12760
13100
|
}
|
|
12761
13101
|
};
|
|
12762
|
-
const handleSetSelectedProfile = (0,
|
|
13102
|
+
const handleSetSelectedProfile = (0, import_react42.useCallback)(
|
|
12763
13103
|
(profile) => {
|
|
12764
13104
|
setSelectedProfile(profile);
|
|
12765
13105
|
},
|
|
12766
13106
|
[setSelectedProfile]
|
|
12767
13107
|
);
|
|
12768
|
-
const handleClearParamsFromURL = (0,
|
|
13108
|
+
const handleClearParamsFromURL = (0, import_react42.useCallback)(() => {
|
|
12769
13109
|
if (onClearParamsFromURL) {
|
|
12770
13110
|
onClearParamsFromURL();
|
|
12771
13111
|
} else {
|
|
12772
13112
|
globalThis.location.replace("/painel");
|
|
12773
13113
|
}
|
|
12774
13114
|
}, [onClearParamsFromURL]);
|
|
12775
|
-
const handleError = (0,
|
|
13115
|
+
const handleError = (0, import_react42.useCallback)(
|
|
12776
13116
|
(error) => {
|
|
12777
13117
|
if (onError) {
|
|
12778
13118
|
onError(error);
|
|
@@ -12783,7 +13123,7 @@ function useAppContent(config) {
|
|
|
12783
13123
|
},
|
|
12784
13124
|
[navigate, onError]
|
|
12785
13125
|
);
|
|
12786
|
-
const urlAuthConfig = (0,
|
|
13126
|
+
const urlAuthConfig = (0, import_react42.useMemo)(
|
|
12787
13127
|
() => ({
|
|
12788
13128
|
setTokens,
|
|
12789
13129
|
setSessionInfo,
|
|
@@ -12809,10 +13149,10 @@ function useAppContent(config) {
|
|
|
12809
13149
|
);
|
|
12810
13150
|
useUrlAuthentication(urlAuthConfig);
|
|
12811
13151
|
const { sessionInfo } = useAuth();
|
|
12812
|
-
const institutionIdToUse = (0,
|
|
13152
|
+
const institutionIdToUse = (0, import_react42.useMemo)(() => {
|
|
12813
13153
|
return sessionInfo?.institutionId || getInstitutionId;
|
|
12814
13154
|
}, [sessionInfo?.institutionId, getInstitutionId]);
|
|
12815
|
-
(0,
|
|
13155
|
+
(0, import_react42.useEffect)(() => {
|
|
12816
13156
|
if (institutionIdToUse && !initialized) {
|
|
12817
13157
|
initialize(institutionIdToUse);
|
|
12818
13158
|
}
|
|
@@ -12831,6 +13171,7 @@ function useAppContent(config) {
|
|
|
12831
13171
|
AlternativesList,
|
|
12832
13172
|
AuthProvider,
|
|
12833
13173
|
Badge,
|
|
13174
|
+
BreadcrumbMenu,
|
|
12834
13175
|
Button,
|
|
12835
13176
|
Calendar,
|
|
12836
13177
|
CardAccordation,
|
|
@@ -12922,6 +13263,7 @@ function useAppContent(config) {
|
|
|
12922
13263
|
SkeletonRounded,
|
|
12923
13264
|
SkeletonTable,
|
|
12924
13265
|
SkeletonText,
|
|
13266
|
+
StatisticsCard,
|
|
12925
13267
|
Stepper,
|
|
12926
13268
|
SubjectEnum,
|
|
12927
13269
|
SubjectInfo,
|
|
@@ -12956,6 +13298,8 @@ function useAppContent(config) {
|
|
|
12956
13298
|
useAuth,
|
|
12957
13299
|
useAuthGuard,
|
|
12958
13300
|
useAuthStore,
|
|
13301
|
+
useBreadcrumb,
|
|
13302
|
+
useBreadcrumbBuilder,
|
|
12959
13303
|
useInstitutionId,
|
|
12960
13304
|
useMobile,
|
|
12961
13305
|
useQuizStore,
|
|
@@ -12964,6 +13308,7 @@ function useAppContent(config) {
|
|
|
12964
13308
|
useThemeStore,
|
|
12965
13309
|
useToastStore,
|
|
12966
13310
|
useUrlAuthentication,
|
|
13311
|
+
useUrlParams,
|
|
12967
13312
|
withAuth
|
|
12968
13313
|
});
|
|
12969
13314
|
//# sourceMappingURL=index.js.map
|