analytica-frontend-lib 1.1.59 → 1.1.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CheckBox/index.d.mts +1 -1
- package/dist/CheckBox/index.d.ts +1 -1
- package/dist/NotificationCard/index.d.mts +1 -1
- package/dist/NotificationCard/index.d.ts +1 -1
- package/dist/NotificationCard/index.js +76 -62
- package/dist/NotificationCard/index.js.map +1 -1
- package/dist/NotificationCard/index.mjs +76 -62
- package/dist/NotificationCard/index.mjs.map +1 -1
- package/dist/{NotificationCard-DpSGkWEa.d.mts → NotificationCard-4GgB0Nsf.d.mts} +5 -0
- package/dist/{NotificationCard-DpSGkWEa.d.ts → NotificationCard-4GgB0Nsf.d.ts} +5 -0
- package/dist/Radio/index.d.mts +2 -2
- package/dist/Radio/index.d.ts +2 -2
- package/dist/Search/index.d.mts +1 -1
- package/dist/Search/index.d.ts +1 -1
- package/dist/SubjectInfo/index.js +16 -16
- package/dist/SubjectInfo/index.js.map +1 -1
- package/dist/SubjectInfo/index.mjs +16 -16
- package/dist/SubjectInfo/index.mjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +93 -79
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +93 -79
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6610,82 +6610,82 @@ var import_phosphor_react17 = require("phosphor-react");
|
|
|
6610
6610
|
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
6611
6611
|
var SubjectInfo = {
|
|
6612
6612
|
["F\xEDsica" /* FISICA */]: {
|
|
6613
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Atom, { size: 17 }),
|
|
6613
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Atom, { size: 17, color: "currentColor" }),
|
|
6614
6614
|
colorClass: "bg-subject-1",
|
|
6615
6615
|
name: "F\xEDsica" /* FISICA */
|
|
6616
6616
|
},
|
|
6617
6617
|
["Hist\xF3ria" /* HISTORIA */]: {
|
|
6618
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Scroll, { size: 17 }),
|
|
6618
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Scroll, { size: 17, color: "currentColor" }),
|
|
6619
6619
|
colorClass: "bg-subject-2",
|
|
6620
6620
|
name: "Hist\xF3ria" /* HISTORIA */
|
|
6621
6621
|
},
|
|
6622
6622
|
["Literatura" /* LITERATURA */]: {
|
|
6623
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(BookOpenText, { size: 17, color: "
|
|
6623
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(BookOpenText, { size: 17, color: "currentColor" }),
|
|
6624
6624
|
colorClass: "bg-subject-3",
|
|
6625
6625
|
name: "Literatura" /* LITERATURA */
|
|
6626
6626
|
},
|
|
6627
6627
|
["Geografia" /* GEOGRAFIA */]: {
|
|
6628
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.GlobeHemisphereWest, { size: 17 }),
|
|
6628
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.GlobeHemisphereWest, { size: 17, color: "currentColor" }),
|
|
6629
6629
|
colorClass: "bg-subject-4",
|
|
6630
6630
|
name: "Geografia" /* GEOGRAFIA */
|
|
6631
6631
|
},
|
|
6632
6632
|
["Biologia" /* BIOLOGIA */]: {
|
|
6633
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Microscope, { size: 17, color: "
|
|
6633
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Microscope, { size: 17, color: "currentColor" }),
|
|
6634
6634
|
colorClass: "bg-subject-5",
|
|
6635
6635
|
name: "Biologia" /* BIOLOGIA */
|
|
6636
6636
|
},
|
|
6637
6637
|
["Portugu\xEAs" /* PORTUGUES */]: {
|
|
6638
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ChatPT2, { size: 17, color: "
|
|
6638
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ChatPT2, { size: 17, color: "currentColor" }),
|
|
6639
6639
|
colorClass: "bg-subject-6",
|
|
6640
6640
|
name: "Portugu\xEAs" /* PORTUGUES */
|
|
6641
6641
|
},
|
|
6642
6642
|
["Qu\xEDmica" /* QUIMICA */]: {
|
|
6643
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Flask, { size: 17 }),
|
|
6643
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Flask, { size: 17, color: "currentColor" }),
|
|
6644
6644
|
colorClass: "bg-subject-7",
|
|
6645
6645
|
name: "Qu\xEDmica" /* QUIMICA */
|
|
6646
6646
|
},
|
|
6647
6647
|
["Artes" /* ARTES */]: {
|
|
6648
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Palette, { size: 17 }),
|
|
6648
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Palette, { size: 17, color: "currentColor" }),
|
|
6649
6649
|
colorClass: "bg-subject-8",
|
|
6650
6650
|
name: "Artes" /* ARTES */
|
|
6651
6651
|
},
|
|
6652
6652
|
["Matem\xE1tica" /* MATEMATICA */]: {
|
|
6653
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.MathOperations, { size: 17 }),
|
|
6653
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.MathOperations, { size: 17, color: "currentColor" }),
|
|
6654
6654
|
colorClass: "bg-subject-9",
|
|
6655
6655
|
name: "Matem\xE1tica" /* MATEMATICA */
|
|
6656
6656
|
},
|
|
6657
6657
|
["Filosofia" /* FILOSOFIA */]: {
|
|
6658
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(HeadCircuit, { size: 17, color: "
|
|
6658
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(HeadCircuit, { size: 17, color: "currentColor" }),
|
|
6659
6659
|
colorClass: "bg-subject-10",
|
|
6660
6660
|
name: "Filosofia" /* FILOSOFIA */
|
|
6661
6661
|
},
|
|
6662
6662
|
["Espanhol" /* ESPANHOL */]: {
|
|
6663
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ChatES2, { size: 17, color: "
|
|
6663
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ChatES2, { size: 17, color: "currentColor" }),
|
|
6664
6664
|
colorClass: "bg-subject-11",
|
|
6665
6665
|
name: "Espanhol" /* ESPANHOL */
|
|
6666
6666
|
},
|
|
6667
6667
|
["Reda\xE7\xE3o" /* REDACAO */]: {
|
|
6668
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.ArticleNyTimes, { size: 17 }),
|
|
6668
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.ArticleNyTimes, { size: 17, color: "currentColor" }),
|
|
6669
6669
|
colorClass: "bg-subject-12",
|
|
6670
6670
|
name: "Reda\xE7\xE3o" /* REDACAO */
|
|
6671
6671
|
},
|
|
6672
6672
|
["Sociologia" /* SOCIOLOGIA */]: {
|
|
6673
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Person, { size: 17 }),
|
|
6673
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.Person, { size: 17, color: "currentColor" }),
|
|
6674
6674
|
colorClass: "bg-subject-13",
|
|
6675
6675
|
name: "Sociologia" /* SOCIOLOGIA */
|
|
6676
6676
|
},
|
|
6677
6677
|
["Ingl\xEAs" /* INGLES */]: {
|
|
6678
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ChatEN2, { size: 17, color: "
|
|
6678
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ChatEN2, { size: 17, color: "currentColor" }),
|
|
6679
6679
|
colorClass: "bg-subject-14",
|
|
6680
6680
|
name: "Ingl\xEAs" /* INGLES */
|
|
6681
6681
|
},
|
|
6682
6682
|
["Ed. F\xEDsica" /* EDUCACAO_FISICA */]: {
|
|
6683
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.DribbbleLogo, { size: 17 }),
|
|
6683
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.DribbbleLogo, { size: 17, color: "currentColor" }),
|
|
6684
6684
|
colorClass: "bg-subject-15",
|
|
6685
6685
|
name: "Ed. F\xEDsica" /* EDUCACAO_FISICA */
|
|
6686
6686
|
},
|
|
6687
6687
|
["Trilhas" /* TRILHAS */]: {
|
|
6688
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.BookBookmark, { size: 17 }),
|
|
6688
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_phosphor_react17.BookBookmark, { size: 17, color: "currentColor" }),
|
|
6689
6689
|
colorClass: "bg-subject-16",
|
|
6690
6690
|
name: "Trilhas" /* TRILHAS */
|
|
6691
6691
|
}
|
|
@@ -11505,6 +11505,7 @@ var NotificationCenter = ({
|
|
|
11505
11505
|
getActionLabel,
|
|
11506
11506
|
onFetchNotifications,
|
|
11507
11507
|
onMarkAllAsRead,
|
|
11508
|
+
onOpenChange,
|
|
11508
11509
|
emptyStateImage,
|
|
11509
11510
|
emptyStateTitle,
|
|
11510
11511
|
emptyStateDescription,
|
|
@@ -11520,6 +11521,13 @@ var NotificationCenter = ({
|
|
|
11520
11521
|
const handleDesktopClick = () => {
|
|
11521
11522
|
onToggleActive?.();
|
|
11522
11523
|
};
|
|
11524
|
+
const handleOpenChange = (open) => {
|
|
11525
|
+
const controlledByParent = typeof isActive === "boolean" && typeof onToggleActive === "function";
|
|
11526
|
+
onOpenChange?.(open);
|
|
11527
|
+
if (controlledByParent && !onOpenChange && !open && isActive) {
|
|
11528
|
+
onToggleActive?.();
|
|
11529
|
+
}
|
|
11530
|
+
};
|
|
11523
11531
|
(0, import_react32.useEffect)(() => {
|
|
11524
11532
|
if (isActive) {
|
|
11525
11533
|
onFetchNotifications?.();
|
|
@@ -11597,72 +11605,78 @@ var NotificationCenter = ({
|
|
|
11597
11605
|
] });
|
|
11598
11606
|
}
|
|
11599
11607
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
11600
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
11601
|
-
|
|
11602
|
-
|
|
11603
|
-
{
|
|
11604
|
-
|
|
11605
|
-
|
|
11606
|
-
|
|
11607
|
-
import_phosphor_react23.Bell,
|
|
11608
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
11609
|
+
DropdownMenu_default,
|
|
11610
|
+
{
|
|
11611
|
+
...typeof isActive === "boolean" ? { open: isActive, onOpenChange: handleOpenChange } : { onOpenChange: handleOpenChange },
|
|
11612
|
+
children: [
|
|
11613
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(DropdownMenuTrigger, { className: "text-primary cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11614
|
+
IconButton_default,
|
|
11608
11615
|
{
|
|
11609
|
-
|
|
11610
|
-
|
|
11611
|
-
|
|
11612
|
-
|
|
11613
|
-
className
|
|
11614
|
-
}
|
|
11615
|
-
) }),
|
|
11616
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11617
|
-
DropdownMenuContent,
|
|
11618
|
-
{
|
|
11619
|
-
className: "min-w-[320px] max-w-[400px] max-h-[500px] overflow-hidden",
|
|
11620
|
-
side: "bottom",
|
|
11621
|
-
align: "end",
|
|
11622
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col", children: [
|
|
11623
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "px-4 py-3 border-b border-border-200", children: [
|
|
11624
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11625
|
-
NotificationHeader,
|
|
11616
|
+
active: isActive,
|
|
11617
|
+
onClick: handleDesktopClick,
|
|
11618
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11619
|
+
import_phosphor_react23.Bell,
|
|
11626
11620
|
{
|
|
11627
|
-
|
|
11628
|
-
|
|
11621
|
+
size: 24,
|
|
11622
|
+
className: isActive ? "text-primary-950" : "text-primary"
|
|
11629
11623
|
}
|
|
11630
11624
|
),
|
|
11631
|
-
|
|
11632
|
-
|
|
11633
|
-
|
|
11634
|
-
|
|
11635
|
-
|
|
11636
|
-
|
|
11637
|
-
|
|
11638
|
-
|
|
11639
|
-
|
|
11640
|
-
|
|
11641
|
-
|
|
11642
|
-
|
|
11643
|
-
|
|
11644
|
-
|
|
11645
|
-
|
|
11646
|
-
|
|
11647
|
-
|
|
11648
|
-
|
|
11649
|
-
|
|
11650
|
-
|
|
11651
|
-
|
|
11652
|
-
|
|
11653
|
-
|
|
11654
|
-
|
|
11655
|
-
|
|
11656
|
-
|
|
11657
|
-
|
|
11658
|
-
|
|
11659
|
-
|
|
11660
|
-
|
|
11661
|
-
|
|
11662
|
-
|
|
11663
|
-
|
|
11664
|
-
|
|
11665
|
-
|
|
11625
|
+
className
|
|
11626
|
+
}
|
|
11627
|
+
) }),
|
|
11628
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11629
|
+
DropdownMenuContent,
|
|
11630
|
+
{
|
|
11631
|
+
className: "min-w-[320px] max-w-[400px] max-h-[500px] overflow-hidden",
|
|
11632
|
+
side: "bottom",
|
|
11633
|
+
align: "end",
|
|
11634
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col", children: [
|
|
11635
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "px-4 py-3 border-b border-border-200", children: [
|
|
11636
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11637
|
+
NotificationHeader,
|
|
11638
|
+
{
|
|
11639
|
+
unreadCount,
|
|
11640
|
+
variant: "dropdown"
|
|
11641
|
+
}
|
|
11642
|
+
),
|
|
11643
|
+
unreadCount > 0 && onMarkAllAsRead && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11644
|
+
"button",
|
|
11645
|
+
{
|
|
11646
|
+
type: "button",
|
|
11647
|
+
onClick: onMarkAllAsRead,
|
|
11648
|
+
className: "text-sm font-medium text-info-600 hover:text-info-700 cursor-pointer mt-2",
|
|
11649
|
+
children: "Marcar todas como lidas"
|
|
11650
|
+
}
|
|
11651
|
+
)
|
|
11652
|
+
] }),
|
|
11653
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "max-h-[350px] overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11654
|
+
NotificationList,
|
|
11655
|
+
{
|
|
11656
|
+
groupedNotifications,
|
|
11657
|
+
loading,
|
|
11658
|
+
error,
|
|
11659
|
+
onRetry,
|
|
11660
|
+
onMarkAsReadById,
|
|
11661
|
+
onDeleteById,
|
|
11662
|
+
onNavigateById,
|
|
11663
|
+
onGlobalNotificationClick: (notification) => {
|
|
11664
|
+
setGlobalNotificationModal({
|
|
11665
|
+
isOpen: true,
|
|
11666
|
+
notification
|
|
11667
|
+
});
|
|
11668
|
+
},
|
|
11669
|
+
getActionLabel,
|
|
11670
|
+
renderEmpty: renderEmptyState,
|
|
11671
|
+
emptyStateImage
|
|
11672
|
+
}
|
|
11673
|
+
) })
|
|
11674
|
+
] })
|
|
11675
|
+
}
|
|
11676
|
+
)
|
|
11677
|
+
]
|
|
11678
|
+
}
|
|
11679
|
+
),
|
|
11666
11680
|
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
11667
11681
|
Modal_default,
|
|
11668
11682
|
{
|
|
@@ -11772,7 +11786,7 @@ var createUseNotifications = (apiClient) => {
|
|
|
11772
11786
|
);
|
|
11773
11787
|
const getActionLabel = (0, import_react33.useCallback)(
|
|
11774
11788
|
(entityType) => {
|
|
11775
|
-
if (!entityType) return
|
|
11789
|
+
if (!entityType) return "Ver mais";
|
|
11776
11790
|
switch (entityType.toUpperCase()) {
|
|
11777
11791
|
case "ACTIVITY" /* ACTIVITY */:
|
|
11778
11792
|
return "Ver atividade";
|