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
|
@@ -30,14 +30,15 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/components/RecommendedLessonsHistory/index.ts
|
|
31
31
|
var RecommendedLessonsHistory_exports = {};
|
|
32
32
|
__export(RecommendedLessonsHistory_exports, {
|
|
33
|
+
GoalPageTab: () => GoalPageTab,
|
|
33
34
|
RecommendedLessonsHistory: () => RecommendedLessonsHistory,
|
|
34
35
|
default: () => RecommendedLessonsHistory_default
|
|
35
36
|
});
|
|
36
37
|
module.exports = __toCommonJS(RecommendedLessonsHistory_exports);
|
|
37
38
|
|
|
38
39
|
// src/components/RecommendedLessonsHistory/RecommendedLessonsHistory.tsx
|
|
39
|
-
var
|
|
40
|
-
var
|
|
40
|
+
var import_react23 = require("react");
|
|
41
|
+
var import_phosphor_react17 = require("phosphor-react");
|
|
41
42
|
|
|
42
43
|
// src/utils/utils.ts
|
|
43
44
|
var import_clsx = require("clsx");
|
|
@@ -579,7 +580,7 @@ var injectStore = (children, store) => import_react2.Children.map(children, (chi
|
|
|
579
580
|
});
|
|
580
581
|
|
|
581
582
|
// src/components/TableProvider/TableProvider.tsx
|
|
582
|
-
var
|
|
583
|
+
var import_react22 = require("react");
|
|
583
584
|
|
|
584
585
|
// src/components/Table/Table.tsx
|
|
585
586
|
var import_react4 = require("react");
|
|
@@ -2677,7 +2678,7 @@ Search.displayName = "Search";
|
|
|
2677
2678
|
var Search_default = Search;
|
|
2678
2679
|
|
|
2679
2680
|
// src/components/CheckBoxGroup/CheckBoxGroup.tsx
|
|
2680
|
-
var
|
|
2681
|
+
var import_react21 = require("react");
|
|
2681
2682
|
|
|
2682
2683
|
// src/components/CheckBox/CheckBox.tsx
|
|
2683
2684
|
var import_react12 = require("react");
|
|
@@ -2903,8 +2904,129 @@ var Divider = ({
|
|
|
2903
2904
|
};
|
|
2904
2905
|
var Divider_default = Divider;
|
|
2905
2906
|
|
|
2906
|
-
// src/components/
|
|
2907
|
+
// src/components/Toast/Toast.tsx
|
|
2908
|
+
var import_phosphor_react10 = require("phosphor-react");
|
|
2907
2909
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2910
|
+
var VARIANT_ACTION_CLASSES3 = {
|
|
2911
|
+
solid: {
|
|
2912
|
+
warning: "bg-warning text-warning-600 border-none focus-visible:outline-none",
|
|
2913
|
+
success: "bg-success text-success-800 border-none focus-visible:outline-none",
|
|
2914
|
+
info: "bg-info text-info-600 border-none focus-visible:outline-none"
|
|
2915
|
+
},
|
|
2916
|
+
outlined: {
|
|
2917
|
+
warning: "bg-warning text-warning-600 border border-warning-300 focus-visible:outline-none",
|
|
2918
|
+
success: "bg-success text-success-800 border border-success-200 focus-visible:outline-none",
|
|
2919
|
+
info: "bg-info text-info-600 border border-info-600 focus-visible:outline-none"
|
|
2920
|
+
}
|
|
2921
|
+
};
|
|
2922
|
+
var iconMap = {
|
|
2923
|
+
success: import_phosphor_react10.CheckCircle,
|
|
2924
|
+
info: import_phosphor_react10.Info,
|
|
2925
|
+
warning: import_phosphor_react10.WarningCircle
|
|
2926
|
+
};
|
|
2927
|
+
var Toast = ({
|
|
2928
|
+
variant = "outlined",
|
|
2929
|
+
action = "success",
|
|
2930
|
+
className = "",
|
|
2931
|
+
onClose,
|
|
2932
|
+
title,
|
|
2933
|
+
description,
|
|
2934
|
+
position = "default",
|
|
2935
|
+
...props
|
|
2936
|
+
}) => {
|
|
2937
|
+
const variantClasses = VARIANT_ACTION_CLASSES3[variant][action];
|
|
2938
|
+
const positionClasses = {
|
|
2939
|
+
"top-left": "fixed top-4 left-4",
|
|
2940
|
+
"top-center": "fixed top-4 left-1/2 transform -translate-x-1/2",
|
|
2941
|
+
"top-right": "fixed top-4 right-4",
|
|
2942
|
+
"bottom-left": "fixed bottom-4 left-4",
|
|
2943
|
+
"bottom-center": "fixed bottom-4 left-1/2 transform -translate-x-1/2",
|
|
2944
|
+
"bottom-right": "fixed bottom-4 right-4",
|
|
2945
|
+
default: ""
|
|
2946
|
+
};
|
|
2947
|
+
const IconAction = iconMap[action] || iconMap["success"];
|
|
2948
|
+
const baseClasses = "max-w-[390px] w-full flex flex-row items-start justify-between shadow-lg rounded-lg border p-4 gap-6 group";
|
|
2949
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
2950
|
+
"div",
|
|
2951
|
+
{
|
|
2952
|
+
role: "alert",
|
|
2953
|
+
"aria-live": "assertive",
|
|
2954
|
+
"aria-atomic": "true",
|
|
2955
|
+
className: cn(
|
|
2956
|
+
baseClasses,
|
|
2957
|
+
positionClasses[position],
|
|
2958
|
+
variantClasses,
|
|
2959
|
+
className
|
|
2960
|
+
),
|
|
2961
|
+
...props,
|
|
2962
|
+
children: [
|
|
2963
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-row items-start gap-3", children: [
|
|
2964
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "mt-1", "data-testid": `toast-icon-${action}`, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IconAction, {}) }),
|
|
2965
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col items-start justify-start", children: [
|
|
2966
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "font-semibold text-md", children: title }),
|
|
2967
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "text-md text-text-900", children: description })
|
|
2968
|
+
] })
|
|
2969
|
+
] }),
|
|
2970
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2971
|
+
"button",
|
|
2972
|
+
{
|
|
2973
|
+
onClick: onClose,
|
|
2974
|
+
"aria-label": "Dismiss notification",
|
|
2975
|
+
className: "text-background-500 cursor-pointer opacity-0 group-hover:opacity-100 transition-opacity",
|
|
2976
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_phosphor_react10.X, {})
|
|
2977
|
+
}
|
|
2978
|
+
)
|
|
2979
|
+
]
|
|
2980
|
+
}
|
|
2981
|
+
);
|
|
2982
|
+
};
|
|
2983
|
+
var Toast_default = Toast;
|
|
2984
|
+
|
|
2985
|
+
// src/components/Toast/utils/ToastStore.ts
|
|
2986
|
+
var import_zustand4 = require("zustand");
|
|
2987
|
+
var useToastStore = (0, import_zustand4.create)((set) => ({
|
|
2988
|
+
toasts: [],
|
|
2989
|
+
addToast: (toast) => {
|
|
2990
|
+
const id = crypto.randomUUID();
|
|
2991
|
+
set((state) => ({
|
|
2992
|
+
toasts: [...state.toasts, { id, ...toast }]
|
|
2993
|
+
}));
|
|
2994
|
+
},
|
|
2995
|
+
removeToast: (id) => {
|
|
2996
|
+
set((state) => ({
|
|
2997
|
+
toasts: state.toasts.filter((t) => t.id !== id)
|
|
2998
|
+
}));
|
|
2999
|
+
}
|
|
3000
|
+
}));
|
|
3001
|
+
var ToastStore_default = useToastStore;
|
|
3002
|
+
|
|
3003
|
+
// src/components/Toast/utils/Toaster.tsx
|
|
3004
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
3005
|
+
var Toaster = () => {
|
|
3006
|
+
const toasts = ToastStore_default((state) => state.toasts);
|
|
3007
|
+
const removeToast = ToastStore_default((state) => state.removeToast);
|
|
3008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, { children: toasts.map((toast) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
3009
|
+
Toast_default,
|
|
3010
|
+
{
|
|
3011
|
+
title: toast.title,
|
|
3012
|
+
description: toast.description,
|
|
3013
|
+
variant: toast.variant,
|
|
3014
|
+
action: toast.action,
|
|
3015
|
+
position: toast.position,
|
|
3016
|
+
onClose: () => removeToast(toast.id)
|
|
3017
|
+
},
|
|
3018
|
+
toast.id
|
|
3019
|
+
)) });
|
|
3020
|
+
};
|
|
3021
|
+
var useToast = () => {
|
|
3022
|
+
const addToast = ToastStore_default((state) => state.addToast);
|
|
3023
|
+
const removeToast = ToastStore_default((state) => state.removeToast);
|
|
3024
|
+
return { addToast, removeToast };
|
|
3025
|
+
};
|
|
3026
|
+
var Toaster_default = Toaster;
|
|
3027
|
+
|
|
3028
|
+
// src/components/ProgressBar/ProgressBar.tsx
|
|
3029
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2908
3030
|
var SIZE_CLASSES5 = {
|
|
2909
3031
|
small: {
|
|
2910
3032
|
container: "h-1",
|
|
@@ -3016,20 +3138,20 @@ var renderStackedHitCountDisplay = (showHitCount, showPercentage, clampedValue,
|
|
|
3016
3138
|
max,
|
|
3017
3139
|
percentage
|
|
3018
3140
|
);
|
|
3019
|
-
return /* @__PURE__ */ (0,
|
|
3141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3020
3142
|
"div",
|
|
3021
3143
|
{
|
|
3022
3144
|
className: cn(
|
|
3023
3145
|
"text-xs font-medium leading-[14px] text-right",
|
|
3024
3146
|
percentageClassName
|
|
3025
3147
|
),
|
|
3026
|
-
children: displayPriority.type === "hitCount" ? /* @__PURE__ */ (0,
|
|
3027
|
-
/* @__PURE__ */ (0,
|
|
3028
|
-
/* @__PURE__ */ (0,
|
|
3148
|
+
children: displayPriority.type === "hitCount" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
|
|
3149
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "text-success-200", children: Math.round(clampedValue) }),
|
|
3150
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: "text-text-600", children: [
|
|
3029
3151
|
" de ",
|
|
3030
3152
|
max
|
|
3031
3153
|
] })
|
|
3032
|
-
] }) : /* @__PURE__ */ (0,
|
|
3154
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Text_default, { size: "xs", weight: "medium", className: "text-success-200", children: [
|
|
3033
3155
|
Math.round(percentage),
|
|
3034
3156
|
"%"
|
|
3035
3157
|
] })
|
|
@@ -3044,7 +3166,7 @@ var ProgressBarBase = ({
|
|
|
3044
3166
|
variantClasses,
|
|
3045
3167
|
containerClassName,
|
|
3046
3168
|
fillClassName
|
|
3047
|
-
}) => /* @__PURE__ */ (0,
|
|
3169
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
3048
3170
|
"div",
|
|
3049
3171
|
{
|
|
3050
3172
|
className: cn(
|
|
@@ -3053,7 +3175,7 @@ var ProgressBarBase = ({
|
|
|
3053
3175
|
"overflow-hidden relative"
|
|
3054
3176
|
),
|
|
3055
3177
|
children: [
|
|
3056
|
-
/* @__PURE__ */ (0,
|
|
3178
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3057
3179
|
"progress",
|
|
3058
3180
|
{
|
|
3059
3181
|
value: clampedValue,
|
|
@@ -3062,7 +3184,7 @@ var ProgressBarBase = ({
|
|
|
3062
3184
|
className: "absolute inset-0 w-full h-full opacity-0"
|
|
3063
3185
|
}
|
|
3064
3186
|
),
|
|
3065
|
-
/* @__PURE__ */ (0,
|
|
3187
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3066
3188
|
"div",
|
|
3067
3189
|
{
|
|
3068
3190
|
className: cn(
|
|
@@ -3088,7 +3210,7 @@ var StackedLayout = ({
|
|
|
3088
3210
|
percentage,
|
|
3089
3211
|
variantClasses,
|
|
3090
3212
|
dimensions
|
|
3091
|
-
}) => /* @__PURE__ */ (0,
|
|
3213
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
3092
3214
|
"div",
|
|
3093
3215
|
{
|
|
3094
3216
|
className: cn(
|
|
@@ -3098,8 +3220,8 @@ var StackedLayout = ({
|
|
|
3098
3220
|
className
|
|
3099
3221
|
),
|
|
3100
3222
|
children: [
|
|
3101
|
-
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ (0,
|
|
3102
|
-
label && /* @__PURE__ */ (0,
|
|
3223
|
+
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex flex-row justify-between items-center w-full h-[19px]", children: [
|
|
3224
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3103
3225
|
Text_default,
|
|
3104
3226
|
{
|
|
3105
3227
|
as: "div",
|
|
@@ -3118,7 +3240,7 @@ var StackedLayout = ({
|
|
|
3118
3240
|
percentageClassName
|
|
3119
3241
|
)
|
|
3120
3242
|
] }),
|
|
3121
|
-
/* @__PURE__ */ (0,
|
|
3243
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3122
3244
|
ProgressBarBase,
|
|
3123
3245
|
{
|
|
3124
3246
|
clampedValue,
|
|
@@ -3160,7 +3282,7 @@ var CompactLayout = ({
|
|
|
3160
3282
|
percentageClassName,
|
|
3161
3283
|
labelClassName
|
|
3162
3284
|
});
|
|
3163
|
-
return /* @__PURE__ */ (0,
|
|
3285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
3164
3286
|
"div",
|
|
3165
3287
|
{
|
|
3166
3288
|
className: cn(
|
|
@@ -3170,7 +3292,7 @@ var CompactLayout = ({
|
|
|
3170
3292
|
className
|
|
3171
3293
|
),
|
|
3172
3294
|
children: [
|
|
3173
|
-
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ (0,
|
|
3295
|
+
shouldShowHeader(label, showPercentage, showHitCount) && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3174
3296
|
Text_default,
|
|
3175
3297
|
{
|
|
3176
3298
|
as: "div",
|
|
@@ -3181,7 +3303,7 @@ var CompactLayout = ({
|
|
|
3181
3303
|
children: content
|
|
3182
3304
|
}
|
|
3183
3305
|
),
|
|
3184
|
-
/* @__PURE__ */ (0,
|
|
3306
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3185
3307
|
ProgressBarBase,
|
|
3186
3308
|
{
|
|
3187
3309
|
clampedValue,
|
|
@@ -3217,9 +3339,9 @@ var DefaultLayout = ({
|
|
|
3217
3339
|
label,
|
|
3218
3340
|
showPercentage
|
|
3219
3341
|
);
|
|
3220
|
-
return /* @__PURE__ */ (0,
|
|
3221
|
-
displayConfig.showHeader && /* @__PURE__ */ (0,
|
|
3222
|
-
label && /* @__PURE__ */ (0,
|
|
3342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: cn("flex", sizeClasses.layout, gapClass, className), children: [
|
|
3343
|
+
displayConfig.showHeader && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "flex flex-row items-center justify-between w-full", children: [
|
|
3344
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3223
3345
|
Text_default,
|
|
3224
3346
|
{
|
|
3225
3347
|
as: "div",
|
|
@@ -3232,7 +3354,7 @@ var DefaultLayout = ({
|
|
|
3232
3354
|
children: label
|
|
3233
3355
|
}
|
|
3234
3356
|
),
|
|
3235
|
-
showPercentage && /* @__PURE__ */ (0,
|
|
3357
|
+
showPercentage && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
3236
3358
|
Text_default,
|
|
3237
3359
|
{
|
|
3238
3360
|
size: "xs",
|
|
@@ -3248,7 +3370,7 @@ var DefaultLayout = ({
|
|
|
3248
3370
|
}
|
|
3249
3371
|
)
|
|
3250
3372
|
] }),
|
|
3251
|
-
/* @__PURE__ */ (0,
|
|
3373
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3252
3374
|
ProgressBarBase,
|
|
3253
3375
|
{
|
|
3254
3376
|
clampedValue,
|
|
@@ -3268,7 +3390,7 @@ var DefaultLayout = ({
|
|
|
3268
3390
|
)
|
|
3269
3391
|
}
|
|
3270
3392
|
),
|
|
3271
|
-
displayConfig.showPercentage && /* @__PURE__ */ (0,
|
|
3393
|
+
displayConfig.showPercentage && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
3272
3394
|
Text_default,
|
|
3273
3395
|
{
|
|
3274
3396
|
size: "xs",
|
|
@@ -3283,7 +3405,7 @@ var DefaultLayout = ({
|
|
|
3283
3405
|
]
|
|
3284
3406
|
}
|
|
3285
3407
|
),
|
|
3286
|
-
displayConfig.showLabel && /* @__PURE__ */ (0,
|
|
3408
|
+
displayConfig.showLabel && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3287
3409
|
Text_default,
|
|
3288
3410
|
{
|
|
3289
3411
|
as: "div",
|
|
@@ -3319,7 +3441,7 @@ var ProgressBar = ({
|
|
|
3319
3441
|
const sizeClasses = SIZE_CLASSES5[size];
|
|
3320
3442
|
const variantClasses = VARIANT_CLASSES2[variant];
|
|
3321
3443
|
if (layout === "stacked") {
|
|
3322
|
-
return /* @__PURE__ */ (0,
|
|
3444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3323
3445
|
StackedLayout,
|
|
3324
3446
|
{
|
|
3325
3447
|
className,
|
|
@@ -3340,7 +3462,7 @@ var ProgressBar = ({
|
|
|
3340
3462
|
);
|
|
3341
3463
|
}
|
|
3342
3464
|
if (layout === "compact") {
|
|
3343
|
-
return /* @__PURE__ */ (0,
|
|
3465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3344
3466
|
CompactLayout,
|
|
3345
3467
|
{
|
|
3346
3468
|
className,
|
|
@@ -3360,7 +3482,7 @@ var ProgressBar = ({
|
|
|
3360
3482
|
}
|
|
3361
3483
|
);
|
|
3362
3484
|
}
|
|
3363
|
-
return /* @__PURE__ */ (0,
|
|
3485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3364
3486
|
DefaultLayout,
|
|
3365
3487
|
{
|
|
3366
3488
|
className,
|
|
@@ -3384,15 +3506,15 @@ var import_react15 = require("react");
|
|
|
3384
3506
|
|
|
3385
3507
|
// src/components/Card/Card.tsx
|
|
3386
3508
|
var import_react14 = require("react");
|
|
3387
|
-
var
|
|
3509
|
+
var import_phosphor_react11 = require("phosphor-react");
|
|
3388
3510
|
|
|
3389
3511
|
// src/components/IconRender/IconRender.tsx
|
|
3390
3512
|
var import_react13 = require("react");
|
|
3391
3513
|
var PhosphorIcons = __toESM(require("phosphor-react"));
|
|
3392
3514
|
|
|
3393
3515
|
// src/assets/icons/subjects/ChatPT.tsx
|
|
3394
|
-
var
|
|
3395
|
-
var ChatPT = ({ size, color }) => /* @__PURE__ */ (0,
|
|
3516
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
3517
|
+
var ChatPT = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3396
3518
|
"svg",
|
|
3397
3519
|
{
|
|
3398
3520
|
width: size,
|
|
@@ -3401,21 +3523,21 @@ var ChatPT = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)
|
|
|
3401
3523
|
fill: "none",
|
|
3402
3524
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3403
3525
|
children: [
|
|
3404
|
-
/* @__PURE__ */ (0,
|
|
3526
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3405
3527
|
"path",
|
|
3406
3528
|
{
|
|
3407
3529
|
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",
|
|
3408
3530
|
fill: color
|
|
3409
3531
|
}
|
|
3410
3532
|
),
|
|
3411
|
-
/* @__PURE__ */ (0,
|
|
3533
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3412
3534
|
"path",
|
|
3413
3535
|
{
|
|
3414
3536
|
d: "M21.1758 12V20.5312H19.7168V12H21.1758ZM23.8535 12V13.1719H17.0625V12H23.8535Z",
|
|
3415
3537
|
fill: color
|
|
3416
3538
|
}
|
|
3417
3539
|
),
|
|
3418
|
-
/* @__PURE__ */ (0,
|
|
3540
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3419
3541
|
"path",
|
|
3420
3542
|
{
|
|
3421
3543
|
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",
|
|
@@ -3427,8 +3549,8 @@ var ChatPT = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)
|
|
|
3427
3549
|
);
|
|
3428
3550
|
|
|
3429
3551
|
// src/assets/icons/subjects/ChatEN.tsx
|
|
3430
|
-
var
|
|
3431
|
-
var ChatEN = ({ size, color }) => /* @__PURE__ */ (0,
|
|
3552
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
3553
|
+
var ChatEN = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
3432
3554
|
"svg",
|
|
3433
3555
|
{
|
|
3434
3556
|
width: size,
|
|
@@ -3437,21 +3559,21 @@ var ChatEN = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)
|
|
|
3437
3559
|
fill: "none",
|
|
3438
3560
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3439
3561
|
children: [
|
|
3440
|
-
/* @__PURE__ */ (0,
|
|
3562
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3441
3563
|
"path",
|
|
3442
3564
|
{
|
|
3443
3565
|
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",
|
|
3444
3566
|
fill: color
|
|
3445
3567
|
}
|
|
3446
3568
|
),
|
|
3447
|
-
/* @__PURE__ */ (0,
|
|
3569
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3448
3570
|
"path",
|
|
3449
3571
|
{
|
|
3450
3572
|
d: "M22.5488 12V20.5312H21.0781L17.252 14.4199V20.5312H15.7812V12H17.252L21.0898 18.123V12H22.5488Z",
|
|
3451
3573
|
fill: color
|
|
3452
3574
|
}
|
|
3453
3575
|
),
|
|
3454
|
-
/* @__PURE__ */ (0,
|
|
3576
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
3455
3577
|
"path",
|
|
3456
3578
|
{
|
|
3457
3579
|
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",
|
|
@@ -3463,8 +3585,8 @@ var ChatEN = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)
|
|
|
3463
3585
|
);
|
|
3464
3586
|
|
|
3465
3587
|
// src/assets/icons/subjects/ChatES.tsx
|
|
3466
|
-
var
|
|
3467
|
-
var ChatES = ({ size, color }) => /* @__PURE__ */ (0,
|
|
3588
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
3589
|
+
var ChatES = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
3468
3590
|
"svg",
|
|
3469
3591
|
{
|
|
3470
3592
|
width: size,
|
|
@@ -3473,21 +3595,21 @@ var ChatES = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)
|
|
|
3473
3595
|
fill: "none",
|
|
3474
3596
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3475
3597
|
children: [
|
|
3476
|
-
/* @__PURE__ */ (0,
|
|
3598
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3477
3599
|
"path",
|
|
3478
3600
|
{
|
|
3479
3601
|
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",
|
|
3480
3602
|
fill: color
|
|
3481
3603
|
}
|
|
3482
3604
|
),
|
|
3483
|
-
/* @__PURE__ */ (0,
|
|
3605
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3484
3606
|
"path",
|
|
3485
3607
|
{
|
|
3486
3608
|
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",
|
|
3487
3609
|
fill: color
|
|
3488
3610
|
}
|
|
3489
3611
|
),
|
|
3490
|
-
/* @__PURE__ */ (0,
|
|
3612
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
3491
3613
|
"path",
|
|
3492
3614
|
{
|
|
3493
3615
|
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",
|
|
@@ -3499,7 +3621,7 @@ var ChatES = ({ size, color }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)
|
|
|
3499
3621
|
);
|
|
3500
3622
|
|
|
3501
3623
|
// src/components/IconRender/IconRender.tsx
|
|
3502
|
-
var
|
|
3624
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3503
3625
|
var IconRender = ({
|
|
3504
3626
|
iconName,
|
|
3505
3627
|
color = "#000000",
|
|
@@ -3509,14 +3631,14 @@ var IconRender = ({
|
|
|
3509
3631
|
if (typeof iconName === "string") {
|
|
3510
3632
|
switch (iconName) {
|
|
3511
3633
|
case "Chat_PT":
|
|
3512
|
-
return /* @__PURE__ */ (0,
|
|
3634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ChatPT, { size, color });
|
|
3513
3635
|
case "Chat_EN":
|
|
3514
|
-
return /* @__PURE__ */ (0,
|
|
3636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ChatEN, { size, color });
|
|
3515
3637
|
case "Chat_ES":
|
|
3516
|
-
return /* @__PURE__ */ (0,
|
|
3638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ChatES, { size, color });
|
|
3517
3639
|
default: {
|
|
3518
3640
|
const IconComponent = PhosphorIcons[iconName] || PhosphorIcons.Question;
|
|
3519
|
-
return /* @__PURE__ */ (0,
|
|
3641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(IconComponent, { size, color, weight });
|
|
3520
3642
|
}
|
|
3521
3643
|
}
|
|
3522
3644
|
} else {
|
|
@@ -3529,7 +3651,7 @@ var IconRender = ({
|
|
|
3529
3651
|
var IconRender_default = IconRender;
|
|
3530
3652
|
|
|
3531
3653
|
// src/components/Card/Card.tsx
|
|
3532
|
-
var
|
|
3654
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3533
3655
|
var CARD_BASE_CLASSES = {
|
|
3534
3656
|
default: "w-full bg-background border border-border-50 rounded-xl",
|
|
3535
3657
|
compact: "w-full bg-background border border-border-50 rounded-lg",
|
|
@@ -3571,7 +3693,7 @@ var CardBase = (0, import_react14.forwardRef)(
|
|
|
3571
3693
|
const minHeightClasses = CARD_MIN_HEIGHT_CLASSES[minHeight];
|
|
3572
3694
|
const layoutClasses = CARD_LAYOUT_CLASSES[layout];
|
|
3573
3695
|
const cursorClasses = CARD_CURSOR_CLASSES[cursor];
|
|
3574
|
-
return /* @__PURE__ */ (0,
|
|
3696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3575
3697
|
"div",
|
|
3576
3698
|
{
|
|
3577
3699
|
ref,
|
|
@@ -3629,7 +3751,7 @@ var CardActivitiesResults = (0, import_react14.forwardRef)(
|
|
|
3629
3751
|
const actionIconClasses = ACTION_ICON_CLASSES[action];
|
|
3630
3752
|
const actionSubTitleClasses = ACTION_SUBTITLE_CLASSES[action];
|
|
3631
3753
|
const actionHeaderClasses = ACTION_HEADER_CLASSES[action];
|
|
3632
|
-
return /* @__PURE__ */ (0,
|
|
3754
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3633
3755
|
"div",
|
|
3634
3756
|
{
|
|
3635
3757
|
ref,
|
|
@@ -3639,7 +3761,7 @@ var CardActivitiesResults = (0, import_react14.forwardRef)(
|
|
|
3639
3761
|
),
|
|
3640
3762
|
...props,
|
|
3641
3763
|
children: [
|
|
3642
|
-
/* @__PURE__ */ (0,
|
|
3764
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3643
3765
|
"div",
|
|
3644
3766
|
{
|
|
3645
3767
|
className: cn(
|
|
@@ -3648,7 +3770,7 @@ var CardActivitiesResults = (0, import_react14.forwardRef)(
|
|
|
3648
3770
|
extended ? "rounded-t-xl" : "rounded-xl"
|
|
3649
3771
|
),
|
|
3650
3772
|
children: [
|
|
3651
|
-
/* @__PURE__ */ (0,
|
|
3773
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3652
3774
|
"span",
|
|
3653
3775
|
{
|
|
3654
3776
|
className: cn(
|
|
@@ -3658,7 +3780,7 @@ var CardActivitiesResults = (0, import_react14.forwardRef)(
|
|
|
3658
3780
|
children: icon
|
|
3659
3781
|
}
|
|
3660
3782
|
),
|
|
3661
|
-
/* @__PURE__ */ (0,
|
|
3783
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3662
3784
|
Text_default,
|
|
3663
3785
|
{
|
|
3664
3786
|
size: "2xs",
|
|
@@ -3667,7 +3789,7 @@ var CardActivitiesResults = (0, import_react14.forwardRef)(
|
|
|
3667
3789
|
children: title
|
|
3668
3790
|
}
|
|
3669
3791
|
),
|
|
3670
|
-
/* @__PURE__ */ (0,
|
|
3792
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3671
3793
|
"p",
|
|
3672
3794
|
{
|
|
3673
3795
|
className: cn("text-lg font-bold truncate", actionSubTitleClasses),
|
|
@@ -3677,8 +3799,8 @@ var CardActivitiesResults = (0, import_react14.forwardRef)(
|
|
|
3677
3799
|
]
|
|
3678
3800
|
}
|
|
3679
3801
|
),
|
|
3680
|
-
extended && /* @__PURE__ */ (0,
|
|
3681
|
-
/* @__PURE__ */ (0,
|
|
3802
|
+
extended && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-col items-center gap-2.5 pb-9.5 pt-2.5", children: [
|
|
3803
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3682
3804
|
"p",
|
|
3683
3805
|
{
|
|
3684
3806
|
className: cn(
|
|
@@ -3688,7 +3810,7 @@ var CardActivitiesResults = (0, import_react14.forwardRef)(
|
|
|
3688
3810
|
children: header
|
|
3689
3811
|
}
|
|
3690
3812
|
),
|
|
3691
|
-
/* @__PURE__ */ (0,
|
|
3813
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Badge_default, { size: "large", action: "info", children: description })
|
|
3692
3814
|
] })
|
|
3693
3815
|
]
|
|
3694
3816
|
}
|
|
@@ -3707,7 +3829,7 @@ var CardQuestions = (0, import_react14.forwardRef)(
|
|
|
3707
3829
|
const isDone = state === "done";
|
|
3708
3830
|
const stateLabel = isDone ? "Realizado" : "N\xE3o Realizado";
|
|
3709
3831
|
const buttonLabel = isDone ? "Ver Resultado" : "Responder";
|
|
3710
|
-
return /* @__PURE__ */ (0,
|
|
3832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3711
3833
|
CardBase,
|
|
3712
3834
|
{
|
|
3713
3835
|
ref,
|
|
@@ -3717,9 +3839,9 @@ var CardQuestions = (0, import_react14.forwardRef)(
|
|
|
3717
3839
|
className: cn("justify-between gap-4", className),
|
|
3718
3840
|
...props,
|
|
3719
3841
|
children: [
|
|
3720
|
-
/* @__PURE__ */ (0,
|
|
3721
|
-
/* @__PURE__ */ (0,
|
|
3722
|
-
/* @__PURE__ */ (0,
|
|
3842
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("section", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
3843
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "font-bold text-xs text-text-950 truncate", children: header }),
|
|
3844
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex flex-row gap-6 items-center", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3723
3845
|
Badge_default,
|
|
3724
3846
|
{
|
|
3725
3847
|
size: "medium",
|
|
@@ -3729,7 +3851,7 @@ var CardQuestions = (0, import_react14.forwardRef)(
|
|
|
3729
3851
|
}
|
|
3730
3852
|
) })
|
|
3731
3853
|
] }),
|
|
3732
|
-
/* @__PURE__ */ (0,
|
|
3854
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3733
3855
|
Button_default,
|
|
3734
3856
|
{
|
|
3735
3857
|
size: "extra-small",
|
|
@@ -3760,19 +3882,19 @@ var CardProgress = (0, import_react14.forwardRef)(
|
|
|
3760
3882
|
}, ref) => {
|
|
3761
3883
|
const isHorizontal = direction === "horizontal";
|
|
3762
3884
|
const contentComponent = {
|
|
3763
|
-
horizontal: /* @__PURE__ */ (0,
|
|
3764
|
-
showDates && /* @__PURE__ */ (0,
|
|
3765
|
-
initialDate && /* @__PURE__ */ (0,
|
|
3766
|
-
/* @__PURE__ */ (0,
|
|
3767
|
-
/* @__PURE__ */ (0,
|
|
3885
|
+
horizontal: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
3886
|
+
showDates && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-row gap-6 items-center", children: [
|
|
3887
|
+
initialDate && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
3888
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-text-800 font-semibold", children: "In\xEDcio" }),
|
|
3889
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-text-600", children: initialDate })
|
|
3768
3890
|
] }),
|
|
3769
|
-
endDate && /* @__PURE__ */ (0,
|
|
3770
|
-
/* @__PURE__ */ (0,
|
|
3771
|
-
/* @__PURE__ */ (0,
|
|
3891
|
+
endDate && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "flex flex-row gap-1 items-center text-2xs", children: [
|
|
3892
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-text-800 font-semibold", children: "Fim" }),
|
|
3893
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-text-600", children: endDate })
|
|
3772
3894
|
] })
|
|
3773
3895
|
] }),
|
|
3774
|
-
/* @__PURE__ */ (0,
|
|
3775
|
-
/* @__PURE__ */ (0,
|
|
3896
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
3897
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3776
3898
|
ProgressBar_default,
|
|
3777
3899
|
{
|
|
3778
3900
|
size: "small",
|
|
@@ -3781,7 +3903,7 @@ var CardProgress = (0, import_react14.forwardRef)(
|
|
|
3781
3903
|
"data-testid": "progress-bar"
|
|
3782
3904
|
}
|
|
3783
3905
|
),
|
|
3784
|
-
/* @__PURE__ */ (0,
|
|
3906
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3785
3907
|
Text_default,
|
|
3786
3908
|
{
|
|
3787
3909
|
size: "xs",
|
|
@@ -3797,9 +3919,9 @@ var CardProgress = (0, import_react14.forwardRef)(
|
|
|
3797
3919
|
)
|
|
3798
3920
|
] })
|
|
3799
3921
|
] }),
|
|
3800
|
-
vertical: /* @__PURE__ */ (0,
|
|
3922
|
+
vertical: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-sm text-text-800", children: subhead })
|
|
3801
3923
|
};
|
|
3802
|
-
return /* @__PURE__ */ (0,
|
|
3924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3803
3925
|
CardBase,
|
|
3804
3926
|
{
|
|
3805
3927
|
ref,
|
|
@@ -3810,7 +3932,7 @@ var CardProgress = (0, import_react14.forwardRef)(
|
|
|
3810
3932
|
className: cn(isHorizontal ? "h-20" : "", className),
|
|
3811
3933
|
...props,
|
|
3812
3934
|
children: [
|
|
3813
|
-
/* @__PURE__ */ (0,
|
|
3935
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3814
3936
|
"div",
|
|
3815
3937
|
{
|
|
3816
3938
|
className: cn(
|
|
@@ -3823,7 +3945,7 @@ var CardProgress = (0, import_react14.forwardRef)(
|
|
|
3823
3945
|
children: icon
|
|
3824
3946
|
}
|
|
3825
3947
|
),
|
|
3826
|
-
/* @__PURE__ */ (0,
|
|
3948
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3827
3949
|
"div",
|
|
3828
3950
|
{
|
|
3829
3951
|
className: cn(
|
|
@@ -3831,7 +3953,7 @@ var CardProgress = (0, import_react14.forwardRef)(
|
|
|
3831
3953
|
!isHorizontal && "gap-4"
|
|
3832
3954
|
),
|
|
3833
3955
|
children: [
|
|
3834
|
-
/* @__PURE__ */ (0,
|
|
3956
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text_default, { size: "sm", weight: "bold", className: "text-text-950 truncate", children: header }),
|
|
3835
3957
|
contentComponent[direction]
|
|
3836
3958
|
]
|
|
3837
3959
|
}
|
|
@@ -3851,7 +3973,7 @@ var CardTopic = (0, import_react14.forwardRef)(
|
|
|
3851
3973
|
className = "",
|
|
3852
3974
|
...props
|
|
3853
3975
|
}, ref) => {
|
|
3854
|
-
return /* @__PURE__ */ (0,
|
|
3976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3855
3977
|
CardBase,
|
|
3856
3978
|
{
|
|
3857
3979
|
ref,
|
|
@@ -3862,13 +3984,13 @@ var CardTopic = (0, import_react14.forwardRef)(
|
|
|
3862
3984
|
className: cn("justify-center gap-2 py-2 px-4", className),
|
|
3863
3985
|
...props,
|
|
3864
3986
|
children: [
|
|
3865
|
-
subHead && /* @__PURE__ */ (0,
|
|
3866
|
-
/* @__PURE__ */ (0,
|
|
3867
|
-
index < subHead.length - 1 && /* @__PURE__ */ (0,
|
|
3987
|
+
subHead && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-text-600 text-2xs flex flex-row gap-1", children: subHead.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react14.Fragment, { children: [
|
|
3988
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { children: text }),
|
|
3989
|
+
index < subHead.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { children: "\u2022" })
|
|
3868
3990
|
] }, `${text} - ${index}`)) }),
|
|
3869
|
-
/* @__PURE__ */ (0,
|
|
3870
|
-
/* @__PURE__ */ (0,
|
|
3871
|
-
/* @__PURE__ */ (0,
|
|
3991
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-sm text-text-950 font-bold truncate", children: header }),
|
|
3992
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
3993
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3872
3994
|
ProgressBar_default,
|
|
3873
3995
|
{
|
|
3874
3996
|
size: "small",
|
|
@@ -3877,7 +3999,7 @@ var CardTopic = (0, import_react14.forwardRef)(
|
|
|
3877
3999
|
"data-testid": "progress-bar"
|
|
3878
4000
|
}
|
|
3879
4001
|
),
|
|
3880
|
-
showPercentage && /* @__PURE__ */ (0,
|
|
4002
|
+
showPercentage && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3881
4003
|
Text_default,
|
|
3882
4004
|
{
|
|
3883
4005
|
size: "xs",
|
|
@@ -3911,7 +4033,7 @@ var CardPerformance = (0, import_react14.forwardRef)(
|
|
|
3911
4033
|
...props
|
|
3912
4034
|
}, ref) => {
|
|
3913
4035
|
const hasProgress = progress !== void 0;
|
|
3914
|
-
return /* @__PURE__ */ (0,
|
|
4036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3915
4037
|
CardBase,
|
|
3916
4038
|
{
|
|
3917
4039
|
ref,
|
|
@@ -3925,10 +4047,10 @@ var CardPerformance = (0, import_react14.forwardRef)(
|
|
|
3925
4047
|
onClick: () => actionVariant == "caret" && onClickButton?.(valueButton),
|
|
3926
4048
|
...props,
|
|
3927
4049
|
children: [
|
|
3928
|
-
/* @__PURE__ */ (0,
|
|
3929
|
-
/* @__PURE__ */ (0,
|
|
3930
|
-
/* @__PURE__ */ (0,
|
|
3931
|
-
actionVariant === "button" && /* @__PURE__ */ (0,
|
|
4050
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "w-full flex flex-col justify-between gap-2", children: [
|
|
4051
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-row justify-between items-center gap-2", children: [
|
|
4052
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-lg font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
4053
|
+
actionVariant === "button" && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3932
4054
|
Button_default,
|
|
3933
4055
|
{
|
|
3934
4056
|
variant: "outline",
|
|
@@ -3939,17 +4061,17 @@ var CardPerformance = (0, import_react14.forwardRef)(
|
|
|
3939
4061
|
}
|
|
3940
4062
|
)
|
|
3941
4063
|
] }),
|
|
3942
|
-
/* @__PURE__ */ (0,
|
|
4064
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-full", children: hasProgress ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3943
4065
|
ProgressBar_default,
|
|
3944
4066
|
{
|
|
3945
4067
|
value: progress,
|
|
3946
4068
|
label: `${progress}% ${labelProgress}`,
|
|
3947
4069
|
variant: progressVariant
|
|
3948
4070
|
}
|
|
3949
|
-
) : /* @__PURE__ */ (0,
|
|
4071
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-xs text-text-600 truncate", children: description }) })
|
|
3950
4072
|
] }),
|
|
3951
|
-
actionVariant == "caret" && /* @__PURE__ */ (0,
|
|
3952
|
-
|
|
4073
|
+
actionVariant == "caret" && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4074
|
+
import_phosphor_react11.CaretRight,
|
|
3953
4075
|
{
|
|
3954
4076
|
className: "size-4.5 text-text-800 cursor-pointer",
|
|
3955
4077
|
"data-testid": "caret-icon"
|
|
@@ -3972,7 +4094,7 @@ var CardResults = (0, import_react14.forwardRef)(
|
|
|
3972
4094
|
...props
|
|
3973
4095
|
}, ref) => {
|
|
3974
4096
|
const isRow = direction == "row";
|
|
3975
|
-
return /* @__PURE__ */ (0,
|
|
4097
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3976
4098
|
CardBase,
|
|
3977
4099
|
{
|
|
3978
4100
|
ref,
|
|
@@ -3982,7 +4104,7 @@ var CardResults = (0, import_react14.forwardRef)(
|
|
|
3982
4104
|
className: cn("items-stretch cursor-pointer pr-4", className),
|
|
3983
4105
|
...props,
|
|
3984
4106
|
children: [
|
|
3985
|
-
/* @__PURE__ */ (0,
|
|
4107
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
3986
4108
|
"div",
|
|
3987
4109
|
{
|
|
3988
4110
|
className: cn(
|
|
@@ -3991,11 +4113,11 @@ var CardResults = (0, import_react14.forwardRef)(
|
|
|
3991
4113
|
style: {
|
|
3992
4114
|
backgroundColor: color
|
|
3993
4115
|
},
|
|
3994
|
-
children: /* @__PURE__ */ (0,
|
|
4116
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(IconRender_default, { iconName: icon, color: "currentColor", size: 20 })
|
|
3995
4117
|
}
|
|
3996
4118
|
),
|
|
3997
|
-
/* @__PURE__ */ (0,
|
|
3998
|
-
/* @__PURE__ */ (0,
|
|
4119
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "w-full flex flex-row justify-between items-center", children: [
|
|
4120
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
3999
4121
|
"div",
|
|
4000
4122
|
{
|
|
4001
4123
|
className: cn(
|
|
@@ -4003,28 +4125,28 @@ var CardResults = (0, import_react14.forwardRef)(
|
|
|
4003
4125
|
isRow ? "flex-row items-center gap-2" : "flex-col"
|
|
4004
4126
|
),
|
|
4005
4127
|
children: [
|
|
4006
|
-
/* @__PURE__ */ (0,
|
|
4007
|
-
/* @__PURE__ */ (0,
|
|
4008
|
-
/* @__PURE__ */ (0,
|
|
4128
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-sm font-bold text-text-950 flex-1", children: header }),
|
|
4129
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "flex flex-wrap flex-row gap-1 items-center", children: [
|
|
4130
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
4009
4131
|
Badge_default,
|
|
4010
4132
|
{
|
|
4011
4133
|
action: "success",
|
|
4012
4134
|
variant: "solid",
|
|
4013
4135
|
size: "large",
|
|
4014
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
4136
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_phosphor_react11.CheckCircle, {}),
|
|
4015
4137
|
children: [
|
|
4016
4138
|
correct_answers,
|
|
4017
4139
|
" Corretas"
|
|
4018
4140
|
]
|
|
4019
4141
|
}
|
|
4020
4142
|
),
|
|
4021
|
-
/* @__PURE__ */ (0,
|
|
4143
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
4022
4144
|
Badge_default,
|
|
4023
4145
|
{
|
|
4024
4146
|
action: "error",
|
|
4025
4147
|
variant: "solid",
|
|
4026
4148
|
size: "large",
|
|
4027
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
4149
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_phosphor_react11.XCircle, {}),
|
|
4028
4150
|
children: [
|
|
4029
4151
|
incorrect_answers,
|
|
4030
4152
|
" Incorretas"
|
|
@@ -4035,7 +4157,7 @@ var CardResults = (0, import_react14.forwardRef)(
|
|
|
4035
4157
|
]
|
|
4036
4158
|
}
|
|
4037
4159
|
),
|
|
4038
|
-
/* @__PURE__ */ (0,
|
|
4160
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_phosphor_react11.CaretRight, { className: "min-w-6 min-h-6 text-text-800" })
|
|
4039
4161
|
] })
|
|
4040
4162
|
]
|
|
4041
4163
|
}
|
|
@@ -4061,13 +4183,13 @@ var CardStatus = (0, import_react14.forwardRef)(
|
|
|
4061
4183
|
const getIconBadge = (status2) => {
|
|
4062
4184
|
switch (status2) {
|
|
4063
4185
|
case "correct":
|
|
4064
|
-
return /* @__PURE__ */ (0,
|
|
4186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_phosphor_react11.CheckCircle, {});
|
|
4065
4187
|
case "incorrect":
|
|
4066
|
-
return /* @__PURE__ */ (0,
|
|
4188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_phosphor_react11.XCircle, {});
|
|
4067
4189
|
case "pending":
|
|
4068
|
-
return /* @__PURE__ */ (0,
|
|
4190
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_phosphor_react11.Clock, {});
|
|
4069
4191
|
default:
|
|
4070
|
-
return /* @__PURE__ */ (0,
|
|
4192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_phosphor_react11.XCircle, {});
|
|
4071
4193
|
}
|
|
4072
4194
|
};
|
|
4073
4195
|
const getActionBadge = (status2) => {
|
|
@@ -4082,7 +4204,7 @@ var CardStatus = (0, import_react14.forwardRef)(
|
|
|
4082
4204
|
return "info";
|
|
4083
4205
|
}
|
|
4084
4206
|
};
|
|
4085
|
-
return /* @__PURE__ */ (0,
|
|
4207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4086
4208
|
CardBase,
|
|
4087
4209
|
{
|
|
4088
4210
|
ref,
|
|
@@ -4091,10 +4213,10 @@ var CardStatus = (0, import_react14.forwardRef)(
|
|
|
4091
4213
|
minHeight: "medium",
|
|
4092
4214
|
className: cn("items-center cursor-pointer", className),
|
|
4093
4215
|
...props,
|
|
4094
|
-
children: /* @__PURE__ */ (0,
|
|
4095
|
-
/* @__PURE__ */ (0,
|
|
4096
|
-
/* @__PURE__ */ (0,
|
|
4097
|
-
status && /* @__PURE__ */ (0,
|
|
4216
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex justify-between w-full h-full flex-row items-center gap-2", children: [
|
|
4217
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-sm font-bold text-text-950 truncate flex-1 min-w-0", children: header }),
|
|
4218
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "flex flex-row gap-1 items-center flex-shrink-0", children: [
|
|
4219
|
+
status && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4098
4220
|
Badge_default,
|
|
4099
4221
|
{
|
|
4100
4222
|
action: getActionBadge(status),
|
|
@@ -4104,9 +4226,9 @@ var CardStatus = (0, import_react14.forwardRef)(
|
|
|
4104
4226
|
children: getLabelBadge(status)
|
|
4105
4227
|
}
|
|
4106
4228
|
),
|
|
4107
|
-
label && /* @__PURE__ */ (0,
|
|
4229
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-sm text-text-800", children: label })
|
|
4108
4230
|
] }),
|
|
4109
|
-
/* @__PURE__ */ (0,
|
|
4231
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_phosphor_react11.CaretRight, { className: "min-w-6 min-h-6 text-text-800 cursor-pointer flex-shrink-0 ml-2" })
|
|
4110
4232
|
] })
|
|
4111
4233
|
}
|
|
4112
4234
|
);
|
|
@@ -4114,7 +4236,7 @@ var CardStatus = (0, import_react14.forwardRef)(
|
|
|
4114
4236
|
);
|
|
4115
4237
|
var CardSettings = (0, import_react14.forwardRef)(
|
|
4116
4238
|
({ header, className, icon, ...props }, ref) => {
|
|
4117
|
-
return /* @__PURE__ */ (0,
|
|
4239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
4118
4240
|
CardBase,
|
|
4119
4241
|
{
|
|
4120
4242
|
ref,
|
|
@@ -4127,9 +4249,9 @@ var CardSettings = (0, import_react14.forwardRef)(
|
|
|
4127
4249
|
),
|
|
4128
4250
|
...props,
|
|
4129
4251
|
children: [
|
|
4130
|
-
/* @__PURE__ */ (0,
|
|
4131
|
-
/* @__PURE__ */ (0,
|
|
4132
|
-
/* @__PURE__ */ (0,
|
|
4252
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "[&>svg]:size-6", children: icon }),
|
|
4253
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "w-full text-sm truncate", children: header }),
|
|
4254
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_phosphor_react11.CaretRight, { size: 24, className: "cursor-pointer" })
|
|
4133
4255
|
]
|
|
4134
4256
|
}
|
|
4135
4257
|
);
|
|
@@ -4137,7 +4259,7 @@ var CardSettings = (0, import_react14.forwardRef)(
|
|
|
4137
4259
|
);
|
|
4138
4260
|
var CardSupport = (0, import_react14.forwardRef)(
|
|
4139
4261
|
({ header, className, direction = "col", children, ...props }, ref) => {
|
|
4140
|
-
return /* @__PURE__ */ (0,
|
|
4262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
4141
4263
|
CardBase,
|
|
4142
4264
|
{
|
|
4143
4265
|
ref,
|
|
@@ -4150,7 +4272,7 @@ var CardSupport = (0, import_react14.forwardRef)(
|
|
|
4150
4272
|
),
|
|
4151
4273
|
...props,
|
|
4152
4274
|
children: [
|
|
4153
|
-
/* @__PURE__ */ (0,
|
|
4275
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
4154
4276
|
"div",
|
|
4155
4277
|
{
|
|
4156
4278
|
className: cn(
|
|
@@ -4158,12 +4280,12 @@ var CardSupport = (0, import_react14.forwardRef)(
|
|
|
4158
4280
|
direction == "col" ? "flex-col" : "flex-row items-center"
|
|
4159
4281
|
),
|
|
4160
4282
|
children: [
|
|
4161
|
-
/* @__PURE__ */ (0,
|
|
4162
|
-
/* @__PURE__ */ (0,
|
|
4283
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "w-full min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-sm text-text-950 font-bold truncate", children: header }) }),
|
|
4284
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "flex flex-row gap-1", children })
|
|
4163
4285
|
]
|
|
4164
4286
|
}
|
|
4165
4287
|
),
|
|
4166
|
-
/* @__PURE__ */ (0,
|
|
4288
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_phosphor_react11.CaretRight, { className: "text-text-800 cursor-pointer", size: 24 })
|
|
4167
4289
|
]
|
|
4168
4290
|
}
|
|
4169
4291
|
);
|
|
@@ -4183,7 +4305,7 @@ var CardForum = (0, import_react14.forwardRef)(
|
|
|
4183
4305
|
hour,
|
|
4184
4306
|
...props
|
|
4185
4307
|
}, ref) => {
|
|
4186
|
-
return /* @__PURE__ */ (0,
|
|
4308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
4187
4309
|
CardBase,
|
|
4188
4310
|
{
|
|
4189
4311
|
ref,
|
|
@@ -4194,7 +4316,7 @@ var CardForum = (0, import_react14.forwardRef)(
|
|
|
4194
4316
|
className: cn("w-auto h-auto gap-3", className),
|
|
4195
4317
|
...props,
|
|
4196
4318
|
children: [
|
|
4197
|
-
/* @__PURE__ */ (0,
|
|
4319
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4198
4320
|
"button",
|
|
4199
4321
|
{
|
|
4200
4322
|
type: "button",
|
|
@@ -4203,18 +4325,18 @@ var CardForum = (0, import_react14.forwardRef)(
|
|
|
4203
4325
|
className: "min-w-8 h-8 rounded-full bg-background-950"
|
|
4204
4326
|
}
|
|
4205
4327
|
),
|
|
4206
|
-
/* @__PURE__ */ (0,
|
|
4207
|
-
/* @__PURE__ */ (0,
|
|
4208
|
-
/* @__PURE__ */ (0,
|
|
4209
|
-
/* @__PURE__ */ (0,
|
|
4328
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-col gap-2 flex-1 min-w-0", children: [
|
|
4329
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-row gap-1 items-center flex-wrap", children: [
|
|
4330
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-xs font-semibold text-primary-700 truncate", children: title }),
|
|
4331
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("p", { className: "text-xs text-text-600", children: [
|
|
4210
4332
|
"\u2022 ",
|
|
4211
4333
|
date,
|
|
4212
4334
|
" \u2022 ",
|
|
4213
4335
|
hour
|
|
4214
4336
|
] })
|
|
4215
4337
|
] }),
|
|
4216
|
-
/* @__PURE__ */ (0,
|
|
4217
|
-
/* @__PURE__ */ (0,
|
|
4338
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-text-950 text-sm line-clamp-2 truncate", children: content }),
|
|
4339
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
4218
4340
|
"button",
|
|
4219
4341
|
{
|
|
4220
4342
|
type: "button",
|
|
@@ -4222,8 +4344,8 @@ var CardForum = (0, import_react14.forwardRef)(
|
|
|
4222
4344
|
onClick: () => onClickComments?.(valueComments),
|
|
4223
4345
|
className: "text-text-600 flex flex-row gap-2 items-center",
|
|
4224
4346
|
children: [
|
|
4225
|
-
/* @__PURE__ */ (0,
|
|
4226
|
-
/* @__PURE__ */ (0,
|
|
4347
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_phosphor_react11.ChatCircleText, { "aria-hidden": "true", size: 16 }),
|
|
4348
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("p", { className: "text-xs", children: [
|
|
4227
4349
|
comments,
|
|
4228
4350
|
" respostas"
|
|
4229
4351
|
] })
|
|
@@ -4326,12 +4448,12 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
4326
4448
|
};
|
|
4327
4449
|
const getVolumeIcon = () => {
|
|
4328
4450
|
if (volume === 0) {
|
|
4329
|
-
return /* @__PURE__ */ (0,
|
|
4451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_phosphor_react11.SpeakerSimpleX, { size: 24 });
|
|
4330
4452
|
}
|
|
4331
4453
|
if (volume < 0.5) {
|
|
4332
|
-
return /* @__PURE__ */ (0,
|
|
4454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_phosphor_react11.SpeakerLow, { size: 24 });
|
|
4333
4455
|
}
|
|
4334
|
-
return /* @__PURE__ */ (0,
|
|
4456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_phosphor_react11.SpeakerHigh, { size: 24 });
|
|
4335
4457
|
};
|
|
4336
4458
|
(0, import_react14.useEffect)(() => {
|
|
4337
4459
|
const handleClickOutside = (event) => {
|
|
@@ -4347,7 +4469,7 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
4347
4469
|
document.removeEventListener("mousedown", handleClickOutside);
|
|
4348
4470
|
};
|
|
4349
4471
|
}, []);
|
|
4350
|
-
return /* @__PURE__ */ (0,
|
|
4472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
4351
4473
|
CardBase,
|
|
4352
4474
|
{
|
|
4353
4475
|
ref,
|
|
@@ -4360,7 +4482,7 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
4360
4482
|
),
|
|
4361
4483
|
...props,
|
|
4362
4484
|
children: [
|
|
4363
|
-
/* @__PURE__ */ (0,
|
|
4485
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4364
4486
|
"audio",
|
|
4365
4487
|
{
|
|
4366
4488
|
ref: audioRef,
|
|
@@ -4372,7 +4494,7 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
4372
4494
|
onEnded: handleEnded,
|
|
4373
4495
|
"data-testid": "audio-element",
|
|
4374
4496
|
"aria-label": title,
|
|
4375
|
-
children: tracks ? tracks.map((track) => /* @__PURE__ */ (0,
|
|
4497
|
+
children: tracks ? tracks.map((track) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4376
4498
|
"track",
|
|
4377
4499
|
{
|
|
4378
4500
|
kind: track.kind,
|
|
@@ -4382,7 +4504,7 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
4382
4504
|
default: track.default
|
|
4383
4505
|
},
|
|
4384
4506
|
track.src
|
|
4385
|
-
)) : /* @__PURE__ */ (0,
|
|
4507
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4386
4508
|
"track",
|
|
4387
4509
|
{
|
|
4388
4510
|
kind: "captions",
|
|
@@ -4393,7 +4515,7 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
4393
4515
|
)
|
|
4394
4516
|
}
|
|
4395
4517
|
),
|
|
4396
|
-
/* @__PURE__ */ (0,
|
|
4518
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4397
4519
|
"button",
|
|
4398
4520
|
{
|
|
4399
4521
|
type: "button",
|
|
@@ -4401,14 +4523,14 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
4401
4523
|
disabled: !src,
|
|
4402
4524
|
className: "cursor-pointer text-text-950 hover:text-primary-600 disabled:text-text-400 disabled:cursor-not-allowed",
|
|
4403
4525
|
"aria-label": isPlaying ? "Pausar" : "Reproduzir",
|
|
4404
|
-
children: isPlaying ? /* @__PURE__ */ (0,
|
|
4405
|
-
/* @__PURE__ */ (0,
|
|
4406
|
-
/* @__PURE__ */ (0,
|
|
4407
|
-
] }) }) : /* @__PURE__ */ (0,
|
|
4526
|
+
children: isPlaying ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-6 h-6 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex gap-0.5", children: [
|
|
4527
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-1 h-4 bg-current rounded-sm" }),
|
|
4528
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-1 h-4 bg-current rounded-sm" })
|
|
4529
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_phosphor_react11.Play, { size: 24 })
|
|
4408
4530
|
}
|
|
4409
4531
|
),
|
|
4410
|
-
/* @__PURE__ */ (0,
|
|
4411
|
-
/* @__PURE__ */ (0,
|
|
4532
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime(currentTime) }),
|
|
4533
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex-1 relative", "data-testid": "progress-bar", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4412
4534
|
"button",
|
|
4413
4535
|
{
|
|
4414
4536
|
type: "button",
|
|
@@ -4423,7 +4545,7 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
4423
4545
|
}
|
|
4424
4546
|
},
|
|
4425
4547
|
"aria-label": "Barra de progresso do \xE1udio",
|
|
4426
|
-
children: /* @__PURE__ */ (0,
|
|
4548
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4427
4549
|
"div",
|
|
4428
4550
|
{
|
|
4429
4551
|
className: "h-full bg-primary-600 rounded-full transition-all duration-100",
|
|
@@ -4434,19 +4556,19 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
4434
4556
|
)
|
|
4435
4557
|
}
|
|
4436
4558
|
) }),
|
|
4437
|
-
/* @__PURE__ */ (0,
|
|
4438
|
-
/* @__PURE__ */ (0,
|
|
4439
|
-
/* @__PURE__ */ (0,
|
|
4559
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { className: "text-text-800 text-md font-medium min-w-[2.5rem]", children: formatTime(duration) }),
|
|
4560
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "relative h-6", ref: volumeControlRef, children: [
|
|
4561
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4440
4562
|
"button",
|
|
4441
4563
|
{
|
|
4442
4564
|
type: "button",
|
|
4443
4565
|
onClick: toggleVolumeControl,
|
|
4444
4566
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
4445
4567
|
"aria-label": "Controle de volume",
|
|
4446
|
-
children: /* @__PURE__ */ (0,
|
|
4568
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-6 h-6 flex items-center justify-center", children: getVolumeIcon() })
|
|
4447
4569
|
}
|
|
4448
4570
|
),
|
|
4449
|
-
showVolumeControl && /* @__PURE__ */ (0,
|
|
4571
|
+
showVolumeControl && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4450
4572
|
"button",
|
|
4451
4573
|
{
|
|
4452
4574
|
type: "button",
|
|
@@ -4456,7 +4578,7 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
4456
4578
|
setShowVolumeControl(false);
|
|
4457
4579
|
}
|
|
4458
4580
|
},
|
|
4459
|
-
children: /* @__PURE__ */ (0,
|
|
4581
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4460
4582
|
"input",
|
|
4461
4583
|
{
|
|
4462
4584
|
type: "range",
|
|
@@ -4497,22 +4619,22 @@ var CardAudio = (0, import_react14.forwardRef)(
|
|
|
4497
4619
|
}
|
|
4498
4620
|
)
|
|
4499
4621
|
] }),
|
|
4500
|
-
/* @__PURE__ */ (0,
|
|
4501
|
-
/* @__PURE__ */ (0,
|
|
4622
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "relative h-6", ref: speedMenuRef, children: [
|
|
4623
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4502
4624
|
"button",
|
|
4503
4625
|
{
|
|
4504
4626
|
type: "button",
|
|
4505
4627
|
onClick: toggleSpeedMenu,
|
|
4506
4628
|
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
4507
4629
|
"aria-label": "Op\xE7\xF5es de velocidade",
|
|
4508
|
-
children: /* @__PURE__ */ (0,
|
|
4630
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_phosphor_react11.DotsThreeVertical, { size: 24 })
|
|
4509
4631
|
}
|
|
4510
4632
|
),
|
|
4511
|
-
showSpeedMenu && /* @__PURE__ */ (0,
|
|
4633
|
+
showSpeedMenu && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("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__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex flex-col gap-1", children: [
|
|
4512
4634
|
{ speed: 1, label: "1x" },
|
|
4513
4635
|
{ speed: 1.5, label: "1.5x" },
|
|
4514
4636
|
{ speed: 2, label: "2x" }
|
|
4515
|
-
].map(({ speed, label }) => /* @__PURE__ */ (0,
|
|
4637
|
+
].map(({ speed, label }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4516
4638
|
"button",
|
|
4517
4639
|
{
|
|
4518
4640
|
type: "button",
|
|
@@ -4540,7 +4662,7 @@ var SIMULADO_BACKGROUND_CLASSES = {
|
|
|
4540
4662
|
var CardSimulado = (0, import_react14.forwardRef)(
|
|
4541
4663
|
({ title, duration, info, backgroundColor, className, ...props }, ref) => {
|
|
4542
4664
|
const backgroundClass = SIMULADO_BACKGROUND_CLASSES[backgroundColor];
|
|
4543
|
-
return /* @__PURE__ */ (0,
|
|
4665
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4544
4666
|
CardBase,
|
|
4545
4667
|
{
|
|
4546
4668
|
ref,
|
|
@@ -4553,19 +4675,19 @@ var CardSimulado = (0, import_react14.forwardRef)(
|
|
|
4553
4675
|
className
|
|
4554
4676
|
),
|
|
4555
4677
|
...props,
|
|
4556
|
-
children: /* @__PURE__ */ (0,
|
|
4557
|
-
/* @__PURE__ */ (0,
|
|
4558
|
-
/* @__PURE__ */ (0,
|
|
4559
|
-
/* @__PURE__ */ (0,
|
|
4560
|
-
duration && /* @__PURE__ */ (0,
|
|
4561
|
-
/* @__PURE__ */ (0,
|
|
4562
|
-
/* @__PURE__ */ (0,
|
|
4678
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex justify-between items-center w-full gap-4", children: [
|
|
4679
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-col gap-1 flex-1 min-w-0", children: [
|
|
4680
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text_default, { size: "lg", weight: "bold", className: "text-text-950 truncate", children: title }),
|
|
4681
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-4 text-text-700", children: [
|
|
4682
|
+
duration && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
4683
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_phosphor_react11.Clock, { size: 16, className: "flex-shrink-0" }),
|
|
4684
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text_default, { size: "sm", children: duration })
|
|
4563
4685
|
] }),
|
|
4564
|
-
/* @__PURE__ */ (0,
|
|
4686
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text_default, { size: "sm", className: "truncate", children: info })
|
|
4565
4687
|
] })
|
|
4566
4688
|
] }),
|
|
4567
|
-
/* @__PURE__ */ (0,
|
|
4568
|
-
|
|
4689
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4690
|
+
import_phosphor_react11.CaretRight,
|
|
4569
4691
|
{
|
|
4570
4692
|
size: 24,
|
|
4571
4693
|
className: "text-text-800 flex-shrink-0",
|
|
@@ -4609,7 +4731,7 @@ var CardTest = (0, import_react14.forwardRef)(
|
|
|
4609
4731
|
const interactiveClasses = isSelectable ? "cursor-pointer focus:outline-none focus:ring-2 focus:ring-primary-950 focus:ring-offset-2" : "";
|
|
4610
4732
|
const selectedClasses = selected ? "ring-2 ring-primary-950 ring-offset-2" : "";
|
|
4611
4733
|
if (isSelectable) {
|
|
4612
|
-
return /* @__PURE__ */ (0,
|
|
4734
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4613
4735
|
"button",
|
|
4614
4736
|
{
|
|
4615
4737
|
ref,
|
|
@@ -4621,8 +4743,8 @@ var CardTest = (0, import_react14.forwardRef)(
|
|
|
4621
4743
|
onKeyDown: handleKeyDown,
|
|
4622
4744
|
"aria-pressed": selected,
|
|
4623
4745
|
...props,
|
|
4624
|
-
children: /* @__PURE__ */ (0,
|
|
4625
|
-
/* @__PURE__ */ (0,
|
|
4746
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
4747
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4626
4748
|
Text_default,
|
|
4627
4749
|
{
|
|
4628
4750
|
size: "md",
|
|
@@ -4631,10 +4753,10 @@ var CardTest = (0, import_react14.forwardRef)(
|
|
|
4631
4753
|
children: title
|
|
4632
4754
|
}
|
|
4633
4755
|
),
|
|
4634
|
-
/* @__PURE__ */ (0,
|
|
4635
|
-
duration && /* @__PURE__ */ (0,
|
|
4636
|
-
/* @__PURE__ */ (0,
|
|
4637
|
-
/* @__PURE__ */ (0,
|
|
4756
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
4757
|
+
duration && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
4758
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_phosphor_react11.Clock, { size: 16, className: "text-text-700" }),
|
|
4759
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4638
4760
|
Text_default,
|
|
4639
4761
|
{
|
|
4640
4762
|
size: "sm",
|
|
@@ -4643,7 +4765,7 @@ var CardTest = (0, import_react14.forwardRef)(
|
|
|
4643
4765
|
}
|
|
4644
4766
|
)
|
|
4645
4767
|
] }),
|
|
4646
|
-
/* @__PURE__ */ (0,
|
|
4768
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4647
4769
|
Text_default,
|
|
4648
4770
|
{
|
|
4649
4771
|
size: "sm",
|
|
@@ -4656,14 +4778,14 @@ var CardTest = (0, import_react14.forwardRef)(
|
|
|
4656
4778
|
}
|
|
4657
4779
|
);
|
|
4658
4780
|
}
|
|
4659
|
-
return /* @__PURE__ */ (0,
|
|
4781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4660
4782
|
"div",
|
|
4661
4783
|
{
|
|
4662
4784
|
ref,
|
|
4663
4785
|
className: cn(`${baseClasses} ${className}`.trim()),
|
|
4664
4786
|
...props,
|
|
4665
|
-
children: /* @__PURE__ */ (0,
|
|
4666
|
-
/* @__PURE__ */ (0,
|
|
4787
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-col justify-between gap-[27px] flex-grow min-h-[67px] w-full min-w-0", children: [
|
|
4788
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4667
4789
|
Text_default,
|
|
4668
4790
|
{
|
|
4669
4791
|
size: "md",
|
|
@@ -4672,10 +4794,10 @@ var CardTest = (0, import_react14.forwardRef)(
|
|
|
4672
4794
|
children: title
|
|
4673
4795
|
}
|
|
4674
4796
|
),
|
|
4675
|
-
/* @__PURE__ */ (0,
|
|
4676
|
-
duration && /* @__PURE__ */ (0,
|
|
4677
|
-
/* @__PURE__ */ (0,
|
|
4678
|
-
/* @__PURE__ */ (0,
|
|
4797
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-row justify-start items-end gap-4 w-full", children: [
|
|
4798
|
+
duration && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-row items-center gap-1 flex-shrink-0", children: [
|
|
4799
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_phosphor_react11.Clock, { size: 16, className: "text-text-700" }),
|
|
4800
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4679
4801
|
Text_default,
|
|
4680
4802
|
{
|
|
4681
4803
|
size: "sm",
|
|
@@ -4684,7 +4806,7 @@ var CardTest = (0, import_react14.forwardRef)(
|
|
|
4684
4806
|
}
|
|
4685
4807
|
)
|
|
4686
4808
|
] }),
|
|
4687
|
-
/* @__PURE__ */ (0,
|
|
4809
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4688
4810
|
Text_default,
|
|
4689
4811
|
{
|
|
4690
4812
|
size: "sm",
|
|
@@ -4721,14 +4843,14 @@ var SIMULATION_TYPE_STYLES = {
|
|
|
4721
4843
|
}
|
|
4722
4844
|
};
|
|
4723
4845
|
var CardSimulationHistory = (0, import_react14.forwardRef)(({ data, onSimulationClick, className, ...props }, ref) => {
|
|
4724
|
-
return /* @__PURE__ */ (0,
|
|
4846
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4725
4847
|
"div",
|
|
4726
4848
|
{
|
|
4727
4849
|
ref,
|
|
4728
4850
|
className: cn("w-full max-w-[992px] h-auto", className),
|
|
4729
4851
|
...props,
|
|
4730
|
-
children: /* @__PURE__ */ (0,
|
|
4731
|
-
data.map((section, sectionIndex) => /* @__PURE__ */ (0,
|
|
4852
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-col gap-0", children: [
|
|
4853
|
+
data.map((section, sectionIndex) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
4732
4854
|
"div",
|
|
4733
4855
|
{
|
|
4734
4856
|
className: cn(
|
|
@@ -4736,7 +4858,7 @@ var CardSimulationHistory = (0, import_react14.forwardRef)(({ data, onSimulation
|
|
|
4736
4858
|
sectionIndex === 0 ? "rounded-t-3xl" : ""
|
|
4737
4859
|
),
|
|
4738
4860
|
children: [
|
|
4739
|
-
/* @__PURE__ */ (0,
|
|
4861
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4740
4862
|
Text_default,
|
|
4741
4863
|
{
|
|
4742
4864
|
size: "xs",
|
|
@@ -4745,9 +4867,9 @@ var CardSimulationHistory = (0, import_react14.forwardRef)(({ data, onSimulation
|
|
|
4745
4867
|
children: section.date
|
|
4746
4868
|
}
|
|
4747
4869
|
),
|
|
4748
|
-
/* @__PURE__ */ (0,
|
|
4870
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex flex-col gap-2 flex-1", children: section.simulations.map((simulation) => {
|
|
4749
4871
|
const typeStyles = SIMULATION_TYPE_STYLES[simulation.type];
|
|
4750
|
-
return /* @__PURE__ */ (0,
|
|
4872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4751
4873
|
CardBase,
|
|
4752
4874
|
{
|
|
4753
4875
|
layout: "horizontal",
|
|
@@ -4759,9 +4881,9 @@ var CardSimulationHistory = (0, import_react14.forwardRef)(({ data, onSimulation
|
|
|
4759
4881
|
transition-shadow duration-200 h-auto min-h-[61px]`
|
|
4760
4882
|
),
|
|
4761
4883
|
onClick: () => onSimulationClick?.(simulation),
|
|
4762
|
-
children: /* @__PURE__ */ (0,
|
|
4763
|
-
/* @__PURE__ */ (0,
|
|
4764
|
-
/* @__PURE__ */ (0,
|
|
4884
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex justify-between items-center w-full gap-2", children: [
|
|
4885
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex flex-wrap flex-col justify-between sm:flex-row gap-2 flex-1 min-w-0", children: [
|
|
4886
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4765
4887
|
Text_default,
|
|
4766
4888
|
{
|
|
4767
4889
|
size: "lg",
|
|
@@ -4770,8 +4892,8 @@ var CardSimulationHistory = (0, import_react14.forwardRef)(({ data, onSimulation
|
|
|
4770
4892
|
children: simulation.title
|
|
4771
4893
|
}
|
|
4772
4894
|
),
|
|
4773
|
-
/* @__PURE__ */ (0,
|
|
4774
|
-
/* @__PURE__ */ (0,
|
|
4895
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
4896
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4775
4897
|
Badge_default,
|
|
4776
4898
|
{
|
|
4777
4899
|
variant: "examsOutlined",
|
|
@@ -4780,11 +4902,11 @@ var CardSimulationHistory = (0, import_react14.forwardRef)(({ data, onSimulation
|
|
|
4780
4902
|
children: typeStyles.text
|
|
4781
4903
|
}
|
|
4782
4904
|
),
|
|
4783
|
-
/* @__PURE__ */ (0,
|
|
4905
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Text_default, { size: "sm", className: "text-text-800 truncate", children: simulation.info })
|
|
4784
4906
|
] })
|
|
4785
4907
|
] }),
|
|
4786
|
-
/* @__PURE__ */ (0,
|
|
4787
|
-
|
|
4908
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
4909
|
+
import_phosphor_react11.CaretRight,
|
|
4788
4910
|
{
|
|
4789
4911
|
size: 24,
|
|
4790
4912
|
className: "text-text-800 flex-shrink-0",
|
|
@@ -4799,15 +4921,15 @@ var CardSimulationHistory = (0, import_react14.forwardRef)(({ data, onSimulation
|
|
|
4799
4921
|
]
|
|
4800
4922
|
}
|
|
4801
4923
|
) }, section.date)),
|
|
4802
|
-
data.length > 0 && /* @__PURE__ */ (0,
|
|
4924
|
+
data.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "w-full h-6 bg-background rounded-b-3xl" })
|
|
4803
4925
|
] })
|
|
4804
4926
|
}
|
|
4805
4927
|
);
|
|
4806
4928
|
});
|
|
4807
4929
|
|
|
4808
4930
|
// src/components/Accordation/Accordation.tsx
|
|
4809
|
-
var
|
|
4810
|
-
var
|
|
4931
|
+
var import_phosphor_react12 = require("phosphor-react");
|
|
4932
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
4811
4933
|
var CardAccordation = (0, import_react15.forwardRef)(
|
|
4812
4934
|
({
|
|
4813
4935
|
trigger,
|
|
@@ -4848,7 +4970,7 @@ var CardAccordation = (0, import_react15.forwardRef)(
|
|
|
4848
4970
|
handleToggle();
|
|
4849
4971
|
}
|
|
4850
4972
|
};
|
|
4851
|
-
return /* @__PURE__ */ (0,
|
|
4973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4852
4974
|
CardBase,
|
|
4853
4975
|
{
|
|
4854
4976
|
ref,
|
|
@@ -4858,7 +4980,7 @@ var CardAccordation = (0, import_react15.forwardRef)(
|
|
|
4858
4980
|
className: cn("overflow-hidden", className),
|
|
4859
4981
|
...props,
|
|
4860
4982
|
children: [
|
|
4861
|
-
/* @__PURE__ */ (0,
|
|
4983
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4862
4984
|
"button",
|
|
4863
4985
|
{
|
|
4864
4986
|
id: headerId,
|
|
@@ -4877,8 +4999,8 @@ var CardAccordation = (0, import_react15.forwardRef)(
|
|
|
4877
4999
|
"data-value": value,
|
|
4878
5000
|
children: [
|
|
4879
5001
|
trigger,
|
|
4880
|
-
/* @__PURE__ */ (0,
|
|
4881
|
-
|
|
5002
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
5003
|
+
import_phosphor_react12.CaretRight,
|
|
4882
5004
|
{
|
|
4883
5005
|
size: 20,
|
|
4884
5006
|
className: cn(
|
|
@@ -4892,7 +5014,7 @@ var CardAccordation = (0, import_react15.forwardRef)(
|
|
|
4892
5014
|
]
|
|
4893
5015
|
}
|
|
4894
5016
|
),
|
|
4895
|
-
/* @__PURE__ */ (0,
|
|
5017
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4896
5018
|
"section",
|
|
4897
5019
|
{
|
|
4898
5020
|
id: contentId,
|
|
@@ -4904,7 +5026,7 @@ var CardAccordation = (0, import_react15.forwardRef)(
|
|
|
4904
5026
|
),
|
|
4905
5027
|
"data-testid": "accordion-content",
|
|
4906
5028
|
"data-value": value,
|
|
4907
|
-
children: /* @__PURE__ */ (0,
|
|
5029
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: cn("p-4 pt-0", contentClassName), children })
|
|
4908
5030
|
}
|
|
4909
5031
|
)
|
|
4910
5032
|
]
|
|
@@ -4916,10 +5038,10 @@ CardAccordation.displayName = "CardAccordation";
|
|
|
4916
5038
|
|
|
4917
5039
|
// src/components/Accordation/AccordionGroup.tsx
|
|
4918
5040
|
var import_react16 = require("react");
|
|
4919
|
-
var
|
|
4920
|
-
var
|
|
5041
|
+
var import_zustand5 = require("zustand");
|
|
5042
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
4921
5043
|
function createAccordionGroupStore(type, initialValue, collapsible) {
|
|
4922
|
-
return (0,
|
|
5044
|
+
return (0, import_zustand5.create)((set, get) => ({
|
|
4923
5045
|
type,
|
|
4924
5046
|
value: initialValue,
|
|
4925
5047
|
collapsible,
|
|
@@ -5057,17 +5179,140 @@ var AccordionGroup = (0, import_react16.forwardRef)(
|
|
|
5057
5179
|
indexRef,
|
|
5058
5180
|
handleItemToggle
|
|
5059
5181
|
);
|
|
5060
|
-
return /* @__PURE__ */ (0,
|
|
5182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { ref, className, ...props, children: enhancedChildren });
|
|
5061
5183
|
}
|
|
5062
5184
|
);
|
|
5063
5185
|
AccordionGroup.displayName = "AccordionGroup";
|
|
5064
5186
|
|
|
5187
|
+
// src/components/AlertDialog/AlertDialog.tsx
|
|
5188
|
+
var import_react17 = require("react");
|
|
5189
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
5190
|
+
var SIZE_CLASSES6 = {
|
|
5191
|
+
"extra-small": "w-screen max-w-[324px]",
|
|
5192
|
+
small: "w-screen max-w-[378px]",
|
|
5193
|
+
medium: "w-screen max-w-[459px]",
|
|
5194
|
+
large: "w-screen max-w-[578px]",
|
|
5195
|
+
"extra-large": "w-screen max-w-[912px]"
|
|
5196
|
+
};
|
|
5197
|
+
var AlertDialog = (0, import_react17.forwardRef)(
|
|
5198
|
+
({
|
|
5199
|
+
description,
|
|
5200
|
+
cancelButtonLabel = "Cancelar",
|
|
5201
|
+
submitButtonLabel = "Deletar",
|
|
5202
|
+
title,
|
|
5203
|
+
isOpen,
|
|
5204
|
+
closeOnBackdropClick = true,
|
|
5205
|
+
closeOnEscape = true,
|
|
5206
|
+
className = "",
|
|
5207
|
+
onSubmit,
|
|
5208
|
+
onChangeOpen,
|
|
5209
|
+
submitValue,
|
|
5210
|
+
onCancel,
|
|
5211
|
+
cancelValue,
|
|
5212
|
+
size = "medium",
|
|
5213
|
+
...props
|
|
5214
|
+
}, ref) => {
|
|
5215
|
+
(0, import_react17.useEffect)(() => {
|
|
5216
|
+
if (!isOpen || !closeOnEscape) return;
|
|
5217
|
+
const handleEscape = (event) => {
|
|
5218
|
+
if (event.key === "Escape") {
|
|
5219
|
+
onChangeOpen(false);
|
|
5220
|
+
}
|
|
5221
|
+
};
|
|
5222
|
+
document.addEventListener("keydown", handleEscape);
|
|
5223
|
+
return () => document.removeEventListener("keydown", handleEscape);
|
|
5224
|
+
}, [isOpen, closeOnEscape]);
|
|
5225
|
+
(0, import_react17.useEffect)(() => {
|
|
5226
|
+
if (isOpen) {
|
|
5227
|
+
document.body.style.overflow = "hidden";
|
|
5228
|
+
} else {
|
|
5229
|
+
document.body.style.overflow = "unset";
|
|
5230
|
+
}
|
|
5231
|
+
return () => {
|
|
5232
|
+
document.body.style.overflow = "unset";
|
|
5233
|
+
};
|
|
5234
|
+
}, [isOpen]);
|
|
5235
|
+
const handleBackdropClick = (event) => {
|
|
5236
|
+
if (event.target === event.currentTarget && closeOnBackdropClick) {
|
|
5237
|
+
onChangeOpen(false);
|
|
5238
|
+
}
|
|
5239
|
+
};
|
|
5240
|
+
const handleBackdropKeyDown = (event) => {
|
|
5241
|
+
if (event.key === "Escape" && closeOnEscape) {
|
|
5242
|
+
onChangeOpen(false);
|
|
5243
|
+
}
|
|
5244
|
+
};
|
|
5245
|
+
const handleSubmit = () => {
|
|
5246
|
+
onChangeOpen(false);
|
|
5247
|
+
onSubmit?.(submitValue);
|
|
5248
|
+
};
|
|
5249
|
+
const handleCancel = () => {
|
|
5250
|
+
onChangeOpen(false);
|
|
5251
|
+
onCancel?.(cancelValue);
|
|
5252
|
+
};
|
|
5253
|
+
const sizeClasses = SIZE_CLASSES6[size];
|
|
5254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_jsx_runtime28.Fragment, { children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5255
|
+
"div",
|
|
5256
|
+
{
|
|
5257
|
+
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",
|
|
5258
|
+
onClick: handleBackdropClick,
|
|
5259
|
+
onKeyDown: handleBackdropKeyDown,
|
|
5260
|
+
"data-testid": "alert-dialog-overlay",
|
|
5261
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
5262
|
+
"div",
|
|
5263
|
+
{
|
|
5264
|
+
ref,
|
|
5265
|
+
className: cn(
|
|
5266
|
+
"bg-background border border-border-100 rounded-lg shadow-lg p-6 m-3",
|
|
5267
|
+
sizeClasses,
|
|
5268
|
+
className
|
|
5269
|
+
),
|
|
5270
|
+
...props,
|
|
5271
|
+
children: [
|
|
5272
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5273
|
+
"h2",
|
|
5274
|
+
{
|
|
5275
|
+
id: "alert-dialog-title",
|
|
5276
|
+
className: "pb-3 text-xl font-semibold text-text-950",
|
|
5277
|
+
children: title
|
|
5278
|
+
}
|
|
5279
|
+
),
|
|
5280
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5281
|
+
"p",
|
|
5282
|
+
{
|
|
5283
|
+
id: "alert-dialog-description",
|
|
5284
|
+
className: "text-text-700 text-sm",
|
|
5285
|
+
children: description
|
|
5286
|
+
}
|
|
5287
|
+
),
|
|
5288
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-row items-center justify-end pt-4 gap-3", children: [
|
|
5289
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Button_default, { variant: "outline", size: "small", onClick: handleCancel, children: cancelButtonLabel }),
|
|
5290
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5291
|
+
Button_default,
|
|
5292
|
+
{
|
|
5293
|
+
variant: "solid",
|
|
5294
|
+
size: "small",
|
|
5295
|
+
action: "negative",
|
|
5296
|
+
onClick: handleSubmit,
|
|
5297
|
+
children: submitButtonLabel
|
|
5298
|
+
}
|
|
5299
|
+
)
|
|
5300
|
+
] })
|
|
5301
|
+
]
|
|
5302
|
+
}
|
|
5303
|
+
)
|
|
5304
|
+
}
|
|
5305
|
+
) });
|
|
5306
|
+
}
|
|
5307
|
+
);
|
|
5308
|
+
AlertDialog.displayName = "AlertDialog";
|
|
5309
|
+
|
|
5065
5310
|
// src/assets/icons/subjects/BookOpenText.tsx
|
|
5066
|
-
var
|
|
5311
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
5067
5312
|
var BookOpenText = ({
|
|
5068
5313
|
size,
|
|
5069
5314
|
color
|
|
5070
|
-
}) => /* @__PURE__ */ (0,
|
|
5315
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5071
5316
|
"svg",
|
|
5072
5317
|
{
|
|
5073
5318
|
width: size,
|
|
@@ -5075,7 +5320,7 @@ var BookOpenText = ({
|
|
|
5075
5320
|
viewBox: "0 0 32 32",
|
|
5076
5321
|
fill: "none",
|
|
5077
5322
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5078
|
-
children: /* @__PURE__ */ (0,
|
|
5323
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5079
5324
|
"path",
|
|
5080
5325
|
{
|
|
5081
5326
|
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",
|
|
@@ -5086,11 +5331,11 @@ var BookOpenText = ({
|
|
|
5086
5331
|
);
|
|
5087
5332
|
|
|
5088
5333
|
// src/assets/icons/subjects/HeadCircuit.tsx
|
|
5089
|
-
var
|
|
5334
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
5090
5335
|
var HeadCircuit = ({
|
|
5091
5336
|
size,
|
|
5092
5337
|
color
|
|
5093
|
-
}) => /* @__PURE__ */ (0,
|
|
5338
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5094
5339
|
"svg",
|
|
5095
5340
|
{
|
|
5096
5341
|
width: size,
|
|
@@ -5098,7 +5343,7 @@ var HeadCircuit = ({
|
|
|
5098
5343
|
viewBox: "0 0 32 32",
|
|
5099
5344
|
fill: "none",
|
|
5100
5345
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5101
|
-
children: /* @__PURE__ */ (0,
|
|
5346
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5102
5347
|
"path",
|
|
5103
5348
|
{
|
|
5104
5349
|
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",
|
|
@@ -5109,11 +5354,11 @@ var HeadCircuit = ({
|
|
|
5109
5354
|
);
|
|
5110
5355
|
|
|
5111
5356
|
// src/assets/icons/subjects/Microscope.tsx
|
|
5112
|
-
var
|
|
5357
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
5113
5358
|
var Microscope = ({
|
|
5114
5359
|
size,
|
|
5115
5360
|
color
|
|
5116
|
-
}) => /* @__PURE__ */ (0,
|
|
5361
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5117
5362
|
"svg",
|
|
5118
5363
|
{
|
|
5119
5364
|
width: size,
|
|
@@ -5121,7 +5366,7 @@ var Microscope = ({
|
|
|
5121
5366
|
viewBox: "0 0 32 32",
|
|
5122
5367
|
fill: "none",
|
|
5123
5368
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5124
|
-
children: /* @__PURE__ */ (0,
|
|
5369
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5125
5370
|
"path",
|
|
5126
5371
|
{
|
|
5127
5372
|
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",
|
|
@@ -5132,93 +5377,93 @@ var Microscope = ({
|
|
|
5132
5377
|
);
|
|
5133
5378
|
|
|
5134
5379
|
// src/components/SubjectInfo/SubjectInfo.tsx
|
|
5135
|
-
var
|
|
5136
|
-
var
|
|
5380
|
+
var import_phosphor_react13 = require("phosphor-react");
|
|
5381
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
5137
5382
|
var SubjectInfo = {
|
|
5138
5383
|
["F\xEDsica" /* FISICA */]: {
|
|
5139
|
-
icon: /* @__PURE__ */ (0,
|
|
5384
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_phosphor_react13.Atom, { size: 17, color: "currentColor" }),
|
|
5140
5385
|
colorClass: "bg-subject-1",
|
|
5141
5386
|
name: "F\xEDsica" /* FISICA */
|
|
5142
5387
|
},
|
|
5143
5388
|
["Hist\xF3ria" /* HISTORIA */]: {
|
|
5144
|
-
icon: /* @__PURE__ */ (0,
|
|
5389
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_phosphor_react13.Scroll, { size: 17, color: "currentColor" }),
|
|
5145
5390
|
colorClass: "bg-subject-2",
|
|
5146
5391
|
name: "Hist\xF3ria" /* HISTORIA */
|
|
5147
5392
|
},
|
|
5148
5393
|
["Literatura" /* LITERATURA */]: {
|
|
5149
|
-
icon: /* @__PURE__ */ (0,
|
|
5394
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(BookOpenText, { size: 17, color: "currentColor" }),
|
|
5150
5395
|
colorClass: "bg-subject-3",
|
|
5151
5396
|
name: "Literatura" /* LITERATURA */
|
|
5152
5397
|
},
|
|
5153
5398
|
["Geografia" /* GEOGRAFIA */]: {
|
|
5154
|
-
icon: /* @__PURE__ */ (0,
|
|
5399
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_phosphor_react13.GlobeHemisphereWest, { size: 17, color: "currentColor" }),
|
|
5155
5400
|
colorClass: "bg-subject-4",
|
|
5156
5401
|
name: "Geografia" /* GEOGRAFIA */
|
|
5157
5402
|
},
|
|
5158
5403
|
["Biologia" /* BIOLOGIA */]: {
|
|
5159
|
-
icon: /* @__PURE__ */ (0,
|
|
5404
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Microscope, { size: 17, color: "currentColor" }),
|
|
5160
5405
|
colorClass: "bg-subject-5",
|
|
5161
5406
|
name: "Biologia" /* BIOLOGIA */
|
|
5162
5407
|
},
|
|
5163
5408
|
["Portugu\xEAs" /* PORTUGUES */]: {
|
|
5164
|
-
icon: /* @__PURE__ */ (0,
|
|
5409
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ChatPT, { size: 17, color: "currentColor" }),
|
|
5165
5410
|
colorClass: "bg-subject-6",
|
|
5166
5411
|
name: "Portugu\xEAs" /* PORTUGUES */
|
|
5167
5412
|
},
|
|
5168
5413
|
["Qu\xEDmica" /* QUIMICA */]: {
|
|
5169
|
-
icon: /* @__PURE__ */ (0,
|
|
5414
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_phosphor_react13.Flask, { size: 17, color: "currentColor" }),
|
|
5170
5415
|
colorClass: "bg-subject-7",
|
|
5171
5416
|
name: "Qu\xEDmica" /* QUIMICA */
|
|
5172
5417
|
},
|
|
5173
5418
|
["Artes" /* ARTES */]: {
|
|
5174
|
-
icon: /* @__PURE__ */ (0,
|
|
5419
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_phosphor_react13.Palette, { size: 17, color: "currentColor" }),
|
|
5175
5420
|
colorClass: "bg-subject-8",
|
|
5176
5421
|
name: "Artes" /* ARTES */
|
|
5177
5422
|
},
|
|
5178
5423
|
["Matem\xE1tica" /* MATEMATICA */]: {
|
|
5179
|
-
icon: /* @__PURE__ */ (0,
|
|
5424
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_phosphor_react13.MathOperations, { size: 17, color: "currentColor" }),
|
|
5180
5425
|
colorClass: "bg-subject-9",
|
|
5181
5426
|
name: "Matem\xE1tica" /* MATEMATICA */
|
|
5182
5427
|
},
|
|
5183
5428
|
["Filosofia" /* FILOSOFIA */]: {
|
|
5184
|
-
icon: /* @__PURE__ */ (0,
|
|
5429
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(HeadCircuit, { size: 17, color: "currentColor" }),
|
|
5185
5430
|
colorClass: "bg-subject-10",
|
|
5186
5431
|
name: "Filosofia" /* FILOSOFIA */
|
|
5187
5432
|
},
|
|
5188
5433
|
["Espanhol" /* ESPANHOL */]: {
|
|
5189
|
-
icon: /* @__PURE__ */ (0,
|
|
5434
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ChatES, { size: 17, color: "currentColor" }),
|
|
5190
5435
|
colorClass: "bg-subject-11",
|
|
5191
5436
|
name: "Espanhol" /* ESPANHOL */
|
|
5192
5437
|
},
|
|
5193
5438
|
["Reda\xE7\xE3o" /* REDACAO */]: {
|
|
5194
|
-
icon: /* @__PURE__ */ (0,
|
|
5439
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_phosphor_react13.ArticleNyTimes, { size: 17, color: "currentColor" }),
|
|
5195
5440
|
colorClass: "bg-subject-12",
|
|
5196
5441
|
name: "Reda\xE7\xE3o" /* REDACAO */
|
|
5197
5442
|
},
|
|
5198
5443
|
["Sociologia" /* SOCIOLOGIA */]: {
|
|
5199
|
-
icon: /* @__PURE__ */ (0,
|
|
5444
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_phosphor_react13.Person, { size: 17, color: "currentColor" }),
|
|
5200
5445
|
colorClass: "bg-subject-13",
|
|
5201
5446
|
name: "Sociologia" /* SOCIOLOGIA */
|
|
5202
5447
|
},
|
|
5203
5448
|
["Ingl\xEAs" /* INGLES */]: {
|
|
5204
|
-
icon: /* @__PURE__ */ (0,
|
|
5449
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ChatEN, { size: 17, color: "currentColor" }),
|
|
5205
5450
|
colorClass: "bg-subject-14",
|
|
5206
5451
|
name: "Ingl\xEAs" /* INGLES */
|
|
5207
5452
|
},
|
|
5208
5453
|
["Ed. F\xEDsica" /* EDUCACAO_FISICA */]: {
|
|
5209
|
-
icon: /* @__PURE__ */ (0,
|
|
5454
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_phosphor_react13.DribbbleLogo, { size: 17, color: "currentColor" }),
|
|
5210
5455
|
colorClass: "bg-subject-15",
|
|
5211
5456
|
name: "Ed. F\xEDsica" /* EDUCACAO_FISICA */
|
|
5212
5457
|
},
|
|
5213
5458
|
["Trilhas" /* TRILHAS */]: {
|
|
5214
|
-
icon: /* @__PURE__ */ (0,
|
|
5459
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_phosphor_react13.BookBookmark, { size: 17, color: "currentColor" }),
|
|
5215
5460
|
colorClass: "bg-subject-16",
|
|
5216
5461
|
name: "Trilhas" /* TRILHAS */
|
|
5217
5462
|
}
|
|
5218
5463
|
};
|
|
5219
5464
|
var getSubjectInfo = (subject) => {
|
|
5220
5465
|
return SubjectInfo[subject] || {
|
|
5221
|
-
icon: /* @__PURE__ */ (0,
|
|
5466
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_phosphor_react13.Book, { size: 17, color: "currentColor" }),
|
|
5222
5467
|
colorClass: "bg-subject-16",
|
|
5223
5468
|
name: subject
|
|
5224
5469
|
};
|
|
@@ -5245,9 +5490,14 @@ var GOAL_STATUS_OPTIONS = [
|
|
|
5245
5490
|
{ id: "VENCIDA" /* VENCIDA */, name: "Vencida" },
|
|
5246
5491
|
{ id: "CONCLUIDA" /* CONCLUIDA */, name: "Conclu\xEDda" }
|
|
5247
5492
|
];
|
|
5493
|
+
var GoalDraftType = /* @__PURE__ */ ((GoalDraftType2) => {
|
|
5494
|
+
GoalDraftType2["MODELO"] = "MODELO";
|
|
5495
|
+
GoalDraftType2["RASCUNHO"] = "RASCUNHO";
|
|
5496
|
+
return GoalDraftType2;
|
|
5497
|
+
})(GoalDraftType || {});
|
|
5248
5498
|
|
|
5249
5499
|
// src/hooks/useRecommendedLessons.ts
|
|
5250
|
-
var
|
|
5500
|
+
var import_react18 = require("react");
|
|
5251
5501
|
var import_zod = require("zod");
|
|
5252
5502
|
var import_dayjs = __toESM(require("dayjs"));
|
|
5253
5503
|
var goalSubjectSchema = import_zod.z.object({
|
|
@@ -5339,7 +5589,7 @@ var handleGoalFetchError = (error) => {
|
|
|
5339
5589
|
};
|
|
5340
5590
|
var createUseRecommendedLessonsHistory = (fetchGoalsHistory) => {
|
|
5341
5591
|
return () => {
|
|
5342
|
-
const [state, setState] = (0,
|
|
5592
|
+
const [state, setState] = (0, import_react18.useState)({
|
|
5343
5593
|
goals: [],
|
|
5344
5594
|
loading: false,
|
|
5345
5595
|
error: null,
|
|
@@ -5350,7 +5600,7 @@ var createUseRecommendedLessonsHistory = (fetchGoalsHistory) => {
|
|
|
5350
5600
|
totalPages: 0
|
|
5351
5601
|
}
|
|
5352
5602
|
});
|
|
5353
|
-
const fetchGoals = (0,
|
|
5603
|
+
const fetchGoals = (0, import_react18.useCallback)(
|
|
5354
5604
|
async (filters) => {
|
|
5355
5605
|
setState((prev) => ({ ...prev, loading: true, error: null }));
|
|
5356
5606
|
try {
|
|
@@ -5392,6 +5642,422 @@ var createUseRecommendedLessonsHistory = (fetchGoalsHistory) => {
|
|
|
5392
5642
|
};
|
|
5393
5643
|
};
|
|
5394
5644
|
|
|
5645
|
+
// src/hooks/useGoalModels.ts
|
|
5646
|
+
var import_react19 = require("react");
|
|
5647
|
+
var import_zod3 = require("zod");
|
|
5648
|
+
var import_dayjs2 = __toESM(require("dayjs"));
|
|
5649
|
+
|
|
5650
|
+
// src/utils/hookErrorHandler.ts
|
|
5651
|
+
var import_zod2 = require("zod");
|
|
5652
|
+
var createFetchErrorHandler = (validationErrorMessage, genericErrorMessage) => (error) => {
|
|
5653
|
+
if (error instanceof import_zod2.z.ZodError) {
|
|
5654
|
+
console.error(validationErrorMessage, error);
|
|
5655
|
+
return validationErrorMessage;
|
|
5656
|
+
}
|
|
5657
|
+
console.error(genericErrorMessage, error);
|
|
5658
|
+
return genericErrorMessage;
|
|
5659
|
+
};
|
|
5660
|
+
|
|
5661
|
+
// src/hooks/useGoalModels.ts
|
|
5662
|
+
var goalModelResponseSchema = import_zod3.z.object({
|
|
5663
|
+
id: import_zod3.z.string().uuid(),
|
|
5664
|
+
type: import_zod3.z.nativeEnum(GoalDraftType),
|
|
5665
|
+
title: import_zod3.z.string(),
|
|
5666
|
+
description: import_zod3.z.string().nullable(),
|
|
5667
|
+
creatorUserInstitutionId: import_zod3.z.string().uuid(),
|
|
5668
|
+
subjectId: import_zod3.z.string().uuid().nullable(),
|
|
5669
|
+
startDate: import_zod3.z.string().nullable(),
|
|
5670
|
+
finalDate: import_zod3.z.string().nullable(),
|
|
5671
|
+
createdAt: import_zod3.z.string(),
|
|
5672
|
+
updatedAt: import_zod3.z.string()
|
|
5673
|
+
});
|
|
5674
|
+
var goalModelsApiResponseSchema = import_zod3.z.object({
|
|
5675
|
+
message: import_zod3.z.string(),
|
|
5676
|
+
data: import_zod3.z.object({
|
|
5677
|
+
drafts: import_zod3.z.array(goalModelResponseSchema),
|
|
5678
|
+
total: import_zod3.z.number()
|
|
5679
|
+
})
|
|
5680
|
+
});
|
|
5681
|
+
var DEFAULT_GOAL_MODELS_PAGINATION = {
|
|
5682
|
+
total: 0,
|
|
5683
|
+
page: 1,
|
|
5684
|
+
limit: 10,
|
|
5685
|
+
totalPages: 0
|
|
5686
|
+
};
|
|
5687
|
+
var transformGoalModelToTableItem = (model, subjectsMap) => {
|
|
5688
|
+
const subjectName = model.subjectId ? subjectsMap?.get(model.subjectId) || "" : "";
|
|
5689
|
+
return {
|
|
5690
|
+
id: model.id,
|
|
5691
|
+
title: model.title || "Sem t\xEDtulo",
|
|
5692
|
+
savedAt: (0, import_dayjs2.default)(model.createdAt).format("DD/MM/YYYY"),
|
|
5693
|
+
subject: subjectName,
|
|
5694
|
+
subjectId: model.subjectId
|
|
5695
|
+
};
|
|
5696
|
+
};
|
|
5697
|
+
var handleGoalModelFetchError = createFetchErrorHandler(
|
|
5698
|
+
"Erro ao validar dados de modelos de aulas",
|
|
5699
|
+
"Erro ao carregar modelos de aulas"
|
|
5700
|
+
);
|
|
5701
|
+
var createUseGoalModels = (fetchGoalModels, deleteGoalModel) => {
|
|
5702
|
+
return () => {
|
|
5703
|
+
const [state, setState] = (0, import_react19.useState)({
|
|
5704
|
+
models: [],
|
|
5705
|
+
loading: false,
|
|
5706
|
+
error: null,
|
|
5707
|
+
pagination: DEFAULT_GOAL_MODELS_PAGINATION
|
|
5708
|
+
});
|
|
5709
|
+
const fetchModels = (0, import_react19.useCallback)(
|
|
5710
|
+
async (filters, subjectsMap) => {
|
|
5711
|
+
setState((prev) => ({ ...prev, loading: true, error: null }));
|
|
5712
|
+
try {
|
|
5713
|
+
const responseData = await fetchGoalModels(filters);
|
|
5714
|
+
const validatedData = goalModelsApiResponseSchema.parse(responseData);
|
|
5715
|
+
const tableItems = validatedData.data.drafts.map(
|
|
5716
|
+
(model) => transformGoalModelToTableItem(model, subjectsMap)
|
|
5717
|
+
);
|
|
5718
|
+
const limit = filters?.limit || 10;
|
|
5719
|
+
const page = filters?.page || 1;
|
|
5720
|
+
const total = validatedData.data.total;
|
|
5721
|
+
const totalPages = Math.ceil(total / limit);
|
|
5722
|
+
setState({
|
|
5723
|
+
models: tableItems,
|
|
5724
|
+
loading: false,
|
|
5725
|
+
error: null,
|
|
5726
|
+
pagination: {
|
|
5727
|
+
total,
|
|
5728
|
+
page,
|
|
5729
|
+
limit,
|
|
5730
|
+
totalPages
|
|
5731
|
+
}
|
|
5732
|
+
});
|
|
5733
|
+
} catch (error) {
|
|
5734
|
+
const errorMessage = handleGoalModelFetchError(error);
|
|
5735
|
+
setState((prev) => ({
|
|
5736
|
+
...prev,
|
|
5737
|
+
loading: false,
|
|
5738
|
+
error: errorMessage
|
|
5739
|
+
}));
|
|
5740
|
+
}
|
|
5741
|
+
},
|
|
5742
|
+
[fetchGoalModels]
|
|
5743
|
+
);
|
|
5744
|
+
const deleteModel = (0, import_react19.useCallback)(
|
|
5745
|
+
async (id) => {
|
|
5746
|
+
try {
|
|
5747
|
+
await deleteGoalModel(id);
|
|
5748
|
+
return true;
|
|
5749
|
+
} catch (error) {
|
|
5750
|
+
console.error("Erro ao deletar modelo:", error);
|
|
5751
|
+
return false;
|
|
5752
|
+
}
|
|
5753
|
+
},
|
|
5754
|
+
[deleteGoalModel]
|
|
5755
|
+
);
|
|
5756
|
+
return {
|
|
5757
|
+
...state,
|
|
5758
|
+
fetchModels,
|
|
5759
|
+
deleteModel
|
|
5760
|
+
};
|
|
5761
|
+
};
|
|
5762
|
+
};
|
|
5763
|
+
|
|
5764
|
+
// src/components/ActivitiesHistory/components/ErrorDisplay.tsx
|
|
5765
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
5766
|
+
var ErrorDisplay = ({ error }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "flex items-center justify-center bg-background rounded-xl w-full min-h-[705px]", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text_default, { size: "lg", color: "text-error-500", children: error }) });
|
|
5767
|
+
|
|
5768
|
+
// src/utils/renderSubjectCell.tsx
|
|
5769
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
5770
|
+
var renderSubjectCell = (subjectName, mapSubjectNameToEnum, showEmptyDash = false) => {
|
|
5771
|
+
if (!subjectName) {
|
|
5772
|
+
return showEmptyDash ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text_default, { size: "sm", color: "text-text-400", children: "-" }) : null;
|
|
5773
|
+
}
|
|
5774
|
+
const subjectEnum = mapSubjectNameToEnum?.(subjectName);
|
|
5775
|
+
if (!subjectEnum) {
|
|
5776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text_default, { size: "sm", className: "truncate", title: subjectName, children: subjectName });
|
|
5777
|
+
}
|
|
5778
|
+
const subjectInfo = getSubjectInfo(subjectEnum);
|
|
5779
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex items-center gap-2", title: subjectName, children: [
|
|
5780
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5781
|
+
"span",
|
|
5782
|
+
{
|
|
5783
|
+
className: cn(
|
|
5784
|
+
"w-[21px] h-[21px] flex items-center justify-center rounded-sm text-text-950 shrink-0",
|
|
5785
|
+
subjectInfo.colorClass
|
|
5786
|
+
),
|
|
5787
|
+
children: subjectInfo.icon
|
|
5788
|
+
}
|
|
5789
|
+
),
|
|
5790
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Text_default, { size: "sm", className: "truncate", children: subjectName })
|
|
5791
|
+
] });
|
|
5792
|
+
};
|
|
5793
|
+
|
|
5794
|
+
// src/components/shared/ModelsTabBase/ModelsTabBase.tsx
|
|
5795
|
+
var import_react20 = require("react");
|
|
5796
|
+
var import_phosphor_react14 = require("phosphor-react");
|
|
5797
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
5798
|
+
var ModelsTabBase = ({
|
|
5799
|
+
fetchModels: fetchModelsProp,
|
|
5800
|
+
deleteModel: deleteModelProp,
|
|
5801
|
+
onCreateModel,
|
|
5802
|
+
onSend,
|
|
5803
|
+
onEditModel,
|
|
5804
|
+
emptyStateImage,
|
|
5805
|
+
noSearchImage,
|
|
5806
|
+
mapSubjectNameToEnum,
|
|
5807
|
+
userFilterData,
|
|
5808
|
+
subjectsMap,
|
|
5809
|
+
config,
|
|
5810
|
+
createTableColumns: createTableColumns2,
|
|
5811
|
+
createFiltersConfig,
|
|
5812
|
+
buildFiltersFromParams: buildFiltersFromParams2,
|
|
5813
|
+
createUseModels
|
|
5814
|
+
}) => {
|
|
5815
|
+
const [deleteDialogOpen, setDeleteDialogOpen] = (0, import_react20.useState)(false);
|
|
5816
|
+
const [modelToDelete, setModelToDelete] = (0, import_react20.useState)(null);
|
|
5817
|
+
const { addToast } = useToast();
|
|
5818
|
+
const fetchModelsRef = (0, import_react20.useRef)(fetchModelsProp);
|
|
5819
|
+
fetchModelsRef.current = fetchModelsProp;
|
|
5820
|
+
const deleteModelRef = (0, import_react20.useRef)(deleteModelProp);
|
|
5821
|
+
deleteModelRef.current = deleteModelProp;
|
|
5822
|
+
const subjectsMapRef = (0, import_react20.useRef)(subjectsMap);
|
|
5823
|
+
subjectsMapRef.current = subjectsMap;
|
|
5824
|
+
const useModels = (0, import_react20.useMemo)(
|
|
5825
|
+
() => createUseModels(
|
|
5826
|
+
(filters) => fetchModelsRef.current(filters),
|
|
5827
|
+
(id) => deleteModelRef.current(id)
|
|
5828
|
+
),
|
|
5829
|
+
[createUseModels]
|
|
5830
|
+
);
|
|
5831
|
+
const {
|
|
5832
|
+
models,
|
|
5833
|
+
loading: modelsLoading,
|
|
5834
|
+
error: modelsError,
|
|
5835
|
+
pagination: modelsPagination,
|
|
5836
|
+
fetchModels,
|
|
5837
|
+
deleteModel
|
|
5838
|
+
} = useModels();
|
|
5839
|
+
const modelsFilterConfigs = (0, import_react20.useMemo)(
|
|
5840
|
+
() => createFiltersConfig(userFilterData),
|
|
5841
|
+
[createFiltersConfig, userFilterData]
|
|
5842
|
+
);
|
|
5843
|
+
const handleDeleteClick = (0, import_react20.useCallback)((model) => {
|
|
5844
|
+
setModelToDelete(model);
|
|
5845
|
+
setDeleteDialogOpen(true);
|
|
5846
|
+
}, []);
|
|
5847
|
+
const modelsTableColumns = (0, import_react20.useMemo)(
|
|
5848
|
+
() => createTableColumns2(
|
|
5849
|
+
mapSubjectNameToEnum,
|
|
5850
|
+
onSend,
|
|
5851
|
+
onEditModel,
|
|
5852
|
+
handleDeleteClick
|
|
5853
|
+
),
|
|
5854
|
+
[
|
|
5855
|
+
createTableColumns2,
|
|
5856
|
+
mapSubjectNameToEnum,
|
|
5857
|
+
onSend,
|
|
5858
|
+
onEditModel,
|
|
5859
|
+
handleDeleteClick
|
|
5860
|
+
]
|
|
5861
|
+
);
|
|
5862
|
+
const handleParamsChange = (0, import_react20.useCallback)(
|
|
5863
|
+
(params) => {
|
|
5864
|
+
const filters = buildFiltersFromParams2(params);
|
|
5865
|
+
fetchModels(filters, subjectsMapRef.current);
|
|
5866
|
+
},
|
|
5867
|
+
[buildFiltersFromParams2, fetchModels]
|
|
5868
|
+
);
|
|
5869
|
+
(0, import_react20.useEffect)(() => {
|
|
5870
|
+
fetchModels({ page: 1, limit: 10 }, subjectsMapRef.current);
|
|
5871
|
+
}, [fetchModels]);
|
|
5872
|
+
const handleConfirmDelete = (0, import_react20.useCallback)(async () => {
|
|
5873
|
+
if (modelToDelete) {
|
|
5874
|
+
const success = await deleteModel(modelToDelete.id);
|
|
5875
|
+
if (success) {
|
|
5876
|
+
addToast({ title: "Modelo deletado com sucesso", action: "success" });
|
|
5877
|
+
fetchModels({ page: 1, limit: 10 }, subjectsMapRef.current);
|
|
5878
|
+
} else {
|
|
5879
|
+
addToast({ title: "Erro ao deletar modelo", action: "warning" });
|
|
5880
|
+
}
|
|
5881
|
+
}
|
|
5882
|
+
setDeleteDialogOpen(false);
|
|
5883
|
+
setModelToDelete(null);
|
|
5884
|
+
}, [modelToDelete, deleteModel, fetchModels, addToast]);
|
|
5885
|
+
const handleCancelDelete = (0, import_react20.useCallback)(() => {
|
|
5886
|
+
setDeleteDialogOpen(false);
|
|
5887
|
+
setModelToDelete(null);
|
|
5888
|
+
}, []);
|
|
5889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
5890
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Toaster_default, {}),
|
|
5891
|
+
modelsError ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ErrorDisplay, { error: modelsError }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "w-full", "data-testid": config.testId, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5892
|
+
TableProvider,
|
|
5893
|
+
{
|
|
5894
|
+
data: models,
|
|
5895
|
+
headers: modelsTableColumns,
|
|
5896
|
+
loading: modelsLoading,
|
|
5897
|
+
variant: "borderless",
|
|
5898
|
+
enableSearch: true,
|
|
5899
|
+
enableFilters: true,
|
|
5900
|
+
enableTableSort: true,
|
|
5901
|
+
enablePagination: true,
|
|
5902
|
+
initialFilters: modelsFilterConfigs,
|
|
5903
|
+
paginationConfig: {
|
|
5904
|
+
itemLabel: "modelos",
|
|
5905
|
+
itemsPerPageOptions: [10, 20, 50, 100],
|
|
5906
|
+
defaultItemsPerPage: 10,
|
|
5907
|
+
totalItems: modelsPagination.total,
|
|
5908
|
+
totalPages: modelsPagination.totalPages
|
|
5909
|
+
},
|
|
5910
|
+
searchPlaceholder: config.searchPlaceholder,
|
|
5911
|
+
noSearchResultState: {
|
|
5912
|
+
image: noSearchImage
|
|
5913
|
+
},
|
|
5914
|
+
emptyState: {
|
|
5915
|
+
component: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5916
|
+
EmptyState_default,
|
|
5917
|
+
{
|
|
5918
|
+
image: emptyStateImage,
|
|
5919
|
+
title: config.emptyStateTitle,
|
|
5920
|
+
description: config.emptyStateDescription,
|
|
5921
|
+
buttonText: "Criar modelo",
|
|
5922
|
+
buttonIcon: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_phosphor_react14.Plus, { size: 18 }),
|
|
5923
|
+
buttonVariant: "outline",
|
|
5924
|
+
buttonAction: "primary",
|
|
5925
|
+
onButtonClick: onCreateModel
|
|
5926
|
+
}
|
|
5927
|
+
)
|
|
5928
|
+
},
|
|
5929
|
+
onParamsChange: handleParamsChange,
|
|
5930
|
+
children: (renderProps) => {
|
|
5931
|
+
const {
|
|
5932
|
+
controls,
|
|
5933
|
+
table,
|
|
5934
|
+
pagination: paginationComponent
|
|
5935
|
+
} = renderProps;
|
|
5936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "space-y-4", children: [
|
|
5937
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
5938
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5939
|
+
Button_default,
|
|
5940
|
+
{
|
|
5941
|
+
variant: "solid",
|
|
5942
|
+
action: "primary",
|
|
5943
|
+
size: "medium",
|
|
5944
|
+
onClick: onCreateModel,
|
|
5945
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_phosphor_react14.Plus, { size: 18, weight: "bold" }),
|
|
5946
|
+
children: "Criar modelo"
|
|
5947
|
+
}
|
|
5948
|
+
),
|
|
5949
|
+
controls
|
|
5950
|
+
] }),
|
|
5951
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "bg-background rounded-xl p-6 space-y-4", children: [
|
|
5952
|
+
table,
|
|
5953
|
+
paginationComponent
|
|
5954
|
+
] })
|
|
5955
|
+
] });
|
|
5956
|
+
}
|
|
5957
|
+
}
|
|
5958
|
+
) }),
|
|
5959
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5960
|
+
AlertDialog,
|
|
5961
|
+
{
|
|
5962
|
+
isOpen: deleteDialogOpen,
|
|
5963
|
+
onChangeOpen: setDeleteDialogOpen,
|
|
5964
|
+
title: "Deletar modelo",
|
|
5965
|
+
description: `Tem certeza que deseja deletar o modelo "${modelToDelete?.title}"? Esta a\xE7\xE3o n\xE3o pode ser desfeita.`,
|
|
5966
|
+
submitButtonLabel: "Deletar",
|
|
5967
|
+
cancelButtonLabel: "Cancelar",
|
|
5968
|
+
onSubmit: handleConfirmDelete,
|
|
5969
|
+
onCancel: handleCancelDelete
|
|
5970
|
+
}
|
|
5971
|
+
)
|
|
5972
|
+
] });
|
|
5973
|
+
};
|
|
5974
|
+
|
|
5975
|
+
// src/components/shared/ModelsTabBase/createModelsTableColumnsBase.tsx
|
|
5976
|
+
var import_phosphor_react15 = require("phosphor-react");
|
|
5977
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
5978
|
+
var createModelsTableColumnsBase = (mapSubjectNameToEnum, onSend, onEdit, onDelete, config) => [
|
|
5979
|
+
{
|
|
5980
|
+
key: "title",
|
|
5981
|
+
label: "T\xEDtulo",
|
|
5982
|
+
sortable: true,
|
|
5983
|
+
className: "max-w-[400px]",
|
|
5984
|
+
render: (value) => {
|
|
5985
|
+
const title = typeof value === "string" ? value : "";
|
|
5986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text_default, { size: "sm", title, className: "truncate block", children: title });
|
|
5987
|
+
}
|
|
5988
|
+
},
|
|
5989
|
+
{
|
|
5990
|
+
key: "savedAt",
|
|
5991
|
+
label: "Salvo em",
|
|
5992
|
+
sortable: true,
|
|
5993
|
+
className: "w-[120px]"
|
|
5994
|
+
},
|
|
5995
|
+
{
|
|
5996
|
+
key: "subject",
|
|
5997
|
+
label: "Mat\xE9ria",
|
|
5998
|
+
sortable: true,
|
|
5999
|
+
className: "max-w-[160px]",
|
|
6000
|
+
render: (value) => {
|
|
6001
|
+
const subjectName = typeof value === "string" ? value : "";
|
|
6002
|
+
return renderSubjectCell(subjectName, mapSubjectNameToEnum, true);
|
|
6003
|
+
}
|
|
6004
|
+
},
|
|
6005
|
+
{
|
|
6006
|
+
key: "actions",
|
|
6007
|
+
label: "",
|
|
6008
|
+
sortable: false,
|
|
6009
|
+
className: "w-[220px]",
|
|
6010
|
+
render: (_value, row) => {
|
|
6011
|
+
const handleSend = (e) => {
|
|
6012
|
+
e.stopPropagation();
|
|
6013
|
+
onSend?.(row);
|
|
6014
|
+
};
|
|
6015
|
+
const handleEdit = (e) => {
|
|
6016
|
+
e.stopPropagation();
|
|
6017
|
+
onEdit?.(row);
|
|
6018
|
+
};
|
|
6019
|
+
const handleDelete = (e) => {
|
|
6020
|
+
e.stopPropagation();
|
|
6021
|
+
onDelete(row);
|
|
6022
|
+
};
|
|
6023
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center gap-2 justify-end", children: [
|
|
6024
|
+
onSend && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6025
|
+
Button_default,
|
|
6026
|
+
{
|
|
6027
|
+
variant: "outline",
|
|
6028
|
+
action: "primary",
|
|
6029
|
+
size: "small",
|
|
6030
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_phosphor_react15.PaperPlaneTilt, { size: 16 }),
|
|
6031
|
+
onClick: handleSend,
|
|
6032
|
+
"aria-label": config.sendButtonAriaLabel,
|
|
6033
|
+
children: config.sendButtonLabel
|
|
6034
|
+
}
|
|
6035
|
+
),
|
|
6036
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6037
|
+
IconButton_default,
|
|
6038
|
+
{
|
|
6039
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_phosphor_react15.Trash, { size: 20 }),
|
|
6040
|
+
size: "md",
|
|
6041
|
+
onClick: handleDelete,
|
|
6042
|
+
"aria-label": config.deleteButtonAriaLabel,
|
|
6043
|
+
className: "text-text-600 hover:text-error-500 hover:bg-transparent"
|
|
6044
|
+
}
|
|
6045
|
+
),
|
|
6046
|
+
onEdit && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
6047
|
+
IconButton_default,
|
|
6048
|
+
{
|
|
6049
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_phosphor_react15.PencilSimple, { size: 20 }),
|
|
6050
|
+
size: "md",
|
|
6051
|
+
onClick: handleEdit,
|
|
6052
|
+
"aria-label": config.editButtonAriaLabel,
|
|
6053
|
+
className: "text-text-600 hover:text-primary-700 hover:bg-transparent"
|
|
6054
|
+
}
|
|
6055
|
+
)
|
|
6056
|
+
] });
|
|
6057
|
+
}
|
|
6058
|
+
}
|
|
6059
|
+
];
|
|
6060
|
+
|
|
5395
6061
|
// src/components/CheckBoxGroup/CheckBoxGroup.helpers.ts
|
|
5396
6062
|
var areSelectedIdsEqual = (ids1, ids2) => {
|
|
5397
6063
|
if (ids1 === ids2) return true;
|
|
@@ -5474,7 +6140,7 @@ var calculateFormattedItemsForAutoSelection = (category, allCategories) => {
|
|
|
5474
6140
|
};
|
|
5475
6141
|
|
|
5476
6142
|
// src/components/CheckBoxGroup/CheckBoxGroup.tsx
|
|
5477
|
-
var
|
|
6143
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
5478
6144
|
var CheckboxGroup = ({
|
|
5479
6145
|
categories,
|
|
5480
6146
|
onCategoriesChange,
|
|
@@ -5482,14 +6148,14 @@ var CheckboxGroup = ({
|
|
|
5482
6148
|
showDivider = true,
|
|
5483
6149
|
showSingleItem = false
|
|
5484
6150
|
}) => {
|
|
5485
|
-
const [openAccordion, setOpenAccordion] = (0,
|
|
5486
|
-
const autoSelectionAppliedRef = (0,
|
|
5487
|
-
const onCategoriesChangeRef = (0,
|
|
5488
|
-
const previousCategoriesRef = (0,
|
|
5489
|
-
(0,
|
|
6151
|
+
const [openAccordion, setOpenAccordion] = (0, import_react21.useState)("");
|
|
6152
|
+
const autoSelectionAppliedRef = (0, import_react21.useRef)(false);
|
|
6153
|
+
const onCategoriesChangeRef = (0, import_react21.useRef)(onCategoriesChange);
|
|
6154
|
+
const previousCategoriesRef = (0, import_react21.useRef)(categories);
|
|
6155
|
+
(0, import_react21.useEffect)(() => {
|
|
5490
6156
|
onCategoriesChangeRef.current = onCategoriesChange;
|
|
5491
6157
|
}, [onCategoriesChange]);
|
|
5492
|
-
const categoriesWithAutoSelection = (0,
|
|
6158
|
+
const categoriesWithAutoSelection = (0, import_react21.useMemo)(() => {
|
|
5493
6159
|
return categories.map((category) => {
|
|
5494
6160
|
const filteredItems = calculateFormattedItemsForAutoSelection(
|
|
5495
6161
|
category,
|
|
@@ -5504,7 +6170,7 @@ var CheckboxGroup = ({
|
|
|
5504
6170
|
return category;
|
|
5505
6171
|
});
|
|
5506
6172
|
}, [categories]);
|
|
5507
|
-
(0,
|
|
6173
|
+
(0, import_react21.useEffect)(() => {
|
|
5508
6174
|
const categoriesChanged = categories !== previousCategoriesRef.current;
|
|
5509
6175
|
if (!categoriesChanged && autoSelectionAppliedRef.current) {
|
|
5510
6176
|
return;
|
|
@@ -5622,7 +6288,7 @@ var CheckboxGroup = ({
|
|
|
5622
6288
|
);
|
|
5623
6289
|
return groupedItems.length ? groupedItems : [{ itens: [] }];
|
|
5624
6290
|
};
|
|
5625
|
-
const formattedItemsMap = (0,
|
|
6291
|
+
const formattedItemsMap = (0, import_react21.useMemo)(() => {
|
|
5626
6292
|
const formattedItemsMap2 = {};
|
|
5627
6293
|
for (const category of categories) {
|
|
5628
6294
|
const formattedItems = calculateFormattedItems(category.key);
|
|
@@ -5777,7 +6443,7 @@ var CheckboxGroup = ({
|
|
|
5777
6443
|
};
|
|
5778
6444
|
const renderCheckboxItem = (item, categoryKey) => {
|
|
5779
6445
|
const uniqueId = `${categoryKey}-${item.id}`;
|
|
5780
|
-
return /* @__PURE__ */ (0,
|
|
6446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
5781
6447
|
"div",
|
|
5782
6448
|
{
|
|
5783
6449
|
className: "flex items-center gap-3 px-2",
|
|
@@ -5787,7 +6453,7 @@ var CheckboxGroup = ({
|
|
|
5787
6453
|
onMouseUp: (e) => e.stopPropagation(),
|
|
5788
6454
|
onKeyDown: (e) => e.stopPropagation(),
|
|
5789
6455
|
children: [
|
|
5790
|
-
/* @__PURE__ */ (0,
|
|
6456
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5791
6457
|
CheckBox_default,
|
|
5792
6458
|
{
|
|
5793
6459
|
id: uniqueId,
|
|
@@ -5795,7 +6461,7 @@ var CheckboxGroup = ({
|
|
|
5795
6461
|
onChange: () => toggleItem(categoryKey, item.id)
|
|
5796
6462
|
}
|
|
5797
6463
|
),
|
|
5798
|
-
/* @__PURE__ */ (0,
|
|
6464
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5799
6465
|
"label",
|
|
5800
6466
|
{
|
|
5801
6467
|
htmlFor: uniqueId,
|
|
@@ -5808,12 +6474,12 @@ var CheckboxGroup = ({
|
|
|
5808
6474
|
item.id
|
|
5809
6475
|
);
|
|
5810
6476
|
};
|
|
5811
|
-
const renderFormattedGroup = (formattedGroup, idx, categoryKey) => /* @__PURE__ */ (0,
|
|
6477
|
+
const renderFormattedGroup = (formattedGroup, idx, categoryKey) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
5812
6478
|
"div",
|
|
5813
6479
|
{
|
|
5814
6480
|
className: "flex flex-col gap-3",
|
|
5815
6481
|
children: [
|
|
5816
|
-
"groupLabel" in formattedGroup && formattedGroup.groupLabel && /* @__PURE__ */ (0,
|
|
6482
|
+
"groupLabel" in formattedGroup && formattedGroup.groupLabel && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text_default, { size: "sm", className: "mt-2", weight: "semibold", children: formattedGroup.groupLabel }),
|
|
5817
6483
|
formattedGroup.itens?.map(
|
|
5818
6484
|
(item) => renderCheckboxItem(item, categoryKey)
|
|
5819
6485
|
)
|
|
@@ -5821,9 +6487,9 @@ var CheckboxGroup = ({
|
|
|
5821
6487
|
},
|
|
5822
6488
|
formattedGroup.groupLabel || `group-${idx}`
|
|
5823
6489
|
);
|
|
5824
|
-
const renderAccordionTrigger = (category, isEnabled) => /* @__PURE__ */ (0,
|
|
5825
|
-
/* @__PURE__ */ (0,
|
|
5826
|
-
/* @__PURE__ */ (0,
|
|
6490
|
+
const renderAccordionTrigger = (category, isEnabled) => /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center justify-between w-full p-2", children: [
|
|
6491
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
6492
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5827
6493
|
CheckBox_default,
|
|
5828
6494
|
{
|
|
5829
6495
|
checked: isMinimalOneCheckBoxIsSelected(category.key),
|
|
@@ -5832,7 +6498,7 @@ var CheckboxGroup = ({
|
|
|
5832
6498
|
onChange: () => toggleAllInCategory(category.key)
|
|
5833
6499
|
}
|
|
5834
6500
|
),
|
|
5835
|
-
/* @__PURE__ */ (0,
|
|
6501
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5836
6502
|
Text_default,
|
|
5837
6503
|
{
|
|
5838
6504
|
size: "sm",
|
|
@@ -5842,7 +6508,7 @@ var CheckboxGroup = ({
|
|
|
5842
6508
|
}
|
|
5843
6509
|
)
|
|
5844
6510
|
] }),
|
|
5845
|
-
(openAccordion === category.key || isEnabled) && /* @__PURE__ */ (0,
|
|
6511
|
+
(openAccordion === category.key || isEnabled) && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Badge_default, { variant: "solid", action: "info", children: getBadgeText2(category) })
|
|
5846
6512
|
] });
|
|
5847
6513
|
const renderCompactSingleItem = (category) => {
|
|
5848
6514
|
const formattedItems = getFormattedItems(category.key);
|
|
@@ -5851,13 +6517,13 @@ var CheckboxGroup = ({
|
|
|
5851
6517
|
return null;
|
|
5852
6518
|
}
|
|
5853
6519
|
const singleItem = allItems[0];
|
|
5854
|
-
return /* @__PURE__ */ (0,
|
|
6520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
5855
6521
|
"div",
|
|
5856
6522
|
{
|
|
5857
6523
|
className: "flex items-center justify-between w-full px-3 py-2",
|
|
5858
6524
|
children: [
|
|
5859
|
-
/* @__PURE__ */ (0,
|
|
5860
|
-
/* @__PURE__ */ (0,
|
|
6525
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text_default, { size: "sm", weight: "bold", className: "text-text-800", children: category.label }),
|
|
6526
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text_default, { size: "sm", className: "text-text-950", children: singleItem.name })
|
|
5861
6527
|
]
|
|
5862
6528
|
},
|
|
5863
6529
|
category.key
|
|
@@ -5873,16 +6539,16 @@ var CheckboxGroup = ({
|
|
|
5873
6539
|
const allItems = formattedItems.flatMap((group) => group.itens || []);
|
|
5874
6540
|
const hasOnlyOneAvailableItem = allItems.length === 1;
|
|
5875
6541
|
if (compactSingleItem && hasOnlyOneAvailableItem && isEnabled) {
|
|
5876
|
-
return /* @__PURE__ */ (0,
|
|
6542
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { children: [
|
|
5877
6543
|
renderCompactSingleItem(category),
|
|
5878
|
-
showDivider && /* @__PURE__ */ (0,
|
|
6544
|
+
showDivider && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Divider_default, {})
|
|
5879
6545
|
] }, category.key);
|
|
5880
6546
|
}
|
|
5881
6547
|
const hasNoItems = formattedItems.every(
|
|
5882
6548
|
(group) => !group.itens || group.itens.length === 0
|
|
5883
6549
|
);
|
|
5884
|
-
return /* @__PURE__ */ (0,
|
|
5885
|
-
/* @__PURE__ */ (0,
|
|
6550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { children: [
|
|
6551
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5886
6552
|
CardAccordation,
|
|
5887
6553
|
{
|
|
5888
6554
|
value: category.key,
|
|
@@ -5892,15 +6558,15 @@ var CheckboxGroup = ({
|
|
|
5892
6558
|
openAccordion === category.key && "bg-background-50 border-none"
|
|
5893
6559
|
),
|
|
5894
6560
|
trigger: renderAccordionTrigger(category, isEnabled),
|
|
5895
|
-
children: /* @__PURE__ */ (0,
|
|
6561
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "flex flex-col gap-3 pt-2", children: hasNoItems && isEnabled ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "px-2 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Text_default, { size: "sm", className: "text-text-500 text-center", children: "Sem dados" }) }) : formattedItems.map(
|
|
5896
6562
|
(formattedGroup, idx) => renderFormattedGroup(formattedGroup, idx, category.key)
|
|
5897
6563
|
) })
|
|
5898
6564
|
}
|
|
5899
6565
|
),
|
|
5900
|
-
openAccordion !== category.key && showDivider && /* @__PURE__ */ (0,
|
|
6566
|
+
openAccordion !== category.key && showDivider && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Divider_default, {})
|
|
5901
6567
|
] }, category.key);
|
|
5902
6568
|
};
|
|
5903
|
-
(0,
|
|
6569
|
+
(0, import_react21.useEffect)(() => {
|
|
5904
6570
|
if (!openAccordion) return;
|
|
5905
6571
|
const category = categories.find((c) => c.key === openAccordion);
|
|
5906
6572
|
if (!category) return;
|
|
@@ -5911,7 +6577,7 @@ var CheckboxGroup = ({
|
|
|
5911
6577
|
}, 0);
|
|
5912
6578
|
}
|
|
5913
6579
|
}, [categories, openAccordion]);
|
|
5914
|
-
return /* @__PURE__ */ (0,
|
|
6580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5915
6581
|
AccordionGroup,
|
|
5916
6582
|
{
|
|
5917
6583
|
type: "single",
|
|
@@ -5924,7 +6590,7 @@ var CheckboxGroup = ({
|
|
|
5924
6590
|
};
|
|
5925
6591
|
|
|
5926
6592
|
// src/components/Filter/FilterModal.tsx
|
|
5927
|
-
var
|
|
6593
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
5928
6594
|
var FilterModal = ({
|
|
5929
6595
|
isOpen,
|
|
5930
6596
|
onClose,
|
|
@@ -5952,20 +6618,20 @@ var FilterModal = ({
|
|
|
5952
6618
|
const handleClear = () => {
|
|
5953
6619
|
onClear();
|
|
5954
6620
|
};
|
|
5955
|
-
return /* @__PURE__ */ (0,
|
|
6621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5956
6622
|
Modal_default,
|
|
5957
6623
|
{
|
|
5958
6624
|
isOpen,
|
|
5959
6625
|
onClose,
|
|
5960
6626
|
title,
|
|
5961
6627
|
size,
|
|
5962
|
-
footer: /* @__PURE__ */ (0,
|
|
5963
|
-
/* @__PURE__ */ (0,
|
|
5964
|
-
/* @__PURE__ */ (0,
|
|
6628
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex gap-3 justify-end w-full", children: [
|
|
6629
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Button_default, { variant: "outline", onClick: handleClear, children: clearLabel }),
|
|
6630
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Button_default, { onClick: handleApply, children: applyLabel })
|
|
5965
6631
|
] }),
|
|
5966
|
-
children: /* @__PURE__ */ (0,
|
|
5967
|
-
/* @__PURE__ */ (0,
|
|
5968
|
-
config.key === "academic" && /* @__PURE__ */ (0,
|
|
6632
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex flex-col gap-6", children: filterConfigs.map((config, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex flex-col gap-4", children: [
|
|
6633
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-2 text-text-400 text-sm font-medium uppercase", children: [
|
|
6634
|
+
config.key === "academic" && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
5969
6635
|
"svg",
|
|
5970
6636
|
{
|
|
5971
6637
|
width: "16",
|
|
@@ -5975,7 +6641,7 @@ var FilterModal = ({
|
|
|
5975
6641
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5976
6642
|
className: "text-text-400",
|
|
5977
6643
|
children: [
|
|
5978
|
-
/* @__PURE__ */ (0,
|
|
6644
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5979
6645
|
"path",
|
|
5980
6646
|
{
|
|
5981
6647
|
d: "M8 2L2 5.33333L8 8.66667L14 5.33333L8 2Z",
|
|
@@ -5985,7 +6651,7 @@ var FilterModal = ({
|
|
|
5985
6651
|
strokeLinejoin: "round"
|
|
5986
6652
|
}
|
|
5987
6653
|
),
|
|
5988
|
-
/* @__PURE__ */ (0,
|
|
6654
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5989
6655
|
"path",
|
|
5990
6656
|
{
|
|
5991
6657
|
d: "M2 10.6667L8 14L14 10.6667",
|
|
@@ -5995,7 +6661,7 @@ var FilterModal = ({
|
|
|
5995
6661
|
strokeLinejoin: "round"
|
|
5996
6662
|
}
|
|
5997
6663
|
),
|
|
5998
|
-
/* @__PURE__ */ (0,
|
|
6664
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5999
6665
|
"path",
|
|
6000
6666
|
{
|
|
6001
6667
|
d: "M2 8L8 11.3333L14 8",
|
|
@@ -6008,7 +6674,7 @@ var FilterModal = ({
|
|
|
6008
6674
|
]
|
|
6009
6675
|
}
|
|
6010
6676
|
),
|
|
6011
|
-
config.key === "content" && /* @__PURE__ */ (0,
|
|
6677
|
+
config.key === "content" && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
6012
6678
|
"svg",
|
|
6013
6679
|
{
|
|
6014
6680
|
width: "16",
|
|
@@ -6018,7 +6684,7 @@ var FilterModal = ({
|
|
|
6018
6684
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6019
6685
|
className: "text-text-400",
|
|
6020
6686
|
children: [
|
|
6021
|
-
/* @__PURE__ */ (0,
|
|
6687
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6022
6688
|
"path",
|
|
6023
6689
|
{
|
|
6024
6690
|
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",
|
|
@@ -6028,7 +6694,7 @@ var FilterModal = ({
|
|
|
6028
6694
|
strokeLinejoin: "round"
|
|
6029
6695
|
}
|
|
6030
6696
|
),
|
|
6031
|
-
/* @__PURE__ */ (0,
|
|
6697
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6032
6698
|
"path",
|
|
6033
6699
|
{
|
|
6034
6700
|
d: "M2 6H14",
|
|
@@ -6038,7 +6704,7 @@ var FilterModal = ({
|
|
|
6038
6704
|
strokeLinejoin: "round"
|
|
6039
6705
|
}
|
|
6040
6706
|
),
|
|
6041
|
-
/* @__PURE__ */ (0,
|
|
6707
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6042
6708
|
"path",
|
|
6043
6709
|
{
|
|
6044
6710
|
d: "M6 2V14",
|
|
@@ -6051,9 +6717,9 @@ var FilterModal = ({
|
|
|
6051
6717
|
]
|
|
6052
6718
|
}
|
|
6053
6719
|
),
|
|
6054
|
-
/* @__PURE__ */ (0,
|
|
6720
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { children: config.label })
|
|
6055
6721
|
] }),
|
|
6056
|
-
/* @__PURE__ */ (0,
|
|
6722
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
6057
6723
|
CheckboxGroup,
|
|
6058
6724
|
{
|
|
6059
6725
|
categories: config.categories,
|
|
@@ -6066,8 +6732,8 @@ var FilterModal = ({
|
|
|
6066
6732
|
};
|
|
6067
6733
|
|
|
6068
6734
|
// src/components/TableProvider/TableProvider.tsx
|
|
6069
|
-
var
|
|
6070
|
-
var
|
|
6735
|
+
var import_phosphor_react16 = require("phosphor-react");
|
|
6736
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
6071
6737
|
function TableProvider({
|
|
6072
6738
|
data,
|
|
6073
6739
|
headers,
|
|
@@ -6091,7 +6757,7 @@ function TableProvider({
|
|
|
6091
6757
|
containerClassName,
|
|
6092
6758
|
children
|
|
6093
6759
|
}) {
|
|
6094
|
-
const [searchQuery, setSearchQuery] = (0,
|
|
6760
|
+
const [searchQuery, setSearchQuery] = (0, import_react22.useState)("");
|
|
6095
6761
|
const sortResultRaw = useTableSort(data, { syncWithUrl: true });
|
|
6096
6762
|
const sortResult = enableTableSort ? sortResultRaw : {
|
|
6097
6763
|
sortedData: data,
|
|
@@ -6102,7 +6768,7 @@ function TableProvider({
|
|
|
6102
6768
|
};
|
|
6103
6769
|
const { sortedData, sortColumn, sortDirection, handleSort } = sortResult;
|
|
6104
6770
|
const filterResultRaw = useTableFilter(initialFilters, { syncWithUrl: true });
|
|
6105
|
-
const disabledFilterResult = (0,
|
|
6771
|
+
const disabledFilterResult = (0, import_react22.useMemo)(
|
|
6106
6772
|
() => ({
|
|
6107
6773
|
filterConfigs: [],
|
|
6108
6774
|
activeFilters: {},
|
|
@@ -6132,10 +6798,10 @@ function TableProvider({
|
|
|
6132
6798
|
totalItems,
|
|
6133
6799
|
totalPages
|
|
6134
6800
|
} = paginationConfig;
|
|
6135
|
-
const [currentPage, setCurrentPage] = (0,
|
|
6136
|
-
const [itemsPerPage, setItemsPerPage] = (0,
|
|
6137
|
-
const [isFilterModalOpen, setIsFilterModalOpen] = (0,
|
|
6138
|
-
const combinedParams = (0,
|
|
6801
|
+
const [currentPage, setCurrentPage] = (0, import_react22.useState)(1);
|
|
6802
|
+
const [itemsPerPage, setItemsPerPage] = (0, import_react22.useState)(defaultItemsPerPage);
|
|
6803
|
+
const [isFilterModalOpen, setIsFilterModalOpen] = (0, import_react22.useState)(false);
|
|
6804
|
+
const combinedParams = (0, import_react22.useMemo)(() => {
|
|
6139
6805
|
const params = {
|
|
6140
6806
|
page: currentPage,
|
|
6141
6807
|
limit: itemsPerPage
|
|
@@ -6162,26 +6828,26 @@ function TableProvider({
|
|
|
6162
6828
|
enableFilters,
|
|
6163
6829
|
enableTableSort
|
|
6164
6830
|
]);
|
|
6165
|
-
(0,
|
|
6831
|
+
(0, import_react22.useEffect)(() => {
|
|
6166
6832
|
onParamsChange?.(combinedParams);
|
|
6167
6833
|
}, [combinedParams]);
|
|
6168
|
-
const handleSearchChange = (0,
|
|
6834
|
+
const handleSearchChange = (0, import_react22.useCallback)((value) => {
|
|
6169
6835
|
setSearchQuery(value);
|
|
6170
6836
|
setCurrentPage(1);
|
|
6171
6837
|
}, []);
|
|
6172
|
-
const handleFilterApply = (0,
|
|
6838
|
+
const handleFilterApply = (0, import_react22.useCallback)(() => {
|
|
6173
6839
|
applyFilters();
|
|
6174
6840
|
setIsFilterModalOpen(false);
|
|
6175
6841
|
setCurrentPage(1);
|
|
6176
6842
|
}, [applyFilters]);
|
|
6177
|
-
const handlePageChange = (0,
|
|
6843
|
+
const handlePageChange = (0, import_react22.useCallback)((page) => {
|
|
6178
6844
|
setCurrentPage(page);
|
|
6179
6845
|
}, []);
|
|
6180
|
-
const handleItemsPerPageChange = (0,
|
|
6846
|
+
const handleItemsPerPageChange = (0, import_react22.useCallback)((items) => {
|
|
6181
6847
|
setItemsPerPage(items);
|
|
6182
6848
|
setCurrentPage(1);
|
|
6183
6849
|
}, []);
|
|
6184
|
-
const handleRowClickInternal = (0,
|
|
6850
|
+
const handleRowClickInternal = (0, import_react22.useCallback)(
|
|
6185
6851
|
(row, index) => {
|
|
6186
6852
|
if (enableRowClick && onRowClick) {
|
|
6187
6853
|
onRowClick(row, index);
|
|
@@ -6189,7 +6855,7 @@ function TableProvider({
|
|
|
6189
6855
|
},
|
|
6190
6856
|
[enableRowClick, onRowClick]
|
|
6191
6857
|
);
|
|
6192
|
-
const useInternalPagination = (0,
|
|
6858
|
+
const useInternalPagination = (0, import_react22.useMemo)(
|
|
6193
6859
|
() => enablePagination && !onParamsChange && totalItems === void 0 && totalPages === void 0,
|
|
6194
6860
|
[enablePagination, onParamsChange, totalItems, totalPages]
|
|
6195
6861
|
);
|
|
@@ -6197,7 +6863,7 @@ function TableProvider({
|
|
|
6197
6863
|
(totalItems ?? (useInternalPagination ? sortedData.length : data.length)) / itemsPerPage
|
|
6198
6864
|
);
|
|
6199
6865
|
const calculatedTotalItems = totalItems ?? (useInternalPagination ? sortedData.length : data.length);
|
|
6200
|
-
const displayData = (0,
|
|
6866
|
+
const displayData = (0, import_react22.useMemo)(() => {
|
|
6201
6867
|
if (!useInternalPagination) {
|
|
6202
6868
|
return sortedData;
|
|
6203
6869
|
}
|
|
@@ -6208,21 +6874,21 @@ function TableProvider({
|
|
|
6208
6874
|
const showLoading = loading;
|
|
6209
6875
|
const showNoSearchResult = !loading && data.length === 0 && searchQuery.trim() !== "";
|
|
6210
6876
|
const showEmpty = !loading && data.length === 0 && searchQuery.trim() === "";
|
|
6211
|
-
const controls = (enableSearch || enableFilters) && /* @__PURE__ */ (0,
|
|
6212
|
-
enableFilters && /* @__PURE__ */ (0,
|
|
6877
|
+
const controls = (enableSearch || enableFilters) && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
6878
|
+
enableFilters && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
6213
6879
|
Button_default,
|
|
6214
6880
|
{
|
|
6215
6881
|
variant: "outline",
|
|
6216
6882
|
size: "medium",
|
|
6217
6883
|
onClick: () => setIsFilterModalOpen(true),
|
|
6218
6884
|
children: [
|
|
6219
|
-
/* @__PURE__ */ (0,
|
|
6885
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react16.Funnel, { size: 20 }),
|
|
6220
6886
|
"Filtros",
|
|
6221
|
-
hasActiveFilters && /* @__PURE__ */ (0,
|
|
6887
|
+
hasActiveFilters && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "ml-2 rounded-full bg-primary-500 px-2 py-0.5 text-xs text-white", children: Object.keys(activeFilters).length })
|
|
6222
6888
|
]
|
|
6223
6889
|
}
|
|
6224
6890
|
),
|
|
6225
|
-
enableSearch && /* @__PURE__ */ (0,
|
|
6891
|
+
enableSearch && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6226
6892
|
Search_default,
|
|
6227
6893
|
{
|
|
6228
6894
|
value: searchQuery,
|
|
@@ -6233,11 +6899,11 @@ function TableProvider({
|
|
|
6233
6899
|
}
|
|
6234
6900
|
) })
|
|
6235
6901
|
] });
|
|
6236
|
-
const headerSection = (headerContent || controls) && /* @__PURE__ */ (0,
|
|
6237
|
-
headerContent && /* @__PURE__ */ (0,
|
|
6238
|
-
controls && /* @__PURE__ */ (0,
|
|
6902
|
+
const headerSection = (headerContent || controls) && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex flex-col md:flex-row items-stretch md:items-center justify-between gap-4", children: [
|
|
6903
|
+
headerContent && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { children: headerContent }),
|
|
6904
|
+
controls && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex-1 md:flex-none", children: controls })
|
|
6239
6905
|
] });
|
|
6240
|
-
const table = /* @__PURE__ */ (0,
|
|
6906
|
+
const table = /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "w-full overflow-x-auto", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
6241
6907
|
Table_default,
|
|
6242
6908
|
{
|
|
6243
6909
|
variant,
|
|
@@ -6248,11 +6914,11 @@ function TableProvider({
|
|
|
6248
6914
|
showEmpty,
|
|
6249
6915
|
emptyState,
|
|
6250
6916
|
children: [
|
|
6251
|
-
/* @__PURE__ */ (0,
|
|
6917
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6252
6918
|
TableRow,
|
|
6253
6919
|
{
|
|
6254
6920
|
variant: variant === "borderless" ? "defaultBorderless" : "default",
|
|
6255
|
-
children: headers.map((header, index) => /* @__PURE__ */ (0,
|
|
6921
|
+
children: headers.map((header, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6256
6922
|
TableHead,
|
|
6257
6923
|
{
|
|
6258
6924
|
sortable: enableTableSort && header.sortable,
|
|
@@ -6266,7 +6932,7 @@ function TableProvider({
|
|
|
6266
6932
|
))
|
|
6267
6933
|
}
|
|
6268
6934
|
) }),
|
|
6269
|
-
/* @__PURE__ */ (0,
|
|
6935
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(TableBody, { children: loading ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(TableCell, { colSpan: headers.length, className: "text-center py-8", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-text-400 text-sm", children: "Carregando..." }) }) }) : displayData.map((row, rowIndex) => {
|
|
6270
6936
|
const effectiveIndex = useInternalPagination ? (currentPage - 1) * itemsPerPage + rowIndex : rowIndex;
|
|
6271
6937
|
const rowKeyValue = rowKey ? (() => {
|
|
6272
6938
|
const keyValue = row[rowKey];
|
|
@@ -6278,7 +6944,7 @@ function TableProvider({
|
|
|
6278
6944
|
}
|
|
6279
6945
|
return String(keyValue);
|
|
6280
6946
|
})() : `row-${effectiveIndex}`;
|
|
6281
|
-
return /* @__PURE__ */ (0,
|
|
6947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6282
6948
|
TableRow,
|
|
6283
6949
|
{
|
|
6284
6950
|
variant: variant === "borderless" ? "defaultBorderless" : "default",
|
|
@@ -6299,7 +6965,7 @@ function TableProvider({
|
|
|
6299
6965
|
}
|
|
6300
6966
|
}
|
|
6301
6967
|
const content = header.render ? header.render(value, row, effectiveIndex) : defaultContent;
|
|
6302
|
-
return /* @__PURE__ */ (0,
|
|
6968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6303
6969
|
TableCell,
|
|
6304
6970
|
{
|
|
6305
6971
|
className: header.className,
|
|
@@ -6318,7 +6984,7 @@ function TableProvider({
|
|
|
6318
6984
|
]
|
|
6319
6985
|
}
|
|
6320
6986
|
) });
|
|
6321
|
-
const pagination = enablePagination && !isEmpty && /* @__PURE__ */ (0,
|
|
6987
|
+
const pagination = enablePagination && !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6322
6988
|
TablePagination_default,
|
|
6323
6989
|
{
|
|
6324
6990
|
currentPage,
|
|
@@ -6332,13 +6998,13 @@ function TableProvider({
|
|
|
6332
6998
|
}
|
|
6333
6999
|
) });
|
|
6334
7000
|
if (children) {
|
|
6335
|
-
return /* @__PURE__ */ (0,
|
|
7001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
6336
7002
|
children({
|
|
6337
7003
|
controls: headerSection || controls || null,
|
|
6338
7004
|
table,
|
|
6339
7005
|
pagination
|
|
6340
7006
|
}),
|
|
6341
|
-
enableFilters && /* @__PURE__ */ (0,
|
|
7007
|
+
enableFilters && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6342
7008
|
FilterModal,
|
|
6343
7009
|
{
|
|
6344
7010
|
isOpen: isFilterModalOpen,
|
|
@@ -6352,11 +7018,11 @@ function TableProvider({
|
|
|
6352
7018
|
] });
|
|
6353
7019
|
}
|
|
6354
7020
|
const wrapperClassName = containerClassName || "w-full space-y-4";
|
|
6355
|
-
return /* @__PURE__ */ (0,
|
|
7021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: wrapperClassName, children: [
|
|
6356
7022
|
headerSection,
|
|
6357
7023
|
table,
|
|
6358
7024
|
pagination,
|
|
6359
|
-
enableFilters && /* @__PURE__ */ (0,
|
|
7025
|
+
enableFilters && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6360
7026
|
FilterModal,
|
|
6361
7027
|
{
|
|
6362
7028
|
isOpen: isFilterModalOpen,
|
|
@@ -6370,8 +7036,106 @@ function TableProvider({
|
|
|
6370
7036
|
] });
|
|
6371
7037
|
}
|
|
6372
7038
|
|
|
7039
|
+
// src/components/RecommendedLessonsHistory/config/modelsFiltersConfig.ts
|
|
7040
|
+
var getSubjectOptions = (data) => {
|
|
7041
|
+
if (!data?.subjects) return [];
|
|
7042
|
+
return data.subjects.map((subject) => ({
|
|
7043
|
+
id: subject.id,
|
|
7044
|
+
name: subject.name
|
|
7045
|
+
}));
|
|
7046
|
+
};
|
|
7047
|
+
var createGoalModelsFiltersConfig = (userData) => [
|
|
7048
|
+
{
|
|
7049
|
+
key: "content",
|
|
7050
|
+
label: "CONTE\xDADO",
|
|
7051
|
+
categories: [
|
|
7052
|
+
{
|
|
7053
|
+
key: "subject",
|
|
7054
|
+
label: "Mat\xE9ria",
|
|
7055
|
+
selectedIds: [],
|
|
7056
|
+
itens: getSubjectOptions(userData)
|
|
7057
|
+
}
|
|
7058
|
+
]
|
|
7059
|
+
}
|
|
7060
|
+
];
|
|
7061
|
+
|
|
7062
|
+
// src/components/RecommendedLessonsHistory/utils/filterBuilders.ts
|
|
7063
|
+
var buildGoalModelsFiltersFromParams = (params) => {
|
|
7064
|
+
const filters = {
|
|
7065
|
+
page: params.page,
|
|
7066
|
+
limit: params.limit
|
|
7067
|
+
};
|
|
7068
|
+
if (params.search) {
|
|
7069
|
+
filters.search = params.search;
|
|
7070
|
+
}
|
|
7071
|
+
if (Array.isArray(params.subject) && params.subject.length > 0) {
|
|
7072
|
+
filters.subjectId = params.subject[0];
|
|
7073
|
+
}
|
|
7074
|
+
return filters;
|
|
7075
|
+
};
|
|
7076
|
+
|
|
7077
|
+
// src/components/RecommendedLessonsHistory/tabs/ModelsTab.tsx
|
|
7078
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
7079
|
+
var GOAL_MODELS_CONFIG = {
|
|
7080
|
+
entityName: "aula",
|
|
7081
|
+
entityNamePlural: "aulas",
|
|
7082
|
+
testId: "goal-models-tab",
|
|
7083
|
+
emptyStateTitle: "Crie modelos para agilizar suas aulas",
|
|
7084
|
+
emptyStateDescription: "Salve modelos de aulas recomendadas para reutilizar e enviar rapidamente para suas turmas!",
|
|
7085
|
+
searchPlaceholder: "Buscar modelo"
|
|
7086
|
+
};
|
|
7087
|
+
var GOAL_COLUMNS_CONFIG = {
|
|
7088
|
+
sendButtonLabel: "Enviar aula",
|
|
7089
|
+
sendButtonAriaLabel: "Enviar aula",
|
|
7090
|
+
deleteButtonAriaLabel: "Deletar modelo",
|
|
7091
|
+
editButtonAriaLabel: "Editar modelo"
|
|
7092
|
+
};
|
|
7093
|
+
var GoalModelsTab = ({
|
|
7094
|
+
fetchGoalModels,
|
|
7095
|
+
deleteGoalModel,
|
|
7096
|
+
onCreateModel,
|
|
7097
|
+
onSendLesson,
|
|
7098
|
+
onEditModel,
|
|
7099
|
+
emptyStateImage,
|
|
7100
|
+
noSearchImage,
|
|
7101
|
+
mapSubjectNameToEnum,
|
|
7102
|
+
userFilterData,
|
|
7103
|
+
subjectsMap
|
|
7104
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
7105
|
+
ModelsTabBase,
|
|
7106
|
+
{
|
|
7107
|
+
fetchModels: fetchGoalModels,
|
|
7108
|
+
deleteModel: deleteGoalModel,
|
|
7109
|
+
onCreateModel,
|
|
7110
|
+
onSend: onSendLesson,
|
|
7111
|
+
onEditModel,
|
|
7112
|
+
emptyStateImage,
|
|
7113
|
+
noSearchImage,
|
|
7114
|
+
mapSubjectNameToEnum,
|
|
7115
|
+
userFilterData,
|
|
7116
|
+
subjectsMap,
|
|
7117
|
+
config: GOAL_MODELS_CONFIG,
|
|
7118
|
+
createTableColumns: (mapSubject, send, edit, del) => createModelsTableColumnsBase(
|
|
7119
|
+
mapSubject,
|
|
7120
|
+
send,
|
|
7121
|
+
edit,
|
|
7122
|
+
del,
|
|
7123
|
+
GOAL_COLUMNS_CONFIG
|
|
7124
|
+
),
|
|
7125
|
+
createFiltersConfig: createGoalModelsFiltersConfig,
|
|
7126
|
+
buildFiltersFromParams: buildGoalModelsFiltersFromParams,
|
|
7127
|
+
createUseModels: createUseGoalModels
|
|
7128
|
+
}
|
|
7129
|
+
);
|
|
7130
|
+
|
|
6373
7131
|
// src/components/RecommendedLessonsHistory/RecommendedLessonsHistory.tsx
|
|
6374
|
-
var
|
|
7132
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
7133
|
+
var GoalPageTab = /* @__PURE__ */ ((GoalPageTab2) => {
|
|
7134
|
+
GoalPageTab2["HISTORY"] = "history";
|
|
7135
|
+
GoalPageTab2["DRAFTS"] = "drafts";
|
|
7136
|
+
GoalPageTab2["MODELS"] = "models";
|
|
7137
|
+
return GoalPageTab2;
|
|
7138
|
+
})(GoalPageTab || {});
|
|
6375
7139
|
var isNonEmptyArray = (param) => Array.isArray(param) && param.length > 0;
|
|
6376
7140
|
var extractFilterValue = (param) => {
|
|
6377
7141
|
if (!isNonEmptyArray(param)) return {};
|
|
@@ -6412,7 +7176,7 @@ var getSchoolOptions = (data) => {
|
|
|
6412
7176
|
name: school.name
|
|
6413
7177
|
}));
|
|
6414
7178
|
};
|
|
6415
|
-
var
|
|
7179
|
+
var getSubjectOptions2 = (data) => {
|
|
6416
7180
|
if (!data?.subjects) return [];
|
|
6417
7181
|
return data.subjects.map((subject) => ({
|
|
6418
7182
|
id: subject.id,
|
|
@@ -6478,7 +7242,7 @@ var createGoalFiltersConfig = (userData) => [
|
|
|
6478
7242
|
key: "subject",
|
|
6479
7243
|
label: "Mat\xE9ria",
|
|
6480
7244
|
selectedIds: [],
|
|
6481
|
-
itens:
|
|
7245
|
+
itens: getSubjectOptions2(userData)
|
|
6482
7246
|
},
|
|
6483
7247
|
{
|
|
6484
7248
|
key: "theme",
|
|
@@ -6531,7 +7295,7 @@ var createTableColumns = (mapSubjectNameToEnum, onDeleteGoal, onEditGoal) => [
|
|
|
6531
7295
|
className: "max-w-[200px] truncate",
|
|
6532
7296
|
render: (value) => {
|
|
6533
7297
|
const title = typeof value === "string" ? value : "";
|
|
6534
|
-
return /* @__PURE__ */ (0,
|
|
7298
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text_default, { size: "sm", title, children: title });
|
|
6535
7299
|
}
|
|
6536
7300
|
},
|
|
6537
7301
|
{
|
|
@@ -6541,7 +7305,7 @@ var createTableColumns = (mapSubjectNameToEnum, onDeleteGoal, onEditGoal) => [
|
|
|
6541
7305
|
className: "max-w-[150px] truncate",
|
|
6542
7306
|
render: (value) => {
|
|
6543
7307
|
const school = typeof value === "string" ? value : "";
|
|
6544
|
-
return /* @__PURE__ */ (0,
|
|
7308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text_default, { size: "sm", title: school, children: school });
|
|
6545
7309
|
}
|
|
6546
7310
|
},
|
|
6547
7311
|
{
|
|
@@ -6558,11 +7322,11 @@ var createTableColumns = (mapSubjectNameToEnum, onDeleteGoal, onEditGoal) => [
|
|
|
6558
7322
|
const subjectName = typeof value === "string" ? value : "";
|
|
6559
7323
|
const subjectEnum = mapSubjectNameToEnum?.(subjectName);
|
|
6560
7324
|
if (!subjectEnum) {
|
|
6561
|
-
return /* @__PURE__ */ (0,
|
|
7325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text_default, { size: "sm", className: "truncate", title: subjectName, children: subjectName });
|
|
6562
7326
|
}
|
|
6563
7327
|
const subjectInfo = getSubjectInfo(subjectEnum);
|
|
6564
|
-
return /* @__PURE__ */ (0,
|
|
6565
|
-
/* @__PURE__ */ (0,
|
|
7328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center gap-2", title: subjectName, children: [
|
|
7329
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6566
7330
|
"span",
|
|
6567
7331
|
{
|
|
6568
7332
|
className: cn(
|
|
@@ -6572,7 +7336,7 @@ var createTableColumns = (mapSubjectNameToEnum, onDeleteGoal, onEditGoal) => [
|
|
|
6572
7336
|
children: subjectInfo.icon
|
|
6573
7337
|
}
|
|
6574
7338
|
),
|
|
6575
|
-
/* @__PURE__ */ (0,
|
|
7339
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text_default, { size: "sm", className: "truncate", children: subjectName })
|
|
6576
7340
|
] });
|
|
6577
7341
|
}
|
|
6578
7342
|
},
|
|
@@ -6588,9 +7352,9 @@ var createTableColumns = (mapSubjectNameToEnum, onDeleteGoal, onEditGoal) => [
|
|
|
6588
7352
|
render: (value) => {
|
|
6589
7353
|
const status = typeof value === "string" ? value : "";
|
|
6590
7354
|
if (!status) {
|
|
6591
|
-
return /* @__PURE__ */ (0,
|
|
7355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text_default, { size: "sm", color: "text-text-500", children: "-" });
|
|
6592
7356
|
}
|
|
6593
|
-
return /* @__PURE__ */ (0,
|
|
7357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6594
7358
|
Badge_default,
|
|
6595
7359
|
{
|
|
6596
7360
|
variant: "solid",
|
|
@@ -6605,7 +7369,7 @@ var createTableColumns = (mapSubjectNameToEnum, onDeleteGoal, onEditGoal) => [
|
|
|
6605
7369
|
key: "completionPercentage",
|
|
6606
7370
|
label: "Conclus\xE3o",
|
|
6607
7371
|
sortable: true,
|
|
6608
|
-
render: (value) => /* @__PURE__ */ (0,
|
|
7372
|
+
render: (value) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6609
7373
|
ProgressBar_default,
|
|
6610
7374
|
{
|
|
6611
7375
|
value: Number(value),
|
|
@@ -6631,20 +7395,20 @@ var createTableColumns = (mapSubjectNameToEnum, onDeleteGoal, onEditGoal) => [
|
|
|
6631
7395
|
e.stopPropagation();
|
|
6632
7396
|
onEditGoal?.(row.id);
|
|
6633
7397
|
};
|
|
6634
|
-
return /* @__PURE__ */ (0,
|
|
6635
|
-
/* @__PURE__ */ (0,
|
|
7398
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex justify-center gap-2", children: [
|
|
7399
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6636
7400
|
IconButton_default,
|
|
6637
7401
|
{
|
|
6638
|
-
icon: /* @__PURE__ */ (0,
|
|
7402
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_phosphor_react17.Trash, { size: 20 }),
|
|
6639
7403
|
size: "sm",
|
|
6640
7404
|
title: "Excluir",
|
|
6641
7405
|
onClick: handleDelete
|
|
6642
7406
|
}
|
|
6643
7407
|
),
|
|
6644
|
-
/* @__PURE__ */ (0,
|
|
7408
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6645
7409
|
IconButton_default,
|
|
6646
7410
|
{
|
|
6647
|
-
icon: /* @__PURE__ */ (0,
|
|
7411
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_phosphor_react17.PencilSimple, { size: 20 }),
|
|
6648
7412
|
size: "sm",
|
|
6649
7413
|
title: "Editar",
|
|
6650
7414
|
onClick: handleEdit
|
|
@@ -6658,7 +7422,7 @@ var createTableColumns = (mapSubjectNameToEnum, onDeleteGoal, onEditGoal) => [
|
|
|
6658
7422
|
label: "",
|
|
6659
7423
|
sortable: false,
|
|
6660
7424
|
className: "w-12",
|
|
6661
|
-
render: () => /* @__PURE__ */ (0,
|
|
7425
|
+
render: () => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "flex justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_phosphor_react17.CaretRight, { size: 20, className: "text-text-600" }) })
|
|
6662
7426
|
}
|
|
6663
7427
|
];
|
|
6664
7428
|
var RecommendedLessonsHistory = ({
|
|
@@ -6673,12 +7437,35 @@ var RecommendedLessonsHistory = ({
|
|
|
6673
7437
|
userFilterData,
|
|
6674
7438
|
title = "Hist\xF3rico de aulas recomendadas",
|
|
6675
7439
|
createButtonText = "Criar aula",
|
|
6676
|
-
searchPlaceholder = "Buscar aula"
|
|
7440
|
+
searchPlaceholder = "Buscar aula",
|
|
7441
|
+
fetchGoalModels,
|
|
7442
|
+
deleteGoalModel,
|
|
7443
|
+
onCreateModel,
|
|
7444
|
+
onSendLesson,
|
|
7445
|
+
onEditModel,
|
|
7446
|
+
subjectsMap,
|
|
7447
|
+
defaultTab,
|
|
7448
|
+
onTabChange
|
|
6677
7449
|
}) => {
|
|
6678
|
-
const [activeTab, setActiveTab] = (0,
|
|
6679
|
-
|
|
7450
|
+
const [activeTab, setActiveTab] = (0, import_react23.useState)(
|
|
7451
|
+
defaultTab ?? "history" /* HISTORY */
|
|
7452
|
+
);
|
|
7453
|
+
(0, import_react23.useEffect)(() => {
|
|
7454
|
+
if (defaultTab !== void 0) {
|
|
7455
|
+
setActiveTab(defaultTab);
|
|
7456
|
+
}
|
|
7457
|
+
}, [defaultTab]);
|
|
7458
|
+
const handleTabChange = (0, import_react23.useCallback)(
|
|
7459
|
+
(value) => {
|
|
7460
|
+
const newTab = value;
|
|
7461
|
+
setActiveTab(newTab);
|
|
7462
|
+
onTabChange?.(newTab);
|
|
7463
|
+
},
|
|
7464
|
+
[onTabChange]
|
|
7465
|
+
);
|
|
7466
|
+
const fetchGoalsHistoryRef = (0, import_react23.useRef)(fetchGoalsHistory);
|
|
6680
7467
|
fetchGoalsHistoryRef.current = fetchGoalsHistory;
|
|
6681
|
-
const useGoalsHistory = (0,
|
|
7468
|
+
const useGoalsHistory = (0, import_react23.useMemo)(
|
|
6682
7469
|
() => createUseRecommendedLessonsHistory(
|
|
6683
7470
|
(filters) => fetchGoalsHistoryRef.current(filters)
|
|
6684
7471
|
),
|
|
@@ -6691,31 +7478,31 @@ var RecommendedLessonsHistory = ({
|
|
|
6691
7478
|
pagination,
|
|
6692
7479
|
fetchGoals
|
|
6693
7480
|
} = useGoalsHistory();
|
|
6694
|
-
const initialFilterConfigs = (0,
|
|
7481
|
+
const initialFilterConfigs = (0, import_react23.useMemo)(
|
|
6695
7482
|
() => createGoalFiltersConfig(userFilterData),
|
|
6696
7483
|
[userFilterData]
|
|
6697
7484
|
);
|
|
6698
|
-
const tableColumns = (0,
|
|
7485
|
+
const tableColumns = (0, import_react23.useMemo)(
|
|
6699
7486
|
() => createTableColumns(mapSubjectNameToEnum, onDeleteGoal, onEditGoal),
|
|
6700
7487
|
[mapSubjectNameToEnum, onDeleteGoal, onEditGoal]
|
|
6701
7488
|
);
|
|
6702
|
-
const handleParamsChange = (0,
|
|
7489
|
+
const handleParamsChange = (0, import_react23.useCallback)(
|
|
6703
7490
|
(params) => {
|
|
6704
7491
|
const filters = buildFiltersFromParams(params);
|
|
6705
7492
|
fetchGoals(filters);
|
|
6706
7493
|
},
|
|
6707
7494
|
[fetchGoals]
|
|
6708
7495
|
);
|
|
6709
|
-
return /* @__PURE__ */ (0,
|
|
7496
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
6710
7497
|
"div",
|
|
6711
7498
|
{
|
|
6712
7499
|
"data-testid": "recommended-lessons-history",
|
|
6713
7500
|
className: "flex flex-col w-full h-auto relative justify-center items-center mb-5 overflow-hidden",
|
|
6714
7501
|
children: [
|
|
6715
|
-
/* @__PURE__ */ (0,
|
|
6716
|
-
/* @__PURE__ */ (0,
|
|
6717
|
-
/* @__PURE__ */ (0,
|
|
6718
|
-
/* @__PURE__ */ (0,
|
|
7502
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "absolute top-0 left-0 h-[150px] w-full z-0" }),
|
|
7503
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("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: [
|
|
7504
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("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: [
|
|
7505
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6719
7506
|
Text_default,
|
|
6720
7507
|
{
|
|
6721
7508
|
as: "h1",
|
|
@@ -6724,21 +7511,21 @@ var RecommendedLessonsHistory = ({
|
|
|
6724
7511
|
children: title
|
|
6725
7512
|
}
|
|
6726
7513
|
),
|
|
6727
|
-
/* @__PURE__ */ (0,
|
|
7514
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "flex-shrink-0 lg:w-auto self-center sm:self-auto", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6728
7515
|
Menu,
|
|
6729
7516
|
{
|
|
6730
7517
|
defaultValue: "history" /* HISTORY */,
|
|
6731
7518
|
value: activeTab,
|
|
6732
|
-
onValueChange:
|
|
7519
|
+
onValueChange: handleTabChange,
|
|
6733
7520
|
variant: "menu2",
|
|
6734
7521
|
className: "bg-transparent shadow-none px-0",
|
|
6735
|
-
children: /* @__PURE__ */ (0,
|
|
7522
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
6736
7523
|
MenuContent,
|
|
6737
7524
|
{
|
|
6738
7525
|
variant: "menu2",
|
|
6739
7526
|
className: "w-full lg:w-auto max-w-full min-w-0",
|
|
6740
7527
|
children: [
|
|
6741
|
-
/* @__PURE__ */ (0,
|
|
7528
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6742
7529
|
MenuItem,
|
|
6743
7530
|
{
|
|
6744
7531
|
variant: "menu2",
|
|
@@ -6748,7 +7535,7 @@ var RecommendedLessonsHistory = ({
|
|
|
6748
7535
|
children: "Hist\xF3rico"
|
|
6749
7536
|
}
|
|
6750
7537
|
),
|
|
6751
|
-
/* @__PURE__ */ (0,
|
|
7538
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6752
7539
|
MenuItem,
|
|
6753
7540
|
{
|
|
6754
7541
|
variant: "menu2",
|
|
@@ -6758,7 +7545,7 @@ var RecommendedLessonsHistory = ({
|
|
|
6758
7545
|
children: "Rascunhos"
|
|
6759
7546
|
}
|
|
6760
7547
|
),
|
|
6761
|
-
/* @__PURE__ */ (0,
|
|
7548
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6762
7549
|
MenuItem,
|
|
6763
7550
|
{
|
|
6764
7551
|
variant: "menu2",
|
|
@@ -6774,8 +7561,8 @@ var RecommendedLessonsHistory = ({
|
|
|
6774
7561
|
}
|
|
6775
7562
|
) })
|
|
6776
7563
|
] }),
|
|
6777
|
-
/* @__PURE__ */ (0,
|
|
6778
|
-
activeTab === "history" /* HISTORY */ && /* @__PURE__ */ (0,
|
|
7564
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex flex-col items-center w-full min-h-0 flex-1", children: [
|
|
7565
|
+
activeTab === "history" /* HISTORY */ && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_jsx_runtime41.Fragment, { children: error ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "flex items-center justify-center bg-background rounded-xl w-full min-h-[705px]", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text_default, { size: "lg", color: "text-error-500", children: error }) }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6779
7566
|
TableProvider,
|
|
6780
7567
|
{
|
|
6781
7568
|
data: goals,
|
|
@@ -6800,14 +7587,14 @@ var RecommendedLessonsHistory = ({
|
|
|
6800
7587
|
image: noSearchImage
|
|
6801
7588
|
},
|
|
6802
7589
|
emptyState: {
|
|
6803
|
-
component: /* @__PURE__ */ (0,
|
|
7590
|
+
component: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6804
7591
|
EmptyState_default,
|
|
6805
7592
|
{
|
|
6806
7593
|
image: emptyStateImage,
|
|
6807
7594
|
title: "Crie uma nova aula",
|
|
6808
7595
|
description: "Selecione um conjunto de aulas organizadas por tema e ajude seus alunos a estudarem de forma estruturada e eficiente!",
|
|
6809
7596
|
buttonText: createButtonText,
|
|
6810
|
-
buttonIcon: /* @__PURE__ */ (0,
|
|
7597
|
+
buttonIcon: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_phosphor_react17.Plus, { size: 18 }),
|
|
6811
7598
|
buttonVariant: "outline",
|
|
6812
7599
|
buttonAction: "primary",
|
|
6813
7600
|
onButtonClick: onCreateLesson
|
|
@@ -6822,22 +7609,22 @@ var RecommendedLessonsHistory = ({
|
|
|
6822
7609
|
table,
|
|
6823
7610
|
pagination: paginationComponent
|
|
6824
7611
|
} = renderProps;
|
|
6825
|
-
return /* @__PURE__ */ (0,
|
|
6826
|
-
/* @__PURE__ */ (0,
|
|
6827
|
-
/* @__PURE__ */ (0,
|
|
7612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "space-y-4", children: [
|
|
7613
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
7614
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6828
7615
|
Button_default,
|
|
6829
7616
|
{
|
|
6830
7617
|
variant: "solid",
|
|
6831
7618
|
action: "primary",
|
|
6832
7619
|
size: "medium",
|
|
6833
7620
|
onClick: onCreateLesson,
|
|
6834
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
7621
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_phosphor_react17.Plus, { size: 18, weight: "bold" }),
|
|
6835
7622
|
children: createButtonText
|
|
6836
7623
|
}
|
|
6837
7624
|
),
|
|
6838
7625
|
controls
|
|
6839
7626
|
] }),
|
|
6840
|
-
/* @__PURE__ */ (0,
|
|
7627
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "bg-background rounded-xl p-6 space-y-4", children: [
|
|
6841
7628
|
table,
|
|
6842
7629
|
paginationComponent
|
|
6843
7630
|
] })
|
|
@@ -6845,8 +7632,22 @@ var RecommendedLessonsHistory = ({
|
|
|
6845
7632
|
}
|
|
6846
7633
|
}
|
|
6847
7634
|
) }) }),
|
|
6848
|
-
activeTab === "drafts" /* DRAFTS */ && /* @__PURE__ */ (0,
|
|
6849
|
-
activeTab === "models" /* MODELS */ &&
|
|
7635
|
+
activeTab === "drafts" /* DRAFTS */ && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "flex items-center justify-center bg-background rounded-xl w-full min-h-[705px]", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Text_default, { size: "lg", color: "text-text-600", children: "Rascunhos em desenvolvimento" }) }),
|
|
7636
|
+
activeTab === "models" /* MODELS */ && fetchGoalModels && deleteGoalModel && onCreateModel && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
7637
|
+
GoalModelsTab,
|
|
7638
|
+
{
|
|
7639
|
+
fetchGoalModels,
|
|
7640
|
+
deleteGoalModel,
|
|
7641
|
+
onCreateModel,
|
|
7642
|
+
onSendLesson,
|
|
7643
|
+
onEditModel,
|
|
7644
|
+
emptyStateImage,
|
|
7645
|
+
noSearchImage,
|
|
7646
|
+
mapSubjectNameToEnum,
|
|
7647
|
+
userFilterData,
|
|
7648
|
+
subjectsMap
|
|
7649
|
+
}
|
|
7650
|
+
)
|
|
6850
7651
|
] })
|
|
6851
7652
|
] })
|
|
6852
7653
|
]
|
|
@@ -6856,6 +7657,7 @@ var RecommendedLessonsHistory = ({
|
|
|
6856
7657
|
var RecommendedLessonsHistory_default = RecommendedLessonsHistory;
|
|
6857
7658
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6858
7659
|
0 && (module.exports = {
|
|
7660
|
+
GoalPageTab,
|
|
6859
7661
|
RecommendedLessonsHistory
|
|
6860
7662
|
});
|
|
6861
7663
|
//# sourceMappingURL=index.js.map
|