analytica-frontend-lib 1.2.78 → 1.2.79
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/ActivitiesHistory/index.js +485 -418
- package/dist/ActivitiesHistory/index.js.map +1 -1
- package/dist/ActivitiesHistory/index.mjs +478 -411
- package/dist/ActivitiesHistory/index.mjs.map +1 -1
- package/dist/RecommendedLessonsHistory/index.d.ts +1 -1
- package/dist/RecommendedLessonsHistory/index.d.ts.map +1 -1
- package/dist/RecommendedLessonsHistory/index.js +1183 -381
- package/dist/RecommendedLessonsHistory/index.js.map +1 -1
- package/dist/RecommendedLessonsHistory/index.mjs +1176 -372
- package/dist/RecommendedLessonsHistory/index.mjs.map +1 -1
- package/dist/SendActivityModal/SendActivityModal.d.ts.map +1 -1
- package/dist/SendActivityModal/SendActivityModal.js +4261 -4117
- package/dist/SendActivityModal/SendActivityModal.js.map +1 -1
- package/dist/SendActivityModal/SendActivityModal.mjs +4282 -4139
- package/dist/SendActivityModal/SendActivityModal.mjs.map +1 -1
- package/dist/SendActivityModal/hooks/useSendActivityModal.d.ts.map +1 -1
- package/dist/SendActivityModal/hooks/useSendActivityModal.js +16 -18
- package/dist/SendActivityModal/hooks/useSendActivityModal.js.map +1 -1
- package/dist/SendActivityModal/hooks/useSendActivityModal.mjs +16 -18
- package/dist/SendActivityModal/hooks/useSendActivityModal.mjs.map +1 -1
- package/dist/SendActivityModal/index.js +1285 -1141
- package/dist/SendActivityModal/index.js.map +1 -1
- package/dist/SendActivityModal/index.mjs +1164 -1021
- package/dist/SendActivityModal/index.mjs.map +1 -1
- package/dist/hooks/useGoalModels.d.ts +171 -0
- package/dist/hooks/useGoalModels.d.ts.map +1 -0
- package/dist/index.d.ts +9 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1864 -1716
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1896 -1765
- package/dist/index.mjs.map +1 -1
- package/dist/types/recommendedLessons/index.d.ts +61 -0
- package/dist/types/recommendedLessons/index.d.ts.map +1 -1
- package/dist/types/recommendedLessons/index.js +7 -0
- package/dist/types/recommendedLessons/index.js.map +1 -1
- package/dist/types/recommendedLessons/index.mjs +6 -0
- package/dist/types/recommendedLessons/index.mjs.map +1 -1
- package/dist/types/recommendedLessons.d.ts +61 -0
- package/dist/types/recommendedLessons.d.ts.map +1 -1
- package/dist/utils/extractStudentsFromCategories.d.ts +15 -0
- package/dist/utils/extractStudentsFromCategories.d.ts.map +1 -0
- package/dist/utils/renderSubjectCell.d.ts +11 -0
- package/dist/utils/renderSubjectCell.d.ts.map +1 -0
- package/package.json +3 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/components/RecommendedLessonsHistory/RecommendedLessonsHistory.tsx
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Plus, CaretRight as CaretRight6, Trash, PencilSimple } from "phosphor-react";
|
|
2
|
+
import { useState as useState16, useCallback as useCallback6, useMemo as useMemo7, useRef as useRef8, useEffect as useEffect16 } from "react";
|
|
3
|
+
import { Plus as Plus2, CaretRight as CaretRight6, Trash as Trash2, PencilSimple as PencilSimple2 } from "phosphor-react";
|
|
4
4
|
|
|
5
5
|
// src/utils/utils.ts
|
|
6
6
|
import { clsx } from "clsx";
|
|
@@ -550,7 +550,7 @@ var injectStore = (children, store) => Children.map(children, (child) => {
|
|
|
550
550
|
});
|
|
551
551
|
|
|
552
552
|
// src/components/TableProvider/TableProvider.tsx
|
|
553
|
-
import { useState as
|
|
553
|
+
import { useState as useState15, useEffect as useEffect15, useMemo as useMemo6, useCallback as useCallback5 } from "react";
|
|
554
554
|
|
|
555
555
|
// src/components/Table/Table.tsx
|
|
556
556
|
import {
|
|
@@ -2671,7 +2671,7 @@ Search.displayName = "Search";
|
|
|
2671
2671
|
var Search_default = Search;
|
|
2672
2672
|
|
|
2673
2673
|
// src/components/CheckBoxGroup/CheckBoxGroup.tsx
|
|
2674
|
-
import { useEffect as
|
|
2674
|
+
import { useEffect as useEffect14, useMemo as useMemo5, useRef as useRef7, useState as useState14 } from "react";
|
|
2675
2675
|
|
|
2676
2676
|
// src/components/CheckBox/CheckBox.tsx
|
|
2677
2677
|
import {
|
|
@@ -2901,8 +2901,129 @@ var Divider = ({
|
|
|
2901
2901
|
};
|
|
2902
2902
|
var Divider_default = Divider;
|
|
2903
2903
|
|
|
2904
|
+
// src/components/Toast/Toast.tsx
|
|
2905
|
+
import { CheckCircle, WarningCircle, Info, X as X3 } from "phosphor-react";
|
|
2906
|
+
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2907
|
+
var VARIANT_ACTION_CLASSES3 = {
|
|
2908
|
+
solid: {
|
|
2909
|
+
warning: "bg-warning text-warning-600 border-none focus-visible:outline-none",
|
|
2910
|
+
success: "bg-success text-success-800 border-none focus-visible:outline-none",
|
|
2911
|
+
info: "bg-info text-info-600 border-none focus-visible:outline-none"
|
|
2912
|
+
},
|
|
2913
|
+
outlined: {
|
|
2914
|
+
warning: "bg-warning text-warning-600 border border-warning-300 focus-visible:outline-none",
|
|
2915
|
+
success: "bg-success text-success-800 border border-success-200 focus-visible:outline-none",
|
|
2916
|
+
info: "bg-info text-info-600 border border-info-600 focus-visible:outline-none"
|
|
2917
|
+
}
|
|
2918
|
+
};
|
|
2919
|
+
var iconMap = {
|
|
2920
|
+
success: CheckCircle,
|
|
2921
|
+
info: Info,
|
|
2922
|
+
warning: WarningCircle
|
|
2923
|
+
};
|
|
2924
|
+
var Toast = ({
|
|
2925
|
+
variant = "outlined",
|
|
2926
|
+
action = "success",
|
|
2927
|
+
className = "",
|
|
2928
|
+
onClose,
|
|
2929
|
+
title,
|
|
2930
|
+
description,
|
|
2931
|
+
position = "default",
|
|
2932
|
+
...props
|
|
2933
|
+
}) => {
|
|
2934
|
+
const variantClasses = VARIANT_ACTION_CLASSES3[variant][action];
|
|
2935
|
+
const positionClasses = {
|
|
2936
|
+
"top-left": "fixed top-4 left-4",
|
|
2937
|
+
"top-center": "fixed top-4 left-1/2 transform -translate-x-1/2",
|
|
2938
|
+
"top-right": "fixed top-4 right-4",
|
|
2939
|
+
"bottom-left": "fixed bottom-4 left-4",
|
|
2940
|
+
"bottom-center": "fixed bottom-4 left-1/2 transform -translate-x-1/2",
|
|
2941
|
+
"bottom-right": "fixed bottom-4 right-4",
|
|
2942
|
+
default: ""
|
|
2943
|
+
};
|
|
2944
|
+
const IconAction = iconMap[action] || iconMap["success"];
|
|
2945
|
+
const baseClasses = "max-w-[390px] w-full flex flex-row items-start justify-between shadow-lg rounded-lg border p-4 gap-6 group";
|
|
2946
|
+
return /* @__PURE__ */ jsxs14(
|
|
2947
|
+
"div",
|
|
2948
|
+
{
|
|
2949
|
+
role: "alert",
|
|
2950
|
+
"aria-live": "assertive",
|
|
2951
|
+
"aria-atomic": "true",
|
|
2952
|
+
className: cn(
|
|
2953
|
+
baseClasses,
|
|
2954
|
+
positionClasses[position],
|
|
2955
|
+
variantClasses,
|
|
2956
|
+
className
|
|
2957
|
+
),
|
|
2958
|
+
...props,
|
|
2959
|
+
children: [
|
|
2960
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex flex-row items-start gap-3", children: [
|
|
2961
|
+
/* @__PURE__ */ jsx18("span", { className: "mt-1", "data-testid": `toast-icon-${action}`, children: /* @__PURE__ */ jsx18(IconAction, {}) }),
|
|
2962
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex flex-col items-start justify-start", children: [
|
|
2963
|
+
/* @__PURE__ */ jsx18("p", { className: "font-semibold text-md", children: title }),
|
|
2964
|
+
description && /* @__PURE__ */ jsx18("p", { className: "text-md text-text-900", children: description })
|
|
2965
|
+
] })
|
|
2966
|
+
] }),
|
|
2967
|
+
/* @__PURE__ */ jsx18(
|
|
2968
|
+
"button",
|
|
2969
|
+
{
|
|
2970
|
+
onClick: onClose,
|
|
2971
|
+
"aria-label": "Dismiss notification",
|
|
2972
|
+
className: "text-background-500 cursor-pointer opacity-0 group-hover:opacity-100 transition-opacity",
|
|
2973
|
+
children: /* @__PURE__ */ jsx18(X3, {})
|
|
2974
|
+
}
|
|
2975
|
+
)
|
|
2976
|
+
]
|
|
2977
|
+
}
|
|
2978
|
+
);
|
|
2979
|
+
};
|
|
2980
|
+
var Toast_default = Toast;
|
|
2981
|
+
|
|
2982
|
+
// src/components/Toast/utils/ToastStore.ts
|
|
2983
|
+
import { create as create4 } from "zustand";
|
|
2984
|
+
var useToastStore = create4((set) => ({
|
|
2985
|
+
toasts: [],
|
|
2986
|
+
addToast: (toast) => {
|
|
2987
|
+
const id = crypto.randomUUID();
|
|
2988
|
+
set((state) => ({
|
|
2989
|
+
toasts: [...state.toasts, { id, ...toast }]
|
|
2990
|
+
}));
|
|
2991
|
+
},
|
|
2992
|
+
removeToast: (id) => {
|
|
2993
|
+
set((state) => ({
|
|
2994
|
+
toasts: state.toasts.filter((t) => t.id !== id)
|
|
2995
|
+
}));
|
|
2996
|
+
}
|
|
2997
|
+
}));
|
|
2998
|
+
var ToastStore_default = useToastStore;
|
|
2999
|
+
|
|
3000
|
+
// src/components/Toast/utils/Toaster.tsx
|
|
3001
|
+
import { Fragment as Fragment2, jsx as jsx19 } from "react/jsx-runtime";
|
|
3002
|
+
var Toaster = () => {
|
|
3003
|
+
const toasts = ToastStore_default((state) => state.toasts);
|
|
3004
|
+
const removeToast = ToastStore_default((state) => state.removeToast);
|
|
3005
|
+
return /* @__PURE__ */ jsx19(Fragment2, { children: toasts.map((toast) => /* @__PURE__ */ jsx19(
|
|
3006
|
+
Toast_default,
|
|
3007
|
+
{
|
|
3008
|
+
title: toast.title,
|
|
3009
|
+
description: toast.description,
|
|
3010
|
+
variant: toast.variant,
|
|
3011
|
+
action: toast.action,
|
|
3012
|
+
position: toast.position,
|
|
3013
|
+
onClose: () => removeToast(toast.id)
|
|
3014
|
+
},
|
|
3015
|
+
toast.id
|
|
3016
|
+
)) });
|
|
3017
|
+
};
|
|
3018
|
+
var useToast = () => {
|
|
3019
|
+
const addToast = ToastStore_default((state) => state.addToast);
|
|
3020
|
+
const removeToast = ToastStore_default((state) => state.removeToast);
|
|
3021
|
+
return { addToast, removeToast };
|
|
3022
|
+
};
|
|
3023
|
+
var Toaster_default = Toaster;
|
|
3024
|
+
|
|
2904
3025
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
2905
|
-
import { Fragment as
|
|
3026
|
+
import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2906
3027
|
var SIZE_CLASSES5 = {
|
|
2907
3028
|
small: {
|
|
2908
3029
|
container: "h-1",
|
|
@@ -3014,20 +3135,20 @@ var renderStackedHitCountDisplay = (showHitCount, showPercentage, clampedValue,
|
|
|
3014
3135
|
max,
|
|
3015
3136
|
percentage
|
|
3016
3137
|
);
|
|
3017
|
-
return /* @__PURE__ */
|
|
3138
|
+
return /* @__PURE__ */ jsx20(
|
|
3018
3139
|
"div",
|
|
3019
3140
|
{
|
|
3020
3141
|
className: cn(
|
|
3021
3142
|
"text-xs font-medium leading-[14px] text-right",
|
|
3022
3143
|
percentageClassName
|
|
3023
3144
|
),
|
|
3024
|
-
children: displayPriority.type === "hitCount" ? /* @__PURE__ */
|
|
3025
|
-
/* @__PURE__ */
|
|
3026
|
-
/* @__PURE__ */
|
|
3145
|
+
children: displayPriority.type === "hitCount" ? /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
|
3146
|
+
/* @__PURE__ */ jsx20("span", { className: "text-success-200", children: Math.round(clampedValue) }),
|
|
3147
|
+
/* @__PURE__ */ jsxs15("span", { className: "text-text-600", children: [
|
|
3027
3148
|
" de ",
|
|
3028
3149
|
max
|
|
3029
3150
|
] })
|
|
3030
|
-
] }) : /* @__PURE__ */
|
|
3151
|
+
] }) : /* @__PURE__ */ jsxs15(Text_default, { size: "xs", weight: "medium", className: "text-success-200", children: [
|
|
3031
3152
|
Math.round(percentage),
|
|
3032
3153
|
"%"
|
|
3033
3154
|
] })
|
|
@@ -3042,7 +3163,7 @@ var ProgressBarBase = ({
|
|
|
3042
3163
|
variantClasses,
|
|
3043
3164
|
containerClassName,
|
|
3044
3165
|
fillClassName
|
|
3045
|
-
}) => /* @__PURE__ */
|
|
3166
|
+
}) => /* @__PURE__ */ jsxs15(
|
|
3046
3167
|
"div",
|
|
3047
3168
|
{
|
|
3048
3169
|
className: cn(
|
|
@@ -3051,7 +3172,7 @@ var ProgressBarBase = ({
|
|
|
3051
3172
|
"overflow-hidden relative"
|
|
3052
3173
|
),
|
|
3053
3174
|
children: [
|
|
3054
|
-
/* @__PURE__ */
|
|
3175
|
+
/* @__PURE__ */ jsx20(
|
|
3055
3176
|
"progress",
|
|
3056
3177
|
{
|
|
3057
3178
|
value: clampedValue,
|
|
@@ -3060,7 +3181,7 @@ var ProgressBarBase = ({
|
|
|
3060
3181
|
className: "absolute inset-0 w-full h-full opacity-0"
|
|
3061
3182
|
}
|
|
3062
3183
|
),
|
|
3063
|
-
/* @__PURE__ */
|
|
3184
|
+
/* @__PURE__ */ jsx20(
|
|
3064
3185
|
"div",
|
|
3065
3186
|
{
|
|
3066
3187
|
className: cn(
|
|
@@ -3086,7 +3207,7 @@ var StackedLayout = ({
|
|
|
3086
3207
|
percentage,
|
|
3087
3208
|
variantClasses,
|
|
3088
3209
|
dimensions
|
|
3089
|
-
}) => /* @__PURE__ */
|
|
3210
|
+
}) => /* @__PURE__ */ jsxs15(
|
|
3090
3211
|
"div",
|
|
3091
3212
|
{
|
|
3092
3213
|
className: cn(
|
|
@@ -3096,8 +3217,8 @@ var StackedLayout = ({
|
|
|
3096
3217
|
className
|
|
3097
3218
|
),
|
|
3098
3219
|
children: [
|
|
3099
|
-
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */
|
|
3100
|
-
label && /* @__PURE__ */
|
|
3220
|
+
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ jsxs15("div", { className: "flex flex-row justify-between items-center w-full h-[19px]", children: [
|
|
3221
|
+
label && /* @__PURE__ */ jsx20(
|
|
3101
3222
|
Text_default,
|
|
3102
3223
|
{
|
|
3103
3224
|
as: "div",
|
|
@@ -3116,7 +3237,7 @@ var StackedLayout = ({
|
|
|
3116
3237
|
percentageClassName
|
|
3117
3238
|
)
|
|
3118
3239
|
] }),
|
|
3119
|
-
/* @__PURE__ */
|
|
3240
|
+
/* @__PURE__ */ jsx20(
|
|
3120
3241
|
ProgressBarBase,
|
|
3121
3242
|
{
|
|
3122
3243
|
clampedValue,
|
|
@@ -3158,7 +3279,7 @@ var CompactLayout = ({
|
|
|
3158
3279
|
percentageClassName,
|
|
3159
3280
|
labelClassName
|
|
3160
3281
|
});
|
|
3161
|
-
return /* @__PURE__ */
|
|
3282
|
+
return /* @__PURE__ */ jsxs15(
|
|
3162
3283
|
"div",
|
|
3163
3284
|
{
|
|
3164
3285
|
className: cn(
|
|
@@ -3168,7 +3289,7 @@ var CompactLayout = ({
|
|
|
3168
3289
|
className
|
|
3169
3290
|
),
|
|
3170
3291
|
children: [
|
|
3171
|
-
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */
|
|
3292
|
+
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ jsx20(
|
|
3172
3293
|
Text_default,
|
|
3173
3294
|
{
|
|
3174
3295
|
as: "div",
|
|
@@ -3179,7 +3300,7 @@ var CompactLayout = ({
|
|
|
3179
3300
|
children: content
|
|
3180
3301
|
}
|
|
3181
3302
|
),
|
|
3182
|
-
/* @__PURE__ */
|
|
3303
|
+
/* @__PURE__ */ jsx20(
|
|
3183
3304
|
ProgressBarBase,
|
|
3184
3305
|
{
|
|
3185
3306
|
clampedValue,
|
|
@@ -3215,9 +3336,9 @@ var DefaultLayout = ({
|
|
|
3215
3336
|
label,
|
|
3216
3337
|
showPercentage
|
|
3217
3338
|
);
|
|
3218
|
-
return /* @__PURE__ */
|
|
3219
|
-
displayConfig.showHeader && /* @__PURE__ */
|
|
3220
|
-
label && /* @__PURE__ */
|
|
3339
|
+
return /* @__PURE__ */ jsxs15("div", { className: cn("flex", sizeClasses.layout, gapClass, className), children: [
|
|
3340
|
+
displayConfig.showHeader && /* @__PURE__ */ jsxs15("div", { className: "flex flex-row items-center justify-between w-full", children: [
|
|
3341
|
+
label && /* @__PURE__ */ jsx20(
|
|
3221
3342
|
Text_default,
|
|
3222
3343
|
{
|
|
3223
3344
|
as: "div",
|
|
@@ -3230,7 +3351,7 @@ var DefaultLayout = ({
|
|
|
3230
3351
|
children: label
|
|
3231
3352
|
}
|
|
3232
3353
|
),
|
|
3233
|
-
showPercentage && /* @__PURE__ */
|
|
3354
|
+
showPercentage && /* @__PURE__ */ jsxs15(
|
|
3234
3355
|
Text_default,
|
|
3235
3356
|
{
|
|
3236
3357
|
size: "xs",
|
|
@@ -3246,7 +3367,7 @@ var DefaultLayout = ({
|
|
|
3246
3367
|
}
|
|
3247
3368
|
)
|
|
3248
3369
|
] }),
|
|
3249
|
-
/* @__PURE__ */
|
|
3370
|
+
/* @__PURE__ */ jsx20(
|
|
3250
3371
|
ProgressBarBase,
|
|
3251
3372
|
{
|
|
3252
3373
|
clampedValue,
|
|
@@ -3266,7 +3387,7 @@ var DefaultLayout = ({
|
|
|
3266
3387
|
)
|
|
3267
3388
|
}
|
|
3268
3389
|
),
|
|
3269
|
-
displayConfig.showPercentage && /* @__PURE__ */
|
|
3390
|
+
displayConfig.showPercentage && /* @__PURE__ */ jsxs15(
|
|
3270
3391
|
Text_default,
|
|
3271
3392
|
{
|
|
3272
3393
|
size: "xs",
|
|
@@ -3281,7 +3402,7 @@ var DefaultLayout = ({
|
|
|
3281
3402
|
]
|
|
3282
3403
|
}
|
|
3283
3404
|
),
|
|
3284
|
-
displayConfig.showLabel && /* @__PURE__ */
|
|
3405
|
+
displayConfig.showLabel && /* @__PURE__ */ jsx20(
|
|
3285
3406
|
Text_default,
|
|
3286
3407
|
{
|
|
3287
3408
|
as: "div",
|
|
@@ -3317,7 +3438,7 @@ var ProgressBar = ({
|
|
|
3317
3438
|
const sizeClasses = SIZE_CLASSES5[size];
|
|
3318
3439
|
const variantClasses = VARIANT_CLASSES2[variant];
|
|
3319
3440
|
if (layout === "stacked") {
|
|
3320
|
-
return /* @__PURE__ */
|
|
3441
|
+
return /* @__PURE__ */ jsx20(
|
|
3321
3442
|
StackedLayout,
|
|
3322
3443
|
{
|
|
3323
3444
|
className,
|
|
@@ -3338,7 +3459,7 @@ var ProgressBar = ({
|
|
|
3338
3459
|
);
|
|
3339
3460
|
}
|
|
3340
3461
|
if (layout === "compact") {
|
|
3341
|
-
return /* @__PURE__ */
|
|
3462
|
+
return /* @__PURE__ */ jsx20(
|
|
3342
3463
|
CompactLayout,
|
|
3343
3464
|
{
|
|
3344
3465
|
className,
|
|
@@ -3358,7 +3479,7 @@ var ProgressBar = ({
|
|
|
3358
3479
|
}
|
|
3359
3480
|
);
|
|
3360
3481
|
}
|
|
3361
|
-
return /* @__PURE__ */
|
|
3482
|
+
return /* @__PURE__ */ jsx20(
|
|
3362
3483
|
DefaultLayout,
|
|
3363
3484
|
{
|
|
3364
3485
|
className,
|
|
@@ -3388,7 +3509,7 @@ import {
|
|
|
3388
3509
|
// src/components/Card/Card.tsx
|
|
3389
3510
|
import {
|
|
3390
3511
|
forwardRef as forwardRef9,
|
|
3391
|
-
Fragment as
|
|
3512
|
+
Fragment as Fragment4,
|
|
3392
3513
|
useState as useState8,
|
|
3393
3514
|
useRef as useRef4,
|
|
3394
3515
|
useEffect as useEffect9
|
|
@@ -3396,7 +3517,7 @@ import {
|
|
|
3396
3517
|
import {
|
|
3397
3518
|
CaretRight as CaretRight4,
|
|
3398
3519
|
ChatCircleText,
|
|
3399
|
-
CheckCircle,
|
|
3520
|
+
CheckCircle as CheckCircle2,
|
|
3400
3521
|
Clock,
|
|
3401
3522
|
DotsThreeVertical,
|
|
3402
3523
|
Play,
|
|
@@ -3411,8 +3532,8 @@ import { cloneElement as cloneElement3 } from "react";
|
|
|
3411
3532
|
import * as PhosphorIcons from "phosphor-react";
|
|
3412
3533
|
|
|
3413
3534
|
// src/assets/icons/subjects/ChatPT.tsx
|
|
3414
|
-
import { jsx as
|
|
3415
|
-
var ChatPT = ({ size, color }) => /* @__PURE__ */
|
|
3535
|
+
import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3536
|
+
var ChatPT = ({ size, color }) => /* @__PURE__ */ jsxs16(
|
|
3416
3537
|
"svg",
|
|
3417
3538
|
{
|
|
3418
3539
|
width: size,
|
|
@@ -3421,21 +3542,21 @@ var ChatPT = ({ size, color }) => /* @__PURE__ */ jsxs15(
|
|
|
3421
3542
|
fill: "none",
|
|
3422
3543
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3423
3544
|
children: [
|
|
3424
|
-
/* @__PURE__ */
|
|
3545
|
+
/* @__PURE__ */ jsx21(
|
|
3425
3546
|
"path",
|
|
3426
3547
|
{
|
|
3427
3548
|
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
3428
3549
|
fill: color
|
|
3429
3550
|
}
|
|
3430
3551
|
),
|
|
3431
|
-
/* @__PURE__ */
|
|
3552
|
+
/* @__PURE__ */ jsx21(
|
|
3432
3553
|
"path",
|
|
3433
3554
|
{
|
|
3434
3555
|
d: "M21.1758 12V20.5312H19.7168V12H21.1758ZM23.8535 12V13.1719H17.0625V12H23.8535Z",
|
|
3435
3556
|
fill: color
|
|
3436
3557
|
}
|
|
3437
3558
|
),
|
|
3438
|
-
/* @__PURE__ */
|
|
3559
|
+
/* @__PURE__ */ jsx21(
|
|
3439
3560
|
"path",
|
|
3440
3561
|
{
|
|
3441
3562
|
d: "M13.2402 17.3496H11.0195V16.1836H13.2402C13.627 16.1836 13.9395 16.1211 14.1777 15.9961C14.416 15.8711 14.5898 15.6992 14.6992 15.4805C14.8125 15.2578 14.8691 15.0039 14.8691 14.7188C14.8691 14.4492 14.8125 14.1973 14.6992 13.9629C14.5898 13.7246 14.416 13.5332 14.1777 13.3887C13.9395 13.2441 13.627 13.1719 13.2402 13.1719H11.4707V20.5312H10V12H13.2402C13.9004 12 14.4609 12.1172 14.9219 12.3516C15.3867 12.582 15.7402 12.9023 15.9824 13.3125C16.2246 13.7188 16.3457 14.1836 16.3457 14.707C16.3457 15.2578 16.2246 15.7305 15.9824 16.125C15.7402 16.5195 15.3867 16.8223 14.9219 17.0332C14.4609 17.2441 13.9004 17.3496 13.2402 17.3496Z",
|
|
@@ -3447,8 +3568,8 @@ var ChatPT = ({ size, color }) => /* @__PURE__ */ jsxs15(
|
|
|
3447
3568
|
);
|
|
3448
3569
|
|
|
3449
3570
|
// src/assets/icons/subjects/ChatEN.tsx
|
|
3450
|
-
import { jsx as
|
|
3451
|
-
var ChatEN = ({ size, color }) => /* @__PURE__ */
|
|
3571
|
+
import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3572
|
+
var ChatEN = ({ size, color }) => /* @__PURE__ */ jsxs17(
|
|
3452
3573
|
"svg",
|
|
3453
3574
|
{
|
|
3454
3575
|
width: size,
|
|
@@ -3457,21 +3578,21 @@ var ChatEN = ({ size, color }) => /* @__PURE__ */ jsxs16(
|
|
|
3457
3578
|
fill: "none",
|
|
3458
3579
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3459
3580
|
children: [
|
|
3460
|
-
/* @__PURE__ */
|
|
3581
|
+
/* @__PURE__ */ jsx22(
|
|
3461
3582
|
"path",
|
|
3462
3583
|
{
|
|
3463
3584
|
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
3464
3585
|
fill: color
|
|
3465
3586
|
}
|
|
3466
3587
|
),
|
|
3467
|
-
/* @__PURE__ */
|
|
3588
|
+
/* @__PURE__ */ jsx22(
|
|
3468
3589
|
"path",
|
|
3469
3590
|
{
|
|
3470
3591
|
d: "M22.5488 12V20.5312H21.0781L17.252 14.4199V20.5312H15.7812V12H17.252L21.0898 18.123V12H22.5488Z",
|
|
3471
3592
|
fill: color
|
|
3472
3593
|
}
|
|
3473
3594
|
),
|
|
3474
|
-
/* @__PURE__ */
|
|
3595
|
+
/* @__PURE__ */ jsx22(
|
|
3475
3596
|
"path",
|
|
3476
3597
|
{
|
|
3477
3598
|
d: "M14.584 19.3652V20.5312H10.0547V19.3652H14.584ZM10.4707 12V20.5312H9V12H10.4707ZM13.9922 15.5625V16.7109H10.0547V15.5625H13.9922ZM14.5547 12V13.1719H10.0547V12H14.5547Z",
|
|
@@ -3483,8 +3604,8 @@ var ChatEN = ({ size, color }) => /* @__PURE__ */ jsxs16(
|
|
|
3483
3604
|
);
|
|
3484
3605
|
|
|
3485
3606
|
// src/assets/icons/subjects/ChatES.tsx
|
|
3486
|
-
import { jsx as
|
|
3487
|
-
var ChatES = ({ size, color }) => /* @__PURE__ */
|
|
3607
|
+
import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3608
|
+
var ChatES = ({ size, color }) => /* @__PURE__ */ jsxs18(
|
|
3488
3609
|
"svg",
|
|
3489
3610
|
{
|
|
3490
3611
|
width: size,
|
|
@@ -3493,21 +3614,21 @@ var ChatES = ({ size, color }) => /* @__PURE__ */ jsxs17(
|
|
|
3493
3614
|
fill: "none",
|
|
3494
3615
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3495
3616
|
children: [
|
|
3496
|
-
/* @__PURE__ */
|
|
3617
|
+
/* @__PURE__ */ jsx23(
|
|
3497
3618
|
"path",
|
|
3498
3619
|
{
|
|
3499
3620
|
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
3500
3621
|
fill: color
|
|
3501
3622
|
}
|
|
3502
3623
|
),
|
|
3503
|
-
/* @__PURE__ */
|
|
3624
|
+
/* @__PURE__ */ jsx23(
|
|
3504
3625
|
"path",
|
|
3505
3626
|
{
|
|
3506
3627
|
d: "M21.1426 17.8027C21.1426 17.627 21.1152 17.4707 21.0605 17.334C21.0098 17.1973 20.918 17.0723 20.7852 16.959C20.6523 16.8457 20.4648 16.7363 20.2227 16.6309C19.9844 16.5215 19.6797 16.4102 19.3086 16.2969C18.9023 16.1719 18.5273 16.0332 18.1836 15.8809C17.8438 15.7246 17.5469 15.5449 17.293 15.3418C17.0391 15.1348 16.8418 14.8984 16.7012 14.6328C16.5605 14.3633 16.4902 14.0527 16.4902 13.7012C16.4902 13.3535 16.5625 13.0371 16.707 12.752C16.8555 12.4668 17.0645 12.2207 17.334 12.0137C17.6074 11.8027 17.9297 11.6406 18.3008 11.5273C18.6719 11.4102 19.082 11.3516 19.5312 11.3516C20.1641 11.3516 20.709 11.4688 21.166 11.7031C21.627 11.9375 21.9805 12.252 22.2266 12.6465C22.4766 13.041 22.6016 13.4766 22.6016 13.9531H21.1426C21.1426 13.6719 21.082 13.4238 20.9609 13.209C20.8438 12.9902 20.6641 12.8184 20.4219 12.6934C20.1836 12.5684 19.8809 12.5059 19.5137 12.5059C19.166 12.5059 18.877 12.5586 18.6465 12.6641C18.416 12.7695 18.2441 12.9121 18.1309 13.0918C18.0176 13.2715 17.9609 13.4746 17.9609 13.7012C17.9609 13.8613 17.998 14.0078 18.0723 14.1406C18.1465 14.2695 18.2598 14.3906 18.4121 14.5039C18.5645 14.6133 18.7559 14.7168 18.9863 14.8145C19.2168 14.9121 19.4883 15.0059 19.8008 15.0957C20.2734 15.2363 20.6855 15.3926 21.0371 15.5645C21.3887 15.7324 21.6816 15.9238 21.916 16.1387C22.1504 16.3535 22.3262 16.5977 22.4434 16.8711C22.5605 17.1406 22.6191 17.4473 22.6191 17.791C22.6191 18.1504 22.5469 18.4746 22.4023 18.7637C22.2578 19.0488 22.0508 19.293 21.7812 19.4961C21.5156 19.6953 21.1953 19.8496 20.8203 19.959C20.4492 20.0645 20.0352 20.1172 19.5781 20.1172C19.168 20.1172 18.7637 20.0625 18.3652 19.9531C17.9707 19.8438 17.6113 19.6777 17.2871 19.4551C16.9629 19.2285 16.7051 18.9473 16.5137 18.6113C16.3223 18.2715 16.2266 17.875 16.2266 17.4219H17.6973C17.6973 17.6992 17.7441 17.9355 17.8379 18.1309C17.9355 18.3262 18.0703 18.4863 18.2422 18.6113C18.4141 18.7324 18.6133 18.8223 18.8398 18.8809C19.0703 18.9395 19.3164 18.9688 19.5781 18.9688C19.9219 18.9688 20.209 18.9199 20.4395 18.8223C20.6738 18.7246 20.8496 18.5879 20.9668 18.4121C21.084 18.2363 21.1426 18.0332 21.1426 17.8027Z",
|
|
3507
3628
|
fill: color
|
|
3508
3629
|
}
|
|
3509
3630
|
),
|
|
3510
|
-
/* @__PURE__ */
|
|
3631
|
+
/* @__PURE__ */ jsx23(
|
|
3511
3632
|
"path",
|
|
3512
3633
|
{
|
|
3513
3634
|
d: "M15.4512 18.834V20H10.9219V18.834H15.4512ZM11.3379 11.4688V20H9.86719V11.4688H11.3379ZM14.8594 15.0312V16.1797H10.9219V15.0312H14.8594ZM15.4219 11.4688V12.6406H10.9219V11.4688H15.4219Z",
|
|
@@ -3519,7 +3640,7 @@ var ChatES = ({ size, color }) => /* @__PURE__ */ jsxs17(
|
|
|
3519
3640
|
);
|
|
3520
3641
|
|
|
3521
3642
|
// src/components/IconRender/IconRender.tsx
|
|
3522
|
-
import { jsx as
|
|
3643
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
3523
3644
|
var IconRender = ({
|
|
3524
3645
|
iconName,
|
|
3525
3646
|
color = "#000000",
|
|
@@ -3529,14 +3650,14 @@ var IconRender = ({
|
|
|
3529
3650
|
if (typeof iconName === "string") {
|
|
3530
3651
|
switch (iconName) {
|
|
3531
3652
|
case "Chat_PT":
|
|
3532
|
-
return /* @__PURE__ */
|
|
3653
|
+
return /* @__PURE__ */ jsx24(ChatPT, { size, color });
|
|
3533
3654
|
case "Chat_EN":
|
|
3534
|
-
return /* @__PURE__ */
|
|
3655
|
+
return /* @__PURE__ */ jsx24(ChatEN, { size, color });
|
|
3535
3656
|
case "Chat_ES":
|
|
3536
|
-
return /* @__PURE__ */
|
|
3657
|
+
return /* @__PURE__ */ jsx24(ChatES, { size, color });
|
|
3537
3658
|
default: {
|
|
3538
3659
|
const IconComponent = PhosphorIcons[iconName] || PhosphorIcons.Question;
|
|
3539
|
-
return /* @__PURE__ */
|
|
3660
|
+
return /* @__PURE__ */ jsx24(IconComponent, { size, color, weight });
|
|
3540
3661
|
}
|
|
3541
3662
|
}
|
|
3542
3663
|
} else {
|
|
@@ -3549,7 +3670,7 @@ var IconRender = ({
|
|
|
3549
3670
|
var IconRender_default = IconRender;
|
|
3550
3671
|
|
|
3551
3672
|
// src/components/Card/Card.tsx
|
|
3552
|
-
import { Fragment as
|
|
3673
|
+
import { Fragment as Fragment5, jsx as jsx25, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3553
3674
|
var CARD_BASE_CLASSES = {
|
|
3554
3675
|
default: "w-full bg-background border border-border-50 rounded-xl",
|
|
3555
3676
|
compact: "w-full bg-background border border-border-50 rounded-lg",
|
|
@@ -3591,7 +3712,7 @@ var CardBase = forwardRef9(
|
|
|
3591
3712
|
const minHeightClasses = CARD_MIN_HEIGHT_CLASSES[minHeight];
|
|
3592
3713
|
const layoutClasses = CARD_LAYOUT_CLASSES[layout];
|
|
3593
3714
|
const cursorClasses = CARD_CURSOR_CLASSES[cursor];
|
|
3594
|
-
return /* @__PURE__ */
|
|
3715
|
+
return /* @__PURE__ */ jsx25(
|
|
3595
3716
|
"div",
|
|
3596
3717
|
{
|
|
3597
3718
|
ref,
|
|
@@ -3649,7 +3770,7 @@ var CardActivitiesResults = forwardRef9(
|
|
|
3649
3770
|
const actionIconClasses = ACTION_ICON_CLASSES[action];
|
|
3650
3771
|
const actionSubTitleClasses = ACTION_SUBTITLE_CLASSES[action];
|
|
3651
3772
|
const actionHeaderClasses = ACTION_HEADER_CLASSES[action];
|
|
3652
|
-
return /* @__PURE__ */
|
|
3773
|
+
return /* @__PURE__ */ jsxs19(
|
|
3653
3774
|
"div",
|
|
3654
3775
|
{
|
|
3655
3776
|
ref,
|
|
@@ -3659,7 +3780,7 @@ var CardActivitiesResults = forwardRef9(
|
|
|
3659
3780
|
),
|
|
3660
3781
|
...props,
|
|
3661
3782
|
children: [
|
|
3662
|
-
/* @__PURE__ */
|
|
3783
|
+
/* @__PURE__ */ jsxs19(
|
|
3663
3784
|
"div",
|
|
3664
3785
|
{
|
|
3665
3786
|
className: cn(
|
|
@@ -3668,7 +3789,7 @@ var CardActivitiesResults = forwardRef9(
|
|
|
3668
3789
|
extended ? "rounded-t-xl" : "rounded-xl"
|
|
3669
3790
|
),
|
|
3670
3791
|
children: [
|
|
3671
|
-
/* @__PURE__ */
|
|
3792
|
+
/* @__PURE__ */ jsx25(
|
|
3672
3793
|
"span",
|
|
3673
3794
|
{
|
|
3674
3795
|
className: cn(
|
|
@@ -3678,7 +3799,7 @@ var CardActivitiesResults = forwardRef9(
|
|
|
3678
3799
|
children: icon
|
|
3679
3800
|
}
|
|
3680
3801
|
),
|
|
3681
|
-
/* @__PURE__ */
|
|
3802
|
+
/* @__PURE__ */ jsx25(
|
|
3682
3803
|
Text_default,
|
|
3683
3804
|
{
|
|
3684
3805
|
size: "2xs",
|
|
@@ -3687,7 +3808,7 @@ var CardActivitiesResults = forwardRef9(
|
|
|
3687
3808
|
children: title
|
|
3688
3809
|
}
|
|
3689
3810
|
),
|
|
3690
|
-
/* @__PURE__ */
|
|
3811
|
+
/* @__PURE__ */ jsx25(
|
|
3691
3812
|
"p",
|
|
3692
3813
|
{
|
|
3693
3814
|
className: cn("text-lg font-bold truncate", actionSubTitleClasses),
|
|
@@ -3697,8 +3818,8 @@ var CardActivitiesResults = forwardRef9(
|
|
|
3697
3818
|
]
|
|
3698
3819
|
}
|
|
3699
3820
|
),
|
|
3700
|
-
extended && /* @__PURE__ */
|
|
3701
|
-
/* @__PURE__ */
|
|
3821
|
+
extended && /* @__PURE__ */ jsxs19("div", { className: "flex flex-col items-center gap-2.5 pb-9.5 pt-2.5", children: [
|
|
3822
|
+
/* @__PURE__ */ jsx25(
|
|
3702
3823
|
"p",
|
|
3703
3824
|
{
|
|
3704
3825
|
className: cn(
|
|
@@ -3708,7 +3829,7 @@ var CardActivitiesResults = forwardRef9(
|
|
|
3708
3829
|
children: header
|
|
3709
3830
|
}
|
|
3710
3831
|
),
|
|
3711
|
-
/* @__PURE__ */
|
|
3832
|
+
/* @__PURE__ */ jsx25(Badge_default, { size: "large", action: "info", children: description })
|
|
3712
3833
|
] })
|
|
3713
3834
|
]
|
|
3714
3835
|
}
|
|
@@ -3727,7 +3848,7 @@ var CardQuestions = forwardRef9(
|
|
|
3727
3848
|
const isDone = state === "done";
|
|
3728
3849
|
const stateLabel = isDone ? "Realizado" : "N\xE3o Realizado";
|
|
3729
3850
|
const buttonLabel = isDone ? "Ver Resultado" : "Responder";
|
|
3730
|
-
return /* @__PURE__ */
|
|
3851
|
+
return /* @__PURE__ */ jsxs19(
|
|
3731
3852
|
CardBase,
|
|
3732
3853
|
{
|
|
3733
3854
|
ref,
|
|
@@ -3737,9 +3858,9 @@ var CardQuestions = forwardRef9(
|
|
|
3737
3858
|
className: cn("justify-between gap-4", className),
|
|
3738
3859
|
...props,
|
|
3739
3860
|
children: [
|
|
3740
|
-
/* @__PURE__ */
|
|
3741
|
-
/* @__PURE__ */
|
|
3742
|
-
/* @__PURE__ */
|
|
3861
|
+
/* @__PURE__ */ jsxs19("section", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
3862
|
+
/* @__PURE__ */ jsx25("p", { className: "font-bold text-xs text-text-950 truncate", children: header }),
|
|
3863
|
+
/* @__PURE__ */ jsx25("div", { className: "flex flex-row gap-6 items-center", children: /* @__PURE__ */ jsx25(
|
|
3743
3864
|
Badge_default,
|
|
3744
3865
|
{
|
|
3745
3866
|
size: "medium",
|
|
@@ -3749,7 +3870,7 @@ var CardQuestions = forwardRef9(
|
|
|
3749
3870
|
}
|
|
3750
3871
|
) })
|
|
3751
3872
|
] }),
|
|
3752
|
-
/* @__PURE__ */
|
|
3873
|
+
/* @__PURE__ */ jsx25("span", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx25(
|
|
3753
3874
|
Button_default,
|
|
3754
3875
|
{
|
|
3755
3876
|
size: "extra-small",
|
|
@@ -3780,19 +3901,19 @@ var CardProgress = forwardRef9(
|
|
|
3780
3901
|
}, ref) => {
|
|
3781
3902
|
const isHorizontal = direction === "horizontal";
|
|
3782
3903
|
const contentComponent = {
|
|
3783
|
-
horizontal: /* @__PURE__ */
|
|
3784
|
-
showDates && /* @__PURE__ */
|
|
3785
|
-
initialDate && /* @__PURE__ */
|
|
3786
|
-
/* @__PURE__ */
|
|
3787
|
-
/* @__PURE__ */
|
|
3904
|
+
horizontal: /* @__PURE__ */ jsxs19(Fragment5, { children: [
|
|
3905
|
+
showDates && /* @__PURE__ */ jsxs19("div", { className: "flex flex-row gap-6 items-center", children: [
|
|
3906
|
+
initialDate && /* @__PURE__ */ jsxs19("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
3907
|
+
/* @__PURE__ */ jsx25("p", { className: "text-text-800 font-semibold", children: "In\xEDcio" }),
|
|
3908
|
+
/* @__PURE__ */ jsx25("p", { className: "text-text-600", children: initialDate })
|
|
3788
3909
|
] }),
|
|
3789
|
-
endDate && /* @__PURE__ */
|
|
3790
|
-
/* @__PURE__ */
|
|
3791
|
-
/* @__PURE__ */
|
|
3910
|
+
endDate && /* @__PURE__ */ jsxs19("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
3911
|
+
/* @__PURE__ */ jsx25("p", { className: "text-text-800 font-semibold", children: "Fim" }),
|
|
3912
|
+
/* @__PURE__ */ jsx25("p", { className: "text-text-600", children: endDate })
|
|
3792
3913
|
] })
|
|
3793
3914
|
] }),
|
|
3794
|
-
/* @__PURE__ */
|
|
3795
|
-
/* @__PURE__ */
|
|
3915
|
+
/* @__PURE__ */ jsxs19("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
3916
|
+
/* @__PURE__ */ jsx25(
|
|
3796
3917
|
ProgressBar_default,
|
|
3797
3918
|
{
|
|
3798
3919
|
size: "small",
|
|
@@ -3801,7 +3922,7 @@ var CardProgress = forwardRef9(
|
|
|
3801
3922
|
"data-testid": "progress-bar"
|
|
3802
3923
|
}
|
|
3803
3924
|
),
|
|
3804
|
-
/* @__PURE__ */
|
|
3925
|
+
/* @__PURE__ */ jsxs19(
|
|
3805
3926
|
Text_default,
|
|
3806
3927
|
{
|
|
3807
3928
|
size: "xs",
|
|
@@ -3817,9 +3938,9 @@ var CardProgress = forwardRef9(
|
|
|
3817
3938
|
)
|
|
3818
3939
|
] })
|
|
3819
3940
|
] }),
|
|
3820
|
-
vertical: /* @__PURE__ */
|
|
3941
|
+
vertical: /* @__PURE__ */ jsx25("p", { className: "text-sm text-text-800", children: subhead })
|
|
3821
3942
|
};
|
|
3822
|
-
return /* @__PURE__ */
|
|
3943
|
+
return /* @__PURE__ */ jsxs19(
|
|
3823
3944
|
CardBase,
|
|
3824
3945
|
{
|
|
3825
3946
|
ref,
|
|
@@ -3830,7 +3951,7 @@ var CardProgress = forwardRef9(
|
|
|
3830
3951
|
className: cn(isHorizontal ? "h-20" : "", className),
|
|
3831
3952
|
...props,
|
|
3832
3953
|
children: [
|
|
3833
|
-
/* @__PURE__ */
|
|
3954
|
+
/* @__PURE__ */ jsx25(
|
|
3834
3955
|
"div",
|
|
3835
3956
|
{
|
|
3836
3957
|
className: cn(
|
|
@@ -3843,7 +3964,7 @@ var CardProgress = forwardRef9(
|
|
|
3843
3964
|
children: icon
|
|
3844
3965
|
}
|
|
3845
3966
|
),
|
|
3846
|
-
/* @__PURE__ */
|
|
3967
|
+
/* @__PURE__ */ jsxs19(
|
|
3847
3968
|
"div",
|
|
3848
3969
|
{
|
|
3849
3970
|
className: cn(
|
|
@@ -3851,7 +3972,7 @@ var CardProgress = forwardRef9(
|
|
|
3851
3972
|
!isHorizontal && "gap-4"
|
|
3852
3973
|
),
|
|
3853
3974
|
children: [
|
|
3854
|
-
/* @__PURE__ */
|
|
3975
|
+
/* @__PURE__ */ jsx25(Text_default, { size: "sm", weight: "bold", className: "text-text-950 truncate", children: header }),
|
|
3855
3976
|
contentComponent[direction]
|
|
3856
3977
|
]
|
|
3857
3978
|
}
|
|
@@ -3871,7 +3992,7 @@ var CardTopic = forwardRef9(
|
|
|
3871
3992
|
className = "",
|
|
3872
3993
|
...props
|
|
3873
3994
|
}, ref) => {
|
|
3874
|
-
return /* @__PURE__ */
|
|
3995
|
+
return /* @__PURE__ */ jsxs19(
|
|
3875
3996
|
CardBase,
|
|
3876
3997
|
{
|
|
3877
3998
|
ref,
|
|
@@ -3882,13 +4003,13 @@ var CardTopic = forwardRef9(
|
|
|
3882
4003
|
className: cn("justify-center gap-2 py-2 px-4", className),
|
|
3883
4004
|
...props,
|
|
3884
4005
|
children: [
|
|
3885
|
-
subHead && /* @__PURE__ */
|
|
3886
|
-
/* @__PURE__ */
|
|
3887
|
-
index < subHead.length - 1 && /* @__PURE__ */
|
|
4006
|
+
subHead && /* @__PURE__ */ jsx25("span", { className: "text-text-600 text-2xs flex flex-row gap-1", children: subHead.map((text, index) => /* @__PURE__ */ jsxs19(Fragment4, { children: [
|
|
4007
|
+
/* @__PURE__ */ jsx25("p", { children: text }),
|
|
4008
|
+
index < subHead.length - 1 && /* @__PURE__ */ jsx25("p", { children: "\u2022" })
|
|
3888
4009
|
] }, `${text} - ${index}`)) }),
|
|
3889
|
-
/* @__PURE__ */
|
|
3890
|
-
/* @__PURE__ */
|
|
3891
|
-
/* @__PURE__ */
|
|
4010
|
+
/* @__PURE__ */ jsx25("p", { className: "text-sm text-text-950 font-bold truncate", children: header }),
|
|
4011
|
+
/* @__PURE__ */ jsxs19("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
4012
|
+
/* @__PURE__ */ jsx25(
|
|
3892
4013
|
ProgressBar_default,
|
|
3893
4014
|
{
|
|
3894
4015
|
size: "small",
|
|
@@ -3897,7 +4018,7 @@ var CardTopic = forwardRef9(
|
|
|
3897
4018
|
"data-testid": "progress-bar"
|
|
3898
4019
|
}
|
|
3899
4020
|
),
|
|
3900
|
-
showPercentage && /* @__PURE__ */
|
|
4021
|
+
showPercentage && /* @__PURE__ */ jsxs19(
|
|
3901
4022
|
Text_default,
|
|
3902
4023
|
{
|
|
3903
4024
|
size: "xs",
|
|
@@ -3931,7 +4052,7 @@ var CardPerformance = forwardRef9(
|
|
|
3931
4052
|
...props
|
|
3932
4053
|
}, ref) => {
|
|
3933
4054
|
const hasProgress = progress !== void 0;
|
|
3934
|
-
return /* @__PURE__ */
|
|
4055
|
+
return /* @__PURE__ */ jsxs19(
|
|
3935
4056
|
CardBase,
|
|
3936
4057
|
{
|
|
3937
4058
|
ref,
|
|
@@ -3945,10 +4066,10 @@ var CardPerformance = forwardRef9(
|
|
|
3945
4066
|
onClick: () => actionVariant == "caret" && onClickButton?.(valueButton),
|
|
3946
4067
|
...props,
|
|
3947
4068
|
children: [
|
|
3948
|
-
/* @__PURE__ */
|
|
3949
|
-
/* @__PURE__ */
|
|
3950
|
-
/* @__PURE__ */
|
|
3951
|
-
actionVariant === "button" && /* @__PURE__ */
|
|
4069
|
+
/* @__PURE__ */ jsxs19("div", { className: "w-full flex flex-col justify-between gap-2", children: [
|
|
4070
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex flex-row justify-between items-center gap-2", children: [
|
|
4071
|
+
/* @__PURE__ */ jsx25("p", { className: "text-lg font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
4072
|
+
actionVariant === "button" && /* @__PURE__ */ jsx25(
|
|
3952
4073
|
Button_default,
|
|
3953
4074
|
{
|
|
3954
4075
|
variant: "outline",
|
|
@@ -3959,16 +4080,16 @@ var CardPerformance = forwardRef9(
|
|
|
3959
4080
|
}
|
|
3960
4081
|
)
|
|
3961
4082
|
] }),
|
|
3962
|
-
/* @__PURE__ */
|
|
4083
|
+
/* @__PURE__ */ jsx25("div", { className: "w-full", children: hasProgress ? /* @__PURE__ */ jsx25(
|
|
3963
4084
|
ProgressBar_default,
|
|
3964
4085
|
{
|
|
3965
4086
|
value: progress,
|
|
3966
4087
|
label: `${progress}% ${labelProgress}`,
|
|
3967
4088
|
variant: progressVariant
|
|
3968
4089
|
}
|
|
3969
|
-
) : /* @__PURE__ */
|
|
4090
|
+
) : /* @__PURE__ */ jsx25("p", { className: "text-xs text-text-600 truncate", children: description }) })
|
|
3970
4091
|
] }),
|
|
3971
|
-
actionVariant == "caret" && /* @__PURE__ */
|
|
4092
|
+
actionVariant == "caret" && /* @__PURE__ */ jsx25(
|
|
3972
4093
|
CaretRight4,
|
|
3973
4094
|
{
|
|
3974
4095
|
className: "size-4.5 text-text-800 cursor-pointer",
|
|
@@ -3992,7 +4113,7 @@ var CardResults = forwardRef9(
|
|
|
3992
4113
|
...props
|
|
3993
4114
|
}, ref) => {
|
|
3994
4115
|
const isRow = direction == "row";
|
|
3995
|
-
return /* @__PURE__ */
|
|
4116
|
+
return /* @__PURE__ */ jsxs19(
|
|
3996
4117
|
CardBase,
|
|
3997
4118
|
{
|
|
3998
4119
|
ref,
|
|
@@ -4002,7 +4123,7 @@ var CardResults = forwardRef9(
|
|
|
4002
4123
|
className: cn("items-stretch cursor-pointer pr-4", className),
|
|
4003
4124
|
...props,
|
|
4004
4125
|
children: [
|
|
4005
|
-
/* @__PURE__ */
|
|
4126
|
+
/* @__PURE__ */ jsx25(
|
|
4006
4127
|
"div",
|
|
4007
4128
|
{
|
|
4008
4129
|
className: cn(
|
|
@@ -4011,11 +4132,11 @@ var CardResults = forwardRef9(
|
|
|
4011
4132
|
style: {
|
|
4012
4133
|
backgroundColor: color
|
|
4013
4134
|
},
|
|
4014
|
-
children: /* @__PURE__ */
|
|
4135
|
+
children: /* @__PURE__ */ jsx25(IconRender_default, { iconName: icon, color: "currentColor", size: 20 })
|
|
4015
4136
|
}
|
|
4016
4137
|
),
|
|
4017
|
-
/* @__PURE__ */
|
|
4018
|
-
/* @__PURE__ */
|
|
4138
|
+
/* @__PURE__ */ jsxs19("div", { className: "w-full flex flex-row justify-between items-center", children: [
|
|
4139
|
+
/* @__PURE__ */ jsxs19(
|
|
4019
4140
|
"div",
|
|
4020
4141
|
{
|
|
4021
4142
|
className: cn(
|
|
@@ -4023,28 +4144,28 @@ var CardResults = forwardRef9(
|
|
|
4023
4144
|
isRow ? "flex-row items-center gap-2" : "flex-col"
|
|
4024
4145
|
),
|
|
4025
4146
|
children: [
|
|
4026
|
-
/* @__PURE__ */
|
|
4027
|
-
/* @__PURE__ */
|
|
4028
|
-
/* @__PURE__ */
|
|
4147
|
+
/* @__PURE__ */ jsx25("p", { className: "text-sm font-bold text-text-950 flex-1", children: header }),
|
|
4148
|
+
/* @__PURE__ */ jsxs19("span", { className: "flex flex-wrap flex-row gap-1 items-center", children: [
|
|
4149
|
+
/* @__PURE__ */ jsxs19(
|
|
4029
4150
|
Badge_default,
|
|
4030
4151
|
{
|
|
4031
4152
|
action: "success",
|
|
4032
4153
|
variant: "solid",
|
|
4033
4154
|
size: "large",
|
|
4034
|
-
iconLeft: /* @__PURE__ */
|
|
4155
|
+
iconLeft: /* @__PURE__ */ jsx25(CheckCircle2, {}),
|
|
4035
4156
|
children: [
|
|
4036
4157
|
correct_answers,
|
|
4037
4158
|
" Corretas"
|
|
4038
4159
|
]
|
|
4039
4160
|
}
|
|
4040
4161
|
),
|
|
4041
|
-
/* @__PURE__ */
|
|
4162
|
+
/* @__PURE__ */ jsxs19(
|
|
4042
4163
|
Badge_default,
|
|
4043
4164
|
{
|
|
4044
4165
|
action: "error",
|
|
4045
4166
|
variant: "solid",
|
|
4046
4167
|
size: "large",
|
|
4047
|
-
iconLeft: /* @__PURE__ */
|
|
4168
|
+
iconLeft: /* @__PURE__ */ jsx25(XCircle, {}),
|
|
4048
4169
|
children: [
|
|
4049
4170
|
incorrect_answers,
|
|
4050
4171
|
" Incorretas"
|
|
@@ -4055,7 +4176,7 @@ var CardResults = forwardRef9(
|
|
|
4055
4176
|
]
|
|
4056
4177
|
}
|
|
4057
4178
|
),
|
|
4058
|
-
/* @__PURE__ */
|
|
4179
|
+
/* @__PURE__ */ jsx25(CaretRight4, { className: "min-w-6 min-h-6 text-text-800" })
|
|
4059
4180
|
] })
|
|
4060
4181
|
]
|
|
4061
4182
|
}
|
|
@@ -4081,13 +4202,13 @@ var CardStatus = forwardRef9(
|
|
|
4081
4202
|
const getIconBadge = (status2) => {
|
|
4082
4203
|
switch (status2) {
|
|
4083
4204
|
case "correct":
|
|
4084
|
-
return /* @__PURE__ */
|
|
4205
|
+
return /* @__PURE__ */ jsx25(CheckCircle2, {});
|
|
4085
4206
|
case "incorrect":
|
|
4086
|
-
return /* @__PURE__ */
|
|
4207
|
+
return /* @__PURE__ */ jsx25(XCircle, {});
|
|
4087
4208
|
case "pending":
|
|
4088
|
-
return /* @__PURE__ */
|
|
4209
|
+
return /* @__PURE__ */ jsx25(Clock, {});
|
|
4089
4210
|
default:
|
|
4090
|
-
return /* @__PURE__ */
|
|
4211
|
+
return /* @__PURE__ */ jsx25(XCircle, {});
|
|
4091
4212
|
}
|
|
4092
4213
|
};
|
|
4093
4214
|
const getActionBadge = (status2) => {
|
|
@@ -4102,7 +4223,7 @@ var CardStatus = forwardRef9(
|
|
|
4102
4223
|
return "info";
|
|
4103
4224
|
}
|
|
4104
4225
|
};
|
|
4105
|
-
return /* @__PURE__ */
|
|
4226
|
+
return /* @__PURE__ */ jsx25(
|
|
4106
4227
|
CardBase,
|
|
4107
4228
|
{
|
|
4108
4229
|
ref,
|
|
@@ -4111,10 +4232,10 @@ var CardStatus = forwardRef9(
|
|
|
4111
4232
|
minHeight: "medium",
|
|
4112
4233
|
className: cn("items-center cursor-pointer", className),
|
|
4113
4234
|
...props,
|
|
4114
|
-
children: /* @__PURE__ */
|
|
4115
|
-
/* @__PURE__ */
|
|
4116
|
-
/* @__PURE__ */
|
|
4117
|
-
status && /* @__PURE__ */
|
|
4235
|
+
children: /* @__PURE__ */ jsxs19("div", { className: "flex justify-between w-full h-full flex-row items-center gap-2", children: [
|
|
4236
|
+
/* @__PURE__ */ jsx25("p", { className: "text-sm font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
4237
|
+
/* @__PURE__ */ jsxs19("span", { className: "flex flex-row gap-1 items-center flex-shrink-0", children: [
|
|
4238
|
+
status && /* @__PURE__ */ jsx25(
|
|
4118
4239
|
Badge_default,
|
|
4119
4240
|
{
|
|
4120
4241
|
action: getActionBadge(status),
|
|
@@ -4124,9 +4245,9 @@ var CardStatus = forwardRef9(
|
|
|
4124
4245
|
children: getLabelBadge(status)
|
|
4125
4246
|
}
|
|
4126
4247
|
),
|
|
4127
|
-
label && /* @__PURE__ */
|
|
4248
|
+
label && /* @__PURE__ */ jsx25("p", { className: "text-sm text-text-800", children: label })
|
|
4128
4249
|
] }),
|
|
4129
|
-
/* @__PURE__ */
|
|
4250
|
+
/* @__PURE__ */ jsx25(CaretRight4, { className: "min-w-6 min-h-6 text-text-800 cursor-pointer flex-shrink-0 ml-2" })
|
|
4130
4251
|
] })
|
|
4131
4252
|
}
|
|
4132
4253
|
);
|
|
@@ -4134,7 +4255,7 @@ var CardStatus = forwardRef9(
|
|
|
4134
4255
|
);
|
|
4135
4256
|
var CardSettings = forwardRef9(
|
|
4136
4257
|
({ header, className, icon, ...props }, ref) => {
|
|
4137
|
-
return /* @__PURE__ */
|
|
4258
|
+
return /* @__PURE__ */ jsxs19(
|
|
4138
4259
|
CardBase,
|
|
4139
4260
|
{
|
|
4140
4261
|
ref,
|
|
@@ -4147,9 +4268,9 @@ var CardSettings = forwardRef9(
|
|
|
4147
4268
|
),
|
|
4148
4269
|
...props,
|
|
4149
4270
|
children: [
|
|
4150
|
-
/* @__PURE__ */
|
|
4151
|
-
/* @__PURE__ */
|
|
4152
|
-
/* @__PURE__ */
|
|
4271
|
+
/* @__PURE__ */ jsx25("span", { className: "[&>svg]:size-6", children: icon }),
|
|
4272
|
+
/* @__PURE__ */ jsx25("p", { className: "w-full text-sm truncate", children: header }),
|
|
4273
|
+
/* @__PURE__ */ jsx25(CaretRight4, { size: 24, className: "cursor-pointer" })
|
|
4153
4274
|
]
|
|
4154
4275
|
}
|
|
4155
4276
|
);
|
|
@@ -4157,7 +4278,7 @@ var CardSettings = forwardRef9(
|
|
|
4157
4278
|
);
|
|
4158
4279
|
var CardSupport = forwardRef9(
|
|
4159
4280
|
({ header, className, direction = "col", children, ...props }, ref) => {
|
|
4160
|
-
return /* @__PURE__ */
|
|
4281
|
+
return /* @__PURE__ */ jsxs19(
|
|
4161
4282
|
CardBase,
|
|
4162
4283
|
{
|
|
4163
4284
|
ref,
|
|
@@ -4170,7 +4291,7 @@ var CardSupport = forwardRef9(
|
|
|
4170
4291
|
),
|
|
4171
4292
|
...props,
|
|
4172
4293
|
children: [
|
|
4173
|
-
/* @__PURE__ */
|
|
4294
|
+
/* @__PURE__ */ jsxs19(
|
|
4174
4295
|
"div",
|
|
4175
4296
|
{
|
|
4176
4297
|
className: cn(
|
|
@@ -4178,12 +4299,12 @@ var CardSupport = forwardRef9(
|
|
|
4178
4299
|
direction == "col" ? "flex-col" : "flex-row items-center"
|
|
4179
4300
|
),
|
|
4180
4301
|
children: [
|
|
4181
|
-
/* @__PURE__ */
|
|
4182
|
-
/* @__PURE__ */
|
|
4302
|
+
/* @__PURE__ */ jsx25("span", { className: "w-full min-w-0", children: /* @__PURE__ */ jsx25("p", { className: "text-sm text-text-950 font-bold truncate", children: header }) }),
|
|
4303
|
+
/* @__PURE__ */ jsx25("span", { className: "flex flex-row gap-1", children })
|
|
4183
4304
|
]
|
|
4184
4305
|
}
|
|
4185
4306
|
),
|
|
4186
|
-
/* @__PURE__ */
|
|
4307
|
+
/* @__PURE__ */ jsx25(CaretRight4, { className: "text-text-800 cursor-pointer", size: 24 })
|
|
4187
4308
|
]
|
|
4188
4309
|
}
|
|
4189
4310
|
);
|
|
@@ -4203,7 +4324,7 @@ var CardForum = forwardRef9(
|
|
|
4203
4324
|
hour,
|
|
4204
4325
|
...props
|
|
4205
4326
|
}, ref) => {
|
|
4206
|
-
return /* @__PURE__ */
|
|
4327
|
+
return /* @__PURE__ */ jsxs19(
|
|
4207
4328
|
CardBase,
|
|
4208
4329
|
{
|
|
4209
4330
|
ref,
|
|
@@ -4214,7 +4335,7 @@ var CardForum = forwardRef9(
|
|
|
4214
4335
|
className: cn("w-auto h-auto gap-3", className),
|
|
4215
4336
|
...props,
|
|
4216
4337
|
children: [
|
|
4217
|
-
/* @__PURE__ */
|
|
4338
|
+
/* @__PURE__ */ jsx25(
|
|
4218
4339
|
"button",
|
|
4219
4340
|
{
|
|
4220
4341
|
type: "button",
|
|
@@ -4223,18 +4344,18 @@ var CardForum = forwardRef9(
|
|
|
4223
4344
|
className: "min-w-8 h-8 rounded-full bg-background-950"
|
|
4224
4345
|
}
|
|
4225
4346
|
),
|
|
4226
|
-
/* @__PURE__ */
|
|
4227
|
-
/* @__PURE__ */
|
|
4228
|
-
/* @__PURE__ */
|
|
4229
|
-
/* @__PURE__ */
|
|
4347
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-2 flex-1 min-w-0", children: [
|
|
4348
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex flex-row gap-1 items-center flex-wrap", children: [
|
|
4349
|
+
/* @__PURE__ */ jsx25("p", { className: "text-xs font-semibold text-primary-700 truncate", children: title }),
|
|
4350
|
+
/* @__PURE__ */ jsxs19("p", { className: "text-xs text-text-600", children: [
|
|
4230
4351
|
"\u2022 ",
|
|
4231
4352
|
date,
|
|
4232
4353
|
" \u2022 ",
|
|
4233
4354
|
hour
|
|
4234
4355
|
] })
|
|
4235
4356
|
] }),
|
|
4236
|
-
/* @__PURE__ */
|
|
4237
|
-
/* @__PURE__ */
|
|
4357
|
+
/* @__PURE__ */ jsx25("p", { className: "text-text-950 text-sm line-clamp-2 truncate", children: content }),
|
|
4358
|
+
/* @__PURE__ */ jsxs19(
|
|
4238
4359
|
"button",
|
|
4239
4360
|
{
|
|
4240
4361
|
type: "button",
|
|
@@ -4242,8 +4363,8 @@ var CardForum = forwardRef9(
|
|
|
4242
4363
|
onClick: () => onClickComments?.(valueComments),
|
|
4243
4364
|
className: "text-text-600 flex flex-row gap-2 items-center",
|
|
4244
4365
|
children: [
|
|
4245
|
-
/* @__PURE__ */
|
|
4246
|
-
/* @__PURE__ */
|
|
4366
|
+
/* @__PURE__ */ jsx25(ChatCircleText, { "aria-hidden": "true", size: 16 }),
|
|
4367
|
+
/* @__PURE__ */ jsxs19("p", { className: "text-xs", children: [
|
|
4247
4368
|
comments,
|
|
4248
4369
|
" respostas"
|
|
4249
4370
|
] })
|
|
@@ -4346,12 +4467,12 @@ var CardAudio = forwardRef9(
|
|
|
4346
4467
|
};
|
|
4347
4468
|
const getVolumeIcon = () => {
|
|
4348
4469
|
if (volume === 0) {
|
|
4349
|
-
return /* @__PURE__ */
|
|
4470
|
+
return /* @__PURE__ */ jsx25(SpeakerSimpleX, { size: 24 });
|
|
4350
4471
|
}
|
|
4351
4472
|
if (volume < 0.5) {
|
|
4352
|
-
return /* @__PURE__ */
|
|
4473
|
+
return /* @__PURE__ */ jsx25(SpeakerLow, { size: 24 });
|
|
4353
4474
|
}
|
|
4354
|
-
return /* @__PURE__ */
|
|
4475
|
+
return /* @__PURE__ */ jsx25(SpeakerHigh, { size: 24 });
|
|
4355
4476
|
};
|
|
4356
4477
|
useEffect9(() => {
|
|
4357
4478
|
const handleClickOutside = (event) => {
|
|
@@ -4367,7 +4488,7 @@ var CardAudio = forwardRef9(
|
|
|
4367
4488
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
4368
4489
|
};
|
|
4369
4490
|
}, []);
|
|
4370
|
-
return /* @__PURE__ */
|
|
4491
|
+
return /* @__PURE__ */ jsxs19(
|
|
4371
4492
|
CardBase,
|
|
4372
4493
|
{
|
|
4373
4494
|
ref,
|
|
@@ -4380,7 +4501,7 @@ var CardAudio = forwardRef9(
|
|
|
4380
4501
|
),
|
|
4381
4502
|
...props,
|
|
4382
4503
|
children: [
|
|
4383
|
-
/* @__PURE__ */
|
|
4504
|
+
/* @__PURE__ */ jsx25(
|
|
4384
4505
|
"audio",
|
|
4385
4506
|
{
|
|
4386
4507
|
ref: audioRef,
|
|
@@ -4392,7 +4513,7 @@ var CardAudio = forwardRef9(
|
|
|
4392
4513
|
onEnded: handleEnded,
|
|
4393
4514
|
"data-testid": "audio-element",
|
|
4394
4515
|
"aria-label": title,
|
|
4395
|
-
children: tracks ? tracks.map((track) => /* @__PURE__ */
|
|
4516
|
+
children: tracks ? tracks.map((track) => /* @__PURE__ */ jsx25(
|
|
4396
4517
|
"track",
|
|
4397
4518
|
{
|
|
4398
4519
|
kind: track.kind,
|
|
@@ -4402,7 +4523,7 @@ var CardAudio = forwardRef9(
|
|
|
4402
4523
|
default: track.default
|
|
4403
4524
|
},
|
|
4404
4525
|
track.src
|
|
4405
|
-
)) : /* @__PURE__ */
|
|
4526
|
+
)) : /* @__PURE__ */ jsx25(
|
|
4406
4527
|
"track",
|
|
4407
4528
|
{
|
|
4408
4529
|
kind: "captions",
|
|
@@ -4413,7 +4534,7 @@ var CardAudio = forwardRef9(
|
|
|
4413
4534
|
)
|
|
4414
4535
|
}
|
|
4415
4536
|
),
|
|
4416
|
-
/* @__PURE__ */
|
|
4537
|
+
/* @__PURE__ */ jsx25(
|
|
4417
4538
|
"button",
|
|
4418
4539
|
{
|
|
4419
4540
|
type: "button",
|
|
@@ -4421,14 +4542,14 @@ var CardAudio = forwardRef9(
|
|
|
4421
4542
|
disabled: !src,
|
|
4422
4543
|
className: "cursor-pointer text-text-950 hover:text-primary-600 disabled:text-text-400 disabled:cursor-not-allowed",
|
|
4423
4544
|
"aria-label": isPlaying ? "Pausar" : "Reproduzir",
|
|
4424
|
-
children: isPlaying ? /* @__PURE__ */
|
|
4425
|
-
/* @__PURE__ */
|
|
4426
|
-
/* @__PURE__ */
|
|
4427
|
-
] }) }) : /* @__PURE__ */
|
|
4545
|
+
children: isPlaying ? /* @__PURE__ */ jsx25("div", { className: "w-6 h-6 flex items-center justify-center", children: /* @__PURE__ */ jsxs19("div", { className: "flex gap-0.5", children: [
|
|
4546
|
+
/* @__PURE__ */ jsx25("div", { className: "w-1 h-4 bg-current rounded-sm" }),
|
|
4547
|
+
/* @__PURE__ */ jsx25("div", { className: "w-1 h-4 bg-current rounded-sm" })
|
|
4548
|
+
] }) }) : /* @__PURE__ */ jsx25(Play, { size: 24 })
|
|
4428
4549
|
}
|
|
4429
4550
|
),
|
|
4430
|
-
/* @__PURE__ */
|
|
4431
|
-
/* @__PURE__ */
|
|
4551
|
+
/* @__PURE__ */ jsx25("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime(currentTime) }),
|
|
4552
|
+
/* @__PURE__ */ jsx25("div", { className: "flex-1 relative", "data-testid": "progress-bar", children: /* @__PURE__ */ jsx25(
|
|
4432
4553
|
"button",
|
|
4433
4554
|
{
|
|
4434
4555
|
type: "button",
|
|
@@ -4443,7 +4564,7 @@ var CardAudio = forwardRef9(
|
|
|
4443
4564
|
}
|
|
4444
4565
|
},
|
|
4445
4566
|
"aria-label": "Barra de progresso do \xE1udio",
|
|
4446
|
-
children: /* @__PURE__ */
|
|
4567
|
+
children: /* @__PURE__ */ jsx25(
|
|
4447
4568
|
"div",
|
|
4448
4569
|
{
|
|
4449
4570
|
className: "h-full bg-primary-600 rounded-full transition-all duration-100",
|
|
@@ -4454,19 +4575,19 @@ var CardAudio = forwardRef9(
|
|
|
4454
4575
|
)
|
|
4455
4576
|
}
|
|
4456
4577
|
) }),
|
|
4457
|
-
/* @__PURE__ */
|
|
4458
|
-
/* @__PURE__ */
|
|
4459
|
-
/* @__PURE__ */
|
|
4578
|
+
/* @__PURE__ */ jsx25("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime(duration) }),
|
|
4579
|
+
/* @__PURE__ */ jsxs19("div", { className: "relative h-6", ref: volumeControlRef, children: [
|
|
4580
|
+
/* @__PURE__ */ jsx25(
|
|
4460
4581
|
"button",
|
|
4461
4582
|
{
|
|
4462
4583
|
type: "button",
|
|
4463
4584
|
onClick: toggleVolumeControl,
|
|
4464
4585
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
4465
4586
|
"aria-label": "Controle de volume",
|
|
4466
|
-
children: /* @__PURE__ */
|
|
4587
|
+
children: /* @__PURE__ */ jsx25("div", { className: "w-6 h-6 flex items-center justify-center", children: getVolumeIcon() })
|
|
4467
4588
|
}
|
|
4468
4589
|
),
|
|
4469
|
-
showVolumeControl && /* @__PURE__ */
|
|
4590
|
+
showVolumeControl && /* @__PURE__ */ jsx25(
|
|
4470
4591
|
"button",
|
|
4471
4592
|
{
|
|
4472
4593
|
type: "button",
|
|
@@ -4476,7 +4597,7 @@ var CardAudio = forwardRef9(
|
|
|
4476
4597
|
setShowVolumeControl(false);
|
|
4477
4598
|
}
|
|
4478
4599
|
},
|
|
4479
|
-
children: /* @__PURE__ */
|
|
4600
|
+
children: /* @__PURE__ */ jsx25(
|
|
4480
4601
|
"input",
|
|
4481
4602
|
{
|
|
4482
4603
|
type: "range",
|
|
@@ -4517,22 +4638,22 @@ var CardAudio = forwardRef9(
|
|
|
4517
4638
|
}
|
|
4518
4639
|
)
|
|
4519
4640
|
] }),
|
|
4520
|
-
/* @__PURE__ */
|
|
4521
|
-
/* @__PURE__ */
|
|
4641
|
+
/* @__PURE__ */ jsxs19("div", { className: "relative h-6", ref: speedMenuRef, children: [
|
|
4642
|
+
/* @__PURE__ */ jsx25(
|
|
4522
4643
|
"button",
|
|
4523
4644
|
{
|
|
4524
4645
|
type: "button",
|
|
4525
4646
|
onClick: toggleSpeedMenu,
|
|
4526
4647
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
4527
4648
|
"aria-label": "Op\xE7\xF5es de velocidade",
|
|
4528
|
-
children: /* @__PURE__ */
|
|
4649
|
+
children: /* @__PURE__ */ jsx25(DotsThreeVertical, { size: 24 })
|
|
4529
4650
|
}
|
|
4530
4651
|
),
|
|
4531
|
-
showSpeedMenu && /* @__PURE__ */
|
|
4652
|
+
showSpeedMenu && /* @__PURE__ */ jsx25("div", { className: "absolute bottom-full right-0 mb-2 p-2 bg-background border border-border-100 rounded-lg shadow-lg min-w-24 z-10", children: /* @__PURE__ */ jsx25("div", { className: "flex flex-col gap-1", children: [
|
|
4532
4653
|
{ speed: 1, label: "1x" },
|
|
4533
4654
|
{ speed: 1.5, label: "1.5x" },
|
|
4534
4655
|
{ speed: 2, label: "2x" }
|
|
4535
|
-
].map(({ speed, label }) => /* @__PURE__ */
|
|
4656
|
+
].map(({ speed, label }) => /* @__PURE__ */ jsx25(
|
|
4536
4657
|
"button",
|
|
4537
4658
|
{
|
|
4538
4659
|
type: "button",
|
|
@@ -4560,7 +4681,7 @@ var SIMULADO_BACKGROUND_CLASSES = {
|
|
|
4560
4681
|
var CardSimulado = forwardRef9(
|
|
4561
4682
|
({ title, duration, info, backgroundColor, className, ...props }, ref) => {
|
|
4562
4683
|
const backgroundClass = SIMULADO_BACKGROUND_CLASSES[backgroundColor];
|
|
4563
|
-
return /* @__PURE__ */
|
|
4684
|
+
return /* @__PURE__ */ jsx25(
|
|
4564
4685
|
CardBase,
|
|
4565
4686
|
{
|
|
4566
4687
|
ref,
|
|
@@ -4573,18 +4694,18 @@ var CardSimulado = forwardRef9(
|
|
|
4573
4694
|
className
|
|
4574
4695
|
),
|
|
4575
4696
|
...props,
|
|
4576
|
-
children: /* @__PURE__ */
|
|
4577
|
-
/* @__PURE__ */
|
|
4578
|
-
/* @__PURE__ */
|
|
4579
|
-
/* @__PURE__ */
|
|
4580
|
-
duration && /* @__PURE__ */
|
|
4581
|
-
/* @__PURE__ */
|
|
4582
|
-
/* @__PURE__ */
|
|
4697
|
+
children: /* @__PURE__ */ jsxs19("div", { className: "flex justify-between items-center w-full gap-4", children: [
|
|
4698
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
4699
|
+
/* @__PURE__ */ jsx25(Text_default, { size: "lg", weight: "bold", className: "text-text-950 truncate", children: title }),
|
|
4700
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-4 text-text-700", children: [
|
|
4701
|
+
duration && /* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-1", children: [
|
|
4702
|
+
/* @__PURE__ */ jsx25(Clock, { size: 16, className: "flex-shrink-0" }),
|
|
4703
|
+
/* @__PURE__ */ jsx25(Text_default, { size: "sm", children: duration })
|
|
4583
4704
|
] }),
|
|
4584
|
-
/* @__PURE__ */
|
|
4705
|
+
/* @__PURE__ */ jsx25(Text_default, { size: "sm", className: "truncate", children: info })
|
|
4585
4706
|
] })
|
|
4586
4707
|
] }),
|
|
4587
|
-
/* @__PURE__ */
|
|
4708
|
+
/* @__PURE__ */ jsx25(
|
|
4588
4709
|
CaretRight4,
|
|
4589
4710
|
{
|
|
4590
4711
|
size: 24,
|
|
@@ -4629,7 +4750,7 @@ var CardTest = forwardRef9(
|
|
|
4629
4750
|
const interactiveClasses = isSelectable ? "cursor-pointer focus:outline-none focus:ring-2 focus:ring-primary-950 focus:ring-offset-2" : "";
|
|
4630
4751
|
const selectedClasses = selected ? "ring-2 ring-primary-950 ring-offset-2" : "";
|
|
4631
4752
|
if (isSelectable) {
|
|
4632
|
-
return /* @__PURE__ */
|
|
4753
|
+
return /* @__PURE__ */ jsx25(
|
|
4633
4754
|
"button",
|
|
4634
4755
|
{
|
|
4635
4756
|
ref,
|
|
@@ -4641,8 +4762,8 @@ var CardTest = forwardRef9(
|
|
|
4641
4762
|
onKeyDown: handleKeyDown,
|
|
4642
4763
|
"aria-pressed": selected,
|
|
4643
4764
|
...props,
|
|
4644
|
-
children: /* @__PURE__ */
|
|
4645
|
-
/* @__PURE__ */
|
|
4765
|
+
children: /* @__PURE__ */ jsxs19("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
4766
|
+
/* @__PURE__ */ jsx25(
|
|
4646
4767
|
Text_default,
|
|
4647
4768
|
{
|
|
4648
4769
|
size: "md",
|
|
@@ -4651,10 +4772,10 @@ var CardTest = forwardRef9(
|
|
|
4651
4772
|
children: title
|
|
4652
4773
|
}
|
|
4653
4774
|
),
|
|
4654
|
-
/* @__PURE__ */
|
|
4655
|
-
duration && /* @__PURE__ */
|
|
4656
|
-
/* @__PURE__ */
|
|
4657
|
-
/* @__PURE__ */
|
|
4775
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
4776
|
+
duration && /* @__PURE__ */ jsxs19("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
4777
|
+
/* @__PURE__ */ jsx25(Clock, { size: 16, className: "text-text-700" }),
|
|
4778
|
+
/* @__PURE__ */ jsx25(
|
|
4658
4779
|
Text_default,
|
|
4659
4780
|
{
|
|
4660
4781
|
size: "sm",
|
|
@@ -4663,7 +4784,7 @@ var CardTest = forwardRef9(
|
|
|
4663
4784
|
}
|
|
4664
4785
|
)
|
|
4665
4786
|
] }),
|
|
4666
|
-
/* @__PURE__ */
|
|
4787
|
+
/* @__PURE__ */ jsx25(
|
|
4667
4788
|
Text_default,
|
|
4668
4789
|
{
|
|
4669
4790
|
size: "sm",
|
|
@@ -4676,14 +4797,14 @@ var CardTest = forwardRef9(
|
|
|
4676
4797
|
}
|
|
4677
4798
|
);
|
|
4678
4799
|
}
|
|
4679
|
-
return /* @__PURE__ */
|
|
4800
|
+
return /* @__PURE__ */ jsx25(
|
|
4680
4801
|
"div",
|
|
4681
4802
|
{
|
|
4682
4803
|
ref,
|
|
4683
4804
|
className: cn(`${baseClasses} ${className}`.trim()),
|
|
4684
4805
|
...props,
|
|
4685
|
-
children: /* @__PURE__ */
|
|
4686
|
-
/* @__PURE__ */
|
|
4806
|
+
children: /* @__PURE__ */ jsxs19("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
4807
|
+
/* @__PURE__ */ jsx25(
|
|
4687
4808
|
Text_default,
|
|
4688
4809
|
{
|
|
4689
4810
|
size: "md",
|
|
@@ -4692,10 +4813,10 @@ var CardTest = forwardRef9(
|
|
|
4692
4813
|
children: title
|
|
4693
4814
|
}
|
|
4694
4815
|
),
|
|
4695
|
-
/* @__PURE__ */
|
|
4696
|
-
duration && /* @__PURE__ */
|
|
4697
|
-
/* @__PURE__ */
|
|
4698
|
-
/* @__PURE__ */
|
|
4816
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
4817
|
+
duration && /* @__PURE__ */ jsxs19("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
4818
|
+
/* @__PURE__ */ jsx25(Clock, { size: 16, className: "text-text-700" }),
|
|
4819
|
+
/* @__PURE__ */ jsx25(
|
|
4699
4820
|
Text_default,
|
|
4700
4821
|
{
|
|
4701
4822
|
size: "sm",
|
|
@@ -4704,7 +4825,7 @@ var CardTest = forwardRef9(
|
|
|
4704
4825
|
}
|
|
4705
4826
|
)
|
|
4706
4827
|
] }),
|
|
4707
|
-
/* @__PURE__ */
|
|
4828
|
+
/* @__PURE__ */ jsx25(
|
|
4708
4829
|
Text_default,
|
|
4709
4830
|
{
|
|
4710
4831
|
size: "sm",
|
|
@@ -4741,14 +4862,14 @@ var SIMULATION_TYPE_STYLES = {
|
|
|
4741
4862
|
}
|
|
4742
4863
|
};
|
|
4743
4864
|
var CardSimulationHistory = forwardRef9(({ data, onSimulationClick, className, ...props }, ref) => {
|
|
4744
|
-
return /* @__PURE__ */
|
|
4865
|
+
return /* @__PURE__ */ jsx25(
|
|
4745
4866
|
"div",
|
|
4746
4867
|
{
|
|
4747
4868
|
ref,
|
|
4748
4869
|
className: cn("w-full max-w-[992px] h-auto", className),
|
|
4749
4870
|
...props,
|
|
4750
|
-
children: /* @__PURE__ */
|
|
4751
|
-
data.map((section, sectionIndex) => /* @__PURE__ */
|
|
4871
|
+
children: /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-0", children: [
|
|
4872
|
+
data.map((section, sectionIndex) => /* @__PURE__ */ jsx25("div", { className: "flex flex-col", children: /* @__PURE__ */ jsxs19(
|
|
4752
4873
|
"div",
|
|
4753
4874
|
{
|
|
4754
4875
|
className: cn(
|
|
@@ -4756,7 +4877,7 @@ var CardSimulationHistory = forwardRef9(({ data, onSimulationClick, className, .
|
|
|
4756
4877
|
sectionIndex === 0 ? "rounded-t-3xl" : ""
|
|
4757
4878
|
),
|
|
4758
4879
|
children: [
|
|
4759
|
-
/* @__PURE__ */
|
|
4880
|
+
/* @__PURE__ */ jsx25(
|
|
4760
4881
|
Text_default,
|
|
4761
4882
|
{
|
|
4762
4883
|
size: "xs",
|
|
@@ -4765,9 +4886,9 @@ var CardSimulationHistory = forwardRef9(({ data, onSimulationClick, className, .
|
|
|
4765
4886
|
children: section.date
|
|
4766
4887
|
}
|
|
4767
4888
|
),
|
|
4768
|
-
/* @__PURE__ */
|
|
4889
|
+
/* @__PURE__ */ jsx25("div", { className: "flex flex-col gap-2 flex-1", children: section.simulations.map((simulation) => {
|
|
4769
4890
|
const typeStyles = SIMULATION_TYPE_STYLES[simulation.type];
|
|
4770
|
-
return /* @__PURE__ */
|
|
4891
|
+
return /* @__PURE__ */ jsx25(
|
|
4771
4892
|
CardBase,
|
|
4772
4893
|
{
|
|
4773
4894
|
layout: "horizontal",
|
|
@@ -4779,9 +4900,9 @@ var CardSimulationHistory = forwardRef9(({ data, onSimulationClick, className, .
|
|
|
4779
4900
|
transition-shadow duration-200 h-auto min-h-[61px]`
|
|
4780
4901
|
),
|
|
4781
4902
|
onClick: () => onSimulationClick?.(simulation),
|
|
4782
|
-
children: /* @__PURE__ */
|
|
4783
|
-
/* @__PURE__ */
|
|
4784
|
-
/* @__PURE__ */
|
|
4903
|
+
children: /* @__PURE__ */ jsxs19("div", { className: "flex justify-between items-center w-full gap-2", children: [
|
|
4904
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex flex-wrap flex-col justify-between sm:flex-row gap-2 flex-1 min-w-0", children: [
|
|
4905
|
+
/* @__PURE__ */ jsx25(
|
|
4785
4906
|
Text_default,
|
|
4786
4907
|
{
|
|
4787
4908
|
size: "lg",
|
|
@@ -4790,8 +4911,8 @@ var CardSimulationHistory = forwardRef9(({ data, onSimulationClick, className, .
|
|
|
4790
4911
|
children: simulation.title
|
|
4791
4912
|
}
|
|
4792
4913
|
),
|
|
4793
|
-
/* @__PURE__ */
|
|
4794
|
-
/* @__PURE__ */
|
|
4914
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2", children: [
|
|
4915
|
+
/* @__PURE__ */ jsx25(
|
|
4795
4916
|
Badge_default,
|
|
4796
4917
|
{
|
|
4797
4918
|
variant: "examsOutlined",
|
|
@@ -4800,10 +4921,10 @@ var CardSimulationHistory = forwardRef9(({ data, onSimulationClick, className, .
|
|
|
4800
4921
|
children: typeStyles.text
|
|
4801
4922
|
}
|
|
4802
4923
|
),
|
|
4803
|
-
/* @__PURE__ */
|
|
4924
|
+
/* @__PURE__ */ jsx25(Text_default, { size: "sm", className: "text-text-800 truncate", children: simulation.info })
|
|
4804
4925
|
] })
|
|
4805
4926
|
] }),
|
|
4806
|
-
/* @__PURE__ */
|
|
4927
|
+
/* @__PURE__ */ jsx25(
|
|
4807
4928
|
CaretRight4,
|
|
4808
4929
|
{
|
|
4809
4930
|
size: 24,
|
|
@@ -4819,7 +4940,7 @@ var CardSimulationHistory = forwardRef9(({ data, onSimulationClick, className, .
|
|
|
4819
4940
|
]
|
|
4820
4941
|
}
|
|
4821
4942
|
) }, section.date)),
|
|
4822
|
-
data.length > 0 && /* @__PURE__ */
|
|
4943
|
+
data.length > 0 && /* @__PURE__ */ jsx25("div", { className: "w-full h-6 bg-background rounded-b-3xl" })
|
|
4823
4944
|
] })
|
|
4824
4945
|
}
|
|
4825
4946
|
);
|
|
@@ -4827,7 +4948,7 @@ var CardSimulationHistory = forwardRef9(({ data, onSimulationClick, className, .
|
|
|
4827
4948
|
|
|
4828
4949
|
// src/components/Accordation/Accordation.tsx
|
|
4829
4950
|
import { CaretRight as CaretRight5 } from "phosphor-react";
|
|
4830
|
-
import { jsx as
|
|
4951
|
+
import { jsx as jsx26, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4831
4952
|
var CardAccordation = forwardRef10(
|
|
4832
4953
|
({
|
|
4833
4954
|
trigger,
|
|
@@ -4868,7 +4989,7 @@ var CardAccordation = forwardRef10(
|
|
|
4868
4989
|
handleToggle();
|
|
4869
4990
|
}
|
|
4870
4991
|
};
|
|
4871
|
-
return /* @__PURE__ */
|
|
4992
|
+
return /* @__PURE__ */ jsxs20(
|
|
4872
4993
|
CardBase,
|
|
4873
4994
|
{
|
|
4874
4995
|
ref,
|
|
@@ -4878,7 +4999,7 @@ var CardAccordation = forwardRef10(
|
|
|
4878
4999
|
className: cn("overflow-hidden", className),
|
|
4879
5000
|
...props,
|
|
4880
5001
|
children: [
|
|
4881
|
-
/* @__PURE__ */
|
|
5002
|
+
/* @__PURE__ */ jsxs20(
|
|
4882
5003
|
"button",
|
|
4883
5004
|
{
|
|
4884
5005
|
id: headerId,
|
|
@@ -4897,7 +5018,7 @@ var CardAccordation = forwardRef10(
|
|
|
4897
5018
|
"data-value": value,
|
|
4898
5019
|
children: [
|
|
4899
5020
|
trigger,
|
|
4900
|
-
/* @__PURE__ */
|
|
5021
|
+
/* @__PURE__ */ jsx26(
|
|
4901
5022
|
CaretRight5,
|
|
4902
5023
|
{
|
|
4903
5024
|
size: 20,
|
|
@@ -4912,7 +5033,7 @@ var CardAccordation = forwardRef10(
|
|
|
4912
5033
|
]
|
|
4913
5034
|
}
|
|
4914
5035
|
),
|
|
4915
|
-
/* @__PURE__ */
|
|
5036
|
+
/* @__PURE__ */ jsx26(
|
|
4916
5037
|
"section",
|
|
4917
5038
|
{
|
|
4918
5039
|
id: contentId,
|
|
@@ -4924,7 +5045,7 @@ var CardAccordation = forwardRef10(
|
|
|
4924
5045
|
),
|
|
4925
5046
|
"data-testid": "accordion-content",
|
|
4926
5047
|
"data-value": value,
|
|
4927
|
-
children: /* @__PURE__ */
|
|
5048
|
+
children: /* @__PURE__ */ jsx26("div", { className: cn("p-4 pt-0", contentClassName), children })
|
|
4928
5049
|
}
|
|
4929
5050
|
)
|
|
4930
5051
|
]
|
|
@@ -4944,10 +5065,10 @@ import {
|
|
|
4944
5065
|
useRef as useRef5,
|
|
4945
5066
|
useState as useState10
|
|
4946
5067
|
} from "react";
|
|
4947
|
-
import { create as
|
|
4948
|
-
import { jsx as
|
|
5068
|
+
import { create as create5 } from "zustand";
|
|
5069
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
4949
5070
|
function createAccordionGroupStore(type, initialValue, collapsible) {
|
|
4950
|
-
return
|
|
5071
|
+
return create5((set, get) => ({
|
|
4951
5072
|
type,
|
|
4952
5073
|
value: initialValue,
|
|
4953
5074
|
collapsible,
|
|
@@ -5085,17 +5206,143 @@ var AccordionGroup = forwardRef11(
|
|
|
5085
5206
|
indexRef,
|
|
5086
5207
|
handleItemToggle
|
|
5087
5208
|
);
|
|
5088
|
-
return /* @__PURE__ */
|
|
5209
|
+
return /* @__PURE__ */ jsx27("div", { ref, className, ...props, children: enhancedChildren });
|
|
5089
5210
|
}
|
|
5090
5211
|
);
|
|
5091
5212
|
AccordionGroup.displayName = "AccordionGroup";
|
|
5092
5213
|
|
|
5214
|
+
// src/components/AlertDialog/AlertDialog.tsx
|
|
5215
|
+
import {
|
|
5216
|
+
forwardRef as forwardRef12,
|
|
5217
|
+
useEffect as useEffect12
|
|
5218
|
+
} from "react";
|
|
5219
|
+
import { Fragment as Fragment6, jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5220
|
+
var SIZE_CLASSES6 = {
|
|
5221
|
+
"extra-small": "w-screen max-w-[324px]",
|
|
5222
|
+
small: "w-screen max-w-[378px]",
|
|
5223
|
+
medium: "w-screen max-w-[459px]",
|
|
5224
|
+
large: "w-screen max-w-[578px]",
|
|
5225
|
+
"extra-large": "w-screen max-w-[912px]"
|
|
5226
|
+
};
|
|
5227
|
+
var AlertDialog = forwardRef12(
|
|
5228
|
+
({
|
|
5229
|
+
description,
|
|
5230
|
+
cancelButtonLabel = "Cancelar",
|
|
5231
|
+
submitButtonLabel = "Deletar",
|
|
5232
|
+
title,
|
|
5233
|
+
isOpen,
|
|
5234
|
+
closeOnBackdropClick = true,
|
|
5235
|
+
closeOnEscape = true,
|
|
5236
|
+
className = "",
|
|
5237
|
+
onSubmit,
|
|
5238
|
+
onChangeOpen,
|
|
5239
|
+
submitValue,
|
|
5240
|
+
onCancel,
|
|
5241
|
+
cancelValue,
|
|
5242
|
+
size = "medium",
|
|
5243
|
+
...props
|
|
5244
|
+
}, ref) => {
|
|
5245
|
+
useEffect12(() => {
|
|
5246
|
+
if (!isOpen || !closeOnEscape) return;
|
|
5247
|
+
const handleEscape = (event) => {
|
|
5248
|
+
if (event.key === "Escape") {
|
|
5249
|
+
onChangeOpen(false);
|
|
5250
|
+
}
|
|
5251
|
+
};
|
|
5252
|
+
document.addEventListener("keydown", handleEscape);
|
|
5253
|
+
return () => document.removeEventListener("keydown", handleEscape);
|
|
5254
|
+
}, [isOpen, closeOnEscape]);
|
|
5255
|
+
useEffect12(() => {
|
|
5256
|
+
if (isOpen) {
|
|
5257
|
+
document.body.style.overflow = "hidden";
|
|
5258
|
+
} else {
|
|
5259
|
+
document.body.style.overflow = "unset";
|
|
5260
|
+
}
|
|
5261
|
+
return () => {
|
|
5262
|
+
document.body.style.overflow = "unset";
|
|
5263
|
+
};
|
|
5264
|
+
}, [isOpen]);
|
|
5265
|
+
const handleBackdropClick = (event) => {
|
|
5266
|
+
if (event.target === event.currentTarget && closeOnBackdropClick) {
|
|
5267
|
+
onChangeOpen(false);
|
|
5268
|
+
}
|
|
5269
|
+
};
|
|
5270
|
+
const handleBackdropKeyDown = (event) => {
|
|
5271
|
+
if (event.key === "Escape" && closeOnEscape) {
|
|
5272
|
+
onChangeOpen(false);
|
|
5273
|
+
}
|
|
5274
|
+
};
|
|
5275
|
+
const handleSubmit = () => {
|
|
5276
|
+
onChangeOpen(false);
|
|
5277
|
+
onSubmit?.(submitValue);
|
|
5278
|
+
};
|
|
5279
|
+
const handleCancel = () => {
|
|
5280
|
+
onChangeOpen(false);
|
|
5281
|
+
onCancel?.(cancelValue);
|
|
5282
|
+
};
|
|
5283
|
+
const sizeClasses = SIZE_CLASSES6[size];
|
|
5284
|
+
return /* @__PURE__ */ jsx28(Fragment6, { children: isOpen && /* @__PURE__ */ jsx28(
|
|
5285
|
+
"div",
|
|
5286
|
+
{
|
|
5287
|
+
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",
|
|
5288
|
+
onClick: handleBackdropClick,
|
|
5289
|
+
onKeyDown: handleBackdropKeyDown,
|
|
5290
|
+
"data-testid": "alert-dialog-overlay",
|
|
5291
|
+
children: /* @__PURE__ */ jsxs21(
|
|
5292
|
+
"div",
|
|
5293
|
+
{
|
|
5294
|
+
ref,
|
|
5295
|
+
className: cn(
|
|
5296
|
+
"bg-background border border-border-100 rounded-lg shadow-lg p-6 m-3",
|
|
5297
|
+
sizeClasses,
|
|
5298
|
+
className
|
|
5299
|
+
),
|
|
5300
|
+
...props,
|
|
5301
|
+
children: [
|
|
5302
|
+
/* @__PURE__ */ jsx28(
|
|
5303
|
+
"h2",
|
|
5304
|
+
{
|
|
5305
|
+
id: "alert-dialog-title",
|
|
5306
|
+
className: "pb-3 text-xl font-semibold text-text-950",
|
|
5307
|
+
children: title
|
|
5308
|
+
}
|
|
5309
|
+
),
|
|
5310
|
+
/* @__PURE__ */ jsx28(
|
|
5311
|
+
"p",
|
|
5312
|
+
{
|
|
5313
|
+
id: "alert-dialog-description",
|
|
5314
|
+
className: "text-text-700 text-sm",
|
|
5315
|
+
children: description
|
|
5316
|
+
}
|
|
5317
|
+
),
|
|
5318
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex flex-row items-center justify-end pt-4 gap-3", children: [
|
|
5319
|
+
/* @__PURE__ */ jsx28(Button_default, { variant: "outline", size: "small", onClick: handleCancel, children: cancelButtonLabel }),
|
|
5320
|
+
/* @__PURE__ */ jsx28(
|
|
5321
|
+
Button_default,
|
|
5322
|
+
{
|
|
5323
|
+
variant: "solid",
|
|
5324
|
+
size: "small",
|
|
5325
|
+
action: "negative",
|
|
5326
|
+
onClick: handleSubmit,
|
|
5327
|
+
children: submitButtonLabel
|
|
5328
|
+
}
|
|
5329
|
+
)
|
|
5330
|
+
] })
|
|
5331
|
+
]
|
|
5332
|
+
}
|
|
5333
|
+
)
|
|
5334
|
+
}
|
|
5335
|
+
) });
|
|
5336
|
+
}
|
|
5337
|
+
);
|
|
5338
|
+
AlertDialog.displayName = "AlertDialog";
|
|
5339
|
+
|
|
5093
5340
|
// src/assets/icons/subjects/BookOpenText.tsx
|
|
5094
|
-
import { jsx as
|
|
5341
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
5095
5342
|
var BookOpenText = ({
|
|
5096
5343
|
size,
|
|
5097
5344
|
color
|
|
5098
|
-
}) => /* @__PURE__ */
|
|
5345
|
+
}) => /* @__PURE__ */ jsx29(
|
|
5099
5346
|
"svg",
|
|
5100
5347
|
{
|
|
5101
5348
|
width: size,
|
|
@@ -5103,7 +5350,7 @@ var BookOpenText = ({
|
|
|
5103
5350
|
viewBox: "0 0 32 32",
|
|
5104
5351
|
fill: "none",
|
|
5105
5352
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5106
|
-
children: /* @__PURE__ */
|
|
5353
|
+
children: /* @__PURE__ */ jsx29(
|
|
5107
5354
|
"path",
|
|
5108
5355
|
{
|
|
5109
5356
|
d: "M29 6H20C19.2238 6 18.4582 6.18073 17.7639 6.52786C17.0697 6.875 16.4657 7.37902 16 8C15.5343 7.37902 14.9303 6.875 14.2361 6.52786C13.5418 6.18073 12.7762 6 12 6H3C2.73478 6 2.48043 6.10536 2.29289 6.29289C2.10536 6.48043 2 6.73478 2 7V25C2 25.2652 2.10536 25.5196 2.29289 25.7071C2.48043 25.8946 2.73478 26 3 26H12C12.7956 26 13.5587 26.3161 14.1213 26.8787C14.6839 27.4413 15 28.2044 15 29C15 29.2652 15.1054 29.5196 15.2929 29.7071C15.4804 29.8946 15.7348 30 16 30C16.2652 30 16.5196 29.8946 16.7071 29.7071C16.8946 29.5196 17 29.2652 17 29C17 28.2044 17.3161 27.4413 17.8787 26.8787C18.4413 26.3161 19.2044 26 20 26H29C29.2652 26 29.5196 25.8946 29.7071 25.7071C29.8946 25.5196 30 25.2652 30 25V7C30 6.73478 29.8946 6.48043 29.7071 6.29289C29.5196 6.10536 29.2652 6 29 6ZM12 24H4V8H12C12.7956 8 13.5587 8.31607 14.1213 8.87868C14.6839 9.44129 15 10.2044 15 11V25C14.1353 24.3493 13.0821 23.9983 12 24ZM28 24H20C18.9179 23.9983 17.8647 24.3493 17 25V11C17 10.2044 17.3161 9.44129 17.8787 8.87868C18.4413 8.31607 19.2044 8 20 8H28V24ZM20 11H25C25.2652 11 25.5196 11.1054 25.7071 11.2929C25.8946 11.4804 26 11.7348 26 12C26 12.2652 25.8946 12.5196 25.7071 12.7071C25.5196 12.8946 25.2652 13 25 13H20C19.7348 13 19.4804 12.8946 19.2929 12.7071C19.1054 12.5196 19 12.2652 19 12C19 11.7348 19.1054 11.4804 19.2929 11.2929C19.4804 11.1054 19.7348 11 20 11ZM26 16C26 16.2652 25.8946 16.5196 25.7071 16.7071C25.5196 16.8946 25.2652 17 25 17H20C19.7348 17 19.4804 16.8946 19.2929 16.7071C19.1054 16.5196 19 16.2652 19 16C19 15.7348 19.1054 15.4804 19.2929 15.2929C19.4804 15.1054 19.7348 15 20 15H25C25.2652 15 25.5196 15.1054 25.7071 15.2929C25.8946 15.4804 26 15.7348 26 16ZM26 20C26 20.2652 25.8946 20.5196 25.7071 20.7071C25.5196 20.8946 25.2652 21 25 21H20C19.7348 21 19.4804 20.8946 19.2929 20.7071C19.1054 20.5196 19 20.2652 19 20C19 19.7348 19.1054 19.4804 19.2929 19.2929C19.4804 19.1054 19.7348 19 20 19H25C25.2652 19 25.5196 19.1054 25.7071 19.2929C25.8946 19.4804 26 19.7348 26 20Z",
|
|
@@ -5114,11 +5361,11 @@ var BookOpenText = ({
|
|
|
5114
5361
|
);
|
|
5115
5362
|
|
|
5116
5363
|
// src/assets/icons/subjects/HeadCircuit.tsx
|
|
5117
|
-
import { jsx as
|
|
5364
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
5118
5365
|
var HeadCircuit = ({
|
|
5119
5366
|
size,
|
|
5120
5367
|
color
|
|
5121
|
-
}) => /* @__PURE__ */
|
|
5368
|
+
}) => /* @__PURE__ */ jsx30(
|
|
5122
5369
|
"svg",
|
|
5123
5370
|
{
|
|
5124
5371
|
width: size,
|
|
@@ -5126,7 +5373,7 @@ var HeadCircuit = ({
|
|
|
5126
5373
|
viewBox: "0 0 32 32",
|
|
5127
5374
|
fill: "none",
|
|
5128
5375
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5129
|
-
children: /* @__PURE__ */
|
|
5376
|
+
children: /* @__PURE__ */ jsx30(
|
|
5130
5377
|
"path",
|
|
5131
5378
|
{
|
|
5132
5379
|
d: "M24.0625 21.4338C25.327 20.3715 26.3372 19.0392 27.0187 17.5348C27.7001 16.0304 28.0354 14.3924 28 12.7413C27.875 7.02751 23.2987 2.31626 17.595 2.01626C16.1233 1.93616 14.6506 2.15261 13.2642 2.65277C11.8778 3.15293 10.6061 3.92659 9.52453 4.92781C8.44297 5.92903 7.57365 7.13739 6.96819 8.48112C6.36272 9.82485 6.03347 11.2766 5.99997 12.75L3.19372 18.1475C3.18247 18.17 3.17122 18.1925 3.16122 18.215C2.96003 18.6839 2.94569 19.212 3.12114 19.6912C3.29659 20.1704 3.64855 20.5644 4.10497 20.7925L4.13622 20.8063L6.99997 22.1175V26C6.99997 26.5304 7.21068 27.0392 7.58576 27.4142C7.96083 27.7893 8.46954 28 8.99997 28H15C15.2652 28 15.5195 27.8947 15.7071 27.7071C15.8946 27.5196 16 27.2652 16 27C16 26.7348 15.8946 26.4804 15.7071 26.2929C15.5195 26.1054 15.2652 26 15 26H8.99997V21.4763C9.00011 21.2846 8.94517 21.0969 8.84168 20.9356C8.73818 20.7742 8.5905 20.646 8.41622 20.5663L4.99997 19L7.88372 13.4575C7.95889 13.3166 7.99878 13.1597 7.99997 13C7.99968 10.9604 8.69216 8.98124 9.96395 7.38674C11.2357 5.79224 13.0114 4.677 15 4.22376V6.17251C14.3328 6.4084 13.7704 6.87258 13.4123 7.48299C13.0543 8.0934 12.9235 8.81075 13.0432 9.50824C13.1628 10.2057 13.5252 10.8385 14.0663 11.2946C14.6074 11.7508 15.2923 12.0009 16 12.0009C16.7077 12.0009 17.3926 11.7508 17.9336 11.2946C18.4747 10.8385 18.8371 10.2057 18.9568 9.50824C19.0764 8.81075 18.9457 8.0934 18.5876 7.48299C18.2295 6.87258 17.6672 6.4084 17 6.17251V4.00001C17.1625 4.00001 17.325 4.00001 17.4875 4.01251C19.2608 4.11409 20.9649 4.73627 22.3864 5.80124C23.808 6.86621 24.8841 8.32669 25.48 10H23C22.8533 9.99995 22.7084 10.0322 22.5755 10.0944C22.4426 10.1566 22.3251 10.2473 22.2312 10.36L19.0425 14.1875C18.3774 13.9397 17.6462 13.9351 16.9781 14.1744C16.3099 14.4138 15.748 14.8817 15.3916 15.4954C15.0352 16.1092 14.9073 16.8292 15.0306 17.5281C15.1538 18.227 15.5203 18.8598 16.0652 19.3146C16.61 19.7694 17.2981 20.0168 18.0078 20.0132C18.7175 20.0095 19.4031 19.755 19.9432 19.2947C20.4834 18.8343 20.8433 18.1977 20.9594 17.4976C21.0754 16.7974 20.9402 16.0788 20.5775 15.4688L23.4687 12H25.9425C25.9725 12.26 25.9908 12.5225 25.9975 12.7875C26.0286 14.2198 25.7187 15.639 25.0931 16.9278C24.4676 18.2167 23.5445 19.3383 22.4 20.2C22.2589 20.3057 22.1484 20.4469 22.0794 20.6091C22.0105 20.7713 21.9857 20.9489 22.0075 21.1238L23.0075 29.1238C23.0379 29.3653 23.1554 29.5874 23.3379 29.7485C23.5203 29.9095 23.7553 29.9985 23.9987 29.9988C24.0405 29.9988 24.0822 29.9962 24.1237 29.9913C24.2541 29.975 24.3799 29.9333 24.4942 29.8684C24.6084 29.8035 24.7087 29.7168 24.7893 29.6131C24.87 29.5094 24.9295 29.3909 24.9643 29.2643C24.9992 29.1376 25.0087 29.0054 24.9925 28.875L24.0625 21.4338ZM16 10C15.8022 10 15.6088 9.94136 15.4444 9.83148C15.28 9.7216 15.1518 9.56542 15.0761 9.38269C15.0004 9.19997 14.9806 8.9989 15.0192 8.80492C15.0578 8.61094 15.153 8.43275 15.2929 8.2929C15.4327 8.15305 15.6109 8.05781 15.8049 8.01922C15.9989 7.98064 16.1999 8.00044 16.3827 8.07613C16.5654 8.15182 16.7216 8.27999 16.8314 8.44444C16.9413 8.60889 17 8.80223 17 9.00001C17 9.26523 16.8946 9.51958 16.7071 9.70712C16.5195 9.89465 16.2652 10 16 10ZM18 18C17.8022 18 17.6088 17.9414 17.4444 17.8315C17.28 17.7216 17.1518 17.5654 17.0761 17.3827C17.0004 17.2 16.9806 16.9989 17.0192 16.8049C17.0578 16.6109 17.153 16.4328 17.2929 16.2929C17.4327 16.153 17.6109 16.0578 17.8049 16.0192C17.9989 15.9806 18.1999 16.0004 18.3827 16.0761C18.5654 16.1518 18.7216 16.28 18.8314 16.4444C18.9413 16.6089 19 16.8022 19 17C19 17.2652 18.8946 17.5196 18.7071 17.7071C18.5195 17.8947 18.2652 18 18 18Z",
|
|
@@ -5137,11 +5384,11 @@ var HeadCircuit = ({
|
|
|
5137
5384
|
);
|
|
5138
5385
|
|
|
5139
5386
|
// src/assets/icons/subjects/Microscope.tsx
|
|
5140
|
-
import { jsx as
|
|
5387
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
5141
5388
|
var Microscope = ({
|
|
5142
5389
|
size,
|
|
5143
5390
|
color
|
|
5144
|
-
}) => /* @__PURE__ */
|
|
5391
|
+
}) => /* @__PURE__ */ jsx31(
|
|
5145
5392
|
"svg",
|
|
5146
5393
|
{
|
|
5147
5394
|
width: size,
|
|
@@ -5149,7 +5396,7 @@ var Microscope = ({
|
|
|
5149
5396
|
viewBox: "0 0 32 32",
|
|
5150
5397
|
fill: "none",
|
|
5151
5398
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5152
|
-
children: /* @__PURE__ */
|
|
5399
|
+
children: /* @__PURE__ */ jsx31(
|
|
5153
5400
|
"path",
|
|
5154
5401
|
{
|
|
5155
5402
|
d: "M28 26H25.4925C26.7637 24.4552 27.5898 22.5932 27.882 20.6142C28.1743 18.6351 27.9216 16.6138 27.1511 14.7676C26.3806 12.9213 25.1215 11.32 23.5092 10.1358C21.8968 8.95153 19.9922 8.22913 18 8.04625V4C18 3.46957 17.7893 2.96086 17.4142 2.58579C17.0391 2.21071 16.5304 2 16 2H10C9.46957 2 8.96086 2.21071 8.58579 2.58579C8.21071 2.96086 8 3.46957 8 4V17C8 17.5304 8.21071 18.0391 8.58579 18.4142C8.96086 18.7893 9.46957 19 10 19H16C16.5304 19 17.0391 18.7893 17.4142 18.4142C17.7893 18.0391 18 17.5304 18 17V10.0575C19.7643 10.2552 21.4306 10.9703 22.7895 12.1128C24.1483 13.2553 25.1389 14.7742 25.6366 16.4783C26.1343 18.1824 26.1169 19.9957 25.5866 21.69C25.0563 23.3842 24.0368 24.8838 22.6562 26H4C3.73478 26 3.48043 26.1054 3.29289 26.2929C3.10536 26.4804 3 26.7348 3 27C3 27.2652 3.10536 27.5196 3.29289 27.7071C3.48043 27.8946 3.73478 28 4 28H28C28.2652 28 28.5196 27.8946 28.7071 27.7071C28.8946 27.5196 29 27.2652 29 27C29 26.7348 28.8946 26.4804 28.7071 26.2929C28.5196 26.1054 28.2652 26 28 26ZM16 17H10V4H16V17ZM9 23C8.73478 23 8.48043 22.8946 8.29289 22.7071C8.10536 22.5196 8 22.2652 8 22C8 21.7348 8.10536 21.4804 8.29289 21.2929C8.48043 21.1054 8.73478 21 9 21H17C17.2652 21 17.5196 21.1054 17.7071 21.2929C17.8946 21.4804 18 21.7348 18 22C18 22.2652 17.8946 22.5196 17.7071 22.7071C17.5196 22.8946 17.2652 23 17 23H9Z",
|
|
@@ -5173,92 +5420,92 @@ import {
|
|
|
5173
5420
|
Person,
|
|
5174
5421
|
Scroll
|
|
5175
5422
|
} from "phosphor-react";
|
|
5176
|
-
import { jsx as
|
|
5423
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
5177
5424
|
var SubjectInfo = {
|
|
5178
5425
|
["F\xEDsica" /* FISICA */]: {
|
|
5179
|
-
icon: /* @__PURE__ */
|
|
5426
|
+
icon: /* @__PURE__ */ jsx32(Atom, { size: 17, color: "currentColor" }),
|
|
5180
5427
|
colorClass: "bg-subject-1",
|
|
5181
5428
|
name: "F\xEDsica" /* FISICA */
|
|
5182
5429
|
},
|
|
5183
5430
|
["Hist\xF3ria" /* HISTORIA */]: {
|
|
5184
|
-
icon: /* @__PURE__ */
|
|
5431
|
+
icon: /* @__PURE__ */ jsx32(Scroll, { size: 17, color: "currentColor" }),
|
|
5185
5432
|
colorClass: "bg-subject-2",
|
|
5186
5433
|
name: "Hist\xF3ria" /* HISTORIA */
|
|
5187
5434
|
},
|
|
5188
5435
|
["Literatura" /* LITERATURA */]: {
|
|
5189
|
-
icon: /* @__PURE__ */
|
|
5436
|
+
icon: /* @__PURE__ */ jsx32(BookOpenText, { size: 17, color: "currentColor" }),
|
|
5190
5437
|
colorClass: "bg-subject-3",
|
|
5191
5438
|
name: "Literatura" /* LITERATURA */
|
|
5192
5439
|
},
|
|
5193
5440
|
["Geografia" /* GEOGRAFIA */]: {
|
|
5194
|
-
icon: /* @__PURE__ */
|
|
5441
|
+
icon: /* @__PURE__ */ jsx32(GlobeHemisphereWest, { size: 17, color: "currentColor" }),
|
|
5195
5442
|
colorClass: "bg-subject-4",
|
|
5196
5443
|
name: "Geografia" /* GEOGRAFIA */
|
|
5197
5444
|
},
|
|
5198
5445
|
["Biologia" /* BIOLOGIA */]: {
|
|
5199
|
-
icon: /* @__PURE__ */
|
|
5446
|
+
icon: /* @__PURE__ */ jsx32(Microscope, { size: 17, color: "currentColor" }),
|
|
5200
5447
|
colorClass: "bg-subject-5",
|
|
5201
5448
|
name: "Biologia" /* BIOLOGIA */
|
|
5202
5449
|
},
|
|
5203
5450
|
["Portugu\xEAs" /* PORTUGUES */]: {
|
|
5204
|
-
icon: /* @__PURE__ */
|
|
5451
|
+
icon: /* @__PURE__ */ jsx32(ChatPT, { size: 17, color: "currentColor" }),
|
|
5205
5452
|
colorClass: "bg-subject-6",
|
|
5206
5453
|
name: "Portugu\xEAs" /* PORTUGUES */
|
|
5207
5454
|
},
|
|
5208
5455
|
["Qu\xEDmica" /* QUIMICA */]: {
|
|
5209
|
-
icon: /* @__PURE__ */
|
|
5456
|
+
icon: /* @__PURE__ */ jsx32(Flask, { size: 17, color: "currentColor" }),
|
|
5210
5457
|
colorClass: "bg-subject-7",
|
|
5211
5458
|
name: "Qu\xEDmica" /* QUIMICA */
|
|
5212
5459
|
},
|
|
5213
5460
|
["Artes" /* ARTES */]: {
|
|
5214
|
-
icon: /* @__PURE__ */
|
|
5461
|
+
icon: /* @__PURE__ */ jsx32(Palette, { size: 17, color: "currentColor" }),
|
|
5215
5462
|
colorClass: "bg-subject-8",
|
|
5216
5463
|
name: "Artes" /* ARTES */
|
|
5217
5464
|
},
|
|
5218
5465
|
["Matem\xE1tica" /* MATEMATICA */]: {
|
|
5219
|
-
icon: /* @__PURE__ */
|
|
5466
|
+
icon: /* @__PURE__ */ jsx32(MathOperations, { size: 17, color: "currentColor" }),
|
|
5220
5467
|
colorClass: "bg-subject-9",
|
|
5221
5468
|
name: "Matem\xE1tica" /* MATEMATICA */
|
|
5222
5469
|
},
|
|
5223
5470
|
["Filosofia" /* FILOSOFIA */]: {
|
|
5224
|
-
icon: /* @__PURE__ */
|
|
5471
|
+
icon: /* @__PURE__ */ jsx32(HeadCircuit, { size: 17, color: "currentColor" }),
|
|
5225
5472
|
colorClass: "bg-subject-10",
|
|
5226
5473
|
name: "Filosofia" /* FILOSOFIA */
|
|
5227
5474
|
},
|
|
5228
5475
|
["Espanhol" /* ESPANHOL */]: {
|
|
5229
|
-
icon: /* @__PURE__ */
|
|
5476
|
+
icon: /* @__PURE__ */ jsx32(ChatES, { size: 17, color: "currentColor" }),
|
|
5230
5477
|
colorClass: "bg-subject-11",
|
|
5231
5478
|
name: "Espanhol" /* ESPANHOL */
|
|
5232
5479
|
},
|
|
5233
5480
|
["Reda\xE7\xE3o" /* REDACAO */]: {
|
|
5234
|
-
icon: /* @__PURE__ */
|
|
5481
|
+
icon: /* @__PURE__ */ jsx32(ArticleNyTimes, { size: 17, color: "currentColor" }),
|
|
5235
5482
|
colorClass: "bg-subject-12",
|
|
5236
5483
|
name: "Reda\xE7\xE3o" /* REDACAO */
|
|
5237
5484
|
},
|
|
5238
5485
|
["Sociologia" /* SOCIOLOGIA */]: {
|
|
5239
|
-
icon: /* @__PURE__ */
|
|
5486
|
+
icon: /* @__PURE__ */ jsx32(Person, { size: 17, color: "currentColor" }),
|
|
5240
5487
|
colorClass: "bg-subject-13",
|
|
5241
5488
|
name: "Sociologia" /* SOCIOLOGIA */
|
|
5242
5489
|
},
|
|
5243
5490
|
["Ingl\xEAs" /* INGLES */]: {
|
|
5244
|
-
icon: /* @__PURE__ */
|
|
5491
|
+
icon: /* @__PURE__ */ jsx32(ChatEN, { size: 17, color: "currentColor" }),
|
|
5245
5492
|
colorClass: "bg-subject-14",
|
|
5246
5493
|
name: "Ingl\xEAs" /* INGLES */
|
|
5247
5494
|
},
|
|
5248
5495
|
["Ed. F\xEDsica" /* EDUCACAO_FISICA */]: {
|
|
5249
|
-
icon: /* @__PURE__ */
|
|
5496
|
+
icon: /* @__PURE__ */ jsx32(DribbbleLogo, { size: 17, color: "currentColor" }),
|
|
5250
5497
|
colorClass: "bg-subject-15",
|
|
5251
5498
|
name: "Ed. F\xEDsica" /* EDUCACAO_FISICA */
|
|
5252
5499
|
},
|
|
5253
5500
|
["Trilhas" /* TRILHAS */]: {
|
|
5254
|
-
icon: /* @__PURE__ */
|
|
5501
|
+
icon: /* @__PURE__ */ jsx32(BookBookmark, { size: 17, color: "currentColor" }),
|
|
5255
5502
|
colorClass: "bg-subject-16",
|
|
5256
5503
|
name: "Trilhas" /* TRILHAS */
|
|
5257
5504
|
}
|
|
5258
5505
|
};
|
|
5259
5506
|
var getSubjectInfo = (subject) => {
|
|
5260
5507
|
return SubjectInfo[subject] || {
|
|
5261
|
-
icon: /* @__PURE__ */
|
|
5508
|
+
icon: /* @__PURE__ */ jsx32(Book, { size: 17, color: "currentColor" }),
|
|
5262
5509
|
colorClass: "bg-subject-16",
|
|
5263
5510
|
name: subject
|
|
5264
5511
|
};
|
|
@@ -5285,6 +5532,11 @@ var GOAL_STATUS_OPTIONS = [
|
|
|
5285
5532
|
{ id: "VENCIDA" /* VENCIDA */, name: "Vencida" },
|
|
5286
5533
|
{ id: "CONCLUIDA" /* CONCLUIDA */, name: "Conclu\xEDda" }
|
|
5287
5534
|
];
|
|
5535
|
+
var GoalDraftType = /* @__PURE__ */ ((GoalDraftType2) => {
|
|
5536
|
+
GoalDraftType2["MODELO"] = "MODELO";
|
|
5537
|
+
GoalDraftType2["RASCUNHO"] = "RASCUNHO";
|
|
5538
|
+
return GoalDraftType2;
|
|
5539
|
+
})(GoalDraftType || {});
|
|
5288
5540
|
|
|
5289
5541
|
// src/hooks/useRecommendedLessons.ts
|
|
5290
5542
|
import { useState as useState11, useCallback as useCallback2 } from "react";
|
|
@@ -5432,6 +5684,422 @@ var createUseRecommendedLessonsHistory = (fetchGoalsHistory) => {
|
|
|
5432
5684
|
};
|
|
5433
5685
|
};
|
|
5434
5686
|
|
|
5687
|
+
// src/hooks/useGoalModels.ts
|
|
5688
|
+
import { useState as useState12, useCallback as useCallback3 } from "react";
|
|
5689
|
+
import { z as z3 } from "zod";
|
|
5690
|
+
import dayjs2 from "dayjs";
|
|
5691
|
+
|
|
5692
|
+
// src/utils/hookErrorHandler.ts
|
|
5693
|
+
import { z as z2 } from "zod";
|
|
5694
|
+
var createFetchErrorHandler = (validationErrorMessage, genericErrorMessage) => (error) => {
|
|
5695
|
+
if (error instanceof z2.ZodError) {
|
|
5696
|
+
console.error(validationErrorMessage, error);
|
|
5697
|
+
return validationErrorMessage;
|
|
5698
|
+
}
|
|
5699
|
+
console.error(genericErrorMessage, error);
|
|
5700
|
+
return genericErrorMessage;
|
|
5701
|
+
};
|
|
5702
|
+
|
|
5703
|
+
// src/hooks/useGoalModels.ts
|
|
5704
|
+
var goalModelResponseSchema = z3.object({
|
|
5705
|
+
id: z3.string().uuid(),
|
|
5706
|
+
type: z3.nativeEnum(GoalDraftType),
|
|
5707
|
+
title: z3.string(),
|
|
5708
|
+
description: z3.string().nullable(),
|
|
5709
|
+
creatorUserInstitutionId: z3.string().uuid(),
|
|
5710
|
+
subjectId: z3.string().uuid().nullable(),
|
|
5711
|
+
startDate: z3.string().nullable(),
|
|
5712
|
+
finalDate: z3.string().nullable(),
|
|
5713
|
+
createdAt: z3.string(),
|
|
5714
|
+
updatedAt: z3.string()
|
|
5715
|
+
});
|
|
5716
|
+
var goalModelsApiResponseSchema = z3.object({
|
|
5717
|
+
message: z3.string(),
|
|
5718
|
+
data: z3.object({
|
|
5719
|
+
drafts: z3.array(goalModelResponseSchema),
|
|
5720
|
+
total: z3.number()
|
|
5721
|
+
})
|
|
5722
|
+
});
|
|
5723
|
+
var DEFAULT_GOAL_MODELS_PAGINATION = {
|
|
5724
|
+
total: 0,
|
|
5725
|
+
page: 1,
|
|
5726
|
+
limit: 10,
|
|
5727
|
+
totalPages: 0
|
|
5728
|
+
};
|
|
5729
|
+
var transformGoalModelToTableItem = (model, subjectsMap) => {
|
|
5730
|
+
const subjectName = model.subjectId ? subjectsMap?.get(model.subjectId) || "" : "";
|
|
5731
|
+
return {
|
|
5732
|
+
id: model.id,
|
|
5733
|
+
title: model.title || "Sem t\xEDtulo",
|
|
5734
|
+
savedAt: dayjs2(model.createdAt).format("DD/MM/YYYY"),
|
|
5735
|
+
subject: subjectName,
|
|
5736
|
+
subjectId: model.subjectId
|
|
5737
|
+
};
|
|
5738
|
+
};
|
|
5739
|
+
var handleGoalModelFetchError = createFetchErrorHandler(
|
|
5740
|
+
"Erro ao validar dados de modelos de aulas",
|
|
5741
|
+
"Erro ao carregar modelos de aulas"
|
|
5742
|
+
);
|
|
5743
|
+
var createUseGoalModels = (fetchGoalModels, deleteGoalModel) => {
|
|
5744
|
+
return () => {
|
|
5745
|
+
const [state, setState] = useState12({
|
|
5746
|
+
models: [],
|
|
5747
|
+
loading: false,
|
|
5748
|
+
error: null,
|
|
5749
|
+
pagination: DEFAULT_GOAL_MODELS_PAGINATION
|
|
5750
|
+
});
|
|
5751
|
+
const fetchModels = useCallback3(
|
|
5752
|
+
async (filters, subjectsMap) => {
|
|
5753
|
+
setState((prev) => ({ ...prev, loading: true, error: null }));
|
|
5754
|
+
try {
|
|
5755
|
+
const responseData = await fetchGoalModels(filters);
|
|
5756
|
+
const validatedData = goalModelsApiResponseSchema.parse(responseData);
|
|
5757
|
+
const tableItems = validatedData.data.drafts.map(
|
|
5758
|
+
(model) => transformGoalModelToTableItem(model, subjectsMap)
|
|
5759
|
+
);
|
|
5760
|
+
const limit = filters?.limit || 10;
|
|
5761
|
+
const page = filters?.page || 1;
|
|
5762
|
+
const total = validatedData.data.total;
|
|
5763
|
+
const totalPages = Math.ceil(total / limit);
|
|
5764
|
+
setState({
|
|
5765
|
+
models: tableItems,
|
|
5766
|
+
loading: false,
|
|
5767
|
+
error: null,
|
|
5768
|
+
pagination: {
|
|
5769
|
+
total,
|
|
5770
|
+
page,
|
|
5771
|
+
limit,
|
|
5772
|
+
totalPages
|
|
5773
|
+
}
|
|
5774
|
+
});
|
|
5775
|
+
} catch (error) {
|
|
5776
|
+
const errorMessage = handleGoalModelFetchError(error);
|
|
5777
|
+
setState((prev) => ({
|
|
5778
|
+
...prev,
|
|
5779
|
+
loading: false,
|
|
5780
|
+
error: errorMessage
|
|
5781
|
+
}));
|
|
5782
|
+
}
|
|
5783
|
+
},
|
|
5784
|
+
[fetchGoalModels]
|
|
5785
|
+
);
|
|
5786
|
+
const deleteModel = useCallback3(
|
|
5787
|
+
async (id) => {
|
|
5788
|
+
try {
|
|
5789
|
+
await deleteGoalModel(id);
|
|
5790
|
+
return true;
|
|
5791
|
+
} catch (error) {
|
|
5792
|
+
console.error("Erro ao deletar modelo:", error);
|
|
5793
|
+
return false;
|
|
5794
|
+
}
|
|
5795
|
+
},
|
|
5796
|
+
[deleteGoalModel]
|
|
5797
|
+
);
|
|
5798
|
+
return {
|
|
5799
|
+
...state,
|
|
5800
|
+
fetchModels,
|
|
5801
|
+
deleteModel
|
|
5802
|
+
};
|
|
5803
|
+
};
|
|
5804
|
+
};
|
|
5805
|
+
|
|
5806
|
+
// src/components/ActivitiesHistory/components/ErrorDisplay.tsx
|
|
5807
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
5808
|
+
var ErrorDisplay = ({ error }) => /* @__PURE__ */ jsx33("div", { className: "flex items-center justify-center bg-background rounded-xl w-full min-h-[705px]", children: /* @__PURE__ */ jsx33(Text_default, { size: "lg", color: "text-error-500", children: error }) });
|
|
5809
|
+
|
|
5810
|
+
// src/utils/renderSubjectCell.tsx
|
|
5811
|
+
import { jsx as jsx34, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5812
|
+
var renderSubjectCell = (subjectName, mapSubjectNameToEnum, showEmptyDash = false) => {
|
|
5813
|
+
if (!subjectName) {
|
|
5814
|
+
return showEmptyDash ? /* @__PURE__ */ jsx34(Text_default, { size: "sm", color: "text-text-400", children: "-" }) : null;
|
|
5815
|
+
}
|
|
5816
|
+
const subjectEnum = mapSubjectNameToEnum?.(subjectName);
|
|
5817
|
+
if (!subjectEnum) {
|
|
5818
|
+
return /* @__PURE__ */ jsx34(Text_default, { size: "sm", className: "truncate", title: subjectName, children: subjectName });
|
|
5819
|
+
}
|
|
5820
|
+
const subjectInfo = getSubjectInfo(subjectEnum);
|
|
5821
|
+
return /* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-2", title: subjectName, children: [
|
|
5822
|
+
/* @__PURE__ */ jsx34(
|
|
5823
|
+
"span",
|
|
5824
|
+
{
|
|
5825
|
+
className: cn(
|
|
5826
|
+
"w-[21px] h-[21px] flex items-center justify-center rounded-sm text-text-950 shrink-0",
|
|
5827
|
+
subjectInfo.colorClass
|
|
5828
|
+
),
|
|
5829
|
+
children: subjectInfo.icon
|
|
5830
|
+
}
|
|
5831
|
+
),
|
|
5832
|
+
/* @__PURE__ */ jsx34(Text_default, { size: "sm", className: "truncate", children: subjectName })
|
|
5833
|
+
] });
|
|
5834
|
+
};
|
|
5835
|
+
|
|
5836
|
+
// src/components/shared/ModelsTabBase/ModelsTabBase.tsx
|
|
5837
|
+
import { useState as useState13, useCallback as useCallback4, useMemo as useMemo4, useRef as useRef6, useEffect as useEffect13 } from "react";
|
|
5838
|
+
import { Plus } from "phosphor-react";
|
|
5839
|
+
import { Fragment as Fragment7, jsx as jsx35, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5840
|
+
var ModelsTabBase = ({
|
|
5841
|
+
fetchModels: fetchModelsProp,
|
|
5842
|
+
deleteModel: deleteModelProp,
|
|
5843
|
+
onCreateModel,
|
|
5844
|
+
onSend,
|
|
5845
|
+
onEditModel,
|
|
5846
|
+
emptyStateImage,
|
|
5847
|
+
noSearchImage,
|
|
5848
|
+
mapSubjectNameToEnum,
|
|
5849
|
+
userFilterData,
|
|
5850
|
+
subjectsMap,
|
|
5851
|
+
config,
|
|
5852
|
+
createTableColumns: createTableColumns2,
|
|
5853
|
+
createFiltersConfig,
|
|
5854
|
+
buildFiltersFromParams: buildFiltersFromParams2,
|
|
5855
|
+
createUseModels
|
|
5856
|
+
}) => {
|
|
5857
|
+
const [deleteDialogOpen, setDeleteDialogOpen] = useState13(false);
|
|
5858
|
+
const [modelToDelete, setModelToDelete] = useState13(null);
|
|
5859
|
+
const { addToast } = useToast();
|
|
5860
|
+
const fetchModelsRef = useRef6(fetchModelsProp);
|
|
5861
|
+
fetchModelsRef.current = fetchModelsProp;
|
|
5862
|
+
const deleteModelRef = useRef6(deleteModelProp);
|
|
5863
|
+
deleteModelRef.current = deleteModelProp;
|
|
5864
|
+
const subjectsMapRef = useRef6(subjectsMap);
|
|
5865
|
+
subjectsMapRef.current = subjectsMap;
|
|
5866
|
+
const useModels = useMemo4(
|
|
5867
|
+
() => createUseModels(
|
|
5868
|
+
(filters) => fetchModelsRef.current(filters),
|
|
5869
|
+
(id) => deleteModelRef.current(id)
|
|
5870
|
+
),
|
|
5871
|
+
[createUseModels]
|
|
5872
|
+
);
|
|
5873
|
+
const {
|
|
5874
|
+
models,
|
|
5875
|
+
loading: modelsLoading,
|
|
5876
|
+
error: modelsError,
|
|
5877
|
+
pagination: modelsPagination,
|
|
5878
|
+
fetchModels,
|
|
5879
|
+
deleteModel
|
|
5880
|
+
} = useModels();
|
|
5881
|
+
const modelsFilterConfigs = useMemo4(
|
|
5882
|
+
() => createFiltersConfig(userFilterData),
|
|
5883
|
+
[createFiltersConfig, userFilterData]
|
|
5884
|
+
);
|
|
5885
|
+
const handleDeleteClick = useCallback4((model) => {
|
|
5886
|
+
setModelToDelete(model);
|
|
5887
|
+
setDeleteDialogOpen(true);
|
|
5888
|
+
}, []);
|
|
5889
|
+
const modelsTableColumns = useMemo4(
|
|
5890
|
+
() => createTableColumns2(
|
|
5891
|
+
mapSubjectNameToEnum,
|
|
5892
|
+
onSend,
|
|
5893
|
+
onEditModel,
|
|
5894
|
+
handleDeleteClick
|
|
5895
|
+
),
|
|
5896
|
+
[
|
|
5897
|
+
createTableColumns2,
|
|
5898
|
+
mapSubjectNameToEnum,
|
|
5899
|
+
onSend,
|
|
5900
|
+
onEditModel,
|
|
5901
|
+
handleDeleteClick
|
|
5902
|
+
]
|
|
5903
|
+
);
|
|
5904
|
+
const handleParamsChange = useCallback4(
|
|
5905
|
+
(params) => {
|
|
5906
|
+
const filters = buildFiltersFromParams2(params);
|
|
5907
|
+
fetchModels(filters, subjectsMapRef.current);
|
|
5908
|
+
},
|
|
5909
|
+
[buildFiltersFromParams2, fetchModels]
|
|
5910
|
+
);
|
|
5911
|
+
useEffect13(() => {
|
|
5912
|
+
fetchModels({ page: 1, limit: 10 }, subjectsMapRef.current);
|
|
5913
|
+
}, [fetchModels]);
|
|
5914
|
+
const handleConfirmDelete = useCallback4(async () => {
|
|
5915
|
+
if (modelToDelete) {
|
|
5916
|
+
const success = await deleteModel(modelToDelete.id);
|
|
5917
|
+
if (success) {
|
|
5918
|
+
addToast({ title: "Modelo deletado com sucesso", action: "success" });
|
|
5919
|
+
fetchModels({ page: 1, limit: 10 }, subjectsMapRef.current);
|
|
5920
|
+
} else {
|
|
5921
|
+
addToast({ title: "Erro ao deletar modelo", action: "warning" });
|
|
5922
|
+
}
|
|
5923
|
+
}
|
|
5924
|
+
setDeleteDialogOpen(false);
|
|
5925
|
+
setModelToDelete(null);
|
|
5926
|
+
}, [modelToDelete, deleteModel, fetchModels, addToast]);
|
|
5927
|
+
const handleCancelDelete = useCallback4(() => {
|
|
5928
|
+
setDeleteDialogOpen(false);
|
|
5929
|
+
setModelToDelete(null);
|
|
5930
|
+
}, []);
|
|
5931
|
+
return /* @__PURE__ */ jsxs23(Fragment7, { children: [
|
|
5932
|
+
/* @__PURE__ */ jsx35(Toaster_default, {}),
|
|
5933
|
+
modelsError ? /* @__PURE__ */ jsx35(ErrorDisplay, { error: modelsError }) : /* @__PURE__ */ jsx35("div", { className: "w-full", "data-testid": config.testId, children: /* @__PURE__ */ jsx35(
|
|
5934
|
+
TableProvider,
|
|
5935
|
+
{
|
|
5936
|
+
data: models,
|
|
5937
|
+
headers: modelsTableColumns,
|
|
5938
|
+
loading: modelsLoading,
|
|
5939
|
+
variant: "borderless",
|
|
5940
|
+
enableSearch: true,
|
|
5941
|
+
enableFilters: true,
|
|
5942
|
+
enableTableSort: true,
|
|
5943
|
+
enablePagination: true,
|
|
5944
|
+
initialFilters: modelsFilterConfigs,
|
|
5945
|
+
paginationConfig: {
|
|
5946
|
+
itemLabel: "modelos",
|
|
5947
|
+
itemsPerPageOptions: [10, 20, 50, 100],
|
|
5948
|
+
defaultItemsPerPage: 10,
|
|
5949
|
+
totalItems: modelsPagination.total,
|
|
5950
|
+
totalPages: modelsPagination.totalPages
|
|
5951
|
+
},
|
|
5952
|
+
searchPlaceholder: config.searchPlaceholder,
|
|
5953
|
+
noSearchResultState: {
|
|
5954
|
+
image: noSearchImage
|
|
5955
|
+
},
|
|
5956
|
+
emptyState: {
|
|
5957
|
+
component: /* @__PURE__ */ jsx35(
|
|
5958
|
+
EmptyState_default,
|
|
5959
|
+
{
|
|
5960
|
+
image: emptyStateImage,
|
|
5961
|
+
title: config.emptyStateTitle,
|
|
5962
|
+
description: config.emptyStateDescription,
|
|
5963
|
+
buttonText: "Criar modelo",
|
|
5964
|
+
buttonIcon: /* @__PURE__ */ jsx35(Plus, { size: 18 }),
|
|
5965
|
+
buttonVariant: "outline",
|
|
5966
|
+
buttonAction: "primary",
|
|
5967
|
+
onButtonClick: onCreateModel
|
|
5968
|
+
}
|
|
5969
|
+
)
|
|
5970
|
+
},
|
|
5971
|
+
onParamsChange: handleParamsChange,
|
|
5972
|
+
children: (renderProps) => {
|
|
5973
|
+
const {
|
|
5974
|
+
controls,
|
|
5975
|
+
table,
|
|
5976
|
+
pagination: paginationComponent
|
|
5977
|
+
} = renderProps;
|
|
5978
|
+
return /* @__PURE__ */ jsxs23("div", { className: "space-y-4", children: [
|
|
5979
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex items-center justify-between gap-4", children: [
|
|
5980
|
+
/* @__PURE__ */ jsx35(
|
|
5981
|
+
Button_default,
|
|
5982
|
+
{
|
|
5983
|
+
variant: "solid",
|
|
5984
|
+
action: "primary",
|
|
5985
|
+
size: "medium",
|
|
5986
|
+
onClick: onCreateModel,
|
|
5987
|
+
iconLeft: /* @__PURE__ */ jsx35(Plus, { size: 18, weight: "bold" }),
|
|
5988
|
+
children: "Criar modelo"
|
|
5989
|
+
}
|
|
5990
|
+
),
|
|
5991
|
+
controls
|
|
5992
|
+
] }),
|
|
5993
|
+
/* @__PURE__ */ jsxs23("div", { className: "bg-background rounded-xl p-6 space-y-4", children: [
|
|
5994
|
+
table,
|
|
5995
|
+
paginationComponent
|
|
5996
|
+
] })
|
|
5997
|
+
] });
|
|
5998
|
+
}
|
|
5999
|
+
}
|
|
6000
|
+
) }),
|
|
6001
|
+
/* @__PURE__ */ jsx35(
|
|
6002
|
+
AlertDialog,
|
|
6003
|
+
{
|
|
6004
|
+
isOpen: deleteDialogOpen,
|
|
6005
|
+
onChangeOpen: setDeleteDialogOpen,
|
|
6006
|
+
title: "Deletar modelo",
|
|
6007
|
+
description: `Tem certeza que deseja deletar o modelo "${modelToDelete?.title}"? Esta a\xE7\xE3o n\xE3o pode ser desfeita.`,
|
|
6008
|
+
submitButtonLabel: "Deletar",
|
|
6009
|
+
cancelButtonLabel: "Cancelar",
|
|
6010
|
+
onSubmit: handleConfirmDelete,
|
|
6011
|
+
onCancel: handleCancelDelete
|
|
6012
|
+
}
|
|
6013
|
+
)
|
|
6014
|
+
] });
|
|
6015
|
+
};
|
|
6016
|
+
|
|
6017
|
+
// src/components/shared/ModelsTabBase/createModelsTableColumnsBase.tsx
|
|
6018
|
+
import { Trash, PencilSimple, PaperPlaneTilt } from "phosphor-react";
|
|
6019
|
+
import { jsx as jsx36, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
6020
|
+
var createModelsTableColumnsBase = (mapSubjectNameToEnum, onSend, onEdit, onDelete, config) => [
|
|
6021
|
+
{
|
|
6022
|
+
key: "title",
|
|
6023
|
+
label: "T\xEDtulo",
|
|
6024
|
+
sortable: true,
|
|
6025
|
+
className: "max-w-[400px]",
|
|
6026
|
+
render: (value) => {
|
|
6027
|
+
const title = typeof value === "string" ? value : "";
|
|
6028
|
+
return /* @__PURE__ */ jsx36(Text_default, { size: "sm", title, className: "truncate block", children: title });
|
|
6029
|
+
}
|
|
6030
|
+
},
|
|
6031
|
+
{
|
|
6032
|
+
key: "savedAt",
|
|
6033
|
+
label: "Salvo em",
|
|
6034
|
+
sortable: true,
|
|
6035
|
+
className: "w-[120px]"
|
|
6036
|
+
},
|
|
6037
|
+
{
|
|
6038
|
+
key: "subject",
|
|
6039
|
+
label: "Mat\xE9ria",
|
|
6040
|
+
sortable: true,
|
|
6041
|
+
className: "max-w-[160px]",
|
|
6042
|
+
render: (value) => {
|
|
6043
|
+
const subjectName = typeof value === "string" ? value : "";
|
|
6044
|
+
return renderSubjectCell(subjectName, mapSubjectNameToEnum, true);
|
|
6045
|
+
}
|
|
6046
|
+
},
|
|
6047
|
+
{
|
|
6048
|
+
key: "actions",
|
|
6049
|
+
label: "",
|
|
6050
|
+
sortable: false,
|
|
6051
|
+
className: "w-[220px]",
|
|
6052
|
+
render: (_value, row) => {
|
|
6053
|
+
const handleSend = (e) => {
|
|
6054
|
+
e.stopPropagation();
|
|
6055
|
+
onSend?.(row);
|
|
6056
|
+
};
|
|
6057
|
+
const handleEdit = (e) => {
|
|
6058
|
+
e.stopPropagation();
|
|
6059
|
+
onEdit?.(row);
|
|
6060
|
+
};
|
|
6061
|
+
const handleDelete = (e) => {
|
|
6062
|
+
e.stopPropagation();
|
|
6063
|
+
onDelete(row);
|
|
6064
|
+
};
|
|
6065
|
+
return /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2 justify-end", children: [
|
|
6066
|
+
onSend && /* @__PURE__ */ jsx36(
|
|
6067
|
+
Button_default,
|
|
6068
|
+
{
|
|
6069
|
+
variant: "outline",
|
|
6070
|
+
action: "primary",
|
|
6071
|
+
size: "small",
|
|
6072
|
+
iconLeft: /* @__PURE__ */ jsx36(PaperPlaneTilt, { size: 16 }),
|
|
6073
|
+
onClick: handleSend,
|
|
6074
|
+
"aria-label": config.sendButtonAriaLabel,
|
|
6075
|
+
children: config.sendButtonLabel
|
|
6076
|
+
}
|
|
6077
|
+
),
|
|
6078
|
+
/* @__PURE__ */ jsx36(
|
|
6079
|
+
IconButton_default,
|
|
6080
|
+
{
|
|
6081
|
+
icon: /* @__PURE__ */ jsx36(Trash, { size: 20 }),
|
|
6082
|
+
size: "md",
|
|
6083
|
+
onClick: handleDelete,
|
|
6084
|
+
"aria-label": config.deleteButtonAriaLabel,
|
|
6085
|
+
className: "text-text-600 hover:text-error-500 hover:bg-transparent"
|
|
6086
|
+
}
|
|
6087
|
+
),
|
|
6088
|
+
onEdit && /* @__PURE__ */ jsx36(
|
|
6089
|
+
IconButton_default,
|
|
6090
|
+
{
|
|
6091
|
+
icon: /* @__PURE__ */ jsx36(PencilSimple, { size: 20 }),
|
|
6092
|
+
size: "md",
|
|
6093
|
+
onClick: handleEdit,
|
|
6094
|
+
"aria-label": config.editButtonAriaLabel,
|
|
6095
|
+
className: "text-text-600 hover:text-primary-700 hover:bg-transparent"
|
|
6096
|
+
}
|
|
6097
|
+
)
|
|
6098
|
+
] });
|
|
6099
|
+
}
|
|
6100
|
+
}
|
|
6101
|
+
];
|
|
6102
|
+
|
|
5435
6103
|
// src/components/CheckBoxGroup/CheckBoxGroup.helpers.ts
|
|
5436
6104
|
var areSelectedIdsEqual = (ids1, ids2) => {
|
|
5437
6105
|
if (ids1 === ids2) return true;
|
|
@@ -5514,7 +6182,7 @@ var calculateFormattedItemsForAutoSelection = (category, allCategories) => {
|
|
|
5514
6182
|
};
|
|
5515
6183
|
|
|
5516
6184
|
// src/components/CheckBoxGroup/CheckBoxGroup.tsx
|
|
5517
|
-
import { jsx as
|
|
6185
|
+
import { jsx as jsx37, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5518
6186
|
var CheckboxGroup = ({
|
|
5519
6187
|
categories,
|
|
5520
6188
|
onCategoriesChange,
|
|
@@ -5522,14 +6190,14 @@ var CheckboxGroup = ({
|
|
|
5522
6190
|
showDivider = true,
|
|
5523
6191
|
showSingleItem = false
|
|
5524
6192
|
}) => {
|
|
5525
|
-
const [openAccordion, setOpenAccordion] =
|
|
5526
|
-
const autoSelectionAppliedRef =
|
|
5527
|
-
const onCategoriesChangeRef =
|
|
5528
|
-
const previousCategoriesRef =
|
|
5529
|
-
|
|
6193
|
+
const [openAccordion, setOpenAccordion] = useState14("");
|
|
6194
|
+
const autoSelectionAppliedRef = useRef7(false);
|
|
6195
|
+
const onCategoriesChangeRef = useRef7(onCategoriesChange);
|
|
6196
|
+
const previousCategoriesRef = useRef7(categories);
|
|
6197
|
+
useEffect14(() => {
|
|
5530
6198
|
onCategoriesChangeRef.current = onCategoriesChange;
|
|
5531
6199
|
}, [onCategoriesChange]);
|
|
5532
|
-
const categoriesWithAutoSelection =
|
|
6200
|
+
const categoriesWithAutoSelection = useMemo5(() => {
|
|
5533
6201
|
return categories.map((category) => {
|
|
5534
6202
|
const filteredItems = calculateFormattedItemsForAutoSelection(
|
|
5535
6203
|
category,
|
|
@@ -5544,7 +6212,7 @@ var CheckboxGroup = ({
|
|
|
5544
6212
|
return category;
|
|
5545
6213
|
});
|
|
5546
6214
|
}, [categories]);
|
|
5547
|
-
|
|
6215
|
+
useEffect14(() => {
|
|
5548
6216
|
const categoriesChanged = categories !== previousCategoriesRef.current;
|
|
5549
6217
|
if (!categoriesChanged && autoSelectionAppliedRef.current) {
|
|
5550
6218
|
return;
|
|
@@ -5662,7 +6330,7 @@ var CheckboxGroup = ({
|
|
|
5662
6330
|
);
|
|
5663
6331
|
return groupedItems.length ? groupedItems : [{ itens: [] }];
|
|
5664
6332
|
};
|
|
5665
|
-
const formattedItemsMap =
|
|
6333
|
+
const formattedItemsMap = useMemo5(() => {
|
|
5666
6334
|
const formattedItemsMap2 = {};
|
|
5667
6335
|
for (const category of categories) {
|
|
5668
6336
|
const formattedItems = calculateFormattedItems(category.key);
|
|
@@ -5817,7 +6485,7 @@ var CheckboxGroup = ({
|
|
|
5817
6485
|
};
|
|
5818
6486
|
const renderCheckboxItem = (item, categoryKey) => {
|
|
5819
6487
|
const uniqueId = `${categoryKey}-${item.id}`;
|
|
5820
|
-
return /* @__PURE__ */
|
|
6488
|
+
return /* @__PURE__ */ jsxs25(
|
|
5821
6489
|
"div",
|
|
5822
6490
|
{
|
|
5823
6491
|
className: "flex items-center gap-3 px-2",
|
|
@@ -5827,7 +6495,7 @@ var CheckboxGroup = ({
|
|
|
5827
6495
|
onMouseUp: (e) => e.stopPropagation(),
|
|
5828
6496
|
onKeyDown: (e) => e.stopPropagation(),
|
|
5829
6497
|
children: [
|
|
5830
|
-
/* @__PURE__ */
|
|
6498
|
+
/* @__PURE__ */ jsx37(
|
|
5831
6499
|
CheckBox_default,
|
|
5832
6500
|
{
|
|
5833
6501
|
id: uniqueId,
|
|
@@ -5835,7 +6503,7 @@ var CheckboxGroup = ({
|
|
|
5835
6503
|
onChange: () => toggleItem(categoryKey, item.id)
|
|
5836
6504
|
}
|
|
5837
6505
|
),
|
|
5838
|
-
/* @__PURE__ */
|
|
6506
|
+
/* @__PURE__ */ jsx37(
|
|
5839
6507
|
"label",
|
|
5840
6508
|
{
|
|
5841
6509
|
htmlFor: uniqueId,
|
|
@@ -5848,12 +6516,12 @@ var CheckboxGroup = ({
|
|
|
5848
6516
|
item.id
|
|
5849
6517
|
);
|
|
5850
6518
|
};
|
|
5851
|
-
const renderFormattedGroup = (formattedGroup, idx, categoryKey) => /* @__PURE__ */
|
|
6519
|
+
const renderFormattedGroup = (formattedGroup, idx, categoryKey) => /* @__PURE__ */ jsxs25(
|
|
5852
6520
|
"div",
|
|
5853
6521
|
{
|
|
5854
6522
|
className: "flex flex-col gap-3",
|
|
5855
6523
|
children: [
|
|
5856
|
-
"groupLabel" in formattedGroup && formattedGroup.groupLabel && /* @__PURE__ */
|
|
6524
|
+
"groupLabel" in formattedGroup && formattedGroup.groupLabel && /* @__PURE__ */ jsx37(Text_default, { size: "sm", className: "mt-2", weight: "semibold", children: formattedGroup.groupLabel }),
|
|
5857
6525
|
formattedGroup.itens?.map(
|
|
5858
6526
|
(item) => renderCheckboxItem(item, categoryKey)
|
|
5859
6527
|
)
|
|
@@ -5861,9 +6529,9 @@ var CheckboxGroup = ({
|
|
|
5861
6529
|
},
|
|
5862
6530
|
formattedGroup.groupLabel || `group-${idx}`
|
|
5863
6531
|
);
|
|
5864
|
-
const renderAccordionTrigger = (category, isEnabled) => /* @__PURE__ */
|
|
5865
|
-
/* @__PURE__ */
|
|
5866
|
-
/* @__PURE__ */
|
|
6532
|
+
const renderAccordionTrigger = (category, isEnabled) => /* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between w-full p-2", children: [
|
|
6533
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-3", children: [
|
|
6534
|
+
/* @__PURE__ */ jsx37(
|
|
5867
6535
|
CheckBox_default,
|
|
5868
6536
|
{
|
|
5869
6537
|
checked: isMinimalOneCheckBoxIsSelected(category.key),
|
|
@@ -5872,7 +6540,7 @@ var CheckboxGroup = ({
|
|
|
5872
6540
|
onChange: () => toggleAllInCategory(category.key)
|
|
5873
6541
|
}
|
|
5874
6542
|
),
|
|
5875
|
-
/* @__PURE__ */
|
|
6543
|
+
/* @__PURE__ */ jsx37(
|
|
5876
6544
|
Text_default,
|
|
5877
6545
|
{
|
|
5878
6546
|
size: "sm",
|
|
@@ -5882,7 +6550,7 @@ var CheckboxGroup = ({
|
|
|
5882
6550
|
}
|
|
5883
6551
|
)
|
|
5884
6552
|
] }),
|
|
5885
|
-
(openAccordion === category.key || isEnabled) && /* @__PURE__ */
|
|
6553
|
+
(openAccordion === category.key || isEnabled) && /* @__PURE__ */ jsx37(Badge_default, { variant: "solid", action: "info", children: getBadgeText2(category) })
|
|
5886
6554
|
] });
|
|
5887
6555
|
const renderCompactSingleItem = (category) => {
|
|
5888
6556
|
const formattedItems = getFormattedItems(category.key);
|
|
@@ -5891,13 +6559,13 @@ var CheckboxGroup = ({
|
|
|
5891
6559
|
return null;
|
|
5892
6560
|
}
|
|
5893
6561
|
const singleItem = allItems[0];
|
|
5894
|
-
return /* @__PURE__ */
|
|
6562
|
+
return /* @__PURE__ */ jsxs25(
|
|
5895
6563
|
"div",
|
|
5896
6564
|
{
|
|
5897
6565
|
className: "flex items-center justify-between w-full px-3 py-2",
|
|
5898
6566
|
children: [
|
|
5899
|
-
/* @__PURE__ */
|
|
5900
|
-
/* @__PURE__ */
|
|
6567
|
+
/* @__PURE__ */ jsx37(Text_default, { size: "sm", weight: "bold", className: "text-text-800", children: category.label }),
|
|
6568
|
+
/* @__PURE__ */ jsx37(Text_default, { size: "sm", className: "text-text-950", children: singleItem.name })
|
|
5901
6569
|
]
|
|
5902
6570
|
},
|
|
5903
6571
|
category.key
|
|
@@ -5913,16 +6581,16 @@ var CheckboxGroup = ({
|
|
|
5913
6581
|
const allItems = formattedItems.flatMap((group) => group.itens || []);
|
|
5914
6582
|
const hasOnlyOneAvailableItem = allItems.length === 1;
|
|
5915
6583
|
if (compactSingleItem && hasOnlyOneAvailableItem && isEnabled) {
|
|
5916
|
-
return /* @__PURE__ */
|
|
6584
|
+
return /* @__PURE__ */ jsxs25("div", { children: [
|
|
5917
6585
|
renderCompactSingleItem(category),
|
|
5918
|
-
showDivider && /* @__PURE__ */
|
|
6586
|
+
showDivider && /* @__PURE__ */ jsx37(Divider_default, {})
|
|
5919
6587
|
] }, category.key);
|
|
5920
6588
|
}
|
|
5921
6589
|
const hasNoItems = formattedItems.every(
|
|
5922
6590
|
(group) => !group.itens || group.itens.length === 0
|
|
5923
6591
|
);
|
|
5924
|
-
return /* @__PURE__ */
|
|
5925
|
-
/* @__PURE__ */
|
|
6592
|
+
return /* @__PURE__ */ jsxs25("div", { children: [
|
|
6593
|
+
/* @__PURE__ */ jsx37(
|
|
5926
6594
|
CardAccordation,
|
|
5927
6595
|
{
|
|
5928
6596
|
value: category.key,
|
|
@@ -5932,15 +6600,15 @@ var CheckboxGroup = ({
|
|
|
5932
6600
|
openAccordion === category.key && "bg-background-50 border-none"
|
|
5933
6601
|
),
|
|
5934
6602
|
trigger: renderAccordionTrigger(category, isEnabled),
|
|
5935
|
-
children: /* @__PURE__ */
|
|
6603
|
+
children: /* @__PURE__ */ jsx37("div", { className: "flex flex-col gap-3 pt-2", children: hasNoItems && isEnabled ? /* @__PURE__ */ jsx37("div", { className: "px-2 py-4", children: /* @__PURE__ */ jsx37(Text_default, { size: "sm", className: "text-text-500 text-center", children: "Sem dados" }) }) : formattedItems.map(
|
|
5936
6604
|
(formattedGroup, idx) => renderFormattedGroup(formattedGroup, idx, category.key)
|
|
5937
6605
|
) })
|
|
5938
6606
|
}
|
|
5939
6607
|
),
|
|
5940
|
-
openAccordion !== category.key && showDivider && /* @__PURE__ */
|
|
6608
|
+
openAccordion !== category.key && showDivider && /* @__PURE__ */ jsx37(Divider_default, {})
|
|
5941
6609
|
] }, category.key);
|
|
5942
6610
|
};
|
|
5943
|
-
|
|
6611
|
+
useEffect14(() => {
|
|
5944
6612
|
if (!openAccordion) return;
|
|
5945
6613
|
const category = categories.find((c) => c.key === openAccordion);
|
|
5946
6614
|
if (!category) return;
|
|
@@ -5951,7 +6619,7 @@ var CheckboxGroup = ({
|
|
|
5951
6619
|
}, 0);
|
|
5952
6620
|
}
|
|
5953
6621
|
}, [categories, openAccordion]);
|
|
5954
|
-
return /* @__PURE__ */
|
|
6622
|
+
return /* @__PURE__ */ jsx37(
|
|
5955
6623
|
AccordionGroup,
|
|
5956
6624
|
{
|
|
5957
6625
|
type: "single",
|
|
@@ -5964,7 +6632,7 @@ var CheckboxGroup = ({
|
|
|
5964
6632
|
};
|
|
5965
6633
|
|
|
5966
6634
|
// src/components/Filter/FilterModal.tsx
|
|
5967
|
-
import { jsx as
|
|
6635
|
+
import { jsx as jsx38, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5968
6636
|
var FilterModal = ({
|
|
5969
6637
|
isOpen,
|
|
5970
6638
|
onClose,
|
|
@@ -5992,20 +6660,20 @@ var FilterModal = ({
|
|
|
5992
6660
|
const handleClear = () => {
|
|
5993
6661
|
onClear();
|
|
5994
6662
|
};
|
|
5995
|
-
return /* @__PURE__ */
|
|
6663
|
+
return /* @__PURE__ */ jsx38(
|
|
5996
6664
|
Modal_default,
|
|
5997
6665
|
{
|
|
5998
6666
|
isOpen,
|
|
5999
6667
|
onClose,
|
|
6000
6668
|
title,
|
|
6001
6669
|
size,
|
|
6002
|
-
footer: /* @__PURE__ */
|
|
6003
|
-
/* @__PURE__ */
|
|
6004
|
-
/* @__PURE__ */
|
|
6670
|
+
footer: /* @__PURE__ */ jsxs26("div", { className: "flex gap-3 justify-end w-full", children: [
|
|
6671
|
+
/* @__PURE__ */ jsx38(Button_default, { variant: "outline", onClick: handleClear, children: clearLabel }),
|
|
6672
|
+
/* @__PURE__ */ jsx38(Button_default, { onClick: handleApply, children: applyLabel })
|
|
6005
6673
|
] }),
|
|
6006
|
-
children: /* @__PURE__ */
|
|
6007
|
-
/* @__PURE__ */
|
|
6008
|
-
config.key === "academic" && /* @__PURE__ */
|
|
6674
|
+
children: /* @__PURE__ */ jsx38("div", { className: "flex flex-col gap-6", children: filterConfigs.map((config, index) => /* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-4", children: [
|
|
6675
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2 text-text-400 text-sm font-medium uppercase", children: [
|
|
6676
|
+
config.key === "academic" && /* @__PURE__ */ jsxs26(
|
|
6009
6677
|
"svg",
|
|
6010
6678
|
{
|
|
6011
6679
|
width: "16",
|
|
@@ -6015,7 +6683,7 @@ var FilterModal = ({
|
|
|
6015
6683
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6016
6684
|
className: "text-text-400",
|
|
6017
6685
|
children: [
|
|
6018
|
-
/* @__PURE__ */
|
|
6686
|
+
/* @__PURE__ */ jsx38(
|
|
6019
6687
|
"path",
|
|
6020
6688
|
{
|
|
6021
6689
|
d: "M8 2L2 5.33333L8 8.66667L14 5.33333L8 2Z",
|
|
@@ -6025,7 +6693,7 @@ var FilterModal = ({
|
|
|
6025
6693
|
strokeLinejoin: "round"
|
|
6026
6694
|
}
|
|
6027
6695
|
),
|
|
6028
|
-
/* @__PURE__ */
|
|
6696
|
+
/* @__PURE__ */ jsx38(
|
|
6029
6697
|
"path",
|
|
6030
6698
|
{
|
|
6031
6699
|
d: "M2 10.6667L8 14L14 10.6667",
|
|
@@ -6035,7 +6703,7 @@ var FilterModal = ({
|
|
|
6035
6703
|
strokeLinejoin: "round"
|
|
6036
6704
|
}
|
|
6037
6705
|
),
|
|
6038
|
-
/* @__PURE__ */
|
|
6706
|
+
/* @__PURE__ */ jsx38(
|
|
6039
6707
|
"path",
|
|
6040
6708
|
{
|
|
6041
6709
|
d: "M2 8L8 11.3333L14 8",
|
|
@@ -6048,7 +6716,7 @@ var FilterModal = ({
|
|
|
6048
6716
|
]
|
|
6049
6717
|
}
|
|
6050
6718
|
),
|
|
6051
|
-
config.key === "content" && /* @__PURE__ */
|
|
6719
|
+
config.key === "content" && /* @__PURE__ */ jsxs26(
|
|
6052
6720
|
"svg",
|
|
6053
6721
|
{
|
|
6054
6722
|
width: "16",
|
|
@@ -6058,7 +6726,7 @@ var FilterModal = ({
|
|
|
6058
6726
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6059
6727
|
className: "text-text-400",
|
|
6060
6728
|
children: [
|
|
6061
|
-
/* @__PURE__ */
|
|
6729
|
+
/* @__PURE__ */ jsx38(
|
|
6062
6730
|
"path",
|
|
6063
6731
|
{
|
|
6064
6732
|
d: "M3.33333 2H12.6667C13.403 2 14 2.59695 14 3.33333V12.6667C14 13.403 13.403 14 12.6667 14H3.33333C2.59695 14 2 13.403 2 12.6667V3.33333C2 2.59695 2.59695 2 3.33333 2Z",
|
|
@@ -6068,7 +6736,7 @@ var FilterModal = ({
|
|
|
6068
6736
|
strokeLinejoin: "round"
|
|
6069
6737
|
}
|
|
6070
6738
|
),
|
|
6071
|
-
/* @__PURE__ */
|
|
6739
|
+
/* @__PURE__ */ jsx38(
|
|
6072
6740
|
"path",
|
|
6073
6741
|
{
|
|
6074
6742
|
d: "M2 6H14",
|
|
@@ -6078,7 +6746,7 @@ var FilterModal = ({
|
|
|
6078
6746
|
strokeLinejoin: "round"
|
|
6079
6747
|
}
|
|
6080
6748
|
),
|
|
6081
|
-
/* @__PURE__ */
|
|
6749
|
+
/* @__PURE__ */ jsx38(
|
|
6082
6750
|
"path",
|
|
6083
6751
|
{
|
|
6084
6752
|
d: "M6 2V14",
|
|
@@ -6091,9 +6759,9 @@ var FilterModal = ({
|
|
|
6091
6759
|
]
|
|
6092
6760
|
}
|
|
6093
6761
|
),
|
|
6094
|
-
/* @__PURE__ */
|
|
6762
|
+
/* @__PURE__ */ jsx38("span", { children: config.label })
|
|
6095
6763
|
] }),
|
|
6096
|
-
/* @__PURE__ */
|
|
6764
|
+
/* @__PURE__ */ jsx38(
|
|
6097
6765
|
CheckboxGroup,
|
|
6098
6766
|
{
|
|
6099
6767
|
categories: config.categories,
|
|
@@ -6107,7 +6775,7 @@ var FilterModal = ({
|
|
|
6107
6775
|
|
|
6108
6776
|
// src/components/TableProvider/TableProvider.tsx
|
|
6109
6777
|
import { Funnel } from "phosphor-react";
|
|
6110
|
-
import { Fragment as
|
|
6778
|
+
import { Fragment as Fragment8, jsx as jsx39, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6111
6779
|
function TableProvider({
|
|
6112
6780
|
data,
|
|
6113
6781
|
headers,
|
|
@@ -6131,7 +6799,7 @@ function TableProvider({
|
|
|
6131
6799
|
containerClassName,
|
|
6132
6800
|
children
|
|
6133
6801
|
}) {
|
|
6134
|
-
const [searchQuery, setSearchQuery] =
|
|
6802
|
+
const [searchQuery, setSearchQuery] = useState15("");
|
|
6135
6803
|
const sortResultRaw = useTableSort(data, { syncWithUrl: true });
|
|
6136
6804
|
const sortResult = enableTableSort ? sortResultRaw : {
|
|
6137
6805
|
sortedData: data,
|
|
@@ -6142,7 +6810,7 @@ function TableProvider({
|
|
|
6142
6810
|
};
|
|
6143
6811
|
const { sortedData, sortColumn, sortDirection, handleSort } = sortResult;
|
|
6144
6812
|
const filterResultRaw = useTableFilter(initialFilters, { syncWithUrl: true });
|
|
6145
|
-
const disabledFilterResult =
|
|
6813
|
+
const disabledFilterResult = useMemo6(
|
|
6146
6814
|
() => ({
|
|
6147
6815
|
filterConfigs: [],
|
|
6148
6816
|
activeFilters: {},
|
|
@@ -6172,10 +6840,10 @@ function TableProvider({
|
|
|
6172
6840
|
totalItems,
|
|
6173
6841
|
totalPages
|
|
6174
6842
|
} = paginationConfig;
|
|
6175
|
-
const [currentPage, setCurrentPage] =
|
|
6176
|
-
const [itemsPerPage, setItemsPerPage] =
|
|
6177
|
-
const [isFilterModalOpen, setIsFilterModalOpen] =
|
|
6178
|
-
const combinedParams =
|
|
6843
|
+
const [currentPage, setCurrentPage] = useState15(1);
|
|
6844
|
+
const [itemsPerPage, setItemsPerPage] = useState15(defaultItemsPerPage);
|
|
6845
|
+
const [isFilterModalOpen, setIsFilterModalOpen] = useState15(false);
|
|
6846
|
+
const combinedParams = useMemo6(() => {
|
|
6179
6847
|
const params = {
|
|
6180
6848
|
page: currentPage,
|
|
6181
6849
|
limit: itemsPerPage
|
|
@@ -6202,26 +6870,26 @@ function TableProvider({
|
|
|
6202
6870
|
enableFilters,
|
|
6203
6871
|
enableTableSort
|
|
6204
6872
|
]);
|
|
6205
|
-
|
|
6873
|
+
useEffect15(() => {
|
|
6206
6874
|
onParamsChange?.(combinedParams);
|
|
6207
6875
|
}, [combinedParams]);
|
|
6208
|
-
const handleSearchChange =
|
|
6876
|
+
const handleSearchChange = useCallback5((value) => {
|
|
6209
6877
|
setSearchQuery(value);
|
|
6210
6878
|
setCurrentPage(1);
|
|
6211
6879
|
}, []);
|
|
6212
|
-
const handleFilterApply =
|
|
6880
|
+
const handleFilterApply = useCallback5(() => {
|
|
6213
6881
|
applyFilters();
|
|
6214
6882
|
setIsFilterModalOpen(false);
|
|
6215
6883
|
setCurrentPage(1);
|
|
6216
6884
|
}, [applyFilters]);
|
|
6217
|
-
const handlePageChange =
|
|
6885
|
+
const handlePageChange = useCallback5((page) => {
|
|
6218
6886
|
setCurrentPage(page);
|
|
6219
6887
|
}, []);
|
|
6220
|
-
const handleItemsPerPageChange =
|
|
6888
|
+
const handleItemsPerPageChange = useCallback5((items) => {
|
|
6221
6889
|
setItemsPerPage(items);
|
|
6222
6890
|
setCurrentPage(1);
|
|
6223
6891
|
}, []);
|
|
6224
|
-
const handleRowClickInternal =
|
|
6892
|
+
const handleRowClickInternal = useCallback5(
|
|
6225
6893
|
(row, index) => {
|
|
6226
6894
|
if (enableRowClick && onRowClick) {
|
|
6227
6895
|
onRowClick(row, index);
|
|
@@ -6229,7 +6897,7 @@ function TableProvider({
|
|
|
6229
6897
|
},
|
|
6230
6898
|
[enableRowClick, onRowClick]
|
|
6231
6899
|
);
|
|
6232
|
-
const useInternalPagination =
|
|
6900
|
+
const useInternalPagination = useMemo6(
|
|
6233
6901
|
() => enablePagination && !onParamsChange && totalItems === void 0 && totalPages === void 0,
|
|
6234
6902
|
[enablePagination, onParamsChange, totalItems, totalPages]
|
|
6235
6903
|
);
|
|
@@ -6237,7 +6905,7 @@ function TableProvider({
|
|
|
6237
6905
|
(totalItems ?? (useInternalPagination ? sortedData.length : data.length)) / itemsPerPage
|
|
6238
6906
|
);
|
|
6239
6907
|
const calculatedTotalItems = totalItems ?? (useInternalPagination ? sortedData.length : data.length);
|
|
6240
|
-
const displayData =
|
|
6908
|
+
const displayData = useMemo6(() => {
|
|
6241
6909
|
if (!useInternalPagination) {
|
|
6242
6910
|
return sortedData;
|
|
6243
6911
|
}
|
|
@@ -6248,21 +6916,21 @@ function TableProvider({
|
|
|
6248
6916
|
const showLoading = loading;
|
|
6249
6917
|
const showNoSearchResult = !loading && data.length === 0 && searchQuery.trim() !== "";
|
|
6250
6918
|
const showEmpty = !loading && data.length === 0 && searchQuery.trim() === "";
|
|
6251
|
-
const controls = (enableSearch || enableFilters) && /* @__PURE__ */
|
|
6252
|
-
enableFilters && /* @__PURE__ */
|
|
6919
|
+
const controls = (enableSearch || enableFilters) && /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-4", children: [
|
|
6920
|
+
enableFilters && /* @__PURE__ */ jsxs27(
|
|
6253
6921
|
Button_default,
|
|
6254
6922
|
{
|
|
6255
6923
|
variant: "outline",
|
|
6256
6924
|
size: "medium",
|
|
6257
6925
|
onClick: () => setIsFilterModalOpen(true),
|
|
6258
6926
|
children: [
|
|
6259
|
-
/* @__PURE__ */
|
|
6927
|
+
/* @__PURE__ */ jsx39(Funnel, { size: 20 }),
|
|
6260
6928
|
"Filtros",
|
|
6261
|
-
hasActiveFilters && /* @__PURE__ */
|
|
6929
|
+
hasActiveFilters && /* @__PURE__ */ jsx39("span", { className: "ml-2 rounded-full bg-primary-500 px-2 py-0.5 text-xs text-white", children: Object.keys(activeFilters).length })
|
|
6262
6930
|
]
|
|
6263
6931
|
}
|
|
6264
6932
|
),
|
|
6265
|
-
enableSearch && /* @__PURE__ */
|
|
6933
|
+
enableSearch && /* @__PURE__ */ jsx39("div", { className: "flex-1", children: /* @__PURE__ */ jsx39(
|
|
6266
6934
|
Search_default,
|
|
6267
6935
|
{
|
|
6268
6936
|
value: searchQuery,
|
|
@@ -6273,11 +6941,11 @@ function TableProvider({
|
|
|
6273
6941
|
}
|
|
6274
6942
|
) })
|
|
6275
6943
|
] });
|
|
6276
|
-
const headerSection = (headerContent || controls) && /* @__PURE__ */
|
|
6277
|
-
headerContent && /* @__PURE__ */
|
|
6278
|
-
controls && /* @__PURE__ */
|
|
6944
|
+
const headerSection = (headerContent || controls) && /* @__PURE__ */ jsxs27("div", { className: "flex flex-col md:flex-row items-stretch md:items-center justify-between gap-4", children: [
|
|
6945
|
+
headerContent && /* @__PURE__ */ jsx39("div", { children: headerContent }),
|
|
6946
|
+
controls && /* @__PURE__ */ jsx39("div", { className: "flex-1 md:flex-none", children: controls })
|
|
6279
6947
|
] });
|
|
6280
|
-
const table = /* @__PURE__ */
|
|
6948
|
+
const table = /* @__PURE__ */ jsx39("div", { className: "w-full overflow-x-auto", children: /* @__PURE__ */ jsxs27(
|
|
6281
6949
|
Table_default,
|
|
6282
6950
|
{
|
|
6283
6951
|
variant,
|
|
@@ -6288,11 +6956,11 @@ function TableProvider({
|
|
|
6288
6956
|
showEmpty,
|
|
6289
6957
|
emptyState,
|
|
6290
6958
|
children: [
|
|
6291
|
-
/* @__PURE__ */
|
|
6959
|
+
/* @__PURE__ */ jsx39("thead", { children: /* @__PURE__ */ jsx39(
|
|
6292
6960
|
TableRow,
|
|
6293
6961
|
{
|
|
6294
6962
|
variant: variant === "borderless" ? "defaultBorderless" : "default",
|
|
6295
|
-
children: headers.map((header, index) => /* @__PURE__ */
|
|
6963
|
+
children: headers.map((header, index) => /* @__PURE__ */ jsx39(
|
|
6296
6964
|
TableHead,
|
|
6297
6965
|
{
|
|
6298
6966
|
sortable: enableTableSort && header.sortable,
|
|
@@ -6306,7 +6974,7 @@ function TableProvider({
|
|
|
6306
6974
|
))
|
|
6307
6975
|
}
|
|
6308
6976
|
) }),
|
|
6309
|
-
/* @__PURE__ */
|
|
6977
|
+
/* @__PURE__ */ jsx39(TableBody, { children: loading ? /* @__PURE__ */ jsx39(TableRow, { children: /* @__PURE__ */ jsx39(TableCell, { colSpan: headers.length, className: "text-center py-8", children: /* @__PURE__ */ jsx39("span", { className: "text-text-400 text-sm", children: "Carregando..." }) }) }) : displayData.map((row, rowIndex) => {
|
|
6310
6978
|
const effectiveIndex = useInternalPagination ? (currentPage - 1) * itemsPerPage + rowIndex : rowIndex;
|
|
6311
6979
|
const rowKeyValue = rowKey ? (() => {
|
|
6312
6980
|
const keyValue = row[rowKey];
|
|
@@ -6318,7 +6986,7 @@ function TableProvider({
|
|
|
6318
6986
|
}
|
|
6319
6987
|
return String(keyValue);
|
|
6320
6988
|
})() : `row-${effectiveIndex}`;
|
|
6321
|
-
return /* @__PURE__ */
|
|
6989
|
+
return /* @__PURE__ */ jsx39(
|
|
6322
6990
|
TableRow,
|
|
6323
6991
|
{
|
|
6324
6992
|
variant: variant === "borderless" ? "defaultBorderless" : "default",
|
|
@@ -6339,7 +7007,7 @@ function TableProvider({
|
|
|
6339
7007
|
}
|
|
6340
7008
|
}
|
|
6341
7009
|
const content = header.render ? header.render(value, row, effectiveIndex) : defaultContent;
|
|
6342
|
-
return /* @__PURE__ */
|
|
7010
|
+
return /* @__PURE__ */ jsx39(
|
|
6343
7011
|
TableCell,
|
|
6344
7012
|
{
|
|
6345
7013
|
className: header.className,
|
|
@@ -6358,7 +7026,7 @@ function TableProvider({
|
|
|
6358
7026
|
]
|
|
6359
7027
|
}
|
|
6360
7028
|
) });
|
|
6361
|
-
const pagination = enablePagination && !isEmpty && /* @__PURE__ */
|
|
7029
|
+
const pagination = enablePagination && !isEmpty && /* @__PURE__ */ jsx39("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx39(
|
|
6362
7030
|
TablePagination_default,
|
|
6363
7031
|
{
|
|
6364
7032
|
currentPage,
|
|
@@ -6372,13 +7040,13 @@ function TableProvider({
|
|
|
6372
7040
|
}
|
|
6373
7041
|
) });
|
|
6374
7042
|
if (children) {
|
|
6375
|
-
return /* @__PURE__ */
|
|
7043
|
+
return /* @__PURE__ */ jsxs27(Fragment8, { children: [
|
|
6376
7044
|
children({
|
|
6377
7045
|
controls: headerSection || controls || null,
|
|
6378
7046
|
table,
|
|
6379
7047
|
pagination
|
|
6380
7048
|
}),
|
|
6381
|
-
enableFilters && /* @__PURE__ */
|
|
7049
|
+
enableFilters && /* @__PURE__ */ jsx39(
|
|
6382
7050
|
FilterModal,
|
|
6383
7051
|
{
|
|
6384
7052
|
isOpen: isFilterModalOpen,
|
|
@@ -6392,11 +7060,11 @@ function TableProvider({
|
|
|
6392
7060
|
] });
|
|
6393
7061
|
}
|
|
6394
7062
|
const wrapperClassName = containerClassName || "w-full space-y-4";
|
|
6395
|
-
return /* @__PURE__ */
|
|
7063
|
+
return /* @__PURE__ */ jsxs27("div", { className: wrapperClassName, children: [
|
|
6396
7064
|
headerSection,
|
|
6397
7065
|
table,
|
|
6398
7066
|
pagination,
|
|
6399
|
-
enableFilters && /* @__PURE__ */
|
|
7067
|
+
enableFilters && /* @__PURE__ */ jsx39(
|
|
6400
7068
|
FilterModal,
|
|
6401
7069
|
{
|
|
6402
7070
|
isOpen: isFilterModalOpen,
|
|
@@ -6410,8 +7078,106 @@ function TableProvider({
|
|
|
6410
7078
|
] });
|
|
6411
7079
|
}
|
|
6412
7080
|
|
|
7081
|
+
// src/components/RecommendedLessonsHistory/config/modelsFiltersConfig.ts
|
|
7082
|
+
var getSubjectOptions = (data) => {
|
|
7083
|
+
if (!data?.subjects) return [];
|
|
7084
|
+
return data.subjects.map((subject) => ({
|
|
7085
|
+
id: subject.id,
|
|
7086
|
+
name: subject.name
|
|
7087
|
+
}));
|
|
7088
|
+
};
|
|
7089
|
+
var createGoalModelsFiltersConfig = (userData) => [
|
|
7090
|
+
{
|
|
7091
|
+
key: "content",
|
|
7092
|
+
label: "CONTE\xDADO",
|
|
7093
|
+
categories: [
|
|
7094
|
+
{
|
|
7095
|
+
key: "subject",
|
|
7096
|
+
label: "Mat\xE9ria",
|
|
7097
|
+
selectedIds: [],
|
|
7098
|
+
itens: getSubjectOptions(userData)
|
|
7099
|
+
}
|
|
7100
|
+
]
|
|
7101
|
+
}
|
|
7102
|
+
];
|
|
7103
|
+
|
|
7104
|
+
// src/components/RecommendedLessonsHistory/utils/filterBuilders.ts
|
|
7105
|
+
var buildGoalModelsFiltersFromParams = (params) => {
|
|
7106
|
+
const filters = {
|
|
7107
|
+
page: params.page,
|
|
7108
|
+
limit: params.limit
|
|
7109
|
+
};
|
|
7110
|
+
if (params.search) {
|
|
7111
|
+
filters.search = params.search;
|
|
7112
|
+
}
|
|
7113
|
+
if (Array.isArray(params.subject) && params.subject.length > 0) {
|
|
7114
|
+
filters.subjectId = params.subject[0];
|
|
7115
|
+
}
|
|
7116
|
+
return filters;
|
|
7117
|
+
};
|
|
7118
|
+
|
|
7119
|
+
// src/components/RecommendedLessonsHistory/tabs/ModelsTab.tsx
|
|
7120
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
7121
|
+
var GOAL_MODELS_CONFIG = {
|
|
7122
|
+
entityName: "aula",
|
|
7123
|
+
entityNamePlural: "aulas",
|
|
7124
|
+
testId: "goal-models-tab",
|
|
7125
|
+
emptyStateTitle: "Crie modelos para agilizar suas aulas",
|
|
7126
|
+
emptyStateDescription: "Salve modelos de aulas recomendadas para reutilizar e enviar rapidamente para suas turmas!",
|
|
7127
|
+
searchPlaceholder: "Buscar modelo"
|
|
7128
|
+
};
|
|
7129
|
+
var GOAL_COLUMNS_CONFIG = {
|
|
7130
|
+
sendButtonLabel: "Enviar aula",
|
|
7131
|
+
sendButtonAriaLabel: "Enviar aula",
|
|
7132
|
+
deleteButtonAriaLabel: "Deletar modelo",
|
|
7133
|
+
editButtonAriaLabel: "Editar modelo"
|
|
7134
|
+
};
|
|
7135
|
+
var GoalModelsTab = ({
|
|
7136
|
+
fetchGoalModels,
|
|
7137
|
+
deleteGoalModel,
|
|
7138
|
+
onCreateModel,
|
|
7139
|
+
onSendLesson,
|
|
7140
|
+
onEditModel,
|
|
7141
|
+
emptyStateImage,
|
|
7142
|
+
noSearchImage,
|
|
7143
|
+
mapSubjectNameToEnum,
|
|
7144
|
+
userFilterData,
|
|
7145
|
+
subjectsMap
|
|
7146
|
+
}) => /* @__PURE__ */ jsx40(
|
|
7147
|
+
ModelsTabBase,
|
|
7148
|
+
{
|
|
7149
|
+
fetchModels: fetchGoalModels,
|
|
7150
|
+
deleteModel: deleteGoalModel,
|
|
7151
|
+
onCreateModel,
|
|
7152
|
+
onSend: onSendLesson,
|
|
7153
|
+
onEditModel,
|
|
7154
|
+
emptyStateImage,
|
|
7155
|
+
noSearchImage,
|
|
7156
|
+
mapSubjectNameToEnum,
|
|
7157
|
+
userFilterData,
|
|
7158
|
+
subjectsMap,
|
|
7159
|
+
config: GOAL_MODELS_CONFIG,
|
|
7160
|
+
createTableColumns: (mapSubject, send, edit, del) => createModelsTableColumnsBase(
|
|
7161
|
+
mapSubject,
|
|
7162
|
+
send,
|
|
7163
|
+
edit,
|
|
7164
|
+
del,
|
|
7165
|
+
GOAL_COLUMNS_CONFIG
|
|
7166
|
+
),
|
|
7167
|
+
createFiltersConfig: createGoalModelsFiltersConfig,
|
|
7168
|
+
buildFiltersFromParams: buildGoalModelsFiltersFromParams,
|
|
7169
|
+
createUseModels: createUseGoalModels
|
|
7170
|
+
}
|
|
7171
|
+
);
|
|
7172
|
+
|
|
6413
7173
|
// src/components/RecommendedLessonsHistory/RecommendedLessonsHistory.tsx
|
|
6414
|
-
import { Fragment as
|
|
7174
|
+
import { Fragment as Fragment9, jsx as jsx41, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
7175
|
+
var GoalPageTab = /* @__PURE__ */ ((GoalPageTab2) => {
|
|
7176
|
+
GoalPageTab2["HISTORY"] = "history";
|
|
7177
|
+
GoalPageTab2["DRAFTS"] = "drafts";
|
|
7178
|
+
GoalPageTab2["MODELS"] = "models";
|
|
7179
|
+
return GoalPageTab2;
|
|
7180
|
+
})(GoalPageTab || {});
|
|
6415
7181
|
var isNonEmptyArray = (param) => Array.isArray(param) && param.length > 0;
|
|
6416
7182
|
var extractFilterValue = (param) => {
|
|
6417
7183
|
if (!isNonEmptyArray(param)) return {};
|
|
@@ -6452,7 +7218,7 @@ var getSchoolOptions = (data) => {
|
|
|
6452
7218
|
name: school.name
|
|
6453
7219
|
}));
|
|
6454
7220
|
};
|
|
6455
|
-
var
|
|
7221
|
+
var getSubjectOptions2 = (data) => {
|
|
6456
7222
|
if (!data?.subjects) return [];
|
|
6457
7223
|
return data.subjects.map((subject) => ({
|
|
6458
7224
|
id: subject.id,
|
|
@@ -6518,7 +7284,7 @@ var createGoalFiltersConfig = (userData) => [
|
|
|
6518
7284
|
key: "subject",
|
|
6519
7285
|
label: "Mat\xE9ria",
|
|
6520
7286
|
selectedIds: [],
|
|
6521
|
-
itens:
|
|
7287
|
+
itens: getSubjectOptions2(userData)
|
|
6522
7288
|
},
|
|
6523
7289
|
{
|
|
6524
7290
|
key: "theme",
|
|
@@ -6571,7 +7337,7 @@ var createTableColumns = (mapSubjectNameToEnum, onDeleteGoal, onEditGoal) => [
|
|
|
6571
7337
|
className: "max-w-[200px] truncate",
|
|
6572
7338
|
render: (value) => {
|
|
6573
7339
|
const title = typeof value === "string" ? value : "";
|
|
6574
|
-
return /* @__PURE__ */
|
|
7340
|
+
return /* @__PURE__ */ jsx41(Text_default, { size: "sm", title, children: title });
|
|
6575
7341
|
}
|
|
6576
7342
|
},
|
|
6577
7343
|
{
|
|
@@ -6581,7 +7347,7 @@ var createTableColumns = (mapSubjectNameToEnum, onDeleteGoal, onEditGoal) => [
|
|
|
6581
7347
|
className: "max-w-[150px] truncate",
|
|
6582
7348
|
render: (value) => {
|
|
6583
7349
|
const school = typeof value === "string" ? value : "";
|
|
6584
|
-
return /* @__PURE__ */
|
|
7350
|
+
return /* @__PURE__ */ jsx41(Text_default, { size: "sm", title: school, children: school });
|
|
6585
7351
|
}
|
|
6586
7352
|
},
|
|
6587
7353
|
{
|
|
@@ -6598,11 +7364,11 @@ var createTableColumns = (mapSubjectNameToEnum, onDeleteGoal, onEditGoal) => [
|
|
|
6598
7364
|
const subjectName = typeof value === "string" ? value : "";
|
|
6599
7365
|
const subjectEnum = mapSubjectNameToEnum?.(subjectName);
|
|
6600
7366
|
if (!subjectEnum) {
|
|
6601
|
-
return /* @__PURE__ */
|
|
7367
|
+
return /* @__PURE__ */ jsx41(Text_default, { size: "sm", className: "truncate", title: subjectName, children: subjectName });
|
|
6602
7368
|
}
|
|
6603
7369
|
const subjectInfo = getSubjectInfo(subjectEnum);
|
|
6604
|
-
return /* @__PURE__ */
|
|
6605
|
-
/* @__PURE__ */
|
|
7370
|
+
return /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-2", title: subjectName, children: [
|
|
7371
|
+
/* @__PURE__ */ jsx41(
|
|
6606
7372
|
"span",
|
|
6607
7373
|
{
|
|
6608
7374
|
className: cn(
|
|
@@ -6612,7 +7378,7 @@ var createTableColumns = (mapSubjectNameToEnum, onDeleteGoal, onEditGoal) => [
|
|
|
6612
7378
|
children: subjectInfo.icon
|
|
6613
7379
|
}
|
|
6614
7380
|
),
|
|
6615
|
-
/* @__PURE__ */
|
|
7381
|
+
/* @__PURE__ */ jsx41(Text_default, { size: "sm", className: "truncate", children: subjectName })
|
|
6616
7382
|
] });
|
|
6617
7383
|
}
|
|
6618
7384
|
},
|
|
@@ -6628,9 +7394,9 @@ var createTableColumns = (mapSubjectNameToEnum, onDeleteGoal, onEditGoal) => [
|
|
|
6628
7394
|
render: (value) => {
|
|
6629
7395
|
const status = typeof value === "string" ? value : "";
|
|
6630
7396
|
if (!status) {
|
|
6631
|
-
return /* @__PURE__ */
|
|
7397
|
+
return /* @__PURE__ */ jsx41(Text_default, { size: "sm", color: "text-text-500", children: "-" });
|
|
6632
7398
|
}
|
|
6633
|
-
return /* @__PURE__ */
|
|
7399
|
+
return /* @__PURE__ */ jsx41(
|
|
6634
7400
|
Badge_default,
|
|
6635
7401
|
{
|
|
6636
7402
|
variant: "solid",
|
|
@@ -6645,7 +7411,7 @@ var createTableColumns = (mapSubjectNameToEnum, onDeleteGoal, onEditGoal) => [
|
|
|
6645
7411
|
key: "completionPercentage",
|
|
6646
7412
|
label: "Conclus\xE3o",
|
|
6647
7413
|
sortable: true,
|
|
6648
|
-
render: (value) => /* @__PURE__ */
|
|
7414
|
+
render: (value) => /* @__PURE__ */ jsx41(
|
|
6649
7415
|
ProgressBar_default,
|
|
6650
7416
|
{
|
|
6651
7417
|
value: Number(value),
|
|
@@ -6671,20 +7437,20 @@ var createTableColumns = (mapSubjectNameToEnum, onDeleteGoal, onEditGoal) => [
|
|
|
6671
7437
|
e.stopPropagation();
|
|
6672
7438
|
onEditGoal?.(row.id);
|
|
6673
7439
|
};
|
|
6674
|
-
return /* @__PURE__ */
|
|
6675
|
-
/* @__PURE__ */
|
|
7440
|
+
return /* @__PURE__ */ jsxs28("div", { className: "flex justify-center gap-2", children: [
|
|
7441
|
+
/* @__PURE__ */ jsx41(
|
|
6676
7442
|
IconButton_default,
|
|
6677
7443
|
{
|
|
6678
|
-
icon: /* @__PURE__ */
|
|
7444
|
+
icon: /* @__PURE__ */ jsx41(Trash2, { size: 20 }),
|
|
6679
7445
|
size: "sm",
|
|
6680
7446
|
title: "Excluir",
|
|
6681
7447
|
onClick: handleDelete
|
|
6682
7448
|
}
|
|
6683
7449
|
),
|
|
6684
|
-
/* @__PURE__ */
|
|
7450
|
+
/* @__PURE__ */ jsx41(
|
|
6685
7451
|
IconButton_default,
|
|
6686
7452
|
{
|
|
6687
|
-
icon: /* @__PURE__ */
|
|
7453
|
+
icon: /* @__PURE__ */ jsx41(PencilSimple2, { size: 20 }),
|
|
6688
7454
|
size: "sm",
|
|
6689
7455
|
title: "Editar",
|
|
6690
7456
|
onClick: handleEdit
|
|
@@ -6698,7 +7464,7 @@ var createTableColumns = (mapSubjectNameToEnum, onDeleteGoal, onEditGoal) => [
|
|
|
6698
7464
|
label: "",
|
|
6699
7465
|
sortable: false,
|
|
6700
7466
|
className: "w-12",
|
|
6701
|
-
render: () => /* @__PURE__ */
|
|
7467
|
+
render: () => /* @__PURE__ */ jsx41("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx41(CaretRight6, { size: 20, className: "text-text-600" }) })
|
|
6702
7468
|
}
|
|
6703
7469
|
];
|
|
6704
7470
|
var RecommendedLessonsHistory = ({
|
|
@@ -6713,12 +7479,35 @@ var RecommendedLessonsHistory = ({
|
|
|
6713
7479
|
userFilterData,
|
|
6714
7480
|
title = "Hist\xF3rico de aulas recomendadas",
|
|
6715
7481
|
createButtonText = "Criar aula",
|
|
6716
|
-
searchPlaceholder = "Buscar aula"
|
|
7482
|
+
searchPlaceholder = "Buscar aula",
|
|
7483
|
+
fetchGoalModels,
|
|
7484
|
+
deleteGoalModel,
|
|
7485
|
+
onCreateModel,
|
|
7486
|
+
onSendLesson,
|
|
7487
|
+
onEditModel,
|
|
7488
|
+
subjectsMap,
|
|
7489
|
+
defaultTab,
|
|
7490
|
+
onTabChange
|
|
6717
7491
|
}) => {
|
|
6718
|
-
const [activeTab, setActiveTab] =
|
|
6719
|
-
|
|
7492
|
+
const [activeTab, setActiveTab] = useState16(
|
|
7493
|
+
defaultTab ?? "history" /* HISTORY */
|
|
7494
|
+
);
|
|
7495
|
+
useEffect16(() => {
|
|
7496
|
+
if (defaultTab !== void 0) {
|
|
7497
|
+
setActiveTab(defaultTab);
|
|
7498
|
+
}
|
|
7499
|
+
}, [defaultTab]);
|
|
7500
|
+
const handleTabChange = useCallback6(
|
|
7501
|
+
(value) => {
|
|
7502
|
+
const newTab = value;
|
|
7503
|
+
setActiveTab(newTab);
|
|
7504
|
+
onTabChange?.(newTab);
|
|
7505
|
+
},
|
|
7506
|
+
[onTabChange]
|
|
7507
|
+
);
|
|
7508
|
+
const fetchGoalsHistoryRef = useRef8(fetchGoalsHistory);
|
|
6720
7509
|
fetchGoalsHistoryRef.current = fetchGoalsHistory;
|
|
6721
|
-
const useGoalsHistory =
|
|
7510
|
+
const useGoalsHistory = useMemo7(
|
|
6722
7511
|
() => createUseRecommendedLessonsHistory(
|
|
6723
7512
|
(filters) => fetchGoalsHistoryRef.current(filters)
|
|
6724
7513
|
),
|
|
@@ -6731,31 +7520,31 @@ var RecommendedLessonsHistory = ({
|
|
|
6731
7520
|
pagination,
|
|
6732
7521
|
fetchGoals
|
|
6733
7522
|
} = useGoalsHistory();
|
|
6734
|
-
const initialFilterConfigs =
|
|
7523
|
+
const initialFilterConfigs = useMemo7(
|
|
6735
7524
|
() => createGoalFiltersConfig(userFilterData),
|
|
6736
7525
|
[userFilterData]
|
|
6737
7526
|
);
|
|
6738
|
-
const tableColumns =
|
|
7527
|
+
const tableColumns = useMemo7(
|
|
6739
7528
|
() => createTableColumns(mapSubjectNameToEnum, onDeleteGoal, onEditGoal),
|
|
6740
7529
|
[mapSubjectNameToEnum, onDeleteGoal, onEditGoal]
|
|
6741
7530
|
);
|
|
6742
|
-
const handleParamsChange =
|
|
7531
|
+
const handleParamsChange = useCallback6(
|
|
6743
7532
|
(params) => {
|
|
6744
7533
|
const filters = buildFiltersFromParams(params);
|
|
6745
7534
|
fetchGoals(filters);
|
|
6746
7535
|
},
|
|
6747
7536
|
[fetchGoals]
|
|
6748
7537
|
);
|
|
6749
|
-
return /* @__PURE__ */
|
|
7538
|
+
return /* @__PURE__ */ jsxs28(
|
|
6750
7539
|
"div",
|
|
6751
7540
|
{
|
|
6752
7541
|
"data-testid": "recommended-lessons-history",
|
|
6753
7542
|
className: "flex flex-col w-full h-auto relative justify-center items-center mb-5 overflow-hidden",
|
|
6754
7543
|
children: [
|
|
6755
|
-
/* @__PURE__ */
|
|
6756
|
-
/* @__PURE__ */
|
|
6757
|
-
/* @__PURE__ */
|
|
6758
|
-
/* @__PURE__ */
|
|
7544
|
+
/* @__PURE__ */ jsx41("span", { className: "absolute top-0 left-0 h-[150px] w-full z-0" }),
|
|
7545
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex flex-col w-full h-full max-w-[1350px] mx-auto z-10 lg:px-0 px-4 pt-4 sm:pt-0", children: [
|
|
7546
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex flex-col sm:flex-row w-full mb-6 items-start sm:items-center sm:justify-between gap-0 sm:gap-4", children: [
|
|
7547
|
+
/* @__PURE__ */ jsx41(
|
|
6759
7548
|
Text_default,
|
|
6760
7549
|
{
|
|
6761
7550
|
as: "h1",
|
|
@@ -6764,21 +7553,21 @@ var RecommendedLessonsHistory = ({
|
|
|
6764
7553
|
children: title
|
|
6765
7554
|
}
|
|
6766
7555
|
),
|
|
6767
|
-
/* @__PURE__ */
|
|
7556
|
+
/* @__PURE__ */ jsx41("div", { className: "flex-shrink-0 lg:w-auto self-center sm:self-auto", children: /* @__PURE__ */ jsx41(
|
|
6768
7557
|
Menu,
|
|
6769
7558
|
{
|
|
6770
7559
|
defaultValue: "history" /* HISTORY */,
|
|
6771
7560
|
value: activeTab,
|
|
6772
|
-
onValueChange:
|
|
7561
|
+
onValueChange: handleTabChange,
|
|
6773
7562
|
variant: "menu2",
|
|
6774
7563
|
className: "bg-transparent shadow-none px-0",
|
|
6775
|
-
children: /* @__PURE__ */
|
|
7564
|
+
children: /* @__PURE__ */ jsxs28(
|
|
6776
7565
|
MenuContent,
|
|
6777
7566
|
{
|
|
6778
7567
|
variant: "menu2",
|
|
6779
7568
|
className: "w-full lg:w-auto max-w-full min-w-0",
|
|
6780
7569
|
children: [
|
|
6781
|
-
/* @__PURE__ */
|
|
7570
|
+
/* @__PURE__ */ jsx41(
|
|
6782
7571
|
MenuItem,
|
|
6783
7572
|
{
|
|
6784
7573
|
variant: "menu2",
|
|
@@ -6788,7 +7577,7 @@ var RecommendedLessonsHistory = ({
|
|
|
6788
7577
|
children: "Hist\xF3rico"
|
|
6789
7578
|
}
|
|
6790
7579
|
),
|
|
6791
|
-
/* @__PURE__ */
|
|
7580
|
+
/* @__PURE__ */ jsx41(
|
|
6792
7581
|
MenuItem,
|
|
6793
7582
|
{
|
|
6794
7583
|
variant: "menu2",
|
|
@@ -6798,7 +7587,7 @@ var RecommendedLessonsHistory = ({
|
|
|
6798
7587
|
children: "Rascunhos"
|
|
6799
7588
|
}
|
|
6800
7589
|
),
|
|
6801
|
-
/* @__PURE__ */
|
|
7590
|
+
/* @__PURE__ */ jsx41(
|
|
6802
7591
|
MenuItem,
|
|
6803
7592
|
{
|
|
6804
7593
|
variant: "menu2",
|
|
@@ -6814,8 +7603,8 @@ var RecommendedLessonsHistory = ({
|
|
|
6814
7603
|
}
|
|
6815
7604
|
) })
|
|
6816
7605
|
] }),
|
|
6817
|
-
/* @__PURE__ */
|
|
6818
|
-
activeTab === "history" /* HISTORY */ && /* @__PURE__ */
|
|
7606
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex flex-col items-center w-full min-h-0 flex-1", children: [
|
|
7607
|
+
activeTab === "history" /* HISTORY */ && /* @__PURE__ */ jsx41(Fragment9, { children: error ? /* @__PURE__ */ jsx41("div", { className: "flex items-center justify-center bg-background rounded-xl w-full min-h-[705px]", children: /* @__PURE__ */ jsx41(Text_default, { size: "lg", color: "text-error-500", children: error }) }) : /* @__PURE__ */ jsx41("div", { className: "w-full", children: /* @__PURE__ */ jsx41(
|
|
6819
7608
|
TableProvider,
|
|
6820
7609
|
{
|
|
6821
7610
|
data: goals,
|
|
@@ -6840,14 +7629,14 @@ var RecommendedLessonsHistory = ({
|
|
|
6840
7629
|
image: noSearchImage
|
|
6841
7630
|
},
|
|
6842
7631
|
emptyState: {
|
|
6843
|
-
component: /* @__PURE__ */
|
|
7632
|
+
component: /* @__PURE__ */ jsx41(
|
|
6844
7633
|
EmptyState_default,
|
|
6845
7634
|
{
|
|
6846
7635
|
image: emptyStateImage,
|
|
6847
7636
|
title: "Crie uma nova aula",
|
|
6848
7637
|
description: "Selecione um conjunto de aulas organizadas por tema e ajude seus alunos a estudarem de forma estruturada e eficiente!",
|
|
6849
7638
|
buttonText: createButtonText,
|
|
6850
|
-
buttonIcon: /* @__PURE__ */
|
|
7639
|
+
buttonIcon: /* @__PURE__ */ jsx41(Plus2, { size: 18 }),
|
|
6851
7640
|
buttonVariant: "outline",
|
|
6852
7641
|
buttonAction: "primary",
|
|
6853
7642
|
onButtonClick: onCreateLesson
|
|
@@ -6862,22 +7651,22 @@ var RecommendedLessonsHistory = ({
|
|
|
6862
7651
|
table,
|
|
6863
7652
|
pagination: paginationComponent
|
|
6864
7653
|
} = renderProps;
|
|
6865
|
-
return /* @__PURE__ */
|
|
6866
|
-
/* @__PURE__ */
|
|
6867
|
-
/* @__PURE__ */
|
|
7654
|
+
return /* @__PURE__ */ jsxs28("div", { className: "space-y-4", children: [
|
|
7655
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-between gap-4", children: [
|
|
7656
|
+
/* @__PURE__ */ jsx41(
|
|
6868
7657
|
Button_default,
|
|
6869
7658
|
{
|
|
6870
7659
|
variant: "solid",
|
|
6871
7660
|
action: "primary",
|
|
6872
7661
|
size: "medium",
|
|
6873
7662
|
onClick: onCreateLesson,
|
|
6874
|
-
iconLeft: /* @__PURE__ */
|
|
7663
|
+
iconLeft: /* @__PURE__ */ jsx41(Plus2, { size: 18, weight: "bold" }),
|
|
6875
7664
|
children: createButtonText
|
|
6876
7665
|
}
|
|
6877
7666
|
),
|
|
6878
7667
|
controls
|
|
6879
7668
|
] }),
|
|
6880
|
-
/* @__PURE__ */
|
|
7669
|
+
/* @__PURE__ */ jsxs28("div", { className: "bg-background rounded-xl p-6 space-y-4", children: [
|
|
6881
7670
|
table,
|
|
6882
7671
|
paginationComponent
|
|
6883
7672
|
] })
|
|
@@ -6885,8 +7674,22 @@ var RecommendedLessonsHistory = ({
|
|
|
6885
7674
|
}
|
|
6886
7675
|
}
|
|
6887
7676
|
) }) }),
|
|
6888
|
-
activeTab === "drafts" /* DRAFTS */ && /* @__PURE__ */
|
|
6889
|
-
activeTab === "models" /* MODELS */ &&
|
|
7677
|
+
activeTab === "drafts" /* DRAFTS */ && /* @__PURE__ */ jsx41("div", { className: "flex items-center justify-center bg-background rounded-xl w-full min-h-[705px]", children: /* @__PURE__ */ jsx41(Text_default, { size: "lg", color: "text-text-600", children: "Rascunhos em desenvolvimento" }) }),
|
|
7678
|
+
activeTab === "models" /* MODELS */ && fetchGoalModels && deleteGoalModel && onCreateModel && /* @__PURE__ */ jsx41(
|
|
7679
|
+
GoalModelsTab,
|
|
7680
|
+
{
|
|
7681
|
+
fetchGoalModels,
|
|
7682
|
+
deleteGoalModel,
|
|
7683
|
+
onCreateModel,
|
|
7684
|
+
onSendLesson,
|
|
7685
|
+
onEditModel,
|
|
7686
|
+
emptyStateImage,
|
|
7687
|
+
noSearchImage,
|
|
7688
|
+
mapSubjectNameToEnum,
|
|
7689
|
+
userFilterData,
|
|
7690
|
+
subjectsMap
|
|
7691
|
+
}
|
|
7692
|
+
)
|
|
6890
7693
|
] })
|
|
6891
7694
|
] })
|
|
6892
7695
|
]
|
|
@@ -6895,6 +7698,7 @@ var RecommendedLessonsHistory = ({
|
|
|
6895
7698
|
};
|
|
6896
7699
|
var RecommendedLessonsHistory_default = RecommendedLessonsHistory;
|
|
6897
7700
|
export {
|
|
7701
|
+
GoalPageTab,
|
|
6898
7702
|
RecommendedLessonsHistory,
|
|
6899
7703
|
RecommendedLessonsHistory_default as default
|
|
6900
7704
|
};
|