analytica-frontend-lib 1.1.21 → 1.1.23
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/Accordation/index.js +1 -1
- package/dist/Accordation/index.js.map +1 -1
- package/dist/Accordation/index.mjs +1 -1
- package/dist/Accordation/index.mjs.map +1 -1
- package/dist/Card/index.js +1 -1
- package/dist/Card/index.js.map +1 -1
- package/dist/Card/index.mjs +1 -1
- package/dist/Card/index.mjs.map +1 -1
- package/dist/LoadingModal/index.d.mts +11 -0
- package/dist/LoadingModal/index.d.ts +11 -0
- package/dist/LoadingModal/index.js +79 -0
- package/dist/LoadingModal/index.js.map +1 -0
- package/dist/LoadingModal/index.mjs +58 -0
- package/dist/LoadingModal/index.mjs.map +1 -0
- package/dist/NotificationCard/index.d.mts +104 -0
- package/dist/NotificationCard/index.d.ts +104 -0
- package/dist/NotificationCard/index.js +799 -0
- package/dist/NotificationCard/index.js.map +1 -0
- package/dist/NotificationCard/index.mjs +786 -0
- package/dist/NotificationCard/index.mjs.map +1 -0
- package/dist/Quiz/index.js +3 -14
- package/dist/Quiz/index.js.map +1 -1
- package/dist/Quiz/index.mjs +3 -14
- package/dist/Quiz/index.mjs.map +1 -1
- package/dist/index.css +49 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +257 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +255 -14
- package/dist/index.mjs.map +1 -1
- package/dist/no-notification-result-7Y3ACV6V.png +0 -0
- package/dist/styles.css +49 -0
- package/dist/styles.css.map +1 -1
- package/package.json +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -45,6 +45,8 @@ export { useUrlAuthentication } from './Auth/useUrlAuthentication/index.mjs';
|
|
|
45
45
|
export { useApiConfig } from './Auth/useApiConfig/index.mjs';
|
|
46
46
|
export { Quiz, QuizAlternative, QuizConnectDots, QuizContent, QuizDissertative, QuizFooter, QuizHeader, QuizHeaderResult, QuizImageQuestion, QuizListResult, QuizListResultByMateria, QuizMultipleChoice, QuizQuestionList, QuizResultHeaderTitle, QuizResultPerformance, QuizResultTitle, QuizTitle, QuizTrueOrFalse, getStatusBadge } from './Quiz/index.mjs';
|
|
47
47
|
export { ANSWER_STATUS, Activity, Lesson, QUESTION_DIFFICULTY, QUESTION_STATUS, QUESTION_TYPE, Question, QuestionResult, QuizState, Simulated, UserAnswerItem, useQuizStore } from './Quiz/useQuizStore/index.mjs';
|
|
48
|
+
export { default as LoadingModal } from './LoadingModal/index.mjs';
|
|
49
|
+
export { default as NotificationCard, NotificationGroup, NotificationItem } from './NotificationCard/index.mjs';
|
|
48
50
|
import 'react/jsx-runtime';
|
|
49
51
|
|
|
50
52
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -45,6 +45,8 @@ export { useUrlAuthentication } from './Auth/useUrlAuthentication/index.js';
|
|
|
45
45
|
export { useApiConfig } from './Auth/useApiConfig/index.js';
|
|
46
46
|
export { Quiz, QuizAlternative, QuizConnectDots, QuizContent, QuizDissertative, QuizFooter, QuizHeader, QuizHeaderResult, QuizImageQuestion, QuizListResult, QuizListResultByMateria, QuizMultipleChoice, QuizQuestionList, QuizResultHeaderTitle, QuizResultPerformance, QuizResultTitle, QuizTitle, QuizTrueOrFalse, getStatusBadge } from './Quiz/index.js';
|
|
47
47
|
export { ANSWER_STATUS, Activity, Lesson, QUESTION_DIFFICULTY, QUESTION_STATUS, QUESTION_TYPE, Question, QuestionResult, QuizState, Simulated, UserAnswerItem, useQuizStore } from './Quiz/useQuizStore/index.js';
|
|
48
|
+
export { default as LoadingModal } from './LoadingModal/index.js';
|
|
49
|
+
export { default as NotificationCard, NotificationGroup, NotificationItem } from './NotificationCard/index.js';
|
|
48
50
|
import 'react/jsx-runtime';
|
|
49
51
|
|
|
50
52
|
/**
|
package/dist/index.js
CHANGED
|
@@ -64,6 +64,7 @@ __export(src_exports, {
|
|
|
64
64
|
IconRender: () => IconRender_default,
|
|
65
65
|
IconRoundedButton: () => IconRoundedButton_default,
|
|
66
66
|
Input: () => Input_default,
|
|
67
|
+
LoadingModal: () => loadingModal_default,
|
|
67
68
|
Menu: () => Menu_default,
|
|
68
69
|
MenuContent: () => MenuContent,
|
|
69
70
|
MenuItem: () => MenuItem,
|
|
@@ -73,6 +74,7 @@ __export(src_exports, {
|
|
|
73
74
|
MultipleChoiceList: () => MultipleChoiceList,
|
|
74
75
|
NavButton: () => NavButton_default,
|
|
75
76
|
NotFound: () => NotFound_default,
|
|
77
|
+
NotificationCard: () => NotificationCard_default,
|
|
76
78
|
ProfileMenuFooter: () => ProfileMenuFooter,
|
|
77
79
|
ProfileMenuHeader: () => ProfileMenuHeader,
|
|
78
80
|
ProfileMenuSection: () => ProfileMenuSection,
|
|
@@ -5215,7 +5217,7 @@ var CardSimulationHistory = (0, import_react14.forwardRef)(({ data, onSimulation
|
|
|
5215
5217
|
),
|
|
5216
5218
|
onClick: () => onSimulationClick?.(simulation),
|
|
5217
5219
|
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex justify-between items-center w-full gap-2", children: [
|
|
5218
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-col gap-2 flex-1 min-w-0", children: [
|
|
5220
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-wrap flex-col justify-between sm:flex-row gap-2 flex-1 min-w-0", children: [
|
|
5219
5221
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
5220
5222
|
Text_default,
|
|
5221
5223
|
{
|
|
@@ -8595,18 +8597,7 @@ var Quiz = (0, import_react28.forwardRef)(({ children, className, variant = "def
|
|
|
8595
8597
|
(0, import_react28.useEffect)(() => {
|
|
8596
8598
|
setVariant(variant);
|
|
8597
8599
|
}, [variant, setVariant]);
|
|
8598
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
8599
|
-
"div",
|
|
8600
|
-
{
|
|
8601
|
-
ref,
|
|
8602
|
-
className: cn(
|
|
8603
|
-
"w-full max-w-[1000px] flex flex-col mx-auto h-full relative not-lg:px-6",
|
|
8604
|
-
className
|
|
8605
|
-
),
|
|
8606
|
-
...props,
|
|
8607
|
-
children
|
|
8608
|
-
}
|
|
8609
|
-
);
|
|
8600
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { ref, className: cn("flex flex-col", className), ...props, children });
|
|
8610
8601
|
});
|
|
8611
8602
|
var QuizHeaderResult = (0, import_react28.forwardRef)(
|
|
8612
8603
|
({ className, ...props }, ref) => {
|
|
@@ -9946,7 +9937,7 @@ var QuizListResultByMateria = ({
|
|
|
9946
9937
|
const { getQuestionsGroupedBySubject, getQuestionIndex } = useQuizStore();
|
|
9947
9938
|
const groupedQuestions = getQuestionsGroupedBySubject();
|
|
9948
9939
|
const answeredQuestions = groupedQuestions[subject] || [];
|
|
9949
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "
|
|
9940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex flex-col", children: [
|
|
9950
9941
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex flex-row pt-4 justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-text-950 font-bold text-2xl", children: answeredQuestions?.[0]?.knowledgeMatrix?.[0]?.subject?.name ?? "Sem mat\xE9ria" }) }),
|
|
9951
9942
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("section", { className: "flex flex-col ", children: [
|
|
9952
9943
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Resultado das quest\xF5es" }),
|
|
@@ -9974,6 +9965,256 @@ var QuizListResultByMateria = ({
|
|
|
9974
9965
|
] })
|
|
9975
9966
|
] });
|
|
9976
9967
|
};
|
|
9968
|
+
|
|
9969
|
+
// src/components/LoadingModal/loadingModal.tsx
|
|
9970
|
+
var import_react29 = require("react");
|
|
9971
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
9972
|
+
var LoadingModal = (0, import_react29.forwardRef)(
|
|
9973
|
+
({ open, title = "Titulo...", subtitle = "Subtitulo...", ...props }, ref) => {
|
|
9974
|
+
if (!open) return null;
|
|
9975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9976
|
+
"div",
|
|
9977
|
+
{
|
|
9978
|
+
ref,
|
|
9979
|
+
"aria-modal": "true",
|
|
9980
|
+
"aria-labelledby": "loading-modal-title",
|
|
9981
|
+
"aria-describedby": "loading-modal-subtitle",
|
|
9982
|
+
className: "fixed inset-0 z-50 flex items-center justify-center bg-background/90 backdrop-blur-xs",
|
|
9983
|
+
...props,
|
|
9984
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "w-full max-w-[364px] flex flex-col items-center justify-center gap-14", children: [
|
|
9985
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "animate-spin", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
9986
|
+
"svg",
|
|
9987
|
+
{
|
|
9988
|
+
width: "102",
|
|
9989
|
+
height: "102",
|
|
9990
|
+
viewBox: "0 0 102 102",
|
|
9991
|
+
fill: "none",
|
|
9992
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9993
|
+
"aria-hidden": "true",
|
|
9994
|
+
focusable: false,
|
|
9995
|
+
children: [
|
|
9996
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9997
|
+
"path",
|
|
9998
|
+
{
|
|
9999
|
+
d: "M101.5 51C101.5 78.8904 78.8904 101.5 51 101.5C23.1096 101.5 0.5 78.8904 0.5 51C0.5 23.1096 23.1096 0.5 51 0.5C78.8904 0.5 101.5 23.1096 101.5 51ZM8.62286 51C8.62286 74.4043 27.5957 93.3771 51 93.3771C74.4043 93.3771 93.3771 74.4043 93.3771 51C93.3771 27.5957 74.4043 8.62286 51 8.62286C27.5957 8.62286 8.62286 27.5957 8.62286 51Z",
|
|
10000
|
+
className: "fill-primary-100"
|
|
10001
|
+
}
|
|
10002
|
+
),
|
|
10003
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10004
|
+
"path",
|
|
10005
|
+
{
|
|
10006
|
+
d: "M97.4386 51C99.6816 51 101.517 52.8213 101.337 55.0571C100.754 62.2833 98.6212 69.3162 95.0643 75.6696C90.8444 83.207 84.7616 89.536 77.3975 94.0514C70.0333 98.5668 61.6339 101.118 53.0024 101.46C44.371 101.803 35.7959 99.9255 28.0971 96.0078C20.3982 92.0902 13.833 86.2631 9.02917 79.0838C4.22529 71.9045 1.34332 63.6129 0.658804 55.0017C-0.0257159 46.3906 1.51009 37.7479 5.1194 29.8997C8.16173 23.2845 12.5915 17.4202 18.0904 12.6959C19.7917 11.2341 22.3444 11.6457 23.6647 13.459C24.9851 15.2723 24.5702 17.7988 22.8916 19.2866C18.5048 23.1747 14.9608 27.9413 12.4992 33.2937C9.47048 39.8794 8.1817 47.132 8.75612 54.3581C9.33053 61.5841 11.7489 68.542 15.7801 74.5666C19.8113 80.5911 25.3205 85.4809 31.781 88.7684C38.2414 92.0559 45.4372 93.6312 52.6804 93.3438C59.9235 93.0564 66.9718 90.9158 73.1515 87.1267C79.3311 83.3375 84.4355 78.0266 87.9766 71.7015C90.8546 66.561 92.6217 60.8903 93.1827 55.0553C93.3973 52.8225 95.1955 51 97.4386 51Z",
|
|
10007
|
+
className: "fill-primary-600"
|
|
10008
|
+
}
|
|
10009
|
+
)
|
|
10010
|
+
]
|
|
10011
|
+
}
|
|
10012
|
+
) }),
|
|
10013
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("span", { className: "flex flex-col gap-4 text-center", children: [
|
|
10014
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { id: "loading-modal-title", className: "text-text-950 text-lg", children: title }),
|
|
10015
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { id: "loading-modal-subtitle", className: "text-text-600 text-lg", children: subtitle })
|
|
10016
|
+
] })
|
|
10017
|
+
] })
|
|
10018
|
+
}
|
|
10019
|
+
);
|
|
10020
|
+
}
|
|
10021
|
+
);
|
|
10022
|
+
var loadingModal_default = LoadingModal;
|
|
10023
|
+
|
|
10024
|
+
// src/components/NotificationCard/NotificationCard.tsx
|
|
10025
|
+
var import_phosphor_react21 = require("phosphor-react");
|
|
10026
|
+
|
|
10027
|
+
// src/assets/img/no-notification-result.png
|
|
10028
|
+
var no_notification_result_default = "./no-notification-result-7Y3ACV6V.png";
|
|
10029
|
+
|
|
10030
|
+
// src/components/NotificationCard/NotificationCard.tsx
|
|
10031
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
10032
|
+
var SingleNotificationCard = ({
|
|
10033
|
+
title,
|
|
10034
|
+
message,
|
|
10035
|
+
time,
|
|
10036
|
+
isRead,
|
|
10037
|
+
onMarkAsRead,
|
|
10038
|
+
onDelete,
|
|
10039
|
+
onNavigate,
|
|
10040
|
+
actionLabel,
|
|
10041
|
+
className
|
|
10042
|
+
}) => {
|
|
10043
|
+
const handleMarkAsRead = (e) => {
|
|
10044
|
+
e.preventDefault();
|
|
10045
|
+
e.stopPropagation();
|
|
10046
|
+
if (!isRead) {
|
|
10047
|
+
onMarkAsRead();
|
|
10048
|
+
}
|
|
10049
|
+
};
|
|
10050
|
+
const handleDelete = (e) => {
|
|
10051
|
+
e.preventDefault();
|
|
10052
|
+
e.stopPropagation();
|
|
10053
|
+
onDelete();
|
|
10054
|
+
};
|
|
10055
|
+
const handleNavigate = (e) => {
|
|
10056
|
+
e.stopPropagation();
|
|
10057
|
+
if (onNavigate) {
|
|
10058
|
+
onNavigate();
|
|
10059
|
+
}
|
|
10060
|
+
};
|
|
10061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
10062
|
+
"div",
|
|
10063
|
+
{
|
|
10064
|
+
className: cn(
|
|
10065
|
+
"flex flex-col justify-center items-start p-4 gap-2 w-full bg-background border-b border-border-200",
|
|
10066
|
+
"last:border-b-0",
|
|
10067
|
+
className
|
|
10068
|
+
),
|
|
10069
|
+
children: [
|
|
10070
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center gap-2 w-full", children: [
|
|
10071
|
+
!isRead && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "w-[7px] h-[7px] bg-info-300 rounded-full flex-shrink-0" }),
|
|
10072
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("h3", { className: "font-bold text-sm leading-4 text-text-950 flex-grow", children: title }),
|
|
10073
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(DropdownMenu_default, { children: [
|
|
10074
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
10075
|
+
DropdownMenuTrigger,
|
|
10076
|
+
{
|
|
10077
|
+
className: "flex-shrink-0 inline-flex items-center justify-center font-medium bg-transparent text-text-950 cursor-pointer hover:bg-info-50 w-6 h-6 rounded-lg",
|
|
10078
|
+
"aria-label": "Menu de a\xE7\xF5es",
|
|
10079
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_phosphor_react21.DotsThreeVertical, { size: 24 })
|
|
10080
|
+
}
|
|
10081
|
+
),
|
|
10082
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(DropdownMenuContent, { align: "end", className: "min-w-[160px]", children: [
|
|
10083
|
+
!isRead && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
10084
|
+
DropdownMenuItem,
|
|
10085
|
+
{
|
|
10086
|
+
onClick: handleMarkAsRead,
|
|
10087
|
+
className: "text-text-950",
|
|
10088
|
+
children: "Marcar como lida"
|
|
10089
|
+
}
|
|
10090
|
+
),
|
|
10091
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DropdownMenuItem, { onClick: handleDelete, className: "text-error-600", children: "Deletar" })
|
|
10092
|
+
] })
|
|
10093
|
+
] })
|
|
10094
|
+
] }),
|
|
10095
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-sm leading-[21px] text-text-800 w-full", children: message }),
|
|
10096
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center justify-between w-full", children: [
|
|
10097
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-sm font-medium text-text-400", children: time }),
|
|
10098
|
+
onNavigate && actionLabel && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
10099
|
+
"button",
|
|
10100
|
+
{
|
|
10101
|
+
type: "button",
|
|
10102
|
+
onClick: handleNavigate,
|
|
10103
|
+
className: "text-sm font-medium text-info-600 hover:text-info-700 cursor-pointer",
|
|
10104
|
+
children: actionLabel
|
|
10105
|
+
}
|
|
10106
|
+
)
|
|
10107
|
+
] })
|
|
10108
|
+
]
|
|
10109
|
+
}
|
|
10110
|
+
);
|
|
10111
|
+
};
|
|
10112
|
+
var NotificationEmpty = () => {
|
|
10113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex flex-col items-center justify-center gap-4 p-6 w-full", children: [
|
|
10114
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "w-20 h-20 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
10115
|
+
"img",
|
|
10116
|
+
{
|
|
10117
|
+
src: no_notification_result_default,
|
|
10118
|
+
alt: "Sem notifica\xE7\xF5es",
|
|
10119
|
+
width: 82,
|
|
10120
|
+
height: 82,
|
|
10121
|
+
className: "object-contain"
|
|
10122
|
+
}
|
|
10123
|
+
) }),
|
|
10124
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("h3", { className: "text-xl font-semibold text-text-950 text-center leading-[23px]", children: "Nenhuma notifica\xE7\xE3o no momento" }),
|
|
10125
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-sm font-normal text-text-400 text-center max-w-[316px] leading-[21px]", children: "Voc\xEA est\xE1 em dia com todas as novidades. Volte depois para conferir atualiza\xE7\xF5es!" })
|
|
10126
|
+
] });
|
|
10127
|
+
};
|
|
10128
|
+
var NotificationList = ({
|
|
10129
|
+
groupedNotifications = [],
|
|
10130
|
+
loading = false,
|
|
10131
|
+
error = null,
|
|
10132
|
+
onRetry,
|
|
10133
|
+
onMarkAsReadById,
|
|
10134
|
+
onDeleteById,
|
|
10135
|
+
onNavigateById,
|
|
10136
|
+
getActionLabel,
|
|
10137
|
+
renderEmpty,
|
|
10138
|
+
className
|
|
10139
|
+
}) => {
|
|
10140
|
+
if (error) {
|
|
10141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: [
|
|
10142
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-sm text-error-600", children: error }),
|
|
10143
|
+
onRetry && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
10144
|
+
"button",
|
|
10145
|
+
{
|
|
10146
|
+
type: "button",
|
|
10147
|
+
onClick: onRetry,
|
|
10148
|
+
className: "text-sm text-info-600 hover:text-info-700",
|
|
10149
|
+
children: "Tentar novamente"
|
|
10150
|
+
}
|
|
10151
|
+
)
|
|
10152
|
+
] });
|
|
10153
|
+
}
|
|
10154
|
+
if (loading) {
|
|
10155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "flex flex-col gap-0 w-full", children: ["skeleton-first", "skeleton-second", "skeleton-third"].map(
|
|
10156
|
+
(skeletonId) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
10157
|
+
SkeletonCard,
|
|
10158
|
+
{
|
|
10159
|
+
className: "p-4 border-b border-border-200"
|
|
10160
|
+
},
|
|
10161
|
+
skeletonId
|
|
10162
|
+
)
|
|
10163
|
+
) });
|
|
10164
|
+
}
|
|
10165
|
+
if (!groupedNotifications || groupedNotifications.length === 0) {
|
|
10166
|
+
return renderEmpty ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "w-full", children: renderEmpty() }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(NotificationEmpty, {});
|
|
10167
|
+
}
|
|
10168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: cn("flex flex-col gap-0 w-full", className), children: groupedNotifications.map((group, idx) => /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex flex-col", children: [
|
|
10169
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "flex items-end px-4 py-6 pb-4", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("h4", { className: "text-lg font-bold text-text-500 flex-grow", children: group.label }) }),
|
|
10170
|
+
group.notifications.map((notification) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
10171
|
+
SingleNotificationCard,
|
|
10172
|
+
{
|
|
10173
|
+
title: notification.title,
|
|
10174
|
+
message: notification.message,
|
|
10175
|
+
time: notification.time,
|
|
10176
|
+
isRead: notification.isRead,
|
|
10177
|
+
onMarkAsRead: () => onMarkAsReadById?.(notification.id),
|
|
10178
|
+
onDelete: () => onDeleteById?.(notification.id),
|
|
10179
|
+
onNavigate: notification.entityType && notification.entityId && onNavigateById ? () => onNavigateById(
|
|
10180
|
+
notification.entityType,
|
|
10181
|
+
notification.entityId
|
|
10182
|
+
) : void 0,
|
|
10183
|
+
actionLabel: getActionLabel?.(notification.entityType)
|
|
10184
|
+
},
|
|
10185
|
+
notification.id
|
|
10186
|
+
))
|
|
10187
|
+
] }, `${group.label}-${idx}`)) });
|
|
10188
|
+
};
|
|
10189
|
+
var NotificationCard = (props) => {
|
|
10190
|
+
if (props.groupedNotifications !== void 0 || props.notifications !== void 0 || props.loading || props.error) {
|
|
10191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
10192
|
+
NotificationList,
|
|
10193
|
+
{
|
|
10194
|
+
...props,
|
|
10195
|
+
groupedNotifications: props.groupedNotifications ?? (props.notifications ? [{ label: "Notifica\xE7\xF5es", notifications: props.notifications }] : [])
|
|
10196
|
+
}
|
|
10197
|
+
);
|
|
10198
|
+
}
|
|
10199
|
+
if (props.title !== void 0 && props.message !== void 0 && props.time !== void 0 && props.isRead !== void 0 && props.onMarkAsRead && props.onDelete) {
|
|
10200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
10201
|
+
SingleNotificationCard,
|
|
10202
|
+
{
|
|
10203
|
+
title: props.title,
|
|
10204
|
+
message: props.message,
|
|
10205
|
+
time: props.time,
|
|
10206
|
+
isRead: props.isRead,
|
|
10207
|
+
onMarkAsRead: props.onMarkAsRead,
|
|
10208
|
+
onDelete: props.onDelete,
|
|
10209
|
+
onNavigate: props.onNavigate,
|
|
10210
|
+
actionLabel: props.actionLabel,
|
|
10211
|
+
className: props.className
|
|
10212
|
+
}
|
|
10213
|
+
);
|
|
10214
|
+
}
|
|
10215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "flex flex-col items-center gap-4 p-6 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "text-sm text-text-600", children: "Nenhuma notifica\xE7\xE3o configurada" }) });
|
|
10216
|
+
};
|
|
10217
|
+
var NotificationCard_default = NotificationCard;
|
|
9977
10218
|
// Annotate the CommonJS export names for ESM import in node:
|
|
9978
10219
|
0 && (module.exports = {
|
|
9979
10220
|
ANSWER_STATUS,
|
|
@@ -10010,6 +10251,7 @@ var QuizListResultByMateria = ({
|
|
|
10010
10251
|
IconRender,
|
|
10011
10252
|
IconRoundedButton,
|
|
10012
10253
|
Input,
|
|
10254
|
+
LoadingModal,
|
|
10013
10255
|
Menu,
|
|
10014
10256
|
MenuContent,
|
|
10015
10257
|
MenuItem,
|
|
@@ -10019,6 +10261,7 @@ var QuizListResultByMateria = ({
|
|
|
10019
10261
|
MultipleChoiceList,
|
|
10020
10262
|
NavButton,
|
|
10021
10263
|
NotFound,
|
|
10264
|
+
NotificationCard,
|
|
10022
10265
|
ProfileMenuFooter,
|
|
10023
10266
|
ProfileMenuHeader,
|
|
10024
10267
|
ProfileMenuSection,
|